/* ============================================================
   Page layouts — Liquid Expressive
   ============================================================ */

.page {
  padding-bottom: 0;
}

/* Focus mode in guide: hide bottom nav and footer so user stays focused */
body.in-guide .bottom-nav,
body.in-guide .footer {
  display: none !important;
}

body.in-guide .page {
  padding-bottom: 48px;
}

/* ------------------------------------------------------------
   Home
   ------------------------------------------------------------ */

.hero {
  position: relative;
  z-index: 0;
  overflow: hidden;
  padding-block: clamp(44px, 7vw, 88px) clamp(52px, 8vw, 104px);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 46% 54% 62% 38% / 52% 42% 58% 48%;
}

.hero::before {
  top: 8%;
  right: -12%;
  width: min(52vw, 520px);
  aspect-ratio: 1;
  background: rgba(84, 54, 232, 0.1);
  transform: rotate(-18deg);
}

.hero::after {
  bottom: 2%;
  left: -14%;
  width: min(46vw, 440px);
  aspect-ratio: 1;
  background: rgba(255, 192, 46, 0.2);
  transform: rotate(24deg);
}

.hero__grid {
  display: grid;
  gap: var(--s-7);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(48px, 7vw, 104px);
  }
}

.hero__copy {
  position: relative;
}

.hero__title {
  margin-top: var(--s-4);
}

.hero__title .mark {
  position: relative;
  display: inline-block;
  padding: 0 0.12em 0.06em;
  border-radius: var(--r-4) var(--r-4) var(--r-2) var(--r-4);
  background: var(--gold-bright);
  color: var(--gold-ink);
  corner-shape: squircle;
  box-shadow: 0 5px 0 #bd7500;
}

.hero__lead {
  margin-top: var(--s-5);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-6);
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 2px solid var(--line);
}

.metric {
  min-width: 104px;
}

.metric__value {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

.metric__label {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--t-small);
  font-weight: 600;
}

.hero__panel {
  padding: var(--s-5);
  border-radius: var(--r-panel);
  background: var(--surface-2);
}

.hero__panel::before {
  border-radius: var(--r-panel-inner);
}

@media (min-width: 560px) {
  .hero__panel {
    padding: var(--s-6);
  }
}

@media (max-width: 559px) {
  .hero__title {
    font-size: clamp(1.85rem, 6.5vw, 2.3rem);
    line-height: 1.1;
  }

  .hero__lead {
    font-size: 0.95rem;
    margin-top: var(--s-3);
  }

  .hero__meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: var(--s-4);
    padding-top: var(--s-4);
  }

  .metric {
    min-width: 0;
    text-align: center;
  }

  .metric__value {
    font-size: 1.5rem;
  }

  .metric__label {
    font-size: 0.8125rem;
    line-height: 1.25;
    margin-top: 4px;
  }

  .hero__stamp {
    display: none;
  }

  .entry-card__head {
    padding-right: 0;
  }
}

.hero__stamp {
  position: absolute;
  top: -40px;
  right: 20px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 6px solid var(--surface-2);
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: inset 0 -8px 0 rgba(58, 36, 0, 0.16),
    0 14px 28px -10px rgba(90, 53, 0, 0.5);
  transform: rotate(10deg);
}

.hero__stamp img {
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.entry-card__head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
  padding-right: 72px;
}

.quick-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 64px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease-out),
    padding-left var(--dur-2) var(--spring);
}

.quick-row:hover {
  color: var(--gold);
  padding-left: 6px;
}

.quick-row__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  background: var(--gold-wash);
  color: var(--gold);
}

.quick-row__icon svg {
  width: 22px;
  height: 22px;
}

.quick-row__text {
  flex: 1;
  min-width: 0;
  font-size: var(--t-body);
  font-weight: 700;
  line-height: 1.35;
}

.quick-row__arrow {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 900;
}

.hero__fine {
  margin-top: var(--s-5);
  color: var(--muted);
  font-size: var(--t-small);
  line-height: 1.5;
}

/* Action grid — color-blocked expressive cards */
.action-grid {
  display: grid;
  gap: var(--s-4);
  counter-reset: act;
}

@media (min-width: 620px) {
  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .action-grid {
    grid-template-columns: 1.15fr 0.95fr 0.95fr 0.95fr;
  }
}

.action {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  padding: var(--s-5);
  border: 1px solid rgba(23, 19, 13, 0.06);
  border-radius: var(--r-card);
  background: var(--action-bg, var(--surface-2));
  color: var(--action-fg, var(--ink));
  text-decoration: none;
  corner-shape: squircle;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--dur-3) var(--spring),
    box-shadow var(--dur-3) var(--ease-out);
}

.action::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 0;
  border: 1px solid rgba(23, 19, 13, 0.08);
  border-radius: var(--r-card-inner);
  pointer-events: none;
}

.action::after {
  content: "0" counter(act);
  counter-increment: act;
  position: absolute;
  right: 12px;
  bottom: -18px;
  z-index: 0;
  font-family: var(--font-display);
  font-size: 5.5rem;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1;
  color: currentColor;
  opacity: 0.08;
  pointer-events: none;
}

.action:hover {
  transform: translateY(-7px) rotate(-1deg);
  box-shadow: var(--shadow-pop);
}

.action:active {
  transform: translateY(2px) scale(0.98);
}

.action--gold {
  --action-bg: var(--gold-bright);
  --action-fg: var(--gold-ink);
}

.action:nth-child(2) {
  --action-bg: var(--violet-soft);
  --action-fg: #2a168f;
}

.action:nth-child(3) {
  --action-bg: var(--coral-soft);
  --action-fg: #7c2512;
}

.action:nth-child(4) {
  --action-bg: var(--mint-soft);
  --action-fg: #084d34;
}

.action__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  color: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.action--gold .action__icon {
  background: rgba(58, 36, 0, 0.12);
  box-shadow: none;
}

.action__icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

.action__title {
  display: block;
  margin-top: var(--s-5);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.action__sub {
  display: block;
  margin-top: 8px;
  font-size: var(--t-small);
  font-weight: 500;
  line-height: 1.45;
  opacity: 0.85;
}

/* Editorial flow */
.flow {
  display: grid;
  gap: var(--s-6);
}

@media (min-width: 900px) {
  .flow {
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--s-9);
  }
}

.flow__list {
  display: grid;
}

.flow__item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: var(--s-4);
  padding-block: var(--s-5);
  border-top: 2px solid var(--line);
}

.flow__item:last-child {
  border-bottom: 2px solid var(--line);
}

.flow__num {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
}

.flow__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.flow__body {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--t-body);
}

/* Ink band */
.band {
  position: relative;
  padding: var(--s-6);
  border-radius: var(--r-panel);
  background: var(--ink);
  color: var(--surface);
  corner-shape: squircle;
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.band::before,
.band::after {
  content: "";
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(255, 192, 46, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.band::before {
  width: 420px;
  height: 420px;
  top: -240px;
  right: -80px;
}

.band::after {
  width: 300px;
  height: 300px;
  bottom: -200px;
  left: -60px;
  border-color: rgba(255, 255, 255, 0.12);
}

.band > * {
  position: relative;
  z-index: 1;
}

.band .eyebrow,
.band .muted {
  color: #c2b9a8;
}

.band__grid {
  display: grid;
  gap: var(--s-5);
}

@media (min-width: 760px) {
  .band__grid {
    grid-template-columns: 1.2fr repeat(3, 0.6fr);
    align-items: end;
    gap: var(--s-6);
  }
}

.band__stat {
  padding-top: var(--s-4);
  border-top: 2px solid #40392e;
}

.band__stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--gold-bright);
}

.band__stat span {
  display: block;
  margin-top: 8px;
  color: #c2b9a8;
  font-size: var(--t-small);
}

.cta {
  display: grid;
  gap: var(--s-5);
  padding: var(--s-6);
  border-radius: var(--r-panel);
  background: var(--gold-bright);
  color: var(--gold-ink);
  corner-shape: squircle;
  box-shadow: 0 8px 0 #bd7500, var(--shadow-pop);
}

.cta::before {
  border-color: rgba(58, 36, 0, 0.14);
}

@media (min-width: 760px) {
  .cta {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: var(--s-7);
  }
}

.cta h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}

.cta p {
  margin-top: var(--s-3);
  max-width: 50ch;
  color: #4a2c00;
  font-size: var(--t-body);
}

.cta .eyebrow {
  color: #4a2c00;
}

.cta .btn--ghost {
  --btn-fg: var(--gold-ink);
}

/* ------------------------------------------------------------
   Guide
   ------------------------------------------------------------ */

.task-shell {
  width: min(100%, 800px);
  margin-inline: auto;
}

.task-bar {
  position: relative;
  z-index: 10;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

@media (min-width: 900px) {
  .task-bar {
    position: sticky;
    top: var(--nav-h);
    z-index: 20;
    padding-block: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  }
}

.task-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}

.task-bar__step {
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.task-bar #codeChip {
  height: 24px;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timer svg {
  width: 12px;
  height: 12px;
}

.task-bar__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(23, 19, 13, 0.06);
  overflow: hidden;
}

.task-bar__progress .progress__fill {
  height: 100%;
  width: 0;
  background: var(--gold-bright);
  transition: width var(--dur-2) var(--ease-out);
}

.progress-block {
  margin-top: var(--s-3);
}

.progress-block__row {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: 6px;
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--muted);
}

.guide-head {
  display: grid;
  gap: var(--s-2);
  padding-block: var(--s-4);
}

.guide-intro {
  display: flex;
  gap: var(--s-4);
  align-items: flex-start;
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  background: var(--surface-2);
  box-shadow: var(--shadow-card);
}

.guide-intro__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 17px;
  background: var(--gold-soft);
  color: var(--gold);
}

.guide-intro__icon svg {
  width: 26px;
  height: 26px;
}

.guide-step {
  padding: var(--s-5);
  transition: border-color var(--dur-2) var(--ease-out),
    background var(--dur-2) var(--ease-out),
    transform var(--dur-3) var(--spring);
}

.guide-step + .guide-step {
  margin-top: var(--s-3);
}

.guide-step.is-active {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow-card);
}

.guide-step.is-done {
  background: var(--mint-soft);
}

.guide-step__head {
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
}

.guide-step__num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 16px;
  background: var(--surface-3);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.05rem;
}

.guide-step.is-done .guide-step__num {
  background: var(--green);
  color: var(--surface);
}

.guide-step__title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.guide-step__body {
  margin-top: var(--s-3);
  padding-left: 64px;
  color: var(--ink-2);
  font-size: var(--t-body);
  line-height: 1.6;
}

@media (max-width: 560px) {
  .guide-head {
    padding-block: var(--s-3) var(--s-2);
  }

  .guide-step {
    padding: 16px 14px;
    border-radius: var(--r-3);
  }

  .guide-step__head {
    gap: 10px;
  }

  .guide-step__num {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    border-radius: 12px;
  }

  .guide-step__title {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  .guide-step__body {
    padding-left: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-top: 6px;
  }

  .guide-step__actions {
    padding-left: 0;
    margin-top: 10px;
    gap: 8px;
  }

  .guide-step__actions .btn {
    height: 36px;
    min-height: 36px;
    padding-inline: 14px;
    font-size: 0.8125rem;
  }

  .check-row {
    min-height: 40px;
    margin-top: 10px;
    padding-top: 10px;
    font-size: 0.84rem;
    gap: 10px;
  }

  .check-row input {
    width: 20px;
    height: 20px;
  }

  .recovery-head {
    padding-block: var(--s-3) var(--s-2);
  }

  .install-card {
    padding: 18px 16px;
    border-radius: var(--r-3);
  }
}

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--t-body);
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}

/* Inline Video Shell in Guide Step */
.video-wrap {
  margin-top: 14px;
}

.video-shell {
  position: relative;
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
  border-radius: var(--r-3);
  overflow: hidden;
  border: 1.5px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  background: #000;
  aspect-ratio: 9 / 16;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  border-radius: inherit;
}

.video-caption {
  text-align: center;
  font-size: var(--t-micro);
  color: var(--muted);
  line-height: 1.5;
  margin: 8px 0 4px;
  font-weight: 700;
}

.video-caption b {
  color: var(--ink);
}

/* Account / Config Copy Card */
.acct-copy-wrap {
  margin: 12px 0 8px;
}

.acct-copy-label {
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.acct-copy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface-3);
  border: 1.5px solid var(--line);
  border-radius: var(--r-3);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  min-width: 0;
}

.acct-copy-card:active {
  transform: scale(0.98);
}

.acct-copy-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.acct-copy-badge {
  flex-shrink: 0;
  font-size: var(--t-micro);
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-bright);
  color: var(--gold-ink);
  white-space: nowrap;
  transition: all 0.18s ease;
}

.acct-copy-card.copied .acct-copy-badge {
  background: var(--green);
  color: #fff;
}

.check-row input {
  width: 24px;
  height: 24px;
  accent-color: var(--ink);
}

.complete-banner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5);
  border-radius: var(--r-card);
  background: var(--mint-soft);
  color: var(--green);
  box-shadow: var(--shadow-card);
}

.complete-banner b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
}

/* ------------------------------------------------------------
   Recovery
   ------------------------------------------------------------ */

.recovery-shell {
  width: min(100%, 680px);
  margin-inline: auto;
}

.recovery-head {
  padding-block: var(--s-7) var(--s-5);
  text-align: center;
}

.recovery-head .hero__stamp {
  position: static;
  margin: 0 auto var(--s-4);
  transform: rotate(-8deg);
}

.queue-ring {
  display: grid;
  place-items: center;
  width: 176px;
  height: 176px;
  margin: var(--s-5) auto;
  border-radius: 50%;
  background: conic-gradient(
    var(--gold-bright) var(--p, 0%),
    var(--surface-sunken) 0
  );
  box-shadow: 0 12px 32px -14px rgba(90, 53, 0, 0.45);
}

.queue-ring__inner {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--surface-2);
  text-align: center;
}

.queue-ring__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.queue-ring__label {
  color: var(--muted);
  font-size: var(--t-small);
}

.result-grid {
  display: grid;
  gap: var(--s-3);
}

@media (min-width: 560px) {
  .result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.result-item {
  padding: var(--s-4);
  border-radius: var(--r-3);
  background: var(--surface-3);
}

.result-item__label {
  color: var(--muted);
  font-size: var(--t-small);
  font-weight: 600;
}

.result-item__value {
  margin-top: 4px;
  font-weight: 700;
  font-size: var(--t-body);
  word-break: break-word;
}

/* ------------------------------------------------------------
   Upgrade calculator
   ------------------------------------------------------------ */

.calc-grid {
  display: grid;
  gap: var(--s-5);
}

@media (min-width: 900px) {
  .calc-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--s-6);
    align-items: start;
  }
}

.calc-side {
  display: grid;
  gap: var(--s-4);
}

@media (min-width: 900px) {
  .calc-side {
    position: sticky;
    top: calc(var(--nav-h) + 28px);
  }
}

.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.amount-chip {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  font-size: var(--t-small);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: background var(--dur-1) var(--ease-out),
    border-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out),
    transform var(--dur-2) var(--spring);
}

.amount-chip:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.amount-chip.is-active {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--gold-ink);
  box-shadow: 0 4px 0 #bd7500;
}

.target-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}

.target-card {
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  background: var(--surface-2);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  transition: border-color var(--dur-1) var(--ease-out),
    background var(--dur-1) var(--ease-out),
    transform var(--dur-2) var(--spring);
}

.target-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.target-card.is-active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink), var(--shadow-card);
}

.target-card.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.target-card__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.25;
}

.target-card__fee {
  margin-top: 8px;
  color: var(--gold);
  font-size: var(--t-small);
  font-weight: 700;
}

.summary-card {
  position: relative;
  padding: var(--s-6);
  border-radius: var(--r-panel);
  background: var(--ink);
  color: var(--surface);
  overflow: hidden;
}

.summary-card::before {
  border-color: rgba(255, 255, 255, 0.14);
}

.summary-card::after {
  content: "";
  position: absolute;
  top: -100px;
  right: -80px;
  z-index: 0;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(255, 192, 46, 0.3);
  border-radius: 50%;
  pointer-events: none;
}

.summary-card__eyebrow {
  color: #c2b9a8;
  font-size: var(--t-small);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.summary-card__fee {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--gold-bright);
}

.summary-card__desc {
  margin-top: var(--s-4);
  color: #d5ccbd;
  font-size: var(--t-body);
  line-height: 1.6;
}

.summary-card__rule {
  height: 2px;
  margin-block: var(--s-5);
  background: #40392e;
}

.message-box {
  max-height: 260px;
  overflow: auto;
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  background: var(--surface-3);
  font-size: var(--t-body);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ------------------------------------------------------------
   Install pages (DNS / Shadowrocket / Backup)
   ------------------------------------------------------------ */

.install-shell {
  width: min(100%, 640px);
  margin-inline: auto;
}

.install-head {
  padding-block: var(--s-7) var(--s-4);
  text-align: center;
}

.install-head h1 {
  font-size: clamp(2.1rem, 6vw, 3rem);
}

.install-card {
  padding: var(--s-5);
}

@media (min-width: 560px) {
  .install-card {
    padding: var(--s-6);
  }
}

.profile-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: 0 auto var(--s-5);
  border-radius: 28px;
  background: var(--ink);
  color: var(--gold-bright);
  box-shadow: 0 8px 0 #3c3529, 0 18px 34px -16px rgba(23, 19, 13, 0.5);
  transform: rotate(-5deg);
}

.profile-icon svg {
  width: 42px;
  height: 42px;
}

.install-steps {
  display: grid;
  gap: var(--s-3);
}

.install-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  background: var(--surface-2);
  box-shadow: var(--shadow-card);
}

.install-step__num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
}

.install-step b {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
}

.install-step p {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--t-body);
  line-height: 1.55;
}

.os-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 14px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: var(--t-small);
  font-weight: 700;
}

/* ------------------------------------------------------------
   Feedback
   ------------------------------------------------------------ */

.feedback-shell {
  width: min(100%, 760px);
  margin-inline: auto;
}

.form-step {
  padding: var(--s-5);
}

@media (min-width: 560px) {
  .form-step {
    padding: var(--s-6);
  }
}

.form-step + .form-step {
  margin-top: var(--s-4);
}

.form-step.is-locked {
  display: none;
}

.form-step__head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.form-step__num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
}

.form-step__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.verified-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-4);
  background: var(--green-soft);
}

.verified-bar__who {
  font-size: var(--t-body);
  font-weight: 700;
  color: var(--green);
}

.verified-bar__meta {
  color: var(--green);
  font-size: var(--t-small);
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 240px;
  padding: var(--s-5);
  border: 3px dashed var(--line-strong);
  border-radius: var(--r-5);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-2) var(--ease-out),
    background var(--dur-2) var(--ease-out),
    transform var(--dur-2) var(--spring);
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: var(--gold-2);
  background: var(--gold-wash);
  transform: scale(1.01);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: var(--gold-soft);
  color: var(--gold);
}

.dropzone__icon svg {
  width: 30px;
  height: 30px;
}

.preview {
  position: relative;
  border-radius: var(--r-4);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-3);
}

.preview img {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
}

.preview__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 12px 16px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
  color: var(--muted);
}

/* ------------------------------------------------------------
   Admin
   ------------------------------------------------------------ */

.admin {
  display: grid;
  min-height: 100vh;
}

@media (min-width: 980px) {
  .admin {
    grid-template-columns: 264px minmax(0, 1fr);
  }
}

.admin__side {
  display: none;
  background: var(--ink);
  color: var(--surface);
  padding: var(--s-5) var(--s-4);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

@media (min-width: 980px) {
  .admin__side {
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
  }
}

.admin__brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-inline: 8px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.admin__brand img {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.admin__brand small {
  display: block;
  color: #a69d8d;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin__nav {
  display: grid;
  gap: var(--s-1);
}

.admin__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  color: #b1a898;
  font-size: var(--t-small);
  font-weight: 700;
  text-decoration: none;
  transition: background var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out),
    transform var(--dur-2) var(--spring);
}

.admin__link svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.admin__link:hover {
  background: #28221a;
  color: var(--surface);
  transform: translateX(2px);
}

.admin__link.is-active {
  background: var(--gold-bright);
  color: var(--gold-ink);
  box-shadow: 0 4px 0 #8a5900;
}

.admin__foot {
  margin-top: auto;
  padding: var(--s-4) 8px 0;
  border-top: 1px solid #40392e;
  color: #a69d8d;
  font-size: var(--t-small);
  line-height: 1.5;
}

.admin__mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 2px solid var(--line);
  flex-wrap: nowrap;
}

.admin__mobile-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.admin__mobile-actions .btn-dev,
.admin__mobile-actions .btn-logout {
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 10px;
  white-space: nowrap;
  min-height: 32px;
}

@media (min-width: 980px) {
  .admin__mobile-head {
    display: none;
  }
}

.admin__main {
  min-width: 0;
  padding: var(--s-5) var(--page-pad) calc(var(--s-8) + 72px);
}

@media (min-width: 980px) {
  .admin__main {
    padding: var(--s-6) var(--s-7) var(--s-8);
  }
}

.admin__top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.admin__top > div:first-child {
  min-width: 0;
  flex: 1;
}

.admin__title {
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
}

.admin__sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--t-small);
}

.admin__mobile-nav {
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  margin-bottom: var(--s-4);
  padding-bottom: 4px;
  scrollbar-width: none;
}

.admin__mobile-nav::-webkit-scrollbar {
  display: none;
}

@media (min-width: 980px) {
  .admin__mobile-nav {
    display: none;
  }
}

.admin-nav-btn {
  flex: none;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--t-small);
  font-weight: 700;
}

.admin-nav-btn.is-active {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--gold-ink);
  box-shadow: 0 3px 0 #bd7500;
}

.admin-panel, .tab-content {
  display: none !important;
}

.admin-panel.is-active, .admin-panel.active, .tab-content.is-active, .tab-content.active {
  display: block !important;
  animation: panel-in var(--dur-3) var(--ease-out);
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.admin-stats {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1080px) {
  .admin-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.admin-stat {
  padding: var(--s-5);
  border: 1px solid rgba(23, 19, 13, 0.07);
  border-radius: var(--r-4);
  background: var(--surface-2);
  corner-shape: squircle;
  box-shadow: var(--shadow-card);
}

.admin-stat:nth-child(2) {
  background: var(--violet-soft);
  border-color: transparent;
}

.admin-stat:nth-child(3) {
  background: var(--coral-soft);
  border-color: transparent;
}

.admin-stat:nth-child(4) {
  background: var(--mint-soft);
  border-color: transparent;
}

.admin-stat__label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--t-small);
  font-weight: 700;
}

.admin-stat__label svg {
  width: 18px;
  height: 18px;
}

.admin-stat__value {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

.admin-stat__meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--t-small);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}

.admin-toolbar .input {
  min-height: 48px;
  max-width: 340px;
}

.filter-row {
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.admin-section {
  margin-top: var(--s-6);
}

.admin-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.admin-section__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 15px;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: var(--t-small);
  font-weight: 900;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.person__name {
  font-weight: 700;
  font-size: var(--t-body);
  line-height: 1.25;
}

.person__sub {
  color: var(--muted);
  font-size: var(--t-small);
}

.admin-form {
  display: grid;
  gap: var(--s-4);
  max-width: 760px;
}

@media (min-width: 620px) {
  .admin-form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-4);
  }
}

.price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5);
  border-radius: var(--r-4);
  background: var(--gold-wash);
  border: 1px solid rgba(143, 76, 0, 0.16);
}

.price-box b {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--gold);
}

.admin-grid-2 {
  display: grid;
  /* Cột mặc định co theo bề rộng khung (minmax(0,1fr)) để nội dung dài
     (vd: URL DoH không có khoảng trắng) không đẩy tràn ngang trên mobile. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-4);
}

.admin-grid-2 > * {
  min-width: 0;
}

@media (min-width: 1080px) {
  .admin-grid-2 {
    grid-template-columns: 1.4fr 0.6fr;
    align-items: start;
  }
}

.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.code-row:last-child {
  border-bottom: 0;
}

.code-row__main {
  min-width: 0;
}

.code-row__code {
  font-family: var(--font-mono);
  font-size: var(--t-body);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.code-row__sub {
  color: var(--muted);
  font-size: var(--t-small);
}

/* Login-less admin note */
.demo-flag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: var(--red-soft);
  color: var(--red);
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
