:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --text: #24323a;
  --muted: #5d6b72;
  --line: #e6e0d6;
  --sea: #0f7c8a;
  --sea-soft: #e3f3f4;
  --sun: #e98b3a;
  --sun-soft: #fdf0e3;
  --radius: 14px;
  --max: 720px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

a { color: var(--sea); }
a:hover { opacity: 0.8; }
img { max-width: 100%; height: auto; border-radius: var(--radius); display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap;
}
.logo {
  font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none;
}
.logo span { color: var(--sea); }
.nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.88rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--sea); }

/* hero */
.hero { padding: 48px 0 32px; }
.hero .eyebrow { color: var(--sea); font-weight: 700; font-size: 0.85rem; margin: 0 0 8px; }
.hero h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.45; margin: 0 0 16px; }
.hero p { color: var(--muted); margin: 0; }

/* article */
main { padding-bottom: 56px; }
article h1 { font-size: clamp(1.45rem, 5.5vw, 1.9rem); line-height: 1.5; margin: 40px 0 8px; }
.meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 24px; }
article h2 {
  font-size: 1.25rem; line-height: 1.5; margin: 44px 0 12px;
  padding-left: 12px; border-left: 4px solid var(--sea);
}
article h3 { font-size: 1.05rem; margin: 28px 0 8px; }
article p { margin: 0 0 18px; }
article ul, article ol { padding-left: 1.3em; margin: 0 0 18px; }
article li { margin-bottom: 6px; }

.lead { font-size: 1.05rem; }

.box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin: 24px 0;
}
.box > :last-child { margin-bottom: 0; }
.box-sea { background: var(--sea-soft); border-color: transparent; }
.box-sun { background: var(--sun-soft); border-color: transparent; }
.box-title { font-weight: 700; margin: 0 0 6px; }

.ad-note {
  font-size: 0.82rem; color: var(--muted);
  background: var(--surface); border: 1px dashed var(--line);
  border-radius: 10px; padding: 8px 12px; margin: 0 0 24px;
}

.draft {
  background: #fff6c9; border: 2px dashed #d8b200; border-radius: 10px;
  padding: 10px 14px; margin: 0 0 18px; font-size: 0.92rem;
}

/* table */
.table-scroll { overflow-x: auto; margin: 0 0 20px; }
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 0.92rem; background: var(--surface); }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: var(--sea-soft); }

/* cards */
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 8px 0 40px; }
@media (min-width: 600px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(36,50,58,.08); opacity: 1; }
.card .tag { font-size: 0.75rem; font-weight: 700; color: var(--sea); }
.card h3 { margin: 4px 0 6px; font-size: 1.02rem; line-height: 1.5; }
.card p { margin: 0; font-size: 0.88rem; color: var(--muted); line-height: 1.7; }

.section-title { font-size: 1.1rem; margin: 32px 0 12px; }

/* button */
.btn {
  display: inline-block; background: var(--sea); color: #fff; text-decoration: none;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
}
.btn:hover { opacity: .88; color: #fff; }
.btn-sub { background: var(--surface); color: var(--sea); border: 1px solid var(--sea); }

/* checklist */
.checklist { list-style: none; padding: 0; margin: 0 0 24px; }
.checklist li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 8px; padding: 0;
}
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--sea); flex-shrink: 0; }
.checklist small { display: block; color: var(--muted); font-size: 0.82rem; line-height: 1.6; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }
.progress { font-weight: 700; color: var(--sea); }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0; font-size: 0.82rem; color: var(--muted); }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }

@media print {
  .site-header, .site-footer, .no-print { display: none; }
  body { background: #fff; }
}

figure { margin: 1.25rem 0; }
figcaption { margin-top: .4rem; font-size: .85rem; color: var(--muted, #666); text-align: center; }
img.img-portrait { max-width: 420px; width: 100%; margin: 0 auto; }
video { max-width: 100%; height: auto; border-radius: var(--radius); display: block; }

/* ---- reorganized layout ---- */
.nav a[aria-current="page"] { color: var(--sea); font-weight: 700; }
.nav a.lang { border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; }
.hero-photo { position: relative; background-size: cover; background-position: center; min-height: 420px; display: flex; align-items: flex-end; }
.hero-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,40,50,.05) 20%, rgba(10,40,50,.65) 100%); }
.hero-inner { position: relative; color: #fff; padding-top: 48px; padding-bottom: 32px; }
.hero-inner .eyebrow { font-weight: 700; font-size: .85rem; margin: 0 0 6px; opacity: .95; }
.hero-inner h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); line-height: 1.4; margin: 0 0 12px; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.hero-inner p { margin: 0 0 14px; max-width: 36em; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.btn-light { background: #fff; color: var(--sea); }
.btn-light:hover { color: var(--sea); }
.card.has-img { padding: 0 0 16px; overflow: hidden; }
.card.has-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0; margin-bottom: 12px; }
.card.has-img .tag, .card.has-img h3, .card.has-img p { padding: 0 16px; display: block; }
.cards-feature { grid-template-columns: 1fr !important; }
.cards-feature .card.has-img img { aspect-ratio: 16 / 9; }
.breadcrumb { font-size: .8rem; color: var(--muted); margin: 20px 0 -20px; }
.breadcrumb a { color: var(--muted); }
.page-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.credit { font-size: .72rem; color: var(--muted); text-align: right; }
.credit a { color: var(--muted); }
.page-credit { text-align: left; margin-top: 32px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; }
.toc ol { margin: 0; padding-left: 1.3em; font-size: .92rem; }
.toc li { margin-bottom: 4px; }
.related { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 16px; }
.related ul { padding-left: 1.2em; }
.author-box { background: var(--sea-soft); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; }
.author-box p { margin: 0 0 6px; }
.author-label { font-size: .78rem; color: var(--muted); }
.author-name { font-weight: 700; font-size: 1.05rem; }
article h2[id] { scroll-margin-top: 16px; }
.cards-feature .card.has-img img { object-position: center 78%; }
.hero-note { position: absolute; right: 10px; bottom: 8px; font-size: .7rem; color: #fff; opacity: .85; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
