/* ============================================================
   Stella's Birthday Shop
   Palette sampled from the MAMMA MIA! logo lettering.
   ============================================================ */
:root {
  --ink: #33407D;      /* navy outline */
  --ink-2: #455F9A;    /* darker blue */
  --aegean: #7298C6;   /* mid blue */
  --sky: #9ECBE8;      /* main light-blue fill */
  --shine: #D1E2EF;    /* pale shine */
  --paper: #F4F8FB;    /* page background */
  --white: #FFFFFF;
  --line: #D9E5EF;
  --ink-deep: #26315F;

  --gloss-fill: linear-gradient(180deg, #F3F9FD 0%, #CBE4F5 26%, #A3CEEA 50%, #8BBFE3 72%, #B3D8F0 100%);

  --font-display: "Noto Serif Display", "Didot", "Bodoni 72", Georgia, serif;
  --font-body: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 10px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, canvas, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
#main { overflow-x: clip; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--white); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.ic { width: 22px; height: 22px; flex: none; }

/* ---------- Glossy logo lettering ---------- */
.gloss {
  display: inline-block;
  font-family: var(--font-display);
  font-stretch: 62.5%;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.9;
  padding: 0.06em 0.04em 0.04em;
  color: var(--sky);
  background: var(--gloss-fill);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.03em var(--ink);
  paint-order: stroke fill;
  filter: drop-shadow(0.03em 0.035em 0 var(--ink-2));
}

.eyebrow, .mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- Ticker ---------- */
.ticker {
  height: 34px;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  background: var(--ink);
  color: var(--shine);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ticker-track { display: inline-flex; animation: ticker 48s linear infinite; }
.ticker-track span { display: inline-flex; align-items: center; gap: 22px; padding-right: 22px; }
.ticker-track span::after { content: ""; width: 6px; height: 6px; background: var(--sky); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 248, 251, 0.9);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: var(--header-h);
}
.wordmark { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.wm-name { display: inline-flex; align-items: baseline; gap: 0.6rem; }
.wordmark .gloss { font-size: 2.55rem; }
.wordmark small { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }

.search { position: relative; justify-self: center; width: min(520px, 100%); }
.search-ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.search-ic .ic { width: 18px; height: 18px; }
.search input {
  width: 100%;
  height: 46px;
  padding: 0 18px 0 44px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: #7D8DB2; }
.search input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(158, 203, 232, 0.55); }

.header-actions { display: flex; align-items: center; gap: 2px; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.icon-btn:hover { background: var(--shine); }
.icon-btn[aria-current="page"] { background: var(--shine); }
.badge {
  position: absolute;
  top: 3px;
  left: 25px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  border: 2px solid var(--paper);
}
.badge[data-count="0"] { display: none; }
.badge.bump { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: scale(1.45); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, transform .12s, box-shadow .12s;
}
.btn .ic { width: 18px; height: 18px; }
.btn:hover { background: var(--shine); }
.btn:disabled { cursor: default; opacity: 0.6; background: var(--white); }
.btn-solid { background: var(--ink); color: var(--white); }
.btn-solid:hover { background: var(--ink-deep); }
.btn.btn-solid:disabled { background: var(--ink-2); border-color: var(--ink-2); color: var(--white); opacity: 0.4; }
.btn-gloss {
  background: linear-gradient(180deg, #EEF7FD 0%, #BDDDF2 46%, #9ECBE8 54%, #8FC3E6 100%);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-gloss:hover { background: linear-gradient(180deg, #F6FBFE 0%, #C8E3F5 46%, #A8D0EB 54%, #98C8E8 100%); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn-gloss:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost { border-color: transparent; background: none; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 500; }
.btn-ghost:hover { background: var(--shine); }
.btn-ghost[aria-pressed="true"] .ic { fill: var(--ink); }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 14px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn.is-added { background: var(--shine); border-color: var(--shine); }

.text-btn { border: 0; background: none; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink-2); font-size: 13.5px; }
.text-btn:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 56px; text-align: center; }
.hero-kicker { margin-bottom: 22px; }
.hero-title { display: flex; flex-direction: column; align-items: center; margin: 0; font-weight: 400; }
.hero-title .gloss { font-size: clamp(4.4rem, 17vw, 13.5rem); }
.hero-title .gloss + .gloss { margin-top: -0.04em; }
.hero-sub { max-width: 34rem; margin: 26px auto 0; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.hero-cta { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 26px; }

.meter { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; }
.meter-cells { display: flex; gap: 5px; }
.meter-cells i { width: 18px; height: 18px; background: var(--white); border: 1.5px solid var(--aegean); transition: background .3s, border-color .3s; }
.meter-cells i.on { background: var(--sky); border-color: var(--ink); box-shadow: inset 0 -5px 0 rgba(51, 64, 125, 0.16); }
.meter-cells i.bonus { margin-left: 8px; border-style: dashed; }
.meter-cells i.bonus.on { border-style: solid; background: var(--ink); }

/* ---------- Shop toolbar + grid ---------- */
.shop { padding-bottom: 88px; }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  margin-bottom: 8px;
  border-top: 1px solid var(--line);
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 38px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { border-color: var(--aegean); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.search-note { font-size: 15px; color: var(--ink-2); margin-bottom: 18px; }
.search-note strong { color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 22px; }

/* ---------- Product card ---------- */
.card { position: relative; display: flex; flex-direction: column; }
.cover-link { display: block; border-radius: var(--radius); text-decoration: none; }
.cover {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--shine);
  isolation: isolate;
}
.cover canvas.cover-pixels {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  max-width: none;
  image-rendering: pixelated;
  filter: blur(var(--blur, 6px)) saturate(1.05);
  transition: opacity .45s;
}
.cover img.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.cover-link:hover .cover img.cover-img { transform: scale(1.035); }
.cover-link:hover .cover.is-locked .lock-pill { background: rgba(38, 49, 95, 0.92); }

.lock-pill {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px 9px 12px;
  border-radius: 999px;
  background: rgba(51, 64, 125, 0.84);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background .2s;
}
.lock-pill .ic { width: 15px; height: 15px; }
.cover.show-cover .lock-pill { top: 87%; }
.lock-pill.leaving { animation: pill-out .35s forwards; }
@keyframes pill-out { to { opacity: 0; transform: translate(-50%, -50%) scale(.7); } }

.tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 1px 0 rgba(51, 64, 125, 0.15);
}
.tag.owned { background: var(--ink); color: var(--white); }

.heart-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  transition: transform .15s;
}
.heart-btn .ic { width: 20px; height: 20px; }
.heart-btn:hover { transform: scale(1.08); }
.heart-btn[aria-pressed="true"] .ic { fill: var(--ink); }
.heart-btn.pop .ic { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }

.card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 14px 2px 0; }
.card-title {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.04;
  letter-spacing: -0.005em;
}
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.blurb { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.price { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 10px; }
.price s { font-size: 14.5px; color: var(--ink-2); text-decoration-thickness: 1.5px; }
.free {
  font-family: var(--font-display);
  font-stretch: 62.5%;
  font-weight: 900;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.card .btn { margin-top: auto; }

.card-final .cover { outline: 2px dashed var(--aegean); outline-offset: 5px; }

/* ---------- Product page ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding: 40px 0 72px;
}
.product-media { position: sticky; top: calc(var(--header-h) + 24px); }
.product-media .cover { border-radius: 16px; }
.product-media .lock-pill { font-size: 12px; padding: 11px 18px 11px 15px; }
.crumbs { display: flex; gap: 8px; align-items: center; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.product h1 {
  margin: 18px 0 14px;
  font-family: var(--font-display);
  font-stretch: 62.5%;
  font-weight: 800;
  font-size: clamp(2.9rem, 6vw, 4.7rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.rating { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.stars { letter-spacing: 3px; font-size: 15px; }
.price-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: 26px 0;
  padding: 22px 0;
  border-block: 1px solid var(--line);
}
.price-block .was { font-size: 20px; color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: 2px; }
.price-block .gloss { font-size: 4.6rem; }
.price-block .save { flex-basis: 100%; }
.desc { font-size: 17px; line-height: 1.6; max-width: 34rem; }
.mini-h { margin: 28px 0 12px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.includes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.includes li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.includes li::before { content: ""; width: 10px; height: 10px; flex: none; background: var(--sky); border: 1.5px solid var(--ink); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.actions .span-2 { grid-column: 1 / -1; }
.actions .btn-ghost { justify-self: start; padding: 0 10px; margin-left: -10px; }
.owned-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 8px; background: var(--shine); font-weight: 500; }
.locked-note { grid-column: 1 / -1; padding: 16px 18px; border: 1.5px dashed var(--aegean); border-radius: 10px; }
.locked-note strong { display: block; font-size: 17px; margin-bottom: 4px; }
.assure { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.assure li { display: inline-flex; align-items: center; gap: 8px; }
.assure li::before { content: ""; width: 6px; height: 6px; background: var(--aegean); }

.reviews { padding: 56px 0 88px; border-top: 1px solid var(--line); }
.section-h { font-family: var(--font-display); font-stretch: 62.5%; font-weight: 800; font-size: 2.6rem; line-height: 1; margin-bottom: 24px; }
.review-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.review { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.review h3 { font-size: 18px; font-weight: 600; margin: 8px 0 6px; }
.review p { color: var(--ink-2); }
.review footer { margin-top: 16px; display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 500; }
.review footer .mono { font-size: 10.5px; }

/* ---------- Cart drawer ---------- */
dialog.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(440px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: -24px 0 60px rgba(30, 42, 90, 0.18);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
dialog.drawer.is-open { transform: none; }
dialog.drawer::backdrop { background: rgba(26, 34, 72, 0.38); }
.drawer-inner { display: flex; flex-direction: column; height: 100%; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 18px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-family: var(--font-display); font-stretch: 62.5%; font-weight: 800; font-size: 2.1rem; line-height: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 24px; }
.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); background: var(--paper); }
.drawer-foot .btn + .btn { margin-top: 10px; }
.drawer-empty { padding: 56px 8px; text-align: center; }
.drawer-empty p { color: var(--ink-2); margin: 8px 0 22px; }
.drawer-empty strong { font-size: 18px; }

.line-item { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-item:last-child { border-bottom: 0; }
.line-item .cover { border-radius: 8px; }
.line-title { font-weight: 600; line-height: 1.25; }
.line-meta { font-size: 14px; color: var(--ink-2); margin: 2px 0 4px; }
.line-meta strong { color: var(--ink); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 12.5px; }
.line-price { font-family: var(--font-mono); font-size: 14px; }

.sum { margin: 0 0 18px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 15px; }
.sum-row dt, .sum-row dd { margin: 0; }
.sum-row dd { font-family: var(--font-mono); font-size: 14px; }
.sum-row.discount { color: var(--ink-2); }
.sum-row.total { margin-top: 10px; padding-top: 14px; border-top: 1.5px dashed var(--aegean); font-size: 18px; font-weight: 600; }
.sum-row.total dd { font-size: 17px; font-weight: 500; }

/* ---------- Checkout ---------- */
.steps { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 32px 0 0; margin: 0; }
.steps li { display: inline-flex; align-items: center; gap: 10px; color: #8396BC; }
.steps li + li::before { content: ""; width: 28px; height: 1.5px; background: var(--line); }
.steps li.done { color: var(--ink-2); }
.steps li.current { color: var(--ink); }
.page-title { font-family: var(--font-display); font-stretch: 62.5%; font-weight: 800; font-size: clamp(3rem, 7vw, 4.6rem); line-height: 0.95; letter-spacing: -0.01em; }

.checkout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: start; padding: 20px 0 96px; }
.checkout-main { display: grid; gap: 20px; }
.checkout-main .page-title { margin: 6px 0 8px; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.panel-h { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 18px; }
.panel p { color: var(--ink-2); }
.order-summary { position: sticky; top: calc(var(--header-h) + 24px); }
.order-summary .line-item { grid-template-columns: 56px minmax(0, 1fr) auto; }
.fine { margin-top: 14px; font-size: 13px; text-align: center; color: var(--ink-2); }

.pass {
  position: relative;
  overflow: hidden;
  width: min(380px, 100%);
  aspect-ratio: 1.586;
  padding: 22px 24px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: linear-gradient(140deg, #EDF6FC 0%, #B5D9F0 42%, #8DBDE4 70%, #7298C6 100%);
  box-shadow: 5px 5px 0 var(--ink);
}
.pass::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -30%;
  width: 45%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: rotate(18deg);
  animation: pass-shine 4.5s ease-in-out infinite;
}
@keyframes pass-shine { 0%, 55% { left: -40%; } 100% { left: 120%; } }
.pass-top { display: flex; justify-content: space-between; align-items: flex-start; }
.pass-brand { font-family: var(--font-display); font-stretch: 62.5%; font-weight: 900; font-size: 1.9rem; line-height: 0.9; text-transform: uppercase; }
.pass-chip { width: 44px; height: 32px; border-radius: 6px; background: linear-gradient(135deg, #F6F9FC, #C6D7E8); border: 1px solid rgba(51, 64, 125, 0.45); }
.pass-mid { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.18em; }
.pass-bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.pass-bottom .mono { color: var(--ink); font-size: 10px; }
.pass-bottom strong { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; }

.spinner { width: 16px; height: 16px; border: 2px solid rgba(51, 64, 125, .25); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Thank you + receipt ---------- */
.thanks-hero { text-align: center; padding: 40px 0 36px; }
.thanks-hero .gloss { font-size: clamp(3.8rem, 13vw, 8.5rem); }
.thanks-hero p { margin-top: 18px; font-size: 18px; color: var(--ink-2); }
.thanks-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 48px; align-items: start; padding-bottom: 96px; }
.unlock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 28px 20px; }
.unlock-card .card-title { font-size: 1.35rem; margin: 12px 0 10px; }
.unlock-card .btn { opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; pointer-events: none; }
.unlock-card.done .btn { opacity: 1; transform: none; pointer-events: auto; }
.thanks-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.receipt-wrap { filter: drop-shadow(0 14px 28px rgba(30, 42, 90, 0.14)); }
.receipt {
  padding: 30px 26px 44px;
  background: var(--white);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 20px 10px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 20px 10px repeat-x;
}
.r-center { text-align: center; }
.r-brand { display: block; font-size: 14px; font-weight: 500; letter-spacing: 0.12em; }
.r-row { display: flex; justify-content: space-between; gap: 14px; }
.r-row span:last-child { white-space: nowrap; }
.r-sub { padding-left: 14px; color: var(--ink-2); }
.r-total { font-size: 16px; font-weight: 500; margin: 6px 0 2px; }
.r-rule { border-top: 1.5px dashed var(--aegean); margin: 14px 0; }
.barcode {
  height: 52px;
  margin: 20px 0 6px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px, var(--ink) 12px 13px, transparent 13px 17px);
}
.r-small { font-size: 11px; letter-spacing: .2em; }

/* ---------- Unlock effects ---------- */
.stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  padding: 6px 16px 4px;
  border: 2.5px solid var(--white);
  border-radius: 6px;
  background: rgba(51, 64, 125, 0.82);
  color: var(--white);
  font-family: var(--font-display);
  font-stretch: 62.5%;
  font-weight: 900;
  font-size: 1.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-8deg) scale(1.6);
  animation: stamp 1.7s cubic-bezier(.2, .9, .3, 1.2) forwards;
  pointer-events: none;
}
@keyframes stamp {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1.6); }
  14% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
  75% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(.96); }
}
.cover.is-unlocking::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%);
  background-size: 250% 100%;
  background-repeat: no-repeat;
  background-position: 120% 0;
  animation: sweep 1.1s .55s ease-out forwards;
  pointer-events: none;
}
@keyframes sweep { to { background-position: -120% 0; } }
.burst { position: fixed; z-index: 80; width: 0; height: 0; pointer-events: none; }
.burst i {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--s);
  height: var(--s);
  background: var(--c);
  border: 1px solid rgba(51, 64, 125, 0.35);
  animation: burst 1s cubic-bezier(.12, .7, .3, 1) forwards;
}
@keyframes burst {
  0% { transform: translate(-50%, -50%); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)); opacity: 0; }
}

/* ---------- Account pages ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 44px 0 28px; }
.page-head .eyebrow { margin-bottom: 10px; display: block; }
.page-head .meter { align-items: flex-end; }
.tabs { display: flex; gap: 6px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.tab { padding: 12px 6px; margin: 0 12px -1px 0; border-bottom: 2px solid transparent; font-weight: 500; text-decoration: none; color: var(--ink-2); }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); border-color: var(--ink); }
.empty { padding: 64px 20px; text-align: center; border: 1.5px dashed var(--aegean); border-radius: 14px; }
.empty strong { display: block; font-size: 20px; margin-bottom: 6px; }
.empty p { color: var(--ink-2); margin-bottom: 22px; }
.grid .empty { grid-column: 1 / -1; }
.history { margin-top: 64px; padding-bottom: 96px; }
.order-row { border-top: 1px solid var(--line); }
.order-row:last-child { border-bottom: 1px solid var(--line); }
.order-row summary { display: grid; grid-template-columns: 1fr auto auto auto; gap: 24px; padding: 18px 4px; cursor: pointer; list-style: none; align-items: center; }
.order-row summary::-webkit-details-marker { display: none; }
.order-row summary .mono:first-child { color: var(--ink); }
.order-row summary .view { text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.order-row[open] summary .view::after { content: " ↑"; }
.order-row .receipt-wrap { max-width: 420px; margin: 4px 0 28px; }

/* ---------- Opened product ---------- */
.open-page { padding-bottom: 96px; }
.back { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; text-decoration: none; font-weight: 500; }
.back .ic { width: 18px; height: 18px; }
.back:hover { text-decoration: underline; text-underline-offset: 3px; }
.open-head { padding: 24px 0 32px; max-width: 46rem; }
.open-head .page-title { margin: 10px 0 14px; }
.open-head p.desc { color: var(--ink-2); }

.ph {
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1.5px dashed var(--aegean);
  border-radius: 12px;
  background: repeating-linear-gradient(135deg, #EAF3FA 0 12px, #F5F9FC 12px 24px);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 18px; }
.g-item { margin: 0; }
.g-item .ph { aspect-ratio: 1; }
.g-item figcaption { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.album-chips { margin-bottom: 24px; }
.chip-n { margin-left: 8px; font-family: var(--font-mono); font-size: 12px; opacity: 0.65; }

/* Photo grid that keeps each photo's own shape */
.masonry { columns: 4 230px; column-gap: 18px; }
.m-item { break-inside: avoid; margin: 0 0 18px; }
.m-btn { display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--shine); cursor: zoom-in; }
.m-btn img { width: 100%; height: auto; opacity: 0; transition: opacity .45s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.m-btn img.loaded { opacity: 1; }
.m-btn:hover img { transform: scale(1.03); }
.m-item figcaption { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 14px; color: var(--ink-2); }

/* Full-size photo viewer */
dialog.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 26, 58, 0.96);
  color: var(--white);
  opacity: 0;
  transition: opacity .2s;
}
dialog.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
dialog.lightbox.is-open { opacity: 1; }
dialog.lightbox::backdrop { background: transparent; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px 24px; }
.lb-meta { display: flex; align-items: center; gap: 16px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--shine); }
.lb-album:not(:empty)::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 12px; vertical-align: middle; background: var(--sky); }
.lb-btn { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: var(--white); cursor: pointer; transition: background .2s; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.lb-stage { position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 0 18px; }
.lb-img {
  min-width: 0;
  max-width: min(100%, 1100px);
  max-height: calc(100dvh - 150px);
  width: auto;
  height: auto;
  border-radius: 6px;
  opacity: 0;
  transform: scale(.985);
  transition: opacity .25s, transform .25s;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-img.in { opacity: 1; transform: none; }
.lb-caption { min-height: 56px; padding: 14px 24px 26px; text-align: center; font-size: 16px; color: var(--shine); }

.video-frame { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; border-radius: 16px; background: radial-gradient(circle at 50% 40%, var(--ink-2), var(--ink-deep)); overflow: hidden; }
.play-big { width: 92px; height: 92px; display: grid; place-items: center; border: 3px solid var(--white); border-radius: 50%; background: var(--sky); color: var(--ink); cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.play-big .ic { width: 36px; height: 36px; margin-left: 5px; }
.vf-label { position: absolute; left: 20px; bottom: 16px; color: var(--shine); }
.video-frame.is-empty { max-width: 900px; margin: 0 auto; }
.vf-empty { text-align: center; color: var(--white); padding: 24px; }
.vf-empty .eyebrow { color: var(--sky); }
.vf-empty p { margin-top: 10px; font-family: var(--font-display); font-stretch: 87.5%; font-size: clamp(1.3rem, 3.5vw, 1.8rem); }
.video-wrap { width: fit-content; max-width: min(900px, 100%); margin: 0 auto; border-radius: 16px; overflow: hidden; background: var(--ink-deep); box-shadow: 0 24px 60px rgba(30, 42, 90, .18); }
.video-el { display: block; width: auto; height: auto; max-width: 100%; max-height: 75vh; max-height: 75dvh; margin: 0 auto; background: #000; }
.video-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.video-actions .ic { width: 18px; height: 18px; }
.note-card { margin-left: auto; margin-right: auto; }
.product-end { height: 40px; }
.note-card { margin-top: 22px; padding: 24px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); max-width: 46rem; }
.note-card .eyebrow { display: block; margin-bottom: 8px; }



.bouquet { position: relative; width: fit-content; max-width: min(620px, 100%); margin: 0 auto; }
.bouquet img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - var(--header-h) - 70px); max-height: calc(100dvh - var(--header-h) - 70px); border-radius: 18px; box-shadow: 0 24px 60px rgba(30, 42, 90, 0.16); }
.gift-tag {
  position: absolute;
  right: -18px;
  bottom: 34px;
  display: grid;
  gap: 4px;
  min-width: 170px;
  max-width: 240px;
  padding: 16px 20px 16px 30px;
  border: 1.5px solid var(--ink);
  border-radius: 6px 14px 14px 6px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-4deg);
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.15;
}
.gift-tag::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--sky);
}
.tag-row { display: flex; align-items: baseline; gap: 10px; }
.tag-row .eyebrow { width: 40px; font-size: 10.5px; }
.tag-note { margin-top: 6px; font-family: var(--font-body); font-stretch: 100%; font-weight: 400; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
/* ---------- Final surprise ---------- */
.sx { padding: 8px 0 24px; }
.sx-present-wrap { display: grid; justify-items: center; padding: 30px 0 10px; transition: opacity .45s, transform .45s; }
.sx-present-wrap.is-gone { opacity: 0; transform: scale(.92); }
.sx-present {
  position: relative;
  isolation: isolate;
  width: min(300px, 72vw);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-origin: 50% 100%;
  animation: sx-idle 3.6s ease-in-out 1s infinite;
  -webkit-tap-highlight-color: transparent;
}
.sx-present:focus-visible { outline-offset: 10px; border-radius: 12px; }
.sx-glow {
  position: absolute;
  inset: -22%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 243, 251, 1) 0%, rgba(158, 203, 232, .55) 38%, rgba(158, 203, 232, 0) 70%);
  animation: sx-pulse 2.4s ease-in-out infinite;
  transition: transform .7s;
}
.sx-rays {
  position: absolute;
  inset: -55%;
  z-index: -2;
  background: repeating-conic-gradient(from 0deg, rgba(158, 203, 232, .6) 0deg 7deg, rgba(158, 203, 232, 0) 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%);
  mask: radial-gradient(circle, #000 18%, transparent 66%);
  opacity: 0;
  transition: opacity .6s;
  animation: sx-spin 16s linear infinite;
}
.sx-star { position: absolute; color: var(--aegean); animation: sx-twinkle 2.2s ease-in-out infinite; }
.sx-star svg { display: block; width: 100%; height: 100%; }
.sx-box, .sx-lid { position: absolute; border: 2.5px solid var(--ink); }
.sx-box {
  left: 10%;
  right: 10%;
  top: 41%;
  bottom: 2%;
  border-radius: 8px 8px 12px 12px;
  background: linear-gradient(180deg, #CDE7F8 0%, #9ECBE8 55%, #86BBE2 100%);
  box-shadow: inset 0 -16px 0 rgba(51, 64, 125, .12), 6px 6px 0 var(--ink);
  transition: transform .5s, opacity .5s;
}
.sx-lid {
  left: 4%;
  right: 4%;
  top: 28%;
  height: 15%;
  z-index: 2;
  border-radius: 8px;
  background: linear-gradient(180deg, #ECF6FC 0%, #B1D7F0 100%);
  box-shadow: 0 6px 0 rgba(51, 64, 125, .2);
  transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .7s .2s;
}
.sx-box::before, .sx-lid::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 50%;
  width: 16%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #26315F, #455F9A 45%, #33407D);
}
.sx-bow { position: absolute; left: 50%; bottom: 72%; width: 62%; transform: translateX(-50%); }
.sx-bow svg { display: block; width: 100%; height: auto; }
.sx-present:not(.is-open):hover .sx-lid { transform: translateY(-8px) rotate(-2deg); }
.sx-present.is-shaking { animation: sx-shake .56s ease-in-out; }
.sx-present.is-open { animation: none; cursor: default; }
.sx-present.is-open .sx-lid { transform: translate(-45%, -230%) rotate(-30deg); opacity: 0; }
.sx-present.is-open .sx-box { transform: translateY(8%) scaleY(.94); }
.sx-present.is-open .sx-glow { transform: scale(1.8); }
.sx-present.is-open .sx-rays { opacity: 1; }
.sx-hint {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
  animation: sx-blink 2.2s ease-in-out infinite;
}

.sx-head { text-align: center; margin-bottom: 36px; }
.sx-title { margin: 0; font-weight: 400; }
.sx-title .gloss { font-size: clamp(3.6rem, 13vw, 7.5rem); }
.sx-sub { margin: 14px auto 0; max-width: 30rem; font-family: var(--font-display); font-stretch: 87.5%; font-size: clamp(1.2rem, 3vw, 1.55rem); line-height: 1.35; }
.sx-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; max-width: 1040px; margin: 0 auto; }
.sx-photo { margin: 0; padding: 14px 14px 54px; border-radius: 4px; background: var(--white); box-shadow: 0 24px 60px rgba(30, 42, 90, .18); transform: rotate(-2.5deg); }
.sx-photo img { display: block; width: 100%; height: auto; }
.sx-photo .ph { aspect-ratio: 4 / 5; }
.sx-mail { display: grid; justify-items: center; align-content: start; padding-top: 70px; }
.sx-mail.has-letter { padding-top: 6px; }
.sx-env-wrap { display: grid; justify-items: center; width: 100%; transition: opacity .38s, transform .38s; }
.sx-env-wrap.is-gone { opacity: 0; transform: translateY(24px) scale(.95); }
.sx-envelope {
  position: relative;
  width: min(400px, 100%);
  aspect-ratio: 3 / 2;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 900px;
  -webkit-tap-highlight-color: transparent;
}
.sx-envelope:focus-visible { outline-offset: 8px; }
.env-back { position: absolute; inset: 0; z-index: 1; border: 2px solid var(--ink); border-radius: 10px; background: #C6E1F4; box-shadow: 6px 6px 0 var(--ink); }
.env-paper {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 7%;
  bottom: 9%;
  z-index: 3;
  border: 1px solid #C9D6E6;
  border-radius: 4px;
  background: repeating-linear-gradient(180deg, #FFFFFF 0 15px, #E3EDF6 15px 16px);
  transition: transform 1s cubic-bezier(.2, .8, .2, 1);
}
.env-front { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; max-width: none; border-radius: 10px; overflow: hidden; }
.env-to {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12%;
  z-index: 5;
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 700;
  font-size: clamp(1.15rem, 4vw, 1.55rem);
  color: var(--ink);
  text-align: center;
  pointer-events: none;
  transition: opacity .3s;
}
.env-flap-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 60%;
  z-index: 6;
  transform-origin: 50% 0;
  filter: drop-shadow(0 2px 0 #33407D);
  transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}
.env-flap { display: block; width: 100%; height: 100%; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, #DDEFFA, #B9DBF1); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.env-seal {
  position: absolute;
  left: 50%;
  top: 60%;
  z-index: 7;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5D78B8, #33407D 70%);
  box-shadow: 0 3px 0 #26315F, inset 0 0 0 4px rgba(255, 255, 255, .14);
  color: var(--white);
  transition: transform .3s, opacity .3s;
}
.env-seal svg { width: 24px; height: 24px; }
.sx-envelope:not(.is-opening):hover .env-paper { transform: translateY(-7%); }
.sx-envelope:not(.is-opening):hover .env-flap-wrap { transform: rotateX(18deg); }
.sx-env-wrap.is-ready .sx-envelope:not(.is-opening) { animation: sx-float 3s ease-in-out infinite; }
.sx-envelope.is-opening { cursor: default; }
.sx-envelope.is-opening .env-seal { transform: scale(1.5); opacity: 0; }
.sx-envelope.is-opening .env-flap-wrap { transform: rotateX(180deg); }
.sx-envelope.flap-behind .env-flap-wrap { z-index: 2; }
.sx-envelope.paper-out .env-paper { transform: translateY(-62%); }
.sx-envelope.paper-out .env-to { opacity: 0; }

.sx-letter {
  width: 100%;
  padding: 40px 42px 44px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 6px 6px 0 var(--ink);
  font-family: var(--font-display);
  font-stretch: 87.5%;
  font-size: 1.22rem;
  line-height: 1.65;
  transform-origin: 50% 0;
}
.sx-letter:focus { outline: none; }
.sx-letter p + p { margin-top: 14px; }
.sx-letter .sx-greet { font-weight: 800; font-size: 1.6rem; line-height: 1.2; margin-bottom: 20px; }
.sx-letter .sx-sign { margin-top: 26px; text-align: right; font-weight: 700; }
.sx-letter.is-in { animation: sx-unfold .8s cubic-bezier(.2, .8, .2, 1) both; }
.sx-letter.is-in > * { animation: sx-line .55s ease-out both; animation-delay: calc(.35s + var(--i, 0) * .14s); }
.sx-again { margin-top: 40px; text-align: center; }

.sx-reveal.is-in .sx-title { animation: sx-pop .9s cubic-bezier(.2, .9, .3, 1.25) both; }
.sx-reveal.is-in .sx-sub { animation: sx-line .6s .55s ease-out both; }
.sx-reveal.is-in .sx-photo { animation: sx-rise 1.1s .35s cubic-bezier(.2, .9, .3, 1.1) both; }
.sx-reveal.is-in .sx-env-wrap { animation: sx-slide 1s .85s cubic-bezier(.2, .9, .3, 1.1) both; }
.sx-reveal.is-in .sx-env-wrap.is-gone { animation: none; }

@keyframes sx-idle { 0%, 72%, 100% { transform: none; } 76% { transform: rotate(-4deg); } 80% { transform: rotate(4deg); } 84% { transform: rotate(-3deg); } 88% { transform: rotate(2deg); } }
@keyframes sx-shake { 0%, 100% { transform: none; } 15% { transform: rotate(-7deg) scale(1.03); } 30% { transform: rotate(7deg) scale(1.05); } 45% { transform: rotate(-6deg) scale(1.06); } 60% { transform: rotate(6deg) scale(1.07); } 80% { transform: rotate(-3deg) scale(1.04); } }
@keyframes sx-pulse { 50% { opacity: .55; } }
@keyframes sx-spin { to { transform: rotate(360deg); } }
@keyframes sx-twinkle { 0%, 100% { opacity: .25; transform: scale(.7) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }
@keyframes sx-blink { 50% { opacity: .45; } }
@keyframes sx-pop { 0% { opacity: 0; transform: scale(.55); } 60% { opacity: 1; transform: scale(1.06); } 100% { transform: none; } }
@keyframes sx-rise { from { opacity: 0; transform: translateY(140px) rotate(-14deg) scale(.55); } to { opacity: 1; transform: rotate(-2.5deg); } }
@keyframes sx-slide { from { opacity: 0; transform: translateY(90px) rotate(8deg); } to { opacity: 1; transform: none; } }
@keyframes sx-float { 50% { transform: translateY(-7px) rotate(-1deg); } }
@keyframes sx-unfold { from { opacity: 0; transform: perspective(1000px) rotateX(-75deg) scaleY(.5); } to { opacity: 1; transform: none; } }
@keyframes sx-line { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.game-frame { min-height: 460px; border-radius: 16px; }

/* ---------- Games ---------- */
[hidden] { display: none !important; }
.game { max-width: 820px; margin: 0 auto; }
.game-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}
.stats { display: flex; gap: 24px; }
.stat { display: flex; flex-direction: column; gap: 1px; min-width: 52px; }
.stat .eyebrow { font-size: 10.5px; }
.stat strong { font-family: var(--font-mono); font-size: 19px; font-weight: 500; }
.game-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.game-how { margin: 0 0 16px; font-size: 15px; color: var(--ink-2); }
.game-done {
  padding: 26px 22px 28px;
  text-align: center;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 5px 5px 0 var(--ink);
}
.game-done .gloss { font-size: clamp(2.6rem, 9vw, 3.8rem); }
.game-done p { margin: 10px 0 20px; color: var(--ink-2); line-height: 1.55; }
.game-done p strong { color: var(--ink); font-family: var(--font-mono); font-weight: 500; }
.game-done.is-small { padding: 22px; box-shadow: 4px 4px 0 var(--ink); }
.game-done-h { font-family: var(--font-display); font-stretch: 62.5%; font-weight: 800; font-size: 2rem; line-height: 1; }

/* Mahjong */
.mj-stage {
  position: relative;
  padding: 18px 10px 22px;
  border-radius: 18px;
  background: radial-gradient(120% 90% at 50% 20%, #EEF6FC 0%, #D1E2EF 100%);
  border: 1px solid var(--line);
  overflow: hidden;
}
.mj-board { position: relative; margin: 0 auto; }
.mj-tile {
  position: absolute;
  width: var(--tw);
  height: var(--th);
  padding: 0;
  border: 1px solid #B7C8DC;
  border-radius: calc(var(--tw) * 0.14);
  background: linear-gradient(160deg, #FFFFFF 0%, #FAF8F0 55%, #EEEADC 100%);
  box-shadow:
    calc(var(--tw) * 0.05) calc(var(--tw) * 0.07) 0 #C7D6E8,
    calc(var(--tw) * 0.09) calc(var(--tw) * 0.12) 0 #8EA6C6,
    0 calc(var(--tw) * 0.18) calc(var(--tw) * 0.25) rgba(30, 42, 90, 0.18);
  cursor: pointer;
  transition: transform .14s, opacity .24s, filter .2s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.mj-tile svg { display: block; width: 100%; height: 100%; pointer-events: none; }
.mj-tile:hover:not(.blocked) { transform: translateY(-2px); }
.mj-tile.blocked { filter: brightness(0.9) saturate(0.8); cursor: default; }
.mj-tile.sel {
  border-color: var(--ink);
  background: linear-gradient(160deg, #EAF5FC 0%, #C4E1F4 100%);
  transform: translateY(-3px);
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
.mj-tile.hint { animation: mj-hint .9s ease-in-out 2; }
.mj-tile.gone { opacity: 0; transform: scale(.7) translateY(-8px); pointer-events: none; }
.mj-tile.nope { animation: nope .32s; }
.mj-tile.shuffling { animation: mj-flip .4s; }
@keyframes mj-hint { 50% { background: linear-gradient(160deg, #FFFFFF, #9ECBE8); transform: translateY(-4px); } }
@keyframes mj-flip { 50% { transform: scale(.85); opacity: .5; } }
@keyframes nope { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.mj-overlay {
  position: absolute;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(244, 248, 251, 0.82);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.mj-overlay .game-done { width: min(420px, 100%); }

/* Word search */
.ws-layout { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 28px; align-items: start; }
.ws-board { padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.ws-wrap {
  position: relative;
  aspect-ratio: 1;
  container-type: inline-size;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
.ws-lines { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; z-index: 1; pointer-events: none; }
.ws-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  grid-template-rows: repeat(var(--n), 1fr);
}
.ws-cell {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 18px;
  font-size: calc(100cqw / var(--n) * 0.5);
  color: var(--ink);
}
.ws-miss { animation: ws-miss .55s forwards; }
@keyframes ws-miss { to { opacity: 0; } }
.ws-progress { height: 8px; border-radius: 4px; background: var(--shine); overflow: hidden; }
.ws-progress i { display: block; height: 100%; width: 0; background: var(--ink-2); transition: width .4s; }
.ws-side .mini-h { margin-top: 20px; }
.ws-words { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ws-words li {
  padding: 5px 11px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.08em;
  transition: background .3s, color .3s;
}
.ws-words li.got { background: var(--shine); border-color: transparent; }
.ws-words li.ws-empty { padding: 0; border: 0; background: none; font-family: var(--font-body); font-size: 14.5px; letter-spacing: 0; color: var(--ink-2); }
.ws-hint {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  animation: cx-in .3s cubic-bezier(.2, .9, .3, 1.2);
}
.ws-hint .eyebrow { color: var(--sky); }
.ws-hint strong { font-family: var(--font-mono); font-size: 20px; font-weight: 500; letter-spacing: 0.14em; }
.ws-words li.found { background: var(--shine); border-color: transparent; color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: 1.5px; }

/* Word groups */
.cx { max-width: 640px; }
.cx-solved { display: grid; gap: 8px; margin-bottom: 8px; }
.cx-group { padding: 14px 12px; border-radius: 10px; text-align: center; animation: cx-in .35s cubic-bezier(.2, .9, .3, 1.2); }
.cx-group strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.cx-group span { font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.cx-g0 { background: #BFDFF3; color: var(--ink); }
.cx-g1 { background: var(--aegean); color: var(--white); }
.cx-g2 { background: var(--ink); color: var(--white); }
.cx-g3 { background: linear-gradient(180deg, #EEF7FD 0%, #BDDDF2 46%, #9ECBE8 54%, #8FC3E6 100%); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
@keyframes cx-in { from { transform: scale(.94); opacity: 0; } }
.cx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cx-tile {
  min-height: 74px;
  padding: 6px 4px;
  border: 0;
  border-radius: 10px;
  background: #DFEAF3;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background .15s, color .15s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.cx-tile:hover { background: #D1E2EF; }
.cx-tile[aria-pressed="true"] { background: var(--ink-2); color: var(--white); }
.cx-tile:active { transform: scale(.96); }
.cx-tile.long { font-size: 12.5px; letter-spacing: 0.02em; }
.cx-tile:disabled { cursor: default; }
.cx-tile.shake { animation: nope .32s 2; }
.cx-mistakes { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 18px 0 14px; font-size: 14.5px; color: var(--ink-2); }
.cx-dots { display: inline-flex; gap: 7px; }
.cx-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-2); transition: background .3s; }
.cx-dots i.used { background: var(--line); }
.cx-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.cx-feedback { min-height: 24px; margin-top: 14px; text-align: center; font-weight: 500; }
.cx-done { margin-top: 18px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 90; width: min(440px, calc(100vw - 32px)); transform: translateX(-50%); display: grid; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 10px; border-radius: 12px; background: var(--ink); color: var(--white); box-shadow: 0 14px 34px rgba(30, 42, 90, 0.3); pointer-events: auto; animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.2); }
.toast.out { animation: toast-out .3s forwards; }
.toast .cover { width: 42px; flex: none; border-radius: 6px; }
.toast .t-text { flex: 1; font-size: 14.5px; line-height: 1.35; }
.toast .t-text small { display: block; color: var(--shine); font-size: 13px; }
.toast button { border: 0; background: none; color: var(--sky); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 28px 24px 40px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- Preview tools (design review only) ---------- */
.preview-tools { position: fixed; left: 16px; bottom: 16px; z-index: 85; font-size: 13px; }
.preview-tools summary { list-style: none; cursor: pointer; padding: 8px 12px; border-radius: 8px; background: var(--white); border: 1px dashed var(--ink-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; box-shadow: 0 6px 16px rgba(30, 42, 90, .12); }
.preview-tools summary::-webkit-details-marker { display: none; }
.pt-body { position: absolute; left: 0; bottom: calc(100% + 8px); width: 230px; padding: 14px; display: grid; gap: 8px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(30, 42, 90, .18); }
.pt-body p { color: var(--ink-2); font-size: 12.5px; line-height: 1.4; margin-bottom: 4px; }
.pt-body button { padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; text-align: left; }
.pt-body button:hover { border-color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  :root { --header-h: 116px; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding-top: 10px; padding-bottom: 12px; }
  .search { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .icon-btn .label { display: none; }
  .icon-btn { padding: 0 10px; }
  .product { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 20px; }
  .product-media { position: static; max-width: 520px; width: 100%; margin: 0 auto; }
  .checkout, .thanks-layout { grid-template-columns: minmax(0, 1fr); }
  .order-summary { position: static; }
  }
@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .footer-inner { padding-left: 16px; padding-right: 16px; }
  .wm-name { flex-direction: column; align-items: center; gap: 0; }
  .wordmark .gloss { font-size: 1.75rem; line-height: 0.86; }
  .hero { padding: 40px 0 44px; }
  .hero-sub { font-size: 16.5px; }
  .meter-cells { gap: 4px; }
  .meter-cells i { width: 15px; height: 15px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 16px 0; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .card-title { font-size: 1.32rem; }
  .card .blurb { display: none; }
  .free { font-size: 1.3rem; }
  .price { margin-bottom: 8px; gap: 8px; }
  .price s { font-size: 13px; }
  .lock-pill { padding: 7px 10px; font-size: 9.5px; letter-spacing: .1em; gap: 5px; }
  .lock-pill .ic { width: 13px; height: 13px; }
  .tag { font-size: 10px; padding: 4px 6px; top: 8px; left: 8px; }
  .heart-btn { width: 34px; height: 34px; top: 6px; right: 6px; }
  .heart-btn .ic { width: 17px; height: 17px; }
  .btn-sm { font-size: 11.5px; padding: 0 8px; letter-spacing: .06em; }
  .actions { grid-template-columns: minmax(0, 1fr); }
  .price-block .gloss { font-size: 3.8rem; }
  .panel { padding: 20px; }
      .order-row summary { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .order-row summary .hide-sm { display: none; }
  .unlock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .page-head .meter { align-items: flex-start; }
  .toasts { bottom: 70px; }
  .game-frame { min-height: 340px; }
  .sx-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .sx-photo { width: min(400px, calc(100% - 28px)); margin: 0 auto; padding: 10px 10px 40px; }
  .sx-mail { padding-top: 0; }
  .sx-letter { padding: 28px 22px 32px; font-size: 1.1rem; }
  .sx-letter .sx-greet { font-size: 1.35rem; }
  .gift-tag { right: 10px; bottom: 16px; min-width: 0; padding: 12px 16px 12px 26px; font-size: 1.15rem; }
  .masonry { columns: 2; column-gap: 10px; }
  .game-bar { padding: 10px 12px; }
  .stats { gap: 16px; }
  .stat strong { font-size: 17px; }
  .game-actions { width: 100%; }
  .game-actions .btn { flex: 1; padding: 0 4px; white-space: nowrap; font-size: 11px; letter-spacing: 0.05em; }
  .mj-stage { padding: 14px 4px 18px; margin: 0 -4px; }
  .ws-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ws-board { padding: 6px; }
  .ws-side { order: -1; }
  .ws-side .mini-h { margin: 14px 0 8px; }
  .ws-words { gap: 6px; margin-bottom: 0; }
  .ws-words li { padding: 3px 9px; font-size: 12.5px; }
  .ws-done { margin-top: 16px; }
  .cx-grid { gap: 6px; }
  .cx-tile { min-height: 64px; font-size: 12.5px; }
  .cx-tile.long { font-size: 10px; }
  .m-item { margin-bottom: 10px; }
  .m-btn { border-radius: 8px; }
  .lb-stage { padding: 0; }
  .lb-prev, .lb-next { position: fixed; z-index: 2; bottom: calc(18px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.16); }
  .lb-prev { left: 16px; }
  .lb-next { right: 16px; }
  .lb-img { max-width: 100%; max-height: calc(100dvh - 170px); border-radius: 0; }
  .lb-caption { min-height: 92px; padding: 18px 76px calc(28px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .pass::after { animation: none; display: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
