/* WARO Street — warostudios.com v3 (shared: base, HUD, rooms, toys). The painted world is in world.css.
   A night street you walk along. JS sets --ground (px from top to the curb) and --s (building scale). */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --orange: #ff8a3d;
  --orange-hi: #ffb070;
  --ink: #0d0b14;
  --paper: #f7efe5;
  --muted: rgba(247, 239, 229, 0.7);
  --line: rgba(247, 239, 229, 0.12);
  --ground: 70vh;
  --s: 0.7;
  --display: "Bricolage", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; scrollbar-color: #5b3a2a var(--ink); scrollbar-width: thin; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 1rem/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #5b3a2a; border-radius: 99px; border: 3px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }
img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ol, ul { margin: 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 10px; }
::selection { background: var(--orange); color: #1a0d06; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 200; padding: 10px 16px; border-radius: 12px; background: var(--orange); color: #1a0d06; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- Chips & buttons ---------- */
.chip { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 99px; font: 700 0.68rem/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.chip--live { color: #8af0b0; background: rgba(74, 222, 128, 0.12); border: 1px solid rgba(74, 222, 128, 0.3); }
.chip--soon { color: #ffc57a; background: rgba(255, 170, 70, 0.12); border: 1px solid rgba(255, 170, 70, 0.3); }
.chip--quiet { color: #d6c8ff; background: rgba(180, 160, 255, 0.1); border: 1px solid rgba(180, 160, 255, 0.24); }
.chip--quiet i { animation: none; }
.chip--brand { color: var(--orange); background: rgba(255, 138, 61, 0.12); border: 1px solid rgba(255, 138, 61, 0.3); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 99px; border: 1px solid transparent; font: 700 0.95rem/1 var(--body); white-space: nowrap; cursor: pointer; transition: transform 0.3s var(--spring), box-shadow 0.3s, background 0.3s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn--lit { color: #2a1406; background: linear-gradient(180deg, #ffc08a, var(--orange) 50%, #e2661f); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 10px 26px -8px rgba(255, 138, 61, 0.8); }
.btn--quiet { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); }
.btn--quiet:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- HUD ---------- */
.hud { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud__logo { display: flex; align-items: center; gap: 9px; }
.hud__mark { width: 32px; fill: var(--orange); filter: drop-shadow(0 0 12px rgba(255, 138, 61, 0.5)); }
.hud__word { width: 70px; }
.hud__sound { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 11px; border-radius: 99px; border: 1px solid var(--line); background: rgba(13, 11, 20, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 0.85rem; font-weight: 650; cursor: pointer; }
.hud__sound svg { width: 20px; height: 20px; }
.hud__sound .wave { display: none; }
.hud__sound[aria-pressed="true"] { color: var(--orange); border-color: rgba(255, 138, 61, 0.45); }
.hud__sound[aria-pressed="true"] .wave { display: block; }
.hud__sound[aria-pressed="true"] .mute { display: none; }

.map { position: fixed; z-index: 20; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); }
.map ol { display: flex; gap: 2px; padding: 6px; list-style: none; border-radius: 99px; background: rgba(13, 11, 20, 0.72); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.map a { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 99px; font-size: 0.8rem; font-weight: 650; color: var(--muted); transition: background 0.3s, color 0.3s; }
.map i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); transition: background 0.3s, box-shadow 0.3s; }
.map span { display: none; }
.map a.is-here { color: var(--paper); background: rgba(255, 255, 255, 0.08); }
.map a.is-here i { background: var(--orange); box-shadow: 0 0 10px 2px rgba(255, 138, 61, 0.6); }
.map a.is-here span { display: inline; }
@media (min-width: 900px) {
  .hud { padding: 18px 28px; }
  .hud__mark { width: 38px; } .hud__word { width: 80px; }
  .map span { display: inline; }
  .map { top: 16px; bottom: auto; }
  .map a { padding: 0 14px; }
}

/* ---------- Rooms ---------- */
.room { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: var(--paper); background: #0d0b14; overflow: hidden; }
.room[open] { display: grid; grid-template-rows: auto 1fr auto; animation: roomin 0.6s var(--ease); }
.room::backdrop { background: rgba(5, 4, 10, 0.7); }
@keyframes roomin { from { opacity: 0; transform: scale(1.04); } }
.room__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: calc(12px + env(safe-area-inset-top)) 16px 10px; position: relative; z-index: 3; }
.room__k { font: 700 0.72rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent, var(--orange)); }
.room__t { margin-top: 6px; font: 800 clamp(1.4rem, 5.6vw, 2.1rem)/1 var(--display); letter-spacing: -0.03em; }
.room__close { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); cursor: pointer; transition: transform 0.3s var(--spring), background 0.3s; }
.room__close svg { width: 22px; height: 22px; }
.room__close:hover { transform: rotate(90deg); background: rgba(255, 255, 255, 0.12); }
.room__stage { position: relative; min-height: 0; overflow: hidden; }
.room__loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.room__info { position: relative; z-index: 3; display: grid; gap: 12px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.room__tip { font-size: 0.92rem; color: var(--muted); }
.room__tip kbd { padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); font: 600 0.8rem var(--body); }
.room__more { display: none; color: var(--muted); font-size: 0.95rem; }
.room__fine { font-size: 0.8rem; color: rgba(247, 239, 229, 0.5); }
@media (min-width: 900px) {
  .room[open] { grid-template-columns: 1fr 380px; grid-template-rows: auto 1fr; }
  .room__bar { grid-column: 1 / -1; padding: 20px 28px 8px; }
  .room__info { align-content: end; padding: 24px 28px 32px; border-left: 1px solid var(--line); background: rgba(0, 0, 0, 0.18); }
  .room__more { display: block; }
}

.room--inn { --accent: #ffc57a; background: radial-gradient(80% 70% at 40% 60%, #3a1d14, #140a0a 70%); }
.room--diner { --accent: #ff7d8c; background: radial-gradient(80% 70% at 40% 55%, #4a1220, #12080d 70%); }
.room--theater { --accent: #e8c46a; background: radial-gradient(80% 70% at 50% 50%, #2a0f22, #0b0509 70%); }
.room--arcade { --accent: #6ff0c6; background: radial-gradient(80% 70% at 50% 50%, #141a3a, #07081a 70%); }
.room--hq { --accent: var(--orange); background: radial-gradient(90% 80% at 50% 40%, #3a2010, #120c0a 70%); }

/* the big door */
.door-cta { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border-radius: 20px; color: #2a1406; background: linear-gradient(180deg, #ffc896, var(--orange) 60%, #dd5f1a); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 18px 40px -12px rgba(255, 138, 61, 0.75); transition: transform 0.35s var(--spring), box-shadow 0.35s; }
.door-cta:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 26px 60px -12px rgba(255, 138, 61, 0.95); }
.door-cta__frame { position: relative; flex: none; width: 44px; height: 58px; border-radius: 22px 22px 4px 4px; background: #2a1406; overflow: hidden; }
.door-cta__light { position: absolute; inset: 4px 4px 0; border-radius: 18px 18px 0 0; background: linear-gradient(180deg, #fff3d6, #ffd08a); transform-origin: left; transform: perspective(120px) rotateY(-55deg); transition: transform 0.6s var(--ease); }
.door-cta:hover .door-cta__light { transform: perspective(120px) rotateY(-80deg); }
.door-cta__txt { display: grid; gap: 3px; min-width: 0; }
.door-cta__txt small { font: 700 0.72rem/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; }
.door-cta__txt strong { font: 800 1.15rem/1.1 var(--display); letter-spacing: -0.02em; }
.door-cta > svg { width: 22px; height: 22px; margin-left: auto; flex: none; }
.door-cta--quiet { color: var(--paper); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); box-shadow: none; }
.door-cta--quiet .door-cta__frame { background: rgba(0, 0, 0, 0.5); }
.door-cta--quiet .door-cta__light { background: linear-gradient(180deg, #c9b8ff, #6c5ad9); }
.door-cta--quiet:hover { box-shadow: 0 18px 40px -14px rgba(120, 100, 255, 0.5); }
.door-cta.is-ready { animation: ready 1.6s var(--ease) 2; }
@keyframes ready { 50% { transform: scale(1.03); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 0 0 6px rgba(255, 138, 61, 0.3), 0 26px 60px -12px rgba(255, 138, 61, 0.95); } }

/* ---------- Lite + reduced motion ---------- */
.lite .rain, .lite .fog { display: none; }
.lite .fireflies { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .rain, .fireflies { display: none; }
}

/* room side art */
.room__art { display: none; width: 100%; border-radius: 16px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line); }
.ticket, .hiscore { display: none; }
@media (min-width: 900px) {
  .room__art { display: block; }
  .ticket { display: grid; gap: 6px; justify-items: center; padding: 22px 18px; border-radius: 12px; background: linear-gradient(#f3e2c0, #e6cc98); color: #3a1020; text-align: center; transform: rotate(-3deg); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6); }
  .ticket span { font: 700 0.7rem/1 var(--body); letter-spacing: 0.3em; text-transform: uppercase; color: #a3213f; }
  .ticket b { font: 800 1.6rem/1 var(--display); letter-spacing: -0.02em; }
  .ticket small { font: 600 0.8rem/1 var(--body); opacity: 0.7; border-top: 2px dashed rgba(58, 16, 32, 0.3); padding-top: 8px; }
  .hiscore { display: grid; gap: 8px; padding: 18px; border-radius: 14px; background: #05060f; border: 2px solid #262c52; font: 700 0.9rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace; color: #b6a9ff; letter-spacing: 0.08em; }
  .hiscore b { color: #6ff0c6; letter-spacing: 0.3em; margin-bottom: 4px; }
  .hiscore i { font-style: normal; color: #ff6b9b; margin: 0 8px; }
  .room--hq[open] { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .room--hq .room__info { border-left: 0; background: none; padding-top: 0; }
}

/* ---------- 404 ---------- */
.lost-page { background: linear-gradient(180deg, #05040f, #1b1236 60%, #3d1d3e); min-height: 100vh; }
.lost { min-height: 100svh; display: grid; place-items: center; padding: 80px 16px; text-align: center; }
.lost__mark { width: 110px; margin: 0 auto 26px; fill: var(--orange); filter: drop-shadow(0 0 30px rgba(255, 138, 61, 0.5)); animation: lostflick 4s infinite; }
.lost__fold { transform-box: fill-box; transform-origin: 50% 0; animation: lostswing 3s ease-in-out infinite; }
@keyframes lostflick { 0%, 46%, 100% { opacity: 1; } 48% { opacity: 0.3; } 50% { opacity: 1; } 53% { opacity: 0.55; } 56% { opacity: 1; } }
@keyframes lostswing { 50% { transform: rotate(-7deg); } }
.lost h1 { font: 800 clamp(2.4rem, 11vw, 4.8rem)/0.95 var(--display); letter-spacing: -0.04em; }
.lost p { max-width: 28rem; margin: 16px auto 0; color: var(--muted); }
.lost__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.map a { white-space: nowrap; }
