:root {
  color-scheme: light;
  --bg: #e8ede3;
  --ink: #23382b;
  --muted: #60715f;
  --faint: #64705f;
  --accent: #3e6b51;
  --accent-deep: #2d513a;
  --accent-soft: #e4eadc;
  --positive: #2f6d50;
  --negative: #a74338;
  --warning: #926426;
  --glass: rgba(255,251,237,.7);
  --glass-strong: rgba(255,252,241,.88);
  --line: rgba(49,78,53,.1);
  --panel-radius: 28px;
  --control-radius: 16px;
  --key-radius: 12px;
  --panel-padding: 20px;
  --grid-gap: 8px;
  --section-gap: 24px;
  --radius: var(--panel-radius);
  --shadow: 0 16px 45px -23px rgba(35,67,42,.27), 0 2px 6px rgba(41,62,38,.03);
  --ease: cubic-bezier(.2,.8,.2,1);
  --spring: cubic-bezier(.22,1.3,.36,1);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; }
button, a, input { touch-action: manipulation; }
button { border: 0; background: none; }
button:disabled { cursor: default; opacity: .46; }
a { color: var(--accent-deep); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(62,107,81,.65); outline-offset: 4px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; background: linear-gradient(145deg,#dce6d0 0%,#e7eadb 48%,#eae4cd 100%); }
.ambient i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .58; }
.ambient i:nth-child(1) { width: min(76vw,650px); height: min(76vw,650px); background: #c4d4b5; left: -26%; top: 10%; }
.ambient i:nth-child(2) { width: min(66vw,550px); height: min(66vw,550px); background: #d9ceb0; right: -24%; top: 31%; }
.ambient i:nth-child(3) { width: 370px; height: 370px; background: #cbd9bd; left: 20%; bottom: -22%; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 12px 18px; border-radius: 12px; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.no-script { padding: 20px; text-align: center; }
.boot { min-height: 90vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; color: var(--muted); }
.glass { position: relative; background: var(--glass); border: 1px solid rgba(255,255,255,.86); box-shadow: var(--shadow), inset 0 1px 1px rgba(255,255,255,.95); -webkit-backdrop-filter: blur(24px) saturate(1.35); backdrop-filter: blur(24px) saturate(1.35); }
.glass::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 -1px 1px rgba(62,83,46,.045); }
.app-shell { width: min(100%,480px); margin: 0 auto; padding: max(24px,env(safe-area-inset-top)) 20px calc(116px + env(safe-area-inset-bottom)); }
.brand-mark { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--accent-deep); font-size: 22px; font-weight: 500; border-radius: var(--control-radius); background: linear-gradient(140deg,rgba(255,255,255,.94),rgba(248,247,230,.6)); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 8px 18px -11px rgba(53,83,47,.4), inset 0 1px 1px white; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { font-size: 18px; font-weight: 650; letter-spacing: .08em; }
.brand p { font-size: 11px; letter-spacing: .12em; color: var(--muted); margin-top: 1px; }
.topbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-bottom: var(--section-gap); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; height: 44px; width: 44px; border-radius: 50%; background: rgba(255,255,255,.64); border: 1px solid rgba(255,255,255,.9); transition: transform .28s var(--spring), background .25s; position: relative; overflow: hidden; }
.icon-button:active { transform: scale(.9); }
.room-code { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: var(--control-radius); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.7); }
.room-code span { font-weight: 650; letter-spacing: .06em; margin-left: 0; color: var(--ink); }
.eyebrow { color: var(--muted); font-size: 12px; letter-spacing: .09em; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 24px; margin: var(--section-gap) 0 12px; }
.section-heading h2 { font-size: 16px; font-weight: 650; line-height: 1.4; letter-spacing: .01em; }
.section-heading .caption { color: var(--muted); font-size: 12px; }
.small-link { color: var(--accent-deep); padding: 8px 0 8px 12px; font-size: 13px; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.small-link svg { height: 16px; width: 16px; }
.primary-button, .secondary-button, .quiet-button { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: var(--control-radius); font-size: 14px; font-weight: 600; transition: transform .3s var(--spring), box-shadow .3s, background .3s; }
.primary-button { color: #fff; background: linear-gradient(130deg,#4e775b,#31563e); box-shadow: 0 8px 20px -10px rgba(39,83,52,.6), inset 0 1px 1px rgba(255,255,255,.25); border: 1px solid rgba(46,88,60,.45); }
.secondary-button { background: rgba(255,255,255,.7); color: var(--accent-deep); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 6px 14px -12px rgba(41,62,38,.3); }
.quiet-button { color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,.3); }
.primary-button:active, .secondary-button:active, .quiet-button:active { transform: scale(.96); }
.wide { width: 100%; }
.button-row { display: flex; gap: var(--grid-gap); }
.button-row > * { flex: 1; min-width: 0; }
.loading-spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.ripple { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.55); pointer-events: none; transform: translate(-50%,-50%); animation: ripple .65s var(--ease) forwards; }
.hero-intro { padding: 17px 1px 0; }
.hero-intro .eyebrow { letter-spacing: .17em; font-size: 12px; }
.hero-intro h1 { font-size: clamp(33px,8.6vw,42px); font-weight: 650; letter-spacing: -.045em; line-height: 1.33; margin: 14px 0 12px; }
.hero-intro h1 em { font-style: normal; color: var(--accent-deep); }
.hero-intro p { color: var(--muted); font-size: 13px; line-height: 1.9; max-width: 270px; }
.hero-art { position: relative; height: 217px; margin: 16px 0 6px; }
.art-halo { position: absolute; width: 220px; height: 140px; top: 42px; left: 50%; transform: translateX(-50%); border-radius: 50%; background: rgba(120,145,86,.15); filter: blur(26px); }
.hero-card { position: absolute; width: 116px; height: 156px; top: 28px; left: 50%; border-radius: 22px; background: linear-gradient(140deg,rgba(255,255,255,.98),rgba(249,245,228,.6)); border: 1px solid rgba(255,255,255,.98); box-shadow: 0 18px 32px -19px rgba(67,82,45,.45), inset 0 1px 1px white; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--accent-deep); transform: translateX(-50%) rotate(6deg); }
.hero-card.back { transform: translateX(-92%) rotate(-15deg); background: linear-gradient(140deg,rgba(170,188,146,.73),rgba(239,242,221,.5)); }
.hero-card .corner { position: absolute; left: 14px; top: 11px; font-size: 13px; }
.hero-card .corner.bottom { left: auto; top: auto; right: 14px; bottom: 11px; transform: rotate(180deg); }
.hero-card .face { font-family: Georgia, 'Times New Roman', serif; font-size: 62px; line-height: 1; font-weight: 400; }
.hero-card .face-sub { margin-top: 7px; font-size: 11px; letter-spacing: .2em; }
.art-score { position: absolute; left: calc(50% + 27px); bottom: 17px; padding: 10px 18px; color: var(--positive); border-radius: 22px; font-size: 24px; letter-spacing: -.04em; font-weight: 650; background: rgba(255,255,255,.83); border: 1px solid white; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transform: rotate(-5deg); }
.entry-card { padding: var(--panel-padding); border-radius: var(--radius); }
.segmented { display: flex; padding: 4px; gap: 4px; border-radius: var(--control-radius); background: rgba(99,117,77,.065); border: 1px solid rgba(99,117,77,.04); }
.segmented button { position: relative; flex: 1; min-height: 44px; padding: 7px 10px; border-radius: var(--key-radius); font-size: 14px; color: var(--muted); transition: background .25s, transform .25s var(--spring), color .25s; }
.segmented button[aria-selected="true"], .segmented button[aria-pressed="true"] { color: var(--ink); background: rgba(255,255,255,.92); box-shadow: 0 3px 9px -5px rgba(39,57,95,.3), inset 0 1px 1px white; }
.segmented button:active { transform: scale(.94); }
.form-field { display: block; margin: 16px 0; }
.form-field > span { display: block; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.form-field input { width: 100%; min-height: 48px; padding: 12px 14px; font-size: 16px; color: var(--ink); background: rgba(255,255,255,.54); border: 1px solid rgba(80,103,61,.12); border-radius: var(--control-radius); outline-offset: 2px; }
.form-field input::placeholder { color: #7a8574; }
.form-field input[aria-invalid="true"] { border-color: rgba(167,67,56,.6); }
.field-error { margin: 7px 2px 0; font-size: 12px; line-height: 1.6; color: var(--negative); }
.form-footnote { font-size: 12px; line-height: 1.75; text-align: center; color: var(--muted); margin-top: 16px; }
.feature-line { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--muted); font-size: 12px; margin: 24px 0 0; }
.feature-line span { display: inline-flex; gap: 5px; align-items: center; }
.feature-line svg { height: 13px; width: 13px; }
.home-footer { text-align: center; color: var(--faint); font-size: 11px; letter-spacing: .04em; margin-top: 28px; }
.score-card { border-radius: var(--panel-radius); padding: var(--panel-padding); overflow: hidden; }
.score-card::after { content: ''; position: absolute; right: -35px; top: -50px; width: 160px; height: 160px; border-radius: 50%; background: rgba(189,204,155,.17); filter: blur(30px); pointer-events: none; }
.score-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.player-label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.role-tag { font-size: 11px; color: var(--accent-deep); background: rgba(64,111,78,.085); padding: 3px 7px; border-radius: 8px; }
.round-tag { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap; color: var(--muted); font-size: 12px; }
.live-dot { width: 5px; height: 5px; background: #5c9286; border-radius: 50%; box-shadow: 0 0 0 3px rgba(92,146,134,.07); }
.live-dot.offline { background: #a17d58; box-shadow: 0 0 0 3px rgba(161,125,88,.08); }
.score-main { display: grid; grid-template-columns: minmax(0,1fr) 104px; align-items: center; gap: 16px; padding-top: 4px; }
.score-total { min-width: 0; }
.score-caption { display: block; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: .035em; }
.score-number { font-size: 52px; font-weight: 560; letter-spacing: -.055em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-secondary { display: grid; gap: 12px; min-width: 0; }
.round-result, .segment-total { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.round-result { position: relative; }
.round-result b { font-size: 18px; letter-spacing: -.035em; font-weight: 600; text-align: right; line-height: 1.2; font-variant-numeric: tabular-nums; }
.segment-total [data-number] { color: var(--ink); font-size: 16px; font-weight: 550; text-align: right; line-height: 1.2; font-variant-numeric: tabular-nums; }
.score-pending { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 12px; line-height: 1.4; white-space: nowrap; }
.score-pending svg { width: 12px; height: 12px; }
.positive { color: var(--positive) !important; }
.negative { color: var(--negative) !important; }
.neutral { color: var(--muted) !important; }
.round-note { display: flex; align-items: center; gap: 8px; padding: 4px 0 0; color: var(--muted); font-size: 12px; }
.round-note svg { width: 16px; height: 16px; }
.round-note button { margin-left: auto; padding: 0 2px; font-size: 12px; color: var(--accent-deep); }
.hand-panel { padding: var(--panel-padding); border-radius: var(--panel-radius); }
.desk-entry { margin-top: 8px; }
.paper-fan { display: inline-flex; position: relative; align-items: center; justify-content: center; height: 73px; padding: 6px 13px 5px; isolation: isolate; pointer-events: none; }
.paper-playing-card { width: 45px; height: 62px; fill: none; stroke: none; stroke-width: 0; flex: 0 0 auto; overflow: visible; border-radius: 5px; filter: drop-shadow(0 3px 2px rgba(43,54,28,.14)); transform: rotate(-8deg) translateY(1px); transform-origin: 50% 88%; transition: transform .38s var(--spring), filter .38s; }
.paper-playing-card + .paper-playing-card { margin-left: -27px; }
.paper-playing-card:nth-child(2) { transform: rotate(3deg) translateY(-1px); }
.paper-playing-card:nth-child(3) { transform: rotate(13deg) translateY(1px); }
.mode-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--grid-gap); }
.mode-track { display: none; }
.mode-button { display: flex; flex-flow: row wrap; align-items: baseline; justify-content: center; column-gap: 4px; padding: 4px 1px 8px; min-height: 76px; border-radius: var(--control-radius); }
.mode-button .paper-fan { flex-basis: 100%; height: 52px; padding: 3px 6px; }
.mode-button .paper-playing-card { width: 35px; height: 48px; }
.mode-button .paper-playing-card + .paper-playing-card { margin-left: -21px; }
.mode-label { font-size: 12px; font-weight: 600; line-height: 1.25; }
.mode-multiple { font-size: 11px; line-height: 1.3; color: var(--muted); }
.mode-button[aria-pressed="true"] .paper-playing-card:first-child { transform: rotate(-11deg) translateY(-1px); }
.mode-button[aria-pressed="true"] .paper-playing-card:nth-child(3) { transform: rotate(16deg) translateY(-1px); }
.point-picker { margin-top: 8px; }
.point-picker .option-label { margin-bottom: 8px; }
.point-picker .point-grid { margin: 0; }
.point-picker .point-button { font-family: inherit; font-size: 21px; font-weight: 550; letter-spacing: -.025em; font-variant-numeric: tabular-nums; min-height: 48px; background: rgba(255,253,241,.74); box-shadow: inset 0 1px 1px rgba(255,255,255,.9); }
.point-picker .point-button[aria-pressed="true"] { color: #fffaf0; background: #476a4e; border-color: #547755; }
.instant-status { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex: 1; min-width: 0; min-height: 32px; margin: 0; padding: 4px 0; border-radius: var(--control-radius); color: var(--muted); background: rgba(239,240,218,.64); border: 1px solid rgba(255,255,255,.7); font-size: 13px; }
.instant-status > svg, .instant-status .loading-spinner { width: 16px; height: 16px; flex: 0 0 auto; }
.instant-status.saved { color: var(--accent-deep); }
.instant-status span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.instant-status b { font-size: 15px; font-weight: 600; white-space: nowrap; }
.instant-status b small { font-size: 11px; margin-left: 2px; font-weight: 400; }
.quick-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 0; margin-top: 16px; }
.quick-heading h3 { font-size: 13px; font-weight: 600; }
.quick-heading span { font-size: 11px; color: var(--muted); }
.tian-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--grid-gap); margin-top: 8px; }
.tian-group { padding: 8px; border-radius: var(--control-radius); background: rgba(255,251,237,.5); border: 1px solid rgba(255,255,255,.92); box-shadow: inset 0 1px 1px white; }
.tian-group.chosen { border-color: rgba(96,129,71,.35); background: rgba(226,235,210,.6); }
.tian-art { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.tian-art .paper-fan { height: 52px; padding: 3px 5px; }
.tian-art .paper-playing-card { width: 35px; height: 48px; }
.tian-art .paper-playing-card + .paper-playing-card { margin-left: -19px; }
.tian-art > span:last-child { letter-spacing: .025em; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ink); }
.tian-actions { display: flex; gap: var(--grid-gap); margin-top: 4px; }
.tian-button { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; flex: 1; min-height: 44px; border-radius: var(--key-radius); background: rgba(255,253,241,.84); border: 1px solid rgba(80,105,48,.09); font-size: 14px; font-weight: 550; transition: transform .25s var(--spring), background .25s; }
.tian-button small { color: var(--muted); font-size: 11px; }
.tian-button[aria-pressed="true"] { color: #fffaf0; background: #46674a; }
.tian-button[aria-pressed="true"] small { color: rgba(255,250,240,.8); }
.tian-button:active { transform: scale(.9); }
.special-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--grid-gap); margin-top: var(--grid-gap); }
.special-tile { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 8px; min-height: 68px; }
.special-tile .paper-fan { padding: 4px; height: 56px; }
.special-tile .paper-playing-card { width: 36px; height: 50px; }
.special-tile .paper-playing-card + .paper-playing-card { margin-left: -23px; }
.special-label { display: flex; flex-direction: column; align-items: flex-start; font-size: 12px; font-weight: 600; white-space: nowrap; }
.special-label small { font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.paper-caption { font-size: 11px; color: var(--muted); text-align: center; margin-top: 12px; }
.hero-art .paper-fan { position: absolute; height: 190px; left: 50%; top: 3px; transform: translateX(-50%) rotate(1deg); padding: 10px 20px; }
.hero-art .paper-playing-card { width: 113px; height: 156px; border-radius: 12px; filter: drop-shadow(0 13px 12px rgba(52,73,36,.17)); }
.hero-art .paper-playing-card + .paper-playing-card { margin-left: -60px; }
.hero-art .paper-playing-card:first-child { transform: rotate(-13deg) translateY(3px); }
.hero-art .paper-playing-card:nth-child(2) { transform: rotate(10deg) translateY(0); }
.hero-art-label { position: absolute; left: 0; right: 0; bottom: -1px; text-align: center; font-family: Georgia,'Songti SC','STSong',serif; font-size: 12px; letter-spacing: .09em; color: var(--muted); }
.hero-art .art-score { left: calc(50% + 49px); bottom: 27px; background: rgba(255,252,237,.86); font-family: Georgia,serif; }
.reconcile.switch-reconcile { margin-top: 0; margin-bottom: 16px; }
.switch-list-label { font-size: 12px; color: var(--muted); margin: 8px 0; }
.stats-back { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; font-size: 13px; padding: 0 0 8px; color: var(--muted); }
.stats-back svg { width: 16px; height: 16px; transform: rotate(180deg); }
.statistics-banner { display: flex; align-items: center; gap: 16px; padding: var(--panel-padding); border-radius: var(--panel-radius); }
.statistics-stamp { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: 0 0 auto; border-radius: var(--control-radius); border: 1px solid rgba(145,133,84,.21); color: #83643e; background: rgba(247,239,215,.6); }
.statistics-stamp svg { width: 24px; height: 24px; }
.statistics-banner p { font-size: 12px; color: var(--muted); }
.statistics-banner strong { font-size: 34px; font-weight: 550; letter-spacing: -.045em; line-height: 1.3; }
.statistics-banner strong small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 7px; letter-spacing: 0; }
.statistics-banner-note { margin-left: auto; max-width: 88px; color: var(--muted); font-size: 11px; line-height: 1.85; }
.statistics-players { border-radius: var(--panel-radius); padding: 4px var(--panel-padding); }
.statistics-player { display: flex; align-items: center; width: 100%; gap: 12px; padding: 16px 0; min-height: 72px; border-top: 1px solid var(--line); text-align: left; }
.statistics-player:first-child { border-top: 0; }
.statistics-player-info { flex: 1; min-width: 0; }
.statistics-player-info > p { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.statistics-player-info > p span { font-size: 11px; color: var(--muted); font-weight: 400; }
.statistics-player-info > div { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.statistics-player-info > div b { font-weight: 400; }
.statistics-player-info > div i { font-style: normal; }
.statistics-player-score { text-align: right; flex: 0 0 auto; min-width: 0; white-space: nowrap; }
.statistics-player-score strong { display: block; font-size: 18px; font-weight: 550; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.statistics-player-score small { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }
.statistics-player > svg { width: 16px; height: 16px; color: var(--muted); }
.statistics-profile { display: flex; align-items: center; gap: 12px; margin: 8px 0 var(--section-gap); }
.statistics-profile .avatar { width: 44px; height: 44px; border-radius: 16px; font-size: 18px; }
.statistics-profile > div { flex: 1; min-width: 0; }
.statistics-profile h2 { font-size: 26px; line-height: 1.3; font-weight: 600; letter-spacing: -.025em; overflow-wrap: anywhere; }
.statistics-profile p { font-size: 11px; color: var(--muted); margin-top: 3px; }
.statistics-profile > strong { text-align: right; flex: 0 0 auto; white-space: nowrap; font-size: 30px; letter-spacing: -.04em; font-weight: 550; font-variant-numeric: tabular-nums; }
.statistics-profile > strong small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.statistics-summary { border-radius: var(--panel-radius); padding: var(--panel-padding); }
.stats-main-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.stat-metric > span { color: var(--muted); font-size: 12px; display: block; }
.stat-metric > strong { display: block; font-size: 28px; font-weight: 550; letter-spacing: -.035em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.stats-main-row .stat-metric + .stat-metric { border-left: 1px solid var(--line); padding-left: 20px; }
.outcome-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--grid-gap); padding: 16px 0; }
.outcome-grid .stat-metric strong { font-size: 22px; margin-top: 2px; }
.stats-secondary-row { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 12px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }
.stats-secondary-row b { font-weight: 550; color: var(--ink); margin: 0 4px; }
.chart-card { border-radius: var(--panel-radius); padding: var(--panel-padding); }
.trend-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 11px; color: var(--muted); }
.trend-summary strong { font-size: 20px; letter-spacing: -.04em; font-weight: 550; font-variant-numeric: tabular-nums; }
.trend-summary strong small { font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 6px; }
.trend-chart { width: 100%; height: auto; display: block; stroke: none; fill: none; overflow: visible; }
.trend-chart text { font-family: inherit; font-size: 11px; fill: var(--muted); stroke: none; }
.chart-grid { stroke: rgba(79,105,58,.08); stroke-width: 1; }
.chart-zero { stroke: rgba(79,105,58,.19); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-area { fill: rgba(116,147,88,.11); stroke: none; }
.chart-line { fill: none; stroke: #527453; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { fill: #58784f; stroke: #fffaf0; stroke-width: 1.5; }
.chart-empty { min-height: 145px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; color: var(--muted); }
.chart-empty svg { width: 28px; height: 28px; }
.chart-empty p { font-size: 12px; }
.round-records { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.round-record { padding: 16px; border-radius: var(--control-radius); }
.round-record span { display: block; color: var(--muted); font-size: 11px; }
.round-record strong { display: block; font-size: 24px; font-weight: 550; margin-top: 4px; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.distribution-card { padding: 12px var(--panel-padding); border-radius: var(--panel-radius); }
.distribution-row { display: flex; align-items: center; gap: 12px; min-height: 36px; font-size: 12px; }
.distribution-row > span { width: 68px; flex: 0 0 auto; color: var(--muted); }
.distribution-track { height: 5px; border-radius: 6px; background: rgba(98,127,73,.08); flex: 1; overflow: hidden; }
.distribution-track i { display: block; height: 100%; min-width: 0; background: linear-gradient(90deg,#a5b98b,#5e8054); border-radius: inherit; }
.distribution-row b { min-width: 26px; text-align: right; font-weight: 550; font-variant-numeric: tabular-nums; }
.distribution-row b small { color: var(--muted); font-weight: 400; font-size: 11px; margin-left: 3px; }
.statistics-note { font-size: 11px; line-height: 1.9; color: var(--muted); margin-top: 19px; padding: 0 3px; }
.icon-button { min-width: 44px; min-height: 44px; }
.room-code { min-height: 44px; }
.small-link { min-height: 44px; }
.hand-heading .text-link { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; min-width: 44px; padding: 6px 0 6px 8px; }
.round-note button { min-width: 44px; min-height: 44px; }
.sync-banner button { min-height: 44px; min-width: 44px; }
.hand-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.hand-heading h2 { flex: 0 0 auto; }
.hand-heading h2 { font-size: 16px; line-height: 1.4; font-weight: 650; }
.hand-heading p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.hand-heading .text-link { font-size: 12px; color: var(--muted); padding: 8px 0 8px 8px; }
.type-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.hand-tile { position: relative; overflow: hidden; min-width: 0; min-height: 76px; padding: 8px 5px 9px; border-radius: var(--control-radius); border: 1px solid rgba(255,255,255,.94); background: linear-gradient(145deg,rgba(255,255,255,.85),rgba(246,244,225,.42)); box-shadow: 0 4px 7px -7px rgba(71,92,48,.6), inset 0 1px 1px white; transition: transform .3s var(--spring), box-shadow .3s, border-color .3s, background .3s; }
.hand-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(125deg,transparent 15%,rgba(255,255,255,.85) 45%,transparent 70%); transform: translateX(-160%); pointer-events: none; }
.hand-tile:hover::after { transform: translateX(160%); transition: transform .75s var(--ease); }
.hand-tile.tile-pop::after { animation: cardShine .7s var(--ease) both; }
.hand-tile:active { transform: scale(.89) rotate(-1deg); }
.hand-tile[aria-pressed="true"] { border-color: rgba(93,119,63,.43); background: linear-gradient(140deg,rgba(255,255,255,.97),rgba(220,230,199,.75)); box-shadow: 0 5px 13px -9px rgba(59,94,49,.65), inset 0 1px 1px white, 0 0 0 2px rgba(105,126,76,.075); }
.hand-tile[aria-pressed="true"] .tile-check { opacity: 1; transform: scale(1); }
.tile-check { position: absolute; top: 6px; right: 6px; width: 13px; height: 13px; color: white; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.5); transition: all .3s var(--spring); }
.tile-check svg { width: 9px; height: 9px; stroke-width: 2.5; }
.tile-face { display: block; height: 28px; color: #60795b; font-family: Georgia,'Times New Roman',serif; font-size: 25px; line-height: 1.15; letter-spacing: -.06em; font-weight: 400; }
.tile-face.tian { color: #896b41; }
.tile-face.suits { font-size: 19px; letter-spacing: -.13em; padding-top: 3px; }
.tile-title { display: block; font-size: 12px; font-weight: 550; margin-top: 5px; }
.tile-multiple { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.hand-tile.normal .tile-face { font-size: 28px; }
.hand-tile.tian .tile-face { font-size: 25px; }
.hand-options { margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }
.hand-options.points-only { margin-top: 13px; padding-top: 12px; }
.option-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.option-label strong { color: var(--accent-deep); font-weight: 600; }
.point-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: var(--grid-gap); margin-top: 10px; }
.points-only .point-grid { margin-top: 0; }
.point-button { min-height: 48px; padding: 4px; border-radius: var(--key-radius); border: 1px solid rgba(255,255,255,.93); background: rgba(255,255,255,.55); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; transition: transform .25s var(--spring), background .25s; }
.point-button[aria-pressed="true"] { background: rgba(72,113,65,.12); color: var(--accent-deep); border-color: rgba(98,125,69,.25); }
.point-button:active { transform: scale(.87); }
.option-toggle { display: flex; align-items: center; width: 100%; gap: 10px; padding: 12px 1px 0; text-align: left; font-size: 13px; }
.option-toggle .switch { margin-left: auto; width: 34px; height: 20px; border-radius: 20px; background: rgba(112,128,91,.18); padding: 3px; transition: background .25s; }
.option-toggle .switch::after { content: ''; display: block; width: 14px; height: 14px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(75,92,56,.12); transition: transform .3s var(--spring); }
.option-toggle[aria-pressed="true"] .switch { background: var(--accent); }
.option-toggle[aria-pressed="true"] .switch::after { transform: translateX(14px); }
.option-toggle .option-tip { font-size: 11px; color: var(--muted); margin-left: auto; }
.selection-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 17px; padding: 12px 13px; background: rgba(234,238,214,.55); border: 1px solid rgba(255,255,255,.75); border-radius: 15px; }
.selection-summary .selected-label { font-size: 13px; font-weight: 600; }
.selection-summary .selected-help { font-size: 11px; color: var(--muted); margin-top: 2px; }
.multiplier-badge { font-size: 16px; color: var(--accent-deep); font-weight: 600; white-space: nowrap; }
.multiplier-badge small { font-size: 11px; font-weight: 400; margin-left: 2px; }
.submit-button { margin-top: 13px; min-height: 48px; border-radius: 17px; }
.submit-button svg { width: 17px; height: 17px; }
.submitted-note { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.submitted-note svg { width: 11px; height: 11px; }
.table-list { border-radius: var(--panel-radius); padding: 4px var(--panel-padding); }
.table-row { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 16px 0; border-top: 1px solid var(--line); }
.table-row:first-child { border-top: 0; }
.avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: var(--key-radius); background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.85); display: flex; align-items: center; justify-content: center; font-size: 13px; color: #5a7358; font-weight: 500; }
.avatar.dealer { color: #8b6940; background: rgba(235,225,200,.65); }
.member-info { min-width: 0; flex: 1; }
.member-name { font-size: 14px; font-weight: 550; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.member-name .me { font-size: 11px; color: var(--muted); font-weight: 400; }
.member-hand { font-size: 12px; color: var(--muted); margin-top: 3px; }
.member-score { text-align: right; flex: 0 0 auto; min-width: 0; white-space: nowrap; font-size: 18px; font-weight: 550; font-variant-numeric: tabular-nums; line-height: 1.3; }
.member-score small { display: block; color: var(--faint); font-size: 11px; font-weight: 400; margin-top: 4px; }
.status-chip { flex-shrink: 0; border-radius: 8px; font-size: 11px; padding: 3px 6px; display: inline-flex; align-items: center; gap: 4px; background: rgba(92,115,68,.065); color: var(--muted); }
.status-chip.done { color: var(--positive); background: rgba(83,138,122,.07); }
.status-chip svg { width: 10px; height: 10px; }
.dealer-controls { margin-top: 16px; }
.missing-note { text-align: center; font-size: 12px; color: var(--muted); margin: 11px 0 0; line-height: 1.65; }
.missing-note strong { color: var(--warning); font-weight: 500; }
.empty-state { text-align: center; padding: 33px 20px; color: var(--muted); }
.empty-state svg { width: 28px; height: 28px; margin-bottom: 10px; opacity: .65; }
.empty-state h3 { font-size: 14px; color: var(--ink); margin-bottom: 6px; font-weight: 550; }
.empty-state p { font-size: 12px; line-height: 1.8; }
.waiting-card { padding: var(--panel-padding); border-radius: var(--panel-radius); text-align: center; }
.waiting-card .waiting-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 0 auto 12px; color: var(--accent); border-radius: var(--control-radius); background: rgba(255,255,255,.6); }
.waiting-card h2 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.waiting-card p { font-size: 13px; color: var(--muted); line-height: 1.8; margin-bottom: 18px; }
.bottom-nav { position: fixed; bottom: max(18px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 44px),390px); display: flex; align-items: center; padding: 6px; gap: 6px; z-index: 20; border-radius: 26px; background: rgba(252,251,241,.75); border: 1px solid rgba(255,255,255,.97); box-shadow: 0 12px 36px -15px rgba(64,82,44,.29), inset 0 1px 1px white; -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); }
.nav-item { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 20px; color: var(--muted); font-size: 13px; transition: all .3s var(--ease); }
.nav-item svg { width: 18px; height: 18px; }
.nav-item[aria-current="page"] { color: var(--accent-deep); background: linear-gradient(140deg,rgba(218,231,201,.68),rgba(237,238,215,.56)); box-shadow: inset 0 1px 1px rgba(255,255,255,.95), 0 3px 9px -8px rgba(47,77,43,.5); }
.nav-item:active { transform: scale(.94); }
.page-heading { margin: 8px 0 var(--section-gap); }
.page-heading h2 { font-size: 26px; line-height: 1.3; font-weight: 600; letter-spacing: -.025em; margin-bottom: 8px; }
.page-heading p { font-size: 13px; color: var(--muted); }
.ledger-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-radius: var(--panel-radius); padding: var(--panel-padding); margin-bottom: var(--section-gap); }
.ledger-totals > div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.ledger-totals p { font-size: 12px; color: var(--muted); }
.ledger-totals strong { display: block; font-weight: 550; font-size: 27px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin-top: 5px; }
.ledger-totals strong small { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.round-history { margin-top: 12px; border-radius: var(--panel-radius); overflow: hidden; }
.history-header { width: 100%; min-height: 72px; padding: 16px var(--panel-padding); display: flex; align-items: center; gap: 12px; text-align: left; }
.round-circle { width: 36px; height: 36px; flex: 0 0 auto; border-radius: var(--key-radius); display: flex; align-items: center; justify-content: center; background: rgba(104,125,74,.07); color: var(--accent-deep); font-size: 13px; font-variant-numeric: tabular-nums; }
.history-info { flex: 1; min-width: 0; }
.history-info h3 { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.history-info p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.history-score { font-size: 18px; flex: 0 0 auto; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 550; margin-right: 0; }
.history-header > svg { width: 16px; height: 16px; transition: transform .3s; color: var(--faint); }
.round-history.open .history-header > svg { transform: rotate(180deg); }
.history-detail { padding: 0 var(--panel-padding) 12px; animation: enter .32s var(--ease); }
.history-detail .table-row { min-height: 60px; gap: 12px; padding: 12px 0; }
.history-detail .member-hand { line-height: 1.6; }
.history-detail .member-score { font-size: 14px; }
.audit-entry { font-size: 12px; color: var(--muted); padding: 10px 0; border-top: 1px solid var(--line); line-height: 1.8; }
.audit-entry:first-child { border: none; }
.account-card { border-radius: var(--panel-radius); padding: var(--panel-padding); }
.account-profile { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.account-profile .avatar { width: 44px; height: 44px; border-radius: var(--control-radius); font-size: 18px; }
.account-profile > div { flex: 1; min-width: 0; }
.account-profile h3 { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.account-profile p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 0; text-align: left; width: 100%; min-height: 52px; border-top: 1px solid var(--line); }
.setting-row > svg { width: 20px; height: 20px; color: #63775c; }
.setting-row > .danger-text:first-child { display: flex; align-items: center; justify-content: center; flex: 0 0 20px; }
.setting-row .setting-title { flex: 1; min-width: 0; font-size: 14px; }
.setting-row .setting-value { font-size: 12px; flex-shrink: 0; white-space: nowrap; color: var(--muted); }
.setting-row .chevron { width: 16px; height: 16px; color: var(--faint); }
.danger-text { color: var(--negative); }
.rule-note { color: var(--muted); font-size: 12px; line-height: 1.85; margin-top: 14px; padding: 0 3px; }
.ended-banner { border-radius: var(--control-radius); padding: 13px 16px; margin: 0 0 18px; background: rgba(255,255,255,.65); border: 1px solid white; display: flex; gap: 12px; align-items: center; }
.ended-banner svg { color: var(--positive); width: 18px; height: 18px; }
.ended-banner p { font-size: 12px; color: var(--muted); }
.ended-banner strong { color: var(--ink); display: block; font-size: 13px; margin-bottom: 2px; }
.sync-banner { display: flex; align-items: center; gap: 7px; color: var(--warning); font-size: 12px; padding: 9px 12px; background: rgba(247,241,227,.68); border-radius: 13px; margin: -10px 0 15px; }
.sync-banner button { color: inherit; text-decoration: underline; margin-left: auto; }
.sync-banner svg { height: 13px; width: 13px; }
.sheet-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(35,52,32,.22); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); display: flex; align-items: flex-end; justify-content: center; animation: veilIn .26s var(--ease); }
.sheet { width: min(100%,480px); max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; padding: 12px var(--panel-padding) calc(20px + env(safe-area-inset-bottom)); border-radius: var(--panel-radius) var(--panel-radius) 0 0; border: 1px solid rgba(255,255,255,.97); background: linear-gradient(150deg,rgba(253,252,242,.96),rgba(238,243,223,.94)); box-shadow: 0 -15px 55px -24px rgba(49,67,37,.24), inset 0 1px 1px white; animation: sheetIn .44s var(--spring); }
.sheet-handle { width: 32px; height: 4px; border-radius: 4px; background: rgba(108,127,86,.21); margin: 0 auto 16px; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-header h2 { font-size: 16px; font-weight: 650; line-height: 1.4; letter-spacing: -.025em; }
.sheet-header .icon-button { width: 44px; height: 44px; background: rgba(118,133,94,.08); border: 0; }
.sheet-header .icon-button svg { width: 20px; height: 20px; }
.sheet-description { font-size: 13px; color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
.sheet-footer { margin-top: var(--section-gap); }
.choice-player { width: 100%; display: flex; align-items: center; text-align: left; gap: 12px; margin-top: 8px; padding: 12px 16px; border-radius: var(--control-radius); background: rgba(255,255,255,.6); border: 1px solid white; }
.choice-player .member-info p { font-size: 11px; color: var(--muted); margin-top: 3px; }
.choice-player .check-circle { width: 19px; height: 19px; border: 1px solid #acb9a3; border-radius: 50%; }
.choice-player[aria-pressed="true"] { background: rgba(90,108,196,.07); border-color: rgba(100,116,195,.25); }
.choice-player[aria-pressed="true"] .check-circle { background: var(--accent); border-color: var(--accent); display: flex; align-items: center; justify-content: center; color: white; }
.choice-player .check-circle svg { width: 12px; height: 12px; }
.reconcile { margin: 16px 0 0; padding: 16px; border: 1px solid rgba(108,134,74,.09); border-radius: var(--control-radius); background: rgba(255,255,255,.4); }
.reconcile p { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.reconcile-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 13px; padding: 6px 0; }
.reconcile-row b { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 550; }
.reconcile-footer { font-size: 11px; color: var(--positive); border-top: 1px solid var(--line); padding-top: 9px; margin-top: 5px; display: flex; align-items: center; gap: 5px; }
.reconcile-footer svg { width: 11px; height: 11px; }
.qr-wrap { width: 186px; height: 186px; margin: 24px auto 16px; border-radius: var(--control-radius); padding: 16px; background: white; border: 1px solid rgba(101,122,69,.07); box-shadow: 0 9px 23px -18px rgba(52,78,41,.35); display: flex; align-items: center; justify-content: center; }
.qr-wrap img { width: 100%; height: 100%; image-rendering: pixelated; }
.invite-code { text-align: center; margin-bottom: var(--section-gap); }
.invite-code p { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.invite-code strong { font-size: 27px; font-weight: 600; letter-spacing: .13em; font-variant-numeric: tabular-nums; }
.qr-tip { text-align: center; font-size: 12px; color: var(--muted); line-height: 1.8; }
.rules-list { padding: 16px; background: rgba(255,255,255,.5); border: 1px solid white; border-radius: var(--control-radius); }
.rules-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-height: 36px; border-top: 1px solid var(--line); font-size: 13px; }
.rules-row:first-child { border: none; }
.rules-row b { color: var(--accent-deep); font-weight: 550; }
.rules-body { font-size: 13px; line-height: 1.9; color: var(--muted); margin: 16px 0; }
.rules-body strong { color: var(--ink); font-weight: 550; }
.rules-body p + p { margin-top: 10px; }
.toast-stack { position: fixed; z-index: 80; top: calc(19px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 38px),370px); display: flex; align-items: center; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; gap: 8px; align-items: center; padding: 12px 16px; color: var(--ink); border-radius: var(--control-radius); border: 1px solid rgba(255,255,255,.96); background: rgba(253,252,243,.91); box-shadow: 0 8px 25px -14px rgba(54,79,42,.4); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); font-size: 13px; animation: toastIn .4s var(--spring); line-height: 1.7; }
.toast svg { height: 16px; width: 16px; color: var(--positive); }
.toast.error svg { color: var(--negative); }
.float-score { position: fixed; z-index: 25; pointer-events: none; font-size: 35px; font-weight: 600; letter-spacing: -.06em; text-shadow: 0 2px 12px rgba(255,255,255,.9); transform: translateX(-50%); animation: scoreFloat 1.65s var(--ease) both; }
.score-particle { position: fixed; z-index: 24; width: 5px; height: 5px; border-radius: 50%; pointer-events: none; background: #8ca577; animation: particle .9s var(--ease) both; }
.view-enter { animation: enter .4s var(--ease) both; }
.tile-pop { animation: selected .42s var(--spring) both; }
.result-pop { animation: resultPop .48s var(--spring) both; }
.score-changed { display: inline-block; animation: countGlow .9s var(--ease); }
.transition-overlay { position: fixed; z-index: 35; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(239,244,226,.37); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); pointer-events: none; animation: transitionVeil 1s var(--ease) both; }
.transition-label { padding: 21px 28px; border-radius: var(--panel-radius); background: rgba(255,255,255,.77); border: 1px solid white; text-align: center; box-shadow: var(--shadow); animation: transitionLabel 1s var(--spring) both; }
.transition-label svg { color: var(--accent); width: 30px; height: 30px; margin-bottom: 7px; }
.transition-label strong { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.transition-label p { font-size: 12px; margin-top: 5px; color: var(--muted); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ripple { to { transform: translate(-50%,-50%) scale(28); opacity: 0; } }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes selected { 0% { transform: scale(.91); } 60% { transform: scale(1.045); } 100% { transform: scale(1); } }
@keyframes cardShine { from { transform: translateX(-160%); } to { transform: translateX(160%); } }
@keyframes resultPop { 0% { transform: scale(.8) translateY(5px); opacity: .3; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes countGlow { 40% { filter: drop-shadow(0 1px 8px rgba(106,138,78,.17)); } }
@keyframes veilIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-13px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes scoreFloat { 0% { opacity: 0; transform: translate(-50%,16px) scale(.65); } 18% { opacity: 1; transform: translate(-50%,-6px) scale(1.09); } 37% { transform: translate(-50%,-15px) scale(1); } 72% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-62px) scale(.94); } }
@keyframes particle { from { transform: translate(0,0) scale(1); opacity: .7; } to { transform: translate(var(--px),var(--py)) scale(.3); opacity: 0; } }
@keyframes transitionVeil { 0%,100% { opacity: 0; } 22%,70% { opacity: 1; } }
@keyframes transitionLabel { 0% { transform: scale(.85) translateY(12px); opacity: 0; } 30%,65% { transform: scale(1); opacity: 1; } 100% { transform: scale(.97) translateY(-10px); opacity: 0; } }

@media (min-width: 650px) {
  body { background: #e6ecdf; }
  .app-shell { padding-top: 38px; }
  .ambient i:nth-child(1) { left: 7%; top: 0; }
  .ambient i:nth-child(2) { right: 10%; top: 18%; }
  .hero-art { margin-top: 18px; height: 220px; }
  .sheet-overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: var(--panel-radius); max-height: 85dvh; padding-bottom: var(--panel-padding); }
  .sheet-handle { display: none; }
  .sheet-header { padding-top: 10px; }
}
@media (min-width: 980px) {
  .room-shell { width: min(calc(100% - 48px),660px); }
  .desk-shell { width: min(calc(100% - 64px),1010px); }
  .desk-layout { display: grid; grid-template-columns: minmax(300px,.85fr) minmax(350px,1.15fr); gap: 24px 30px; grid-template-areas: 'summary entry' 'table entry'; grid-template-rows: min-content 1fr; align-items: start; }
  .desk-summary { grid-area: summary; }
  .desk-entry { grid-area: entry; margin-top: 0; }
  .desk-table { grid-area: table; }
  .desk-table > .section-heading { margin-top: 0; }
  .desk-layout > .ended-banner { grid-column: 1/-1; }
  .statistics-shell { width: min(calc(100% - 48px),660px); }
  .mode-button .paper-playing-card { width: 42px; height: 58px; }
  .mode-button .paper-playing-card + .paper-playing-card { margin-left: -25px; }
  .mode-button .paper-fan { height: 64px; }
  .mode-button { min-height: 100px; }
  .special-tile .paper-playing-card { width: 41px; height: 57px; }
  .special-tile .paper-fan { height: 64px; }
}
@media (max-width: 359px) {
  :root { --panel-padding: 16px; }
  .app-shell { padding-left: 16px; padding-right: 16px; }
  .type-grid { gap: 6px; }
  .score-main { grid-template-columns: minmax(0,1fr) 96px; gap: 12px; }
  .score-number { font-size: 48px; }
  .score-pending { font-size: 11px; gap: 3px; }
  .score-pending svg { width: 10px; height: 10px; }
  .room-code { padding: 7px 9px; }
  .bottom-nav { width: calc(100% - 30px); }
  .topbar { gap: 8px; }
  .brand { gap: 8px; }
  .brand p { font-size: 11px; letter-spacing: .025em; }
  .top-actions { gap: 5px; }
  .top-actions .icon-button { width: 44px; height: 44px; }
  .room-code { font-size: 11px; padding: 7px 8px; }
  .mode-grid { gap: 6px; }
  .mode-button { min-height: 80px; flex-flow: column nowrap; align-items: center; }
  .mode-button .paper-fan { height: 46px; padding: 3px; }
  .mode-button .paper-playing-card { width: 31px; height: 43px; }
  .mode-button .paper-playing-card + .paper-playing-card { margin-left: -19px; }
  .mode-label { font-size: 11px; }
  .tian-group { padding: 6px; }
  .tian-button { gap: 2px; font-size: 13px; }
  .tian-button small { font-size: 10px; }
  .tian-art { gap: 5px; }
  .tian-art .paper-fan { padding: 4px; }
  .tian-art .paper-playing-card { width: 31px; height: 43px; }
  .tian-art > span:last-child { font-size: 11px; }
  .special-tile { padding: 4px; gap: 8px; }
  .special-tile .paper-playing-card { width: 32px; height: 44px; }
  .special-tile .paper-playing-card + .paper-playing-card { margin-left: -21px; }
  .special-tile .paper-fan { padding: 4px 3px; }
  .special-label { font-size: 11px; }
  .nav-item { gap: 5px; font-size: 12px; }
  .nav-item svg { width: 16px; height: 16px; }
  .statistics-players { padding: 4px var(--panel-padding); }
  .statistics-player { gap: 8px; }
  .statistics-player-info > div { font-size: 11px; gap: 3px; }
  .statistics-player-score strong { font-size: 17px; }
  .statistics-player-score small { font-size: 10px; }
  .statistics-player > svg { width: 16px; height: 16px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .bottom-nav { background: rgba(249,251,255,.95); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .float-score, .score-particle, .ripple, .transition-overlay { display: none; }
}
