:root {
  --ink: #1b2528;
  --muted: #667275;
  --paper: #f5f3ee;
  --card: #fff;
  --accent: #245b68;
  --accent-soft: #e5eef0;
  --shell: min(1120px, calc(100% - 48px));
  --radius: 12px;
  --shadow: 0 6px 18px rgba(27, 37, 40, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; }
.shell { width: var(--shell); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid #e4e7e7; }
.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; min-width: 0; text-decoration: none; }
.brand-image { display: block; width: 132px; max-width: 100%; height: 41px; object-fit: contain; object-position: left center; }
.tagline { margin: 0; color: var(--muted); font-size: .76rem; letter-spacing: .04em; }
.top-hero {
  position: relative;
  display: block;
  min-height: 390px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(115deg, #071216 0%, #10262d 45%, #263f43 100%);
  box-shadow: var(--shadow);
}
.top-hero-copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 64px);
  color: #f8faf9;
  background: linear-gradient(90deg, rgba(7,18,22,.98) 0%, rgba(16,38,45,.94) 27%, rgba(16,38,45,.72) 45%, rgba(16,38,45,.30) 64%, rgba(16,38,45,0) 88%);
}
.top-hero-copy .eyebrow { margin: 0 0 12px; color: #b8dce1; font-size: .72rem; font-weight: 700; letter-spacing: .18em; }
.top-hero h1 { max-width: 11em; margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.35; letter-spacing: .04em; }
.top-hero-copy p { max-width: 28em; margin: 20px 0 0; color: #d4e0e1; font-size: clamp(.88rem, 1.5vw, 1.05rem); }
.top-hero-visual { position: absolute; inset: 0; min-width: 0; overflow: hidden; background: #263f43; }
.top-hero-visual img { display: block; width: 100%; height: 100%; min-height: 390px; object-fit: cover; object-position: 78% center; }
.top-section { padding-block: 56px 12px; }
.section-heading { margin-bottom: 20px; }
.section-heading .eyebrow { margin: 0 0 4px; color: var(--accent); font-size: .68rem; font-weight: 700; letter-spacing: .16em; }
.section-heading h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.35; letter-spacing: .04em; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.catalog-card { min-width: 0; overflow: hidden; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); text-decoration: none; transition: transform .18s ease; }
.catalog-card:hover, .catalog-card:focus-visible { transform: translateY(-2px); }
.catalog-card > img { display: block; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: 78% center; }
.catalog-card-copy { padding: 20px 22px; }
.catalog-card h3 { margin: 0; font-size: 1.25rem; }
.catalog-card p { min-height: 3.4em; margin: 8px 0 16px; color: var(--muted); font-size: .82rem; }
.catalog-card span { color: var(--accent); font-size: .78rem; font-weight: 700; }
.empty-state { margin: 0; padding: 20px; border: 1px dashed #b9c9cc; border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.55); }
.site-footer { color: #fff; background: #171717; }
.footer-inner { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: .76rem; }
.footer-inner p { margin: 0; color: #aaa; }
.footer-links { display: flex; gap: 26px; }
.footer-links a { color: inherit; text-decoration: none; }
@media (max-width: 900px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 640px) {
  :root { --shell: calc(100% - 28px); }
  .header-inner { display: block; min-height: 0; padding-block: 15px; }
  .tagline { margin-top: 2px; font-size: .66rem; }
  .top-hero { min-height: 250px; margin-top: 18px; }
  .top-hero-copy { padding: 28px 22px; background: linear-gradient(90deg, rgba(7,18,22,.98) 0%, rgba(16,38,45,.90) 42%, rgba(16,38,45,.38) 76%, rgba(16,38,45,0) 100%); }
  .top-hero-visual { height: 250px; }
  .top-hero-visual img { min-height: 250px; object-position: 78% center; }
  .top-hero h1 { font-size: clamp(1.8rem, 9vw, 2.6rem); }
  .top-section { padding-top: 38px; }
  .catalog-grid { grid-template-columns: 1fr; gap: 14px; }
  .catalog-card > img { aspect-ratio: 16 / 8; }
  .footer-inner { min-height: 126px; display: block; padding-block: 24px; }
  .footer-links { flex-wrap: wrap; gap: 6px 20px; }
  .footer-inner p { margin-top: 16px; }
}

/* SORE feature pages: allow desktop grid/flex children to shrink after
   their layout collapses to one column.  Long Japanese headings intentionally
   keep their word boundaries, so min-content sizing must not become the
   mobile column width. */
@media (max-width: 820px) {
  main > .shell,
  main > .shell > *,
  main > .shell figure,
  main > .shell [class*="-copy"],
  main > .shell [class*="-story"] {
    min-width: 0;
    max-width: 100%;
  }

  main > .shell img,
  main > .shell svg,
  main > .shell video {
    max-width: 100%;
  }

  main > .shell h1,
  main > .shell h2,
  main > .shell h3,
  main > .shell strong {
    word-break: break-word;
    overflow-wrap: anywhere;
    text-wrap: wrap;
  }

  main > .shell p,
  main > .shell li,
  main > .shell figcaption {
    word-break: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
  }

  /* Feature editorial split components must win over their later desktop
     art-direction declarations when the mobile layout becomes one column. */
  main > .shell.beam-section,
  main > .shell.data-section,
  main > .shell.archive-section {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  main > .shell .eyebrow {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  main > .shell .civil-rail {
    overflow: hidden;
  }

  main > .shell .civil-rail i {
    display: none;
  }
}
