/* ===== DEAL MODE ===== */
#deal-config, #annonces-config {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
}

/* Card palette: 4-row grid (one per suit) with suit label column */
#card-palette, #annonces-palette {
    display: grid;
    grid-template-columns: 28px repeat(8, var(--palette-w));
    gap: 3px 2px;
    align-items: center;
}

.palette-suit-label {
    font-size: 1.1rem;
    text-align: center;
    font-weight: 700;
    user-select: none;
    line-height: 1;
}

#card-palette .card, #annonces-palette .card {
    width: var(--palette-w);
    height: var(--palette-h);
}

#card-palette .card { cursor: grab; }
#card-palette .card.assigned { opacity: 0.25; }
#card-palette .card.dragging { opacity: 0.4; }
#card-palette.drag-over { background: rgba(212, 175, 55, 0.1); border-radius: 6px; }

/* Annonces palette: clickable cards */
#annonces-palette .card {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
#annonces-palette .card.ann-selected {
    outline: 2.5px solid #d4af37;
    outline-offset: -1px;
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(212, 175, 55, 0.4);
    z-index: 2;
}
#annonces-palette .card.ann-faded {
    opacity: 0.22;
    cursor: default;
}

/* Annonces: two-column layout — left (palette) + right (hand + results) */
#annonces-top-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
    flex: 1;
    min-height: 0;
}

#annonces-left {
    flex-shrink: 0;
}

#annonces-right {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Annonces hand preview */
#annonces-hand-preview {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#annonces-hand-display {
    justify-content: center;
    flex-wrap: wrap;
}

/* Deal table: cardinal direction layout */
#deal-table {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.deal-row {
    display: flex;
    justify-content: center;
}

.deal-row-middle {
    align-items: center;
    gap: 10px;
}

#deal-center-area {
    width: clamp(60px, 8vw, 100px);
    height: clamp(60px, 8vw, 100px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    background: rgba(0,0,0,0.15);
}

/* Drop zones */
.drop-zone {
    background: rgba(0, 0, 0, 0.25);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 8px;
    min-height: var(--dz-card-h);
    min-width: calc(var(--dz-card-w) + 16px);
    transition: border-color 0.2s, background 0.2s;
}

.drop-zone.ns {
    border-color: rgba(76, 175, 80, 0.3);
    background: rgba(76, 175, 80, 0.06);
}

.drop-zone.ew {
    border-color: rgba(229, 115, 115, 0.3);
    background: rgba(229, 115, 115, 0.06);
}

.drop-zone.drag-over {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    border-style: solid;
}

.drop-zone.full {
    border-color: rgba(76, 175, 80, 0.6);
    border-style: solid;
}

.drop-zone-label {
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.drop-zone.ns .drop-zone-label { color: #a5d6a7; }
.drop-zone.ew .drop-zone-label { color: #ef9a9a; }

.dz-count {
    font-weight: 400;
    opacity: 0.7;
    text-transform: none;
    letter-spacing: 0;
}

/* N/S drop zone cards: horizontal stacking */
.drop-zone.ns .drop-zone-cards {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    min-height: var(--dz-card-h);
    align-items: flex-end;
}
.drop-zone.ns .drop-zone-cards .card {
    width: var(--dz-card-w);
    height: var(--dz-card-h);
    margin-left: var(--dz-card-overlap);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.drop-zone.ns .drop-zone-cards .card:first-child { margin-left: 0; }
.drop-zone.ns .drop-zone-cards .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 10;
}

/* E/W drop zone cards: vertical stacking */
.drop-zone.ew .drop-zone-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: var(--dz-card-w);
    min-height: var(--dz-card-h);
    align-items: center;
}
.drop-zone.ew .drop-zone-cards .card {
    width: var(--dz-card-w);
    height: var(--dz-card-h);
    margin-top: calc(var(--dz-card-h) * -0.6);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.drop-zone.ew .drop-zone-cards .card:first-child { margin-top: 0; }
.drop-zone.ew .drop-zone-cards .card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 10;
}

/* Deal bottom bar */
#deal-bottom-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

#deal-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 6px;
    font-size: 0.9rem;
    color: #a5d6a7;
}

.deal-watch-btn {
    margin-left: auto;
}

/* Deal builder as accordion in Watch view */
#deal-builder-accordion {
    margin-top: 4px;
}
#deal-builder-accordion summary {
    cursor: pointer;
    color: #aaa;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 0;
    user-select: none;
}
#deal-builder-accordion summary:hover { color: #ddd; }
#deal-builder-accordion[open] summary { color: #d4af37; }

/* ===== ANNONCES MODE ===== */
#annonces-config {
    width: fit-content;
    padding: 16px;
}

#annonces-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}

.annonces-title {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    font-weight: 600;
    color: #d4af37;
}

#annonces-count {
    font-size: 0.9rem;
    color: #aaa;
    font-family: monospace;
}

/* Toggle switch for local/server mode */
.annonces-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

.annonces-toggle-label {
    color: #888;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.annonces-toggle-label.active {
    color: #d4af37;
    font-weight: 600;
}

.annonces-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.annonces-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.annonces-toggle-track {
    position: absolute;
    inset: 0;
    background: #444;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.annonces-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #ccc;
    border-radius: 50%;
    transition: transform 0.2s;
}

.annonces-toggle input:checked + .annonces-toggle-track {
    background: rgba(212, 175, 55, 0.5);
}

.annonces-toggle input:checked + .annonces-toggle-track::after {
    transform: translateX(16px);
    background: #d4af37;
}

#annonces-options {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

#annonces-loading {
    color: #aaa;
    font-style: italic;
    font-size: 0.9rem;
    padding: 8px 0;
}

#annonces-results {
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 8px;
}

.ann-qvalues-scroll {
    max-height: 260px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

#annonces-results-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 8px;
    text-transform: none;
    letter-spacing: 0;
}

.annonces-error {
    color: #ef9a9a;
    font-size: 0.85rem;
}

/* Wider visit-name for bid action labels */
#annonces-results .visit-name {
    width: 64px;
}

/* Bid history editor */
#annonces-history-section {
    margin-top: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.15);
    max-width: 400px;
}

#annonces-history-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.annonces-subtitle {
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex: 1;
}

#annonces-history-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 8px;
}

.ann-history-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    padding: 2px 0;
}

.ann-seat-badge {
    width: 20px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    padding: 1px 3px;
}

.ann-action-name {
    flex: 1;
    color: #ccc;
}

.ann-your-turn .ann-action-name {
    color: #d4af37;
    font-style: italic;
}

.ann-del-btn {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
}

.ann-del-btn:hover {
    color: #ef9a9a;
}

#annonces-history-add {
    display: flex;
    gap: 6px;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 8px;
}

#annonces-history-add select {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
}

#annonces-eval-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.annonces-sim-label {
    font-size: 0.85rem;
    color: #bbb;
}

#annonces-sim-count {
    background: #1a1a2e;
    color: #eee;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 0.85rem;
}

/* Results area: side-by-side panels */
#annonces-results-area {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 16px;
}

#annonces-nn-panel { flex-shrink: 0; width: 500px; max-width: 500px; }
#annonces-sim-panel { flex: 1; min-width: 0; }

.annonces-result-panel {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}

/* Oracle table */
#oracle-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
#oracle-table th { color: #888; font-weight: 600; padding: 4px 6px; text-align: center; }
#oracle-table td { padding: 4px 6px; text-align: center; border-bottom: 1px solid #222; }
#oracle-table td:first-child { font-size: 1.1rem; }
.oracle-high { color: #82e0aa; }
.oracle-mid  { color: #d4af37; }
.oracle-low  { color: #ef9a9a; }
.oracle-zero { color: #444; }

/* Section titles with inline progress bars */
#annonces-sim-header, #annonces-doudou-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: #aaa;
    font-size: 0.85rem;
}
#doudou-stats-text {
    color: #777;
    font-size: 0.75rem;
    white-space: nowrap;
}
.sim-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.sim-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}
.sim-progress-fill {
    height: 100%;
    background: #5b9bd5;
    border-radius: 2px;
    transition: width 0.15s ease-out;
    width: 0%;
}
.sim-progress.done .sim-progress-fill {
    background: #82e0aa;
}
.sim-progress-text {
    color: #666;
    font-size: 0.7rem;
    white-space: nowrap;
}

/* DouDou table */
#annonces-doudou-panel {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.doudou-explainer {
    color: #777;
    font-size: 0.78rem;
    line-height: 1.45;
    margin: 0 0 8px 0;
}

#doudou-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
#doudou-table th { color: #888; font-weight: 600; padding: 4px 6px; text-align: center; }
#doudou-table td { padding: 4px 6px; text-align: center; border-bottom: 1px solid #222; vertical-align: middle; }
#doudou-table td:first-child { font-size: 1.1rem; }

.doudou-empty { color: #333; }
.doudou-high .doudou-pct { color: #82e0aa; }
.doudou-mid .doudou-pct { color: #d4af37; }
.doudou-low .doudou-pct { color: #ef9a9a; }

.doudou-count {
    display: block;
    font-size: 0.7rem;
    color: #666;
    line-height: 1.1;
}

.doudou-pct {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.2;
}

.nn-explainer,
.oracle-explainer {
    color: #777;
    font-size: 0.78rem;
    line-height: 1.45;
    margin: 0 0 8px 0;
}

.dd-loader {
    text-align: center;
    padding: 16px 8px;
}

.dd-loader-text {
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

/* Sim viewer accordion */
#annonces-sim-viewer summary {
    cursor: pointer;
    color: #aaa;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 0;
    user-select: none;
}

#annonces-sim-viewer summary:hover {
    color: #ddd;
}

#annonces-sim-viewer[open] summary {
    color: #d4af37;
}

#annonces-sim-viewer-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.sim-deal-details {
    background: rgba(0,0,0,0.15);
    border-radius: 6px;
    padding: 4px 8px;
}

.sim-deal-details summary {
    cursor: pointer;
    color: #999;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 3px 0;
    user-select: none;
}

.sim-deal-details summary:hover {
    color: #ccc;
}

.sim-deal-details[open] summary {
    color: #d4af37;
}

.sim-deal-hands {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0;
}

.sim-hand-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sim-hand-label {
    width: 20px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    flex-shrink: 0;
}

.sim-hand {
    gap: 2px;
}

.sim-hand .card {
    width: 36px;
    height: auto;
}

/* Responsive: stack top-row on narrow screens */
@media (max-width: 800px) {
    #annonces-top-row {
        flex-direction: column;
        overflow-y: auto;
    }
    #annonces-right {
        overflow-y: visible;
    }
    #annonces-results-area {
        flex-direction: column;
    }
    #annonces-nn-panel {
        width: auto;
        max-width: none;
    }
}

/* ===== PROBLEMES PANELS ===== */
#pa-config, #pj-config {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
#pa-main, #pj-main {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}
#pa-left, #pj-left {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.prob-correction {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0,0,0,0.25);
    border-radius: 8px;
    padding: 14px 16px;
}
.prob-box {
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#pj-info-bar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}
#pj-trick-area {
    display: grid;
    grid-template-areas: ". n ." "w . e" ". s .";
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto auto;
    gap: 4px;
    align-items: center;
    justify-items: center;
    padding: 4px 0;
}
#pj-trick-n { grid-area: n; }
#pj-trick-s { grid-area: s; }
#pj-trick-w { grid-area: w; }
#pj-trick-e { grid-area: e; }
.prob-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 700;
    text-align: center;
}
.prob-badge-correct {
    background: rgba(76,175,80,.2);
    border: 1px solid rgba(76,175,80,.5);
    color: #a5d6a7;
}
.prob-badge-wrong {
    background: rgba(229,115,115,.2);
    border: 1px solid rgba(229,115,115,.4);
    color: #ef9a9a;
}
.prob-section {
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.prob-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #666;
    font-weight: 600;
}
.prob-best {
    font-size: .95rem;
    font-weight: 700;
    color: #d4af37;
}
.prob-next-btn {
    background: #4a4a4a;
    color: #ddd;
    align-self: stretch;
    margin-top: 4px;
}
.prob-next-btn:hover { background: #5a5a5a; }
#pj-all-hands {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.pj-reveal-seat {
    background: rgba(0,0,0,.15);
    border-radius: 4px;
    padding: 5px 7px;
}

/* Wide visit-name for bid action labels in prob panels */
#pa-nn-bars .visit-name { width: 64px; }

/* ===== DOCS / ABOUT ===== */
#docs-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 40px;
    line-height: 1.5;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    overflow-y: auto;
    max-height: 100%;
}

#docs-content h2 {
    font-size: clamp(1.3rem, 1.8vw, 1.7rem);
    color: #d4af37;
    margin-bottom: 6px;
    font-weight: 700;
}

.docs-subtitle {
    font-weight: 400;
    color: #999;
    font-size: 0.75em;
}

.docs-intro {
    color: #ccc;
    margin-bottom: 6px;
}

.docs-link {
    margin-bottom: 8px;
}

.docs-link a {
    color: #d4af37;
    text-decoration: none;
}
.docs-link a:hover { text-decoration: underline; }

#docs-content h3 {
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    color: #e0e0e0;
    margin: 16px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.docs-section {
    margin-bottom: 10px;
}

.docs-section h4 {
    font-size: clamp(0.9rem, 1vw, 1rem);
    color: #e0d8c0;
    margin-bottom: 4px;
}

.docs-section p {
    color: #aaa;
    margin: 0;
}

.docs-tag {
    display: inline-block;
    font-size: 0.7em;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 4px;
}

.docs-tag.best {
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #d4af37;
}

.docs-tag:not(.best):not(.subtle) {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #a5d6a7;
}

.docs-tag.subtle {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #888;
}

.docs-footer {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    color: #777;
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
}

.docs-footer a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
}
.docs-footer a:hover { text-decoration: underline; }

/* ===== CROYANCES (BELIEFS) ===== */
#belief-config {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

#belief-loading {
    color: #aaa;
    font-style: italic;
    font-size: 0.9rem;
}

#belief-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#belief-topbar {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#belief-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.belief-nav-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #ccc;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
}
.belief-nav-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }

#belief-slider {
    flex: 1;
    accent-color: #d4af37;
    cursor: pointer;
}

#belief-info {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #aaa;
}

#belief-action-info {
    font-weight: 600;
    color: #ccc;
}

#belief-last-action {
    color: #d4af37;
}

#belief-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.belief-label {
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.belief-obs-btn, .belief-mode-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #999;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.15s;
}
.belief-obs-btn:hover, .belief-mode-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #ddd;
}
.belief-obs-btn.active {
    background: rgba(212,175,55,0.2);
    border-color: #d4af37;
    color: #d4af37;
}
.belief-mode-btn.active {
    background: rgba(130,207,170,0.15);
    border-color: #82e0aa;
    color: #82e0aa;
}

/* Belief grid */
#belief-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.belief-suit {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.belief-suit-label {
    width: 28px;
    font-size: 1.3rem;
    text-align: center;
    padding-top: 4px;
    flex-shrink: 0;
}

.belief-cards-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.belief-card-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 56px;
}

.belief-card-img {
    width: 48px;
    height: auto;
    border-radius: 4px;
}

.belief-known .belief-card-img,
.belief-played .belief-card-img {
    opacity: 0.35;
}

.belief-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}

.belief-known .belief-tag { color: #82e0aa; }
.belief-played .belief-tag { color: #666; }

/* Belief bars */
.belief-bar-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.belief-bar-label {
    font-size: 0.55rem;
    color: #666;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
}

.belief-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    display: flex;
    overflow: hidden;
}

.belief-bar-seg {
    height: 100%;
    min-width: 1px;
    transition: width 0.2s;
}
.belief-bar-seg:first-child { border-radius: 3px 0 0 3px; }
.belief-bar-seg:last-child { border-radius: 0 3px 3px 0; }

.belief-truth-marker {
    font-size: 0.6rem;
    font-weight: 700;
    text-align: center;
    line-height: 1;
}

.belief-no-data {
    font-size: 0.7rem;
    color: #444;
    text-align: center;
}

/* Stats bar */
#belief-stats {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.belief-stat-group {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 0.85rem;
    color: #aaa;
}

.belief-stat-label {
    font-weight: 700;
    color: #d4af37;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.belief-stat-item b {
    color: #ccc;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    /* Beliefs: narrower card columns */
    .belief-card-col { width: 40px; }
    .belief-card-img { width: 34px; }
    .belief-suit-label { width: 20px; font-size: 1rem; }
    .belief-cards-row { gap: 3px; }

    /* Problems: stack vertically */
    #pa-main, #pj-main { flex-direction: column; }
    #pa-left, #pj-left { min-width: 0; }
    .prob-correction { width: 100%; }

    /* Docs: tighter padding */
    #docs-content { padding: 12px 16px; }
}
