/* Fonts are self-hosted (site CSP allows only same-origin). Fredoka: SIL OFL (fonts/OFL-Fredoka.txt); Berry Round JP: Ardala Studios. */
@font-face { font-family: "Fredoka"; font-weight: 500; font-display: swap; src: url("fonts/fredoka-500.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("fonts/fredoka-600.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url("fonts/fredoka-700.woff2") format("woff2"); }
@font-face { font-family: "Berry Round JP"; font-weight: 400; font-display: swap; src: url("fonts/berry-round-jp-400.woff2") format("woff2"); }
@font-face { font-family: "Berry Round JP"; font-weight: 500; font-display: swap; src: url("fonts/berry-round-jp-500.woff2") format("woff2"); }
@font-face { font-family: "Berry Round JP"; font-weight: 700; font-display: swap; src: url("fonts/berry-round-jp-700.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Manrope"; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F; }

:root{color-scheme:light}html,body{margin:0}img{max-width:100%}

/* Layout: a market stall. Hero banner of the square, then a fact board of wooden price tags, then crates of assets (screens, clips, art) and a pack counter. */
:root {
  --ground: #F2F6EC;
  --surface: #FFFFFF;
  --surface-2: #E7EEDD;
  --ink: #2C1B12;
  --ink-soft: #66513F;
  --berry: #C22D57;
  --berry-ink: #FFFFFF;
  --leaf: #3A8534;
  --crate: #B07139;
  --tag: #FFF6E6;
  --line: #D6DFCB;
  --shadow: 0 1px 0 rgba(60, 40, 20, .06), 0 6px 18px -10px rgba(60, 40, 20, .25);
  --f-display: "Fredoka", "Berry Round JP", ui-rounded, system-ui, sans-serif;
  --f-body: "Manrope", "Berry Round JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-ja: "Berry Round JP", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #16110D; --surface: #211913; --surface-2: #2B211A; --ink: #F5ECE1; --ink-soft: #C2B09F;
    --berry: #F0688B; --berry-ink: #2A0E17; --leaf: #7CC76A; --crate: #D99A5F; --tag: #2E241C; --line: #3B2F26;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 22px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #16110D; --surface: #211913; --surface-2: #2B211A; --ink: #F5ECE1; --ink-soft: #C2B09F;
  --berry: #F0688B; --berry-ink: #2A0E17; --leaf: #7CC76A; --crate: #D99A5F; --tag: #2E241C; --line: #3B2F26;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 22px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* language switch: English shows by default */
:root:not([data-lang="ja"]) .ja { display: none !important; }
:root[data-lang="ja"] .en { display: none !important; }
[hidden], .lightbox[hidden], .status[hidden] { display: none !important; }
:root[data-lang="ja"] body { font-family: var(--f-ja); }
:root[data-lang="ja"] h1, :root[data-lang="ja"] h2, :root[data-lang="ja"] h3 { font-family: var(--f-ja); font-weight: 700; letter-spacing: .02em; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--ground); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.6;
}
a { color: var(--berry); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0; }

.wrap {
  max-width: 1160px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* top bar */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.bar .brand { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.bar .brand b { color: var(--berry); font-weight: 600; }
.bar nav { display: flex; gap: 4px 16px; flex-wrap: wrap; margin-left: auto; font-size: .9rem; font-weight: 700; }
.bar nav a { color: var(--ink-soft); text-decoration: none; }
.bar nav a:hover { color: var(--berry); }
.lang { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; flex: none; }
.lang button { font: 700 .82rem/1 var(--f-body); padding: 7px 11px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
@media (max-width: 860px) { .bar nav { display: none; } .lang { margin-left: auto; } }
.zh-links { display: inline-flex; gap: 10px; flex: none; font: 700 .8rem/1 "PingFang SC", "Microsoft YaHei", sans-serif; }
.zh-links a { color: var(--ink-soft); text-decoration: none; }
.zh-links a[lang="zh-Hant"] { font-family: "PingFang TC", "Microsoft JhengHei", sans-serif; }
.zh-links a:hover { color: var(--berry); }
@media (max-width: 480px) { .bar .brand { font-size: .95rem; } .zh-links { gap: 8px; } }
/* Narrow phones: the Chinese links move to their own row instead of overflowing the bar. */
@media (max-width: 420px) { .bar .wrap { flex-wrap: wrap; row-gap: 6px; } .zh-links { width: 100%; justify-content: flex-end; } }

/* hero */
.hero { position: relative; overflow: hidden; background: #6c9a4a; }
.hero img.bg { display: block; width: 100%; height: clamp(260px, 38vw, 470px); object-fit: cover; object-position: 50% 60%; }
.hero .over { position: absolute; inset: 0; display: grid; align-content: center; justify-items: start; }
.hero .over .wrap { width: 100%; }
.hero .logo { width: min(560px, 78%); filter: drop-shadow(0 6px 14px rgba(40, 20, 10, .35)); }
.hero .logo.ja-logo { width: min(520px, 74%); }

.intro { padding-block: 28px 8px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.intro .tagline { font-family: var(--f-display); font-size: clamp(1.35rem, 1.05rem + 1.2vw, 1.85rem); line-height: 1.3; font-weight: 500; text-wrap: balance; }
:root[data-lang="ja"] .intro .tagline { font-family: var(--f-ja); font-weight: 700; }
.intro .sub { color: var(--ink-soft); margin-top: 10px; max-width: 60ch; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 800 .95rem/1 var(--f-body); padding: 12px 18px; border-radius: 999px; text-decoration: none; border: 2px solid var(--ink); color: var(--ink); background: var(--surface); cursor: pointer; }
:root[data-lang="ja"] .btn { font-family: var(--f-ja); font-weight: 700; }
.btn.primary { background: var(--berry); border-color: var(--berry); color: var(--berry-ink); }
.btn:hover { transform: translateY(-1px); }
.btn.small { font-size: .78rem; padding: 6px 11px; border-width: 1.5px; }
.btn[aria-busy="true"] { opacity: .6; }

/* price tag */
.pricetag { justify-self: end; position: relative; background: var(--tag); border: 2px solid var(--crate); border-radius: 10px 22px 22px 10px; padding: 18px 22px 18px 34px; box-shadow: var(--shadow); min-width: 0; max-width: 100%; }
.pricetag::before { content: ""; position: absolute; left: 12px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--ground); border: 2px solid var(--crate); }
.pricetag .k { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--crate); }
.pricetag .date { font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; margin-top: 2px; }
:root[data-lang="ja"] .pricetag .date { font-family: var(--f-ja); font-weight: 700; font-size: 1.35rem; }
.pricetag .times { font-size: .85rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.pricetag .price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-variant-numeric: tabular-nums; }
.pricetag .was { text-decoration: line-through; color: var(--ink-soft); font-weight: 700; }
.pricetag .now { font-family: var(--f-display); font-size: 1.9rem; font-weight: 700; color: var(--berry); }
.pricetag .off { font-size: .78rem; font-weight: 800; background: var(--leaf); color: var(--surface); padding: 3px 8px; border-radius: 999px; }
@media (max-width: 760px) { .intro { grid-template-columns: 1fr; } .pricetag { justify-self: start; } }

/* section scaffolding */
section { padding-block: 44px 8px; scroll-margin-top: 70px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.sec-head p { color: var(--ink-soft); max-width: 60ch; }
.kicker { display: block; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--leaf); margin-bottom: 6px; }
:root[data-lang="ja"] .kicker { letter-spacing: .06em; }

/* counts strip: crate labels */
.counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.count { background: var(--surface); border: 1.5px solid var(--line); border-top: 6px solid var(--crate); border-radius: 6px 6px var(--r) var(--r); padding: 14px 16px; }
.count b { display: block; font-family: var(--f-display); font-size: 2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.count span { color: var(--ink-soft); font-size: .9rem; font-weight: 600; }
@media (max-width: 860px) { .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .counts .count:first-child { grid-column: 1 / -1; } }

/* fact sheet */
.facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; align-items: start; }
.sheet { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 6px 20px; box-shadow: var(--shadow); }
.sheet dl { margin: 0; }
.sheet .row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.sheet .row:last-child { border-bottom: 0; }
.sheet dt { font-weight: 800; font-size: .82rem; color: var(--ink-soft); padding-top: 2px; }
.sheet dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.about h3 { margin-top: 22px; }
.about h3:first-child { margin-top: 0; }
.about p { margin-top: 8px; max-width: 64ch; }
.about ul { margin: 10px 0 0; padding-left: 1.1em; display: grid; gap: 8px; max-width: 64ch; }
.about li::marker { color: var(--berry); }
.copyblock { position: relative; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin-top: 8px; }
.copyblock p { margin: 0; padding-right: 64px; }
.copy { position: absolute; top: 8px; right: 8px; font: 800 .72rem/1 var(--f-body); padding: 6px 9px; border-radius: 999px; border: 1.5px solid var(--ink-soft); background: var(--surface); color: var(--ink); cursor: pointer; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .sheet .row { grid-template-columns: 1fr; gap: 2px; } }

/* trailer */
.trailer { display: block; position: relative; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); max-width: 100%; aspect-ratio: 16 / 9; background: var(--surface-2); }
.trailer img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.trailer:hover img { transform: scale(1.02); }
.trailer .play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: flex; align-items: center; gap: 10px; background: var(--berry); color: var(--berry-ink); font: 800 1rem/1 var(--f-body); padding: 16px 22px 16px 18px; border-radius: 999px; box-shadow: 0 8px 22px -6px rgba(0,0,0,.45); }
.trailer .play svg { width: 22px; height: 22px; fill: currentColor; }
@media (prefers-reduced-motion: reduce) { .trailer img { transition: none; } .btn:hover { transform: none; } }

/* galleries */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.shot, .clip, .art { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.thumb { display: block; padding: 0; border: 0; background: var(--surface-2); border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 16 / 9; max-width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
figcaption { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
figcaption .cap { font-size: .88rem; color: var(--ink-soft); line-height: 1.4; min-width: 0; }
figcaption .links { display: flex; gap: 6px; flex: none; }
.subhead { margin: 30px 0 14px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.subhead small { color: var(--ink-soft); font-size: .88rem; }
.jp-first { display: flex; flex-direction: column; }
:root[data-lang="ja"] .jp-first .block-jp { order: -1; }
:root[data-lang="ja"] .jp-first .block-jp .subhead { margin-top: 0; }
:root:not([data-lang="ja"]) .jp-first .block-en .subhead { margin-top: 0; }

.clips-land { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.clips-port { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 18px; }
.clip video { width: 100%; display: block; border-radius: 10px; background: var(--surface-2); max-width: 100%; }
.clip.land video { aspect-ratio: 16 / 9; object-fit: cover; }
.clip.port video { aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 640px) { .clips-land { grid-template-columns: 1fr; } .clips-port { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.artgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.art-img { border-radius: 10px; overflow: hidden; display: grid; place-items: center; aspect-ratio: 4 / 3; background:
  repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 50% / 22px 22px; padding: 12px; }
.art-img img { max-height: 100%; object-fit: contain; }
.art.key .art-img, .art.wide .art-img, .art.tall .art-img { padding: 0; }
.art.key .art-img img, .art.wide .art-img img { width: 100%; height: 100%; object-fit: contain; }
.art.tall .art-img img { height: 100%; width: auto; }
.art.wide { grid-column: span 2; }
.art.wide .art-img { aspect-ratio: 8 / 3; }
@media (max-width: 900px) { .artgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .artgrid { grid-template-columns: 1fr; } .art.wide { grid-column: auto; } }

/* packs */
.packs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pack { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name btn" "meta btn"; gap: 2px 14px; align-items: center; background: var(--surface); border: 1.5px solid var(--line); border-left: 6px solid var(--crate); border-radius: var(--r); padding: 14px 16px; }
.pack-name { grid-area: name; font-weight: 800; }
.pack-meta { grid-area: meta; color: var(--ink-soft); font-size: .85rem; font-variant-numeric: tabular-nums; }
.pack .btn { grid-area: btn; }
@media (max-width: 700px) { .packs { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .pack { grid-template-columns: 1fr; grid-template-areas: "name" "meta" "btn"; } .pack .btn { justify-self: start; margin-top: 8px; } }

/* studio + contact */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.contact { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.mail { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.mail code { font: 700 1.05rem/1.3 var(--f-body); user-select: all; background: var(--surface-2); padding: 8px 12px; border-radius: 8px; overflow-wrap: anywhere; }
.mail .copy { position: static; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.socials a { font-weight: 700; font-size: .9rem; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink); }
.socials a:hover { color: var(--berry); }
.note { color: var(--ink-soft); font-size: .9rem; margin-top: 12px; }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } }

footer { padding-block: 48px 40px; color: var(--ink-soft); font-size: .85rem; }

.status { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: .9rem; z-index: 30; max-width: calc(100% - 32px); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 40; background: rgba(20, 12, 8, .88); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.lightbox .lb-top { display: flex; justify-content: flex-end; }
.lightbox .lb-close { font: 800 .9rem/1 var(--f-body); padding: 10px 16px; border-radius: 999px; border: 0; background: #fff; color: #2C1B12; cursor: pointer; }
.lightbox img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; border-radius: 8px; min-height: 0; }
.lightbox .lb-cap { color: #F5ECE1; text-align: center; font-weight: 600; }

.studio-blurb { margin-top: 12px; max-width: 60ch; }
