:root {
  --bg: #f9fafb; --card: #ffffff; --text: #111827; --muted: #6b7280; --line: #e5e7eb;
  --brand: #009bff; --brand-strong: #0078c8; --brand-text: #ffffff; --brand-soft: #e6f4ff; --accent: #ff7d00;
  --ok: #0a7a43; --ok-bg: #e7f6ee; --bad: #b3261e; --bad-bg: #fdecea; --warn-bg: #fff4d6;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e141b; --card: #17202b; --text: #eef2f7; --muted: #a3afbf; --line: #2c3a4a;
    --brand: #4db3ff; --brand-strong: #4db3ff; --brand-text: #06121d; --brand-soft: #12304a;
    --ok: #62d49a; --ok-bg: #11301f; --bad: #ff8a80; --bad-bg: #3a1714; --warn-bg: #3a3012;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Inter", "Segoe UI", system-ui, -apple-system, Tahoma, Geneva, Verdana, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 1.1rem; margin: 24px 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--brand-strong); }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 560px) { .grid { grid-template-columns: 1fr 1fr; } }
.offer { background: var(--brand-soft); border: 1px solid transparent; border-left: 4px solid var(--accent); }
.offer .price { font-size: 1.25rem; font-weight: 650; }
.field { margin: 0 0 14px; }
label, legend { display: block; font-weight: 600; margin: 0 0 4px; }
.hint { color: var(--muted); font-size: .9rem; font-weight: 400; }
input, select { width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, .slot input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
input[aria-invalid="true"] { border-color: var(--bad); }
.code { font-size: 1.75rem; letter-spacing: .5rem; text-align: center; }
.error-text { color: var(--bad); font-size: .9rem; margin: 4px 0 0; }
button { min-height: 48px; padding: 10px 18px; font: inherit; font-weight: 650; border-radius: 10px; border: 1px solid transparent; cursor: pointer; }
button.primary { width: 100%; background: var(--brand-strong); color: var(--brand-text); }
button.link { background: none; border: 0; color: var(--brand); min-height: 40px; padding: 8px 4px; text-decoration: underline; font-weight: 500; }
button.secondary { background: var(--card); color: var(--text); border-color: var(--line); }
button[disabled] { opacity: .55; cursor: not-allowed; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.notice { padding: 12px 14px; border-radius: 10px; margin: 12px 0; background: var(--warn-bg); }
.notice.error { background: var(--bad-bg); color: var(--bad); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
details { margin: 8px 0 16px; }
summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.slots { display: grid; gap: 8px; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.slot span { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.slot input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.slot small { display: block; color: var(--muted); }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; }
.spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
