/* ============================================================
   Technologistic Bookmarks — Design System
   Cool-dominant, vibrant, kid-friendly. Warm = attention only.
   ============================================================ */
:root {
  /* Cool core (dominant) */
  --grape: #7A5CFF;
  --grape-dark: #5f43e0;
  --ocean: #26C6E6;
  --mint: #2FD08A;
  --blueberry: #4C43E0;
  /* Warm accents (attention only) */
  --sunburst: #FF9F1C;
  --sunburst-dark: #f08a00;
  --bubblegum: #FF5DA2;
  /* Neutrals */
  --ink: #211B45;
  --cloud: #F5F5FF;
  --surface: #FFFFFF;
  --muted: #6B6796;
  --line: #E7E5F7;
  /* Status */
  --st-waiting: #F5B72E;
  --st-making: #FF8A3D;
  --st-ready: #26C6E6;
  --st-delivered: #2FD08A;
  /* Shape */
  --radius: 20px;
  --radius-sm: 14px;
  --space: 8px;
  --shadow: 0 8px 24px rgba(122, 92, 255, .18);
  --shadow-lg: 0 16px 40px rgba(76, 67, 224, .22);
  --hero: linear-gradient(120deg, #7A5CFF, #4C43E0 42%, #26C6E6);
  --font-display: "Fredoka", system-ui, "Segoe UI", sans-serif;
  --font-body: "Nunito", system-ui, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--cloud);
  /* Big, sparse, faint polka dots — a cool texture that stays out of the way */
  background-image:
    radial-gradient(circle, rgba(122, 92, 255, .05) 58px, transparent 60px),
    radial-gradient(circle, rgba(38, 198, 230, .045) 38px, transparent 40px);
  background-size: 420px 420px, 300px 300px;
  background-position: 70px 40px, 260px 210px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--blueberry); }
img { max-width: 100%; display: block; }

.container { width: min(1100px, 92vw); margin-inline: auto; }
.section { padding: clamp(32px, 6vw, 64px) 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  min-height: 52px; padding: 0 26px; border: none; border-radius: 999px;
  background: var(--surface); color: var(--ink); cursor: pointer;
  box-shadow: var(--shadow); text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:focus-visible { outline: 3px solid var(--blueberry); outline-offset: 3px; }
.btn-primary { background: var(--grape); color: #fff; }
.btn-primary:hover { background: var(--grape-dark); }
.btn-cta { background: var(--sunburst); color: #3d2600; font-size: 1.2rem; min-height: 60px; padding: 0 34px; }
.btn-cta:hover { background: var(--sunburst-dark); }
.btn-ghost { background: rgba(255,255,255,.85); }
.btn-mint { background: var(--mint); color: #08341f; }
.btn-ocean { background: var(--ocean); color: #052a33; }
.btn-sm { min-height: 40px; font-size: .9rem; padding: 0 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------------- Header / Nav ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display);
  font-weight: 600; font-size: 1.25rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand .logo { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  background: var(--hero); color: #fff; font-size: 1.3rem; box-shadow: var(--shadow); }
.nav-links { display: flex; gap: 6px; align-items: center; position: relative; }
.nav-links a {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--ink);
  text-decoration: none; padding: 10px 20px; border-radius: 999px; white-space: nowrap;
}
.nav-links a:not(.active):hover { background: var(--cloud); }
.nav-links a.active { background: transparent; color: #fff; }   /* the sliding thumb provides the highlight */
.nav-links a.owner-link { color: var(--muted); }
.nav-links a.owner-link.active { color: #fff; }
/* the highlight that glides between nav links */
.nav-thumb { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; z-index: 0;
  border-radius: 999px; background: var(--grape); box-shadow: var(--shadow);
  transition: left .34s cubic-bezier(.5,1.4,.5,1), top .34s cubic-bezier(.5,1.4,.5,1),
              width .34s cubic-bezier(.5,1.4,.5,1), height .34s cubic-bezier(.5,1.4,.5,1); }
@media (prefers-reduced-motion: reduce) { .nav-thumb { transition: none; } }
.nav-toggle { display: none; background: var(--cloud); border: none; border-radius: 12px;
  width: 48px; height: 48px; font-size: 1.4rem; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 66px; right: 4vw; left: 4vw;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--surface); padding: 12px; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); border: 2px solid var(--line);
  }
  .nav-links.hidden { display: none; }
  .nav-links a { padding: 12px 16px; font-size: 1.1rem; }
}

/* ---------------- Hero ---------------- */
.hero { position: relative; overflow: hidden; background: var(--hero); color: #fff;
  border-radius: 0 0 36px 36px; }
.hero .container { position: relative; z-index: 2; padding: clamp(40px, 8vw, 90px) 0; text-align: center; }
/* Two-column hero when holiday mode is on: text left, carousel right */
.hero-inner { display: flex; align-items: center; justify-content: center; gap: 30px; }
.hero-text { flex: 1 1 auto; }
.hero-carousel { display: none; flex: 0 0 260px; }
.hero-carousel-title { display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: 1.2rem; color: #fff; background: var(--bubblegum); padding: 7px 18px; border-radius: 999px;
  box-shadow: var(--shadow-lg); margin-bottom: 16px; }
.hero.holiday .hero-carousel { display: block; }
.hero.holiday .hero-inner { justify-content: space-between; }
.hero.holiday .hero-text { text-align: left; }
.hero-text .logo.brand-logo { margin-left: auto; margin-right: auto; }
.hero.holiday .hero-text .logo.brand-logo { margin-left: 0; margin-right: auto; }
.hero.holiday .hero-cta { justify-content: flex-start; }
.hero .holiday-name { color: #fff; }
.hero .holiday-carousel { height: 390px; }
@media (max-width: 760px) {
  .hero-inner { flex-direction: column; }
  .hero.holiday .hero-text { text-align: center; }
  .hero.holiday .hero-text .logo.brand-logo { margin-left: auto; }
  .hero.holiday .hero-cta { justify-content: center; }
  .hero-carousel { flex-basis: auto; }
}
.hero h1 { color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.08); }
.hero .slogan { font-family: var(--font-display); font-size: clamp(1.1rem, 3vw, 1.5rem); opacity: .95;
  min-height: 1.5em; transition: opacity .45s ease, transform .45s ease, filter .45s ease; }
.hero .slogan.swapping { opacity: 0; transform: translateY(12px); filter: blur(5px); }
/* Holiday announcement — a BANNER (side accent + underlined link), not a button */
.hero-promo { display: inline-flex; align-items: center; gap: 9px; margin: 6px 0 16px;
  background: rgba(255,255,255,.14); color: #fff; font-family: var(--font-display); font-weight: 600;
  padding: 8px 14px; border-radius: 10px; border-left: 5px solid var(--sunburst); box-shadow: none; }
.hero-promo .hp-emoji { font-size: 1.15rem; }
.hero-promo a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
  white-space: nowrap; }
.hero-promo a:hover { text-decoration-thickness: 2px; }

/* Price "deal" — a tilted STICKER with a dashed edge, clearly a label (cursor:default) */
.hero .price-badge {
  display: inline-flex; align-items: center; gap: 10px; margin: 16px 0 24px;
  background: #fff; color: #211B45; font-family: var(--font-display); font-weight: 700;
  font-size: 1.2rem; padding: 9px 18px; border-radius: 14px; border: 3px dashed var(--sunburst);
  transform: rotate(-3deg); box-shadow: 0 6px 14px rgba(0,0,0,.16); cursor: default;
}
.hero .price-badge .deal-flag { background: var(--sunburst); color: #3d2600; font-size: .72rem;
  font-weight: 800; letter-spacing: .06em; padding: 3px 9px; border-radius: 6px; }
.hero .price-badge .deal-price { color: var(--grape-dark); font-size: 1.4rem; }

/* Hero CTA icon badge (keeps emoji readable on the yellow button) */
.cta-ico { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%;
  background: #fff; font-size: .82em; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,.2); }

/* The two real hero buttons — make them obviously buttons and easy to spot */
.hero-cta { gap: 14px; margin-top: 6px; }
/* 1) Order Now — big, gradient, gently pulsing so it grabs the eye */
.btn-hero1 { font-size: 1.4rem; min-height: 68px; padding: 0 42px; font-weight: 700;
  background: linear-gradient(135deg, #FFB13C, #FF9F1C); color: #3d2600;
  animation: heroCtaPulse 1.9s ease-in-out infinite; }
.btn-hero1:hover { background: linear-gradient(135deg, #FF9F1C, #f08a00);
  transform: translateY(-3px) scale(1.04); animation-play-state: paused; }
@keyframes heroCtaPulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(255,159,28,.5); transform: translateY(0) scale(1); }
  50%      { box-shadow: 0 14px 32px rgba(255,159,28,.85); transform: translateY(-2px) scale(1.025); }
}
/* 2) See the Gallery — solid white pill w/ purple text; clearly a button, secondary */
.btn-hero2 { font-size: 1.2rem; min-height: 60px; padding: 0 30px; font-weight: 700;
  background: #fff; color: var(--grape-dark); }
.btn-hero2:hover { background: #efeaff; transform: translateY(-3px); }

/* "How it works" 1-2-3 steps — big, bold, one glance to understand */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.step { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 22px;
  padding: 30px 22px 24px; text-align: center; box-shadow: var(--shadow); }
.step-num { position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%; background: var(--grape); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; display: grid; place-items: center;
  box-shadow: var(--shadow); border: 3px solid var(--surface); }
.step-emoji { font-size: 3.4rem; line-height: 1; margin-top: 6px; }
.step-title { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin-top: 10px; }
.step-desc { color: var(--muted); font-size: 1.02rem; margin-top: 6px; line-height: 1.45; }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; gap: 30px; } }

/* Footer links (the pages that moved out of the top menu) */
.site-footer .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 16px; }
.site-footer .footer-links a { color: #d7d2f2; font-family: var(--font-display); font-weight: 500; font-size: 1rem; text-decoration: none; }
.site-footer .footer-links a:hover { color: #fff; text-decoration: underline; }

/* Attention-grabbing header animations (random on the home hero) */
.hero h1 { will-change: transform; }
.hero h1 .ltr { display: inline-block; }
.hero h1.anim-pop { animation: h1pop .9s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes h1pop { 0% { transform: scale(.3); opacity: 0 } 60% { transform: scale(1.12) } 100% { transform: scale(1); opacity: 1 } }
.hero h1.anim-wobble { animation: h1wobble 1s ease both; }
@keyframes h1wobble { 0% { transform: rotate(0) } 20% { transform: rotate(-4deg) } 40% { transform: rotate(3deg) } 60% { transform: rotate(-2deg) } 80% { transform: rotate(1deg) } 100% { transform: rotate(0) } }
.hero h1.anim-jelly { animation: h1jelly .9s ease both; }
@keyframes h1jelly { 0% { transform: scale(1,1) } 30% { transform: scale(1.15,.85) } 50% { transform: scale(.9,1.1) } 70% { transform: scale(1.05,.95) } 100% { transform: scale(1,1) } }
.hero h1.anim-wave .ltr { animation: h1wave .6s ease both; animation-delay: calc(var(--i) * .05s); }
@keyframes h1wave { 0%,100% { transform: translateY(0) } 35% { transform: translateY(-18px) } }
.hero h1.anim-rainbow { background: linear-gradient(90deg,#FF3B30,#FF9500,#FFD23F,#34C759,#26C6E6,#7A5CFF,#FF5DA2);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; text-shadow: none; animation: h1rainbow 2s linear infinite; }
@keyframes h1rainbow { to { background-position: 200% center } }

.blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; z-index: 1;
  animation: float 9s ease-in-out infinite; }
.blob.b1 { width: 180px; height: 180px; background: var(--bubblegum); top: -40px; left: -30px; }
.blob.b2 { width: 130px; height: 130px; background: var(--mint); bottom: -30px; right: 8%; animation-delay: -3s; }
.blob.b3 { width: 90px; height: 90px; background: var(--sunburst); top: 30%; right: -20px; animation-delay: -6s; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-22px) } }

/* ---------------- Holiday floating carousel ---------------- */
.holiday-carousel { position: relative; height: 390px; margin-top: 8px; }
.holiday-slide { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  opacity: 0; transition: opacity 1s ease; pointer-events: none; }
.holiday-slide.on { opacity: 1; }
.holiday-bm { width: 118px; aspect-ratio: 188 / 538; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; font-size: 3.2rem;
  background: linear-gradient(150deg, #eef0ff, #e5faf4); box-shadow: var(--shadow-lg);
  transform: rotate(-6deg); animation: hfloat 3.6s ease-in-out infinite; }
.holiday-bm img { width: 100%; height: 100%; object-fit: cover; }
.holiday-name { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); }
@keyframes hfloat { 0%,100% { transform: rotate(-6deg) translateY(0) } 50% { transform: rotate(-6deg) translateY(-16px) } }

/* ---------------- Button press particles ---------------- */
.fx-particle { position: fixed; width: 10px; height: 10px; border-radius: 50%;
  pointer-events: none; z-index: 400; will-change: transform, opacity; }

/* ---------------- Cards / grid ---------------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; border: 2px solid var(--line); }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* Announcement banner */
.announce { background: var(--bubblegum); color: #fff; text-align: center;
  font-family: var(--font-display); font-weight: 500; padding: 10px 16px; }

/* Design (bookmark) card */
.design-card { background: var(--surface); border-radius: var(--radius); border: 2px solid var(--line);
  box-shadow: var(--shadow); overflow: hidden; cursor: pointer; text-align: center;
  transition: transform .14s ease, box-shadow .14s ease; position: relative; }
.design-card:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--shadow-lg); }
.design-tile { aspect-ratio: 188 / 538; display: grid; place-items: center; font-size: 3rem;
  background: linear-gradient(150deg, #eef0ff, #e5faf4); }
/* Uploaded bookmark images already have their own shape + transparent background,
   so drop the placeholder frame (border/gradient/box) for tiles that contain a real image. */
.design-tile:has(img), .holiday-bm:has(img), .d-thumb:has(img),
.design-bm:has(img), .modal .tile-big:has(img) {
  background: none; border: none; box-shadow: none;
}
.design-tile:has(img) img, .holiday-bm:has(img) img, .d-thumb:has(img) img,
.design-bm:has(img) img, .modal .tile-big:has(img) img { object-fit: contain; }
.holiday-bm:has(img) { overflow: visible; }
.holiday-bm:has(img) img { filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); }
/* Featured, gallery & order picker: image designs show frameless (no surrounding card border/background) */
#featured .design-card:has(img), #gallery .design-card:has(img),
#design-picker .design-card:has(img), #wishlist .design-card:has(img) {
  background: none; border: none; box-shadow: none;
}
#featured .design-card:has(img):hover, #gallery .design-card:has(img):hover,
#design-picker .design-card:has(img):hover, #wishlist .design-card:has(img):hover { box-shadow: none; }
/* Keep tiles the same size when a category has only a few bookmarks (auto-fill, not auto-fit) */
#gallery, #wishlist { grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); }
#design-picker { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.design-tile img { width: 100%; height: 100%; object-fit: cover; }
.design-body { padding: 12px; }
.design-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.design-cat { color: var(--muted); font-size: .85rem; }
.ribbon-flag { position: absolute; top: 10px; left: -2px; background: var(--sunburst); color:#3d2600;
  font-family: var(--font-display); font-size: .72rem; padding: 3px 10px; border-radius: 0 8px 8px 0; }
/* wishlist heart on each design card (grey until saved, pink + glowing once saved) */
.wish-btn { position: absolute; top: 8px; right: 8px; z-index: 3; width: 40px; height: 40px; border: none;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 9px rgba(0,0,0,.28); cursor: pointer;
  font-size: 1.2rem; line-height: 1; display: grid; place-items: center;
  filter: grayscale(1); opacity: .92; transition: transform .12s ease, filter .12s ease, box-shadow .12s ease; }
.wish-btn:hover { transform: scale(1.14); filter: grayscale(0); opacity: 1; }
.wish-btn.on { filter: none; opacity: 1; background: #fff; box-shadow: 0 2px 12px rgba(255,93,162,.6); }
.wish-btn:focus-visible { outline: 3px solid var(--bubblegum); outline-offset: 2px; }
.wish-card { cursor: default; }
.pill { display: inline-block; background: var(--cloud); border: 2px solid var(--line);
  color: var(--ink); font-family: var(--font-display); font-weight: 500; font-size: .85rem;
  padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.pill.active { background: var(--grape); color: #fff; border-color: var(--grape); }

/* Chips row / toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-display); font-weight: 500; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
input[type=text], input[type=number], input[type=email], input[type=password], select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 1.05rem; color: var(--ink);
  padding: 13px 16px; border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--grape);
  box-shadow: 0 0 0 4px rgba(122,92,255,.15); }
textarea { min-height: 92px; resize: vertical; }

/* segmented control */
.segment { display: inline-flex; background: var(--cloud); border-radius: 999px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.segment button { border: none; background: transparent; font-family: var(--font-display); font-weight: 500;
  padding: 10px 18px; border-radius: 999px; cursor: pointer; color: var(--ink); min-height: 44px; }
.segment button.on { background: var(--grape); color: #fff; box-shadow: var(--shadow); }

/* stepper */
.stepper { display: inline-flex; align-items: center; gap: 12px; }
.stepper button { width: 48px; height: 48px; border-radius: 14px; border: none; background: var(--grape);
  color: #fff; font-size: 1.5rem; font-family: var(--font-display); cursor: pointer; }
.stepper .val { font-family: var(--font-display); font-size: 1.4rem; min-width: 44px; text-align: center; }

/* toggle switch */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 58px; height: 32px; flex-shrink: 0; background: var(--line); border-radius: 999px; position: relative;
  transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px;
  background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--mint); }
.switch input:checked + .track::after { transform: translateX(26px); }
/* Beat the generic `.field label { display:block }` rule so the toggle stays a row */
.field label.switch { display: inline-flex; align-items: center; margin-bottom: 0;
  font-family: var(--font-body); font-weight: 400; }

/* price box */
.pricebox { background: linear-gradient(150deg, #fff, #f2f0ff); border: 2px dashed var(--grape);
  border-radius: var(--radius); padding: 18px 22px; text-align: center; }
.pricebox .total { font-family: var(--font-display); font-size: 2.4rem; color: var(--grape-dark); }
.pricebox .lines { color: var(--muted); font-size: .92rem; }

/* ---------------- Status chips ---------------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display);
  font-weight: 500; font-size: .9rem; padding: 5px 12px; border-radius: 999px; color: #3a2b00; }
.status.waiting { background: var(--st-waiting); }
.status.making { background: var(--st-making); color:#3d1c00; }
.status.ready { background: var(--st-ready); color:#062a33; }
.status.delivered { background: var(--st-delivered); color:#06341f; }
.badge-paid { background: var(--mint); color:#06341f; }
.badge-unpaid { background: var(--sunburst); color:#3d2600; }
.badge { display:inline-block; font-family: var(--font-display); font-size:.8rem; padding:4px 10px; border-radius:999px; }

/* ---------------- Reviews / stars ---------------- */
.stars { display: inline-flex; gap: 2px; font-size: 1.4rem; color: var(--sunburst); }
.stars.input span { cursor: pointer; }
.stars .empty { color: var(--line); }
.avg-big { font-family: var(--font-display); font-size: 3rem; color: var(--grape-dark); line-height: 1; }

/* ---------------- Modal ---------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(33,27,69,.55); padding: 20px; }
.modal .box { background: #fff; border-radius: var(--radius); max-width: 420px; width: 100%;
  padding: 24px; box-shadow: var(--shadow-lg); text-align: center; }
.modal .tile-big { aspect-ratio: 188 / 538; max-height: 60vh; width: auto; margin-inline: auto;
  display: grid; place-items: center; font-size: 5rem;
  border-radius: var(--radius-sm); background: linear-gradient(150deg,#eef0ff,#e5faf4); margin-bottom: 14px; }

/* ---------------- Toast ---------------- */
.toast-wrap { position: fixed; bottom: 20px; left: 0; right: 0; display: grid; place-items: center;
  z-index: 200; pointer-events: none; }
.toast { background: var(--ink); color: #fff; font-family: var(--font-display); padding: 12px 22px;
  border-radius: 999px; box-shadow: var(--shadow-lg); transform: translateY(20px); opacity: 0;
  transition: all .2s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.err { background: #d13b5e; }

/* ---------------- Owner dashboard ---------------- */
.stat { background: var(--surface); border-radius: var(--radius); border: 2px solid var(--line);
  box-shadow: var(--shadow); padding: 18px; text-align: center; }
.stat .n { font-family: var(--font-display); font-size: 2.1rem; line-height: 1; }
.stat .k { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.code-tag { font-family: var(--font-display); background: var(--cloud); border: 2px solid var(--line);
  padding: 3px 10px; border-radius: 8px; font-size: .85rem; }

/* ---------------- Owner order cards (clean, scannable, kid-friendly) ---------------- */
.o-count { font-family: var(--font-display); color: var(--muted); margin-bottom: 12px; padding-left: 4px; }
.o-count b { color: var(--ink); }
.o-card { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; background: #fff;
  border: 2px solid var(--line); border-left-width: 9px; border-radius: 16px;
  padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.o-card.st-waiting   { border-left-color: var(--st-waiting); }
.o-card.st-making    { border-left-color: var(--st-making); }
.o-card.st-ready     { border-left-color: var(--st-ready); }
.o-card.st-delivered { border-left-color: var(--st-delivered); }
/* mini bookmark preview / design thumbnail */
.o-thumb { flex: 0 0 auto; position: relative; width: 58px; aspect-ratio: 188 / 538; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; font-size: 1.7rem; cursor: pointer;
  background: linear-gradient(150deg, #eef0ff, #e5faf4); box-shadow: 0 3px 9px rgba(33,27,69,.16);
  transition: transform .12s ease; }
.o-thumb:hover { transform: scale(1.05); }
.o-thumb:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }
.o-thumb img { width: 100%; height: 100%; object-fit: contain; }
.o-thumb .bm-text { font-size: 20px; font-weight: 700; white-space: nowrap; line-height: 1; will-change: transform; }
/* body */
.o-body { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.o-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.o-name { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.o-what { font-weight: 800; font-size: .95rem; }
/* how a custom background was made (fixed colors so they read in light + dark) */
.bg-tag { display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: .74rem;
  padding: 2px 9px; border-radius: 999px; vertical-align: middle; }
.bg-tag.describe { background: #ffe9b8; color: #6b4200; }
.bg-tag.colors { background: #dfe4ff; color: #2f2a8a; }
.o-sub { color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.o-brief { color: var(--muted); font-size: .82rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-note { background: #fff3f9; border: 1.5px solid #ffc3e0; border-radius: 10px; padding: 5px 10px;
  font-size: .85rem; margin-top: 2px; }
/* action column */
.o-do { flex: 0 0 auto; display: flex; flex-direction: column; gap: 7px; justify-content: center; min-width: 250px; }
.o-adv { min-height: 46px; font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  border: none; border-radius: 13px; padding: 0 14px; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .1s ease; display: grid; place-items: center; }
.o-adv:active { transform: scale(.96); }
.o-adv.to-making    { background: var(--st-making);    color: #3d1c00; }
.o-adv.to-ready     { background: var(--st-ready);     color: #062a33; }
.o-adv.to-delivered { background: var(--st-delivered); color: #06341f; }
.o-adv.done { background: #eef0ff; color: var(--grape-dark); box-shadow: none; }
.o-mini { display: flex; gap: 6px; }
.o-mini button { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 0 8px; border-radius: 11px;
  border: 2px solid var(--line); background: #fff; color: var(--ink); font-family: var(--font-display);
  font-weight: 500; font-size: .88rem; cursor: pointer;
  /* keep the emoji on the same line as the label, so both buttons stay one line tall */
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.o-mini button:hover { background: var(--cloud); }
.o-mini .o-pay.on { background: #e7fbf1; border-color: var(--mint); color: #06341f; }
/* delete right on the row — compact icon so Pay/Details keep their equal share */
.o-mini .o-del-btn { flex: 0 0 46px; font-size: 1rem; color: #d13b5e; }
.o-mini .o-del-btn:hover { background: #fff1f4; border-color: #ff7a99; }
:root[data-theme="dark"] .o-mini .o-del-btn:hover { background: rgba(209,59,94,.18); border-color: #ff7a99; }
/* details pop-up frame */
.modal-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  border: none; background: rgba(33,27,69,.08); color: var(--ink); font-size: 1rem; cursor: pointer;
  display: grid; place-items: center; z-index: 2; }
.modal-x:hover { background: rgba(33,27,69,.16); }
.box.o-modal { position: relative; max-width: 480px; text-align: left; max-height: 90vh; overflow: auto; padding: 22px 22px 20px; }
.box.o-modal p { margin: 5px 0; font-size: .94rem; }
.od-head { display: flex; gap: 14px; align-items: center; margin: 2px 0 12px; padding-right: 30px; }
.od-headinfo { min-width: 0; }
.od-head .o-name { font-size: 1.3rem; }
/* enlarged bookmark preview */
.box.bm-modal { position: relative; background: transparent; box-shadow: none; padding: 0; max-width: none; width: auto; }
.bm-modal .modal-x { background: rgba(255,255,255,.85); top: -4px; right: -4px; }
.bm-big-title { text-align: center; color: #fff; font-family: var(--font-display); font-weight: 600;
  font-size: 1.1rem; margin-bottom: 12px; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.bm-big { position: relative; height: min(70vh, 540px); aspect-ratio: 188 / 538; margin: 0 auto; border-radius: 16px; overflow: hidden;
  display: grid; place-items: center; background: linear-gradient(150deg, #eef0ff, #e5faf4);
  box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.bm-big img { width: 100%; height: 100%; object-fit: contain; }
.bm-big .bm-text { font-size: 34px; font-weight: 700; white-space: nowrap; line-height: 1; will-change: transform; }
.o-jumps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.o-jl { font-size: .85rem; color: var(--muted); font-weight: 700; }
.o-jump { min-height: 36px; border-radius: 999px; border: 2px solid var(--line); background: #fff;
  font-family: var(--font-display); font-weight: 500; font-size: .82rem; padding: 0 12px; cursor: pointer; }
.o-jump.on { background: var(--grape); border-color: var(--grape); color: #fff; }
@media (max-width: 560px) {
  .o-do { flex-basis: 100%; min-width: 0; }
}

/* Owner Designs — responsive grid of cards (bookmark thumbnail + info + button stack) */
#d-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.d-card { display: flex; gap: 16px; align-items: stretch; background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.d-thumb { flex: 0 0 auto; align-self: stretch; width: auto; max-width: 118px; aspect-ratio: 188 / 538;
  border-radius: 10px; overflow: hidden; display: grid; place-items: center; font-size: 2.2rem;
  background: linear-gradient(150deg, #eef0ff, #e5faf4); box-shadow: 0 3px 10px rgba(33,27,69,.14); }
.d-thumb img { width: 100%; height: 100%; object-fit: cover; }
.d-thumb.dim { opacity: .4; }
/* ribbon thumbnail: square, whole photo shown */
.d-thumb.rb-thumb { aspect-ratio: 1; width: 96px; max-width: 96px; align-self: center; background: var(--cloud); }
.d-thumb.rb-thumb img { object-fit: contain; }

/* customer ribbon-color picker */
.ribbon-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.ribbon-swatch { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 84px;
  padding: 8px 6px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface);
  cursor: pointer; font-family: var(--font-display); font-weight: 500; }
/* box matches the ribbon's tall shape (338:808) so the photo fills it, not lost in a square */
.ribbon-swatch .rs-img { height: 64px; aspect-ratio: 338 / 808; width: auto; margin: 0 auto; border-radius: 6px;
  overflow: hidden; display: grid; place-items: center; background: var(--cloud); font-size: 1.4rem; }
.ribbon-swatch .rs-img img { width: 100%; height: 100%; object-fit: contain; }
.ribbon-swatch .rs-name { font-size: .82rem; text-align: center; line-height: 1.1; }
.ribbon-swatch:hover { border-color: var(--grape); }
.ribbon-swatch.sel { border-color: var(--grape); background: #f4f2ff; box-shadow: 0 0 0 3px rgba(122,92,255,.25); }
:root[data-theme="dark"] .ribbon-swatch.sel { background: #2c2856; }
.ribbon-swatch.oos { opacity: .45; cursor: not-allowed; }
.ribbon-swatch.oos:hover { border-color: var(--line); }
/* one row per bookmark, each with its own color swatches */
.rb-bm-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rb-bm-row:last-child { border-bottom: none; }
.rb-bm-label { flex: 0 0 96px; font-family: var(--font-display); font-weight: 600; font-size: .92rem; padding-top: 20px; }
.rb-bm-swatches { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.rb-bm-swatches .ribbon-swatch { width: 54px; padding: 6px 3px; }
.rb-bm-swatches .ribbon-swatch .rs-img { height: 58px; font-size: 1.2rem; }
.rb-bm-swatches .ribbon-swatch .rs-name { font-size: .72rem; }
@media (max-width: 520px) {
  .rb-bm-row { flex-direction: column; gap: 4px; }
  .rb-bm-label { padding-top: 0; }
}
.d-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.d-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.2; }
.d-meta { color: var(--muted); font-size: .85rem; margin-top: 3px; }
.d-tools { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.d-btn { width: 100%; min-height: 44px; font-size: .95rem; padding: 0 14px; border-radius: 12px;
  border: 2px solid var(--line); background: #fff; color: var(--ink); box-shadow: none;
  font-family: var(--font-display); font-weight: 500; }
.d-btn:hover { background: var(--cloud); transform: none; box-shadow: none; }
.d-btn.act-on { background: #eef0ff; border-color: var(--grape); color: var(--grape-dark); }
.d-btn.d-danger { color: #d13b5e; }
.d-btn.d-danger:hover { background: #fff1f4; border-color: #ff7a99; }

/* In-page confirm dialog (replaces the browser confirm popup) */
.confirm-box { max-width: 400px; }
.confirm-icon { font-size: 2.8rem; line-height: 1; margin-bottom: 4px; }
.confirm-box h3 { margin: 0 0 6px; }
.confirm-box p { margin: 0; }
.btn.confirm-danger { background: #d13b5e; color: #fff; }
.btn.confirm-danger:hover { background: #b52e4d; }

/* Owners list (Settings) */
.owner-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--surface); }
.owner-name { font-family: var(--font-display); font-weight: 500; }
.owner-tag { font-family: var(--font-display); font-weight: 600; font-size: .72rem; padding: 2px 9px; border-radius: 999px; }
.owner-tag.main { background: #dfe4ff; color: #2f2a8a; }
.owner-tag.you { background: #e7fbf1; color: #06341f; }
.owner-remove { color: #d13b5e; }

/* ---------------- Confetti + spinner ---------------- */
#confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 300; }
.spinner { width: 42px; height: 42px; border: 5px solid var(--line); border-top-color: var(--grape);
  border-radius: 50%; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg) } }
.loading { text-align: center; color: var(--muted); padding: 30px; font-family: var(--font-display); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink); color: #cfc9f0; text-align: center; padding: 30px 0; margin-top: 40px; }
.site-footer a { color: #fff; }
.site-footer .brand { color: #fff; justify-content: center; }

/* ---------------- FAQ ---------------- */
details.faq { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 6px 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
details.faq summary { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem;
  cursor: pointer; padding: 12px 0; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before { content: "❓ "; }
details.faq[open] summary::before { content: "💡 "; }

/* utility spacing */
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.center { justify-content: center; }
.grow { flex: 1; }

/* ---------------- Order wizard ---------------- */
.wiz-progress { max-width: 620px; margin: 0 auto; }
.wiz-bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.wiz-bar-fill { height: 100%; width: 8%; background: var(--hero); border-radius: 999px; transition: width .3s ease; }
.wiz-status { text-align: center; font-family: var(--font-display); font-weight: 500; font-size: .92rem;
  color: var(--muted); margin-top: 8px; }
.wiz-panel { min-height: 170px; }
.wiz-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 12px; }
.wiz-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 26px 18px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
  cursor: pointer; box-shadow: var(--shadow); font-family: var(--font-body); transition: transform .12s, box-shadow .12s, border-color .12s; }
.wiz-choice:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--grape); }
.wiz-choice.sel { border-color: var(--grape); background: #f4f2ff; }
.wc-emoji { font-size: 2.6rem; }
.wc-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.wc-sub { color: var(--muted); font-size: .85rem; }
.wiz-nav { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 16px; border-top: 2px solid var(--line); }
.wiz-price { margin-left: auto; font-family: var(--font-display); font-weight: 600; color: var(--grape-dark); }
/* review summary */
.rv-card { border: 2px solid var(--line); border-radius: var(--radius); padding: 4px 16px; }
.rv-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0;
  border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rv-row:last-child { border-bottom: none; }
.rv-row b { font-family: var(--font-display); font-weight: 500; }
.rv-row span { color: var(--muted); text-align: right; }
.rv-sw { display: inline-block; width: 18px; height: 18px; border-radius: 5px; border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); vertical-align: middle; }
@media (max-width: 520px) {
  .wiz-nav { flex-wrap: wrap; }
  .wiz-price { order: -1; width: 100%; text-align: center; margin-left: 0; margin-bottom: 4px; }
  .wiz-nav .btn { flex: 1 1 auto; }
}

/* Live bookmark preview (background/text steps + review) */
.step-preview-layout { display: flex; gap: 22px; align-items: flex-start; }
/* Keep the bookmark preview in view while scrolling through the color options */
.step-preview { flex: 0 0 auto; position: sticky; top: 84px; align-self: flex-start; z-index: 5; }
.step-fields { flex: 1 1 auto; min-width: 0; }
.bm-preview { position: relative; width: 128px; aspect-ratio: 188 / 538; border-radius: 12px; overflow: hidden;
  border: 4px solid #fff; box-shadow: var(--shadow-lg); display: grid; place-items: center; margin: 0 auto; background: #fff; }
/* The name is pinned to the exact center of its preview (its own midpoint over the
   container's midpoint), so it stays centered no matter how long the name is. */
.bm-text { position: absolute; top: 50%; left: 50%; font-family: 'Chewy', cursive; font-weight: 400;
  font-size: 1.5rem; line-height: 1; white-space: nowrap; letter-spacing: .02em; transform-origin: center center; }
.bm-cap { text-align: center; font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  color: var(--grape-dark); margin-top: 8px; }
.bm-note { text-align: center; font-family: var(--font-display); font-weight: 600; font-size: .86rem;
  line-height: 1.3; color: #7a4b00; background: #fff3d6; border: 2px solid var(--sunburst);
  border-radius: 12px; padding: 8px 12px; margin: 8px auto 0; max-width: 210px; }
.design-bm { font-size: 3rem; }
.design-bm img { width: 100%; height: 100%; object-fit: cover; }
.review-preview-wrap { text-align: center; margin-bottom: 14px; }
.review-bm { width: 132px; }
/* details step: preview of the chosen ready-made design + its name below */
.d-preview-wrap { text-align: center; margin-bottom: 20px; }
.d-preview-wrap .bm-cap { margin-top: 10px; font-size: 1.15rem; }
/* ---- Track page: big animated status scene, kept deliberately simple ---- */
.tk-card { padding-top: 12px; }
.tk-art { width: min(300px, 80vw); height: auto; display: block; margin: 0 auto; }
.tk-headline { font-size: clamp(1.5rem, 5.5vw, 2.1rem); margin: 4px 0 2px; }
.tk-sub { font-size: 1.05rem; color: var(--muted); margin: 0 0 16px; }
.tk-steps { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.tk-step { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 66px; opacity: .3; }
.tk-step.done { opacity: 1; }
.tk-step-dot { font-size: 1.35rem; line-height: 1; transition: transform .25s ease; }
.tk-step.now .tk-step-dot { transform: scale(1.45); }
.tk-step-label { font-family: var(--font-display); font-weight: 500; font-size: .72rem; }
.tk-facts { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap;
  color: var(--muted); font-size: .95rem; margin-bottom: 12px; }
.tk-pay { display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  background: #fff3d6; color: #7a4b00; border: 2px solid var(--sunburst); border-radius: 12px; padding: 9px 18px; }
.tk-pay.ok { background: #e7fbf1; color: #06341f; border-color: var(--mint); }
.tk-note { background: var(--cloud); border: 2px solid var(--ocean); border-radius: 12px;
  padding: 10px 14px; margin-top: 14px; font-size: .95rem; }
/* scene animations (disabled automatically by the reduced-motion rule) */
@keyframes tkBob    { 0%,100% { transform: translateY(0) }      50% { transform: translateY(-5px) } }
@keyframes tkSpin   { to { transform: rotate(360deg) } }
@keyframes tkTap    { 0%,70%,100% { transform: translateY(0) }  80% { transform: translateY(-6px) } }
@keyframes tkDot    { 0%,100% { opacity: .25; transform: translateY(0) } 50% { opacity: 1; transform: translateY(-5px) } }
@keyframes tkSpark  { 0%,100% { opacity: .2; transform: scale(.6) }      50% { opacity: 1; transform: scale(1.2) } }
@keyframes tkPop    { 0%,100% { transform: translateY(0) rotate(-3deg) } 50% { transform: translateY(-9px) rotate(3deg) } }
@keyframes tkScreen { 0%,100% { opacity: 1 } 50% { opacity: .78 } }
@keyframes tkFloat  { 0% { opacity: 0; transform: translateY(8px) scale(.6) } 35% { opacity: 1 }
                      100% { opacity: 0; transform: translateY(-26px) scale(1.1) } }
.tk-bob { animation: tkBob 2.6s ease-in-out infinite; }
.tk-spin { animation: tkSpin 6s linear infinite; }
.tk-tap { animation: tkTap 1.5s ease-in-out infinite; }
.tk-dots circle { animation: tkDot 1.4s ease-in-out infinite; }
.tk-dots circle:nth-child(2) { animation-delay: .18s; }
.tk-dots circle:nth-child(3) { animation-delay: .36s; }
.tk-spark > * { animation: tkSpark 1.9s ease-in-out infinite; }
.tk-spark > *:nth-child(2) { animation-delay: .6s; }
.tk-spark > *:nth-child(3) { animation-delay: 1.2s; }
.tk-pop { animation: tkPop 2.6s ease-in-out infinite; }
.tk-screen { animation: tkScreen 2.4s ease-in-out infinite; }
.tk-hearts > * { animation: tkFloat 2.8s ease-in-out infinite; }
.tk-hearts > *:nth-child(2) { animation-delay: .9s; }
.tk-hearts > *:nth-child(3) { animation-delay: 1.8s; }
/* order-placed celebration */
@keyframes tkFall  { 0% { opacity: 0; transform: translateY(-16px) rotate(0) } 12% { opacity: 1 }
                     100% { opacity: 0; transform: translateY(70px) rotate(240deg) } }
@keyframes tkCheer { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-9px) } }
.tk-confetti > * { animation: tkFall 2.8s linear infinite; }
.tk-confetti > *:nth-child(2) { animation-delay: .45s; }
.tk-confetti > *:nth-child(3) { animation-delay: .9s; }
.tk-confetti > *:nth-child(4) { animation-delay: 1.35s; }
.tk-confetti > *:nth-child(5) { animation-delay: 1.8s; }
.tk-confetti > *:nth-child(6) { animation-delay: 2.25s; }
.tk-cheer { animation: tkCheer 1.3s ease-in-out infinite; }
/* the PIN on the confirmation — a "ticket" on its own centred line, clearly not a button */
.done-pin { display: block; width: fit-content; font-family: var(--font-display); font-weight: 600;
  color: var(--ink); font-size: clamp(2rem, 8vw, 2.8rem); background: var(--cloud);
  border: 3px dashed var(--grape); border-radius: 16px; padding: 10px 28px; margin: 6px auto 16px;
  /* letter-spacing leaves a trailing gap after the last digit; the matching indent
     puts the same gap in front so the digits sit truly centred in the box */
  letter-spacing: .18em; text-indent: .18em; }

/* Track page: "see my preview" button + enlarged pop-up note */
.tk-preview-wrap { display: flex; justify-content: center; margin: 16px 0 6px; }
.bm-fit img { width: 100%; height: 100%; object-fit: contain; }
.bm-note-pop { max-width: 340px; font-size: .98rem; margin-top: 16px; padding: 12px 16px; }
.tk-cancel { color: #d13b5e; }
.tk-cancel:hover { color: #d13b5e; background: #fff1f4; }
:root[data-theme="dark"] .tk-cancel:hover { background: rgba(209,59,94,.18); }
.rv-colors { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  .step-preview-layout { flex-direction: column; align-items: center; }
  .step-fields { width: 100%; }
  /* Compact, centered sticky preview on phones so it doesn't dominate the screen */
  .step-preview { align-self: center; top: 74px; }
  .step-preview .bm-preview { width: 96px; }
}

/* ---------------- Color / gradient builder ---------------- */
.cb-wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.cb-controls { flex: 1; min-width: 240px; }
.cb-slots { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.cb-well { width: 54px; height: 54px; border-radius: 50%; border: 3px solid #fff;
  box-shadow: var(--shadow); cursor: pointer; padding: 0; overflow: hidden; }
.cb-well.active { outline: 3px solid var(--grape); outline-offset: 2px; }
input[type=color].cb-well::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color].cb-well::-webkit-color-swatch { border: none; border-radius: 50%; }
input[type=color].cb-well::-moz-color-swatch { border: none; border-radius: 50%; }
.cb-palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-bottom: 6px;
  max-width: 340px; justify-items: center; }
.cb-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.16); cursor: pointer; transition: transform .1s; }
.cb-swatch:hover { transform: scale(1.15); }
.cb-swatch[data-c="#FFFFFF"] { border-color: var(--line); } /* keep white visible */
.cb-dirs { display: inline-grid; grid-template-columns: repeat(3, 42px); gap: 6px; }
.cb-dir { width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--line);
  background: #fff; font-size: 1.15rem; cursor: pointer; display: grid; place-items: center; }
.cb-dir.on { background: var(--grape); color: #fff; border-color: var(--grape); }
.cb-dir.spacer { border: none; background: transparent; cursor: default; }
.cb-preview { width: 116px; aspect-ratio: 3/4; border-radius: 16px; border: 4px solid #fff;
  box-shadow: var(--shadow-lg); flex-shrink: 0; }
.cb-preview-wrap { text-align: center; }
.cb-well { cursor: pointer; } /* slots are buttons now */
.cb-well.cb-pop { animation: cbpop .38s cubic-bezier(.2,1.5,.45,1) both; }
@keyframes cbpop { 0% { transform: scale(0); opacity: 0 } 70% { transform: scale(1.18) } 100% { transform: scale(1); opacity: 1 } }
.cb-hint { font-size: .78rem; }

/* Sliding highlight for segmented toggles (mode / colors count / gradient style) */
.cb-mode, .cb-count, .cb-gtype { position: relative; }
.seg-thumb { position: absolute; top: 4px; left: 4px; width: 0; height: 0;
  border-radius: 999px; background: var(--grape); box-shadow: var(--shadow); z-index: 0;
  transition: left .3s cubic-bezier(.5,1.4,.5,1), top .3s cubic-bezier(.5,1.4,.5,1),
              width .3s cubic-bezier(.5,1.4,.5,1), height .3s cubic-bezier(.5,1.4,.5,1); }
.cb-mode button, .cb-count button, .cb-gtype button { position: relative; z-index: 1;
  background: transparent; transition: color .2s; }
.cb-mode button.on, .cb-count button.on, .cb-gtype button.on { background: transparent; color: #fff; }
/* templates — 5 per row */
.cb-templates { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cb-tpl { min-width: 0; min-height: 34px; border-radius: 10px; border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.16); cursor: pointer; font-family: var(--font-display);
  font-size: .78rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.55); line-height: 1.15;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px 8px; }
.cb-tpl:hover { transform: translateY(-1px); }
/* custom-color button — small labeled pill, sits apart from the swatch grid */
.cb-custom-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; margin-top: 10px;
  padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: #fff; cursor: pointer;
  font-family: var(--font-display); font-weight: 500; color: var(--ink); box-shadow: var(--shadow); }
.cb-custom-btn::before { content: ""; width: 22px; height: 22px; border-radius: 50%;
  background: conic-gradient(from 0deg, #FF3B30, #FFCC00, #34C759, #26C6E6, #7A5CFF, #FF5DA2, #FF3B30); }
.cb-custom-btn:hover { transform: translateY(-1px); }
/* in-page picker */
.cb-picker { margin-top: 12px; padding: 12px; border: 2px solid var(--line); border-radius: 14px;
  background: #fff; box-shadow: var(--shadow); max-width: 250px; }
.cb-sv { position: relative; width: 100%; height: 130px; border-radius: 10px; cursor: crosshair; touch-action: none; }
.cb-hue { position: relative; height: 16px; border-radius: 999px; margin-top: 12px; cursor: pointer; touch-action: none;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.cb-sv .handle, .cb-hue .handle { position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,.35); transform: translate(-50%, -50%); pointer-events: none; }
.cb-hue .handle { top: 50%; }
.cb-picker-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.cb-picker-sw { width: 34px; height: 34px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .btn:hover, .design-card:hover { transform: none; }
}

/* ---------------- Always-on Settings button + panel ---------------- */
.settings-fab { position: fixed; right: 18px; bottom: 18px; z-index: 150; width: 54px; height: 54px;
  border-radius: 50%; border: none; background: var(--surface); color: var(--ink); font-size: 1.5rem;
  box-shadow: var(--shadow-lg); cursor: pointer; display: grid; place-items: center; line-height: 1;
  transition: transform .2s ease; }
.settings-fab:hover { transform: rotate(45deg) scale(1.06); }
.settings-fab:focus-visible { outline: 3px solid var(--blueberry); outline-offset: 3px; }
.settings-panel { position: fixed; right: 18px; bottom: 84px; z-index: 151; }
.settings-panel.hidden { display: none; }
.settings-card { background: var(--surface); color: var(--ink); border: 2px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 16px 18px; width: 264px; max-width: 86vw; }
.settings-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.settings-head h3 { margin: 0; }
.settings-x { border: none; background: transparent; font-size: 1rem; color: var(--muted); cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%; }
.settings-x:hover { background: var(--cloud); }
.settings-row { margin-top: 14px; }
.settings-label { display: block; font-family: var(--font-display); font-weight: 500; font-size: .92rem; margin-bottom: 7px; }
.settings-row .segment { display: flex; width: 100%; }
.settings-row .segment button { flex: 1; min-height: 44px; padding: 0 10px; }
/* sliding highlight for the settings segments (like the color-builder toggles) */
.set-theme, .set-sound { position: relative; }
.set-theme button, .set-sound button { position: relative; z-index: 1; background: transparent; transition: color .2s; }
.set-theme button.on, .set-sound button.on { background: transparent; color: #fff; }
/* sliding highlight for the owner panel's tab bar */
#tabs { position: relative; }
#tabs button { position: relative; z-index: 1; transition: color .2s; }
#tabs button.on { background: transparent; color: #fff; }

/* ---------------- Dark mode ---------------- */
:root[data-theme="dark"] {
  --ink: #f1eefc;
  --cloud: #14122a;
  --surface: #221f42;
  --muted: #a9a3d6;
  --line: #38345f;
  --grape-dark: #8f77ff;
  --shadow: 0 8px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.55);
}
:root[data-theme="dark"] body {
  background-image:
    radial-gradient(circle, rgba(122,92,255,.10) 58px, transparent 60px),
    radial-gradient(circle, rgba(38,198,230,.08) 38px, transparent 40px);
}
:root[data-theme="dark"] a:not(.btn) { color: #9fb6ff; }   /* plain links only — never link-styled buttons */
:root[data-theme="dark"] .site-header { background: rgba(20,18,42,.9); border-bottom-color: var(--line); }
:root[data-theme="dark"] .nav-toggle { background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] input[type=text],
:root[data-theme="dark"] input[type=number],
:root[data-theme="dark"] input[type=email],
:root[data-theme="dark"] input[type=password],
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { background: #1a1836; color: var(--ink); }
:root[data-theme="dark"] .btn-ghost { background: rgba(255,255,255,.15); color: #fff; }
:root[data-theme="dark"] .pricebox { background: linear-gradient(150deg, #262248, #1a1836); }
:root[data-theme="dark"] .modal .box { background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] .o-card,
:root[data-theme="dark"] .o-mini button,
:root[data-theme="dark"] .o-jump,
:root[data-theme="dark"] .d-btn { background: var(--surface); color: var(--ink); }
/* Toast + footer use --ink as a background, so pin them dark when --ink flips light */
:root[data-theme="dark"] .toast { background: #0f0e22; }
:root[data-theme="dark"] .site-footer { background: #0d0c1e; }
/* Surfaces with hard-coded light backgrounds — repaint them so light text stays readable */
:root[data-theme="dark"] .wiz-choice { background: var(--surface); }
:root[data-theme="dark"] .wiz-choice.sel { background: #2c2856; border-color: var(--grape); }
:root[data-theme="dark"] .cb-dir { background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] .cb-custom-btn { background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] .o-note { background: rgba(255,93,162,.15); border-color: rgba(255,93,162,.45); color: var(--ink); }
:root[data-theme="dark"] .o-adv.done { background: rgba(122,92,255,.2); color: #cbbcff; }
:root[data-theme="dark"] .stars .empty { color: #4d4874; }
:root[data-theme="dark"] .tile-big { background: linear-gradient(150deg,#262248,#1a1836); }

/* ================= Big, bold, few-choices treatment (Order / Gallery / Track) ================= */
/* placed last so it wins over the base component rules above */
/* Order: make the very first choice (design vs custom) big and unmissable */
.wiz-choice { padding: 34px 22px; }
.wc-emoji { font-size: 3.5rem; }
.wc-title { font-size: 1.55rem; }
.wc-sub { font-size: .98rem; }
/* Order: bigger, friendlier wizard action buttons */
.wiz-nav .btn { min-height: 56px; font-size: 1.12rem; }
.wiz-nav .btn-cta { min-height: 62px; }
/* Bigger, friendlier page subtitles across Order / Gallery / Track */
main .container > h1.center + p.center { font-size: 1.15rem; }
/* Track: one obvious big PIN box + button */
#t-code { min-height: 60px; }
#t-go { min-height: 62px; font-size: 1.25rem; }
/* Gallery + Wishlist: bigger design titles to match the bigger tiles */
#gallery .design-title, #wishlist .design-title { font-size: 1.15rem; }
