:root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#292b26;background:#f7f6f0;font-synthesis:none;--paper:#f7f6f0;--line:#e4e4d9;--red:#c94a34;--muted:#919285;--green:#637d50}*{box-sizing:border-box}body{margin:0}button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.35}button:focus-visible,summary:focus-visible{outline:3px solid #b8bd87;outline-offset:4px}button img{pointer-events:none}button{touch-action:manipulation}h1,h2,p{margin:0}img{display:block;max-width:100%}.chip{width:32px;height:auto;object-fit:contain}.screen,.home{width:min(100%,780px);margin:auto;padding:0 28px;min-height:100dvh}.topbar{height:89px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:9px;border:0;background:none;font-size:18px;font-weight:800;padding:0;letter-spacing:-.4px}.brand .chip{width:27px;transform:rotate(-15deg)}.brand-dot{color:var(--red);margin-left:2px}.text-button{border:0;background:none;padding:8px 0;font-size:12px;color:#858779;min-height:36px}.eyebrow{font-size:10px;letter-spacing:2px;color:#a49c80;font-weight:600}.home{display:flex;flex-direction:column}.home .topbar{border:0}.welcome{flex:1;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:35px 0 65px}.welcome-chips{display:flex;align-items:center;justify-content:center;height:105px;margin-bottom:31px}.welcome-chips .chip{width:58px;transform:rotate(-25deg);margin:0 -4px}.welcome-chips .chip:nth-child(2){width:76px;transform:translateY(-10px) rotate(7deg);z-index:1}.welcome-chips .chip:last-child{transform:rotate(25deg)}.welcome h1{font-size:43px;line-height:1.4;letter-spacing:-2px;font-weight:750;margin:15px 0 32px}.start-button{border:0;background:var(--red);color:#fff9ed;width:242px;height:78px;border-radius:18px;font-size:23px;font-weight:650;box-shadow:0 8px 20px #c94a341a;text-align:left;padding:0 30px}.start-button span{float:right;font-size:28px;font-weight:300}.welcome-note{font-size:11px;color:var(--muted);margin-top:24px}.home-footer{display:flex;justify-content:space-between;padding:20px 0 26px;font-size:10px;color:#a2a38f}.heading{margin:28px 0 24px}.heading h1{font-size:27px;font-weight:700;letter-spacing:-.9px;margin-top:10px}.pick-count{font-size:12px;color:#959687}.pick-count b{font-size:20px;color:var(--red);margin-left:5px}.category-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;border-bottom:1px solid var(--line)}.category-tabs button{border:0;background:none;padding:0 3px 14px;font-size:11px;color:#969787;position:relative}.category-tabs button>span{display:block;font-size:10px;letter-spacing:1px;margin-bottom:7px}.category-tabs small{font-size:9px;margin-left:4px;color:#b5b6a7}.category-tabs button.active{color:var(--red);font-weight:650}.category-tabs .active:after{position:absolute;content:"";height:2px;background:var(--red);bottom:-1px;left:10%;right:10%}.category-title{display:flex;justify-content:space-between;align-items:center;margin:20px 0 14px}.category-title h2{font-size:13px;font-weight:600}.category-title>span{font-size:10px;color:#a4a591}.catalog-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px 13px}.catalog-card{padding:0;border:0;background:none;border-radius:8px;position:relative;box-shadow:0 2px 3px #3d41230a;outline:2px solid transparent;outline-offset:2px}.card-image{width:100%;height:auto;aspect-ratio:200/280;object-fit:contain;border-radius:7px}.catalog-card.chosen{outline-color:var(--green)}.catalog-card .check{position:absolute;right:5px;bottom:5px;display:grid;place-items:center;background:#fffdf1e8;color:#8b9275;border-radius:50%;width:24px;height:24px;font-size:18px;box-shadow:0 1px 4px #0001}.catalog-card.chosen .check{background:var(--green);color:white;font-size:13px}.page-nav{display:flex;align-items:center;justify-content:space-between;margin:17px 0 25px}.page-nav button{background:none;border:0;padding:10px 0;font-size:11px;color:#929580;min-height:40px}.page-nav>span{display:flex;gap:5px}.page-nav i{width:4px;height:4px;border-radius:50%;background:#d1d4c2}.page-nav i.active{background:var(--red);width:12px;border-radius:4px}.picker-screen{padding-bottom:230px}.picked-dock{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,780px);padding:15px 28px max(20px,env(safe-area-inset-bottom));background:#f7f6f0f7;backdrop-filter:blur(12px);border-top:1px solid var(--line);z-index:5}.picked-label{display:flex;justify-content:space-between;align-items:center;font-size:11px;margin-bottom:12px}.picked-label b{font-weight:500;margin-left:6px;color:#93967e}.picked-label small{font-size:9px;color:#9ca087}.picked-row{display:flex;gap:9px;margin-bottom:15px}.picked-row>button,.empty-slot{width:calc((100% - 45px)/6);max-width:66px;aspect-ratio:200/280;position:relative;border:0;padding:0;background:none;border-radius:4px}.picked-row>button span{position:absolute;right:-3px;top:-3px;background:#fffaf0;color:#796b59;border-radius:50%;width:17px;height:17px;display:grid;place-items:center;font-size:12px;border:1px solid #dedbc7}.empty-slot{border:1px dashed #d8dacb;display:grid;place-items:center;color:#c7cbb9;font-size:16px}.primary{border:0;border-radius:11px;background:var(--red);color:#fffaf0;padding:17px 22px;font-size:14px;font-weight:600;min-height:52px}.primary:hover:not(:disabled){background:#b7402b}.primary span{float:right;font-weight:400}.primary:disabled{background:#dbd8c8;color:#939283;opacity:1}.wide{width:100%}.progress-panel{margin-top:22px;border:1px solid var(--line);border-radius:13px;padding:17px 20px 0;background:#fcfbf6}.progress-caption{display:flex;justify-content:space-between;font-size:10px;color:#9b9e8a;margin-bottom:18px}.progress-caption>span:first-child{color:#6a705e}.steps{display:flex;position:relative}.steps:before{content:"";position:absolute;left:12%;right:12%;height:1px;background:#dedfcf;top:14px}.step{display:flex;flex-direction:column;align-items:center;gap:9px;width:25%;border:0;background:none;position:relative;color:#a1a58f;font-size:10px;padding:0 0 14px}.step-circle{width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:#fcfbf6;border:1px solid #dbdecd;font-size:12px;position:relative}.step.current .step-circle{background:var(--red);color:white;border-color:var(--red)}.step.current{color:var(--red);font-weight:600}.step.complete .step-circle{background:#eaf0df;color:#6e8257;border-color:#eaf0df}.step.expanded:after{content:"";width:5px;height:3px;border-radius:2px;background:#b7bda0;position:absolute;bottom:1px}.stage-batch{margin-top:10px;padding:12px 0 16px;border-top:1px solid #edece0;min-height:82px}.stage-batch-label{display:flex;justify-content:space-between;align-items:center;font-size:9px;color:#959b83;height:21px}.stage-batch-label .text-button{font-size:9px;min-height:24px;padding:4px 0}.recorded-chips{display:flex;gap:8px;align-items:center;min-height:40px;margin-top:4px}.recorded-chips>span{display:flex;align-items:center;gap:7px}.recorded-chips .chip{width:27px}.recorded-chips small{font-size:8px;color:#929880}.batch-empty{font-size:11px;color:#b0b29f}.cumulative{border-top:1px solid #e8e9dc;display:flex;align-items:center;justify-content:space-between;padding:12px 0;gap:10px}.cumulative>span{display:flex;align-items:center;gap:5px;font-size:10px;color:#989f87}.cumulative .chip{width:17px}.cumulative b{font-size:12px;font-weight:550;color:#697057}.hand-section{margin-top:28px}.hand-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.hand-heading h1{font-size:23px;letter-spacing:-.7px;font-weight:650}.hand-heading>span{font-size:10px;color:#a2a58d}.advice-line{font-size:11px;color:#778460;display:flex;align-items:center;gap:6px;margin-bottom:12px;min-height:25px}.advice-dot{font-size:15px;color:#829664}.advice-line>button{margin-left:auto;border:0;background:#e9eddf;padding:7px 9px;border-radius:5px;font-size:10px;color:#667b4f}.advice-details{font-size:10px;color:#a0a18f;margin-bottom:18px}.advice-details summary{cursor:pointer;width:fit-content}.advice-details p{line-height:1.8;margin-top:9px;color:#828b73}.hand-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 17px;max-width:620px;margin:auto}.hand-grid.count-4{grid-template-columns:repeat(2,minmax(0,1fr));max-width:440px;gap:25px}.hand-grid.count-3{gap:20px;max-width:600px}.hand-card{min-width:0}.card-frame{position:relative}.card-select{border:0;background:none;padding:0;width:100%;border-radius:7px;outline:2px solid transparent;outline-offset:3px;position:relative}.card-select:disabled{opacity:1}.selected .card-select{outline-color:var(--red)}.negative .card-select{outline-color:var(--green)}.recommend-tag{position:absolute;left:50%;bottom:8px;transform:translateX(-50%);white-space:nowrap;background:#f6f8edee;color:#637b49;border:1px solid #d7dfc6;border-radius:5px;padding:5px 8px;font-size:10px;pointer-events:none;box-shadow:0 2px 4px #0001}.card-status{position:absolute;right:-5px;top:-6px;border-radius:5px;background:var(--red);color:white;font-size:10px;padding:5px 8px;z-index:1}.negative .card-status{background:var(--green)}.card-metrics{display:block;border:0;background:none;padding:12px 0 0;text-align:center;width:100%}.card-metrics>span:first-child{display:block;font-size:9px;color:#9b9f8a}.card-metrics strong{font-size:24px;font-weight:650;letter-spacing:-.7px;display:block;margin-top:4px;font-variant-numeric:tabular-nums}.card-metrics strong small{font-size:10px;margin-left:1px;font-weight:400}.contribution{display:block;font-size:9px;color:#969c86;margin-top:5px;white-space:nowrap}.contribution i{font-style:normal;margin-left:2px;color:#b2b79f}.discard-row{display:flex;align-items:center;gap:8px;border-top:1px solid var(--line);margin-top:25px;padding-top:15px;min-height:57px}.discard-row>span{font-size:10px;color:#a0a58e;margin-right:5px}.discard-row>button{width:27px;flex:none;padding:0;border:0;background:none;opacity:.65}.game-screen{padding-bottom:145px}.game-dock{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,780px);padding:8px 28px max(18px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#f7f6f0f7;backdrop-filter:blur(12px);z-index:4}.game-dock>div{display:flex;justify-content:space-between;align-items:center;margin-bottom:5px;min-height:32px}.game-dock>div>span{color:#a0a58e;font-size:10px;margin-left:auto}.game-dock .text-button{font-size:10px}.route-tabs{display:flex;gap:5px;margin:0 0 14px}.route-tabs button{border:1px solid #dce1d0;background:none;font-size:10px;padding:7px 10px;border-radius:5px;color:#849172}.route-tabs button.active{background:#6f8357;border-color:#6f8357;color:white}.error{font-size:12px;color:#b3402b;line-height:1.8;margin-bottom:15px}.error button{border:0;background:none;color:var(--red);text-decoration:underline;margin-left:7px}.loading-dot{height:6px;width:6px;border-radius:50%;background:#a7b78f;animation:pulse 1s infinite}@keyframes pulse{50%{opacity:.3}}dialog{color:inherit;background:var(--paper)}dialog::backdrop{background:#2b302355;backdrop-filter:blur(3px)}.draw-dialog{position:fixed;inset:0;border:0;width:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0}.draw-inner{max-width:640px;margin:auto;min-height:100dvh;display:flex;flex-direction:column;padding:0 28px}.modal-top{height:82px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.modal-top>span{font-size:11px;color:#a0a58d}.draw-main{flex:1;padding:50px 0 30px}.draw-main h1{font-size:27px;letter-spacing:-.8px;margin:14px 0 12px;line-height:1.5}.muted{font-size:11px;color:#969d85;line-height:1.8}.draw-slots{display:flex;justify-content:center;gap:12px;margin:38px 0 20px;min-height:90px;align-items:center}.draw-slots>span{width:65px;height:78px;display:grid;place-items:center;background:#efeee3;border:1px dashed #d6d9c6;border-radius:16px}.draw-slots .chip{width:50px}.draw-slots i{font-style:normal;font-size:22px;color:#c7ccb5}.draw-count{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#a0a58f;padding-bottom:24px;border-bottom:1px solid var(--line)}.draw-count b{font-weight:600;color:#697458}.draw-count .text-button{font-size:10px}.chip-choices{display:flex;justify-content:space-between;gap:8px;margin-top:30px}.chip-choices button{border:0;background:none;display:flex;flex-direction:column;align-items:center;width:20%;padding:8px 0;gap:12px}.chip-choices .chip{width:67px;transition:transform .15s}.chip-choices button:active .chip{transform:scale(.9)}.chip-choices b{font-size:12px;font-weight:550}.chip-choices small{font-size:9px;color:#9a9f87}.last-note{text-align:center;margin-top:40px;color:#a0a58f;font-size:10px}.draw-dock{padding:20px 0 max(25px,env(safe-area-inset-bottom));position:sticky;bottom:0;background:var(--paper)}.detail-dialog{width:min(360px,calc(100% - 36px));max-height:90dvh;border:1px solid #dedfcf;border-radius:15px;padding:25px;text-align:center}.detail-dialog>.card-image{width:150px;margin:10px auto 20px}.detail-close{position:absolute;top:10px;right:12px;width:28px;height:28px;border:0;border-radius:50%;font-size:21px;background:#eeeee2;color:#969b84}.detail-dialog h2{font-size:16px;line-height:1.6}.detail-dialog p{font-size:11px;line-height:1.9;margin-top:12px}.detail-prob{margin-top:16px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:15px}.detail-prob span{font-size:11px;color:#949b82}.detail-prob b{font-size:23px;font-weight:600}.result{text-align:center;margin:25px 0}.result h1{font-size:57px;color:var(--red);letter-spacing:-2px;margin:10px 0}.result h1 small{font-size:13px;letter-spacing:0;margin-left:8px}.result p:last-child{font-size:11px;color:#979d85}.result-breakdown{margin-bottom:25px}.result-breakdown>div{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:12px 0;border-bottom:1px solid var(--line);font-size:10px;color:#8d967a}.result-breakdown b{font-size:13px;color:#5d6f48;white-space:nowrap}#toast{position:fixed;bottom:135px;left:50%;transform:translateX(-50%);background:#343d2e;color:#fffdf0;border-radius:8px;padding:12px 17px;font-size:12px;max-width:90%;text-align:center;z-index:30;pointer-events:none;opacity:0;transition:opacity .15s}#toast.show{opacity:1}
@media(min-width:900px){.screen,.home{margin-top:15px}.topbar{height:85px}.home{min-height:calc(100dvh - 15px)}.welcome h1{font-size:53px}.catalog-grid{gap:20px}.picker-screen{padding-bottom:255px}.picked-row>button,.empty-slot{max-width:62px}.progress-panel{padding:20px 28px 0}.hand-section{margin-top:32px}.game-dock,.picked-dock{border-left:1px solid var(--line);border-right:1px solid var(--line);border-radius:15px 15px 0 0}.draw-main{padding-top:65px}}
@media(max-width:500px){.screen,.home{padding-left:20px;padding-right:20px}.topbar{height:73px}.brand{font-size:16px}.brand .chip{width:24px}.heading{margin:24px 0 20px}.heading h1{font-size:25px}.category-tabs button{font-size:9px;padding-bottom:12px}.category-tabs small{display:none}.category-tabs button>span{font-size:9px}.catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px 11px}.category-title h2{font-size:12px}.catalog-card .check{width:20px;height:20px;font-size:15px;right:4px;bottom:4px}.picker-screen{padding-bottom:211px}.picked-dock{padding-left:20px;padding-right:20px;padding-top:12px}.picked-row{gap:8px;margin-bottom:12px}.picked-row>button,.empty-slot{width:calc((100% - 40px)/6)}.picked-label{margin-bottom:10px}.primary{font-size:13px;padding:15px 19px;min-height:49px}.progress-panel{padding:14px 14px 0;margin-top:18px}.progress-caption{margin-bottom:15px;font-size:9px}.step{font-size:9px;gap:8px}.step-circle{width:27px;height:27px;font-size:11px}.steps:before{top:13px}.recorded-chips .chip{width:25px}.stage-batch{padding-bottom:12px;min-height:76px}.cumulative{padding:10px 0;gap:8px}.cumulative>span{gap:4px;font-size:9px}.cumulative .chip{width:15px}.cumulative b{font-size:11px}.hand-section{margin-top:23px}.hand-heading h1{font-size:21px}.hand-heading{margin-bottom:13px}.advice-line{font-size:10px;gap:4px}.advice-line>button{font-size:9px}.advice-details{font-size:9px;margin-bottom:17px}.hand-grid{gap:19px 12px}.hand-grid.count-4{gap:23px;max-width:290px}.hand-grid.count-3{gap:12px}.card-metrics{padding-top:10px}.card-metrics>span:first-child{font-size:8px}.card-metrics strong{font-size:20px}.card-metrics strong small{font-size:9px}.contribution{font-size:8px}.recommend-tag{font-size:8px;padding:4px 6px;bottom:6px;border-radius:4px}.card-status{font-size:8px;padding:4px 6px;right:-3px;top:-5px}.game-dock{padding-left:20px;padding-right:20px}.discard-row{gap:7px;margin-top:21px;padding-top:12px}.discard-row>button{width:24px}.game-screen{padding-bottom:140px}.draw-inner{padding:0 20px}.modal-top{height:73px}.draw-main{padding-top:37px}.draw-main h1{font-size:24px}.draw-slots{gap:8px;margin-top:32px;min-height:79px}.draw-slots>span{width:55px;height:68px;border-radius:12px}.draw-slots .chip{width:44px}.draw-count{padding-bottom:18px}.chip-choices{gap:5px;margin-top:25px}.chip-choices .chip{width:53px}.chip-choices b{font-size:11px}.chip-choices small{font-size:8px}.welcome h1{font-size:40px}.welcome-chips{margin-bottom:23px}.welcome{padding-bottom:55px}.home-footer{font-size:9px}.recorded-chips small{font-size:8px}.route-tabs{margin-bottom:12px}.route-tabs button{font-size:9px}}
@media(max-width:350px){.screen,.home{padding-left:15px;padding-right:15px}.hand-grid,.hand-grid.count-3{gap:9px}.card-metrics strong{font-size:18px}.contribution{font-size:7px}.chip-choices .chip{width:45px}.draw-slots>span{width:48px;height:60px}.category-tabs button{font-size:8px}.picked-dock,.game-dock{padding-left:15px;padding-right:15px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* Six cards stay compact; the retained four and three cards grow centrally. */
.hand-grid.count-6{max-width:495px}
.hand-grid.count-3{grid-template-columns:repeat(2,minmax(0,1fr));max-width:460px;gap:24px}
.hand-grid.count-3 .hand-card:last-child{grid-column:1 / -1;width:calc((100% - 24px)/2);justify-self:center}
@media(max-width:500px){.hand-grid.count-3{max-width:320px;gap:22px}.hand-grid.count-3 .hand-card:last-child{width:calc((100% - 22px)/2)}}

.random-draw{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;border:1px solid #d8deca;background:#edf0e3;color:#667c4f;border-radius:9px;padding:13px 16px;margin-top:20px;font-size:13px;min-height:44px}.random-draw span{margin-left:auto;font-size:11px;color:#8a9777}.random-draw:disabled{opacity:.4}

.home .welcome{gap:28px;padding:35px 0 80px}.home .welcome-chips{margin-bottom:0}.start-button{text-align:center}

/* Quiet progress rhythm: four evenly spaced anchors, then the chip record. */
.round-progress{margin-top:18px;padding:0 0 14px;border-bottom:1px solid var(--line)}
.round-progress-head{padding:0 2px}
.compact-steps{display:grid;grid-template-columns:repeat(4,1fr);position:relative;width:100%;isolation:isolate}
.compact-steps:before{content:"";position:absolute;left:12.5%;right:12.5%;top:50%;height:1px;background:#e0e3d5;z-index:-1}
.compact-step{position:relative;display:grid;place-items:center;justify-self:center;width:44px;height:44px;padding:0;border:0;background:none}
.compact-step>span{display:grid;place-items:center;width:25px;height:25px;border:1px solid #dce0d0;background:var(--paper);border-radius:50%;font-size:11px;color:#a0a68d}
.compact-step.complete>span{background:#e9eedf;border-color:#e9eedf;color:#788763}
.compact-step.current>span{background:var(--red);border-color:var(--red);color:white}
.compact-step.expanded:not(.current)>span{border-color:#9aa989;color:#6e8059}
.compact-batch{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:42px;margin:12px 0 14px;padding:0 3px}
.compact-chips{display:flex;align-items:center;gap:9px;min-width:0}
.compact-chips>span{display:flex;align-items:center;gap:6px}
.compact-chips .chip{width:24px}
.compact-chips small{font-size:8px;color:#a0a58f;white-space:nowrap}
.compact-batch .batch-empty{font-size:10px;font-weight:400;color:#a7ad98}
.compact-batch .text-button{font-size:10px;min-height:36px;padding:8px 0;flex:none;color:#a0a58f}
.compact-cumulative{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:0 3px;margin:0;border:0}
.compact-cumulative>span{display:flex;align-items:center;gap:5px;font-size:9px;color:#a0a58f}
.compact-cumulative .chip{width:14px}
.compact-cumulative b{font-size:11px;font-weight:500;color:#7c856d}
.game-screen .hand-section{margin-top:24px}
@media(max-width:500px){.round-progress{margin-top:14px;padding-bottom:14px}.compact-cumulative{gap:8px}.compact-chips .chip{width:23px}.game-screen .hand-section{margin-top:23px}}

/* iPhone Safari: notch, landscape insets and changing browser chrome. */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px)}
html{-webkit-text-size-adjust:100%;scroll-padding-bottom:calc(150px + var(--safe-bottom))}
.screen,.home{padding-top:var(--safe-top);padding-left:max(28px,var(--safe-left));padding-right:max(28px,var(--safe-right))}
.game-screen{padding-bottom:calc(145px + var(--safe-bottom))}
.picker-screen{padding-bottom:calc(255px + var(--safe-bottom))}
.picked-dock,.game-dock{padding-left:max(28px,var(--safe-left));padding-right:max(28px,var(--safe-right))}
.home .welcome{flex-shrink:0}
.home .topbar,.modal-top,.draw-dock{flex-shrink:0}
.draw-dialog{height:100dvh;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
.draw-inner{padding-top:var(--safe-top);padding-left:max(28px,var(--safe-left));padding-right:max(28px,var(--safe-right))}
.draw-dock{padding-bottom:max(25px,var(--safe-bottom))}
.draw-slots>span{min-width:0;flex-shrink:1}
.chip-choices>button{min-width:0;min-height:44px}
.text-button{min-height:44px}
.compact-batch .text-button{min-width:44px;min-height:44px;text-align:right}
.page-nav button{min-height:44px}
.detail-close{width:44px;height:44px;top:4px;right:4px}
.detail-dialog{max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 32px);overflow-y:auto}
.card-metrics .contribution{white-space:normal;line-height:1.6;overflow-wrap:anywhere}
body:has(dialog[open]){overflow:hidden}
@media(max-width:500px){
  .screen,.home{padding-left:max(20px,var(--safe-left));padding-right:max(20px,var(--safe-right))}
  .picked-dock,.game-dock{padding-left:max(20px,var(--safe-left));padding-right:max(20px,var(--safe-right))}
  .draw-inner{padding-left:max(20px,var(--safe-left));padding-right:max(20px,var(--safe-right))}
  .picker-screen{padding-bottom:calc(225px + var(--safe-bottom))}
  .game-screen{padding-bottom:calc(145px + var(--safe-bottom))}
  .card-metrics>span:first-child{font-size:10px}
  .card-metrics strong{font-size:22px}
  .card-metrics .contribution{font-size:9px}
}
@media(orientation:landscape) and (max-height:500px){
  .screen,.home{margin-top:0}
  .draw-main{padding-top:18px;padding-bottom:15px}
  .modal-top{height:55px}
  .draw-main h1{font-size:22px;margin:10px 0 8px}
  .draw-slots{margin:17px 0 12px;min-height:65px}
  .draw-slots>span{height:60px;width:52px}
  .draw-slots .chip{width:40px}
  .draw-count{padding-bottom:8px}
  .random-draw{margin-top:12px}
  .chip-choices{margin-top:12px}
  .chip-choices .chip{width:40px}
  .chip-choices button{gap:6px}
  .last-note{margin-top:15px}
  .draw-dock{padding-top:10px}
  .welcome{padding-top:15px}
}
@media(prefers-reduced-transparency:reduce){.game-dock,.picked-dock{background:var(--paper)}}
