:root {
  color-scheme: dark;
  --paper: #0c1620;
  --surface: #111f2b;
  --raised: #1a313e;
  --ink: #eff8fb;
  --muted: #a6bbc5;
  --rule: #29434f;
  --accent: #b9f3ef;
  --accent-hover: #d7fffa;
  --on-accent: #102932;
  font: 16px/1.45 "Segoe UI", "Helvetica Neue", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 65% 0, #162935 0%, transparent 47%); }
button, input, a { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .7; }
a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #8ddee1; outline-offset: 4px; }
main:focus { outline: none; }
h1, h2, p, ol { margin: 0; }
h1 { font-size: clamp(2rem, 8vw, 3.35rem); line-height: 1.02; font-weight: 740; letter-spacing: -.06em; }
h2 { font-size: 1.27rem; line-height: 1.15; letter-spacing: -.025em; }
.lede { color: var(--muted); margin-top: .42rem; }
.shell { max-width: 720px; min-height: 100vh; margin: auto; padding: 0 22px 112px; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; border-bottom: 1px solid var(--rule); }
.brand { display: flex; gap: 11px; align-items: center; font-weight: 760; letter-spacing: -.055em; font-size: 1.28rem; }
.brand-mark { width: 40px; height: 40px; object-fit: cover; border: 1px solid #4c6f7a; border-radius: 12px; }
.chip { background: #172b37; color: var(--accent); border: 1px solid #31505c; border-radius: 20px; padding: 6px 10px; font-size: .71rem; letter-spacing: .035em; font-weight: 650; overflow-wrap: anywhere; }
.page-heading { margin: 27px 0 21px; display: grid; gap: 4px; }
.demo-note { color: var(--muted); margin-top: 12px; font-size: .78rem; }
.ticket, .welcome {
  isolation: isolate; position: relative; overflow: hidden; color: var(--ink);
  background: #102330; border: 1px solid #365461; border-radius: 22px; padding: 20px 21px 18px;
  box-shadow: 0 18px 40px #030a1160, inset 0 1px 0 #95d2d417;
}
.ticket::before, .welcome::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background:
    linear-gradient(90deg, #102330 3%, #102330ed 30%, #10233063 57%, #10233010 100%),
    linear-gradient(0deg, #102330 2%, #10233025 49%, #10233007 100%),
    url('/ice-peak.jpg') right 28% / auto 152% no-repeat;
}
.welcome { display: grid; place-content: end start; gap: 10px; min-height: 405px; margin-top: 28px; padding: 24px; }
.welcome::before {
  background: linear-gradient(0deg, #102330 2%, #102330db 25%, #1023302c 78%),
    url('/ice-peak.jpg') center 18% / min(100%, 450px) auto no-repeat;
}
.welcome p { max-width: 25rem; color: #c5dae3; }
.welcome a { justify-self: start; margin-top: 7px; }
.ticket-top, .ticket-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ticket-top span:first-child { font-size: .88rem; font-weight: 620; }
.badge { border-radius: 20px; padding: 4px 11px; background: var(--accent); color: var(--on-accent); white-space: nowrap; font-size: .75rem; font-weight: 700; }
.badge.inactive { background: #223d49; color: #d5e9ed; border: 1px solid #4e6d77; }
.duration { font-size: clamp(2.05rem, 9vw, 3.7rem); line-height: 1.1; letter-spacing: -.07em; font-weight: 740; margin: 22px 0 19px; }
.ticket-bottom { border-top: 1px solid #9dc9d554; padding-top: 14px; color: #d0e4ea; font-size: .83rem; }
.ticket-bottom button { color: var(--accent); padding: 2px 0; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 4px; font-size: .83rem; font-weight: 650; }
.summary { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--rule); margin-bottom: 20px; padding: 17px 0; }
.metric { min-width: 0; display: grid; gap: 1px; padding: 0 14px; }
.metric + .metric { border-left: 1px solid var(--rule); }
.metric span { color: var(--muted); font-size: .81rem; }
.metric strong { font-size: 1.36rem; font-weight: 680; letter-spacing: -.04em; }
.panel, .notice { padding: 18px; border: 1px solid var(--rule); border-radius: 15px; background: var(--surface); }
.panel + .panel { margin-top: 12px; }
.notice { margin-top: 24px; }
.notice p, .panel p { margin-top: 7px; color: var(--muted); }
.connection { display: grid; gap: 13px; }
.connection p { margin-top: 4px; font-size: .87rem; }
.connection .secret-url { display: block; width: 100%; border: 1px solid var(--rule); border-radius: 8px; padding: 9px 10px; color: var(--muted); background: var(--paper); font-size: .8rem; text-overflow: ellipsis; }
.primary, .secondary {
  border: 0; border-radius: 9px; min-height: 43px; padding: 8px 16px;
  font-weight: 660; text-align: center; text-decoration: none;
}
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover { background: var(--accent-hover); }
.secondary { background: var(--raised); border: 1px solid var(--rule); color: var(--ink); }
.secondary:hover { background: #24434e; }
.actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; }
.actions > * { flex: 1 0 auto; }
.notice .actions { margin-top: 14px; }
.inline-note { border-left: 2px solid #83c3c8; margin: 0 0 12px; padding: 6px 10px; background: var(--raised); color: var(--ink); font-size: .88rem; }
.plans-list { display: grid; gap: 11px; }
.plan { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); }
.plan p { margin: 4px 0 0; font-size: .84rem; color: var(--muted); }
.plan h2 { font-size: 1.13rem; }
.plan .primary { white-space: nowrap; }
.subtle { color: var(--muted); font-size: .82rem; margin-top: 12px; }
.history { margin-top: 22px; }
.history h2 { margin-bottom: 8px; }
.history-row { padding: 10px 0; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 7px; justify-content: space-between; }
.history-row > div { display: grid; }
.history-row small { color: var(--muted); }
.device-tabs { display: flex; gap: 6px; margin-bottom: 13px; flex-wrap: wrap; }
.device-tabs button { border: 1px solid var(--rule); background: transparent; border-radius: 20px; padding: 6px 13px; font-size: .85rem; }
.device-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.steps { padding-left: 22px; margin-top: 11px; font-size: .94rem; }
.steps li + li { margin-top: 10px; }
.support { display: grid; gap: 11px; }
.navigation {
  position: fixed; z-index: 2; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 26px), 676px); display: grid; grid-template-columns: repeat(3, 1fr);
  background: #11202c; border: 1px solid var(--rule); border-radius: 15px 15px 0 0;
  box-shadow: 0 -6px 24px #04091070; padding: 5px 5px calc(7px + env(safe-area-inset-bottom, 0px)); gap: 5px;
}
.navigation button { background: none; border: 0; border-radius: 9px; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 7px 3px; font-weight: 640; font-size: .73rem; color: var(--muted); min-height: 50px; }
.navigation button[aria-current="page"] { color: var(--accent); background: #203943; }
.icon { width: 17px; height: 14px; display: block; border: 1.6px solid currentColor; border-radius: 3px; position: relative; }
.icon.home::after, .icon.plans::after { content: ""; position: absolute; left: 2px; right: 2px; top: 4px; border-top: 1.6px solid currentColor; }
.icon.plans { transform: skewX(-8deg); width: 15px; }
.icon.help { border-radius: 50%; width: 15px; height: 15px; }
.icon.help::after { content: "?"; position: absolute; inset: 0; font-size: 9px; line-height: 11px; }
.toast {
  position: fixed; z-index: 3; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); left: 50%;
  transform: translateX(-50%); max-width: min(90vw, 460px); background: var(--accent); color: var(--on-accent);
  padding: 10px 15px; border-radius: 9px; text-align: center; font-size: .86rem;
}
@media (max-width: 400px) {
  .shell { padding-right: 15px; padding-left: 15px; }
  .header { min-height: 63px; }
  .ticket { padding: 17px 16px 15px; }
  .welcome { min-height: 365px; padding: 19px; }
}
@media (min-width: 650px) {
  .header { min-height: 83px; }
  .page-heading { margin-top: 34px; }
  .ticket { padding: 22px 26px; }
  .ticket::before { background-size: auto, auto, auto 172%; }
}
