/* Cruce — two pairs (or 3 / 2 players) against the phone or friends on one phone (js/cruce.js).
   Theme-aware like the other game pages: tokens on :root, redefined under body.dark-theme. */
:root {
    --cx-accent: #15803d;
    --cx-accent-2: #166534;
    --cx-accent-soft: #e3f4e8;
    --cx-page-bg: #f3f6f2;
    --cx-card-bg: #ffffff;
    --cx-card-border: #d5e2d7;
    --cx-muted: #56655a;
    --cx-shadow: 0 10px 30px rgba(20, 60, 30, .10);
    --cx-felt: #1d7a46;
    --cx-felt-2: #0d4426;
    --cx-wood: #7a4a24;
    --cx-wood-2: #4f2d12;
    --cx-felt-text: #f0fff4;
    --cx-face: #ffffff;
    --cx-face-2: #f3f1ea;
    --cx-face-border: #cfc8b8;
    --cx-black: #1b1f27;
    --cx-red: #c4202a;
    --cx-back: #7f1d1d;
    --cx-back-2: #b91c1c;
    --cx-ok: #15803d;
    --cx-ko: #dc2626;
    --cx-gold: #f59e0b;
    --cx-turn: #fde047;
    --cx-us: #2563eb;
    --cx-them: #db2777;
    --cx-cw: 62px;   /* a card in your hand */
    --cx-tw: 46px;   /* a card on the table */
    --cx-th: 318px;  /* table height */
}

body.dark-theme {
    --cx-accent: #4ade80;
    --cx-accent-2: #22c55e;
    --cx-accent-soft: #12301c;
    --cx-page-bg: #0f1411;
    --cx-card-bg: #18201a;
    --cx-card-border: #2c3b30;
    --cx-muted: #a3b5a8;
    --cx-shadow: 0 10px 30px rgba(0, 0, 0, .4);
    --cx-felt: #155c35;
    --cx-felt-2: #07291a;
    --cx-wood: #4a2c12;
    --cx-wood-2: #2c1808;
    --cx-face: #f4f1e8;
    --cx-face-2: #e4dfd2;
    --cx-face-border: #a59d8a;
    --cx-ok: #4ade80;
    --cx-ko: #f87171;
    --cx-gold: #fbbf24;
    --cx-us: #60a5fa;
    --cx-them: #f472b6;
}

/* clip, not hidden: the site-wide `body { overflow-x: hidden }` makes <body> a scroll
   container that never scrolls, which silently kills any position: sticky inside. */
.cx-body, body.cx-body#page-top {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--cx-page-bg);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: clip;
}
.cx-main { padding-top: 92px; padding-bottom: 40px; }
.cx-game .container, .cx-hero .container { max-width: 760px; }

/* ---- hero ---- */
.cx-hero { text-align: center; padding: 4px 0 8px; }
.cx-hero h1 { font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.2rem); margin-bottom: 4px; }
.cx-hero-icon { color: var(--cx-accent); }
.cx-lead { margin: 0 auto; max-width: 560px; color: var(--cx-muted); font-size: .98rem; line-height: 1.45; }
body.cx-playing .cx-lead { display: none; }
body.cx-playing .cx-hero { padding: 0 0 6px; }
body.cx-playing .cx-hero h1 { font-size: 1.35rem; margin: 0; }

/* ---- setup ---- */
.cx-setup { max-width: 560px; margin: 6px auto 0; padding: 14px; border-radius: 18px; background: var(--cx-card-bg); border: 1px solid var(--cx-card-border); box-shadow: var(--cx-shadow); }
.cx-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 12px; border-radius: 16px; background: var(--cx-page-bg); border: 1px solid var(--cx-card-border); }
.cx-mode { min-height: 50px; padding: 6px 8px; border: 0; border-radius: 12px; background: transparent; color: inherit; font-weight: 700; font-size: .9rem; line-height: 1.15; cursor: pointer; touch-action: manipulation; display: flex; align-items: center; justify-content: center; gap: 7px; text-align: center; }
.cx-mode small { display: block; font-weight: 600; opacity: .8; }
.cx-mode[aria-checked="true"] { background: var(--cx-accent); color: #fff; }
body.dark-theme .cx-mode[aria-checked="true"] { color: #052e16; }
.cx-field { margin: 0 0 12px; }
.cx-label { display: block; font-weight: 800; margin: 0 0 6px; }
.cx-note { display: block; color: var(--cx-muted); margin-top: 5px; font-size: .84rem; line-height: 1.35; }
.cx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-chips-sub { margin-top: 6px; }
.cx-chips-sub[hidden] { display: none; }
.cx-chip { min-width: 52px; min-height: 46px; padding: 6px 10px; border-radius: 12px; border: 2px solid var(--cx-card-border); background: var(--cx-card-bg); color: inherit; font-weight: 800; font-size: 1rem; line-height: 1.1; cursor: pointer; touch-action: manipulation; flex: 1 1 0; }
.cx-chip small { display: block; font-weight: 600; font-size: .72rem; opacity: .85; margin-top: 1px; white-space: nowrap; }
.cx-chip[aria-checked="true"] { border-color: var(--cx-accent); background: var(--cx-accent-soft); color: var(--cx-accent); }
.cx-chip:focus-visible, .cx-mode:focus-visible, .cx-btn:focus-visible, .cx-hcard:focus-visible, .cx-bidbtn:focus-visible, .cx-x:focus-visible, .cx-link:focus-visible { outline: 3px solid var(--cx-gold); outline-offset: 2px; }
.cx-resume { margin-top: 8px; }

/* ---- buttons ---- */
.cx-btn { min-height: 48px; padding: 8px 14px; border: 1px solid var(--cx-card-border); border-radius: 14px; background: var(--cx-card-bg); color: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; touch-action: manipulation; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.cx-btn:hover:not(:disabled) { border-color: var(--cx-accent); }
.cx-btn:disabled { opacity: .45; cursor: not-allowed; }
.cx-btn-primary { background: var(--cx-accent); border-color: var(--cx-accent); color: #fff; }
body.dark-theme .cx-btn-primary { color: #052e16; }
.cx-wide { width: 100%; }
.cx-round { width: 48px; padding: 0; }
.cx-round[hidden] { display: none; }
.cx-link { border: 0; background: none; padding: 4px 6px; color: var(--cx-muted); text-decoration: underline; font-size: .82rem; cursor: pointer; }

/* ---- status bar ---- */
.cx-play { max-width: 760px; margin: 0 auto; }
.cx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 8px 6px 12px; min-height: 46px; border-radius: 14px 14px 0 0; background: var(--cx-card-bg); border: 1px solid var(--cx-card-border); border-bottom: 0; font-size: .9rem; font-weight: 700; }
.cx-bar-hand { font-weight: 800; white-space: nowrap; }
.cx-score { margin-left: auto; display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; min-width: 0; }
.cx-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-weight: 800; white-space: nowrap; background: var(--cx-accent-soft); color: var(--cx-accent); font-size: .86rem; }
.cx-pill.is-us { background: color-mix(in srgb, var(--cx-us) 14%, transparent); color: var(--cx-us); }
.cx-pill.is-them { background: color-mix(in srgb, var(--cx-them) 14%, transparent); color: var(--cx-them); }
.cx-pill small { font-weight: 700; opacity: .8; font-size: .78em; }
.cx-goal { margin: 0 0 8px; padding: 6px 12px 7px; min-height: calc(2.7em + 15px); display: flex; align-items: center; border-radius: 0 0 14px 14px; background: var(--cx-card-bg); border: 1px solid var(--cx-card-border); border-top: 1px dashed var(--cx-card-border); color: var(--cx-muted); font-size: .86rem; font-weight: 600; line-height: 1.35; }
.cx-goal b { color: var(--text-color); }
.cx-goal small { font-weight: 600; opacity: .85; }
.cx-goal .is-red { color: var(--cx-red); }

/* ---- the table (felt) ---- */
.cx-table { position: relative; height: var(--cx-th); border-radius: 26px; background: radial-gradient(ellipse at 50% 45%, var(--cx-felt) 0%, var(--cx-felt-2) 100%); border: 8px solid var(--cx-wood); box-shadow: inset 0 0 0 2px var(--cx-wood-2), inset 0 8px 30px rgba(0, 0, 0, .35), var(--cx-shadow); color: var(--cx-felt-text); overflow: hidden; }
.cx-table::before { content: ""; position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; transform: translate(-50%, -50%) rotate(45deg); border: 2px solid rgba(255, 255, 255, .06); border-radius: 18px; pointer-events: none; }
.cx-seats { position: absolute; inset: 0; pointer-events: none; }
.cx-seat { position: absolute; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px; border-radius: 14px; transition: background .2s, box-shadow .2s; text-align: center; }
.cx-seat-txt { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; max-width: 100%; }
.cx-seat.at-top, .cx-seat.at-tl, .cx-seat.at-tr { flex-direction: row; gap: 7px; width: auto; max-width: 46%; padding: 4px 10px 4px 4px; text-align: left; }
.cx-seat.at-top .cx-seat-txt, .cx-seat.at-tl .cx-seat-txt, .cx-seat.at-tr .cx-seat-txt { align-items: flex-start; }
.cx-seat.at-top .cx-backs, .cx-seat.at-tl .cx-backs, .cx-seat.at-tr .cx-backs { justify-content: flex-start; padding-left: 2px; }
.cx-seat.at-top { top: 4px; left: 50%; transform: translateX(-50%); }
.cx-seat.at-left { left: 2px; top: 44%; transform: translateY(-50%); }
.cx-seat.at-right { right: 2px; top: 44%; transform: translateY(-50%); }
.cx-seat.at-tl { top: 4px; left: 25%; transform: translateX(-50%); }
.cx-seat.at-tr { top: 4px; left: 75%; transform: translateX(-50%); }
.cx-seat.is-turn { background: rgba(253, 224, 71, .16); box-shadow: 0 0 0 2px var(--cx-turn); }
.cx-av { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: #fff; background: var(--av, #475569); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); flex: none; }
.cx-av.is-two { font-size: .8rem; letter-spacing: -.02em; }
.cx-av.is-us { box-shadow: 0 0 0 3px var(--cx-us), 0 2px 6px rgba(0, 0, 0, .35); }
.cx-av.is-them { box-shadow: 0 0 0 3px var(--cx-them), 0 2px 6px rgba(0, 0, 0, .35); }
.cx-dealer { position: absolute; right: -6px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: #111; font-size: .66rem; font-weight: 900; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.cx-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: .8rem; line-height: 1.2; }
.cx-stat { font-size: .74rem; line-height: 1.2; opacity: .95; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cx-backs { display: flex; justify-content: center; height: 10px; margin-top: 1px; }
.cx-backs i { display: block; width: 7px; height: 10px; margin-left: -2px; border-radius: 2px; background: linear-gradient(135deg, var(--cx-back-2), var(--cx-back)); border: 1px solid rgba(255, 255, 255, .7); }
.cx-bubble { position: absolute; top: -2px; left: 50%; transform: translate(10px, 0); min-width: 26px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--cx-gold); color: #1f1300; font-weight: 900; font-size: .78rem; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); white-space: nowrap; animation: cx-pop .3s ease-out; pointer-events: none; z-index: 3; }
.cx-bubble.is-pass { background: #e2e8f0; color: #0f172a; }
@keyframes cx-pop { from { transform: translate(10px, 0) scale(.3); opacity: 0; } }

.cx-contract { position: absolute; left: 8px; bottom: 8px; z-index: 2; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; pointer-events: none; }
.cx-contract:empty { display: none; }
.cx-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .35); color: #fff; font-weight: 800; font-size: .78rem; white-space: nowrap; }
.cx-tag .cx-suit { font-size: 1.05rem; line-height: 1; }
.cx-tag .cx-suit.is-red { color: #fca5a5; }
.cx-stock { position: absolute; left: 10px; top: 44%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 1; }
.cx-stock[hidden] { display: none; }
.cx-stock .cx-card { --w: 40px; box-shadow: 2px 2px 0 rgba(255, 255, 255, .5), 4px 4px 0 rgba(0, 0, 0, .25); }
.cx-stock b { font-size: .8rem; }

.cx-trick { position: absolute; inset: 0; pointer-events: none; }
.cx-tcard { position: absolute; transform: translate(-50%, -50%); transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .32s; will-change: transform; }
.cx-tcard.is-win .cx-card { box-shadow: 0 0 0 3px var(--cx-gold), 0 6px 14px rgba(0, 0, 0, .4); }

.cx-toast { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; margin: 0; max-width: calc(100% - 24px); padding: 8px 14px; border-radius: 14px; background: rgba(5, 25, 14, .9); color: #fff; font-weight: 800; font-size: .95rem; text-align: center; line-height: 1.3; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .25s; pointer-events: none; }
.cx-toast.is-on { opacity: 1; }

/* ---- bidding ---- */
.cx-bid { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); z-index: 4; width: 204px; padding: 8px 8px 6px; border-radius: 16px; background: rgba(4, 30, 16, .55); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); text-align: center; }
.cx-bid[hidden] { display: none; }
.cx-bid-title { margin: 0 0 6px; font-weight: 800; font-size: .95rem; }
.cx-bid-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cx-bidbtn { min-height: 44px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .96); color: #10301c; font-weight: 900; font-size: 1.15rem; cursor: pointer; touch-action: manipulation; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); }
.cx-bidbtn.is-pass { grid-column: 1 / -1; order: 2; font-size: 1rem; background: #e2e8f0; }
.cx-bidbtn:hover:not(:disabled) { border-color: var(--cx-gold); }
.cx-bidbtn:disabled { background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .55); box-shadow: none; cursor: not-allowed; }
.cx-bid-hint { margin: 6px 0 0; font-size: .74rem; line-height: 1.3; opacity: .92; }
.cx-bid-hint:empty { display: none; }

/* ---- you ---- */
.cx-me { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; padding: 6px 10px; min-height: 52px; border-radius: 14px; background: var(--cx-card-bg); border: 2px solid var(--cx-card-border); position: relative; }
.cx-me.is-turn { border-color: var(--cx-gold); box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }
.cx-me .cx-av { width: 34px; height: 34px; }
.cx-me-name { font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-me-name small { font-weight: 600; color: var(--cx-muted); }
.cx-me-stat { font-weight: 700; color: var(--cx-muted); white-space: nowrap; font-size: .88rem; }
.cx-me .cx-bubble { left: 22px; top: -10px; transform: none; }
.cx-status { margin: 6px 2px 0; min-height: 1.5em; font-weight: 700; text-align: center; color: var(--cx-muted); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-status.is-you { color: var(--cx-accent); }

/* ---- your hand ---- */
.cx-hand { position: relative; height: calc(var(--cx-cw) * 1.4 + 26px); margin: 2px 0 14px; touch-action: manipulation; }
.cx-hcard { position: absolute; bottom: 4px; padding: 0; border: 0; background: none; cursor: default; transform-origin: 50% 120%; transition: transform .18s ease-out, filter .18s; -webkit-tap-highlight-color: transparent; }
.cx-hcard .cx-card { --w: var(--cx-cw); }
.cx-hand.is-playing .cx-hcard.is-legal { cursor: pointer; }
.cx-hand.is-playing .cx-hcard.is-legal .cx-card { box-shadow: 0 0 0 2px var(--cx-gold), 0 6px 14px rgba(0, 0, 0, .3); }
.cx-hand.is-playing .cx-hcard:not(.is-legal) .cx-card { filter: brightness(.72) saturate(.6); }
.cx-hcard.is-pair .cx-card::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--cx-gold); box-shadow: 0 0 0 2px #fff; }
.cx-hand.is-hidden .cx-hcard { pointer-events: none; }

/* ---- cards (pure CSS, no images) ---- */
.cx-card { --w: var(--cx-tw); position: relative; display: block; width: var(--w); height: calc(var(--w) * 1.4); border-radius: calc(var(--w) * .12); background: linear-gradient(160deg, var(--cx-face) 0%, var(--cx-face-2) 100%); border: 1px solid var(--cx-face-border); box-shadow: 0 3px 8px rgba(0, 0, 0, .28); color: var(--cx-black); font-family: Georgia, "Times New Roman", serif; user-select: none; -webkit-user-select: none; overflow: hidden; }
.cx-card.is-red { color: var(--cx-red); }
.cx-c-tl, .cx-c-br { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .95; font-weight: 700; font-size: calc(var(--w) * .26); }
.cx-c-tl { top: calc(var(--w) * .06); left: calc(var(--w) * .07); }
.cx-c-br { bottom: calc(var(--w) * .06); right: calc(var(--w) * .07); transform: rotate(180deg); }
.cx-c-tl small, .cx-c-br small { font-size: .85em; }
.cx-card.is-ten .cx-c-tl, .cx-card.is-ten .cx-c-br { letter-spacing: -.08em; font-size: calc(var(--w) * .23); }
.cx-c-mid { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); font-size: calc(var(--w) * .58); line-height: 1; }
.cx-card.is-face .cx-c-mid { font-size: calc(var(--w) * .42); font-weight: 700; }
.cx-card.is-face .cx-c-mid small { display: block; text-align: center; font-size: .9em; }
.cx-card.is-trump { background: linear-gradient(160deg, #fffbea 0%, #fdf0c4 100%); }
body.dark-theme .cx-card.is-trump { background: linear-gradient(160deg, #f6eed3 0%, #e7d9a8 100%); }
.cx-card.is-back { background: repeating-linear-gradient(45deg, var(--cx-back) 0 5px, var(--cx-back-2) 5px 10px); border: 3px solid #fff; }

/* ---- below the table ---- */
.cx-actions { display: grid; grid-template-columns: 1fr auto auto 1fr; gap: 8px; }
.cx-record { text-align: center; color: var(--cx-muted); font-size: .88rem; margin: 10px 0 0; min-height: 1.3em; }
.cx-record b { color: var(--text-color); }
.cx-reset-wrap { text-align: center; margin: 0; }
.cx-reset-wrap[hidden] { display: none; }
.cx-help { max-width: 760px; margin: 14px auto 0; padding: 12px 16px; border-radius: 14px; background: var(--cx-card-bg); border: 1px solid var(--cx-card-border); }
.cx-help summary { cursor: pointer; font-weight: 700; }
.cx-help ul { margin: 10px 0 0; padding-left: 20px; color: var(--cx-muted); line-height: 1.55; }
.cx-help li { margin-bottom: 4px; }
.cx-help strong, .cx-help em { color: var(--text-color); }
.cx-help em { font-style: normal; font-weight: 700; }
.cx-help p { color: var(--cx-muted); margin: 10px 0 0; line-height: 1.55; font-size: .93rem; }
.cx-help kbd { background: var(--cx-accent-soft); color: var(--cx-accent); border-radius: 5px; padding: 0 5px; font-size: .85em; }
.cx-help .cx-credit { font-size: .8rem; }
.cx-powered { text-align: center; color: var(--cx-muted); font-size: .85rem; margin: 26px 0 0; }
.cx-powered a { color: var(--cx-accent); }

/* ---- dialogs ---- */
.cx-overlay { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .5); animation: cx-fade .2s ease-out; }
.cx-overlay[hidden] { display: none; }
@keyframes cx-fade { from { opacity: 0; } }
.cx-dialog { width: 100%; max-width: 420px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 20px 16px 16px; border-radius: 22px; background: var(--cx-card-bg); color: var(--text-color); text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); animation: cx-rise .25s ease-out; }
@keyframes cx-rise { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.cx-dialog h2 { font-weight: 800; font-size: 1.35rem; margin: 2px 0 4px; }
.cx-dialog-icon { font-size: 32px; color: var(--cx-accent); }
.cx-gold { color: var(--cx-gold); }
.cx-dialog-sub { color: var(--cx-muted); margin: 0 0 10px; line-height: 1.4; }
.cx-dialog-sub b { color: var(--text-color); }
.cx-dialog-sub .cx-suit.is-red { color: var(--cx-red); }
body.dark-theme .cx-dialog-sub .cx-suit.is-red { color: #f87171; }
.cx-dialog-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 14px; }
.cx-cover-card { max-width: 340px; }
.cx-table-wrap { overflow-x: auto; }
.cx-sum-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cx-sum-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--cx-muted); font-weight: 700; padding: 4px; }
.cx-sum-table td { padding: 6px 4px; border-top: 1px solid var(--cx-card-border); font-weight: 700; }
.cx-sum-table td:first-child, .cx-sum-table th:first-child { text-align: left; color: var(--cx-muted); font-weight: 600; }
.cx-sum-table tr.is-big td { font-size: 1.05rem; font-weight: 900; }
.cx-pts-pos { color: var(--cx-ok); }
.cx-pts-neg { color: var(--cx-ko); }
.cx-final { text-align: left; margin: 6px auto 0; padding-left: 26px; max-width: 300px; font-weight: 700; line-height: 1.7; }
.cx-final .is-you { color: var(--cx-accent); }

.cx-sheet-card { max-width: 640px; text-align: left; padding: 14px 10px 12px; }
.cx-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 6px; }
.cx-x { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--cx-card-border); background: var(--cx-card-bg); color: inherit; font-size: 1.1rem; cursor: pointer; }
.cx-sheet-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.cx-sheet-table th, .cx-sheet-table td { border: 1px solid var(--cx-card-border); padding: 5px 4px; text-align: center; vertical-align: middle; }
.cx-sheet-table thead th { font-size: .74rem; white-space: nowrap; }
.cx-sheet-table td.cx-what { text-align: left; font-weight: 600; font-size: .8rem; }
.cx-sheet-table td.cx-what small { display: block; color: var(--cx-muted); }
.cx-sheet-table td.is-neg { color: var(--cx-ko); font-weight: 800; }
.cx-sheet-table td.is-pos { color: var(--cx-ok); font-weight: 800; }
.cx-sheet-table td .cx-run { display: block; color: var(--cx-muted); font-weight: 600; font-size: .74rem; }
.cx-sheet-table tfoot td { font-weight: 900; font-size: .95rem; background: var(--cx-accent-soft); }

/* ---- desktop ---- */
@media (min-width: 700px) {
    :root { --cx-cw: 84px; --cx-tw: 64px; --cx-th: 350px; }
    .cx-seat { width: 100px; }
    .cx-seat.at-left { left: 10px; }
    .cx-seat.at-right { right: 10px; }
    .cx-av { width: 46px; height: 46px; font-size: 1.1rem; }
    .cx-name { font-size: .95rem; }
    .cx-stat { font-size: .86rem; }
    .cx-bar { font-size: 1rem; }
    .cx-bid { width: 280px; }
    .cx-bidbtn { min-height: 52px; }
    .cx-stock .cx-card { --w: 52px; }
    .cx-stock { left: 20px; }
}

@media (max-width: 380px) {
    :root { --cx-cw: 56px; --cx-tw: 42px; --cx-th: 300px; }
    .cx-mode { font-size: .82rem; }
    .cx-bar { font-size: .84rem; gap: 4px 8px; }
    .cx-seat { width: 64px; }
    .cx-av { width: 32px; height: 32px; }
    .cx-name { font-size: .74rem; }
    .cx-hide-xs { display: none; }
    .cx-chip small { font-size: .66rem; }
}

@media (prefers-reduced-motion: reduce) {
    .cx-tcard, .cx-hcard, .cx-bubble, .cx-dialog, .cx-overlay, .cx-toast { transition: none !important; animation: none !important; }
}
