/* ============================================================
   ZEN — split wireless keyboard with trackball
   Visual system: warm paper white, vermilion accent,
   Zen Kaku Gothic New + Space Mono. Bright, friendly, clean.
   ============================================================ */

:root {
  --paper:   #FAFAFB;   /* warm off-white page bg            */
  --paper-2: #FFFFFF;   /* cards / bright surfaces           */
  --paper-3: #F0F0F2;   /* sunken / alt sections             */
  --ink:     #1B1B1F;   /* near-black text                   */
  --ink-2:   #57575E;   /* secondary text                    */
  --ink-3:   #9A9AA2;   /* tertiary / captions               */
  --line:    rgba(20,20,25,.11);
  --line-2:  rgba(20,20,25,.05);
  --accent:  #F0512B;   /* vermilion (from the keys)         */
  --accent-d:#D63E1B;
  --accent-soft:#FCE7DF;
  --key:     #FFFFFF;   /* keycap white                      */
  --key-sh:  #E3E3E7;   /* keycap shadow                     */

  --u: clamp(24px, 6.2vw, 52px);   /* keymap unit */

  --maxw: 1180px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;

  --font-jp: "Zen Kaku Gothic New", system-ui, sans-serif;
  /* DIN Condensed = logo, labels, keycap legends, numbers (was Space Mono) */
  --font-mono: "D-DIN Condensed", "Saira SemiCondensed", system-ui, sans-serif;
  /* literal code / filenames stay monospaced */
  --font-code: "Space Mono", ui-monospace, monospace;
  --font-pixel: "DotGothic16", monospace;

  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-jp);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- typographic helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-weight: 700;
}
.eyebrow::before { content: "//"; opacity: .9; }

.section-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

h1,h2,h3 { font-weight: 900; line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; word-break: auto-phrase; }

.display {
  font-size: clamp(44px, 8.4vw, 116px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.02em;
}

.h2 { font-size: clamp(26px, 3.4vw, 42px); word-break: auto-phrase; }
.lead { font-size: clamp(17px, 1.8vw, 22px); color: var(--ink-2); line-height: 1.85; }

.accent { color: var(--accent); }

/* ---------- buttons / pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 16px;
  padding: 15px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.pill-primary { background: var(--accent); color: #fff; }
.pill-primary:hover { background: var(--accent-d); transform: translateY(-2px); box-shadow: 0 10px 26px -10px var(--accent); }
.pill-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.pill-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

/* ---------- reveal: static (scroll-fade disabled) ---------- */
.reveal { opacity: 1; transform: none; transition: none; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

/* non-hero images fade in once they scroll into view (transition lives on the
   .loaded END state so the JS-added hidden state snaps in instantly with no flash) */
.fade-img { opacity: 0; transform: translateY(16px); }
.fade-img.loaded {
  opacity: 1; transform: none;
  transition: opacity 1.1s cubic-bezier(.25,.46,.45,.94), transform 1.1s cubic-bezier(.25,.46,.45,.94);
}
@media (prefers-reduced-motion: reduce) {
  .fade-img { opacity: 1; transform: none; transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), backdrop-filter .4s;
}
.nav.scrolled { background: rgba(255,255,255,.82); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav .logo {
  font-weight: 900; font-size: 22px; letter-spacing: .02em;
  display: flex; align-items: baseline; gap: 8px;
}
.nav .logo .jp { font-size: 12px; font-family: var(--font-mono); color: var(--ink-3); letter-spacing: .12em; }
.nav .links { display: flex; gap: 26px; align-items: center; }
.nav .links a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav .links a:hover { color: var(--accent); }
@media (max-width: 720px){ .nav .links { display: none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding-top: 132px; padding-bottom: 40px; text-align: center; overflow: hidden; }
.hero .eyebrow { margin-bottom: 22px; }
.hero h1 { margin-bottom: 26px; }
.hero h1 .sub { display: block; color: var(--accent); }
.hero .lead { max-width: 600px; margin: 0 auto 34px; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.hero-stage { position: relative; margin-top: 10px; }
.hero-stage .hero-img-wrap { width: 100%; max-width: 1240px; margin: 0 auto; }
.hero-glow {
  position: absolute; inset: auto 0 -6% 0; height: 60%;
  background: radial-gradient(60% 100% at 50% 100%, var(--accent-soft), transparent 70%);
  z-index: -1; opacity: .7;
}
.hero-spec-row {
  display: flex; gap: 0; justify-content: center; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 40px;
}
.hero-spec-row .item {
  padding: 26px 40px; text-align: center; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 150px;
}
.hero-spec-row .item:last-child { border-right: none; }
.hero-spec-row .spec-ico { width: 36px; height: 36px; color: var(--accent); }
.hero-spec-row .lab { font-family: var(--font-jp); font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.hero-spec-row .sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-3); }
@media (max-width:560px){
  .hero-spec-row { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-spec-row .item { min-width: 0; padding: 22px 14px; border-right: none; }
  /* equal-width columns → center divider lines up across both rows */
  .hero-spec-row .item:nth-child(odd) { border-right: 1px solid var(--line); }
  .hero-spec-row .item:nth-child(1),
  .hero-spec-row .item:nth-child(2) { border-bottom: 1px solid var(--line); }
}
.cg-note {
  margin: 22px auto 22px; text-align: center; white-space: nowrap;
  font-size: 12px; line-height: 1.7; color: var(--ink-3);
}
@media (max-width: 720px){
  .cg-note { white-space: normal; max-width: 560px; }
}


/* ============================================================
   MARQUEE / silkscreen statement
   ============================================================ */
/* LED bulletin-board ticker */
.statement { position: relative; background: #0B0B0D; overflow: hidden; border-top: 1px solid rgba(255,255,255,.07); border-bottom: 1px solid rgba(255,255,255,.07); }
.statement::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.5px); background-size: 6px 6px; }
.marquee { display: flex; white-space: nowrap; padding: clamp(15px,2.4vw,24px) 0; }
.marquee .track { display: flex; align-items: center; animation: marq 30s linear infinite; }
.marquee span { font-family: var(--font-pixel); font-size: clamp(20px,3vw,34px); letter-spacing: .04em; padding: 0 .85em; color: #FF6A2A; text-shadow: 0 0 9px rgba(240,81,43,.55), 0 0 2px rgba(255,150,90,.7); white-space: nowrap; }
.marquee span .accent { color: #FFC061; text-shadow: 0 0 11px rgba(255,180,84,.65); }
.marquee .sep { color: rgba(255,106,42,.5); text-shadow: none; font-size: .7em; padding: 0; }
@keyframes marq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce){ .marquee .track { animation: none; } }


/* ============================================================
   SECTION SHELL
   ============================================================ */
section { position: relative; }
.section-head { max-width: 720px; margin-bottom: clamp(40px,6vw,68px); }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head .lead { margin-top: 18px; font-size: 17px; line-height: 1.9; }
/* decorative title accent (replaces orange eyebrow labels) */
.tdeco { display: block; width: 50px; height: 6px; border-radius: 3px; background: var(--accent); margin-bottom: 20px; }
.feat-text .tdeco { margin-bottom: 18px; }
.pad { padding: clamp(80px,11vw,150px) 0; }

/* ---------- features ---------- */
.feat { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px,5vw,80px); align-items: center; }
.feat + .feat { margin-top: clamp(70px,9vw,128px); }
.feat.flip { grid-template-columns: 1fr 1.05fr; }
.feat.flip .feat-media { order: -1; }
.feat-num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: .1em; font-weight: 700; margin-bottom: 14px; }
.feat h3 { font-size: clamp(26px,3.4vw,42px); margin-bottom: 18px; }
.feat p { color: var(--ink-2); font-size: 17px; line-height: 1.9; }
.feat .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.feat .feat-note { font-size: 15px; color: var(--ink-3); margin-top: 14px; }
.feat-media {
  border-radius: var(--r-lg); overflow: hidden; background: #ECECEC;
  position: relative; aspect-ratio: 4/3;
}
.feat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.feat-media:hover img { transform: scale(1.05); }
.feat-media .crop { position: absolute; inset: 0; }

/* bumper image carousel */
.bumper-carousel { aspect-ratio: 16/9; }
.bumper-carousel .carousel-track { position: absolute; inset: 0; }
.bumper-carousel .carousel-slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity .5s var(--ease); transform: none;
}
.bumper-carousel .carousel-slide.is-active { opacity: 1; }
.bumper-carousel:hover .carousel-slide.is-active { transform: none; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 999px; border: none; cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
  background: rgba(255,255,255,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(20,20,25,.14);
  transition: background .2s var(--ease), transform .2s var(--ease), opacity .2s var(--ease);
}
.carousel-arrow:hover { background: #fff; }
.carousel-arrow:active { transform: translateY(-50%) scale(.94); }
.carousel-arrow svg { width: 20px; height: 20px; }
.carousel-arrow.prev { left: 16px; }
.carousel-arrow.next { right: 16px; }
@media (max-width: 820px){
  .feat, .feat.flip { grid-template-columns: 1fr; }
  .feat.flip .feat-media { order: 0; }
}

/* mini illustrative chips inside media for non-photo features */
.media-illus { display: grid; place-items: center; height: 100%; background:
  radial-gradient(120% 120% at 50% 0%, #fff, var(--paper-3)); }

/* recreated battery readout (matches the photo's silkscreen panel) */
.batt-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 26px 30px; width: min(78%, 320px);
  box-shadow: 0 14px 30px -18px rgba(0,0,0,.3);
}
.batt-readout {
  display: flex; align-items: baseline; justify-content: space-between;
  background: var(--ink); border-radius: 8px; padding: 12px 16px; color: rgba(255,255,255,.85);
}
.batt-label { font-family: var(--font-pixel); font-size: 13px; letter-spacing: .06em; color: rgba(255,255,255,.55); }
.batt-num { font-family: var(--font-pixel); font-size: 30px; line-height: 1; color: var(--accent); }
.batt-bars { display: flex; gap: 5px; margin: 18px 0 14px; }
.batt-bars i { flex: 1; height: 16px; border-radius: 3px; background: var(--accent); opacity: 1; }
.batt-bars i:nth-child(n+7) { opacity: .18; background: var(--ink); }
.batt-foot { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-3); }

/* ============================================================
   FULL-BLEED PCB
   ============================================================ */
.bleed { position: relative; }
.bleed img { width: 100%; }
.bleed .overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(28px,5vw,64px);
  background: linear-gradient(to top, rgba(20,20,20,.55), transparent);
  color: #fff;
}
.bleed .overlay h3 { font-size: clamp(24px,3.4vw,46px); max-width: 14ch; }
.bleed .overlay .mono { font-family: var(--font-mono); letter-spacing: .12em; font-size: 12px; opacity: .8; margin-bottom: 12px; }

/* ============================================================
   KEYMAP (interactive)
   ============================================================ */
.keymap-wrap { background: var(--paper-2); border-radius: var(--r-lg); border: 1px solid var(--line); padding: clamp(24px,4vw,52px); container-type: inline-size; }
.keymap-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; align-items: center; }
.keymap-controls .label { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); letter-spacing: .08em; margin-right: 6px; }
.cat-btn {
  font-family: var(--font-jp); font-weight: 700; font-size: 13px;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--paper-2); color: var(--ink-2);
  transition: all .2s var(--ease);
}
.cat-btn .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--ink-3); }
.cat-btn:hover { border-color: var(--ink); color: var(--ink); }
.cat-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* board scales to its container width (cqi) so the split layout is never clipped */
.keymap-wrap .board {
  display: flex; flex-direction: row; gap: min(28px, 3cqi);
  justify-content: center; align-items: flex-start; flex-wrap: nowrap;
  max-width: 100%; background: transparent;
  --u: min(52px, 6.95cqi);
}
/* narrow containers: stack the two halves so keys stay readable */
@container (max-width: 560px) {
  .keymap-wrap .board {
    flex-direction: column; align-items: center; gap: 22px;
    --u: min(46px, 13.2cqi);
  }
}
.half { position: relative; flex: 0 0 auto; }
.key {
  position: absolute;
  width: calc(var(--u) * .92);
  height: calc(var(--u) * .92);
  border-radius: calc(var(--u) * .18);
  background: transparent;
  border: 1.6px solid rgba(20,20,25,.2);
  display: grid; place-items: center;
  font-size: calc(var(--u) * .2);
  font-weight: 700;
  color: var(--ink-2);
  font-family: var(--font-mono);
  letter-spacing: .02em;
  transition: background .25s var(--ease), color .25s, border-color .25s, opacity .25s;
  cursor: default;
  user-select: none;
}
.key.tall { height: calc(var(--u) * 1.92); }
.key.blank { color: transparent; border-color: transparent; background: transparent; }
.key.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.key.dim { opacity: .26; }
.key.hl { background: var(--ink); color: #fff; box-shadow: 0 2px 0 #000, inset 0 1px 0 rgba(255,255,255,.2); }
.key.hl.accent { background: var(--accent); color: #fff; box-shadow: 0 2px 0 var(--accent-d); }

.trackball {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff, #E6E6EA 70%, #D6D6DC);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.1), 0 3px 8px -2px rgba(0,0,0,.18), 0 0 0 1.6px rgba(20,20,25,.16);
}
.trackball.spin { animation: roll 1.2s var(--ease); }
@keyframes roll { 0%{transform:translate(0,0)} 30%{transform:translate(8%,-6%)} 70%{transform:translate(-6%,5%)} 100%{transform:translate(0,0)} }

.keymap-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; font-size: 13px; color: var(--ink-2); }
.keymap-legend .it { display: flex; align-items: center; gap: 7px; }
.keymap-legend .sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); }
.keymap-hint { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-top: 16px; letter-spacing: .04em; }

/* ============================================================
   "別途必要なもの" / kit
   ============================================================ */
.kit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; }
.kit-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 34px 22px 28px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.kit-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 32px -22px var(--accent); }
.kit-ibox { width: 86px; height: 86px; border-radius: 24px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 18px; position: relative; }
.kit-qty {
  position: absolute; top: -8px; right: -8px;
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: -.01em;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px -4px var(--accent); border: 2px solid var(--paper-2);
}
.kit-card .t { font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.kit-card .d { font-size: 13px; color: var(--ink-3); line-height: 1.6; }
.kit-icon { width: 44px; height: 44px; color: var(--accent-d); }

/* list layout with recommended purchase links */
.kit-list { display: flex; flex-direction: column; gap: 14px; }
.kit-row {
  display: grid; grid-template-columns: 260px 1fr; gap: clamp(20px,3vw,44px);
  align-items: center;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 24px clamp(22px,3vw,32px);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.kit-row:hover { border-color: var(--line); box-shadow: none; }
.kit-id { display: flex; align-items: center; gap: 16px; }
.kit-id .kit-ibox { width: 60px; height: 60px; border-radius: 16px; margin: 0; flex: none; }
.kit-id .kit-icon { width: 30px; height: 30px; }
.kit-id .kit-qty { top: -7px; right: -7px; min-width: 26px; height: 26px; font-size: 11px; }
.kit-id .t { font-weight: 700; font-size: 18px; margin: 0 0 2px; }
.kit-id .d { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }
.kit-recs { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kit-recs .rlabel { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1px; }
.kit-recs .rrow { display: flex; gap: 8px; flex-wrap: wrap; }
.rec {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 13px; border-radius: 10px;
  background: var(--paper); border: 1px solid var(--line); text-decoration: none;
  transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s;
  min-width: 0;
}
.rec:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--paper-2); }
.rec .rec-name { font-weight: 700; font-size: 13.5px; color: var(--ink); white-space: nowrap; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; }
.rec .rec-shop { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: .02em; white-space: nowrap; }
.rec .ext { width: 13px; height: 13px; color: var(--accent); flex: none; }
@media (max-width: 760px){
  .kit-row { grid-template-columns: 1fr; gap: 18px; }
  .rec .rec-name, .rec .rec-shop { white-space: normal; }
  .rec .rec-name { max-width: none; overflow: visible; }
}

.included-banner {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  background: var(--accent-soft); border-radius: var(--r-md);
  padding: 20px 26px; margin-bottom: 36px;
}
.included-banner .tick { width: 26px; height: 26px; color: var(--accent); flex: none; }
.included-banner b { color: var(--accent-d); }
.kit-foot { margin-top: 22px; font-size: 13px; color: var(--ink-3); line-height: 1.7; }

/* ============================================================
   SPEC TABLE
   ============================================================ */
.spec { width: 100%; border-collapse: collapse; }
.spec tr { border-bottom: 1px solid var(--line); }
.spec th { text-align: left; padding: 20px 18px 20px 0; font-weight: 700; width: 240px; vertical-align: top; font-size: 15px; }
.spec td { padding: 20px 0; color: var(--ink-2); font-size: 16px; vertical-align: top; }
.spec .mono { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }
.spec .spec-note { display: block; margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--ink-3); }
.spec .spec-note:first-of-type { margin-top: 12px; }
.spec .spec-note a { color: var(--accent); font-weight: 700; text-decoration: none; border-bottom: 1px solid color-mix(in oklab, var(--accent) 35%, transparent); }
.spec .spec-note a:hover { border-bottom-color: var(--accent); }
.spec .spec-note a .ext { width: 12px; height: 12px; margin-left: 3px; vertical-align: -1px; }
@media (max-width:600px){ .spec th { width: 130px; font-size: 14px; } }

/* ============================================================
   FAQ + TROUBLESHOOTING
   ============================================================ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer; padding: 22px clamp(20px,3vw,28px);
  font-weight: 700; font-size: 17px; color: var(--ink); word-break: auto-phrase;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  transition: color .2s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-mark { position: relative; flex: none; width: 18px; height: 18px; }
.faq-mark::before, .faq-mark::after {
  content: ""; position: absolute; background: var(--accent); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.faq-mark::before { top: 8px; left: 0; width: 18px; height: 2.4px; }
.faq-mark::after { top: 0; left: 8px; width: 2.4px; height: 18px; }
.faq-item[open] .faq-mark::after { transform: scaleY(0); opacity: 0; }
.faq-body { padding: 0 clamp(20px,3vw,28px) 24px; }
.faq-body p { color: var(--ink-2); font-size: 15.5px; line-height: 1.85; max-width: 64ch; }
.faq-body p + p { margin-top: 12px; }
.faq-caution { color: var(--ink-3); font-size: 13.5px; background: var(--accent-soft); border-radius: 10px; padding: 12px 16px; }
.faq-steps { margin: 14px 0 4px; padding-left: 0; list-style: none; counter-reset: step; max-width: 64ch; }
.faq-steps li {
  position: relative; padding: 9px 0 9px 42px; color: var(--ink-2); font-size: 15.5px; line-height: 1.7;
  border-bottom: 1px solid var(--line-2); counter-increment: step;
}
.faq-steps li:last-child { border-bottom: none; }
.faq-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 9px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  display: grid; place-items: center;
}
.faq-body code {
  font-family: var(--font-code); font-size: .88em; background: var(--paper-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--ink);
}
.reset-hint { color: var(--ink-2); font-size: 14.5px; margin-top: 14px; }
.faq-body p a { color: var(--accent); font-weight: 700; text-decoration: none; border-bottom: 1px solid color-mix(in oklab, var(--accent) 35%, transparent); }
.faq-body p a:hover { border-bottom-color: var(--accent); }
.reset-hint a { color: var(--accent); font-weight: 700; text-decoration: none; border-bottom: 1px solid color-mix(in oklab, var(--accent) 35%, transparent); }
.reset-hint a:hover { border-bottom-color: var(--accent); }
.faq-item:target { scroll-margin-top: 110px; }
.faq-item:target > summary { color: var(--accent); }
.dl-link {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 16px;
  padding: 11px 18px; border-radius: 10px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-size: 14px; font-weight: 700; letter-spacing: .01em;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.dl-link:hover { background: var(--accent-d); transform: translateY(-2px); box-shadow: 0 10px 24px -10px var(--accent); }
.dl-link svg { width: 17px; height: 17px; }
.dl-link .ext { width: 13px; height: 13px; opacity: .7; margin-left: -2px; }
.dl-link.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.dl-link.ghost:hover { background: var(--paper-3); color: var(--ink); border-color: var(--ink-3); box-shadow: none; }
.dl-row { display: flex; flex-wrap: wrap; gap: 12px; }
.faq-item[open] summary { color: var(--accent); }

.trouble { margin-top: clamp(48px,7vw,80px); }
.trouble-title { font-size: clamp(20px,2.4vw,26px); margin-bottom: 24px; display: flex; align-items: center; gap: 12px; }
.trouble-title::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 2.4px solid var(--accent); position: relative; background:
  radial-gradient(circle at 50% 62%, var(--accent) 0 2.4px, transparent 2.4px),
  linear-gradient(var(--accent),var(--accent)); background-size: 100% 100%, 2.4px 9px; background-repeat: no-repeat; background-position: center, center 4px; }
.trouble-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trouble-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px clamp(18px,2.4vw,24px); }
.trouble-card .tc-h { font-weight: 700; font-size: 15.5px; margin-bottom: 8px; color: var(--ink); display: flex; align-items: baseline; gap: 8px; }
.trouble-card .tc-h::before { content: "!"; flex: none; font-family: var(--font-mono); font-weight: 700; color: #fff; background: var(--accent); width: 18px; height: 18px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 12px; transform: translateY(2px); }
.trouble-card p { color: var(--ink-2); font-size: 14px; line-height: 1.8; }
.trouble-note { margin-top: 22px; font-size: 14px; color: var(--ink-3); line-height: 1.8; }
.trouble-note a { color: var(--accent); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 13px; }
.trouble-note a:hover { text-decoration: underline; }
.trouble-note .ext { width: 13px; height: 13px; }
@media (max-width: 640px){ .trouble-grid { grid-template-columns: 1fr; } }

/* ============================================================
   CLOSING
   ============================================================ */
.closing { background: var(--ink); color: var(--paper); text-align: center; padding: clamp(90px,13vw,180px) 0; }
.closing .display { color: #fff; }
.closing .lead { color: rgba(255,255,255,.7); max-width: 560px; margin: 24px auto 36px; }
.closing .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.closing .pill-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.closing .pill-ghost:hover { border-color: #fff; }

footer.foot { background: var(--ink); color: rgba(255,255,255,.5); padding: 40px 0; font-size: 13px; }
footer.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; align-items: center; }
footer.foot .logo { font-weight: 900; color: var(--paper); font-size: 20px; }
footer.foot .mono { font-family: var(--font-mono); letter-spacing: .08em; }


/* ---------- layer editor note + layer keys ---------- */
.km-editor-note { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-left: auto; align-self: center; }
@media (max-width:600px){ .km-editor-note { margin-left:0; width:100%; } }
/* hero tap-to-sound */
.hero-sound { display: block; width: 100%; padding: 0; border: none; background: none; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
.hero-img-wrap { position: relative; display: block; width: 100%; max-width: 1240px; margin: 0 auto; aspect-ratio: 1920 / 1080; }
.hero-img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain;
  user-select: none; -webkit-user-select: none;
  -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; user-drag: none;
  -webkit-touch-callout: none; pointer-events: none;
  opacity: 0;
}
.hero-img.is-active { opacity: 1; z-index: 2; }
.hero-img:not(.is-active) { z-index: 1; }
.hero-stage.color-anim .hero-img { transition: transform .12s var(--ease), opacity .5s var(--ease); }
.hero-sound:active .hero-img.is-active { transform: scale(.992); }
.hero-sound-hint {
  position: absolute; left: 50%; bottom: 17%; transform: translateX(-50%); z-index: 4;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-jp); font-weight: 700; font-size: 13px; color: #fff;
  background: rgba(27,26,23,.78); backdrop-filter: blur(6px);
  padding: 9px 16px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 8px 22px -10px rgba(0,0,0,.5);
  animation: hintpulse 2.4s var(--ease) infinite;
  pointer-events: none;
}
.hero-sound-hint svg { width: 16px; height: 16px; }
.hero-sound.tapped .hero-sound-hint { opacity: 0; transition: opacity .5s var(--ease); animation: none; }
@keyframes hintpulse { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-4px); } }
@media (prefers-reduced-motion: reduce){ .hero-sound-hint { animation: none; } }

/* hero color switcher */
.hero-colors {
  position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 6px; pointer-events: auto;
  padding: 5px; border-radius: 999px;
  background: rgba(130,130,135,.14); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
}
.hero-color {
  width: 30px; height: 30px; padding: 0; border-radius: 999px; position: relative;
  background: none; border: none; cursor: pointer; display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.hero-color .sw {
  width: 20px; height: 20px; border-radius: 999px; display: block;
  box-shadow: 0 0 0 1px rgba(20,20,25,.12) inset, 0 1px 3px rgba(20,20,25,.18);
  transition: transform .18s var(--ease);
}
.hero-color .sw-white { background: linear-gradient(155deg, #ffffff, #e9e9ec); }
.hero-color .sw-black { background: linear-gradient(155deg, #3a3a3e, #1c1c1f); box-shadow: 0 0 0 1px rgba(255,255,255,.1) inset, 0 1px 3px rgba(20,20,25,.3); }
.hero-color:hover .sw { transform: scale(1.12); }

.key.sm { font-size: calc(var(--u) * .15); }
.key.lyr { background: rgba(20,20,25,.045); border-style: dashed; border-color: rgba(20,20,25,.32); color: var(--ink-3); }
.key.flip { animation: keyflip .32s var(--ease); }
@keyframes keyflip { 0%{ transform: translateY(-2px); opacity:.25 } 100%{ opacity:1 } }

/* ---------- assembly steps ---------- */
.steps { list-style: none; max-width: 760px; margin: 0; }
.step { display: flex; gap: 22px; align-items: flex-start; padding: 24px 4px; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: none; }
.step-n { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color:#fff; display:grid; place-items:center; font-family: var(--font-mono); font-weight:700; font-size: 20px; box-shadow: 0 8px 18px -9px var(--accent); }
.step-body h4 { font-size: clamp(19px,2.2vw,24px); font-weight:700; margin-bottom: 6px; }
.step-body p { color: var(--ink-2); font-size: 16px; line-height: 1.8; }
.step-body .note { display:block; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin: 6px 0 0; line-height: 1.6; }
.step-fig { margin: 16px 0 0; max-width: 420px; }
.step-fig img { width: 100%; height: auto; display: block; border-radius: var(--r-md); border: 1px solid var(--line); background: #ECECEC; }
.rec-note { font-size: 12px; color: var(--ink-3); line-height: 1.6; margin-top: 2px; }
.fw-link {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 18px;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: #fff; text-decoration: none;
  font-size: 14px; font-weight: 700; letter-spacing: .01em;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.fw-link:hover { background: #000; transform: translateY(-2px); }
.fw-link .ext { opacity: .65; margin-left: 1px; }
.setup-note { max-width: 760px; margin: 26px auto 0; font-family: var(--font-mono); font-size: 13px; color: var(--accent-d); text-align: center; background: var(--accent-soft); border-radius: 999px; padding: 12px 22px; }
