:root { --ink: #16233a; --y: #ffd23f; --paper: #fffdf6; --sky: #a9d8ff; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--sky); color: var(--ink); font-family: Heebo, system-ui, sans-serif; overflow: hidden; }

#stage { position: fixed; inset: 0; }
#c { width: 100%; height: 100%; display: block; touch-action: none; }

#hud { position: absolute; top: 12px; right: 16px; left: 16px; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.pill { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: 15px; box-shadow: 0 3px 0 var(--ink); }
#cityName { background: var(--y); font-weight: 900; }

#search { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 32px)); display: flex; gap: 6px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 16px; padding: 6px; box-shadow: 0 4px 0 var(--ink); }
#search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; padding: 8px; direction: ltr; text-align: left; outline: none; }
#search button { border: 2.5px solid var(--ink); background: var(--y); border-radius: 10px; font: inherit; font-weight: 900; padding: 8px 14px; cursor: pointer; white-space: nowrap; }

.tag { position: absolute; transform: translate(-50%, -100%); background: var(--y); border: 2.5px solid var(--ink); border-radius: 10px; padding: 4px 10px; font-weight: 900; white-space: nowrap; direction: ltr; pointer-events: none; display: none; box-shadow: 0 3px 0 var(--ink); }

#toast { position: absolute; bottom: 96px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 700; text-align: center; opacity: 0; transition: opacity .25s; pointer-events: none; }
#toast.on { opacity: 1; }

#loading { position: fixed; inset: 0; display: grid; place-items: center; background: var(--sky); font-weight: 900; font-size: 22px; transition: opacity .4s; z-index: 10; }
#loading.done { opacity: 0; pointer-events: none; }

/* ---- reel mode (?reel): what you see is exactly what gets recorded ---- */
#rec, #reelPanel { display: none; }
body.reel { background: #111; }
body.reel #stage { visibility: hidden; }
body.reel #rec { display: block; height: 100vh; width: auto; aspect-ratio: 9 / 16; margin: 0 auto; }
body.reel #reelPanel { display: flex; position: fixed; top: 12px; left: 12px; flex-direction: column; gap: 8px; width: 190px; background: var(--paper); padding: 12px; border-radius: 12px; border: 2px solid var(--ink); font-weight: 700; z-index: 5; }
#reelPanel label { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 14px; }
#reelPanel input { width: 80px; font: inherit; padding: 2px 4px; }
#reelPanel button { font: inherit; font-weight: 900; border: 2px solid var(--ink); background: var(--y); border-radius: 8px; padding: 6px; cursor: pointer; }
#reelPanel small { min-height: 1em; }
