/* hmxh.app Standalone Redemption Surface (https://cdk.hmxh.app)
   Concentric Daylight Minimalism + Spring Micro-Interactions (aligned with DESIGN.md & r45). */
:root {
  color-scheme: light;
  --cdk-bg: #f5f5f7;
  --cdk-surface: #ffffff;
  --cdk-soft: #f2f3f6;
  --cdk-soft-hover: #e9ebf0;
  --cdk-ink: #111114;
  --cdk-ink-2: #3d3e45;
  --cdk-muted: #6e6e77;
  --cdk-blue: #0071e3;
  --cdk-blue-hover: #0062c7;
  --cdk-blue-soft: rgba(0, 113, 227, 0.09);
  --cdk-blue-ring: rgba(0, 113, 227, 0.16);
  --cdk-green: #10b981;
  --cdk-green-ink: #047857;
  --cdk-green-soft: rgba(16, 185, 129, 0.11);
  --cdk-amber: #f59e0b;
  --cdk-amber-ink: #b45309;
  --cdk-amber-soft: rgba(245, 158, 11, 0.13);
  --cdk-red: #ef4444;
  --cdk-red-ink: #b91c1c;
  --cdk-red-soft: rgba(239, 68, 68, 0.09);
  --cdk-border: rgba(17, 17, 20, 0.075);
  --cdk-border-strong: rgba(17, 17, 20, 0.13);
  --cdk-radius-card: 30px;
  --cdk-radius-inner: 20px;
  --cdk-radius-field: 16px;
  --cdk-radius-pill: 999px;
  --cdk-spring-snappy: cubic-bezier(.32, 1.24, .52, 1);
  --cdk-ease-enter: cubic-bezier(.22, 1, .36, 1);
  --cdk-ease-exit: cubic-bezier(.4, 0, 1, 1);
  --cdk-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  color: var(--cdk-ink);
  background: var(--cdk-bg);
}

@supports (animation-timing-function: linear(0, 1)) {
  :root {
    --cdk-spring-snappy: linear(0, .012 1.2%, .048 2.5%, .18 5.4%, .56 12.5%, .82 19%, .965 26%, 1.032 34%, 1.038 40%, 1.018 50%, 1.004 64%, .999 80%, 1);
    --cdk-ease-enter: linear(0, .009 1.5%, .037 3.2%, .14 6.6%, .48 15%, .76 23%, .93 33%, 1.008 46%, 1.012 56%, 1.003 72%, 1);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 76% 42% at 50% -8%, rgba(0, 113, 227, 0.065), transparent 66%),
    radial-gradient(ellipse 46% 32% at 88% 12%, rgba(16, 185, 129, 0.045), transparent 62%),
    var(--cdk-bg);
  color: var(--cdk-ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body[data-service="sms"] {
  background:
    radial-gradient(ellipse 76% 42% at 50% -8%, rgba(79, 102, 255, 0.07), transparent 66%),
    radial-gradient(ellipse 42% 30% at 14% 12%, rgba(0, 113, 227, 0.045), transparent 62%),
    var(--cdk-bg);
}

body[data-service="gemini"] {
  background:
    radial-gradient(ellipse 76% 42% at 50% -8%, rgba(139, 104, 192, 0.07), transparent 66%),
    var(--cdk-bg);
}

svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

button, a, summary {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2.5px solid var(--cdk-blue);
  outline-offset: 3px;
}

.is-mono {
  font-family: var(--cdk-mono);
}

/* ── Top-Center Dynamic Island Toast ── */
.cdk-toasts {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  width: min(368px, calc(100vw - 28px));
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.cdk-toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  backdrop-filter: blur(22px) saturate(185%);
  box-shadow:
    0 18px 40px -10px rgba(17, 17, 20, 0.16),
    0 4px 12px -2px rgba(17, 17, 20, 0.06),
    0 0 0 1px rgba(17, 17, 20, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  pointer-events: auto;
  animation: toastEnter 300ms var(--cdk-spring-snappy) both;
}

.cdk-toast[data-leaving="true"] {
  animation: toastExit 160ms var(--cdk-ease-exit) forwards;
}

.cdk-toast-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
  background: linear-gradient(180deg, #1ad194 0%, #0ea974 100%);
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.34);
}

.cdk-toast[data-tone="error"] .cdk-toast-dot {
  background: linear-gradient(180deg, #f85a5a 0%, #dc2626 100%);
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.34);
}

.cdk-toast[data-tone="info"] .cdk-toast-dot {
  background: linear-gradient(180deg, #258ef8 0%, #0071e3 100%);
  box-shadow: 0 3px 10px rgba(0, 113, 227, 0.34);
}

.cdk-toast-dot svg { width: 13px; height: 13px; stroke-width: 2.5; }

.cdk-toast-text {
  font-size: 13.5px;
  font-weight: 560;
  color: var(--cdk-ink);
  line-height: 1.4;
}

@keyframes toastEnter {
  from { opacity: 0; transform: translate3d(0, -14px, 0) scale(.94); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes toastExit {
  from { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: 0; transform: translate3d(0, -10px, 0) scale(.95); }
}

/* ── Floating Glass Topbar (Shrink-on-Scroll) ── */
.topbar-wrap {
  position: sticky;
  top: 14px;
  z-index: 40;
  padding: 0 16px;
  margin-top: 14px;
}

.topbar {
  max-width: 720px;
  min-height: 56px;
  margin: 0 auto;
  padding: 6px 10px 6px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: var(--cdk-radius-pill);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow:
    0 8px 28px -10px rgba(17, 17, 20, 0.1),
    0 1px 2px rgba(17, 17, 20, 0.04),
    0 0 0 1px rgba(17, 17, 20, 0.065),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  transition: transform 240ms var(--cdk-ease-enter), background-color 220ms ease, box-shadow 220ms ease;
}

body.is-scrolled .topbar {
  transform: scale(0.988);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 12px 32px -10px rgba(17, 17, 20, 0.14),
    0 2px 6px rgba(17, 17, 20, 0.05),
    0 0 0 1px rgba(17, 17, 20, 0.085),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

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

.identity img {
  width: 26px;
  height: 26px;
  flex: none;
}

.identity-sep {
  width: 1px;
  height: 16px;
  background: rgba(17, 17, 20, 0.12);
  flex: none;
}

.identity-service {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--cdk-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--cdk-radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cdk-green-ink);
  background: var(--cdk-green-soft);
  white-space: nowrap;
}

.status-pill[data-state="checking"] {
  color: var(--cdk-blue);
  background: var(--cdk-blue-soft);
}

.status-pill[data-state="paused"] {
  color: var(--cdk-amber-ink);
  background: var(--cdk-amber-soft);
}

.status-pill[data-state="unavailable"] {
  color: var(--cdk-red-ink);
  background: var(--cdk-red-soft);
}

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cdk-green);
  flex: none;
}

.status-pill[data-state="online"] .live-dot::after,
.live-dot.is-online::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.34);
  animation: dotPulse 2.4s ease-out infinite;
}

.status-pill[data-state="checking"] .live-dot { background: var(--cdk-blue); }
.status-pill[data-state="paused"] .live-dot { background: var(--cdk-amber); }
.status-pill[data-state="unavailable"] .live-dot { background: var(--cdk-red); }

@keyframes dotPulse {
  0% { transform: scale(.7); opacity: .9; }
  70%, 100% { transform: scale(2.1); opacity: 0; }
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: var(--cdk-radius-pill);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--cdk-ink-2);
  background: var(--cdk-soft);
  transition: background-color 160ms ease, color 160ms ease, transform 240ms var(--cdk-spring-snappy);
}

.lang-pill svg { width: 15px; height: 15px; opacity: .78; }

@media (hover: hover) and (pointer: fine) {
  .lang-pill:hover { background: var(--cdk-soft-hover); color: var(--cdk-ink); }
}
.lang-pill:active { transform: scale(.95); transition-duration: 90ms; }

/* ── Main Concentric Stage ── */
.stage-wrap {
  max-width: 752px;
  margin: clamp(22px, 4.5vh, 44px) auto 40px;
  padding: 0 16px;
}

.stage-card {
  background: var(--cdk-surface);
  border-radius: var(--cdk-radius-card);
  padding: 36px 40px 32px;
  box-shadow:
    0 1px 2px rgba(17, 17, 20, 0.04),
    0 22px 54px -18px rgba(17, 17, 20, 0.1),
    0 0 0 1px var(--cdk-border),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hero {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.service-emblem {
  width: 60px;
  height: 60px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  flex: none;
  background: linear-gradient(180deg, #fafbfc 0%, #f1f3f6 100%);
  box-shadow:
    0 4px 14px -4px rgba(17, 17, 20, 0.08),
    0 0 0 1px rgba(17, 17, 20, 0.065),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.service-emblem.is-chatgpt {
  background: linear-gradient(180deg, #f3fbf8 0%, #e7f6f0 100%);
  box-shadow: 0 6px 18px -6px rgba(18, 98, 82, 0.16), 0 0 0 1px rgba(18, 98, 82, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.service-emblem.is-sms {
  background: linear-gradient(180deg, #f4f6ff 0%, #eaeeff 100%);
  box-shadow: 0 6px 18px -6px rgba(60, 84, 255, 0.18), 0 0 0 1px rgba(60, 84, 255, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.service-emblem.is-gemini {
  background: linear-gradient(180deg, #f7f4fd 0%, #ede8fb 100%);
  box-shadow: 0 6px 18px -6px rgba(111, 90, 198, 0.18), 0 0 0 1px rgba(111, 90, 198, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.service-emblem img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.hero-copy {
  min-width: 0;
  flex: 1;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(23px, 3vw, 29px);
  line-height: 1.22;
  letter-spacing: -0.035em;
  font-weight: 720;
  color: var(--cdk-ink);
}

.hero-subtitle {
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--cdk-muted);
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--cdk-radius-pill);
  font-size: 12px;
  font-weight: 560;
  color: var(--cdk-ink-2);
  background: var(--cdk-soft);
}

.meta-chip svg {
  width: 12px;
  height: 12px;
  color: var(--cdk-green);
  stroke-width: 2.4;
}

.stage-divider {
  height: 1px;
  margin: 24px 0 26px;
  background: linear-gradient(90deg, transparent, rgba(17, 17, 20, 0.08) 12%, rgba(17, 17, 20, 0.08) 88%, transparent);
}

/* ── Progressive Timeline Form (ChatGPT) ── */
.timeline-form {
  display: flex;
  flex-direction: column;
}

.step-block {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
}

.step-block:not(.is-last) .step-body {
  padding-bottom: 24px;
}

.step-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-dot {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cdk-soft);
  color: var(--cdk-muted);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 20, 0.07);
  transition: background-color 240ms ease, color 240ms ease, box-shadow 240ms ease, transform 280ms var(--cdk-spring-snappy);
}

.step-ok {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.55);
  transition: opacity 200ms ease, transform 280ms var(--cdk-spring-snappy);
}

.step-ok svg { width: 14px; height: 14px; stroke-width: 2.6; }

.step-block[data-done="true"] .step-dot {
  background: var(--cdk-green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.34);
}

.step-block[data-done="true"] .step-num { opacity: 0; }
.step-block[data-done="true"] .step-ok { opacity: 1; transform: scale(1); }

.step-line {
  width: 2px;
  flex: 1;
  min-height: 18px;
  margin: 6px 0;
  border-radius: 2px;
  background: rgba(17, 17, 20, 0.08);
  transition: background-color 280ms ease;
}

.step-block[data-done="true"] .step-line {
  background: rgba(16, 185, 129, 0.45);
}

.step-body { min-width: 0; }

.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  min-height: 28px;
}

.step-label {
  display: block;
  font-size: 14.5px;
  font-weight: 660;
  letter-spacing: -0.015em;
  color: var(--cdk-ink);
}

.sub-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 620;
  color: var(--cdk-ink-2);
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--cdk-radius-pill);
  font-size: 12px;
  font-weight: 650;
  color: var(--cdk-blue);
  background: var(--cdk-blue-soft);
  animation: popIn 260ms var(--cdk-spring-snappy) both;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(.86); }
  to { opacity: 1; transform: scale(1); }
}

/* ── Recessed Tactile Inputs ── */
.field-wrap {
  position: relative;
}

.cdk-input, .cdk-textarea {
  display: block;
  width: 100%;
  border: 1.5px solid transparent;
  border-radius: var(--cdk-radius-field);
  background: var(--cdk-soft);
  color: var(--cdk-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  box-shadow: inset 0 1px 2px rgba(17, 17, 20, 0.045);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 220ms ease;
}

.cdk-input {
  height: 52px;
  padding: 0 44px 0 16px;
}

.cdk-textarea {
  min-height: 128px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

.cdk-input::placeholder, .cdk-textarea::placeholder {
  color: #848690;
  font-weight: 450;
}

@media (hover: hover) and (pointer: fine) {
  .cdk-input:hover:not(:focus):not(:disabled),
  .cdk-textarea:hover:not(:focus):not(:disabled) {
    background: #eceef3;
  }
}

.cdk-input:focus, .cdk-textarea:focus {
  outline: none;
  background: var(--cdk-surface);
  border-color: var(--cdk-blue);
  box-shadow: 0 0 0 4px var(--cdk-blue-ring), 0 6px 18px -6px rgba(0, 113, 227, 0.15);
}

.cdk-input[aria-invalid="true"], .cdk-textarea[aria-invalid="true"] {
  background: #fff9f9;
  border-color: var(--cdk-red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.cdk-input:disabled, .cdk-textarea:disabled {
  opacity: .56;
  cursor: not-allowed;
}

.input-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--cdk-muted);
  transition: background-color 150ms ease, color 150ms ease;
}

.input-clear svg { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) {
  .input-clear:hover { background: rgba(17, 17, 20, 0.08); color: var(--cdk-ink); }
}

/* ── Session Helper Bar & Recognition Banner ── */
.helper-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.session-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  animation: fadeSlideIn 220ms var(--cdk-ease-enter) both;
}

.session-banner[data-tone="ok"] {
  background: var(--cdk-green-soft);
  color: var(--cdk-green-ink);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.22);
}

.session-banner[data-tone="error"] {
  background: var(--cdk-red-soft);
  color: var(--cdk-red-ink);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.2);
}

.session-banner[data-tone="warn"] {
  background: var(--cdk-amber-soft);
  color: var(--cdk-amber-ink);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.24);
}

.session-banner-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
  background: var(--cdk-green);
}

.session-banner[data-tone="error"] .session-banner-badge { background: var(--cdk-red); }
.session-banner[data-tone="warn"] .session-banner-badge { background: var(--cdk-amber); }
.session-banner-badge svg { width: 12px; height: 12px; stroke-width: 2.6; }

.session-banner-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.session-banner-copy strong {
  font-weight: 680;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: #f8f9fb;
  color: var(--cdk-muted);
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 20, 0.045);
}

.security-note svg {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--cdk-blue);
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translate3d(0, 5px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ── Tactile Pill Buttons (matching hm-ui.css) ── */
.pill-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--cdk-radius-pill);
  font: inherit;
  font-size: 14.5px;
  font-weight: 620;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  color: var(--cdk-ink);
  background: var(--cdk-surface);
  box-shadow:
    0 1px 2px rgba(17, 17, 20, 0.07),
    0 0 0 1px rgba(17, 17, 20, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 280ms var(--cdk-spring-snappy), background-color 160ms ease, box-shadow 180ms ease, color 160ms ease, opacity 160ms ease;
}

.pill-btn.is-lg { min-height: 50px; padding: 0 24px; font-size: 15px; }
.pill-btn.is-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.pill-btn.is-xs { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.pill-btn.is-sm svg, .pill-btn.is-xs svg { width: 14px; height: 14px; }

.pill-btn.is-primary {
  color: #fff;
  background: linear-gradient(180deg, #1b82f0 0%, #0071e3 100%);
  box-shadow:
    0 1px 2px rgba(0, 72, 156, 0.28),
    0 10px 22px -6px rgba(0, 113, 227, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.pill-btn.is-ink {
  color: #fff;
  background: linear-gradient(180deg, #27272e 0%, #111114 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.24),
    0 8px 18px -6px rgba(17, 17, 20, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.pill-btn.is-soft {
  background: var(--cdk-soft);
  color: var(--cdk-ink);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 20, 0.055);
}

.pill-btn.is-ghost {
  background: transparent;
  color: var(--cdk-ink-2);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 20, 0.08);
}

.pill-btn.is-danger {
  background: var(--cdk-red-soft);
  color: var(--cdk-red-ink);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.2);
}

@media (hover: hover) and (pointer: fine) {
  .pill-btn:not(:disabled):hover { transform: translateY(-1px); }
  .pill-btn.is-primary:not(:disabled):hover {
    background: linear-gradient(180deg, #258cf8 0%, #0066cc 100%);
    box-shadow: 0 2px 4px rgba(0, 72, 156, 0.28), 0 14px 26px -6px rgba(0, 113, 227, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  }
  .pill-btn.is-ink:not(:disabled):hover {
    background: linear-gradient(180deg, #32323b 0%, #18181d 100%);
  }
  .pill-btn.is-soft:not(:disabled):hover { background: var(--cdk-soft-hover); }
  .pill-btn.is-ghost:not(:disabled):hover { background: var(--cdk-soft); color: var(--cdk-ink); }
  .pill-btn.is-danger:not(:disabled):hover { background: rgba(239, 68, 68, 0.15); }
}

.pill-btn:not(:disabled):active {
  transform: scale(.96);
  transition-duration: 90ms;
}

.pill-btn:disabled {
  opacity: .56;
  cursor: not-allowed;
}

.pill-btn[data-copied="true"] {
  color: var(--cdk-green-ink) !important;
  background: #ecfdf5 !important;
  box-shadow: 0 1px 2px rgba(4, 120, 87, 0.12), 0 0 0 1px rgba(16, 185, 129, 0.3) !important;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cta-row .is-primary {
  flex: 1 1 220px;
}

.cta-row.is-compact {
  margin-top: 16px;
}

.single-form .step-label {
  margin-bottom: 10px;
}

.single-form .cta-row {
  margin-top: 16px;
}

/* ── Inline Alert Banner ── */
.alert-box {
  margin-top: 14px;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
  background: var(--cdk-blue-soft);
  color: #164473;
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.16);
  animation: fadeSlideIn 200ms var(--cdk-ease-enter) both;
}

.alert-box[data-tone="error"] {
  background: var(--cdk-red-soft);
  color: var(--cdk-red-ink);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.22);
}

.alert-box[data-tone="success"] {
  background: var(--cdk-green-soft);
  color: var(--cdk-green-ink);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.24);
}

.alert-box[data-tone="warn"] {
  background: var(--cdk-amber-soft);
  color: var(--cdk-amber-ink);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.26);
}

/* ── Live Recharge Progress Stage ── */
.progress-stage {
  text-align: center;
  padding: 12px 0 8px;
  animation: fadeSlideIn 280ms var(--cdk-ease-enter) both;
}

.progress-visual {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(0, 113, 227, 0.16);
  border-top-color: var(--cdk-blue);
  animation: spin 1.15s linear infinite;
}

.visual-core {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #258ef8 0%, #0071e3 100%);
  box-shadow: 0 10px 26px -6px rgba(0, 113, 227, 0.45);
}

.core-spin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
}

.core-check, .core-fail, .core-review { display: none; }
.core-check svg, .core-fail svg, .core-review svg { width: 26px; height: 26px; stroke-width: 2.4; }

.progress-visual[data-phase="succeeded"] .orbit-ring {
  border-color: rgba(16, 185, 129, 0.24);
  animation: none;
}
.progress-visual[data-phase="succeeded"] .visual-core {
  background: linear-gradient(180deg, #1ad194 0%, #0ea974 100%);
  box-shadow: 0 12px 28px -6px rgba(16, 185, 129, 0.48);
  animation: popIn 380ms var(--cdk-spring-snappy) both;
}
.progress-visual[data-phase="succeeded"] .core-spin { display: none; }
.progress-visual[data-phase="succeeded"] .core-check { display: grid; }

.progress-visual[data-phase="failed"] .orbit-ring {
  border-color: rgba(239, 68, 68, 0.24);
  animation: none;
}
.progress-visual[data-phase="failed"] .visual-core {
  background: linear-gradient(180deg, #f85a5a 0%, #dc2626 100%);
  box-shadow: 0 12px 28px -6px rgba(239, 68, 68, 0.42);
}
.progress-visual[data-phase="failed"] .core-spin { display: none; }
.progress-visual[data-phase="failed"] .core-fail { display: grid; }

.progress-visual[data-phase="review"] .orbit-ring {
  border-color: rgba(245, 158, 11, 0.28);
  border-top-color: var(--cdk-amber);
}
.progress-visual[data-phase="review"] .visual-core {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  box-shadow: 0 12px 28px -6px rgba(245, 158, 11, 0.42);
}
.progress-visual[data-phase="review"] .core-spin { display: none; }
.progress-visual[data-phase="review"] .core-review { display: grid; }

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

.progress-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.progress-desc {
  margin: 8px auto 0;
  max-width: 480px;
  font-size: 14.5px;
  color: var(--cdk-ink-2);
}

.progress-safety {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--cdk-muted);
}

.mini-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 22px auto 0;
  padding: 0;
  list-style: none;
  max-width: 460px;
}

.mini-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 560;
  color: var(--cdk-muted);
}

.mini-steps i {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: var(--cdk-soft-hover);
}

.mini-steps li[data-state="done"] { color: var(--cdk-green-ink); }
.mini-steps li[data-state="done"] i { background: var(--cdk-green); }
.mini-steps li[data-state="active"] { color: var(--cdk-blue); }
.mini-steps li[data-state="active"] i { background: var(--cdk-blue); }
.mini-steps li[data-state="error"] { color: var(--cdk-red-ink); }
.mini-steps li[data-state="error"] i { background: var(--cdk-red); }

.voucher-box {
  margin: 22px auto 0;
  padding: 16px 18px;
  border-radius: var(--cdk-radius-inner);
  background: var(--cdk-soft);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 20, 0.055);
}

.voucher-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.voucher-meta {
  min-width: 0;
  flex: 1;
}

.voucher-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--cdk-muted);
}

.voucher-code {
  display: block;
  margin-top: 2px;
  font-family: var(--cdk-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--cdk-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

/* ── Codex SMS Digital Voucher Workspace ── */
.sms-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--cdk-soft);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 20, 0.05);
}

.ribbon-status, .ribbon-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ribbon-label {
  font-size: 13.5px;
  font-weight: 620;
  color: var(--cdk-ink);
}

.quota-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--cdk-radius-pill);
  font-size: 12.5px;
  font-weight: 680;
  color: var(--cdk-blue);
  background: var(--cdk-surface);
  box-shadow: 0 1px 2px rgba(17, 17, 20, 0.06), 0 0 0 1px rgba(0, 113, 227, 0.14);
  font-variant-numeric: tabular-nums;
}

.lease-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.lease-card {
  padding: 20px 22px;
  border-radius: var(--cdk-radius-inner);
  background: #f8f9fc;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 20, 0.07);
}

.lease-card[data-received="true"] {
  background: linear-gradient(180deg, #f3fcf8 0%, #f8fafc 100%);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.24);
}

.lease-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.lease-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lease-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: var(--cdk-radius-pill);
  font-size: 12.5px;
  font-weight: 640;
  color: var(--cdk-blue);
  background: var(--cdk-blue-soft);
}

.lease-pill.is-success { color: var(--cdk-green-ink); background: var(--cdk-green-soft); }
.lease-pill.is-error { color: var(--cdk-red-ink); background: var(--cdk-red-soft); }
.lease-pill.is-ended { color: var(--cdk-muted); background: rgba(17, 17, 20, 0.06); }

.lease-timer {
  font-family: var(--cdk-mono);
  font-size: 12.5px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  color: var(--cdk-ink-2);
  padding: 4px 10px;
  border-radius: var(--cdk-radius-pill);
  background: var(--cdk-surface);
  box-shadow: 0 0 0 1px rgba(17, 17, 20, 0.07);
}

.voucher-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(17, 17, 20, 0.065);
  border-bottom: 1px solid rgba(17, 17, 20, 0.065);
}

.voucher-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voucher-col-label {
  font-size: 12px;
  font-weight: 620;
  color: var(--cdk-muted);
}

.voucher-col-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.phone-value {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--cdk-mono);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--cdk-ink);
}

.phone-prefix {
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 680;
  color: var(--cdk-blue);
  background: var(--cdk-blue-soft);
}

.voucher-muted {
  font-size: 14px;
  font-weight: 520;
  color: var(--cdk-muted);
}

.otp-digits {
  display: inline-flex;
  gap: 5px;
}

.otp-digit {
  width: 30px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--cdk-surface);
  color: var(--cdk-ink);
  font-family: var(--cdk-mono);
  font-size: 18px;
  font-weight: 750;
  box-shadow: 0 2px 6px rgba(17, 17, 20, 0.06), 0 0 0 1px rgba(16, 185, 129, 0.28);
}

.otp-plain {
  font-family: var(--cdk-mono);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--cdk-green-ink);
}

.lease-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--cdk-ink-2);
}

.lease-warn {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--cdk-amber-ink);
  background: var(--cdk-amber-soft);
}

.lease-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* ── SMS History Table ── */
.history-panel {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(17, 17, 20, 0.075);
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.history-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 660;
}

.history-scroll {
  overflow-x: auto;
  border-radius: 16px;
  background: #fafafa;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 20, 0.06);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.history-table th, .history-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(17, 17, 20, 0.055);
  white-space: nowrap;
}

.history-table th {
  font-size: 12px;
  font-weight: 620;
  color: var(--cdk-muted);
  background: var(--cdk-soft);
}

.history-table tr:last-child td { border-bottom: 0; }

.history-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 2px 4px 2px 8px;
  border-radius: var(--cdk-radius-pill);
  font-family: var(--cdk-mono);
  font-size: 12.5px;
  font-weight: 680;
  color: var(--cdk-green-ink);
  background: var(--cdk-green-soft);
}

.history-copy-mini {
  border: 0;
  border-radius: var(--cdk-radius-pill);
  padding: 2px 8px;
  min-height: 24px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 620;
  color: var(--cdk-ink);
  background: var(--cdk-surface);
  box-shadow: 0 1px 2px rgba(17, 17, 20, 0.08);
}

.history-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.history-meta {
  font-size: 12.5px;
  color: var(--cdk-muted);
}

.history-pager {
  display: flex;
  gap: 8px;
}

/* ── Gemini Maintenance Panel ── */
.maintenance-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.maint-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 14px;
  border-radius: var(--cdk-radius-pill);
  font-size: 13px;
  font-weight: 640;
  color: var(--cdk-amber-ink);
  background: var(--cdk-amber-soft);
}

.maint-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cdk-amber);
}

.maint-box {
  padding: 22px 24px;
  border-radius: var(--cdk-radius-inner);
  background: var(--cdk-soft);
}

.maint-box h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 680;
}

.maint-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--cdk-ink-2);
}

/* ── Collapsible Utility Cards (Receipt Lookup & Guide) ── */
.utility-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(17, 17, 20, 0.075);
}

.utility-card {
  border-radius: 18px;
  background: #f8f9fb;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 20, 0.055);
  overflow: hidden;
  transition: background-color 180ms ease;
}

.utility-card[open] {
  background: #f6f7fa;
}

.utility-card summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 620;
  color: var(--cdk-ink);
}

.utility-card summary::-webkit-details-marker { display: none; }

.utility-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.utility-title svg { color: var(--cdk-blue); }

.chev {
  width: 16px;
  height: 16px;
  color: var(--cdk-muted);
  transition: transform 240ms var(--cdk-ease-enter);
}

details[open] > summary .chev {
  transform: rotate(180deg);
}

.utility-body {
  padding: 0 16px 16px;
}

.inline-form-row {
  display: flex;
  gap: 10px;
}

.inline-form-row .cdk-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  background: var(--cdk-surface);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 20, 0.09);
}

.guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-list li {
  position: relative;
  padding-left: 28px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--cdk-ink-2);
  counter-increment: guide-step;
}

.guide-list li::before {
  content: counter(guide-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--cdk-blue);
  background: var(--cdk-blue-soft);
}

.rules-panel {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--cdk-surface);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 20, 0.06);
}

.rules-panel h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 680;
  color: var(--cdk-ink);
}

.rules-panel ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--cdk-muted);
}

.noscript-bar {
  margin: 14px 0 0;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--cdk-amber-soft);
  color: var(--cdk-amber-ink);
  font-size: 13.5px;
  font-weight: 560;
}

/* ── Confirmation Modal Sheet (<dialog>) ── */
.confirm-sheet {
  padding: 0;
  border: 0;
  border-radius: 28px;
  width: min(440px, calc(100vw - 28px));
  background: var(--cdk-surface);
  color: var(--cdk-ink);
  box-shadow: 0 28px 68px -12px rgba(17, 17, 20, 0.28), 0 0 0 1px rgba(17, 17, 20, 0.08);
  overflow: hidden;
}

.confirm-sheet::backdrop {
  background: rgba(17, 17, 20, 0.36);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.confirm-sheet[open] {
  animation: sheetEnter 280ms var(--cdk-spring-snappy) both;
}

@keyframes sheetEnter {
  from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.96); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.sheet-inner {
  padding: 26px 26px 24px;
}

.sheet-head {
  text-align: center;
}

.sheet-badge {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--cdk-blue);
  background: var(--cdk-blue-soft);
}

.sheet-badge svg { width: 22px; height: 22px; }

.sheet-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sheet-desc {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--cdk-muted);
}

.confirm-list {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--cdk-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirm-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}

.confirm-list dt {
  color: var(--cdk-muted);
  flex: none;
}

.confirm-list dd {
  margin: 0;
  font-weight: 660;
  color: var(--cdk-ink);
  text-align: right;
  overflow-wrap: anywhere;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
  margin-top: 20px;
}

/* ── Quiet Footer Support Drawer ── */
.stage-footer {
  margin-top: 16px;
  text-align: center;
}

.support summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--cdk-radius-pill);
  font-size: 13.5px;
  font-weight: 580;
  color: var(--cdk-muted);
  transition: background-color 160ms ease, color 160ms ease;
}

.support summary::-webkit-details-marker { display: none; }
.support summary svg { width: 15px; height: 15px; }

@media (hover: hover) and (pointer: fine) {
  .support summary:hover { background: rgba(17, 17, 20, 0.055); color: var(--cdk-ink); }
}

.contacts {
  margin: 8px auto 0;
  max-width: 560px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px -12px rgba(17, 17, 20, 0.1), 0 0 0 1px var(--cdk-border);
  animation: fadeSlideIn 220ms var(--cdk-ease-enter) both;
}

.contacts-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--cdk-muted);
}

.contact-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 12px;
  border: 0;
  border-radius: var(--cdk-radius-pill);
  font: inherit;
  font-size: 13px;
  background: var(--cdk-soft);
  color: var(--cdk-ink);
  transition: background-color 150ms ease, transform 240ms var(--cdk-spring-snappy);
}

.contact-k { color: var(--cdk-muted); font-size: 12px; font-weight: 560; }
.contact-v { font-weight: 660; user-select: all; }
.contact-act { display: inline-flex; color: var(--cdk-muted); }
.contact-act svg { width: 13px; height: 13px; }

@media (hover: hover) and (pointer: fine) {
  .contact-chip:hover { background: var(--cdk-soft-hover); }
}
.contact-chip:active { transform: scale(.96); }
.contact-chip[data-copied="true"] {
  background: var(--cdk-green-soft);
  color: var(--cdk-green-ink);
}
.contact-chip[data-copied="true"] .contact-k,
.contact-chip[data-copied="true"] .contact-act { color: var(--cdk-green-ink); }

/* ── Responsive Breakpoints (1024 / 768 / 390) ── */
@media (max-width: 680px) {
  .topbar-wrap { top: 10px; padding: 0 12px; margin-top: 10px; }
  .topbar { min-height: 52px; padding: 6px 8px 6px 14px; gap: 8px; }
  .identity { gap: 8px; }
  .identity img { width: 24px; height: 24px; }
  .identity-service { font-size: 13.5px; }
  .status-pill { min-height: 30px; padding: 0 9px; font-size: 11.5px; gap: 5px; }
  .lang-pill { min-height: 36px; padding: 0 10px; font-size: 12.5px; }

  .stage-wrap { margin: 16px auto 32px; padding: 0 12px; }
  .stage-card { padding: 24px 18px 22px; border-radius: 26px; }
  .hero { gap: 14px; }
  .service-emblem { width: 48px; height: 48px; border-radius: 15px; }
  .service-emblem img { width: 28px; height: 28px; }
  .hero-copy h1 { font-size: 22px; }
  .hero-subtitle { font-size: 13.5px; }
  .stage-divider { margin: 18px 0 20px; }

  .step-block { grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
  .step-dot { width: 24px; height: 24px; font-size: 11.5px; }
  .step-block:not(.is-last) .step-body { padding-bottom: 20px; }

  .helper-bar .pill-btn.is-sm { min-height: 40px; padding: 0 12px; font-size: 12.5px; }
  .cta-row { flex-direction: column; }
  .cta-row .is-primary { flex: none; width: 100%; }
  .inline-form-row { flex-direction: column; }
  .voucher-split { grid-template-columns: 1fr; gap: 14px; }
  .voucher-row { flex-direction: column; align-items: stretch; }
  .sheet-actions { grid-template-columns: 1fr; }
  .otp-digit { width: 28px; height: 36px; font-size: 16.5px; }
  .history-scroll { background: transparent; box-shadow: none; overflow: visible; }
  .history-table, .history-table tbody { display: block; width: 100%; }
  .history-table thead { display: none; }
  .history-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: #fafafa;
    box-shadow: inset 0 0 0 1px rgba(17, 17, 20, 0.065);
  }
  .history-table tr:last-child { margin-bottom: 0; }
  .history-table td {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    border: 0;
    white-space: normal;
  }
  .history-table td:nth-child(1) { grid-column: 1 / -1; font-size: 12px; color: var(--cdk-muted); }
  .history-table td:nth-child(2) { grid-column: 1 / -1; font-size: 14px; font-weight: 600; }
  .history-table td:nth-child(3) { font-size: 12.5px; color: var(--cdk-ink-2); }
  .history-table td:nth-child(4) { justify-content: flex-end; font-size: 12.5px; color: var(--cdk-muted); }
  .history-code-pill { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .status-pill[data-state="online"] .live-dot::after,
  .live-dot.is-online::after { display: none; }
}

@media (prefers-contrast: more) {
  .stage-card, .topbar, .cdk-input, .cdk-textarea, .lease-card, .utility-card {
    box-shadow: inset 0 0 0 1.5px currentColor;
  }
}
