html, body {
  touch-action: pan-x pan-y;
}
input, select, textarea, [contenteditable="true"] {
  /* iOS zooms focused fields when their computed font size is below 16px. */
  font-size: 16px !important;
}
body {
  position: relative;
  isolation: isolate;
  font-family: "Aptos", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
}
.shell {
  --shell-gutter: 24px;
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  max-width: 660px;
  padding-inline: 24px;
}
.star-sky {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  background: #081222;
  --sky-photograph: url('/static/arion-star-sky-v2.webp') center 40% / cover no-repeat;
  --glass-arc-top: ellipse 85% 93% at 96% -33%;
  --glass-arc-bottom: ellipse 82% 113% at -18% 116%;
}
.star-sky::before {
  content: '';
  position: absolute;
  inset: -5px;
  background: var(--sky-photograph);
  filter: brightness(1.2) saturate(.85);
}
.star-sky::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #08101c2e, #08101c0f 42%, #08101c3d);
}
html { scrollbar-gutter: stable; }
/* Blend the diffusion over the sharp sky, below the refracted highlights. */
.star-frost {
  position: absolute;
  inset: 0;
  --frost-blur: 3px;
  opacity: .44;
  background-color: #a5caff09;
  -webkit-backdrop-filter: blur(var(--frost-blur)) saturate(1.16);
  backdrop-filter: blur(var(--frost-blur)) saturate(1.16);
}
.star-glass,
.star-glass::before,
.star-glass::after {
  position: absolute;
  inset: 0;
}
.star-glass::before {
  content: '';
  inset: -5px;
  background: var(--sky-photograph);
  filter: url('/static/glass-refraction.svg#arion-sky-glass') brightness(1.24) saturate(1.03);
  mask-image:
    radial-gradient(var(--glass-arc-top), transparent 66%, #0003 71%, #000e 78%, #000 85%, #0005 93%, transparent 99%),
    radial-gradient(var(--glass-arc-bottom), transparent 63%, #0003 70%, #000d 77%, #000 84%, #0005 91%, transparent 98%);
}
.star-glass::after {
  content: '';
  background:
    radial-gradient(var(--glass-arc-top), transparent 72%, #83b6ff12 77%, #b7d4ff32 82%,
      #d4e7ff53 83%, #a3caff13 84.5%, #325b9a07 90%, transparent 97%),
    radial-gradient(var(--glass-arc-bottom), transparent 72%, #8bbafe19 78%, #bfd9ff3b 83%,
      #689ff735 84%, #416dc619 87%, transparent 97%);
}

@media (min-width: 800px) {
  .star-frost {
    --frost-blur: 4px;
    opacity: .52;
  }
}
[data-theme=dark] .ring-content {
  border-radius: 50%;
  background: radial-gradient(closest-side, #07111fb0, #07111f66 66%, transparent);
}
[data-theme=dark] :is(.brand-block, .subscription-caption, .ring-content, footer, .section-heading) {
  text-shadow: 0 1px 6px #020915ed;
}
[data-theme=dark] .subscription-caption > p { color: #cfddf1; }
[data-theme=dark] .ring-detail { color: #bccce5; }
.topbar {
  padding: 18px 0 13px;
  background: transparent;
  backdrop-filter: none;
  gap: 10px;
}
.topbar::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 calc(-1 * var(--shell-gutter)) -40px;
  pointer-events: none;
  background: var(--bg);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
}
.tabs {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0 0 6px;
  gap: 4px;
}
.tab {
  min-height: 43px;
  border-radius: 10px;
  padding: 8px 5px;
  font-weight: 500;
}
.tab.active {
  background: var(--tint);
  color: var(--text);
  box-shadow: inset 0 -2px var(--accent);
}
.icon-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
}
.brand-block {
  justify-content: flex-start;
  gap: 13px;
  padding: 32px 0 27px;
}
.brand-block img { width: 58px; height: 58px; border-radius: 16px; filter: drop-shadow(0 0 16px #7198e026); }
.brand-block h1 { font-size: 32px; font-weight: 650; letter-spacing: -1.3px; }
.brand-block h1 span { font-size: .65em; letter-spacing: .4px; font-weight: 450; }
.locations-shortcut { color: var(--muted); font-size: 12px; }
.locations-shortcut::after { content: ' ↗'; color: var(--accent); }
.card, .key-card, .user-card, .location-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 32px #0000000a;
}
.balance-card {
  margin-bottom: 24px;
  padding: 18px 20px;
  border-color: var(--line);
  background: linear-gradient(120deg, var(--raised), var(--surface));
}
.balance-card strong { font-size: 28px; font-weight: 600; letter-spacing: -.7px; }
.balance-card span { font-size: 12px; }
.balance-card .secondary { min-height: 40px; padding: 9px 14px; font-size: 13px; border-radius: 12px; }
.subscription-switcher .row { margin-bottom: 12px; }
.subscription-switcher { margin-bottom: 4px; }
.subscription-buttons { gap: 8px; }
.subscription-buttons button { border-radius: 12px; background: var(--surface); padding: 10px 7px; }
.subscription-buttons button[aria-pressed=true] { background: var(--tint); border-color: var(--accent); color: var(--text); }
.subscription-switcher #subscription-rename {
  padding: 6px 10px;
  min-height: 32px;
  font-size: 11px;
  background: transparent;
  color: var(--muted);
}
.ring-wrap { width: 278px; height: 278px; margin: 20px auto 15px; }
.ring-wrap::before {
  content: '';
  position: absolute;
  inset: 8%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tint), transparent 72%);
  box-shadow: 0 0 60px #477ed610;
}
.ring circle { stroke-width: 5; }
.ring-track { stroke: var(--ring); }
.ring-progress { stroke: var(--accent); filter: drop-shadow(0 0 8px #89affc40); }
.ring-content .eyebrow { font-size: 10px; letter-spacing: 2px; color: var(--muted); }
.ring-content strong { font-size: 82px; font-weight: 300; letter-spacing: -3px; }
.ring-time { min-height: 94px; gap: 12px; }
.ring-time:has(.ring-detail:not([hidden])) > strong { font-size: 66px; }
.ring-renew.text-button {
  min-width: 0;
  min-height: 35px;
  margin-top: 2px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--tint);
  font-size: 11px;
}
.subscription-caption h2 { font-size: 19px; font-weight: 550; letter-spacing: -.4px; }
.subscription-caption > p { margin-top: 8px; font-size: 12px; }
.subscription-links { margin-top: 21px; gap: 16px; }
.text-button, .secondary { transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.subscription-links .text-button {
  min-height: 38px;
  font-size: 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
}
.primary {
  border: 1px solid #c0d0ff26;
  border-radius: 14px;
  background: linear-gradient(120deg, #587ee4, #6573df);
  box-shadow: 0 6px 20px #314fa522;
  font-size: 14px;
  font-weight: 600;
}
.primary:hover:not(:disabled) { background: linear-gradient(120deg, #6b8beb, #7683e7); }
.secondary { border-radius: 14px; background: var(--raised); border-color: var(--line); }
.text-button:not(.ring-renew) { color: var(--accent); }
.connection { padding: 21px; margin-top: 24px; }
.connection h3 { font-size: 17px; font-weight: 550; }
.connection .eyebrow { letter-spacing: .8px; font-size: 10px; }
.connection .copy-value { background: var(--input); font-size: 11px; line-height: 1.65; border: 1px solid var(--line); }
#connection .text-button { background: var(--tint); font-size: 12px; border-radius: 12px; }
.instructions { background: var(--surface); padding: 18px 21px; }
.instructions summary { font-weight: 500; }
.section-heading h2 { font-size: 25px; letter-spacing: -.8px; font-weight: 550; }
.location-card { padding: 21px; }
.flag-icon { width: 34px; border-radius: 6px; }
.location-card h3 { font-size: 16px; font-weight: 550; }
.location-card small { font-size: 11px; }
.latency strong { font-size: 15px; }
.subtabs { gap: 8px; padding-bottom: 4px; }
.subtabs button { border: 1px solid transparent; }
.subtabs .active { border-color: var(--line); background: var(--tint); }
.badge { border: 1px solid var(--line); font-size: 10px; }
input, textarea, select { border-radius: 12px; background: var(--input); }
dialog {
  border-radius: 26px;
  background-color: var(--bg);
  background-image:
    linear-gradient(#0b11204f, #0b11204f), url('/static/arion-star-sky-v2.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: local;
  box-shadow: 0 26px 100px #020713a0;
}
dialog::backdrop { background: #030814b3; backdrop-filter: blur(7px); }
.modal-head h2 { font-size: 22px; font-weight: 550; letter-spacing: -.7px; }
.choice, .plan-type { border-radius: 15px; background: var(--surface); }
.choice.selected { border-color: var(--accent); background: var(--tint); }
.case-window { padding-block: 20px; background: var(--input); border: 1px solid var(--line); border-radius: 18px; }
.case-window::after { background: var(--accent); box-shadow: 0 0 10px #719fff44; }
.case-prize, .case-tile { border-radius: 13px; background: var(--raised); }
.notice { background: var(--tint); border-color: var(--line); }
#referral-content .referral-benefit { line-height: 1.8; }
.referral-price-note { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--accent); margin: 12px 0; }
.referral-price-note s { color: var(--muted); }
footer { padding-block: 21px 8px; margin-top: 32px; }
footer > span:first-child { font-size: 12px; letter-spacing: 1.4px; }
footer a.text-button { background: transparent; min-height: 36px; padding: 8px 0; font-weight: 500; }
[data-theme=light] .star-sky::after {
  background: linear-gradient(155deg, #f8fbfff0, #e2edfff0 58%, #f2f7ffec);
}
[data-theme=light] .topbar::before {
  background: linear-gradient(#f9fbff 38%, #eef5fff0 74%, #edf5ff9c);
}
[data-theme=light] .tabs { border-color: #b0c1df80; }
[data-theme=light] .tab { color: #445a80; }
[data-theme=light] .tab.active {
  color: #264b9b;
  background: linear-gradient(180deg, #fff, #e1ecff);
  box-shadow: inset 0 -2px #7094e0, 0 3px 9px #2c4c851a;
}
[data-theme=light] .topbar .icon-button {
  background: #ffffffdf;
  color: #3d5690;
  border-color: #bdd0ee;
}
[data-theme=light] dialog {
  background-image: linear-gradient(155deg, #fcfdfff5, #ecf3fff7), url('/static/arion-star-sky-v2.webp');
}
[data-theme=light] .card { box-shadow: 0 8px 25px #29406410; }
.plan-features { margin: 10px 0 0; padding-left: 20px; font-size: .9rem; line-height: 1.5; }
.plan-features li + li { margin-top: 5px; }
.plan-note { font-size: .85rem; line-height: 1.5; margin-top: 8px; }
.device-card + .device-card { margin-top: 10px; }
.device-card .hint { margin: 5px 0 0; }
@media (min-width: 600px) {
  .brand-block { padding-top: 40px; }
  .balance-card { padding: 21px 24px; }
}
@media (max-width: 360px) {
  .shell { --shell-gutter: 14px; padding-inline: 14px; }
  .topbar { gap: 7px; }
  .tabs { gap: 1px; }
  .tab { padding-inline: 2px; }
  .ring-wrap { width: 258px; height: 258px; }
  .brand-block h1 { font-size: 29px; }
}

.instructions .guide-link { display: inline-block; margin-top: 10px; }
.help-steps { padding-left: 22px; font-size: .95rem; line-height: 1.65; }
.help-steps li + li { margin-top: 8px; }
