:root {
  --bg: #0f1117;
  --card: #1a1d27;
  --line: #2a2e3a;
  --field: #11131a;
  --text: #e8e9ee;
  --muted: #9aa0b0;
  --accent: #6c7bff;
  --accent2: #2a2e3a;
  --good: #3ecf8e;
  --bad: #ff6b6b;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
#app { max-width: 420px; margin: 0 auto; min-height: 100vh; padding: 16px; display: flex; flex-direction: column; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.phrase { font-size: 20px; line-height: 1.4; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 12px 0; }
.muted { color: var(--muted); font-size: 14px; }
.h { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
input { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); color: var(--text); font-size: 16px; margin: 6px 0; }
button { width: 100%; padding: 13px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; margin-top: 10px; cursor: pointer; }
button.sec { background: var(--accent2); color: var(--text); }
button:disabled { opacity: .4; cursor: not-allowed; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.opt { padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); color: var(--text); font-weight: 500; font-size: 15px; cursor: pointer; text-align: center; }
.opt.sel { border-color: var(--accent); background: rgba(108, 123, 255, .15); }
.style-pill { display: inline-block; background: rgba(108, 123, 255, .18); color: #aeb6ff; border-radius: 8px; padding: 8px 14px; font-weight: 700; font-size: 18px; margin: 8px 0; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent2); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none; }
.right { margin-left: auto; text-align: right; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.brand { font-weight: 700; }
.err { color: var(--bad); font-size: 14px; min-height: 18px; margin-top: 8px; }
.code { font-size: 32px; font-weight: 800; letter-spacing: .1em; text-align: center; margin: 6px 0; }
.hero { text-align: center; padding: 18px 0 2px; }
.masks { font-size: 64px; line-height: 1; display: inline-block; filter: drop-shadow(0 0 22px rgba(108, 123, 255, .55)); }
.top .masks { font-size: 18px; filter: none; vertical-align: -2px; }
.spot { position: relative; text-align: center; padding: 22px 0; }
.spot::before { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 280px; height: 200px; max-width: 90%; background: radial-gradient(ellipse at center, rgba(108, 123, 255, .45), rgba(108, 123, 255, 0) 70%); pointer-events: none; z-index: 0; }
.spot > * { position: relative; z-index: 1; }
.pulse { display: inline-block; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.crown { margin-left: 6px; }
.reveal-title { text-align: center; font-size: 22px; font-weight: 700; margin: 8px 0 12px; }
.confetti { position: fixed; top: -16px; width: 9px; height: 14px; border-radius: 2px; z-index: 60; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(620deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
#spin { animation: spin 1s linear infinite; }
.tiers { display: flex; gap: 8px; margin-top: 6px; }
.tier { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; }
.tier.sel { border-color: var(--accent); background: rgba(108,123,255,.15); color: #aeb6ff; }
.qr-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 50; }
.qr-box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px 20px; text-align: center; max-width: 320px; width: 90%; }
.qr-box img { display: block; margin: 12px auto; border-radius: 10px; background: #fff; padding: 8px; }
.qr-close { margin-top: 14px; background: var(--accent2); color: var(--text); font-size: 14px; padding: 10px; }
.edit-name-btn { width: auto; padding: 4px 9px; font-size: 13px; margin: 0 0 0 auto; margin-top: 0; background: transparent; color: var(--muted); border: 1px solid var(--line); }
