/* Japan FunPop — site style. Colours and letters come from the 3D store itself: the sign's
   Leckerli One script in cherry red, the のぼり flags' Mochiy Pop One, sakura pink and matcha. */
:root {
  --paper: #FFFBF7;
  --paper-2: #FFF1F4;          /* sakura wash */
  --mint: #E7F5EE;             /* matcha wash */
  --surface: #FFFFFF;
  --ink: #2F2A28;
  --muted: #776B69;
  --rule: #F0E2E1;
  --cherry: #D7263D;
  --cherry-deep: #96101F;
  --sakura: #F7C3D3;
  --sakura-deep: #E9819F;
  --matcha: #3E8E6A;
  --matcha-soft: #A9DCC6;
  --gold: #F2A93B;
  --shadow: 0 10px 30px rgba(80, 30, 40, 0.12);
  --radius: 20px;
  --script: "Leckerli One", "Fredoka", cursive;
  --display: "Fredoka", "Mochiy Pop One", "Zen Maru Gothic", system-ui, sans-serif;
  --pop: "Mochiy Pop One", "Fredoka", "Zen Maru Gothic", sans-serif;
  --body: "Zen Maru Gothic", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wide: 1180px;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 16px/1.7 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--cherry); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--sakura-deep); outline-offset: 2px; }
.wrap { max-width: var(--wide); margin: 0 auto; padding-inline: 20px; }
html[lang="ja"] body { line-height: 1.85; }

/* ---------- Header: a shop awning ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(255, 251, 247, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.site-head::after { content: ""; display: block; height: 8px;
  background: repeating-linear-gradient(90deg, var(--sakura) 0 22px, #fff 22px 44px); box-shadow: inset 0 -1px 0 rgba(0,0,0,0.04); }
.head-row { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.wordmark { font: 400 28px/1 var(--script); color: var(--cherry); text-decoration: none; white-space: nowrap;
  -webkit-text-stroke: 1px var(--cherry-deep); letter-spacing: 0.01em; }
.wordmark small { font: 700 10px/1 var(--body); letter-spacing: 0.14em; color: var(--muted); -webkit-text-stroke: 0; display: block; margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-left: 8px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--paper-2); color: var(--cherry); }
.head-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pill { border: 0; background: var(--surface); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; box-shadow: 0 2px 10px rgba(80,30,40,.08);
  display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: var(--ink); white-space: nowrap; }
.pill .star { color: var(--gold); }
.pill .badge { background: var(--sakura-deep); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; }
.lang { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 3px; box-shadow: 0 2px 10px rgba(80,30,40,.08); }
.lang button { border: 0; background: none; border-radius: 999px; padding: 5px 10px; font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; }
.lang button[aria-pressed="true"] { background: var(--cherry); color: #fff; }
.menu-btn { display: none; }
.pill.icon { width: 38px; justify-content: center; padding-inline: 0; font-size: 18px; }
.nav .nav-small { display: none; }
@media (max-width: 560px) {
  .head-row { gap: 10px; min-height: 58px; }
  .wordmark { font-size: 21px !important; }
  .wordmark small { display: none; }
  .head-tools { gap: 6px; }
  .pill { padding: 7px 10px; font-size: 13px; }
  .lang button { padding: 4px 7px; font-size: 12px; }
}
@media (max-width: 440px) {
  #head-credits, #head-account { display: none; }
  .nav .nav-small { display: block; border: 0; background: none; text-align: left; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; }
}
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 72px; left: 12px; right: 12px; flex-direction: column; background: var(--surface); border-radius: 18px; padding: 10px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .menu-btn { display: inline-flex; }
  .head-tools .hide-sm { display: none; }
  .wordmark { font-size: 24px; }
}

/* ---------- Buttons ---------- */
.btn { border: 0; border-radius: 999px; padding: 13px 24px; font: 700 16px/1.2 var(--body); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.btn.primary { background: linear-gradient(135deg, #EF6F92, var(--cherry)); color: #fff; box-shadow: 0 8px 20px rgba(215, 38, 61, 0.3); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--sakura); }
.btn.big { font-size: 18px; padding: 16px 28px; }
.btn:disabled { opacity: .55; box-shadow: none; cursor: default; }

/* ---------- Section headings: a hanging のぼり tag + title ---------- */
section.block { padding-block: 72px; }
section.block.tint { background: var(--paper-2); }
section.block.mint { background: var(--mint); }
.sec-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 28px; }
.nobori { writing-mode: vertical-rl; font: 400 15px/1 var(--pop); letter-spacing: .12em; color: #fff; background: var(--cherry);
  padding: 12px 7px 16px; border-radius: 3px 3px 0 0; flex: none; position: relative; }
.nobori::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 8px;
  background: linear-gradient(135deg, var(--cherry) 50%, transparent 50%) 0 0 / 8px 8px repeat-x; }
.nobori.matcha { background: var(--matcha); }
.nobori.matcha::after { background-image: linear-gradient(135deg, var(--matcha) 50%, transparent 50%); }
.nobori.gold { background: #D98A12; }
.nobori.gold::after { background-image: linear-gradient(135deg, #D98A12 50%, transparent 50%); }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
html[lang="ja"] h1, html[lang="ja"] h2 { font-family: var(--pop); font-weight: 400; letter-spacing: .02em; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.2; font-weight: 700; }
.sec-head p { margin: 8px 0 0; color: var(--muted); max-width: 60ch; }

/* ---------- Hero with the store window ---------- */
.hero { padding-block: 44px 64px; background:
  radial-gradient(1200px 400px at 80% -10%, #FDE3EB 0, transparent 60%),
  radial-gradient(900px 380px at 0% 10%, var(--mint) 0, transparent 60%); }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 28px; align-items: end; margin-bottom: 26px; }
@media (max-width: 860px) { .hero-top { grid-template-columns: 1fr; } }
.kicker { font: 700 13px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--matcha); }
html[lang="ja"] .kicker { letter-spacing: .08em; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.08; margin: 12px 0 0; font-weight: 700; }
html[lang="ja"] .hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.3; }
.hero h1 em { font-style: normal; color: var(--cherry); }
.hero-side p { margin: 0 0 18px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.store-window { position: relative; border-radius: 26px; overflow: hidden; background: #DCE8F4; aspect-ratio: 16 / 9; max-height: 78vh; width: 100%;
  box-shadow: 0 30px 60px rgba(60, 30, 40, 0.22), 0 0 0 6px #fff, 0 0 0 9px var(--sakura); }
@media (max-width: 640px) { .store-window { aspect-ratio: 4 / 5; border-radius: 20px; } }
.store-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .8s ease; }
.store-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .8s ease; background: transparent; }
.store-window.live .store-frame { opacity: 1; }
.store-window.live .store-still { opacity: 0; }
.store-status { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.92); border-radius: 999px;
  padding: 8px 14px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); }
.store-status i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--sakura); border-top-color: var(--cherry); animation: spin 0.9s linear infinite; }
.store-window.live .store-status { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.store-cta { position: absolute; right: 16px; bottom: 16px; }
.store-window.live .store-cta { display: none; }
/* entered: the same window fills the screen (the store keeps everything it loaded) */
.store-window.full { position: fixed; inset: 0; z-index: 100; border-radius: 0; max-height: none; aspect-ratio: auto; box-shadow: none; }
body.store-open { overflow: hidden; }
.store-note { margin-top: 12px; font-size: 14px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.store-note a { font-weight: 700; }

/* ---------- Now in the shop (live) ---------- */
.shelf-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
@media (max-width: 520px) { .shelf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .card-body { padding: 10px 12px 12px; } .card-body b { font-size: 14px; } }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 14px rgba(80,30,40,.07); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 1; background: #F6EFEC; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
/* a capsule behind every picture: shows when there is no picture (or it fails to load) */
.card-img::before { content: ""; position: absolute; width: 38%; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(to bottom, var(--sakura) 50%, #fff 50%); box-shadow: inset 0 0 0 4px rgba(0,0,0,.05), 0 8px 18px rgba(80,30,40,.08); }
.card-img img { width: 100%; height: 100%; object-fit: contain; position: relative; background: #F6EFEC; }
.card-img.cover img { object-fit: cover; }
.card-tag { position: absolute; left: 10px; top: 10px; background: var(--cherry); color: #fff; font: 700 12px/1 var(--body); padding: 6px 9px; border-radius: 999px; }
.card-tag.matcha { background: var(--matcha); }
.card-tag.gold { background: #D98A12; }
.card-tag.grey { background: #8E8584; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body b { font-size: 16px; line-height: 1.35; }
.card-meta { color: var(--muted); font-size: 14px; }
.price { color: var(--cherry); font-weight: 800; font-family: var(--display); font-size: 18px; margin-top: auto; }
.price small { color: var(--muted); font: 600 13px var(--body); }
.empty-note { color: var(--muted); padding: 20px; border: 2px dashed var(--rule); border-radius: var(--radius); text-align: center; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border-radius: var(--radius); padding: 22px 20px; position: relative; }
.step .capsule { width: 54px; height: 54px; border-radius: 50%; margin-bottom: 14px; position: relative; overflow: hidden;
  background: linear-gradient(to bottom, var(--c, var(--sakura-deep)) 50%, #fff 50%); box-shadow: inset 0 0 0 3px rgba(0,0,0,.06); }
.step .capsule::after { content: counter(step); counter-increment: step; position: absolute; inset: 0; display: grid; place-items: center; font: 700 22px var(--display); color: var(--ink); }
.step h3 { font-size: 19px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.fair { margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .fair { grid-template-columns: 1fr; } }
.fair div { background: rgba(255,255,255,.7); border-radius: 16px; padding: 14px 16px; font-size: 15px; }
.fair b { display: block; color: var(--matcha); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: center; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
.about-text p { font-size: 17px; max-width: 58ch; white-space: pre-line; }
.about-facts { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.about-facts li { display: flex; gap: 10px; align-items: baseline; }
.about-facts li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(to bottom, var(--cherry) 50%, #fff 50%); box-shadow: 0 0 0 1.5px var(--cherry); flex: none; transform: translateY(-1px); }
.about-pic { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: #DCE8F4; }
.about-pic img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border-radius: 16px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 22px/1 var(--display); color: var(--cherry); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }
.social { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Footer ---------- */
.site-foot { background: #2F2A28; color: #EFE6E4; padding-block: 48px 28px; margin-top: 0; }
.site-foot a { color: #FFD5E0; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.site-foot .wordmark { color: #FF8FAE; -webkit-text-stroke: 0; }
.site-foot h4 { font: 700 13px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: #B9ABA8; margin: 0 0 12px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 15px; }
.foot-small { margin-top: 30px; font-size: 13px; color: #B9ABA8; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 999px; font-weight: 700; z-index: 200; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
