/* Bidding practice — visual language of the portal trainer (bidding.css):
   teal + gold, ink blue, 4-color suits, Source Sans 3 / Source Serif 4.
   Loads on top of the site's style.css and reuses its layout variables. */
@import url("fonts.css");

.bp-landing, .bp-set, .bp-board, .bp-preview {
    --teal: #0a5a58;
    --teal-d: #0c6663;
    --gold: #f2a900;
    --gold-d: #d99800;
    --ink: #006699;
    --red: #c62828;
    --green: #1d4d3c;
    --tint: #eaf1fb;
    --rule: #d9e1ec;
    --s-s: #1a1a1a;
    --s-h: #c41e3a;
    --s-d: #e67e22;
    --s-c: #6b7280;
    --sans: 'Source Sans 3', system-ui, sans-serif;
    --serif: 'Source Serif 4', Georgia, serif;
    --card-font: Arial, sans-serif;
    font-family: var(--sans);
    color: #1b3560;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 14px 40px;
}
.bp-landing h1, .bp-set h1, .bp-preview h1 {
    font-family: var(--serif);
    font-size: 30px;
    margin: 18px 0 6px;
}
.bp-lead { font-size: 17px; line-height: 1.45; color: #526277; margin: 0 0 18px; }
.bp-hint { color: #526277; font-size: 13px; font-weight: 400; }
.bp-error {
    background: #fdecea; color: #c62828; border: 1px solid #f5c6c0;
    border-radius: 8px; padding: 10px 14px; margin: 10px 0;
}
.bp-note { color: #526277; font-size: 13.5px; border-top: 1px solid var(--rule); padding-top: 12px; }

/* ---------- cards, buttons ---------- */
.card {
    background: #fff; border: 1px solid var(--rule); border-top: 4px solid var(--ink);
    border-radius: 10px; padding: 14px 16px; margin: 14px 0;
}
.card h2 { font-family: var(--serif); font-size: 19px; margin: 0 0 10px; }
.btn, .bp-create {
    display: inline-block; background: var(--gold); color: #1b3560; font-family: var(--sans);
    font-weight: 700; font-size: 16px; border: 0; border-radius: 999px;
    padding: 10px 22px; cursor: pointer; text-decoration: none;
}
.btn:hover, .bp-create:hover { background: var(--gold-d); }
.btn-secondary {
    background: #fff; color: var(--teal); border: 1.5px solid var(--teal); border-radius: 999px;
    font-family: var(--sans); font-size: 14px; font-weight: 600; padding: 6px 14px; cursor: pointer;
}
.btn-secondary:hover { background: #effaf8; }
.btn-secondary[hidden] { display: none; }

/* ---------- landing form ---------- */
.bp-form .bp-step {
    border: 1px solid var(--rule); border-radius: 10px; background: #fff;
    padding: 14px 16px 16px; margin: 14px 0;
}
.bp-form .bp-step legend {
    display: flex; align-items: center; gap: 8px; padding: 0 6px;
    font-family: var(--serif); font-size: 18px;
}
.bp-form .bp-step legend .nn {
    background: var(--teal); color: #fff; width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}

.mode-switch { display: flex; gap: 10px; flex-wrap: wrap; }
.mode-switch label {
    flex: 1 1 220px; display: block; border: 2px solid var(--rule); border-radius: 10px;
    padding: 10px 12px; cursor: pointer; font-weight: 700;
}
.mode-switch label small { display: block; font-weight: 400; color: #526277; font-size: 13px; }
.mode-switch label:has(input:checked) { border-color: var(--green); background: #f2f8f5; }
.mode-switch input { accent-color: var(--teal); }

.bp-panel { margin-top: 14px; }
.bp-radios { display: flex; gap: 18px; flex-wrap: wrap; margin: 8px 0; }
.bp-radios label { font-weight: 600; }
.bp-radios input, .bp-check input, .tchip-l input { accent-color: var(--teal); }
.bp-check { display: block; margin: 6px 0 10px; }

.segs { display: inline-flex; border: 1.5px solid var(--teal); border-radius: 999px; overflow: hidden; }
.segs label { padding: 6px 16px; cursor: pointer; color: var(--teal); font-weight: 700; }
.segs label + label { border-left: 1.5px solid var(--teal); }
.segs input { position: absolute; opacity: 0; pointer-events: none; }
.segs label:has(input:checked) { background: var(--teal); color: #fff; }

/* filter chips (portal trainer: label chips + tiny Edit buttons) */
.tchips, .filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; align-items: center; }
.tchip, .tchip-l {
    border: 1.5px solid var(--rule); color: #1b3560; background: #fff; border-radius: 999px;
    font-family: var(--sans); font-size: 14px; font-weight: 600; padding: 4px 12px;
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.filter-chips .tchip { position: relative; padding: 8px 12px; font-weight: 400; font-size: 13px; line-height: 1.2; }
.filter-chips .tchip input { position: absolute; opacity: 0; pointer-events: none; }
.filter-chips .tchip.on { border-color: var(--teal); background: #effaf8; }
.filter-chips .tchip.on .tchip-lab { color: var(--teal); }
.filter-chips .tchip-lab { font-weight: 700; }
.tchip.on { background: var(--teal); color: #fff; }
.tchip-add { border-style: dashed; }
.tchip-del {
    border: 0; background: #fdecea; color: #c62828; border-radius: 50%; width: 20px; height: 20px;
    line-height: 1; cursor: pointer; font-size: 13px; padding: 0;
}
.tchip-wrap { display: inline-flex; align-items: center; gap: 4px; }
.filter-block h3, .topic-tree h3, .topic-tree h4 { font-family: var(--serif); font-size: 16px; margin: 10px 0 4px; }
.lbl { font-size: 13px; color: #526277; font-weight: 700; margin: 10px 2px 6px; }
.btn-tiny { font-size: 12.5px; padding: 2px 10px; border-radius: 999px; line-height: 1.3; }
.filter-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.filter-actions .btn-secondary { text-decoration: none; display: inline-flex; align-items: center; }
.chk-rotate { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 12px; line-height: 1.35; font-size: 14px; }
.chk-rotate input { margin-top: 3px; flex: none; accent-color: var(--teal); }
.bid-input {
    width: 100%; box-sizing: border-box; height: 42px; border: 1.5px solid var(--rule);
    border-radius: 10px; padding: 0 12px; font-family: var(--sans); font-size: 15px;
}
.saved-filters { margin: 4px 0 2px; }

/* filter editor (portal trainer: hand cards + N–S line block) */
.filter-editor {
    border: 1px solid var(--rule); border-radius: 16px; padding: 16px; margin: 12px 0;
    background: #f7f9fb;
}
.filter-editor h3 { font-family: var(--serif); font-size: 17px; margin: 0 0 12px; }
.hand-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 8px; }
.hand-card { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; }
.hand-card-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.hand-card-head select {
    flex: 1; min-width: 0; border-radius: 8px; border: 1px solid #ccd3de;
    padding: 4px 6px; font-family: var(--sans); font-size: 13.5px;
}
.hand-card .row, .line-block .row {
    display: flex; gap: 6px; align-items: center; margin: 4px 0; font-size: 13.5px; flex-wrap: wrap;
}
.hand-card .row > span, .shape-lab { min-width: 1.6em; }
.shape-row { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: center; margin: 5px 0; font-size: 13px; }
.shape-lab { display: inline-block; min-width: 7.2em; font-size: 12.5px; color: #526277; }
.suit-checks { display: inline-flex; flex-wrap: wrap; gap: 2px 8px; }
.suit-checks label { display: inline-flex; gap: 3px; align-items: center; }
.hand-card input[type="number"], .line-block input[type="number"] {
    width: 3.6rem; border-radius: 8px; border: 1px solid #ccd3de; padding: 3px 5px;
    font-family: var(--sans);
}
.line-block { border: 1px solid var(--rule); border-radius: 12px; padding: 12px; margin: 12px 0; background: #fff; }
.line-block > b { display: block; margin-bottom: 6px; font-size: 14px; }
.line-lens { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.fit-row { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: center; margin-top: 8px; font-size: 13.5px; }
.fit-row label { display: inline-flex; gap: 4px; align-items: center; }
.tiny { font-size: 12px; margin-left: 4px; color: #526277; }
.filter-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.filter-editor-actions .bp-create { padding: 6px 18px; font-size: 14px; }
#filter_name { margin: 4px 0 0; }
@media (max-width: 700px) { .hand-cards { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .line-lens { grid-template-columns: 1fr; } .shape-lab { min-width: 100%; } }

/* topic tree (portal trainer: collapsible roots, chip subtopics) */
.topic-tree { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 8px; }
.topic { border: 1.5px solid var(--rule); border-radius: 16px; background: #fff; overflow: hidden; }
.topic-head { display: flex; align-items: stretch; }
.topic-tree label.theme {
    position: relative; flex: 1; margin: 0; border: 0; border-radius: 0; background: transparent;
    display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; cursor: pointer;
}
.theme input { position: absolute; opacity: 0; pointer-events: none; }
.theme .ck { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 6px; border: 2px solid #b4c2d4; background: #fff; }
.theme.on .ck { background: var(--teal); border-color: var(--teal); position: relative; }
.theme.on .ck:after {
    content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px;
    border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.theme .t { flex: 1; min-width: 0; }
.theme .t b { display: block; font-size: 15px; }
.theme .t span { font-size: 13px; color: #526277; }
.theme .cnt { flex: none; font-size: 12px; color: #526277; text-align: right; }
.topic-tog {
    flex: none; width: 44px; border: 0; background: transparent; cursor: pointer; color: #526277;
    display: flex; align-items: center; justify-content: center;
}
.topic-tog .chev {
    width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); margin-top: -4px; transition: transform 0.15s ease;
}
.topic.open .topic-tog .chev { transform: rotate(225deg); margin-top: 4px; }
.topic-body { display: none; padding: 0 12px 12px; }
.topic.open .topic-body { display: block; }
.topic-subs { display: flex; flex-wrap: wrap; gap: 8px; }
.sub-block { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.topic-l3s { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 8px; }
.topic-tree .tchip {
    position: relative; display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
    padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--rule);
    background: #fff; cursor: pointer; font-size: 13px; line-height: 1.2; font-weight: 400;
    color: #1b3560;
}
.topic-tree .tchip input { position: absolute; opacity: 0; pointer-events: none; }
.tchip-lab { font-weight: 700; }
.tchip-n { color: #526277; font-weight: 600; font-variant-numeric: tabular-nums; }
.topic-tree .tchip.on { border-color: var(--teal); background: #effaf8; }
.topic-tree .tchip.off { cursor: default; background: #f7f9fc; color: #526277; }
.topic-tree .tchip-l3 { padding: 6px 10px; font-size: 12px; }
.topic-extra { padding: 4px 2px 0; margin-top: 8px; }
.topic-extra .lbl { font-size: 13px; color: #526277; font-weight: 700; margin: 10px 2px 6px; }
.tfilter {
    position: relative; display: flex; align-items: center; gap: 8px; margin: 6px 0; padding: 8px 10px;
    border-radius: 12px; border: 1.5px solid transparent; cursor: pointer;
    font-size: 14px; font-weight: 600;
}
.tfilter input { position: absolute; opacity: 0; pointer-events: none; }
.tfilter .ck { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid #b4c2d4; background: #fff; }
.tfilter.on { border-color: var(--teal); background: #effaf8; }
.tfilter.on .ck { background: var(--teal); border-color: var(--teal); position: relative; }
.tfilter.on .ck:after {
    content: ""; position: absolute; left: 5px; top: 1px; width: 6px; height: 10px;
    border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
label.redundant { opacity: 0.45; }

.bp-submitrow { margin: 18px 0; }
input[name="title"] {
    border: 1px solid var(--rule); border-radius: 8px; padding: 8px 12px;
    font-family: var(--sans); font-size: 15px; width: min(360px, 100%);
}

/* ---------- board header ---------- */
.phead {
    display: flex; align-items: center; gap: 14px;
    background: linear-gradient(90deg, #0c6663, #0a5a58);
    border-bottom: 3px solid var(--gold); border-radius: 10px 10px 0 0;
    color: #fff; padding: 10px 16px; margin-top: 14px;
}
.phead .back { color: #fff; text-decoration: none; font-size: 20px; }
.phead .who { display: flex; flex-direction: column; line-height: 1.1; flex: 1; }
.phead .pname { font-family: var(--serif); font-size: 24px; }
.phead .prole { font-size: 12px; opacity: 0.8; }
.phead .st {
    background: rgba(255, 255, 255, 0.16); border-radius: 999px; padding: 4px 12px; font-size: 14px;
}
.phead .st.my { background: var(--gold); color: #1b3560; font-weight: 700; }
.cmp-tile { background: #fff; border-radius: 12px; padding: 3px; flex: none; }
.dcmp { display: inline-grid; grid-template-columns: repeat(3, 28px); grid-template-rows: repeat(3, 28px); align-items: center; justify-items: center; }
.dcmp .cmp { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; color: #000; }
.dcmp .north { grid-column: 2; grid-row: 1; border-radius: 45% 45% 5% 5%; }
.dcmp .south { grid-column: 2; grid-row: 3; border-radius: 5% 5% 45% 45%; }
.dcmp .west { grid-column: 1; grid-row: 2; border-radius: 45% 5% 5% 45%; }
.dcmp .east { grid-column: 3; grid-row: 2; border-radius: 5% 45% 45% 5%; }
.dcmp .board-num { grid-column: 2; grid-row: 2; color: #0c479d; font-size: 16px; font-weight: 700; }
.dcmp .nv { background: #98fb98; }
.dcmp .vul { background: #ff6347; }
.dcmp .dealer { font-weight: 800; text-decoration: underline; }

/* ---------- live layout ---------- */
.lv-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 900px) { .lv-grid { grid-template-columns: minmax(0, 450px) minmax(0, 420px); } }
.lv-left .card:first-child { border-top: 0; border-radius: 0 0 10px 10px; margin-top: 0; }

/* auction table (trainer style); fauc — компактный полевой аукцион */
.auc { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; font-family: var(--sans); font-size: 18px; }
.auc th { background: transparent; border: 0; padding: 0 3px 6px; text-align: center; }
.auc th.sc4 { height: 36px; border-radius: 12px; color: #000; font-weight: 600; font-size: 16px; vertical-align: middle; }
.auc th.sc4.hn { background: #98fb98; }
.auc th.sc4.hv { background: #ff6347; }
.auc th.sc4.dlr { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.auc th .me, .auc th .pn { display: block; font-size: 10.5px; font-weight: 700; line-height: 1.15; }
.auc th .me { color: var(--ink); }
.auc th .pn { color: var(--teal-d); }
.auc td { text-align: center; padding: 3px 0; height: 34px; font-weight: 600; font-size: 18px; font-family: var(--card-font); }
table.auc:not(.fauc) td { height: 40px; font-size: 23px; }
.auc tbody tr:nth-child(even) td { background: #f7f9fc; }
.auc td.pwait { background: #eef2f8 !important; border-radius: 8px; box-shadow: inset 0 0 0 2px #b9c6d8; }
.auc td.pend { background: #fff6d6 !important; border-radius: 8px; }
.auc td.call-pass { color: #526277; font-size: 19px; }
.auc.fauc tbody tr:nth-child(even) td { background: transparent; }
.auc.fauc th.sc4 { height: 26px; font-size: 13px; border-radius: 8px; }
.auc.fauc td.call-pass { font-size: 15px; }
.auc.fauc td .bid-pass { font-size: 15px; }
.auc thead tr.names th { padding: 2px 2px 4px; }
.auc thead tr.names th span {
    display: block; font-weight: 700; font-size: 11.5px; line-height: 1.15;
    color: var(--teal-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.q { display: inline-block; width: 26px; height: 24px; line-height: 24px; border-radius: 6px; background: var(--gold); color: #fff; font-weight: 800; animation: bid-pulse 1.4s infinite; }
@keyframes bid-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.bid-pass { color: #526277; font-weight: 600; }
.dbl { color: #d01818; font-weight: 800; }
.rdbl { color: #1550c8; font-weight: 800; }
.acall { position: relative; }
.auc td .suit, .chip .suit { font-size: 1em; }

/* 4-color suits, everywhere on practice pages (portal bidding.css) */
.suit.sp { color: var(--s-s); }
.suit.he { color: var(--s-h); }
.suit.di { color: var(--s-d); }
.suit.cl { color: var(--s-c); }
.suit.s-n, .suit.nt { color: var(--ink); font-size: 0.85em; }

/* explanations under the auction */
.fauc-expl { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.fauc-expl .el { font-size: 13.5px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.fauc-expl .chip {
    background: #fdf6e3; border: 1px solid #00669933; border-radius: 999px; padding: 1px 9px;
    font-family: var(--card-font); font-weight: 700;
}
.fauc-expl .who2 { color: #8b98ab; font-size: 12px; }

/* hands (portal trainer: ink-blue ranks, 4-color suit symbols, ten as "10") */
.bid-hand { display: flex; flex-direction: column; font-family: var(--card-font); font-weight: 700; font-size: 1.2rem; line-height: 1.22; color: var(--ink); }
.bid-hand.hhero { gap: 2px; font-size: 28px; line-height: 1.25; font-weight: 600; letter-spacing: 0.02em; }
.bid-suit { white-space: nowrap; }
.bid-suit .suit { display: inline-block; width: 1.15em; text-align: center; font-size: 1.05em; line-height: 1.2; }
.bid-hand .hon { font-weight: 700; }
.bid-hand .spot { font-weight: 400; }
.bid-hand.hhero .bid-suit { display: flex; align-items: baseline; gap: 8px; }
.bid-hand.hhero .suit { line-height: 1.1; }
.bid-hand.hhero .hon, .bid-hand.hhero .spot,
.bid-twohands .bid-hand .hon, .bid-twohands .bid-hand .spot { font-weight: inherit; }
.deal-hand .bid-suit { display: inline-block; margin-right: 10px; }
.deal-hand .hon { font-weight: 700; }
.deal-hand .spot { font-weight: 400; }
.prev-hand .bid-suit { display: inline-block; margin-right: 8px; }
.prev-hand .hon { font-weight: 700; }
.prev-hand .spot { font-weight: 400; }

/* status pill inside the box card */
.bp-status { margin-bottom: 10px; min-height: 26px; }
.bp-status .st {
    display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: 14px; font-weight: 600;
}
.bp-status .st.my { background: var(--gold); color: #1b3560; }
.bp-status .st.pt { background: var(--tint); color: #1b3560; }
.bp-status .bp-status-error { color: #c62828; margin-left: 10px; font-size: 14px; }

/* bid box (portal trainer proportions) */
.bbox { display: flex; flex-direction: column; }
.bb-lv, .bb-st, .bb-sp { display: grid; gap: 6px; margin-bottom: 6px; }
.bb-lv { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.bb-st { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bb-sp { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bbox .k {
    height: 48px; border: 1.5px solid var(--rule); border-radius: 10px; background: #fff;
    color: #1b3560; font-family: var(--card-font); font-weight: 700; font-size: 20px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.bbox .bb-lv .k { font-size: 26px; font-weight: 800; }
.bbox .k .suit { font-size: 24px; }
.bbox .k.s-s { color: var(--s-s); }
.bbox .k.s-h { color: var(--s-h); }
.bbox .k.s-d { color: var(--s-d); }
.bbox .k.s-c { color: var(--s-c); }
.bbox .k.s-n { color: var(--ink); }
.bbox .k.off, .bbox .k:disabled { opacity: 0.28; pointer-events: none; cursor: default; }
.bbox .k.sel { border-color: #1b3560; background: #1b3560; color: #fff; }
.bbox .bb-st .k.sel { background: #fff3c4; color: #1b3560; box-shadow: inset 0 0 0 2px #1b3560; }
.bbox .bb-sp .k { font-family: var(--sans); font-size: 17px; }
.bbox .k.p { background: #1b7a4a; border-color: #1b7a4a; color: #fff; }
.bbox .k.x { background: #c62828; border-color: #c62828; color: #fff; }
.bbox .k.xx { background: #3b6fb6; border-color: #3b6fb6; color: #fff; }
.bb-go {
    height: 50px; border: 0; border-radius: 12px; background: var(--gold); color: #222; cursor: pointer;
    font-family: var(--sans); font-weight: 800; font-size: 18px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.bb-go:disabled { background: #e5e9f0; color: #8b98ab; cursor: default; }
.bb-go .suit { background: #fff; border-radius: 6px; padding: 0 4px; margin-left: 2px; line-height: 1.25; font-size: 1em; }
.bb-opt {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; color: #526277; margin-top: 6px; gap: 8px;
}
.bb-opt label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.bb-opt input { accent-color: var(--teal); }
.bb-extra { display: flex; gap: 10px; margin-top: 10px; }
.bp-benner {
    margin-top: 10px; background: #fff6e0; border: 1px solid #f0d48a; color: #7a5b00;
    border-radius: 8px; padding: 8px 12px; font-size: 13.5px;
}
.bp-benner[hidden] { display: none; }

/* notes */
.bid-note textarea {
    width: 100%; border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px;
    font-family: var(--sans); font-size: 14px; box-sizing: border-box; resize: vertical;
}
.bid-note .btn-secondary { margin-top: 8px; }
.bid-note .note, .card .note { font-size: 14px; margin: 6px 0; }

/* ---------- review ---------- */
.bp-tabs { display: flex; gap: 8px; margin: 16px 0 4px; flex-wrap: wrap; }
.bid-jump {
    border: 1.5px solid var(--rule); background: #fff; color: #1b3560; border-radius: 999px;
    font-family: var(--sans); font-weight: 700; font-size: 14px; padding: 6px 16px; cursor: pointer;
}
.bid-jump.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.bid-con h2 { font-family: var(--card-font); font-size: 30px; }
.bid-con h2 .by { font-family: var(--sans); font-size: 17px; color: #526277; font-weight: 400; margin-left: 8px; }
.bid-con .verdict { font-size: 16px; }
.bid-con .imp { font-size: 17px; font-weight: 700; }
.bid-con .imp.pos, .bid-sims .pos { color: var(--green); }
.bid-con .imp.neg, .bid-sims .neg { color: var(--red); }
.bid-con .btn { margin-top: 8px; }

.bid-twohands { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bid-twohands .lt .lab { display: block; color: #526277; font-size: 13px; margin-bottom: 4px; }
.bid-twohands .lt.me .lab { color: var(--teal); font-weight: 700; }
@media (max-width: 620px) { .bid-twohands { grid-template-columns: 1fr; } }

.bp-field, .bp-boards { border-collapse: collapse; width: 100%; font-size: 15px; }
.bp-field th, .bp-field td, .bp-boards th, .bp-boards td {
    border-bottom: 1px solid var(--rule); padding: 7px 10px; text-align: left;
}
.bp-field th, .bp-boards th { color: #526277; font-weight: 600; font-size: 13px; }
.bp-ours td { background: #fff6e0; }

/* real deal tab (portal deal layout: cross with the envelope badge, two-row DD) */
.rdeal .deal-box { font-family: var(--card-font); font-size: 12px; line-height: 1.45; }
.rdeal .deal-grid {
    display: grid; grid-template-columns: minmax(70px, auto) auto minmax(70px, auto);
    grid-template-rows: auto auto auto; gap: 4px 10px;
    align-items: center; justify-items: center;
}
.rdeal .deal-N { grid-column: 2; grid-row: 1; }
.rdeal .deal-W { grid-column: 1; grid-row: 2; justify-self: end; }
.rdeal .deal-E { grid-column: 3; grid-row: 2; justify-self: start; }
.rdeal .deal-S { grid-column: 2; grid-row: 3; }
.rdeal .deal-hand { display: flex; flex-direction: column; align-items: flex-start; text-align: left; font-size: 13px; line-height: 1.35; }
.rdeal .dh-line { display: flex; align-items: baseline; white-space: nowrap; font-size: 17px; line-height: 1.35; }
.rdeal .dh-suit { display: inline-block; flex: 0 0 1.15em; min-width: 1.4em; text-align: center; font-size: 19px; line-height: 1.35; }
.rdeal .dh-cards { letter-spacing: 0.06em; color: #1b3560; }
.rdeal .dh-cards > b, .rdeal .dh-cards > span { font-weight: 400; margin-right: 1.5px; }
.rdeal .deal-grid > .deal-corner { font-size: 11px; line-height: 1.45; color: #334155; white-space: nowrap; align-self: start; }
.rdeal .deal-grid > .deal-corner b { font-weight: 700; }
.rdeal .deal-grid > .deal-dlr { grid-column: 1; grid-row: 1; justify-self: start; }
.rdeal .deal-grid > .deal-vul { grid-column: 3; grid-row: 1; justify-self: start; padding-left: 8px; }
.rdeal .deal-badge-wrap { grid-column: 2; grid-row: 2; display: flex; align-items: center; justify-content: center; }
.rdeal .bb { position: relative; width: 60px; height: 60px; border-radius: 7px; overflow: hidden; }
.rdeal .bb svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.rdeal .bb .z { fill: #c92a1d; }
.rdeal .bb .o { fill: #7bd88f; }
.rdeal .bb .c { position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px;
    line-height: 1; color: #1b2433; background: transparent; border: 0; }
.rdeal .bb .d { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
@media (min-width: 701px) {
    .rdeal .deal-grid { grid-template-columns: 132px 90px 124px; gap: 4px 6px; justify-content: center; }
    .rdeal .deal-W { min-width: 124px; }
}

/* double dummy table (portal: N+E / S+W in two rows, dotted grid) */
.deal-dd { margin-top: 12px; }
.dd-table { display: table; width: 100%; margin: 0; table-layout: fixed; border-collapse: collapse;
    border: 0; background: transparent; font-family: var(--card-font); font-size: 14px; line-height: 1.45; }
.dd-table th, .dd-table td { display: table-cell; padding: 5px 2px; text-align: center; font-size: 14px;
    background: transparent; border: 0; border-right: 1px dotted rgba(12, 71, 157, 0.18);
    border-bottom: 1px dotted rgba(12, 71, 157, 0.18); }
.dd-table .dd-seat { width: 1.7em; font-weight: 700; color: #0c479d; }
.dd-table .dd-head th { font-weight: 700; }
.dd-table .dd-head th.dd-val { font-weight: 600; color: #000; }
.dd-table .dd-gap { width: 14px; padding: 0; border: 0; }
.dd-table tr:last-child td, .dd-table tr:last-child th { border-bottom: 0; }
@media (min-width: 701px) {
    .dd-table, .dd-table th, .dd-table td { font-size: 17px; }
}
.deal-minimax { margin-top: 8px; padding-top: 6px; border-top: 1px solid #e2e8f0; font-size: 12px;
    text-align: center; color: #334155; }
.deal-minimax b { font-weight: 700; }
.suit-s, .dd-table .suit-s { color: var(--s-s); }
.suit-h, .dd-table .suit-h { color: var(--s-h); }
.suit-d, .dd-table .suit-d { color: var(--s-d); }
.suit-c, .dd-table .suit-c { color: var(--s-c); }

/* field tables (portal trainer: room cards, one line + expandable auction) */
.trooms { display: grid; gap: 0; border-top: 2px solid var(--teal); }
.trooms.single { grid-template-columns: 1fr 1fr; gap: 10px; border-top: 0; }
@media (max-width: 620px) { .trooms.single { grid-template-columns: 1fr; } }
.rcell { border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0; min-width: 0; }
.rcell.empty { padding: 12px; color: #526277; text-align: center; }
.rcell.g-good { background: #e8f7ea; border-color: #bfe3c5; }
.rcell.g-bad { background: #fdecea; border-color: #f3c4bf; }
.rcell.g-good > summary:hover { background: #dcf1df; }
.rcell.g-bad > summary:hover { background: #fadedb; }
.rcell > summary { list-style: none; cursor: pointer; }
.rcell > summary::-webkit-details-marker { display: none; }
.rcell > summary:hover { background: #eef4fb; border-radius: 10px; }
.rcell[open] > summary { border-bottom: 1px solid #e2e8f0; border-radius: 10px 10px 0 0; }
.rcell > summary.r1 {
    display: grid; grid-template-columns: minmax(0, 1fr) 84px 40px 34px 56px 14px;
    gap: 6px; align-items: center; padding: 9px 10px; font-size: 14.5px;
}
.r1 .rpair { font-weight: 700; color: #1b3560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r1 .rcon { font-weight: 700; font-family: var(--card-font); white-space: nowrap; }
.r1 .rcon i { font-family: var(--sans); font-style: normal; font-weight: 400; color: #526277; font-size: 12.5px; }
.r1 .rld, .r1 .rres { text-align: center; color: #1b3560; font-family: var(--card-font); }
.r1 .rsc { text-align: right; font-weight: 700; }
.r1 .rsc .neg { color: var(--red); }
.rchev:after {
    content: "\25BE"; color: #526277; display: block; text-align: right;
    transition: transform 0.15s;
}
.rcell[open] .rchev:after { transform: rotate(180deg); }
.rauc { padding: 8px 10px 10px; background: #fff; border-radius: 0 0 10px 10px; }
.tnote { font-size: 13px; margin-top: 8px; }

/* chances */
.bid-sims { border-collapse: collapse; font-size: 16px; }
.bid-sims th, .bid-sims td { border-bottom: 1px solid var(--rule); padding: 8px 14px; text-align: left; }
.bid-sims th { color: #526277; font-size: 13px; }
.bid-sims .bid-our-row td { background: #fff6e0; font-weight: 700; }
.bid-sims .prob { font-size: 19px; }

/* board nav */
.bp-boardnav { display: flex; gap: 14px; margin-top: 12px; }
.bp-nav { color: var(--ink); text-decoration: none; font-weight: 600; }
.bp-nav:hover { text-decoration: underline; }

/* ---------- set page ---------- */
.bp-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
@media (max-width: 620px) { .bp-links { grid-template-columns: 1fr; } }
.bp-linkbox { border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; background: #fff; }
.bp-linkbox.yours { border-top: 4px solid var(--teal); }
.bp-linkbox.theirs { border-top: 4px solid var(--gold); }
.bp-linkbox h2 { font-family: var(--serif); font-size: 17px; margin: 0 0 6px; }
.bp-linkrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bp-linkrow code {
    background: var(--tint); border-radius: 6px; padding: 4px 8px; font-size: 12.5px;
    word-break: break-all; flex: 1 1 240px;
}
.bp-copy {
    border: 1.5px solid var(--teal); color: var(--teal); background: #fff; border-radius: 999px;
    padding: 4px 14px; cursor: pointer; font-weight: 600; font-family: var(--sans);
}
.bp-name { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.bp-name input[type="text"] {
    border: 1px solid var(--rule); border-radius: 8px; padding: 7px 10px; font-family: var(--sans);
}
.bp-name button {
    border: 1.5px solid var(--teal); background: #fff; color: var(--teal);
    border-radius: 999px; padding: 6px 16px; cursor: pointer; font-weight: 600;
}

/* ---------- preview page (portal trainer: compass deal cards + stats bar) ---------- */
.prev-stats {
    display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0 10px; padding: 8px 14px;
    background: #fff; border: 1px solid var(--rule); border-radius: 10px;
    font-size: 14px; color: #526277;
}
.prev-stats b { color: #1b3560; }
.prev-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.prev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.prev-board { border: 1px solid var(--rule); border-radius: 10px; background: #fff; padding: 10px 14px 14px; }
.prev-head {
    display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
    font-size: 13px; color: #526277; margin-bottom: 8px;
}
.prev-head .no { font-weight: 700; color: #1b3560; }
.prev-head .rot { background: var(--tint); color: var(--ink); border-radius: 999px; padding: 0 8px; font-size: 11.5px; }
.prev-head .matched { color: var(--teal); font-weight: 700; }
.prev-compass {
    display: grid; grid-template-columns: 1fr auto 1fr;
    grid-template-areas: ". n ." "w c e" ". s .";
    gap: 8px 10px; align-items: center;
}
.prev-hand.ph-n { grid-area: n; }
.prev-hand.ph-w { grid-area: w; justify-self: end; text-align: left; }
.prev-hand.ph-e { grid-area: e; justify-self: start; text-align: left; }
.prev-hand.ph-s { grid-area: s; }
.ph-c { grid-area: c; }
.dhand { font-family: var(--card-font); font-size: 15px; line-height: 1.35; color: #1b3560; }
.dhand .dl { display: flex; gap: 5px; white-space: nowrap; }
.dhand .dl .suit { flex: 0 0 1.1em; text-align: center; }
.dhand .dc b { font-weight: 700; }
.dcmp.sm { grid-template-columns: repeat(3, 22px); grid-template-rows: repeat(3, 22px); }
.dcmp.sm .cmp { width: 22px; height: 22px; font-size: 11px; border-radius: 5px; }
