.commission-rules-wrap {
    margin-top: 0.5rem;
}

.cr-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.cr-head p {
    margin: 0;
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.6;
}

.cr-refresh-btn {
    flex-shrink: 0;
    border: none;
    background: #10b981;
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

.cr-refresh-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.cr-message {
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.88rem;
    background: #ecfdf5;
    color: #047857;
}

.cr-message.error {
    background: #fef2f2;
    color: #b91c1c;
}

.cr-panel {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.cr-panel h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
}

.cr-panel-head + .cr-rate-grid,
.cr-panel-head ~ .cr-rate-grid {
    margin-top: 0;
}

.cr-panel-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.cr-panel-head h3 {
    margin: 0;
}

.cr-sim-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.22);
}

.cr-hint {
    color: #6b7280;
    font-size: 0.82rem;
    line-height: 1.55;
    margin: 0 0 8px;
}

.cr-live-data-hint {
    margin-bottom: 10px;
}

.cr-rate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.cr-rate-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.cr-rate-card span {
    display: block;
    color: #6b7280;
    font-size: 0.78rem;
}

.cr-rate-card strong {
    display: block;
    margin: 4px 0;
    font-size: 1rem;
    color: #059669;
}

.cr-rate-card small {
    color: #6b7280;
    font-size: 0.72rem;
    line-height: 1.4;
}

.cr-route-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.cr-route-card {
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    overflow: hidden;
}

.cr-route-title {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.82rem;
    line-height: 1.35;
    color: #111827;
}

.cr-partner-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.cr-partner-brace {
    display: flex;
    align-items: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #6366f1;
    line-height: 1;
    padding: 0 2px 0 0;
    user-select: none;
}

.cr-partner-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cr-partner-stack .cr-node {
    min-width: 72px;
    max-width: 118px;
}

.cr-pyramid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    gap: 6px 4px;
    padding-bottom: 2px;
}

.cr-node-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.cr-node-row-branch {
    flex-direction: column;
    align-items: center;
}

.cr-node-row-branch .cr-branch-list {
    width: auto;
    margin-top: 2px;
}

.cr-node {
    min-width: 64px;
    max-width: 112px;
    flex: 0 1 auto;
    border-radius: 8px;
    padding: 5px 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.cr-node strong,
.cr-node span {
    display: block;
    font-size: 0.68rem;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.cr-node span {
    margin-top: 2px;
    color: #4b5563;
    font-size: 0.64rem;
}

.cr-node.l1 { background: #eef2ff; border-color: #c7d2fe; }
.cr-node.sp { background: #ecfeff; border-color: #a5f3fc; }
.cr-node.nanny { background: #ecfdf5; border-color: #a7f3d0; }
.cr-node.inviter { background: #fff7ed; border-color: #fed7aa; }
.cr-node.family { background: #fdf2f8; border-color: #fbcfe8; }
.cr-node.disabled {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
    text-decoration: line-through;
}

.cr-branch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    width: 100%;
}

.cr-branch-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.cr-branch-line {
    width: 1px;
    height: 8px;
    border-left: 1px dashed #f59e0b;
}

.cr-branch-node {
    min-width: 64px;
    max-width: 96px;
    padding: 4px 5px;
    border-style: dashed;
    background: #fff7ed;
    border-color: #f59e0b;
}

.cr-branch-node small {
    display: block;
    margin-top: 2px;
    font-size: 0.58rem;
    line-height: 1.3;
    color: #9a3412;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.cr-arrow {
    align-self: center;
    color: #9ca3af;
    font-weight: 700;
    line-height: 1;
    padding: 0 2px;
}

.cr-route-note {
    margin-top: 8px;
    color: #6b7280;
    font-size: 0.78rem;
    line-height: 1.45;
}

.cr-route-card ul {
    margin: 8px 0 0;
    padding-left: 18px;
    color: #374151;
    font-size: 0.82rem;
    line-height: 1.6;
}

.cr-plain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.cr-plain-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
}

.cr-plain-card h4 {
    margin: 0 0 6px;
    font-size: 0.9rem;
}

.cr-plain-card p {
    font-size: 0.82rem !important;
    color: #6b7280 !important;
    line-height: 1.55 !important;
}

.cr-formula {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #ecfdf5;
    color: #047857;
    font-weight: 700;
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    .cr-route-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cr-head {
        flex-direction: column;
    }
}
