:root {
  /* 三個角色：紙、墨、沙橘（與 App BrandPalette 同源）。zine 版刻意只做亮色紙感 */
  --paper: #F7F4EE;
  --ink: #1C2240;
  --ink-soft: #4C5270;
  --orange: #D46B17;
  --orange-down: #B85A0F;
  --flood: #DD771F;
  --tape: rgba(233, 205, 152, .55);
  --font: "Noto Sans TC", "PingFang TC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  background: var(--paper) url("assets/zine/paper.jpg") repeat;
  background-size: 512px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--orange); }
h1, h2, h3 { font-weight: 900; line-height: 1.4; text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { max-width: 66rem; margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 2.5rem); }

/* 手繪素材共通：白底靠 multiply 疊進紙底 */
.doodle { mix-blend-mode: multiply; pointer-events: none; }

/* 手繪感按鈕：不規則圓角是老派塗鴉技法 */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-weight: 900;
  font-size: 1.2rem;
  color: #fff;
  background: var(--orange);
  border: 3px solid var(--ink);
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  padding: .7em 1.7em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s ease-out, box-shadow .15s ease-out;
}
.btn:hover { transform: translate(-1px, -1px) rotate(-.5deg); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible, a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* 拍立得截圖框 + 膠帶 */
.polaroid {
  background: #fff;
  padding: 10px 10px 12px;
  box-shadow: 0 8px 14px rgba(28, 34, 64, .16);
  position: relative;
  width: min(270px, 74vw);
}
.polaroid .shot {
  aspect-ratio: 9 / 19.5;
  background: #ECE7DC;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: .9rem;
  overflow: hidden;
}
.polaroid .shot img { width: 100%; height: 100%; object-fit: cover; }
.polaroid figcaption {
  margin-top: 9px;
  text-align: center;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-soft);
}
.tape {
  position: absolute;
  top: -12px; left: 50%;
  width: 96px; height: 28px;
  background: var(--tape);
  transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 1px 2px rgba(28, 34, 64, .08);
}

/* ── header ── */
header { padding-block: 1.4rem; }
header .wrap { display: flex; align-items: center; gap: .75rem; }
header img { width: 46px; height: 46px; border-radius: 11px; box-shadow: 2px 2px 0 var(--ink); }
header .name { font-weight: 900; font-size: 1.25rem; white-space: nowrap; }
header .spacer { flex: 1; }
header .store { font-size: .95rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
header .store:hover { text-decoration: underline; }

/* ── hero ── */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3.5rem, 8vw, 6rem); position: relative; }
.hero .grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 { font-size: clamp(2.1rem, 5.8vw, 3.7rem); position: relative; }
.hero h1 .wavy { position: relative; white-space: nowrap; }
.hero h1 .wavy svg {
  position: absolute;
  left: 0; bottom: -.18em;
  width: 100%; height: .35em;
  overflow: visible;
}
.hero h1 .wavy path {
  fill: none;
  stroke: var(--orange);
  stroke-width: 7;
  stroke-linecap: round;
}
.hero .sub {
  margin-top: 1.5rem;
  max-width: 30em;
  font-size: clamp(1.1rem, 1.7vw, 1.2rem);
  color: var(--ink-soft);
}
.hero .cta { margin-top: 2.2rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.hero .price { font-size: .95rem; font-weight: 700; color: var(--ink-soft); }
.hero .vows {
  margin-top: 2.2rem;
  display: flex;
  gap: .4rem 1.6rem;
  flex-wrap: wrap;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-soft);
  list-style: none;
}
.hero .vows li { display: flex; align-items: center; gap: .35em; }
.hero .vows li::before {
  content: "";
  width: 14px; height: 14px;
  background: url("assets/zine/star-orange.png") center / contain no-repeat;
}
.hero .lock-doodle {
  position: absolute;
  top: -.5rem; right: clamp(0rem, 4vw, 3rem);
  width: clamp(70px, 9vw, 120px);
  transform: rotate(8deg);
  opacity: .9;
}
.hero .shot-stack { position: relative; justify-self: center; }
.hero .shot-stack .polaroid { transform: rotate(2.2deg); }
.hero .arrow-doodle {
  position: absolute;
  left: -110px; top: 28%;
  width: 96px;
  transform: rotate(12deg);
}
.hero .arrow-note {
  position: absolute;
  left: -128px; top: 16%;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink-soft);
  transform: rotate(-4deg);
  width: 7em;
  text-align: center;
}

/* ── 社會證明 ── */
.proof { padding-block: 1rem 3rem; }
.proof .wrap { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.proof button {
  display: flex; align-items: center; gap: 1.1rem;
  font: inherit; text-align: left;
  background: none; border: none; cursor: pointer;
  color: var(--ink);
}
.proof .thumb {
  width: 64px;
  padding: 4px 4px 10px;
  background: #fff;
  box-shadow: 0 4px 8px rgba(28, 34, 64, .18);
  transform: rotate(-4deg);
}
.proof .text { font-size: 1rem; font-weight: 700; line-height: 1.6; }
.proof .see { display: block; color: var(--orange); }
.proof button:hover .see { text-decoration: underline; }
.proof .dashes { width: 44px; transform: rotate(-12deg); }

/* ── 功能（筆記本清單） ── */
.features { padding-block: clamp(3rem, 7vw, 5rem); }
.features h2 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); max-width: 20em; }
.features .lede { margin-top: 1rem; max-width: 33em; color: var(--ink-soft); }
.features ul { list-style: none; margin-top: 2.5rem; max-width: 44em; }
.features li {
  display: grid;
  grid-template-columns: 34px minmax(0, .62fr) minmax(0, 1.6fr);
  gap: .4rem 1rem;
  align-items: baseline;
  padding-block: 1.35rem;
  border-bottom: 2px dashed rgba(28, 34, 64, .25);
}
.features li img { width: 22px; position: relative; top: 3px; }
.features h3 { font-size: 1.25rem; font-weight: 900; }
.features p { color: var(--ink-soft); font-size: 1.05rem; }
.features .chip {
  display: inline-block;
  margin-top: .5rem;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 125px 12px 115px 12px / 12px 115px 12px 125px;
  padding: .2em .9em;
  background: #fff;
}
@media (max-width: 700px) {
  .features li { grid-template-columns: 26px 1fr; }
  .features li > div { grid-column: 2; }
}

/* ── 封鎖畫面（大聲時刻，墨底亮橘） ── */
.shield {
  background: var(--ink);
  color: #EFECE3;
  padding-block: clamp(3.5rem, 8vw, 6rem);
  position: relative;
}
.shield .grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.shield .kick { font-weight: 700; font-size: 1.05rem; }
.shield blockquote {
  margin-top: 1.25rem;
  font-weight: 900;
  font-size: clamp(1.8rem, 4.4vw, 3rem);
  line-height: 1.45;
  min-height: 5.8em;
  color: #F28F42;
  text-wrap: balance;
  transform: rotate(-1deg);
  transition: opacity .45s ease-out, transform .45s cubic-bezier(.22, 1, .36, 1);
}
.shield blockquote.swap { opacity: 0; transform: rotate(-1deg) translateY(10px); }
.shield .note { margin-top: 1rem; font-size: .95rem; font-weight: 500; color: #B9BCCB; }
.shield .next {
  margin-top: 1.5rem;
  font-family: var(--font);
  font-weight: 900;
  font-size: 1rem;
  color: #EFECE3;
  background: transparent;
  border: 3px solid #EFECE3;
  border-radius: 225px 15px 255px 15px / 15px 255px 15px 225px;
  padding: .5em 1.5em;
  cursor: pointer;
  transition: background .18s ease-out, color .18s ease-out;
}
.shield .next:hover { background: #EFECE3; color: var(--ink); }
.shield .next:focus-visible { outline-color: #F28F42; }
.shield .polaroid { justify-self: center; transform: rotate(-2.4deg); }
@media (max-width: 880px) {
  .shield .grid { grid-template-columns: 1fr; }
  .shield blockquote { min-height: 0; }
}

/* ── 稱讚（安靜的一拍） ── */
.praise { padding-block: clamp(3.5rem, 8vw, 6rem); text-align: center; position: relative; }
.praise .kick { color: var(--ink-soft); font-size: 1rem; font-weight: 500; }
.praise p.big {
  margin-top: 1.25rem;
  font-weight: 900;
  font-size: clamp(1.7rem, 4.2vw, 2.7rem);
  line-height: 1.5;
  color: var(--orange);
  transform: rotate(-.6deg);
}
.praise .praise-shot {
  margin: 2.2rem auto 0;
  width: min(210px, 60vw);
  transform: rotate(2deg);
}

/* ── 相簿 ── */
.gallery { padding-block: 0 clamp(3rem, 7vw, 5rem); }
.gallery .strip {
  display: flex;
  gap: clamp(1.25rem, 4vw, 3rem);
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}
.gallery .polaroid { width: min(215px, 62vw); }

/* ── 誠實聲明（紙底手繪警告框） ── */
.honest { padding-block: clamp(3rem, 7vw, 5rem); }
.honest .box {
  max-width: 48em;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 22px 42px 20px 48px / 46px 20px 44px 22px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.honest h2 { font-size: clamp(1.7rem, 3.8vw, 2.4rem); }
.honest .lede { margin-top: 1rem; color: var(--ink-soft); max-width: 33em; }
.honest ul { margin-top: 1.8rem; list-style: none; }
.honest li {
  padding-block: 1.05rem;
  border-top: 2px dashed rgba(28, 34, 64, .25);
}
.honest li strong { color: var(--orange); font-weight: 700; }
.honest a { color: var(--orange); }

/* ── FAQ ── */
.faq { padding-block: clamp(3rem, 7vw, 5rem); }
.faq h2 { font-size: clamp(1.7rem, 3.8vw, 2.4rem); }
.faq .list { margin-top: 2rem; max-width: 44em; }
.faq details { border-bottom: 2px dashed rgba(28, 34, 64, .25); }
.faq summary {
  font-weight: 900;
  font-size: 1.1rem;
  padding-block: 1.15rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: .75rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "＋"; color: var(--orange); font-weight: 900; flex: none; }
.faq details[open] summary::before { content: "－"; }
.faq details p { padding-bottom: 1.4rem; color: var(--ink-soft); max-width: 38em; }
.faq details p + p { margin-top: .6rem; }

/* ── 尾端 CTA + footer ── */
.last { text-align: center; padding-block: clamp(3.5rem, 8vw, 6rem); position: relative; }
.last h2 { font-size: clamp(1.8rem, 4.4vw, 2.7rem); transform: rotate(-.5deg); }
.last .btn { margin-top: 2.2rem; }
.last .price { margin-top: 1.2rem; font-size: .95rem; font-weight: 500; color: var(--ink-soft); }
.last .lock { width: 64px; margin: 0 auto 1rem; transform: rotate(-6deg); }
footer { border-top: 3px solid var(--ink); padding-block: 2.2rem; font-size: .9rem; color: var(--ink-soft); }
footer .wrap { display: flex; gap: .5rem 1.75rem; flex-wrap: wrap; }
footer a { color: var(--ink-soft); }

/* 懸浮購買鈕：捲過 hero CTA 後浮出 */
.floating-cta {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  z-index: 50;
  font-size: 1.02rem;
  padding: .55em 1.35em;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .25s ease-out, transform .25s ease-out;
}
.floating-cta.visible { opacity: 1; transform: none; pointer-events: auto; }

/* lightbox */
#rank-dialog {
  margin: auto;
  border: none;
  padding: 10px 10px 12px;
  background: #fff;
  width: min(400px, 92vw);
  max-height: 88vh;
  overflow: auto;
  box-shadow: 0 12px 32px rgba(28, 34, 64, .35);
}
#rank-dialog::backdrop { background: rgba(28, 34, 64, .65); }
#rank-dialog img { width: 100%; }
#rank-dialog .close {
  display: block;
  width: 100%;
  margin-top: 10px;
  font-family: var(--font);
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 125px 10px 115px 10px / 10px 115px 10px 125px;
  padding: .7em 0;
  cursor: pointer;
}
#rank-dialog .close:hover { background: var(--orange-down); }

@media (max-width: 880px) {
  .hero .grid { grid-template-columns: 1fr; }
  .hero .shot-stack { justify-self: start; margin-top: 1rem; }
  .hero .arrow-doodle, .hero .arrow-note { display: none; }
  .hero .lock-doodle { top: -1.5rem; }
}

html:lang(en),
html:lang(es) {
  --font: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html:lang(ja) {
  --font: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", sans-serif;
}
html:lang(ja) .hero h1 {
  font-size: clamp(1.85rem, 4.1vw, 3rem);
  line-height: 1.5;
  max-width: 100%;
  overflow-wrap: anywhere;
}
html:lang(ja) .hero h1 .wavy { white-space: normal; }
html:lang(ja) .hero .grid > * { min-width: 0; }
@media (min-width: 881px) and (max-width: 1100px) {
  html:lang(ja) .hero h1 { font-size: clamp(1.75rem, 3.8vw, 2.65rem); }
}

/* 語言切換 */
.language-nav {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.4;
}
.language-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}
.language-nav a:hover,
.language-nav a[aria-current="page"] {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .25em;
}
@media (max-width: 700px) {
  header .wrap { align-items: flex-start; flex-wrap: wrap; }
  header .name { font-size: 1.08rem; }
  .language-nav { width: 100%; justify-content: flex-end; gap: .35rem .5rem; font-size: .74rem; }
  header .store { font-size: .82rem; }
}
