/* ============================================================================
   背嚢 (hainou) — disaster-prep packing diagnostic.
   Palette v2 (2026-07 redesign): olive-drab GROUND is the dominant field —
   the actual material colour of a packed rucksack, not a lifestyle-blog
   cream. Canvas (帆布) is now SUBORDINATE, confined to card interiors (the
   "paper"/"gear-tag" objects that sit ON the ground). Signal-orange is the
   ONE hot accent (safety-orange gear tags, PR stencil, primary CTA) —
   used only as small points, never as a fill. Reflective silver is the
   secondary cool point (hairlines, hardware, the topmost pack-diagram band).
   Zero terracotta/ember/rust, zero moss-green (retired — too close to a
   sibling site's restful-green accent). This hue (dark olive drab) is not
   used by any other site in the portfolio.
   ============================================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  /* ground — dominant everywhere (the rucksack canvas' actual colour) */
  --ground:      #3C3F2E;
  --ground-2:    #33362A;
  --ground-deep: #24261C;
  --ground-line:      rgba(239,232,214,0.14);
  --ground-line-soft: rgba(239,232,214,0.08);

  /* canvas (帆布) — subordinate: card interiors only (about/privacy prose,
     quiz card, editorial cards, product cards, citations) */
  --canvas:    #EFE8D6;
  --canvas-2:  #E4DAC0;
  --canvas-3:  #F7F3E7;
  --line:      #CFC4A0;

  /* text on ground (dominant field) */
  --on-ground:       #E9E3CF;
  --on-ground-soft:  #B6B39C;
  --on-ground-faint: #AEA98F;

  /* text on canvas (card interiors) */
  --ink:       #221F1B;
  --ink-soft:  #55503F;
  --ink-faint: #7C7660;

  /* signal orange — the ONE hot accent. Points only: primary CTA, PR
     stencil, hero's single emphasised word, match-marker, pick chip. */
  --accent:      #FF6A13;
  --accent-deep: #D8540A;
  --accent-soft: rgba(255,106,19,0.16);

  /* reflective silver — secondary cool point: hairlines/hardware/top band */
  --silver:      #C6CABB;
  --silver-deep: #8F927E;

  --amazon:   #15130E;
  --rakuten:  #4C4F3C;

  --font-display: 'Zen Antique', 'Shippori Mincho', 'Hiragino Mincho ProN', serif;
  --font-serif:   'Shippori Mincho', 'Hiragino Mincho ProN', 'YuMincho', serif;
  --font-mono:    'Space Mono', ui-monospace, 'SFMono-Regular', monospace;

  --wrap: 1120px;
  --gutter: clamp(18px, 4vw, 44px);
  --radius: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-serif);
  color: var(--on-ground);
  background-color: var(--ground);
  background-image:
    linear-gradient(135deg, rgba(0,0,0,0.10) 25%, transparent 25%, transparent 50%, rgba(0,0,0,0.10) 50%, rgba(0,0,0,0.10) 75%, transparent 75%),
    radial-gradient(60% 50% at 100% 0%, rgba(255,106,19,0.06), transparent 55%);
  background-size: 30px 30px, auto;
  background-attachment: fixed;
  line-height: 1.9;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 760px; }
a { color: var(--on-ground); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.36; color: var(--on-ground); }

/* headings/links inside canvas ("paper") card interiors flip to ink */
.prose a, .ed-card a, .citation-list a, .callout a, .origin-quote a, .quiz-card a {
  color: var(--ground-deep); font-weight: 600;
}
.prose a:hover, .ed-card a:hover, .citation-list a:hover, .callout a:hover, .origin-quote a:hover, .quiz-card a:hover {
  color: var(--accent-deep);
}
.prose h2, .ed-card h3, .quiz-question, .product-name { color: var(--ink); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ground-deep); color: var(--on-ground); padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

.pr-bar {
  background: var(--ground-deep); color: var(--on-ground-soft);
  font-size: 11.5px; letter-spacing: 0.04em; text-align: center;
  padding: 7px 16px; font-family: var(--font-mono);
  border-bottom: 1px solid var(--ground-line-soft);
}
.pr-bar strong {
  color: var(--ground-deep); background: var(--accent);
  border-radius: 2px; padding: 1px 7px; margin-right: 9px; font-weight: 700;
  letter-spacing: 0.12em;
}

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(36,38,28,0.92);
  backdrop-filter: saturate(120%) blur(9px);
  -webkit-backdrop-filter: saturate(120%) blur(9px);
  border-bottom: 1px solid var(--ground-line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 18px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--on-ground); min-width: 0; }
.logo:hover { text-decoration: none; }
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: 0.1em; display: block; line-height: 1.1; color: var(--on-ground); }
.logo-tagline { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--on-ground-soft); display: block; margin-top: 2px; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--on-ground-soft); font-size: 13px; letter-spacing: 0.04em; font-weight: 500; }
.nav a:hover { color: var(--canvas); text-decoration: none; }
@media (max-width: 560px) {
  .nav { gap: 14px; }
  .nav a { font-size: 12px; }
  .logo-tagline { display: none; }
}

/* ---------------- hero ---------------- */
.hero { padding: clamp(48px, 9vw, 100px) 0 clamp(36px, 6vw, 64px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(26px, 5vw, 58px); align-items: center; }
.hero-eyebrow, .section-kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em;
  color: var(--on-ground-soft); text-transform: uppercase;
}
.hero-eyebrow { margin-bottom: 16px; }
.hero-eyebrow::before, .section-kicker::before { content: "— "; color: var(--on-ground-faint); }
.hero h1 { font-size: clamp(29px, 5.2vw, 50px); color: var(--on-ground); line-height: 1.32; margin-bottom: 22px; }
.hero h1 span { color: var(--accent); }
.hero-lead { font-size: 16.5px; color: var(--on-ground); line-height: 2; max-width: 46ch; border-left: 3px solid var(--accent); padding-left: 18px; margin-bottom: 16px; }
.hero-note { font-size: 13.5px; color: var(--on-ground-faint); line-height: 1.9; max-width: 58ch; margin-bottom: 18px; }
.hero-note a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; font-family: var(--font-mono); font-size: 12px; color: var(--on-ground-faint); }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; }
@media (max-width: 800px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 320px; margin: 0 auto; }
  .hero-lead { max-width: none; }
}

/* ---------------- packing-balance diagram ---------------- */
.pack-figure { text-align: center; }
.pack-figure svg { width: 100%; max-width: 300px; height: auto; margin: 0 auto; }
.pack-figure figcaption { font-family: var(--font-mono); font-size: 11px; color: var(--on-ground-faint); letter-spacing: 0.06em; margin-top: 12px; }
.pack-legend { list-style: none; margin-top: 14px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; text-align: left; font-size: 12.5px; color: var(--on-ground-soft); }
.pack-legend li { display: flex; align-items: center; gap: 7px; }
.pack-legend b { font-family: var(--font-mono); color: var(--on-ground); margin-left: auto; }
.legend-mark { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }

/* ---------------- quiz ---------------- */
.quiz-section { padding: clamp(30px, 5vw, 54px) 0; }
.quiz-card {
  background: var(--canvas-3); border: 1px solid var(--line); border-radius: 10px;
  padding: clamp(20px, 4vw, 40px); box-shadow: 0 24px 54px -30px rgba(0,0,0,0.55);
}
.quiz-step { border: 0; }
.quiz-progress { font-family: var(--font-mono); font-size: 12px; color: var(--ground-deep); letter-spacing: 0.1em; margin-bottom: 10px; }
.quiz-progress .mono { background: var(--canvas-2); padding: 2px 8px; border-radius: 3px; margin-right: 8px; }
.quiz-question { font-family: var(--font-display); font-size: clamp(18px, 2.6vw, 24px); margin-bottom: 18px; display: block; }
.quiz-options { display: grid; gap: 10px; }
.quiz-option {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  border: 1.5px solid var(--line); border-radius: 8px; background: var(--canvas);
  cursor: pointer; transition: border-color .18s ease, background .18s ease;
}
.quiz-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.quiz-option input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.quiz-option span { font-size: 15px; color: var(--ink); }
.quiz-nav { display: flex; gap: 12px; margin-top: 26px; justify-content: space-between; }
.quiz-btn {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em;
  padding: 11px 22px; border-radius: 6px; border: 1.5px solid var(--ground-deep);
  background: var(--ground-deep); color: var(--on-ground); cursor: pointer;
}
.quiz-btn--prev { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.quiz-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.quiz-btn--submit { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 700; margin-left: auto; }

#result { margin-top: 30px; padding-top: 26px; border-top: 1px dashed var(--ground-line); }
.result-picks { list-style: none; display: grid; gap: 10px; margin-top: 14px; }
.result-picks li { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; font-size: 14px; }
.pick-cat { font-family: var(--font-mono); font-size: 12px; color: var(--ink); background: var(--accent); padding: 2px 9px; border-radius: 3px; font-weight: 700; }

/* ---------------- editorial / citations ---------------- */
.band { padding: clamp(30px, 5vw, 54px) 0; }
.band--alt { background: var(--ground-2); }
.section-title { font-size: clamp(22px, 3.2vw, 30px); color: var(--on-ground); margin-top: 10px; }
.section-intro { color: var(--on-ground-soft); max-width: 68ch; margin-top: 14px; line-height: 1.95; }
.editorial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 26px; }
.ed-card { background: var(--canvas-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.ed-card h3 { font-size: 17px; margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; }
.ed-no { font-family: var(--font-mono); color: var(--ground-deep); font-size: 13px; }
.ed-card p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.85; }
.citation-list { list-style: none; margin-top: 18px; display: grid; gap: 12px; }
.citation-list li { background: var(--canvas-3); border-left: 3px solid var(--ground-deep); padding: 14px 18px; border-radius: 0 6px 6px 0; font-size: 14px; color: var(--ink-soft); }
.citation-list a { font-weight: 600; }
.legend-note { margin-top: 18px; font-size: 12.5px; color: var(--on-ground-faint); line-height: 1.8; }
.prose .legend-note { color: var(--ink-faint); }

/* ---------------- catalog ---------------- */
.cat-section { padding: clamp(28px, 5vw, 50px) 0; scroll-margin-top: 72px; }
.cat-section + .cat-section { border-top: 1px solid var(--ground-line); }
.cat-title { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.cat-label { font-size: clamp(20px, 3vw, 26px); }
.cat-count { font-family: var(--font-mono); font-size: 12px; color: var(--on-ground-faint); }

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 288px));
  justify-content: start;
  gap: 20px;
  margin-top: 20px;
}
.product {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--canvas-3); overflow: hidden; max-width: 320px;
  display: flex; flex-direction: column;
  box-shadow: 0 14px 34px -22px rgba(0,0,0,0.6);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  position: relative;
}
.product:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(0,0,0,0.65); }
.product.is-match { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), 0 18px 40px -18px rgba(0,0,0,0.65); }
.product.is-match::before {
  content: ""; position: absolute; top: -5px; right: -5px; width: 12px; height: 12px;
  background: var(--accent); border-radius: 50%; border: 2px solid var(--canvas-3);
}
.product.is-match .product-name::after { content: " ◆ この構成に近い一手"; font-size: 11px; color: var(--ground-deep); font-family: var(--font-mono); }
.product-figure {
  position: relative; height: 200px; background-color: var(--canvas-3);
  border-bottom: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
}
.product-image { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.product-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-use { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); letter-spacing: 0.06em; display: flex; align-items: center; gap: 8px; }
.u-sep { opacity: .5; }
.product-name { font-size: 16px; line-height: 1.5; }
.product-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.price-hint { font-size: 12.5px; color: var(--ink-soft); }
.price-hint b { font-family: var(--font-mono); color: var(--ink); }
.cert-badge { font-size: 10.5px; color: var(--ground-deep); background: var(--canvas-2); padding: 2px 8px; border-radius: 3px; }
.tier-badge { font-size: 10.5px; padding: 2px 8px; border-radius: 3px; background: var(--canvas-2); color: var(--ink-soft); }
.product-reason { font-size: 13.5px; color: var(--ink-soft); line-height: 1.85; flex: 1; }

.offers { display: flex; gap: 8px; margin-top: 4px; }
.offer {
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: 5px; font-size: 13px; font-weight: 600;
  position: relative;
}
.offer--amazon { background: var(--amazon); color: var(--canvas); }
.offer--amazon:hover { background: #050403; text-decoration: none; }
.offer--rakuten { background: var(--rakuten); color: var(--canvas); }
.offer--rakuten:hover { background: var(--ground-deep); text-decoration: none; }
.offer-arrow { margin-left: 4px; }
.pr-tag { position: absolute; top: -8px; right: -6px; background: var(--canvas); color: var(--ink); font-size: 9px; padding: 1px 5px; border-radius: 3px; font-family: var(--font-mono); border: 1px solid var(--line); }
.offer-note { font-size: 11px; color: var(--ink-faint); margin-top: 2px; }

/* ---------------- footer ---------------- */
.site-footer { background: var(--ground-deep); color: var(--on-ground-soft); padding: 44px 0 26px; margin-top: 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--ground-line); }
.footer-brand .logo-text { color: var(--on-ground); }
.footer-brand p { margin-top: 10px; font-size: 13px; line-height: 1.8; max-width: 40ch; }
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--on-ground); margin-bottom: 10px; }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { color: var(--on-ground-soft); font-size: 13px; }
.footer-col a:hover { color: var(--canvas); }
.footer-disclosure { font-size: 11.5px; color: var(--on-ground-soft); line-height: 1.9; margin-top: 20px; max-width: 80ch; }
.footer-copy { font-family: var(--font-mono); font-size: 11px; color: var(--on-ground-soft); margin-top: 14px; }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------------- simple pages (about/privacy/404) ---------------- */
.page-hero { padding: clamp(40px, 7vw, 70px) 0 clamp(20px, 4vw, 40px); }
.page-hero h1 { font-size: clamp(26px, 4.4vw, 40px); }
.page-hero p { color: var(--on-ground-soft); margin-top: 12px; max-width: 60ch; }
.prose {
  padding: clamp(24px, 4vw, 40px);
  margin: 6px 0 clamp(40px, 6vw, 70px);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 26px 60px -36px rgba(0,0,0,0.6);
}
.prose h2 { font-size: clamp(19px, 2.6vw, 24px); margin: 34px 0 12px; }
.prose section:first-child h2 { margin-top: 0; }
.prose p { color: var(--ink-soft); margin-bottom: 16px; line-height: 1.95; }
.prose ul { color: var(--ink-soft); margin: 0 0 16px 20px; line-height: 1.9; }
.prose a { font-weight: 600; }
.origin-quote { border-left: 3px solid var(--accent-deep); background: var(--canvas-3); padding: 16px 20px; margin: 20px 0; font-size: 15px; color: var(--ink); }
.h2-no { font-family: var(--font-mono); color: var(--ground-deep); font-size: 15px; margin-right: 6px; }
.callout { background: var(--canvas-3); border: 1px solid var(--line); border-left: 3px solid var(--ground-deep); border-radius: 6px; padding: 12px 16px; margin: 12px 0; font-size: 14px; color: var(--ink); }

.not-found-figure { margin: 30px 0; }
.not-found-figure svg { width: 100%; max-width: 260px; margin: 0 auto; display: block; }

@media (max-width: 480px) {
  .quiz-nav { flex-wrap: wrap; }
}
