/* Island Club — a warm, tactile visual system for the entire table. */
:root {
    --bg-dark: #102d33; --bg-surface: #183c42; --bg-panel: #21494d;
    --border-color: #ffffff19; --accent-gold: #eccb8d; --accent-gold-hover: #f7dba7;
    --accent-blue: #9ccccc; --accent-red: #db795e;
    --text-primary: #f6f0df; --text-secondary: #b7ccca; --text-muted: #8eafad;
}
body, html { font-family: 'Segoe UI', system-ui, sans-serif; background: #102d33; }
button { font-weight: 650; letter-spacing: .01em; }
button:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }
button:focus-visible, input:focus-visible, select:focus-visible, .radio-card:focus-within { outline: 2px solid #f3d69c; outline-offset: 4px; }
::selection { background: #eccb8d; color: #183c42; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: #62868080; border-radius: 9px; }
.eyebrow { display: block; font-size: 10px; font-weight: 750; letter-spacing: .2em; color: #a9c5bf; }
.brand-dot { color: #df8467; }
#view-lobby { justify-content: flex-start; padding: 48px 32px 64px; background: radial-gradient(ellipse at 70% 0, #2a5557, transparent 65%), #102d33; }
.lobby-card { max-width: 1080px; background: transparent; padding: 0; border: 0; box-shadow: none; }
.lobby-header { display: grid; grid-template-columns: 1fr 1.1fr; text-align: left; align-items: center; gap: 32px; margin-bottom: 38px; }
.lobby-header h1 { font-size: 72px; line-height: 1; letter-spacing: -.06em; text-shadow: none; color: #f3ead5; margin: 16px 0; font-weight: 850; }
.lobby-header .subtitle { color: #f3ead5; font-family: Georgia, serif; font-size: 38px; line-height: 1.12; letter-spacing: -.03em; }
.lobby-intro { font-size: 14px; line-height: 1.8; margin-top: 20px; color: #afc6c1; }
.feature-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.feature-chips span { border: 1px solid #b4caba26; border-radius: 30px; padding: 7px 12px; font-size: 11px; color: #d3ded1; }
.island-preview { position: relative; min-width: 0; aspect-ratio: 1.3; border: 1px solid #b9d1be24; border-radius: 50% 50% 26% 26%; background: #1c4b51; box-shadow: 0 30px 70px #001a2340, inset 0 0 60px #a8c7ad12; overflow: hidden; transform: rotate(-4deg); }
#lobby-island { width: 100%; height: 100%; transform: rotate(4deg); }
.preview-caption { position: absolute; bottom: 16px; width: 100%; text-align: center; font-size: 10px; letter-spacing: .08em; color: #c0d7c9; transform: rotate(4deg); }
.lobby-panels-grid { grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }
.lobby-switch { display: none; }
.join-panel.invited { border-color: #eccb8d88; }
.panel { padding: 30px; border: 1px solid #d6e0c921; border-radius: 18px; background: #1c4145; box-shadow: 0 14px 35px #001a2320; }
.panel h2 { color: #f3ead5; font: 30px Georgia, serif; padding: 0; border: 0; margin: 9px 0 25px; letter-spacing: -.03em; }
.form-group { margin-bottom: 18px; }
.form-group label { font-size: 10px; color: #b6c9c2; letter-spacing: .09em; margin-bottom: 9px; }
input[type=text], select { background: #123438; border: 1px solid #b7c9b52a; padding: 13px 14px; color: #f4eedf; border-radius: 9px; }
input::placeholder { color: #73928f; }
.radio-cards { flex-direction: row; gap: 10px; }
.radio-card { flex: 1; background: #16383d; padding: 13px 11px; align-items: flex-start; border: 1px solid #b7c9b52a; border-radius: 10px; }
.radio-card:has(input:checked) { background: #eccb8d12; border-color: #eccb8d; box-shadow: inset 0 0 0 1px #eccb8d22; }
.radio-card input { margin: 3px 9px 0 0; }
.radio-card .card-content strong { font-size: 12px; font-weight: 650; color: #f0eadb; text-transform: none; letter-spacing: 0; }
.radio-card .card-content span { font-size: 10px; line-height: 1.6; text-transform: none; letter-spacing: 0; margin-top: 5px; color: #a7c1b8; }
.radio-card:hover { background: #294d4c; }
.btn-primary, .btn-secondary, .btn-action, .btn-subtle { border-radius: 9px; padding: 12px 18px; font-size: 12px; border: 1px solid #d6dfc733; cursor: pointer; }
.btn-primary { background: #eccb8d; color: #243c36; box-shadow: 0 4px 0 #a6895450; border-color: transparent; }
.btn-primary:hover { background: #f6dba8; }
.btn-secondary { background: #d47c61; color: #fff7e6; border-color: transparent; }
.btn-secondary:hover { background: #e68d70; }
.btn-action, .btn-subtle { background: #21494d; color: #eadfc9; }
.btn-large { width: 100%; display: flex; align-items: center; justify-content: space-between; font-size: 13px; padding: 15px 18px; }
.host-info-box { background: transparent; border: 0; border-top: 1px solid #b6c9b826; border-radius: 0; padding: 23px 0 0; margin-top: 28px; color: #acc4bc; font-size: 12px; line-height: 1.9; }
.host-info-box h3 { font: 21px Georgia, serif; color: #eccb8d; margin-bottom: 12px; }
.host-info-box p + p { margin-top: 10px; }
.waiting-panel { background: #1c4145; border-radius: 18px; padding: 28px; }
.waiting-header h2 { font: 24px Georgia, serif; }
.waiting-header .btn-secondary { margin-left: 0; }
.highlight-code { display: inline-block; margin-left: 8px; background: #123438; color: #eccb8d; font-size: 25px; padding: 9px 18px; }
.host-join-info-box { background: #123438 !important; border-color: #ffffff16 !important; padding: 18px !important; border-radius: 12px !important; }
.waiting-player-box { padding-top: 18px; }
.waiting-player-box h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
.table-summary { font-size: 12px; margin-top: 10px; color: #a9c5bf; }
.lobby-player-list { max-width: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.lobby-player-row { background: #17373b; padding: 16px; border-color: #ffffff12; font-size: 13px; }
.player-color-dot { flex-shrink: 0; width: 12px; height: 12px; border: 2px solid #fff7; box-shadow: 0 0 0 4px #fff08; }
.host-controls-box .btn-large { width: auto; }
.connection-status { bottom: 8px; left: 12px; font-size: 9px; background: #3c3c2c; color: #eccb8d; z-index: 80; }
.connection-status.connected { background: #193b36; color: #a4ccad; }
.connection-status::before { content: '●'; margin-right: 5px; font-size: 7px; }
.app-toast { background: #f4e9d1; color: #254740; border: 1px solid #d1b683; border-radius: 12px; font-size: 13px; }
#view-game { background: #102d33; }
.game-header { min-height: 68px; background: #123237; border-bottom: 1px solid #e3ddc217; padding: 0 22px; gap: 12px; }
.game-logo { font-size: 25px; font-weight: 850; letter-spacing: -.05em; color: #f0e6d0; margin-right: 15px; }
.badge { background: #ffffff06; border: 1px solid #ffffff12; border-radius: 6px; color: #acc7c0; font-size: 10px; padding: 7px 9px; }
.turn-badge { background: #eccb8d13; color: #eccb8d; border-color: #eccb8d30; font-weight: 600; }
.btn-header-icon { background: transparent; border: 1px solid #ffffff15; border-radius: 8px; color: #cfdbcf; font-size: 11px; padding: 9px 11px; min-height: 35px; }
.btn-header-icon:hover { background: #ffffff0d; border-color: #eccb8d77; }
.phase-banner { background: #244c48; color: #e1e9d4; border: none; box-shadow: none; font-size: 12px; font-weight: 550; padding: 12px 20px; letter-spacing: .015em; animation: none; }
.banner-alert, .banner-setup { background: #36594c; color: #f6e6b9; }
.banner-robber { background: #714a3f; color: #ffdfbc; }
.banner-special { background: #46485c; color: #e0d7f1; }
.banner-victory { background: #eccb8d; color: #253e35; }
.game-main-area { grid-template-columns: minmax(0, 1fr) 290px; margin: 14px 14px 0; gap: 14px; }
.board-container { background: #17444c; border: 1px solid #b1c9b323; border-radius: 17px; box-shadow: inset 0 0 70px #082e3744; }
.table-label { position: absolute; top: 19px; left: 23px; pointer-events: none; z-index: 1; }
.table-label .eyebrow { color: #b2cfc1; font-size: 9px; }
#table-goal { display: block; font: 17px Georgia, serif; color: #ecdfbd; margin-top: 7px; }
.board-bottom { display: flex; align-items: end; justify-content: space-between; position: absolute; left: 22px; right: 22px; bottom: 18px; pointer-events: none; }
.board-bottom > span { font-size: 10px; color: #a5c5bb; }
.dice-display { display: flex; gap: 7px; align-items: center; }
.die { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: #f5ead0; color: #384d43; box-shadow: 0 3px 0 #bdab86, 0 6px 15px #062b3640; font-size: 28px; line-height: 1; }
.dice-display.has-roll { animation: dice-arrive .35s ease-out; }
@keyframes dice-arrive { from { transform: translateY(-10px) rotate(-8deg); opacity: .4; } to { transform: none; opacity: 1; } }
.hex-poly { transition: filter .25s; }
.vertex-selectable:focus-visible, .edge-selectable:focus-visible, .hex-selectable:focus-visible { outline: 2px dashed #fff3cd; outline-offset: 3px; }
.hex-producing .hex-poly { stroke: #fff8d8; stroke-width: 4; filter: brightness(1.16); }
.building-slot { filter: drop-shadow(0 3px 1px #14342f99); }
.game-sidebar { background: #16383e; border: 1px solid #b1c9b323; border-radius: 17px; }
.players-section { padding: 17px 13px; max-height: 55%; border-bottom: 1px solid #ffffff0c; }
.players-section h3 { font-size: 10px; color: #a8c0b7; margin: 0 3px 14px; letter-spacing: .15em; }
#players-count { float: right; color: #eccb8d; }
.players-sidebar-list { gap: 8px; }
.player-sidebar-card { background: #1e4247; border: 1px solid #ffffff0c; border-left-width: 3px; border-radius: 10px; padding: 13px 11px; }
.player-sidebar-card.active-turn { background: #2e4d47; border-top-color: #eccb8d50; border-right-color: #eccb8d50; border-bottom-color: #eccb8d50; box-shadow: none; }
.player-name { font-size: 12px; }
.player-stats-row { margin-top: 10px; font-size: 10px; color: #b1c8bf; gap: 5px; }
.player-badges-row:empty { display: none; }
.bot-badge, .host-badge, .dc-badge { border-radius: 4px; font-size: 8px; padding: 3px 5px; letter-spacing: .05em; }
.bot-badge { background: #ffffff10; color: #a6bdb8; }
.dc-badge { color: #e8ad91; }
.victory-progress { height: 3px; margin-top: 11px; background: #102f33; border-radius: 5px; overflow: hidden; }
.victory-progress span { display: block; height: 100%; border-radius: 5px; background: #eccb8d; transition: width .4s; }
.log-chat-tabs { padding: 0 12px; border-bottom-color: #ffffff10; }
.log-tab { font-size: 11px; padding: 14px 0; }
.log-tab.active { background: transparent; border-bottom-color: #eccb8d; }
.messages-scroll-area { background: #123237; padding: 15px; gap: 10px; font-size: 11px; }
.log-line { color: #a9c0b6; line-height: 1.65; padding-bottom: 8px; border-bottom: 1px solid #ffffff06; }
.chat-line { color: #d1dfcd; line-height: 1.7; }
.chat-input-bar { background: #1c4145; padding: 7px; border: 0; gap: 4px; }
.chat-input-bar input { min-width: 0; font-size: 11px; padding: 10px 5px; }
.btn-send { background: #eccb8d; color: #304838; border-radius: 6px; font-size: 10px; padding: 0 10px; }
.game-hud { background: #102d33; border: none; padding: 12px 20px 22px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 22px; }
.hand-heading { grid-column: 1 / -1; font-size: 9px; color: #b3c8bd; letter-spacing: .14em; margin-bottom: -2px; }
.hand-heading span { margin-left: 8px; color: #779c93; letter-spacing: 0; }
.hud-resources-hand { gap: 7px; }
.res-card-pill { width: 65px; height: 79px; border: 1px solid #fff4; border-radius: 10px; box-shadow: 0 3px 0 #061d2555; position: relative; }
.res-icon { font-size: 21px; }
.res-icon svg { width: 45px; height: 35px; display: block; }
.res-label { font-size: 8px; margin-top: 3px; letter-spacing: .05em; }
.res-count { position: absolute; top: -7px; right: -4px; font-size: 12px; width: 23px; height: 23px; display: grid; place-items: center; color: #2a453d; background: #f8edd2; border-radius: 50%; border: 2px solid #183c42; margin: 0; }
.res-wood { background: #35684f; }.res-brick { background: #ae664c; }.res-sheep { background: #85a86b; color: #203e32; }.res-wheat { background: #d4b66b; color: #3f462d; }.res-ore { background: #728a8b; }
.hud-dev-cards-area { padding: 0 6px; gap: 10px; }
.dev-cards-title { font-size: 9px; letter-spacing: .08em; }
.empty-cards-hint { font-size: 10px; font-style: normal; color: #789b92; }
.dev-card-item { background: #25484a; border-color: #eccb8d44; border-radius: 9px; padding: 10px; font-size: 11px; }
.hud-action-buttons { gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 410px; }
.action-hint { width: 100%; font-size: 10px; color: #a2bfb4; text-align: right; margin-bottom: 4px; }
.hud-btn { border-radius: 9px; font-size: 12px; padding: 13px 16px; min-height: 43px; animation: none; box-shadow: 0 3px 0 #061d2533; }
.btn-dice-roll, .btn-end-main { background: #eccb8d; color: #2c4438; }
.btn-build-main { background: #d47c61; color: #fff3e0; }.btn-trade-main { background: #386569; color: #e8ecda; }
.btn-special-main { background: #8b86a7; color: #fff3e0; }
.build-popup-menu { background: #1c4145; border: 1px solid #eccb8d55; border-radius: 12px; padding: 8px; bottom: 53px; }
.build-menu-item { padding: 13px 11px; background: #14373c; border-color: #ffffff12; font-size: 11px; border-radius: 7px; }
.build-menu-item:hover:not(:disabled) { background: #31534b; border-color: #eccb8d88; }
.cancel-placement-bar { top: 120px; border: 1px solid #eccb8d66; border-radius: 10px; background: #153a3ef2; font-size: 11px; }
.btn-cancel-mini { background: #b87159; border-radius: 6px; padding: 7px 10px; }
.active-trade-banner { background: #3f4b3c; border-bottom: 1px solid #eccb8d44; font-size: 12px; }
.modal-overlay { background: #071e28b8; backdrop-filter: blur(9px); padding: 18px; }
.modal-box { background: #1c4145; border: 1px solid #c1cfb53b; border-radius: 20px; padding: 30px; box-shadow: 0 30px 100px #00131e88; }
.modal-box h2 { font: 28px Georgia, serif; color: #f0e4cb; }
.modal-box p { font-size: 13px; line-height: 1.8; color: #b4cbbf; }
.modal-close-btn { color: #bfd0c3; background: #ffffff08; border-radius: 50%; width: 32px; height: 32px; }
.trade-tab-btn { background: #15373b; border-color: #ffffff18; border-radius: 8px; font-size: 11px; }
.trade-tab-btn.active { background: #eccb8d10; border-color: #eccb8d66; }
.trade-count-row, .discard-res-row { font-size: 12px; }
.counter-btns button { background: #31534f; color: #f3e6c5; border: 1px solid #ffffff20; border-radius: 7px; min-width: 32px; min-height: 32px; }
.bank-rate-badge { background: #16383d; border-color: #ffffff15; border-radius: 8px; }
.trophy-icon { animation: none; }
@media (min-width: 1500px) { .game-main-area { grid-template-columns: minmax(0, 1fr) 330px; } .game-hud { gap: 12px 32px; } }
@media (max-width: 1100px) { .map-badge { display: none; } .game-header { padding: 10px 14px; } .game-header-left, .game-header-right { gap: 5px; } .game-logo { margin-right: 5px; } .hud-action-buttons { max-width: 330px; } .res-card-pill { width: 55px; } .hud-dev-cards-area { flex-direction: column; align-items: flex-start; } }
@media (max-width: 850px) { .game-hud { grid-template-columns: auto 1fr; } .hud-dev-cards-area { grid-column: 1 / -1; grid-row: 3; flex-direction: row; } .game-main-area { grid-template-columns: minmax(0, 1fr) 245px; margin: 8px 8px 0; gap: 8px; } .game-header-center { display: none; } .res-card-pill { width: 49px; height: 65px; } .hud-btn { padding: 11px; } .game-hud { padding: 10px 14px 21px; } }
@media (max-width: 700px) {
    #view-lobby { padding: 32px 18px 48px; }
    .lobby-header { grid-template-columns: 1fr; gap: 18px; margin-bottom: 24px; }
    .lobby-header h1 { font-size: 55px; }.lobby-header .subtitle { font-size: 33px; }
    .lobby-intro { margin-top: 15px; }.feature-chips { margin-top: 16px; }
    .island-preview { position: absolute; width: 150px; height: 170px; top: 28px; right: 10px; border-radius: 50%; opacity: .65; z-index: 0; pointer-events: none; }
    .preview-caption { display: none; }.lobby-story { position: relative; z-index: 1; }.lobby-intro, .feature-chips { max-width: 300px; }
    .lobby-panels-grid { grid-template-columns: 1fr; gap: 16px; }.panel { padding: 24px 20px; }.panel h2 { font-size: 28px; }
    .lobby-switch { display: flex; padding: 5px; background: #0f2d32; border: 1px solid #ffffff12; border-radius: 11px; gap: 4px; }
    .lobby-switch button { flex: 1; background: transparent; border: 0; border-radius: 7px; color: #b0c9be; padding: 12px 8px; font-size: 12px; cursor: pointer; }
    .lobby-switch button[aria-pressed=true] { background: #33544b; color: #f3ddb0; }
    .lobby-panels-grid[data-active=create] .join-panel, .lobby-panels-grid[data-active=join] .create-panel { display: none; }
    .radio-cards { gap: 7px; }.radio-card { padding: 11px 8px; }.radio-card .card-content strong { font-size: 11px; }
    .waiting-panel { padding: 20px 15px; }.waiting-header { justify-content: flex-start; }.waiting-header h2 { width: 100%; font-size: 21px; }.lobby-player-list { grid-template-columns: 1fr; }
    .game-header { min-height: 92px; padding: 8px 12px; gap: 8px; }.game-header-left { width: 100%; justify-content: space-between; }.game-header-right { width: 100%; justify-content: space-between; }.game-logo { font-size: 23px; }.btn-header-icon { padding: 7px 8px; font-size: 10px; }
    .phase-banner { padding: 10px 12px; font-size: 11px; }
    .game-main-area { grid-template-columns: minmax(0, 1fr); margin: 7px 7px 0; min-height: 0; }
    .show-sidebar .game-sidebar { inset: 0 0 0 auto; width: min(310px, 90vw); border-radius: 15px; }
    .table-label { top: 13px; left: 14px; } #table-goal { font-size: 13px; margin-top: 5px; }
    .board-bottom { left: 12px; right: 12px; bottom: 12px; }.board-bottom > span { font-size: 8px; max-width: 140px; line-height: 1.7; }.die { width: 29px; height: 29px; font-size: 23px; }
    .game-hud { grid-template-columns: 1fr; gap: 9px; padding: 10px 12px max(22px, env(safe-area-inset-bottom)); }
    .hand-heading { grid-column: 1; font-size: 8px; }.hud-resources-hand { justify-content: center; gap: 9px; }.res-card-pill { width: 51px; height: 54px; }.res-icon { font-size: 18px; }.res-label { font-size: 7px; }.res-count { width: 20px; height: 20px; font-size: 10px; }
    .res-icon svg { width: 37px; height: 26px; }
    .hud-action-buttons { max-width: none; justify-content: center; gap: 7px; }.action-hint { text-align: center; margin-bottom: 0; font-size: 9px; }.hud-btn { min-height: 40px; padding: 10px 13px; font-size: 11px; }
    .hud-dev-cards-area { grid-row: auto; justify-content: center; max-height: 45px; }.empty-cards-hint { font-size: 9px; }.dev-cards-title { font-size: 8px; }
    .cancel-placement-bar { top: 141px; width: calc(100vw - 30px); justify-content: space-between; font-size: 10px; padding: 8px 11px; }
    .build-popup-menu { right: -70px; max-width: calc(100vw - 32px); }
    .modal-box { padding: 24px 18px; max-height: 88dvh; }.modal-box h2 { font-size: 24px; }.trade-split-grid { grid-template-columns: 1fr; }
}
@media (max-height: 650px) and (min-width: 701px) { .game-header { min-height: 49px; }.game-hud { padding-top: 8px; }.res-card-pill { height: 55px; }.table-label { top: 11px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Keep the main turn action prominent at every screen size. */
#btn-roll-dice {
    min-width: 190px;
    min-height: 64px;
    padding: 18px 28px;
    font-size: 20px;
    font-weight: 800;
    border: 2px solid #ffe6ad;
    box-shadow: 0 4px 0 #061d2544, 0 0 20px #eccb8d22;
}
.btn-leave-room { color: #ffd0be; border-color: #d47c6170; }
.game-header-right { flex-wrap: wrap; }
@media (max-width: 700px) {
    #btn-roll-dice { width: 100%; min-height: 60px; font-size: 19px; padding: 16px 24px; }
    .game-header-right { justify-content: flex-start; gap: 5px; }
}
