html,
body {
  height: auto;
  min-height: 100%;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

header {
  justify-content: flex-end;
}

.brand {
  margin-inline-end: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  opacity: .95;
  transition: opacity .2s, transform .2s;
}

.brand:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.brand img {
  height: 30px;
  width: auto;
  display: block;
}

.menu-sub {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.ms-plan {
  font-size: 13px;
  color: var(--ink-2);
}

.mi-ic {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: .85;
}

main.form-page {
  position: relative;
  z-index: 10;
  height: auto;
  display: block;
  padding: calc(var(--nav-h) + 28px) clamp(16px, 5vw, 40px) 64px;
  text-align: right;
}

.form-page .wrap {
  width: min(660px, 100%);
  margin: 0 auto;
  animation: rise .8s cubic-bezier(.2,.7,.2,1) both;
}

.ptitle {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 32px);
  text-align: center;
}

.form-page .tag {
  margin: 0 auto 26px;
  text-align: center;
}

.card {
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 22px 60px rgba(0,0,0,.42);
}

.card .field {
  margin-bottom: 16px;
}

.card .ltr {
  direction: ltr;
  text-align: left;
}

.card .note,
.share .note {
  margin: 7px 2px 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.7;
}

.card .note.center,
.share .note.center {
  text-align: center;
  margin-top: 12px;
}

.card .err {
  display: block;
  margin: 12px 0 0;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 13.5px;
  color: #F6A79E;
  background: rgba(233,115,102,.13);
  border: 1px solid rgba(233,115,102,.32);
}

.card .err[hidden] {
  display: none;
}

.gbtn.block {
  width: 100%;
  min-width: 0;
  margin-top: 6px;
}

.gbtn[disabled] {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.gbtn[disabled]:hover {
  transform: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 14px 34px rgba(0,0,0,.34);
}

form.locked .field input,
form.locked .switch,
form.locked .file {
  opacity: .55;
  pointer-events: none;
}

.opt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 4px 0 18px;
}

.opt-row > * {
  flex: 1 1 220px;
}

.switch,
.file {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14.5px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  transition: background .2s, border-color .2s;
}

.switch:hover,
.file:hover {
  background: rgba(255,255,255,.10);
  border-color: var(--line-strong);
}

.switch input,
.file input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch i {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  flex: none;
  position: relative;
  background: rgba(255,255,255,.16);
  transition: background .25s;
}

.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .25s;
}

.switch input:checked + i {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.switch input:checked + i::after {
  transform: translateX(-18px);
}

.switch input:focus-visible + i {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.file svg {
  width: 19px;
  height: 19px;
  flex: none;
  opacity: .85;
}

.file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file.has-file {
  border-color: rgba(94,159,232,.5);
  background: rgba(94,159,232,.12);
}

.progress {
  margin-top: 18px;
}

.pbar {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.10);
}

.pbar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .5s cubic-bezier(.2,.7,.2,1);
}

.pmeta {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.share {
  margin-top: 20px;
  text-align: center;
  animation: rise .5s cubic-bezier(.2,.7,.2,1) both;
}

.qr {
  width: 190px;
  height: 190px;
  margin: 0 auto 16px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 16px 40px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.7);
}

.qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr.loading,
.qr.failed {
  background: rgba(255,255,255,.06);
  border: 1px dashed var(--line-strong);
}

.qr.loading {
  display: grid;
  place-items: center;
}

.qr.loading::after {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: var(--accent);
  animation: qrspin .8s linear infinite;
}

@keyframes qrspin {
  to {
    transform: rotate(360deg);
  }
}

.qr-fail {
  display: grid;
  place-items: center;
  gap: 6px;
  height: 100%;
  padding: 8px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #F6A79E;
  text-align: center;
}

.qr-fail small {
  display: block;
  color: var(--ink-2);
  font-size: 11px;
  word-break: break-word;
}

.link-row {
  display: flex;
  gap: 8px;
}

.link-row input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13.5px;
}

.copy-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid rgba(94,159,232,.45);
  background: linear-gradient(180deg, rgba(94,159,232,.28), rgba(94,159,232,.12));
  transition: background .2s, border-color .2s, transform .15s;
}

.copy-btn:hover {
  background: linear-gradient(180deg, rgba(94,159,232,.40), rgba(94,159,232,.18));
  border-color: rgba(94,159,232,.7);
}

.copy-btn:active {
  transform: translateY(1px);
}

.copy-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.copy-btn.done {
  border-color: rgba(126,214,159,.6);
  background: linear-gradient(180deg, rgba(126,214,159,.28), rgba(126,214,159,.12));
}

@media (max-width: 560px) {
  header {
    padding: 0 16px;
  }
  .card {
    padding: 18px;
  }
  .link-row {
    flex-wrap: wrap;
  }
  .copy-btn {
    width: 100%;
    justify-content: center;
  }
}

.inspect {
  margin: -6px 0 18px;
}

.ins-err {
  margin: 20px 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #ffd9d4;
  background: rgba(233,115,102,.14);
  border: 1px solid rgba(233,115,102,.4);
}

.ins-body {
  animation: rise .45s cubic-bezier(.2,.7,.2,1) both;
}

.ins-sum {
  margin: 20px 0 5px;
  font-size: 13px;
  color: var(--ink-2);
  direction: ltr;
  text-align: right;
  unicode-bidi: plaintext;
}

.ins-hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
}

.ins-hint.warn {
  color: #F3C98B;
}

.ins-none {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

.tracks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  min-height: 54px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  transition: background .2s, border-color .2s;
}

.track:hover {
  background: rgba(255,255,255,.10);
  border-color: var(--line-strong);
}

.track input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.track i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex: none;
  position: relative;
  border: 2px solid rgba(255,255,255,.34);
  transition: border-color .2s, background .2s;
}

.track i::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: scale(0);
  transition: transform .18s cubic-bezier(.2,.8,.25,1);
}

.track input:checked + i {
  border-color: var(--accent);
}

.track input:checked + i::after {
  transform: scale(1);
}

.track input:focus-visible + i {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.track.picked {
  border-color: rgba(94,159,232,.5);
  background: rgba(94,159,232,.12);
}

.tk-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.tk-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tk-label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  unicode-bidi: plaintext;
}

.tk-badge {
  flex: none;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  color: #08111c;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.tk-meta {
  font-size: 12px;
  color: var(--ink-2);
  unicode-bidi: plaintext;
}

@media (max-width: 560px) {
  .track {
    padding: 10px 12px;
  }
  .tk-label {
    font-size: 13.5px;
  }
}

.gbtn.danger {
  background: rgba(248, 81, 73, .14);
  border-color: rgba(248, 81, 73, .38);
  color: #ffd7d7;
}

.gbtn.danger:hover {
  background: rgba(248, 81, 73, .22);
  border-color: rgba(248, 81, 73, .55);
}

.card .field > .label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.seg {
  display: flex;
  gap: 8px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
}

.seg-opt {
  flex: 1 1 0;
  position: relative;
  cursor: pointer;
  min-width: 0;
}

.seg-opt input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.seg-opt > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  border: 1px solid transparent;
  transition: background .18s, color .18s, border-color .18s;
}

.seg-opt > span svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.seg-opt:hover > span {
  background: rgba(255,255,255,.07);
  color: var(--ink);
}

.seg-opt input:checked + span {
  color: #08111c;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.seg-opt input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sel {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  padding-left: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,.55)' stroke-width='2' stroke-linecap='round'><path d='M6 9.5l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 16px 16px;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color .2s, border-color .2s;
}

.sel:hover {
  background-color: rgba(255,255,255,.10);
}

.sel:focus {
  background-color: rgba(255,255,255,.10);
  border-color: rgba(94,159,232,.6);
  outline: none;
}

.sel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sel option,
.sel optgroup {
  color: #0b1220;
  background: #eef2f8;
}

.sel optgroup {
  font-weight: 700;
}

.sel[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

form.locked .sel,
form.locked .seg {
  opacity: .55;
  pointer-events: none;
}

.ch-card {
  min-height:134px;
  padding:12px 10px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--ink);
  display:grid;
  place-items:center;
  gap:8px;
  cursor:pointer;
  transition:.18s;
}

.ch-card:hover {
  transform:translateY(-1px);
  background:rgba(255,255,255,.10);
  border-color:rgba(94,159,232,.55);
}

.ch-card.picked {
  background:rgba(94,159,232,.18);
  border-color:rgba(94,159,232,.75);
}

.ch-card.off {
  opacity:.45;
}

.ch-card svg {
  width:64px;
  height:64px;
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.28));
}

.ch-card span {
  font-size:13.5px;
  font-weight:700;
  text-align:center;
}

.cat-square {
  display:grid;
  grid-template-columns:1fr 1fr;
  grid-template-rows:1fr 1fr;
  gap:10px;
  aspect-ratio:1/1;
  margin:8px 0 12px;
  transition:grid-template-columns .5s cubic-bezier(.22,.61,.36,1), grid-template-rows .5s cubic-bezier(.22,.61,.36,1);
}

.cat-square[data-open="0"] {
  grid-template-columns:5.2fr 1fr;
  grid-template-rows:5.2fr 1fr;
}

.cat-square[data-open="1"] {
  grid-template-columns:1fr 5.2fr;
  grid-template-rows:5.2fr 1fr;
}

.cat-square[data-open="2"] {
  grid-template-columns:5.2fr 1fr;
  grid-template-rows:1fr 5.2fr;
}

.cat-square[data-open="3"] {
  grid-template-columns:1fr 5.2fr;
  grid-template-rows:1fr 5.2fr;
}

.cat-tile {
  position:relative;
  min-width:0;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  border-radius:18px;
  transition:background .4s ease,border-color .4s ease,box-shadow .4s ease;
}

.cat-head {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  border:0;
  background:none;
  color:inherit;
  font:inherit;
  text-align:start;
  cursor:pointer;
  width:100%;
  min-width:0;
}

.cat-ico {
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
}

.cat-ico svg {
  width:22px;
  height:22px;
}

.cat-text {
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
  transition:opacity .28s ease;
}

.cat-text b {
  font-size:14px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.cat-text small {
  font-size:11.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.cat-square:not([data-open="-1"]) .cat-tile:not(.open) .cat-text {
  opacity:0;
}

.cat-square:not([data-open="-1"]) .cat-tile:not(.open) .cat-head {
  justify-content:center;
  padding:10px 4px;
}

.cat-body {
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:0 12px 12px;
  display:grid;
  gap:10px;
  align-content:start;
  opacity:0;
  pointer-events:none;
  transition:opacity .3s ease .06s;
}

.cat-tile.open .cat-body {
  opacity:1;
  pointer-events:auto;
}

.cat-tile {
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
}

.cat-tile.open {
  background:rgba(255,255,255,.08);
  border-color:rgba(94,159,232,.5);
  box-shadow:0 18px 40px rgba(0,0,0,.28);
}

.cat-tile:not(.open) .cat-head:hover {
  background:rgba(255,255,255,.06);
}

.cat-text small {
  color:var(--ink-2);
}

.cat-body {
  grid-template-columns:repeat(auto-fill,minmax(104px,1fr));
}

.cat-body .ch-card {
  min-height:116px;
}

.cat-body .ch-card svg {
  width:52px;
  height:52px;
}

.cat-square {
  transition:grid-template-columns .78s cubic-bezier(.16,1,.3,1), grid-template-rows .78s cubic-bezier(.16,1,.3,1);
}

.cat-tile {
  transition:background .6s ease,border-color .6s ease,box-shadow .6s ease;
}

.cat-tile:not(.open) {
  cursor:pointer;
}

.cat-tile:not(.open) .cat-head {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:8px;
  text-align:center;
}

.cat-tile:not(.open) .cat-text {
  align-items:center;
  text-align:center;
}

.cat-tile:not(.open) .cat-ico {
  width:30px;
  height:30px;
  transition:transform .5s cubic-bezier(.16,1,.3,1),opacity .4s ease;
}

.cat-tile:not(.open) .cat-ico svg {
  width:26px;
  height:26px;
}

.cat-tile:not(.open):hover .cat-ico {
  transform:scale(1.12);
}

.cat-tile:not(.open) .cat-body {
  display:none;
}

.cat-square:not([data-open="-1"]) .cat-tile:not(.open) .cat-text {
  opacity:0;
  height:0;
  overflow:hidden;
  transition:opacity .34s ease;
}

.cat-square:not([data-open="-1"]) .cat-tile:not(.open) .cat-head {
  padding:4px;
}

.cat-tile.open .cat-body {
  transition:opacity .45s ease .12s;
}

.cat-square {
  max-width:380px;
  margin-inline:auto;
}

.cat-body {
  grid-template-columns:repeat(auto-fill,minmax(88px,1fr));
  gap:8px;
}

.cat-body .ch-card {
  min-height:100px;
}

.cat-body .ch-card svg {
  width:44px;
  height:44px;
}

.cat-body .ch-card span {
  font-size:12px;
}

.cat-body {
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.cat-body::-webkit-scrollbar {
  width:0;
  height:0;
  display:none;
}

.seg-opt.locked,
.switch.locked {
  opacity: .45;
  cursor: not-allowed;
}

.co-summary {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.04); margin-bottom: 16px;
}
.co-badge {
  width: 48px; height: 48px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; color: #08111c;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.co-badge svg {
  width: 26px;
  height: 26px;
  color: #fff;
}
.co-badge.tier1 { background: linear-gradient(135deg, #8fb8ff, #5E9FE8); }
.co-badge.tier2 { background: linear-gradient(135deg, #5E9FE8, #4F7BF7); }
.co-badge.tier3 { background: linear-gradient(135deg, #f7c15e, #f79b4f); }
.co-info { flex: 1; min-width: 0; }
.co-plan { font-size: 15px; font-weight: 700; }
.co-term { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.co-price { text-align: left; }
.co-price b { font-size: 19px; }
.co-price span { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }

.co-rows { margin-bottom: 18px; }
.co-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.co-row:last-child { border-bottom: none; }
.co-row span:first-child { color: var(--ink-2); }

.co-note { font-size: 12.5px; color: var(--ink-2); text-align: center; margin-top: 10px; }
.co-err { color: #ffb4ac; font-size: 13px; text-align: center; margin-top: 12px; }

.co-result { text-align: center; padding: 10px 0 4px; }
.co-result .co-icon {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.co-result.ok .co-icon { background: rgba(60,200,140,.15); color: #6be3ae; }
.co-result.fail .co-icon { background: rgba(248,81,73,.15); color: #ff8a80; }
.co-result .co-icon svg { width: 30px; height: 30px; }
.co-result h2 { margin: 0 0 6px; }
.co-result p { color: var(--ink-2); margin: 0 0 20px; }
