/* ============================================================================
   グラスとことば — 光学エディトリアル design system
   Concept: through-the-lens HUD (dark panel + green caption text)
            × warm paper editorial for long-form reading.
   Fonts: Zen Old Mincho (display) / IBM Plex Sans JP (body) / IBM Plex Mono (data)
   ============================================================================ */

:root {
  --paper: #f6f4ed;
  --paper-deep: #eeebe0;
  --card: #fffdf6;
  --ink: #16201b;
  --ink-soft: #46544c;
  --ink-faint: #5d6963;
  --line: #d9d4c4;
  --line-strong: #b9b29c;

  --lens: #0b1512;
  --lens-edge: #1d2f27;
  --hud: #3ee594;
  --hud-dim: #8fcfae;
  --hud-faint: rgba(62, 229, 148, 0.14);

  --accent: #0b7a55;        /* deep green for light bg */
  --accent-ink: #075c40;
  --caution: #a05a18;       /* 技適・注意レーン (borders) */
  --caution-ink: #8a4a10;   /* caution text — AA contrast on caution-bg */
  --caution-bg: #f7ead8;

  --serif: "Zen Old Mincho", "Hiragino Mincho ProN", serif;
  --sans: "IBM Plex Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --mono: "IBM Plex Mono", "Menlo", monospace;

  --maxw: 72rem;
  --article-w: 44rem;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 32, 27, 0.06), 0 8px 28px -12px rgba(22, 32, 27, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.95;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(22, 32, 27, 0.035) 1px, transparent 1px);
  background-size: 5px 5px;
}
main, header, footer { position: relative; z-index: 1; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
strong { font-weight: 700; }

::selection { background: var(--hud); color: var(--lens); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.site-header :focus-visible, .lens-hero :focus-visible, .article-hero :focus-visible, .site-footer :focus-visible {
  outline-color: var(--hud);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--hud);
  color: var(--lens);
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- PR bar */
.pr-bar {
  background: var(--lens);
  color: var(--hud-dim);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 7px 14px;
  line-height: 1.5;
}
.pr-bar b { color: var(--hud); font-weight: 600; }

/* ---------------------------------------------------------------- header */
.site-header {
  background: var(--lens);
  border-bottom: 1px solid var(--lens-edge);
  padding: 0 20px;
}
.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; flex-wrap: wrap; min-width: 0; row-gap: 2px; }
.brand .mark {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 22px;
  color: #f2f7f0;
  letter-spacing: 0.04em;
}
.brand .mark em { font-style: normal; color: var(--hud); }
.brand .sub {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--hud-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #cfe0d4;
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.site-nav a:hover { color: var(--hud); border-color: var(--lens-edge); background: var(--hud-faint); }

/* ---------------------------------------------------------------- hero (lens view) */
.lens-hero {
  background:
    repeating-linear-gradient(0deg, rgba(62, 229, 148, 0.045) 0 1px, transparent 1px 4px),
    radial-gradient(120% 90% at 50% 0%, #14241d 0%, var(--lens) 70%);
  color: #e8f3ec;
  padding: 64px 20px 56px;
  border-bottom: 3px solid var(--hud);
  overflow: hidden;
}
.lens-hero .inner { max-width: var(--maxw); margin: 0 auto; position: relative; }
.lens-hero .nb { white-space: nowrap; }

/* hero HUD caption stack */
.hero-hud { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; margin-top: 34px; }
.hero-hud .caption-bar { animation: capfade 0.7s ease both; }
.hero-hud .caption-bar:nth-child(1) { animation-delay: 0.15s; }
.hero-hud .caption-bar:nth-child(2) { margin-left: 46px; animation-delay: 0.55s; }
.hero-hud .caption-bar:nth-child(3) { margin-left: 16px; animation-delay: 0.95s; }
.hero-hud .caption-bar.dim { color: var(--hud-dim); box-shadow: none; }
.hero-hud .caption-bar:not(:last-child) .txt::after { content: none; }
@keyframes capfade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (min-width: 1000px) {
  .lens-hero .inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: center; }
  .hero-hud { margin-top: 0; justify-self: end; }
}
@media (max-width: 640px) {
  .hero-hud { gap: 12px; }
  .hero-hud .caption-bar:nth-child(2) { margin-left: 22px; }
}
.lens-hero .frame-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--hud-dim);
  text-transform: uppercase;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lens-hero .frame-tag::before, .lens-hero .frame-tag::after {
  content: "";
  height: 1px;
  width: 34px;
  background: var(--hud-dim);
  opacity: 0.5;
}
.lens-hero h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(30px, 5.2vw, 52px);
  line-height: 1.32;
  margin: 0 0 18px;
  letter-spacing: 0.02em;
  max-width: 21em;
  text-wrap: balance;
}
.lens-hero h1 em { font-style: normal; color: var(--hud); }
.lens-hero .lede {
  max-width: 38em;
  color: #b9cdc0;
  font-size: 15.5px;
  margin: 0 0 30px;
}

/* live caption bar — the signature motif */
.caption-bar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(8, 17, 13, 0.92);
  border: 1px solid var(--lens-edge);
  border-left: 3px solid var(--hud);
  border-radius: 8px;
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--hud);
  letter-spacing: 0.03em;
  box-shadow: 0 0 24px rgba(62, 229, 148, 0.12);
  max-width: 100%;
}
.caption-bar .who {
  color: var(--hud-dim);
  font-size: 11px;
  border: 1px solid var(--hud-dim);
  border-radius: 4px;
  padding: 1px 7px;
  white-space: nowrap;
}
.caption-bar .txt { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@keyframes capblink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.caption-bar .txt::after { content: "▌"; animation: capblink 1.1s steps(1) infinite; color: var(--hud); }

/* hero corner reticles */
.lens-hero .inner::before, .lens-hero .inner::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1.5px solid rgba(62, 229, 148, 0.4);
  pointer-events: none;
}
.lens-hero .inner::before { top: -18px; left: -6px; border-right: none; border-bottom: none; }
.lens-hero .inner::after { bottom: -12px; right: -6px; border-left: none; border-top: none; }

/* ---------------------------------------------------------------- layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0 8px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 26px; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 26px;
  margin: 0;
  letter-spacing: 0.03em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.section-head .idx {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.12em;
}
.section-head .rule { flex: 1; height: 1px; background: var(--line-strong); }

/* ---------------------------------------------------------------- cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.a-card {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 3px 3px 0 rgba(22, 32, 27, 0.07);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}
.a-card:hover { transform: translate(-2px, -2px); border-color: var(--accent); color: var(--ink); box-shadow: 5px 5px 0 rgba(11, 122, 85, 0.16); }
.a-card.wide { grid-column: 1 / -1; flex-direction: row; align-items: flex-start; flex-wrap: wrap; gap: 8px 28px; }
.a-card.wide h3 { flex: 1 1 35%; }
.a-card.wide p { flex: 1 1 55%; }
.a-card.wide .meta, .a-card.wide .go { flex-basis: 100%; }
.a-card .meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.a-card .lane {
  color: var(--accent-ink);
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  padding: 1px 7px;
  background: rgba(11, 122, 85, 0.06);
}
.a-card .lane.caution { color: var(--caution-ink); border-color: var(--caution); background: var(--caution-bg); }
.a-card h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18.5px;
  line-height: 1.5;
  margin: 0;
}
.a-card p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; }
.a-card .go {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.a-card.flagship { border-width: 2px; border-color: var(--ink); }
.a-card.flagship::before {
  content: "FLAGSHIP";
  position: absolute;
  top: -9px;
  left: 18px;
  background: var(--lens);
  color: var(--hud);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  padding: 2px 9px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- article */
.article-hero {
  background: var(--lens);
  color: #e8f3ec;
  padding: 46px 20px 40px;
  border-bottom: 3px solid var(--hud);
}
.article-hero .inner { max-width: var(--article-w); margin: 0 auto; }
.article-hero .crumbs {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--hud-dim);
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.article-hero .crumbs a { color: var(--hud-dim); }
.article-hero .crumbs a:hover { color: var(--hud); }
.article-hero h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(25px, 4.4vw, 38px);
  line-height: 1.42;
  margin: 0 0 16px;
  letter-spacing: 0.02em;
  text-wrap: balance;
}
.article-hero .stand {
  color: #b9cdc0;
  font-size: 14.5px;
  margin: 0 0 20px;
  line-height: 1.9;
}
.article-hero .byline {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--hud-dim);
  letter-spacing: 0.06em;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

main.body {
  max-width: var(--article-w);
  margin: 0 auto;
  padding: 44px 20px 24px;
}
main.body h2 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 24px;
  line-height: 1.5;
  margin: 56px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  letter-spacing: 0.02em;
}
main.body h2 .h-idx {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 4px;
}
main.body h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  margin: 38px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--hud);
  letter-spacing: 0.02em;
}
main.body p { margin: 0 0 1.4em; }
main.body ul, main.body ol { padding-left: 1.5em; margin: 0 0 1.4em; }
main.body li { margin-bottom: 0.45em; }

/* TOC */
.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 12px;
}
.toc .t {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.toc ol { margin: 0; padding-left: 1.4em; font-size: 14px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* key-caption: 字幕バー風の要点ボックス */
.key-caption {
  background: var(--lens);
  border-radius: var(--radius);
  border-left: 4px solid var(--hud);
  padding: 18px 22px;
  margin: 28px 0;
  color: #dcefe3;
  font-size: 15px;
  line-height: 1.95;
}
.key-caption .k {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--hud);
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.key-caption b, .key-caption strong { color: var(--hud); font-weight: 600; }

/* spec table */
.spec-table { width: 100%; border-collapse: collapse; margin: 22px 0 30px; font-size: 14px; background: var(--card); }
.spec-table caption {
  caption-side: top;
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  padding-bottom: 8px;
  text-transform: uppercase;
}
.spec-table th, .spec-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; line-height: 1.7; }
.spec-table thead th { background: var(--lens); color: var(--hud-dim); font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
.spec-table tbody th { background: var(--paper-deep); font-weight: 700; white-space: nowrap; }
.spec-table td.num { font-family: var(--mono); font-size: 13px; }
.table-scroll { overflow-x: auto; }
.table-scroll .spec-table { min-width: 560px; }

/* note / caution */
.note, .caution-box {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.9;
}
.note { background: var(--card); border: 1px dashed var(--line-strong); color: var(--ink-soft); }
.caution-box { background: var(--caution-bg); border: 1px solid var(--caution); color: #5c3a14; }
.caution-box .k, .note .k {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.caution-box .k { color: var(--caution-ink); }
.note .k { color: var(--ink-faint); }

/* sources */
.sources { font-size: 13px; color: var(--ink-soft); }
.sources ol { padding-left: 1.5em; }
.sources li { margin-bottom: 0.4em; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- offers */
.offer-slot { margin: 30px 0; }
.offer-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-left: 5px solid var(--hud);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 3px 3px 0 rgba(22, 32, 27, 0.08);
  position: relative;
}
.offer-card .pr-badge {
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  padding: 2px 10px;
  border-radius: 4px;
}
.offer-card .o-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  margin: 4px 0 6px;
}
.offer-card .o-note { font-size: 13px; color: var(--ink-soft); margin: 0 0 14px; line-height: 1.8; }
.offer-links { display: flex; flex-direction: column; gap: 10px; }
.offer-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--lens);
  color: #ecf7f0;
  text-decoration: none;
  border-radius: 8px;
  padding: 13px 18px;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid var(--lens-edge);
  transition: background 0.15s ease;
}
.offer-links a:hover { background: #15271f; color: var(--hud); }
.offer-links a .arrow { font-family: var(--mono); color: var(--hud); font-size: 13px; white-space: nowrap; }
.offer-card .o-disclaimer { font-size: 11px; color: var(--ink-faint); margin: 12px 0 0; line-height: 1.7; }

/* ---------------------------------------------------------------- footer */
.site-footer {
  margin-top: 72px;
  background: var(--lens);
  color: #aebfb4;
  padding: 44px 20px 36px;
  font-size: 13px;
  border-top: 3px solid var(--hud);
}
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 18px; }
.site-footer .f-brand { font-family: var(--serif); font-weight: 900; font-size: 18px; color: #f2f7f0; }
.site-footer .f-brand em { font-style: normal; color: var(--hud); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--hud-dim); text-decoration: none; }
.site-footer a:hover { color: var(--hud); text-decoration: underline; }
.site-footer .attribution { font-size: 11.5px; color: #7d8f84; line-height: 1.8; }

/* ---------------------------------------------------------------- misc */
.eyecatch {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--lens-edge);
  background: var(--lens);
  margin: 0 0 30px;
  box-shadow: var(--shadow);
}
.lane-art {
  width: 100%;
  max-height: 230px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--lens-edge);
  background: var(--lens);
  margin: 0 0 22px;
  box-shadow: var(--shadow);
}
.back-to-hub { max-width: var(--article-w); margin: 0 auto; padding: 8px 20px 40px; }
.back-to-hub a { font-family: var(--mono); font-size: 13px; }

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .lens-hero { padding: 44px 18px 40px; }
  .section { padding: 42px 0 4px; }
  .caption-bar { font-size: 12px; padding: 10px 14px; }
  .section-head { flex-wrap: wrap; }
  .section-head .rule { flex-basis: 100%; }
  .brand .sub { font-size: 9.5px; letter-spacing: 0.1em; }
  .site-header .inner { min-width: 0; }
  .site-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    padding: 0 24px 2px 0;
    mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; }
  .pr-bar { padding: 8px 14px 9px; }
  .a-card.wide { flex-direction: column; align-items: stretch; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .caption-bar .txt::after { animation: none; }
  .a-card { transition: none; }
  .hero-hud .caption-bar { animation: none; }
}
