/* Design tokens: Indian-Ocean teal, mango accent, cool paper. System fonts only (pre-auth clients cannot fetch web fonts). */
:root {
  --ink: #10211f; --muted: #4d6360; --paper: #eef4f2; --card: #ffffff; --line: #c9d9d5;
  --teal: #0a5c56; --teal-deep: #07413d; --mango: #ffb81c; --mango-wash: #fff6dc;
  --danger: #b3243d; --ok: #17784a;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--font); }
[hidden] { display: none !important; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: var(--teal); color: #fff; }
.top__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top__mark { color: var(--mango); flex: none; }
.top__name { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top__lang { flex: none; min-height: 40px; padding: 0 14px; border: 2px solid rgba(255,255,255,.5); border-radius: 20px; background: transparent; color: #fff; font: 600 14px var(--font); }

.wrap { max-width: 480px; margin: 0 auto; padding: 20px 16px 8px; }
.panel h2 { margin: 0 0 14px; font-size: 21px; line-height: 1.25; font-weight: 800; }
.panel--center { text-align: center; padding-top: 12px; }
.muted { color: var(--muted); margin: 0; }
.big { margin: 4px 0 20px; font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--teal-deep); }

/* Package tickets */
.tickets { display: grid; gap: 12px; margin-bottom: 22px; }
.ticket { position: relative; display: block; cursor: pointer; }
.ticket input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ticket__body { position: relative; display: flex; align-items: stretch; background: var(--card); border: 2px solid var(--line); border-radius: 14px; min-height: 76px; transition: border-color .12s, background-color .12s; }
.ticket__stub { position: relative; flex: none; width: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 2px dashed var(--line); padding: 8px; }
.ticket__stub::before, .ticket__stub::after { content: ""; position: absolute; right: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); }
.ticket__stub::before { top: -10px; clip-path: inset(50% 0 0 0); }
.ticket__stub::after { bottom: -10px; clip-path: inset(0 0 50% 0); }
.ticket__num { font-size: 34px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--teal-deep); }
.ticket__unit { font-size: 13px; font-weight: 600; color: var(--muted); }
.ticket__main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px 16px; min-width: 0; }
.ticket__price { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ticket__speed { font-size: 14px; color: var(--muted); }
.ticket__tag { position: absolute; top: -10px; right: 12px; padding: 1px 10px; border-radius: 10px; background: var(--mango); color: #4a3200; font-size: 12px; font-weight: 700; }
.ticket.is-selected .ticket__body { border-color: var(--mango); background: var(--mango-wash); box-shadow: 0 0 0 2px var(--mango); }
.ticket.is-selected .ticket__body::after { content: "\2713"; position: absolute; right: 12px; bottom: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 15px; font-weight: 800; line-height: 24px; text-align: center; }
.ticket input:focus-visible ~ .ticket__body { outline: 3px solid var(--teal); outline-offset: 3px; }

/* Form */
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; }
.field input { width: 100%; min-height: 54px; padding: 0 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: 600 19px var(--font); letter-spacing: .02em; }
.field input:focus { outline: 3px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
.field input.is-bad { border-color: var(--danger); }
.hint { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.msg { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.msg--error { background: #fde8ec; color: var(--danger); }

.btn { display: block; width: 100%; min-height: 54px; margin-top: 10px; padding: 0 18px; border-radius: 12px; border: 2px solid transparent; font: 800 18px var(--font); cursor: pointer; }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:disabled { background: #9db8b4; cursor: not-allowed; }
.btn--primary:active:not(:disabled) { background: var(--teal-deep); }
.btn--ghost { background: #fff; color: var(--teal); border-color: var(--teal); }
.btn--link { background: transparent; color: var(--teal); min-height: 48px; font-size: 16px; font-weight: 700; text-decoration: underline; }
.btn:focus-visible, .top__lang:focus-visible { outline: 3px solid var(--mango); outline-offset: 2px; }

/* Status visuals */
.spinner { width: 56px; height: 56px; margin: 8px auto 18px; border-radius: 50%; border: 6px solid var(--line); border-top-color: var(--teal); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.badge-ok { width: 72px; height: 72px; margin: 8px auto 14px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 40px; line-height: 72px; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-top-color: var(--line); border-right-color: var(--teal); } * { transition: none !important; } }

.foot { max-width: 480px; margin: 0 auto; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 14px; }
.foot p { margin: 0; }