/* Wish KH — public page styles (moved out of index.php on 2026-10-12, unchanged).
   Loaded as assets/app.css?v=<file time>. */
  :root {
    --ink: #1c2321;
    --cream: #fbf6ec;
    --cream-dim: #f1e9d8;
    --gold: #c79a46;
    --gold-soft: #e4c988;
    --maroon: #7a2530;
    --maroon-dark: #5f1c25;
    --sage: #3f5d54;
    --text: #2b2118;
    --text-dim: #6b6055;
    --radius-lg: 20px;
    --radius-md: 12px;
    --font-display: 'Moul', cursive;
    --font-ui: 'Kantumruy Pro', sans-serif;
    --shadow-lift: 0 18px 40px rgba(28,35,33,0.16);
  }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html { scroll-behavior: smooth; }
  body {
    font-family: var(--font-ui);
    background: var(--cream-dim);
    margin: 0;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom);
  }
  ::selection { background: var(--gold-soft); color: var(--ink); }
  button, input, textarea, select { font-family: inherit; }
  :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  img { max-width: 100%; }

  /* ---------- Hero ---------- */
  .inapp-banner {
    display: flex; align-items: center; gap: 10px; background: var(--maroon); color: #fff;
    padding: 10px 16px; font-size: 0.78rem; line-height: 1.5; position: sticky; top: 0; z-index: 50;
  }
  .inapp-banner span { flex: 1; }
  .inapp-banner .inapp-open-chrome {
    width: auto; height: auto; border-radius: 10px; padding: 8px 12px; font-size: 0.82rem; font-weight: 700;
    background: var(--gold); color: var(--ink); white-space: nowrap; align-items: center;
  }
  .inapp-banner strong { color: var(--gold-soft); }
  .inapp-banner button {
    flex-shrink: 0; background: rgba(255,255,255,0.15); border: none; color: #fff; width: 24px; height: 24px;
    border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 1;
  }

  .hero {
    background:
      radial-gradient(circle at 15% 20%, rgba(199,154,70,0.18), transparent 45%),
      radial-gradient(circle at 85% 80%, rgba(122,37,48,0.28), transparent 50%),
      var(--ink);
    color: var(--cream);
    padding: 22px 20px 30px;
    text-align: center;
    position: relative;
  }
  /* A restrained nod to Angkor ornamentation: one fading gold line with a
     small centered diamond, rather than a busy repeating pattern. */
  .hero::after {
    content: '';
    position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
    width: 180px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
  }
  .hero::before {
    content: '';
    position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%) rotate(45deg);
    width: 7px; height: 7px; background: var(--gold); border-radius: 2px;
    box-shadow: 0 0 8px rgba(199,154,70,0.6); z-index: 1;
  }
  .hero-seal {
    width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 50%;
    background: linear-gradient(145deg, var(--gold-soft), var(--gold));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(199,154,70,0.4);
    font-size: 1rem; padding: 7px; overflow: hidden;
  }
  .hero-seal img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
  .hero-brand {
    font-family: var(--font-ui); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.12em;
    color: var(--gold-soft); text-transform: uppercase; margin: 0 0 6px;
  }
  .hero h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.25rem, 3.6vw, 1.7rem);
    margin: 0 0 6px;
  }
  .hero p {
    color: rgba(251,246,236,0.72);
    font-size: 0.85rem;
    margin: 0;
    max-width: 420px;
    margin-inline: auto;
  }

  /* 🔥 "today N people made a card" — only printed on busy days (index.php $showHot) */
  .hero-hot {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
    padding: 6px 16px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
    background: rgba(199,154,70,0.16); border: 1px solid rgba(199,154,70,0.45); color: var(--gold-soft);
  }
  .hero-hot strong { color: var(--cream); font-weight: 700; }

  .page { max-width: 1080px; margin: 0 auto; padding: 28px 16px 100px; }

  .section { margin-bottom: 24px; }
  .section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
  .seal-num {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
    background: var(--ink); color: var(--gold-soft);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 0.9rem;
    box-shadow: 0 3px 8px rgba(28,35,33,0.25);
  }
  .section-head h2 { font-size: 1.05rem; margin: 0; font-weight: 700; }
  .section-head .sub { font-size: 0.8rem; color: var(--text-dim); margin-top: 2px; }

  .panel {
    background: var(--cream);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-lift);
    border: 1px solid rgba(28,35,33,0.05);
  }

  /* ---------- Step 1: gallery ---------- */
  /* ---------- Search box ---------- */
  .gallery-search { position: relative; margin-bottom: 16px; }
  .gallery-search .icon {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 0.85rem;
    opacity: 0.45; pointer-events: none; line-height: 1; width: 18px; text-align: center;
  }
  .gallery-search input[type="text"] {
    width: 100%; height: 46px; padding: 0 16px 0 48px; border: 1.5px solid rgba(28,35,33,0.12); border-radius: 23px;
    font-size: 14px; background: #fff; color: var(--text); font-family: inherit;
    box-shadow: 0 2px 8px rgba(28,35,33,0.05); transition: border-color 0.15s, box-shadow 0.15s;
  }
  .gallery-search input::placeholder { color: var(--text-dim); opacity: 0.7; }
  .gallery-search input:focus {
    outline: none; border-color: var(--gold); box-shadow: 0 2px 12px rgba(199,154,70,0.2);
  }

  /* ---------- Category tabs (primary "menu") ---------- */
  .category-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .category-tab {
    flex: 0 0 auto; padding: 8px 18px; border-radius: 20px; border: 1.5px solid rgba(122,37,48,0.18);
    background: #fff; color: var(--maroon); font-weight: 700; font-size: 0.84rem; cursor: pointer;
    font-family: inherit; transition: 0.15s; white-space: nowrap;
  }
  .category-tab:hover { background: rgba(122,37,48,0.06); }
  .category-tab.active { background: var(--maroon); color: #fff; border-color: var(--maroon); }

  .year-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 14px; -webkit-overflow-scrolling: touch; }
  .year-tab {
    flex: 0 0 auto; padding: 7px 16px; border-radius: 20px; border: 1.5px solid rgba(28,35,33,0.12);
    background: #fff; color: var(--text-dim); font-weight: 700; font-size: 0.82rem; cursor: pointer;
    font-family: inherit; transition: 0.15s; white-space: nowrap;
  }
  .year-tab:hover { border-color: var(--gold); }
  .year-tab.active { background: var(--ink); color: var(--gold-soft); border-color: var(--ink); }
  .frame-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  @media (min-width: 480px) { .frame-gallery { grid-template-columns: repeat(3, 1fr); } }
  @media (min-width: 700px) { .frame-gallery { grid-template-columns: repeat(4, 1fr); } }
  @media (min-width: 900px) { .frame-gallery { grid-template-columns: repeat(5, 1fr); } }
  .frame-item {
    cursor: pointer; border-radius: var(--radius-md); overflow: hidden;
    border: 2px solid transparent; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    background: #fff; display: flex; flex-direction: column;
  }
  .frame-item:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(28,35,33,0.18); }
  .frame-item.selected { border-color: var(--gold); box-shadow: 0 8px 22px rgba(199,154,70,0.4); }
  .frame-item .tile-img-wrap {
    position: relative;
    background: linear-gradient(160deg, #f1e9d8, #e6d9ba);
  }
  .frame-item img { width: 100%; aspect-ratio: 3/4; object-fit: contain; display: block; }
  .frame-item .year-badge {
    position: absolute; top: 7px; left: 7px; background: rgba(28,35,33,0.65); color: #f3e3c2;
    font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; backdrop-filter: blur(2px);
  }
  /* Top-3 medal — big and ringed so the most popular templates stand out at a glance */
  .frame-item .rank-badge {
    position: absolute; top: 6px; right: 6px; z-index: 1;
    width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 35% 30%, #fff, #fbf1d9); font-size: 1.45rem; line-height: 1;
    border: 2px solid var(--gold); box-shadow: 0 3px 10px rgba(0,0,0,0.35), 0 0 0 3px rgba(255,255,255,0.55);
  }
  @media (min-width: 700px) { .frame-item .rank-badge { width: 44px; height: 44px; font-size: 1.6rem; } }
  /* selected ✓ sits beside the medal instead of covering it */
  .frame-item .rank-badge ~ .tick { right: 52px; top: 14px; }
  @media (min-width: 700px) { .frame-item .rank-badge ~ .tick { right: 56px; top: 16px; } }
  /* Year + "new" badges stacked in the top-left corner */
  .frame-item .tile-badges { position: absolute; top: 7px; left: 7px; display: flex; flex-wrap: wrap; gap: 4px; z-index: 1; max-width: calc(100% - 60px); }
  .frame-item .tile-badges .year-badge { position: static; }
  .frame-item .new-badge {
    background: linear-gradient(135deg, #e53935, var(--maroon)); color: #fff; font-size: 0.65rem; font-weight: 700;
    padding: 2px 8px; border-radius: 20px; box-shadow: 0 2px 6px rgba(122,37,48,0.4); white-space: nowrap;
  }
  .frame-item .tick {
    position: absolute; top: 7px; right: 7px; z-index: 3; width: 24px; height: 24px; border-radius: 50%;
    background: var(--gold); color: var(--ink); display: none; align-items: center; justify-content: center;
    font-size: 12px; font-weight: bold; box-shadow: 0 3px 8px rgba(0,0,0,0.25); z-index: 2;
  }
  .frame-item.selected .tick { display: flex; }
  .frame-item .swatch-dots {
    position: absolute; bottom: 6px; left: 6px; display: flex; gap: 3px;
    background: rgba(0,0,0,0.35); padding: 3px 5px; border-radius: 20px;
  }
  .frame-item .swatch-dots span {
    width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.7); display: block;
  }
  .frame-item .share-btn {
    position: absolute; bottom: 7px; right: 7px; z-index: 2;
    display: inline-flex; align-items: center; gap: 4px;
    height: 28px; padding: 0 11px 0 9px; border-radius: 14px;
    background: var(--maroon); color: #fff;
    border: 1.5px solid rgba(255,255,255,0.85);
    font-family: inherit; font-size: 0.74rem; font-weight: 700; line-height: 1;
    cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,0.35);
    transition: transform 0.15s, background 0.15s;
  }
  .frame-item .share-btn .ic {
    width: 14px; height: 14px; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 2.5;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .frame-item .share-btn:hover { background: var(--maroon-dark); transform: scale(1.06); }
  .frame-item .share-btn:active { transform: scale(0.95); }
  .frame-item .cap-name {
    padding: 7px 9px 0; font-size: 0.74rem; font-weight: 700; color: var(--text); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; text-align: center;
  }
  .frame-item .cap-date {
    padding: 2px 9px 0; font-size: 0.62rem; color: var(--text-dim); text-align: center; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
  }
  .frame-item .cap {
    padding: 3px 9px 7px; font-size: 0.68rem; color: var(--text-dim); display: flex; align-items: center;
    justify-content: center; gap: 5px;
  }
  .frame-item .cap .dl { font-weight: 700; color: var(--maroon); }
  .empty-note { text-align: center; color: var(--text-dim); padding: 36px 16px; font-size: 0.92rem; line-height: 1.6; }

  /* ---------- Step 2 ---------- */
  #step2 { display: none; }
  .back-link {
    display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer;
    color: var(--maroon); font-weight: 700; font-size: 0.86rem; padding: 0; margin-bottom: 16px; font-family: inherit;
  }
  .back-link:hover { text-decoration: underline; }

  .editor-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
  @media (min-width: 880px) {
    .editor-grid { grid-template-columns: 370px 1fr; align-items: start; }
    .preview-panel { position: sticky; top: 20px; }
  }

  /* Style-variant thumbnail strip (when a frame has 1–5 alternate looks) */
  .variant-strip {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  }
  .variant-item { flex: 0 0 auto; width: 62px; cursor: pointer; text-align: center; background: none; border: none; padding: 0; font-family: inherit; }
  .variant-item img {
    width: 62px; height: 78px; object-fit: contain; border-radius: 9px; display: block;
    background: linear-gradient(160deg, #f1e9d8, #e6d9ba);
    border: 2px solid transparent; transition: 0.15s; box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  }
  .variant-item.active img { border-color: var(--gold); box-shadow: 0 4px 12px rgba(199,154,70,0.45); }
  .variant-item .label {
    font-size: 0.66rem; margin-top: 5px; color: var(--text-dim); white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 62px;
  }
  .variant-item.active .label { color: var(--maroon); font-weight: 700; }
  .variant-strip-title { font-size: 0.82rem; font-weight: 700; margin-bottom: 10px; color: var(--text-dim); }

  .field-group { margin-bottom: 18px; }
  .field-group > label {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px;
    font-weight: 700; font-size: 0.86rem;
  }
  .btn-mini {
    padding: 6px 12px; border-radius: 7px; border: 1px solid rgba(28,35,33,0.18); background: var(--cream-dim);
    font-weight: 700; font-size: 12px; cursor: pointer; color: var(--text); transition: 0.15s;
  }
  .btn-mini:hover { background: var(--gold-soft); border-color: var(--gold); }

  textarea, input[type=text] {
    width: 100%; padding: 12px 13px; border: 1.5px solid rgba(28,35,33,0.14); border-radius: 10px;
    font-size: 16px; resize: vertical; background: #fff; color: var(--text); transition: border-color 0.15s;
  }
  textarea:focus, input:focus { border-color: var(--gold); }
  .hint-red { color: var(--maroon); font-size: 11.5px; display: block; margin-top: 6px; line-height: 1.5; }

  .style-row { display: flex; gap: 10px; flex-wrap: wrap; }
  .style-row .field { flex: 1; min-width: 120px; }
  .style-row label { font-size: 0.78rem; font-weight: 700; margin-bottom: 6px; display: block; color: var(--text-dim); }
  select {
    width: 100%; padding: 10px 11px; border: 1.5px solid rgba(28,35,33,0.14); border-radius: 10px;
    font-size: 14px; background: #fff; color: var(--text);
  }
  input[type=color] {
    width: 100%; padding: 3px; height: 42px; cursor: pointer; border: 1.5px solid rgba(28,35,33,0.14); border-radius: 10px;
  }

  .file-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px;
    text-align: center; background: var(--cream-dim); color: var(--maroon);
    border: 2px dashed var(--gold); border-radius: var(--radius-md); cursor: pointer; font-weight: 700; font-size: 14px;
    transition: 0.15s;
  }
  .file-btn:hover { background: var(--gold-soft); }
  .file-btn input {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
  .file-btn.has-file { border-style: solid; color: var(--sage); background: #eef4ee; }

  .crop-controls { margin-top: 12px; display: none; }
  .crop-controls.active { display: block; }
  .crop-controls .zoom-row { display: flex; align-items: center; gap: 10px; }
  .crop-controls .rotate-reset-btn {
    background: none; border: none; font-size: 1rem; cursor: pointer; padding: 4px; line-height: 1;
    border-radius: 6px; transition: 0.15s; flex-shrink: 0;
  }
  .crop-controls .rotate-reset-btn:hover { background: rgba(28,35,33,0.08); transform: rotate(-25deg); }
  .crop-controls .zoom-row span { font-size: 1rem; color: var(--text-dim); }
  .crop-controls .zoom-row input[type=range] { flex: 1; }
  /* Touch-friendly slider thumb, applied to every range slider on the page
     (photo zoom here, and the text-size slider further down) — native
     defaults are often a tiny ~12-16px thumb, genuinely hard to grab
     precisely with a fingertip. */
  input[type=range] {
    height: 28px; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
  }
  input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 4px; background: rgba(28,35,33,0.12); }
  input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; margin-top: -11px;
    width: 28px; height: 28px; border-radius: 50%; background: var(--maroon);
    border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.3); cursor: pointer;
  }
  input[type=range]::-moz-range-track { height: 6px; border-radius: 4px; background: rgba(28,35,33,0.12); }
  input[type=range]::-moz-range-thumb {
    width: 22px; height: 22px; border-radius: 50%; background: var(--maroon);
    border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.3); cursor: pointer;
  }
  .crop-controls .note { font-size: 11.5px; color: var(--text-dim); margin-top: 6px; line-height: 1.5; }

  /* ---------- Preview ---------- */
  .preview-panel {
    background: linear-gradient(160deg, rgba(199,154,70,0.22), rgba(28,35,33,0.78));
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(199,154,70,0.35);
    border-radius: var(--radius-lg); padding: 14px;
    box-shadow: 0 14px 40px rgba(28,35,33,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
  }
  .preview-panel .preview-label {
    display: table; margin: 0 auto 10px; padding: 4px 14px; border-radius: 20px;
    background: rgba(20,15,10,0.5); backdrop-filter: blur(6px);
    color: var(--cream); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.6px;
    text-transform: uppercase; text-align: center;
  }
  .template-stat {
    display: none; align-items: center; justify-content: center; gap: 6px; margin: -4px auto 12px;
    width: fit-content; padding: 6px 14px; border-radius: 20px; background: rgba(20,15,10,0.55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(199,154,70,0.45); color: var(--gold-soft); font-size: 0.76rem; font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  }
  .template-stat.show { display: flex; }
  .preview-container {
    position: relative; width: 100%; max-width: 460px; margin: 0 auto; line-height: 0; border-radius: 10px; overflow: hidden;
    container-type: inline-size; container-name: frame; box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    transition: max-width 0.2s ease;
  }
  /* Landscape templates would otherwise render tiny and float in a lot of
     leftover panel background — let them use the full available width
     instead of the narrower portrait-oriented cap. */
  .preview-container.is-landscape { max-width: 100%; }
  .frame-bg { width: 100%; height: auto; display: block; transition: opacity 0.15s ease; }
  .frame-bg.is-loading { opacity: 0.35; }
  .preview-spinner {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    z-index: 15; pointer-events: none;
  }
  .spinner-ring {
    width: 44px; height: 44px; border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.35); border-top-color: var(--gold);
    animation: spin 0.8s linear infinite; box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  /* Light deterrent against casual right-click-save / drag-save of template
     artwork. Not a real security boundary — see README for the honest
     limits of what client-side protection can do. */
  .frame-bg, .frame-item img, .variant-item img {
    pointer-events: none; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none;
  }

  .photo-wrap { position: absolute; overflow: hidden; z-index: 1; touch-action: none; cursor: grab; }
  .photo-wrap:active { cursor: grabbing; }
  .photo-wrap img {
    position: absolute; max-width: none; max-height: none; user-select: none; pointer-events: none; -webkit-user-drag: none;
  }
  .photo-blur-bg {
    filter: blur(18px) brightness(0.75); transform: scale(1.15); /* scale avoids blurred edges revealing the wrap's own background */
  }
  .photo-wrap.empty { background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
  .photo-wrap.empty::after { content: '📷'; font-size: 20px; opacity: 0.55; }

  @keyframes floatDrag { 0%{transform:translate(-50%,0);opacity:1;} 50%{transform:translate(-50%,-15px);opacity:0.6;} 100%{transform:translate(-50%,0);opacity:1;} }
  .drag-hint {
    position: absolute; top: 58%; left: 50%; transform: translateX(-50%); z-index: 10;
    background: rgba(0,0,0,0.62); color: #fff; padding: 7px 14px; border-radius: 20px; font-size: 0.8rem;
    pointer-events: none; animation: floatDrag 2s infinite; display: flex; align-items: center; gap: 6px;
  }
  .name-text {
    position: absolute; text-align: center; text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
    cursor: move; touch-action: none; padding: 8px; z-index: 20; line-height: 1.4;
  }
  .name-text.is-placeholder {
    outline: 1.5px dashed rgba(255,255,255,0.75); outline-offset: -2px; border-radius: 8px;
    background: rgba(0,0,0,0.12);
  }
  .name-text.is-placeholder .text-content { opacity: 0.85; }
  /* ✨ Stroke set in Edit Layout: an outlined copy of the text sits right
     under the real text (same box as the content area, inside the 8px padding). */
  .name-text.has-stroke .text-content { position: relative; z-index: 1; }
  /* Center guides while dragging text (screen only, not in the download) */
  .snap-guide { position: absolute; z-index: 40; pointer-events: none; display: none; background: #ff2d78; box-shadow: 0 0 3px rgba(255,45,120,0.8); }
  .snap-guide.show { display: block; }
  .snap-guide.v { left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%); }
  .snap-guide.h { top: 50%; left: 0; right: 0; height: 1.5px; transform: translateY(-50%); }
  .name-text .text-stroke {
    position: absolute; left: 8px; right: 8px; top: 8px; z-index: 0;
    pointer-events: none; text-shadow: none; user-select: none;
  }
  .resize-handle {
    position: absolute; bottom: -4px; right: -4px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--gold); color: var(--ink); display: flex; align-items: center; justify-content: center;
    font-size: 11px; cursor: nwse-resize; touch-action: none; box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    z-index: 21; text-shadow: none;
  }

  .actions { margin-top: 16px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
  .btn-save, .btn-donate {
    padding: 13px 24px; border: none; border-radius: 12px; cursor: pointer;
    font-size: 15px; font-weight: 700; transition: transform 0.15s, box-shadow 0.15s;
    display: inline-flex; align-items: center; gap: 8px;
  }
  .btn-save { background: linear-gradient(145deg, var(--maroon), var(--maroon-dark)); color: #fff; box-shadow: 0 8px 18px rgba(122,37,48,0.35); }
  .btn-save:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(122,37,48,0.45); }
  .btn-save:disabled { opacity: 0.6; cursor: wait; transform: none; }
  .btn-donate { background: linear-gradient(145deg, var(--gold-soft), var(--gold)); color: var(--ink); text-decoration: none; box-shadow: 0 8px 18px rgba(199,154,70,0.35); }
  .btn-donate:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(199,154,70,0.45); }

  .note-box {
    background: rgba(20,15,10,0.5); backdrop-filter: blur(6px); color: var(--gold-soft); padding: 12px 15px; border-radius: 10px;
    border-left: 3px solid var(--gold); margin-top: 14px; font-size: 0.82rem; line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  }
  .note-box.light { background: #eef4ee; color: var(--sage); border-left-color: var(--sage); backdrop-filter: none; text-shadow: none; }

  /* ---------- 📱 Phones: compact customize panel (added 2026-10-14) ----------
     Tapping text/photos on the frame (quick-edit bar) does everything the
     boxes below do, so on phones the boxes are hidden until "✏️ បង្ហាញប្រអប់បំពេញ".
     They are only visually hidden — NOT display:none / removed: quick-edit
     writes into them, the download reads from them, and the photo picker
     (<input type=file> inside) must stay clickable on iPhone. */
  .fields-toggle { display: none; }
  @media (max-width: 879px) {
    body:not(.show-fields) #fontSelectorGroup,
    body:not(.show-fields) #dynamicTextFields,
    body:not(.show-fields) #dynamicPhotoFields {
      position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
      overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap;
    }
    .fields-toggle {
      display: block; width: 100%; margin-top: 12px; padding: 11px 14px;
      background: transparent; border: 1.5px dashed var(--gold); border-radius: var(--radius-md);
      color: var(--maroon); font-family: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer;
    }
    .fields-toggle:active { background: var(--cream-dim); }
    #nameDragHint { font-size: 0.86rem; border-left-width: 4px; }
  }

  /* ---------- Step progress ---------- */
  .progress-track { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 26px; }
  .progress-dot {
    width: 8px; height: 8px; border-radius: 50%; background: rgba(199,154,70,0.35); transition: 0.25s;
  }
  .progress-track .bar { width: 40px; height: 2px; background: rgba(199,154,70,0.25); border-radius: 2px; }
  .progress-dot.done, .progress-track .bar.done { background: var(--gold); }
  .progress-dot.active { width: 22px; border-radius: 5px; background: var(--gold); }

  /* ---------- Donate modal ---------- */
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(20,15,10,0.6); backdrop-filter: blur(2px);
    display: none; align-items: flex-end; justify-content: center; z-index: 100; padding: 0;
  }
  .modal-overlay.open { display: flex; }
  @media (min-width: 640px) { .modal-overlay { align-items: center; padding: 20px; } }
  .donate-modal {
    background: var(--cream); width: 100%; max-width: 380px; border-radius: 22px 22px 0 0;
    padding: 26px 24px calc(26px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 40px rgba(0,0,0,0.3); position: relative;
    animation: slideUp 0.25s ease-out;
  }
  @media (min-width: 640px) { .donate-modal { border-radius: 22px; animation: popIn 0.2s ease-out; } }
  @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  @keyframes popIn { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .donate-modal .close-x {
    position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%;
    background: rgba(28,35,33,0.06); border: none; cursor: pointer; font-size: 16px; color: var(--text-dim);
  }
  .donate-modal .heart-badge {
    width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 12px;
    background: linear-gradient(145deg, var(--gold-soft), var(--gold));
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
    box-shadow: 0 6px 16px rgba(199,154,70,0.4);
  }
  .donate-modal h3 { text-align: center; margin: 0 0 6px; font-size: 1.15rem; }
  .donate-modal .sub { text-align: center; color: var(--text-dim); font-size: 0.88rem; margin: 0 0 18px; line-height: 1.6; }
  .promo-modal .promo-image {
    margin: -26px -24px 16px; border-radius: 22px 22px 0 0; overflow: hidden; line-height: 0;
  }
  .promo-modal .promo-image img { width: 100%; height: auto; display: block; max-height: 260px; object-fit: cover; }
  .promo-modal h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; }
  .donate-modal .qr-frame {
    background: #fff; border-radius: 16px; padding: 14px; width: fit-content; margin: 0 auto 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1); border: 1px solid rgba(28,35,33,0.06);
  }
  .donate-modal .qr-frame img { display: block; width: 190px; height: 190px; }
  .donate-modal .qr-caption { text-align: center; font-size: 0.78rem; color: var(--text-dim); margin-bottom: 18px; }
  .donate-modal .btn-open-app {
    width: 100%; padding: 14px; border: none; border-radius: 12px; text-decoration: none;
    background: linear-gradient(145deg, var(--maroon), var(--maroon-dark)); color: #fff;
    display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px;
    box-shadow: 0 8px 18px rgba(122,37,48,0.35); margin-bottom: 10px;
  }
  .donate-modal .btn-copy {
    width: 100%; padding: 12px; border-radius: 12px; border: 1.5px solid rgba(28,35,33,0.14);
    background: transparent; color: var(--text); font-weight: 700; font-size: 13.5px; cursor: pointer;
    text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 6px;
  }
  .donate-modal .btn-copy.copied { border-color: var(--sage); color: var(--sage); }

  /* ---------- Save Image modal (Android long-press fallback) ---------- */
  .save-image-modal { max-width: 420px; }
  .save-image-preview-frame {
    background: #f8f6ee; border: 1.5px solid rgba(28,35,33,0.1); border-radius: 14px;
    padding: 10px; margin-bottom: 14px; text-align: center;
  }
  .save-image-preview-frame img {
    max-width: 100%; max-height: 52vh; border-radius: 8px; display: inline-block;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  }
  .save-image-modal .btn-open-app { margin-top: 0; }
  .save-image-share-btn { width: 100%; justify-content: center; margin: 0 0 12px; }
  .save-image-chrome-btn { width: 100%; justify-content: center; margin: 0 0 12px; font-size: 17px; padding: 16px; }
  /* iPad save steps — large, numbered, easy for older users */
  .save-steps-title { display: block; font-weight: 700; font-size: 1rem; color: var(--ink); margin-bottom: 6px; text-align: left; }
  .save-steps { counter-reset: st; list-style: none; padding: 0; margin: 0 0 10px; text-align: left; }
  .save-steps li {
    counter-increment: st; position: relative; padding: 7px 0 7px 38px; font-size: 0.98rem; line-height: 1.6; color: var(--text);
    border-bottom: 1px dashed rgba(28,35,33,0.12);
  }
  .save-steps li::before {
    content: counter(st); position: absolute; left: 0; top: 7px; width: 26px; height: 26px; border-radius: 50%;
    background: var(--maroon); color: #fff; font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
  }
  .save-image-modal.is-ipad .save-image-preview-frame img { max-height: 28vh; }
  .save-steps-or { display: block; text-align: left; font-size: 0.92rem; color: var(--text-dim); }
  #saveImageOverlay .save-image-modal { max-width: 460px; }
  .save-image-modal .btn-open-app { font-size: 17px; padding: 16px; }
  .save-image-modal .save-image-file-btn {
    margin-bottom: 10px; justify-content: center;
    background: #eef6ff; color: #1565c0; border: 1.5px solid #64a8f0; box-shadow: none;
  }
  .files-ic { width: 26px; height: 21px; flex-shrink: 0; vertical-align: -4px; }
  .save-steps-or .files-ic { width: 20px; height: 16px; vertical-align: -3px; }
  /* the browser's "back" arrow, drawn as people see it */
  .back-ic {
    display: inline-flex; align-items: center; justify-content: center; vertical-align: -6px;
    width: 26px; height: 26px; border-radius: 7px; background: #fff; border: 1.5px solid #c9c3b6; color: #1565c0;
  }
  .back-ic svg { width: 18px; height: 18px; }
  /* Long-press on the picture must not jump/scroll anything (Chrome on iPad):
     the page behind is locked, the sheet scrolls by itself, only the picture
     is long-pressable (no text selection around it). */
  body.save-modal-open { overflow: hidden; }
  #saveImageOverlay { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .save-image-modal { -webkit-user-select: none; user-select: none; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
  .save-image-preview-frame img { -webkit-touch-callout: default; touch-action: manipulation; }

  .share-link-box {
    background: #f8f6ee; border: 1.5px solid rgba(28,35,33,0.1); border-radius: 10px;
    padding: 12px 14px; margin-bottom: 12px; font-size: 0.78rem; color: var(--sage);
    word-break: break-all; text-align: center; font-family: monospace;
  }

  .footer-strip {
    text-align: center; margin: 36px auto 0; width: 100%;
    background: linear-gradient(160deg, rgba(255,255,255,0.75), rgba(251,246,236,0.55));
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-radius: 18px; padding: 26px 26px 22px;
    box-shadow: 0 10px 30px rgba(28,35,33,0.1), inset 0 1px 0 rgba(255,255,255,0.6);
    border: 1px solid rgba(199,154,70,0.3);
    position: relative; overflow: hidden;
  }
  .footer-strip::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 90px; height: 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
  }
  .downloads-badge {
    background: var(--ink); color: var(--cream); padding: 8px 20px; border-radius: 25px; font-size: 0.82rem;
    box-shadow: 0 5px 14px rgba(28,35,33,0.2); display: inline-flex; align-items: center; gap: 8px;
  }
  .footer-text {
    text-align: center; color: var(--text-dim); font-size: 0.82rem; line-height: 1.7;
  }
  .footer-text strong { color: var(--maroon); font-weight: 700; }
  .powered-by-link {
    color: var(--text-dim); text-decoration: none; font-size: 0.78rem;
    display: inline-block; margin-top: 4px; border-bottom: 1px dotted currentColor; transition: 0.15s;
  }
  .powered-by-link:hover { color: var(--maroon); }

  /* ---------- Footer links → open the About/Contact/Terms modal ---------- */
  .footer-links-row {
    display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(28,35,33,0.08);
  }
  .footer-links-row button {
    background: none; border: none; padding: 4px 2px; cursor: pointer; font-family: inherit;
    font-size: 0.76rem; color: var(--text-dim); font-weight: 600; transition: 0.15s;
  }
  .footer-links-row button:hover { color: var(--maroon); }
  .footer-links-row .dot { color: rgba(28,35,33,0.25); font-size: 0.76rem; }

  /* ---------- About / Contact / Terms (opens in a modal, off the page by default) ---------- */
  .info-modal { max-width: 480px; padding: 0; overflow: hidden; }
  .info-modal .close-x { z-index: 2; background: rgba(255,255,255,0.85); }
  .info-panel {
    max-height: 80vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .info-tabs-nav {
    display: flex; background: var(--ink); overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .info-tab-btn {
    flex: 1; min-width: 140px; padding: 15px 12px; background: none; border: none; cursor: pointer;
    color: rgba(251,246,236,0.6); font-family: inherit; font-weight: 700; font-size: 0.85rem;
    white-space: nowrap; transition: 0.15s; border-bottom: 3px solid transparent;
  }
  .info-tab-btn:hover { color: var(--gold-soft); }
  .info-tab-btn.active { color: var(--gold-soft); border-bottom-color: var(--gold); background: rgba(199,154,70,0.08); }
  .info-tab-content { display: none; padding: 28px 24px; }
  .info-tab-content.active { display: block; animation: infoFadeIn 0.25s ease; }
  @keyframes infoFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

  .info-mission { text-align: center; color: var(--text-dim); line-height: 1.8; max-width: 640px; margin: 0 auto 22px; font-size: 0.95rem; }
  .info-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
  .info-mini-card {
    background: #fff; border: 1px solid rgba(28,35,33,0.06); border-radius: var(--radius-md);
    padding: 20px 14px; text-align: center; transition: 0.2s;
  }
  .info-mini-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(28,35,33,0.08); border-color: var(--gold); }
  .info-mini-card .ic { font-size: 1.8rem; margin-bottom: 10px; }
  .info-mini-card h4 { margin: 0 0 6px; font-size: 0.92rem; color: var(--text); }
  .info-mini-card p { margin: 0; font-size: 0.8rem; color: var(--text-dim); line-height: 1.6; }
  .info-mini-card a { color: var(--sage); font-weight: 700; font-size: 0.85rem; text-decoration: none; word-break: break-all; }
  .info-mini-card a:hover { color: var(--maroon); }

  .info-quote {
    margin-top: 22px; padding: 18px 20px; background: rgba(199,154,70,0.08); border-left: 4px solid var(--gold);
    border-radius: 10px; font-style: italic; color: var(--text-dim); line-height: 1.7; font-size: 0.88rem;
  }

  .info-social-row { display: flex; justify-content: center; gap: 28px; margin-top: 24px; flex-wrap: wrap; }
  .info-social-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none;
    color: var(--text); transition: 0.2s;
  }
  .info-social-item .ic { font-size: 1.8rem; }
  .info-social-item span { font-size: 0.78rem; font-weight: 700; }
  .info-social-item:hover { color: var(--maroon); transform: scale(1.08); }

  .info-terms-section { margin-bottom: 22px; }
  .info-terms-section:last-child { margin-bottom: 0; }
  .info-terms-section h4 {
    display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--maroon);
    margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid rgba(28,35,33,0.06);
  }
  .info-terms-list { list-style: none; padding: 0; margin: 0; }
  .info-terms-list li {
    position: relative; padding-left: 24px; margin-bottom: 10px; color: var(--text-dim);
    line-height: 1.7; font-size: 0.88rem;
  }
  .info-terms-list li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
  .info-terms-section p { color: var(--text-dim); line-height: 1.7; font-size: 0.88rem; margin: 0; }
  .info-privacy-box {
    background: rgba(63,93,84,0.07); border-left: 4px solid var(--sage); border-radius: 10px;
    padding: 16px 18px; margin-top: 8px;
  }
  .info-privacy-box strong { color: var(--sage); }
  .info-last-update { text-align: center; font-size: 0.78rem; color: var(--text-dim); opacity: 0.7; margin-top: 20px; }

  /* ---------- Toast notifications (replaces browser alert()) ---------- */
  .toast-stack {
    position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 200;
    display: flex; flex-direction: column-reverse; gap: 8px; width: calc(100% - 32px); max-width: 380px;
    pointer-events: none;
  }
  .toast {
    display: flex; align-items: flex-start; gap: 10px; background: var(--ink); color: var(--cream);
    padding: 13px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    font-size: 0.85rem; line-height: 1.5; border-left: 4px solid var(--gold);
    animation: toastIn 0.25s ease-out; pointer-events: auto;
  }
  .toast.warn { border-left-color: var(--gold); }
  .toast.error { border-left-color: var(--maroon); }
  .toast.info { border-left-color: var(--sage); }
  .toast.success { border-left-color: #4caf50; }
  .toast .icon { flex-shrink: 0; font-size: 1.1rem; line-height: 1; }
  .toast .msg { flex: 1; }
  .toast.closing { animation: toastOut 0.2s ease-in forwards; }
  @keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
  @keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(0.97); } }

  /* mobile: friendlier tap targets */
  @media (max-width: 520px) {
    .page { padding-left: 12px; padding-right: 12px; }
    .panel { padding: 16px; }
    .preview-panel { padding: 14px; }
    .actions { position: sticky; bottom: 10px; z-index: 30; }
  }

    /* ---------- Quick-edit bar (mobile: edit straight from the preview) ---------- */
  .quick-edit {
    position: fixed; left: 0; right: 0; top: 0; z-index: 90;
    background: var(--ink); color: var(--cream);
    padding: calc(10px + env(safe-area-inset-top)) 14px 12px;
    border-radius: 0 0 16px 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    transform: translateY(-110%); transition: transform 0.2s ease;
  }
  .quick-edit.open { transform: none; }
  .qe-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
  .qe-title { font-weight: 700; font-size: 0.85rem; color: var(--gold-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .qe-done {
    flex-shrink: 0; background: var(--gold); color: var(--ink); border: none; border-radius: 10px;
    padding: 7px 16px; font-weight: 700; font-size: 0.85rem; cursor: pointer;
  }
  .quick-edit textarea { font-size: 16px; resize: none; padding: 10px 12px; }
  .qe-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
  .qe-row .qe-ic { width: 24px; text-align: center; flex-shrink: 0; }
  .qe-row input[type=range] { flex: 1; }
  .quick-edit input[type=range]::-webkit-slider-runnable-track { background: rgba(255,255,255,0.25); }
  .quick-edit input[type=range]::-moz-range-track { background: rgba(255,255,255,0.25); }
  .quick-edit input[type=color].qe-color {
    width: 44px; height: 36px; flex-shrink: 0; padding: 3px; cursor: pointer;
    border: 1.5px solid var(--gold); border-radius: 10px; background: transparent;
  }
  .qe-bold {
    flex-shrink: 0; width: 44px; height: 36px; border-radius: 10px; cursor: pointer;
    border: 1.5px solid var(--gold); background: transparent; color: var(--gold-soft);
    font-weight: 800; font-size: 1rem; font-family: Georgia, serif;
  }
  .qe-bold:active { background: var(--gold); color: var(--ink); }
  /* 🔤 font of the text being edited (16px so iPhone doesn't zoom in on tap) */
  .quick-edit select.qe-font {
    flex: 1; min-width: 0; padding: 8px 10px; font-size: 16px; border-radius: 10px;
    background: rgba(255,255,255,0.08); color: var(--cream); border: 1.5px solid var(--gold);
  }
  .quick-edit select.qe-font option { color: #1c2321; background: #fff; }
  .pc-step { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; text-align: left; }
  .pc-step-num {
    flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--gold-soft);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
  }
  .pc-step-body { flex: 1; min-width: 0; }
  .pc-step-body .t { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 8px; line-height: 1.6; }
  .pc-caption-box {
    background: #f8f6ee; border: 1.5px solid rgba(28,35,33,0.1); border-radius: 10px; padding: 10px 12px;
    font-size: 0.8rem; color: var(--text); white-space: pre-wrap; word-break: break-word; max-height: 120px;
    overflow-y: auto; margin-bottom: 8px; line-height: 1.6;
  }
  .pc-step .btn-open-app, .pc-step .btn-copy { margin-bottom: 0; }
  .qe-words-wrap { margin-top: 8px; }
  .qe-words-hint { font-size: 0.72rem; color: rgba(251,246,236,0.7); margin-bottom: 5px; }
  .qe-words {
    display: flex; flex-wrap: wrap; gap: 6px; max-height: 84px; overflow-y: auto;
    -webkit-overflow-scrolling: touch; padding-bottom: 2px;
  }
  .qe-word {
    border: 1px solid rgba(228,201,136,0.45); background: rgba(255,255,255,0.08); color: var(--cream);
    border-radius: 8px; padding: 5px 9px; font-size: 0.88rem; line-height: 1.3; cursor: pointer;
    font-family: inherit; font-weight: 400;
  }
  .qe-word.on { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 700; }
  .qe-change-photo {
    width: 100%; margin-top: 10px; padding: 10px; border-radius: 10px; cursor: pointer;
    border: 1.5px dashed var(--gold); background: transparent; color: var(--gold-soft); font-weight: 700; font-size: 0.85rem;
  }

  /* ---------- Footer donate link (gold, stands out a little) ---------- */
  .footer-links-row .footer-donate { color: var(--gold); font-weight: 700; }
  .footer-links-row .footer-donate:hover { color: var(--maroon); }

  /* ---------- "Send to friends" button (appears after a download) ---------- */
  .btn-share-result {
    background: linear-gradient(145deg, #4f7a6d, var(--sage)) !important;
    box-shadow: 0 8px 18px rgba(63,93,84,0.35) !important;
    animation: popIn 0.25s ease-out;
  }