/* shindan-base.css — day-mode foundation for the apex diagnostics UI
   (web/index.html + /shindan/*): design tokens, the neutralize-dark-theme
   overrides this page inherits from styles.css/tenki.css, the sticky
   header/footer chrome, the shared intro block, page-load motion, and
   mobile guardrails. Component-level styling (cards, bridge CTA, blog list,
   article body, diagnostic-module result overrides) lives in shindan.css,
   loaded right after this file -- split 2026-09-26 to stay under the
   400-line file limit during the "editorial Japanese minimal" redesign
   (concept: identity comes from typography/rhythm, not decoration).
   Everything here is scoped under body.sd-body so it never leaks onto the
   root LP, asobi.html or shigoto.html, which do not carry that class. */

body.sd-body {
  --sd-paper: #faf7f1;
  --sd-paper-2: #f3eee3;
  --sd-card: #fffdf9;
  --sd-ink: #1d1b22;
  --sd-muted: #5b5766;
  --sd-hairline: rgba(29, 27, 34, 0.12);
  --sd-hairline-strong: rgba(29, 27, 34, 0.22);
  --sd-indigo: #2e2b5c;
  --sd-indigo-deep: #201d47;
  --sd-gold: #b8975a;
  --sd-gold-deep: #8f7340;
  --sd-radius: 20px;
  background: var(--sd-paper);
  color: var(--sd-ink);
  font-family: var(--font-mincho);
  font-size: 16px;
}

/* ---- neutralize dark-theme text colors this page inherits from styles.css /
   tenki.css so headings/labels do not go invisible on the cream background */
body.sd-body .section-title,
body.sd-body .title-orn,
body.sd-body .daily-sub,
body.sd-body .daily-line-note,
body.sd-body .daily-game-note .game-link,
body.sd-body .t2026-eyebrow,
body.sd-body .t2026-title,
body.sd-body .t2026-sub,
body.sd-body .t2026-free,
body.sd-body .t2026-foot,
body.sd-body .t2026-foot a {
  color: var(--sd-ink);
}
body.sd-body .section-title { font-weight: 700; letter-spacing: 0.03em; }
body.sd-body .title-orn,
body.sd-body .title-orn::after,
body.sd-body .title-orn--right {
  background: linear-gradient(to right, transparent, var(--sd-gold));
}
body.sd-body .title-orn--right { background: linear-gradient(to left, transparent, var(--sd-gold)); }
body.sd-body .daily-line-note,
body.sd-body .t2026-eyebrow,
body.sd-body .t2026-free { color: var(--sd-muted); }
body.sd-body .daily-game-note .game-link { border-color: var(--sd-gold-deep); }
body.sd-body .daily-game-note .game-link:hover { background: rgba(184, 151, 90, 0.12); }

/* styles.css has a bare `main { background: <starfield>, var(--bg); }` rule
   (its night-sky texture for the paid LP). It targets the element, not a
   class, so it silently painted our own <main class="sd-main"> dark navy
   until this override -- caught visually, not by any selector we wrote. */
body.sd-body main { background: none; }

.sd-header,
.sd-main,
.sd-footer { width: min(100% - 2rem, 780px); margin-inline: auto; }

/* sticky, hairline-bottomed wordmark bar -- the header stays legible while
   scrolling a long grid without needing a heavier full-bleed bar. */
.sd-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--sd-paper);
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.8rem; flex-wrap: wrap;
  padding: 1.05rem 0 0.85rem;
  border-bottom: 1px solid var(--sd-hairline);
}
.sd-brand { display: inline-flex; align-items: baseline; gap: 0.5rem; text-decoration: none; color: var(--sd-ink); }
.sd-brand-name { font-family: var(--font-maru); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.08em; }
.sd-brand-domain { font-family: var(--font-maru); font-size: 0.68rem; color: var(--sd-muted); letter-spacing: 0.03em; }
.sd-nav { display: flex; gap: 1.1rem; font-family: var(--font-maru); font-size: 0.82rem; }
.sd-nav a { color: var(--sd-indigo); text-decoration: none; font-weight: 700; }
.sd-nav a:hover, .sd-nav a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* counter-reset lives here, once per page, so the card numeral
   (shindan.css's .sd-card::before) counts continuously across every
   category group instead of restarting per .sd-grid. */
.sd-main { padding: 1.7rem 0 2.6rem; counter-reset: sd-card; }

.sd-intro { text-align: center; padding: 0.8rem 0 2rem; }
.sd-intro h1 {
  font-family: var(--font-mincho); font-weight: 700;
  font-size: clamp(1.875rem, 6vw, 2.75rem); line-height: 1.25;
  margin: 0 0 0.7rem; letter-spacing: 0.01em; overflow-wrap: anywhere;
}
.sd-intro p { font-family: var(--font-maru); font-size: 0.95rem; line-height: 1.9; color: var(--sd-muted); margin: 0 auto 0.8rem; max-width: 32rem; overflow-wrap: anywhere; }
/* hub tagline meta row: 「登録なし・10秒・シェア自由」 */
.sd-hub-meta { font-family: var(--font-maru); font-size: 0.78rem; color: var(--sd-gold-deep); letter-spacing: 0.08em; margin-top: 0.05rem; }
/* thin gold rule closing the intro block -- the one ornamental touch */
.sd-intro::after { content: ""; display: block; width: 44px; height: 2px; background: var(--sd-gold); margin: 1.2rem auto 0; }

.sd-chip {
  display: inline-block; padding: 0.3rem 0.9rem; border-radius: 999px;
  background: rgba(46, 43, 92, 0.08); color: var(--sd-indigo);
  font-family: var(--font-maru); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em;
  margin-bottom: 0.8rem;
}
/* diagnostic-page intro: "入力: .../わかる: ..." line between the category
   chip and the (now one-sentence) description. */
.sd-meta-line {
  font-family: var(--font-maru); font-size: 0.82rem; color: var(--sd-indigo); font-weight: 700;
  margin: 0 0 0.6rem; overflow-wrap: anywhere;
}

/* ---- footer -------------------------------------------------------------- */
.sd-footer {
  margin-top: 2.4rem; padding: 2rem 0 calc(1.6rem + env(safe-area-inset-bottom, 0px));
  text-align: center; font-family: var(--font-maru); font-size: 0.76rem; color: var(--sd-muted);
  border-top: 1px solid var(--sd-hairline);
}
.sd-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 0.9rem; margin-bottom: 0.65rem; }
.sd-footer-links a { color: var(--sd-indigo); text-decoration: none; }
.sd-footer-links a:hover, .sd-footer-links a:focus-visible { text-decoration: underline; }
.sd-footer-note { line-height: 1.7; overflow-wrap: anywhere; }

/* ---- focus ring (keyboard nav) -------------------------------------------- */
body.sd-body a:focus-visible,
body.sd-body button:focus-visible,
body.sd-body input:focus-visible,
body.sd-body summary:focus-visible {
  outline: 2px solid var(--sd-indigo);
  outline-offset: 2px;
}

/* ---- page-load motion: a single staggered fade-rise, not scattered
   micro-interactions -- CSS-only, no JS observer. ---------------------- */
@keyframes sd-fade-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .sd-hub-group, .sd-hub-feature, .sd-blog-section, .sd-section {
    animation: sd-fade-rise 0.5s ease both;
  }
  .sd-hub-group:nth-of-type(2) { animation-delay: 0.06s; }
  .sd-hub-group:nth-of-type(3) { animation-delay: 0.12s; }
  .sd-hub-group:nth-of-type(4) { animation-delay: 0.18s; }
  .sd-hub-group:nth-of-type(5) { animation-delay: 0.24s; }
  .sd-hub-group:nth-of-type(6) { animation-delay: 0.3s; }
}
@media (prefers-reduced-motion: reduce) {
  .sd-hub-group, .sd-hub-feature, .sd-blog-section, .sd-section, html { animation: none; scroll-behavior: auto; }
}

/* ---- mobile guardrails ---------------------------------------------------- */
@media (max-width: 380px) {
  .sd-header { padding: 0.9rem 0 0.7rem; }
}
