@font-face { font-family: "Oswald"; src: url("../fonts/oswald-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-bold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --bg: #0f1012;
  --bg-2: #131417;
  --panel: #17181b;
  --panel-2: #1d1f23;
  --panel-3: #26282d;
  --line: rgba(248, 246, 241, 0.08);
  --line-2: rgba(248, 246, 241, 0.14);
  --ink: #f8f6f1;
  --muted: #b9b5ad;
  --dim: #8a867f;
  --accent: #c4654a;
  --accent-2: #e2906f;
  --accent-ink: #1c0d07;
  --radius: 16px;
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Oswald", Impact, "Arial Narrow", sans-serif;
  --ease: cubic-bezier(0.3, 0, 0, 1);
  --exploration-footer-bg: #0f1012;
  --exploration-footer-ink: #b9b5ad;
  --exploration-footer-border: rgba(248, 246, 241, 0.08);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.modal-open { overflow: hidden; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 1rem/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd { font: 600 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 5px; border-radius: 5px; background: var(--panel-3); border: 1px solid var(--line-2); margin-right: 4px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Header */
.top { display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 10px clamp(12px, 2vw, 28px); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 0.875rem; padding: 8px 10px 8px 6px; border-radius: 10px; white-space: nowrap; }
.back svg { width: 16px; height: 16px; }
.back:hover { color: var(--ink); background: var(--panel-2); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { height: 22px; width: auto; }
.brand-sep { width: 1px; height: 18px; background: var(--line-2); }
.brand-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Buttons */
.ghost, .create-yours {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 10px;
  text-decoration: none; font-weight: 600; font-size: 0.875rem; white-space: nowrap;
}
.ghost { color: var(--ink); border: 1px solid var(--line-2); background: var(--panel-2); }
.ghost svg { width: 15px; height: 15px; }
.ghost:hover { border-color: rgba(248, 246, 241, 0.3); }
.create-yours { color: var(--ink); background: rgba(248, 246, 241, 0.1); border: 1px solid rgba(248, 246, 241, 0.22); }
.create-yours:hover { background: rgba(248, 246, 241, 0.16); }

.go {
  border: 0; border-radius: 14px; color: var(--accent-ink); font-weight: 700;
  background: linear-gradient(160deg, #eda083 0%, var(--accent-2) 35%, var(--accent) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 10px 30px -12px rgba(196, 101, 74, 0.8);
  transition: transform 0.15s var(--ease), filter 0.15s;
}
.go:hover { filter: brightness(1.06); }
.go:active { transform: translateY(1px); }
.go.is-done { background: linear-gradient(160deg, #f3efe7, #d9d3c8); }
.go-small { min-height: 40px; padding: 0 18px; font-size: 0.9rem; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 60; transform: translate(-50%, 20px);
  max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: 0.9rem; line-height: 1.35; text-align: center; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Prompt fallback sheet */
.sheet { border: 1px solid var(--line-2); border-radius: 18px; background: var(--panel); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 24px)); }
.sheet::backdrop { background: rgba(6, 6, 8, 0.7); }
.sheet-in { padding: 20px; display: grid; gap: 14px; }
.sheet h2 { margin: 0; font-size: 1.05rem; }
.sheet textarea { width: 100%; resize: vertical; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); padding: 12px; font-size: 0.9rem; line-height: 1.5; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Footer (the shared runtime mounts its navigation here) */
.exploration-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 10px clamp(12px, 2vw, 28px);
  border-top: 1px solid var(--exploration-footer-border); background: var(--exploration-footer-bg); color: var(--exploration-footer-ink); font-size: 0.8rem;
}
.exploration-bar a { color: var(--ink); text-decoration: none; }
.exploration-bar a:hover { text-decoration: underline; }
.exploration-credit, .exploration-bar nav { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.exploration-credit strong { color: var(--ink); }

@media (max-width: 40rem) {
  .top { gap: 8px; min-height: 56px; }
  .back span, .brand-sep, .brand-name, .ghost span { display: none; }
  .back { padding: 8px; }
  .ghost { width: 38px; padding: 0; }
  .exploration-bar { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 23.75rem) {
  .brand-logo { height: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
