/* Original title mode rail, with only the two friend entry paths grouped. */
#titleScreen #playModes { grid-template-columns:repeat(3,minmax(0,1fr)); max-width:1000px; }
@media(max-width:700px) { #titleScreen #playModes { grid-template-columns:repeat(2,minmax(0,1fr)); } #titleScreen #playModes #startBtn { grid-column:1/-1; justify-content:center; } }
#friendEntryModes:not([hidden]) { display:grid; grid-template-columns:1fr 1fr; gap:0; margin:0 0 24px; border:1px solid var(--color-rule-strong); }
#friendEntryModes button { display:flex; justify-content:center; align-items:center; gap:10px; min-height:54px; width:100%; padding:10px; border:0; border-radius:0; background:var(--color-paper-2); color:var(--color-ink-2); font:500 14px/1.5 var(--font-body); }
#friendEntryModes button+button { border-left:1px solid var(--color-rule-strong); }
#friendEntryModes button[aria-pressed=true] { background:#c9ad702b; color:#f1ddb0; box-shadow:inset 0 -2px var(--color-accent); }
#friendEntryModes svg { width:24px; height:24px; color:var(--color-accent); }
.top-actions #frontierMapBtn { min-width:44px; min-height:44px; }
.top-actions #frontierMapBtn svg { width:24px; height:24px; }
.network-indicator { position:fixed; right:24px; bottom:calc(var(--dock) + 10px); padding:5px 8px; color:#d5ddc7; background:#102017a8; font-size:10px; pointer-events:none; }
body[data-multiplayer=false] .network-indicator { display:none; }
body[data-multiplayer=true] .location { display:flex; }
body[data-multiplayer=true] .potion-tray { right:25px; }
#observerBar { position:fixed; top:108px; right:24px; z-index:15; display:flex; align-items:center; gap:16px; max-width:min(470px,90vw); padding:10px 12px 10px 16px; border:1px solid #d4bd7b99; background:#12251af0; box-shadow:0 4px 22px #0004; }
#observerBar[hidden] { display:none; }
#observerBar b { display:block; font-size:14px; color:#f3dfb5; }
#observerBar small { display:block; color:#c8cfba; font-size:11px; margin-top:5px; }
#returnToFrontier { min-height:44px; padding:8px 12px; border:1px solid #c3a468; background:#34452d; color:#f1dfb7; font-size:12px; }
body[data-spectating=true] #world { cursor:grab; }
body[data-spectating=true] :is(.management-shortcuts,.potion-tray,#wavePanel,#towerMenu) { display:none!important; }
body[data-spectating=true] :is(#towerUpgrade,#hireBtn,#hireWoodBtn,#townLab,#townArmy) { visibility:hidden; }
body[data-spectating=true] .tower-card { opacity:.65; cursor:default; }
body[data-watch-loading=true] #world { filter:brightness(.55); }
dialog.frontier-map-dialog { position:fixed; inset:0; width:min(940px,96vw); height:fit-content; max-height:96dvh; margin:auto; padding:14px 18px 12px; border:1px solid #b6955e; border-radius:4px; background:linear-gradient(130deg,#24372ef5,#0f1f1bf7); color:#ede2c6; overflow:auto; box-shadow:0 22px 90px #0009; }
.frontier-map-dialog::backdrop { background:#060e0bd9; backdrop-filter:blur(4px); }
.frontier-map-heading { display:flex; align-items:flex-start; justify-content:space-between; max-width:820px; margin:0 auto; padding:12px 12px 0; }
.frontier-map-heading small { font:9px Georgia,serif; letter-spacing:.2em; color:#bea773; }
.frontier-map-heading h2 { margin:6px 0 8px; font:500 29px/1.3 var(--font-body); }
.frontier-map-heading p { font-size:12px; color:#bfc7b3; margin:0; }
.frontier-map-heading .close-dialog { flex:none; min-width:44px; min-height:44px; }
.frontier-map-board { position:relative; width:100%; aspect-ratio:900/620; margin:4px auto 0; }
.frontier-map-board>img { width:100%; height:100%; display:block; pointer-events:none; user-select:none; }
.frontier-map-regions { position:absolute; inset:0; }
.frontier-region { position:absolute; display:flex; flex-direction:column; align-items:center; justify-content:center; width:27%; height:17%; padding:8px 4px; border:1px solid #a1793f88; border-radius:3px; color:#443824; background:linear-gradient(#f7e6c3df,#e3cb9dcf); box-shadow:0 3px 12px #75562d15,inset 0 0 0 3px #f6e7c124; transform:translate(-50%,-50%); cursor:pointer; }
.frontier-region strong { font:600 clamp(12px,1.65vw,18px)/1.4 var(--font-body); }
.frontier-region span { max-width:98%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; margin-top:4px; }
.frontier-region small { font-size:10px; color:#6a5636; margin-top:3px; }
.frontier-west { left:25%; top:53%; }
.frontier-east { left:75%; top:53%; }
.frontier-north { left:50%; top:26%; }
.frontier-south { left:50%; top:76%; }
.frontier-central { left:50%; top:51%; }
.frontier-region.current { border-color:#6b4925; box-shadow:0 0 0 2px #8d633d77; background:#ead6a8; }
.frontier-region:hover { background:#fff0ce; border-color:#5b4728; }
.frontier-region:focus-visible { outline:3px solid #6f4827; outline-offset:3px; }
#frontierMapStatus { margin:0 auto; padding:0 12px 8px; text-align:center; color:#c6cdb9; font-size:11px; }
@property --speed-elapsed { syntax:'<angle>'; inherits:true; initial-value:0deg; }
.top-actions #speedBtn,.top-actions #speedBtn[aria-pressed=true],.top-actions #settingsBtn {
 flex:0 0 40px; width:40px; height:40px; min-width:40px; min-height:40px;
 padding:0; border:1.5px solid #383b35; border-radius:50%;
 background:#272a29; color:#e4e6e1; font:700 14px/1 Georgia,serif;
 box-shadow:0 1px 3px #0005; transition:none;
}
#speedBtn.speed-cooling::after { inset:0; border-radius:50%; background:conic-gradient(from 0deg,transparent 0deg var(--speed-elapsed),#767b79d9 var(--speed-elapsed) 360deg); }
#speedBtn.speed-cooling::before { content:none; }
@media(max-width:700px) {
 #observerBar { top:154px; left:12px; right:12px; max-width:none; gap:10px; padding:8px 10px; }
 #observerBar b { font-size:12px; }
 #observerBar small { font-size:10px; }
 #returnToFrontier { margin-left:auto; white-space:nowrap; font-size:11px; }
 body[data-multiplayer=true] .potion-tray { right:12px; }
 .network-indicator { right:10px; font-size:9px; }
 dialog.frontier-map-dialog { width:98vw; padding:8px 4px; }
 .frontier-map-heading { padding-inline:16px; }
 .frontier-map-heading h2 { font-size:24px; }
 .frontier-map-heading p { font-size:10px; max-width:230px; line-height:1.6; }
 .frontier-map-board { aspect-ratio:900/760; }
 .frontier-map-board>img { object-fit:fill; }
 .frontier-region { width:31%; height:19%; padding:4px 2px; }
 .frontier-region strong { font-size:11px; }
 .frontier-region span { font-size:9px; }
 .frontier-region small { font-size:8px; }
 #frontierMapStatus { font-size:10px; line-height:1.5; max-width:300px; }
}
@media(max-height:550px) and (min-width:701px) { .frontier-map-heading h2 { font-size:22px; }.frontier-map-heading p { display:none; }.frontier-map-board { max-width:580px; }#observerBar { top:96px; } }
@media(prefers-reduced-motion:reduce) { #speedBtn { transition:none; } }
