/* Sakugra flagship — Sunshine Genga Zine x Kitsune-Fude Brush-Spirit. No webfonts, no remote assets. */
:root {
  --yellow: #ffe845;
  --paper: #fff9ed;
  --card: #fffdf9;
  --ink: #26170a;
  --red: #f14e38;
  --blue: #2558ff;
  --pink: #ff7ab8;
  --mint: #2cba66;
  --line: 3px solid var(--ink);
  --shadow: 6px 8px 0 var(--ink);
  --shadow-sm: 3px 4px 0 var(--ink);
  --radius: 14px;
  --nav-h: 60px;
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); -webkit-text-size-adjust: 100%; }
section[id], article[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font: 17px/1.55 var(--font-body);
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(38, 23, 10, 0.045) 1px, transparent 1.4px),
    radial-gradient(rgba(37, 88, 255, 0.035) 1px, transparent 1.4px);
  background-size: 23px 23px, 37px 37px;
  background-position: 0 0, 11px 17px;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 900; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.45rem, 4.6vw, 2.15rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }
mark { background: var(--yellow); color: var(--ink); padding: 0.01em 0.16em; border-radius: 6px; box-shadow: 0 2px 0 var(--ink); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sk-ico { width: 20px; height: 20px; flex: 0 0 auto; display: inline-block; vertical-align: -0.18em; }
.sk-inline { width: 0.95em; height: 0.95em; display: inline-block; }
.nav-links .sk-ico { width: 18px; height: 18px; margin-right: 5px; }
.sticker .sk-ico { width: 16px; height: 16px; margin-right: 4px; }
.mcp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- peg bar + nav ---------- */
.pegbar-strip {
  height: 26px; display: flex; align-items: center; justify-content: center;
  background: var(--paper); border-bottom: 2px dashed rgba(38, 23, 10, 0.25);
}
.pegbar {
  display: flex; align-items: center; gap: 14px; pointer-events: none;
}
.pegbar .slot { width: 22px; height: 9px; border-radius: 5px; background: var(--paper); border: 2px solid var(--ink); box-shadow: inset 1px 2px 0 rgba(38, 23, 10, 0.35); }
.pegbar .hole { width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); box-shadow: inset 1px 2px 0 rgba(38, 23, 10, 0.35); }

.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  background: var(--yellow);
  border-bottom: var(--line);
}
.brand { display: flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; }
.brand-word { width: 104px; height: 35px; }
.nav-links { display: none; gap: 4px; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font: 800 15px var(--font-display); text-decoration: none; border-radius: 10px;
}
.nav-links a:hover { background: var(--card); box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- buttons, stickers, cards ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px;
  font: 800 16px/1.2 var(--font-display); color: var(--ink); text-decoration: none; text-align: center;
  border: var(--line); border-radius: 12px; box-shadow: var(--shadow-sm);
  cursor: pointer; transition: transform 0.08s, box-shadow 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-yellow { background: var(--yellow); }
.btn-paper { background: var(--card); }
.btn-ink { background: var(--ink); color: var(--card); }
.btn-ink .sk-ico { background: var(--card); border-radius: 6px; padding: 2px; box-sizing: content-box; }
.nav-cta { min-height: 44px; padding: 8px 14px; font-size: 15px; }

.sticker {
  display: inline-block; margin: 0 0 12px; padding: 4px 12px;
  font: 800 14px var(--font-display);
  border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.sticker-pink { background: var(--pink); }
.sticker-mint { background: var(--mint); color: var(--card); }
.tilt-l { transform: rotate(-2deg); }
.tilt-r { transform: rotate(1.6deg); }
.card { background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- hero ---------- */
main { display: block; }
.hero {
  display: grid; gap: 28px;
  padding: 40px 16px 48px; max-width: 1180px; margin: 0 auto;
}
.hero h1 { margin-bottom: 18px; }
.hero-word { width: min(100%, 440px); aspect-ratio: 498 / 168; margin: 0 0 14px -6px; }
.hero-q { display: block; font-size: clamp(1.65rem, 6.2vw, 3.05rem); line-height: 1.28; }
.lede { font-size: 1.08rem; max-width: 60ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { position: relative; padding: 18px; max-width: 420px; justify-self: center; width: 100%; }
.hero-fox { width: 100%; aspect-ratio: 1; }
.card-tag { position: absolute; left: 14px; bottom: -6px; margin: 0; }

/* ---------- story: stage + chapters (non-overlapping on mobile, sticky 2-col on desktop) ---------- */
.story { position: relative; max-width: 1280px; margin: 0 auto 48px; padding: 0 12px; }
.stage-col { position: relative; z-index: 1; padding-bottom: 12px; }
.stage { padding: 8px 10px 6px; }
.mobile-stage { padding: 8px 10px 10px; margin: 0 0 14px; }
#atelier-mobile {
  width: 100%; height: 210px;
  border: 2.5px solid var(--ink); border-radius: 10px; background: var(--paper);
  touch-action: pan-y; cursor: crosshair;
}
.stage-head { display: flex; align-items: center; gap: 8px; min-height: 30px; margin-bottom: 6px; }
.act-chip {
  padding: 2px 10px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--yellow);
  font: 900 14px var(--font-display); white-space: nowrap;
}
.act-title { flex: 1; min-width: 0; font: 800 14px var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fps { font: 700 12px var(--font-mono); padding: 2px 8px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); }
#atelier {
  width: 100%; height: clamp(220px, 36svh, 360px);
  border: 2.5px solid var(--ink); border-radius: 10px; background: var(--paper);
  touch-action: pan-y; cursor: ew-resize;
}
.scrub { display: flex; align-items: center; gap: 10px; }
.scrub input { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--red); cursor: pointer; }
.scrub-pct { font: 800 14px var(--font-mono); min-width: 4ch; text-align: right; }
.stage-hint { display: none; margin: 0; font-size: 13px; opacity: 0.75; }

.chapters { position: relative; z-index: 1; }
.chapter {
  padding: 28px 6px 36px;
  border-top: 2px dashed rgba(38, 23, 10, 0.25);
}
.chapter:first-child { border-top: 0; }
.act-num { display: inline-block; margin-bottom: 10px; padding: 2px 10px; font: 900 14px var(--font-display); color: var(--card); background: var(--red); border-radius: 8px; transform: rotate(-2deg); }
.note { font-size: 0.95rem; padding-left: 12px; border-left: 4px solid var(--pink); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0 0 18px; }
.chip { padding: 4px 12px; font: 800 14px var(--font-display); border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: 2px 3px 0 var(--ink); background: var(--card); }
.chip-red { background: var(--red); color: var(--card); }
.chip-blue { background: var(--blue); color: var(--card); }
.chip-ink { background: var(--ink); color: var(--card); }
.chip-yellow { background: var(--yellow); }
.chip-pink { background: var(--pink); }
.chip-mint { background: var(--mint); color: var(--card); }
.passes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; padding: 0; margin: 0; counter-reset: pass; }
.passes li { counter-increment: pass; padding: 10px 12px; background: var(--card); border: 2.5px solid var(--ink); border-radius: 10px; box-shadow: var(--shadow-sm); font-size: 15px; }
.passes li::before { content: counter(pass) " · "; font-weight: 900; color: var(--red); }
.passes b { display: block; font-family: var(--font-display); }

/* ---------- Act IV deck + receipt ---------- */
.deck { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 22px; }
.cart {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  min-height: 56px; padding: 7px 9px; text-align: left;
  font: 700 13px/1.2 var(--font-body); color: var(--ink);
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 10px; box-shadow: 2px 3px 0 var(--ink);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.cart:active { transform: translate(2px, 3px); box-shadow: none; }
.cart[aria-pressed="true"] { background: var(--yellow); box-shadow: 0 0 0 2px var(--ink), 3px 4px 0 2px var(--ink); }
.cart-code { font: 900 12px var(--font-mono); }
.cart-free { margin-left: 4px; padding: 0 6px; border-radius: 6px; background: var(--mint); color: var(--card); font: 800 10px var(--font-display); }
.cart-swatch { display: block; width: 100%; height: 6px; border: 1.5px solid var(--ink); border-radius: 4px; }
.receipt { padding: 14px; }
.receipt-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; }
.receipt-head .sticker { margin: 0; font-size: 13px; }
.receipt dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 14px; font-size: 14px; }
.receipt dt { font-weight: 800; }
.receipt dd { margin: 0; min-width: 0; }
.receipt .hash { font: 12px/1.35 var(--font-mono); word-break: break-all; }

/* ---------- Act V pitch + MCP ---------- */
.pitch, .mcp { padding: 14px; margin-bottom: 22px; }
.pitch label { display: block; margin-bottom: 6px; }
.pitch textarea {
  display: block; width: 100%; margin-bottom: 12px; padding: 10px 12px;
  font: 16px/1.4 var(--font-body); color: var(--ink); background: var(--paper);
  border: 2.5px solid var(--ink); border-radius: 10px; resize: vertical;
}
.plan:empty { display: none; }
.plan { margin-top: 14px; font-size: 15px; }
.plan h4 { margin: 12px 0 6px; font: 900 16px var(--font-display); }
.plan ol, .plan ul { margin: 0; padding-left: 1.3em; }
.plan li { margin-bottom: 4px; }
.plan .tip { margin: 12px 0 0; padding: 8px 10px; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 10px; box-shadow: 2px 3px 0 var(--ink); }
.plan .pill { display: inline-block; padding: 0 8px; border-radius: 999px; border: 2px solid var(--ink); background: var(--yellow); font: 800 13px var(--font-display); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.tabs [role="tab"] {
  min-height: 44px; padding: 6px 8px;
  font: 800 14px var(--font-display); color: var(--ink);
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 10px; cursor: pointer;
}
.tabs [aria-selected="true"] { background: var(--blue); color: var(--card); box-shadow: 2px 3px 0 var(--ink); }
.tabpanel pre {
  margin: 0 0 10px; padding: 12px; overflow-x: auto;
  white-space: pre-wrap; word-break: break-all;
  font: 13px/1.45 var(--font-mono); background: var(--paper); border: 2px dashed var(--ink); border-radius: 10px;
}

/* ---------- pricing ---------- */
.pricing { max-width: 1080px; margin: 0 auto; padding: 56px 16px 40px; }
.plans { display: grid; gap: 26px; margin: 22px 0 30px; }
.plan-card { display: flex; flex-direction: column; padding: 20px; }
.plan-card .sticker { align-self: flex-start; }
.plan-card .btn { margin-top: auto; overflow-wrap: anywhere; }
.plan-pro { background: var(--yellow); }
.price { margin: 0; font: 900 3rem/1 var(--font-display); }
.price small { font-size: 1rem; font-weight: 800; }
.price-alt { margin: 8px 0 0; }
.ticks { list-style: none; padding: 0; margin: 16px 0 20px; }
.ticks li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.ticks li .sk-ico { width: 22px; height: 22px; margin-top: 2px; }
.cta-col { display: grid; gap: 12px; margin-top: auto; }
.compare { padding: 6px 12px; overflow-x: auto; }
.compare table { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 10px 8px; text-align: left; border-bottom: 2px dashed rgba(38, 23, 10, 0.25); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-family: var(--font-display); font-weight: 900; }

/* ---------- footer ---------- */
.foot { padding: 34px 16px 48px; text-align: center; border-top: var(--line); background: var(--yellow); }
.foot-fox { width: 72px; height: 72px; margin: 0 auto 10px; }
.foot .small { font-size: 14px; }
.foot a { display: inline-block; padding: 12px 4px; }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  :root { --nav-h: 68px; }
  .nav { padding: 0 28px; }
  .nav-links { display: flex; }
  .brand-word { width: 124px; height: 42px; }
  .hero { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 60px 28px 72px; }
  .story {
    display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr); gap: 40px;
    padding: 0 28px;
  }
  .stage-col { position: sticky; grid-column: 2; grid-row: 1; align-self: start; top: calc(var(--nav-h) + 18px); z-index: 10; }
  .mobile-stage { display: none; }
  .chapters { grid-column: 1; grid-row: 1; }
  .stage { padding: 12px 14px 10px; }
  #atelier { height: calc(100vh - var(--nav-h) - 150px); min-height: 360px; max-height: 760px; }
  .stage-hint { display: block; }
  .chapter { min-height: 120vh; padding: 64px 4px 80px; }
  .deck { grid-template-columns: 1fr 1fr; }
  .tabs { grid-template-columns: repeat(4, 1fr); }
  .plans { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .cart { transition: none; }
}
