/*
VOICE: Chapter 2 Roleplay - confident, short, punchy; chrome and orange on black
IDEA: a lit display case; the chain on the body is the hero, controls sit in the dark around it
PICTURE: the live 3D preview, as big as the screen allows
COLOUR and TYPE: near-black, Chapter 2 orange accent (from the logo), soft white text; Outfit for everything
LAYOUT: left rail of controls, preview fills the rest; stacks on narrow screens
*/
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0b0b0d; --panel: #131317; --panel2: #1a1a20; --line: #26262e; --line2: #34343e;
  --ink: #f2efe8; --muted: #9a978f; --gold: #ff7a1a; --gold2: #ffb066; --gold3: #c4560c;
  --bad: #ff6b6b; --good: #5fd39a; --r: 12px;
  --grad: linear-gradient(135deg, #ffc08a 0%, #ff7a1a 45%, #d4500a 100%);
}
* { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 Outfit, system-ui, -apple-system, Segoe UI, sans-serif; overflow-x: clip; }
a { color: var(--gold2); }
h1, h2, h3 { line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
.gold { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

button, .btn {
  font: 600 14px/1 Outfit, system-ui, sans-serif; color: var(--ink); background: var(--panel2);
  border: 1px solid var(--line2); border-radius: 10px; padding: 0 16px; min-height: 40px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  transition: border-color .15s, background .15s, transform .05s;
}
button:hover, .btn:hover { border-color: var(--gold3); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--grad); color: #1b0c03; border: 0; }
.primary:hover { filter: brightness(1.06); }
.danger { color: var(--bad); }
.ghost { background: transparent; }
:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }

input, select, textarea {
  font: 16px/1.3 Outfit, system-ui, sans-serif; color: var(--ink); background: #0e0e12;
  border: 1px solid var(--line2); border-radius: 9px; padding: 9px 11px; width: 100%; min-height: 40px;
}
input[type=range] { padding: 0; min-height: 28px; accent-color: var(--gold); background: none; border: 0; }
input[type=color] { padding: 3px; height: 40px; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--gold); }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid var(--line2); white-space: nowrap; }
.pill.ok { color: var(--good); border-color: #2c5a43; }
.pill.bad { color: var(--bad); border-color: #5c2f2f; }
.pill.warn { color: var(--gold2); border-color: #6a3a18; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1d1d23; border: 1px solid var(--line2); padding: 12px 18px; border-radius: 10px; z-index: 99; max-width: min(92vw, 520px); box-shadow: 0 10px 40px #000a; }
.toast.err { border-color: #6b3030; color: #ffc9c9; }
dialog { background: var(--panel); color: var(--ink); border: 1px solid var(--line2); border-radius: 14px; padding: 22px; width: min(520px, 94vw); }
dialog::backdrop { background: #000b; }
code, .mono { font-family: ui-monospace, Consolas, monospace; }
code { overflow-wrap: anywhere; }

/* key gate (builder + app) */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(900px 500px at 50% 0%, #2a160b 0%, transparent 70%), var(--bg); }
.gate .card { width: min(440px, 100%); padding: 28px; text-align: center; }
.brandlogo { display: block; height: 120px; width: auto; margin: 0 auto 4px; filter: drop-shadow(0 8px 24px #ff7a1a33); }
.gate h1 { font-size: 34px; margin: 10px 0 6px; }
.gate input { text-align: center; font: 600 18px ui-monospace, Consolas, monospace; letter-spacing: .04em; margin: 18px 0 12px; }


@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
