/* Rentz — you against 2-5 phone players, or friends on one phone (js/rentz.js).
   Theme-aware like the other game pages: tokens on :root, redefined under body.dark-theme. */
:root {
    --rz-accent: #9f1239;
    --rz-accent-2: #be123c;
    --rz-accent-soft: #fde8ee;
    --rz-page-bg: #f7f3f4;
    --rz-card-bg: #ffffff;
    --rz-card-border: #e7d9de;
    --rz-muted: #6b5a60;
    --rz-shadow: 0 10px 30px rgba(80, 20, 40, .10);
    --rz-felt: #1f4f7a;
    --rz-felt-2: #102c47;
    --rz-wood: #6b3a1f;
    --rz-wood-2: #4a250f;
    --rz-felt-text: #eef6ff;
    --rz-face: #ffffff;
    --rz-face-2: #f3f1ea;
    --rz-face-border: #cfc8b8;
    --rz-black: #1b1f27;
    --rz-red: #c4202a;
    --rz-back: #9f1239;
    --rz-back-2: #e11d48;
    --rz-ok: #15803d;
    --rz-ko: #dc2626;
    --rz-gold: #f59e0b;
    --rz-turn: #fde047;
    --rz-cw: 62px;   /* a card in your hand */
    --rz-tw: 50px;   /* a card on the table */
    --rz-lw: 32px;   /* a card in the Rentz layout */
}

body.dark-theme {
    --rz-accent: #fb7185;
    --rz-accent-2: #f43f5e;
    --rz-accent-soft: #3a1420;
    --rz-page-bg: #141012;
    --rz-card-bg: #211a1d;
    --rz-card-border: #3f2f35;
    --rz-muted: #b8a5ab;
    --rz-shadow: 0 10px 30px rgba(0, 0, 0, .4);
    --rz-felt: #173d5e;
    --rz-felt-2: #0a1f33;
    --rz-wood: #43230f;
    --rz-wood-2: #2c1608;
    --rz-face: #f4f1e8;
    --rz-face-2: #e4dfd2;
    --rz-face-border: #a59d8a;
    --rz-ok: #4ade80;
    --rz-ko: #f87171;
    --rz-gold: #fbbf24;
}

/* 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. */
.rz-body, body.rz-body#page-top {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--rz-page-bg);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: clip;
}
.rz-main { padding-top: 92px; padding-bottom: 40px; }
.rz-game .container, .rz-hero .container { max-width: 760px; }

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

/* ---- setup ---- */
.rz-setup { max-width: 560px; margin: 6px auto 0; padding: 14px; border-radius: 18px; background: var(--rz-card-bg); border: 1px solid var(--rz-card-border); box-shadow: var(--rz-shadow); }
.rz-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 12px; border-radius: 16px; background: var(--rz-page-bg); border: 1px solid var(--rz-card-border); }
.rz-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; }
.rz-mode small { display: block; font-weight: 600; opacity: .8; }
.rz-mode[aria-checked="true"] { background: var(--rz-accent); color: #fff; }
body.dark-theme .rz-mode[aria-checked="true"] { color: #2a0610; }
.rz-field { margin: 0 0 12px; }
.rz-label { display: block; font-weight: 800; margin: 0 0 6px; }
.rz-note { display: block; color: var(--rz-muted); margin-top: 5px; font-size: .84rem; line-height: 1.35; }
.rz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rz-chip { min-width: 52px; min-height: 46px; padding: 6px 14px; border-radius: 12px; border: 2px solid var(--rz-card-border); background: var(--rz-card-bg); color: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; touch-action: manipulation; flex: 1 1 0; }
.rz-chip[aria-checked="true"] { border-color: var(--rz-accent); background: var(--rz-accent-soft); color: var(--rz-accent); }
.rz-chip:focus-visible, .rz-mode:focus-visible, .rz-btn:focus-visible, .rz-hcard:focus-visible, .rz-g:focus-visible, .rz-x:focus-visible { outline: 3px solid var(--rz-gold); outline-offset: 2px; }
.rz-start, .rz-resume { width: 100%; margin-top: 4px; }
.rz-resume { margin-top: 8px; }

/* ---- buttons ---- */
.rz-btn { min-height: 48px; padding: 8px 14px; border: 1px solid var(--rz-card-border); border-radius: 14px; background: var(--rz-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; }
.rz-btn:hover:not(:disabled) { border-color: var(--rz-accent); }
.rz-btn:disabled { opacity: .45; cursor: not-allowed; }
.rz-btn-primary { background: var(--rz-accent); border-color: var(--rz-accent); color: #fff; }
body.dark-theme .rz-btn-primary { color: #2a0610; }
.rz-wide { width: 100%; }

/* ---- status bar ---- */
.rz-play { max-width: 760px; margin: 0 auto; }
.rz-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 8px 6px 12px; margin: 0; min-height: 46px; border-radius: 14px 14px 0 0; background: var(--rz-card-bg); border: 1px solid var(--rz-card-border); border-bottom: 0; font-size: .9rem; font-weight: 700; }
.rz-bar-hand { font-weight: 800; white-space: nowrap; }
.rz-bar-chooser { color: var(--rz-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.rz-bar-game { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-weight: 800; white-space: nowrap; background: var(--rz-accent-soft); color: var(--rz-accent); }
.rz-bar-game:empty { display: none; }
.rz-bar-game.is-neg { background: rgba(220, 38, 38, .12); color: var(--rz-ko); }
.rz-bar-game.is-pos { background: rgba(21, 128, 61, .12); color: var(--rz-ok); }
.rz-goal { margin: 0 0 8px; padding: 6px 12px 7px; min-height: 2.2em; border-radius: 0 0 14px 14px; background: var(--rz-card-bg); border: 1px solid var(--rz-card-border); border-top: 1px dashed var(--rz-card-border); color: var(--rz-muted); font-size: .86rem; font-weight: 600; line-height: 1.35; }
.rz-goal b { color: var(--text-color); }

/* ---- the table (felt) ---- */
.rz-table { position: relative; padding: 8px 6px 6px; border-radius: 26px; background: radial-gradient(ellipse at 50% 40%, var(--rz-felt) 0%, var(--rz-felt-2) 100%); border: 8px solid var(--rz-wood); box-shadow: inset 0 0 0 2px var(--rz-wood-2), inset 0 8px 30px rgba(0, 0, 0, .35), var(--rz-shadow); color: var(--rz-felt-text); }
.rz-seats { display: flex; justify-content: space-around; gap: 4px; min-height: 88px; }
.rz-seat { position: relative; flex: 1 1 0; min-width: 0; max-width: 130px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px; border-radius: 14px; transform: translateY(var(--drop, 0px)); transition: background .2s, box-shadow .2s; text-align: center; }
.rz-seat.is-turn { background: rgba(253, 224, 71, .16); box-shadow: 0 0 0 2px var(--rz-turn); }
.rz-seat.is-out { opacity: .75; }
.rz-av { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1rem; color: #fff; background: var(--av, #475569); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); flex: none; }
.rz-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); }
.rz-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: .84rem; line-height: 1.2; }
.rz-stat { font-size: .78rem; line-height: 1.2; opacity: .95; white-space: nowrap; }
.rz-stat .is-neg { color: #fca5a5; }
.rz-stat .is-pos { color: #86efac; }
.rz-tot { font-size: .74rem; opacity: .85; white-space: nowrap; }
.rz-backs { display: flex; justify-content: center; height: 10px; margin-top: 1px; }
.rz-backs i { display: block; width: 7px; height: 10px; margin-left: -2px; border-radius: 2px; background: linear-gradient(135deg, var(--rz-back-2), var(--rz-back)); border: 1px solid rgba(255, 255, 255, .7); }
.rz-bubble { position: absolute; top: 0; left: 50%; transform: translate(12px, -4px); min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--rz-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: rz-pop .3s ease-out; pointer-events: none; }
.rz-bubble.is-skip { background: #e2e8f0; color: #0f172a; }
@keyframes rz-pop { from { transform: translate(12px, -4px) scale(.3); opacity: 0; } }

.rz-center { position: relative; min-height: 180px; margin-top: 2px; }
.rz-trick { position: relative; height: 180px; }
.rz-trick[hidden] { display: none; }
.rz-tcard { position: absolute; transform: translate(-50%, -50%); transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .32s; will-change: transform; }
.rz-tcard.is-win .rz-card { box-shadow: 0 0 0 3px var(--rz-gold), 0 6px 14px rgba(0, 0, 0, .4); }

.rz-toast { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; margin: 0; max-width: calc(100% - 24px); padding: 8px 14px; border-radius: 14px; background: rgba(9, 20, 33, .88); 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; }
.rz-toast.is-on { opacity: 1; }

/* ---- choosing the mini-game ---- */
.rz-pick { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 180px; padding: 6px 2px 4px; }
.rz-pick[hidden] { display: none; }
.rz-pick-title { margin: 0; font-weight: 800; font-size: 1rem; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.rz-pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 420px; }
.rz-g { min-height: 52px; padding: 5px 8px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .96); color: #13263a; font-weight: 800; font-size: .92rem; line-height: 1.15; cursor: pointer; touch-action: manipulation; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; min-width: 0; }
.rz-g > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rz-g small { font-weight: 800; font-size: .76rem; white-space: nowrap; padding-left: 22px; }
.rz-g.is-neg small { color: #b91c1c; }
.rz-g.is-pos small { color: #15803d; }
.rz-g:hover:not(:disabled) { border-color: var(--rz-gold); }
.rz-g:disabled { background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .7); box-shadow: none; cursor: not-allowed; text-decoration: line-through; }
.rz-g:disabled small { color: rgba(255, 255, 255, .7); text-decoration: none; }
.rz-k { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 4px; border-radius: 5px; background: rgba(15, 23, 42, .1); font-size: .7rem; vertical-align: 1px; }
.rz-g:disabled .rz-k { display: none; }

/* ---- the Rentz layout ---- */
.rz-layout { display: flex; flex-direction: column; justify-content: center; gap: 5px; min-height: 180px; padding: 4px 2px; }
.rz-layout[hidden] { display: none; }
.rz-row { display: grid; grid-template-columns: 22px repeat(var(--cols), var(--rz-lw)); gap: 3px; justify-content: center; align-items: center; }
.rz-row-suit { font-size: 1.1rem; line-height: 1; text-align: center; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.rz-row-suit.is-red { color: #fda4af; }
.rz-slot { position: relative; width: var(--rz-lw); height: calc(var(--rz-lw) * 1.32); border-radius: 5px; border: 1px dashed rgba(255, 255, 255, .28); display: grid; place-items: center; font-size: calc(var(--rz-lw) * .38); font-weight: 700; color: rgba(255, 255, 255, .32); font-family: Georgia, "Times New Roman", serif; }
.rz-slot.is-start { border: 2px dashed rgba(253, 224, 71, .75); color: rgba(253, 224, 71, .85); }
.rz-slot.is-mine { border: 2px solid var(--rz-turn); color: var(--rz-turn); background: rgba(253, 224, 71, .14); animation: rz-glow 1.2s ease-in-out infinite alternate; }
@keyframes rz-glow { to { background: rgba(253, 224, 71, .3); } }
.rz-slot.is-card { border: 1px solid var(--rz-face-border); background: linear-gradient(160deg, var(--rz-face) 0%, var(--rz-face-2) 100%); color: var(--rz-black); box-shadow: 0 2px 4px rgba(0, 0, 0, .3); animation: none; transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .32s; }
.rz-slot.is-card.is-red { color: var(--rz-red); }
.rz-slot.is-card small { position: absolute; bottom: 1px; right: 3px; font-size: .62em; }
.rz-slot.is-new { box-shadow: 0 0 0 2px var(--rz-gold), 0 2px 6px rgba(0, 0, 0, .35); }

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

/* ---- your hand ---- */
.rz-hand { position: relative; height: calc(var(--rz-cw) * 1.4 + 26px); margin: 2px 0 18px; touch-action: manipulation; }
.rz-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; }
.rz-hcard .rz-card { --w: var(--rz-cw); }
.rz-hand.is-playing .rz-hcard.is-legal { cursor: pointer; }
.rz-hand.is-playing .rz-hcard.is-legal .rz-card { box-shadow: 0 0 0 2px var(--rz-gold), 0 6px 14px rgba(0, 0, 0, .3); }
.rz-hand.is-playing .rz-hcard:not(.is-legal) .rz-card { filter: brightness(.72) saturate(.6); }
.rz-hcard.is-danger .rz-card::after, .rz-hcard.is-bonus .rz-card::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 2px #fff; }
.rz-hcard.is-bonus .rz-card::after { background: #16a34a; }
.rz-hand.is-hidden .rz-hcard { pointer-events: none; }

/* ---- cards (pure CSS, no images) ---- */
.rz-card { --w: var(--rz-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(--rz-face) 0%, var(--rz-face-2) 100%); border: 1px solid var(--rz-face-border); box-shadow: 0 3px 8px rgba(0, 0, 0, .28); color: var(--rz-black); font-family: Georgia, "Times New Roman", serif; user-select: none; -webkit-user-select: none; overflow: hidden; }
.rz-card.is-red { color: var(--rz-red); }
.rz-c-tl, .rz-c-br { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .95; font-weight: 700; font-size: calc(var(--w) * .26); }
.rz-c-tl { top: calc(var(--w) * .06); left: calc(var(--w) * .07); }
.rz-c-br { bottom: calc(var(--w) * .06); right: calc(var(--w) * .07); transform: rotate(180deg); }
.rz-c-tl small, .rz-c-br small { font-size: .85em; }
.rz-c-mid { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); font-size: calc(var(--w) * .58); line-height: 1; }
.rz-card.is-face .rz-c-mid { font-size: calc(var(--w) * .42); font-weight: 700; }
.rz-card.is-face .rz-c-mid small { display: block; text-align: center; font-size: .9em; }
.rz-card.is-back { background: repeating-linear-gradient(45deg, var(--rz-back) 0 5px, var(--rz-back-2) 5px 10px); border: 3px solid #fff; }

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

/* ---- dialogs ---- */
.rz-overlay { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .5); animation: rz-fade .2s ease-out; }
.rz-overlay[hidden] { display: none; }
@keyframes rz-fade { from { opacity: 0; } }
.rz-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(--rz-card-bg); color: var(--text-color); text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); animation: rz-rise .25s ease-out; }
@keyframes rz-rise { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.rz-dialog h2 { font-weight: 800; font-size: 1.4rem; margin: 2px 0 4px; }
.rz-dialog-icon { font-size: 32px; color: var(--rz-accent); }
.rz-gold { color: var(--rz-gold); }
.rz-dialog-sub { color: var(--rz-muted); margin: 0 0 10px; }
.rz-dialog-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 14px; }
.rz-cover-card { max-width: 340px; }
.rz-sum-table-wrap { overflow-x: auto; }
.rz-sum-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rz-sum-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--rz-muted); font-weight: 700; padding: 4px; }
.rz-sum-table td { padding: 7px 4px; border-top: 1px solid var(--rz-card-border); font-weight: 700; }
.rz-sum-table td:first-child, .rz-sum-table th:first-child { text-align: left; }
.rz-sum-table td.rz-what { color: var(--rz-muted); font-weight: 600; font-size: .85rem; }
.rz-sum-table .is-you td { background: var(--rz-accent-soft); }
.rz-pts-pos { color: var(--rz-ok); }
.rz-pts-neg { color: var(--rz-ko); }
.rz-final { text-align: left; margin: 6px auto 0; padding-left: 26px; max-width: 280px; font-weight: 700; line-height: 1.7; }
.rz-final .is-you { color: var(--rz-accent); }

.rz-sheet-card { max-width: 760px; text-align: left; padding: 14px 10px 12px; }
.rz-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.rz-x { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--rz-card-border); background: var(--rz-card-bg); color: inherit; font-size: 1.1rem; cursor: pointer; }
.rz-sheet-legend { color: var(--rz-muted); font-size: .8rem; margin: 2px 4px 8px; line-height: 1.35; }
.rz-sheet-sub { font-size: 1rem; font-weight: 800; margin: 14px 4px 6px; }
.rz-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rz-accent); vertical-align: 1px; margin-left: 3px; }
.rz-sheet-wrap { overflow-x: auto; }
.rz-sheet-table { width: 100%; border-collapse: collapse; font-size: .82rem; table-layout: fixed; }
.rz-sheet-table th, .rz-sheet-table td { border: 1px solid var(--rz-card-border); padding: 4px 2px; text-align: center; vertical-align: middle; }
.rz-sheet-table thead th { background: var(--rz-card-bg); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rz-sheet-table th.rz-col-g { width: 86px; text-align: left; padding-left: 6px; }
.rz-sheet-table td.rz-gname { text-align: left; padding-left: 6px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rz-sheet-table td.is-neg { color: var(--rz-ko); }
.rz-sheet-table td.is-pos { color: var(--rz-ok); }
.rz-sheet-table td.is-zero { color: var(--rz-muted); }
.rz-sheet-table tfoot td { font-weight: 900; font-size: .95rem; background: var(--rz-accent-soft); }
.rz-sheet-hands th.rz-col-n { width: 28px; }
.rz-sheet-hands th.rz-col-g { width: 96px; }
.rz-sheet-hands td.rz-gname small { display: block; color: var(--rz-muted); font-weight: 600; font-size: .72rem; }
.rz-sheet-hands tr.is-now td { background: var(--rz-accent-soft); }

/* ---- desktop ---- */
@media (min-width: 700px) {
    :root { --rz-cw: 84px; --rz-tw: 68px; --rz-lw: 42px; }
    .rz-center, .rz-layout, .rz-pick { min-height: 200px; }
    .rz-trick { height: 200px; }
    .rz-seats { min-height: 96px; }
    .rz-av { width: 46px; height: 46px; font-size: 1.15rem; }
    .rz-name { font-size: .95rem; }
    .rz-stat { font-size: .88rem; }
    .rz-bar { font-size: 1rem; }
    .rz-g { min-height: 58px; font-size: 1rem; }
    .rz-pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 680px; }
}

@media (max-width: 380px) {
    :root { --rz-cw: 58px; --rz-tw: 46px; --rz-lw: 28px; }
    .rz-mode { font-size: .82rem; }
    .rz-bar { font-size: .84rem; gap: 4px 8px; }
    .rz-av { width: 34px; height: 34px; }
    .rz-name { font-size: .78rem; }
    .rz-g { font-size: .82rem; padding: 4px 6px; }
}

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