:root {
  color-scheme: dark;
  --bg: #111019;
  --panel: #1b1925;
  --border: #34303e;
  --text: #f7f3ff;
  --muted: #beb5cc;
  --accent: #d7f284;
  --lavender: #c9b5ff;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(100%, 530px); margin: 0 auto; padding: 0 24px calc(110px + env(safe-area-inset-bottom)); }
.masthead { display: flex; align-items: center; justify-content: space-between; padding: 22px 0 17px; border-bottom: 1px solid var(--border); }
.brand { font-size: 30px; letter-spacing: -.08em; font-weight: 800; line-height: 1; }
.brand span { color: var(--accent); }
.icon-button { display: grid; place-items: center; border: 1px solid var(--border); border-radius: 12px; width: 40px; height: 40px; color: var(--text); background: var(--panel); font-size: 22px; }
.intro { margin: 26px 0 20px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(26px, 6vw, 36px); letter-spacing: -.045em; line-height: 1.12; }
h2 { font-size: 18px; letter-spacing: -.025em; }
p { line-height: 1.45; }
.intro p, .muted, .row small { color: var(--muted); font-size: 14px; }
.intro p { margin-top: 7px; }
.hero { position: relative; overflow: hidden; min-height: 207px; border: 1px solid #655289; border-radius: 25px; padding: 22px; background: linear-gradient(140deg, #332545, #282137 62%, #42305a); }
.hero::after { content: ""; position: absolute; width: 190px; height: 190px; border: 1px solid #b5a0e73b; border-radius: 38%; right: -74px; top: -55px; transform: rotate(38deg); box-shadow: 0 0 0 17px #b5a0e71a, 0 0 0 34px #b5a0e716, 0 0 0 51px #b5a0e712; pointer-events: none; }
.status { display: inline-flex; gap: 7px; align-items: center; color: var(--accent); font-size: 13px; font-weight: 600; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.inactive { color: #ffc0ba; }
.hero h2 { margin: 11px 0 4px; font-size: 27px; }
.hero .button { margin-top: 18px; position: relative; z-index: 1; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 9px 17px; border: 1px solid transparent; border-radius: 12px; background: var(--accent); color: #222613; font-weight: 700; }
.button.secondary { border-color: var(--border); color: var(--text); background: #272333; }
.button.subtle { background: transparent; color: var(--lavender); border-color: var(--border); }
.button:disabled { opacity: .6; cursor: default; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 13px 0 22px; }
.tile, .card, .notice { border: 1px solid var(--border); background: var(--panel); border-radius: 17px; }
.tile { padding: 13px 15px; }
.tile span { color: var(--muted); display: block; font-size: 13px; margin-bottom: 6px; }
.tile strong { font-size: 19px; font-weight: 650; }
.section-title { margin: 22px 0 10px; }
.card { padding: 0 14px; }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 0; min-height: 64px; }
.row + .row { border-top: 1px solid var(--border); }
.row .labels { flex: 1; min-width: 0; }
.row strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.row small { display: block; margin-top: 4px; }
.row .button { min-height: 38px; padding: 6px 10px; font-size: 13px; }
.mark { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px; background: #362d48; color: var(--lavender); font-size: 17px; }
.notice { padding: 14px; margin-top: 15px; color: var(--muted); font-size: 14px; }
.notice.alert { background: #30243a; border-color: #68517b; color: #f0d9fc; }
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 2; width: min(100%, 530px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #191722; border: 1px solid var(--border); border-radius: 18px 18px 0 0; }
.nav a { font-size: clamp(9px, 2.4vw, 12px); padding: 8px 0; text-align: center; border-radius: 11px; color: var(--muted); }
.nav span { display: block; font-size: 20px; line-height: 1; margin-bottom: 6px; }
.nav a[aria-current="page"] { color: var(--accent); background: #2e2f24; }
.empty { padding: 20px 0; }
.stack { display: grid; gap: 12px; margin-top: 17px; }
.toggle { appearance: none; flex: 0 0 43px; width: 43px; height: 25px; padding: 3px; margin: 0; border: 0; border-radius: 20px; cursor: pointer; background: #4a4355; }
.toggle::before { content: ""; display: block; width: 19px; height: 19px; border-radius: 50%; background: var(--text); }
.toggle:checked { background: var(--accent); }
.toggle:checked::before { transform: translateX(18px); background: #262a17; }
#feedback { position: fixed; z-index: 3; bottom: calc(86px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: 90vw; background: var(--accent); color: #222613; padding: 10px 14px; border-radius: 12px; font-weight: 600; }
dialog { width: min(calc(100% - 32px), 435px); padding: 22px; border: 1px solid var(--border); border-radius: 19px; background: var(--panel); color: var(--text); }
dialog::backdrop { background: #0c0a13c7; }
dialog p { color: var(--muted); margin: 10px 0; }
dialog input { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
@media (max-width: 380px) { .shell { padding-inline: 16px; } .hero { padding: 18px; } .nav { padding-inline: 5px; } }
.ticket-form { padding: 15px; }
.ticket-form label { display: grid; gap: 7px; color: var(--muted); font-size: 14px; }
.ticket-form select, .ticket-form textarea { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.ticket-form textarea { min-height: 100px; resize: vertical; }
