:root {
  --bg: #0b0812;
  --card: #161021;
  --line: #2e2440;
  --text: #f3eefa;
  --muted: #a99bbd;
  --accent: #ff7a1a;
  --accent2: #b45cff;
  --bad: #ff5d6c;
  --good: #46d47a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
body { background: radial-gradient(120% 60% at 50% 0%, #2a1240 0%, var(--bg) 60%) fixed; min-height: 100vh; }
main { max-width: 520px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); }
header { text-align: center; margin: 6px 0 14px; }
h1 { font-size: 34px; line-height: 1.05; margin: 0; letter-spacing: .01em; text-shadow: 0 0 18px #ff7a1a88; }
h1 span { color: var(--accent); display: block; }
h2 { font-size: 26px; margin: 18px 0 4px; text-align: center; }
.sub { color: var(--muted); margin: 6px 0 0; text-align: center; }
canvas { width: 100%; aspect-ratio: 47 / 26; display: block; background: #000; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 10px 40px #0008; }
.lbl { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin: 20px 2px 8px; }
.hint { color: var(--muted); font-size: 14px; margin: -2px 2px 8px; }
input { width: 100%; font: 700 24px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .06em; color: var(--text); background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 14px; text-transform: uppercase; }
input:focus { outline: none; border-color: var(--accent); }
#code { text-align: center; letter-spacing: .5em; font-size: 30px; padding: 12px 12px 12px calc(12px + .5em); }
.msgrow { display: flex; gap: 8px; }
#heart { flex: 0 0 60px; font-size: 26px; color: #ff4d7a; background: var(--card); border: 2px solid var(--line); border-radius: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { font: 600 15px system-ui, sans-serif; color: var(--text); background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 9px 14px; }
.chips button.on { border-color: var(--accent); background: #2a1608; }
.swatches button { width: 44px; height: 44px; padding: 0; border-radius: 50%; border-width: 3px; }
.swatches button.on { border-color: #fff; background-clip: padding-box; transform: scale(1.08); }
button { cursor: pointer; }
.go { width: 100%; margin-top: 22px; font: 800 20px system-ui, sans-serif; color: #170800; background: linear-gradient(180deg, #ffa24d, var(--accent)); border: 0; border-radius: 16px; padding: 16px; box-shadow: 0 6px 24px #ff7a1a55; }
.go:disabled { opacity: .5; box-shadow: none; }
.go.ghost { color: var(--text); background: var(--card); border: 2px solid var(--line); box-shadow: none; }
.err { color: var(--bad); font-size: 15px; min-height: 1.2em; margin: 6px 2px 0; }
.banner { background: #2a1420; border: 1px solid #6a2a40; color: #ffd0d8; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; text-align: center; }
.hidden { display: none !important; }
footer { color: var(--muted); font-size: 13px; text-align: center; margin-top: 26px; }
#ticket h2.good { color: var(--good); }
#ticket h2.glow { color: var(--accent); text-shadow: 0 0 16px #ff7a1a; }
.pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pic { display: flex; flex-direction: column; gap: 4px; padding: 4px 4px 6px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; color: var(--text); font: 600 12px/1.2 system-ui, sans-serif; min-width: 0; }
.pic canvas { width: 100%; border-radius: 8px; box-shadow: none; }
.pic span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pic.none { justify-content: center; align-items: center; font-size: 14px; min-height: 70px; }
.pic.on { border-color: var(--accent); background: #2a1608; }
input.name { text-transform: none; font: 600 20px/1.2 system-ui, sans-serif; letter-spacing: 0; }
