:root {
  /* Brand palette, derived from the Voyzzz logo gradient. */
  --ink: #141859;
  --royal: #2b36d9;
  --sky: #3b8ef7;
  --violet: #8a3ff6;
  --magenta: #e73bc8;

  /* Neutrals */
  --bg: #ffffff;
  --panel: #f6f7fb;
  --border: #e4e6ef;
  --muted: #4b5178;

  /* Status */
  --error: #dc2626;
  --success: #059669;

  /* Fonts */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-ar: "Noto Sans Arabic", var(--font-sans);
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] .hero-lead,
html[lang="ar"] .intl-title,
html[lang="ar"] .card-sub {
  font-family: var(--font-ar);
}

.phone-ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }

body {
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  line-height: 1.5;
}

a { color: var(--royal); }

/* Gradient hero rule across the very top of the page */
.hero-rule {
  height: 4px;
  background: linear-gradient(90deg, var(--ink) 0%, var(--royal) 25%, var(--sky) 50%, var(--violet) 75%, var(--magenta) 100%);
}

/* Sticky top bar — mirrors the /admin shell */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(6px);
  -webkit-backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-mark {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.brand-mark img {
  width: 112px;
  height: 112px;
  display: block;
  object-fit: contain;
}

.lang { margin-left: auto; }

.lang select {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.lang select:focus-visible {
  outline: 2px solid var(--royal);
  outline-offset: 1px;
  border-color: var(--royal);
}

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

/* Page container */
main.page {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 { font-size: 1.5rem; margin: 0.25rem 0 0.5rem; }
h2 { font-size: 1.3rem; margin: 0 0 0.5rem; }
h3 { font-size: 1rem; margin: 1.1rem 0 0.35rem; }

p { margin: 0.4rem 0 0.75rem; }

/* Hero — the one place the phone number lives, big */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 3vw, 2rem);
  text-align: center;
  padding: 2.25rem 0 1.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

.hero-center {
  flex: 1 1 auto;
  min-width: 0;
  /* Reserve vertical space so the i18n-filled lead text + phone number + hint
     do not shift the layout when JS swaps in the translated strings (CLS fix).
     Measured filled heights: desktop ~332px, mobile ~260px. */
  min-height: clamp(16rem, 42vw, 22rem);
}

.hero-figure {
  flex: 0 0 auto;
  width: clamp(5rem, 18vw, 13rem);
  height: auto;
  object-fit: contain;
  user-select: none;
  pointer-events: none; /* decorative: don't steal clicks from the phone link */
}

.hero-lead {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 1rem;
}

.phone {
  display: inline-block;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--royal);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.phone-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.phone-flag {
  font-size: clamp(1.6rem, 5.5vw, 2.6rem);
  line-height: 1;
  /* Keep emoji flags out of the number gradient clip. */
  -webkit-text-fill-color: initial;
  color: initial;
}

.phone-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: clamp(1.5rem, 6vw, 3.2rem);
  line-height: 1.05;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--royal) 0%, var(--violet) 55%, var(--magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Internationale Einwahlnummern — kompakte Karte unter dem Hero */
.intl {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 1.3rem 1.2rem;
  margin: 0 0 1.75rem;
}

.intl-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.intl-lead { margin: 0 0 0.75rem; }

.intl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0.5rem;
}

.phone-intl {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-display);
  color: var(--royal);
  text-decoration: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.phone-intl:hover { border-color: var(--royal); }

.phone-intl:focus-visible {
  outline: 2px solid var(--royal);
  outline-offset: 2px;
}

.phone-intl .phone-flag {
  font-size: 1.4rem;
}

.phone-intl .phone-country {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.phone-intl .phone-number {
  justify-self: end;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.phone-hero:focus-visible {
  outline: 2px solid var(--royal);
  outline-offset: 4px;
  border-radius: 4px;
}

.hero-hint {
  margin: 0.9rem auto 0;
  max-width: 36rem;
}

.hero-anonym {
  margin: 1.15rem auto 0;
  max-width: 36rem;
  text-align: center;
}

.hero-anonym-title {
  margin: 0;
  font-family: var(--font-display, "Space Grotesk", system-ui, sans-serif);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--royal) 0%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-anonym-detail {
  margin: 0.45rem 0 0;
  max-width: 32rem;
  margin-inline: auto;
  line-height: 1.45;
}

/* Two-card row — stacks under ~720px */
.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.25rem;
  margin: 0 0 1.75rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-width: 0; /* prevents long numbers / tokens from overflowing the grid cell */
}

.card > h2 { margin-top: 0; }

.card-lead { margin-top: 0; }

.card-sub {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 1.1rem 0 0.35rem;
}

.card > *:first-child { margin-top: 0; }

/* Full-width payment panel below the cards */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem 1.4rem 1.5rem;
  margin: 0 0 1.75rem;
}

.panel[hidden] { display: none; }

/* Forms */
label {
  display: block;
  margin: 0.9rem 0 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input, textarea, button, select { font: inherit; }

input, textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--royal);
  outline-offset: 1px;
  border-color: var(--royal);
}

button {
  margin-top: 1rem;
  margin-right: 0.4rem;
  background: var(--royal);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, box-shadow 0.12s;
}

button:hover:not(:disabled) { background: var(--ink); }

button:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

button:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: default;
}

button[hidden], audio[hidden], #recording[hidden], .player-row[hidden] { display: none; }

/* Audio player with inline action buttons (e.g. discard). */
.player-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  /* Kill inline leading so neither child picks up stray baseline space. */
  line-height: 0;
}
.player-row audio {
  flex: 1 1 auto;
  margin-top: 0;
  min-width: 0;
  /* Pin audio height so the native pill and the icon button share a midline. */
  height: 2.5rem;
}
.player-row .icon-btn { align-self: center; }

.icon-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}
.icon-btn:hover:not(:disabled) {
  color: var(--error);
  border-color: var(--error);
  background: #fff;
}
.icon-btn:focus-visible {
  outline: 2px solid var(--royal);
  outline-offset: 2px;
}
.icon-btn svg { display: block; }

/* Kebab (⋯) menu — a <details> wrapper, <summary> is the toggle button,
   .kebab-menu is the popover. One <button class="kebab-item"> per action. */
.kebab {
  position: relative;
  flex: 0 0 auto;
  line-height: normal;
}
.kebab > summary {
  list-style: none;
  cursor: pointer;
}
.kebab > summary::-webkit-details-marker { display: none; }
.kebab > summary::marker { content: ""; }

.kebab-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  min-width: 10rem;
  padding: 0.3rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  box-shadow: 0 8px 24px rgba(20, 24, 89, 0.12);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.kebab-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: transparent;
  border: 0;
  border-radius: 0.4rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}
.kebab-item:hover:not(:disabled),
.kebab-item:focus-visible { background: var(--panel); outline: none; }
.kebab-item:disabled { opacity: 0.5; cursor: not-allowed; }
.kebab-item svg { flex: 0 0 auto; }
.kebab-item--danger { color: var(--error); }
.kebab-item--danger:hover:not(:disabled) { background: color-mix(in srgb, var(--error) 10%, transparent); }

button.secondary {
  background: transparent;
  color: var(--royal);
  box-shadow: inset 0 0 0 2px var(--royal);
}

button.secondary:hover:not(:disabled) { background: #fff; }

.disguise-check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-top: 1rem;
  font-weight: 600;
}

.disguise-check input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.15rem 0 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--royal);
}

#disguise-hint { margin: 0.35rem 0 0; }

/* Recording UI */
#recording-label, #recording-time {
  margin: 0.35rem 0 0;
  font-family: var(--font-sans);
}

#recording-time {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

#level {
  height: 8px;
  margin-top: 0.55rem;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

#level-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--royal), var(--violet), var(--magenta));
  transform: scaleX(0);
  transform-origin: left center;
}

audio {
  width: 100%;
  margin-top: 1rem;
}

.pack-group { margin: 1rem 0 0; }
.pack-group h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

/* Pay choices — grid of KPI-like cards (mirrors /admin .cards > .card) */
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.6rem;
  margin: 0.8rem 0 0;
}

.choice {
  position: relative;
  display: block;
  margin: 0;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--ink);
  font-size: 0.98rem;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}

.choice:hover { border-color: var(--ink); }

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: var(--royal);
  box-shadow: inset 0 0 0 1px var(--royal);
}

.choice:has(input:focus-visible) {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.choice-body {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Mailbox input + inline dropdown trigger for saved voiceboxes */
.mailbox-field {
  position: relative;
}

.mailbox-field input {
  padding-right: 2.6rem; /* room for the chevron button */
}

.mailbox-picker-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  box-shadow: none;
  font-size: 1rem;
  line-height: 1;
}

.mailbox-picker-toggle:hover:not(:disabled) {
  background: var(--panel);
  color: var(--royal);
}

.mailbox-picker-toggle[aria-expanded="true"] {
  color: var(--royal);
  background: var(--panel);
}

.mailbox-picker-toggle svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.12s;
}

.mailbox-picker-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.mailbox-picker {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  z-index: 10;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(20, 24, 89, 0.12);
  padding: 0.3rem;
  max-height: 18rem;
  overflow-y: auto;
}

.mailbox-picker[hidden] { display: none; }

.mailbox-picker-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem;
}

.mailbox-picker-pick {
  grid-column: 1 / 2;
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0;
  padding: 0.5rem 0.7rem;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  text-align: start;
  box-shadow: none;
  font-family: var(--font-display);
  cursor: pointer;
  min-width: 0;
}

.mailbox-picker-pick:hover:not(:disabled) {
  background: var(--panel);
}

.mailbox-picker-pick:focus-visible {
  outline: 2px solid var(--royal);
  outline-offset: -2px;
}

.mailbox-picker-label {
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 7em;
}

.mailbox-picker-digits {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.95rem;
  justify-self: end;
}

.mailbox-picker-action {
  margin: 0;
  padding: 0;
  width: 1.9rem;
  height: 1.9rem;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  box-shadow: none;
  font-size: 0.95rem;
  line-height: 1;
}

.mailbox-picker-action:hover:not(:disabled) {
  background: var(--panel);
  color: var(--ink);
}

.mailbox-picker-action[data-kind="remove"]:hover:not(:disabled) {
  background: var(--error);
  color: #fff;
}

.mailbox-picker-empty {
  margin: 0;
  padding: 0.7rem 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.mailbox-picker-foot {
  margin: 0.2rem 0 0;
  padding: 0.4rem 0.7rem 0.1rem;
  color: var(--muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
}

/* Save row — a single + button that expands into [input] [✓] [×] in-place. */
.box-save {
  margin: 0.4rem 0 0;
  display: flex;
  align-items: center;
  min-height: 2.2rem;
}

/* The flex display above overrides the HTML [hidden] attribute, which
   is why the row stayed visible after save/cancel. Force it off here. */
.box-save[hidden],
.box-save-inline[hidden] {
  display: none;
}

.box-save-plus,
.box-save-ok,
.box-save-cancel {
  margin: 0;
  padding: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--border);
  background: #fff;
  color: var(--royal);
}

.box-save-plus:hover:not(:disabled),
.box-save-ok:hover:not(:disabled) {
  background: var(--royal);
  color: #fff;
  box-shadow: none;
}

.box-save-cancel {
  color: var(--muted);
}

.box-save-cancel:hover:not(:disabled) {
  background: var(--panel);
  color: var(--ink);
}

.box-save-inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
}

.box-save-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding: 0.45rem 0.65rem;
  font-size: 0.95rem;
}

/* Mobile tightening */
@media (max-width: 48rem) {
  .mailbox-picker-label { max-width: 6em; }
}

/* Phone-keypad token used in the card and hero paragraphs */
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65em;
  height: 1.65em;
  padding: 0 0.3em;
  margin: 0 0.12em;
  border-radius: 0.5em;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border), inset 0 -1px 0 rgba(20, 24, 89, 0.04);
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
  font-size: 0.95em;
  vertical-align: baseline;
  translate: 0 -0.05em;
}

/* Notes, footer, status */
#credit-balance { min-height: 1.35em; margin: 0.35rem 0 0; }

.owner-session-meta {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--border);
}

.owner-credit-balance {
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.owner-inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 0.75rem;
}

.owner-inbox-actions button {
  flex: 1 1 10rem;
  margin: 0;
}

.owner-greeting {
  margin-top: 1rem;
}

#owner-greeting-panel[hidden],
#owner-inbox-panel[hidden] {
  display: none !important;
}

.owner-greeting-head {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.owner-greeting-listen-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.5rem 0;
}

.owner-greeting-listen-row audio {
  flex: 1 1 12rem;
  min-width: 0;
  height: 2.5rem;
}

.credit-warn {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid color-mix(in srgb, var(--error) 35%, var(--border));
  background: color-mix(in srgb, var(--error) 6%, var(--panel));
  color: var(--ink);
  font-size: 0.95rem;
}

.credit-warn p { margin: 0 0 0.5rem; }
.credit-warn p:last-of-type { margin-bottom: 0.65rem; }

.credit-warn-link {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--royal);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.credit-warn-link:hover { color: var(--violet); }

.note, footer {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

footer a { color: var(--royal); }

.status {
  min-height: 1.4rem;
  margin-top: 0.75rem;
}

.status[data-tone="success"] { color: var(--success); }
.status[data-tone="error"] { color: var(--error); }

.inbox-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 1rem;
}

.inbox-item {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.inbox-item .player-row {
  margin-top: 0.5rem;
}

.inbox-item .player-row .inbox-text {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
  /* Restore readable line-height overridden by .player-row { line-height: 0 }. */
  line-height: 1.5;
}

.owner-inbox-auth {
  margin-top: 0.75rem;
}

.owner-inbox-auth[hidden] {
  display: none !important;
}

/* Legacy styles kept for any out-of-tree callers; new UI uses .icon-btn. */
.inbox-actions {
  margin-top: 0.5rem;
}

.inbox-delete {
  font: inherit;
  font-size: 0.875rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: transparent;
  color: var(--error);
  cursor: pointer;
}

.inbox-delete:hover:not(:disabled) {
  background: color-mix(in srgb, var(--error) 8%, transparent);
}

.inbox-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.inbox-text {
  margin: 0.5rem 0 0;
  white-space: pre-wrap;
}

#owner-pin {
  margin-top: 0.5rem;
}

/* Native dialog for the "payment not live yet" modal */
/* Legal pages (Impressum / Datenschutz) — same shell, long-form body */
.legal {
  max-width: 48rem;
}

.legal h1 {
  font-size: 1.75rem;
  margin: 0.25rem 0 0.75rem;
}

.legal h2 {
  margin: 1.8rem 0 0.5rem;
  font-size: 1.15rem;
}

.legal ul, .legal ol {
  padding-left: 1.3rem;
  margin: 0.4rem 0 1rem;
}

.legal li { margin: 0.25rem 0; }

.legal address {
  font-style: normal;
  line-height: 1.55;
}

.legal .back-row {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.hero-register {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.hero-register-btn {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--royal);
  background: transparent;
  border: 2px solid var(--royal);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
}

.hero-register-btn:hover {
  background: rgba(43, 54, 217, 0.06);
}

.hero-register-lead,
.hero-register-phone {
  margin: 0;
  text-align: center;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--royal);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.onboard-dialog {
  border: none;
  border-radius: 1rem;
  padding: 0;
  max-width: 32rem;
  width: calc(100% - 2rem);
  box-shadow: 0 24px 48px rgba(20, 24, 89, 0.18);
}

.onboard-dialog::backdrop {
  background: rgba(20, 24, 89, 0.45);
}

.onboard-shell {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 40rem);
}

.onboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.onboard-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.onboard-close {
  font-size: 1.5rem;
  line-height: 1;
}

.onboard-body {
  padding: 1rem 1.1rem;
  overflow-y: auto;
  flex: 1;
}

.onboard-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem 1rem;
  border-top: 1px solid var(--border);
}

.onboard-legal {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 0;
}

.onboard-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: 1rem;
  font-size: 0.92rem;
}

.onboard-number {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2rem);
  letter-spacing: 0.08em;
  text-align: center;
  margin: 0.75rem 0;
}

.onboard-step label {
  display: block;
  margin-top: 0.75rem;
  font-weight: 500;
}

.onboard-step input[type="password"] {
  width: 100%;
  margin-top: 0.25rem;
}

/* Mobile */
@media (max-width: 48rem) {
  .topbar-inner { gap: 0.6rem; padding: 0.5rem 1rem; }
  .brand-mark img { width: 80px; height: 80px; }
  main.page { padding: 1rem 0.9rem 3rem; }
  .hero { padding: 1.25rem 0 1rem; margin-bottom: 1rem; gap: 0.4rem; }
  .hero-figure { width: clamp(3.5rem, 20vw, 7rem); }
  .phone-hero { font-size: clamp(1.4rem, 7vw, 2rem); gap: 0.3em; }
  .phone-flag { font-size: clamp(1.2rem, 5vw, 1.8rem); }
  .card, .panel, .intl { padding: 1.1rem 1rem 1.2rem; }
  .intl-list { gap: 0.4rem; }
  .phone-intl { padding: 0.55rem 0.7rem; gap: 0.5rem; }
  .phone-intl .phone-number { font-size: 0.95rem; }
}

/* Very narrow phones — stack figures above the number so nothing feels
   crammed below ~22rem (iPhone SE in landscape-blocked portrait). */
@media (max-width: 22rem) {
  .hero { flex-wrap: wrap; }
  .hero-figure { width: 4.5rem; order: 0; }
  .hero-center { flex: 1 1 100%; order: 1; }
}
