/*
 * Root stylesheet for sougouannai.net — the Gift Family Portal.
 * Deliberately NOT Flower's botanical direction: a quiet, paper-toned,
 * section-neutral palette so no one Gift Family section dominates the
 * shared root. No web fonts, no icon libraries, no CSS/JS frameworks.
 */

:root {
  --root-bg: #FAF8F4;
  --root-surface: #FFFFFF;

  --root-text: #2A2A27;
  --root-text-muted: #6B6862;

  --root-accent: #4A5A63;
  --root-accent-hover: #3A4750;

  --root-border: #E2DED5;

  --root-pending-bg: #EFEBE3;
  --root-pending-text: #8A8477;
  --root-published-bg: #E8EEEC;
  --root-published-text: #3A4E48;

  --root-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, sans-serif;
  --root-font-display: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  --root-radius: 8px;
  --root-max-width: 960px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--root-bg);
  color: var(--root-text);
  font-family: var(--root-font);
  line-height: 1.75;
}

a {
  color: var(--root-accent);
}

a:hover {
  color: var(--root-accent-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--root-accent);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--root-font-display);
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

/* ---- Header ---- */

.root-header {
  border-bottom: 1px solid var(--root-border);
  background: var(--root-surface);
}

.root-header__inner {
  max-width: var(--root-max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.root-header__home {
  font-family: var(--root-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--root-text);
  text-decoration: none;
}

.root-header__home:hover {
  color: var(--root-accent);
}

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

.root-main {
  max-width: var(--root-max-width);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.root-hero {
  padding: 2.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.root-hero__text {
  min-width: 0;
}

.root-hero__art {
  min-width: 0;
}

.root-hero__art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--root-radius);
  object-fit: cover;
}

.root-hero h1 {
  margin: 0 0 0.6rem;
  font-size: 1.875rem;
}

.root-hero__lead {
  margin: 0;
  max-width: 34rem;
  color: var(--root-text-muted);
  font-size: 1.0625rem;
}

/* ---- Sections / Cards ---- */

.root-sections {
  margin: 1.5rem 0 0;
}

.root-sections__heading {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--root-text-muted);
  margin: 0 0 1rem;
  font-family: var(--root-font);
}

.root-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.root-card {
  display: block;
  padding: 1.5rem;
  border: 1px solid var(--root-border);
  border-radius: var(--root-radius);
  background: var(--root-surface);
  text-decoration: none;
  color: inherit;
}

.root-card--published {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.root-card--published:hover {
  border-color: var(--root-accent);
  box-shadow: 0 1px 3px rgba(42, 42, 39, 0.08);
}

.root-card--pending {
  opacity: 0.85;
}

.root-card__status {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.root-card__status--published {
  background: var(--root-published-bg);
  color: var(--root-published-text);
}

.root-card__status--pending {
  background: var(--root-pending-bg);
  color: var(--root-pending-text);
}

.root-card__name {
  margin: 0 0 0.4rem;
  font-size: 1.125rem;
  color: var(--root-text);
}

.root-card__description {
  margin: 0;
  color: var(--root-text-muted);
  font-size: 0.9375rem;
}

@media (min-width: 700px) {
  .root-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .root-hero {
    flex-direction: row;
    align-items: center;
  }

  .root-hero__text {
    flex: 1 1 55%;
  }

  .root-hero__art {
    flex: 1 1 45%;
  }
}

/* ---- Legal pages ---- */

.legal-page {
  padding: 2rem 0 1rem;
  max-width: 40rem;
}

.legal-page h1 {
  font-size: 1.625rem;
  margin: 0 0 0.75rem;
}

.legal-page__lead {
  color: var(--root-text-muted);
  margin: 0 0 2rem;
}

.legal-page__block {
  margin: 0 0 2rem;
}

.legal-page__block:last-child {
  margin-bottom: 0;
}

.legal-page__block h2 {
  font-size: 1.0625rem;
  margin: 0 0 0.75rem;
  color: var(--root-text);
}

.legal-page__block p {
  margin: 0 0 0.75rem;
}

.legal-page__block ul {
  margin: 0;
  padding-left: 1.25rem;
}

.legal-page__block li {
  margin: 0 0 0.5rem;
}

.legal-page__link {
  margin-top: 0.75rem;
}

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

.root-footer {
  border-top: 1px solid var(--root-border);
  background: var(--root-surface);
  margin-top: 2rem;
}

.root-footer__inner {
  max-width: var(--root-max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

.root-footer__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.root-footer__operator,
.root-footer__contact {
  margin: 0;
  color: var(--root-text-muted);
  font-size: 0.8125rem;
}

.root-footer__operator {
  margin: 0 0 0.25rem;
}

/* ---- Occasion Layer (SOUGOU-X21/X22/X23) ----
   "用途から考える" — Root Two-Entry Model's second entry. Deliberately
   not another .root-card inside the existing 3-card grid: a distinct
   block so it never reads as a 4th Vertical. */

.root-occasion-entry {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--root-border);
  border-radius: var(--root-radius);
  background: var(--root-surface);
}

.root-occasion-entry__heading {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
}

.root-occasion-entry__lead {
  margin: 0 0 0.75rem;
  color: var(--root-text-muted);
}

/* ---- Occasion Index / Detail ---- */

.occasion-index,
.occasion-detail {
  padding: 1.5rem 0 1rem;
}

.occasion-index h1,
.occasion-detail h1 {
  font-size: 1.625rem;
  margin: 0 0 0.75rem;
}

.occasion-index__lead,
.occasion-detail__lead {
  color: var(--root-text-muted);
  margin: 0 0 1rem;
  max-width: 40rem;
}

.occasion-index h2 {
  font-size: 1.0625rem;
  margin: 2rem 0 0.75rem;
}

.occasion-index__back,
.occasion-detail__back {
  margin-top: 2rem;
}

.occasion-detail__section {
  margin: 0 0 2rem;
}

.occasion-detail__section:last-of-type {
  margin-bottom: 1rem;
}

.occasion-detail__section h2 {
  font-size: 1.0625rem;
  margin: 0 0 0.75rem;
  color: var(--root-text);
}

.occasion-detail__section p {
  margin: 0 0 0.75rem;
  max-width: 40rem;
}

.occasion-detail__section ul {
  margin: 0;
  padding-left: 1.25rem;
  max-width: 40rem;
}

.occasion-detail__section li {
  margin: 0 0 0.5rem;
}

.occasion-detail__section--caution {
  padding: 1rem 1.1rem;
  border: 1px solid var(--root-border);
  border-radius: var(--root-radius);
  background: var(--root-bg);
}

.occasion-detail__section--caution p {
  margin: 0;
}

/* Vertical Handoff / Purchase Channel Bridge reuse .root-card's existing
   visual language via a modifier class (COMMON_SEMANTICS=YES /
   COMMON_PIXEL_IMPLEMENTATION=NO — this only extends Root's own grammar,
   not a new component). Purchase Channel is kept visually distinguishable
   (dashed border, muted background) without an oversized external-bridge
   treatment (no banner/ad feel). */

/* .root-card--vertical intentionally has no rules of its own here — it
   renders identically to the base .root-card (that sameness is the
   point: Vertical Handoff is a first-class use of Root's existing card
   grammar, not a variant). The class exists so tests/markup can
   distinguish it from .root-card--purchase-channel below. */

.root-card--purchase-channel {
  border-style: dashed;
  background: var(--root-bg);
}

.root-card__external {
  color: var(--root-text-muted);
  font-weight: 400;
  font-size: 0.8125rem;
}

/* ---- Error pages (403/404/500) ---- */

.error-page {
  padding: 3rem 0 2rem;
  max-width: 34rem;
}

.error-page__code {
  margin: 0 0 0.5rem;
  font-family: var(--root-font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--root-text-muted);
}

.error-page h1 {
  font-size: 1.625rem;
  margin: 0 0 0.75rem;
}

.error-page__lead {
  color: var(--root-text-muted);
  margin: 0 0 2rem;
}

.error-page__action {
  margin: 0;
}

/* ---- Breadcrumb (Occasion Detail only, SOUGOU-X23 §15 — not a
   Family-wide or Root-wide standard) ---- */

.breadcrumb {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  color: var(--root-text-muted);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "\203A";
  margin-right: 0.35rem;
  color: var(--root-text-muted);
}
