div#coeval-chat { display: none !important; }
  /* Paste the COEVAL @font-face block here if you want Neue Haas on the screens. */
  :root {
    --ui-font: "coevalhaasmed", "Neue Haas Grotesk Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --ui-bg: rgba(20, 20, 22, 0.38);
    --ui-border: rgba(255, 255, 255, 0.32);
    --ui-text: #f2f2f2;
  }
  html.cm-play, html.cm-play body { overscroll-behavior: none; }
  html, body { margin: 0; padding: 0; background: #0d0d0d; font-family: var(--ui-font); color: var(--ui-text); }
  html:not(.cw-editing):not(.sqs-is-page-editing), html:not(.cw-editing):not(.sqs-is-page-editing) body { width: 100%; height: 100%; height: 100dvh; overflow: hidden; }
  #coeval-chat { display: none !important; }
  canvas#scene { display: block; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh; touch-action: none; z-index: 1; }
  /* Keeps the page's own layout honest: the game is pinned to the top of the viewport, this placeholder holds its height in the flow so the footer stays below */
  #scene-space { width: 100%; height: 100vh; height: 100dvh; }
  /* The page around the game: the site footer would otherwise show over the scene on phones, and in landscape the header eats the little height there is */
  @media (max-width: 900px) {
    html:not(.cw-editing):not(.sqs-is-page-editing) :is(footer, #footer-sections, .footer-sections, footer.sections) { display: none !important; }
  }
  @media (orientation: landscape) and (max-height: 500px) {
    html:not(.cw-editing):not(.sqs-is-page-editing) :is(header, #header, .header) { display: none !important; }
  }
  /* The site header and its logo stay above every game screen, in white */
  html:not(.cw-editing):not(.sqs-is-page-editing) :is(header#header, .site-header) { z-index: 40 !important; }
  html:not(.cw-editing):not(.sqs-is-page-editing) * { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
  /* Squarespace editor: the game steps back to a small dark band, so the editor bar with Save and every block stay reachable */
  html.cw-editing :is(canvas#scene, #grade, #grain, #title, #hud, #menu, #bigmap, #fade, #perf), html.sqs-is-page-editing :is(canvas#scene, #grade, #grain, #title, #hud, #menu, #bigmap, #fade, #perf), body.sqs-edit-mode-active :is(canvas#scene, #grade, #grain, #title, #hud, #menu, #bigmap, #fade, #perf) { display: none !important; }
  html.cw-editing #scene-space, html.sqs-is-page-editing #scene-space, body.sqs-edit-mode-active #scene-space { height: 220px !important; background: #111111; display: flex; align-items: center; justify-content: center; }
  html.cw-editing #scene-space::before, html.sqs-is-page-editing #scene-space::before, body.sqs-edit-mode-active #scene-space::before { content: 'COEVAL World · paused while you edit the page'; color: #ffffff; font: 600 11px/1.4 Helvetica, Arial, sans-serif; letter-spacing: 0.2em; text-transform: uppercase; }

  /* Post look: vignette and grain, cheap and always on */
  #grade { position: fixed; inset: 0; pointer-events: none; z-index: 5;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%); }
  /* The site's two menus (top header and bottom bar) step aside while COEVAL World is being played */
  /* The site header with the COEVAL logo stays on top; only the mobile bottom bar steps aside for the game's controls */
  html:not(.cw-editing):not(.sqs-is-page-editing) :is(nav.mobile-nav, .mobile-nav) { display: none !important; }
  /* On phones the cookie banner also steps aside while playing */
  html.cm-game:not(.cw-editing):not(.sqs-is-page-editing) body.touch :is(.cookie-banner-mount-point, .gdpr-cookie-banner) { display: none !important; }
  body.touch #grain { display: none !important; }
  #hud, #hud *, #scene, #bigmap, #bigmap *, #menu, #menu * { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
  body.touch #joy, body.touch #actions, body.touch #look, body.touch #throttle { touch-action: none; }
  #grain { position: fixed; inset: -50%; width: 200%; height: 200%; pointer-events: none; z-index: 6; opacity: 0.075;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
    animation: grain 0.5s steps(4) infinite; }
  @keyframes grain { 0% { transform: translate(0,0);} 25% { transform: translate(-3%,2%);} 50% { transform: translate(2%,-3%);} 75% { transform: translate(-1%,-1%);} 100% { transform: translate(3%,1%);} }

  /* Shared button style */
  .btn { touch-action: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ui-border); border-radius: 999px; background: var(--ui-bg); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 14px rgba(0,0,0,0.2); color: var(--ui-text); font-family: var(--ui-font); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
  .btn.active { background: rgba(255,255,255,0.85); color: #111; }

  /* Glass: smoked liquid glass, shared by the title screen and the pause menu */
  :root { --gl-r: 32px; --gl-r2: 20px; --gl-fill: rgba(18,18,20,0.38); --gl-line: rgba(255,255,255,0.18); --gl-blur: 34px; --gl-shadow: 0 30px 80px rgba(0,0,0,0.5); --gl-top: calc(100px + env(safe-area-inset-top)); --gl-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .glass { position: relative; background: var(--gl-fill); border: 1px solid var(--gl-line); border-radius: var(--gl-r); backdrop-filter: blur(var(--gl-blur)) saturate(1.6); -webkit-backdrop-filter: blur(var(--gl-blur)) saturate(1.6); box-shadow: var(--gl-shadow), inset 0 1px 0 rgba(255,255,255,0.35); box-sizing: border-box; }
  .glass:before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(160deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 38%); pointer-events: none; }
  .glass2 { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.2); border-radius: var(--gl-r2); }
  .cap { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; }
  .capsule { display: flex; align-items: center; justify-content: center; width: 100%; border: 0; border-radius: 999px; background: #ffffff; color: #111111; font: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; padding: 16px 0; box-shadow: 0 8px 24px rgba(0,0,0,0.25); cursor: pointer; font-variant-numeric: tabular-nums; }

  /* Loading and title screen: a glass panel over the city, kept clear of the site header above and the cookie banner below */
  #title { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; overflow-y: auto; box-sizing: border-box; padding: var(--gl-top) 20px var(--gl-bottom); transition: opacity 0.9s ease;
    background-color: #0d0d0d;
    background-image: none;
    background-size: cover; background-position: center; }
  #title.hidden { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.9s ease, visibility 0s linear 0.9s; }
  #title button, #title a { all: unset; box-sizing: border-box; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  #title .foot a { border-bottom: 1px solid rgba(255,255,255,0.35); }
  #title .panel { width: 740px; max-width: 100%; margin: auto; padding: 34px; display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: center; }
  #title .tt { margin: 0 0 14px; font-size: 38px; font-weight: 700; letter-spacing: 0.12em; line-height: 1.05; text-transform: uppercase; }
  #title .tp { margin: 0; font-size: 13px; line-height: 1.7; opacity: 0.85; max-width: 340px; }
  #title .ld { margin-top: 26px; }
  #title .ld .row { display: flex; justify-content: space-between; margin-bottom: 9px; }
  #stage { opacity: 0.85; min-height: 1.3em; }
  #pct { font-variant-numeric: tabular-nums; }
  #progress { height: 3px; border-radius: 3px; background: rgba(255,255,255,0.22); position: relative; overflow: hidden; }
  #progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 3px; background: #ffffff; transition: width 0.25s ease; }
  #choose { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  #choose .card { overflow: hidden; cursor: pointer; opacity: 0.55; pointer-events: none; transition: opacity 0.5s ease, background 0.2s ease, color 0.2s ease; }
  #choose.ready .card { opacity: 1; pointer-events: auto; }
  #choose .card img { display: block; width: 100%; height: 170px; object-fit: cover; object-position: top; background: rgba(255,255,255,0.08); }
  #choose .card img:not([src]) { visibility: hidden; }
  #choose .card span { display: block; padding: 11px 12px; font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
  #choose .card.selected { background: rgba(255,255,255,0.92); color: #111111; border-color: #ffffff; }
  #title #enter { display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; padding: 0; border-radius: 999px; background: #ffffff; color: #111111; font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; box-shadow: 0 8px 24px rgba(0,0,0,0.25); font-variant-numeric: tabular-nums; }
  #title #enter { grid-column: span 2; margin-top: 4px; opacity: 0.55; pointer-events: none; transition: opacity 0.5s ease; }
  #title #enter.ready { opacity: 1; pointer-events: auto; }
  #title .foot { margin-top: 18px; opacity: 0.7; }
  #title .foot a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.35); }
  /* City choice: one picture per city, used for the card and for the backdrop */
  :root { --city-tokyo: url("https://coeval-world.pages.dev/img/style-1.jpg"); --city-nyc: url("https://coeval-world.pages.dev/img/style-2.jpg"); }
  #title.city-tokyo { background-image: linear-gradient(rgba(0,0,0,0.12), rgba(0,0,0,0.12)), var(--city-tokyo); }
  #title.city-nyc { background-image: linear-gradient(rgba(0,0,0,0.12), rgba(0,0,0,0.12)), var(--city-nyc); background-position: 72% center; }
  #choose .lab { grid-column: span 2; opacity: 0.65; margin-bottom: -2px; }
  #choose .lab.second { margin-top: 6px; }
  #choose .city { overflow: hidden; cursor: pointer; transition: background 0.2s ease, color 0.2s ease; }
  #choose .city .ph { height: 92px; background-size: cover; background-position: center; }
  #choose .city .ph-tokyo { background-image: var(--city-tokyo); }
  #choose .city .ph-nyc { background-image: var(--city-nyc); background-position: 74% 38%; }
  #choose .city span { display: block; padding: 11px 12px; font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
  #choose .city.selected { background: rgba(255,255,255,0.92); color: #111111; border-color: #ffffff; }
  @media (min-width: 761px) and (max-height: 800px) { #choose .city .ph { height: 64px; } #choose .card img { height: 124px; } }
  /* Phones and narrow windows: the panel rests low, above the cookie banner */
  /* Phones and narrow windows: a compact panel, high on the screen, that stays clear of the browser's own bars */
  @media (max-width: 760px) {
    #title { align-items: flex-start; padding: calc(78px + env(safe-area-inset-top)) 12px calc(24px + env(safe-area-inset-bottom)); background-position: 45% center; }
    #title .panel { display: block; margin: 0; padding: 18px 18px 14px; width: 100%; }
    #title .tt { font-size: 22px; margin: 0 0 6px; }
    #title .tp { font-size: 11px; line-height: 1.5; }
    #title .tp .more { display: none; }
    #title .ld { margin-top: 12px; }
    #title .ld .row { margin-bottom: 7px; }
    #choose { margin-top: 12px; gap: 7px; }
    #choose .lab.second { margin-top: 2px; }
    #choose .card img { height: 96px; } #choose .city .ph { height: 46px; } #choose .city span { padding: 8px 10px; font-size: 9.5px; }
    #choose .card span { padding: 8px 10px; font-size: 9.5px; }
    #title #enter { height: 44px; margin-top: 2px; }
    #title .foot { margin-top: 10px; text-align: center; }
  }
  @media (max-width: 760px) and (max-height: 700px) {
    #title { padding-top: calc(64px + env(safe-area-inset-top)); }
    #choose .card img { height: 76px; } #choose .city .ph { height: 34px; }
  }
  @media (orientation: landscape) and (max-height: 500px) {
    #title { padding: 14px 16px; align-items: center; }
    #title .panel { display: grid; grid-template-columns: 1fr 280px; gap: 20px; padding: 18px; }
    #choose .card img { height: 90px; } #choose .city .ph { height: 40px; }
  }
  /* Title, four cards in a row: the COEVAL WORLD lockup, one line of text, the two cities and the two characters at full size */
  #title { padding: calc(80px + env(safe-area-inset-top)) 20px calc(74px + env(safe-area-inset-bottom)); }
  #title .panel { display: block; width: 1000px; max-width: 100%; padding: 24px 26px 16px; }
  #title .top { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 16px; }
  #title .lockup { display: inline-flex; flex-direction: column; }
  #title .lockup .logo { display: block; height: 34px; width: auto; }
  #title .lockup .w { display: flex; justify-content: center; gap: 0.5em; margin-top: 7px; font-size: 17px; font-weight: 800; line-height: 1; }
  #title .lockup .w i { font-style: normal; }
  #title .tp { margin: 10px 0 0; font-size: 12px; line-height: 1.4; max-width: none; }
  #title .ld { margin: 0; width: 300px; flex: none; }
  #title .ld .row { margin-bottom: 7px; }
  #choose { grid-template-columns: repeat(4, 1fr); gap: 10px; row-gap: 7px; margin: 0; }
  #choose .lab { grid-column: span 2; margin: 0; }
  #choose .lab.second { margin: 0; }
  #choose .city .ph, #choose .card img { height: 196px; }
  #choose .ph-nyc { background-position: 72% 40%; }
  #title #enter { grid-column: span 4; height: 46px; margin-top: 5px; }
  #title .foot { margin-top: 10px; text-align: center; }
  @media (min-width: 761px) and (max-height: 620px) { #choose .city .ph, #choose .card img { height: 150px; } }
  @media (max-width: 760px) {
    #title { align-items: flex-start; padding: calc(78px + env(safe-area-inset-top)) 12px calc(24px + env(safe-area-inset-bottom)); }
    #title .panel { padding: 18px 16px 14px; width: 100%; margin: 0; }
    #title .top { display: block; margin-bottom: 12px; }
    #title .lockup .logo { height: 30px; }
    #title .lockup .w { font-size: 15px; margin-top: 6px; }
    #title .tp { font-size: 11px; margin-top: 8px; }
    #title .ld { width: auto; margin-top: 12px; }
    #choose { grid-template-columns: 1fr 1fr; gap: 8px; row-gap: 7px; }
    #choose .lab { order: 1; } #choose .city { order: 2; } #choose .lab-char { order: 3; margin-top: 4px; } #choose .card { order: 4; } #title #enter { order: 5; grid-column: span 2; }
    #choose .city .ph { height: 82px; } #choose .card img { height: 146px; }
    #choose .city span, #choose .card span { padding: 9px 10px; font-size: 9.5px; }
  }
  @media (max-width: 760px) and (max-height: 700px) {
    #title { padding-top: calc(64px + env(safe-area-inset-top)); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
    #title .tp { display: none; }
    #choose .city .ph { height: 62px; } #choose .card img { height: 112px; }
  }
  @media (orientation: landscape) and (max-height: 500px) {
    #title { padding: 12px 16px; align-items: center; }
    #title .panel { padding: 14px 16px 10px; }
    #title .top { display: flex; margin-bottom: 8px; }
    #title .tp { display: none; }
    #choose { grid-template-columns: repeat(4, 1fr); }
    #choose .lab, #choose .lab-char { order: 0; grid-column: span 2; margin: 0; } #choose .city, #choose .card { order: 0; } #title #enter { grid-column: span 4; order: 0; }
    #choose .city .ph, #choose .card img { height: 104px; }
  }

  /* HUD */
  #hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; opacity: 0; transition: opacity 0.6s ease; }
  #hud.on { opacity: 1; }
  #hud > * { pointer-events: auto; }
  #close { position: absolute; top: calc(98px + env(safe-area-inset-top)); right: 18px; height: 38px; padding: 0 14px; gap: 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.2em; }
  #sound { position: absolute; top: calc(146px + env(safe-area-inset-top)); right: 18px; width: 40px; height: 40px; letter-spacing: 0; padding: 0; }
  #sound svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  #sound.muted .wave { display: none; }
  #look { position: absolute; right: 22px; top: calc(50% + 60px); transform: translateY(-50%); display: none; flex-direction: row; gap: 8px; z-index: 3; }
  body.touch #look { display: flex; }
  #look .btn { width: 40px; height: 40px; font-size: 20px; letter-spacing: 0; padding: 0 0 2px; line-height: 1; }
  #toast { position: absolute; left: 50%; top: calc(20px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 8; font-size: 9.5px; letter-spacing: 0.06em; line-height: 1.35; text-transform: uppercase; padding: 8px 13px; border-radius: 999px; background: rgba(0,0,0,0.6); border: 1px solid var(--ui-border); color: #fff; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
  #toast.on { opacity: 1; }
  #toast.center { top: 42%; font-size: 13px; letter-spacing: 0.22em; padding: 14px 22px; }
  body:not(.touch) #toast.center { top: calc(42% + 80px); }
  body:not(.touch) #radio { top: calc(274px + env(safe-area-inset-top)); }
  #radio { position: absolute; top: calc(194px + env(safe-area-inset-top)); right: 18px; display: none; flex-direction: column; align-items: flex-end; gap: 4px; z-index: 3; }
  #radio.on { display: flex; }
  /* Station and song, always on while the radio plays: small type scrolling inside a glass pill */
  #ticker { display: flex; align-items: center; gap: 7px; width: 132px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--ui-bg); border: 1px solid var(--ui-border); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-sizing: border-box; pointer-events: none; }
  #ticker .eq { display: flex; align-items: flex-end; gap: 2px; height: 9px; flex: none; }
  #ticker .eq b { width: 2px; height: 100%; background: #ff7a2c; transform-origin: bottom; animation: cw-eq 0.9s ease-in-out infinite; }
  #ticker .eq b:nth-child(2) { animation-delay: -0.3s; } #ticker .eq b:nth-child(3) { animation-delay: -0.6s; }
  #ticker .win { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
  #ticker .run { display: inline-flex; white-space: nowrap; animation: cw-run 11s linear infinite; }
  #ticker .run span { padding-right: 26px; font-size: 8px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; line-height: 22px; }
  @keyframes cw-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  @keyframes cw-eq { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
  #station { display: none; }
  #radio .row { display: flex; gap: 8px; margin-top: 10px; }
  #siren { display: none; margin-top: 8px; }
  body.police #siren { display: flex; align-items: center; justify-content: center; }
  #siren svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  #siren.on { background: #d8262c; border-color: #d8262c; color: #ffffff; animation: cw-siren 0.5s steps(2) infinite; }
  @keyframes cw-siren { 50% { background: #1f4fd8; border-color: #1f4fd8; } }
  body.touch.police #tracknav { right: 64px; }
  body:not(.touch) #tracknav { top: calc(312px + env(safe-area-inset-top)); right: 104px; }   /* beside the station arrows, clear of the ticker */
  #radio .btn { width: 34px; height: 34px; border-radius: 50%; font-size: 16px; letter-spacing: 0; padding: 0 0 2px; line-height: 1; }
  #station { position: absolute; top: calc(248px + env(safe-area-inset-top)); right: 18px; font-size: 8px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; white-space: nowrap; text-align: right; z-index: 3; }
  #station.on { opacity: 0.85; }
  #tracknav { position: absolute; top: calc(276px + env(safe-area-inset-top)); right: 18px; display: flex; flex-direction: column; align-items: center; gap: 3px; opacity: 0; transition: opacity 0.35s ease; pointer-events: none; z-index: 3; }
  #tracknav .row { display: flex; gap: 6px; }
  #tracknav.on { opacity: 1; pointer-events: auto; }
  #tracknav .btn { width: 30px; height: 22px; border-radius: 4px; background: rgba(20,20,20,0.35); border: 1px solid rgba(255,255,255,0.7); color: #fff; font-size: 14px; letter-spacing: 0; padding: 0 0 2px; line-height: 1; }
  #tracknav .label { font-size: 7px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.75; text-align: center; }
  body.touch #radio { top: calc(154px + env(safe-area-inset-top)); }
  body.touch #station { top: calc(208px + env(safe-area-inset-top)); }
  body.touch #tracknav { top: calc(246px + env(safe-area-inset-top)); }
  #minimap { position: absolute; top: calc(98px + env(safe-area-inset-top)); right: 108px; width: 100px; height: 100px; border-radius: 50%; border: 1px solid var(--ui-border); background: var(--ui-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); overflow: hidden; }
  #minimap canvas { width: 100%; height: 100%; display: block; }
  #minimap { background: #f4f3f0; }
  #dist { opacity: 1; font-weight: 600; }
  #dist span { display: inline-block; padding: 5px 9px; background: #111111; color: #ffffff; }
  /* Gallery door */
  /* Entry buttons (exhibition, club, cinema, taxi) and the seat and ride bars: glass pills, like the rest of the interface */
  #gallery-cta, #club-cta, #case-cta, #cinema-cta, #taxi-cta { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); z-index: 12; display: none; flex-direction: column; align-items: center; gap: 5px; padding: 12px 30px; border: 1px solid var(--ui-border); border-radius: 999px; background: var(--ui-bg); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 14px rgba(0,0,0,0.2); color: #ffffff; font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
  #gallery-cta.on, #club-cta.on, #case-cta.on, #cinema-cta.on, #taxi-cta.on { display: flex; }
  /* Cinema: the seat bar, and the film element, kept out of sight until it goes full screen. The taxi ride bar works the same way */
  #cine-bar, #taxi-bar { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 12; display: none; align-items: stretch; gap: 8px; }
  #cine-bar.on, #taxi-bar.on { display: flex; }
  #cine-up, #taxi-bar .btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 12px 26px; border: 1px solid var(--ui-border); border-radius: 999px; background: var(--ui-bg); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 14px rgba(0,0,0,0.2); color: #ffffff; font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
  #cine-up .t, #taxi-bar .t { display: none; } body.touch #cine-up .t, body.touch #taxi-bar .t { display: inline; } body.touch #cine-up .d, body.touch #taxi-bar .d { display: none; }
  #cine-fs { width: 54px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--ui-border); border-radius: 999px; background: var(--ui-bg); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 14px rgba(0,0,0,0.2); color: #ffffff; cursor: pointer; }
  #cine-fs svg { width: 20px; height: 20px; }
  #cine-fs { flex-direction: column; gap: 3px; } #cine-fs .d { font-size: 8px; font-weight: 600; letter-spacing: 0.2em; color: rgba(255,255,255,0.7); } body.touch #cine-fs .d { display: none; }
  body.touch #cine-bar, body.touch #taxi-bar { bottom: calc(118px + env(safe-area-inset-bottom)); }
  @media (orientation: landscape) and (max-height: 500px) { body.touch #cine-bar, body.touch #taxi-bar { bottom: calc(14px + env(safe-area-inset-bottom)); } }
  body.seated #joy, body.seated #joyhint, body.seated #actions, body.seated #prompt, body.seated #tphint, body.seated #hint, body.seated #buy, body.seated #look { display: none !important; }
  body.riding #joy, body.riding #joyhint, body.riding #actions, body.riding #prompt, body.riding #tphint, body.riding #hint, body.riding #buy, body.riding #look, body.riding #dist { display: none !important; }
  /* Taxi meter: a glass pill at the top centre while riding */
  #taxi-meter { position: absolute; left: 50%; top: calc(62px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 6; display: none; align-items: center; height: 28px; padding: 0 12px; box-sizing: border-box; border: 1px solid var(--ui-border); border-radius: 999px; background: var(--ui-bg); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 14px rgba(0,0,0,0.2); color: #ffffff; font-size: 9px; font-weight: 600; letter-spacing: 0.14em; white-space: pre; font-variant-numeric: tabular-nums; pointer-events: none; }
  #taxi-meter.on { display: flex; }
  #bigmap .taxi-cap { display: none; }
  #bigmap.taxi .taxi-cap { display: block; position: absolute; top: calc(14px + env(safe-area-inset-top)); left: calc(40px + env(safe-area-inset-left)); z-index: 2; font-size: 11px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; line-height: 1.9; white-space: nowrap; background: rgba(255,255,255,0.86); color: #111111; border-radius: 999px; padding: 10px 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  #bigmap.taxi .taxi-cap span { display: block; font-weight: 500; color: #6b6862; }
  #bigmap.taxi .cap, #bigmap.taxi .maphint { display: none !important; }
  #cine-video { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; z-index: -1; background: #000000; }
  #cine-video:fullscreen { width: 100%; height: 100%; opacity: 1; pointer-events: auto; object-fit: contain; }
  #cine-video:-webkit-full-screen { width: 100%; height: 100%; opacity: 1; pointer-events: auto; object-fit: contain; }
  #shop-out { position: absolute; right: 18px; bottom: 14px; z-index: 12; display: none; height: 22px; padding: 0 10px; font-size: 7px; font-weight: 700; letter-spacing: 0.18em; white-space: nowrap; pointer-events: auto; }
  #shop-out.on { display: flex; }
  body.touch #shop-out { right: auto; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); }
  body.in-shop #buy { bottom: 44px; }
  body.touch.in-shop #buy { bottom: calc(40px + env(safe-area-inset-bottom)); }
  #flighthud { position: absolute; left: 50%; bottom: calc(62px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 6; display: none; padding: 8px 14px; background: #111111; color: #ffffff; font-size: 10px; font-weight: 600; letter-spacing: 0.2em; white-space: pre; font-variant-numeric: tabular-nums; pointer-events: none; }
  #flighthud.on { display: block; }
  /* Throttle lever, shown while flying: drag the knob up for power */
  #throttle { position: absolute; right: calc(34px + env(safe-area-inset-right)); bottom: calc(120px + env(safe-area-inset-bottom)); width: 64px; display: none; flex-direction: column; align-items: center; gap: 8px; z-index: 7; touch-action: none; user-select: none; -webkit-user-select: none; }
  #throttle.on { display: flex; }
  #throttle span, #throttle em { font-style: normal; font-size: 9px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #ffffff; text-shadow: 0 1px 6px rgba(0,0,0,0.5); font-variant-numeric: tabular-nums; }
  #throttle .track { position: relative; width: 46px; height: 200px; border-radius: 23px; background: rgba(20,20,20,0.45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden; cursor: ns-resize; touch-action: none; }
  #throttle .track i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(255,255,255,0.22); }
  #throttle .track b { position: absolute; left: 5px; right: 5px; bottom: 5px; height: 30px; border-radius: 15px; background: #ffffff; box-shadow: 0 3px 10px rgba(0,0,0,0.3); }
  body.touch #throttle { right: calc(18px + env(safe-area-inset-right)); bottom: calc(80px + env(safe-area-inset-bottom)); }
  body.touch #throttle .track { height: 180px; }
  body.flying #look { display: none; }
  /* Flight readout (altitude, speed, throttle): a glass pill at the very bottom on phones, clear of the site header */
  #flighthud { background: rgba(20,20,22,0.5); border: 1px solid rgba(255,255,255,0.28); border-radius: 999px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  body.touch #flighthud { top: auto; bottom: calc(6px + env(safe-area-inset-bottom)); font-size: 9px; padding: 6px 12px; }
  body.touch #gallery-cta, body.touch #club-cta, body.touch #case-cta, body.touch #cinema-cta, body.touch #taxi-cta { bottom: 47%; }   /* clear of the look arrows */
  #gallery-cta span, #club-cta span, #case-cta span, #cinema-cta span, #taxi-cta span, #cine-up span, #taxi-bar span { font-size: 9.5px; font-weight: 500; letter-spacing: 0.24em; color: rgba(255,255,255,0.7); }
  #dist { position: absolute; top: calc(206px + env(safe-area-inset-top)); right: 108px; width: 100px; display: flex; justify-content: center; text-align: center; font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75; font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; z-index: 3; }
  body.touch #dist { left: 18px; right: auto; top: calc(174px + env(safe-area-inset-top)); width: 110px; }
  body.touch #toast { top: calc(56px + env(safe-area-inset-top)); left: 50%; }
  #prompt { position: absolute; left: 50%; bottom: 34%; transform: translateX(-50%); padding: 10px 18px; opacity: 0; transition: opacity 0.25s ease; pointer-events: none; z-index: 12; white-space: nowrap; }
  #prompt.on { opacity: 1; }
  #hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.55; white-space: nowrap; }
  #hint b { font-weight: 500; opacity: 1; }
  #capture { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); padding: 12px 22px; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
  #capture.on { opacity: 1; pointer-events: auto; }

  /* Mobile controls */
  #mobile { display: none; }
  #joy { position: absolute; left: 26px; bottom: calc(36px + env(safe-area-inset-bottom)); width: 130px; height: 130px; box-sizing: border-box; border-radius: 50%; border: 1px solid rgba(255,255,255,0.22); background: rgba(40,40,40,0.18); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  #joy i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(255,255,255,0.85); }
  /* First seconds in the city: a small note above the joystick, and the knob shows the gesture once */
  #joyhint { display: none; position: absolute; left: 91px; bottom: calc(171px + env(safe-area-inset-bottom)); transform: translateX(-50%); height: 24px; box-sizing: border-box; align-items: center; padding: 0 10px; border-radius: 999px; background: rgba(18,18,20,0.8); border: 1px solid rgba(255,255,255,0.22); color: #ffffff; font-size: 7px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; opacity: 0.85; pointer-events: none; z-index: 3; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  body.touch #joyhint.on { display: flex; }
  /* A few seconds into the game: a short note beside the minimap */
  #tphint { display: none; position: absolute; right: 220px; top: calc(136px + env(safe-area-inset-top)); height: 24px; box-sizing: border-box; align-items: center; padding: 0 10px; border-radius: 999px; background: rgba(18,18,20,0.8); border: 1px solid rgba(255,255,255,0.22); color: #ffffff; font-size: 7px; font-weight: 600; letter-spacing: 0.16em; line-height: 1.5; text-transform: uppercase; white-space: nowrap; opacity: 0.85; pointer-events: none; z-index: 3; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  #tphint.on { display: flex; }
  #tphint .t { display: none; } body.touch #tphint .t { display: inline; } body.touch #tphint .d { display: none; }
  body.touch #tphint { right: auto; left: 120px; top: calc(84px + env(safe-area-inset-top)); width: 150px; height: 34px; white-space: normal; border-radius: 14px; }
  body.driving-hud #tphint, body.flying #tphint, body.cw-menu-open #tphint { display: none; }
  #actions { position: absolute; right: 22px; bottom: calc(36px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
  #actions .btn { min-width: 76px; height: 54px; padding: 0 18px; font-size: 9px; letter-spacing: 0.18em; }
  #buy { position: absolute; right: 18px; bottom: 14px; padding: 14px 26px; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 4; text-decoration: none; }
  #buy.on { opacity: 1; pointer-events: auto; }
  body.touch #buy { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(36px + env(safe-area-inset-bottom)); }
  #pedals { order: 5; display: none; gap: 10px; align-items: flex-end; }
  body.touch.driving-hud #pedals { display: flex; }
  #pedals .pedal { width: 58px; height: 72px; border-radius: 20px; flex-direction: column; gap: 6px; font-size: 9px; font-weight: 700; letter-spacing: 0.16em; padding: 0; }
  #pedals .pedal.go { height: 112px; }
  #pedals .pedal i { display: block; width: 26px; height: 4px; border-radius: 2px; background: currentColor; opacity: 0.5; }
  #pedals .pedal.active { background: rgba(255,255,255,0.88); color: #111111; }
  #actions #btn-run { order: 1; } #actions #btn-gas { order: 2; } #actions #btn-jump { order: 3; } #actions #btn-drive { order: 4; white-space: nowrap; }
  #mobile, #mobile * { touch-action: none; }
  #camzone { position: absolute; right: 0; top: 0; width: 55%; height: 100%; z-index: 1; touch-action: none; }
  #close, #sound, #minimap, #joy, #actions { z-index: 3; }
  body.touch #mobile { display: block; }
  body.touch #close { right: 18px; top: calc(58px + env(safe-area-inset-top)); }
  body.touch #sound { right: 18px; top: calc(106px + env(safe-area-inset-top)); }
  body.touch #minimap { left: 18px; right: auto; top: calc(58px + env(safe-area-inset-top)); width: 110px; height: 110px; }
  body.touch #prompt { display: none; }
  body.touch #hint { display: none; }
  body.touch #capture { display: none; }

  /* Pause menu: glass tiles over the paused city. The panel stays between the site header and the cookie banner.
     Buttons and headings are reset first, so the site theme cannot resize them */
  #menu { position: fixed; inset: 0; z-index: 25; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: var(--gl-top) 20px var(--gl-bottom); background: rgba(0,0,0,0.12); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.35s ease, visibility 0s linear 0.35s; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  #menu.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.35s ease, visibility 0s; }
  body.cw-menu-open #hud { opacity: 0; visibility: hidden; }
  #menu button, #menu a { all: unset; box-sizing: border-box; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  #menu .glass2 { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.2); border-radius: var(--gl-r2); }
  #menu .panel { width: 720px; max-width: 100%; max-height: 100%; overflow-y: auto; padding: 26px; font-size: 12px; line-height: 1.3; }
  #menu .head { display: flex; align-items: center; height: 52px; margin: -4px 0 14px; padding-right: 64px; }
  #menu .mt { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.3em; line-height: 1; text-transform: uppercase; }
  #menu #menu-x { position: absolute; right: 18px; top: 18px; z-index: 2; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.28); color: #ffffff; font-size: 30px; font-weight: 300; line-height: 1; box-shadow: inset 0 1px 0 rgba(255,255,255,0.35); }
  #menu #menu-x:hover { background: rgba(255,255,255,0.2); }
  /* One grid for tiles and switches: 12 columns on desktop, 2 on phones */
  #menu .grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 9px; }
  #menu .tile { grid-column: span 3; height: 104px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left; color: #ffffff; text-decoration: none; transition: background 0.2s ease; }
  #menu .tile:hover { background: rgba(255,255,255,0.14); }
  #menu .tile .ic { font-size: 18px; line-height: 1; font-family: inherit; }
  #menu .tile b { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; line-height: 1.2; text-transform: uppercase; }
  #menu .tile small { display: block; margin-top: 4px; font-size: 9px; letter-spacing: 0.12em; line-height: 1.2; text-transform: uppercase; opacity: 0.65; }
  #menu .tile.big { grid-column: span 6; background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.4); }
  #menu .tile.big .ic { width: 34px; height: 34px; border-radius: 50%; background: #ffffff; color: #111111; display: flex; align-items: center; justify-content: center; font-size: 13px; padding-left: 2px; box-sizing: border-box; }
  #menu .tile.big b { font-size: 17px; }
  #menu .tile.cov { grid-column: span 6; flex-direction: row; justify-content: flex-start; align-items: center; gap: 12px; }
  #menu .tile.cov img { height: 74px; width: 54px; object-fit: cover; border-radius: 8px; background: rgba(255,255,255,0.1); flex: none; }
  #menu .tile.off { opacity: 0.4; pointer-events: none; }
  #menu .tg { grid-column: span 4; display: flex; justify-content: space-between; gap: 10px; align-items: center; height: 46px; padding: 0 12px 0 14px; color: #ffffff; font-size: 9.5px; font-weight: 600; letter-spacing: 0.18em; line-height: 1; text-transform: uppercase; }
  #menu #m-sound { grid-column: 1 / span 4; }
  #menu .sw { width: 32px; height: 19px; border-radius: 10px; background: rgba(255,255,255,0.25); position: relative; transition: background 0.2s ease; flex: none; }
  #menu .sw:after { content: ''; position: absolute; left: 3px; top: 3px; width: 13px; height: 13px; border-radius: 50%; background: #ffffff; transition: left 0.2s ease, background 0.2s ease; }
  #menu .on .sw { background: #ffffff; }
  #menu .on .sw:after { left: 16px; background: #111111; }
  #menu .seg { display: flex; gap: 3px; flex: none; }
  #menu .seg button { height: 22px; padding: 0 6px; display: flex; align-items: center; border-radius: 999px; border: 1px solid rgba(255,255,255,0.35); color: #ffffff; font-size: 8.5px; font-weight: 600; letter-spacing: 0.14em; line-height: 1; text-transform: uppercase; }
  #menu .seg button.on { background: #ffffff; color: #111111; border-color: #ffffff; }
  #menu .foot { margin-top: 16px; display: flex; justify-content: space-between; gap: 12px; opacity: 0.7; }
  #menu .foot a { color: inherit; text-decoration: none; }
  /* Controls: a list that takes the place of the tiles */
  #menu .keys { display: none; }
  #menu .panel.show-keys .grid { display: none; }
  #menu .panel.show-keys .keys { display: block; }
  #menu .keys dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px 22px; margin: 0; font-size: 11px; letter-spacing: 0.12em; line-height: 1.3; text-transform: uppercase; }
  #menu .keys dt { font-weight: 700; }
  #menu .keys dd { margin: 0; opacity: 0.75; }
  #menu .keys .kh { margin: 18px 0 10px; font-size: 10px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.6; }
  #menu .keys .kh:first-child { margin-top: 0; }
  #menu .keys .capsule { margin-top: 20px; display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; padding: 0; border-radius: 999px; background: #ffffff; color: #111111; font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; }
  #menu .keys .touch-only { display: none; }
  body.touch #menu .keys .desk-only { display: none; }
  body.touch #menu .keys .touch-only { display: block; }
  body.touch #menu .tile.place, body.touch #menu #m-radio, body.touch #menu .foot .hint { display: none; }
  /* Phones: compact rows, everything fits between the header and the bottom bar without scrolling */
  @media (max-width: 760px) {
    #menu { padding: var(--gl-top) 12px var(--gl-bottom); }
    html.cm-play #menu { padding-top: calc(62px + env(safe-area-inset-top)); }
    #menu .panel { padding: 14px; border-radius: 26px; }
    #menu .head { height: 40px; margin: 0 0 8px; padding-right: 50px; }
    #menu #menu-x { right: 10px; top: 10px; width: 44px; height: 44px; font-size: 26px; }
    #menu .grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    #menu .tile, #menu .tile.big, #menu .tile.cov { grid-column: span 1; height: 48px; padding: 0 14px; flex-direction: row; justify-content: flex-start; align-items: center; gap: 12px; border-radius: 18px; }
    #menu .tile.big, #menu .tile.cov { grid-column: span 2; height: 54px; }
    #menu .tile.big b { font-size: 13px; }
    #menu .tile.big .ic { width: 28px; height: 28px; font-size: 11px; }
    #menu .tile b { font-size: 9.5px; }
    #menu .mt { font-size: 10.5px; }
    #menu .tile.place { display: none; }
    #menu .tile small { display: none; }
    #menu .tile.cov small { display: block; }
    #menu .tile.cov img { height: 40px; width: 29px; border-radius: 6px; }
    #menu .tg { grid-column: span 1; height: 48px; border-radius: 18px; }
    #menu #m-sound { grid-column: auto / span 1; }
    #menu #m-quality, #menu #m-time { grid-column: span 2; height: 46px; }
    #menu #m-radio, #menu .foot .hint { display: none; }
    #menu .foot { justify-content: center; margin-top: 12px; }
    #menu .keys dl { grid-template-columns: 96px 1fr; gap: 8px 14px; font-size: 10px; }
    #menu .keys .capsule { margin-top: 14px; height: 46px; }
  }
  /* Short phones: tighter still */
  @media (max-width: 760px) and (max-height: 700px) {
    #menu { padding-top: calc(84px + env(safe-area-inset-top)); padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
    #menu .head { height: 40px; margin-bottom: 8px; }
    #menu #menu-x { width: 44px; height: 44px; top: 12px; }
    #menu .grid { gap: 7px; }
    #menu .tile, #menu .tg { height: 48px; }
    #menu .tile.big, #menu .tile.cov { height: 54px; }
    #menu .tile.cov img { height: 40px; width: 29px; }
    #menu #m-quality, #menu #m-time { height: 46px; }
    #menu .foot { margin-top: 10px; }
  }
  @media (orientation: landscape) and (max-height: 500px) {
    #menu { padding: 12px 16px; align-items: center; }
    #menu .tile { height: 64px; }
  }

  /* Phones, upright: the menu as a control centre. A tall clear glass panel under the site header,
     Resume as a wide white tile, the rest as large tiles two by two, switches and quality below */
  @media (max-width: 760px) and (min-height: 640px) and (orientation: portrait) {
    #menu, html.cm-play #menu { top: var(--hdr, 0px); align-items: stretch; padding: 12px 12px calc(26px + env(safe-area-inset-bottom)); }
    #menu .panel { display: flex; flex-direction: column; padding: 18px; border-radius: 34px; max-height: none; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6); }
    #menu .head { height: 36px; margin: 0 0 12px; }
    #menu .mt { font-size: 13px; letter-spacing: 0.22em; }
    #menu #menu-x { right: 16px; top: 6px; width: 36px; height: 36px; font-size: 22px; background: rgba(255,255,255,0.16); border: 0; }
    #menu .grid { flex: 1; grid-template-columns: 1fr 1fr; gap: 10px; align-content: space-between; }
    #menu .glass2 { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.26); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); }
    #menu .tile, body.touch #menu .tile.place { display: flex; grid-column: span 1; height: 76px; padding: 11px 14px; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 0; border-radius: 24px; }
    #menu .tile .ic { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #ffffff; color: #111111; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
    #menu .tile b { font-size: 14px; letter-spacing: 0; text-transform: none; }
    #menu .tile small { display: block; margin-top: 3px; font-size: 10px; letter-spacing: 0.08em; }
    #menu .tile.big { grid-column: span 2; height: 62px; flex-direction: row; justify-content: flex-start; align-items: center; gap: 14px; padding: 0 18px; border-radius: 28px; background: rgba(255,255,255,0.92); border-color: transparent; color: #111111; }
    #menu .tile.big .ic { width: 38px; height: 38px; background: #111111; color: #ffffff; font-size: 14px; }
    #menu .tile.big b { font-size: 14px; }
    #menu #m-keys { order: 7; }
    #menu .tg { order: 8; }
    #menu .tile.cov { order: 9; grid-column: span 2; height: 56px; flex-direction: row; justify-content: flex-start; align-items: center; gap: 12px; padding: 0 16px; }
    #menu .tile.cov img { height: 40px; width: 29px; border-radius: 6px; }
    #menu .tg { height: 46px; padding: 0 16px; border-radius: 22px; font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; }
    body.touch #menu #m-radio, #menu #m-radio { display: flex; }
    #menu .sw { width: 46px; height: 28px; border-radius: 99px; }
    #menu .sw:after { width: 22px; height: 22px; }
    #menu .on .sw:after { left: 21px; }
    #menu #m-quality, #menu #m-time { grid-column: span 2; height: 46px; }
    #menu .foot { margin-top: 12px; }
  }

  /* Full map */
  #bigmap { position: fixed; inset: 0; z-index: 26; background: #e6e4df; color: #111111; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.3s ease, visibility 0s linear 0.3s; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  #bigmap.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.3s ease, visibility 0s; }
  #bigmap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
  #bigmap canvas.drag { cursor: grabbing; }
  #bigmap .cap .m { display: none; }
  #bigmap .cap { z-index: 2; background: rgba(230,228,223,0.88); padding: 8px 12px 8px 0; box-shadow: -12px 0 0 rgba(230,228,223,0.88); }
  body.touch #bigmap .cap .m { display: block; } body.touch #bigmap .cap .d { display: none; }
  #bigmap .places { position: absolute; left: calc(32px + env(safe-area-inset-left)); top: calc(110px + env(safe-area-inset-top)); width: 330px; display: flex; flex-direction: column; gap: 10px; z-index: 2; }
  #bigmap .place { display: flex; align-items: center; gap: 14px; padding: 15px 16px; background: #ffffff; border: none; box-shadow: 0 6px 18px rgba(0,0,0,0.1); font: inherit; color: #111111; text-align: left; cursor: pointer; }
  #bigmap .place em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; color: #ff3b1f; width: 18px; }
  #bigmap .place .sq { font-style: normal; flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; background: #ffffff; color: #111111; box-shadow: inset 0 0 0 1.5px #111111; }
  #bigmap .place .sq.dark { background: #111111; color: #ffffff; box-shadow: none; }
  #bigmap .place b { flex: 1; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
  #bigmap .place small { display: block; margin-top: 5px; font-size: 10px; font-weight: 500; letter-spacing: 0.12em; color: #6b6862; }
  #bigmap .place .go { font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; background: #111111; color: #ffffff; padding: 10px 14px; }
  #bigmap .zoombar { position: absolute; right: calc(32px + env(safe-area-inset-right)); bottom: calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; z-index: 2; }
  #bigmap .zoombar .btn { width: 46px; height: 46px; border-radius: 50%; background: #ffffff; color: #111111; border: none; box-shadow: 0 4px 14px rgba(0,0,0,0.18); backdrop-filter: none; -webkit-backdrop-filter: none; font-size: 22px; font-weight: 300; letter-spacing: 0; padding: 0; }
  #bigmap #zoom-me { font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
  #bigmap .maphint { position: absolute; left: 50%; bottom: calc(32px + env(safe-area-inset-bottom)); transform: translateX(-50%); margin-left: 180px; background: #111111; color: #ffffff; font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; padding: 10px 14px; white-space: nowrap; pointer-events: none; transition: opacity 0.6s ease; z-index: 2; }
  #bigmap .maphint.off { opacity: 0; }
  /* Phones: the places become a row of tiles along the bottom */
  body.touch #bigmap .places { left: calc(12px + env(safe-area-inset-left)); right: calc(12px + env(safe-area-inset-right)); top: auto; bottom: calc(26px + env(safe-area-inset-bottom)); width: auto; flex-direction: row; gap: 8px; }
  body.touch #bigmap .place { flex: 1; min-width: 0; flex-wrap: wrap; gap: 0; padding: 11px 10px; }
  body.touch #bigmap .place em, body.touch #bigmap .place .go { display: none; }
  body.touch #bigmap .place .sq { width: 18px; height: 18px; font-size: 10px; margin-right: 7px; }
  body.touch #bigmap .place b { font-size: 9px; letter-spacing: 0.06em; white-space: nowrap; overflow: hidden; text-overflow: clip; }
  body.touch #bigmap .place small { font-size: 9px; letter-spacing: 0.08em; white-space: nowrap; }
  body.touch #bigmap .zoombar { right: calc(14px + env(safe-area-inset-right)); bottom: calc(112px + env(safe-area-inset-bottom)); }
  body.touch #bigmap .zoombar .btn { width: 50px; height: 50px; }
  body.touch #bigmap .maphint { display: none; }
  #bigmap .cap { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: calc(40px + env(safe-area-inset-left)); font-size: 11px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; line-height: 1.9; white-space: nowrap; }
  #bigmap .cap span { display: block; font-weight: 500; color: #6b6862; }
  #bigmap-close { z-index: 3; position: absolute; top: calc(78px + env(safe-area-inset-top)); right: 18px; width: 52px; height: 52px; border-radius: 50%; font-size: 28px; font-weight: 300; line-height: 1; letter-spacing: 0; color: #111111; background: rgba(255,255,255,0.55); border: 1px solid rgba(0,0,0,0.12); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 6px 20px rgba(0,0,0,0.16); }
  html.cm-play body.touch #bigmap-close { top: calc(52px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right)); }
  #bigmap .legend { position: absolute; left: calc(40px + env(safe-area-inset-left)); bottom: calc(34px + env(safe-area-inset-bottom)); font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; line-height: 2.2; white-space: nowrap; pointer-events: none; }
  #bigmap .legend i { display: inline-block; width: 10px; height: 10px; margin-right: 12px; vertical-align: -1px; }
  #bigmap .legend .you { background: #ff3b1f; clip-path: polygon(50% 0, 100% 100%, 50% 70%, 0 100%); }
  #bigmap .legend .shop { background: #111111; }
  #bigmap .legend .gal { background: #ffffff; outline: 1.5px solid #111111; outline-offset: -1.5px; }
  #bigmap .legend .car { border-radius: 50%; background: #2a2a2a; box-shadow: 0 0 0 1.5px #ffffff inset; }
  #bigmap .legend .ped { border-radius: 50%; background: #9a968f; transform: scale(0.6); }
  #bigmap .legend .site { background: #e9631f; height: 3px; vertical-align: 3px; }
  body.touch #bigmap .legend { display: none; }

  /* Map, duotone: white streets on black, white glass on top, dark glass below */
  #bigmap { background: rgba(14,14,16,0.45); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); color: #ffffff; }
  /* Map A, smoked glass: the street shows through, roads in solid white */
  #minimap { background: rgba(14,14,16,0.30) !important; backdrop-filter: blur(8px) saturate(1.3); -webkit-backdrop-filter: blur(8px) saturate(1.3); box-shadow: 0 0 0 1.5px rgba(255,255,255,0.75), 0 8px 24px rgba(0,0,0,0.35), inset 0 0 22px rgba(0,0,0,0.4); border: 0; overflow: visible; }
  #minimap canvas { border-radius: 50%; }
  #map-n { position: absolute; left: 50%; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #ffffff; color: #111111; box-shadow: 0 0 0 2px #111111, 0 3px 8px rgba(0,0,0,0.4); font-size: 11px; font-weight: 800; line-height: 22px; text-align: center; letter-spacing: 0; pointer-events: none; }
  body.touch #minimap { width: 86px; height: 86px; }
  body.touch #map-n { width: 16px; height: 16px; margin: -8px 0 0 -8px; font-size: 8px; line-height: 16px; box-shadow: 0 0 0 1.5px #111111, 0 3px 8px rgba(0,0,0,0.4); }
  body.touch #dist { top: calc(157px + env(safe-area-inset-top)); width: 86px; }
  #dist span { display: inline-flex; align-items: center; height: 24px; box-sizing: border-box; line-height: 1; background: rgba(18,18,20,0.8); color: #ffffff; border-radius: 999px; padding: 0 9px; border: 1px solid rgba(255,255,255,0.22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  #bigmap .cap { background: rgba(255,255,255,0.86); color: #111111; border-radius: 999px; padding: 10px 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  #bigmap .cap span { color: #6b6862; }
  #bigmap-close { background: rgba(255,255,255,0.86); color: #111111; }
  #bigmap .zoombar .btn { background: rgba(18,18,20,0.8); color: #ffffff; border: 1px solid rgba(255,255,255,0.22); box-shadow: 0 6px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.25); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  #bigmap .place { background: rgba(18,18,20,0.8); color: #ffffff; border: 1px solid rgba(255,255,255,0.18); border-radius: 18px; box-shadow: 0 6px 20px rgba(0,0,0,0.3); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  #bigmap .place .sq, #bigmap .place .sq.dark { background: #ffffff; color: #111111; border-radius: 7px; box-shadow: none; }
  #bigmap .place small { color: rgba(255,255,255,0.6); }
  #bigmap .place .go { background: #ffffff; color: #111111; border-radius: 999px; }
  #bigmap .legend { color: #ffffff; }
  #bigmap .legend .car { background: #f4f4f2; box-shadow: 0 0 0 1.5px #111111 inset; }
  #bigmap .legend .you { background: #ff7a2c; }
  #bigmap .legend .shop, #bigmap .legend .gal { background: #ff7a2c; outline: none; border-radius: 50%; }
  #bigmap .maphint { background: #ffffff; color: #111111; border-radius: 999px; }
  body.touch #bigmap .places { gap: 0; background: rgba(18,18,20,0.8); border: 1px solid rgba(255,255,255,0.18); border-radius: 22px; overflow: hidden; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
  body.touch #bigmap .place { background: transparent; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 12px; }
  body.touch #bigmap .place + .place { border-left: 1px solid rgba(255,255,255,0.14); }
  /* Driving: the exit button sits beside the tall pedal, 20 px lower */
  body.touch.driving-hud #btn-drive { transform: translateY(5px); }
  html.cm-play body.touch #toast { top: calc(214px + env(safe-area-inset-top)); max-width: 250px; white-space: normal; text-align: center; }
  html.cm-play body.touch #bigmap .cap { top: calc(54px + env(safe-area-inset-top)); left: calc(14px + env(safe-area-inset-left)); max-width: calc(100% - 100px); padding: 9px 14px; font-size: 10px; letter-spacing: 0.2em; }
  html.cm-play body.touch #bigmap .cap span { font-size: 8.5px; letter-spacing: 0.12em; }
  #minimap { cursor: pointer; touch-action: none; }
  #perf { position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 40; font-size: 11px; letter-spacing: 0.08em; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,0.6); color: #fff; font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }
  /* Inside / outside view switch, shown in the car and in the plane */
  #btn-view { position: absolute; top: calc(194px + env(safe-area-inset-top)); right: 18px; width: 40px; height: 40px; padding: 0; letter-spacing: 0; display: none; z-index: 3; }
  body.driving-hud #btn-view, body.flying #btn-view { display: flex; }
  #btn-view svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: none; }
  body:not(.cabin) #btn-view .i-in, body.cabin.driving-hud #btn-view .i-car, body.cabin.flying #btn-view .i-plane { display: block; }
  /* Inside the cockpit the dials already show speed and height, so the text readout steps aside */
  body.cabin.flying #flighthud { display: none !important; }
  /* Upright in the cockpit the throttle lever is shorter, so it stays under the altitude dial */
  body.touch.cabin.flying #throttle .track { height: 120px; }
  /* On phones it stands to the left of the sound button, a spot nothing else uses in the car or in the plane */
  body.touch #btn-view { top: calc(106px + env(safe-area-inset-top)); right: 66px; }
  /* Game clock: a small glass pill under the minimap */
  #clock { position: absolute; top: calc(238px + env(safe-area-inset-top)); right: 158px; transform: translateX(50%); display: flex; justify-content: center; pointer-events: auto; cursor: pointer; z-index: 3; opacity: 0.7; }
  #clock { height: 24px; align-items: center; gap: 6px; box-sizing: border-box; width: auto; padding: 0 10px; border-radius: 999px; background: rgba(18,18,20,0.8); border: 1px solid rgba(255,255,255,0.22); color: #ffffff; white-space: nowrap; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  #clock::after { content: ''; position: absolute; inset: -8px -6px; }
  #clock b { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
  #clock span { display: none; }   /* only the icon and the time show */
  #clock i { width: 9px; height: 9px; border-radius: 50%; background: #ffffff; flex: none; }
  #clock.moon i { background: transparent; box-shadow: inset -3px -1px 0 0 #ffffff; }
  body.touch #clock { right: auto; left: 61px; transform: translateX(-50%); top: calc(188px + env(safe-area-inset-top)); }
  /* Speed dial, shown while driving in the outside view */
  #speedo { display: none; position: absolute; left: 28px; bottom: 54px; width: 64px; height: 64px; box-sizing: border-box; border-radius: 50%; background: rgba(18,18,20,0.8); border: 1px solid rgba(255,255,255,0.22); color: #ffffff; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); pointer-events: none; z-index: 3; font-variant-numeric: tabular-nums; }
  body.driving-hud:not(.cabin) #speedo { display: block; }
  #speedo svg { position: absolute; left: -1px; top: -1px; width: 100%; height: 100%; transform: rotate(135deg); }
  #speedo circle { fill: none; stroke-width: 3; stroke-linecap: round; }
  #speedo .bg { stroke: #ffffff; stroke-opacity: 0.2; }
  #speedo .fg { stroke: #ff7a2c; }
  #speedo div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
  #speedo b { font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
  #speedo span { font-size: 5.5px; letter-spacing: 0.18em; opacity: 0.7; margin-top: 3px; }
  body.touch #speedo { left: 61px; bottom: auto; top: calc(224px + env(safe-area-inset-top)); transform: translateX(-50%); }
  #fade { position: fixed; inset: 0; z-index: 20; background: #000; opacity: 0; pointer-events: none; transition: opacity 0.6s ease; }
  #fade.on { opacity: 1; }
  @media (orientation: landscape) and (max-height: 500px) {
    body.touch #minimap { width: 96px; height: 96px; top: calc(54px + env(safe-area-inset-top)); left: calc(18px + env(safe-area-inset-left)); }
    body.touch #dist { top: calc(162px + env(safe-area-inset-top)); left: calc(18px + env(safe-area-inset-left)); width: 96px; font-size: 7px; letter-spacing: 0.14em; }
    body.touch #close { top: calc(54px + env(safe-area-inset-top)); right: calc(18px + env(safe-area-inset-right)); height: 32px; font-size: 8.5px; padding: 0 12px; }
    body.touch #sound { top: calc(94px + env(safe-area-inset-top)); right: calc(18px + env(safe-area-inset-right)); width: 34px; height: 34px; }
    body.touch #radio { top: calc(134px + env(safe-area-inset-top)); right: calc(18px + env(safe-area-inset-right)); }
    /* Turned sideways there is little height: smaller type and buttons everywhere */
    #ticker { width: 112px; height: 20px; } #ticker .run span { font-size: 7px; line-height: 18px; }
    #radio .row { margin-top: 6px; } #radio .btn { width: 28px; height: 28px; font-size: 13px; }
    #hud .btn { font-size: 8px; letter-spacing: 0.14em; }
    #actions { gap: 8px; } #actions .btn { padding: 9px 14px; }
    #toast { font-size: 8px; } #flighthud { font-size: 8px; } #prompt { font-size: 9px; }
    #title .panel, #menu .panel { zoom: 0.82; }
    #bigmap .cap { font-size: 8.5px; padding: 7px 12px; } #bigmap .place b { font-size: 8px; } #bigmap .place small { font-size: 8px; }
    body.touch #joy { bottom: calc(18px + env(safe-area-inset-bottom)); left: calc(22px + env(safe-area-inset-left)); }
    #joyhint { left: calc(158px + env(safe-area-inset-left)); bottom: calc(73px + env(safe-area-inset-bottom)); transform: none; height: 20px; }
    body.touch #tphint { left: calc(126px + env(safe-area-inset-left)); top: calc(92px + env(safe-area-inset-top)); width: auto; height: 20px; white-space: nowrap; border-radius: 999px; }
    body.touch #actions { bottom: calc(18px + env(safe-area-inset-bottom)); right: calc(22px + env(safe-area-inset-right)); }
    body.touch #look { right: calc(110px + env(safe-area-inset-right)); left: auto; top: auto; bottom: calc(100px + env(safe-area-inset-bottom)); transform: none; }
    body.touch #tracknav { display: none; }
    /* Sideways the throttle lever is shorter, so it stays clear of the sound and view buttons above it */
    body.touch #throttle { bottom: calc(56px + env(safe-area-inset-bottom)); gap: 5px; } body.touch #throttle .track { height: 120px; }
    body.touch #btn-view { top: calc(94px + env(safe-area-inset-top)); right: calc(60px + env(safe-area-inset-right)); width: 34px; height: 34px; }
    body.touch #clock { top: calc(188px + env(safe-area-inset-top)); left: calc(66px + env(safe-area-inset-left)); height: 20px; }
    body.touch #dist span { height: 20px; }
    body.touch #speedo { left: calc(132px + env(safe-area-inset-left)); top: calc(62px + env(safe-area-inset-top)); transform: none; width: 54px; height: 54px; } body.touch #speedo b { font-size: 15px; }
    /* A larger touch target around the small menu button */
    body.touch #close::after { content: ''; position: absolute; left: -16px; right: -16px; top: -10px; bottom: -14px; }
    /* Sideways, the exit button for the car or the plane goes to the bottom, in the middle */
    body.touch.driving-hud #btn-drive, body.touch.flying #btn-drive { position: fixed; left: 50%; right: auto; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); height: 34px; padding: 0 16px; z-index: 6; }
    body.touch.flying #btn-drive { bottom: calc(40px + env(safe-area-inset-bottom)); }
    body.touch #buy { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom)); }
    #hint { display: none; }
  }
  /* Desktop: the frosted blur behind the interface is what stalls big screens, so it stays a phone-only effect */
  @media (hover: hover) and (pointer: fine) {
    .btn, #minimap, #joy, #radio .btn, #tracknav .btn { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(20, 20, 20, 0.45); }
    #minimap { background: rgba(14,14,16,0.5) !important; }
    #bigmap { background: rgba(14,14,16,0.72); backdrop-filter: none; -webkit-backdrop-filter: none; }
  }
  /* Phones held sideways: every control in its own place, clear of the site header and of each other */
  @media (orientation: landscape) and (max-height: 500px) {
    /* MENU: two columns that fit the height, below the site header */
    #menu, html.cm-play #menu { padding: 52px 14px 10px !important; align-items: flex-start !important; }
    #menu .panel { zoom: 1 !important; width: 700px !important; max-height: 100% !important; padding: 14px 16px !important; border-radius: 24px !important; overflow-y: auto; }
    #menu .head { height: 26px !important; margin: 0 0 8px !important; }
    #menu .mt { font-size: 10px !important; }
    #menu #menu-x { top: 8px !important; right: 10px !important; width: 30px !important; height: 30px !important; font-size: 18px !important; }
    #menu .grid { grid-template-columns: repeat(6, 1fr) !important; gap: 7px !important; }
    #menu .tile { height: auto !important; min-height: 50px; padding: 8px 11px !important; gap: 4px !important; border-radius: 16px !important; }
    #menu .tile b { font-size: 10px !important; letter-spacing: 0.16em !important; }
    #menu .tile small { font-size: 7.5px !important; letter-spacing: 0.12em !important; white-space: nowrap; margin-top: 2px; }
    #menu .tile .ic { font-size: 12px; }
    #menu #resume { grid-column: span 2 !important; order: 1; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 10px !important; background: rgba(255,255,255,0.9); color: #111111; }
    #menu #m-map { grid-column: span 2 !important; order: 2; }
    #menu #restart { grid-column: span 2 !important; order: 3; }
    #menu .tile.cov { grid-column: span 2 !important; order: 4; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 10px !important; height: 50px !important; min-height: 0; }
    #menu .tile.cov img { height: 38px !important; width: auto !important; border-radius: 4px; }
    #menu #m-keys { grid-column: span 2 !important; order: 5; height: 50px !important; min-height: 0; }
    #menu .tg { height: 38px !important; border-radius: 14px !important; font-size: 8px !important; padding: 0 10px 0 12px !important; }
    #menu #m-sound { grid-column: span 2 !important; order: 6; height: 50px !important; }
    #menu #m-quality { grid-column: span 3 !important; order: 7; }
    #menu #m-time { grid-column: span 3 !important; order: 8; }
    #menu .seg button { height: 22px !important; padding: 0 7px !important; font-size: 7.5px !important; }
    #menu .seg { gap: 4px !important; }
    #menu .foot { margin-top: 8px !important; font-size: 8px; }

    /* LEFT COLUMN: minimap, one pill with distance and time, smaller joystick: nothing stacked on top of each other */
    body.touch #minimap { width: 86px !important; height: 86px !important; top: 52px !important; }
    body.touch #dist { top: 146px !important; width: auto !important; }
    body.touch #clock { top: 146px !important; left: calc(18px + 96px) !important; transform: none !important; }
    body.touch #joy { width: 112px !important; height: 112px !important; bottom: 14px !important; }
    body.touch #speedo { top: 56px !important; left: 116px !important; }

    /* RIGHT COLUMN */
    body.touch #close { top: 52px !important; }
    body.touch #btn-view, body.touch #sound { top: 92px !important; }
    body.touch #radio { top: 132px !important; }
    #ticker { width: 140px !important; }

    /* VEHICLES: exit at the top centre, HUD and dashboard alone at the bottom, messages in the middle */
    body.touch.driving-hud #btn-drive, body.touch.flying #btn-drive { top: 52px !important; bottom: auto !important; height: 30px !important; }
    body.touch #flighthud { bottom: 12px !important; }
    #toast { top: 92px !important; }
    #toast.center { top: 38% !important; font-size: 10px !important; padding: 10px 18px !important; }
    /* Throttle: label off (the HUD already says THR), lever below the icons */
    body.touch #throttle > span { display: none !important; }
    body.touch #throttle { bottom: 30px !important; } body.touch #throttle .track { height: 112px !important; }
  }

  /* Menu: the five places in one row (Bookshop, Gallery, Club, Cinema, Airport) on every screen, and switches that fit */
  #menu .goto { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
  #menu .goto .tile.place, body.touch #menu .goto .tile.place { display: flex; grid-column: auto; height: 84px; min-width: 0; }
  /* Issue 3 and Controls take two rows; Sound and Radio stack beside them; Quality and Time share the last row */
  #menu .tile.cov { grid-column: span 6; grid-row: span 2; height: auto; min-height: 101px; }
  #menu #m-keys { grid-column: span 3; grid-row: span 2; height: auto; min-height: 101px; }
  #menu #m-sound, #menu #m-radio { grid-column: span 3; }
  #menu #m-quality, #menu #m-time { grid-column: span 6; }
  @media (max-width: 760px) {
    #menu .goto { gap: 6px; }
    #menu .goto .tile.place, body.touch #menu .goto .tile.place { height: 62px; padding: 9px 4px 8px; flex-direction: column; justify-content: space-between; align-items: center; text-align: center; gap: 4px; border-radius: 18px; }
    #menu .goto .tile.place .ic { width: 24px; height: 24px; font-size: 11px; display: flex; align-items: center; justify-content: center; }
    #menu .goto .tile.place b { font-size: 10px; letter-spacing: 0.02em; }
    #menu .goto .tile.place small { display: none; }
    #menu #m-keys, #menu #m-sound, #menu #m-radio { grid-column: span 1; grid-row: auto; min-height: 0; }
    #menu .tile.cov { grid-row: auto; min-height: 0; }
    #menu .tile.cov, #menu #m-quality, #menu #m-time { grid-column: span 2; }
  }
  /* Phones upright: Controls beside Sound and Radio stacked, so no switch is left alone on a row */
  @media (max-width: 760px) and (min-height: 640px) and (orientation: portrait) {
    #menu #m-keys { grid-row: span 2; height: auto; }
  }
  @media (orientation: landscape) and (max-height: 500px) {
    #menu .goto .tile.place .ic, #menu .goto .tile.place b { line-height: 1; }
  }
  @media (orientation: landscape) and (max-height: 500px) {
    #menu .goto { grid-column: 1 / -1 !important; order: 4; gap: 7px; }
    #menu .goto .tile.place, body.touch #menu .goto .tile.place { height: 36px !important; min-height: 0 !important; padding: 0 10px !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 8px !important; border-radius: 14px !important; }
    #menu .goto .tile.place small { display: none !important; }
    #menu .tile.cov, #menu #m-keys { grid-row: auto !important; min-height: 0 !important; }
    #menu .tile.cov { order: 5 !important; } #menu #m-keys { order: 6 !important; } #menu #m-sound { order: 7 !important; }
    #menu #m-quality { order: 8 !important; } #menu #m-time { order: 9 !important; }
  }

  /* Desktop: messages and prompts sit low, just above the key hints, instead of in the middle of the view */
  body:not(.touch) #toast.center { top: auto; bottom: 124px; font-size: 11px; letter-spacing: 0.2em; padding: 11px 20px; }
  body:not(.touch) #prompt, body:not(.touch) #gallery-cta, body:not(.touch) #club-cta, body:not(.touch) #case-cta, body:not(.touch) #cinema-cta, body:not(.touch) #taxi-cta { bottom: 64px; }
  body:not(.touch).flying #prompt { bottom: 104px; }
  body:not(.touch) #taxi-cta { bottom: 118px; }
  body:not(.touch).flying #toast.center { bottom: 150px; }
  /* Desktop, menu open: the menu button, sound, mini-map, distance and clock stay on the right, ready to click */
  @media (min-width: 1000px) {
    body:not(.touch).cw-menu-open #hud { opacity: 1; visibility: visible; z-index: 27; }
    body:not(.touch).cw-menu-open #hud > *:not(#close):not(#sound):not(#minimap):not(#dist):not(#clock) { visibility: hidden !important; }
  }

  /* A message from the other character: an iPhone-style notification with two answers */
  #cw-notif { position: absolute; z-index: 9; right: 26px; bottom: 70px; width: 236px; height: 470px; box-sizing: border-box; padding: 9px; border-radius: 40px; background: #0c0c0d; box-shadow: 0 22px 60px rgba(0,0,0,0.5), inset 0 0 0 2px #2b2b2e; font-family: -apple-system, 'SF Pro Text', Helvetica, Arial, sans-serif; letter-spacing: 0; text-transform: none; color: #111111; pointer-events: none; opacity: 0; visibility: hidden; transform: translateY(40px) scale(0.92); transform-origin: bottom right; transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s; }
  #cw-notif.on { opacity: 1; visibility: visible; transform: scale(0.92); pointer-events: auto; transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s; }
  #cw-notif .scr { width: 100%; height: 100%; border-radius: 32px; background: #ffffff; overflow: hidden; display: flex; flex-direction: column; }
  #cw-notif .isl { flex: none; width: 78px; height: 22px; border-radius: 12px; background: #000000; margin: 8px auto 0; }
  #cw-notif .hd { flex: none; display: flex; flex-direction: column; align-items: center; padding: 8px 0 9px; border-bottom: 1px solid #e5e5ea; background: #f7f7f9; }
  #cw-notif .av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; background: #d1d1d6; }
  #cw-notif .nm { font-size: 11px; font-weight: 600; margin-top: 4px; }
  #cw-notif .body { flex: 1; min-height: 0; padding: 12px 10px; display: flex; flex-direction: column; gap: 7px; }
  #cw-notif .when { text-align: center; font-size: 9px; color: #8e8e93; }
  #cw-notif .msg { align-self: flex-start; max-width: 82%; background: #e9e9eb; padding: 8px 11px; border-radius: 17px; font-size: 12.5px; line-height: 1.3; }
  #cw-notif .typing { align-self: flex-start; background: #e9e9eb; padding: 9px 12px; border-radius: 17px; display: flex; gap: 3px; }
  #cw-notif .typing i { width: 6px; height: 6px; border-radius: 50%; background: #8e8e93; animation: cw-typing 1.2s ease-in-out infinite; }
  #cw-notif .typing i:nth-child(2) { animation-delay: 0.15s; } #cw-notif .typing i:nth-child(3) { animation-delay: 0.3s; }
  @keyframes cw-typing { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
  #cw-notif .act { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-top: 1px solid #e5e5ea; }
  #cw-notif .act button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 18px; font-size: 12.5px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
  #cw-notif #cw-yes { background: #0a84ff; color: #ffffff; }
  #cw-notif #cw-no { background: #f2f2f7; color: #ff3b30; }
  #cw-notif kbd { font: inherit; font-size: 9.5px; opacity: 0.55; }
  #cw-notif #cw-x { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; top: -9px; right: -9px; width: 30px; height: 30px; border-radius: 50%; background: rgba(28,28,30,0.92); border: 1px solid rgba(255,255,255,0.35); display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
  #cw-notif #cw-x svg { width: 12px; height: 12px; fill: none; stroke: #ffffff; stroke-width: 2.4; stroke-linecap: round; }
  /* at the wheel on a desktop the radio is on the right: the phone stands just left of it */
  body:not(.touch).driving-hud #cw-notif { right: 172px; }
  body.touch #cw-notif kbd { display: none; }
  /* phones: a smaller phone, top left under the clock, clear of the look arrows; the X stays a comfortable size */
  body.touch #cw-notif { height: 380px; right: auto; bottom: auto; left: 14px; top: calc(250px + env(safe-area-inset-top)); transform: translateY(20px) scale(0.6); transform-origin: top left; }
  body.touch #cw-notif.on { transform: scale(0.6); }
  body.touch #cw-notif #cw-x { width: 62px; height: 62px; top: -22px; right: -22px; }
  body.touch #cw-notif #cw-x svg { width: 22px; height: 22px; stroke-width: 2.6; }
  @media (orientation: landscape) and (max-height: 500px) { body.touch #cw-notif { left: auto; right: 96px; top: calc(14px + env(safe-area-inset-top)); transform-origin: top right; } }
  body.riding #cw-notif, body.cw-menu-open #cw-notif, body.seated #cw-notif { display: none; }
  /* Create your own: the third character card */
  #choose .card { position: relative; }
  #choose .card .ph-wrap { position: relative; }
  #choose .card.create .ph-create { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(255,255,255,0.05); border-bottom: 1px dashed rgba(255,255,255,0.28); }
  #choose .card.saved .ph-create { display: none; }
  #choose .card.create .plus { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.7); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 300; }
  #choose .card.create .hint { font-size: 8.5px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.66; text-align: center; line-height: 1.6; }
  #choose .card .edit { display: none; position: absolute; top: 8px; right: 8px; padding: 5px 9px; border-radius: 999px; background: rgba(20,20,22,0.55); border: 1px solid rgba(255,255,255,0.4); color: #ffffff; font: 700 8px/1 var(--ui-font); letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer; }
  #choose .card.saved .edit { display: block; }
  #choose .card.saved img { background: #2a2a2e; }
  @media (min-width: 761px) {
    #choose { grid-template-columns: repeat(6, 1fr); }
    #choose .lab { grid-column: span 2; } #choose .lab-char { grid-column: span 4; }
    #title #enter { grid-column: span 6; }
  }
  @media (max-width: 760px) {
    #choose { grid-template-columns: repeat(12, 1fr); }
    #choose .lab, #choose .lab-char { grid-column: span 12; }
    #choose .city { grid-column: span 6; } #choose .card { grid-column: span 3; }
    #title #enter { grid-column: span 12; }
    #choose .card span { font-size: 8.5px; letter-spacing: 0.14em; padding: 9px 8px; }
  }
  @media (orientation: landscape) and (max-height: 500px) {
    #choose { grid-template-columns: repeat(6, 1fr); }
    #choose .lab { grid-column: span 2; } #choose .lab-char { grid-column: span 4; } #choose .city, #choose .card { grid-column: span 1; }
    #title #enter { grid-column: span 6; }
  }
  /* Create your own: the editor */
  #av-editor { position: fixed; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center; background: rgba(8,8,9,0.72); font-family: var(--ui-font); color: #f2f2f2; }
  #av-editor.on { display: flex; }
  #av-editor .cap { font-size: 10px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; }
  #av-editor button { font-family: var(--ui-font); color: inherit; cursor: pointer; }
  #av-editor .av-panel { position: absolute; inset: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom)); border-radius: 28px; border: 1px solid rgba(255,255,255,0.18); background: linear-gradient(180deg, #1d1d1f 0%, #121213 100%); box-shadow: 0 30px 80px rgba(0,0,0,0.6); display: flex; flex-direction: column; padding: 18px 16px 16px; gap: 12px; overflow: hidden; }
  #av-editor .av-left { display: contents; }
  #av-editor .av-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  #av-editor .av-title { font-size: 11px; white-space: nowrap; }
  #av-editor .av-pill { height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ui-border); background: var(--ui-bg); white-space: nowrap; }
  #av-editor .av-save { background: #ffffff; color: #111111; border-color: #ffffff; }
  #av-editor .av-stage { position: relative; flex: 1; min-height: 0; border-radius: 20px; overflow: hidden; background: radial-gradient(120% 70% at 50% 85%, #3a3a3f 0%, #1a1a1c 55%, #111112 100%); border: 1px solid rgba(255,255,255,0.1); touch-action: none; }
  #av-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  #av-editor .av-body { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; }
  #av-editor .av-body button { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ui-border); background: var(--ui-bg); font-size: 9px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; }
  #av-editor .av-body button.on { background: #ffffff; color: #111111; border-color: #ffffff; }
  #av-editor .av-rot { position: absolute; top: 50%; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%; border: 1px solid var(--ui-border); background: var(--ui-bg); font-size: 18px; line-height: 1; }
  #av-editor .av-rot.l { left: 12px; } #av-editor .av-rot.r { right: 12px; }
  #av-editor .av-drag { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: 8.5px; opacity: 0.5; pointer-events: none; }
  #av-editor .av-name { height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; }
  #av-editor .av-name span { opacity: 0.5; font-size: 9px; }
  #av-editor .av-name input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #ffffff; text-align: right; font: 600 14px var(--ui-font); letter-spacing: 0.04em; }
  #av-editor .av-controls { display: flex; flex-direction: column; gap: 12px; }
  #av-editor .av-lab { opacity: 0.5; font-size: 9px; margin-bottom: 8px; }
  #av-editor .av-styles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  #av-editor .av-styles button { height: 58px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.04); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 8.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
  #av-editor .av-styles button.on { border-color: #ffffff; background: rgba(255,255,255,0.14); }
  #av-editor .av-sw { display: flex; gap: 9px; flex-wrap: wrap; }
  #av-editor .av-c { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); padding: 0; }
  #av-editor .av-c.on { outline: 2px solid #ffffff; outline-offset: 3px; }
  #av-editor .av-hex { margin-top: 8px; font-size: 9px; opacity: 0.5; }
  #av-editor #av-colour-row.off { display: none; }
  @media (min-width: 900px) {
    #av-editor .av-panel { inset: 70px max(40px, calc(50vw - 600px)); flex-direction: row; padding: 22px; gap: 22px; }
    #av-editor .av-left { display: flex; flex: 1.05; flex-direction: column; gap: 12px; min-width: 0; }
    #av-editor .av-controls { flex: 1; gap: 22px; padding-top: 48px; }
    #av-editor .av-styles button { height: 92px; font-size: 9.5px; }
    #av-editor .av-c { width: 40px; height: 40px; }
  }
  @media (orientation: landscape) and (max-height: 500px) {
    #av-editor .av-panel { flex-direction: row; padding: 12px; gap: 12px; }
    #av-editor .av-left { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; }
    #av-editor .av-controls { flex: 1; gap: 10px; overflow-y: auto; }
    #av-editor .av-styles button { height: 48px; }
  }
  /* Start menu: a large picture of the chosen character, beside it the city and the five character cards, then the button that enters */
  #pick { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 20px; }
  #pick .hero { position: relative; overflow: hidden; min-height: 360px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.25); background: #d9d9d9; }
  #pick .hero img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 20%; }
  #pick .hero img:not([src]) { visibility: hidden; }
  #pick .hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.6)); pointer-events: none; }
  #pick .hero .who { position: absolute; left: 18px; bottom: 16px; z-index: 1; color: #ffffff; }
  #pick .hero .who .cap { opacity: 0.75; }
  #pick .hero .who b { display: block; margin-top: 5px; font-size: 26px; font-weight: 700; letter-spacing: 0.04em; line-height: 1.1; }
  #pick .side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  #pick .lab { opacity: 0.65; }
  #pick .cities { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
  #pick .chars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 10px; }
  #pick .city, #pick .card { position: relative; overflow: hidden; cursor: pointer; border-radius: 16px; }
  #pick .city { height: 78px; }
  #pick .city .ph { position: absolute; inset: 0; background-size: cover; background-position: center; }
  #pick .ph-tokyo { background-image: var(--city-tokyo); }
  #pick .ph-nyc { background-image: var(--city-nyc); background-position: 72% 40%; }
  #pick .card { aspect-ratio: 3 / 4; opacity: 0.55; pointer-events: none; transition: opacity 0.5s ease; }
  #pick.ready .card { opacity: 1; pointer-events: auto; }
  #pick .card img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 10%; background: rgba(255,255,255,0.08); }
  #pick .card img:not([src]) { visibility: hidden; }
  #pick .city > span, #pick .card > span { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 14px 8px 7px; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.62)); color: #ffffff; font-size: 8.5px; font-weight: 700; letter-spacing: 0.16em; line-height: 1.25; text-transform: uppercase; }
  #pick .city.selected::before, #pick .card.selected::before { content: ''; position: absolute; inset: 0; z-index: 2; border: 2px solid #ffffff; border-radius: inherit; pointer-events: none; }
  #pick .city.selected::after, #pick .card.selected::after { content: ''; position: absolute; top: 7px; right: 7px; z-index: 3; width: 20px; height: 20px; border-radius: 50%; background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.4l3 3 6-6.4' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
  #pick .card .ph-wrap { position: absolute; inset: 0; }
  #pick .card.create { border-style: dashed; }
  #pick .card.create .ph-create { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-bottom: 22px; }
  #pick .card.saved .ph-create { display: none; }
  #pick .card.create .plus { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.7); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 300; }
  #pick .card.create .hint { display: none; }
  #pick .card.create > span { background: none; }
  #pick .card .edit { display: none; position: absolute; top: 6px; left: 6px; z-index: 3; padding: 4px 7px; border-radius: 999px; background: rgba(20,20,22,0.55); border: 1px solid rgba(255,255,255,0.4); color: #ffffff; font: 700 7.5px/1 var(--ui-font); letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; }
  #pick .card.saved .edit { display: block; }
  #pick .card.saved img { background: #2a2a2e; }
  #title #pick #enter { margin-top: auto; height: 50px; }
  @media (min-width: 761px) and (max-height: 800px) { #pick .hero { min-height: 300px; } #pick .city { height: 64px; } }
  @media (max-width: 760px) {
    #pick { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
    #pick .hero { min-height: 0; height: 230px; border-radius: 18px; }
    #pick .hero img { object-position: 50% 0%; }
    #pick .hero .who { left: 14px; bottom: 12px; } #pick .hero .who b { font-size: 20px; }
    #pick .side { gap: 6px; }
    #pick .cities { gap: 6px; margin-bottom: 4px; } #pick .chars { gap: 6px; margin-bottom: 6px; }
    #pick .city { height: 64px; }
    #pick .city, #pick .card { border-radius: 12px; }
    #pick .city > span, #pick .card > span { padding: 12px 6px 6px; font-size: 7.5px; letter-spacing: 0.12em; }
    #pick .city.selected::after, #pick .card.selected::after { top: 5px; right: 5px; width: 17px; height: 17px; }
    #pick .card.create .plus { width: 28px; height: 28px; font-size: 17px; }
    #title #pick #enter { height: 46px; }
  }
  @media (max-width: 760px) and (max-height: 700px) { #pick .hero { height: 170px; } #pick .city { height: 46px; } }
  @media (orientation: landscape) and (max-height: 500px) {
    #pick { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 14px; margin-top: 0; }
    #pick .hero { height: auto; min-height: 0; }
    #pick .hero img { object-position: 50% 12%; }
    #pick .side { gap: 5px; }
    #pick .cities { margin-bottom: 3px; } #pick .chars { margin-bottom: 6px; }
    #pick .city { height: 44px; }
    #title #pick #enter { height: 40px; }
  }
  #title, #menu, #menu .panel { overscroll-behavior: contain; }
  /* Phones: both menus are measured on the visible screen (between the site header and the browser bar), so nothing ends up under either */
  @media (max-width: 760px) {
    #title { bottom: auto; height: 100vh; height: 100dvh; }
  }
  @media (max-width: 760px) and (orientation: portrait) { #pick .hero { height: clamp(110px, calc(100dvh - 550px), 230px); } }
  @media (max-width: 760px) and (max-height: 700px) and (orientation: portrait) { #pick .hero { height: clamp(110px, calc(100dvh - 500px), 170px); } }
  @media (max-width: 760px) and (min-height: 640px) and (orientation: portrait) {
    #menu, html.cm-play #menu { bottom: auto; height: calc(100vh - var(--hdr, 0px)); height: calc(100dvh - var(--hdr, 0px)); }
    #menu .panel { max-height: 100%; min-height: 0; overflow-y: auto; }
    #menu .grid { gap: min(10px, 1.2dvh); }
    #menu .tile.place, body.touch #menu .tile.place { height: min(76px, 8.4dvh); }
    #menu .tile.big { height: min(62px, 8.2dvh); }
    #menu .tile.cov { height: min(56px, 7.6dvh); }
    #menu .tg, #menu #m-quality, #menu #m-time { height: min(46px, 6.6dvh); }
  }
  /* Phones upright: every panel starts below the fixed site header and ends above the browser bar; in the start menu the character picture gives up height first */
  @media (max-width: 760px) and (orientation: portrait) {
    #title { padding-top: calc(var(--hdr, 50px) + 16px); padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
    #title .panel { display: flex; flex-direction: column; align-items: stretch; gap: 0; max-height: 100%; min-height: 0; box-sizing: border-box; }
    #title .panel > * { flex: none; }
    #title .panel > #pick { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    #pick .hero { flex: 1 1 230px; height: auto; min-height: 120px; max-height: 230px; }
    #pick .side { flex: none; }
    #av-editor { bottom: auto; height: 100vh; height: 100dvh; }
    #av-editor .av-panel { top: calc(var(--hdr, 50px) + 10px); }
  }
  /* Phones sideways: the site header stays on top here too, so every panel starts below it and ends above the home bar; the start menu gives the room to the picture and the cards */
  @media (orientation: landscape) and (max-height: 500px) {
    #title { bottom: auto; height: 100vh; height: 100dvh; align-items: stretch; padding: calc(var(--hdr, 50px) + 8px) calc(16px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); }
    #title .panel { display: flex; flex-direction: column; align-items: stretch; gap: 0; max-height: 100%; min-height: 0; box-sizing: border-box; margin: 0 auto; }
    #title .panel > * { flex: none; }
    #title .tp { display: none; }
    #title .panel > #pick { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); }
    #pick .hero { height: auto; min-height: 0; }
    #pick .side { min-height: 0; }
    #pick .chars { flex: 1 1 auto; min-height: 48px; grid-template-rows: minmax(0, 1fr); }
    #pick .card { aspect-ratio: auto; height: auto; min-height: 0; }
    #av-editor { bottom: auto; height: 100vh; height: 100dvh; }
    #av-editor .av-panel { top: calc(var(--hdr, 50px) + 8px); bottom: calc(8px + env(safe-area-inset-bottom)); }
    #menu, html.cm-play #menu { bottom: auto !important; height: 100vh; height: 100dvh; padding-top: calc(var(--hdr, 50px) + 8px) !important; }
    #menu .grid { gap: 5px !important; } #menu .tile { min-height: 44px !important; } #menu .foot { margin-top: 6px !important; }
  }
  /* Start menu, carousel: cities on top, one character at a time on a lit stage, the button below */
  #title .panel { display: flex; flex-direction: column; align-items: stretch; gap: 18px; max-height: 100%; min-height: 0; box-sizing: border-box; }
  #title .panel > * { flex: none; }
  #title .panel > #pick { flex: 1 1 auto; min-height: 0; }
  #pick { display: flex; flex-direction: column; gap: 10px; grid-template-columns: none; }
  #pick .cities { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; flex: none; }
  #pick .city { height: 64px; }
  #pick .stage { position: relative; flex: 1 1 440px; min-height: 200px; overflow: hidden; border-radius: 20px; border: 1px solid rgba(255,255,255,0.18); background: radial-gradient(ellipse at 50% 86%, rgba(255,255,255,0.22), rgba(255,255,255,0) 60%), linear-gradient(#3a3a3e, #1d1d20); touch-action: none; user-select: none; -webkit-user-select: none; }
  #pick .stage img { position: absolute; display: block; pointer-events: none; -webkit-user-drag: none; }
  #pick .stage img:not([src]) { visibility: hidden; }
  #pick .stage .body { left: 50%; top: 34px; bottom: 74px; height: calc(100% - 108px); max-width: 64%; object-fit: contain; object-position: 50% 100%; transform: translateX(-50%); }
  #pick .stage .ghost { bottom: 86px; height: calc((100% - 108px) * 0.7); width: auto; opacity: 0.26; filter: grayscale(1) blur(1px); }
  #pick .stage .gl { right: calc(50% + 64px); } #pick .stage .gr { left: calc(50% + 64px); }
  #pick .stage.creating .gl, #pick .stage.creating .gr { opacity: 0.18; }
  #pick .stage .swipe { position: absolute; top: 12px; left: 0; right: 0; text-align: center; opacity: 0.55; pointer-events: none; }
  #pick .stage .arrow { position: absolute; top: calc(50% - 40px); width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.55); background: rgba(0,0,0,0.25); color: #ffffff; display: flex; align-items: center; justify-content: center; font: 300 24px/1 var(--ui-font); cursor: pointer; z-index: 2; }
  #pick .stage .al { left: 10px; } #pick .stage .ar { right: 10px; }
  #pick .stage .info { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; z-index: 1; pointer-events: none; }
  #pick .stage .info .cap { opacity: 0.6; }
  #pick .stage .info b { display: block; margin-top: 5px; font-size: 24px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.1; }
  #pick .stage .dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
  #pick .stage .dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.35); transition: width 0.2s ease; }
  #pick .stage .dots i.on { width: 20px; background: #ffffff; }
  #pick .stage .dots i.gone { display: none; }
  #pick .stage .make { display: none; position: absolute; left: 50%; top: calc(50% - 30px); transform: translate(-50%, -50%); flex-direction: column; align-items: center; gap: 10px; text-align: center; cursor: pointer; z-index: 2; }
  #pick .stage.creating .make { display: flex; }
  #pick .stage .make .plus { width: 72px; height: 72px; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,0.75); display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 300; }
  #pick .stage .make .sub { font-size: 12px; opacity: 0.6; }
  #pick .stage .edit { display: none; position: absolute; top: 10px; left: 10px; z-index: 3; padding: 7px 11px; border-radius: 999px; background: rgba(20,20,22,0.55); border: 1px solid rgba(255,255,255,0.4); color: #ffffff; font: 700 9px/1 var(--ui-font); letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; }
  #pick .stage.custom .edit { display: block; }
  #title #pick #enter { flex: none; margin: 0; height: 50px; }
  @media (min-width: 761px) and (min-height: 501px) {
    #title .panel > #pick { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px 16px; }
    #pick .stage { grid-column: 1; grid-row: 1 / 4; min-height: 340px; }
    #pick .cities { grid-column: 2; grid-row: 1; grid-template-columns: 1fr; gap: 10px; }
    #pick .city { height: 96px; }
    #title #pick #enter { grid-column: 2; grid-row: 3; }
  }
  @media (max-width: 760px) and (orientation: portrait) {
    #title .panel { height: 100%; gap: 12px; }
    #pick { gap: 8px; }
    #pick .city { height: 56px; }
    #pick .stage { flex: 1 1 0; min-height: 220px; }
    #title #pick #enter { height: 46px; }
  }
  @media (orientation: landscape) and (max-height: 500px) {
    #title .panel { height: 100%; gap: 8px; }
    #title .panel > #pick { display: grid; grid-template-columns: 1.2fr 0.8fr; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px 12px; }
    #pick .stage { grid-column: 1; grid-row: 1 / 4; min-height: 0; }
    #pick .cities { grid-column: 2; grid-row: 1; grid-template-columns: 1fr; }
    #pick .city { height: 44px; }
    #title #pick #enter { grid-column: 2; grid-row: 3; height: 42px; }
    #pick .stage .swipe { display: none; }
    #pick .stage .body { top: 8px; bottom: 6px; height: calc(100% - 14px); }
    #pick .stage .ghost { bottom: 6px; height: calc((100% - 14px) * 0.7); }
    #pick .stage .info { left: 12px; right: auto; bottom: 10px; text-align: left; }
    #pick .stage .info b { font-size: 18px; } #pick .stage .dots { justify-content: flex-start; }
    #pick .stage .arrow { width: 36px; height: 36px; top: calc(50% - 18px); }
    #pick .stage .make { top: 50%; } #pick .stage .make .plus { width: 52px; height: 52px; }
  }
  /* Tokyo map: opaque grey city seen from above, search on top, the list of places below (phone) or on the right (laptop), all under the site header */
  #bigmap .msearch, #bigmap .plh { display: none; }
  #bigmap.tkmap { background: #262628; backdrop-filter: none; -webkit-backdrop-filter: none; }
  #bigmap.tkmap .cap:not(.plh), #bigmap.tkmap .legend, #bigmap.tkmap .maphint { display: none !important; }
  #bigmap.tkmap .msearch { display: flex; align-items: center; gap: 10px; position: absolute; z-index: 3; top: calc(var(--hdr, 0px) + 12px); left: calc(12px + env(safe-area-inset-left)); right: calc(76px + env(safe-area-inset-right)); height: 46px; padding: 0 16px; border-radius: 999px; box-sizing: border-box; background: rgba(22,22,24,0.86); border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  #bigmap.tkmap .msearch input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: #ffffff; font: 500 16px/1 var(--ui-font); letter-spacing: 0.02em; }
  #bigmap.tkmap .msearch input::placeholder { color: rgba(255,255,255,0.55); }
  #bigmap.tkmap #bigmap-close, html.cm-play body.touch #bigmap.tkmap #bigmap-close { top: calc(var(--hdr, 0px) + 9px); right: calc(12px + env(safe-area-inset-right)); width: 52px; height: 52px; }
  #bigmap.tkmap .places, body.touch #bigmap.tkmap .places { position: absolute; z-index: 2; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; padding: 6px 16px 10px; background: rgba(22,22,24,0.92); border: 1px solid rgba(255,255,255,0.16); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  body.touch #bigmap.tkmap .places { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: min(42%, 330px); border-radius: 22px 22px 0 0; border-bottom: none; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  body:not(.touch) #bigmap.tkmap .places { left: auto; right: 20px; top: calc(var(--hdr, 0px) + 76px); bottom: auto; width: 360px; max-height: calc(100% - var(--hdr, 0px) - 96px); border-radius: 20px; }
  #bigmap.tkmap .plh span { display: inline; color: inherit; }
  #bigmap.tkmap .plh { position: static; top: auto; left: auto; background: none; box-shadow: none; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none; line-height: 1.2; display: flex; justify-content: space-between; padding: 10px 0 6px; font-size: 10px; letter-spacing: 0.2em; color: rgba(255,255,255,0.6); }
  #bigmap.tkmap .place, body.touch #bigmap.tkmap .place { flex: none; flex-wrap: nowrap; display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 10px 0; background: none; border: none; border-bottom: 1px solid rgba(255,255,255,0.1); border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: #ffffff; }
  #bigmap.tkmap .place:last-child { border-bottom: none; }
  #bigmap.tkmap .place em { display: none; }
  #bigmap.tkmap .place .sq, body.touch #bigmap.tkmap .place .sq, #bigmap.tkmap .place .sq.dark { width: 32px; height: 32px; margin: 0; border-radius: 50%; background: #ffffff; color: #111111; font-size: 12px; flex: none; }
  #bigmap.tkmap .place b, body.touch #bigmap.tkmap .place b { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #bigmap.tkmap .place small, body.touch #bigmap.tkmap .place small { margin-top: 3px; font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.55); white-space: nowrap; }
  #bigmap.tkmap .place .go, body.touch #bigmap.tkmap .place .go { display: block; flex: none; padding: 9px 15px; border-radius: 999px; background: #ffffff; color: #111111; font-size: 10px; letter-spacing: 0.16em; }
  body.touch #bigmap.tkmap .zoombar { left: auto; right: calc(12px + env(safe-area-inset-right)); bottom: calc(min(42%, 330px) + 12px); }
  body.touch #bigmap.tkmap .zoombar .btn { width: 44px; height: 44px; }
  body:not(.touch) #bigmap.tkmap .zoombar { right: 400px; bottom: auto; top: calc(var(--hdr, 0px) + 76px); }
  @media (orientation: landscape) and (max-height: 500px) {
    body.touch #bigmap.tkmap .places { left: auto; right: calc(8px + env(safe-area-inset-right)); top: calc(var(--hdr, 0px) + 66px); bottom: 8px; width: 300px; max-height: none; border-radius: 18px; border-bottom: 1px solid rgba(255,255,255,0.16); }
    body.touch #bigmap.tkmap .zoombar { right: auto; left: calc(12px + env(safe-area-inset-left)); bottom: 12px; flex-direction: row; }
    body.touch #bigmap.tkmap .msearch { right: calc(316px + env(safe-area-inset-right)); }
    body.touch #bigmap.tkmap #bigmap-close { right: calc(316px + env(safe-area-inset-right) - 64px); }
  }
  /* Game menu: the COEVAL World title centred in the panel (the close button keeps its corner) */
  #menu .head, #menu .head[class] { justify-content: center; padding-left: 0; padding-right: 0; }
  #menu .mt { text-align: center; }
  /* Start menu: the COEVAL World lockup centred at the top of the panel, the loading bar centred under it */
  #title .top, #title .top[class] { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: 0; }
  #title .brand { display: flex; flex-direction: column; align-items: center; }
  #title .ld { width: min(360px, 100%); margin-top: 14px; }
  @media (orientation: landscape) and (max-height: 500px) {
    #title .top, #title .top[class] { position: relative; flex-direction: row; justify-content: center; }
    #title .ld { position: absolute; right: 0; bottom: 0; width: 180px; margin: 0; }
  }
  /* Create your own: four bodies in the corner of the preview, they wrap instead of running off a narrow phone */
  #av-editor .av-body { right: 12px; flex-wrap: wrap; }
  #av-editor .av-body button { padding: 0 10px; letter-spacing: 0.16em; }

  /* Press release of the current exhibition: a pill under the sound button, shown only inside the gallery, opening a reading sheet */
  #press-btn { position: absolute; top: calc(210px + env(safe-area-inset-top)); right: 18px; height: 40px; padding: 0 16px 0 13px; gap: 8px; font-size: 10.5px; letter-spacing: 0.16em; display: none; z-index: 3; }
  #press-btn.on { display: inline-flex; }
  #press-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  body.touch #press-btn { top: calc(158px + env(safe-area-inset-top)); }
  #press { position: absolute; left: 50%; transform: translateX(-50%); top: calc(70px + env(safe-area-inset-top)); bottom: calc(18px + env(safe-area-inset-bottom)); width: min(560px, calc(100% - 36px)); z-index: 25; display: none; background: #f4f3f0; color: #111111; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.35); font-family: var(--ui-font); }
  #press.on { display: block; }
  #press .scr { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; padding: 26px 24px 34px; -webkit-user-select: text; user-select: text; }
  #press .kick { display: flex; justify-content: space-between; padding: 6px 48px 0 0; margin-bottom: 18px; font-size: 10px; letter-spacing: 0.18em; color: #8a8a8a; }
  #press h2 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
  #press .art { margin-top: 10px; font-size: 15px; font-weight: 700; }
  #press .when { margin-top: 8px; font-size: 12.5px; line-height: 1.5; }
  #press .lede { margin: 20px 0 12px; font-size: 15px; font-weight: 700; line-height: 1.35; }
  #press p { margin: 0 0 14px; font-size: 13px; line-height: 1.6; }
  #press .cred { margin-top: 24px; padding-top: 16px; border-top: 1px solid #d6d6d6; font-size: 12px; line-height: 1.5; }
  #press .cred div { margin-bottom: 12px; } #press .cred span { display: block; font-size: 9.5px; letter-spacing: 0.18em; color: #8a8a8a; text-transform: uppercase; } #press .cred i { font-style: normal; color: #8a8a8a; }
  #press .pdf { display: inline-flex; margin-top: 8px; padding: 11px 18px; border-radius: 999px; background: #111111; color: #ffffff; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; }
  #press-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: #111111; color: #ffffff; cursor: pointer; z-index: 1; display: flex; align-items: center; justify-content: center; }
  #press-x svg { width: 11px; height: 11px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  @media (orientation: landscape) and (max-height: 500px) {
    body.touch #press-btn { top: calc(136px + env(safe-area-inset-top)); right: calc(18px + env(safe-area-inset-right)); height: 32px; font-size: 8.5px; padding: 0 12px 0 10px; }
    #press { top: calc(14px + env(safe-area-inset-top)); bottom: calc(14px + env(safe-area-inset-bottom)); }
  }
