:root{--paper:#fbf3e2;--paper-2:#f3e5c6;--ink:#24323f;--muted:#6d7680;--accent:#e07a2e;--accent-ink:#fff;--sea:#2b5d7a;--sea-2:#4aa3c7;--good:#2e8b57;--warn:#c0392b;--card:#fffaf0;--radius:14px;--shadow:0 2px 0 #24323f2e, 0 6px 18px #24323f1f;color:var(--ink);background:var(--paper);-webkit-tap-highlight-color:transparent;font-family:Nunito,Trebuchet MS,system-ui,-apple-system,Segoe UI,sans-serif}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:radial-gradient(circle at 50% -20%, #fff6dd, var(--paper) 60%)}h1,h2,h3{margin:0 0 .4em;line-height:1.15}h2{font-size:1.15rem}h3{font-size:1rem}.muted{color:var(--muted)}.small{font-size:.85rem}button{font:inherit;color:var(--ink);background:var(--card);border:2px solid var(--ink);cursor:pointer;box-shadow:0 2px 0 var(--ink);touch-action:manipulation;border-radius:10px;padding:.45em .85em;font-weight:700;transition:transform 50ms,box-shadow 50ms}button:hover:not(:disabled){background:#fff}button:active:not(:disabled){box-shadow:0 0 0 var(--ink);transform:translateY(2px)}button:disabled{opacity:.45;cursor:not-allowed}button.primary{background:var(--accent);color:var(--accent-ink)}button.primary:hover:not(:disabled){background:#ee8a3c}button.big{width:100%;padding:.7em 1.2em;font-size:1.1rem}button.small{box-shadow:0 1px 0 var(--ink);padding:.25em .6em;font-size:.8rem}button.link{box-shadow:none;background:0 0;border:none;padding:.3em;text-decoration:underline}button.active{background:#ffe2a8}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--sea-2);outline-offset:2px}input,select{font:inherit;border:2px solid var(--ink);color:var(--ink);background:#fff;border-radius:10px;min-width:0;padding:.5em .65em}.card{background:var(--card);border:2px solid var(--ink);border-radius:var(--radius);box-shadow:var(--shadow);padding:1rem}.field{flex-direction:column;flex:1;gap:.25rem;font-size:.9rem;font-weight:700;display:flex}.field.row{flex-direction:row;justify-content:space-between;align-items:center;gap:.75rem}.field.row span{font-weight:600}.toggle{cursor:pointer;align-items:center;gap:.5rem;font-size:.9rem;font-weight:600;display:flex}.toggle input{width:1.2em;height:1.2em;accent-color:var(--accent)}.tag{text-transform:uppercase;letter-spacing:.03em;background:var(--paper-2);border-radius:6px;margin-left:.3em;padding:.05em .4em;font-size:.7rem;font-style:normal;font-weight:800}.tag.warn{color:var(--warn);background:#ffd9d2}.notice{border:2px solid var(--ink);background:#fff1c9;border-radius:10px;padding:.5em .8em}.landing{text-align:center;flex-direction:column;gap:1rem;max-width:440px;margin:0 auto;padding:1.5rem 16px 3rem;display:flex}.landing h1{letter-spacing:.01em;font-size:2.4rem}.tagline{color:var(--muted);margin:-.6rem 0 .4rem}.hero-art{filter:drop-shadow(0 4px #24323f40);width:180px;margin:0 auto}.landing .card{text-align:left;flex-direction:column;gap:.8rem;display:flex}.join-row{align-items:flex-end;gap:.5rem;display:flex}.join-row button{flex:none;width:auto}.lobby{max-width:980px;margin:0 auto;padding:1rem 16px 3rem}.lobby-head{justify-content:space-between;align-items:center;display:flex}.lobby-grid{grid-template-columns:1fr 1fr;gap:1rem;display:grid}.col{flex-direction:column;gap:1rem;min-width:0;display:flex}.invite{text-align:center;flex-direction:column;align-items:stretch;gap:.6rem;display:flex}.room-code{letter-spacing:.25em;padding-left:.25em;font-size:2.6rem;font-weight:900}.invite-link{text-align:center;font-size:.85rem}.seats{flex-direction:column;gap:.4rem;margin:0;padding:0;list-style:none;display:flex}.seats li{background:var(--paper);border-radius:10px;align-items:center;gap:.5rem;min-height:2.8rem;padding:.45rem .6rem;display:flex}.seats li.empty{background:0 0;border:2px dashed #c9b88f}.seats li.away{opacity:.6}.seat-name{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-weight:800;overflow:hidden}.color-grid{flex-wrap:wrap;gap:.4rem;margin-bottom:.8rem;display:flex}.color-swatch{border-radius:50%;padding:.25rem;line-height:0}.color-swatch.picked{outline:3px solid var(--accent);background:#ffe2a8}.rules{flex-direction:column;gap:.6rem;display:flex}.rules legend{padding:0 .3rem;font-size:1.15rem;font-weight:900}.rules:disabled select,.rules:disabled input{opacity:.75}.start-card{text-align:center}.game{grid-template-columns:minmax(0,1fr) 380px;height:100dvh;display:grid;overflow:hidden}.board-area{background:radial-gradient(circle at 50% 45%, #6cc0de, var(--sea) 75%);min-width:0;min-height:0;position:relative}.panzoom,.panzoom svg{width:100%;height:100%;display:block}.panzoom svg{touch-action:none;-webkit-user-select:none;user-select:none;cursor:grab}.panzoom svg:active{cursor:grabbing}.zoom-buttons{flex-direction:column;gap:6px;display:flex;position:absolute;bottom:10px;right:10px}.zoom-buttons button{width:38px;height:38px;padding:0;font-size:1.2rem}.prompt-bar{background:var(--card);border:2px solid var(--ink);max-width:calc(100% - 20px);box-shadow:var(--shadow);white-space:nowrap;text-overflow:ellipsis;border-radius:999px;align-items:center;gap:.75em;padding:.4em 1em;font-weight:800;display:flex;position:absolute;top:10px;left:50%;overflow:hidden;transform:translate(-50%)}.prompt-bar.mine{background:#ffe2a8}.countdown{font-variant-numeric:tabular-nums;color:var(--muted)}.countdown.low{color:var(--warn);animation:1s infinite pulse}.dice-tray{border:2px solid var(--ink);background:#fffaf0d9;border-radius:12px;align-items:center;gap:4px;padding:4px 8px;display:flex;position:absolute;top:10px;left:10px}.dice-sum{margin-left:4px;font-size:1.4rem}.dice-tray.rolling svg{animation:.6s ease-out tumble}.dice-tray.rolling svg:nth-child(2){animation-duration:.65s}@keyframes tumble{0%{transform:translateY(-30px)rotate(-200deg)scale(.7)}60%{transform:translateY(4px)rotate(20deg)scale(1.05)}to{transform:none}}.turn-banner{color:#fff;background:var(--accent);border:3px solid var(--ink);box-shadow:var(--shadow);pointer-events:none;border-radius:20px;padding:.2em .8em;font-size:clamp(1.8rem,6vw,3.2rem);font-weight:900;animation:1.8s ease-out forwards pop;position:absolute;top:40%;left:50%;transform:translate(-50%,-50%)}@keyframes pop{0%{opacity:0;transform:translate(-50%,-50%)scale(.4)}15%{opacity:1;transform:translate(-50%,-50%)scale(1.08)}25%{transform:translate(-50%,-50%)scale(1)}80%{opacity:1}to{opacity:0}}.gains{pointer-events:none;gap:6px;display:flex;position:absolute;bottom:70px;left:50%;transform:translate(-50%)}.gain-chip{background:var(--card);border:2px solid var(--ink);opacity:0;border-radius:999px;align-items:center;gap:2px;padding:2px 8px;font-weight:900;animation:1.5s ease-out forwards rise;display:inline-flex}@keyframes rise{0%{opacity:0;transform:translateY(20px)}20%{opacity:1;transform:translateY(0)}80%{opacity:1}to{opacity:0;transform:translateY(-50px)}}.target{cursor:pointer}.target-vertex{fill:#ffffffd9;stroke:var(--accent);stroke-width:.06px;animation:1.1s ease-in-out infinite glow}.target-edge{stroke:#ffffffd9;stroke-width:.17px;stroke-linecap:round;animation:1.1s ease-in-out infinite glow}.target-edge:hover,.target-vertex:hover{stroke:#fff;fill:#ffe2a8}.target-hex{fill:#ffffff2e;stroke:#fff;stroke-width:.07px;stroke-dasharray:.15 .1;animation:1.1s ease-in-out infinite glow}.target-hex:hover{fill:#fff6}@keyframes glow{50%{opacity:.45}}@keyframes pulse{50%{opacity:.5}}.hex-flash{fill:#fff6b0;opacity:0;pointer-events:none;animation:1.2s ease-out flash}@keyframes flash{20%{opacity:.7}to{opacity:0}}.fog-wrap{animation:.5s ease-out drift}@keyframes drift{0%{opacity:0;transform:scale(.6)}}.piece{animation:.35s ease-out place}@keyframes place{0%{opacity:0}}.side{border-left:3px solid var(--ink);background:var(--paper);flex-direction:column;min-height:0;display:flex}.side-scroll{flex-direction:column;flex:1;gap:10px;min-height:0;padding:10px;display:flex;overflow-y:auto}.drawer-handle{display:none}.players{flex-direction:column;gap:6px;display:flex}.player-row{background:var(--card);border:2px solid #0000;border-radius:12px;align-items:center;gap:8px;padding:6px 8px;display:flex}.player-row.current{border-color:var(--ink);background:#ffe9bb}.player-row.away{opacity:.7}.pr-main{flex:1;min-width:0}.pr-name{flex-wrap:wrap;align-items:center;font-weight:800;display:flex}.pr-name .nm{text-overflow:ellipsis;white-space:nowrap;max-width:10em;overflow:hidden}.pr-stats{color:var(--muted);flex-wrap:wrap;align-items:center;gap:8px;font-size:.8rem;display:flex}.pr-stats svg{vertical-align:-2px}.mini-card{border:1.5px solid var(--muted);vertical-align:-2px;background:#fff;border-radius:2px;width:9px;height:13px;display:inline-block}.award{background:var(--accent);color:#fff;border-radius:6px;padding:0 5px;font-weight:800}.pr-vp{flex-direction:column;align-items:center;line-height:1;display:flex}.pr-vp b{font-size:1.5rem}.pr-vp small{color:var(--good);font-size:.7rem;font-weight:800}.pr-vp span{color:var(--muted);font-size:.65rem;font-weight:800}.hand{background:var(--card);border:2px solid var(--ink);border-radius:12px;padding:8px}.hand-res{justify-content:space-between;gap:4px;display:flex}.res-count{align-items:center;gap:2px;font-size:1.05rem;display:inline-flex}.hand .res-count{background:var(--paper);border-radius:10px;flex-direction:column;min-width:48px;padding:4px 6px}.res-count.dim{opacity:.4}.counts-inline{vertical-align:middle;gap:6px;display:inline-flex}.counts-inline .res-count{font-size:.9rem}.scrolls{flex-direction:column;gap:4px;margin-top:8px;display:flex}.scroll-card{align-items:center;gap:6px;font-size:.9rem;font-weight:700;display:flex}.scroll-card span{flex:1}.actions{flex-direction:column;gap:8px;display:flex}.build-row{grid-template-columns:repeat(4,1fr);gap:6px;display:grid}.build-row button{flex-direction:column;align-items:center;gap:2px;padding:.4em .2em;font-size:.85rem;display:flex}.cost{flex-wrap:wrap;justify-content:center;gap:1px;display:flex}.end-row{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.end-row button.primary{flex:1}.roll{font-size:1.3rem!important}.tabs{gap:4px;display:flex}.tabs button{box-shadow:none;border-radius:10px 10px 0 0;flex:1;position:relative}.tab-body{background:var(--card);border:2px solid var(--ink);border-radius:0 0 12px 12px;min-height:160px;margin-top:-12px;padding:8px}.dot{background:var(--warn);color:#fff;text-align:center;border-radius:999px;min-width:1.3em;height:1.3em;margin-left:4px;font-size:.75rem;line-height:1.3em;display:inline-block}.log{max-height:260px;margin:0;padding:0;font-size:.88rem;list-style:none;overflow-y:auto}.log li{border-bottom:1px dashed #e4d6b4;padding:3px 0}.log li.ev-gameOver,.log li.ev-award{font-weight:800}.chat ol{max-height:220px;margin:0 0 6px;padding:0;font-size:.9rem;list-style:none;overflow-y:auto}.chat li{overflow-wrap:anywhere;padding:2px 0}.chat form{gap:6px;display:flex}.chat input{flex:1}.side-foot{justify-content:space-between;align-items:center;gap:8px;display:flex}.trade-panel{flex-direction:column;gap:10px;display:flex}.offers{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.offer{background:var(--paper);border-radius:10px;padding:6px 8px;font-size:.9rem}.responses{flex-wrap:wrap;gap:6px;margin:3px 0;font-size:.75rem;display:flex}.resp.accepted{color:var(--good);font-weight:800}.resp.declined{color:var(--muted);text-decoration:line-through}.offer-buttons{flex-wrap:wrap;gap:6px;display:flex}.composer,.bank-trade{border-top:2px dashed #e4d6b4;flex-direction:column;gap:4px;padding-top:8px;display:flex}.composer p,.bank-trade p{margin:4px 0 0}.count-editor{grid-template-columns:repeat(5,1fr);gap:4px;display:grid}.count-cell{background:var(--paper);border-radius:10px;flex-direction:column;align-items:center;padding:4px 2px;display:flex}.stepper{align-items:center;gap:2px;display:flex}.stepper button{box-shadow:none;border-width:1.5px;padding:0 .45em;font-size:1rem}.stepper b{text-align:center;min-width:1.2em}.resource-picker{grid-template-columns:repeat(5,1fr);gap:4px;display:grid}.resource-picker button{box-shadow:none;flex-direction:column;align-items:center;padding:4px 2px;font-size:.72rem;display:flex}.resource-picker button.picked{outline:3px solid var(--accent);background:#ffe2a8}.ratios{text-align:center;color:var(--muted);grid-template-columns:repeat(5,1fr);display:grid}.modal-backdrop{z-index:50;background:#141e2873;place-items:center;padding:16px;display:grid;position:fixed;inset:0}.modal{background:var(--card);border:3px solid var(--ink);width:min(460px,100%);max-height:90dvh;box-shadow:var(--shadow);border-radius:18px;flex-direction:column;gap:.8rem;padding:1.2rem;animation:.2s ease-out drift;display:flex;overflow-y:auto}.steal-list{flex-direction:column;gap:8px;display:flex}.steal-list button{justify-content:center;align-items:center;gap:8px;display:flex}.final-scores{margin:0;padding-left:1.4em;font-size:1.05rem;line-height:1.8}.waking{z-index:100;color:#fff;text-align:center;background:linear-gradient(#1f3b52,#2b5d7a);place-items:center;padding:16px;display:grid;position:fixed;inset:0}.waking-card{max-width:360px}.waking-card p{opacity:.85}.lantern{transform-origin:50% -30px;background:#ffcf5a;border:4px solid #1d3446;border-radius:24px;width:70px;height:90px;margin:0 auto 1rem;animation:2.4s ease-in-out infinite sway;position:relative}.lantern:before{content:"";background:#1d3446;border-radius:4px;width:26px;height:12px;position:absolute;top:-16px;left:18px}.lantern-glow{background:#ff8a3d;border-radius:50%;animation:1.4s ease-in-out infinite pulse;position:absolute;inset:22px}@keyframes sway{50%{transform:rotate(6deg)}0%,to{transform:rotate(-6deg)}}.reconnect-bar{z-index:90;border-bottom:2px solid var(--ink);text-align:center;background:#ffd9d2;padding:6px;font-weight:800;position:fixed;top:0;left:0;right:0}.toast{z-index:120;background:var(--ink);color:#fff;max-width:calc(100% - 32px);box-shadow:var(--shadow);border-radius:12px;padding:.6em 1em;font-weight:700;animation:.2s ease-out drift;position:fixed;bottom:24px;left:50%;transform:translate(-50%)}@media (width<=820px){.lobby-grid{grid-template-columns:1fr}.game{grid-template-rows:1fr;grid-template-columns:1fr}.board-area{height:calc(62dvh + 16px)}.side{z-index:20;border-left:none;border-top:3px solid var(--ink);border-radius:18px 18px 0 0;max-height:38dvh;transition:max-height .25s;position:fixed;bottom:0;left:0;right:0;box-shadow:0 -6px 18px #24323f33}.drawer-open .side{max-height:82dvh}.drawer-handle{box-shadow:none;background:var(--paper-2);border:none;border-radius:18px 18px 0 0;align-items:center;gap:8px;padding:8px 12px;display:flex;position:relative}.grip{background:#b9a271;border-radius:2px;width:40px;height:4px;position:absolute;top:4px;left:50%;transform:translate(-50%)}.drawer-label{text-align:left;white-space:nowrap;text-overflow:ellipsis;flex:1;overflow:hidden}.prompt-bar{display:none}.zoom-buttons{bottom:26px}.gains{bottom:30px}.hand .res-count{flex:1;min-width:0}.side-scroll .hand{order:1}.side-scroll .actions{order:2}.side-scroll .players{order:3}.side-scroll .tabs{order:4}.side-scroll .tab-body{order:5}.side-scroll .side-foot{order:6}.build-row button{font-size:.75rem}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition:none!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
