/* N-Codes public page.
   Full rebuild (not a recolor) to match tickets.heaven.market's own product
   shell - same spacing scale, font tokens, card/field/button components and
   "app shell" structure (topbar + hero + settings-section-style
   panels) as the real dashboard, instead of the generic third-party
   "key activation widget" layout this page started life with.

   Token values (space scale, font shorthand, palette) are copied verbatim
   from dashboard/styles.css's :root block so this reads as the same product,
   not a skinned clone.

   One deliberate exception: the small "N" tile is Netflix's own product
   mark, so it keeps Netflix's red (--netflix-red) rather than being
   recolored - every other accent on this page (buttons, focus rings,
   badges, the selected-device state, the activation link) uses --brand,
   the same blue HeavenMarket uses everywhere else. */

@font-face { font-family: "Aeonik TRIAL"; src: url("/assets/fonts/Aeonik-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Aeonik TRIAL"; src: url("/assets/fonts/Aeonik-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Aeonik TRIAL"; src: url("/assets/fonts/Aeonik-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Aeonik TRIAL"; src: url("/assets/fonts/Aeonik-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;

  /* ---- exact spacing scale from dashboard/styles.css :root ---- */
  --space-2: 0.2rem;
  --space-4: 0.4rem;
  --space-6: 0.6rem;
  --space-8: 0.8rem;
  --space-10: 1rem;
  --space-12: 1.2rem;
  --space-14: 1.4rem;
  --space-16: 1.6rem;
  --space-20: 2rem;
  --space-24: 2.4rem;
  --space-32: 3.2rem;
  --space-48: 4.8rem;

  /* ---- exact color tokens from dashboard/styles.css :root ---- */
  --color-brand-400: #6f98f1;
  --color-brand-500: #2f69ea;
  --color-brand-600: #1759e8;
  --color-brand-700: #154fcc;
  --color-blue-soft: #8bb5e8; /* dashboard's secondary "info" accent, e.g. .admin-chip.active */

  --color-gray-100: #f3f4f8;
  /* #8b93a5, not #99a2b3 - matches dashboard/styles.css's own --text-muted,
     which was deliberately darkened from a lighter grey that failed WCAG AA
     contrast (~3.7:1) against this same --card-bg/#13161f. This page's
     "muted" text should read exactly as dark as the real dashboard's. */
  --color-gray-400: #8b93a5;
  --color-gray-700: #657084;

  --color-green: #32d583; /* dashboard's success tone (.admin-bot-dot.is-on, .admin-badge.tone-green) */
  --color-amber: #fbbf24; /* dashboard's warning tone (.admin-warning-banner) */
  --netflix-red: #e50914; /* Netflix's own brand red - see note above */

  --bg: #0a0d14;
  --card: #13161f;
  --card-border: #1e2329; /* dashboard's --settings-card-border, used for cards and nested boxes alike */
  --field: #0d1017;
  /* #1e2329, not #232938 - matches dashboard/styles.css's own
     --settings-card-border so every nested box here (the key input, the
     activation-link field, the device-tips panel) reads as dark as the
     real product's own nested boxes, not a lighter outline. */
  --field-border: #1e2329;

  --text: var(--color-gray-100);
  --muted: var(--color-gray-400);
  --faint: var(--color-gray-700);

  --brand: var(--color-brand-500);
  --brand-wash: rgba(47, 105, 234, 0.08);

  --green: var(--color-green);
  --amber: var(--color-amber);

  /* ---- exact font shorthands from dashboard/styles.css :root ---- */
  --font: "Aeonik TRIAL", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --font-display-30-semibold: 600 3rem/3.8rem var(--font);
  --font-text-20-semibold: 600 2rem/3rem var(--font);
  --font-text-16-semibold: 600 1.6rem/2.4rem var(--font);
  --font-text-16-regular: 400 1.6rem/2.4rem var(--font);
  --font-text-14-semibold: 600 1.4rem/2rem var(--font);
  --font-text-14-medium: 500 1.4rem/2rem var(--font);
  --font-text-14-regular: 400 1.4rem/2rem var(--font);
  --font-text-12-medium: 500 1.2rem/1.8rem var(--font);
  --font-text-11-semibold: 600 1.1rem/1.6rem var(--font);

  --default-transition: all 0.2s ease-in-out;
  --ease: 0.2s ease-in-out;
}

* { box-sizing: border-box; }

html {
  font-size: 62.5%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: var(--font-text-16-regular);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 2rem 6rem;
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------ topbar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  padding: var(--space-24) 0.4rem;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: var(--space-32);
}

.topbar-brand { display: flex; align-items: center; gap: var(--space-12); }

.topbar-mark {
  display: grid;
  place-items: center;
  width: 3.8rem;
  height: 3.8rem;
  flex: none;
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: var(--space-10);
  background: var(--card);
}
.topbar-mark svg { width: 1.9rem; height: 1.25rem; }

.topbar-copy { display: flex; align-items: center; gap: var(--space-10); }
.topbar-name { font: var(--font-text-16-semibold); letter-spacing: -0.005em; }

.topbar-pill {
  height: 2.2rem;
  padding: 0 var(--space-10);
  display: inline-flex;
  align-items: center;
  border-radius: var(--space-6);
  border: 1px solid var(--field-border);
  color: var(--muted);
  font: var(--font-text-12-medium);
}

/* ------------------------------------------------------------ hero */

.hero {
  padding: 0 0.4rem;
  margin-bottom: var(--space-32);
  text-align: left;
  max-width: 46rem;
}

.hero-title {
  margin: 0 0 var(--space-10);
  color: var(--text);
  font: var(--font-display-30-semibold);
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 0;
  color: var(--muted);
  font: var(--font-text-16-regular);
}

.key-warn {
  margin: var(--space-8) 0 0;
  color: var(--amber);
  font: var(--font-text-12-medium);
  line-height: 1.45;
}

/* ------------------------------------------------------------ cards */

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--space-16);
  padding: var(--space-24);
  margin-bottom: var(--space-16);
}

/* ------------------------------------------------------------ field label
   Shared small tracked label used above the key input and the activation
   link field below - same shape as the dashboard's own field labels. */
.field-label {
  display: block;
  margin-bottom: var(--space-8);
  color: var(--muted);
  font: var(--font-text-11-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------ key entry */

.keyform { display: flex; flex-direction: column; }

.key-input-row { position: relative; }

.key-mark-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
}

.key-mark-icon svg {
  display: block;
  width: 2rem;
  height: 2rem;
}

.key-input-icon {
  position: absolute;
  left: var(--space-16);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.key-input {
  width: 100%;
  height: var(--space-48);
  padding: 0 var(--space-16) 0 4.4rem;
  border-radius: var(--space-10);
  border: 1px solid var(--field-border);
  background: var(--field);
  color: var(--text);
  caret-color: var(--brand);
  font: 400 1.7rem/2.4rem var(--mono);
  letter-spacing: 0.1em;
  outline: none;
  transition: var(--default-transition);
}

.key-input::placeholder { color: var(--faint); font-weight: 400; letter-spacing: 0.03em; }
.key-input:hover { border-color: rgba(255, 255, 255, 0.15); }
.key-input:focus { border-color: var(--brand); }

/* status row under the input */
.keymeta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-12) var(--space-16);
  margin-top: var(--space-16);
  animation: rise 0.28s ease;
}

.product {
  display: inline-flex;
  align-items: center;
  gap: var(--space-10);
  color: var(--text);
  font: var(--font-text-14-medium);
}

.badges { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: var(--space-8); justify-content: flex-end; }

/* Same tinted-pill shape as the admin dashboard's .admin-badge (not a full
   999px pill) - default tone matches .admin-badge.tone-blue. */
.badge {
  display: inline-flex;
  align-items: center;
  height: 2.4rem;
  padding: 0 var(--space-10);
  border-radius: var(--space-6);
  color: var(--color-blue-soft);
  background: rgba(139, 181, 232, 0.12);
  font: var(--font-text-12-medium);
  white-space: nowrap;
}

.badge--warn { color: var(--amber); background: rgba(247, 144, 9, 0.12); }
.badge--muted { color: var(--muted); background: rgba(255, 255, 255, 0.05); }

.btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-10);
  width: 100%;
  height: var(--space-48);
  margin-top: var(--space-20);
  padding: 0 var(--space-24);
  border: 1px solid var(--color-brand-600);
  border-radius: var(--space-10);
  /* Dashboard's .btn-primary: flat brand-600, one shade darker on hover. */
  background: var(--color-brand-600);
  color: #fff;
  font: var(--font-text-16-semibold);
  cursor: pointer;
  transition: var(--default-transition);
}

.btn-main:hover:not(:disabled) { background: var(--color-brand-700); border-color: var(--color-brand-700); }
.btn-main:active:not(:disabled) { transform: translateY(1px); }
.btn-main:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-main.is-working { opacity: 1; cursor: progress; }
.btn-main.is-done:disabled { opacity: 1; cursor: default; }
.btn-main:focus-visible, .btn-reset:focus-visible, .device:focus-visible,
.email-login-btn:focus-visible, .icon-btn:focus-visible {
  outline: 2px solid var(--color-brand-400);
  outline-offset: 3px;
}

.btn-main-icon { display: inline-flex; width: 1.8rem; height: 1.8rem; }
.btn-main-icon svg { width: 100%; height: 100%; }

.spinner {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  flex: none;
}
.spinner--brand { border-color: rgba(47, 105, 234, 0.25); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.notice {
  margin-top: var(--space-16);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--space-10);
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.1);
  color: var(--amber);
  font: var(--font-text-14-medium);
  transition: opacity 0.18s ease;
}
.notice.is-fading { opacity: 0; }
.notice.is-info { border-color: var(--field-border); background: rgba(255, 255, 255, 0.03); color: var(--muted); }

/* ------------------------------------------------------------ N tile
   Flat dark tile with Netflix's red lettermark - same dark box + 1px border
   treatment as every other nested box on the page, no gradient or glow. The
   mark keeps Netflix red (see the file header note). */
.n-tile {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 5rem;
  height: 5rem;
  border-radius: var(--space-12);
  border: 1px solid var(--field-border);
  background: var(--field);
  color: var(--netflix-red);
}

.n-tile__mark {
  display: block;
  width: 50%;
  height: 50%;
}

.n-tile--sm {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: var(--space-8);
}

.n-tile--sm .n-tile__mark { width: 56%; height: 56%; }

.n-tile--result { margin-top: 0.1rem; }

/* ------------------------------------------------------------ result */

/* Crossfade between the key form and the result card. is-prep / is-leaving
   are applied around the hidden toggle so the fade can run (display:none
   cannot be transitioned). */
#redeemFlow,
#result {
  transition: opacity 0.32s ease, transform 0.32s ease;
}

#redeemFlow.is-prep,
#result.is-prep,
#redeemFlow.is-leaving,
#result.is-leaving {
  opacity: 0;
  transform: translateY(0.8rem);
  pointer-events: none;
}

@keyframes rise { from { opacity: 0; transform: translateY(0.8rem); } to { opacity: 1; transform: none; } }

.result-hero {
  padding-bottom: var(--space-20);
  border-bottom: 1px solid var(--field-border);
}

.result-brand {
  display: flex;
  align-items: flex-start;
  gap: var(--space-14);
}

.result-head { min-width: 0; flex: 1; padding-top: var(--space-2); }

.result-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-8);
  width: 100%;
}

.result-title {
  margin: 0;
  color: var(--text);
  font: 600 2.4rem/2.6rem var(--font);
  letter-spacing: 0.04em;
}

.result-tags {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  flex-wrap: wrap;
  margin-left: auto;
}

.result-sub {
  margin: 0;
  color: var(--muted);
  font: var(--font-text-16-regular);
  letter-spacing: -0.01em;
}

/* Status pills beside the product title - same shape, different tones. */
.result-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  height: 2.6rem;
  padding: 0 var(--space-10);
  border-radius: var(--space-6);
  font: var(--font-text-12-medium);
  white-space: nowrap;
}

.result-pill svg { flex: none; opacity: 0.95; }

/* Same flat tinted badges as the admin dashboard's .admin-badge (no border). */
.result-pill--active {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
}

.result-pill--time {
  background: rgba(139, 181, 232, 0.12);
  color: var(--color-blue-soft);
}

/* Key strip under the hero - inset field panel like the dashboard's nested rows. */
.result-key-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-10) var(--space-12);
  margin-top: var(--space-20);
  padding: var(--space-12) var(--space-14);
  border-radius: var(--space-12);
  border: 1px solid var(--field-border);
  background: var(--field);
}

.result-key-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-10);
  min-width: 0;
  flex: 1;
}

.result-key-main .key-mark-icon svg {
  width: 1.8rem;
  height: 1.8rem;
}

.result-key {
  color: var(--muted);
  font: 400 1.5rem/2.2rem var(--mono);
  letter-spacing: 0.1em;
  word-break: break-all;
}

/* Lets a customer start over with a different key without hunting for the
   (possibly scrolled-away) input above - same quiet-ghost treatment as the
   dashboard's own small utility buttons, deliberately understated next to
   the KEY row rather than competing with the main REDEEM CTA. */
.btn-reset {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  height: 3.6rem;
  padding: 0 var(--space-14);
  border-radius: var(--space-10);
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: var(--font-text-14-medium);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--default-transition);
}
.btn-reset:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); border-color: #2d3446; }
.btn-reset svg { flex: none; color: var(--muted); transition: var(--default-transition); }
.btn-reset:hover svg { color: var(--text); }

.devices { margin-top: var(--space-24); padding-top: var(--space-24); border-top: 1px solid var(--card-border); }

/* Same component as the real dashboard's .section-title / .section-description
   pair (icon + heading, muted description underneath). */
.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  margin: 0;
  color: var(--text);
  font: var(--font-text-16-semibold);
}
.section-title svg { color: var(--text); flex: none; }

.icon-device-pc,
.icon-device-mobile,
.icon-device-tv {
  display: block;
  width: 1.8rem;
  height: 1.8rem;
}
.section-description { margin: var(--space-4) 0 0; color: var(--muted); font: var(--font-text-14-regular); }

/* A segmented control, not bordered icon tiles - same "selected" treatment
   (tinted blue background + brand-400 text) as the dashboard sidebar's own
   .nav-item.active .nav-link. */
.device-switch {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-16);
  padding: var(--space-4);
  border-radius: var(--space-12);
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
}

.device {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  height: 4rem;
  border: 0;
  border-radius: var(--space-10);
  background: transparent;
  color: var(--muted);
  font: var(--font-text-14-medium);
  cursor: pointer;
  transition: var(--default-transition);
}

.device svg { flex: none; transition: var(--default-transition); }
.device:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }

.device.is-selected {
  background: rgba(47, 105, 234, 0.12);
  color: var(--color-brand-400);
}
.device.is-selected svg { color: var(--color-brand-400); }

.device-hint { display: none; }

.device-tips {
  margin-top: var(--space-16);
  padding: var(--space-16) var(--space-18, 1.8rem);
  border-radius: var(--space-12);
  border: 1px solid var(--field-border);
  background: var(--field);
}
.device-tips:empty { display: none; }
.device-tips h4 { margin: 0; color: var(--text); font: var(--font-text-14-semibold); }
.tip-list { margin: var(--space-10) 0 0; padding-left: 1.9rem; color: var(--muted); font: var(--font-text-14-regular); }
.tip-list li { margin-bottom: var(--space-6); }
.tip-list li:last-child { margin-bottom: 0; }
.tip-list strong, .tip-note strong { color: var(--text); font-weight: 600; }
.device-tips > p { margin: var(--space-10) 0 0; color: var(--muted); font: var(--font-text-14-regular); }
.tip-note {
  margin-top: var(--space-14);
  padding-top: var(--space-12);
  border-top: 1px dashed var(--field-border);
  color: var(--muted);
  font: var(--font-text-14-regular);
}

/* ------------------------------------------------------------ field
   Same labeled-row + copy/open-tools shape as the real customer dashboard's
   delivery preview fields (dashboard/script.js writeDeliveryPreview()) -
   this is literally the component a customer already sees elsewhere on the
   site for "here's your credential, here's a copy button". */
.field { margin-top: var(--space-24); padding-top: var(--space-24); border-top: 1px solid var(--card-border); }

.field-row {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: var(--space-10);
  padding: var(--space-4) var(--space-16);
  min-height: 4.8rem;
}

.field-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--muted);
  font: 400 1.35rem/2rem var(--mono);
  letter-spacing: 0.04em;
  padding: var(--space-8) 0;
}

/* Same link-row / email-login-btn / icon-btn as dashboard/script.js delivery preview. */
.link-row {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-top: var(--space-10);
}

.link-row .email-login-btn {
  flex: 1;
  width: auto;
  min-width: 0;
}

.link-row .icon-btn {
  flex-shrink: 0;
}

.email-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  height: 4rem;
  padding: 0 var(--space-14);
  border-radius: var(--space-10);
  border: 1px solid rgba(47, 105, 234, 0.35);
  background: rgba(47, 105, 234, 0.12);
  color: #9db7f5;
  text-decoration: none;
  font: var(--font-text-14-medium);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.email-login-btn:hover {
  background: rgba(47, 105, 234, 0.2);
  border-color: rgba(47, 105, 234, 0.55);
  color: #fff;
}

/* External-link icon always after the label text (Open link → icon). */
.email-login-btn svg {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.icon-btn {
  appearance: none;
  width: 4rem;
  height: 4rem;
  border-radius: var(--space-10);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn svg {
  width: 1.8rem;
  height: 1.8rem;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

.icon-btn.is-copied {
  background: rgba(47, 105, 234, 0.16) !important;
  border-color: rgba(47, 105, 234, 0.45) !important;
  color: var(--color-brand-400) !important;
}

.demo-note {
  margin: var(--space-16) 0 0;
  padding: var(--space-12) var(--space-16);
  border-radius: var(--space-12);
  border: 1px dashed rgba(251, 191, 36, 0.5);
  color: var(--amber);
  text-align: center;
  font: var(--font-text-14-medium);
}

.foot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-16);
  margin-top: var(--space-8);
  color: var(--faint);
  font: var(--font-text-14-regular);
}
.foot a { display: inline-flex; align-items: center; gap: var(--space-6); color: var(--muted); text-decoration: none; }
.foot a svg { color: var(--faint); flex: none; }
.foot a:hover { color: var(--text); }
.foot a:hover svg { color: var(--text); }

/* ------------------------------------------------------------ redeem progress */

.loadbar { margin-top: var(--space-16); }

.loadbar-track {
  height: 0.4rem;
  border-radius: 99px;
  background: var(--field-border);
  overflow: hidden;
}

.loadbar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--color-brand-500);
  transition: width 0.7s cubic-bezier(0.22, 0.8, 0.24, 1);
}

.loadbar-fill.is-wait {
  width: 28%;
  animation: loadbar 1.8s ease-in-out infinite;
}

@keyframes loadbar {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(380%); }
}

.loadbar-label {
  margin: var(--space-8) 0 0;
  color: var(--muted);
  font: var(--font-text-14-regular);
  transition: opacity 0.18s ease;
}

.loadbar-label.is-fading { opacity: 0; }

/* ------------------------------------------------------------ small screens */

@media (max-width: 640px) {
  .shell { padding: 0 1.4rem 4rem; }
  .topbar { padding: var(--space-16) 0.2rem; margin-bottom: var(--space-24); }
  .card { padding: var(--space-16); border-radius: 1.4rem; }
  .hero-title { font: 600 2.4rem/3.2rem var(--font); }

  .hero { margin-bottom: var(--space-24); }

  .key-input { font-size: 1.5rem; letter-spacing: 0.08em; }

  .badges { margin-left: 0; justify-content: flex-start; }

  /* Same row as desktop: title left, time badge on the right. Active is
     dropped here so the subtitle can sit tight under the title. */
  .result-title-row { flex-direction: row; align-items: center; }
  .result-tags { margin-left: auto; }
  .result-pill--active { display: none; }
  .result-title { font: 600 2.2rem/2.4rem var(--font); }
  .result-sub { margin-top: 0; font: var(--font-text-14-regular); }

  .result-key-bar { flex-direction: column; align-items: stretch; }
  .result-key-main { flex-wrap: nowrap; width: 100%; min-width: 0; }
  .result-key {
    min-width: 0;
    font-size: 1.3rem;
    line-height: 1.9rem;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
  }
  .btn-reset { margin-left: 0; width: 100%; justify-content: center; }

  .device-switch { flex-wrap: nowrap; }
  .device { min-width: 0; gap: var(--space-6); padding: 0 var(--space-4); font-size: 1.3rem; }

  .field-row { padding: var(--space-8) var(--space-12); min-height: 0; }
  .field-input {
    font-size: 1.25rem;
    line-height: 1.8rem;
    letter-spacing: 0.02em;
    padding: var(--space-6) 0;
    overflow-wrap: anywhere;
  }
  /* Keep Copy on the same row, to the right of Open link. */
  .link-row { flex-wrap: nowrap; align-items: stretch; }
  .link-row .email-login-btn { flex: 1 1 auto; min-width: 0; height: auto; min-height: 4rem; }
  .link-row .icon-btn { align-self: stretch; width: 4.4rem; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
