.game[data-city] > header, .game[data-city] > footer,
.game[data-city] > .viewport, .game[data-city] > #sleep-shade { display: none; }
#city-world { position: absolute; inset: 0; background: #101c2b; overflow: hidden; }
#city-world[hidden] { display: none; }
#city-canvas { width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.city-topbar {
  position: absolute; top: max(20px, env(safe-area-inset-top)); left: max(20px, env(safe-area-inset-left));
  right: max(20px, env(safe-area-inset-right)); display: flex; align-items: flex-start; justify-content: space-between; gap: 15px;
  pointer-events: none;
}
.city-place { padding: 12px 18px; border-left: 2px solid #77cfc4; color: #fff0d4; background: #101c2be8; box-shadow: 0 6px 22px #0004; }
.city-place p { margin: 0; font: 11px/1.4 Consolas, monospace; letter-spacing: .16em; text-transform: uppercase; color: #8bd3ca; }
.city-place h2 { margin: 3px 0 0; font: 25px/1.1 Georgia, serif; }
#city-home-marker { position: absolute; pointer-events: none; transform: translate(-50%,-100%); padding: 9px 12px; border: 1px solid #c4e5bd; border-radius: 3px; background: #152a2bf2; color: #eff6cd; box-shadow: 0 3px 12px #0009; font: bold 11px/1.2 Consolas, monospace; letter-spacing: .04em; white-space: nowrap; }
#city-home-marker span { position: absolute; top: 100%; left: 50%; width: 1px; height: 20px; background: #c4e5bd; }
#city-home-marker span::after { content: ''; position: absolute; bottom: -3px; left: -3px; width: 7px; height: 7px; background: #c4e5bd; transform: rotate(45deg); }
#city-home-marker[hidden] { display: none; }
.city-actions { display: flex; gap: 7px; pointer-events: auto; }
#city-world button, #city-map button {
  width: auto; height: auto; min-height: 44px; padding: 10px 15px; border: 1px solid #657c88;
  border-radius: 3px; background: #101c2bf2; color: #f3e7cd; font: 14px/1.25 Consolas, monospace;
}
#city-world button:hover, #city-map button:hover { background: #284752; border-color: #8bd3ca; }
.city-bottom { position: absolute; bottom: 18px; left: 22px; pointer-events: none; color: #f4e8ce; text-shadow: 0 2px 3px #07111f; font: 12px/1.4 Consolas, monospace; }
#city-mini { position: absolute; right: 22px; bottom: 22px; width: 148px; height: 100px; background: #10202bd9; border: 1px solid #7da9a48c; box-shadow: 0 5px 20px #0006; pointer-events: none; }
#city-stamina {
  position: absolute; width: 32px; height: 32px; border-radius: 50%; pointer-events: none;
  --stamina: 100%; --stamina-color: #71eadb;
  background: conic-gradient(from -90deg, var(--stamina-color) var(--stamina), #203c49 var(--stamina));
  border: 2px solid #091723; box-shadow: 0 0 0 1px #87bbbe60, 0 2px 8px #0008;
}
#city-stamina::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #0d1e2d; }
#city-stamina[data-low] { --stamina-color: #e9b477; }
#city-stamina[data-exhausted] { --stamina-color: #e47b9a; }
#city-enter-home, #city-enter-school { position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%); }
#city-enter-home[hidden], #city-enter-school[hidden] { display: none; }
#city-arrival {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; z-index: 3;
  background: #08111e; color: #eee4ce; pointer-events: none; transition: opacity 1s, visibility 1s;
}
#city-arrival[data-clear] { opacity: 0; visibility: hidden; }
#city-arrival p { margin: 0 0 10px; color: #90c9c3; font: 12px Consolas, monospace; letter-spacing: .22em; text-transform: uppercase; }
#city-arrival h2 { margin: 0; font: clamp(32px, 6vw, 60px) Georgia, serif; }
#city-map {
  width: min(680px, 94vw); max-height: 88dvh; padding: 24px; border: 1px solid #5c858c;
  background: #101e2b; color: #eee4ce; box-shadow: 0 25px 90px #000a;
}
#city-map::backdrop { background: #0209129c; backdrop-filter: blur(3px); }
#city-map h2 { margin: 0 0 12px; font: 28px Georgia, serif; }
#city-map p { font: 16px/1.65 Georgia, serif; }
#city-map-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; padding: 0; }
#city-map-list li { padding: 12px; border-left: 2px solid #689d9c; background: #1c303b; }
#city-map-list strong { display: block; margin-bottom: 3px; }
#city-map-list span { color: #a6babd; font: 12px Consolas, monospace; }
#room-outside { position: absolute; z-index: 3; right: 24px; bottom: 72px; display: inline-flex; align-items: center; width: auto; height: auto; min-height: 44px; padding: 10px 16px; background: #172b36; color: #eee4ce; border: 1px solid #8bb7af; }
#room-outside[hidden], .game[data-city] #room-outside { display: none; }
.game[data-asleep] #room-outside { display: none; }
@media (max-width: 650px) {
  .city-topbar { top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; gap: 8px; }
  .city-place { padding: 9px 11px; }
  .city-place h2 { font-size: 19px; }
  .city-place p { font-size: 9px; letter-spacing: .07em; }
  #city-world .city-actions button { padding: 8px 10px; font-size: 12px; }
  #city-mini { right: 12px; bottom: 15px; width: 108px; height: 72px; }
  .city-bottom { left: 12px; bottom: 12px; max-width: 52%; font-size: 10px; }
  #city-map-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { #city-arrival { transition: none; } }

#game-release { width: min(460px, calc(100vw - 32px)); box-sizing: border-box; max-height: 90dvh; padding: clamp(22px, 4vw, 36px); border: 1px solid #739a9d; background: #101e2b; color: #eee4ce; box-shadow: 0 25px 90px #000b; }
#game-release::backdrop { background: #020912b8; backdrop-filter: blur(3px); }
#game-release h2 { margin: 8px 0 16px; font: 32px Georgia, serif; }
#game-release p { line-height: 1.6; }
#game-release .release-eyebrow { margin: 0; color: #8bd3ca; text-transform: uppercase; letter-spacing: .15em; font: 11px Consolas, monospace; }
#release-form { display: grid; gap: 12px; margin-top: 24px; }
#release-form label { font: 13px Consolas, monospace; }
#release-email { box-sizing: border-box; width: 100%; min-height: 46px; padding: 10px 12px; background: #091521; border: 1px solid #6f8e97; border-radius: 2px; color: #fff5df; font: 16px Consolas, monospace; }
#game-release button { width: auto; height: auto; min-height: 44px; padding: 10px 15px; color: #eee4ce; background: #203d46; border: 1px solid #789e9d; border-radius: 2px; font: 14px Consolas, monospace; }
#game-release button:hover { background: #2a515c; }
#game-release :focus-visible { outline: 2px solid #a5e1d0; outline-offset: 3px; }
#game-release button:disabled { opacity: .6; }
#game-release .release-privacy { margin: 0; color: #adbec3; font-size: 12px; }
#release-status { font-size: 14px; }
#release-close { margin-top: 8px; }
.release-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
