/* Financial Alias 12.0 — Linear-inspired product shell and focused casual game.
   Presentation only: no game logic, cloud logic, IDs or Firestore changes. */
:root {
  color-scheme:light;
  --ink:#191919;
  --muted:#737373;
  --line:#e7e7e7;
  --wash:#f6f6f5;
  --accent:#171717;
  --green:#167447;
  --red:#b64c40;
  --v12-border:#e6e6e5;
  --v12-surface:#fff;
  --v12-paper:#fafaf9;
  --v12-soft:#f5f5f4;
  --v12-text:#18181b;
  --v12-subtle:#737373;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--v12-paper);color:var(--v12-text);
}
*,*::before,*::after{box-sizing:border-box}
html{background:var(--v12-paper)}
body{background:var(--v12-paper);color:var(--v12-text);min-height:100dvh;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font-family:inherit}
a{color:inherit}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #94b7ff;outline-offset:3px}
::selection{background:#d5e6db;color:#171717}
/* Shell and type */
main.wrap{max-width:1030px;padding:0 30px 80px}
.top, main.wrap>header{padding:24px 0 19px;margin:0 0 36px;border-bottom:1px solid var(--v12-border);background:transparent}
.brand,header a.brand-home{color:var(--v12-text)!important;text-decoration:none!important;gap:11px}
.brand-icon,header .brand-logo{width:39px;height:39px;min-width:39px;display:inline-flex;align-items:center;justify-content:center;background:var(--v12-text)!important;color:#fff!important;border-radius:10px!important;font-size:23px!important;line-height:1;font-weight:850;letter-spacing:-1.8px;box-shadow:none!important}
.brand-dot{color:#a9cbb0}
.brand-type{gap:2px}.brand-type strong,header a.brand-home>b{font-size:15px;letter-spacing:.065em;font-weight:790}.brand-type small{font-size:11px;color:#8a8a8a;font-weight:540}
.nav-pill,main.wrap>header>a:not(.brand-home){background:transparent!important;border:1px solid var(--v12-border)!important;border-radius:9px!important;box-shadow:none!important;color:#444!important;padding:9px 13px;min-height:40px;font-size:12px!important;font-weight:670;text-decoration:none}
.nav-pill:hover,main.wrap>header>a:not(.brand-home):hover{background:#eee!important;text-decoration:none}
h1,.hero{font-weight:750;letter-spacing:-.045em;color:var(--v12-text)}
h2,h3,.section-title{font-weight:720;color:var(--v12-text);letter-spacing:-.025em}
.muted,.subtext,.hint,.stat-desc,.wizard-heading p{color:var(--v12-subtle)!important}
.eyebrow,.step-kicker{font-size:10px!important;letter-spacing:.14em!important;color:#777!important;text-transform:uppercase;font-weight:780!important}
.pill,.tag,.setup-chip,.chip{background:var(--v12-soft)!important;border:1px solid #e8e8e7!important;border-radius:6px!important;color:#626262!important;box-shadow:none!important}
.card{background:#fff!important;border:1px solid var(--v12-border)!important;box-shadow:none!important;border-radius:12px!important;padding:24px!important;margin:15px 0!important}
/* Consistent controls */
.btn,.field,button:not(.btn){-webkit-tap-highlight-color:transparent}
.btn{min-height:45px;border:1px solid #dadada!important;background:#fff;color:#333!important;border-radius:8px!important;box-shadow:none!important;font-size:13px;font-weight:665;transition:background .12s,border-color .12s,transform .11s;letter-spacing:-.01em}
.btn.primary,.btn.resume-action{background:#1c1c1c!important;border-color:#1c1c1c!important;color:#fff!important}
.btn.primary:hover:not(:disabled),.btn.resume-action:hover:not(:disabled){background:#363636!important;border-color:#363636!important}
.btn:hover:not(:disabled){background:#f4f4f4;border-color:#c9c9c9!important}
.btn.primary:hover:not(:disabled){background:#303030!important}
.btn:active:not(:disabled){transform:translateY(1px)}
.btn.success{background:var(--v12-text)!important;border-color:var(--v12-text)!important;color:#fff!important}
.btn.warn{color:#a7423a!important}
.btn.sm,.btn.small{min-height:38px;border-radius:7px!important;font-size:12px}
.btnlink{color:#6c6c6c;text-decoration:none;min-height:42px}
.btnlink:hover{text-decoration:underline;color:#1f1f1f}
.field{min-height:46px;border-radius:8px!important;border:1px solid #dcdcdc!important;box-shadow:none!important;color:#282828;background:white;padding:11px 13px}
.field:focus{border-color:#848484!important}
input[type="checkbox"],input[type="radio"]{accent-color:#242424}
.error{color:#a23838!important}
/* Setup: no stacked gradient or giant chips */
#setup{padding-bottom:10px}
.setup-compact-title{font-size:clamp(29px,4.3vw,43px)!important;font-weight:745!important;letter-spacing:-.048em!important;margin:4px 0 19px!important}
#setup .wizard-nav{display:flex;gap:0;border-bottom:1px solid var(--v12-border);margin:0 0 28px!important;overflow:auto}
#setup .wizard-tab{white-space:nowrap;min-height:51px;min-width:0;flex:1 1 0;justify-content:center;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#838383!important;padding:12px 8px!important;font-size:13px;font-weight:625;gap:10px}
#setup .wizard-tab.selected{border-bottom-color:#171717!important;color:#171717!important;background:transparent!important}
#setup .wizard-index{background:transparent!important;color:#9b9b9b!important;padding:0!important;font-size:11px!important;font-weight:650!important}
#setup .wizard-tab.selected .wizard-index{color:#262626!important}
.wizard-heading{margin:16px 0 20px}
.wizard-heading h2{font-size:clamp(24px,3vw,32px)!important;font-weight:740;letter-spacing:-.04em;margin-top:6px}
.wizard-heading p{max-width:680px;font-size:14px;line-height:1.55}
.category,.difficulty-option{border:1px solid #e5e5e5!important;background:#fff!important;border-radius:9px!important;box-shadow:none!important;min-height:72px;transition:border-color .12s,background .12s}
.category:hover,.difficulty-option:hover{border-color:#a9a9a9!important}
.category:has(input:checked),.difficulty-option:has(input:checked){background:#f3f6f3!important;border-color:#8fb29b!important}
.catname,.difficulty-option strong{font-weight:680;color:#272727}
.catdesc,.catcount,.difficulty-option small{color:#818181!important}
.toggle,.ratio-panel,.overtime{border:1px solid var(--v12-border)!important;background:var(--v12-soft)!important;border-radius:10px!important}
.ratio-track .fin{background:#2a2a2a!important}.ratio-track .fun{background:#ddd!important}.ratio-range{accent-color:#242424}
.wizard-footnote{color:#999!important}
.launch-button{min-height:58px!important;box-shadow:none!important;font-size:15px!important}
/* Public cloud and resume components remain accessible but visual priority is low */
.cloud-drawer,.cloudbar,.guest-resume,.game-cloud,.cloud-feedback,.notice,.readonly-game{background:#fff!important;border-color:var(--v12-border)!important;box-shadow:none!important;border-radius:10px!important}
.cloud-drawer{margin-bottom:21px!important}
.cloud-summary:hover{background:#fafafa}
#gameCloudStatus.game-cloud{background:#f9f9f8!important}
/* Between turn, pause, summary, last word, finish */
#between,#overtime,#paused,#turnEnd,#finish{max-width:780px;margin:10px auto 25px}
#between .hero,#paused .hero,#overtime .hero,#turnEnd .hero,#finish .hero{font-size:clamp(37px,6vw,65px);font-weight:750;line-height:1.05}
.score,.metric,.stat-metric{background:#fff!important;border:1px solid var(--v12-border)!important;border-radius:9px!important;box-shadow:none!important}
.score.active{border-color:#97b1a0!important;background:#f4f8f4!important}
.score-value,.metric strong,.stat-metric strong{font-weight:735!important;letter-spacing:-.045em!important}
#turnEnd .num{font-weight:750;letter-spacing:-.055em;color:#171717}
.v11-event{border-radius:7px!important;border-color:var(--v12-border)!important;background:#fff!important}
#turnEnd .v11-event .positive{color:#127146!important}
#turnEnd .v11-event .negative{color:#aa5144!important}
#between .scoregrid .score{background:#fafaf9!important}
.wordcard{background:#fff!important;border:1px solid #dedede!important;border-radius:12px!important;box-shadow:none!important}
.wordcard h2{color:#181818!important;font-weight:755!important;letter-spacing:-.055em}
.wordcard::before,#play .wordcard::before{display:none!important}
.footer{border-color:var(--v12-border)!important;color:#a0a0a0!important;line-height:1.6}
/* Playing: a dedicated, distraction-free canvas */
body.alias11-playing{background:#fff!important}
body.alias11-playing main.wrap{max-width:100%!important;padding:0 12px 10px!important}
#play,body.alias11-playing #play{position:relative;background:#fff!important;border:none!important;box-shadow:none!important;border-radius:0!important;max-width:900px!important;margin:0 auto!important;padding:12px 6px 14px!important;isolation:auto}
body.alias11-playing #play{gap:clamp(7px,1.2vh,14px)!important;min-height:calc(100dvh - 12px)!important}
#play .v11-game-top{color:#929292!important;min-height:48px!important;padding:0 0 2px!important;letter-spacing:.1em;font-size:11px!important;font-weight:720;border-bottom:1px solid #ededed;z-index:10}
#play .v11-fullscreen{background:transparent!important;color:#333!important;border:1px solid #ddd!important;border-radius:8px!important;min-width:148px!important;min-height:46px!important;font-size:13px!important;padding:10px 14px!important;letter-spacing:0;box-shadow:none!important}
#play .v11-fullscreen:active{background:#f1f1f1!important}
#play .stats{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;padding:5px 0!important;margin:0!important;min-height:54px!important;color:var(--v12-text)!important}
#play #playingTeam,body.alias11-playing #play #playingTeam{font-weight:750!important;color:#171717!important;font-size:clamp(17px,2.4vw,23px)!important}
#play #turnStats,body.alias11-playing #play #turnStats{font-size:12px!important;color:#8a8a8a!important;font-weight:580!important}
#play #deckRemaining,body.alias11-playing #play #deckRemaining{background:#f6f6f5!important;color:#737373!important;border:1px solid #e8e8e8!important;border-radius:6px!important;box-shadow:none!important;padding:8px 10px!important;font-size:11px!important}
#play #timer,body.alias11-playing #play #timer{color:#191919!important;text-shadow:none!important;letter-spacing:-.085em!important;font-size:clamp(64px,10vh,110px)!important;font-weight:750!important;line-height:1!important;margin:1px 0!important}
#play #timer.low,body.alias11-playing #play #timer.low{color:#b94139!important;animation:none!important}
#play #timerMeter{height:6px!important;border-radius:0!important;background:#efefef!important}
#play #timerBar{background:#252525!important;transition:width .1s linear!important}
#play #timerMeter.low #timerBar{background:#be4a43!important}
#play .wordcard,body.alias11-playing #play .wordcard{background:#f7f7f6!important;border:1px solid #ececeb!important;box-shadow:none!important;border-radius:14px!important;margin:4px 0!important;min-height:clamp(190px,32vh,355px)!important;flex:1;padding:18px 24px!important}
#play .wordcard .eyebrow{color:#999!important;letter-spacing:.17em!important;font-size:10px!important}
#play .wordcard h2,body.alias11-playing #play .wordcard h2{font-size:clamp(37px,7.2vw,76px)!important;line-height:1.04!important;color:#171717!important;font-weight:765!important;letter-spacing:-.055em!important;margin:14px 0!important}
#play .actions{gap:10px!important;margin:4px 0 0!important}
#play .actions .btn,body.alias11-playing #play .actions .btn{min-height:clamp(72px,11vh,105px)!important;border-radius:11px!important;font-size:clamp(15px,2vw,20px)!important;font-weight:735!important;box-shadow:none!important;transition:transform .1s,background .1s}
#play #correct{background:#147d4c!important;border:1px solid #147d4c!important;color:#fff!important}
#play #correct:hover{background:#116a40!important}
#play #skip{background:#fcefed!important;border:1px solid #ead0ca!important;color:#9b3d36!important}
#play #skip:hover{background:#f8e7e3!important}
#play .alias10-tools{margin:0!important;gap:8px}
#play .alias10-sound{border:1px solid #e5e5e5!important;background:#fff!important;color:#777!important;border-radius:7px!important;min-height:36px;font-weight:610}
#play .alias10-sound[aria-pressed=true]{color:#191919!important;background:#f3f3f3!important}
#play .hint.center{color:#aaa!important}
#play .undo-button{background:transparent!important;border:0!important;color:#747474!important;font-size:12px!important;min-height:42px!important}
#play .btnlink{color:#767676!important;font-size:13px!important}
body.alias11-playing #play .scoregrid,body.alias11-playing #play .progressrow{display:none!important}
body.alias11-playing #play .v11-game-top,body.alias11-playing #play .stats{flex-shrink:0}
/* Fullscreen fallback on iPhone, preserve scroll/lock logic from v11.1 */
body.alias11-focus #play{background:#fff!important;box-shadow:none!important;border-radius:0!important;max-width:none!important;padding:calc(7px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left))!important}
body.alias11-focus #play .wordcard{background:#f7f7f6!important;border-color:#ebebeb!important}
/* ADMIN panel */
body:has(#adminContent) main.wrap{max-width:1100px;padding:21px 30px 70px}
main.wrap>header .brand-logo{width:38px;height:38px}
main.wrap>header .muted{color:#a3a3a3!important}
body:has(#adminContent) h1{font-size:clamp(33px,5vw,48px);font-weight:760;letter-spacing:-.05em;margin:12px 0 9px}
body:has(#adminContent) section>p.muted{max-width:730px;font-size:14px;margin-bottom:26px}
body:has(#adminContent) .card{padding:23px!important}
body:has(#adminContent) .toolbar{gap:12px}
body:has(#adminContent) .stathead{gap:10px}
body:has(#adminContent) .metric{padding:21px 20px!important}
body:has(#adminContent) .metric strong{font-size:36px;color:#191919;margin-top:7px}
body:has(#adminContent) .metric .muted{font-weight:570;font-size:12px!important;color:#8a8a8a!important}
body:has(#adminContent) .admin-tabs{padding:0;border-bottom:1px solid #ddd;gap:24px;flex-wrap:nowrap;overflow-x:auto;margin:23px 0 23px}
body:has(#adminContent) .admin-tabs .btn{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;min-height:48px;padding:12px 2px;border-bottom:2px solid transparent!important;color:#838383!important;white-space:nowrap;font-weight:650}
body:has(#adminContent) .admin-tabs .btn[aria-selected="true"]{border-bottom-color:#171717!important;color:#171717!important}
body:has(#adminContent) .entry{border:1px solid #ededed!important;border-radius:9px!important;box-shadow:none!important;padding:17px!important}
body:has(#adminContent) .entry:hover{background:#fafafa!important}
body:has(#adminContent) .entry strong{font-weight:680}
body:has(#adminContent) .chip.done{background:#ebf5ee!important;color:#177044!important;border-color:#ddede1!important}
body:has(#adminContent) .chip.early{background:#fff4eb!important;color:#895c35!important}
body:has(#adminContent) .stat-metric{padding:17px!important}
body:has(#adminContent) .stat-metric strong{font-size:31px!important}
body:has(#adminContent) .stat-metric small{color:#8a8a8a!important}
body:has(#adminContent) .stat-layout{gap:12px}
body:has(#adminContent) .stat-layout>.card{margin:0!important}
body:has(#adminContent) .stat-chart{border-color:#eee}
body:has(#adminContent) .stat-bar{background:#383838!important;border-radius:3px 3px 0 0}
body:has(#adminContent) .stat-bar.zero{background:#ededed!important}
body:has(#adminContent) .stat-table th{border-color:#eaeaea!important;color:#888!important;font-weight:650}
body:has(#adminContent) .stat-table td{border-color:#efefef!important}
body:has(#adminContent) .stat-note{background:#f6f6f5!important;border-color:#eaeaea!important;border-radius:8px!important;color:#777!important}
body:has(#adminContent) .editarea,body:has(#adminContent) .local-upload{background:#f8f8f8!important;border-color:#e7e7e7!important;border-radius:9px!important}
body:has(#adminContent) .bank-word-item{border-color:var(--v12-border)!important}
body:has(#adminContent) .btn.danger{color:#b0443d!important;background:#fff!important;border-color:#eccdca!important}
body:has(#adminContent) .btn.danger:hover{background:#fff5f3!important}
/* Responsive */
@media(max-width:700px){
  main.wrap,body:has(#adminContent) main.wrap{padding:0 16px 50px}
  .top,main.wrap>header{padding:14px 0 13px;margin-bottom:24px}
  .brand-icon,header .brand-logo{width:36px;height:36px;min-width:36px;font-size:21px!important}
  .brand-type strong{font-size:14px}.brand-type small{font-size:10px}
  .setup-compact-title{font-size:32px!important;margin-bottom:16px!important}
  #setup .wizard-tab{font-size:12px!important;gap:6px!important;padding:12px 4px!important}
  #setup .wizard-index{font-size:10px!important}
  .card,body:has(#adminContent) .card{padding:16px!important;border-radius:10px!important}
  .category{min-height:72px;padding:11px}
  .wizard-heading{margin-top:16px}
  .wizard-heading p{font-size:13px}
  #play,body.alias11-playing #play{padding:8px 0 9px!important}
  body.alias11-playing #play{gap:clamp(5px,1vh,9px)!important}
  #play .v11-game-top{min-height:48px!important}
  #play .v11-fullscreen{min-width:139px!important;min-height:46px!important;padding:10px!important;font-size:12px!important}
  #play .stats{min-height:46px!important;flex-wrap:nowrap!important;padding:2px 0!important}
  #play #playingTeam{font-size:17px!important}
  #play #deckRemaining{font-size:10px!important}
  #play #timer,body.alias11-playing #play #timer{font-size:clamp(64px,10vh,88px)!important}
  #play .wordcard,body.alias11-playing #play .wordcard{min-height:25dvh!important;padding:16px 12px!important;margin:3px 0!important}
  #play .wordcard h2,body.alias11-playing #play .wordcard h2{font-size:clamp(33px,9vw,52px)!important;letter-spacing:-.055em!important}
  #play .actions .btn,body.alias11-playing #play .actions .btn{font-size:clamp(13px,3.6vw,17px)!important;min-height:clamp(70px,10vh,84px)!important;padding:10px 4px!important}
  #play .alias10-tools{display:none!important}
  body:has(#adminContent) .stathead{grid-template-columns:repeat(3,minmax(0,1fr))}
  body:has(#adminContent) .metric{padding:12px!important}
  body:has(#adminContent) .metric strong{font-size:25px}
  body:has(#adminContent) .admin-tabs{gap:20px}
  body:has(#adminContent) .stat-metric{padding:12px!important}
  body:has(#adminContent) .stat-metric strong{font-size:25px!important}
  body:has(#adminContent) .entry{padding:14px!important}
}
@media(max-width:380px){
  .brand-type small{display:none}
  #setup .wizard-tab{font-size:11px!important}
  #setup .wizard-index{display:none}
  body:has(#adminContent) .stathead .metric .muted{font-size:10px!important}
}
@media(prefers-reduced-motion:reduce){
  .btn,.category,.difficulty-option{transition:none!important}
}
/* Final small-screen refinements and keyboard-safe touch targets */
.top .brand{background:transparent!important;border:0!important;padding:0!important;box-shadow:none!important;border-radius:0!important}
body:has(#adminContent) main.wrap>header{flex-wrap:wrap}
body:has(#adminContent) main.wrap>header>div{gap:10px}
body:has(#adminContent) main.wrap>header a.brand-home{padding:0!important;background:none!important;box-shadow:none!important}
#play .v11-game-top{min-height:56px!important}
#play .v11-fullscreen{min-height:54px!important;min-width:160px!important}
@media(max-width:700px){
 #play .v11-game-top{min-height:56px!important}
 #play .v11-fullscreen{min-height:54px!important;min-width:170px!important;padding:12px 13px!important}
 body:has(#adminContent) main.wrap>header>div{min-width:0}
 body:has(#adminContent) main.wrap>header a.brand-home{gap:9px}
}
/* Prevent nested analytics tables from widening the whole viewport. */
body:has(#adminContent) #statsPane,body:has(#adminContent) .stat-layout,body:has(#adminContent) .stat-layout>.card,body:has(#adminContent) .stat-table-wrap{min-width:0;max-width:100%}
@media(max-width:750px){
 body:has(#adminContent) .stat-layout{grid-template-columns:minmax(0,1fr)!important}
 body:has(#adminContent) .stat-layout>.card{width:100%;overflow:hidden}
 body:has(#adminContent) .stat-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
}
