/* ONARU City · glass UI layer. Loaded after game.css, so it only restyles; no markup depends on it.
   Look: frosted graphite glass, soft inner light, brass-gold accents, deep 3D shadows (see the dashboard / showroom boards). */
:root {
  --glass: linear-gradient(155deg, rgba(34, 40, 52, 0.58), rgba(14, 18, 28, 0.62));
  --glass-solid: rgba(18, 22, 32, 0.62);
  --glass-line: rgba(255, 255, 255, 0.16);
  --glass-hi: rgba(255, 255, 255, 0.34);
  --line: rgba(255, 255, 255, 0.16);
  --gold: #d9a94a; --gold-2: #f0cf86; --cream: #f4f1ea; --accent: #ff8a3d;
  --shadow-3d: 0 30px 70px -18px rgba(0, 0, 0, 0.75), 0 8px 22px rgba(0, 0, 0, 0.45), inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI Variable Display", "SF Pro Display", "Avenir Next", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "tnum" 1, "ss01" 1;
}
body { letter-spacing: 0.005em; -webkit-font-smoothing: antialiased; }

/* Panels */
.overlay { background: radial-gradient(ellipse at 50% 30%, rgba(10, 14, 24, 0.35), rgba(4, 6, 12, 0.78)); backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25); perspective: 1400px; }
.panel { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 28px; box-shadow: var(--shadow-3d); backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5); transform-origin: 50% 100%; animation: panel-in 0.55s cubic-bezier(0.2, 0.9, 0.25, 1) both; position: relative; overflow: auto; }
.panel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 32%, transparent 70%, rgba(255, 138, 61, 0.08)); }
@keyframes panel-in { from { opacity: 0; transform: translateY(26px) rotateX(9deg) scale(0.96); } to { opacity: 1; transform: none; } }

/* Type */
h2, h2.big { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: clamp(18px, 3.6vw, 26px); }
h2.big { font-size: clamp(26px, 6vw, 44px); background: linear-gradient(180deg, #fff 20%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 6px 30px rgba(240, 207, 134, 0.25); }
.brandmark { color: var(--gold-2); letter-spacing: 0.6em; font-size: 11px; font-weight: 600; }
.fine { color: rgba(244, 241, 234, 0.62); font-size: 12.5px; letter-spacing: 0.02em; }

/* Buttons: raised glass keys */
.btn { border-radius: 16px; min-height: 50px; padding: 10px 22px; font-weight: 600; letter-spacing: 0.03em; color: var(--cream); background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)); border: 1px solid var(--glass-line); box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 var(--glass-hi), inset 0 -2px 0 rgba(0, 0, 0, 0.25); transition: transform 0.14s, box-shadow 0.14s, background 0.2s; }
.btn:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.07)); transform: translateY(-2px); box-shadow: 0 16px 28px -10px rgba(0, 0, 0, 0.8), inset 0 1px 0 var(--glass-hi), inset 0 -2px 0 rgba(0, 0, 0, 0.25); }
.btn:active { transform: translateY(1px) scale(0.985); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.7), inset 0 2px 4px rgba(0, 0, 0, 0.35); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn.primary, .btn.gold { background: linear-gradient(180deg, #ffb35c, #ff7a2a 55%, #e0631a); color: #1c0f05; border-color: rgba(255, 220, 170, 0.6); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25); box-shadow: 0 14px 30px -10px rgba(255, 122, 42, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 0 rgba(150, 60, 0, 0.45); }
.btn.ghost { background: rgba(255, 255, 255, 0.04); }
.btn.danger { color: #ffb4a8; }

/* Cards, jobs, rows */
.card.choice, .job, .st-row { background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)); border: 1px solid var(--glass-line); border-radius: 18px; box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 24px -14px #000; }
.card.choice:hover { background: linear-gradient(160deg, rgba(255, 138, 61, 0.22), rgba(255, 255, 255, 0.05)); transform: translateY(-3px) rotateX(3deg); }
.job.active { border-color: var(--accent); background: linear-gradient(160deg, rgba(255, 138, 61, 0.2), rgba(255, 255, 255, 0.04)); }

/* HUD */
.chip, #objective, #timer, #arrow, .toast, #prompt, .st-card { background: var(--glass-solid); border: 1px solid var(--glass-line); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: inset 0 1px 0 var(--glass-hi), 0 12px 28px -14px #000; }
#objective { border-left: 3px solid var(--accent); border-radius: 16px; }
#prompt { color: #fff; border-color: rgba(255, 138, 61, 0.7); border-radius: 18px; letter-spacing: 0.04em; }
#minimap { border: 2px solid rgba(255, 255, 255, 0.4); box-shadow: 0 14px 34px -8px #000, inset 0 0 18px rgba(0, 0, 0, 0.5); }
.tbtn { background: var(--glass-solid); border-color: var(--glass-line); color: #fff; box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 20px -8px #000; }
.tbtn.big { background: linear-gradient(180deg, #ffb35c, #ff7a2a); color: #1c0f05; }
#touch .stick { background: rgba(20, 24, 34, 0.4); backdrop-filter: blur(10px); border-color: var(--glass-line); }
#touch .knob { background: radial-gradient(circle at 35% 30%, #fff, #bfc6d4 60%, #8b93a3); }
.st-card { border-radius: 18px; } .st-card h4, .st-who { color: var(--accent); }

/* Pause: a dashboard of glass tiles, with a live status rail. Two layouts (Dashboard / Showcase) share this base. */
.overlay[aria-label="pause"] .panel { width: min(980px, 100%); text-align: left; grid-template-columns: 1fr; padding: 28px clamp(18px, 4vw, 40px); }
.overlay[aria-label="pause"] .stack { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.overlay[aria-label="pause"] .stack .btn { min-height: 76px; justify-content: flex-start; text-align: left; border-radius: 20px; font-size: 14px; }
.overlay[aria-label="pause"] .stack .btn.primary { grid-column: 1 / -1; min-height: 62px; justify-content: center; font-size: 17px; letter-spacing: 0.1em; text-transform: uppercase; }
.overlay[aria-label="pause"] h2 { font-size: clamp(30px, 6vw, 54px); letter-spacing: 0.14em; background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.45)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pause-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.view-switch { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--glass-line); }
.view-switch button { border: 0; background: transparent; color: var(--cream); padding: 8px 16px; border-radius: 999px; font-weight: 600; letter-spacing: 0.06em; cursor: pointer; }
.view-switch button[aria-pressed="true"] { background: linear-gradient(180deg, #ffb35c, #ff7a2a); color: #1c0f05; }
.show-stage { position: relative; border-radius: 22px; overflow: hidden; min-height: 280px; border: 1px solid var(--glass-line); box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35); }
.show-stage.light { background: radial-gradient(ellipse at 50% 70%, #f4f6f8, #b9c0ca 80%); color: #1a2030; }
.show-stage.dark { background: radial-gradient(ellipse at 50% 60%, #4a505c, #14171e 85%); }
.show-stage canvas { width: 100%; height: 100%; display: block; position: absolute; inset: 0; }
.show-meta { position: absolute; left: 18px; bottom: 14px; right: 18px; display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; pointer-events: none; }
.show-meta .big { font: 800 clamp(28px, 6vw, 54px)/1 "Segoe UI Variable Display", system-ui; letter-spacing: 0.02em; }
.show-meta .stat { display: grid; gap: 2px; font-size: 12px; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.12em; } .show-meta .stat b { font-size: 20px; letter-spacing: 0; }

/* Title / intro */
#loading { background: radial-gradient(circle at 50% 40%, #2a2f3a, #07090e); }
@media (prefers-reduced-motion: reduce) { .panel { animation: none; } .btn { transition: none; } }

/* Live character stage (creator + appearance) */
.char-stage-wrap { display: grid; gap: 10px; }
.char-stage { position: relative; height: min(36vh, 320px); min-height: 220px; border-radius: 22px; overflow: hidden; border: 1px solid var(--glass-line); background: radial-gradient(ellipse at 50% 70%, #4a505c, #14171e 85%); box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35); }
.char-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.char-stage.hidden-stage { display: none; }
.char-stage-wrap.no-gl .char-stage { display: none; }
.creator { display: grid; gap: 18px; grid-template-columns: minmax(220px, 0.9fr) 1.1fr; align-items: start; }
@media (max-width: 720px) { .creator { grid-template-columns: 1fr; } .char-stage { height: 280px; } }

.mini-portrait { width: 96px; height: 120px; flex: none; }
.char-stage.mini { height: 120px; min-height: 0; border-radius: 18px; }

/* Themes: Ember (default orange/charcoal), Glass (monochrome), Neon (cyan/violet online look) */
:root[data-theme="glass"] { --accent: #dfe6f0; --gold: #c9d2de; --gold-2: #f2f5f9; }
:root[data-theme="glass"] .btn.primary, :root[data-theme="glass"] .btn.gold, :root[data-theme="glass"] .view-switch button[aria-pressed="true"] { background: linear-gradient(180deg, #f4f7fb, #aab4c3); color: #10141b; box-shadow: 0 14px 30px -10px rgba(200, 215, 235, 0.45), inset 0 1px 0 #fff; }
:root[data-theme="neon"] { --accent: #4fe3ff; --gold: #8a7bff; --gold-2: #b9b0ff; }
:root[data-theme="neon"] .btn.primary, :root[data-theme="neon"] .btn.gold, :root[data-theme="neon"] .view-switch button[aria-pressed="true"] { background: linear-gradient(180deg, #7df0ff, #4a7dff 60%, #7a4dff); color: #06101c; box-shadow: 0 14px 30px -10px rgba(90, 140, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
:root[data-theme="neon"] .panel::before { background: linear-gradient(120deg, rgba(120, 220, 255, 0.16), transparent 32%, transparent 70%, rgba(138, 123, 255, 0.12)); }
.btn[aria-pressed="true"]:not(.primary) { border-color: var(--accent); }
