:root{--ink:#172c40;--cream:#f2f5f8;--card:#fff;--line:#dfe7ee;--green:#007d72;--muted:#607386;--navy:#112a40;--teal:#56edce}body{background:radial-gradient(ellipse at 90% 0%,#dcefe955,transparent 45%),var(--cream);color:var(--ink)}button{color:inherit;-webkit-tap-highlight-color:transparent}a{-webkit-tap-highlight-color:transparent}.shell{max-width:1080px;padding-top:24px}header{padding:0 0 24px;border-bottom:1px solid var(--line);margin-bottom:32px}.brand{color:var(--navy);text-decoration:none;font-size:32px;letter-spacing:-1.6px}.brandmark{box-shadow:0 6px 12px #122b4614;border-radius:13px}.brand-caption{font-size:10px;letter-spacing:.15em;margin-left:8px;font-weight:750;color:var(--muted)}.menu-toggle{display:flex;gap:18px;align-items:center;background:white;box-shadow:0 2px 6px #122b4605}.screen-intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.screen-intro .eyebrow{margin:0 0 10px;font-size:11px;letter-spacing:.18em}.screen-intro h1{font-size:clamp(34px,6vw,52px);letter-spacing:-2px;margin:0;line-height:1.1}.storage-badge{font-size:12px;font-weight:650;background:#e5ebf1;color:#536579;padding:8px 12px;border-radius:30px;text-align:center;white-space:nowrap}.storage-badge.connected{background:#dff2eb;color:#006b57}.app-status{margin:0 0 24px;font-size:14px;max-width:720px}.card{border-radius:22px;box-shadow:0 8px 26px #162e4706;padding:28px}.setup{grid-template-columns:1fr;max-width:760px;margin:auto}.setup>.card:first-child{border-top:0}.setup h1{font-size:28px;letter-spacing:-.8px}.names{gap:18px;margin:28px 0}.pname{background:#f7f9fb;border-color:#e2e8ed}input,select{transition:border-color .2s,box-shadow .2s,background .2s}input:focus,select:focus{border-color:#009884;box-shadow:0 0 0 4px #00988410;outline:none}.primary{background:linear-gradient(120deg,#008779,#006c65);box-shadow:0 5px 12px #007d7220;transition:transform .18s,box-shadow .18s}.primary:hover{box-shadow:0 7px 18px #007d7230}.secondary{border-color:#dfe6ec}.eyebrow{font-size:11px;letter-spacing:.14em}.top{background:linear-gradient(115deg,#112a40,#164b56);box-shadow:0 10px 24px #112a4012}.rank{padding:15px;border-radius:12px;animation:rise .25s ease-out both}.rank:nth-child(2){animation-delay:.035s}.rank:nth-child(3){animation-delay:.07s}.avatar{border-radius:50%;width:36px;height:36px}.cat{background:white;min-height:68px}.cat.sel{background:#e4f7ef;box-shadow:0 0 0 1px #008779}.finish{background:linear-gradient(145deg,#122c43,#13535b);padding-top:36px}.trophy{font-size:44px;animation:celebrate .6s ease-out both}.result-scorecard{padding:22px;margin:28px 0}.result-scorecard table th{font-size:13px}.result-scorecard h2{font-size:22px}.cloud-panel{max-width:520px;margin:0 auto}.cloud-head{padding-bottom:8px}.email-login{display:grid;grid-template-columns:1fr;border-top:0;padding-top:8px;gap:18px}.email-login label{min-width:0}.email-login>button{width:100%}.auth-links{display:grid;gap:8px}.auth-links .secondary{border:0;background:#f3f7f9;font-size:14px}.guest-link{display:block;text-align:center;color:var(--muted);font-size:14px;margin-top:24px;text-underline-offset:4px}#setPassword{margin-top:14px}#historyScreen{min-height:220px}.cloud-actions{border-bottom:1px solid var(--line);padding-bottom:18px}.cloud-games{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:20px}.cloud-games>p{grid-column:1/-1;margin-bottom:4px}.cloud-games button{text-align:left;font-size:14px;min-height:72px;background:#f7fafb;padding:18px;border-radius:14px}.cloud-games button:hover{border-color:#008779;background:#eef8f4}.leaguecard{margin-top:0}.leagueheading .section-icon{border-radius:12px;background:#e4f5ee}.leaguecard>p.muted{font-size:14px}.rules-screen{display:grid;grid-template-columns:1fr 1fr;gap:20px}.rules-screen aside{background:var(--navy);color:white}.rules-screen aside .eyebrow{color:var(--teal)}.rules-screen details{margin-top:0!important;align-self:start}.button-link{display:inline-block;text-decoration:none}.empty{padding:40px 20px}.empty strong{font-size:20px}.empty .button-link{margin-top:12px}#navigation{padding:28px;border:1px solid var(--line);border-radius:24px;width:min(440px,calc(100% - 32px));max-height:85dvh;box-shadow:0 28px 100px #0e223b40;background:#fff;color:var(--ink)}#navigation[open]{animation:rise .2s ease-out}#navigation::backdrop{background:#10293e77;backdrop-filter:blur(5px)}.menu-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.menu-heading>strong{font-size:28px;letter-spacing:-1px}#navigation nav{display:grid;gap:6px}#navigation nav a{display:block;color:var(--ink);text-decoration:none;padding:16px;border-radius:12px;font-weight:750;font-size:17px}#navigation nav a span{display:block;font-size:13px;color:var(--muted);font-weight:400;margin-top:3px}#navigation nav a:hover,#navigation nav a[aria-current]{background:#eaf6f0;color:#006956}body[data-screen] #accountScreen,body[data-screen] #historyScreen,body[data-screen] #leaderboardScreen,body[data-screen] #rulesScreen{display:none}body[data-screen=account] #accountScreen,body[data-screen=history] #historyScreen,body[data-screen=leaderboard] #leaderboardScreen{display:block;animation:rise .3s ease-out}body[data-screen=rules] #rulesScreen{display:grid;animation:rise .3s ease-out}body:not([data-screen=play]) #setup,body:not([data-screen=play]) #play,body:not([data-screen=play]) #finish{display:none!important}body[data-screen=play] #setup,body[data-screen=play] #play,body[data-screen=play] #finish{animation:rise .3s ease-out}@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes celebrate{from{opacity:0;transform:scale(.8) rotate(-8deg)}to{opacity:1;transform:scale(1) rotate(0)}}@media(max-width:760px){.shell{padding:18px 16px 40px}header{padding-bottom:18px;margin-bottom:24px}.brand-caption{display:none}.screen-intro{align-items:flex-start;gap:12px}.screen-intro h1{font-size:38px}.storage-badge{font-size:11px;white-space:normal;max-width:120px;margin-top:5px}.card{padding:22px;border-radius:20px}.cloud-games{grid-template-columns:1fr}.rules-screen{grid-template-columns:1fr}.result-scorecard{padding:16px}.screen-intro .eyebrow{font-size:10px}.app-status{font-size:13px}.brand{font-size:30px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.header-actions{display:flex;align-items:center;gap:16px}.account-link{color:var(--green);font-size:14px;font-weight:700;text-decoration:none}.account-link:hover{text-decoration:underline}.cloud-games>p{grid-column:1/-1}
.saved-game{border:1px solid var(--line);border-radius:14px;background:#f7fafb;padding:17px}.saved-game strong{display:block;font-size:16px;overflow-wrap:anywhere}.saved-game .muted{margin:5px 0 14px;font-size:13px}.saved-game-actions{display:flex;gap:8px;flex-wrap:wrap}.saved-game-actions .secondary{min-height:38px;padding:7px 10px;font-size:13px}.saved-game-actions .danger{color:#ad2f39;border-color:#efc7ca;background:#fff}.saved-game-actions .danger:hover{background:#fff2f3;border-color:#d98a90}@media(max-width:480px){.saved-game-actions .secondary{flex:1}}
.email-confirmation{display:grid;grid-template-columns:auto 1fr;gap:16px;margin-top:20px;padding:20px;border:1px solid #9ed9cb;border-radius:16px;background:linear-gradient(135deg,#eefaf6,#f8fffc);animation:rise .25s ease-out}.confirmation-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:#007d72;color:#fff;font-size:22px}.email-confirmation .eyebrow{margin:0 0 5px}.email-confirmation h2{margin:0 0 7px;font-size:21px}.email-confirmation p{margin:0;color:var(--ink);font-size:15px}.email-confirmation ol{margin:14px 0 12px;padding-left:20px;color:var(--ink);font-size:14px;line-height:1.65}.email-confirmation .muted{color:var(--muted);font-size:13px;margin-bottom:14px}.email-confirmation .secondary{background:#fff;border-color:#9ed9cb}@media(max-width:480px){.email-confirmation{grid-template-columns:1fr}.confirmation-icon{width:40px;height:40px}}
@media(max-width:760px){body[data-screen=play] .screen-intro,body[data-screen=play] .app-status{display:none}body[data-screen=play] header{margin-bottom:12px}body[data-screen=play] .top{position:sticky;top:8px;z-index:20;margin-bottom:10px;padding:13px 15px;align-items:center;border:1px solid #29606b;box-shadow:0 10px 22px #10293e35}body[data-screen=play] .top .eyebrow{display:none}body[data-screen=play] .turn{font-size:21px;line-height:1.2}body[data-screen=play] .top .muted{font-size:12px;line-height:1.3;margin-top:3px}body[data-screen=play] .progress-track{margin-top:7px;max-width:180px}body[data-screen=play] .top .secondary{min-height:38px;padding:7px 9px;font-size:12px}body[data-screen=play] .game{grid-template-columns:minmax(0,1fr) 126px;gap:8px;align-items:start}body[data-screen=play] .game>div:first-child{display:contents}body[data-screen=play] .game>div:first-child>.card{padding:12px;border-radius:15px;margin:0!important}body[data-screen=play] .game>div:first-child>.card h2{font-size:16px;margin:1px 0 10px;line-height:1.15}body[data-screen=play] .cats{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}body[data-screen=play] .cat{display:block;min-height:47px;padding:6px 3px;text-align:center;font-size:12px;line-height:1.15;overflow-wrap:anywhere}body[data-screen=play] .cat .category-icon,body[data-screen=play] .cat small{display:none}body[data-screen=play] .standings{gap:5px;max-height:330px;overflow-y:auto;padding-right:1px}body[data-screen=play] .rank{gap:4px;padding:8px 6px;border-radius:9px}body[data-screen=play] .ranknum,body[data-screen=play] .avatar{display:none}body[data-screen=play] .rank .playername{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body[data-screen=play] .rank .points{font-size:15px}body[data-screen=play] .game>.card{grid-column:1/-1;margin-top:2px;padding:16px}body[data-screen=play] .game>.card h2{font-size:18px;margin-bottom:12px}}
@media(max-width:760px){body[data-screen=play] .game{display:flex;gap:0;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain}body[data-screen=play] .game::-webkit-scrollbar{display:none}body[data-screen=play] .game>div:first-child,body[data-screen=play] .game>.card{flex:0 0 100%;width:100%;scroll-snap-align:start;scroll-snap-stop:always}body[data-screen=play] .game>div:first-child{display:grid;order:2;grid-template-columns:minmax(0,1fr) 126px;gap:8px;align-items:start}body[data-screen=play] .game>.card{order:1;grid-column:auto;margin:0;padding:16px;overflow:auto;max-height:calc(100dvh - 145px)}body[data-screen=play] .game>div:first-child>.card{padding:12px;border-radius:15px;margin:0!important}body[data-screen=play] .game>div:first-child>.card h2{font-size:16px;margin:1px 0 10px;line-height:1.15}body[data-screen=play] .cats{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}body[data-screen=play] .cat{display:grid;grid-template-columns:22px minmax(0,1fr);gap:4px;align-items:center;min-height:45px;padding:6px;text-align:left;font-size:12px;line-height:1.15;overflow-wrap:anywhere}body[data-screen=play] .cat .category-icon{display:block;grid-row:auto;font-size:21px;line-height:1;color:var(--green)}body[data-screen=play] .cat small{display:none}body[data-screen=play] .standings{overflow:hidden;max-height:none}body[data-screen=play] .game>.card h2{font-size:18px;margin-bottom:12px}}
@media(max-width:760px){body[data-screen=play] .game>div:first-child{order:1;grid-template-columns:minmax(0,1fr) 126px;gap:8px}body[data-screen=play] .game>.card{order:2}body[data-screen=play] .options{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}body[data-screen=play] .opt{min-width:0;min-height:44px;padding:7px 4px;font-size:16px;line-height:1}body[data-screen=play] .panel-heading,body[data-screen=play] .scorecard-heading{display:flex;align-items:center;justify-content:space-between;gap:7px}body[data-screen=play] .panel-heading h2,body[data-screen=play] .scorecard-heading h2{margin-bottom:10px}body[data-screen=play] .panel-heading .secondary,body[data-screen=play] .scorecard-heading .secondary{min-height:31px;padding:5px 8px;font-size:11px;white-space:nowrap}body[data-screen=play] .panel-link{grid-column:2;min-height:38px;padding:8px 7px;font-size:12px;white-space:normal;line-height:1.15}body[data-screen=play] .scorecard-heading{margin-bottom:12px}body[data-screen=play] .scorecard-heading h2{font-size:20px;margin:2px 0 0}body.play-standings-hidden[data-screen=play] .standings-card #standings{display:none}body.play-standings-hidden[data-screen=play] .standings-card{padding-bottom:12px!important}}
@media(max-width:760px){body[data-screen=play] .play-side{grid-column:2;display:grid;gap:8px;align-content:start}body[data-screen=play] .play-side .standings-card{margin:0!important}body[data-screen=play] .panel-link{grid-column:auto;width:100%}}
@media(max-width:760px){body[data-screen=play] .play-side .standings-card{padding:12px;border-radius:15px}body[data-screen=play] .play-side .standings-card h2{font-size:16px;margin:1px 0 10px;line-height:1.15}}
 .names>label{position:relative;min-width:0}.names>label:focus-within{z-index:100}.player-choice-menu{position:absolute;left:0;top:calc(100% + 5px);width:100%;z-index:100;display:grid;max-height:190px;overflow:auto;padding:5px;background:#fff;border:1px solid #b9d8d3;border-radius:10px;box-shadow:0 12px 24px #122b4626}.player-choice-menu button{min-height:36px;padding:7px 10px;border:0;border-radius:7px;background:transparent;text-align:left;font-size:14px;font-weight:600}.player-choice-menu button:hover,.player-choice-menu button:focus-visible{background:#e7f5f1}.player-choice-menu .new-player-choice{color:var(--green);border-bottom:1px solid var(--line);margin-bottom:3px}.player-choice-menu.hidden{display:none}
@media(max-width:760px){body[data-screen=play] .play-side{gap:8px}body[data-screen=play] .panel-link{min-height:38px;padding:8px 7px;font-size:12px}body.play-standings-hidden[data-screen=play] .standings-card{display:none}body[data-screen=play] .game>.card{padding:12px;max-height:calc(100dvh - 132px)}body[data-screen=play] .scorecard-heading{margin-bottom:7px}body[data-screen=play] #scorecard{min-width:0;width:100%;table-layout:fixed}body[data-screen=play] #scorecard th,body[data-screen=play] #scorecard td{padding:4px 2px;font-size:11px;line-height:1.1;white-space:normal;overflow-wrap:anywhere}body[data-screen=play] #scorecard th:first-child,body[data-screen=play] #scorecard td:first-child{width:58px;min-width:58px;font-size:10px;line-height:1.05;padding-left:4px;padding-right:3px}body[data-screen=play] #scorecard th:not(:first-child){font-size:10px;line-height:1.05}body[data-screen=play] #scorecard tbody tr:last-child td{font-size:13px;padding-top:5px;padding-bottom:5px}body[data-screen=play] #scorecard tbody tr:nth-last-child(2) td{font-size:11px}.scorecard-heading .eyebrow{font-size:10px}}

/* Completed-game scorecards: compact enough for results and history, without
   inheriting the ultra-dense live-play table. */
.result-scorecard{padding:16px 16px 14px;margin:20px 0;border-radius:18px}
.result-scorecard h2{font-size:21px;line-height:1.15;margin:0 0 5px}
.result-scorecard>.muted{margin:0 0 12px;font-size:13px;line-height:1.4}
.result-scorecard .tablewrap{border-radius:12px}
#resultScorecard{min-width:100%;width:max-content;table-layout:auto}
#resultScorecard th,#resultScorecard td{padding:9px 6px;font-size:13px;line-height:1.15;white-space:nowrap;overflow-wrap:normal}
#resultScorecard th{font-size:12px}
#resultScorecard th:first-child,#resultScorecard td:first-child{width:92px;min-width:92px;padding-left:9px;padding-right:6px}
#resultScorecard th:not(:first-child),#resultScorecard td:not(:first-child){min-width:58px}
#resultScorecard tbody tr:nth-last-child(2) td{font-size:12px}
#resultScorecard tbody tr:last-child td{font-size:15px;padding-top:10px;padding-bottom:10px}
@media(max-width:760px){.result-scorecard{padding:14px 12px 12px;margin:16px 0}.result-scorecard h2{font-size:20px}.result-scorecard>.muted{font-size:12px;margin-bottom:10px}.result-scorecard .tablewrap{border-radius:11px}#resultScorecard th,#resultScorecard td{padding:8px 4px;font-size:12px;line-height:1.12}#resultScorecard th{font-size:11px}#resultScorecard th:first-child,#resultScorecard td:first-child{width:82px;min-width:82px;padding-left:7px;padding-right:4px;font-size:12px}#resultScorecard th:not(:first-child),#resultScorecard td:not(:first-child){min-width:56px}#resultScorecard tbody tr:nth-last-child(2) td{font-size:11px;padding-top:7px;padding-bottom:7px}#resultScorecard tbody tr:last-child td{font-size:14px;padding-top:8px;padding-bottom:8px}}
.leaderboard-table{min-width:620px}.leaderboard-table th,.leaderboard-table td{white-space:nowrap}.sort-head{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;min-height:34px;padding:2px;border:0;background:transparent;color:inherit;font:inherit;font-weight:700;line-height:1.15}.sort-head i{font-style:normal;font-size:10px;color:#91a0af}.sort-head.active{color:var(--green)}.sort-head.active i{color:var(--green)}.leaderboard-table th:first-child .sort-head{justify-content:flex-start}.leaderboard-table td:first-child{max-width:150px;overflow:hidden;text-overflow:ellipsis}@media(max-width:760px){.leaguecard{padding:16px 12px}.leaderboard-wrap{border-radius:12px}.leaderboard-table{width:100%;min-width:382px;table-layout:fixed}.leaderboard-table th,.leaderboard-table td{padding:9px 3px;font-size:11px}.leaderboard-table th{padding:4px 2px}.leaderboard-table th:nth-child(1){width:82px}.leaderboard-table th:nth-child(2){width:42px}.leaderboard-table th:nth-child(3){width:36px}.leaderboard-table th:nth-child(4){width:55px}.leaderboard-table th:nth-child(5){width:79px}.leaderboard-table th:nth-child(6){width:62px}.sort-head{min-height:44px;gap:2px;font-size:10px;white-space:normal}.sort-head span{display:block}.sort-head i{font-size:8px}.leaderboard-table td:first-child{max-width:82px}.leaderboard-table td:last-child{font-size:11px}}
.import-panel{display:grid;gap:10px;margin:16px 0 6px;padding:16px;border:1px dashed #9dcfc9;border-radius:14px;background:#f2fbf9}.import-panel .eyebrow{margin:0 0 2px}.import-panel strong{font-size:16px}.import-panel .muted{margin:4px 0 0}.file-choice{display:block;color:var(--ink);font-size:14px}.file-choice input{margin-top:6px;background:#fff}.import-panel .primary{width:100%}
.export-panel{display:grid;gap:10px;margin:12px 0 6px;padding:16px;border:1px solid #d9e5eb;border-radius:14px;background:#f8fafc}.export-panel .eyebrow{margin:0 0 2px}.export-panel strong{font-size:16px}.export-panel .muted{margin:4px 0 0}.export-panel .secondary{width:100%;background:#fff}

/* Wide play layout: every panel is already visible, so only the standings
   disclosure remains useful. Compact/swipe layouts retain their navigation. */
@media(min-width:761px){
  body[data-screen=play] #viewScorecard,
  body[data-screen=play] #viewPlayPage{display:none}
  body.play-standings-hidden[data-screen=play] .standings-card{display:none}
  body[data-screen=play] .cat{grid-template-rows:auto auto;align-content:center;row-gap:1px}
  body[data-screen=play] .cat .category-label{align-self:end;line-height:1.15}
  body[data-screen=play] .cat small{align-self:start;margin-top:0;line-height:1.15}
}
