@font-face {
  font-family: Vazirmatn;
  src: url('/assets/vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@property --edge-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

:root {
  color-scheme: dark;
  --ink: #171621;
  --text: #fbf3e7;
  --muted: #bbb3c3;
  --orange: #ffab64;
  --line: #514656;
  --panel: #211d2b;
  font: 16px/1.65 Vazirmatn, Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; overflow: hidden; overscroll-behavior: none; height: 100%; }
body { background: #252139; color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
:where(button, summary, .game-link, .joystick, .ride-steering),
:where(button, summary, .game-link, .joystick, .ride-steering) * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
h2, p { margin: 0; }
svg { width: 1.2em; height: 1.2em; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid #ffe0b8; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }

#game { position: relative; width: 100%; height: 100vh; height: 100dvh; height:var(--visual-height,100dvh); isolation: isolate; overflow: hidden; }
#view { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#view.dragging { cursor: grabbing; }
#view:focus { outline: none; }
#view:focus-visible { outline: 2px solid var(--orange); outline-offset: -5px; }
.fallback { position: absolute; inset: 0; background: #252139 url('/assets/ruen-facade.webp') 49% 63% / cover; }
#fallback-sign { position: absolute; top: 70%; left: 62%; color: #a7ffc0; text-shadow: 0 0 12px #39ec70; background: #181827; padding: .15rem .55rem; border-radius: .35rem; font: italic 700 1rem Georgia,serif; }
[data-cafe="close"] #fallback-sign { color: #ffbca0; text-shadow: 0 0 12px #e2644c; }
.fallback-message { position: absolute; z-index: 4; top: max(.75rem,env(safe-area-inset-top)); left: max(.75rem,env(safe-area-inset-left)); max-width: calc(100% - 4.7rem); background: #201b29; padding: .5rem .7rem; border-radius: .4rem; }
.aim { position: absolute; z-index: 1; width: 4px; height: 4px; inset: 50% auto auto 50%; transform: translate(-50%,-50%); background: #fff7dc; box-shadow: 0 0 0 1px #201d36a3; border-radius: 50%; pointer-events: none; opacity: 0; }
#game[data-moving] .aim { opacity: .76; }

.lock {
  position: absolute;
  top: 0;
  left: 0;
  background: conic-gradient(from var(--edge-angle), #853a27 0%, #a6462a 47%, #ff8d4e 66%, #ffe3aa 76%, #f57d46 86%, #853a27 100%);
  border: 0;
  padding: 1.75px;
  border-radius: 10px;
  box-shadow: 0 0 11px #fb924b9e, 0 5px 11px #1d1727a6;
  z-index: 3;
  transform: translate3d(var(--x, 0px),var(--y, 0px),0) translate(-50%,-50%) scale(var(--scale, 1));
  animation: trace-edge 2.65s linear infinite;
}
.lock-face {
  display: grid;
  place-items: center;
  gap: 1px;
  min-width: 54px;
  min-height: 49px;
  padding: 4px 9px 3px;
  color: #ffdfbb;
  background: linear-gradient(156deg,#342739,#231b32 48%,#1c202d);
  border-radius: 8.4px;
  font-size: .85rem;
  font-weight: 900;
  line-height: 1.22;
  text-shadow: 0 0 8px #ed6f46b2;
}
.lock-face svg { width: 15px; height: 15px; color: #ffbd88; }
.lock:is(:focus-visible,:hover) { box-shadow: 0 0 23px #ffa257ed, 0 5px 11px #1d1727a6; }
.lock:is(:focus-visible,:hover) .lock-face { background-color: #372d42; }
.lock[data-valid] .lock-face svg { color: #a9edb8; }
.lift-button { position:absolute; z-index:4; left:0; top:0; min-height:44px; display:flex; align-items:center; gap:.45rem; transform:translate3d(var(--x,0px),var(--y,0px),0) translate(-50%,-50%); border:1px solid #f3ab78; border-radius:9px; padding:.36rem .6rem; background:#2b2531f4; color:#ffe4cc; box-shadow:0 0 12px #e58a4b82; font-size:.83rem; font-weight:800; white-space:nowrap; }
.lift-button b { color:#ffc495; }
.cafe-level { position:absolute; z-index:3; left:max(.72rem,env(safe-area-inset-left)); bottom:max(.72rem,env(safe-area-inset-bottom)); padding:.28rem .71rem; border:1px solid #edb98c60; border-radius:8px; color:#ffdec3; background:#262230e3; font-size:.84rem; pointer-events:none; }
@media (any-pointer:coarse) { .cafe-level { left:auto; right:max(.8rem,env(safe-area-inset-right)); bottom:calc(env(safe-area-inset-bottom) + .8rem); } }
#game[data-fallback] .lock { top: 73.8%; left: 38%; transform: translate(-50%,-50%); }
@keyframes trace-edge { to { --edge-angle: 360deg; } }

.menu-toggle, .close {
  display: grid;
  place-items: center;
  padding: 0;
  width: 44px;
  height: 44px;
  border: 1px solid #f9dbc153;
  border-radius: 13px;
  background: #211c2ede;
  box-shadow: 0 5px 17px #211a3266;
  color: #fff3e8;
}
.menu-toggle {
  position: absolute;
  z-index: 5;
  inset: max(.75rem,env(safe-area-inset-top)) max(.75rem,env(safe-area-inset-right)) auto auto;
  border-color: #f9dbc155;
  border-radius: 12px;
  background: #201c2bd1;
  box-shadow: 0 3px 12px #17142154;
}
.menu-toggle svg { width:21px; height:21px; }
.menu-toggle:is(:hover,:focus-visible), .close:is(:hover,:focus-visible) { color: var(--orange); border-color: #ffb37e; background: #3b3044; }
[data-menu-open] .lock { animation-play-state:paused; }
.speech-line { position: absolute; z-index: 3; inset: auto 50% max(1.45rem, env(safe-area-inset-bottom)) auto; transform: translateX(50%); width: max-content; max-width: calc(100% - 1.5rem); margin: 0; padding: .45rem .8rem; border: 1px solid #ffce9b52; border-radius: 10px; color: #fff4e4; background: #231b2be8; font-size: .86rem; line-height: 1.6; text-align: center; pointer-events: none; }
@media (pointer: coarse) { .speech-line { bottom: max(9.7rem,env(safe-area-inset-bottom)); } }
.joystick {
  display: none;
  place-items: center;
  position: absolute;
  z-index: 3;
  bottom: calc(env(safe-area-inset-bottom) + .8rem);
  left: calc(env(safe-area-inset-left) + .8rem);
  width: clamp(112px,33vw,144px);
  height: clamp(112px,33vw,144px);
  border-radius: 50%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.joystick-ring, .joystick-knob { position:absolute; pointer-events:none; border-radius:50%; }
.joystick-ring {
  inset: 2px;
  border: 1px solid #fff1db8a;
  background: radial-gradient(circle,#22203591 31%,#242236bd 72%);
  box-shadow: 0 5px 18px #11102664, inset 0 0 0 8px #d1b5b413;
}
.joystick-knob {
  width: 40%;
  height: 40%;
  border: 1px solid #ffddbdba;
  background: radial-gradient(circle at 42% 38%,#f4c7a7,#96655f 83%);
  box-shadow: 0 3px 12px #160e1a99;
}
:is(.joystick,.ride-steering)[data-active] .joystick-ring { border-color:#ffca94; }
:is(.joystick,.ride-steering)[data-active] .joystick-knob { background: radial-gradient(circle at 42% 38%,#ffe5cc,#ad725a 86%); }
.joystick-access { position:absolute; left:0; bottom:0; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.joystick-access:focus-within { display:flex; direction:ltr; width:max-content; height:auto; clip-path:none; overflow:visible; background:#292030; border-radius:.6rem; }
.joystick-access button { width:44px; height:44px; border:1px solid #8d6771; border-radius:.45rem; background:#302333; }

.dialog {
  position: fixed;
  max-height: calc(100dvh - 28px);
  width: min(24rem,calc(100vw - 26px));
  overflow: auto;
  color: var(--text);
  background: linear-gradient(156deg,#2b2437,#1e1a28 62%);
  border: 1px solid #746075;
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 20px 90px #141223bc;
}
.dialog::backdrop { background: #1c1725a8; backdrop-filter: blur(6px); }
.dialog h2 { margin: 0 0 .62rem; font-size: 1.42rem; font-weight: 840; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: .55rem; min-height: 44px; margin-bottom: 1rem; }
.dialog-top h2 { margin: 0; font-size: 1.2rem; }
.dialog-top .close { box-shadow: none; border-color: #7c687c; background: #2b2436; }
.game-menu {
  inset: max(.75rem,env(safe-area-inset-top)) max(.75rem,env(safe-area-inset-right)) auto auto;
  margin:0;
  width:min(21.5rem,calc(100vw - max(.75rem,env(safe-area-inset-right)) - max(.75rem,env(safe-area-inset-left))));
  max-height:calc(100dvh - max(.75rem,env(safe-area-inset-top)) - max(.75rem,env(safe-area-inset-bottom)));
  border-color:#9a725f;
  background:linear-gradient(154deg,#382b36,#231f2c 39%,#211d29);
  overscroll-behavior:contain;
}
.game-menu::backdrop { background:#17152378; backdrop-filter:blur(3px); }
.game-menu .dialog-top { margin-bottom:.7rem; }
.menu-resume, .menu-actions button, .menu-section summary {
  display:flex;
  align-items:center;
  gap:.5rem;
  min-height:44px;
  min-width:0;
  border:1px solid transparent;
  border-radius:9px;
  padding:.25rem .62rem;
  text-align:start;
  color:#fff0e4;
  font-size:.88rem;
  font-weight:680;
}
.menu-resume { width:100%; justify-content:center; margin-bottom:.4rem; background:#ffbf91; color:#2b1921; border-color:#ffdbb9; font-weight:820; }
.menu-resume:hover { background:#ffd1a9; }
.menu-actions { display:grid; gap:.13rem; }
.menu-actions button { background:transparent; }
.menu-actions button:is(:hover,:focus-visible), .menu-section summary:is(:hover,:focus-visible) { background:#4a3442; border-color:#94726f; }
.menu-actions svg, .menu-actions b { color:#f3bc94; }
.menu-section { border-top:1px solid #7b63725b; margin-top:.38rem; padding-top:.22rem; }
.menu-section summary { justify-content:space-between; cursor:pointer; list-style:none; }
.menu-section summary::-webkit-details-marker { display:none; }
.menu-section summary svg { color:#d0b9b7; }
.menu-section[open] summary svg { transform:rotate(180deg); }
.menu-section .menu-actions { padding-inline-start:.25rem; }
.cinema-dialog { width: min(59rem,calc(100vw - 26px)); }
.cinema-dialog .dialog-top { margin-bottom: .7rem; }
.cinema-choices { display:flex; flex-wrap:wrap; gap:.38rem; margin-bottom:.55rem; }
.cinema-choices button { min-height:44px; padding:.2rem .68rem; border:1px solid #816677; border-radius:8px; background:#272331; color:#f3e7df; font-size:.84rem; }
.cinema-choices button[aria-pressed="true"] { border-color:#ffc28e; color:#ffd8b1; background:#51383b; }
.cinema-dialog video { display: block; width: 100%; max-height: min(67dvh,39rem); aspect-ratio: 16 / 9; object-fit: contain; border: 1px solid #74583d; border-radius: 12px; background: #120f19; }
.lock-dialog {
  width: min(25rem,calc(100vw - 24px));
  padding: clamp(.95rem,4vw,1.45rem);
  border-color: #9b6650;
  background: radial-gradient(ellipse at 98% 0,#513530 0,transparent 46%),linear-gradient(160deg,#2b242d,#211d27 60%);
  box-shadow: 0 22px 80px #100c1bb5,inset 0 1px #ffc39822;
}
.lock-dialog::backdrop { background: #1b1426ac; backdrop-filter: blur(4px); }
.lock-dialog .dialog-top { margin-bottom: .85rem; }
.lock-dialog h2 { margin-bottom: .8rem; color:#fff2e4; font-size:1.37rem; line-height:1.45; }
.device-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: #ffdab2; border: 1px solid #cf8d68; background: #502f33; box-shadow: inset 0 0 14px #ed874526; }
.lock-dialog[data-step="code"] .device-icon { color:#d8f2dc; border-color:#638671; background:#313b36; box-shadow:none; }
.entry-progress { display: flex; gap:.26rem; margin-inline-end:auto; }
.entry-progress i { width: .87rem; height: 3px; border-radius: 2px; background: #815a53; }
.entry-progress i:first-child, .lock-dialog[data-step="code"] .entry-progress i { background: #ffc79b; }
.lock-dialog label:not(.sr-only) { display: block; margin: 0 0 .32rem; color: #e4d1c8; font-size: .84rem; font-weight: 650; }
.lock-dialog input { min-height: 54px; width: 100%; min-width: 0; color: #fff2e5; text-align: center; border: 1px solid #8c747f; border-radius: 11px; background: #181620; font-weight: 730; font-size: 1rem; letter-spacing: .055em; font-variant-numeric: tabular-nums; }
.lock-dialog input::placeholder { color: #c2aebb; opacity: 1; }
.lock-dialog input:focus { border-color:#ffc098; box-shadow: 0 0 0 2px #eb9a6445; outline:none; }
.lock-dialog input[aria-invalid="true"] { border-color:#ffa998; }
.primary { margin-top: .82rem; padding: .49rem .72rem; min-height: 49px; width: 100%; display: flex; align-items: center; justify-content: center; gap: .55rem; border: 1px solid #ffd3aa; border-radius: 11px; color: #2c1920; background: linear-gradient(115deg,#ffd3a6,#f4a371); font-weight: 850; }
.primary:hover { background: #ffcb9c; }
.primary:disabled { cursor: wait; opacity: .72; }
.entry-number { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:0 .6rem; margin:-.46rem 0 .4rem; font-size:.85rem; color:#ebd9cd; }
.entry-number b { font-variant-numeric:tabular-nums; white-space:nowrap; font-weight:680; }
.entry-number .text-button { min-height:44px; margin:0; padding-inline:.35rem; text-decoration:underline; text-underline-offset:.22em; }
.code-field { position: relative; }
.code-field > input { position: absolute; z-index: 1; inset: 0; opacity: 0; height: 100%; }
.code-cells { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(.28rem,1.55vw,.59rem); pointer-events: none; }
.code-cells span { display: grid; place-items: center; min-height: 58px; border: 1px solid #8c747f; border-radius: 11px; color: #fff3e6; background: #181620; font-weight: 790; font-size: 1.35rem; }
.code-cells span:empty::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #d8a887; }
.code-field:focus-within .code-cells .is-current { border-color: #ffba89; box-shadow: 0 0 0 1px #ffba89; }
.code-field > input[aria-invalid="true"] + .code-cells span { border-color: #ffa998; }
.entry-challenge { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.38rem .65rem; margin-top:.54rem; color:#d6bcad; font-size:.75rem; }
.entry-challenge time { font-variant-numeric:tabular-nums; white-space:nowrap; }
.entry-challenge time[data-expired] { color:#ffa998; }
.local-code { display: inline-flex; align-items:center; gap: .42rem; margin: 0; border-radius: 7px; background: #3d2e35; padding: .25rem .5rem; font-size: .75rem; color: #ffd5bc; }
.local-code b { font-variant-numeric: tabular-nums; letter-spacing: .1em; }
.error { margin-top: .38rem; color: #ffc3c3; font-size: .83rem; }
.error:empty { display: none; }
.text-button { display: block; border: 1px solid transparent; padding: .22rem .18rem; min-height: 44px; border-radius: 6px; margin-top: .47rem; background: transparent; color: #f4cab6; font-size: .83rem; }
.text-button:hover { color: #ffefe3; border-color: #67546d; }
.controls { margin: 0; }
.controls dt { color: #ffcdab; font-weight: 740; }
.controls dd { color: #d3cbd7; margin: 0 0 .62rem; font-size: .9rem; }
.sign-settings { direction: ltr; margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sign-settings legend { direction: rtl; width: 100%; margin: 0 0 .4rem; color: var(--muted); font-size: .85rem; }
.sign-settings button { min-height: 44px; border-radius: 8px; min-width: 84px; border: 1px solid #746075; background: #1b1726; font: italic 700 1rem Georgia,serif; color: #ffe2ca; }
.sign-settings button[aria-pressed="true"] { border-color: #b0ffc3; color: #b6ffca; }

@media (any-pointer: coarse) {
  .joystick { display: grid; }
}
#game[data-fallback] :is(.joystick,.aim) { display: none; }

@media (max-width: 420px) {
  .dialog { padding: .82rem; border-radius: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .lock { animation: none; --edge-angle: 55deg; }
}
[data-reduced-motion] .lock { animation: none; --edge-angle: 55deg; }

.light-settings { margin-top: .72rem; direction: rtl; }
.light-settings button { font: 680 .79rem Vazirmatn,Tahoma,sans-serif; min-width: 54px; }
.light-settings [data-light="auto"] { padding-inline: .52rem; }

.heritage-toggle, .heritage-board {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  min-height: 44px;
  border: 1px solid #a49572;
  border-radius: 10px;
  background: #1a352ff2;
  color: #fff1d7;
  padding: .25rem .72rem;
  line-height: 1.45;
  font-size: .85rem;
  font-weight: 740;
  box-shadow: 0 3px 18px #17162155;
}
.heritage-toggle { top: max(.75rem,env(safe-area-inset-top)); left: max(.75rem,env(safe-area-inset-left)); }
.heritage-board { top: var(--y); left: clamp(4rem,var(--x),calc(100% - 4rem)); transform: translate(-50%,-100%); white-space: nowrap; }
.heritage-toggle:hover, .heritage-board:hover { background: #335b50; border-color: #f3cca0; }
.heritage-board kbd { font: 700 .75rem/1.3 system-ui; color: #f7dfaf; border: 1px solid #a49572; border-radius: 4px; padding: .08rem .27rem; }
#game[data-fallback] .heritage-toggle { top: max(4.2rem, calc(env(safe-area-inset-top) + 3.6rem)); }
.heritage-dialog {
  width: min(49rem,calc(100vw - 22px));
  padding: clamp(.78rem,2.5vw,1.45rem);
  background: #f0e5d0;
  color: #22382e;
  color-scheme: light;
  border-color: #b49662;
  overscroll-behavior: contain;
}
.heritage-dialog:has(#heritage-atlas[hidden]) { width: min(33rem,calc(100vw - 22px)); }
.heritage-dialog .dialog-top { align-items: start; gap: .75rem; margin-bottom: .68rem; }
.heritage-dialog .dialog-top h2 { font-size: clamp(1.2rem,3.15vw,1.65rem); align-self: center; line-height: 1.45; }
.heritage-dialog .close { width: 44px; height: 44px; color: #29463a; background: #e7d7bd; border: 1px solid #ac997a; }
.heritage-dialog .close:hover { color: #1e352c; background: #d5c099; border-color: #755b3c; }
.heritage-dialog :focus-visible { outline-color: #275b48; outline-offset: 2px; }
#heritage-map { display: block; width: 100%; height: clamp(218px,37vw,308px); background: #e4e6d7; border: 1px solid #9caa95; border-radius: .65rem; }
.atlas-areas { display:flex; flex-wrap:wrap; gap:.35rem; margin-bottom:.45rem; }
.atlas-areas button { min-height:44px; padding:.25rem .85rem; border:1px solid #9a8d6d; border-radius:.46rem; color:#2e4b40; background:#f8efdd; font-weight:750; }
.atlas-areas button[aria-pressed="true"] { color:#fff9e9; background:#2e4b40; border-color:#2e4b40; }
.heritage-map-note { margin: .25rem 0 .66rem; font-size: .77rem; color: #594d3a; }
.heritage-index { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .55rem .85rem; }
.heritage-index h3 { font-size: .88rem; line-height: 1.55; padding: .31rem .13rem; margin: 0; border-bottom: 2px solid #9a8059; }
.heritage-index ul, .heritage-sources ul { margin: .1rem 0; padding: 0; list-style: none; }
.heritage-index li + li { border-top: 1px solid #cabb9e; }
.heritage-index button {
  width: 100%;
  min-height: 44px;
  padding: .23rem .13rem;
  border: 0;
  background: transparent;
  text-align: start;
  font-weight: 630;
  font-size: .89rem;
  line-height: 1.5;
}
.heritage-index button:hover { background: #e1d0b5; }
.heritage-area { color: #4a6557; font-size: .9rem; font-weight: 730; }
.heritage-era { color: #624b2f; border-bottom: 1px solid #ad9774; padding-bottom: .65rem; margin-bottom: .72rem; font-weight: 650; font-size: .9rem; }
.heritage-summary, .heritage-story { line-height: 1.9; }
.heritage-summary { font-weight: 660; }
.heritage-story { margin-top: .56rem; }
.heritage-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: .92rem 0 .68rem; }
.heritage-actions button { display: flex; align-items: center; justify-content: center; gap: .42rem; min-height: 44px; padding: .32rem .68rem; border-radius: .49rem; font-weight: 740; text-align: start; }
.heritage-visit { border: 1px solid #274b3e; background: #254a3c; color: #fff4e1; }
.heritage-visit:hover { background: #356653; }
.heritage-back { border: 1px solid #a79172; background: #e6d6bb; color: #25392f; }
.heritage-back:hover { background: #dac6a4; }
.heritage-sources { border-top: 1px solid #b9a482; font-size: .87rem; }
.heritage-sources summary { display: list-item; align-content: center; min-height: 44px; font-weight: 700; cursor: pointer; }
.heritage-sources p { margin-top: .55rem; }
.heritage-sources a { color: #1f5441; text-underline-offset: .15em; display: inline-block; padding: .2rem 0; }
.heritage-credit { display: flex; flex-wrap: wrap; gap: .15rem .75rem; direction: ltr; justify-content: end; text-align: end; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .heritage-index { display: block; }
  .heritage-index section + section { margin-top: .55rem; }
  .heritage-index ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: .65rem; }
  .heritage-index li + li { border-top: 0; }
  .heritage-index li { border-bottom: 1px solid #cabb9e; }
}
@media (pointer: coarse) {
  .heritage-board kbd { display: none; }
}

.heritage-map-note { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .12rem .6rem; }
.heritage-map-note a { color: #365741; text-underline-offset: .12em; display: inline-flex; align-items: center; min-height: 24px; }
.heritage-walk-start { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .45rem .7rem; padding: .62rem .72rem; border: 1px solid #a79370; background: #ebe0c9; border-radius: .58rem; margin-bottom: .65rem; }
.heritage-walk-start p { color: #544834; font-size: .79rem; }
.heritage-walk-start button { min-height: 44px; padding: .32rem .66rem; border-radius: .46rem; font-size: .86rem; font-weight: 760; }
.heritage-walk { position: absolute; z-index: 5; top: max(4.05rem, calc(.75rem + env(safe-area-inset-top) + 49px)); left: max(.75rem,env(safe-area-inset-left)); display: flex; align-items: center; gap: .55rem; max-width: calc(100vw - 1.5rem); padding: .27rem .52rem; border: 1px solid #a49572; border-radius: .66rem; background: #172f2bee; color: #fff1d7; box-shadow: 0 4px 18px #17162155; font-size: .84rem; line-height: 1.5; }
.heritage-walk strong, .heritage-walk div span { display: block; }
.heritage-walk div span { color: #e8d2ac; font-size: .86em; }
.walk-direction { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 1px solid #a49572; border-radius: 50%; color: #f4c888; font: 720 23px/1 system-ui,sans-serif; }
.heritage-walk button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: #fcebd0; border-radius: .45rem; flex: none; }
.heritage-walk button:hover { background: #34574c; }

.order-strip {
  position:absolute; z-index:7; inset-block-start:max(.62rem,env(safe-area-inset-top));
  inset-inline-start:50%; transform:translateX(50%); display:flex; align-items:center; justify-content:center;
  gap:.45rem; min-height:36px; width:max-content; max-width:calc(100% - 24px); padding:.12rem .56rem;
  border:1px solid #9e886b; border-radius:.56rem; color:#ffefd4; background:#242e29f7;
  box-shadow:0 3px 12px #1417186b; font-size:.82rem; line-height:1.35;
}
.order-strip > svg { color:#edb678; }
.order-strip time { font-variant-numeric:tabular-nums; color:#f3c58a; white-space:nowrap; }
.order-strip[data-stage="ready"], .order-strip[data-stage="arrived"] { background:#213d33f7; }
.order-strip button { display:flex; align-items:center; justify-content:center; gap:.23rem; min-height:44px; min-width:44px; padding:.2rem .51rem; border:0; border-radius:.38rem; color:#24291f; background:#efc895; font:inherit; font-weight:800; }
.order-strip button svg { width:1em; height:1em; }
#order-ride { flex: none; }
.order-clear { margin-top:.6rem; min-height:44px; }
@media (max-width: 680px) {
  #game[data-order-visible] :is(.heritage-toggle,.menu-toggle) { top:calc(max(.75rem,env(safe-area-inset-top)) + var(--order-height,0px) + 6px); }
  #game[data-order-visible] .heritage-walk { top:calc(max(4.05rem,.75rem + env(safe-area-inset-top) + 49px) + var(--order-height,0px) + 6px); }
}
#game[data-pickup-route] .joystick, #game[data-lift] .joystick, #game[data-crossing] .joystick { display:none; }

.counter-menu {
  position:absolute;
  z-index:2;
  top:var(--y);
  left:var(--x);
  width:var(--w);
  height:var(--h);
  min-width:44px;
  min-height:44px;
  transform:translate(-50%,-50%);
  background:transparent;
  border:1px solid transparent;
  border-radius:.32rem;
  padding:0;
  touch-action:manipulation;
}
.counter-menu span {
  position:absolute;
  left:50%;
  bottom:calc(100% + .22rem);
  transform:translateX(-50%);
  border:1px solid #f1c89a80;
  border-radius:.35rem;
  padding:.1rem .44rem;
  background:#241c2aed;
  color:#ffdfb8;
  font-size:.74rem;
  font-weight:720;
  white-space:nowrap;
  pointer-events:none;
}
.counter-menu:hover, .counter-menu:focus-visible { border-color:#ffd0a0; background:#ffe4c210; }

.restaurant-menu {
  width:min(63rem,calc(100vw - 26px));
  max-height:calc(100vh - 26px);
  max-height:calc(var(--visual-height,100dvh) - 26px);
  padding:0;
  overflow:hidden;
  border-radius:1.2rem;
  background:#201b28;
}
.restaurant-menu[open] { display:flex; flex-direction:column; }
.restaurant-header {
  flex:none;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  display:flex;
  align-items:center;
  gap:.62rem;
  padding:.66rem clamp(.74rem,3vw,1.25rem);
  border-bottom:1px solid #6c4a45;
  background:linear-gradient(100deg,#352431d9,#221b2891),#2c2027 url('/assets/ruen-menu/counter-plate.webp') center 42% / cover;
}
.restaurant-header > div { margin-inline-end:auto; }
#menu-atmosphere {
  display:none;
  position:absolute;
  inset:0 0 0 auto;
  z-index:-1;
  width:46%;
  height:100%;
  object-fit:cover;
  object-position:center 58%;
  opacity:.27;
  mask-image:linear-gradient(90deg,transparent,#000 45%);
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 45%);
  pointer-events:none;
}
@media (min-width:750px) and (prefers-reduced-motion:no-preference) { #menu-atmosphere { display:block; } }
.restaurant-brand { display:block; color:#e9bd88; line-height:1.15; letter-spacing:.155em; font:700 .72rem/1.3 Georgia,serif; direction:ltr; text-align:right; }
.restaurant-header h2 { margin:0; color:#fff0de; line-height:1.55; font-size:clamp(1.12rem,4.8vw,1.5rem); }
.restaurant-header button, .menu-cart-heading button, .menu-quantity button, .restaurant-footer button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.36rem;
  min-width:44px;
  min-height:44px;
  border:1px solid #8c6971;
  border-radius:.55rem;
  background:#25202c;
  color:#ffe1bf;
  padding:.24rem .5rem;
}
#menu-cart-toggle { font-size:.88rem; font-weight:750; white-space:nowrap; }
#menu-cart-count { color:#251b24; background:#f1bd8e; border-radius:1rem; min-width:1.38rem; padding:0 .26rem; text-align:center; }
#menu-browse, .menu-cart { overflow:auto; overscroll-behavior:contain; min-height:0; scrollbar-color:#805d69 #221c2a; }
#menu-browse { flex:1 1 auto; }
#menu-browse::-webkit-scrollbar { width:5px; }
#menu-browse::-webkit-scrollbar-thumb, #menu-categories::-webkit-scrollbar-thumb { background:#765d71; border-radius:8px; }
#menu-categories::-webkit-scrollbar { height:4px; }
.restaurant-filter {
  position:sticky;
  z-index:1;
  top:0;
  padding:.64rem clamp(.7rem,3vw,1.25rem) .22rem;
  background:#2a2331;
  border-bottom:1px solid #574554;
}
#menu-search {
  display:block;
  width:100%;
  min-height:44px;
  border:1px solid #886d7e;
  border-radius:.55rem;
  background:#1e1925;
  color:#fff0df;
  padding:.4rem .66rem;
}
#menu-search::placeholder { color:#cbb9c6; }
#menu-categories { display:flex; gap:.35rem; overflow-x:auto; overscroll-behavior-inline:contain; padding:.48rem .2rem .27rem; scrollbar-width:thin; }
#menu-categories button {
  flex:none;
  min-height:44px;
  padding:.23rem .65rem;
  border:1px solid #634e63;
  border-radius:2rem;
  background:#2b2532;
  color:#f6e0d3;
  white-space:nowrap;
}
#menu-categories button[aria-pressed="true"] { border-color:#f0b784; background:#f0b784; color:#2c1b26; font-weight:800; }
#menu-products, #menu-empty { padding:.5rem clamp(.7rem,3vw,1.25rem) 1rem; }
.menu-product-group + .menu-product-group { margin-top:.9rem; }
.menu-product-group h3, .menu-cart-heading h3 { margin:.14rem 0 .38rem; font-size:1.07rem; color:#ffd1a7; }
.menu-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,16.5rem),1fr)); gap:.52rem; }
.menu-product {
  display:flex;
  min-width:0;
  gap:.59rem;
  padding:.54rem;
  border:1px solid #675260;
  border-radius:.72rem;
  background:#302535;
}
.menu-product img { width:24%; min-width:62px; max-width:91px; aspect-ratio:1; object-fit:cover; align-self:start; border-radius:.44rem; background:#251c29; }
.menu-product-copy { display:flex; flex-direction:column; flex:1; min-width:0; }
.menu-product h4 { color:#fff1e1; font-size:.98rem; margin:0; }
.menu-product p { color:#d4c2cf; font-size:.79rem; line-height:1.56; overflow-wrap:anywhere; padding-block:.13rem .25rem; }
.menu-product-tail { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.24rem; margin-top:auto; min-height:44px; }
.menu-product-tail b { color:#ffd1a7; font-size:.85rem; }
.menu-product-tail > span { font-size:.8rem; color:#ead5cb; }
.menu-add {
  flex:none;
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  padding:0;
  line-height:1;
  border:1px solid #f7c497;
  background:#efb582;
  color:#251b22;
  border-radius:.5rem;
  font:700 1.24rem/1 sans-serif;
}
.menu-add:hover { background:#ffd5aa; }
.menu-add:active { transform:scale(.95); }
.restaurant-footer {
  flex:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:.34rem;
  min-height:49px;
  padding:.12rem clamp(.7rem,3vw,1.25rem);
  border-top:1px solid #624b5a;
  background:#2b2230;
  font-size:.81rem;
}
#menu-quick-cart { display:none; }
.restaurant-footer a { color:#ffd1af; text-underline-offset:.21em; padding-block:.55rem; }
.menu-cart { flex:1 1 auto; padding:.46rem clamp(.7rem,3vw,1.25rem) 1rem; }
.menu-cart-heading, .menu-total, #menu-cart-items li { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.42rem; }
.menu-cart-heading button { font-size:.8rem; }
#menu-cart-items { list-style:none; margin:.54rem 0; padding:0; }
#menu-cart-items li { padding:.36rem 0; border-bottom:1px solid #5d4b5b; }
#menu-cart-items small { display:block; color:#e6c8b7; }
.menu-quantity { display:flex; align-items:center; gap:.48rem; }
.menu-quantity button { font:700 1.13rem/1 sans-serif; }
.menu-quantity b { min-width:.92rem; text-align:center; }
.menu-total strong { color:#f8ca9c; }
#menu-cart-summary p, #menu-cart-limit, #menu-cart-empty { color:#dbc5d2; font-size:.85rem; }
@media (max-width:490px) {
  .restaurant-menu {
    width:calc(100vw - 14px);
    max-height:calc(100vh - 14px);
    max-height:calc(var(--visual-height,100dvh) - 14px - env(safe-area-inset-bottom));
    inset:var(--visual-top,0px) 0 auto;
    margin:7px auto 0;
    border-radius:.86rem;
  }
  .restaurant-header { gap:.35rem; }
  #menu-cart-toggle svg { display:none; }
  #menu-quick-cart { display:flex; justify-content:space-between; flex-basis:100%; margin-top:.38rem; padding-inline:.75rem; color:#2c1d25; background:#eeb782; font-weight:800; }
}
@media (max-height:450px) {
  .joystick { width:103px; height:103px; bottom:calc(env(safe-area-inset-bottom) + .44rem); }
  .restaurant-header, .restaurant-footer { padding-block:.15rem; }
}

.ride-picker {
  position: absolute;
  z-index: 5;
  bottom: max(.95rem,env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 1.25rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45rem;
  pointer-events: none;
}
.ride-picker button, .ride-hud button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  min-height: 44px;
  border-radius: .72rem;
  border: 1px solid #aab5d363;
  background: #171927f2;
  color: #f6efea;
  padding: .34rem .63rem;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.35;
  pointer-events: auto;
}
.ride-picker button[data-ride="car"] { color: #ffdc9a; border-color: #d6a4619c; }
.ride-picker[data-unlocked] button[data-ride="car"] { color: #281b0c; background: #f5ca7d; }
.ride-picker button[data-ride="bike"] { color: #aff1dc; border-color: #74b7a79c; }
.ride-picker button:hover, .ride-hud button:hover { box-shadow: inset 0 0 0 1px currentColor; }
.ride-hud { position: absolute; z-index: 5; inset: 0; pointer-events: none; }
.ride-status {
  position: absolute;
  top: max(4.45rem,calc(env(safe-area-inset-top) + 3.9rem));
  left: max(.75rem,env(safe-area-inset-left));
  right: max(.75rem,env(safe-area-inset-right));
  display: flex;
  direction: ltr;
  justify-content: space-between;
  align-items: start;
  gap: .4rem;
}
.ride-meter, .ride-mission {
  display: flex;
  align-items: center;
  gap: .42rem;
  padding: .36rem .42rem;
  min-width: 0;
  border-radius: .75rem;
  background: #171b2af5;
  border: 1px solid #aab5d375;
}
.ride-meter canvas {
  width: 76px;
  aspect-ratio: 1;
  flex: none;
  border-radius: .45rem;
  background: #263446;
}
.ride-meter div, .ride-mission div { display: grid; direction: rtl; text-align: start; min-width: 0; line-height: 1.45; }
.ride-meter strong, .ride-mission strong { color: #ffdb9b; font-size: .85rem; }
.ride-meter span, #mission-instruction { color: #e2e4ed; font-size: .75rem; overflow-wrap:anywhere; }
.ride-meter small { font-size: .68rem; white-space: nowrap; }
.ride-meter .ride-speed-unit { display: inline-block; font-size: inherit; }
.ride-meter b { font-size: 1rem; font-variant-numeric: tabular-nums; }
#game[data-ride="bike"] .ride-meter strong { color: #a9f5de; }
.ride-mission { direction: rtl; flex-wrap: wrap; max-width: 16rem; }
#mission-arrow { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; color: #281d18; background: #ffd891; font: 800 17px/1 system-ui,sans-serif; }
#mission-photo { border-color: #ffd891; color: #281d18; background: #ffd891; }
#mission-preview { width: 56px; height: 40px; object-fit: cover; border-radius: .25rem; }
.ride-actions {
  position: absolute;
  left: 50%;
  bottom: max(.85rem,env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - 1.5rem);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .34rem;
}
.ride-keys { font-size: .74rem; line-height: 1.4; border-radius: .56rem; padding: .33rem .57rem; background: #171927e8; }
.ride-keys kbd { display: inline-block; direction: ltr; color: #ffdc9a; margin-inline: .17rem; }
.ride-pads { display: none; }
/* Keep implicit touch capture on the pedal when its label changes in reverse. */
[data-drive] > * { pointer-events: none; }
#game[data-ride] :is(.joystick,.aim,#counter-menu,#order-ride) { display: none; }
#game:not([data-ride="bike"]) .pedal-text, #game[data-ride="bike"] .gas-text { display: none; }
#game[data-ride] #view { cursor: default; }
@media (any-pointer: coarse) {
  /* Older mobile Chrome overlays its translate bar without resizing either viewport. */
  #game { --browser-footroom: max(64px, env(safe-area-inset-bottom)); }
  .ride-hud { bottom: calc(var(--browser-footroom) - env(safe-area-inset-bottom)); }
  .joystick { bottom: calc(var(--browser-footroom) + .5rem); }
  .ride-picker { bottom: calc(var(--browser-footroom) + .55rem); left: auto; right: max(.7rem,env(safe-area-inset-right)); transform:none; max-width:calc(100% - 150px); justify-content:flex-start; }
  #game[data-ride] .heritage-toggle { display: none; }
  #game[data-ride] .order-strip { inset-block-start: max(10px,env(safe-area-inset-top)); }
  #game[data-ride][data-order-visible] .menu-toggle { top: calc(max(12px,env(safe-area-inset-top)) + var(--order-height,0px) + 6px); }
  .ride-actions {
    bottom: calc(env(safe-area-inset-bottom) + 126px);
    display: grid;
    grid-template-columns: 44px repeat(3,minmax(0,1fr));
    width: min(355px,calc(100% - 28px));
    max-width: none;
  }
  .ride-actions button { min-width: 0; overflow-wrap: anywhere; }
  .ride-actions button, .ride-pads button { padding: 5px 10px; }
  .ride-keys { display: none; }
  .ride-pads {
    position: absolute;
    direction: ltr;
    bottom: calc(env(safe-area-inset-bottom) + 14px);
    left: calc(env(safe-area-inset-left) + 19px);
    right: calc(env(safe-area-inset-right) + 19px);
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: .65rem;
  }
  .ride-steering {
    display: grid;
    place-items: center;
    position: relative;
    flex: none;
    width: clamp(88px,26vw,110px);
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  .ride-steering .joystick-knob { display: grid; place-items: center; color: #36232b; font: 900 1.15rem/1 system-ui,sans-serif; }
  .ride-pedal-pair { display: flex; align-items: end; gap: 12px; }
  .ride-pads button { touch-action: none; user-select: none; -webkit-touch-callout: none; }
  .ride-pads [data-held] { box-shadow: inset 0 0 0 3px currentColor; }
  .ride-pads button.ride-go {
    min-width: clamp(74px,22vw,100px); min-height: 88px; padding: 7px;
    border-radius: 1.15rem; border-color: #f1d48e; background: #f7cc7b; color: #2c1b16; font-size: 1.17rem;
  }
  #game[data-ride="bike"] .ride-go { background:#b8f0d9; border-color:#bbeedb; color:#17352c; }
  .ride-pads button.ride-brake { min-width: 54px; min-height: 52px; background: #443340; color: #fff0eb; }
  .ride-pads .ride-brake { display:grid; align-content:center; gap:2px; }
  .ride-brake small { font-size:.64rem; }
}
@media (max-width: 680px) {
  .ride-meter canvas { width: clamp(45px,16vw,60px); }
  .ride-meter { max-width: 50%; flex-wrap: wrap; }
  .ride-meter div { flex: 1 1 4.1em; }
  .ride-mission { max-width: 52%; }
  .ride-mission div { flex: 1 1 4.1em; }
  #game[data-order-visible] .ride-status { top:calc(env(safe-area-inset-top) + 73px + var(--order-height,0px)); }
}
@media (max-width: 359px) and (any-pointer: coarse) {
  .ride-status {
    max-height: max(64px,calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom) - var(--order-height,0px) - 325px));
    overflow: auto;
    pointer-events: auto;
  }
}
@media (max-height: 420px) and (any-pointer: coarse) {
  .ride-meter canvas { width: 55px; }
  #game[data-ride][data-order-visible] .menu-toggle { top: max(12px,env(safe-area-inset-top)); }
  #game[data-ride] .order-strip { max-width: calc(100% - 124px); }
  #game[data-ride] .ride-status { top: calc(env(safe-area-inset-top) + max(71px, var(--order-height,0px) + 17px)); }
  .ride-actions {
    bottom: calc(env(safe-area-inset-bottom) + 14px);
    left: calc(env(safe-area-inset-left) + 130px);
    right: calc(env(safe-area-inset-right) + 218px);
    width: auto;
    max-width: none;
    transform: none;
  }
}
@media (max-width: 600px) and (max-height: 420px) and (any-pointer: coarse) {
  .ride-actions { bottom: calc(env(safe-area-inset-bottom) + 126px); left: 12px; right: 12px; }
}

#ride-traffic { color:#ffd7d0; font-weight:800; white-space:normal; }
#ride-traffic[data-signal="yellow"] { color:#ffe3a0; }
/* Shared Hamadan world links and the Arta storefront hotspot. */
.arta-portal, .game-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 44px;
  padding: .26rem .65rem;
  border: 1px solid #f1c78891;
  border-radius: .64rem;
  color: #fff0d3;
  background: #2c221ef0;
  font-size: .83rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}
.arta-portal {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  transform: translate3d(clamp(3.4rem,var(--x),calc(100vw - 3.4rem)),var(--y),0) translate(-50%,-50%);
  white-space: nowrap;
}
.arta-portal:hover, .game-link:hover { background: #55352a; }
.arta-access p { margin-block: .8rem; }
[data-brand="arta"] .fallback { background-image: url('/assets/arta/facade.webp'); }
[data-brand="arta"] #game[data-fallback] .arta-portal { top: 69%; left: 64%; transform: translate(-50%,-50%); }
[data-brand="arta"] .ride-picker { gap: .35rem; }

.city-live-toggle {
  position: absolute;
  z-index: 5;
  top: max(.75rem,env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .34rem;
  min-height: 44px;
  padding: .28rem .58rem;
  border: 1px solid #bfe2d487;
  border-radius: 11px;
  background: #142b32ef;
  color: #ebfff3;
  box-shadow: 0 4px 15px #151a2473;
  font-size: .79rem;
  font-weight: 820;
  line-height: 1.2;
  white-space: nowrap;
}
.city-live-toggle:hover { background: #264653; }
.city-live-dot { width:.43rem; height:.43rem; border-radius:50%; background:#b1bab8; }
.city-live-toggle[data-online] .city-live-dot { background:#91f3ba; box-shadow:0 0 9px #8ef4baa0; }
#city-online-count { min-width: 1.15em; text-align:center; color:#b0f5d1; font-variant-numeric: tabular-nums; }
.city-dialog { width:min(33rem,calc(100vw - 22px)); }
.city-dialog p { margin-block:.7rem; color:#f1e9dd; }
.city-counters { display:grid; gap:.4rem; margin:0; }
.city-counters div {
  display:grid;
  grid-template-columns:minmax(7rem,1fr) repeat(3,minmax(2.2rem, .55fr));
  align-items:center;
  column-gap:.35rem;
  padding:.47rem .6rem;
  border:1px solid #c2d8c837;
  border-radius:.58rem;
  background:#182830;
}
.city-counters div[data-city-branch="ruen"] { background:#232942; }
.city-counters dt { color:#fff1c3; font-weight:850; }
.city-counters dd { display:grid; margin:0; line-height:1.4; font-size:.72rem; text-align:center; }
.city-counters small { display:block; color:#d1dce3; font-size:.69rem; font-weight:550; }
.city-counters strong { color:#c6f1db; font-size:1rem; font-variant-numeric:tabular-nums; }
.city-alias-input { display:flex; flex-wrap:wrap; gap:.38rem; margin-block:.25rem .5rem; }
.city-alias-input input {
  flex: 1 1 9rem; min-width:0; min-height:44px; padding:.25rem .5rem; color:#fff;
  background:#171d28; border:1px solid #8daeaa; border-radius:.55rem;
}
.city-nameplates { position:absolute; z-index:2; inset:0; pointer-events:none; }
.city-nameplate {
  position:absolute; top:0; left:0; transform:translate3d(var(--px),var(--py),0) translate(-50%,-100%);
  background:#15262cf0; color:#e9fff1; border:1px solid #84ba9b;
  border-radius:20px; padding:.04rem .33rem; max-width:8.7rem; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; font-size:.72rem; font-weight:800;
}
.city-nameplate[data-branch="ruen"] { background:#242e48ed; border-color:#9caedf; color:#f0f4ff; }
#city-rank-rule { color:#f2cfaa; }
#menu-submit-error:empty { display:none; }
@media (max-width:340px) {
  .city-live-toggle { gap:.23rem; padding-inline:.35rem; min-width:44px; }
  .city-counters div { grid-template-columns:minmax(5.3rem,1fr) repeat(3,minmax(2rem,.55fr)); column-gap:.21rem; }
}
@media (max-height:450px) {
  .city-dialog { max-height:calc(100dvh - 1rem); }
}

.city-curtain {
  position:absolute;
  z-index:7;
  display:grid;
  place-items:end center;
  inset:0;
  padding:0 1rem max(10vh,calc(env(safe-area-inset-bottom) + 1rem));
  background:linear-gradient(180deg,#191b2840 35%,#111722d9),#232232 url('/assets/ruen-facade.webp') 50% 62% / cover;
}
[data-brand="arta"] .city-curtain { background-image:linear-gradient(180deg,#1a16142b 35%,#181415e6),url('/assets/arta/facade.webp'); }
.city-curtain span {
  display:flex;
  align-items:center;
  gap:.55rem;
  padding:.46rem .78rem;
  border:1px solid #efd4af73;
  border-radius:.65rem;
  background:#1c1d2ad9;
  color:#ffe8c9;
}
.city-curtain i { width:.56rem; height:.56rem; border-radius:50%; background:#edbb7c; box-shadow:0 0 14px #ffad65; }
#game:is([data-ready],[data-fallback]) .city-curtain { display:none; }
#city-live-people h3 { margin:.45rem 0 .26rem; font-size:.78rem; color:#e3dbd3; }
#city-online-list { display:flex; flex-wrap:wrap; gap:.26rem; list-style:none; margin:0; padding:0; }
#city-online-list li { padding:.06rem .45rem; border:1px solid #6f9b89; border-radius:20px; font-size:.74rem; }
#city-online-list li[data-branch="ruen"] { border-color:#899bc7; }
.ruen-portal { color:#f0f3ff; border-color:#a2b5ff9e; background:#202647f0; }
.ruen-portal:hover { background:#343c68; }
.ride-caption {
  position:absolute; inset-inline:0; top:47%; margin:0 auto; width:fit-content;
  max-width:calc(100% - 2rem); padding:.35rem .8rem; border-radius:.55rem;
  color:#fff4e1; background:#201c29ef; border:1px solid #f3c48580;
  text-align:center; font-size:.9rem; line-height:1.55; pointer-events:none;
}
.ride-caption:empty { display:none; }
#ride-sound svg { width:1.1rem; height:1.1rem; }
@media (max-width:460px) {
  .city-live-toggle { left:calc(50% + .875rem); }
  .heritage-toggle { padding-inline:.42rem; font-size:.76rem; }
}

#passport-receipt { align-self: center; color: #285745; font-weight: 700; }

.team-map-link,.team-actions button,#team-person { min-height:44px; border-radius:.55rem; padding:.35rem .72rem; font:inherit; }
.team-map-link { margin-bottom:.55rem; }
#team-map { position:relative; overflow:hidden; border-radius:.7rem; background:#dce4d5; }
#team-map canvas { display:block; width:100%; height:clamp(170px,33vh,270px); }
#team-pins span { position:absolute; transform:translate(-50%,-50%); width:.75rem; height:.75rem; border-radius:50%; border:2px solid white; background:#144f5b; box-shadow:0 0 0 1px #213b38; }
#team-pins [data-marker=peer] { background:#983c63; }
#team-pins [data-marker=goal] { background:#a95507; border-radius:2px; }
#team-distance { font-size:.82rem; }
#team-person { max-width:100%; background:#152936; color:white; border:1px solid #8bafa4; }
.team-actions { display:flex; gap:.4rem; flex-wrap:wrap; margin:.4rem 0; }
.team-actions button { background:#26463e; border:1px solid #77988d; color:#f8f3df; }
.team-actions button:disabled { opacity:.65; }
.team-card { border-top:1px solid #688279; padding-top:.7rem; margin-top:.7rem; }
.team-card h3,.team-card p { margin:.35rem 0; }
#team-error:empty { display:none; }

#city-almanac { position:absolute; z-index:4; inset-inline-start:max(.7rem,env(safe-area-inset-right)); top:22%; max-width:min(15rem,58vw); display:grid; justify-items:start; gap:.15rem; pointer-events:none; }
#city-weather,#nearby-heritage { border-radius:.48rem; background:#162b2be8; color:#fff1d4; padding:.21rem .48rem; font-size:.74rem; }
#nearby-heritage { pointer-events:auto; min-height:44px; text-align:start; border:1px solid #c5b487; }
#nearby-heritage small { display:block; color:#d0dbc8; }
#city-weather:empty,#game[data-fallback] #city-almanac {display:none}
@media(max-height:470px){#city-almanac {top:35%;}}
#team-pins [data-marker=peer] {width:1.12rem;height:1.12rem;}
#team-pins [data-marker=goal] {width:1.45rem;height:1.45rem;}
