:root{color-scheme:dark;--ink:#c6cbd2;--muted:#919ba8;--accent:#80afd6;--blue:#8ed0ff;--panel:#121820;--line:#ffffff25;font-family:ui-monospace,"Cascadia Code",Consolas,monospace;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:#080a0e;color:var(--ink)}button,input,summary{font:inherit}button{cursor:pointer;color:inherit;border:1px solid var(--line);background:#18212c;padding:11px 16px;border-radius:7px;transition:background .15s,border-color .15s;touch-action:manipulation}button:hover:not(:disabled){background:#23344a;border-color:var(--accent)}button:focus-visible,summary:focus-visible,.file-label:focus-within{outline:3px solid var(--blue);outline-offset:3px}button:disabled{cursor:default;opacity:.48}img{max-width:100%}p{line-height:1.6}h1,h2,h3,p{margin-top:0}.sprite{object-fit:contain;image-rendering:pixelated;pointer-events:none}.eyebrow,.small-heading{font-size:10px;letter-spacing:.15em;font-weight:700;color:var(--accent)}.small-heading{margin:0 0 15px}.primary{background:var(--accent);color:#d5e5f4;border-color:var(--accent);font-weight:bold}.primary:hover:not(:disabled){background:#315b80;color:#111}.secondary{background:transparent}.shell{position:relative;margin:auto}
.menu-shell{max-width:1180px;min-height:100dvh;display:grid;grid-template-columns:1fr 1fr;background:#10151d;box-shadow:0 0 100px #0006}.menu-art{position:relative;overflow:hidden;min-height:800px}.menu-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 25%}.menu-art::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 80%,#10151d66)}.menu-content{padding:52px 46px 25px;display:flex;flex-direction:column;justify-content:center}.menu-content>.eyebrow{display:flex;justify-content:space-between;color:#a0aab6}.menu-content h1{font-size:clamp(38px,5vw,62px);letter-spacing:-.06em;margin:35px 0 18px;line-height:1}.menu-content h1 span{color:var(--accent)}.tagline{font-family:Georgia,serif;font-size:30px;line-height:1.1;color:#b9c2cd;margin-bottom:26px}.menu-divider{height:1px;background:var(--line);margin:0 0 25px}.difficulty-list{display:grid;gap:9px}.difficulty{display:flex;align-items:center;text-align:left;gap:15px;width:100%;padding:15px 16px;background:#151d28}.difficulty-number{font-size:11px;color:var(--accent)}.difficulty strong{font-size:19px;display:block}.difficulty small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.difficulty-desc{display:block;font-size:10px;color:#8996a6;margin-top:6px}.difficulty-arrow{margin-left:auto;font-size:26px;color:var(--accent)}.progress-note{font-size:10px;color:var(--muted);margin:17px 0}.menu-links{display:flex;flex-wrap:wrap;gap:8px}.menu-links button{font-size:11px;padding:9px 10px;background:transparent}.backup{margin-top:22px;font-size:11px;color:var(--muted)}summary{cursor:pointer}.backup p{font-size:11px}.backup button,.file-label{display:inline-block;font-size:11px;padding:9px;border:1px solid var(--line);border-radius:5px;cursor:pointer}.file-label input{position:absolute;width:1px;height:1px;opacity:0}.menu-message{font-size:11px;min-height:18px;margin:12px 0 0;color:var(--blue)}.menu-content footer{display:flex;gap:10px;align-items:center;font-size:9px;color:#7e8b9c;margin-top:20px;border-top:1px solid var(--line);padding-top:14px}.studio-logo{width:30px;height:26px}
.game-shell{max-width:1160px;min-height:100dvh;background:#0b1017;overflow:hidden}.game-backdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.16;pointer-events:none}.game{position:relative;min-height:100dvh;padding:18px 22px 10px;display:grid;grid-template-columns:minmax(0,1fr) 270px;grid-template-rows:60px minmax(510px,1fr) auto 30px;grid-template-areas:"header header" "board sidebar" "turn sidebar" "footer footer";column-gap:22px;max-height:1100px;height:100dvh}.topbar{grid-area:header;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line)}.brand{font-size:20px;letter-spacing:-.06em;font-weight:900}.brand span{display:block;letter-spacing:.09em;font-size:10px;color:var(--muted);margin-top:5px}.score-progress{display:flex;align-items:center;gap:12px;padding:0 14px}.score-progress>span{font-size:9px;max-width:45px;line-height:1.5;color:var(--muted)}.score-progress strong{color:var(--blue);font-size:28px}.score-progress small{font-size:14px;color:var(--muted);font-weight:400}.topbar nav{display:flex;gap:6px}.topbar nav button{font-size:11px;padding:9px 11px}.play-area{grid-area:board;position:relative;min-height:0}.board{position:relative;height:100%;min-height:510px;isolation:isolate}.table-sprite{position:absolute;left:50%;top:55%;transform:translate(-50%,-50%);width:34%;height:67%;object-fit:fill;image-rendering:pixelated;opacity:.82;z-index:-1}.seat{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);width:30%;max-width:186px;height:61px;padding:4px 7px 3px;border:1px solid #60758b33;background:#111821ec;border-radius:8px;text-align:left;color:var(--ink);z-index:2;cursor:default;box-shadow:0 4px 14px #0003}.seat:hover:not(:disabled){background:#111821ec;border-color:#60758b33}.seat-main{display:flex;align-items:center;justify-content:center;gap:5px;height:38px}.avatar{width:34px;height:34px;object-fit:contain;border:1px solid #60758b55;border-radius:4px;image-rendering:pixelated}.cup{position:relative;width:40px;height:38px;flex-shrink:0;overflow:hidden;border-radius:5px}.bucket-art{width:100%;height:100%;object-fit:cover}.cup-score{position:absolute;left:50%;top:58%;transform:translate(-50%,-50%);font-size:12px;font-weight:bold;line-height:1;text-shadow:0 1px 3px #000;background:#080c12d9;padding:2px 4px;border-radius:3px}.seat-name{display:block;text-align:center;font-size:10px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}.seat.you{border-color:#8ed0ff65}.seat.you .seat-name{color:var(--blue)}.seat-markers{position:relative;width:27px;min-width:20px;height:38px}.choice-marker{width:25px;height:25px;position:absolute;top:6px;left:0;border-radius:50%}.starter-marker{width:15px;height:15px;position:absolute;left:-2px;top:-4px;border-radius:50%}.hat-marker{width:38px;height:38px;position:absolute;right:-9px;bottom:-3px;border-radius:50%}.seat.acting,.seat.acting:hover{border-color:var(--accent);box-shadow:0 0 0 2px #80afd630}.seat.selected-target,.seat.selected-target:hover{border-color:var(--blue);box-shadow:0 0 0 2px #8ed0ff30}.seat.targetable{cursor:pointer;border-color:#8ed0ff66}.seat.targetable:hover{background:#1c3045;border-color:var(--blue)}.seat.inactive{opacity:.3;filter:grayscale(1)}.score-change{position:absolute;right:-5px;top:-10px;font-size:13px;font-weight:bold;border-radius:5px;background:var(--blue);color:#091624;padding:3px 6px;box-shadow:0 2px 8px #0006;animation:badge-in .3s ease-out}.score-change.loss{background:#a0aab8;color:#111820}.target-arrow{position:absolute;inset:0;width:100%;height:100%;z-index:1;overflow:visible;pointer-events:none}.target-arrow line{stroke:var(--blue);stroke-width:.55;stroke-dasharray:1.5 1;filter:drop-shadow(0 0 1px #000)}.flying-marble{position:absolute;left:var(--from-x);top:var(--from-y);width:9px;height:9px;border-radius:50%;background:radial-gradient(circle at 28% 25%,white 0 13%,#61d7ff 20%,#057ed5 55%,#024278);box-shadow:0 0 7px #8ed0ff;z-index:4;pointer-events:none;animation:marble-flight .7s ease-in-out both}
.turn-panel{grid-area:turn;border-top:1px solid var(--line);background:#101720e6;border-radius:7px;padding:12px 16px;margin-bottom:10px;min-height:142px}.feedback p{font-size:12px;margin:5px 0 10px;line-height:1.45;min-height:17px}.reveal-note{display:block;font-size:10px;color:var(--blue);margin-bottom:5px}.controls{min-height:60px;display:flex;flex-direction:column;justify-content:center}.choice-row{display:flex;justify-content:center;gap:12px;align-items:center}.number-button{display:flex;align-items:center;justify-content:center;gap:10px;padding:6px 16px;min-width:82px;height:48px;background:#172b40;border-color:#5c7c9a59}.number-button img{width:32px;height:32px;border-radius:50%}.number-button span{font-size:22px;color:#c1d7eb}.choice-row .secondary{font-size:11px;max-width:110px;padding:10px}.control-hint{font-size:9px;color:var(--muted);text-align:center;margin:9px 0 0}.pass-button{font-size:13px;display:block;width:100%;height:48px}.pass-button span{font-weight:normal;opacity:.7;margin-left:18px;font-size:11px}.waiting{display:flex;justify-content:center;align-items:center;gap:10px;min-height:44px;font-size:11px;color:var(--muted)}.waiting-dot{width:7px;height:7px;background:var(--accent);border-radius:50%;animation:pulse 1.5s infinite}.sidebar{grid-area:sidebar;border-left:1px solid var(--line);padding:27px 0 0 22px;display:flex;flex-direction:column;min-height:0}.legend{display:flex;flex-direction:column;gap:9px;margin:22px 0;font-size:10px;color:var(--muted)}.legend i{display:inline-block;width:9px;height:9px;margin-right:7px;border:1px solid}.legend-actor{border-color:var(--accent)!important}.legend-target{border-color:var(--blue)!important}.log{display:flex;flex-direction:column;min-height:0;flex:1;border-top:1px solid var(--line);padding-top:20px}.log-lines{overflow:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#43566e transparent;padding-right:7px}.log-lines p{font-size:10px;line-height:1.6;color:#a1adbb;border-bottom:1px solid #ffffff0c;padding:0 0 7px;margin:0 0 7px}.hard-note{font-size:12px;color:var(--muted)}.game-footer{grid-area:footer;display:flex;gap:13px;align-items:center;font-size:9px;color:var(--muted)}.game-footer button{border:0;background:transparent;padding:4px 0;font-size:10px;color:var(--muted)}.game-footer span{margin-left:auto}.mobile-log{display:none}
.modal{position:absolute;inset:20px;z-index:10;background:#10151dfa;border:1px solid #4c749988;border-radius:12px;padding:26px;display:flex;flex-direction:column;box-shadow:0 0 0 30px #05080edd,0 20px 100px #000a;overflow:auto}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding-bottom:16px;margin-bottom:20px}.modal-head h2{margin:0;font-size:18px}.modal-head button{font-size:11px}.info-body{overflow:auto;min-height:0;line-height:1.6;font-size:13px}.info-body h3{color:var(--accent);font-size:16px;margin:22px 0 12px}.info-body h3:first-child{margin-top:0}.rule-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.rule-grid>div{padding:15px;border:1px solid var(--line);border-radius:6px}.rule-grid p{font-size:12px;margin:5px 0 0;color:var(--muted)}.tabs{display:flex;gap:6px}.tabs [aria-pressed=true]{border-color:var(--accent);color:var(--accent)}.arch-entry{display:grid;grid-template-columns:58px 1fr;gap:18px;border-bottom:1px solid var(--line);padding:18px 0}.arch-entry img{width:58px;height:58px;image-rendering:pixelated;border-radius:5px}.arch-entry h3{margin:0 0 8px;font-size:15px}.arch-entry p{white-space:pre-line;font-size:12px;color:var(--muted);margin:0}.compact-modal,.result-modal{inset:auto;left:50%;top:50%;transform:translate(-50%,-50%);width:min(480px,calc(100% - 30px));max-height:calc(100% - 30px);text-align:center;gap:14px;padding:35px 25px;box-shadow:0 0 0 200vmax #05080ee0}.compact-modal h2,.result-modal h2{font-family:Georgia,serif;font-size:32px;margin:0}.compact-modal p,.result-modal p{font-size:12px;color:var(--muted);margin:0}.result-jug{height:90px;margin:0 auto 7px}.result-actions{display:flex;gap:10px;justify-content:center;margin-top:10px}.result-actions button{font-size:12px}.unlock-banner{color:var(--accent)!important;border:1px solid #80afd677;padding:12px;border-radius:7px}.intro-modal video{width:100%;min-height:0;flex:1;object-fit:contain;background:#000}.intro-modal p{font-size:11px;margin:12px 0 0}.intro-modal{background:#080b10}.info-body .log-lines{max-height:none}
@keyframes marble-flight{from{left:var(--from-x);top:var(--from-y);opacity:1;transform:scale(.8)}80%{opacity:1}to{left:var(--to-x);top:var(--to-y);opacity:0;transform:scale(1.3)}}@keyframes badge-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes pulse{50%{opacity:.3}}
@media(min-width:1200px){.menu-shell{margin:25px auto;min-height:calc(100dvh - 50px);border:1px solid var(--line);border-radius:15px;overflow:hidden}.menu-art{min-height:820px}.game{padding:22px 30px 12px;column-gap:28px}.seat{height:69px}.seat-main{height:44px}.avatar{width:39px;height:39px}.cup{width:46px;height:44px}.seat-name{font-size:11px}}
@media(max-width:760px){.menu-shell{display:block}.menu-art{position:absolute;inset:0;min-height:0;height:100%;opacity:.33}.menu-art img{object-position:50% 0}.menu-art::after{background:linear-gradient(180deg,#10151d33,#10151def 35%)}.menu-content{position:relative;padding:30px 25px 20px;min-height:100dvh;max-width:460px;margin:auto}.menu-content h1{font-size:52px;margin:38px 0 15px}.tagline{font-size:27px}.menu-content>.eyebrow{font-size:9px}.difficulty{background:#121c29e8}.difficulty-desc{display:none}.game{padding:10px 9px max(8px,env(safe-area-inset-bottom));grid-template-columns:1fr;grid-template-rows:52px minmax(490px,1fr) auto 24px;grid-template-areas:"header" "board" "turn" "footer";height:100dvh;min-height:770px;max-height:none}.sidebar{display:none}.brand{font-size:17px}.brand span{font-size:8px;margin-top:4px}.topbar{gap:5px}.topbar nav{gap:4px}.topbar nav button{font-size:10px;padding:8px 7px}.score-progress{gap:3px;padding:0}.score-progress>span{display:none}.score-progress strong{font-size:22px}.score-progress small{font-size:10px}.board{min-height:490px}.seat{width:31%;height:59px;padding:3px;max-width:155px}.seat-main{height:37px;gap:3px}.avatar{width:29px;height:29px}.cup{width:34px;height:34px}.seat-name{font-size:9px}.seat-markers{width:22px;min-width:22px}.choice-marker{width:22px;height:22px;top:7px}.starter-marker{width:13px;height:13px}.hat-marker{width:34px;height:34px;right:-3px}.turn-panel{padding:9px 11px;min-height:142px;margin-bottom:7px}.feedback p{font-size:11px;margin-bottom:8px}.feedback .eyebrow{font-size:9px}.choice-row{gap:9px}.number-button{min-width:75px;height:46px;padding:5px 10px}.control-hint{font-size:8px}.game-footer{gap:15px}.mobile-log{display:inline-block}.modal{inset:8px;padding:17px}.compact-modal,.result-modal{inset:auto;left:50%;top:50%}.rule-grid{grid-template-columns:1fr}.info-body{font-size:12px}.game-backdrop{opacity:.14}}
@media(max-width:350px){.game{padding-left:5px;padding-right:5px}.brand{font-size:15px}.topbar nav button{font-size:9px;padding:8px 5px}.seat-main{gap:1px}.avatar{width:24px;height:24px}.cup{width:32px;height:32px}.seat-markers{width:20px;min-width:20px}.seat-name{font-size:8px}.number-button{min-width:70px}.pass-button span{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}.flying-marble{display:none}}

/* 0.1.7: larger portraits, open table, jug rewards. */

.game{grid-template-rows:60px minmax(620px,1fr) auto 30px;min-height:860px;max-height:none}
.board{min-height:620px}.seat{height:78px;width:32%;max-width:200px}.seat-main{height:55px;gap:6px}.avatar{width:54px;height:54px;border:0;flex-shrink:0}.seat-name{margin-top:2px}
.target-arrow{z-index:3}.target-arrow .guess-path{fill:none;stroke:var(--blue);stroke-width:.7;stroke-linecap:round;filter:drop-shadow(0 1px 2px #000)}
.sidebar{padding-top:16px}.sidebar>.log{border-top:0;padding-top:0}
.arch-entry{grid-template-columns:90px 1fr}.arch-entry img{width:90px;height:90px;object-fit:contain}.rules-portraits{display:flex;align-items:center;gap:18px;margin-bottom:18px}.rules-portraits img{width:90px;height:90px;object-fit:contain;image-rendering:pixelated}
.jug-bank{display:flex;align-items:center;gap:16px;margin-top:22px;padding:12px 16px;border:1px solid #80afd655;border-radius:8px;background:#101720}.bank-jug{width:45px;height:65px}.jug-bank strong,.jug-bank small{display:block;margin-top:5px}.jug-bank strong{font-size:18px;color:var(--accent)}.jug-bank small{font-size:10px;color:var(--muted)}
.payout{border-top:1px solid var(--line);padding-top:14px;text-align:left}.payout h3{font-size:16px;color:var(--accent);margin:0 0 10px}.payout-rows>div{display:flex;justify-content:space-between;font-size:12px;padding:4px 0}.payout-rows strong{color:var(--blue)}.payout .payout-total{margin:12px 0 6px;color:var(--accent);font-weight:bold}.result-modal{gap:10px;padding:24px}.result-jug{height:65px}.result-modal h2{font-size:28px}
#speed[aria-pressed=true]{color:var(--accent)}
@media(max-width:760px){.game{grid-template-rows:52px minmax(610px,1fr) auto 24px;min-height:850px}.board{min-height:610px}.seat{width:33%;height:75px;max-width:180px}.seat-main{height:52px;gap:2px}.avatar{width:46px;height:46px}.arch-entry{grid-template-columns:78px 1fr;gap:12px}.arch-entry img{width:78px;height:78px}}
@media(max-width:350px){.seat{width:34%}.avatar{width:40px;height:40px}.seat-main{gap:1px}}
/* 0.1.8: clockwise seating, subdued unavailable targets, shop and payout. */
.starter-marker{width:38px;height:38px;max-width:none;left:-10px;top:-21px;z-index:1}
.seat.targetable{border-color:#60758b33}.seat.unavailable{filter:grayscale(1) brightness(.42)}
.seat.you .avatar{outline:3px solid var(--player-outline,transparent);outline-offset:1px}.seat.you .seat-name{color:var(--player-name,var(--blue))}
.number-button img{width:38px;height:38px}
.score-change{animation:badge-fade 1.25s ease-out forwards}
@keyframes badge-fade{0%{opacity:0;transform:translateY(7px)}15%,75%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-7px)}}
.payout-rows>.bonus-row{display:grid;grid-template-columns:1fr auto;gap:5px;animation:bonus-row-in .3s both;animation-delay:var(--row-delay);padding:6px 0}
.bonus-marbles{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:3px;min-height:9px}.bonus-marble{display:block;width:8px;height:8px;border-radius:50%;background:radial-gradient(circle at 28% 25%,#fff,#61d7ff 25%,#057ed5 60%,#024278);position:relative;z-index:2}
.payout-jug{text-align:center;padding-top:15px}.payout-jug img{width:50px;height:72px}.settled .bonus-row{animation:none}.settled .bonus-marble{visibility:hidden}
@keyframes bonus-row-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.shop-modal{position:fixed;inset:20px max(15px,calc((100vw - 850px)/2));}.shop-modal>h3{margin:24px 0 12px;color:var(--accent)}.shop-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.shop-item{border:1px solid var(--line);padding:14px;border-radius:8px;display:flex;flex-direction:column}.shop-item h4{margin:0 0 8px}.shop-item p{font-size:12px;color:var(--muted);flex:1}.shop-item button{font-size:12px}.swatch{display:inline-block;width:14px;height:14px;border:1px solid #ffffff80;margin-right:7px;border-radius:50%}
@media(max-width:760px){.starter-marker{width:33px;height:33px;top:-19px;left:-8px}.shop-modal{inset:10px}.shop-grid{gap:8px}.shop-item{padding:10px}}
@media(prefers-reduced-motion:reduce){.score-change{animation:badge-fade 1.25s linear forwards!important}.bonus-marble{display:none}}
/* 0.1.9: stable controls, tagging, settings and Marble Shop. */
.game{grid-template-rows:60px minmax(620px,1fr) 176px 30px}.turn-panel{height:166px;min-height:166px;display:grid;grid-template-rows:76px 60px;gap:0}.feedback{overflow:auto}.feedback p{min-height:0}.controls,.waiting{height:60px;min-height:60px}.reveal-note{font-size:9px}
.jug-bank{width:100%;text-align:left;min-height:115px;border:2px solid #80afd677}.jug-bank .bank-jug{width:65px;height:90px}.jug-bank .eyebrow{font-size:17px;letter-spacing:.06em}
.portrait-button{padding:0;border:0;background:none;flex-shrink:0;line-height:0}.portrait-button:disabled,.cup:disabled{opacity:1}.portrait-button:hover:not(:disabled){background:none}.tagged-avatar{filter:grayscale(1)}.cup{padding:0;border:0;background:none}.cup:not(:disabled){cursor:pointer;outline:1px solid transparent}.cup:hover:not(:disabled){background:#ffffff18;outline-color:var(--blue)}
.settings-modal,.tag-modal{position:fixed;inset:20px max(15px,calc((100vw - 680px)/2));z-index:30}.settings-modal{bottom:auto;max-height:calc(100dvh - 40px)}.settings-modal p,.tag-modal p{font-size:12px;color:var(--muted)}.volume-row{display:grid;grid-template-columns:1fr auto;gap:12px;margin:12px 0 22px}.volume-row label{grid-column:1/-1}.volume-row output{float:right;color:var(--accent)}.volume-row input{width:100%;accent-color:var(--accent)}.tag-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}.tag-grid button{display:flex;align-items:center;gap:8px;font-size:11px;padding:8px}.tag-grid img{width:40px;height:40px;object-fit:contain}.tag-grid [aria-pressed=true]{border-color:var(--accent)}
.intro-modal{position:fixed;inset:0;z-index:50;border:0;border-radius:0;padding:15px;cursor:pointer;background:#000}.intro-modal video{pointer-events:none}.intro-modal #skip-intro{align-self:flex-end}.intro-modal p{text-align:center}
@media(max-width:760px){.game{grid-template-rows:52px minmax(610px,1fr) 176px 24px}.turn-panel{height:166px;min-height:166px}.settings-modal,.tag-modal{inset:10px}.settings-modal{bottom:auto;max-height:calc(100dvh - 20px)}.tag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* 0.1.10: large three-column archetype picker and illustrated shop. */
.tag-modal{inset:12px max(12px,calc((100vw - 1050px)/2));gap:8px;padding:18px;overflow:auto}
.tag-modal .modal-head{margin:0;padding-bottom:10px;flex-shrink:0}.tag-modal>p{margin:0;font-size:11px}.tag-modal>[data-tag]{padding:7px;flex-shrink:0}
.tag-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(var(--tag-rows,6),minmax(84px,1fr));gap:6px;margin:0;flex:1;min-height:0}
.tag-grid button{position:relative;flex-direction:column;justify-content:center;gap:3px;padding:5px;min-height:0;min-width:0;overflow:hidden}
.tag-grid img{width:100%;height:calc(100% - 19px);min-height:0;flex:1;object-fit:contain;image-rendering:pixelated}.tag-grid button>span{font-size:11px;line-height:14px;flex-shrink:0}
.tag-used{position:absolute;top:3px;right:3px;background:#10151dee;color:var(--accent);font-size:9px;padding:2px 4px;border-radius:4px}
.shop-sprite{width:100%;height:110px;object-fit:contain;margin-bottom:12px}.shop-price{color:var(--accent);font-size:12px;margin:0 0 10px}.coming-soon button:disabled{opacity:.8;color:var(--muted)}
.tag-results{text-align:left;border-top:1px solid var(--line);padding-top:12px;font-size:12px}.tag-results summary{cursor:pointer;color:var(--accent)}.tag-results>div{display:flex;flex-direction:column;gap:5px;padding:10px 0;border-bottom:1px solid var(--line)}.tag-results span{color:var(--muted)}.tag-results b{color:var(--blue)}
@media(max-width:760px){.tag-modal{inset:6px;padding:10px}.tag-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.tag-grid button>span{font-size:10px}.tag-used{font-size:8px}.shop-sprite{height:90px}}
/* Profile, achievement collection, and player-facing portraits. */
.seat.you .avatar,.profile-preview .avatar,.profile-avatars img{transform:scaleX(-1)}
.profile-modal{position:fixed;inset:20px max(12px,calc((100vw - 850px)/2))}.profile-body{overflow:auto;padding-top:20px}.profile-preview{display:flex;align-items:center;gap:22px;margin-bottom:20px}.profile-preview .avatar{width:100px;height:100px;outline:3px solid var(--player-outline,transparent)}.profile-preview strong{color:var(--player-name,var(--blue));font-size:23px;overflow-wrap:anywhere}
#profile-name-form{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:25px}#profile-name-form label{width:100%}#player-name{background:#0b111a;color:var(--ink);padding:10px;border:1px solid var(--line);border-radius:6px;max-width:100%}#profile-status{font-size:12px;color:var(--accent)}
.profile-avatars,.profile-colors{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:25px}.profile-avatars button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px}.profile-avatars img{width:75px;height:75px;object-fit:contain;image-rendering:pixelated}.profile-body [aria-pressed=true]{border-color:var(--accent)}.profile-body p{font-size:12px;color:var(--muted)}.achievement-row{padding:12px;border-bottom:1px solid var(--line)}.achievement-row h3{font-size:15px;margin:0 0 7px}.achievement-row p{margin:0 0 6px}.achievement-row small{font-size:10px;color:var(--muted)}.achievement-row.earned h3{color:var(--accent)}
.seat.targetable{cursor:pointer}.topbar nav{flex-wrap:wrap;justify-content:flex-end}.topbar nav button{padding:8px;font-size:10px}.topbar{align-items:center}
@media(max-width:760px){.profile-modal{inset:8px}.game{grid-template-rows:94px minmax(610px,1fr) 176px 24px}.topbar{flex-wrap:wrap;align-content:center}.topbar nav{width:100%;justify-content:space-between;gap:3px}.topbar nav button{padding:6px;font-size:10px}.profile-preview .avatar{width:80px;height:80px}}
.lore-modal{position:fixed;inset:20px max(12px,calc((100vw - 800px)/2))}.lore-story{padding:4px 12px 20px;line-height:1.85}.lore-story p{font-size:15px;line-height:1.85;color:var(--ink)}.lore-story h3{font-family:Georgia,serif;font-size:25px}.lore-story .eyebrow{margin-bottom:18px}.menu-links{flex-wrap:wrap}
@media(max-width:760px){.lore-modal{inset:8px}.lore-story{padding:4px 4px 16px}.lore-story p{font-size:14px}}

/* Storm palette: charcoal surfaces, slate text, blue light. Artwork keeps its original colors. */
:root{--surface:#10151d;--surface-raised:#18212c;--accent:#80afd6;--blue:#8ed0ff;--line:#52677c55}
body{background:radial-gradient(ellipse at 50% 0,#162334 0, #0b1018 45%,#07090d 100%);background-attachment:fixed}
.menu-shell{background:radial-gradient(ellipse at 100% 0,#1c2d42 0,transparent 48%),linear-gradient(155deg,#10151d,#090d13)}
.primary{background:#244a70;color:#d3e4f4;border-color:#466c92}.primary:hover:not(:disabled){background:#315b80;color:#e1ecf6}
.modal{background:linear-gradient(155deg,#182331fa,#0c111afa);border-color:#4c668477}
.intro-modal{background:#000}.seat.acting,.seat.acting:hover{border-color:#b5c1cf;box-shadow:0 0 0 2px #b5c1cf30}.seat.selected-target,.seat.selected-target:hover{border-color:var(--blue);box-shadow:0 0 0 2px #8ed0ff40}
.profile-body input{accent-color:var(--blue)}.score-change.loss{background:#a0aab8;color:#111820}
/* Weather occupies a fixed row for the whole game, so reveals never move the table. */
.weather-menu{padding:12px 0 18px}.weather-menu button{width:100%;text-align:left}.weather-menu button[aria-pressed=true]{background:#244a70;border-color:var(--blue)}.weather-menu p,.weather-locked{font-size:10px;line-height:1.5;color:var(--muted);margin:8px 0 14px}
.game.weather-on{grid-template-rows:60px minmax(620px,1fr) 240px 30px}.weather-on .turn-panel{height:230px;min-height:230px;grid-template-rows:64px 76px 60px}.weather-status{border-bottom:1px solid var(--line);padding:0 0 7px;overflow:auto;line-height:1.4;font-size:10px}.weather-status strong{display:block;font-size:12px;color:var(--blue);margin-bottom:3px}.weather-status span,.weather-status small{display:block;color:var(--muted)}
@media(max-width:760px){.game.weather-on{grid-template-rows:94px minmax(610px,1fr) 240px 24px}.weather-status{font-size:9px}}

.postgame-archetypes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.postgame-archetypes .arch-entry{min-width:0;margin:0}.postgame-archetypes .arch-entry img{width:56px;height:56px;object-fit:contain}.postgame-archetypes p{margin:4px 0}#postgame-reveal{margin:16px 0}.postgame-history{max-height:300px;overflow:auto;text-align:left}

.community-links{margin-top:10px}.community-modal{position:fixed;inset:16px max(12px,calc((100vw - 860px)/2));gap:14px}.community-modal p{font-size:12px;margin:0}.community-modal input,.community-modal select{max-width:100%;background:#101720;color:var(--ink);border:1px solid var(--line);padding:10px;border-radius:6px}.community-modal form{display:flex;flex-wrap:wrap;gap:10px}.leader-scroll{overflow:auto}.leader-scroll table{border-collapse:collapse;width:100%;font-size:12px;white-space:nowrap}.leader-scroll th,.leader-scroll td{padding:12px 8px;text-align:right;border-bottom:1px solid var(--line)}.leader-scroll th:first-child{text-align:left;max-width:200px;overflow:hidden;text-overflow:ellipsis}.leader-scroll button{padding:6px;font-size:11px}.own-row{background:#ffffff0a}.weather-icon{width:43px;height:43px;float:left;margin:0 10px 0 0;color:#e4e6e9}.online-clock{font-size:11px;color:var(--ink)}
.community-toast{position:fixed;z-index:60;top:8px;left:50%;transform:translateX(-50%);width:min(500px,calc(100% - 16px));display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--line);background:#172331;box-shadow:0 5px 25px #0008;border-radius:8px;font-size:11px}.community-toast span{flex:1}.community-toast button{padding:8px;font-size:10px}
.tutorial-guide{position:absolute;z-index:8;left:50%;top:40%;transform:translateX(-50%);width:min(380px,calc(100% - 28px));padding:16px 20px;border:1px solid #c4d0dc;border-radius:12px;background:#101c2bf5;box-shadow:0 10px 45px #000b;overflow:auto}.tutorial-guide h2{font-size:18px;margin:7px 0 10px}.tutorial-guide p{font-size:12px;line-height:1.6;margin-bottom:12px}.tutorial-guide button{min-height:44px;width:100%}.tutorial-focus{outline:3px solid #eef3f8!important;outline-offset:4px;filter:drop-shadow(0 0 6px #fff7)!important}.daily-progress{padding:12px 0;color:var(--muted);font-size:11px}.daily-progress strong{color:var(--ink)}.daily-progress p{margin:6px 0;font-size:11px}.daily-toggle{display:flex;align-items:center;gap:10px}.daily-toggle input{width:20px;height:20px}.online-play{margin:10px 0 5px;border-color:#7897b0}.online-play strong{font-size:19px}
@media(max-width:760px){.tutorial-guide{padding:12px 15px;width:calc(100% - 24px)}.tutorial-guide h2{font-size:16px}.tutorial-guide p{font-size:11px}}
@media(max-width:760px),(max-width:1000px) and (max-height:570px){
 .sidebar{display:none}.mobile-log{display:inline-block}.game{grid-template-columns:1fr;grid-template-areas:"header" "board" "turn" "footer"}.game-shell{height:100dvh;min-height:0}.game,.game.weather-on{height:100dvh;min-height:0;max-height:100dvh;grid-template-rows:76px minmax(0,1fr) 132px 20px;padding:5px 7px max(4px,env(safe-area-inset-bottom));row-gap:3px}
 .game.weather-on{grid-template-rows:76px minmax(0,1fr) 184px 20px}
 .board{min-height:0;height:100%;container-type:size}.table-sprite{width:76%;height:83%;top:53%}
 .seat{height:clamp(39px,12cqh,72px);width:35%;padding:2px;max-width:180px}.seat-main{height:calc(100% - 13px);gap:2px}.avatar{width:clamp(24px,8cqh,46px);height:clamp(24px,8cqh,46px)}.cup{width:clamp(24px,7cqh,34px);height:clamp(24px,7cqh,34px)}.seat-name{font-size:9px;margin-top:1px}.seat-markers{height:27px;width:22px;min-width:18px}.starter-marker{width:26px;height:26px;top:-12px}.choice-marker{width:20px;height:20px;top:4px}
 .turn-panel{height:132px;min-height:0;margin:0;padding:7px 10px;grid-template-rows:55px 60px}.weather-on .turn-panel{height:184px;min-height:0;grid-template-rows:52px 55px 60px}.feedback p{font-size:10px;margin:3px 0}.weather-status{font-size:9px;padding:0 0 4px}.weather-icon{width:36px;height:36px}.control-hint{margin:2px 0 0}.number-button{height:44px}.topbar nav{flex-wrap:nowrap}.topbar nav button{padding:5px;font-size:9px}
}
@media(max-width:1000px) and (max-height:570px){.game,.game.weather-on{grid-template-rows:50px minmax(0,1fr) 98px 16px}.game.weather-on{grid-template-rows:50px minmax(0,1fr) 130px 16px}.topbar{flex-wrap:nowrap}.topbar nav{width:auto}.brand span{font-size:7px}.turn-panel{height:98px;grid-template-rows:32px 52px;padding:4px 8px}.weather-on .turn-panel{height:130px;grid-template-rows:32px 32px 52px}.weather-icon{width:25px;height:25px}.weather-status strong{font-size:10px}.seat{height:clamp(25px,12cqh,45px)}.seat-main{height:calc(100% - 10px)}.avatar,.cup{width:clamp(14px,8cqh,28px);height:clamp(14px,8cqh,28px)}.seat-name{font-size:7px}.choice-marker{width:14px;height:14px}.starter-marker{width:17px;height:17px}.seat-markers{height:20px}.feedback .eyebrow{font-size:8px}.feedback p{font-size:9px}.control-hint{display:none}}


.tutorial-connector{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:7;overflow:visible}.tutorial-connector line{stroke:#eef3f8;stroke-width:2;vector-effect:non-scaling-stroke}

.choices-fading .choice-marker{animation:choice-fade-out 400ms ease-out var(--choice-fade-delay,0ms) forwards}
@keyframes choice-fade-out{from{opacity:1}to{opacity:0;visibility:hidden}}
@media(prefers-reduced-motion:reduce){.choices-fading .choice-marker{animation:choice-fade-out 1ms step-end var(--choice-fade-delay,0ms) forwards!important}}

.payout .easy-payout-message{font-size:clamp(20px,4vw,28px);font-weight:700;line-height:1.35;text-align:center;color:var(--ink);margin:24px 0 12px}

.settings-footer{display:flex;flex-direction:column;gap:16px;margin-top:28px;padding-top:18px;border-top:1px solid var(--line)}.settings-version-link{align-self:center;background:none;border:0;text-decoration:underline;font-size:12px;color:var(--muted)}.credits-content{text-align:center;padding:50px 15px}.credits-content p{font-size:20px}.credits-content a{font-size:30px;color:var(--ink)}.patch-notes article{margin-bottom:26px}.patch-notes h3{color:var(--ink)}.patch-notes li{margin:10px 0;line-height:1.6}
.seat .cup{width:48px;height:48px}
@media(max-width:760px){.seat .cup{width:clamp(36px,7.6cqh,44px);height:clamp(36px,7.6cqh,44px)}.seat .avatar{width:clamp(38px,8cqh,46px);height:clamp(38px,8cqh,46px)}}
@media(max-width:1000px) and (max-height:570px){.seat .cup{width:30px;height:30px}.seat .avatar{width:32px;height:32px}.seat .hat-marker{width:26px;height:26px}}

.weather-menu button.weather-locked{margin:0;padding:13px 16px;color:var(--muted);background:#18202a;border-color:var(--line);opacity:.65}.weather-locked strong{display:block;font-size:15px}.weather-locked small{display:block;margin-top:6px;font-size:11px}.online-section-divider{display:flex;align-items:center;gap:12px;margin:6px 0 12px;color:var(--muted);font-size:10px;letter-spacing:1.5px}.online-section-divider::before,.online-section-divider::after{content:"";height:1px;flex:1;background:var(--line)}.menu-bottom-links{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}

.game-entry-transition{position:fixed;inset:0;z-index:1000;background:#10151d;overflow:hidden}.game-entry-transition img{position:absolute;width:100%;height:100%;object-fit:cover}.entry-menu{animation:entry-menu-fade 850ms ease both}.entry-game{animation:entry-crossfade 850ms ease both}@keyframes entry-menu-fade{from{opacity:1}to{opacity:0}}@keyframes entry-crossfade{from{opacity:0}to{opacity:1}}
