*{box-sizing:border-box;font-family:Roboto,system-ui,sans-serif;-webkit-tap-highlight-color:transparent}body{margin:0;background:#F5FBF4;color:#181D18}a{color:inherit;text-decoration:none}h2{font-size:30px;font-weight:500;margin:16px 0 0;line-height:1.2}p{margin:0;line-height:1.5;color:#4A5A4C}
.s{max-width:520px;margin:auto;min-height:100dvh;display:flex;flex-direction:column;padding-bottom:96px}.pg{padding:0 16px;flex:1;display:flex;flex-direction:column;gap:12px}
.bar{height:64px;display:flex;align-items:center;gap:4px;font-size:22px;font-weight:500;padding:0 4px}.bar .chip{margin-right:12px}.ib{width:48px;height:48px;border:0;background:none;border-radius:24px;display:flex;align-items:center;justify-content:center;color:inherit;flex:none}
.btn{height:56px;border:0;border-radius:28px;background:#1B6B3A;color:#fff;font:500 16px Roboto,sans-serif;padding:0 24px;display:flex;align-items:center;justify-content:center;gap:8px;flex:1;cursor:pointer}.btn.t{background:#C8EBD0;color:#0B3B1D}.btn.x{background:none;color:#1B6B3A}.btn[disabled]{background:#E3E6E2;color:#6B756C}
.card{background:#fff;border-radius:16px;border:1px solid #D9E2D8}.chip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:8px;background:#C8EBD0;color:#0B3B1D;font-size:14px;font-weight:500;white-space:nowrap}.chip.w{background:#FFE9B8;color:#5B4300}.chip.g{background:#E3E6E2;color:#3F4A41}.chip.s{height:24px;font-size:12px;padding:0 8px}
.lbl{font-size:14px;font-weight:500;color:#4A5A4C}.row{display:flex;align-items:center;gap:12px}.col{display:flex;flex-direction:column;gap:8px}.fl{flex:1}.err{color:#B3261E;font-size:14px;min-height:20px}
.nav{position:fixed;left:0;right:0;bottom:0;height:80px;background:#E8F1E6;display:flex;justify-content:center;align-items:center;gap:4px;z-index:5}.ni{display:flex;flex-direction:column;align-items:center;gap:4px;font:500 12px Roboto;color:#4A5A4C;background:none;border:0;width:84px}.ni i{width:64px;height:32px;border-radius:16px;display:flex;align-items:center;justify-content:center}.ni.on{color:#0B3B1D}.ni.on i{background:#C8EBD0}
.hero{background:#0F4D29;color:#fff;border-radius:24px;padding:20px 24px;display:flex;align-items:center;justify-content:space-between}.hero small{font-size:14px;letter-spacing:2px;text-transform:uppercase;opacity:.85;display:block}.hero b{font-size:56px;font-weight:900;line-height:1;display:block}.par{background:#F2B705;color:#2B2000;border-radius:20px;padding:12px 20px;text-align:center}.par small{font-size:12px;font-weight:700;letter-spacing:2px;opacity:1}.par b{font-size:48px}.par i{display:block;font:500 12px Roboto;margin-top:6px}
.pl{display:flex;align-items:center;padding:12px 16px;gap:8px}.pl .n{font-size:16px;font-weight:500}.pl .t{font-size:14px;color:#4A5A4C;margin-top:2px}.pl .v{width:68px;text-align:center}.pl .v b{font-size:36px;line-height:40px;display:block}.pl .v span{font-size:12px;font-weight:500}.st{width:48px;height:48px;border-radius:24px;border:0;background:#1B6B3A;color:#fff;display:flex;align-items:center;justify-content:center;flex:none}.st.m{background:#C8EBD0;color:#0B3B1D}.st[disabled]{background:#E3E6E2;color:#6B756C}
.boxes{display:flex;gap:8px;position:relative;margin-top:16px}.boxes div{flex:1;height:64px;border-radius:12px;background:#fff;border:1px solid #79867B;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:500}.boxes div.on{border:2px solid #1B6B3A}.boxes input{position:absolute;inset:0;opacity:0;width:100%;font-size:16px}
.av{width:40px;height:40px;border-radius:20px;background:#C8EBD0;color:#0B3B1D;display:flex;align-items:center;justify-content:center;font-weight:500;flex:none}.rad{width:24px;height:24px;border-radius:12px;border:2px solid #5E6D60;display:flex;align-items:center;justify-content:center}.rad.on{border-color:#1B6B3A}.rad.on:after{content:'';width:12px;height:12px;border-radius:6px;background:#1B6B3A}
.th{background:#0F4D29;color:#fff;font-size:12px;font-weight:500;height:30px;text-align:center}.tp{background:#F0F4EF;color:#4A5A4C;font-size:12px;height:26px;text-align:center}.tr{border-top:1px solid #E3EBE1;text-align:center;font-size:13px}.tr>div:first-child,.th>div:first-child,.tp>div:first-child{text-align:left;padding-left:8px;font-weight:500}.tr>div[data-h]{height:34px;display:flex;align-items:center;justify-content:center}.tr>div.sel{background:#FFF6D6;box-shadow:inset 0 0 0 2px #1B6B3A}
.cb{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.bi{border:1.5px solid #1B6B3A;border-radius:12px;color:#1B6B3A;font-weight:700}.bo{border:1.5px solid #4A5A4C;border-radius:3px}.db{background:#3A1F1C;color:#fff;border-radius:3px;font-weight:700}.em{border:1.5px dashed #B5C0B4;border-radius:4px}.su{border-bottom:3px solid #F2B705}
.tb{display:flex;border-bottom:1px solid #D9E2D8}.tb a{flex:1;height:48px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:14px;font-weight:500;color:#4A5A4C}.tb a.on{color:#1B6B3A;box-shadow:inset 0 -3px 0 #1B6B3A}.tb a.off{color:#7A877C}
.r{display:flex;align-items:center;gap:8px;min-height:56px;padding:6px 16px;border-bottom:1px solid #E3EBE1}.r.hd{min-height:36px;font-size:12px;font-weight:500;color:#4A5A4C;border-bottom:1px solid #C4CEC3}.r .c{width:48px;text-align:center;flex:none}.p{width:28px;height:28px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:500;flex:none;color:#4A5A4C}.p.g1{background:#F2B705;color:#2B2000}.p.g2{background:#D8DEE3;color:#1F2A21}
.sp{background:#0F4D29;color:#fff;align-items:center;overflow:hidden;position:relative;padding:0}.sp .bg{position:absolute;left:-90px;bottom:-230px;width:570px;height:570px;border-radius:50%;background:#1B6B3A;animation:drift 7s ease-in-out infinite}.sp .top{margin-top:56px;display:flex;flex-direction:column;align-items:center;gap:12px;position:relative}.sp img{width:232px;height:232px}.sp .g{font-size:56px;font-weight:900;letter-spacing:8px;line-height:1}.sp .rule{height:2px;width:48px;background:#F2B705;margin:4px 0}.sp .by{font-size:14px;letter-spacing:3px;text-transform:uppercase;color:#F2B705;font-weight:500}.sp .bot{position:absolute;left:24px;right:24px;bottom:40px;display:flex;flex-direction:column;gap:16px}.sp .info{border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:12px;font-size:16px;background:#0F4D29}.sp .info div{display:flex;gap:12px;align-items:center}.sp .btn{background:#fff;color:#0F4D29;flex:none}
@keyframes pop{from{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}@keyframes up{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}@keyframes grow{from{width:0}to{width:48px}}@keyframes drift{50%{transform:translateY(-14px)}}
.a1{animation:pop .9s cubic-bezier(.2,.8,.2,1) both}.a2{animation:up .7s .5s both}.sp .rule{animation:grow .6s 1s both}.a3{animation:up .7s 1.1s both}.a4{animation:up .8s 1.5s both}@media(prefers-reduced-motion:reduce){*{animation:none!important}}
.ov{position:fixed;inset:0;background:#00000073;display:flex;align-items:center;justify-content:center;padding:24px;z-index:9}.dlg{background:#F5FBF4;border-radius:28px;padding:24px;width:100%;max-width:400px;display:flex;flex-direction:column;gap:16px}
.fld{position:relative;display:block}.fld span{position:absolute;top:-9px;left:12px;background:#F5FBF4;padding:0 4px;font-size:12px;color:#4A5A4C}.fld input,.fld textarea,.in{width:100%;height:56px;border:1px solid #79867B;border-radius:4px;padding:0 16px;font-size:16px;background:transparent}.fld textarea{height:110px;padding:12px 16px}
.kp{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.kp button{height:56px;border:0;border-radius:16px;background:#E3EBE1;font-size:22px;font-weight:500;display:flex;align-items:center;justify-content:center}.kp button.p2{background:#C8EBD0;color:#0B3B1D}.kp button[disabled]{background:#EEF1ED;color:#B5BDB4}
.pad{position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid #D9E2D8;border-radius:24px 24px 0 0;padding:12px 16px 16px;z-index:5}.pad>div{max-width:520px;margin:0 auto;display:flex;flex-direction:column;gap:10px}
.chips{display:flex;gap:8px;flex-wrap:wrap}.fc{height:32px;border:1px solid #79867B;border-radius:8px;padding:0 12px;background:none;font:500 14px Roboto;display:flex;align-items:center}.fc.on{background:#C8EBD0;border-color:#C8EBD0}
.hg{display:grid;grid-template-columns:repeat(9,1fr);gap:4px}.hg button{height:56px;border-radius:10px;background:#fff;border:2px solid #B5C0B4;display:flex;flex-direction:column;align-items:center;justify-content:center;font:500 16px Roboto;padding:0}.hg button i{font-style:normal;font-size:11px;opacity:.85}.hg button.on{background:#1B6B3A;color:#fff;border-color:#1B6B3A}
.tl{flex:1;border-radius:12px;padding:10px;text-align:center;background:#FFF1D0;color:#8A5A00}.tl.ok{background:#E8F5EA;color:#1B6B3A}.tl b{font-size:24px;display:block}
.nav .ni{width:auto;flex:1;max-width:84px;min-width:0}
.chip.s{min-height:0;max-width:none;margin:0;flex-direction:row;padding-bottom:0}
/* Scoring screen: fit one phone screen, no scrolling */
.s.play{height:100dvh;min-height:0;padding-bottom:80px;overflow:hidden}
.play .bar{height:clamp(48px,7dvh,64px);flex:none}
.play .pg{gap:clamp(6px,1.1dvh,12px);min-height:0;padding-bottom:clamp(8px,1.4dvh,16px)}
.play .hero{flex:none;padding:clamp(8px,1.6dvh,20px) 20px;border-radius:20px}
.play .hero b{font-size:clamp(34px,6.5dvh,56px)}
.play .hero small{font-size:12px}
.play .hero div[style]{margin-top:clamp(2px,.8dvh,8px)!important;font-size:13px!important}
.play .par{padding:clamp(5px,1.1dvh,12px) 16px}
.play .par b{font-size:clamp(28px,5.2dvh,48px)}
.play .par i{margin-top:2px}
.play .col{flex:1 1 0;min-height:0;gap:clamp(4px,.9dvh,8px);overflow-y:auto}
.play .pl{flex:1 1 0;min-height:52px;max-height:112px;padding:4px 12px}
.play .pl .v b{font-size:clamp(26px,4.4dvh,36px);line-height:1.1}
.play .st{width:clamp(42px,6dvh,48px);height:clamp(42px,6dvh,48px)}
.play .pg>.lbl{font-size:12px;flex:none}
.play #sy:empty{display:none}
.play .pg>.row{margin-top:0!important;flex:none}
.play .pg>.row .btn{height:clamp(46px,6.5dvh,56px)}
.play .card[style*=FFF1D0]{flex:none;padding:8px 12px!important;font-size:13px!important}
.play .pl .v{width:auto;min-width:64px}
.play .pl .v span{white-space:nowrap;font-size:11px;display:block;line-height:1.2}
.play .pl .t{margin-top:0}
@media(max-height:620px){.play~.nav{height:64px}.s.play{padding-bottom:64px}.play .ni{gap:2px}.play~.nav .ni i{height:28px}.play .pg>.lbl:not(#sy){display:none}}
.play~.nav{height:calc(80px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}
.s.play{padding-bottom:calc(80px + env(safe-area-inset-bottom))}
@media(max-height:620px){.play~.nav{height:calc(64px + env(safe-area-inset-bottom))}.s.play{padding-bottom:calc(64px + env(safe-area-inset-bottom))}}
.clr{border:0;background:none;padding:2px 0;color:#B3261E;font:500 14px Roboto,sans-serif;text-decoration:underline;cursor:pointer}
.kp button.clr2{font-size:14px;gap:4px;color:#B3261E}
html,body,button,a,input{touch-action:manipulation}
/* Stable scoring rows: nothing changes size when a score changes */
.play .pl .v{width:84px;min-width:84px;flex:none}
.play .pl .v b{font-variant-numeric:tabular-nums}
.play .pl .t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.play .pl .n{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.clr[hidden]{display:none}
/* Offline status pill floats above content; never moves the layout */
.sync{position:fixed;left:50%;bottom:calc(150px + env(safe-area-inset-bottom));transform:translate(-50%,8px);background:#3A2A00;color:#FFE9A8;font:500 13px Roboto,sans-serif;padding:8px 14px;border-radius:18px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:6}
.sync.on{opacity:1;transform:translate(-50%,0)}
/* App feel */
html,body{overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea{-webkit-user-select:text;user-select:text}
button,a,.btn{-webkit-user-select:none;user-select:none;outline:none}
.st,.btn,.kp button,.ni,.ib,.clr{transition:transform .08s ease,filter .08s ease}
.st:active:not([disabled]),.btn:active:not([disabled]),.kp button:active:not([disabled]),.ib:active{transform:scale(.93);filter:brightness(.92)}
.ni:active i{transform:scale(.92)}
.s.play{position:fixed;inset:0;margin:0 auto;width:100%}
.p{min-width:28px;width:auto;padding:0 4px}
.pl.ns{background:#F0F4EF;border-style:dashed}
.pl.ns .n{color:#4A5A4C}
.clr.ns{color:#8A5A00}
.r.out{color:#6B756C;background:#F7F9F6}.r.out b{color:#6B756C}
.cath{background:#0F4D29;color:#fff;font:500 12px Roboto,sans-serif;letter-spacing:1px;padding:8px 16px;margin-top:12px;border-radius:8px 8px 0 0}
.prow:active{background:#F0F4EF}
