/* Vietnam Tycoon / HydraCro OS — responsive 40-tile board */
.game-main{width:min(1720px,100%);max-width:none}
.game-hero{display:flex;justify-content:space-between;gap:22px;align-items:flex-end;padding:10px 0 28px}
.game-hero h1{font:900 clamp(25px,4vw,47px)/1.14 system-ui,sans-serif;letter-spacing:-.052em;margin:13px 0}
.game-hero p{font:14px/1.75 system-ui,sans-serif;color:var(--muted);max-width:780px;margin:0}
.game-hero-pills{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:6px;max-width:310px}
.game-hero-pills span,.online-pill{border:1px solid var(--border);border-radius:4px;padding:6px 9px;font:700 10px/1.4 ui-monospace,monospace;color:var(--accent);background:#14302a}
.game-alert{padding:12px 15px;margin-bottom:14px;border:1px solid #b56559;color:#ffd4c7;background:#381f20;border-radius:8px;font-size:13px}
.game-entry{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(310px,.95fr);gap:18px;min-height:485px}
.game-entry-art{position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:center;align-items:center;overflow:hidden;text-align:center;border:1px solid var(--border);border-radius:12px;background:repeating-linear-gradient(90deg,transparent,transparent 57px,#ffffff04 58px),repeating-linear-gradient(0deg,#071b1b,#071b1b 57px,#ffffff05 58px)}
.game-entry-art:before{content:"";position:absolute;width:65%;aspect-ratio:1;border:1px dashed var(--accent);border-radius:30%;transform:rotate(20deg);opacity:.3;z-index:-1;box-shadow:0 0 0 60px #59ecaf07,0 0 0 120px #59ecaf05}
.entry-ring{font-size:clamp(90px,16vw,205px);line-height:1;color:var(--accent);filter:drop-shadow(0 0 48px #55e9a866)}
.entry-art-title{font:900 clamp(24px,3.6vw,49px)/1.12 system-ui,sans-serif;letter-spacing:.025em;margin:15px}
.game-entry-art p{font-size:11px;letter-spacing:.12em;color:var(--muted)}
.game-entry-form{padding:clamp(20px,3vw,36px);display:flex;flex-direction:column;gap:11px;align-self:stretch;justify-content:center}
.game-entry-form h2{margin:0;color:var(--accent);font-size:16px}
.game-entry-form p{font:13px/1.7 system-ui,sans-serif;color:var(--muted)}
.game-entry-form label,.game-label,.game-trade label{color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.1em}
.game-entry-form .text-input,.game-trade .text-input{margin:3px 0 5px;padding:13px 14px;background:#09171a;border:1px solid var(--border);border-radius:7px;outline:none;color:var(--text);width:100%}
.game-entry-form .text-input:focus,.game-trade .text-input:focus{border-color:var(--accent)}
.game-entry-form .btn{min-height:44px}.game-action-bar{display:flex}.game-action-bar button{flex:1}
.game-entry-form .game-or{text-align:center;color:var(--subtle);margin:10px 0 4px;font-size:10px}
.game-entry-form .code-input{text-transform:uppercase;letter-spacing:.23em;font-size:20px;font-weight:800;text-align:center}
.game-entry-form .game-help{font-size:11px;margin-top:6px}
.game-room-bar{border:1px solid var(--border);border-radius:10px;background:var(--surface);padding:11px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;flex-wrap:wrap}
.game-room-bar>div:first-child{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.game-room-bar strong{font:900 25px/1 ui-monospace,monospace;letter-spacing:.13em;color:var(--accent)}
.game-room-tools{display:flex;gap:8px;flex-wrap:wrap}
.game-room-tools .btn{min-height:32px;padding:7px 10px}
.game-lobby{padding:28px}.game-lobby h2{font-size:22px;margin:0}.game-lobby h2 span{color:var(--accent)}
.game-lobby p{color:var(--muted);font:13px/1.6 system-ui,sans-serif;max-width:740px}
.lobby-players{display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:11px;margin:22px 0}
.lobby-person{background:var(--surface2);border:1px solid var(--border);border-radius:8px;padding:16px;display:flex;align-items:center;gap:9px;font-size:13px}
.lobby-person .avatar,.player-avatar{width:33px;height:33px;border-radius:9px;display:grid;place-items:center;font-weight:900;font-size:17px;color:#08110f;flex:none}
.game-hint{display:block;color:var(--muted);margin-top:12px}
.game-shell{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,340px);gap:16px;align-items:start}
.game-board-frame{min-width:0;overflow:auto;border-radius:10px;border:1px solid var(--border);background:#08171a;padding:8px;scrollbar-width:thin}
.game-board{--tile: min(7.0vw,94px);display:grid;grid-template-columns:repeat(var(--board-cells,11),minmax(0,1fr));grid-template-rows:repeat(var(--board-cells,11),minmax(0,1fr));aspect-ratio:1/1;width:100%;min-width:720px;position:relative;background:radial-gradient(ellipse at center,#193b32 0%,#102725 40%,#061616 72%)}
.board-cell{position:relative;overflow:hidden;z-index:1;display:flex;flex-direction:column;gap:2px;align-items:center;justify-content:space-between;background:#13282b;border:1px solid #35514f;box-shadow:inset 0 0 14px #0002;padding:0 3px 3px;color:#eaf1ed;cursor:pointer;min-width:0;text-align:center}
.board-cell:hover,.board-cell:focus-visible{z-index:3;outline:2px solid var(--accent);outline-offset:-2px}
.board-cell.selected{outline:3px solid var(--accent);outline-offset:-3px;z-index:3}
.board-cell.corner{background:linear-gradient(135deg,#274c42,#102425);justify-content:center;gap:5px}
.board-cell .group-bar{height:8px;width:calc(100% + 6px);flex:none;background:var(--groupcolor,#345d55)}
.board-cell .tile-image{flex:1;display:flex;align-items:center;justify-content:center;min-height:0;width:100%;position:relative}
.board-cell .tile-image img{width:42px;height:42px;max-height:95%;max-width:74%;object-fit:contain;filter:drop-shadow(0 1px 3px #0007)}
.board-cell .tile-image .emoji-fallback{font-size:26px;line-height:1}
.board-cell .tile-name{font:800 clamp(8px,.72vw,11px)/1.16 system-ui,sans-serif;max-width:100%;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.board-cell .tile-price{color:#b6dad2;font-size:9px;font-weight:700;line-height:1}
.board-cell .owner-stripe{position:absolute;left:0;bottom:0;width:100%;height:4px;background:var(--ownercolor);z-index:2}
.board-cell .building-count{position:absolute;right:2px;top:9px;color:#eafdee;background:#193722;border:1px solid #4d9c77;border-radius:4px;font-size:9px;font-weight:900;padding:1px 3px;z-index:2}
.board-cell .mortgage-tag{position:absolute;top:45%;left:0;right:0;background:#7f2e2ebb;color:white;font-size:10px;z-index:3}
.board-cell .tokens{position:absolute;bottom:6px;left:2px;right:2px;display:flex;justify-content:center;gap:2px;flex-wrap:wrap;pointer-events:none;z-index:5}
.board-cell .token{width:14px;height:14px;border-radius:50%;border:1.5px solid #fff;display:grid;place-items:center;color:#081210;font-size:7px;font-weight:900;box-shadow:0 2px 3px #000a}
.board-cell.corner .tile-image img{width:46px;height:46px}
.board-center{grid-area:2/2/-2/-2;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;overflow:hidden;text-align:center;padding:25px;background:radial-gradient(circle at 50% 35%,#245647a6,transparent 55%)}
.board-center:after{position:absolute;content:"";inset:28px;border:1px dashed #66e4b433;transform:rotate(-12deg);pointer-events:none}
.center-badge{font-size:10px;letter-spacing:.22em;color:#b8d8cf;z-index:1}.board-symbol{font-size:clamp(50px,8vw,140px);color:#70f3b9;line-height:.8;text-shadow:0 0 45px #4dffba55;z-index:1}
.board-center strong{font:900 clamp(28px,4vw,64px)/1.1 system-ui,sans-serif;letter-spacing:-.06em;z-index:1}.board-center strong span{color:#66f2b8}
.board-center p{letter-spacing:.2em;color:#b1cac3;font-size:11px;margin:0}
.dice-area{display:flex;align-items:center;gap:18px}.die-face{font:56px/1 system-ui,sans-serif;color:#f4f8f4;text-shadow:0 0 15px #79e5b455}
.center-turn{font-size:12px;font-weight:800;color:#dfefeb}.center-strip{border-top:1px solid #4a766855;padding-top:14px;font-size:10px;letter-spacing:.1em;color:#9bbeb0}
.game-dashboard{display:grid;gap:12px;min-width:0}
.game-panel{padding:15px}.game-panel-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.game-panel-head h2{font-size:12px;letter-spacing:.05em;color:var(--accent);margin:0}
.game-panel-head span{font-size:10px;color:var(--muted)}
.game-action-desc{font:12px/1.65 system-ui,sans-serif;color:var(--muted);margin:14px 0}
.game-buttons{display:flex;flex-wrap:wrap;gap:7px}.game-buttons button{flex:1;min-width:90px}
.game-players{display:grid;gap:6px;margin-top:12px;max-height:370px;overflow-y:auto}
.game-player{display:flex;gap:10px;align-items:center;padding:8px;border:1px solid var(--border);border-radius:7px;background:#0c2021}
.game-player.turn{border-color:var(--accent)}
.game-player.out{opacity:.48;filter:grayscale(.85)}
.player-details{min-width:0;flex:1;overflow:hidden}.player-details strong{font-size:12px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.player-details small{display:block;color:var(--muted);font-size:10px}.player-cash{font-size:12px;font-weight:800;color:var(--accent);white-space:nowrap}
.asset-info{margin-top:12px;font:12px/1.65 system-ui,sans-serif;color:var(--muted)}
.asset-info h3{color:var(--text);font-size:15px;margin:3px 0}.asset-info .asset-mini{width:66px;height:66px;object-fit:contain;float:right}
.asset-info .asset-line{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid var(--border);padding:5px 0}
.asset-info .asset-line strong{color:var(--text)}.asset-buttons{margin-top:10px;display:flex;gap:6px;flex-wrap:wrap}.asset-buttons .btn{padding:7px 10px;min-height:30px}
.game-log{margin-top:11px;max-height:235px;overflow:auto;display:grid;gap:8px}
.game-log-row{padding:7px 9px;background:#0b2221;border-left:2px solid #375b50;border-radius:3px;color:#bbd0c9;font-size:11px;line-height:1.5}
.game-log-row small{color:var(--subtle);display:block;font-size:9px;margin-top:2px}
.game-trade{margin-top:16px;padding:18px}.game-trade h2{font-size:15px;margin:0}.game-trade p{font-size:12px;color:var(--muted)}
.game-trade-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:14px 0}
.game-trade-grid label{display:block}.game-trade-grid .text-input{display:block;font-size:12px;margin:7px 0}
.game-rules{margin-top:22px;padding:16px 20px}.game-rules summary{cursor:pointer;font-size:13px;font-weight:800;color:var(--accent)}
.rules-grid{margin-top:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.rules-grid h3{font-size:12px;margin:8px 0;color:var(--text)}.rules-grid p{font:12px/1.65 system-ui,sans-serif;color:var(--muted);margin:0}
.rules-grid a{color:var(--accent);text-decoration:underline}
.game-footnote{font-size:11px;color:var(--subtle);margin-top:15px}
.game-compact-select{background:#081b1b;border:1px solid var(--border);border-radius:6px;padding:9px;color:var(--text);width:100%;margin-bottom:8px}
.game-compact-input{width:100%;background:#081b1b;border:1px solid var(--border);padding:10px;color:var(--text);border-radius:6px;margin-bottom:7px}
.game-compact-input:focus{border-color:var(--accent)}
[hidden]{display:none!important}
@media(max-width:1420px){.game-shell{grid-template-columns:minmax(0,1fr) 300px}.board-cell .tile-name{font-size:9px}}
@media(max-width:1190px){.game-shell{grid-template-columns:1fr}.game-board-frame{max-width:100%}.game-dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.game-main{padding:16px 10px 28px}.game-hero{display:block}.game-hero-pills{justify-content:flex-start;margin-top:14px;max-width:none}.game-entry{grid-template-columns:1fr}.game-entry-art{min-height:220px}.entry-ring{font-size:90px}.entry-art-title{font-size:27px}.game-entry-form{min-height:360px}.game-board{min-width:700px}.game-dashboard{grid-template-columns:1fr}.rules-grid{grid-template-columns:1fr}.game-room-bar strong{font-size:20px}.game-room-bar{padding:10px}.game-panel{padding:13px}.board-center strong{font-size:40px}.game-room-tools .btn{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}


/* UI enhancement: owner's color fills each purchased tile, not just its stripe. */
.board-cell.owned {
 background:linear-gradient(155deg,#09181826,#06141c82),var(--ownercolor,#23443e);
 border-color:var(--ownercolor,#35514f);
 box-shadow:inset 0 0 0 1px #ffffff24,inset 0 -12px 30px #0003;
}
.board-cell.owned .tile-name {
 background:#07120fc4;
 color:#fff;
 padding:3px 4px;
 border-radius:4px;
 text-shadow:0 1px 2px #000b;
}
.board-cell.owned .tile-price {color:#fff;text-shadow:0 1px 4px #000}
.board-cell.owned .group-bar {border-bottom:1px solid #ffffff74;box-shadow:0 2px 6px #0005}
.board-cell.owned .tile-image img{filter:drop-shadow(0 2px 5px #000a)}
.board-cell.owned .owner-stripe{height:5px;filter:brightness(1.2)}
.board-cell.owned:hover,.board-cell.owned:focus-visible{outline-color:#f5fff9}

/* Readable player names, including long Vietnamese names. */
.lobby-person{font-size:16px;font-weight:800;min-height:70px;overflow-wrap:anywhere}
.lobby-person .avatar{width:38px;height:38px;font-size:19px}
.player-details strong{font-size:15px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
.player-details small{font-size:11px}
.game-player{padding:10px;gap:12px}
.game-player .player-avatar{width:38px;height:38px;font-size:18px}
.game-player .player-cash{font-size:13px}
.center-turn{font-size:14px}
.game-tile-instruction{color:var(--muted);font-size:11px;line-height:1.65;margin:9px 0 0}

/* Floating player action panel: drag the header, collapse to peek at the board. */
.game-action-window{
 position:fixed;z-index:70;right:22px;bottom:22px;
 width:min(380px,calc(100vw - 24px));max-height:min(66vh,590px);
 display:flex;flex-direction:column;overflow:hidden;
 padding:0!important;
 background:#0c1d20f5;border:1px solid #5aac8d;
 border-radius:12px;box-shadow:0 18px 65px #000b,0 0 0 1px #0a1919cc;
 backdrop-filter:blur(14px);
}
.game-action-window[hidden]{display:none!important}
.game-action-window.is-minimized{width:min(290px,calc(100vw - 24px))}
.game-window-header{
 display:flex;align-items:center;gap:9px;padding:12px 13px;
 background:linear-gradient(95deg,#244a3f,#122d30);
 border-bottom:1px solid #3f6e60;
 cursor:grab;touch-action:none;user-select:none;flex:none;
 font:800 12px/1.3 ui-monospace,monospace;letter-spacing:.055em;
}
.game-window-header:active{cursor:grabbing}
.game-window-header strong{flex:1;color:#e8fff5;font-size:12px}
.game-window-grip{font-size:22px;line-height:1;color:#82dfb9}
.game-window-toggle{
 background:#0b2523;border:1px solid #568a77;color:#e6fff4;
 border-radius:6px;font-size:21px;line-height:1;
 width:28px;height:28px;display:grid;place-items:center;cursor:pointer;
}
.game-window-toggle:focus-visible,.game-window-toggle:hover{border-color:var(--accent)}
.game-window-body{padding:16px;overflow:auto;min-height:0}
.game-window-body .game-panel-head h2{font-size:15px}
.game-window-body .game-action-desc{font-size:13px;line-height:1.6}
.game-window-body .game-buttons .btn{font-size:12px;min-height:42px}
.game-action-window.is-minimized .game-window-body{display:none}
.game-window-hint{display:block;color:var(--subtle);font-size:10px;line-height:1.45;margin-top:12px}
.game-action-window.is-dragging{box-shadow:0 24px 72px #000e,0 0 0 1px #7be9b9}

/* Lightweight tooltip follows the pointer and reflects the latest server snapshot. */
.game-tile-tooltip{
 position:fixed;z-index:90;pointer-events:none;
 width:min(296px,calc(100vw - 22px));
 padding:13px 14px;border:1px solid #559b80;border-radius:10px;
 background:#0b1e22f5;color:#eafff2;
 box-shadow:0 16px 48px #000c;backdrop-filter:blur(12px);
 font:12px/1.55 system-ui,sans-serif;
}
.game-tile-tooltip .hover-title{font-size:16px;line-height:1.3;font-weight:850;margin:0 0 7px;overflow-wrap:anywhere}
.game-tile-tooltip .hover-tag{display:inline-block;border-radius:4px;background:#204038;color:#b7ffe0;padding:2px 6px;margin:0 0 8px;font-size:10px}
.game-tile-tooltip .hover-line{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-top:1px solid #496a5b60;padding-top:5px;margin-top:5px}
.game-tile-tooltip .hover-line strong{font-weight:800;text-align:right;color:#fff}
.game-tile-tooltip .hover-owner{border-left:4px solid var(--preview-color,var(--accent));padding-left:8px;margin-bottom:8px}
.game-tile-tooltip .hover-hint{color:#9dc3b6;font-size:10px;margin:9px 0 0}
@media(max-width:760px){
 .game-action-window{right:10px;bottom:10px;width:min(360px,calc(100vw - 20px));max-height:58vh}
 .game-window-header{padding:11px}
 .game-window-body{padding:13px}
 .player-details strong{font-size:15px}
 .lobby-person{font-size:15px}
 .game-tile-tooltip{max-width:270px;font-size:12px}
}


/* 2026-11-13: large, unmistakable player identities on the room roster and board. */
#lobby-players .lobby-person{min-height:82px;gap:14px;align-items:center}
#lobby-players .lobby-person .avatar{
 width:48px;height:48px;font-size:24px;border:2px solid #fff6;
 box-shadow:0 0 0 3px #0003,0 4px 10px #0007;
}
.lobby-player-identity{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center;min-width:0}
.lobby-player-identity .lobby-name{
 display:block;flex-basis:100%;font:900 22px/1.22 system-ui,sans-serif;
 color:#fff;letter-spacing:.015em;overflow-wrap:anywhere;
 text-shadow:0 2px 7px #0008;
}
#player-list .game-player{min-height:86px;padding:13px 12px;gap:13px}
#player-list .game-player .player-avatar{
 width:50px;height:50px;font-size:24px;border:2px solid #fff8;
 box-shadow:0 0 0 2px #0004,0 3px 12px #0008;
}
#player-list .player-name-line{display:flex;align-items:center;flex-wrap:wrap;gap:5px 8px;margin-bottom:4px;min-width:0}
#player-list .player-details .player-name{
 display:block;font:900 21px/1.18 system-ui,sans-serif;
 overflow-wrap:anywhere;white-space:normal;letter-spacing:.01em;
 color:#f7fff9;text-shadow:0 2px 5px #0008;
}
#player-list .game-player.turn .player-name{color:#a9ffd5}
.player-role{
 display:inline-flex;align-items:center;font:800 10px/1.3 ui-monospace,monospace;
 color:#c9e4d8;border:1px solid #456e61;background:#173931;
 border-radius:5px;padding:3px 6px;white-space:nowrap;letter-spacing:.04em;
}
.player-role.you{color:#14241c;background:#91efbd;border-color:#a5f6cc}
.player-role.now{color:#f1ffe9;border-color:#4ecb97;background:#1e6648}
#player-list .player-details small{font-size:12px;line-height:1.5}
#player-list .game-player .player-cash{font-size:14px;font-weight:900;line-height:1.4}
.board-center .center-turn{font-size:19px;line-height:1.35;max-width:90%;overflow-wrap:anywhere}
.board-cell .token{width:19px;height:19px;font-size:10px;border-width:2px;box-shadow:0 2px 7px #000d}

/* Dice movement: glow every visited square and pulse the active token at 250ms/tile. */
.board-cell.motion-current{
 z-index:6;outline:3px solid #fff6b2;outline-offset:-3px;
 box-shadow:inset 0 0 26px #ffd86688,0 0 19px var(--motion-color,#8cf9cf),0 0 6px #ffed9e;
 animation:board-move-light .25s ease-out both;
}
.board-cell.motion-current .tokens{z-index:8}
.board-cell.motion-trail:not(.motion-current){box-shadow:inset 0 0 12px #ffd97038;border-color:#daa553}
.board-cell.motion-trail:not(.motion-current):not(.owned){background:#3d3326}
.board-cell .token.moving-token{
 width:25px;height:25px;font-size:13px;border:2.5px solid #fff6b2;
 color:#08170d;z-index:9;transform-origin:center;
 box-shadow:0 0 0 3px #faffef55,0 0 16px #ffe789,0 4px 12px #000;
 animation:board-token-hop .25s cubic-bezier(.2,.8,.25,1) both;
}
.movement-banner{
 position:relative;z-index:2;width:min(390px,90%);display:flex;
 flex-direction:column;align-items:center;gap:5px;
 padding:12px 15px;background:#0a2021e9;border:1px solid var(--movement-player-color,#80e9ae);
 border-radius:11px;box-shadow:0 0 28px #5ce6a93a;
}
.movement-banner .movement-kicker{font:850 11px/1.4 ui-monospace,monospace;letter-spacing:.1em;color:#fff0b7}
.movement-banner .movement-name{font:900 23px/1.2 system-ui,sans-serif;color:var(--movement-player-color,#9efad0);overflow-wrap:anywhere}
.movement-banner .movement-progress{font:850 13px/1.3 ui-monospace,monospace;color:#e8fff7}
.movement-progress-track{width:100%;height:5px;border-radius:6px;background:#24463b;overflow:hidden}
#movement-progress-fill{width:0;height:100%;border-radius:6px;background:var(--movement-player-color,#91f7b6);transition:width .24s ease}
@keyframes board-token-hop{
 0%{transform:translateY(-13px) scale(1.3)}
 55%{transform:translateY(-6px) scale(1.12)}
 100%{transform:translateY(0) scale(1)}
}
@keyframes board-move-light{
 0%{filter:brightness(1.45)}
 100%{filter:brightness(1)}
}
@media(max-width:760px){
 #player-list .player-details .player-name{font-size:20px}
 .lobby-player-identity .lobby-name{font-size:21px}
 #player-list .game-player{min-height:78px}
 #player-list .game-player .player-avatar{width:46px;height:46px}
 #player-list .game-player .player-cash{font-size:13px}
 .movement-banner{width:min(320px,94%);padding:10px}
 .movement-banner .movement-name{font-size:20px}
 .board-center .center-turn{font-size:17px}
}
@media(prefers-reduced-motion:reduce){
 .board-cell.motion-current,.board-cell .token.moving-token{animation:none!important}
 #movement-progress-fill{transition:none!important}
}


/* Keep the animated status panel entirely visible inside the 9×9 board center. */
.board-center.is-moving{gap:9px;padding:16px}
.board-center.is-moving .center-badge,
.board-center.is-moving .board-symbol,
.board-center.is-moving .center-strip{display:none}
.board-center.is-moving strong{font-size:clamp(26px,3.2vw,45px)}
.board-center.is-moving .dice-area{gap:12px}
.board-center.is-moving .die-face{font-size:48px}
.board-center.is-moving .center-turn{font-size:16px}
@media(max-width:760px){
 .board-center.is-moving{gap:7px;padding:10px}
 .board-center.is-moving strong{font-size:31px}
 .board-center.is-moving .die-face{font-size:41px}
}


/* 3D tabletop edition — one shared authoritative online game, two renderers. */
.game-visual-panel{min-width:0;position:relative;align-self:start}
.game-render-toolbar{
 display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between;
 margin:0 0 9px;padding:9px 12px;border:1px solid #316454;border-radius:9px;
 background:linear-gradient(100deg,#0b2628,#152b31);box-shadow:0 8px 25px #0005;
}
.game-mode-buttons{display:flex;gap:4px;border:1px solid #37564e;background:#0a1c20;border-radius:8px;padding:3px}
.game-mode-btn{
 border:1px solid transparent;border-radius:6px;padding:8px 17px;min-height:36px;
 background:transparent;color:#a3c8bc;font:900 13px/1 ui-monospace,monospace;cursor:pointer;
}
.game-mode-btn.is-current{color:#08221b;background:var(--accent,#8cf2ba);box-shadow:0 2px 12px #5bf9b242}
.game-mode-btn:hover:not(.is-current){border-color:#6dc7a4;color:#fff}
.game-camera-controls{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.game-camera-controls label{font:900 10px/1 ui-monospace,monospace;color:#9be7ca;letter-spacing:.12em;margin-right:3px}
.game-camera-controls select{font:700 12px/1.3 system-ui,sans-serif;color:#e7fff4;background:#153337;border:1px solid #4c8271;border-radius:7px;padding:9px 8px;max-width:220px;min-height:36px}
.game-camera-btn{border:1px solid #527f72;background:#193b38;color:#e8fff5;border-radius:7px;width:37px;height:36px;display:grid;place-items:center;font:900 20px/1 system-ui,sans-serif;cursor:pointer}
.game-camera-btn:hover{background:#286657;border-color:var(--accent,#8af4b4)}
.game-3d-stage{
 height:clamp(520px,63vw,850px);width:100%;position:relative;overflow:hidden;
 background:radial-gradient(circle at 45% 25%,#245254,#07161a 70%);
 border-radius:8px;isolation:isolate;
}
.game-3d-stage canvas{position:absolute;inset:0;outline:none}
.game-3d-hint{position:absolute;bottom:11px;left:50%;transform:translateX(-50%);z-index:2;
 pointer-events:none;white-space:normal;text-align:center;min-width:200px;
 width:max-content;max-width:92%;font:800 10px/1.6 ui-monospace,monospace;
 letter-spacing:.05em;color:#e3f8e8;background:#071719cc;border:1px solid #6083747a;
 border-radius:7px;padding:5px 11px;text-shadow:0 1px 2px #000}
.game-3d-stage.is-loading::after{content:'ĐANG KHỞI TẠO BÀN CỜ 3D…';position:absolute;inset:0;display:grid;place-items:center;color:#b8ffd7;background:#08191cf0;z-index:3;font:900 13px/1.5 ui-monospace,monospace}
#game-mode-3d.is-current{background:#ffda8c;color:#2c2112;box-shadow:0 2px 13px #efb84e44}
@media(max-width:760px){
 .game-render-toolbar{padding:8px;gap:8px}
 .game-3d-stage{height:clamp(400px,115vw,650px)}
 .game-3d-hint{font-size:9px}
 .game-camera-controls{width:100%}
 .game-camera-controls select{max-width:none;flex:1;min-width:0}
 .game-mode-btn{padding:7px 12px}
}


/* 2026-11-13: compact viewport-first game. Keep a square board entirely in view. */
body.tycoon-playing .game-main{padding-top:7px!important}
body.tycoon-playing .game-hero{display:none}
body.tycoon-playing .game-room-bar{margin-bottom:7px;padding:7px 11px}
body.tycoon-playing .game-room-bar strong{font-size:19px}
body.tycoon-playing .game-render-toolbar{margin-bottom:5px;padding:5px 8px}
body.tycoon-playing .game-board-frame{padding:4px;display:block;max-height:calc(100dvh - 140px);overscroll-behavior:contain}
body.tycoon-playing #board{
 display:grid;grid-template-columns:repeat(var(--board-cells,11),minmax(0,1fr));
 grid-template-rows:repeat(var(--board-cells,11),minmax(0,1fr));
 aspect-ratio:1/1;margin:0 auto;
}
body.tycoon-playing .board-cell{min-width:0;min-height:0}
body.tycoon-playing .game-visual-panel{min-width:0}
body.tycoon-playing .game-shell{grid-template-columns:minmax(0,1fr) minmax(250px,310px);gap:10px}
body.tycoon-playing .game-3d-stage{height:min(74dvh,calc(100dvh - 145px));min-height:300px}
.game-2d-controls{display:flex;gap:5px;align-items:center}
.game-fit-btn{
 border:1px solid #527f72;background:#163b38;color:#d7fff0;
 font:800 11px/1 ui-monospace,monospace;border-radius:7px;
 padding:0 10px;height:36px;white-space:nowrap;cursor:pointer;
}
.game-fit-btn.is-current{border-color:#8ceec0;background:#235446}
.game-fit-btn:hover{color:#fff;background:#2d6154}

/* Logo selection in waiting room; each free logo is unique within the room. */
.game-logo-chooser{padding:18px;border:1px solid #46765f;background:#0a2220;border-radius:12px;margin:10px 0 18px}
.game-logo-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:7px}
.game-logo-heading h3{font:900 16px/1.3 system-ui,sans-serif;color:#adfbd4;margin:0}
.game-logo-heading span{font-size:12px;color:#a5beb3}
.game-logo-options{margin-top:13px;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:10px;max-width:820px}
.game-logo-option{min-height:60px;display:grid;place-items:center;padding:6px;border-radius:14px;
 border:2px solid #457563;background:linear-gradient(145deg,#1d4337,#0a2022);
 color:#fff;font:36px/1 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;
 cursor:pointer;box-shadow:0 3px 9px #0005;transition:transform .18s,box-shadow .18s,border-color .18s;
}
.game-logo-option:hover:not(:disabled),.game-logo-option:focus-visible{border-color:#eaf9ac;transform:translateY(-3px) scale(1.06);box-shadow:0 8px 20px #0008}
.game-logo-option.is-selected{border:3px solid #a7ffcd;background:#315e45;box-shadow:0 0 0 3px #80f5ac44,0 0 20px #60ffb444}
.game-logo-option:disabled{opacity:.28;filter:grayscale(1);cursor:not-allowed}
.game-logo-selected{margin:10px 0 0!important;color:#f1ffe8!important;font-weight:850!important;font-size:14px!important}
#lobby-players .lobby-person .avatar,#player-list .game-player .player-avatar{border-radius:50%;font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif}

/* Circular game tokens are twice the earlier ~19px size. */
body.tycoon-playing #board .tokens{bottom:5px;gap:0;overflow:visible}
body.tycoon-playing #board .token{
 width:38px;height:38px;min-width:38px;
 border-radius:50%;border:3px solid #fffef1;
 display:grid;place-items:center;
 font:24px/1 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;
 background-clip:padding-box!important;
 box-shadow:0 0 0 2px #06130dc4,0 3px 11px #000c;
 text-shadow:0 2px 3px #0008;
}
body.tycoon-playing #board .token.moving-token{
 width:50px;height:50px;min-width:50px;font-size:30px;
 border:3px solid #fff0a4;
 box-shadow:0 0 0 4px #fce78666,0 0 22px #ffdb65,0 3px 15px #000e;
 animation:board-token-hop .25s cubic-bezier(.2,.8,.25,1) both;
}
body.tycoon-playing #board .tokens.tokens-crowded{display:grid;grid-template-columns:repeat(2,1fr);justify-items:center;gap:0;bottom:0}
body.tycoon-playing #board .tokens.tokens-crowded .token{width:24px;height:24px;min-width:24px;font-size:15px;border-width:2px}
body.tycoon-playing #board .tokens.tokens-packed .token{width:19px;height:19px;min-width:19px;font-size:12px;border-width:1.5px}
body.tycoon-playing #board .tokens.tokens-crowded .token.moving-token{width:32px;height:32px;min-width:32px;font-size:20px;z-index:12}

/* Stop, purchase, house and hotel each own a visually distinct animation.
   Effects sit in the board overlay, outside the tile's clipped content. */
.tycoon-tile-effect{
 position:absolute;z-index:40;pointer-events:none;width:1px;height:1px;
 transform:translate(-50%,-50%);isolation:isolate;
}
.tycoon-tile-effect .fx-ring{
 position:absolute;left:50%;top:50%;width:60px;height:60px;
 border:4px solid #fff6b7;border-radius:50%;
 transform:translate(-50%,-50%) scale(.12);opacity:0;
 animation:tycoon-stop-shock 1.0s ease-out both;
 box-shadow:0 0 21px #ffeea7a8,inset 0 0 12px #ffffff82;
}
.tycoon-tile-effect .ring-2{animation-delay:.17s;border-width:2px}
.tycoon-tile-effect .fx-glyph{
 position:absolute;left:50%;top:50%;display:grid;place-items:center;
 font:900 37px/1 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;
 transform:translate(-50%,-50%);filter:drop-shadow(0 4px 9px #000e);
 animation:fx-stop-symbol .7s ease-out both;
}
.tycoon-tile-effect .fx-label{
 position:absolute;left:50%;top:50%;transform:translate(-50%,20px);
 white-space:nowrap;border-radius:5px;padding:6px 9px;
 color:#fffef0;background:#11322dee;border:1px solid #f2db9e;
 font:900 11px/1.3 ui-monospace,monospace;
 text-shadow:0 2px 3px #000;
 animation:fx-purchase-label 1.0s ease-out both;
}
.tycoon-tile-effect.fx-stop .fx-glyph{font-size:24px;color:#ffeeb2}
.tycoon-tile-effect.fx-buy .fx-ring{
 border-color:#ffd769;box-shadow:0 0 30px #ffd769b0,inset 0 0 20px #fff9;
 animation-name:tycoon-buy-ring;
}
.tycoon-tile-effect.fx-buy .fx-glyph{animation-name:fx-buy-symbol}
.tycoon-tile-effect.fx-buy .fx-label{background:#56411ce9;border-color:#ffe49b;color:#fff4c6}
.tycoon-tile-effect.fx-build .fx-ring{
 border-color:#83eeaa;box-shadow:0 0 32px var(--fx-color,#76e8b3),0 0 20px #9fff9d;
 animation-name:tycoon-build-ring;
}
.tycoon-tile-effect.fx-build .fx-glyph{font-size:42px;animation-name:fx-build-drop}
.tycoon-tile-effect.fx-hotel .fx-ring{
 width:90px;height:90px;border-width:6px;border-color:#fff0bd;
 box-shadow:0 0 42px #ffdf6e,0 0 62px var(--fx-color,#fff);
 animation-name:tycoon-hotel-ring;animation-duration:1.45s;
}
.tycoon-tile-effect.fx-hotel .ring-2{animation-delay:.23s}
.tycoon-tile-effect.fx-hotel .fx-glyph{font-size:66px;animation-name:fx-hotel-drop;animation-duration:.75s}
.tycoon-tile-effect.fx-hotel .fx-label{font-size:14px;background:#684418ea;border-color:#fff5c5;animation-duration:1.4s}
@keyframes tycoon-stop-shock{
 0%{opacity:0;transform:translate(-50%,-50%) scale(.2)}
 16%{opacity:1}
 100%{opacity:0;transform:translate(-50%,-50%) scale(3.2)}
}
@keyframes tycoon-buy-ring{
 0%{opacity:0;transform:translate(-50%,-50%) scale(.2)}
 16%{opacity:1}
 100%{opacity:0;transform:translate(-50%,-50%) scale(4.1)}
}
@keyframes tycoon-build-ring{
 0%{opacity:.1;transform:translate(-50%,-50%) scale(.4)}
 30%{opacity:1}
 100%{opacity:0;transform:translate(-50%,-50%) scale(4)}
}
@keyframes tycoon-hotel-ring{
 0%{opacity:.8;transform:translate(-50%,-50%) scale(.1)}
 23%{opacity:1}
 100%{opacity:0;transform:translate(-50%,-50%) scale(8)}
}
@keyframes fx-stop-symbol{
 0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}
 45%{opacity:1;transform:translate(-50%,-50%) scale(1.5)}
 100%{opacity:0;transform:translate(-50%,-50%) scale(1)}
}
@keyframes fx-buy-symbol{
 0%{opacity:0;transform:translate(-50%,-50%) rotate(-30deg) scale(.2)}
 35%{opacity:1;transform:translate(-50%,-65%) rotate(5deg) scale(1.55)}
 85%{opacity:1;transform:translate(-50%,-55%) scale(1)}
 100%{opacity:0;transform:translate(-50%,-55%) scale(1)}
}
@keyframes fx-build-drop{
 0%{opacity:0;transform:translate(-50%,-180%) scale(1.5)}
 35%{opacity:1;transform:translate(-50%,-35%) scale(.65)}
 60%{opacity:1;transform:translate(-50%,-55%) scale(1.24)}
 100%{opacity:0;transform:translate(-50%,-50%) scale(1)}
}
@keyframes fx-hotel-drop{
 0%{opacity:0;transform:translate(-50%,-250%) scale(1.4)}
 39%{opacity:1;transform:translate(-50%,-38%) scale(.76)}
 62%{opacity:1;transform:translate(-50%,-55%) scale(1.45)}
 100%{opacity:0;transform:translate(-50%,-50%) scale(1.06)}
}
@keyframes fx-purchase-label{
 0%{opacity:0;transform:translate(-50%,45px)}
 28%{opacity:1;transform:translate(-50%,30px)}
 72%{opacity:1}
 100%{opacity:0;transform:translate(-50%,0)}
}
#game-view.hotel-earthquake{animation:tycoon-hotel-earthquake .78s cubic-bezier(.25,.1,.8,.5) both}
@keyframes tycoon-hotel-earthquake{
 0%,100%{transform:translate(0,0)}
 9%{transform:translate(-9px,5px)}
 18%{transform:translate(11px,-7px)}
 27%{transform:translate(-14px,7px)}
 38%{transform:translate(14px,9px)}
 50%{transform:translate(-10px,-9px)}
 63%{transform:translate(9px,6px)}
 78%{transform:translate(-5px,3px)}
 91%{transform:translate(2px,-2px)}
}
.dice-area{perspective:700px;position:relative;z-index:3}
.die-face{display:inline-block;transform-origin:center center}
.die-face.is-spinning{
 color:#fff8d0;text-shadow:0 0 25px #ffd96a,0 0 38px #7af5bc;
 animation:tycoon-dice-tumble .36s linear infinite;
}
.die-face.is-spinning:nth-child(2){animation-direction:reverse;animation-delay:.07s}
@keyframes tycoon-dice-tumble{
 0%{transform:translateY(3px) rotateX(0) rotateZ(0) scale(.95)}
 30%{transform:translateY(-17px) rotateX(160deg) rotateZ(115deg) scale(1.16)}
 62%{transform:translateY(-7px) rotateX(275deg) rotateZ(245deg) scale(1.08)}
 100%{transform:translateY(3px) rotateX(360deg) rotateZ(360deg) scale(.95)}
}
@media(max-width:1190px){
 body.tycoon-playing .game-shell{grid-template-columns:1fr}
 body.tycoon-playing .game-board-frame{width:100%}
}
@media(max-width:760px){
 .game-logo-options{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
 .game-logo-option{min-height:57px;font-size:32px}
 body.tycoon-playing .game-render-toolbar{gap:7px}
 body.tycoon-playing .game-3d-stage{height:min(68dvh,calc(100dvh - 130px));min-height:290px}
 body.tycoon-playing .game-board-frame{max-height:calc(76dvh - 50px)}
 body.tycoon-playing .board-cell .tile-image{display:none}
 body.tycoon-playing .board-cell .tile-name{font-size:clamp(6px,1.9vw,10px);line-height:1.06;-webkit-line-clamp:3}
 body.tycoon-playing .board-cell .tile-price{font-size:8px}
 body.tycoon-playing #board .token{width:30px;height:30px;min-width:30px;font-size:20px}
 body.tycoon-playing #board .token.moving-token{width:39px;height:39px;min-width:39px;font-size:24px}
 body.tycoon-playing #board .tokens.tokens-crowded .token{width:18px;height:18px;min-width:18px;font-size:12px}
 .game-fit-btn{padding:0 7px;font-size:10px}
}
@media(prefers-reduced-motion:reduce){
 .tycoon-tile-effect .fx-ring,.tycoon-tile-effect .fx-glyph,
 .tycoon-tile-effect .fx-label,.die-face.is-spinning,
 #game-view.hotel-earthquake{animation:none!important}
 .tycoon-tile-effect .fx-ring{display:none}
}


/* Context-sensitive construction inside the draggable action window. */
.game-context-build{
 display:grid;gap:7px;flex-basis:100%;width:100%;
 padding:12px;border:1px solid #5e9f72;border-radius:9px;
 background:linear-gradient(130deg,#194d35,#113126 72%);
 box-shadow:inset 0 0 0 1px #a1e5a512;
}
.game-context-build-title{
 display:block;font:900 13px/1.45 system-ui,sans-serif;
 color:#dcffe2;overflow-wrap:anywhere;
}
.game-context-build .game-build-action{
 width:100%;min-height:47px!important;padding:10px 13px;
 font:900 14px/1.3 system-ui,sans-serif!important;
 color:#06251c;background:#b3f1b1;border:1px solid #d4ffc5;
 border-radius:7px;box-shadow:0 3px 12px #54e69d42;
}
.game-context-build .game-build-action:not(:disabled):hover{
 background:#ddffc5;box-shadow:0 0 18px #98ffd7b5;transform:translateY(-1px)
}
.game-context-build .game-build-action:disabled{
 color:#a1bdab;background:#1c3a2e;border-color:#536c5a;
 box-shadow:none;opacity:.78;cursor:not-allowed
}
.game-build-hint{display:block;font:11px/1.5 system-ui,sans-serif;color:#ccdfcc}

/* Never leave a server-confirmed property action looking inert or silent. */
.game-action-feedback{
 margin:9px 0 11px;padding:11px 12px;border-radius:8px;
 background:linear-gradient(110deg,#1a543c,#12362f);
 border:1px solid #6ce3a3;color:#e5ffec;
 font:800 12px/1.55 system-ui,sans-serif;overflow-wrap:anywhere;
 box-shadow:0 3px 15px #43e5a92a;
}
.game-action-feedback.is-error{
 background:linear-gradient(110deg,#542723,#351f25);
 border-color:#ed8578;color:#ffe4dc;
}
.game-action-feedback.is-pending{border-color:#e5c873;color:#fff0b6;background:#393320}
.tycoon-action-toast{
 position:fixed;z-index:120;
 bottom:max(22px,env(safe-area-inset-bottom,0px));
 left:50%;transform:translateX(-50%);
 max-width:min(560px,calc(100vw - 30px));
 width:max-content;padding:14px 19px;
 border-radius:11px;border:1px solid #88ebaa;
 background:#13402dea;color:#f0fff0;
 box-shadow:0 10px 35px #000d,0 0 25px #60eba34d;
 backdrop-filter:blur(12px);text-align:center;overflow-wrap:anywhere;
 font:900 14px/1.45 system-ui,sans-serif;pointer-events:none;
}
.tycoon-action-toast.is-error{background:#5b2726f3;border-color:#ff9c86;color:#fff0eb}
.tycoon-action-toast.is-pending{background:#333327f3;border-color:#f5d97e;color:#fff6d3}
.asset-buttons .asset-action-hint{
 display:block;flex:1 1 100%;font:750 11px/1.6 system-ui,sans-serif;
 color:#ffccad;border-left:3px solid #e3a176;padding:3px 8px;
 background:#472c2552;border-radius:0 5px 5px 0;overflow-wrap:anywhere;
}
.asset-buttons .btn:disabled{cursor:not-allowed;opacity:.65;filter:grayscale(.2)}
@media(max-width:760px){
 .tycoon-action-toast{bottom:10px;font-size:12px;padding:12px;max-width:calc(100vw - 24px)}
 .game-action-feedback{font-size:12px}
}


/* Optional double-size game map. This enlarges the actual 2D board, not the rules
   or the number of cells; 3D receives an enlarged render viewport. */
.game-expand-btn{
  border:1px solid #bd9452;border-radius:7px;background:#3c321e;color:#ffe1a2;
  font:900 11px/1.25 ui-monospace,monospace;letter-spacing:.04em;
  padding:9px 12px;min-height:36px;cursor:pointer;white-space:nowrap;
}
.game-expand-btn:hover,.game-expand-btn[aria-pressed="true"]{
  background:#ffda90;color:#29251c;border-color:#ffe4ad;
}
body.tycoon-map-expanded{overflow:hidden!important}
body.tycoon-map-expanded::before{
  content:"";position:fixed;inset:0;background:#061114d9;z-index:95;
}
body.tycoon-map-expanded .game-visual-panel.is-map-expanded{
  position:fixed;z-index:100;inset:clamp(8px,1.5vh,20px) clamp(8px,1.5vw,24px);
  display:flex;flex-direction:column;min-height:0;min-width:0;
  padding:10px;background:#091b1e;border:1px solid #73917b;border-radius:14px;
  box-shadow:0 30px 100px #000b;
}
body.tycoon-map-expanded .game-visual-panel.is-map-expanded .game-render-toolbar{
  flex:none;margin-bottom:9px;
}
body.tycoon-map-expanded .game-visual-panel.is-map-expanded .game-board-frame{
  flex:1;min-height:0;min-width:0;height:100%;
  max-height:none!important;overflow:auto;border-color:#638d75;
}
body.tycoon-map-expanded .game-visual-panel.is-map-expanded .game-3d-stage{
  height:100%!important;min-height:0!important;max-height:none!important;
}
body.tycoon-map-expanded .game-action-window{z-index:110}
body.tycoon-map-expanded .game-tile-tooltip{z-index:125}
body.tycoon-map-expanded .tycoon-action-toast{z-index:115}
@media(max-width:760px){
  .game-expand-btn{padding:7px 9px;font-size:10px}
  body.tycoon-map-expanded .game-visual-panel.is-map-expanded{inset:4px;padding:5px}
  body.tycoon-map-expanded .game-visual-panel.is-map-expanded .game-render-toolbar{gap:6px}
}

/* Original illustrated Chance / Fortune event card shared by 2D and 3D. */
.tycoon-card-modal[hidden]{display:none!important}
.tycoon-card-modal{
  position:fixed;inset:0;z-index:200;
  display:grid;place-items:center;overflow:auto;
  padding:16px;background:#041014e8;backdrop-filter:blur(12px);
}
.tycoon-card-dialog{
  position:relative;width:min(92vw,490px);max-height:calc(100dvh - 32px);
  overflow:auto;border-radius:21px;
  border:2px solid #efd28c;
  background:linear-gradient(150deg,#143749,#0b1729 74%);
  box-shadow:0 30px 95px #000d,0 0 60px #f2c8762e;
  color:#fef4d7;
  animation:tycoon-card-reveal .44s cubic-bezier(.2,.85,.2,1) both;
}
.tycoon-card-modal.is-chest .tycoon-card-dialog{
  border-color:#98e7c4;background:linear-gradient(150deg,#195b50,#0d2d3a 75%);
  box-shadow:0 30px 95px #000d,0 0 60px #8cf1b538;
}
.tycoon-card-head{display:flex;justify-content:space-between;align-items:center;gap:14px;
  padding:19px 60px 11px 21px;font:900 14px/1.4 ui-monospace,monospace;
  letter-spacing:.12em;color:#ffe9af}
.tycoon-card-modal.is-chest .tycoon-card-head{color:#abffe0}
#tycoon-card-player{font-size:11px;letter-spacing:0;text-align:right;overflow-wrap:anywhere}
.tycoon-card-close{position:absolute;right:13px;top:12px;width:34px;height:34px;
  border:1px solid #ffffff6b;background:#0b1e2acc;color:#fff;border-radius:50%;
  cursor:pointer;font-size:18px;display:grid;place-items:center;z-index:2}
.tycoon-card-paper{
  margin:0 18px;border-radius:12px;overflow:hidden;border:1px solid #ffffff70;
  background:#fff5d9;color:#203b3e;box-shadow:inset 0 0 0 4px #ddbf8791,0 9px 19px #0006;
}
.tycoon-card-illustration{position:relative;height:clamp(145px,32dvh,230px);overflow:hidden}
.tycoon-card-illustration img{width:100%;height:100%;object-fit:cover;display:block}
.tycoon-card-symbol{position:absolute;bottom:9px;right:14px;font-size:40px;
  filter:drop-shadow(0 5px 8px #071d2db9)}
.tycoon-card-content{padding:16px 22px 23px;min-height:156px;text-align:center}
.tycoon-card-kicker{font:800 9px/1.4 ui-monospace,monospace;letter-spacing:.16em;color:#6f7f7f}
.tycoon-card-content h2{font:900 clamp(22px,5vw,32px)/1.2 system-ui,sans-serif;
  letter-spacing:.015em;color:#23434b;margin:7px 0 12px}
.tycoon-card-content p{font:750 clamp(16px,3.5vw,20px)/1.45 system-ui,sans-serif;margin:0 0 8px}
.tycoon-card-effect{font:850 14px/1.5 ui-monospace,monospace!important;color:#9c6f2e}
.tycoon-card-modal.is-chest .tycoon-card-effect{color:#23694c}
.tycoon-card-footer{display:flex;gap:16px;align-items:center;justify-content:space-between;
  padding:16px 20px 20px}
#tycoon-card-progress{font-size:11px;color:#d3d7cf}
.tycoon-card-footer .btn{min-height:43px;max-width:100%;white-space:normal}
@keyframes tycoon-card-reveal{
  from{opacity:0;transform:perspective(1100px) rotateY(-18deg) translateY(32px) scale(.82)}
  65%{opacity:1}
  to{opacity:1;transform:perspective(1100px) rotateY(0) translateY(0) scale(1)}
}
@media(max-width:500px){
  .tycoon-card-modal{padding:8px}
  .tycoon-card-dialog{width:100%;max-height:calc(100dvh - 16px)}
  .tycoon-card-head{padding:15px 55px 11px 16px}
  .tycoon-card-paper{margin:0 10px}
  .tycoon-card-content{padding:15px 13px}
  .tycoon-card-footer{padding:12px 13px 16px}
}
@media(prefers-reduced-motion:reduce){
  .tycoon-card-dialog{animation:none!important}
}


/* Host-authoritative map choice in the lobby: classic 40 / expanded 80. */
.lobby-map-picker{padding:18px;margin:14px 0 18px;border:1px solid #9c7840;
  border-radius:12px;background:linear-gradient(130deg,#1c2925,#102b30)}
.lobby-map-picker .game-logo-heading h3{color:#ffe4a5}
.lobby-map-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.lobby-map-option{
  display:grid;grid-template-columns:44px 1fr;align-items:center;column-gap:11px;
  min-width:0;min-height:112px;padding:13px 14px;cursor:pointer;
  border:2px solid #416e67;border-radius:12px;text-align:left;
  background:linear-gradient(145deg,#112d34,#102123);color:#d0e9dc;
}
.lobby-map-option .map-option-icon{grid-row:span 3;font-size:36px;color:#97decc;text-align:center}
.lobby-map-option .map-option-name{font:900 13px/1.3 ui-monospace,monospace;letter-spacing:.05em}
.lobby-map-option strong{font:950 23px/1 system-ui,sans-serif;color:#fff2c6}
.lobby-map-option small{font-size:11px;line-height:1.5;color:#b6cdbd}
.lobby-map-option:hover:not(:disabled){border-color:#f7d286;background:#25483e}
.lobby-map-option.is-selected{background:linear-gradient(145deg,#35503e,#2b5147);
  border-color:#ffde88;box-shadow:inset 0 0 0 1px #f1da985e,0 0 18px #eec8701e}
.lobby-map-option.is-selected .map-option-icon{color:#ffdd86}
.lobby-map-option:disabled{cursor:default}
.lobby-map-option:disabled:not(.is-selected){opacity:.55}
.lobby-map-option:focus-visible{outline:3px solid #a9f0ca;outline-offset:2px}
#lobby-map-status{line-height:1.6;margin-bottom:0;min-height:18px}

/* The 80-square board is a 21x21 grid, retaining a 19x19 central play field. */
.game-board.is-extended .board-cell{padding:0 1px 2px;gap:1px}
.game-board.is-extended .board-cell .tile-image{display:none}
.game-board.is-extended .board-cell .tile-name{
  font-size:clamp(7px,.68vw,10px);line-height:1.08;
  -webkit-line-clamp:3;letter-spacing:-.025em
}
.game-board.is-extended .board-cell .tile-price{font-size:8px;white-space:nowrap}
.game-board.is-extended .board-cell .group-bar{height:5px}
.game-board.is-extended .board-cell .building-count{top:5px;font-size:8px}
.game-board.is-extended .board-cell .token{width:22px;height:22px;min-width:22px;font-size:14px}
.game-board.is-extended .board-center{padding:10px}
.game-board.is-extended .center-badge{font-size:12px}
.game-board.is-extended .board-symbol{font-size:clamp(80px,11vw,185px)}
.game-board.is-extended .board-center strong{font-size:clamp(32px,5vw,78px)}
@media(max-width:700px){
  .lobby-map-options{grid-template-columns:1fr}
  .lobby-map-option{min-height:92px;padding:11px}
  .lobby-map-picker{padding:12px}
  .game-board.is-extended .board-cell .tile-name{font-size:7px}
  .game-board.is-extended .board-cell .token{width:17px;height:17px;min-width:17px;font-size:11px}
}


/* Five lobby choices: 2 square loops plus 3 fully different road geometries. */
.lobby-map-options{grid-template-columns:repeat(auto-fit,minmax(215px,1fr))}
.lobby-map-option .map-option-icon svg{
  display:block;width:43px;height:43px;overflow:visible;fill:none;
  stroke:currentColor;stroke-width:5;stroke-linejoin:round;stroke-linecap:round;
}
.lobby-map-option .map-option-icon svg circle{fill:currentColor;stroke:none}

/* The 80 square route boards are populated from the PHP routeX/routeY coordinates.
   Square board mode keeps using its 11x11 / 21x21 CSS Grid. */
body.tycoon-playing #board.is-route{
  display:block;position:relative;
  isolation:isolate;overflow:hidden;
  background-color:#0c2929;
}
.game-board.is-route[data-map-type="snake"]{
  background:
    repeating-linear-gradient(90deg,#0a33320b 0 18px,#72c3a513 18px 20px),
    radial-gradient(ellipse at 45% 45%,#2d645a,#082125 75%);
}
.game-board.is-route[data-map-type="islands"]{
  background:
    radial-gradient(ellipse 25% 32% at 25% 45%,#47896a 0%,#235747 75%,transparent 76%),
    radial-gradient(ellipse 25% 32% at 75% 45%,#47896a 0%,#235747 75%,transparent 76%),
    repeating-linear-gradient(40deg,#144e5c 0 15px,#1a6571 16px 31px);
}
.game-board.is-route[data-map-type="spiral"]{
  background:repeating-radial-gradient(circle at 52% 48%,#1c5d64 0 14px,#10333f 15px 27px,#0a2933 28px 42px);
}
.game-board.is-route .board-route-lines{
  position:absolute;inset:0;width:100%;height:100%;
  pointer-events:none;overflow:visible;z-index:0;
}
.board-route-lines path{fill:none;stroke-linejoin:round;stroke-linecap:round}
.board-route-lines .board-route-glow{stroke:#4ffff4a0;stroke-width:1.05;filter:blur(.24px)}
.board-route-lines .board-route-road{stroke:#f9e6ac;stroke-width:.21;stroke-dasharray:.33 .18}
.board-route-lines .board-route-portal{
  fill:#1abcb955;stroke:#fff0a8;stroke-width:.25;
  stroke-dasharray:.35 .2;transform-box:fill-box;transform-origin:center;
  animation:tycoon-portal-rotate 6s linear infinite;
}
@keyframes tycoon-portal-rotate{to{transform:rotate(360deg)}}
.game-board.is-route .board-cell.route-cell{
  position:absolute;z-index:1;
  width:3.75%;height:3.75%;min-width:0;min-height:0;
  transform:translate(-50%,-50%);
  padding:0 1px 1px;gap:0;border-radius:4px;
  box-shadow:0 2px 8px #0008,inset 0 0 7px #fffa;
  justify-content:center;align-items:center;
}
.game-board.is-route .board-cell.route-cell.corner{
  border:2px solid #f9d17e;
  background:linear-gradient(135deg,#645028,#163a3b);
}
.game-board.is-route .board-cell .group-bar{height:4px;position:absolute;left:0;top:0;width:100%}
.game-board.is-route .board-cell .tile-image{display:none}
.game-board.is-route .board-cell .tile-name{
  font:900 clamp(6px,.65vw,9px)/1.08 system-ui,sans-serif;
  -webkit-line-clamp:3;overflow-wrap:anywhere;color:#f5f4e8;
}
.game-board.is-route .board-cell .tile-price{
  font:800 7px/1 system-ui,sans-serif;color:#e0d19a;white-space:nowrap;
}
.game-board.is-route .board-cell .tokens{bottom:1px;left:0;right:0;gap:1px}
.game-board.is-route .board-cell .token{width:18px;height:18px;min-width:18px;font-size:11px}
.game-board.is-route .board-cell .building-count{font-size:7px;top:0;right:0}
.game-board.is-route .board-center{
  position:absolute;grid-area:auto;left:13%;bottom:1.2%;top:auto;right:auto;
  width:74%;height:16%;min-height:0;
  display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;
  padding:6px 14px;gap:5px 20px;border:1px solid #abbd9980;
  border-radius:13px;background:#071c1eef;z-index:1;
}
.game-board.is-route .board-center::after,
.game-board.is-route .board-symbol,
.game-board.is-route .board-center .center-badge,
.game-board.is-route .board-center p,
.game-board.is-route .center-strip{display:none}
.game-board.is-route .board-center strong{font-size:clamp(12px,1.65vw,23px);letter-spacing:.015em}
.game-board.is-route .board-center strong span{display:inline}
.game-board.is-route .die-face{font-size:clamp(24px,3vw,43px)}
.game-board.is-route .dice-area{gap:11px}
.game-board.is-route .center-turn{font-size:clamp(9px,1vw,14px)}
.game-board.is-route .board-center .movement-banner{z-index:7}
@media(max-width:650px){
  .lobby-map-options{grid-template-columns:1fr}
  .game-board.is-route .board-cell .tile-name{font-size:6px}
  .game-board.is-route .board-cell .token{width:12px;height:12px;min-width:12px;font-size:8px}
  .game-board.is-route .board-center{left:6%;width:88%;gap:3px 10px}
  .game-board.is-route .board-center strong{font-size:12px}
}
@media(prefers-reduced-motion:reduce){
  .board-route-lines .board-route-portal{animation:none}
}

/* One synchronized card event per room; local five-second auto-close with countdown. */
.tycoon-card-timer{
  flex:1;min-width:0;max-width:275px;display:flex;flex-direction:column;gap:9px;
}
.tycoon-card-timer #tycoon-card-progress{
  font:850 10px/1.35 ui-monospace,monospace;
  letter-spacing:.06em;color:#ffebba;
}
.tycoon-card-modal.is-chest .tycoon-card-timer #tycoon-card-progress{color:#a5f9d9}
.tycoon-card-timer-track{
  height:5px;width:100%;border-radius:99px;overflow:hidden;
  background:#ffffff28;box-shadow:inset 0 1px 3px #0005;
}
#tycoon-card-timer-fill{
  height:100%;width:100%;transform-origin:left center;
  background:linear-gradient(90deg,#fff0af,#f4be50);
  border-radius:inherit;box-shadow:0 0 11px #ffde7a7a;
  animation:tycoon-card-countdown 5s linear both;
}
.tycoon-card-modal.is-chest #tycoon-card-timer-fill{
  background:linear-gradient(90deg,#bbffe1,#4cdfaa);
}
@keyframes tycoon-card-countdown{
  from{transform:scaleX(1)}
  to{transform:scaleX(0)}
}
@media(prefers-reduced-motion:reduce){
  #tycoon-card-timer-fill{animation:none!important}
}

/* Chance / Fortune is projected to every room member, but only one player receives it. */
.tycoon-card-recipient{
  margin:15px 0 2px!important;padding:10px 12px;border-radius:8px;
  font:900 11px/1.55 ui-monospace,monospace!important;
  letter-spacing:.025em;color:#fff8de!important;
  background:#34565a!important;border:1px solid #5f9f9f;
  text-align:center;overflow-wrap:anywhere;
}
.tycoon-card-modal.is-chest .tycoon-card-recipient{
  border-color:#65ae8d;background:#275e49!important;color:#e6fff0!important;
}

/* HydraCro minimalist game UI: concise actions, help only when requested. */
#phase-text:empty{display:none!important}
.game-help-toggle{
 display:grid;place-items:center;flex:none;width:29px;height:29px;
 border:1px solid #668e80;border-radius:50%;background:#12352f;color:#e9fff1;
 font:900 14px/1 ui-monospace,monospace;cursor:pointer;touch-action:manipulation;
}
.game-help-toggle:hover,.game-help-toggle[aria-expanded="true"]{
 border-color:#b1ebc9;background:#295b46
}
.game-disclosure-content{
 border:1px solid #456c60;border-radius:8px;background:#102a27;
 color:#c8e6da;padding:10px 12px;margin:0 0 10px;
 font:12px/1.5 system-ui,sans-serif;
}
.game-disclosure-content p{margin:5px 0;font:inherit;color:inherit}
.game-disclosure-content strong{color:#e5fff3}
.game-help-details{display:inline-block;position:relative;max-width:100%;vertical-align:middle}
.game-help-details summary{
 list-style:none;display:grid;place-items:center;cursor:pointer;
 width:25px;height:25px;border:1px solid #718c85;border-radius:50%;
 color:#c9e9dd;background:#1a3936;
 font:900 12px/1 ui-monospace,monospace;user-select:none;
}
.game-help-details summary::-webkit-details-marker{display:none}
.game-help-details summary::marker{content:""}
.game-help-details summary:hover,.game-help-details[open] summary{
 background:#315f51;border-color:#a7e8c6;color:#fff
}
.game-help-details>p,.game-help-details>.game-disclosure-content{
 margin:8px 0 0;padding:9px 11px;background:#152e2b;border-radius:8px;
 border:1px solid #527466;color:#e0efe6;font:12px/1.5 system-ui,sans-serif;
 overflow-wrap:anywhere
}
.game-help-toggle:focus-visible,.game-help-details summary:focus-visible{
 outline:2px solid #9de7be;outline-offset:3px
}
.game-context-build .game-help-details{display:block;align-self:flex-end;margin-top:5px}
.asset-buttons .game-help-details{flex:0 0 auto;align-self:center}
.asset-buttons .game-help-details[open]{
 display:block;flex:1 1 100%
}
.game-trade-header{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-bottom:8px}
.game-trade-header h2{margin:0}
.game-trade-header .game-help-details[open]{flex:1}
.tycoon-card-help{display:block;text-align:right;margin-top:8px}
.tycoon-card-help summary{margin-left:auto;background:#e8efda;color:#244c4a;border-color:#aac3ad}
.tycoon-card-help .tycoon-card-help-content{
 margin-top:9px;text-align:left;padding:10px;border-radius:8px;
 background:#f4f0db;border:1px solid #ded6b6
}
.tycoon-card-help .tycoon-card-effect{font-size:12px!important;line-height:1.4!important;margin:0 0 6px!important}
.tycoon-card-help .tycoon-card-recipient{
 margin:4px 0 0!important;padding:0!important;background:transparent!important;
 border:0!important;color:#28524b!important;
 font:700 11px/1.4 system-ui,sans-serif!important;text-align:left;
}
.tycoon-card-modal.is-chest .tycoon-card-help .tycoon-card-recipient{
 background:transparent!important;color:#24614c!important
}
.tycoon-card-modal .tycoon-card-content{min-height:0}
@media(max-width:760px){
 .game-help-toggle{width:30px;height:30px}
 .tycoon-card-help{margin-top:6px}
}


/* 3D pawn identities: one compact, camera-projected HTML chip per player.
   Replaces the two overlapping billboard textures that looked like black blocks. */
.game-3d-player-label-layer{
  position:absolute;inset:0;z-index:1;
  overflow:hidden;pointer-events:none;isolation:isolate;
}
.game-3d-player-label{
  --pawn-color:#8df0bc;
  position:absolute;left:0;top:0;
  box-sizing:border-box;
  display:flex;align-items:center;justify-content:flex-start;
  gap:5px;min-height:29px;max-width:158px;
  padding:3px 9px 3px 5px;
  border-radius:16px;border:1px solid #ffffff5e;
  border-left:3px solid var(--pawn-color);
  background:#071e24e8;color:#fafff9;
  font:800 12px/1.3 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  white-space:nowrap;
  box-shadow:0 3px 10px #0009,0 0 0 1px #0004;
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
  transform:translate3d(-1000px,-1000px,0);
  will-change:transform;
}
.game-3d-player-label[hidden]{display:none!important}
.game-3d-player-label::after{
  content:"";position:absolute;left:calc(50% - 3px);bottom:-5px;
  width:7px;height:7px;
  border-right:1px solid #ffffff5e;
  border-bottom:1px solid #ffffff5e;
  background:#071e24e8;transform:rotate(45deg);
}
.game-3d-player-icon{
  flex:none;display:grid;place-items:center;
  width:22px;height:22px;border-radius:50%;
  background:#ffffff1c;font-size:17px;line-height:1;
}
.game-3d-player-name{
  display:block;min-width:0;overflow:hidden;
  max-width:117px;text-overflow:ellipsis;
  white-space:nowrap;
  text-shadow:0 1px 2px #000;
}
.game-3d-player-label.is-active{
  border-color:#ffe4a4;border-left-color:var(--pawn-color);
  background:#102d30ef;box-shadow:0 3px 12px #000a,0 0 11px #ffdc7a67;
}
.game-3d-player-label.is-mine .game-3d-player-name{color:#b9ffe3}
.game-3d-player-label.is-compact{
  min-height:29px;width:30px;max-width:30px;
  justify-content:center;padding:3px;
  border-radius:50%;gap:0;
}
.game-3d-player-label.is-compact .game-3d-player-icon{
  background:transparent;width:22px;height:22px;
}
.game-3d-player-label.is-compact .game-3d-player-name{display:none}
@media(max-width:760px){
  .game-3d-player-label{font-size:11px;min-height:27px;gap:3px;max-width:130px}
  .game-3d-player-name{max-width:96px}
  .game-3d-player-icon{width:20px;height:20px;font-size:16px}
}

/* Multiplayer audience, vote-kick and optional chat/voice. All are compact by default. */
.tycoon-join-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.tycoon-join-choices .btn{min-width:0;white-space:normal}
.tycoon-vote-panel,.tycoon-spectators-panel{min-width:0}
.tycoon-vote-panel summary,.tycoon-spectators-panel summary{
 list-style:none;display:flex;align-items:center;justify-content:space-between;
 gap:10px;font:850 12px/1.5 ui-monospace,monospace;color:#b9f5d5;cursor:pointer
}
.tycoon-vote-panel summary::-webkit-details-marker,
.tycoon-spectators-panel summary::-webkit-details-marker{display:none}
.tycoon-vote-panel summary::marker,
.tycoon-spectators-panel summary::marker{content:""}
.tycoon-vote-panel summary span,.tycoon-spectators-panel summary span{
 border-radius:99px;background:#294d42;color:#ecffef;padding:1px 8px;white-space:nowrap
}
.tycoon-vote-content{display:flex;flex-direction:column;gap:10px;margin-top:11px}
.tycoon-vote-content p{font:750 12px/1.5 system-ui,sans-serif;color:#e9fff2;margin:0}
.tycoon-vote-content .btn{min-height:36px;font-size:11px}
.tycoon-vote-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tycoon-vote-deadline{font:11px/1.5 system-ui,sans-serif;color:var(--muted)}
.tycoon-spectators-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:11px}
.tycoon-spectator-tag{font:750 11px/1.4 system-ui,sans-serif;
 border:1px solid #4b7669;background:#14332d;border-radius:6px;padding:5px 8px;color:#e1f6ed}
.tycoon-chat-drawer{
 position:fixed;right:max(15px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));
 z-index:150;width:min(375px,calc(100vw - 24px));height:min(490px,calc(100dvh - 40px));
 display:flex;flex-direction:column;gap:9px;padding:12px;border-radius:13px;
 box-shadow:0 18px 60px #000e;background:#102b29;color:var(--text);
 border:1px solid #568274;min-width:0
}
.tycoon-chat-header{display:flex;align-items:center;gap:7px;min-width:0}
.tycoon-chat-header strong{flex:1;font:900 12px/1.35 ui-monospace,monospace;color:#c8ffdf}
.tycoon-chat-header .btn{white-space:nowrap;min-height:31px;font-size:10px;padding:4px 9px}
.tycoon-chat-header .game-window-toggle{font-size:17px;width:30px;height:30px}
.tycoon-chat-header .btn.is-live{color:#dbffe5;border-color:#63df94;background:#15452d}
.tycoon-voice-status{min-height:0;font:11px/1.4 system-ui,sans-serif;color:#9eecc9}
.tycoon-voice-status:empty{display:none}
.tycoon-chat-messages{flex:1;min-height:80px;overflow-y:auto;overscroll-behavior:contain;
 display:flex;flex-direction:column;gap:8px;padding:9px;border:1px solid #41675a;
 border-radius:8px;background:#0a1e20}
.tycoon-chat-message{max-width:95%;align-self:flex-start;border-radius:9px;padding:8px 9px;
 background:#1e4237;border:1px solid #35604d;overflow-wrap:anywhere}
.tycoon-chat-message.mine{align-self:flex-end;background:#2a4c40;border-color:#699e84}
.tycoon-chat-message-header{display:flex;gap:9px;align-items:center;justify-content:space-between}
.tycoon-chat-message-header strong{font:800 11px/1.2 system-ui,sans-serif;color:#def7e9}
.tycoon-chat-message-header time{font-size:9px;color:#a1c9b8}
.tycoon-chat-message p{margin:5px 0 0;font:12px/1.45 system-ui,sans-serif;white-space:pre-wrap;color:#f5fff8}
.tycoon-chat-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}
.tycoon-chat-compose input{width:100%;min-width:0;min-height:39px;padding:8px 10px;
 color:#f3fff8;background:#091f1b;border:1px solid #567a64;border-radius:8px;
 font:12px/1.4 system-ui,sans-serif}
.tycoon-chat-compose .btn{min-height:39px}
.tycoon-voice-help{align-self:flex-end}
.tycoon-voice-help>p{font-size:11px;max-width:300px}
@media(max-width:760px){
 .tycoon-chat-drawer{right:8px;bottom:8px;width:calc(100vw - 16px);height:min(520px,calc(100dvh - 30px))}
 .tycoon-chat-header strong{font-size:11px}
 .tycoon-join-choices{grid-template-columns:1fr}
}
