:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#1b1c1f;background:#f6f4ef}*{box-sizing:border-box}body{margin:0}#root{min-height:100vh}button,input{font:inherit}button{min-height:36px;border:1px solid #2d2f34;border-radius:6px;background:#fff;color:#1b1c1f;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}input{width:100%;min-height:36px;border:1px solid #b7b3aa;border-radius:6px;padding:0 10px;background:#fff}input:disabled{color:#4b4d52;background:#f1eee8}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.app-shell{min-height:100vh;padding:24px}.app-shell.game-shell{height:100dvh;min-height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;padding:14px}.topbar,.status-strip,.rulebook-header,.room-heading,.room-actions,.player-title,.player-row,.bank-row,.cost-row,.card-actions,.deck-actions,.segmented-control,.payment-chip-row,.chat-form,.chat-message{display:flex;align-items:center}.topbar{justify-content:space-between;gap:16px;margin-bottom:18px}.game-shell .topbar{margin-bottom:10px}.topbar h1{margin:0;font-size:32px}.eyebrow{margin:0 0 4px;color:#6f6357;font-size:13px}.status-strip{gap:10px;flex-wrap:wrap}.dot{width:10px;height:10px;border-radius:50%;background:#9b332c}.dot.online{background:#2e7d54}.error-banner,.final-round,.winner-box{border:1px solid #9b332c;border-radius:6px;padding:10px 12px;background:#fff0eb}.lobby-grid,.game-layout{display:grid;gap:16px}.lobby-grid{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}.game-layout{grid-template-columns:minmax(220px,280px) 1fr minmax(260px,320px);align-items:start}.game-shell .game-layout{grid-template-columns:minmax(190px,230px) minmax(0,1fr) minmax(260px,300px);grid-template-rows:minmax(0,1fr) auto;grid-template-areas:"players board actions" "players chat actions";gap:10px;min-height:0;overflow:hidden;align-items:stretch}.mobile-play-tabs{display:none}.panel{border:1px solid #c8c1b4;border-radius:8px;padding:16px;background:#fffdfa}.panel h2,.panel h3{margin:0 0 12px}.rulebook-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;display:grid;place-items:center;padding:18px;background:#1b1c1f8a}.rulebook-dialog{width:min(940px,100%);max-height:min(820px,calc(100vh - 36px));overflow:hidden;border:1px solid #2d2f34;border-radius:8px;background:#fffdfa;box-shadow:0 18px 60px #1b1c1f47}.rulebook-header{justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid #ded7ca}.rulebook-header h2{margin:0;font-size:28px}.close-button{width:40px;min-width:40px;padding:0;font-size:24px;line-height:1}.rulebook-body{max-height:calc(min(820px,100vh - 36px) - 78px);overflow-y:auto;padding:20px;display:grid;gap:18px}.rulebook-summary,.rulebook-action-grid{display:grid;gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}.rulebook-summary>div,.rulebook-action{border:1px solid #ded7ca;border-radius:8px;padding:12px;background:#fff}.rulebook-summary p,.rulebook-action p,.rulebook-section p{margin:8px 0 0;line-height:1.55}.rulebook-section h3{margin:0 0 10px}.rulebook-table{display:grid;overflow:hidden;border:1px solid #ded7ca;border-radius:8px}.rulebook-row{display:grid;grid-template-columns:84px repeat(2,minmax(0,1fr))}.rulebook-row+.rulebook-row{border-top:1px solid #ded7ca}.rulebook-row span{padding:10px 12px}.rulebook-row span:first-child{font-weight:700;background:#f1eee8}.rulebook-list{margin:0;padding-left:20px;display:grid;gap:8px;line-height:1.55}.panel label,.action-group{display:grid;gap:8px;margin-bottom:12px}.room-heading{justify-content:space-between;gap:12px}.room-heading p,.turn-note,.muted{color:#6f6357}.player-rows,.player-list,.player-card-list,.board-area,.market-grid,.action-panel,.right-rail,.players-pane,.chat-dock,.mobile-chat-pane,.chat-panel,.chat-log{display:grid;gap:12px}.players-pane{grid-area:players;min-height:0;overflow:hidden}.game-shell .board-area{grid-area:board;min-height:0;overflow:hidden;grid-template-rows:auto auto minmax(0,1fr);gap:8px}.right-rail{grid-area:actions;min-height:0;overflow:hidden;align-self:stretch;grid-template-rows:minmax(0,1fr) auto}.chat-dock{grid-area:chat;min-height:0}.mobile-chat-pane{display:none}.player-row,.player-card{border:1px solid #ded7ca;border-radius:6px;padding:10px}.game-shell .panel{min-height:0;padding:10px}.lobby-profile{align-self:start}.profile-state,.ready-summary,.room-capacity,.status-pill,.lobby-badge{border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-weight:700}.profile-state{min-height:32px;padding:6px 10px}.profile-state.ready,.ready-summary.ready,.status-pill.ready{color:#185c3a;background:#dff5e8;border:1px solid #77b88e}.profile-state.waiting,.ready-summary.waiting,.status-pill.waiting{color:#7a4d12;background:#fff0c6;border:1px solid #d7a84a}.room-actions{justify-content:flex-end;flex-wrap:wrap}.ready-summary{min-height:36px;padding:6px 12px}.room-capacity{min-height:36px;padding:6px 12px;color:#303236;background:#ebe6dc;border:1px solid #c8c1b4}.ready-button.ready{border-color:#185c3a;background:#edf8f1}.ready-button.waiting{border-color:#7a4d12;background:#fff7df}.lobby-room-panel{grid-column:1 / -1}.player-row{justify-content:space-between;gap:12px;min-height:64px}.player-row.ready{border-color:#77b88e;background:#f4fbf6}.player-row.waiting{border-color:#d7a84a;background:#fffaf0}.player-identity{display:grid;gap:6px;min-width:0}.player-identity strong{overflow-wrap:anywhere}.badge-row{display:flex;flex-wrap:wrap;gap:6px}.lobby-badge{min-height:22px;padding:2px 8px;font-size:12px;color:#303236;background:#ebe6dc;border:1px solid #c8c1b4}.lobby-badge.me{color:#184f78;background:#d9edff;border-color:#87b9df}.lobby-badge.host{color:#5f3e00;background:#ffedb0;border-color:#d7a84a}.lobby-badge.offline{color:#7b1d1a;background:#ffe1de;border-color:#d79b94}.status-pill{min-width:88px;min-height:34px;padding:4px 10px;font-size:13px}.start-button{width:100%}.player-card.active{border-color:#2e7d54;background:#edf8f1}.player-list{min-height:0;overflow:hidden;align-content:start}.player-card-list{min-height:0;overflow-y:auto;gap:8px}.game-shell .player-card{padding:8px}.player-title{justify-content:space-between;gap:8px}.player-title strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.connection{flex:0 0 auto;border-radius:999px;padding:2px 6px;font-size:11px;font-weight:700}.connection.online{color:#185c3a;background:#dff5e8}.connection.offline{color:#7b1d1a;background:#ffe1de}.mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:10px 0}.game-shell .mini-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:6px 0;font-size:12px}.resource-row,.token-picker,.noble-row{display:flex;flex-wrap:wrap;gap:6px}.segmented-control{gap:6px}.segmented-control button{flex:1}.segmented-control button.active{color:#185c3a;border-color:#2e7d54;background:#dff5e8}.player-resource-section{display:grid;gap:6px}.player-resource-section+.player-resource-section{margin-top:10px}.resource-title{color:#6f6357;font-size:12px;font-weight:700}.resource-chip{display:inline-grid;min-width:30px;place-items:center}.bonus-chip{border-radius:3px;box-shadow:inset 0 -3px #1b1c1f1f}.token-chip{border-radius:999px}.resource-chip strong{font-size:14px}.compact-resource-row{gap:4px}.player-resource-line{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:6px}.resource-line-label{display:grid;gap:1px;color:#4b4d52;font-size:11px;font-weight:800;letter-spacing:0;line-height:1.05}.resource-line-label small{color:#6f6357;font-size:9px;font-weight:700}.game-shell .player-resource-line{grid-template-columns:34px minmax(0,1fr);gap:4px}.game-shell .resource-line-label{font-size:10px}.game-shell .resource-chip{min-width:24px;min-height:22px;padding:1px 4px}.game-shell .resource-chip strong{font-size:12px}.resource-chip.gold{min-width:38px}.gold-toggle{border-color:#7a4d12;background:#fff7df}.gold-toggle.active{color:#5f3e00;background:#ffedb0}.card-hint{border-radius:6px;padding:8px;display:grid;gap:6px;font-size:13px}.game-shell .card-hint{padding:5px;gap:4px;font-size:12px}.card-hint.buyable{color:#185c3a;background:#edf8f1;border:1px solid #77b88e}.card-hint.gold-needed{color:#5f3e00;background:#fff7df;border:1px solid #d7a84a}.card-hint.blocked{color:#7b1d1a;background:#ffe1de;border:1px solid #d79b94}.payment-chip-row{gap:6px;flex-wrap:wrap}.payment-chip{min-width:30px;font-size:12px}.gem,.bank-token,.picker-token{border-radius:6px;border:1px solid #2d2f34}.gem{min-width:28px;min-height:24px;padding:2px 6px;display:inline-grid;place-items:center;font-size:13px}.bank-row{flex-wrap:wrap;gap:8px}.game-shell .bank-row{gap:6px}.bank-token{min-width:56px;min-height:48px;padding:8px 10px;display:grid;place-items:center}.game-shell .bank-token{min-width:44px;min-height:36px;padding:5px 8px}.bank-token strong{font-size:22px}.game-shell .bank-token strong{font-size:18px}.market-level h2{margin:8px 0}.action-error{margin-top:0}.card-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px}.game-shell .market-grid{min-height:0;gap:6px;grid-template-rows:repeat(3,minmax(0,1fr))}.game-shell .market-level{min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr)}.game-shell .market-level h2{margin:0;font-size:14px}.game-shell .card-grid{min-height:0;grid-template-columns:repeat(4,minmax(112px,1fr));gap:6px}.chat-panel{border:1px solid #c8c1b4;border-radius:8px;padding:8px;background:#fffdfa}.chat-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-panel h2{margin:0;font-size:18px}.chat-panel.collapsed{gap:0}.chat-panel.collapsed h2{font-size:16px}.chat-log{max-height:min(160px,20vh);overflow-y:auto;align-content:start;padding:8px;border:1px solid #ded7ca;border-radius:6px;background:#fff}.chat-message{justify-content:flex-start;gap:8px;padding:6px 8px;border-radius:6px;background:#f6f4ef;overflow-wrap:anywhere}.chat-message.mine{background:#edf8f1}.chat-message strong{flex:0 0 auto;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-form{gap:8px}.chat-form input{min-width:0}.dev-card,.noble-tile,.reserved-card{min-height:144px;border:1px solid #3b3b3b;border-radius:8px;padding:10px;display:grid;gap:10px;background:#fff}.game-shell .dev-card{min-height:0;height:100%;padding:7px;gap:5px;overflow:hidden}.game-shell .noble-tile{min-height:64px;padding:7px;gap:5px;overflow:hidden}.game-shell .reserved-card{min-height:0;padding:8px;gap:6px}.dev-card.empty{place-items:center;color:#6f6357;border-style:dashed}.card-head{display:grid;gap:6px}.game-shell .card-head{gap:4px}.game-shell .card-head span,.game-shell .noble-tile>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.card-actions,.cost-row,.deck-actions{gap:6px;flex-wrap:wrap}.game-shell .card-actions{gap:4px}.game-shell .card-actions button{min-height:28px;padding:0 6px;font-size:12px}.game-shell .gem{min-width:24px;min-height:20px;padding:1px 5px;font-size:12px}.white{background:#fff}.blue{background:#d9edff}.green{background:#dff5e8}.red{background:#ffe1de}.black{background:#dad7d2}.gold{background:#ffedb0}.picker-token{min-width:48px;padding:0 10px;font-weight:700}.game-shell .picker-token{min-width:38px;min-height:30px;padding:0 7px}.action-panel{min-height:0;overflow-y:auto;align-content:start}.game-shell .action-panel{padding:10px;gap:8px}.action-header{position:sticky;top:0;z-index:1;display:grid;gap:4px;margin:-10px -10px 0;padding:10px;border-bottom:1px solid #ded7ca;background:#fffdfa}.action-header h2,.action-header p{margin:0}.priority-action,.compact-details{border:1px solid #ded7ca;border-radius:6px;padding:8px;background:#fff}.compact-details summary{cursor:pointer;font-weight:700}.compact-details>*+*{margin-top:8px}.game-shell .action-group{margin-bottom:0}@media(max-width:1080px){.app-shell.game-shell{grid-template-rows:auto auto minmax(0,1fr);padding:10px}.mobile-play-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;min-height:0}.mobile-play-tabs button{min-height:34px}.mobile-play-tabs button.active{color:#185c3a;border-color:#2e7d54;background:#dff5e8}.game-shell .game-layout{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr);grid-template-areas:"active";min-height:0}.game-shell .players-pane,.game-shell .board-area,.game-shell .right-rail,.game-shell .desktop-chat-pane,.game-shell .mobile-chat-pane{display:none}.game-shell .mobile-tab-board>.board-area,.game-shell .mobile-tab-players>.players-pane,.game-shell .mobile-tab-actions>.right-rail,.game-shell .mobile-tab-chat>.mobile-chat-pane{grid-area:active;display:grid;min-height:0;overflow:auto}.game-shell .mobile-tab-actions>.right-rail{overflow:hidden}.game-shell .mobile-chat-pane .chat-panel{min-height:0;grid-template-rows:auto minmax(0,1fr) auto}.game-shell .mobile-chat-pane .chat-log{max-height:none}.card-grid,.game-shell .card-grid{grid-template-columns:repeat(2,minmax(150px,1fr))}}@media(max-width:620px){.app-shell{padding:14px}.topbar{align-items:flex-start;flex-direction:column}.status-strip{align-items:stretch;width:100%}.status-strip button{flex:1}.room-heading{align-items:stretch;flex-direction:column}.room-actions{justify-content:stretch}.room-actions>*{flex:1}.player-row{align-items:stretch;flex-direction:column}.rulebook-overlay{padding:10px}.rulebook-header,.rulebook-body{padding:14px}.rulebook-summary,.rulebook-action-grid{grid-template-columns:1fr}.rulebook-row{grid-template-columns:64px 1fr}.rulebook-row span:nth-child(3){grid-column:2;border-top:1px solid #ded7ca}.card-grid{grid-template-columns:1fr}}
