:root {
  color-scheme: dark;
  font-family: Inter, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  --base: #100e1c;
  --page: #0b0913;
  --text: #faf7ff;
  --muted: #d1bde8;
  --purple: #b15cff;
  --line: #49345f;
  --green: #51ff83;
  --surface: linear-gradient(154deg, #231c36 0%, #171426 73%, #1d1530 100%);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  min-width: 0;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 72px);
  background: radial-gradient(ellipse at 50% 95%, #1c0e34, transparent 62%), var(--page);
  color: var(--text);
}

button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid #dfacff; outline-offset: 4px; }
h1:focus-visible { outline: none; }
h1, h2, p, dl, dd, figure { margin: 0; }
h1, h2 { letter-spacing: -.038em; }
button, input, .panel { -webkit-tap-highlight-color: transparent; }

.site {
  position: relative;
  isolation: isolate;
  width: min(100%, 940px);
  min-height: 646px;
  overflow: hidden;
  border: 1px solid #8040c2;
  border-radius: 32px;
  background: linear-gradient(140deg, #13101f, var(--base) 65%, #151022);
  box-shadow: 0 0 0 1px #a64cff27, 0 22px 100px #0008, 0 0 75px #7135b018;
}

.site:not([data-page="login"])::before, .site:not([data-page="login"])::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  width: 98%;
  height: 260px;
  bottom: -196px;
  left: -19%;
  border-radius: 47% 62% 0 0;
  transform: rotate(9deg);
  background: linear-gradient(175deg, #2c0f4d, #120e20 44%);
  border-top: 1px solid #9b24f990;
  box-shadow: 0 -8px 30px #a318ff2c;
}

.site:not([data-page="login"])::after {
  width: 86%;
  left: auto;
  right: -28%;
  bottom: -166px;
  transform: rotate(-15deg);
  border-top: 1px solid #d096ff;
  background: radial-gradient(ellipse at 40% 0, #5313a3, #1b0e36 54%, #120e20 75%);
  box-shadow: 0 -8px 44px #9f1aff58;
}

.icon { width: 24px; height: 24px; flex: 0 0 auto; vertical-align: middle; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 37px; line-height: 1; font-weight: 800; letter-spacing: -.045em; }
.brand .icon { width: 52px; height: 52px; color: #ad61ff; filter: drop-shadow(0 0 8px #8b3bffc0); stroke-width: 2.25; }
.accent { color: var(--purple); filter: drop-shadow(0 1px 5px #9f37ff4d); }

.login { display: grid; grid-template-columns: minmax(340px, 47%) 1fr; min-height: inherit; }
.login-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; padding: 70px clamp(28px, 5vw, 65px) 76px; }
.login .brand { margin-bottom: 77px; }
.login-heading { width: 100%; text-align: center; margin-bottom: 38px; }
.login-heading h1 { font-size: clamp(28px, 3.15vw, 39px); line-height: 1.12; }
.login-heading p { margin-top: 11px; color: var(--muted); font-size: 17px; }
#login-form { width: 100%; display: grid; justify-items: center; }

.id-input {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 57px;
  gap: 12px;
  padding: 0 17px;
  border: 1px solid #7952ac;
  border-radius: 20px;
  background: var(--surface);
  color: #c9a9f4;
  box-shadow: inset 0 1px 0 #c99aff22;
}
.id-input:focus-within { border-color: #d19bff; box-shadow: 0 0 16px #a648ff3a; }
.id-input input { width: 100%; min-width: 0; height: 54px; padding: 0; border: 0; outline: none; color: var(--text); background: transparent; text-transform: uppercase; }
.id-input input::placeholder { color: #ccb4e8; opacity: 1; }
.field-error { width: 100%; min-height: 2.25rem; color: #ffb1d3; font-size: .85rem; padding: 6px 1px 0; }
.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid #7953b0;
  border-radius: 23px;
  background: var(--surface);
  font-size: 17px;
  font-weight: 750;
  text-align: center;
  box-shadow: inset 0 1px 0 #cf9cff30;
  transition: background-color .2s, border-color .2s, box-shadow .2s, filter .2s, transform .2s;
}
.button:hover { border-color: #d49cff; filter: brightness(1.15); }
.button:active, .menu-button:active { transform: translateY(1px); }
.login-button { width: 87%; }
.primary {
  border-color: #ad4bff;
  background: radial-gradient(ellipse at 13% 0, #a554fa, transparent 65%), linear-gradient(163deg, #7b21ef, #4f08cc 73%, #5b11e0);
  box-shadow: inset 0 1px 0 #e9baff90, inset 0 -3px 9px #9426ff95, 0 0 23px #8d24ff45;
}
.register { margin-top: 34px; min-height: 60px; width: 100%; font-size: 21px; }

.orbit {
  position: absolute;
  inset: 0 0 0 45%;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 86% 70%, #3b0b6c9e 0%, #1e1037 40%, transparent 72%);
}
.orbit-arc {
  position: absolute;
  width: 133%;
  height: 57%;
  right: -45%;
  top: 1%;
  transform: rotate(-18deg);
  border-radius: 0 0 48% 48%;
  background: linear-gradient(115deg, #151022 25%, #2c1352 63%, #6c1bdd 105%);
  border-bottom: 1px solid #e0a1ff;
  box-shadow: 14px 16px 52px #8b19ff9c;
  opacity: .63;
}
.planet {
  position: absolute;
  inset: auto -3% 0 -3%;
  aspect-ratio: 355 / 214;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 84%, transparent), linear-gradient(to right, transparent, #000 14%, #000 90%, transparent);
  mask-composite: intersect;
  mix-blend-mode: screen;
}
.planet img {
  position: absolute;
  width: 432.68%;
  max-width: none;
  top: 0;
  left: -4%;
  transform: translateY(-72.55%);
}

.inner { position: relative; max-width: 900px; margin: 0 auto; padding: 39px clamp(25px, 5vw, 62px) 114px; }
.account-header, .page-heading { position: relative; display: flex; justify-content: center; align-items: center; min-height: 55px; }
.account-header .brand { font-size: 33px; }
.account-header .brand .icon { width: 45px; height: 45px; }

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #f7edff;
  transition: background .2s, color .2s;
}
.icon-button:hover { background: #a55bf929; color: #e5c3ff; }
.logout { position: absolute; right: 0; display: inline-flex; gap: 7px; width: auto; padding: 0 10px; color: var(--muted); font-size: 14px; }
.logout .icon { width: 20px; height: 20px; }
.account-greeting { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 20px 0 28px; }
.account-greeting h1 { font-size: 26px; }
.id-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border: 1px solid #6422ac; border-radius: 99px; background: #431679; font-weight: 750; }
.id-chip:hover { background: #592292; }
.id-chip .icon { width: 15px; height: 15px; color: #e2bbff; }

.panel { border: 1px solid var(--line); border-radius: 21px; background: var(--surface); box-shadow: inset 0 1px 0 #c79aff15; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.account-details, .account-menu { display: grid; gap: 13px; min-width: 0; }
.status-card { padding: 16px; }
.status-top, .status-meta > div { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.status-top { min-height: 29px; font-size: .93rem; }
.status-top span, .status-meta dt { color: var(--muted); }
.status-top b { color: var(--text); }
.status { display: inline-flex; align-items: center; gap: 8px; color: #efc7ff; }
.status::before, .phone p i { content: ""; width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #bc72f9; box-shadow: 0 0 10px #bc72f98c; }
.status.active { color: var(--green); }
.status.active::before, .phone p i { background: #18fa66; box-shadow: 0 0 10px #18fa669c; }
.status-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin-top: 9px; padding-top: 12px; border-top: 1px solid #6d4c8d58; font-size: .88rem; }
.status-meta > div:last-child { grid-column: 1 / -1; }
.status-meta dd { font-weight: 650; text-align: right; }

.subscription { padding: 14px; background: linear-gradient(145deg, #161226, #131021); }
.subscription-heading { display: flex; align-items: center; gap: 12px; }
.subscription-heading .icon { width: 35px; height: 35px; }
.subscription-heading h2 { font-size: 1.09rem; }
.subscription-heading p { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.subscription-unavailable { color: var(--muted); margin-top: 12px; font-size: .92rem; }
.copy-field { display: flex; align-items: stretch; margin-top: 13px; min-height: 45px; border: 1px solid #8858bb; border-radius: 13px; background: #211832; overflow: hidden; }
.copy-field input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 0 11px; color: var(--text); font-size: .91rem; }
.copy-field input:focus-visible { outline-offset: -3px; }
.copy-field .icon-button { height: auto; width: 44px; background: #47217c; color: #e2b9ff; border-radius: 11px; }
.copy-field .icon-button:hover { background: #6327a0; }
.copy-field .icon-button:focus-visible { outline-offset: -3px; }

.menu-button { width: 100%; min-height: 76px; display: grid; grid-template-columns: 37px 1fr 21px; align-items: center; gap: 12px; padding: 13px 16px; text-align: left; transition: border-color .2s, box-shadow .2s, transform .2s; }
.menu-button:hover, .menu-button:first-child { border-color: #a15bdc; box-shadow: inset 0 1px 0 #c388ff50, inset 0 4px 21px #a14cea20; }
.menu-button .accent { width: 35px; height: 35px; }
.menu-button strong { display: block; font-size: 1.05rem; letter-spacing: -.035em; }
.menu-button small { display: block; font-size: .89rem; color: var(--muted); margin-top: 3px; }
.menu-button .chevron { width: 20px; height: 20px; }
.support-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 16px; }
.support-panel .button { min-height: 44px; }

.page-heading { margin-bottom: 34px; text-align: center; padding: 0 44px; }
.page-heading h1 { font-size: clamp(1.42rem, 3.3vw, 2.1rem); line-height: 1.12; }
.back { position: absolute; left: -8px; }
.back .icon { width: 28px; height: 28px; }
.platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 18px; }
.platform { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: start; gap: 16px; min-height: 145px; padding: 22px; }
.platform-icon { width: 48px; height: 48px; margin-top: 6px; color: #f3eaff; }
.android .platform-icon { color: #92f548; }
.platform h2 { font-size: 1.53rem; margin-bottom: 5px; }
.app-link { text-decoration: none; display: flex; width: 100%; min-height: 44px; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 5px 0; border: 0; background: transparent; text-align: left; color: var(--muted); }
.app-link:hover { color: #fff; }
.app-link small { display: block; font-size: .84rem; margin-top: 3px; }
.app-link .icon { width: 20px; height: 20px; color: var(--text); }
.information { display: flex; align-items: start; gap: 12px; padding: 17px; margin-top: 20px; color: var(--muted); line-height: 1.42; font-size: .94rem; }
.information .icon { width: 26px; height: 26px; color: var(--purple); }
.save-id { margin: 0 0 14px; border-radius: 16px; border: 1px solid #6d3e98; background: #241638; align-items: center; padding: 10px 13px; }
.save-id strong { color: var(--text); }
.save-id .icon-button { margin-left: auto; }

.guide-layout { display: grid; grid-template-columns: 1.25fr .8fr; align-items: center; gap: 28px; }
.platform-switch { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #563579; border-radius: 18px; background: #1b152a; }
.platform-switch button { border: 1px solid transparent; border-radius: 17px; background: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 47px; font-weight: 700; }
.platform-switch button .icon { height: 21px; width: 21px; color: #e0bafa; }
.platform-switch button:hover { color: #edc8ff; }
.platform-switch button.selected { border-color: #8d3ef5; background: linear-gradient(156deg, #a04afa 0%, #6412dd 58%, #4b09c9); box-shadow: inset 0 1px 0 #dfa3ff90; }
.platform-switch button.selected .icon { color: #fff; }
.steps a { color: #e6bbff; text-underline-offset: 3px; }
.steps { counter-reset: step; position: relative; display: grid; gap: 14px; list-style: none; padding: 0; margin: 22px 0 0; }
.steps::before { content: ""; width: 2px; position: absolute; inset: 15px auto 15px 16px; background: linear-gradient(#7835b4, #271745); }
.steps li { counter-increment: step; position: relative; display: flex; align-items: center; min-height: 37px; padding-left: 49px; line-height: 1.35; font-size: .96rem; }
.steps li::before { content: counter(step); display: grid; place-items: center; position: absolute; left: 0; top: 0; width: 35px; height: 35px; border: 1px solid #ab4ef7; border-radius: 50%; background: radial-gradient(circle at 50% 20%, #4e2173, #241436 70%); font-weight: 750; font-size: 1.15rem; }
.phone-figure { min-width: 0; align-self: end; text-align: center; }
.phone { position: relative; overflow: hidden; width: min(100%, 224px); height: 270px; margin: 0 auto; border: 1px solid #d7a5ff; border-bottom-color: #3a1c54; border-radius: 34px 34px 22px 22px; background: radial-gradient(ellipse at 50% 62%, #1d102d, #100e1c 67%); box-shadow: inset 0 0 0 2px #75419768, 0 0 35px #872afb6a; }
.phone-speaker { width: 43px; height: 5px; background: #27233a; border-radius: 99px; margin: 12px auto 21px; }
.phone-title { font-size: .9rem; font-weight: 700; }
.phone-power { display: grid; place-items: center; width: 74px; height: 74px; margin: 30px auto 17px; border: 3px solid #a550f7; border-radius: 50%; color: #ebbdff; background: #291744; box-shadow: inset 0 0 13px #9224e4, 0 0 19px #8517df; }
.phone-power .icon { width: 35px; height: 35px; }
.phone p { display: inline-flex; align-items: center; gap: 7px; font-size: .83rem; }
.phone-figure figcaption { margin-top: 10px; color: var(--muted); font-size: .8rem; }

.payment-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.payment-card { padding: 20px; }
.payment-lines { display: grid; gap: 12px; margin-top: 20px; }
.payment-lines div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.payment-lines div:last-child { padding-top: 13px; border-top: 1px solid var(--line); color: var(--text); font-weight: 750; }
.payment-lines dd { white-space: nowrap; }
.payment-card fieldset { border: 0; padding: 0; margin: 0 0 15px; }
.payment-card legend { margin-bottom: 10px; font-weight: 750; padding: 0; }
.provider { display: flex; align-items: center; gap: 8px; padding: 7px 0; cursor: pointer; }
.provider input { accent-color: var(--purple); }
.payment-card .button, dialog .button { width: 100%; }
.payment-hint { color: var(--muted); font-size: .8rem; margin-top: 10px; text-align: center; }

dialog { width: min(100% - 32px, 410px); border: 1px solid #a35de3; border-radius: 23px; background: #211631; color: var(--text); padding: 26px; box-shadow: 0 0 40px #6a28a675; }
dialog::backdrop { background: #06040bbd; backdrop-filter: blur(5px); }
dialog h2 { padding-right: 37px; font-size: 1.34rem; }
dialog p { color: var(--muted); margin: 13px 0 21px; line-height: 1.5; }
.dialog-close { position: absolute; right: 10px; top: 10px; }

.toast { position: fixed; z-index: 2; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translate(-50%, 8px); opacity: 0; visibility: hidden; max-width: min(460px, calc(100% - 24px)); width: max-content; padding: 10px 15px; background: #33214a; border: 1px solid #ae70eb; border-radius: 12px; box-shadow: 0 6px 24px #0008; font-size: .9rem; transition: opacity .2s, transform .2s, visibility .2s; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.clipboard-helper { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@media (max-width: 670px) {
  body { display: block; min-height: 100svh; padding: 0; background: var(--base); }
  .site { min-height: 100svh; border: 0; border-radius: 0; box-shadow: none; }
  .login { display: block; position: relative; min-height: 100svh; padding-bottom: max(166px, 22svh); }
  .login-content { padding: clamp(47px, 8svh, 77px) 0 14px; width: min(100% - 46px, 410px); margin: 0 auto; }
  .login .brand { margin-bottom: clamp(51px, 8.7svh, 83px); }
  .login-heading { margin-bottom: clamp(29px, 5.6svh, 46px); }
  .login-heading h1 { font-size: clamp(29px, 8vw, 36px); }
  .field-error { min-height: 2.1rem; }
  .register { margin-top: 32px; }
  .orbit { inset: 0; background: radial-gradient(ellipse at 84% 29%, #35105b68 0%, transparent 40%); }
  .orbit-arc { width: 98%; height: 24%; right: -41%; top: 7%; transform: rotate(-21deg); opacity: .75; }
  .planet { inset: auto -1% -7px; mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 85%, transparent); }
  .inner { padding: max(23px, env(safe-area-inset-top)) 20px 100px; max-width: 490px; }
  .account-header .brand { font-size: 30px; }
  .logout { width: 44px; height: 44px; justify-content: center; padding: 0; }
  .copy-field input { font-size: 1rem; }
  .logout span { display: none; }
  .account-greeting { margin: 12px 0 25px; }
  .account-grid, .platform-grid, .guide-layout, .payment-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .platform { min-height: 113px; padding: 18px; }
  .page-heading { margin-bottom: 25px; }
  .guide-layout { gap: 26px; }
  .phone { height: 248px; }
  .site:not([data-page="login"])::before, .site:not([data-page="login"])::after { width: 130%; }
}

@media (max-width: 355px) {
  .inner { padding-right: 14px; padding-left: 14px; }
  .status-card { padding: 12px; }
  .status-meta { gap: 10px 9px; font-size: .8rem; }
  .status-top { font-size: .84rem; }
  .login-content { width: calc(100% - 34px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; }
}

a.button { color: inherit; text-decoration: none; }
dialog .invoice-link { margin: 0 0 14px; }
.payment-card > h2 + .payment-hint { margin: 12px 0; text-align: left; }

button:disabled { opacity: .64; cursor: not-allowed; }
.menu-button:disabled { box-shadow: none; border-color: var(--line); }
.payment-lock { display: grid; gap: 8px; }
.payment-lock p, .binding-note { color: var(--muted); line-height: 1.45; }
.payment-lock p { font-size: .9rem; padding: 0 3px; }
.payment-lock > .button { min-height: 44px; }
.binding-note { margin-bottom: 14px; }
