/* Buyer pages: the chart is the hero, pink is for what can be pressed. */

.pub { background: var(--paper); }
.pub-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
}
.pub-titles { min-width: 0; }
.pub-brand { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--pink-text); }
.pub-brand { align-items: flex-end; gap: 6px; }
.pub-logo { height: 40px; width: auto; display: block; margin-bottom: -4px; }
.pub-head h1 { font-size: 1.8rem; margin: 8px 0 0; line-height: 1.02; }
.pub-message { max-width: 520px; margin: 12vh auto 0; text-align: center; }
.pub-message h1 { color: var(--pink); }
.draft-note { margin: 0; padding: 6px 16px; background: var(--sun); font-size: .88rem; font-weight: 800; text-align: center; }

.lang-menu { position: relative; flex: none; }
.lang-menu summary {
  list-style: none; cursor: pointer; font-weight: 900; font-size: .85rem;
  border-radius: 99px; padding: 7px 14px; background: #fff; box-shadow: 0 3px 0 var(--line);
}
.lang-menu summary::after { content: " ▾"; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; list-style: none; margin: 0; padding: 6px; min-width: 160px; box-shadow: 0 10px 30px rgba(43,29,46,.15); }
.lang-menu a { display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.lang-menu a:hover { background: var(--paper); }
.lang-menu a[aria-current] { font-weight: 900; color: var(--pink-text); }

.sizes { display: flex; align-items: center; gap: 8px; padding: 2px 16px 14px; overflow-x: auto; }
.sizes-label { font-size: .8rem; font-weight: 800; color: var(--ink-soft); margin-right: 2px; }
.size-chip {
  flex: none; min-width: 48px; min-height: 42px; padding: 8px 16px; border-radius: 99px;
  border: 2px solid #fff; background: rgba(255,255,255,.75); text-align: center; text-decoration: none; font-weight: 900;
  transition: transform .1s;
}
.size-chip:hover { transform: translateY(-1px); background: #fff; }
.size-chip[aria-current] { background: var(--pink); border-color: var(--pink); color: #fff; box-shadow: 0 4px 0 var(--pink-deep); transform: translateY(-2px); }

/* ---------- viewer ---------- */
.pub-viewer { overflow: hidden; }
.viewer { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.viewer-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 290px; }
.viewer-canvas { position: relative; overflow: hidden; touch-action: none; background: var(--chart-bg); }
.viewer-canvas canvas { display: block; }
.viewer-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--ink-soft); font-weight: 800; }
.zoom-buttons { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 8px; }
.zoom-buttons button {
  width: 46px; height: 46px; border-radius: 14px; border: 0; background: #fff;
  font: 900 1.35rem var(--font-ui); cursor: pointer; box-shadow: 0 3px 0 #e2d9df; color: var(--ink);
}
.zoom-buttons button:active { transform: translateY(2px); box-shadow: 0 1px 0 #e2d9df; }
.cheer {
  position: absolute; left: 50%; top: 18px; z-index: 5; pointer-events: none;
  background: var(--sun); color: var(--ink); font-weight: 900; font-size: 1.05rem;
  padding: 10px 18px; border-radius: 16px; box-shadow: 0 5px 0 var(--sun-deep); white-space: nowrap;
  transform: translateX(-50%) rotate(-3deg); animation: cheer-in 2.6s ease-out forwards;
}
@keyframes cheer-in {
  0% { opacity: 0; transform: translateX(-50%) rotate(-8deg) scale(.6); }
  12% { opacity: 1; transform: translateX(-50%) rotate(3deg) scale(1.08); }
  22% { transform: translateX(-50%) rotate(-3deg) scale(1); }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) rotate(-3deg) translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .cheer { animation: none; } }

.viewer-side { background: #fff; padding: 4px 18px 18px; overflow-y: auto; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-weight: 800; }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend .swatch { border-radius: 50%; cursor: default; }
.notes { white-space: pre-line; font-size: .95rem; }
.side-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 12px; }
.viewer-side .hint { margin-bottom: 8px; }

.progress { height: 8px; background: var(--blush); }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sun), var(--pink)); border-radius: 0 99px 99px 0; transition: width .3s; }

.row-bar {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) 78px; gap: 10px; align-items: center;
  padding: 12px max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: #fff;
}
.row-step {
  width: 62px; height: 62px; border-radius: 20px; border: 2px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: transform .08s;
}
.row-step svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.row-step.primary { width: 78px; height: 78px; border-radius: 24px; border: 0; background: var(--pink); color: #fff; box-shadow: 0 5px 0 var(--pink-deep); }
.row-step.primary svg { width: 34px; height: 34px; }
.row-step:active:not(:disabled) { transform: translateY(3px); }
.row-step.primary:active:not(:disabled) { box-shadow: 0 2px 0 var(--pink-deep); }
.row-step:disabled { opacity: .35; cursor: default; }
.row-info { min-width: 0; text-align: center; }
.row-title { font: 400 1.75rem/1 var(--font-display); text-transform: uppercase; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.row-title small { font: 800 .9rem var(--font-ui); text-transform: none; color: var(--ink-soft); margin-left: 4px; }
.row-goto label { flex-direction: row; justify-content: center; align-items: center; gap: 8px; }
.row-goto input { width: 90px; font-size: 1.1rem; }
.row-dir { margin: 4px 0 6px; font-size: .88rem; color: var(--pink-text); font-weight: 900; }
.runs { list-style: none; margin: 0; padding: 0 0 2px; display: flex; gap: 6px; overflow-x: auto; justify-content: safe center; }
.run { flex: none; display: flex; align-items: center; gap: 5px; padding: 3px 10px 3px 4px; border: 2px solid var(--line); border-radius: 99px; background: var(--paper); font-weight: 900; }
.run .swatch { width: 20px; height: 20px; border-radius: 50%; cursor: default; }

@media (max-width: 760px) {
  .viewer-main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .viewer-side { max-height: 20vh; padding-top: 0; border-top: 2px solid var(--line-soft); }
  .viewer-side .h-small { margin-top: .8em; }
  .legend { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; }
  .row-bar { grid-template-columns: 56px minmax(0, 1fr) 72px; }
  .row-step { width: 56px; height: 56px; }
  .row-step.primary { width: 72px; height: 72px; }
}

/* ---------- print ---------- */
.pub-print { background: var(--blush); }
.print-toolbar { display: flex; gap: 10px; align-items: center; padding: 12px 16px; position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.print-toolbar .lang-menu { margin-left: auto; }
.print-hint { max-width: 210mm; margin: 12px auto; padding: 0 16px; color: var(--ink-soft); font-size: .92rem; font-weight: 700; }
#pages { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0 16px 40px; }
.print-page {
  background: #fff; width: 210mm; max-width: 100%; min-height: 297mm; padding: 12mm; box-shadow: 0 6px 20px rgba(43,29,46,.12);
  display: flex; flex-direction: column; gap: 4mm;
}
.print-page h1 { font-size: 30pt; margin: 0; }
.print-brand { color: var(--pink-text); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: 9pt; margin: 0; }
.print-size { margin: 0; font-size: 13pt; font-weight: 800; color: var(--ink-soft); }
.print-legend { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; font-weight: 700; }
.print-legend li { display: contents; }
.print-overview { max-width: 100%; max-height: 150mm; object-fit: contain; align-self: center; image-rendering: pixelated; margin-top: 4mm; border-radius: 4px; }
.print-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; }
.print-head div { display: flex; flex-direction: column; font-size: 11pt; }
.print-mini { width: 32mm; height: auto; image-rendering: pixelated; border-radius: 3px; }
.print-tile { width: 100%; height: auto; flex: 1; object-fit: contain; object-position: top center; max-height: 245mm; }
.print-foot { margin: auto 0 0; font-size: 8.5pt; color: var(--ink-soft); text-align: center; }

@page { size: A4 portrait; margin: 0; }
@media print {
  .no-print { display: none !important; }
  .pub-print { background: #fff; }
  #pages { padding: 0; gap: 0; }
  .print-page { box-shadow: none; width: 210mm; height: 297mm; min-height: 0; break-after: page; overflow: hidden; }
  .print-page:last-child { break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- public site: home, privacy ---------- */
.site-page { background: var(--paper); }
.site-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px max(20px, env(safe-area-inset-right)) 14px max(20px, env(safe-area-inset-left)); }
.site-brand { display: flex; align-items: flex-end; gap: 6px; text-decoration: none; }
.site-brand img { height: 48px; width: auto; display: block; margin-bottom: -4px; }
.site-brand span { font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--pink-text); font-size: .85rem; }
.site-head-right { display: flex; align-items: center; gap: 8px; }
.btn-big { padding: 14px 26px; font-size: 1.08rem; border-radius: 18px; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; padding: 30px max(20px, 6vw) 56px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); line-height: .95; color: var(--pink); margin: 0 0 14px; text-shadow: 0 3px 0 #fff; }
.hero p { font-size: 1.2rem; font-weight: 800; max-width: 34ch; margin: 0 0 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-logo { width: clamp(140px, 22vw, 260px); height: auto; transform: rotate(8deg); filter: drop-shadow(0 10px 0 rgba(200,26,117,.25)); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: rotate(4deg) translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .hero-logo { animation: none; } }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; text-align: center; } .hero p { margin-inline: auto; } .hero-actions { justify-content: center; } .hero-logo { order: -1; margin: 0 auto; } }

.site-section { max-width: 1100px; margin: 0 auto; padding: 44px 20px; }
.site-section.narrow { max-width: 720px; }
.section-title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 2.2rem; letter-spacing: .01em; margin: 0 0 18px; }
.shop-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.shop-card { display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: 22px; padding: 12px; text-decoration: none; box-shadow: 0 5px 0 var(--line-soft); transition: transform .15s; }
.shop-card:hover { transform: translateY(-4px) rotate(-.8deg); }
.shop-photo { aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--blush); display: grid; place-items: center; }
.shop-photo img { width: 100%; height: 100%; object-fit: cover; }
.shop-photo img.no-photo { width: 45%; height: auto; object-fit: contain; opacity: .9; }
.shop-card h3 { margin: 12px 6px 6px; font-size: 1.15rem; }
.shop-meta { margin: auto 6px 4px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.shop-cta { color: var(--pink-text); font-weight: 900; }
.empty-note { font-weight: 800; color: var(--ink-soft); background: #fff; border-radius: 18px; padding: 22px; }
.about { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; }
.about > img { width: 180px; height: auto; }
.about-text { white-space: pre-line; font-size: 1.15rem; font-weight: 700; line-height: 1.6; margin: 0; }
@media (max-width: 640px) { .about { grid-template-columns: 1fr; text-align: center; } .about > img { margin: 0 auto; } }

.site-foot { background: #fff; padding: 30px 20px 36px; text-align: center; margin-top: 30px; }
.socials { list-style: none; padding: 0; margin: 0 0 18px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.social { display: inline-block; padding: 9px 16px; border-radius: 99px; color: #fff; font-weight: 900; text-decoration: none; transition: transform .1s; }
.social:hover { transform: translateY(-2px); }
.social-youtube { background: #e62117; }
.social-pinterest { background: #c8232c; }
.social-instagram { background: linear-gradient(45deg, #f9a03f, #e1306c 50%, #833ab4); }
.social-facebook { background: #1877f2; }
.social-tiktok { background: #111; }
.foot-line { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 0; color: var(--ink-soft); font-weight: 700; font-size: .9rem; }
.foot-line a { color: var(--pink-text); }

/* ---------- buyer page menu and help ---------- */
.pub-head-right { display: flex; align-items: center; gap: 8px; flex: none; }
.pub-head { position: relative; }
.help-dialog { width: min(560px, calc(100vw - 24px)); border: 0; border-radius: 24px; padding: 22px 24px; color: var(--ink); box-shadow: 0 20px 60px rgba(43,29,46,.35); }
.help-dialog::backdrop { background: rgba(43,29,46,.5); }
.help-dialog h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.6rem; color: var(--pink); margin: 0 0 10px; }
.help-dialog ol { padding-left: 1.3em; margin: 0 0 18px; }
.help-dialog li { margin-bottom: 8px; font-weight: 700; }
.help-dialog li::marker { color: var(--pink); font-weight: 900; }
/* On the chart page the menu is always behind ☰, to leave room for the title. */
.pub-head .nav-toggle { display: flex; }
.pub-head .site-nav {
  display: none; position: absolute; right: 16px; top: calc(100% - 4px); z-index: 30; min-width: 250px;
  flex-direction: column; align-items: stretch; gap: 4px; padding: 8px; background: #fff; border-radius: 18px;
  box-shadow: 0 14px 34px rgba(43,29,46,.18);
}
.pub-head .site-nav.open { display: flex; }
.pub-head .site-nav a { text-align: left; width: 100%; background: transparent; padding: 11px 14px; }
@media (max-width: 420px) { .site-brand span { display: none; } }
@media (max-width: 480px) {
  .pub-head h1 { font-size: 1.45rem; }
  .pub-logo { height: 32px; }
  .pub-brand { font-size: .7rem; }
}
.awake-toggle { margin: 16px 0 0; font-weight: 800; color: var(--ink); }

/* ---------- coming soon (until her birthday) ---------- */
.soon-page { min-height: 100vh; }
.soon { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; gap: 6px; }
.soon-logo { width: min(260px, 70vw); height: auto; animation: bob 5s ease-in-out infinite; }
.soon-brand { margin: 0 0 18px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--pink-text); }
.soon h1 { color: var(--pink); font-size: clamp(2rem, 6vw, 3.4rem); text-shadow: 0 3px 0 #fff; max-width: 16ch; }
.soon-text { font-weight: 800; font-size: 1.15rem; margin: 0 0 22px; max-width: 34ch; }
.soon-lang { margin-top: 26px; }
@media (prefers-reduced-motion: reduce) { .soon-logo { animation: none; } }
