/* Novelbox — warm Scandi-inspired landing + interactive studio */

:root {
  --cream: #f7f4ef;
  --cream-deep: #efe9df;
  --ink: #2a2622;
  --ink-soft: #5c5650;
  --heading: #414141;
  --sage: #6b7c67;
  --sage-dark: #4f5d4c;
  --gold: #c5a059;
  --gold-soft: #e8d4b4;
  --white: #fdfcfa;
  --studio-bg: #0c0c0c;
  --clay: #6a3430;
  --dusky: #4f5a48;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 18px 50px rgba(42, 38, 34, 0.08);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-lid: "Bohemian Typewriter", "Courier New", Courier, monospace;

  /* Left lid panel within the 2000×1575 product PNGs (measured from clay_outer) */
  --lid-left: 9.35%;
  --lid-top: 14.98%;
  --lid-width: 38.85%;
  --lid-height: 70.16%;

  /* Right open-box panel (outer bounds); cover sits inset in the gold well */
  --box-left: 51.65%;
  --box-top: 13.78%;
  --box-width: 39.3%;
  --box-height: 71.3%;
  --box-inset-x: 2.35%;
  --box-inset-y: 2.55%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

h1,
h2,
h3 {
  color: var(--heading);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--sage-dark);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--cream);
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.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;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
  transition: transform 0.28s ease, opacity 0.28s ease;
  will-change: transform;
}

.site-header.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--sage-dark);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(79, 93, 76, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--sage);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  padding-inline: 1rem;
}

.btn-ghost:hover {
  color: var(--ink);
}

/* ——— Hero + studio ——— */

.hero {
  padding: clamp(1rem, 3vw, 1.75rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.hero-intro {
  margin-bottom: 0.35rem;
  max-width: none;
  text-align: center;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-dark);
  font-weight: 600;
  margin: 0 0 0.85rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
}

.hero-lead {
  margin: 0 auto;
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.studio {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  /* Pull up into the transparent padding baked into the product PNGs (~15% of image height) */
  margin-top: clamp(-7rem, -10vw, -2.5rem);
}

.studio-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 2000 / 1575;
  overflow: hidden;
  /* Pull controls up into the transparent padding under the boxes */
  margin-bottom: clamp(-5rem, -8vw, -1.75rem);
}

.studio-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  isolation: isolate;
  /* Font size on the lid tracks the image width as the window resizes */
  container-type: inline-size;
  container-name: studio;
  transform: scale(var(--zoom, 1));
  /* Zoom toward the left lid centre */
  transform-origin: 28.75% 50%;
  transition: transform 0.28s ease;
  will-change: transform;
}

.studio-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

/* Text sits on the LEFT lid panel of the product PNG */
.lid-write {
  position: absolute;
  left: var(--lid-left);
  top: var(--lid-top);
  width: var(--lid-width);
  height: var(--lid-height);
  z-index: 2;
  box-sizing: border-box;
  cursor: text;
}

.lid-write__input {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  /* Shrink-wrap so short lines sit dead-centre; wrap up to lid width */
  width: fit-content;
  min-width: 3ch;
  max-width: 78%;
  height: auto;
  max-height: 78%;
  margin: 0;
  padding: 0.35em 0.5em;
  border: none;
  background: transparent;
  font-family: var(--font-lid);
  /* Scales with the product image width (cqw), not just the viewport */
  font-size: clamp(0.45rem, 1.55cqw, 0.95rem);
  line-height: 1.45;
  text-align: center;
  overflow: auto;
  color: #111;
  caret-color: #111;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  cursor: text;
  display: block;
}

.lid-write__input:focus {
  outline: none;
}

.lid-write__input:empty::before {
  content: attr(data-placeholder);
  color: color-mix(in srgb, #111 40%, transparent);
  pointer-events: none;
}

.lid-write:focus-within {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 70%, transparent);
}

/* Book cover sitting in the right-hand open box */
.box-cover {
  position: absolute;
  left: calc(var(--box-left) + var(--box-inset-x));
  top: calc(var(--box-top) + var(--box-inset-y));
  width: calc(var(--box-width) - (var(--box-inset-x) * 2));
  height: calc(var(--box-height) - (var(--box-inset-y) * 2));
  max-width: none;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 1px;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.98);
  transform-origin: center center;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
  box-shadow:
    inset 0 0 0 1px rgba(42, 38, 34, 0.08),
    0 6px 18px rgba(42, 38, 34, 0.18);
  background: var(--cream-deep);
}

.box-cover[hidden] {
  display: none !important;
}

.box-cover.is-visible {
  opacity: 1;
  transform: scale(1);
}

.isbn-row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.isbn-row .text-input {
  flex: 1;
  min-width: 0;
}

.btn-isbn {
  flex-shrink: 0;
  white-space: nowrap;
  padding-inline: 1.1rem;
  box-shadow: none;
}

.btn-isbn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.book-result {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 1.1rem;
  align-items: center;
  /* Clear the studio viewport's negative bottom margin so this isn't buried */
  margin: 1.25rem auto 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  box-shadow: 0 8px 28px rgba(42, 38, 34, 0.05);
}

.book-result__copy {
  flex: 1;
  min-width: 0;
}

.book-preview-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  color: var(--ink-soft);
  white-space: nowrap;
}

.book-preview-toggle[hidden] {
  display: none !important;
}

.book-preview-toggle__text {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.book-preview-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.book-preview-toggle__switch {
  position: relative;
  width: 2.1rem;
  height: 1.2rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
  transition: background 0.18s ease;
  flex-shrink: 0;
}

.book-preview-toggle__switch::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(42, 38, 34, 0.22);
  transition: transform 0.18s ease;
}

.book-preview-toggle input:checked + .book-preview-toggle__switch {
  background: var(--sage-dark);
}

.book-preview-toggle input:checked + .book-preview-toggle__switch::after {
  transform: translateX(0.9rem);
}

.book-preview-toggle:hover {
  color: var(--ink);
}

.book-preview-toggle input:focus-visible + .book-preview-toggle__switch {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.book-result[hidden],
.book-result-status[hidden] {
  display: none !important;
}

.book-result__cover {
  width: 72px;
  height: 108px;
  max-width: 72px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--cream-deep);
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(42, 38, 34, 0.12);
}

.book-result__cover.is-empty {
  display: none;
}

.book-result__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-dark);
}

.book-result__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 550;
  line-height: 1.25;
  color: var(--ink);
}

.book-result__meta {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.book-result-status {
  position: relative;
  z-index: 3;
  margin: 0.15rem auto 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.book-result-status.is-error {
  color: #8a3a32;
}

.studio-controls {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 0 0.5rem;
}

.studio-controls-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .studio-controls-row {
    grid-template-columns: 1fr 1fr auto;
    gap: 1.5rem;
    align-items: end;
  }

  .studio-controls-row--order {
    grid-template-columns: minmax(0, 1.4fr) auto;
    align-items: end;
  }
}

.control-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 0.55rem;
}

.tip-btn {
  position: relative;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-body);
  line-height: 1;
  cursor: help;
}

.tip-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.tip-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.55rem);
  transform: translateX(-50%) translateY(0.25rem);
  width: min(16.5rem, 70vw);
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.45;
  text-align: left;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
  z-index: 20;
}

.tip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
}

.tip-btn:hover .tip-bubble,
.tip-btn:focus-visible .tip-bubble,
.tip-btn:focus .tip-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.text-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.85rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.text-input::placeholder {
  color: color-mix(in srgb, var(--ink-soft) 75%, transparent);
  font-weight: 400;
  letter-spacing: 0;
}

.text-input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: color-mix(in srgb, var(--sage) 45%, transparent);
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: var(--white);
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: var(--white);
}

.zoom-btn {
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s ease;
}

.zoom-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--sage) 14%, var(--white));
}

.zoom-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.zoom-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.zoom-label {
  min-width: 3.25rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.control-group {
  border: none;
  margin: 0;
  padding: 0;
}

.control-group legend {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 0.55rem;
  padding: 0;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.segment {
  margin: 0;
  cursor: pointer;
}

.segment input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.segment > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.segment:hover > span {
  border-color: color-mix(in srgb, var(--sage) 45%, transparent);
}

.segment input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.segment input:checked + span {
  border-color: var(--sage-dark);
  box-shadow: 0 0 0 1px var(--sage-dark);
  background: color-mix(in srgb, var(--sage) 12%, var(--white));
}

.swatch {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.swatch-clay {
  background: var(--clay);
}

.swatch-dusky {
  background: var(--dusky);
}

.studio-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.studio-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.35rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.price-tag {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 550;
  color: var(--ink);
  line-height: 1.1;
}

.price-note {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

.lid-char-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* ——— Story / gallery ——— */

.section {
  padding: clamp(2.5rem, 7vw, 4.5rem) 0;
}

.section-muted {
  background: linear-gradient(
    180deg,
    var(--cream-deep) 0%,
    var(--cream) 100%
  );
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.65rem, 3.5vw, 2.1rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.section-intro {
  margin: 0 0 2rem;
  max-width: none;
  color: var(--ink-soft);
}

.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
  }
}

.gallery figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-deep);
  box-shadow: 0 8px 28px rgba(42, 38, 34, 0.06);
}

.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery figure:hover img {
  transform: scale(1.03);
}

.features {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.feature-card {
  padding: 1.5rem 1.35rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
  box-shadow: 0 10px 36px rgba(42, 38, 34, 0.04);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 550;
  margin: 0 0 0.5rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--ink-soft);
}

.icon-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  margin-bottom: 1rem;
}

.review {
  margin: 0;
  max-width: 42rem;
}

.review-stars {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  line-height: 1;
}

.review-quote {
  margin: 0;
}

.review-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.review-author {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.faq {
  display: flex;
  flex-direction: column;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.faq-item {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 550;
  color: var(--ink);
  line-height: 1.35;
}

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

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--sage-dark);
  transition: transform 0.2s ease;
}

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

.faq-item summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

.faq-body {
  padding: 0 0 1.25rem;
  max-width: 52rem;
}

.faq-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-inner p {
  margin: 0;
}

.footer-email {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}

.footer-email:hover {
  color: var(--ink);
  border-bottom-color: color-mix(in srgb, var(--ink) 45%, transparent);
}

@media (min-width: 560px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
  z-index: 80;
  max-width: calc(100% - 2rem);
  text-align: center;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.mono-hint {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  opacity: 0.85;
}

@media (max-width: 520px) {
  .header-actions .btn-ghost {
    display: none;
  }
}
