/* Light table: loaded last to replace the earlier navy game layout. */
:root {--ink:#172f43;--muted:#4d6475;--green:#126749}
body,.app-shell,.main-content {background:#f3f6f8;color:#172f43}
.play-screen {background:#eef3f6!important;color:#172f43;padding:16px!important}
.play-screen h1,.play-screen h2,.play-screen h3,.play-screen strong {color:inherit}
.play-screen .eyebrow,.play-screen small,.play-screen p,.play-title span,.volume-control {color:#4d6475}
.play-toolbar {background:transparent;border:0;margin-bottom:14px}
.play-title strong {color:#17374d;font-size:22px}
.play-tools .quiet,.camera-button,.play-screen .quiet {background:#fff;color:#24465e;border:1px solid #b5c8d4}
.play-tools button {font-size:14px!important}
.primary,.play-tools .primary {background:#126b50;color:white;border-color:#126b50}
.secondary {background:#e7f0f7;color:#24465e;border:1px solid #a1bbc9}
.play-grid,.focus-mode .play-grid {display:grid!important;grid-template-columns:minmax(0,1fr) 360px!important;gap:16px;align-items:start}
.island-stage {grid-column:1!important;grid-row:1!important}
.table-sidebar {grid-column:2!important;grid-row:1!important;width:auto;display:flex;flex-direction:column;gap:12px}
.turn-banner {background:#fff;border:1px solid #c3d3dd;min-height:76px;padding:12px 16px;color:#172f43}
.turn-banner.your-turn {background:#e7f4eb;border-color:#79ad8d}
.turn-banner h1 {font-size:22px;color:#17374d}
.turn-banner p {font-size:14px;color:#415c6d}
.turn-clock,.victory-target {color:#17374d!important;background:#fff!important}
.scene-wrap {position:relative;border:1px solid #b5cbd8;background:#c6e6ef}
.board3d,.focus-mode .board3d {height:clamp(370px,55vh,700px)!important;min-height:370px!important;background:#c6e6ef}
.board-camera {color:#24465e}.board-camera #board-hover {background:#ffffffdf;color:#24465e;padding:6px 10px;border-radius:8px}
.dice-result {left:18px;bottom:48px;background:#fffef1ee;border:1px solid #9cb5c4;border-radius:12px;padding:10px 14px;color:#17374d}
.dice-caption {font-size:14px!important;color:#24465e!important;letter-spacing:1px}.dice-pair {color:#17374d!important}.dice-pair b {font-size:28px;color:#17374d}.dice-pair span {color:#17374d;font-size:34px}
.play-actions {background:#fff;border:1px solid #c3d3dd;gap:7px;padding:10px;flex-wrap:wrap}
.play-actions .build-action {background:#f2f6f9;color:#17374d;border:1px solid #b8ccd8;min-width:100px;flex:1;padding:10px}
.play-actions .build-action strong {font-size:14px}.play-actions .build-action small {color:#425e70}
.play-actions .roll-action,.play-actions .end-action {background:#126b50;color:#fff;font-size:16px}
button:disabled {opacity:.48!important;cursor:not-allowed}
.resource-art {display:inline-flex!important;align-items:center;justify-content:center;background-image:none!important;background-color:#edf3e7;border:0;border-radius:6px;overflow:hidden}
.resource-art svg {width:100%;height:100%}
.art-wood {background-color:#c9e9cf}.art-brick {background-color:#f8d6c8}.art-wool {background-color:#e2efbe}.art-grain {background-color:#ffebae}.art-ore {background-color:#d9e5ef}
.card-rail,.focus-mode .card-rail {display:block!important;position:static!important;width:100%!important;max-height:none!important;overflow:visible;background:#fff;border:1px solid #c3d3dd;border-radius:0 0 14px 14px;padding:12px 16px;margin:0;grid-column:auto;grid-row:auto}
.rail-heading {margin:0 0 10px;padding:0;border:0}.rail-heading h2 {font-size:16px}.rail-heading .eyebrow {display:none}.rail-heading>strong {font-size:19px;color:#17374d}.rail-heading>strong small {display:inline;color:#4d6475}
.resource-stacks {display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:14px;overflow:visible}
.stack-label {margin-bottom:6px}.stack-label h3 {font-size:14px;color:#24465e}.stack-label>span {display:none}
.card-stack {height:91px!important;--step:min(14px,calc((100% - 62px)/var(--gaps)))}
.hand-card,.empty-card {width:62px!important;height:88px!important;border:2px solid #7193a3;background:#e6f0e8;box-shadow:-2px 2px 2px #263f4e33;border-radius:6px;transform:none}
.hand-card.last-card {transform:none;box-shadow:-2px 2px 3px #263f4e33}.hand-card:after {display:none}.hand-card .resource-art {height:61px!important;width:100%!important}.hand-card .card-name {bottom:5px;left:4px;color:#17374d;font-size:11px;text-shadow:none}.hand-card .card-tick {color:#17374d;background:white;font-size:10px;left:2px;top:2px}.hand-card .card-total {background:#17374d;color:white;right:2px;top:auto;bottom:3px;font-size:17px;width:23px;height:23px;line-height:23px;border:0;border-radius:5px}.empty-card {color:#40596b;background:#f1f5f8}.empty-card .resource-art {width:48px;height:48px;opacity:.6}
.development-pocket {margin-top:10px;border-top:1px solid #d8e2e9;padding-top:8px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.development-pocket h3 {font-size:13px;margin:0}.development-pocket p {margin:0;font-size:12px}.development-card {width:auto;margin:0;background:#ece8f7;color:#453775;padding:7px}.development-card small {color:#4a4564}
.supply-strip,.focus-mode .supply-strip {display:grid!important;grid-template-columns:repeat(6,1fr);background:#fff;border:1px solid #c3d3dd;border-radius:12px;gap:5px;padding:12px;margin:0;font-size:0}
.supply-strip>strong {grid-column:1/-1;font-size:15px;margin-bottom:3px}.supply-strip>span {display:flex;flex-direction:column;gap:3px;align-items:center;color:#17374d;font-size:0;padding:0}.supply-strip .resource-art {width:36px;height:38px}.supply-strip b {font-size:16px;color:#17374d}.supply-strip>span>svg {height:38px;width:28px}
.players-panel,.activity-panel {background:#fff;border:1px solid #c3d3dd;border-radius:12px;padding:12px}.players-panel>.section-heading {margin:0 0 10px}.players-panel h2 {font-size:17px}.players-panel .section-heading>span {color:#4d6475;font-size:10px}
.player {background:#f4f7f9;border:1px solid #d1dfe7;border-left:6px solid var(--player-color);margin:7px 0;padding:10px;border-radius:9px}.player.current {background:#e7f4eb;border-color:var(--player-color);box-shadow:0 0 0 1px var(--player-color)}
.player-top strong {font-size:16px;color:#17374d}.player-top span {color:#425e70;font-size:11px}.player-top>b {color:var(--player-color);font-size:25px}.player-stats {color:#415e71;font-size:12px;margin-top:6px}.player-badge {background:#fff;border-color:var(--player-color);color:var(--player-color)}
.activity-panel {padding:0;overflow:hidden}.tab-bar {background:#e8eff4}.tab-bar button {color:#425e70;font-size:14px}.tab-bar button.active {color:#126b50;background:#fff}.activity-log {max-height:290px;padding:10px}.event-row {border-color:#dde6ec}.event-row p,.event-row .event-actor {font-size:13px!important;line-height:1.55;color:#263f50}.event-row small {font-size:10px;color:#587083}.event-icon {color:#315c70;background:#edf3f7}.log-die {color:#17374d}.privacy-note {color:#4d6475}
.trade-overlay {position:absolute;right:12px;top:12px;width:270px;max-width:calc(100% - 24px);z-index:5;background:#fffdf4;border:2px solid #d3ab4c;border-radius:14px;padding:12px;box-shadow:0 6px 22px #24465e24}.trade-overlay header {display:flex;gap:8px;align-items:center}.trade-overlay header strong {font-size:14px}.offer-exchange {display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0}.offer-exchange>div {display:flex;flex-wrap:wrap;gap:4px}.offer-card {position:relative}.offer-card .resource-art {width:36px;height:43px}.offer-card b {position:absolute;bottom:0;right:0;background:#17374d;color:white;border-radius:4px;padding:0 4px;font-size:13px}.offer-buttons {display:flex;gap:5px;margin-top:9px}.offer-buttons button {font-size:12px;padding:8px}.trade-overlay small {font-size:11px}
.modal {background:#fff!important;color:#17374d!important}.modal h2,.modal h3,.modal label {color:#17374d!important}.modal-intro {color:#4d6475!important}.card-picker h3 {margin:16px 0 9px;font-size:17px}.picker-cards {display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.pick-card {position:relative;background:#f3f7f9;border:1px solid #b5c8d4;border-radius:9px;display:flex;flex-direction:column;align-items:center;padding:8px 4px;color:#17374d;gap:4px}.pick-card .resource-art {width:50px;height:58px}.pick-card strong {font-size:12px}.pick-card small {font-size:10px;color:#4d6475}.pick-card b {position:absolute;right:3px;top:3px;background:#17374d;color:white;border-radius:6px;padding:2px 6px}.selected-cards {display:flex;gap:5px;flex-wrap:wrap;min-height:62px;padding:9px;margin-top:8px;background:#edf3f7;border:1px dashed #9fb6c5;border-radius:9px}.selected-cards p {font-size:13px;margin:auto;color:#4d6475}.selected-card {position:relative;padding:0;border:1px solid #8ba7b9;border-radius:5px;background:white}.selected-card .resource-art {width:35px;height:43px}.selected-card>span:last-child {position:absolute;right:0;top:0;background:#17374d;color:white;border-radius:4px;font-size:12px;padding:0 3px}.picker-actions {display:flex;gap:10px;margin-top:18px}.picker-ratios {font-size:12px;line-height:1.6;color:#4d6475;margin-top:13px}.selection-count {font-weight:700;color:#17374d;margin-top:10px}
.map-options {max-height:430px;overflow:auto}.map-size {font-size:11px;color:#24465e;display:block;margin-top:5px}.map-option {background:#fff;border-color:#b9ccd7}.map-option strong {color:#17374d}.map-option small {color:#425e70}.map-thumbnail {height:140px}
.inline-alert,.placement-hint {background:#fff3d5;color:#664911;border-color:#d6b86f}.accessible-build {color:#17374d;background:#fff}.accessible-build button {color:#17374d;background:#edf3f7}
@media(min-width:1600px){.play-grid,.focus-mode .play-grid{grid-template-columns:minmax(0,1fr) 390px!important}}
@media(max-width:1050px){.play-grid,.focus-mode .play-grid{grid-template-columns:minmax(0,1fr) 300px!important}.play-tools{flex-wrap:wrap}.play-toolbar{align-items:flex-start}.stack-label h3{font-size:12px}.resource-stacks{gap:5px}.card-rail{padding:10px}.build-action{min-width:85px!important}}
@media(max-width:760px){.play-screen{padding:8px!important}.play-grid,.focus-mode .play-grid{grid-template-columns:1fr!important}.table-sidebar{grid-column:1!important;grid-row:2!important}.board3d,.focus-mode .board3d{height:430px!important}.play-toolbar{flex-direction:column;gap:12px}.resource-stacks{overflow-x:auto;grid-template-columns:repeat(5,minmax(75px,1fr))!important}.turn-banner h1{font-size:17px}.turn-banner p{font-size:12px}.trade-overlay{width:235px}.picker-cards{gap:4px}.pick-card .resource-art{width:40px;height:48px}.pick-card small{font-size:9px}}
/* Specificity matches the legacy .play-screen component selectors. */
.play-screen .players-panel,.play-screen .activity-panel,.play-screen .activity-log {background:#fff!important;color:#17374d;border-color:#c3d3dd}
.play-screen .player {background:#f4f7f9!important;color:#17374d;border-color:#c3d3dd;border-left-color:var(--player-color)}
.play-screen .player.current {background:#e7f4eb!important;border-color:var(--player-color)}
.play-screen .player-top strong,.play-screen .player-stats,.play-screen .player-top span,.play-screen .event-row p,.play-screen .event-row .event-actor {color:#24465e!important}
.play-screen .player-top>b {color:var(--player-color)!important}
.play-screen .players-panel h2,.play-screen .supply-strip>strong {color:#17374d!important}
.play-screen .tab-bar {background:#e8eff4!important}.play-screen .tab-bar button {color:#425e70!important}.play-screen .tab-bar button.active {background:#fff!important;color:#126b50!important}
.play-screen .event-row {border-color:#d8e2e9!important}.play-screen .event-row small {color:#587083!important}
.play-screen .player-badge,.play-screen .player-badge.mini {background:#fff!important;color:var(--player-color)!important;box-shadow:none}.play-screen .player-badge svg {fill:var(--player-color)!important}.play-screen .player-badge b {color:#fff!important}
.play-screen .build-action svg {color:#24465e!important}.play-screen .build-action strong,.play-screen .build-action small {color:#24465e!important}
.play-screen .event-icon {color:#315c70!important;background:#edf3f7!important}.play-screen .board-camera .zoom-controls {background:#e8f1f5;border-color:#8eaebe}
.play-screen .card-tick {color:#17374d!important;background:white!important}.play-screen .card-name {color:#17374d!important}.play-screen .empty-card {opacity:1;color:#425e70}.play-screen .empty-card>span {color:#425e70}
.pick-card strong {font-size:14px}.pick-card small {font-size:11px}.card-picker~.picker-ratios {font-size:13px}
.play-screen .players-panel {max-height:46vh;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#91adbc #eef3f6}
.play-screen .players-panel>.section-heading {position:sticky;top:-12px;background:#fff;z-index:2;padding:8px 0}
.play-screen .table-sidebar .player {padding:8px}.play-screen .table-sidebar .player-badge {width:42px;height:42px;min-width:42px}.play-screen .table-sidebar .player-stats {margin-top:6px;font-size:12px}
.play-screen .activity-log {max-height:300px;overflow:auto}
@media(max-width:760px){.play-screen .players-panel{max-height:none}.play-screen .activity-log{max-height:280px}}
.trade-overlay summary {display:flex;gap:8px;align-items:center;cursor:pointer;list-style:none}.trade-overlay summary:after {content:'⌃';margin-left:auto}.trade-overlay:not([open]) summary:after {content:'⌄'}
@media(max-width:760px){.trade-overlay{width:220px}.trade-overlay .offer-buttons button{padding:8px 6px}}

/* Hand and commands share one compact row beneath the board. */
.table-controls {display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,1fr);gap:12px;margin-top:12px;align-items:stretch}
.play-screen .table-controls .card-rail {min-width:0;border-radius:12px;padding:12px}
.play-screen .table-controls .resource-stacks {grid-template-columns:repeat(5,85px)!important;justify-content:start;overflow-x:auto;gap:12px;padding-bottom:5px}
.play-screen .table-controls .play-actions {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:12px;border-radius:12px;margin:0;align-content:stretch}
.play-screen .table-controls .play-actions>button {min-width:0!important;width:100%;margin:0;padding:10px 6px;justify-content:center;white-space:normal}
.play-screen .table-controls .build-action {flex-direction:column;gap:5px}
.play-screen .table-controls .build-action>svg {width:22px;height:22px}
.play-screen .table-controls .build-action strong {font-size:13px}
.play-screen .table-controls .end-action,.play-screen .table-controls .roll-action {font-size:14px;display:flex;align-items:center;gap:6px}
@media(max-width:1100px){.table-controls{grid-template-columns:minmax(0,1fr) 260px}.play-screen .table-controls .play-actions{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px}.play-screen .table-controls .build-action{flex-direction:row}.play-screen .table-controls .play-actions>button{padding:8px 4px}}
@media(max-width:600px){.table-controls{grid-template-columns:minmax(0,1fr) 154px;gap:8px}.play-screen .table-controls .card-rail{padding:10px}.play-screen .table-controls .play-actions{gap:5px;padding:6px}.play-screen .table-controls .build-action{flex-direction:column}.play-screen .table-controls .build-action strong{font-size:11px}.play-screen .table-controls .build-action small{font-size:10px}.play-screen .table-controls .end-action,.play-screen .table-controls .roll-action{font-size:12px}.play-screen .table-controls .rail-heading>strong{font-size:16px}.play-screen .table-controls .rail-heading>strong small{display:none}}

/* One shared timeline keeps table talk visible alongside game actions. */
.play-screen .timeline-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px;border-bottom:1px solid #c3d3dd}
.play-screen .timeline-heading h2 {font-size:17px;margin:0;color:#17374d}
.play-screen .timeline-heading > span {font-size:11px;color:#526a7b}
.play-screen .chat-event {background:#eef7fc;border-radius:7px;padding:8px 5px}
.play-screen .chat-text {display:block;white-space:pre-wrap;overflow-wrap:anywhere}
.play-screen .chat-tag {font-size:9px;font-weight:700;letter-spacing:.06em;color:#376480}
.play-screen .activity-panel .chat-form {display:flex;gap:8px;padding:10px;border-top:1px solid #c3d3dd;margin:0;background:#f5f9fc}
.play-screen .activity-panel .chat-form input {min-width:0;flex:1;background:white!important;color:#17374d!important;border:1px solid #9eb7c7;font-size:14px}
.play-screen .activity-panel .chat-form button {flex:0 0 42px;padding:8px}

/* Compact top toolbar leaves more vertical space for the game. */
.play-screen .play-toolbar {height:auto;min-height:44px;padding:2px 0;margin-bottom:8px;gap:10px;align-items:center}
.play-screen .play-tools .quiet,.play-screen .play-tools .primary {min-height:34px;padding:6px 10px;line-height:20px}
.play-screen .play-title span {margin-top:2px}
@media(max-width:760px){.play-screen .play-toolbar {align-items:flex-start;gap:6px}.play-screen .play-tools {gap:5px}}

/* Flatten hand artwork, label and total into a single SVG image surface. */
.play-screen .hand-card {border:0;background:transparent;overflow:visible;backface-visibility:hidden}
.play-screen .hand-card-image {display:block;width:100%;height:100%;pointer-events:none;user-select:none}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .play-screen .card-stack:hover .last-card {transform:translateY(-5px) rotate(2deg)}
}
@media (prefers-reduced-motion:reduce) {
  .play-screen .hand-card {transition:none}
  .play-screen .card-stack:hover .last-card {transform:none}
}

/* Keep camera controls readable over the ocean in every interaction state. */
.play-screen .camera-button:hover:not(:disabled),
.play-screen .camera-button:focus-visible {
  background:#dcecf6;
  color:#17374d;
  border-color:#537c96;
  filter:none;
}
.play-screen .camera-button:active:not(:disabled) {
  background:#c5ddeb;
  color:#17374d;
}
.play-screen .camera-button:focus-visible {outline:2px solid #17374d;outline-offset:2px}

/* Let the board consume remaining viewport space above the bottom controls. */
.play-screen {height:100dvh;min-height:0;display:flex;flex-direction:column;box-sizing:border-box}
.play-screen .play-toolbar {flex:0 0 auto}
.play-screen .play-grid {flex:1;min-height:0;align-items:stretch}
.play-screen .island-stage {min-height:0;min-width:0;display:flex;flex-direction:column}
.play-screen .turn-banner {flex:0 0 auto}
.play-screen .scene-wrap {flex:1;min-height:100px}
.play-screen .board3d,.focus-mode .play-screen .board3d {position:absolute;inset:0;height:100%!important;min-height:0!important;width:100%}
.play-screen .table-controls {flex:0 0 auto;max-height:40dvh;overflow:auto;order:2}
.play-screen .island-stage>.placement-hint,.play-screen .island-stage>.inline-alert,.play-screen .island-stage>.winner-banner {flex:0 0 auto;order:1;max-height:20dvh;overflow:auto}
.play-screen .table-sidebar {min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) minmax(0,1fr)}
.play-screen .players-panel {min-height:0;max-height:none;overflow:auto}
.play-screen .activity-panel {min-height:0;display:flex;flex-direction:column}
.play-screen .activity-log {flex:1;min-height:0;max-height:none;overflow:auto}
.play-screen .timeline-heading,.play-screen .activity-panel .chat-form {flex:0 0 auto}
@media(max-width:760px){
  .play-screen .play-grid {display:flex!important;flex-direction:column;overflow-y:auto}
  .play-screen .island-stage {height:100%;min-height:0;flex:0 0 100%}
  .play-screen .table-sidebar {height:700px;flex:none}
}

/* Trim the bottom control row without shrinking card artwork or text. */
.play-screen .table-controls {margin-top:8px}
.play-screen .table-controls .card-rail {padding:8px 12px}
.play-screen .table-controls .rail-heading {margin-bottom:6px}
.play-screen .table-controls .development-pocket {margin-top:6px;padding-top:4px}
.play-screen .table-controls .development-card {padding:5px 7px}
.play-screen .table-controls .play-actions {padding:8px;gap:6px}
.play-screen .table-controls .play-actions>button {padding:6px;min-height:64px}
.play-screen .table-controls .build-action {gap:3px}
.play-screen .table-controls .build-action small {margin-top:3px}

/* Circular portraits replace numbered seat badges throughout the game. */
.play-screen .player-badge,.play-screen .player-badge.mini {border:3px solid var(--player-color);border-radius:50%;overflow:hidden;filter:none;box-sizing:border-box}
.play-screen .player-badge img {display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
.play-screen .player-badge.mini {border-width:2px}
.play-screen .table-sidebar .player-badge {flex:0 0 42px;width:42px;height:42px;min-width:42px}
.play-screen .table-sidebar .player-badge.mini {flex:0 0 30px;width:30px;height:30px;min-width:30px}

/* Development cards share the hand row, at the right of the resources. */
.play-screen .hand-contents {display:flex;align-items:flex-start;gap:12px;overflow-x:auto;padding-bottom:5px}
.play-screen .table-controls .hand-contents .resource-stacks {grid-template-columns:none!important;grid-auto-flow:column;grid-auto-columns:70px;gap:8px;flex:0 0 auto;overflow:visible;padding-bottom:0}
.play-screen .table-controls .hand-contents .development-pocket {flex:0 0 132px;margin:0 0 0 auto;padding:0;border:0;display:flex;flex-direction:column;align-items:stretch;gap:6px}
.play-screen .hand-contents .development-pocket h3 {display:flex;justify-content:space-between;gap:6px;font-size:13px;line-height:17px}
.play-screen .hand-contents .development-card {text-align:left;justify-content:flex-start;min-height:44px}

/* Space the visible edges of variable-width stacks evenly. */
.play-screen .table-controls .hand-contents .resource-stacks {display:flex!important;flex-direction:row;gap:12px;align-items:flex-start}
.play-screen .hand-contents .resource-stack-group {flex:none;min-width:0}

/* Miniatures of the same cards used in the player's hand. */
.play-screen .supply-strip .bank-card {width:44px;height:62px;justify-self:center;padding:0;display:block;position:relative}
.play-screen .supply-strip .bank-card .hand-card-image {width:44px;height:62px}
.play-screen .supply-strip .bank-development {box-sizing:border-box;border:1.5px solid #7193a3;border-radius:4px;background:#e8e1f5;color:#453775;display:flex;align-items:center;justify-content:flex-start;gap:0;padding-top:5px}
.play-screen .supply-strip .bank-development>svg {width:25px;height:30px}
.play-screen .supply-strip .bank-development>b {position:absolute;bottom:3px;right:3px;min-width:17px;padding:1px 2px;border-radius:4px;background:#17374d;color:white;font-size:12px;line-height:15px;text-align:center}
@media(max-width:1050px){.play-screen .supply-strip {gap:3px;padding:10px}.play-screen .supply-strip .bank-card,.play-screen .supply-strip .bank-card .hand-card-image {width:40px;height:57px}}

/* Trading is a board-local panel, leaving the table visible and interactive. */
.play-screen .resource-trade-trigger {display:block;width:100%;padding:0;margin:0;border:0;background:transparent;color:inherit;border-radius:6px;box-shadow:none}
.play-screen .resource-trade-trigger:disabled {opacity:1!important;cursor:default}
.play-screen .resource-trade-trigger:hover {background:transparent;filter:none}
.play-screen .resource-trade-trigger:focus-visible {outline:2px solid #17374d;outline-offset:3px}
.trade-composer {position:absolute;left:12px;bottom:12px;z-index:20;width:min(440px,calc(100% - 24px));max-height:calc(100% - 24px);overflow:auto;box-sizing:border-box;padding:14px;background:#fff;border:1px solid #8caabb;border-radius:12px;box-shadow:0 8px 28px #17374d40;color:#17374d}
.trade-composer .modal-heading {margin-bottom:6px}
.trade-composer h2 {font-size:19px;margin:0}
.trade-composer .modal-intro {font-size:12px;margin:4px 0}
.trade-composer .card-picker h3 {font-size:14px;margin:8px 0 5px}
.trade-composer .picker-cards {gap:5px}
.trade-composer .pick-card {padding:4px 2px;gap:2px}
.trade-composer .pick-card .resource-art {width:34px;height:36px}
.trade-composer .pick-card strong {font-size:11px}
.trade-composer .pick-card small {font-size:9px}
.trade-composer .selected-cards {min-height:38px;padding:4px;margin-top:4px}
.trade-composer .selected-card .resource-art {width:25px;height:30px}
.trade-composer .selected-cards p {font-size:11px}
.trade-composer .picker-actions {margin-top:10px;gap:6px}
.trade-composer .picker-actions button {padding:8px;font-size:12px}
.trade-composer .picker-ratios {font-size:10px;line-height:1.4;margin:8px 0 0}
.trade-composer .form-error:empty {display:none}

/* The roll lives in a readable HUD, leaving the 3D sea free of dice. */
.play-screen .dice-result {left:18px;bottom:18px;padding:12px 16px;min-width:156px;box-shadow:0 3px 12px #17374d20}
.play-screen .dice-caption {font-size:15px!important;letter-spacing:1px}
.play-screen .dice-pair {display:flex;align-items:center;gap:8px;margin-top:5px}
.play-screen .dice-pair span {display:inline-flex;align-items:center;justify-content:center;font-size:48px;line-height:1;width:48px;height:50px;background:white;border:1px solid #a8bdc9;border-radius:9px;transform-origin:center}
.play-screen .dice-pair b {font-size:34px;margin-left:5px}
@keyframes hud-dice-roll {
  0% {transform:translateY(-10px) rotate(-24deg) scale(.8)}
  25% {transform:translateY(2px) rotate(20deg) scale(1.05)}
  50% {transform:translateY(-6px) rotate(-14deg)}
  75% {transform:translateY(1px) rotate(7deg)}
  100% {transform:translateY(0) rotate(0)}
}
@media(prefers-reduced-motion:no-preference) {
  .play-screen .dice-result.rolling .dice-pair span {animation:hud-dice-roll 850ms ease-out both;animation-delay:var(--roll-delay,0ms)}
}

.island-board .token {font-weight:900}

/* Illustrated build pieces retain readable silhouettes in the compact action tray. */
.play-screen .table-controls .build-action>svg {width:28px;height:28px;flex-shrink:0}

/* Compact illustrated development hand and hover/focus building costs. */
.play-screen .development-pocket {display:flex;flex-direction:row;gap:7px;width:auto;min-width:0;flex-shrink:0;align-items:center}
.play-screen .development-card {display:block;width:62px;min-width:62px;height:88px;padding:0;border:0;background:transparent;box-shadow:0 2px 3px #17374d30;border-radius:5px;overflow:hidden}
.play-screen .development-card img {display:block;width:62px;height:88px}
.play-screen .development-card:disabled {opacity:1;cursor:default}
.build-action-wrap {position:relative;min-width:0;display:flex}
.play-screen .table-controls .build-action-wrap>.build-action {width:100%;height:100%;min-height:64px}
.build-tooltip {display:none;position:absolute;bottom:calc(100% + 8px);right:0;z-index:40;width:210px;padding:12px;border:1px solid #8caabb;border-radius:10px;background:#fff;color:#17374d;box-shadow:0 5px 20px #17374d35;pointer-events:none}
.build-tooltip>span {display:flex;gap:8px;margin-top:8px}
.build-tooltip .resource-art {width:30px;height:32px}
.build-action-wrap:hover .build-tooltip,.build-action-wrap:focus-within .build-tooltip {display:block}
.play-screen .table-controls,.play-screen .play-actions {overflow:visible}
.play-screen .player-stats {display:grid;grid-template-columns:1fr 1fr;gap:6px}
.player-awards {display:flex;gap:5px;flex-wrap:wrap}
.player-awards:empty {display:none}
.player-awards>span {display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:700;background:#fff0c4;color:#674300;border:1px solid #c7993c;border-radius:6px;padding:4px;margin-top:8px}
.log-die {display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;border:1px solid #8caabb;border-radius:5px;background:#fff;color:#17374d;font:800 18px/1 Arial,sans-serif}
.play-screen .dice-pair span {box-sizing:border-box;flex:0 0 48px;width:48px;height:48px;padding:0;aspect-ratio:1}
.play-screen .dice-result {height:auto;min-height:0;box-sizing:border-box}
.play-screen .table-controls .hand-contents .development-pocket {flex:0 0 auto;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:7px}
.play-screen .table-controls .development-card {padding:0}
.play-screen .table-controls .build-action-wrap>.build-action {min-width:0;padding:6px;margin:0}
.build-tooltip .cost-item>b {color:#17374d!important;font-size:14px!important;opacity:1}
.build-tooltip .cost-item {gap:3px}

/* A shorter, balanced tray leaves enough inset for card hover motion. */
.play-screen .activity-panel .chat-form input,
.play-screen .activity-panel .chat-form input:focus,
.play-screen .activity-panel .chat-form input:focus-visible {border:0;outline:none;box-shadow:none}
.play-screen .activity-panel .chat-form input:focus {background:#e9f2f7!important}
.play-screen .table-controls .card-rail {display:flex!important;flex-direction:column;padding:6px 10px}
.play-screen .table-controls .rail-heading {flex:0 0 auto;margin-bottom:0}
.play-screen .hand-contents {flex:1;align-items:center;min-height:108px;box-sizing:border-box;padding:10px 4px 8px}
.play-screen .table-controls .hand-contents .resource-stacks {align-items:center}
.play-screen .resource-trade-trigger.card-stack {height:88px!important}
.play-screen .table-controls .play-actions {padding:6px;gap:6px;grid-auto-rows:minmax(60px,1fr);align-items:stretch}
.play-screen .table-controls .play-actions>button,
.play-screen .table-controls .build-action-wrap>.build-action {height:100%;min-height:60px;box-sizing:border-box;padding:5px 6px}
.play-screen .player-stats {grid-template-columns:minmax(0,1fr) minmax(0,1.45fr)}
.play-screen .player-stats>span {min-width:0}
.play-screen .player-stats>span>svg {flex-shrink:0}
.play-screen .table-controls .play-actions {grid-auto-rows:64px;align-content:center}
.play-screen .table-controls .play-actions>[data-action="trade"] {flex-direction:row;gap:7px}

/* Board-local robbery selection keeps targets prominent without hiding the table. */
.robbery-overlay {position:absolute;inset:0;z-index:25;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(215,235,242,.3)}
.robbery-picker {width:min(540px,100%);max-height:100%;overflow:auto;padding:24px;border:1px solid #9bb7c7;border-radius:18px;background:#fff;box-shadow:0 16px 48px #17374d35;text-align:center;color:#17374d}
.robbery-picker h2 {margin:0 0 6px;font-size:24px}.robbery-picker p {margin:0 0 20px;color:#476477}
.robbery-targets {display:flex;flex-wrap:wrap;justify-content:center;gap:12px}
.robbery-target {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:136px;min-height:134px;padding:14px 10px;border:2px solid #d3e1e9;border-radius:14px;background:#f3f8fb;color:#17374d;cursor:pointer}
.robbery-target strong {max-width:100%;overflow-wrap:anywhere;font-size:16px}
.play-screen .robbery-target .player-badge {width:68px;height:68px;min-width:68px}
.robbery-target:hover,.robbery-target:focus-visible {background:#e4f1f7;color:#17374d;border-color:var(--player-color);box-shadow:0 4px 12px #17374d20;outline:2px solid #17374d;outline-offset:3px}
.trade-direction {display:flex;align-items:center;gap:10px;min-height:38px}
.trade-party {display:inline-flex;align-items:center;gap:4px;color:#17374d}
.trade-party small {font-size:12px}
.trade-partners {display:inline-flex;align-items:center;padding-right:4px}
.trade-partners .player-badge+.player-badge {margin-left:-10px}
.trade-direction .player-badge.mini {width:30px;height:30px;min-width:30px;flex:0 0 30px}
.trade-flow-arrow {font-size:27px;font-weight:800;color:#24775c}
.trade-direction-label {margin-left:auto;font-size:14px;color:#17374d}
.production-card {position:fixed;left:0;top:0;width:42px;height:60px;z-index:80;pointer-events:none;will-change:transform,opacity}
.production-card img {width:42px;height:60px;display:block;filter:drop-shadow(0 3px 5px #17374d55)}
.play-screen .activity-log .event-row {display:block;padding:4px 2px;border:0!important;background:transparent;gap:0}
.play-screen .activity-log .event-row p {line-height:1.4!important}
.play-screen .activity-log .event-row .event-actor {color:var(--player-color)!important}
/* Give production time to read: full-size cards, named recipients and a lasting receipt. */
.production-card {width:62px;height:88px}
.production-card img {width:62px;height:88px;filter:drop-shadow(0 4px 8px #17374d66)}
.production-card>strong {display:block;position:absolute;top:91px;left:50%;transform:translateX(-50%);max-width:150px;width:max-content;padding:3px 7px;border-radius:6px;background:#fff;color:var(--player-color);border:2px solid var(--player-color);font-size:12px;line-height:1.2;text-align:center;overflow-wrap:anywhere;box-shadow:0 2px 6px #17374d33}
.production-receipts {position:fixed;z-index:79;width:220px;max-width:calc(100vw - 32px);overflow:auto;pointer-events:none;padding:12px;background:#fffffff5;border:1px solid #9bb7c7;border-radius:12px;box-shadow:0 6px 22px #17374d33;color:#17374d}
.production-heading {font-size:14px;display:block;margin-bottom:8px}
.production-receipt {border-left:3px solid var(--player-color);padding:3px 7px;margin-top:7px}
.production-receipt>strong {color:var(--player-color);font-size:14px}
.production-receipt>div {display:flex;flex-wrap:wrap;gap:8px;margin-top:3px}
.production-receipt span {display:inline-flex;align-items:center;gap:3px;font-size:15px}
.production-receipt .resource-art {width:26px;height:30px}
.play-screen .turn-banner .end-turn-banner {flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:9px 14px;border:1px solid #9b5d14;border-radius:8px;background:#fff0cf;color:#75420b;font-size:14px;font-weight:800;white-space:nowrap}
.play-screen .turn-banner .end-turn-banner:hover:not(:disabled) {background:#ffdfa0;color:#593000;border-color:#75420b}
.play-screen .turn-banner .end-turn-banner:focus-visible {outline:3px solid #75420b;outline-offset:2px}
.play-screen .turn-banner .end-turn-banner:disabled {opacity:.4;cursor:not-allowed}
@media(max-width:760px){.play-screen .turn-banner .end-turn-banner{padding:7px 9px;font-size:12px;min-height:36px}}

/* Shared table section heading rhythm. */
.play-screen .supply-strip,
.play-screen .players-panel,
.play-screen .table-controls .card-rail {padding-top:0}
.play-screen .players-panel > .section-heading,
.play-screen .table-controls .rail-heading,
.play-screen .timeline-heading {margin:0;padding:10px 0;min-height:0}
.play-screen .timeline-heading {padding-left:12px;padding-right:12px}
.play-screen .players-panel > .section-heading {top:0}
.play-screen .supply-strip {row-gap:0}
.play-screen .supply-strip > strong,
.play-screen .players-panel .section-heading h2,
.play-screen .timeline-heading h2,
.play-screen .table-controls .rail-heading h2 {font-size:16px;font-weight:700;line-height:20px;letter-spacing:0;margin:0;padding:0}
.play-screen .supply-strip > strong {padding:10px 0}

.play-screen .scene-wrap > .placement-hint {position:absolute;z-index:6;top:58px;left:12px;right:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:10px 14px;border:1px solid #b58a39;border-radius:10px;box-shadow:0 3px 12px #17374d26;max-height:30%;overflow:auto}
.play-screen .scene-wrap > .placement-hint button {flex-shrink:0}
.play-screen .turn-banner .turn-clock,
.play-screen .turn-banner .end-turn-banner {box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:42px;min-height:42px;padding:9px 14px;font-size:14px;line-height:20px;font-weight:800;border-radius:8px}
.play-screen .turn-banner .end-turn-banner {background:#b84d08;color:#fff;border:1px solid #8e3904;box-shadow:0 2px 0 #783003,0 0 0 3px #ffdda6}
.play-screen .turn-banner .end-turn-banner:hover:not(:disabled) {background:#923b04;color:#fff;border-color:#713003}
.play-screen .turn-banner .end-turn-banner:disabled {box-shadow:none}
@media(max-width:760px){.play-screen .turn-banner .turn-clock,.play-screen .turn-banner .end-turn-banner{height:36px;min-height:36px;font-size:12px;padding:7px 9px}}

.play-screen .turn-banner .turn-heading {display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}
.play-screen .turn-banner .turn-heading h1 {margin:0}
.play-screen .turn-banner .turn-heading .turn-clock {flex:0 0 auto;margin:0}

.play-screen .turn-banner .turn-heading {--turn-title-size:22px}
.play-screen .turn-banner .turn-heading h1,
.play-screen .turn-banner .turn-heading .turn-clock {font-size:var(--turn-title-size);line-height:1.25}
@media(max-width:760px){.play-screen .turn-banner .turn-heading{--turn-title-size:17px}}

.play-screen .observer-count {display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;color:#17374d;font-size:16px;font-weight:700;padding:8px;border-radius:8px;background:#edf3f7}
.play-screen.observing .island-stage {padding-bottom:0}

/* Form fields use their border/background focus treatment without outer rings. */
input, select, textarea,
input:focus, select:focus, textarea:focus,
input:focus-visible, select:focus-visible, textarea:focus-visible {outline:none;box-shadow:none}

/* Lobby bot choices and public control status. */
.add-bot-button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;margin:12px 0}
.bot-avatar{background:#e4eef8!important;color:#204e72!important;display:inline-flex;align-items:center;justify-content:center}
.bot-choices{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin-top:16px}
.bot-choice{min-width:0;display:flex;align-items:flex-start;gap:12px;text-align:left;padding:16px;white-space:normal}
.bot-choice svg{flex:none}.bot-choice span{min-width:0;overflow-wrap:anywhere;display:grid;gap:5px}.bot-choice strong{font-size:17px}.bot-choice small{font-size:14px;line-height:1.4;font-weight:400}
.bot-tag{display:flex!important;align-items:center;gap:4px;color:#245579!important;font-size:12px!important;font-weight:700;margin:3px 0}
.bot-tag svg{width:15px;height:15px}.takeover-tag{color:#874a15!important}
.crew-member .icon-button{flex:none}
@media(max-width:560px){.bot-choices{grid-template-columns:1fr}}

.bot-choices .bot-choice small{white-space:normal;overflow:visible;text-overflow:clip}

/* Public website only: porcelain white, cobalt blue and apricot. */
.website{--ink:#182e50;--muted:#4b5e78;--green:#2456ba;--paper:#fff;--line:#cbd7e8;margin:0!important;min-height:100vh;background:#f3f7ff;color:#182e50}
.website main{max-width:1320px;margin:auto;padding:42px 32px}
.site-header{display:flex;align-items:center;gap:36px;padding:20px max(24px,calc((100vw - 1256px)/2));background:#fff;border-bottom:1px solid #cbd7e8}
.site-header .brand{margin:0;color:#193e7a;font-size:27px;white-space:nowrap}
.site-header .brand svg{color:#2456ba}
.site-header nav{display:flex;gap:12px;margin-left:auto}
.site-header nav button{background:transparent;color:#25466f;padding:12px;font-weight:650;font-size:16px}
.site-header nav button:hover{background:#e7efff}
.profile-link{display:flex;align-items:center;gap:10px;background:#e7efff;border:1px solid #b8cbea;color:#21477f;border-radius:30px;padding:6px 16px 6px 6px;font-weight:700;white-space:nowrap}
.profile-link .avatar{width:36px;height:36px}
.website p,.website small,.website .eyebrow{color:#4b5e78}
.website h1,.website h2,.website h3{color:#182e50}
.website .hero-card{background:#deebff;border:1px solid #b6ccef;color:#193e7a}
.website .hero-card p,.website .hero-meta,.website .hero-coordinate{color:#3b5578}
.website .hero-card h2{color:#193e7a}
.website .hero-card .pill{background:#fff;color:#21477f}
.website .gold{background:#ffbc80;color:#492707}
.website .join-card,.website .panel,.website .room-row,.website .stat-cards>div,.website .rule-card{background:#fff;border:1px solid #cbd7e8}
.website .primary,.website .secondary{background:#2456ba;color:#fff}
.website .quiet{background:#e7efff;color:#21477f}
.website .room-name small,.website .empty-message,.website .join-note{color:#4b5e78}
.website footer{max-width:1320px;margin:auto;color:#4b5e78;padding:24px 32px}
.dashboard-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}
.dashboard-heading h1{font-size:32px}
.dashboard-heading>div{display:flex;gap:10px}
.dashboard-tabs{display:flex;gap:8px;border-bottom:1px solid #cbd7e8;margin:16px 0 32px}
.dashboard-tabs button{background:transparent;padding:14px 22px;color:#4b5e78;font-weight:700}
.dashboard-tabs button.active{color:#21477f;border-bottom:3px solid #2456ba}
.support-page{max-width:780px;margin:36px auto;padding:40px}
.website .support-page h1{font-size:clamp(28px,3vw,34px);line-height:1.2;letter-spacing:-.6px}
.map-option .map-size{grid-column:1 / -1;white-space:normal;font-size:13px}
.range-setting{display:grid!important;grid-template-columns:1fr auto;align-items:center;gap:12px}
.range-setting output{background:#e4f1e9;color:#174e45;border-radius:8px;padding:4px 10px;font-size:18px;font-weight:750}
.range-setting input[type=range]{grid-column:1 / -1;width:100%;padding:0;height:26px;accent-color:#14756b;cursor:pointer}
@media(max-width:760px){.site-header{flex-wrap:wrap;gap:12px;padding:16px}.site-header nav{order:3;width:100%;justify-content:center;margin:0}.site-header nav button{padding:8px;font-size:14px}.profile-link{margin-left:auto}.website main{padding:24px 16px}.dashboard-heading{align-items:flex-start;flex-direction:column}.website footer{padding:24px 16px}}
.site-header .brand>span{display:inline!important}.site-header nav{flex-direction:row}.site-header .brand{padding:0;width:auto}.dashboard-tabs{flex-direction:row}
.website #donation-form{margin-top:28px;padding-top:24px;border-top:1px solid #b8cbea;display:grid;gap:14px}
.website #donation-form label{font-size:18px;font-weight:700}
.website .donation-presets{display:flex;flex-wrap:wrap;gap:10px}
.website #donation-amount{font-size:24px;font-weight:700;max-width:280px;color:#182e50;background:#fff;border:1px solid #b8cbea}
.website .donation-notice{padding:16px;background:#e7efff;border-left:4px solid #2456ba;border-radius:6px;color:#21477f}
.website .hero-card{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.website .hero-copy{width:100%;padding:26px;position:static}
.website .hero-copy h2{font-size:30px;margin:14px 0 10px}
.website .hero-copy p{max-width:560px;font-size:16px}
.website .hero-meta{margin:16px 0}
.website .hero-board.home-board-frame{position:relative;inset:auto;transform:none;width:100%;height:390px;flex:none;margin:0}
#home-board3d{width:100%;height:100%;overflow:hidden;background:#c5e8fb}
#home-board3d canvas{display:block;width:100%;height:100%;touch-action:none}
#home-board3d>svg{width:100%;height:100%}
.preview-controls{position:absolute;left:12px;bottom:12px;display:flex;align-items:center;gap:6px}
.preview-controls button{width:36px;height:36px;padding:0;font-size:23px}
.preview-controls span,.preview-caption{font-size:12px;background:#fffE;color:#25466f;padding:6px;border-radius:6px}
.preview-caption,.preview-spectate{position:absolute;right:12px;bottom:12px}
.website .preview-spectate{padding:9px 14px;font-size:14px}
.website footer nav{display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}
.website footer a{color:#21477f;text-decoration:underline}
.legal-page{max-width:850px;margin:auto;padding:32px}.legal-page h2{margin-top:26px}
@media(max-width:760px){.website .hero-board.home-board-frame{height:320px}.website .hero-copy{padding:22px}.website footer{flex-wrap:wrap;gap:16px}.preview-controls span{display:none}}

.website .primary:hover,.website .secondary:hover{background:#1c4392;color:#fff}
.website .gold:hover{background:#ffab60;color:#492707}
.website .quiet:hover{background:#d5e3ff;color:#182e50}

.waiting-island .island-details{border-top:0}
.turn-banner .victory-target{background:transparent!important}
.offer-line{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px}
.exchange-arrows{font-size:32px;text-align:center;line-height:1.2;color:#17374d}
.offer-buttons .offer-accept,.offer-response .offer-accept{background:#21824c;color:white}
.offer-buttons .offer-decline,.offer-response .offer-decline{background:#c63535;color:white}
.offer-buttons .offer-counter{background:#a97500;color:white}
.offer-buttons button{min-width:48px;font-size:24px}
.offer-responses{display:flex;gap:10px;margin-top:8px}
.offer-response{display:flex;align-items:center;border:2px solid var(--player-color);border-radius:30px;padding:3px}
.offer-response b{border-radius:50%;padding:3px 6px}
.results-overlay{position:fixed;inset:0;z-index:10000;background:#10283bc9;display:grid;place-items:center;padding:24px;overflow:auto}
.results-card{background:white;color:#17374d;border-radius:20px;padding:32px;max-width:1100px;width:100%;text-align:center;box-shadow:0 20px 80px #0005}
.results-card h1{display:flex;justify-content:center;align-items:center;gap:15px;font-size:30px;margin:0 0 24px}
.results-table{overflow:auto}.results-card th,.results-card td{padding:13px;border-bottom:1px solid #d6e2eb}.results-card table{width:100%}.results-card tbody tr:first-child{background:#fff4d5}

.results-card{min-width:0;box-sizing:border-box;max-height:calc(100vh - 48px);overflow:auto}.results-table{min-width:0;max-width:100%}.results-card h1{flex-wrap:wrap}.results-card h1 svg{flex-shrink:0}
@media(max-width:600px){.results-card{padding:20px}.results-card h1{font-size:25px;gap:8px}.results-card th,.results-card td{padding:10px}}
