:root{--bg: #12222e;--panel: #1d3a4f;--panel2: #173246;--ink: #f4efe3;--muted: #a9bccb;--accent: #e8b04a;--danger: #ff8d80;--good: #5fd07a;--radius: 12px;color-scheme:dark;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--ink)}*{box-sizing:border-box}html,body{margin:0;height:100%}body{overscroll-behavior:none;-webkit-tap-highlight-color:transparent}h2,h3{margin:0}h3{font-size:1rem;display:flex;align-items:center;gap:6px}p{margin:0}button,.button,input,select{font:inherit;min-height:44px;border-radius:var(--radius);border:1px solid #36566d;background:#23465f;color:var(--ink);padding:0 14px}button,.button{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none}button:disabled{opacity:.45;cursor:default}button:focus-visible,.button:focus-visible,input:focus-visible{outline:3px solid var(--accent);outline-offset:1px}button.primary,.button.primary{background:var(--accent);color:#1b1b1b;border:none;font-weight:700}button.link{background:none;border:none;padding:0 8px;min-width:44px}button.good{background:#2b6b3f;border-color:#3f9a58}button.sel{outline:2px solid var(--accent)}input{background:#0f1d27;width:100%}.icon{flex:none;vertical-align:-.2em}.muted{color:var(--muted)}.small{font-size:.85em}.error{color:var(--danger)}.grow{flex:1;min-width:0}.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.row input{flex:1}.ok{color:var(--good);display:flex;gap:6px;align-items:center;font-weight:600}.err{color:var(--danger);display:flex;gap:6px;align-items:center;font-weight:600;font-size:.92em}.home{max-width:420px;margin:0 auto;padding:24px 16px;display:flex;flex-direction:column;gap:12px}.home h1{margin:12px 0 0;font-size:2.2rem}.home label{display:flex;flex-direction:column;gap:6px}.home .file input{padding:10px}.back-link{align-self:flex-start;color:var(--muted);text-decoration:none;padding:8px 0}.back-link:hover{color:var(--ink)}.small-link{color:var(--accent);font-size:.9em}.whoami{margin:0;padding:12px 14px;border-radius:var(--radius);background:var(--panel)}.seats{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.seats li{flex-wrap:wrap;display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--panel);border-radius:var(--radius);min-height:48px}.room{display:flex;flex-direction:column;height:100dvh}.bar{display:flex;align-items:center;gap:10px;padding:2px 10px;padding-top:max(2px,env(safe-area-inset-top));background:var(--panel)}.bar strong{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.code{font-family:ui-monospace,monospace;letter-spacing:2px;background:#0f1d27;padding:4px 8px;border-radius:8px}.dot{width:10px;height:10px;border-radius:50%;background:var(--danger)}.dot.on{background:var(--good)}.status{padding:8px 12px;font-weight:700;display:flex;justify-content:space-between;gap:8px;align-items:center;background:#102a3b;min-height:44px}.dice{color:var(--accent);white-space:nowrap;display:inline-flex;align-items:center;gap:4px}.players{list-style:none;margin:0;padding:4px 6px;display:flex;gap:6px;overflow-x:auto;background:#102a3b}.players li{flex:1 0 86px;padding:4px 6px;border-radius:8px;background:var(--panel2);border:2px solid transparent;border-left-width:8px;min-width:0}.players li.current{border-top-color:var(--accent);border-right-color:var(--accent);border-bottom-color:var(--accent)}.pname{display:flex;align-items:center;gap:4px;font-weight:700;font-size:.8rem}.nm{min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.1}.pstats{display:flex;gap:8px;font-size:.8rem;color:var(--muted);flex-wrap:wrap}.pstats span{display:inline-flex;align-items:center;gap:2px}.badges{display:flex;flex-wrap:wrap;gap:3px}.badge{font-size:.7rem;background:#5a4410;color:#ffe3a1;border-radius:6px;padding:1px 5px;display:inline-flex;align-items:center;gap:2px}.swatch{width:14px;height:14px;border-radius:4px;border:1px solid #0006;display:inline-block;flex:none}.main{flex:1;min-height:0;display:flex;flex-direction:column}.main.locked .side,.main.locked .board-wrap{pointer-events:none;opacity:.75}.board-wrap{flex:0 0 auto;height:min(100vw,46dvh);min-height:0;display:flex;align-items:center;justify-content:center;padding:2px}.board{width:100%;height:100%;max-height:100%;touch-action:manipulation}.side{flex:1 1 0;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:var(--panel);border-radius:var(--radius) var(--radius) 0 0;padding:8px;padding-bottom:max(8px,env(safe-area-inset-bottom));gap:8px}.side>*{flex:none}.side{overflow:hidden}.side-fixed{display:flex;flex-direction:column;gap:8px;flex:0 1 auto;min-height:0;overflow-y:auto}.side-fixed>*{flex:none}.main.prompting .board-wrap{height:min(100vw,32dvh)}.side-scroll{flex:1 1 0;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:8px}.side-scroll>*{flex:none}.tabpanel{display:flex;flex-direction:column;gap:8px}@media(max-height:700px){.board-wrap{height:min(100vw,38dvh)}}@media(min-width:900px){.main{flex-direction:row}.board-wrap,.main.prompting .board-wrap{flex:1 1 auto;height:auto;padding:8px}.side{flex:0 0 400px;border-radius:0}.players li{flex:1 0 150px}}.tabs{display:flex;gap:4px;flex-wrap:wrap}.tabs button{flex:1 1 0;min-width:0;min-height:44px;padding:2px;flex-direction:column;gap:0;background:var(--panel2);font-size:.72rem;line-height:1.1}.tabs button.on{background:#2c5877;border-color:var(--accent)}.box{background:var(--panel2);border-radius:var(--radius);padding:10px;display:flex;flex-direction:column;gap:8px}.chips{display:flex;flex-wrap:wrap;gap:6px}.chip{min-height:44px;border-radius:999px;padding:0 12px;background:#23465f}.chip.on{background:var(--accent);color:#1b1b1b;border-color:var(--accent);font-weight:700}.chip.static{display:inline-flex;align-items:center;gap:4px;border:1px solid #36566d;font-size:.9rem}.chip.decline{color:var(--danger)}.chip.good{background:#2b6b3f;border-color:#3f9a58}.log{list-style:none;margin:0;padding:4px;font-size:.92em;display:flex;flex-direction:column;gap:4px}.log li{padding:3px 0;border-bottom:1px solid #ffffff12}.log li.admin{color:var(--accent)}.log li.reverted{text-decoration:line-through;opacity:.5}.chat{display:flex;flex-direction:column;gap:6px}.chatlog{max-height:220px;overflow-y:auto}.admin{display:flex;flex-direction:column;gap:8px}.admin .row>span{flex:1}.admin input[type=number]{width:80px;flex:none}.hand{background:#0f1d27;border-radius:var(--radius);padding:8px;display:flex;flex-direction:column;gap:6px}.cards{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.rcard{display:grid;grid-template-columns:auto auto;justify-content:center;align-items:center;column-gap:4px;padding:4px 2px;border-radius:8px;background:var(--c);color:#fff;line-height:1.15}.rcard.zero{opacity:.4}.rcard small{grid-column:1 / -1;text-align:center}.rcard-img{width:22px;height:auto;aspect-ratio:2 / 3;border-radius:3px;box-shadow:0 1px 2px #0006}.rcard b{font-size:1.25rem}.rcard small{font-size:.7rem}.hand-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;color:var(--muted)}.devtag{color:var(--accent)}.actions{display:flex;gap:8px}.actions .big{flex:1;min-height:56px;font-size:1.15rem}.over-bar{padding:8px}.res-row{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.res-wrap{position:relative}.res{width:100%;min-height:64px;padding:4px 2px;flex-direction:column;gap:0;background:var(--c);border:2px solid transparent;color:#fff;font-size:.72rem;line-height:1.2}.res .em{display:flex}.res-img{width:1.5em;height:1.5em;vertical-align:middle}.res .res-img{width:30px;height:30px}.res b{font-size:.95rem;min-height:1.1em}.res.on{border-color:#fff;box-shadow:0 0 0 2px var(--accent)}.mini{position:absolute;top:-14px;right:-12px;min-height:44px;width:44px;padding:0;background:none;border:none}.mini .icon{box-sizing:content-box;padding:6px;border-radius:50%;background:#0f1d27;border:1px solid #36566d}.build-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.build{flex-direction:column;min-height:96px;gap:2px;padding:6px}.build.on{border-color:var(--accent);background:#2c5877;box-shadow:0 0 0 2px var(--accent)}.build .bl{font-weight:700}.cost{display:inline-flex;gap:6px;flex-wrap:wrap;justify-content:center}.cost-item{white-space:nowrap}.devrow{display:flex;gap:10px;align-items:center}.devcard-img{width:48px;height:auto;aspect-ratio:2 / 3;flex:none;border-radius:5px;box-shadow:0 1px 3px #0008}.back-img{width:22px;height:auto;aspect-ratio:2 / 3;border-radius:3px}.trophy-img{align-self:center;width:112px;height:112px}.offers{display:flex;flex-direction:column;gap:8px}.card-box{background:#3a3a1a;border:2px solid var(--accent);border-radius:var(--radius);padding:10px;display:flex;flex-direction:column;gap:8px}.card-box.mine{background:#1a3a3a;border-color:#4aa6a6}.card-box .row button{flex:1;min-width:90px}.win{position:fixed;inset:0;background:#000b;display:flex;align-items:center;justify-content:center;padding:16px;z-index:10}.win-card{background:var(--panel);border-radius:16px;padding:20px;width:min(420px,100%);display:flex;flex-direction:column;gap:12px;align-items:stretch;text-align:center;color:var(--accent)}.win-card h2{color:var(--ink);font-size:1.8rem}.win-card .icon{align-self:center}.final{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;color:var(--ink);text-align:left}.final li{display:flex;gap:8px;align-items:center;padding:8px 10px;background:var(--panel2);border-radius:10px}.final li.champ{outline:2px solid var(--accent)}.hex{stroke:#f3e7c9;stroke-width:2.5}.token-num{font-size:21px;font-weight:800;paint-order:stroke;stroke:#fbf3df;stroke-width:3px;text-anchor:middle;dominant-baseline:central;fill:#1a1a1a;pointer-events:none}.token-num.red{fill:#b3261e}.robber{pointer-events:none}.road-edge{stroke:#111;stroke-width:11;stroke-linecap:round}.road{stroke-width:7;stroke-linecap:round}.piece{stroke:#111;stroke-width:2.5;stroke-linejoin:round}.piece.city{stroke-width:3}.port-edge{stroke:#f2c14e;stroke-width:6;stroke-linecap:round}.port-stem{stroke:#f2c14e;stroke-width:3}.port-corner{fill:#f2c14e;stroke:#3b2f1a;stroke-width:1.5}.port-badge{fill:#fbf3df;stroke-width:3.5}.port-ratio{font-size:15px;font-weight:800;text-anchor:middle;dominant-baseline:central;fill:#3b2f1a}.port-label{font-size:12px;font-weight:800;text-anchor:middle;dominant-baseline:central;fill:#fff;paint-order:stroke;stroke:#1d4e6b;stroke-width:4px}.port{pointer-events:none}.token-num.bare{font-size:25px;stroke-width:5px}.disc-toggle{flex:none;min-height:36px;padding:2px 8px;font-size:.72rem}.target{cursor:pointer}.hit{fill:transparent;stroke:transparent;stroke-width:36;stroke-linecap:round;pointer-events:all}.road-edge,.road,.piece,.token,.token-num{pointer-events:none}.target-vertex{fill:#ffe08a;stroke:#fff;stroke-width:3;animation:pulse 1.1s ease-in-out infinite;transform-box:fill-box;transform-origin:center}.target-edge{stroke:#ffe08a;stroke-width:9;stroke-linecap:round;opacity:.9;animation:fade 1.1s ease-in-out infinite}.target-hex{fill:#ffe08a;fill-opacity:.5;stroke:#fff;stroke-width:4;cursor:pointer;animation:fade 1.1s ease-in-out infinite}@keyframes pulse{50%{transform:scale(1.35)}}@keyframes fade{50%{opacity:.55}}@media(prefers-reduced-motion:reduce){.target-vertex,.target-edge,.target-hex{animation:none}}@media(max-height:700px){.players li{padding:2px 6px}.rcard{flex-flow:row wrap;justify-content:center;align-items:center;column-gap:4px;padding:2px}.rcard small{flex-basis:100%;text-align:center}.hand{padding:6px;gap:2px}.actions .big{min-height:48px}}
