:root{color-scheme:dark;--ink:#f3ead8;--muted:#a9b4a8;--gold:#dfbd79;--green:#143c32;--line:#ffffff20;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:#0c1b19;color:var(--ink)}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 65% 20%,#24473955,transparent 65%),#0c1b19;min-height:100svh}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.35}button:focus-visible,a:focus-visible{outline:3px solid #f1ce82;outline-offset:4px}[hidden]{display:none!important}.app{max-width:1260px;margin:auto;padding:24px 36px 15px}header{display:flex;align-items:center;gap:12px;padding-bottom:18px;border-bottom:1px solid var(--line)}.brand{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--gold);letter-spacing:3px;font-size:15px;font-weight:800}.brand small{display:block;font-size:7px;letter-spacing:3px;margin-top:4px}.brand-icon{display:grid;place-items:center;border:1px solid #dfbd7960;border-radius:50%;width:38px;height:38px;font-size:29px}.private{font-size:8px;letter-spacing:2px;color:var(--muted);margin-left:auto}.icon-button{width:34px;height:34px;border:1px solid var(--line);border-radius:50%;background:#ffffff05;font-size:17px}.layout{display:grid;grid-template-columns:minmax(250px,340px) minmax(0,1fr);gap:46px;margin-top:30px}.eyebrow{font-size:8px;letter-spacing:2px;font-weight:750;color:var(--gold)}h1{font-size:clamp(37px,4.7vw,60px);line-height:.98;letter-spacing:-2px;margin:14px 0 15px;font-weight:850}h1 em{color:var(--gold);font-style:normal}.intro{font-size:13px;line-height:1.7;color:var(--muted);margin-bottom:23px}.portrait{height:330px;border-radius:160px 160px 12px 12px;position:relative;overflow:hidden;background:#1d2923;border:1px solid #e3bf7040}.portrait img{width:100%;height:100%;object-fit:cover;object-position:30% 8%;transform:scale(1.08);transition:transform .5s}.portrait-shade{position:absolute;inset:0;background:linear-gradient(transparent 40%,#07120af0)}blockquote{position:absolute;bottom:17px;left:21px;right:15px;margin:0;font-family:Georgia,serif;font-size:21px;font-style:italic}blockquote small{display:block;font:7px -apple-system,sans-serif;letter-spacing:2px;color:var(--gold);margin-top:10px}.story-bottom{margin-top:17px;display:flex;align-items:center;justify-content:space-between;gap:8px}.story-bottom>span{font-size:7px;letter-spacing:1px;color:var(--muted)}.text-button{background:none;border:0;color:var(--gold);font-size:10px;padding:6px 0}.match-top{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:8px;font-weight:750;letter-spacing:1.5px;margin-bottom:15px}#pressure{color:var(--gold)}.bankrolls{display:grid;grid-template-columns:1fr 24px 1fr;align-items:center;gap:9px;margin-bottom:17px}.bank{display:flex;align-items:center;gap:10px;position:relative}.bank small{font-size:8px;letter-spacing:1.2px;color:var(--muted);display:block;margin-bottom:4px}.bank strong{font-size:25px;font-variant-numeric:tabular-nums;font-weight:750}.bank strong span{font-size:11px;font-weight:400;color:var(--muted)}.versus{font-size:8px;letter-spacing:1px;color:#61796c;text-align:center}.avatar{width:44px;height:50px;flex:none;border-radius:16px 16px 10px 10px;background-image:url('assets/nico-house.webp');background-size:132px auto;border:1px solid #e3bf7040}.avatar.nico{background-position:18% 28%}.avatar.bear{background-position:100% 9%}.chip-dots{margin-left:auto;display:flex;gap:3px;max-width:42px;flex-wrap:wrap;align-content:center}.chip-dots i{width:10px;height:10px;background:#e4c27d;border:2px dashed #735e37;border-radius:50%}.chip-dots i.empty{background:none;border:1px solid #44544a}.table{position:relative;background:radial-gradient(ellipse at 50% 40%,#235e4c,#123c32 70%);border:9px solid #41352a;box-shadow:0 0 0 1px #b89a5850,inset 0 0 0 2px #bd995230,inset 0 0 60px #071c1870,0 22px 35px #0003;border-radius:120px 120px 35px 35px;padding:22px 32px 12px;min-height:344px;isolation:isolate;overflow:hidden}.table:before{content:'';position:absolute;inset:0;opacity:.07;pointer-events:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='1' cy='1' r='.6' fill='white'/%3E%3C/svg%3E");z-index:-1}.table-ring{position:absolute;inset:14px;border:1px solid #e0c47a38;border-radius:100px 100px 25px 25px;pointer-events:none;z-index:-1}.hand{position:relative;max-width:460px;margin:auto}.hand-heading{display:flex;align-items:center;justify-content:center;gap:9px;font-size:8px;letter-spacing:1.5px;color:#b9cfba;font-weight:650;margin:0 0 10px;min-height:24px}.hand.player .hand-heading{margin:10px 0 0}.total{font-size:14px;letter-spacing:0;background:#102e2780;border:1px solid #b5d5ad33;border-radius:6px;padding:3px 7px;color:#fff4d9;min-width:30px;text-align:center}.total.bust{background:#a64638;color:#fff}.cards{display:flex;justify-content:center;min-height:85px;padding-right:0}.card{width:61px;height:85px;background:#f5edda;color:#1e3331;border-radius:7px;border:1px solid #fff3;box-shadow:0 4px 7px #0003;position:relative;flex:none;animation:deal .22s ease-out both;transform:rotate(var(--angle,0deg));margin-left:-15px}.card:first-child{margin-left:0}.card.red{color:#b34c3c}.card b{position:absolute;top:5px;left:7px;font-family:Georgia,serif;font-size:20px;line-height:1;font-weight:700}.card b small{display:block;font-size:13px;text-align:center;margin-top:2px}.card .suit{position:absolute;inset:0;display:grid;place-items:center;font-size:31px;padding-top:10px}.card .corner{position:absolute;bottom:5px;right:6px;font-size:11px;transform:rotate(180deg)}.card.back{background:repeating-linear-gradient(45deg,#2f4944 0 3px,#29403b 3px 6px);border:4px solid #e0d7bf;box-shadow:0 4px 7px #0004}.card.back:before{content:'♠';display:grid;place-items:center;position:absolute;inset:7px;border:1px solid #d7bb7a77;color:#d7bb7a;font-size:29px;border-radius:20px}.card.placeholder{border:1px dashed #c6d4a730;background:#163d3260;box-shadow:none;animation:none}.table-center{text-align:center;min-height:70px;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:5px;padding:10px 0}.table-logo{font-size:18px;letter-spacing:6px;color:#e3c47a6b;font-weight:850}.stake{font-size:8px;letter-spacing:1px;color:#b4c4a8}#result-badge{font-size:11px;font-weight:800;color:#f1d698;letter-spacing:1px}.table-rules{text-align:center;font-size:6px;letter-spacing:1.3px;color:#a9bd9c99;margin-top:12px}.action-panel{margin-top:21px}.status-line{min-height:55px;text-align:center}h2{font-size:23px;letter-spacing:-.6px;margin:0 0 6px}.status-line p{font-size:12px;line-height:1.5;color:var(--muted);margin:0}.actions{display:flex;justify-content:center;gap:9px;margin-top:15px;min-height:51px}.actions button{border:1px solid #d4bc7a55;border-radius:11px;background:#1c332b;font-size:16px;font-weight:750;flex:1;padding:11px 8px;min-width:0}.actions small{display:block;font-size:8px;letter-spacing:.2px;font-weight:400;color:#b6c4b5;margin-top:4px}.primary,.actions .primary{background:var(--gold);color:#172d24;border:0;border-radius:10px;padding:15px 23px;font-size:14px;font-weight:800}.primary:hover{background:#edcf92}.actions .primary{max-width:340px}.primary span{margin-left:40px}.actions button:not(.primary):hover:enabled{background:#2a493b}.history{display:flex;gap:7px;justify-content:center;flex-wrap:wrap;margin-top:13px;min-height:19px}.history span{border:1px solid #ffffff14;border-radius:5px;padding:4px 7px;color:var(--muted);font-size:8px}.history .win{color:#deca8b;border-color:#dfbd7935}.history .loss{color:#dc9082}footer{display:flex;justify-content:space-between;margin-top:17px;border-top:1px solid var(--line);padding-top:12px;font-size:7px;letter-spacing:1px;color:#829185}body.clutch #pressure{color:#f2b19a}body.clutch .table{box-shadow:0 0 0 1px #d0a85a66,inset 0 0 55px #71302140,0 22px 35px #0003}body.won .portrait img{transform:scale(1.02)}body.lost .portrait img{transform:scale(1.12)}dialog{color:var(--ink);background:#142b24;border:1px solid #d2b57550;border-radius:20px;width:min(440px,calc(100vw - 30px));padding:0;max-height:90svh;box-shadow:0 20px 80px #0007}dialog::backdrop{background:#020c09bb;backdrop-filter:blur(7px)}.modal-inner{padding:30px}.modal-inner h2{font-size:30px;margin:12px 0}.modal-inner p,.modal-inner li{font-size:13px;color:#bfccb9;line-height:1.65}.modal-inner ol{padding-left:20px}.modal-inner li{margin-bottom:7px}.modal-inner .fine{font-size:10px;color:#9eae9a}.modal-inner .primary{width:100%;margin-top:13px}.modal-inner label{display:flex;justify-content:space-between;font-size:12px;margin:20px 0 9px}.modal-inner input[type=range]{width:100%;accent-color:var(--gold)}.modal-inner .checkbox{justify-content:start;align-items:center;gap:10px;font-size:11px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}@keyframes deal{from{opacity:0;translate:0 -15px}to{opacity:1;translate:0 0}}
@media(max-width:900px){.app{padding:18px 22px}.layout{gap:25px;grid-template-columns:245px minmax(0,1fr)}.table{padding-left:15px;padding-right:15px}.chip-dots{display:none}.portrait{height:320px}h1{font-size:43px}.bankrolls{gap:4px}.bank{gap:7px}.bank strong{font-size:22px}.avatar{width:37px;height:44px}}
@media(max-width:680px){.app{padding:13px 16px 18px;max-width:480px}header{padding-bottom:12px;gap:9px}.brand{font-size:12px;letter-spacing:2px}.brand small{font-size:6px}.brand-icon{width:29px;height:29px;font-size:23px}.private{font-size:6px;letter-spacing:.8px}.icon-button{width:29px;height:29px;font-size:15px}.layout{display:block;margin-top:19px}.story{position:relative;padding-right:100px;min-height:98px;margin-bottom:18px}.story .eyebrow{font-size:6px;letter-spacing:1px}h1{font-size:35px;margin:9px 0 0;line-height:.95;letter-spacing:-1.5px}.intro,.story-bottom>span{display:none}.portrait{position:absolute;right:0;top:0;width:85px;height:102px;border-radius:45px 45px 9px 9px}.portrait img{object-position:25% 0%;transform:scale(1)}.portrait-shade,blockquote{display:none}.story-bottom{margin:7px 0 0}.text-button{font-size:9px}.match-top{font-size:7px;letter-spacing:1px;margin-bottom:12px}.bankrolls{margin-bottom:12px}.bank small{font-size:7px}.bank strong{font-size:22px}.avatar{width:33px;height:39px;background-size:122px auto}.table{border-width:7px;padding:16px 12px 9px;border-radius:85px 85px 25px 25px;min-height:310px}.table-ring{inset:9px;border-radius:80px 80px 18px 18px}.card{width:55px;height:77px;margin-left:-19px}.cards{min-height:77px}.card b{font-size:18px}.card .suit{font-size:28px}.hand-heading{margin-bottom:6px;min-height:22px;font-size:7px}.hand.player .hand-heading{margin-top:7px}.table-center{min-height:57px;padding:7px 0}.table-logo{font-size:15px}.stake{font-size:7px}.table-rules{font-size:5px;margin-top:9px;letter-spacing:.8px}.action-panel{margin-top:17px}.status-line{min-height:51px}h2{font-size:21px}.status-line p{font-size:11px}.actions{margin-top:10px;gap:7px}.actions button{font-size:14px;padding:10px 6px}.actions small{font-size:7px}.history{margin-top:10px}footer{margin-top:10px;font-size:6px}.modal-inner{padding:23px}.modal-inner h2{font-size:27px}}
@media(max-width:360px){.app{padding:10px 12px}.private{display:none}header .brand{margin-right:auto}.story{margin-top:-3px;margin-bottom:12px}h1{font-size:31px}.table{min-height:290px;padding-top:13px}.card{width:49px;height:69px}.cards{min-height:69px}.table-center{min-height:53px}.bankrolls{margin-bottom:10px}.status-line p{font-size:10px}.actions small{font-size:6.5px}.actions{margin-top:8px}.action-panel{margin-top:14px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}dialog::backdrop{backdrop-filter:none}}
.card{animation:none}.card.enter{animation:deal .22s ease-out both}

@media(min-width:681px) and (max-height:800px){.app{padding-top:16px}.layout{margin-top:20px}.table{min-height:320px;padding-top:15px;padding-bottom:9px}.table-center{min-height:58px}.portrait{height:300px}.intro{margin-bottom:16px}.action-panel{margin-top:15px}.actions{margin-top:10px}.history{margin-top:10px}footer{margin-top:10px}}
/* Character stage and split hands. */
.brand-icon{border-color:#dfbd7933;width:35px;height:35px}.brand-icon img{display:block;width:18px;height:25px}.story>blockquote{display:none}.nico-stage{height:300px;position:relative;overflow:hidden;border-radius:140px 140px 12px 12px;border:1px solid #dabc6c33;background:radial-gradient(ellipse at 40% 25%,#3c4e3955,transparent 60%),linear-gradient(90deg,#182c25,#0c1916);isolation:isolate}.nico-stage:after{content:'';position:absolute;bottom:27px;left:0;right:0;height:1px;background:#c9ac6329;z-index:-1}.stage-light{position:absolute;left:15%;top:0;width:70%;height:80%;background:linear-gradient(#d6b46516,transparent);clip-path:polygon(40% 0,60% 0,100% 100%,0 100%)}.exit-door{position:absolute;right:10px;bottom:28px;width:47px;height:140px;border:1px solid #94764755;border-radius:4px 4px 0 0;background:#091410;opacity:.45}.exit-door span{position:absolute;top:-20px;width:100%;font-size:7px;letter-spacing:3px;text-align:center;color:#c5b87d}.nico-actor{position:absolute;width:180px;height:270px;left:15%;bottom:21px;z-index:2;transform-origin:bottom center}.nico-sprite{width:100%;height:100%;background-image:url('assets/nico-reactions-v2.webp');background-size:400% 200%;background-position:0 0;background-repeat:no-repeat}.reaction-caption{position:absolute;bottom:7px;width:100%;text-align:center;font-size:10px;font-style:italic;color:#cfc2a1;z-index:4;padding:0 8px}.nico-stage[data-mood=win] .nico-sprite{background-position:33.333333% 0}.nico-stage[data-mood=loss] .nico-sprite{background-position:66.666667% 0}.nico-stage[data-mood=nervous] .nico-sprite{background-position:100% 0}.nico-stage[data-mood=win] .nico-actor{animation:celebrate .65s ease-out 2}.nico-stage[data-mood=loss] .nico-actor{animation:disbelief .5s ease-in-out 2}.nico-stage[data-mood=nervous] .nico-actor{animation:worry 1.2s ease-in-out infinite}.nico-stage[data-mood=walking] .nico-actor{animation:walk-away 3.1s linear forwards}.nico-stage[data-mood=walking] .nico-sprite{background-image:url('assets/nico-reactions-v2.webp');background-size:200% 200%;animation:walking-frames .68s steps(1,end) infinite}.nico-stage[data-mood=walking] .exit-door{background:#dfbd7940;box-shadow:0 0 25px #d4ac5930;opacity:1}.nico-stage[data-mood=gone] .nico-actor{visibility:hidden}.nico-stage[data-mood=gone] .exit-door{opacity:1}#exit-dialog{width:min(450px,calc(100vw - 24px))}#exit-dialog .nico-stage{height:280px;border-radius:14px;margin:15px 0}#exit-dialog .nico-actor{left:8%;width:166px;height:249px}.motion-paused .nico-actor,.motion-paused .nico-sprite{animation-play-state:paused!important}@keyframes celebrate{0%,100%{translate:0 0}35%{translate:0 -9px;rotate:-2deg}70%{rotate:2deg}}@keyframes disbelief{0%,100%{rotate:0deg}25%{rotate:-3deg}75%{rotate:3deg}}@keyframes worry{50%{translate:0 -2px;rotate:1deg}}@keyframes walk-away{0%{transform:translateX(0)}100%{transform:translateX(var(--walk-distance,350px))}}@keyframes walking-frames{0%{background-position:0 0}25%{background-position:100% 0}50%{background-position:0 100%}75%,100%{background-position:100% 100%}}
#split-hands{display:grid;grid-template-columns:1fr 1fr;gap:12px}.split-hand{border:1px solid #d1be7c22;border-radius:11px;padding:7px;min-width:0;background:#0c2f2644}.split-hand.active{border-color:#e7c986;box-shadow:0 0 0 1px #e7c98666;background:#e7c9860c}.split-label{font-size:7px;letter-spacing:1px;text-align:center;color:#c7b68a;margin-bottom:7px}.split-total{font-size:11px;text-align:center;font-weight:700;margin-top:7px;min-height:13px}.split-hand .card{width:49px;height:69px}.split-hand .cards{min-height:69px}.action-help{font-size:10px;text-align:center;color:#a9b4a8;line-height:1.4;min-height:14px;margin:8px 0 0}.actions{gap:7px}.actions small{font-size:7px}#replay-exit{display:block;margin:5px auto 0}
@media(max-width:680px){.story>.nico-stage{position:absolute;right:0;top:-7px;width:94px;height:116px;border-radius:44px 44px 9px 9px}.story>.nico-stage .nico-actor{width:72px;height:108px;left:7px;bottom:4px}.story>.nico-stage .exit-door{width:18px;height:61px;bottom:8px;right:4px}.story>.nico-stage .exit-door span,.story>.nico-stage .reaction-caption{display:none}.story>.nico-stage:after{bottom:8px}.actions button{font-size:12px}.actions small{font-size:6px}.action-help{font-size:9px}.split-hand .card{width:43px;height:61px}.split-hand .cards{min-height:61px}.split-hand .card b{font-size:16px}.split-hand .card .suit{font-size:24px}.split-hand{padding:5px}.split-label{font-size:6px}.brand-icon{width:29px;height:29px}.brand-icon img{width:15px;height:21px}#split-hands{gap:8px}}
@media(prefers-reduced-motion:reduce){.nico-actor,.nico-sprite{animation:none!important}.nico-stage[data-mood=walking] .nico-actor{transform:translateX(var(--walk-distance,350px))}}
.nico-stage[data-mood=walking] .nico-sprite{width:150%;margin-left:-25%}
/* Final casino-reference sheet: 1536x1024, four columns and two rows. */
.nico-actor{width:202.5px;height:270px}#exit-dialog .nico-actor{width:186px;height:248px}.nico-stage[data-mood=walking] .nico-sprite{width:100%;margin-left:0;background-image:url('assets/nico-reactions-v2.webp');background-size:400% 200%;animation:walking-faithful .68s steps(1,end) infinite}@keyframes walking-faithful{0%{background-position:0 100%}25%{background-position:33.333333% 100%}50%{background-position:66.666667% 100%}75%,100%{background-position:100% 100%}}@media(max-width:680px){.story>.nico-stage .nico-actor{width:72px;height:96px}}
/* Walking poses extend beyond the nominal grid cell. Include each full stride,
   and clip the transparent left gutter so the previous pose's toe cannot bleed in. */
.nico-stage[data-mood=walking] .nico-sprite{width:116.666667%;margin-left:-8.333333%;background-size:342.857143% 200%;clip-path:inset(0 0 0 18%)}
@keyframes walking-frames{0%{background-position:-2.941176% 100%;clip-path:inset(0 0 0 18%)}25%{background-position:32.352941% 100%;clip-path:inset(0 0 0 30%)}50%{background-position:67.647059% 100%;clip-path:inset(0 0 0 18%)}75%,100%{background-position:102.941176% 100%;clip-path:inset(0 0 0 30%)}}

.nico-stage[data-mood=walking] .nico-sprite{animation-name:walking-frames}

/* Mobile portraits keep the whole head inside the avatar instead of inheriting the desktop zoom. */
@media(max-width:680px){.avatar{width:42px;height:48px;background-size:90px auto;background-repeat:no-repeat;background-color:#172b24;border-radius:12px}.avatar.nico{background-position:10% 23%}.avatar.bear{background-position:110% 6%}}
