h1, h2, h3 { font-family: "Plus Jakarta Sans", Manrope, sans-serif; }

.gate, .app, .auth-page, .cp-page {
  min-height: 100vh;
  background: var(--bg, #fffdfb);
  color: var(--ink, #1c1c1c);
}

.auth-page { background: #eef3f8; }
.auth-veil {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 24px 16px 64px;
}
.auth-modal {
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(28, 28, 28, 0.12);
  position: relative;
}
.auth-left { padding: 36px 32px; min-width: 0; width: auto; }
.auth-right {
  background: #132238;
  color: #fff;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 520px;
  min-width: 0;
}
.auth-right img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin-bottom: 18px;
}
.auth-right h2 {
  font-size: 26px;
  letter-spacing: -0.04em;
  margin: 0 0 10px;
  color: #fff;
  text-wrap: balance;
}
.auth-right p { margin: 0; color: #b7c4d4; }
.auth-x {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: #1c1c1c;
  text-decoration: none;
}
.auth-back {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted, #6f6b66);
  text-decoration: none;
  font-weight: 600;
}

.gate { display: grid; place-items: center; padding: 32px 16px; }
.sheet { width: min(440px, 100%); }
.auth-modal .sheet { width: auto; }
.sheet {
  background: #fff;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(28, 28, 28, 0.08);
}
.sheet .brand, .auth-left .brand { display: inline-block; margin-bottom: 18px; }
.sheet h1, .auth-left h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.04em; }
.sheet p, .auth-left p { color: var(--muted, #6f6b66); }
.sheet label, .auth-left label, .screen label {
  display: block;
  margin: 16px 0 8px;
  font-weight: 600;
  font-size: 14px;
}
.sheet input, .auth-left input, .screen input, .screen textarea, .screen select {
  width: 100%;
  max-width: 100%;
  height: 48px;
  font-size: 16px;
  border-radius: 14px;
  border: 1px solid var(--line, #d7e0ea);
  background: #f3f6fb;
  color: var(--ink, #0c1524);
  padding: 0 14px;
}
.screen textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.sheet input:focus, .auth-left input:focus, .screen input:focus, .screen textarea:focus {
  outline: 2px solid #1c1c1c;
  outline-offset: 1px;
  background: #fff;
}
.secret { position: relative; display: block; }
.secret input { padding-right: 48px; }
.eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted, #6f6b66);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.eye svg { width: 20px; height: 20px; display: block; }
.sheet .btn, .app .btn, .auth-left .btn, .cp-page .btn {
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: #132238;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn.ghost, a.ghost {
  background: transparent;
  color: #1c1c1c;
  border: 1px solid var(--line, #ece8e2);
}
.sheet .btn.ghost, .auth-left .btn.ghost { width: 100%; margin-top: 8px; }
.method {
  width: 100%;
  height: 52px;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--line, #d7e0ea);
  background: #fff;
  color: #0c1524;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  cursor: pointer;
}
.method:hover { border-color: #132238; }
.method-go {
  background: #2eb7e8;
  border-color: #2eb7e8;
  color: #06202c;
}
.method-go:hover { filter: brightness(1.05); }
.textlink { color: #1c1c1c; font-weight: 600; text-decoration: underline; background: none; border: 0; cursor: pointer; }
.or { margin: 18px 0; text-align: center; }
.qr { width: fit-content; margin: 8px auto 10px; padding: 12px; border-radius: 18px; background: #fff; }
.qr svg, .qr table { width: 180px; height: 180px; display: block; }
.cmd { display: flex; gap: 10px; align-items: center; margin: 12px 0; min-width: 0; }
.cmd code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #f4f2ee; border-radius: 10px; padding: 8px 10px; }
#bot-panel { margin-top: 16px; text-align: center; }
#bot-panel .btn { width: 100%; margin-top: 8px; }
.sheet .btn, .auth-left .btn { width: 100%; margin-top: 18px; }
.sheet .links, .auth-left .links { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 16px; }
.sheet .links a, .quiet { color: var(--muted, #6f6b66); }
.err, .field-err { color: #c13515; }
.field-err { font-size: 13px; margin: 6px 0 0; }
input.is-bad { border-color: #c13515 !important; background: #fff5f2 !important; }
.pw-meter { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--muted, #6f6b66); font-size: 13px; }
.pw-bar {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: #ece8e2;
  overflow: hidden;
}
.pw-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 20%;
  background: #e5484d;
}
.pw-bar[data-score="2"]::after { width: 40%; background: #e8c36a; }
.pw-bar[data-score="3"]::after { width: 60%; background: #e8c36a; }
.pw-bar[data-score="4"]::after { width: 80%; background: #1f9d63; }
.pw-bar[data-score="5"]::after { width: 100%; background: #1f9d63; }
.ok { color: #1f9d63; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; color: var(--muted, #6f6b66); font-weight: 500; }
.check input { width: auto; height: auto; margin-top: 4px; }
.legal { margin-top: 18px; font-size: 12px; color: var(--muted, #6f6b66); }
.legal a { color: #1c1c1c; }

.is-ext .auth-modal { grid-template-columns: 1fr; width: min(440px, 100%); }
.is-ext .auth-right, .is-ext .bar, .is-ext .auth-x { display: none; }
.is-ext .auth-veil { min-height: 100vh; padding: 16px; }

.cp-page { background: #eef3f8; }
.cp-page .bar { position: sticky; }
.cp-banner { display: none; }
.cp-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 24px 80px;
}
.cp-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cp-side button, .cp-side a.nav {
  display: block;
  text-align: left;
  background: transparent;
  border: 0;
  color: #6f6b66;
  font: inherit;
  font-weight: 600;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  text-decoration: none;
}
.cp-side button.is-on, .cp-side a.nav.is-on {
  background: #fff;
  color: #1c1c1c;
  box-shadow: 0 8px 24px rgba(28,28,28,.06);
}
.cp-side .out { margin-top: auto; color: #6f6b66; }
.screen { padding: 8px 0 48px; }
.screen .eyebrow {
  margin: 0 0 10px;
  color: #6f6b66;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.screen h1 { margin: 0 0 12px; font-size: 32px; letter-spacing: -0.045em; }
.screen .lede, .screen > .muted { display: block; max-width: 640px; margin: 0 0 24px; color: #6f6b66; }
.card, .tile, .panel, .action-card, .checkout-box {
  background: #fff;
  border: 1px solid #ece8e2;
  border-radius: 22px;
  padding: 22px;
}
.profile-card { max-width: 640px; }
.profile-card p { margin: 4px 0; color: #5b6778; }
.profile-card b { color: #0c1524; font-size: 18px; }
.profile-row { margin: 18px 0; padding-bottom: 14px; border-bottom: 1px solid #e4ebf3; }
.profile-row:last-of-type { border-bottom: 0; }
.profile-row label { margin: 0 0 6px; }
.profile-row > p:first-child { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.action-card h2 { margin: 0; font-size: 24px; }
.action-card p { margin: 0; color: #6f6b66; }
.action-card .row { margin-top: auto; padding-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action-card .row .btn { width: 100%; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 28px; }
.tiles-2 { grid-template-columns: 1fr 1fr; }
.tile span { color: #6f6b66; font-weight: 600; }
.tile b { display: block; font-size: 28px; letter-spacing: -0.04em; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.list article { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.device { flex-wrap: wrap; }
.rename { display: flex; gap: 8px; flex: 1 0 100%; align-items: center; }
.key {
  font-family: ui-monospace, monospace;
  word-break: break-all;
  background: #f4f2ee;
  border-radius: 12px;
  padding: 12px;
}
.notice, .notice-ok {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 14px;
}
.notice { color: #c13515; background: #fff5f2; }
.notice-ok { color: #1f9d63; background: #eefbf4; }
.journey {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
  counter-reset: step;
  margin: 0 0 28px;
  padding: 0;
}
.journey li {
  counter-increment: step;
  background: #fff;
  border: 1px solid #ece8e2;
  border-radius: 22px;
  padding: 22px;
}
.journey li b::before { content: counter(step) ". "; color: #6f6b66; }
.empty {
  background: #fff;
  border: 1px dashed #ece8e2;
  border-radius: 22px;
  padding: 28px;
  text-align: center;
}
.account-card { display: flex; flex-direction: column; gap: 18px; max-width: 640px; }
.account-id { display: flex; gap: 16px; align-items: center; }
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #5bd4ff, #b794f6);
  color: #071018;
  font-weight: 800;
  flex-shrink: 0;
}
.chip {
  display: inline-flex;
  margin: 8px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4f2ee;
  color: #1c1c1c;
  font-size: 13px;
  font-weight: 700;
}
.checkout-actions { display: grid; gap: 10px; margin: 18px 0 12px; max-width: 360px; }
.checkout-actions .btn { width: 100%; }
.pay-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.pay-links a { color: #6f6b66; }
.screen iframe.doc { width: 100%; height: calc(100dvh - 160px); border: 0; border-radius: 18px; background: #fff; }
.side-mark { margin: 8px 14px 0; color: #b0aaa2; font-size: 11px; }

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.support-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #ece8e2;
  background: #fff;
  text-decoration: none;
  font-weight: 700;
}
.plan-periods {
  justify-content: flex-start;
  max-width: 640px;
  margin: 0 0 16px;
}
.plan-switch {
  display: grid;
  gap: 12px;
  max-width: 640px;
  margin: 8px 0 0;
}
.plan-switch article {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.plan-switch .is-current { border-color: #132238; }
.plan-switch .sum {
  margin: 8px 0 0;
  font-weight: 800;
  color: #0c1524;
}
.plan-switch .btn { flex-shrink: 0; }

@media (max-width: 860px) {
  .auth-modal { grid-template-columns: 1fr; border-radius: 20px; }
  .auth-left, .auth-right { padding: 28px 20px; }
  .auth-right { min-height: 0; }
  .sheet { padding: 22px 18px; }
  .sheet h1, .auth-left h1, .screen h1 { font-size: 26px; }
  .cp-grid { grid-template-columns: 1fr; padding: 12px 16px calc(48px + env(safe-area-inset-bottom)); }
  .cp-side {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    scrollbar-width: none;
  }
  .cp-side::-webkit-scrollbar { display: none; }
  .cp-side button, .cp-side a.nav { flex: 0 0 auto; white-space: nowrap; min-height: 44px; }
  .cp-side .out { margin-top: 0; }
  .tiles, .tiles-2, .journey, .action-grid, .support-grid { grid-template-columns: 1fr; }
  .plan-switch article { flex-direction: column; align-items: stretch; }
  .account-id { align-items: flex-start; }
}
