:root {
  color-scheme: dark;
  --bg: #090b12;
  --panel: #121827;
  --panel-2: #172033;
  --text: #eef4ff;
  --muted: #aab6cc;
  --line: #26344f;
  --accent: #8dd7ff;
  --accent-2: #ff8de4;
  --good: #8dffbe;
  --bad: #ff9d9d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at top left, rgba(141, 215, 255, .16), transparent 34rem), var(--bg); color: var(--text); min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.shell { width: min(1120px, calc(100vw - 32px)); margin: 0 auto; padding: 28px 0 56px; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 28px; }
.brand { font-weight: 800; letter-spacing: .02em; font-size: 1.1rem; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; }
.nav a { color: var(--text); border: 1px solid var(--line); background: rgba(18,24,39,.7); padding: 8px 10px; border-radius: 999px; font-size: .92rem; }
.nav a.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(141,215,255,.12) inset; }
.hero, .card { background: linear-gradient(180deg, rgba(23,32,51,.95), rgba(18,24,39,.95)); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.hero { margin-bottom: 18px; }
h1 { margin: 0 0 8px; font-size: clamp(2rem, 6vw, 4rem); line-height: 1; }
h2 { margin: 0 0 12px; }
p { color: var(--muted); line-height: 1.55; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 16px 0; }
label { display: grid; gap: 6px; color: var(--muted); font-size: .92rem; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #0b1020; color: var(--text); padding: 12px; font: inherit; }
textarea { min-height: 110px; resize: vertical; }
button, .button { border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06101d; padding: 12px 16px; font: inherit; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.output { margin-top: 16px; background: #070a13; border: 1px solid var(--line); border-radius: 18px; padding: 16px; min-height: 72px; overflow-wrap: anywhere; }
.output .big { font-size: clamp(2rem, 10vw, 5rem); font-weight: 900; line-height: 1; color: white; }
.output code, pre { white-space: pre-wrap; word-break: break-word; color: #dff5ff; }
.small { font-size: .85rem; color: var(--muted); }
.badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: rgba(141,215,255,.12); border: 1px solid rgba(141,215,255,.32); color: var(--accent); font-size: .8rem; }
.row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; margin: 10px 0; }
.cards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.playing-card { background: white; color: #07101d; border-radius: 12px; min-width: 58px; padding: 12px 8px; text-align: center; font-weight: 900; box-shadow: 0 8px 18px rgba(0,0,0,.25); }
.red { color: #c2183a; }
.source { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: #0b1020; margin: 10px 0; }
.source.ok { border-color: rgba(141,255,190,.35); }
.source.fail { border-color: rgba(255,157,157,.35); }
.qr-box svg { background: white; border-radius: 16px; padding: 8px; max-width: 320px; width: 100%; height: auto; }
.footer { margin-top: 22px; color: var(--muted); font-size: .85rem; }
@media (max-width: 680px) { .topbar { align-items: flex-start; flex-direction: column; } .row { grid-template-columns: 1fr; } }
