@font-face{font-family:Nunito;src:url('/fonts/nunito-sans.ttf') format('truetype');font-weight:200 1000;font-style:normal;font-display:swap}
:root{--blue:#082a65;--blue-hover:#164580;--yellow:#ffda32;--paper:#f5f7fa;--ink:#082a65;--muted:#455d7e;--line:#d1dceb;--error:#9f1731;--radius:14px;--font:Nunito,system-ui,sans-serif;color-scheme:light;font-family:var(--font);font-synthesis:none;background:var(--blue);color:var(--paper)}
*{box-sizing:border-box}body{margin:0}.terminal,.recent,.history-panel,.setup,.storage-problem{color:var(--ink)}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;touch-action:manipulation}button:disabled{cursor:default;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #1478db;outline-offset:3px}button svg,a svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}::selection{background:var(--yellow);color:var(--blue)}input{caret-color:var(--blue)}input::placeholder{color:#536782;opacity:1}*{scrollbar-color:#7590b5 var(--blue);scrollbar-width:thin}a{color:inherit;text-underline-offset:4px}h1,h2,h3,p{margin:0}h1,h2{font-weight:850;letter-spacing:-.025em;text-wrap:balance}button{font-weight:750}h1{font-size:clamp(28px,4vw,38px);line-height:1.12}h2{font-size:20px;line-height:1.2}.app-shell{max-width:1080px;margin:auto;padding:0 12px 84px;min-height:100svh}.app-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px 6px 18px;color:var(--paper)}.brand{display:flex;gap:10px;align-items:center;text-decoration:none;font-size:24px;font-weight:900;letter-spacing:-.025em;line-height:1.1;min-width:0}.brand svg{width:34px;height:34px;stroke-width:2.6}.yellow-stroke{stroke:var(--yellow)}.header-button{display:flex;gap:6px;align-items:center;background:transparent;border:1px solid #7990b3;border-radius:10px;color:var(--paper);padding:10px;min-height:44px}.header-button:hover{background:var(--blue-hover)}.notice{background:#fff0b9;padding:12px 16px;border-radius:12px;margin-bottom:12px;font-size:14px;line-height:1.4}.notice.error{background:#ffe0e5;color:#81152a}.notice[hidden],.toast[hidden],[hidden]{display:none!important}.boot{color:white;padding:60px 12px}.app-footer{display:flex;gap:8px;justify-content:space-between;color:#c2d3ed;font-size:12px;margin:20px 4px 0;line-height:1.4}.bottom-nav{position:fixed;z-index:10;bottom:0;left:0;right:0;display:flex;justify-content:center;background:var(--blue);padding:6px 12px max(6px,env(safe-area-inset-bottom));border-top:1px solid #325382;min-height:70px}.bottom-nav button{background:none;border:0;color:#d2dff0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:min(50%,240px);min-height:56px;font-size:15px;position:relative}.bottom-nav button[aria-current]{color:var(--yellow)}.bottom-nav button[aria-current]::after{content:'';position:absolute;bottom:0;height:3px;width:72px;background:var(--yellow);border-radius:3px}.bottom-nav svg{width:23px;height:23px}.skip-link{position:fixed;top:8px;left:8px;z-index:100;background:var(--yellow);padding:12px;transform:translateY(-200%)}.skip-link:focus{transform:none}
/* The selected player remains visible above the yellow payment work area. */
.players{display:grid;grid-template-columns:repeat(var(--count,4),minmax(0,1fr));gap:7px;margin-bottom:12px}.players.count-2{--count:2}.players.count-3{--count:3}.players.count-4{--count:4}.players.count-5{--count:5}.player{min-width:0;border:2px solid transparent;border-radius:12px;text-align:left;padding:10px 9px;color:white;background:var(--player);position:relative;min-height:62px}.player[aria-pressed=true]{border-color:var(--yellow);outline:2px solid var(--yellow);outline-offset:1px}.player:hover{filter:brightness(1.08)}.color-blue{--player:#075bc9;--tint:#e2efff}.color-pink{--player:#b52647;--tint:#ffe6ed}.color-green{--player:#147b35;--tint:#dff6e4}.color-orange{--player:#ffda32;--tint:#fff6ca;color:var(--blue)}.color-purple{--player:#7643ac;--tint:#f0e6ff}.color-cyan{--player:#007586;--tint:#dcf6fb}.player-name{display:block;font-size:14px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-balance{display:block;font-size:14px;font-weight:900;font-variant-numeric:tabular-nums;white-space:nowrap;margin-top:2px}.player-dot{display:inline-block;width:9px;height:9px;background:white;border-radius:50%;margin-right:4px;opacity:.85}.lap-button{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;width:100%;padding:9px 14px;margin-bottom:14px;border:1px solid #7c94b8;background:var(--blue);border-radius:12px;color:var(--paper);font-size:14px}.lap-button strong{color:var(--yellow);white-space:nowrap;font-size:16px}.lap-button svg{width:20px;height:20px}.lap-label{display:flex;align-items:center;gap:8px;min-width:0}.lap-label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lap-button:hover{background:var(--blue-hover)}.bank-layout{display:grid;gap:14px}.terminal{background:var(--yellow);padding:16px;border-radius:16px}.operation-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:var(--paper);border-radius:10px;padding:3px;gap:2px;margin-bottom:20px}.operation-tabs button{border:0;background:transparent;color:var(--blue);min-height:40px;border-radius:8px;font-size:15px;padding:6px 2px}.operation-tabs button[aria-pressed=true]{background:var(--blue);color:white}.operation-tabs button:hover:not([aria-pressed=true]){background:#e1e9f4}.participants{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);gap:9px;align-items:end}.participants>svg{width:24px;height:24px;stroke:var(--blue);stroke-width:2.5;fill:none;margin-bottom:12px}.field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:15px;font-weight:800}.field input,.field select,.select-face{width:100%;min-width:0;min-height:44px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--blue);padding:9px 10px;font-size:16px;font-weight:750}.select-face{display:flex;gap:7px;align-items:center}.select-face svg{height:20px;width:20px;stroke:currentColor;fill:none;stroke-width:2}.available{font-size:13px;color:#334773;margin:7px 0 20px;font-weight:600}.amount-label{font-size:16px;font-weight:850;margin-bottom:6px;display:block}.amount-box{display:flex;align-items:center;justify-content:center;gap:9px;background:var(--blue);border-radius:12px;padding:4px 12px;color:white;height:62px;margin-bottom:13px}.amount-box span{font-size:32px;font-weight:850}.amount-box input{background:transparent;border:0;color:white;text-align:center;width:100%;max-width:240px;font-size:40px;font-weight:900;padding:0;outline-offset:0;caret-color:var(--yellow);font-variant-numeric:tabular-nums;min-width:0}.amount-box input::placeholder{color:#cfddf0}.keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.keypad button{border:0;border-radius:10px;background:var(--blue);color:var(--paper);min-height:49px;font-size:26px;font-weight:850;display:flex;align-items:center;justify-content:center}.keypad button:hover,.primary:hover{background:var(--blue-hover)}.keypad button:active{background:#1e5293}.keypad button svg{width:26px;height:26px}.primary{border:0;border-radius:12px;color:white;background:var(--blue);padding:13px 16px;min-height:48px;font-size:16px;font-weight:850;width:100%;display:flex;justify-content:center;align-items:center;gap:10px}.review-button{margin-top:14px}.amount-error{margin:9px 0 0;font-size:14px;font-weight:750;color:#84132a;line-height:1.4}.recent{background:var(--paper);border-radius:16px;overflow:hidden}.recent h2{padding:15px 16px 12px}.recent-list{list-style:none;margin:0;padding:0}.movement{padding:13px 16px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;border-top:1px solid var(--line)}.movement-main{min-width:0}.movement-title{font-size:15px;font-weight:800;display:flex;align-items:center;gap:6px;min-width:0}.movement-title span{overflow-wrap:anywhere}.movement-meta{font-size:12px;color:var(--muted);margin-top:4px;line-height:1.35}.movement-side{text-align:right}.movement-amount{display:block;font-size:18px;font-weight:900;font-variant-numeric:tabular-nums;white-space:nowrap}.movement.reversed .movement-amount{text-decoration:line-through;color:var(--muted)}.secondary{border:1px solid #a9bbd5;border-radius:10px;background:transparent;color:var(--blue);min-height:44px;padding:9px 12px;font-size:14px;font-weight:800}.secondary:hover{background:#e4edf9}.movement .secondary{margin-top:5px;font-size:12px;padding:5px 9px;min-height:36px}.empty-history{padding:0 16px 18px;font-size:14px;color:var(--muted);line-height:1.5}.side-panel{display:flex;flex-direction:column;gap:14px}.history-panel{background:var(--paper);border-radius:16px;padding:18px 0;min-height:240px}.history-heading{padding:0 18px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px}.history-heading p{font-size:13px;color:var(--muted);margin-top:5px}.history-filter{margin:0 18px 18px}.history-filter select{font-size:14px}.history-more{padding:14px 18px 0}.mini-tip{color:#c8d8ee;font-size:13px;line-height:1.5;padding:0 6px}.demo-note{background:var(--yellow);color:var(--blue);padding:10px 14px;border-radius:10px;margin-bottom:12px;font-size:13px;font-weight:800}
/* Starting a real game takes two short steps. */
.setup{max-width:590px;margin:20px auto 0;background:var(--yellow);border-radius:16px;padding:26px 22px}.setup .intro{margin:12px 0 25px;font-size:16px;line-height:1.5;max-width:44ch}.count-options{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0 24px}.count-options button{min-height:72px;border:2px solid #b39924;background:transparent;color:var(--blue);font-size:28px;border-radius:12px}.count-options button[aria-pressed=true]{border-color:var(--blue);background:var(--blue);color:white}.setup-subtitle{font-size:18px;font-weight:800}.setup-hint{font-size:13px;color:#34446b;line-height:1.45;margin:12px 0 20px}.setup-roster{display:flex;flex-direction:column;gap:14px;margin-top:24px}.setup-player{display:grid;grid-template-columns:24px minmax(0,1fr) minmax(90px,.64fr);gap:10px;align-items:center}.avatar{background:var(--player);width:24px;height:24px;border-radius:50%;flex:none}.setup-player .field{font-size:13px}.setup-player input{font-size:16px}.setup-actions{display:flex;gap:10px;margin-top:26px}.setup-actions .secondary{flex:0 0 auto}.setup-actions .primary{flex:1}.welcome-footer{max-width:590px;margin:18px auto 0;color:#c8d8ee;font-size:14px;line-height:1.5;padding:0 8px}.welcome-footer button{color:var(--yellow);border:0;background:none;text-decoration:underline;min-height:44px;padding:0 4px}.storage-problem{background:var(--paper);padding:24px;border-radius:16px;margin-top:20px}.storage-problem p{line-height:1.5;margin:14px 0}.storage-problem button{margin-top:12px}
/* Revision is a protected checkpoint before money moves. */
dialog{border:0;border-radius:16px;padding:24px;max-width:430px;width:calc(100% - 28px);color:var(--blue);background:var(--paper);max-height:calc(100svh - 40px);overflow:auto;box-shadow:0 18px 60px #00000055}dialog::backdrop{background:#001634ad}dialog h2{font-size:24px;margin:0 0 16px}dialog p{line-height:1.5;font-size:15px}dialog .dialog-actions{display:flex;gap:10px;margin-top:22px}dialog .dialog-actions>*{flex:1}.receipt-route{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);gap:10px;align-items:center;margin:22px 0}.receipt-person{background:#e4ecf7;border-radius:12px;padding:14px 10px;min-width:0;overflow-wrap:anywhere}.receipt-person small{display:block;font-size:12px;font-weight:700;color:var(--muted);margin-bottom:5px}.receipt-person strong{font-size:17px}.receipt-route>svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2}.receipt-value{font-size:40px;font-weight:900;text-align:center;font-variant-numeric:tabular-nums;margin:14px 0}.receipt-balances{font-size:14px;color:var(--muted);line-height:1.7}.menu-actions{display:flex;flex-direction:column;gap:10px}.menu-actions button{text-align:left;justify-content:flex-start;font-size:15px}.menu-actions .destructive{color:#9c1b32}.menu-note{font-size:13px!important;color:var(--muted);margin-top:20px}.help-list{padding-left:20px;font-size:15px;line-height:1.65}.help-list li+li{margin-top:9px}.toast{pointer-events:none;position:fixed;z-index:40;bottom:90px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 28px);padding:13px 20px;border-radius:12px;background:var(--paper);color:var(--blue);font-weight:800;font-size:14px;box-shadow:0 8px 30px #00000044;animation:receipt-arrive .22s ease-out}.toast.error{background:#ffe0e5;color:#84132a}@keyframes receipt-arrive{from{transform:translate(-50%,8px)}to{transform:translate(-50%,0)}}
@media(min-width:760px){.app-shell{padding:0 28px 40px}.app-header{padding:28px 0}.brand{font-size:30px}.brand svg{width:40px;height:40px}.bank-layout{grid-template-columns:minmax(340px,440px) minmax(0,1fr);gap:24px;align-items:start}.players{gap:12px;margin-bottom:16px}.player{padding:14px 16px;min-height:76px}.player-name{font-size:17px}.player-balance{font-size:20px}.lap-button{max-width:440px;margin-bottom:20px;min-height:50px}.terminal{padding:22px}.keypad button{min-height:57px}.operation-tabs{margin-bottom:22px}.amount-box{height:72px}.amount-box input{font-size:44px}.bottom-nav{position:static;justify-content:flex-start;padding:0;border:0;margin:20px 0}.bottom-nav button{width:160px;flex-direction:row;gap:9px;min-height:52px;border:1px solid #6482b0;border-radius:12px;margin-right:10px}.bottom-nav button[aria-current]{background:var(--yellow);color:var(--blue);border-color:var(--yellow)}.bottom-nav button[aria-current]::after{display:none}.app-footer{margin-top:24px}.recent h2{font-size:23px}.recent .movement{padding:17px}.recent .empty-history{padding:0 17px 22px}.history-panel{max-width:900px;margin:auto}.history-panel h1{font-size:30px}.setup{margin-top:36px;padding:34px}.toast{bottom:24px}.mini-tip{max-width:40ch}}
@media(max-width:359px){.app-shell{padding-left:8px;padding-right:8px}.brand{font-size:20px;gap:7px}.brand svg{width:28px;height:28px}.app-header{gap:6px}.header-button{padding:8px;font-size:13px}.header-button svg{width:18px;height:18px}.players{gap:5px}.player{padding:9px 5px}.player-name{font-size:12px}.player-balance{font-size:12px}.terminal{padding:12px}.participants{gap:6px;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr)}.participants>svg{width:20px}.field select{padding:8px 6px;font-size:14px}.operation-tabs button{font-size:14px}.setup{padding:22px 16px}.setup-player{grid-template-columns:15px minmax(0,1fr) 95px;gap:7px}.setup-player .avatar{width:15px;height:15px}.count-options{gap:7px}.app-footer{flex-direction:column}.players.count-5{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:360px) and (max-width:759px){.players.count-5 .player-name{font-size:12px}.players.count-5 .player-balance{font-size:11px}.players.count-5 .player{padding:10px 5px}}
@media(max-width:759px){.app-header{padding-top:15px;padding-bottom:14px}.player{min-height:56px;padding-top:7px;padding-bottom:7px}.players{margin-bottom:10px}.lap-button{min-height:44px;margin-bottom:10px}.terminal{padding:14px}.operation-tabs{margin-bottom:13px}.operation-tabs button{min-height:38px}.available{margin-bottom:13px}.amount-box{height:56px;margin-bottom:11px}.keypad{gap:6px}.keypad button{min-height:44px;font-size:24px}.review-button{margin-top:12px;min-height:44px;padding:10px}.recent h2{padding-top:13px;padding-bottom:11px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}


