:root {
  --bg-page: #f5f5f7;
  --bg-surface: #ffffff;
  --bg-subtle: #f5f5f7;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --border-hairline: rgba(0, 0, 0, 0.08);
  --border-tile: #d2d2d7;
  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-link: #0066cc;
  --apple-green: #1d8348;
  --apple-green-bg: #eafaf1;
  --apple-green-border: #a9dfbf;
  --apple-red: #d93025;
  --apple-red-bg: #fdecea;
  --apple-red-border: #f5c6cb;
  --apple-amber: #92400e;
  --apple-amber-bg: #fffbeb;
  --apple-amber-border: #fde68a;
  --radius-card: 22px;
  --radius-tile: 18px;
  --radius-input: 12px;
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
  --ease-apple: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

.apple-link,
.contact-link {
  color: var(--apple-link) !important;
  text-decoration: none !important;
  font-weight: 500;
}

.apple-link:hover,
.contact-link:hover {
  text-decoration: underline !important;
}

.container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Frosted Glass Apple Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 48px;
  background: rgba(251, 251, 253, 0.84);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-hairline);
}

.header-inner {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  display: block;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.support-pill {
  padding: 6px 13px;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.055);
  color: var(--text-primary) !important;
  font-weight: 500;
  font-size: 0.8rem;
  transition: background 0.18s ease;
}

.support-pill:hover {
  background: rgba(0, 0, 0, 0.09);
}

/* Refined Apple Cupertino Hero */
.hero-compact {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 20px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 980px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.42); }
  50% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: live-pulse 2.4s infinite ease-in-out;
}

.hero-compact h1 {
  font-size: clamp(1.65rem, 4vw, 2.28rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.hero-brand-accent {
  background: linear-gradient(135deg, #0071e3 0%, #3b82f6 55%, #005bb5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 0.92rem;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.hero-pills-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hero-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 980px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.025);
  font-size: 0.77rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

.hero-feature-chip svg {
  color: var(--apple-blue);
  flex-shrink: 0;
}

/* Main Configurator Wrapper — unified 640px column for rectangular cards + checkout */
.configurator-wrap {
  max-width: 640px;
  margin: 0 auto 28px;
}

.saved-order-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 15px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 1.5px solid var(--border-tile);
  box-shadow: var(--shadow-card);
}

.saved-order-card.active-blue {
  background: rgba(0, 113, 227, 0.06);
  border-color: rgba(0, 113, 227, 0.42);
}

.saved-order-card.warn {
  background: var(--apple-amber-bg);
  border-color: #f59e0b;
}

.saved-order-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.saved-order-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.saved-order-sub {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--apple-blue);
}

.saved-order-card.warn .saved-order-sub {
  color: var(--apple-amber);
  text-decoration: underline;
}

.saved-order-dismiss {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-heading-upper {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  padding-left: 2px;
}

/* 3 Wide Rectangular Cards Stacked Vertically + Smooth Gliding Border */
.plan-tiles {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

/* Gliding frame sits at z-index: 2; .plan-tile has z-index: auto so .tile-badge (z-index: 5) is ALWAYS above! */
.plan-glider {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-radius: var(--radius-tile);
  border: 2px solid var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12), 0 8px 22px rgba(0, 113, 227, 0.08);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition:
    transform 0.36s var(--ease-apple),
    width 0.36s var(--ease-apple),
    height 0.36s var(--ease-apple),
    opacity 0.18s ease;
}

.plan-tiles.glider-ready .plan-glider {
  opacity: 1;
}

.plan-tile {
  position: relative;
  min-width: 0;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-tile);
  border-radius: var(--radius-tile);
  padding: 16px 18px 14px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.plan-tile:hover {
  border-color: #a1a1a6;
}

.plan-tile.active {
  background: linear-gradient(180deg, rgba(0, 113, 227, 0.035) 0%, #ffffff 70%);
}

.plan-tiles:not(.glider-ready) .plan-tile.active {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.plan-tiles.glider-ready .plan-tile.active {
  border-color: transparent;
}

/* Top Pill Badges on Rectangular Cards — strictly above selection border */
.tile-badge {
  position: absolute;
  top: -11px;
  left: 18px;
  white-space: nowrap;
  z-index: 5;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2.5px 10px;
  border-radius: 980px;
  color: #ffffff;
  background: var(--apple-blue);
  box-shadow: 0 0 0 2.5px #ffffff, 0 2px 6px rgba(0, 0, 0, 0.10);
}

.tile-badge.start {
  background: #48566a;
}

.tile-badge.best {
  background: var(--apple-blue);
}

.tile-badge.work {
  background: linear-gradient(135deg, #5856d6, #0071e3);
}

.tile-top-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}

.tile-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f2f4f8;
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.plan-tile.active .tile-icon-box {
  background: var(--apple-blue);
  color: #ffffff;
  border-color: var(--apple-blue);
}

.tile-gpt-svg {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.tile-name {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.tile-right-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tile-price {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  white-space: nowrap;
}

.tile-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border-tile);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.plan-tile.active .tile-check {
  background: var(--apple-blue);
  border-color: var(--apple-blue);
  color: #ffffff;
}

.tile-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 47px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.tile-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.35;
}

.b-tick {
  color: var(--apple-blue);
  font-weight: 700;
  flex-shrink: 0;
}

/* Checkout Card */
.apple-card {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 22px;
}

.checkout-card {
  width: 100%;
  margin: 0 auto;
}

.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.price-anim {
  transition: opacity 0.18s ease, transform 0.18s var(--ease-apple);
  display: inline-block;
}

.price-anim.swapping {
  opacity: 0.25;
  transform: translateY(2px);
}

/* Thumb-Friendly Paste Pill */
.inline-action-pill {
  border: none;
  background: rgba(0, 113, 227, 0.10);
  color: var(--apple-blue);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 980px;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.12s ease, color 0.16s ease;
}

.inline-action-pill:hover {
  background: rgba(0, 113, 227, 0.17);
}

.inline-action-pill:active {
  transform: scale(0.96);
}

.inline-action-pill.done {
  background: var(--apple-green-bg);
  color: var(--apple-green);
}

/* Token ID Mini-Instruction Box */
.token-guide-box {
  background: var(--bg-subtle);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 13px 15px;
  margin-top: 10px;
}

.token-guide-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 7px;
}

.token-guide-steps {
  padding-left: 17px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.token-guide-steps li {
  line-height: 1.42;
}

.token-guide-steps code,
.token-warn-callout code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.74rem;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
  padding: 1.5px 5px;
  border-radius: 5px;
  word-break: break-all;
}

.session-direct-link {
  text-decoration: underline !important;
  word-break: break-all;
}

.mini-copy-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, 0.11);
  background: #ffffff;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mini-copy-tag:hover {
  background: #f0f0f3;
}

.mini-copy-tag.copied {
  background: var(--apple-green-bg);
  border-color: var(--apple-green-border);
  color: var(--apple-green);
}

.token-warn-callout {
  background: var(--apple-amber-bg);
  border: 1px solid var(--apple-amber-border);
  color: var(--apple-amber);
  border-radius: 11px;
  padding: 8px 11px;
  font-size: 0.76rem;
  line-height: 1.38;
  margin-bottom: 9px;
}

.token-example-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.token-example-code {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.69rem;
  line-height: 1.38;
  color: var(--text-secondary);
  word-break: break-all;
  user-select: none;
}

.token-safety-note {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

/* iOS Segmented Payment Method Switcher */
.pay-method-segment {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border-radius: 11px;
  background: var(--bg-subtle);
  margin-bottom: 10px;
}

.seg-glider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 5px);
  height: calc(100% - 6px);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.09);
  pointer-events: none;
  transition: transform 0.32s var(--ease-apple);
}

.pay-method-segment[data-active-index="1"] .seg-glider {
  transform: translateX(calc(100% + 4px));
}

.seg-btn {
  position: relative;
  z-index: 1;
  border: none;
  border-radius: 9px;
  padding: 8px 10px;
  min-height: 38px;
  font-size: 0.81rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
}

.seg-btn.active {
  color: var(--text-primary);
  font-weight: 600;
}

/* Inputs */
.field-group {
  margin-bottom: 10px;
}

textarea,
input[type="email"],
input[type="text"] {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  padding: 11px 13px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    min-height 0.28s var(--ease-apple),
    height 0.28s var(--ease-apple);
}

textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.8rem;
  min-height: 68px;
  max-height: 140px;
  resize: vertical;
}

textarea.verified-compact {
  min-height: 44px;
  height: 44px;
  overflow: hidden;
  color: var(--text-secondary);
}

textarea::placeholder,
input::placeholder {
  color: var(--text-tertiary);
}

textarea:focus,
input:focus {
  background: #ffffff;
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

/* Validation / Status Banners */
.status-banner {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
  line-height: 1.4;
}

.status-banner.ok {
  display: block;
  background: var(--apple-green-bg);
  border: 1px solid var(--apple-green-border);
  color: var(--apple-green);
  font-weight: 500;
}

.status-banner.err {
  display: block;
  background: var(--apple-red-bg);
  border: 1px solid var(--apple-red-border);
  color: var(--apple-red);
}

.status-banner.warn {
  display: block;
  background: var(--apple-amber-bg);
  border: 1px solid var(--apple-amber-border);
  color: var(--apple-amber);
}

/* Primary Apple Blue Button */
.btn-primary {
  width: 100%;
  min-height: 50px;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: var(--apple-blue);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, opacity 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: var(--apple-blue-hover);
  box-shadow: 0 6px 18px rgba(0, 113, 227, 0.28);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.988);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Bordered Consent Pill Cards (Apple Cupertino light interpretation) */
.consent-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 10px;
}

.consent-card-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 13px;
  background: var(--bg-subtle);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.consent-card-row:hover {
  border-color: rgba(0, 113, 227, 0.35);
}

.consent-card-row:has(input:checked) {
  background: rgba(0, 113, 227, 0.04);
  border-color: rgba(0, 113, 227, 0.38);
}

.consent-card-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.consent-check-box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #ffffff;
  border: 1.5px solid #c7c7cc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.14s ease;
}

.consent-card-row input[type="checkbox"]:checked + .consent-check-box {
  background: #22c55e;
  border-color: #22c55e;
  color: #ffffff;
}

.consent-card-text {
  font-size: 0.83rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.consent-card-text strong {
  font-weight: 700;
}

.warranty-inline-btn {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: #b45309;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.warranty-inline-btn:hover {
  color: #92400e;
}

.legal-separate-caption {
  text-align: center;
  font-size: 0.73rem;
  line-height: 1.42;
  color: var(--text-tertiary);
  margin: 2px 0 12px;
  padding: 0 4px;
}

.legal-separate-caption a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-separate-caption a:hover {
  color: var(--text-primary);
}

@keyframes apple-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.shake-attention {
  animation: apple-shake 0.36s ease;
}

.consent-card-row.shake-attention {
  background: rgba(217, 48, 37, 0.08);
  border-color: rgba(217, 48, 37, 0.45);
}

.footer-modal-link {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

.footer-modal-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Floating Warranty Popup Modal (Apple Sheet) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 500px;
  max-height: 86vh;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.28s var(--ease-apple);
}

.modal-backdrop.open .modal-sheet {
  transform: scale(1) translateY(0);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 13px;
  border-bottom: 1px solid var(--border-hairline);
}

.modal-head h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.modal-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, color 0.16s ease;
}

.modal-close-btn:hover {
  background: #e8e8ed;
  color: var(--text-primary);
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-rule-item strong {
  display: block;
  font-size: 0.86rem;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.modal-rule-item p {
  font-size: 0.81rem;
  line-height: 1.44;
  color: var(--text-secondary);
}

.modal-warn-box {
  background: var(--apple-amber-bg);
  border: 1px solid var(--apple-amber-border);
  border-radius: 13px;
  padding: 11px 13px;
  color: var(--apple-amber);
}

.modal-warn-box strong {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 4px;
}

.modal-warn-box p {
  font-size: 0.79rem;
  line-height: 1.42;
}

.modal-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border-hairline);
}

.modal-ok-btn {
  min-height: 44px;
  padding: 11px 16px;
}

.stub-summary-box {
  background: var(--bg-subtle);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.stub-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.stub-summary-row strong {
  color: var(--text-primary);
  font-weight: 600;
}

.stub-summary-row.total {
  padding-top: 7px;
  border-top: 1px solid var(--border-hairline);
  font-size: 0.92rem;
}

.stub-summary-row.total strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--apple-blue);
}

.stub-foot-actions {
  display: flex;
  gap: 10px;
}

.btn-secondary-pill {
  flex: 1;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-primary) !important;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: background 0.16s ease;
}

.btn-secondary-pill:hover {
  background: #e8e8ed;
}

.stub-foot-actions .modal-ok-btn {
  flex: 1;
}

/* FAQ Below the Fold */
.faq-section {
  max-width: 640px;
  margin: 0 auto 40px;
}

.faq-section h2 {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  text-align: center;
  color: var(--text-primary);
}

.faq-list {
  background: var(--bg-surface);
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

details.faq-item {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-hairline);
}

details.faq-item:last-child {
  border-bottom: none;
}

details.faq-item summary {
  font-size: 0.87rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: "+";
  font-size: 1.15rem;
  color: var(--text-tertiary);
  font-weight: 400;
  flex-shrink: 0;
}

details.faq-item[open] summary::after {
  content: "−";
}

details.faq-item p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Order Tracking Page */
.order-box {
  max-width: 560px;
  margin: 22px auto 44px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.timeline-step {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--bg-subtle);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.07);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.timeline-step.done {
  background: var(--apple-green-bg);
  color: var(--apple-green);
}

.timeline-step.done .step-num {
  background: var(--apple-green);
  color: #fff;
}

.timeline-step.current {
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.3);
  color: var(--text-primary);
  font-weight: 600;
}

.timeline-step.current .step-num {
  background: var(--apple-blue);
  color: #fff;
}

/* Legal Pages */
.legal-article {
  max-width: 680px;
  margin: 24px auto 48px;
}

.legal-article h1 {
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}

.legal-article h2 {
  font-size: 1.02rem;
  margin: 18px 0 6px;
  color: var(--text-primary);
}

.legal-article p,
.legal-article li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.legal-article ul {
  padding-left: 18px;
}

/* Minimalist Apple Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-hairline);
  padding: 18px 0 calc(18px + env(safe-area-inset-bottom));
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* ============== MOBILE-FIRST OPTIMIZATION (PHONES <= 640px) ============== */
@media (max-width: 640px) {
  .hide-mobile {
    display: none;
  }

  .container,
  .header-inner {
    padding: 0 12px;
  }

  .hero-compact {
    padding: 14px 0 13px;
  }

  .hero-status-pill {
    font-size: 0.69rem;
    padding: 3.5px 10px;
    margin-bottom: 8px;
  }

  .hero-compact h1 {
    font-size: 1.58rem;
    margin-bottom: 4px;
  }

  .hero-sub {
    font-size: 0.82rem;
    margin-bottom: 10px;
  }

  .hero-pills-row {
    gap: 6px;
  }

  .hero-feature-chip {
    font-size: 0.72rem;
    padding: 4.5px 9px;
    gap: 4px;
  }

  .plan-tiles {
    gap: 16px;
    margin-bottom: 16px;
  }

  .plan-tile {
    padding: 14px 14px 12px;
    border-radius: 17px;
  }

  .plan-glider {
    border-radius: 17px;
  }

  .tile-badge {
    left: 14px;
    top: -10px;
    font-size: 0.61rem;
    padding: 2px 9px;
  }

  .tile-top-row {
    gap: 9px;
    margin-bottom: 8px;
  }

  .tile-icon-box {
    width: 33px;
    height: 33px;
    border-radius: 9px;
  }

  .tile-gpt-svg {
    width: 20px;
    height: 20px;
  }

  .tile-name {
    font-size: 1.01rem;
  }

  .tile-price {
    font-size: 1.12rem;
  }

  .tile-check {
    width: 20px;
    height: 20px;
  }

  .tile-bullets {
    padding-left: 2px;
    font-size: 0.81rem;
    gap: 4px;
  }

  .apple-card {
    padding: 16px 15px;
    border-radius: 20px;
  }

  /* 16px отключает авто-зум экрана в iOS Safari и встроенном браузере Telegram */
  textarea,
  input[type="email"],
  input[type="text"] {
    font-size: 16px;
    padding: 10px 12px;
  }

  textarea {
    min-height: 62px;
  }

  .token-guide-box {
    padding: 11px 12px;
    border-radius: 14px;
  }

  .token-guide-steps {
    font-size: 0.78rem;
    gap: 5px;
  }

  .consent-card-row {
    padding: 11px 12px;
    gap: 10px;
  }

  .consent-card-text {
    font-size: 0.8rem;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-sheet {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 22px 22px 0 0;
    transform: translateY(100%);
  }

  .modal-backdrop.open .modal-sheet {
    transform: translateY(0);
  }

  .modal-foot {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  }
}
