/* Hobby-shop catalogue: warm paper, ink, vermilion, price-tag yellow. */

:root {
  --paper: #f4efe6;
  --paper-2: #ebe3d4;
  --card: #fbf8f2;
  --ink: #1b1a17;
  --ink-soft: #46423a;
  --rule: #1b1a17;
  --vermilion: #c8321e;
  --vermilion-ink: #a52816;
  --on-vermilion: #fff8ef;
  --indigo: #23395b;
  --tag: #f6d443;
  --on-tag: #1b1a17;
  --dot: rgba(27, 26, 23, 0.07);
  --shadow: 6px 6px 0 var(--ink);

  --font-display: 'Dela Gothic One', 'Arial Black', sans-serif;
  --font-body: 'Zen Kaku Gothic New', 'Segoe UI', sans-serif;
  --font-mono: 'M PLUS 1 Code', ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15130f;
    --paper-2: #1f1c16;
    --card: #1c1914;
    --ink: #f2ecdf;
    --ink-soft: #cfc6b4;
    --rule: #f2ecdf;
    --vermilion: #ff6b4d;
    --vermilion-ink: #ff8a70;
    --on-vermilion: #1b0c08;
    --indigo: #a9c1ea;
    --tag: #f2cf3a;
    --on-tag: #17150f;
    --dot: rgba(242, 236, 223, 0.06);
    --shadow: 6px 6px 0 #000;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px);
  background-size: 14px 14px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--vermilion-ink); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--vermilion); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10;
}
.skip:focus { left: 8px; }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* --- Masthead -------------------------------------------------------- */

.masthead {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 3px solid var(--rule);
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  background: var(--vermilion); color: var(--on-vermilion);
  font-family: var(--font-display); font-size: 19px;
  border-radius: 10px;
  transform: rotate(-4deg);
  transition: transform 0.3s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(4deg) scale(1.05); }
.brand-text { font-family: var(--font-display); font-size: 20px; line-height: 1.1; }
.brand-text small {
  display: block;
  font-family: var(--font-body); font-weight: 500; font-size: 14px;
  color: var(--ink-soft); letter-spacing: 0.02em;
}

.topnav { display: flex; gap: 6px; flex-wrap: wrap; }
.topnav a {
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 6px 14px; border: 2px solid transparent; border-radius: 999px;
}
.topnav a:hover { border-color: var(--rule); }
.topnav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* --- Hero ------------------------------------------------------------ */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(16px, 4vw, 56px);
  padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 6vw, 72px);
}

.hero-vertical {
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: 0.12em;
  color: var(--vermilion);
  border-left: 3px solid var(--rule);
  padding-left: 12px;
  animation: rise 0.8s var(--ease) both;
}

.kicker {
  margin: 0 0 14px;
  font-family: var(--font-mono); font-weight: 600; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-soft);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0; }

.hero h1 {
  font-size: clamp(36px, 6.4vw, 76px);
  max-width: 15ch;
  animation: rise 0.8s 0.08s var(--ease) both;
}

.lede {
  font-size: clamp(18px, 2vw, 21px);
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 22px 0 0;
  animation: rise 0.8s 0.16s var(--ease) both;
}

.hero-new {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
  margin: 28px 0 0; max-width: 62ch;
  animation: rise 0.8s 0.24s var(--ease) both;
}

.stamp {
  display: inline-block;
  font-family: var(--font-display); font-size: 15px;
  color: var(--vermilion);
  border: 2.5px solid var(--vermilion);
  border-radius: 6px;
  padding: 1px 10px;
  transform: rotate(-3deg);
}

.hero-small { grid-template-columns: 1fr; }

/* --- Catalogue cards -------------------------------------------------- */

.catalogue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: clamp(20px, 3vw, 36px);
  padding-bottom: 80px;
}

.listing {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 3px solid var(--rule);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 22px 22px 20px;
  animation: rise 0.7s calc(0.3s + var(--i) * 0.09s) var(--ease) both;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.listing:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
@media (prefers-color-scheme: dark) {
  .listing:hover { box-shadow: 9px 9px 0 #000; }
}

.listing-top {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 2px dashed var(--rule);
}

.lot { font-family: var(--font-mono); font-weight: 600; font-size: 15px; letter-spacing: 0.08em; }

.works-on {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 14px; color: var(--ink-soft);
  min-width: 0;
}
.site-badge {
  display: inline-grid; place-items: center; flex: none;
  width: 20px; height: 20px; border-radius: 4px;
  background: var(--badge); color: #fff;
  font-family: var(--font-display); font-size: 12px; line-height: 1;
}
.works-on.big { font-size: 16px; margin: 0 0 12px; }

.listing-name { font-size: 28px; }
.listing-name a { color: var(--ink); text-decoration: none; }
.listing-name a::after { content: ''; position: absolute; inset: 0; }
.listing-name a:hover { color: var(--vermilion-ink); }

.listing-tagline { margin: 10px 0 14px; color: var(--ink-soft); font-size: 17px; }

.listing-highlights {
  list-style: none; padding: 0; margin: 0 0 20px;
  display: grid; gap: 6px;
  font-size: 16px; font-weight: 500;
}
.listing-highlights li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; }
.listing-highlights li::before { content: '◆'; color: var(--vermilion); font-size: 12px; line-height: 1.6rem; }

.listing-bottom {
  margin-top: auto;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}

.listing-actions {
  position: relative; z-index: 1;
  display: flex; gap: 10px; margin-top: 18px;
}
.listing-actions .btn-install { flex: 1; }
.btn { white-space: nowrap; }

/* --- Barcode & price tag ----------------------------------------------- */

.barcode { margin: 0; width: 132px; color: var(--ink); }
.barcode svg { display: block; width: 100%; height: 42px; fill: currentColor; }
.barcode figcaption {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.18em;
  text-align: center; margin-top: 2px; color: var(--ink);
}

.tag {
  position: relative;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 78px; padding: 8px 14px 8px 22px;
  background: var(--tag); color: var(--on-tag);
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
  transform: rotate(-5deg);
  transition: transform 0.3s var(--ease);
}
.tag::before {
  content: ''; position: absolute; left: 9px; top: 50%;
  width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--card);
}
.listing:hover .tag { transform: rotate(3deg); }
.tag-yen { font-family: var(--font-display); font-size: 24px; line-height: 1; }
.tag-label { font-family: var(--font-mono); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; }
.tag-big { position: absolute; top: -26px; right: -14px; min-width: 96px; }
.tag-big .tag-yen { font-size: 30px; }
.tag-big::before { background: var(--paper); }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px;
  font-family: var(--font-body); font-weight: 700; font-size: 17px;
  text-decoration: none; text-align: center;
  border: 2.5px solid var(--rule); border-radius: 6px;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s;
}
.btn-ghost { color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--paper-2); }
.btn-install {
  color: var(--on-vermilion); background: var(--vermilion);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-install:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); text-decoration: none; }
.btn-install:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-block { width: 100%; }

/* --- Product (script) page ------------------------------------------- */

.crumbs { font-family: var(--font-mono); font-size: 15px; margin: 32px 0 0; color: var(--ink-soft); }

.product-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding: clamp(28px, 5vw, 56px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 3px solid var(--rule);
}
.product-title h1 { font-size: clamp(38px, 6vw, 68px); animation: rise 0.7s var(--ease) both; }

.spec-sheet {
  position: relative;
  background: var(--card);
  border: 3px solid var(--rule);
  box-shadow: var(--shadow);
  padding: 26px 22px 20px;
  animation: rise 0.7s 0.12s var(--ease) both;
}
.spec-sheet dl { margin: 0 0 20px; }
.spec-sheet dl div {
  display: grid; grid-template-columns: 96px 1fr; gap: 10px;
  padding: 8px 0; border-bottom: 1.5px dashed var(--rule);
}
.spec-sheet dt { font-family: var(--font-mono); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); padding-top: 2px; }
.spec-sheet dd { margin: 0; font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.spec-help { font-size: 15px; text-align: center; margin: 10px 0 16px; color: var(--ink-soft); }
.spec-sheet .barcode { margin: 0 auto; }

.product-body { max-width: 820px; padding: 40px 0 90px; }
.summary { font-size: 20px; margin: 0 0 44px; }

.feature-group { margin: 0 0 42px; }
.feature-group h3 {
  display: inline-block;
  font-size: 22px;
  background: var(--ink); color: var(--paper);
  padding: 4px 14px 6px;
  margin-bottom: 16px;
}

.features { list-style: none; counter-reset: f; padding: 0; margin: 0; }
.features li {
  counter-increment: f;
  display: grid; grid-template-columns: 52px 1fr; column-gap: 12px;
  padding: 14px 0; border-bottom: 1.5px solid var(--paper-2);
}
.features li::before {
  content: counter(f, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--font-mono); font-weight: 600; font-size: 15px;
  color: var(--vermilion-ink); padding-top: 4px;
}
.features strong { font-size: 18px; }
.features span { color: var(--ink-soft); }

.notes {
  border: 3px solid var(--rule);
  background: var(--tag); color: var(--on-tag);
  padding: 18px 22px;
  transform: rotate(-0.6deg);
}
.notes h3 { font-size: 20px; margin-bottom: 8px; }
.notes ul { margin: 0; padding-left: 20px; }
.notes li { margin: 6px 0; }

/* --- Install guide ---------------------------------------------------- */

.guide { max-width: 900px; padding-bottom: 90px; }
.guide-head { padding: clamp(36px, 7vw, 80px) 0 28px; }
.guide-head h1 { font-size: clamp(34px, 5.6vw, 60px); max-width: 18ch; animation: rise 0.7s var(--ease) both; }

.guide-step {
  display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 20px;
  padding: 34px 0; border-top: 3px solid var(--rule);
}
.step-no {
  margin: 0;
  display: grid; place-items: center;
  width: 64px; height: 64px;
  font-family: var(--font-display); font-size: 32px;
  background: var(--vermilion); color: var(--on-vermilion);
  border-radius: 50%;
}
.guide-step h2 { font-size: clamp(24px, 3.2vw, 32px); margin: 6px 0 12px; }

.steps { padding-left: 24px; margin: 14px 0 0; }
.steps li { margin: 10px 0; padding-left: 6px; }
.steps li::marker { font-family: var(--font-mono); font-weight: 600; color: var(--vermilion-ink); }
.plain { padding-left: 20px; }
.plain li { margin: 10px 0; }
.aside { font-size: 16px; color: var(--ink-soft); border-left: 3px solid var(--vermilion); padding-left: 14px; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tabs input { position: absolute; opacity: 0; pointer-events: none; }
.tabs label {
  cursor: pointer;
  font-weight: 700; font-size: 16px;
  padding: 8px 16px;
  border: 2.5px solid var(--rule); border-radius: 999px;
  background: var(--card);
}
.tabs label:hover { background: var(--paper-2); }
.tabs input:checked + label { background: var(--ink); color: var(--paper); }
.tabs input:focus-visible + label { outline: 3px solid var(--vermilion); outline-offset: 3px; }
.tab-panel {
  display: none; order: 99; width: 100%;
  background: var(--card); border: 3px solid var(--rule); box-shadow: var(--shadow);
  padding: 6px 24px 14px; margin-top: 10px;
}
#b-chromium:checked ~ [data-for="chromium"],
#b-firefox:checked ~ [data-for="firefox"],
#b-safari:checked ~ [data-for="safari"],
#b-ios:checked ~ [data-for="ios"],
#b-android:checked ~ [data-for="android"] { display: block; }

.faq { border-top: 3px solid var(--rule); padding-top: 34px; }
.faq h2 { font-size: clamp(24px, 3.2vw, 32px); margin-bottom: 14px; }
.faq details { border-bottom: 1.5px dashed var(--rule); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none;
  font-weight: 700; font-size: 18px; padding: 12px 36px 12px 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 4px; top: 6px;
  font-family: var(--font-display); font-size: 24px; color: var(--vermilion);
  transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); }

/* --- Footer ------------------------------------------------------------ */

.colophon {
  max-width: var(--max); margin: 0 auto;
  padding: 26px var(--gutter) 40px;
  border-top: 3px solid var(--rule);
  font-size: 15px; color: var(--ink-soft);
}
.colophon p { margin: 4px 0; }

/* --- Motion & responsive ---------------------------------------------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

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

@media (max-width: 820px) {
  .product-head { grid-template-columns: 1fr; }
  .spec-sheet { margin-top: 18px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .hero { grid-template-columns: 1fr; }
  .hero-vertical {
    writing-mode: horizontal-tb;
    border-left: 0; border-bottom: 3px solid var(--rule);
    padding: 0 0 6px; justify-self: start; font-size: 20px;
  }
  .guide-step { grid-template-columns: 1fr; gap: 6px; }
  .step-no { width: 48px; height: 48px; font-size: 24px; }
  .tag-big { right: -6px; }
  .listing-actions { flex-direction: column; }
}
