/* =========================================================
   Shonen Step Studios: manga / ink-brush theme
   Palette: ink black, paper white, hanko red
   ========================================================= */

:root {
  --ink: #0b0b0b;
  --paper: #faf7f2;
  --white: #ffffff;
  --red: #d9251c;
  --red-deep: #a6150f;
  --muted: #5a554e;

  --font-display: "Dela Gothic One", "Arial Black", Impact, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", ui-monospace, "Courier New", monospace;
  --font-brush: "Yuji Boku", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-sign: "Mrs Saint Delafield", "Segoe Script", cursive;

  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --line: 3px solid var(--ink);
  --pop: 8px 8px 0 var(--red);
  --dots: radial-gradient(rgba(11, 11, 11, 0.09) 1.1px, transparent 1.6px);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--dots);
  background-size: 9px 9px;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; font-weight: 700;
  transition: top 0.15s;
}
.skip-link:focus { top: 12px; }

/* ---------- Type ---------- */
.display, h1, h2, h3.display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.01em;
}
.mono { font-family: var(--font-mono); }
.kanji { font-family: var(--font-brush); }
.red { color: var(--red); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.85em 1.5em;
  font-family: var(--font-display); font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; line-height: 1.1;
  color: var(--ink); background: var(--paper);
  border: var(--line); box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--red { background: var(--red); color: var(--white); }
.btn--ink { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--red); }
.btn--ink:hover { box-shadow: 7px 7px 0 var(--red); }
.btn--sm { padding: 0.6em 1.05em; font-size: 0.8rem; box-shadow: 3px 3px 0 var(--ink); }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 44px; height: 44px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--font-display); text-transform: uppercase; font-size: 1.15rem; }
.brand__sub {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--red); margin-top: 4px; font-weight: 700;
}
.nav__menu { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.nav__menu a:not(.btn) {
  font-weight: 700; text-decoration: none; font-size: 0.95rem;
  padding: 6px 0; border-bottom: 3px solid transparent;
}
.nav__menu a:not(.btn):hover { border-bottom-color: var(--red); }
.nav__menu a[aria-current="page"] { border-bottom-color: var(--ink); }
.nav__toggle {
  display: none; width: 46px; height: 46px; padding: 0;
  background: var(--paper); border: var(--line); cursor: pointer; position: relative;
}
.nav__bars, .nav__bars::before, .nav__bars::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 3px; background: var(--ink);
}
.nav__bars { top: 21px; }
.nav__bars::before { left: 0; right: 0; top: -8px; }
.nav__bars::after { left: 0; right: 0; top: 8px; }

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: var(--line); padding: 8px var(--gutter) 20px;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid rgba(11, 11, 11, 0.15); }
  .nav__menu .btn { margin-top: 14px; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 9vw, 112px); position: relative; }
.section--ink {
  background-color: var(--ink); color: var(--paper);
  background-image: radial-gradient(rgba(217, 37, 28, 0.35) 1.2px, transparent 1.8px);
  background-size: 10px 10px;
  border-block: var(--line);
}
.chapter {
  display: inline-block; margin-bottom: 18px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 6px 14px; transform: skewX(-8deg);
}
.chapter > span { display: inline-block; transform: skewX(8deg); }
.section--ink .chapter { background: var(--red); color: var(--white); }
.section__title { font-size: clamp(2rem, 5.2vw, 3.6rem); margin-bottom: 14px; }
.section__lead { max-width: 56ch; color: var(--muted); font-size: 1.1rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section--ink .section__lead { color: rgba(250, 247, 242, 0.78); }

/* scroll reveal (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: var(--line); }
.hero::before { /* manga focus lines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 74% 50%, rgba(11, 11, 11, 0.1) 0deg 0.5deg, transparent 0.5deg 4.5deg);
  -webkit-mask-image: radial-gradient(circle at 74% 50%, transparent 14%, #000 70%);
  mask-image: radial-gradient(circle at 74% 50%, transparent 14%, #000 70%);
}
.hero__kanji {
  position: absolute; right: -2vw; bottom: -8vw;
  font-family: var(--font-brush); font-size: clamp(260px, 42vw, 640px); line-height: 1;
  color: var(--ink); opacity: 0.045; user-select: none; pointer-events: none;
}
.hero__grid {
  position: relative; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center;
  gap: clamp(32px, 6vw, 80px); padding-block: clamp(44px, 8vw, 104px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 34px; height: 4px; background: var(--red); }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 5rem); line-height: 0.96; margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--red); display: block; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 46ch; margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px 20px; }
.hero__art {
  position: relative; background: var(--ink); border: var(--line);
  box-shadow: 12px 12px 0 var(--red); transform: rotate(1.6deg);
}
.hero__art img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.hero__badge {
  position: absolute; left: -18px; bottom: -22px; transform: rotate(-7deg);
  background: var(--red); color: var(--white); border: var(--line);
  padding: 10px 16px; font-family: var(--font-display); text-transform: uppercase; font-size: 0.9rem; line-height: 1.1;
  box-shadow: 4px 4px 0 var(--ink);
}
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { margin: 8px 14px 24px 6px; }
}

/* ---------- Ticker ---------- */
.ticker { background: var(--ink); color: var(--paper); border-bottom: var(--line); overflow: hidden; white-space: nowrap; }
.ticker__track { display: inline-flex; animation: ticker 32s linear infinite; }
.ticker__group { display: inline-flex; }
.ticker__item {
  display: inline-flex; align-items: center; gap: 28px; padding: 14px 14px 14px 0;
  font-family: var(--font-display); text-transform: uppercase; font-size: 1.02rem; letter-spacing: 0.06em;
}
.ticker__item::after { content: "✦"; color: var(--red); font-size: 0.9rem; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Tier filter ---------- */
.filters { display: none; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.js .filters { display: flex; }
.chip {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 9px 14px; background: var(--paper); color: var(--ink); border: var(--line); cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.chip:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.chip.is-active { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--red); }
.chip__count { opacity: 0.7; }
.gallery__status { min-height: 1.7em; margin: 0 0 16px; font-size: 0.95rem; color: var(--muted); }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--red-deep); font-weight: 700; text-decoration: underline; cursor: pointer; }
.gallery__empty {
  max-width: 640px; margin-inline: auto; padding: clamp(24px, 4vw, 44px); text-align: center;
  border: 3px dashed var(--ink); background: rgba(255, 255, 255, 0.6);
}
.gallery__empty h3 { font-size: 1.5rem; margin-bottom: 10px; }
.gallery__empty p { color: var(--muted); margin: 0 auto 22px; max-width: 44ch; }
.gallery__empty-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Gallery (justified rows; js/main.js sizes each panel exactly, CSS is the no-JS fallback) ---------- */
.gallery { --h: clamp(150px, 23vw, 280px); display: flex; flex-wrap: wrap; gap: 14px; }
.panel {
  height: var(--h); flex: var(--ar) 1 calc(var(--h) * var(--ar)); min-width: 0; margin: 0; position: relative;
  background: var(--white); border: var(--line); overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.panel:hover, .panel:focus-within { transform: translate(-3px, -3px) rotate(-0.4deg); box-shadow: 7px 7px 0 var(--red); z-index: 2; }
.panel__btn {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; position: relative;
}
.panel__btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panel__cap {
  position: absolute; left: 0; bottom: 0; max-width: 92%;
  background: var(--ink); color: var(--paper); text-align: left;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 12px 6px 10px; border-top: 3px solid var(--red); border-right: 3px solid var(--ink);
}
/* CONCEPT tag: remove data-status="concept" from a panel once it's a photo of a finished pair */
.panel[data-status="concept"] .panel__btn::after {
  content: "Concept"; position: absolute; top: 0; right: 0; z-index: 1;
  background: var(--red); color: var(--white);
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 4px 9px; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
}
@media (max-width: 700px) {
  .panel__cap { font-size: 0.6rem; padding: 5px 8px; }
}

/* lightbox */
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(94vw, 1200px); max-height: 94vh; overflow: visible; color: var(--paper); }
.lightbox::backdrop { background: rgba(11, 11, 11, 0.9); }
.lightbox__figure { margin: 0; text-align: center; }
.lightbox__img { max-width: 100%; max-height: 78vh; margin-inline: auto; border: var(--line); background: var(--white); box-shadow: 10px 10px 0 var(--red); }
.lightbox__cap { margin-top: 22px; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
.lightbox__btn {
  position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px;
  background: var(--paper); color: var(--ink); border: var(--line); font-size: 1.4rem; font-weight: 700; cursor: pointer; line-height: 1;
}
.lightbox__btn--prev { left: -10px; }
.lightbox__btn--next { right: -10px; }
.lightbox__close {
  position: absolute; top: -18px; right: -10px; width: 44px; height: 44px;
  background: var(--red); color: var(--white); border: var(--line); font-size: 1.3rem; font-weight: 700; cursor: pointer; line-height: 1;
}

/* ---------- Pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tier {
  display: flex; flex-direction: column; background: var(--white);
  border: var(--line); padding: 26px 22px 24px; position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tier:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--ink); }
.tier__name { font-family: var(--font-display); text-transform: uppercase; font-size: 1.15rem; line-height: 1.1; margin-bottom: 18px; min-height: 2.2em; }
.tier__from { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tier__price { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--red); margin: 4px 0 4px; }
.tier__range { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); margin-bottom: 18px; }
.tier__desc { margin: 0; font-size: 0.98rem; }
.tier__link { color: inherit; text-decoration: none; }
.tier__link::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.tier__link:focus-visible { outline: none; }
.tier__link:focus-visible::after { outline: 3px solid var(--red); outline-offset: 4px; }
.tier { cursor: pointer; }
.tier__cta {
  margin-top: auto; padding-top: 20px;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red-deep);
}
.tier--hot .tier__cta { color: var(--paper); }
.tier__arrow { font-family: system-ui, "Segoe UI Symbol", sans-serif; font-size: 1.15em; letter-spacing: 0; vertical-align: -0.05em; }
.tier:hover .tier__cta { text-decoration: underline; text-underline-offset: 4px; }
.tier--hot { background: var(--ink); color: var(--paper); box-shadow: var(--pop); }
.tier--hot:hover { box-shadow: 11px 11px 0 var(--red); }
.tier--hot .tier__from, .tier--hot .tier__range { color: rgba(250, 247, 242, 0.72); }
.tier__flag {
  position: absolute; top: -14px; right: 14px; transform: rotate(3deg);
  background: var(--red); color: var(--white); border: var(--line);
  font-family: var(--font-display); font-size: 0.7rem; text-transform: uppercase; padding: 5px 10px; letter-spacing: 0.05em;
}
.fineprint { margin-top: 26px; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 1020px) { .tiers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiers { grid-template-columns: 1fr; } .tier__name { min-height: 0; } }

/* ---------- Commission ---------- */
.commission { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.steps { list-style: none; margin: 28px 0 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative; padding: 0 0 22px 62px; min-height: 52px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--red); color: var(--white); border: 3px solid var(--paper);
  font-family: var(--font-display); font-size: 1.1rem; transform: rotate(-4deg);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 21px; top: 46px; bottom: 2px; width: 2px; background: rgba(250, 247, 242, 0.3);
}
.steps strong { display: block; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1rem; letter-spacing: 0.02em; }
.steps span { color: rgba(250, 247, 242, 0.78); font-size: 0.97rem; }
.commission .section__title { font-size: clamp(2rem, 3.8vw, 3rem); overflow-wrap: anywhere; }
.formframe { background: var(--white); color: var(--ink); border: 3px solid var(--paper); box-shadow: 10px 10px 0 var(--red); }
.formframe__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--paper); border-bottom: var(--line); padding: 10px 16px;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.formframe__bar a { color: var(--red-deep); }
.formframe iframe { display: block; width: 100%; height: 640px; border: 0; background: var(--white); }
@media (max-width: 900px) { .commission { grid-template-columns: 1fr; } .formframe iframe { height: 720px; } }

/* ---------- About ---------- */
.about p { max-width: 58ch; }
.about__links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }

/* ---------- Verify strip ---------- */
.verify { background: var(--red); color: var(--white); border-block: var(--line); padding-block: 40px; }
.verify__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 40px; }
.verify h2 { font-size: clamp(1.4rem, 3.2vw, 2.1rem); margin: 0 0 6px; }
.verify p { margin: 0; max-width: 44ch; }
.verify__form { display: flex; gap: 10px; flex-wrap: wrap; }
.field {
  font: inherit; font-family: var(--font-mono); font-size: 1rem; padding: 0.8em 1em; min-width: 0; width: 240px;
  background: var(--paper); color: var(--ink); border: var(--line); border-radius: 0;
}
.field::placeholder { color: #8b867d; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding-block: 44px 34px; }
.footer__grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 40px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer__links a { text-decoration: none; font-weight: 700; }
.footer__links a:hover { color: var(--red); }
.footer__small { margin: 30px 0 0; font-size: 0.85rem; color: rgba(250, 247, 242, 0.6); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer__small .kanji { letter-spacing: 0.3em; }
.site-footer .brand__name { color: var(--paper); }
.site-footer .brand__sub { color: var(--red); }

/* =========================================================
   Certificate page
   ========================================================= */
.cert-page { padding-block: clamp(32px, 6vw, 72px) clamp(56px, 8vw, 104px); }
.cert-intro { margin-bottom: 36px; }
.cert-intro h1 { font-size: clamp(1.4rem, 6vw, 4.2rem); margin-bottom: 14px; overflow-wrap: anywhere; }
.cert-intro p { max-width: 58ch; color: var(--muted); font-size: 1.1rem; }
.lookup { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 26px; }
.lookup__label { display: block; width: 100%; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 2px; }
.lookup .field { width: min(100%, 340px); box-shadow: 4px 4px 0 var(--ink); }

.status {
  display: flex; gap: 14px; align-items: flex-start; margin-bottom: 26px; padding: 16px 20px;
  border: var(--line); background: var(--white); max-width: 760px;
}
.status--ok { border-color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.status--ok .status__icon { background: var(--ink); color: var(--paper); }
.status--none { box-shadow: 6px 6px 0 var(--red); }
.status--none .status__icon { background: var(--red); color: var(--white); }
.status__icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font-family: var(--font-display); }
.status h2 { font-size: 1.15rem; margin: 2px 0 6px; }
.status p { margin: 0; font-size: 0.97rem; }
.status code { font-family: var(--font-mono); background: var(--paper); padding: 1px 6px; border: 1px solid var(--ink); word-break: break-all; }

.cert-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }

/* the certificate itself */
.cert {
  position: relative; background: var(--paper); color: var(--ink);
  border: 5px solid var(--ink); padding: 14px; box-shadow: 14px 14px 0 var(--red);
  max-width: 1040px;
}
.cert__inner {
  position: relative; border: 2px solid var(--red); padding: clamp(20px, 4vw, 40px);
  background-image: var(--dots); background-size: 9px 9px; overflow: hidden;
}
.cert__kanji {
  position: absolute; right: 2%; top: 10%; font-family: var(--font-brush);
  font-size: clamp(120px, 24vw, 260px); line-height: 1; color: var(--ink); opacity: 0.05; pointer-events: none; user-select: none;
}
.cert__head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 3px solid var(--ink); }
.cert__brand { display: flex; align-items: center; gap: 12px; }
.cert__brand img { width: 62px; height: 62px; object-fit: contain; }
.cert__brand strong { display: block; font-family: var(--font-display); text-transform: uppercase; font-size: 1.1rem; line-height: 1; }
.cert__brand span { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.32em; color: var(--red); font-weight: 700; text-transform: uppercase; }
.cert__serial { text-align: right; }
.cert__serial small { display: block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.cert__serial b { font-family: var(--font-mono); font-size: 1.5rem; letter-spacing: 0.06em; color: var(--red); }
.cert__title { position: relative; text-align: center; margin: 26px 0 28px; }
.cert__title .kanji { display: block; font-size: 1.05rem; letter-spacing: 0.6em; color: var(--red); margin-bottom: 4px; }
.cert__title h2 { font-size: clamp(1.7rem, 4.6vw, 3.1rem); margin: 0; }
.cert__body { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 3.4vw, 40px); align-items: start; }
.cert__photo { margin: 0; background: var(--white); border: var(--line); box-shadow: 6px 6px 0 var(--ink); }
.cert__photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; }
.cert__photo figcaption { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 10px; border-top: var(--line); background: var(--paper); font-weight: 700; }
.cert__details { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.cert__details > div { min-width: 0; border-bottom: 1px solid rgba(11, 11, 11, 0.25); padding-bottom: 8px; }
.cert__details .wide { grid-column: 1 / -1; }
.cert__details dt { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.cert__details dd { margin: 0; font-weight: 700; font-size: 1.02rem; overflow-wrap: anywhere; }
.cert__details .edition dd { font-family: var(--font-display); font-size: 1.9rem; color: var(--red); line-height: 1.1; font-weight: 400; }
.cert__foot { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; margin-top: 34px; padding-top: 22px; border-top: 3px solid var(--ink); }
.cert__statement { margin: 0 0 40px; font-size: 0.92rem; max-width: 62ch; }
.cert__sig { width: min(100%, 360px); }
.cert__sig-art { height: 76px; display: flex; align-items: flex-end; border-bottom: 2px solid var(--ink); }
.cert__sig-art img { max-height: 62px; width: auto; }
.cert__sig-art .script { font-family: var(--font-sign); font-size: 3rem; line-height: 0.9; }
.cert__sig-label { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; margin-top: 6px; }
.seal { width: 118px; height: 118px; mix-blend-mode: multiply; transform: rotate(-7deg); }
.cert__sample {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 3;
}
.cert__sample span {
  font-family: var(--font-display); font-size: clamp(3rem, 14vw, 9rem); letter-spacing: 0.1em; color: var(--red);
  text-transform: uppercase; opacity: 0.16; transform: rotate(-18deg); border: 0.08em solid var(--red); padding: 0 0.2em;
}
.cert-empty { max-width: 760px; border: 3px dashed var(--ink); padding: 28px; background: rgba(255, 255, 255, 0.6); }
.cert-empty h2 { font-size: 1.3rem; margin-bottom: 10px; }
.cert-empty p { margin: 0; color: var(--muted); }

@media (max-width: 900px) {
  .cert__body { grid-template-columns: 1fr; }
  .cert__photo { max-width: 640px; }
}
@media (max-width: 760px) {
  .cert__foot { grid-template-columns: 1fr; }
  .cert__foot > :last-child { justify-self: end; }
  .cert__serial { text-align: left; }
  .seal { margin-top: -8px; }
}

/* Phones (320 to 480px): tighter card, smaller headings, single-column details so nothing clips */
@media screen and (max-width: 480px) {
  .cert-page { padding-block: 24px 56px; }
  .cert-intro h1 { font-size: clamp(1.4rem, 7.4vw, 2.2rem); line-height: 1.05; }
  .cert-intro p { font-size: 1rem; }
  .lookup .field, .lookup .btn { width: 100%; }
  .status { padding: 14px; gap: 12px; }
  .cert-actions .btn { width: 100%; }

  .cert { border-width: 4px; padding: 8px; box-shadow: 8px 8px 0 var(--red); }
  .cert__inner { padding: 18px 14px 20px; }
  .cert__head { gap: 12px; padding-bottom: 14px; }
  .cert__brand img { width: 48px; height: 48px; }
  .cert__brand strong { font-size: 0.95rem; }
  .cert__serial b { font-size: 1.25rem; }
  .cert__title { margin: 18px 0 20px; }
  .cert__title .kanji { font-size: 0.9rem; letter-spacing: 0.5em; }
  .cert__title h2 { font-size: clamp(1.15rem, 5.9vw, 1.9rem); line-height: 1.1; overflow-wrap: anywhere; }
  .cert__body { gap: 22px; }
  .cert__photo { box-shadow: 4px 4px 0 var(--ink); }
  .cert__details { grid-template-columns: 1fr; gap: 12px; }
  .cert__details .edition dd { font-size: 1.6rem; }
  .cert__foot { margin-top: 26px; padding-top: 18px; gap: 18px; }
  .cert__statement { margin-bottom: 30px; font-size: 0.88rem; }
  .cert__sig { width: 100%; }
  .cert__sig-art .script { font-size: 2.3rem; }
  .seal { width: 92px; height: 92px; margin-top: 0; }
  .cert__sample span { font-size: clamp(2.2rem, 13vw, 4rem); }
  .cert-empty { padding: 20px; }
}

/* Very small phones (under 360px) */
@media screen and (max-width: 359px) {
  .cert__inner { padding: 16px 10px 18px; }
  .cert__brand strong { font-size: 0.85rem; }
  .cert__sig-art .script { font-size: 2rem; }
}

/* ---------- Print: certificate only, one landscape page ---------- */
@page { size: letter landscape; margin: 0.35in; }
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { background: #fff !important; background-image: none !important; font-size: 11.5px; }
  .site-nav, .skip-link, .cert-intro, .status, .cert-actions, .verify, .site-footer, .no-print { display: none !important; }
  .cert-page { padding: 0; }
  .container { width: 100%; }
  .cert { max-width: none; box-shadow: none; border-width: 4px; padding: 10px; break-inside: avoid; page-break-inside: avoid; }
  .cert__inner { padding: 18px 24px; }
  .cert__head { padding-bottom: 12px; }
  .cert__brand img { width: 50px; height: 50px; }
  .cert__title { margin: 16px 0 26px; }
  .cert__title h2 { font-size: 30px; }
  /* force the wide layout regardless of how the browser evaluates width queries while printing */
  .cert__body { gap: 22px; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .cert__foot { grid-template-columns: minmax(0, 1fr) auto; }
  .cert__serial { text-align: right; }
  .cert__foot > :last-child { justify-self: auto; }
  .cert__photo { max-width: none; }
  .seal { margin-top: 0; }
  .cert__photo { box-shadow: 4px 4px 0 var(--ink); }
  .cert__photo img { aspect-ratio: 16 / 10; }
  .cert__details { gap: 10px 18px; }
  .cert__details .edition dd { font-size: 24px; }
  .cert__foot { margin-top: 18px; padding-top: 14px; }
  .cert__statement { margin-bottom: 26px; font-size: 11px; }
  .seal { width: 96px; height: 96px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker__track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .panel, .tier, .chip { transition: none; }
}
