/* ==========================================================================
   犬・猫を迎える準備ガイド (Dog & Cat Welcome Guide)
   Shared stylesheet. Mobile-first. No framework, no external fonts.
   Palette: slate blue (#4E7A8C) for structure - headings bars, table
   headers, icons, borders - on a cool paper background, with terracotta
   (#C2683B) STRICTLY reserved for actionable elements: tool CTAs, the
   simulator/quiz action buttons and Amazon buy links. Terracotta never
   appears on titles, paragraphs, cards or icons - that restraint is what
   makes the two-tone palette work.
   ========================================================================== */

:root {
  --slate: #4E7A8C;
  --slate-dark: #38596A;
  --slate-deep: #28424E;
  --slate-pale: #E7EFF2;
  --cta: #C2683B;
  --cta-dark: #A6552D;
  --cta-pale: #F8ECE4;
  --link: #3A6A7E;
  --text: #28353E;
  --muted: #66767F;
  --border: #D3DFE4;
  --bg: #F2F5F6;
  --card: #FFFFFF;
  --warn-bg: #FBF3E2;
  --warn-border: #D9C08A;
  --radius: 12px;
  --space-sm: 14px;
  --space-lg: 28px;
  /* Vertical spacing scale (shared across the DeepMint checklist sites).
     One source of truth per gap: the PRECEDING element carries margin-bottom;
     blocks never carry margin-top (documented exceptions only). */
  --gap-s: 12px;  /* intra-block spacing */
  --gap-m: 20px;  /* between adjacent blocks (cards, ad slots, FAQ) */
  --gap-l: 32px;  /* between major sections */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "BIZ UDPGothic", Meiryo, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 { word-break: keep-all; line-height: 1.4; }

a { color: var(--link); }

img { max-width: 100%; display: block; }

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  min-width: 0;
}

.site-header .brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header .brand img { width: 28px; height: 28px; flex: none; border-radius: 6px; }

.lang-link {
  margin-left: auto;
  flex: none;
  font-size: 13px;
  text-decoration: none;
  color: var(--slate-dark);
  border: 1px solid var(--slate);
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--card);
}

/* --------------------------------------------------------------------------
   Hero (all category pages). Real photo, full bleed, slate-blue gradient
   laid on top as a semi-transparent tint (never terracotta) plus the paw
   pad (nikukyu) pattern in white filigree. White title/subtitle anchored
   to the bottom, same convention as the sibling sites.
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-photo {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.hero-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(78,122,140,0.22) 0%, rgba(40,66,78,0.82) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg fill='%23FFFFFF'%3E%3Cellipse cx='32' cy='41' rx='9' ry='7'/%3E%3Ccircle cx='19' cy='31' r='4.5'/%3E%3Ccircle cx='27' cy='25' r='5'/%3E%3Ccircle cx='37' cy='25' r='5'/%3E%3Ccircle cx='45' cy='31' r='4.5'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.10;
  pointer-events: none;
}

.hero .overlay {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 18px;
}

.hero h1 {
  color: #fff;
  font-size: 22px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.45);
}

.hero p {
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.45);
}

/* Guide pages that open directly with a content card (no intro paragraph
   under the hero) need explicit clearance below the hero band.
   Deliberate margin-top exception (same as the sibling sites). */
.hero + .container > .seo-block:first-child { margin-top: var(--gap-m); }

/* --------------------------------------------------------------------------
   Hub (index)
   -------------------------------------------------------------------------- */
.hub-head {
  text-align: center;
  padding: 28px 16px 8px;
}

.hub-head h1 { font-size: 24px; margin-bottom: 8px; }

.hub-head p { color: var(--muted); font-size: 14px; }

.jp-scope-note {
  display: inline-block;
  margin: var(--gap-s) 0 0;
  padding: 6px 16px;
  background: var(--slate-pale);
  border-radius: 999px;
  color: var(--muted);
  font-size: clamp(10px, 0.9vw, 12px);
  text-align: center;
}

/* Hub groups: deliberate margin-top exception (title-led sections, hub page
   only). 12px on top of the preceding .hub-cards 20px bottom padding gives
   32px (--gap-l) between major hub sections. */
.hub-group { margin-top: var(--gap-s); }

.hub-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-dark);
  background: var(--slate-pale);
  padding: 10px 14px;
  margin-bottom: 4px;
  border-radius: 10px 10px 0 0;
  border-bottom: 3px solid var(--slate);
}

.hub-group-title svg {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: var(--slate-dark);
}

.hub-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px 0 var(--gap-m);
}

.hub-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(40,53,62,0.06);
}

/* Card header: real photo, same slate gradient tint + paw pattern
   treatment as the page hero. No icon - the photo is the visual. */
.card-visual {
  height: 96px;
  flex: none;
  position: relative;
  overflow: hidden;
}

.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(78,122,140,0.32) 0%, rgba(40,66,78,0.48) 100%);
}

.card-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg fill='%23FFFFFF'%3E%3Cellipse cx='32' cy='41' rx='9' ry='7'/%3E%3Ccircle cx='19' cy='31' r='4.5'/%3E%3Ccircle cx='27' cy='25' r='5'/%3E%3Ccircle cx='37' cy='25' r='5'/%3E%3Ccircle cx='45' cy='31' r='4.5'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.10;
  pointer-events: none;
}

/* Tool cards (top hub section) are visually dominant: taller banner and
   larger title. Border matches every other card. */
.hub-card-tool .card-visual { height: 128px; }

/* Featured card (escape-prevention pillar): slate badge overlaid on the
   photo via position:absolute, card-visual stays the grid's standard
   height so the row never mismatches its neighbor. Featured means
   structural emphasis, so the badge is slate, not terracotta (terracotta
   = actions only). */

.card-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  background: var(--card);
  color: var(--slate-dark);
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
}

.hub-card .body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Long katakana titles must wrap normally: the global keep-all plus the
   card's overflow:hidden would silently clip them. */
.hub-card h3 { font-size: 17px; margin-bottom: 4px; word-break: normal; overflow-wrap: anywhere; }

.hub-card-tool h3 { font-size: 19px; }

.hub-card p { font-size: 13px; color: var(--muted); margin-bottom: 10px; }

/* Guide/read CTAs are slate: navigation, not action. */
.hub-card .cta {
  display: inline-block;
  align-self: center;
  margin-top: auto;
  background: var(--slate);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  border-radius: 999px;
  padding: 8px 20px;
}

/* Standalone CTA (error pages): same pill as .hub-card .cta, usable outside
   the card grid. */
.error-cta {
  display: inline-block;
  margin-top: 16px;
  background: var(--slate);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 24px;
}

/* Tool CTAs are terracotta: the action accent, reserved for these. */
.hub-card .cta-tool { background: var(--cta); }

.hub-steps {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 var(--gap-m);
}

.hub-steps h2 { font-size: 16px; margin-bottom: 8px; }

.hub-steps ol { padding-left: 22px; font-size: 14px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Benefit line (tool pages, under the page title)
   -------------------------------------------------------------------------- */
.benefit-line {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0;
}

/* --------------------------------------------------------------------------
   Question card
   -------------------------------------------------------------------------- */
.qcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0 0;
}

/* --------------------------------------------------------------------------
   Flow: single flat flex container. Every direct child is one item of the
   sequence. Spacing is set per-child via .gap-lg / .gap-sm (margin-top on the
   element that FOLLOWS the gap). Only two values exist: 14px and 28px.
   No element inside carries its own vertical margin.
   -------------------------------------------------------------------------- */
.flow { display: flex; flex-direction: column; }
.flow > .gap-lg { margin-top: var(--space-lg); }
.flow > .gap-sm { margin-top: var(--space-sm); }

.qcard h2 { font-size: 16px; margin-bottom: 12px; }

.qgroup { margin-bottom: 14px; }

.qgroup:last-child { margin-bottom: 0; }

.qgroup .qlabel {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.qbtns { display: flex; flex-wrap: wrap; gap: 8px; }

/* Selector buttons: pressed state is slate (a selection is structure,
   not an action - terracotta stays on the action buttons only). */
.qbtn {
  font: inherit;
  font-size: 14px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  flex: 1 1 auto;
}

.qbtn[aria-pressed="true"] {
  background: var(--slate);
  border-color: var(--slate);
  color: #FFFFFF;
  font-weight: 700;
}

.qhint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Primary action button (start simulation, generate names...): terracotta. */
.action-btn {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  min-height: 48px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: var(--cta);
  color: #FFFFFF;
  text-align: center;
  cursor: pointer;
}

.action-btn:hover { background: var(--cta-dark); }

/* --------------------------------------------------------------------------
   Result panel (quiz / cost simulator / name generator)
   -------------------------------------------------------------------------- */
.result-card {
  background: var(--card);
  border: 2px solid var(--slate);
  border-radius: var(--radius);
  padding: 18px 16px;
}

.result-card .result-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  margin-bottom: 4px;
}

.result-card .result-main {
  font-size: 26px;
  font-weight: 700;
  color: var(--slate-dark);
  line-height: 1.3;
  text-align: center;
  margin-bottom: 8px;
}

.result-card .result-note {
  font-size: 13px;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.result-card .result-note p { margin-bottom: 6px; }

.result-card .result-note p:last-child { margin-bottom: 0; }

/* Cost breakdown table inside the simulator result */
.result-detail {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 10px 0 0;
}

.result-detail th, .result-detail td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.result-detail th {
  background: var(--slate-pale);
  font-weight: 700;
  white-space: nowrap;
}

.result-detail td.num { text-align: right; white-space: nowrap; }

.result-detail tr.total-row td {
  font-weight: 700;
  background: var(--slate-pale);
}

/* Quiz score bars (dog vs cat affinity) */
.score-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

.score-row .score-name { flex: none; width: 3.5em; font-size: 13px; font-weight: 700; }

.score-bar {
  flex: 1;
  height: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.score-bar span {
  display: block;
  height: 100%;
  background: var(--slate);
  border-radius: 999px;
}

.score-row .score-val { flex: none; width: 3em; font-size: 12px; color: var(--muted); text-align: right; }

/* Name generator output chips */
.name-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.name-list li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 15px;
  font-weight: 700;
}

.name-list li small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Progress counter (checklist page)
   -------------------------------------------------------------------------- */
.progress {
  width: 72%;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
  font-size: 14px;
  color: var(--text);
  background: var(--slate-pale);
  border: 1px solid var(--slate);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.progress strong { color: var(--slate-dark); font-size: 22px; }

/* --------------------------------------------------------------------------
   Actions (print / share / reset)
   -------------------------------------------------------------------------- */
.actions {
  display: flex;
  gap: 8px;
}

.actions button {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.actions button svg { width: 18px; height: 18px; flex: none; }

.actions button:hover:not(:disabled) { background: var(--bg); border-color: var(--slate); }

.actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.action-status {
  font-size: 13px;
  color: var(--slate-dark);
  text-align: center;
}

/* When the status message is empty it must take no vertical room at all,
   otherwise it injects a phantom gap between the buttons and the counter. */
.action-status:empty { display: none; }
.action-status:not(:empty) { margin-top: 6px; }

/* --------------------------------------------------------------------------
   Ad disclosure
   -------------------------------------------------------------------------- */
.ad-note {
  font-size: 12px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  margin: 0 0 var(--gap-m);
}

/* --------------------------------------------------------------------------
   Ad slot. The A8 slot is filled at load by a8-rotation.js; its height must
   stay flexible because the rotation mixes 300x250 and 320x100 creatives -
   a fixed height would crop the wide format or leave a hole.
   -------------------------------------------------------------------------- */
.ad-slot {
  max-width: 760px;
  margin: 0 auto var(--gap-m);
  padding: 0 16px;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.ad-slot > div,
.ad-slot iframe,
.ad-slot table {
  max-width: 100% !important;
}

.ad-slot:empty { display: none; margin: 0; padding: 0; }

/* --------------------------------------------------------------------------
   Checklist
   -------------------------------------------------------------------------- */
#checklist { display: flex; flex-direction: column; gap: var(--space-sm); }

.checklist-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.checklist-section h3 {
  font-size: 14px;
  background: var(--slate-pale);
  color: var(--text);
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}

.checklist-section ul { list-style: none; }

.check-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.check-item:last-child { border-bottom: none; }

.check-item label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  flex: none;
}

.remove-btn {
  flex: none;
  font: inherit;
  font-size: 12px;
  border: 1px solid #E0897E;
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
  background: var(--card);
  color: #C0392B;
  cursor: pointer;
}

.remove-btn:hover, .remove-btn:focus {
  background: #FDECEA;
}

.check-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 2px;
  accent-color: var(--slate);
  cursor: pointer;
}

.check-item .iname { font-size: 15px; }

.check-item .inote {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.check-item input:checked ~ .itext .iname {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(102,118,127,0.5);
}

/* Amazon buy link: an action, so it carries the terracotta accent - the
   only inline element allowed to. */
.buy-link {
  flex: none;
  font-size: 12px;
  text-decoration: none;
  color: var(--cta-dark);
  border: 1px solid var(--cta);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
  align-self: center;
  background: var(--card);
}

.buy-link:hover { background: var(--cta-pale); }

/* --------------------------------------------------------------------------
   Custom items (user-added checklist entries)
   -------------------------------------------------------------------------- */
.custom-desc {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 14px;
}

.custom-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.custom-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}

.custom-input:focus {
  outline: 2px solid var(--slate);
  outline-offset: 1px;
}

.custom-add-btn {
  flex: none;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  padding: 8px 18px;
  border: none;
  border-radius: 10px;
  background: var(--cta);
  color: #FFFFFF;
  cursor: pointer;
}

.custom-add-btn:hover:not(:disabled) { background: var(--cta-dark); }

.custom-add-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.custom-limit-msg {
  font-size: 12px;
  color: var(--muted);
  padding: 0 14px 10px;
}

.custom-limit-msg:empty { display: none; }

/* --------------------------------------------------------------------------
   Notice (cautions)
   -------------------------------------------------------------------------- */
.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 8px;
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   SEO text block
   -------------------------------------------------------------------------- */
.seo-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin: 0 0 var(--gap-m);
}

.seo-block h2 { font-size: 17px; margin-bottom: 10px; }

.seo-block h3 { font-size: 15px; margin: 14px 0 6px; }

.seo-block p { font-size: 14px; color: #37444D; margin-bottom: 10px; }

.seo-block p:last-child { margin-bottom: 0; }

.seo-block ul, .seo-block ol {
  font-size: 14px;
  color: #37444D;
  padding-left: 22px;
  margin-bottom: 10px;
}

.seo-block ul:last-child, .seo-block ol:last-child { margin-bottom: 0; }

/* Content photo inside a .seo-block.
   Spacing: bottom margin only, per the site-wide rule. */
.content-photo { margin: 0 0 10px; }

.content-photo img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Wide reference tables must scroll inside their own box rather than push
   the page. Same rule as nyugaku / goshuin. */
.table-scroll {
  overflow-x: auto;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

/* The min-width is what makes the wrapper actually scroll: without a floor,
   width:100% lets the table squeeze into the viewport and break short cells
   one character per line. */
.table-scroll .ref-table { margin-bottom: 0; min-width: 480px; }

/* Reference table (costs, schedules, comparisons) */
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 10px;
}

.ref-table th, .ref-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.ref-table th {
  background: var(--slate-pale);
  font-weight: 700;
  white-space: nowrap;
}

.ref-table td .sub { display: block; font-size: 12px; color: var(--muted); }

/* Age-stage accordion (puppy/kitten month-by-month sections) */
.age-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--card);
}

.age-item summary {
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 10px 40px 10px 14px;
  background: var(--slate-pale);
  border-radius: 10px;
  color: var(--slate-dark);
}

.age-item[open] summary { border-radius: 10px 10px 0 0; }

.age-item summary::-webkit-details-marker { display: none; }

.age-item summary::after {
  content: '+';
  position: absolute;
  right: 14px;
  top: 8px;
  color: var(--slate);
  font-weight: 700;
  font-size: 18px;
}

.age-item[open] summary::after { content: '\2212'; }

.age-item .age-body { padding: 12px 14px; }

.age-item .age-body p { font-size: 14px; color: #37444D; margin-bottom: 8px; }

.age-item .age-body p:last-child { margin-bottom: 0; }

.age-item .age-body ul {
  font-size: 14px;
  color: #37444D;
  padding-left: 22px;
  margin-bottom: 8px;
}

.age-item .age-body ul:last-child { margin-bottom: 0; }

/* Timeline (preparation countdown on the welcome-prep pages) */
.timeline { list-style: none; padding-left: 0; }

.timeline > li {
  position: relative;
  padding: 0 0 14px 26px;
  border-left: 2px solid var(--slate-pale);
  margin-left: 8px;
}

.timeline > li:last-child { padding-bottom: 0; }

.timeline > li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--slate);
  border: 2px solid var(--card);
}

.timeline .tl-when {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-dark);
}

/* --------------------------------------------------------------------------
   Disclaimer note (kept from the sibling sites: general-information notice)
   -------------------------------------------------------------------------- */
.disclaimer-note {
  font-size: 12px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--slate);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 var(--gap-m);
}

/* --------------------------------------------------------------------------
   FAQ block
   -------------------------------------------------------------------------- */
.faq-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin: 0 0 var(--gap-m);
}

.faq-block h2 { font-size: 17px; margin-bottom: 8px; }

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.faq-item:last-child { border-bottom: none; padding-bottom: 0; }

.faq-item summary {
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 28px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  color: var(--slate);
  font-weight: 700;
  font-size: 18px;
}

.faq-item[open] summary::after { content: '\2212'; }

.faq-item p {
  font-size: 14px;
  color: #37444D;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Back to top button (navigation, slate)
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--slate);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(40,53,62,0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 40;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg { width: 22px; height: 22px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  /* No margin-top: the block that always precedes the footer carries
     the gap (margin-bottom: var(--gap-m)) - single source of truth. */
  margin-top: 0;
  padding: 20px 16px 28px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin-bottom: 10px;
}

.site-footer a { color: var(--muted); text-decoration: none; }

/* --------------------------------------------------------------------------
   Print title (hidden on screen)
   -------------------------------------------------------------------------- */
.print-header { display: none; }

/* --------------------------------------------------------------------------
   Narrow mobile adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  /* Action buttons stay horizontal and equal-width; hide the decorative
     icon and keep the text label, since a mis-tapped icon-only Reset
     button would silently wipe the user's saved progress. */
  .actions button svg { display: none; }

  .check-item { flex-direction: column; align-items: stretch; }
  .row-actions { margin-left: 0; margin-top: 4px; justify-content: flex-end; }

  /* 4-option question groups: force a fixed 2x2 grid instead of flex-wrap,
     so JP/EN label length never produces an unbalanced 3+1 wrap. */
  .qbtns-grid2 { display: grid; grid-template-columns: 1fr 1fr; }
}

/* --------------------------------------------------------------------------
   Desktop adjustments (secondary target)
   -------------------------------------------------------------------------- */
@media (min-width: 720px) {
  .hero-photo { height: 260px; }
  .hero h1 { font-size: 28px; }
  .hub-cards { grid-template-columns: repeat(3, 1fr); }
  /* Section-size variants: 2 or 4 cards fill a 2-column grid so no row is
     ever left with a single card floating beside an empty column. */
  .hub-cards-2, .hub-cards-4 { grid-template-columns: repeat(2, 1fr); }
  .card-visual { height: 104px; }
  .hub-card-tool .card-visual { height: 140px; }
}

/* --------------------------------------------------------------------------
   Print: checklist only, black and white
   -------------------------------------------------------------------------- */
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .hero, .qcard, .actions, .progress, .action-status,
  .ad-note, .buy-link, .remove-btn, .benefit-line, .seo-block, .faq-block,
  .site-footer, .notice, .back-to-top, .ad-slot, .result-card,
  .disclaimer-note, .custom-desc, .custom-add-row, .custom-limit-msg,
  .action-group, .action-btn { display: none !important; }
  .custom-section.is-empty { display: none !important; }
  .print-header { display: block; margin-bottom: 12pt; }
  .print-header h1 { font-size: 16pt; }
  .print-header p { font-size: 10pt; color: #333; }
  .container { max-width: none; padding: 0; }
  #checklist { gap: 0; }
  .checklist-section {
    border: none;
    border-radius: 0;
    margin-bottom: 8pt;
    break-inside: avoid;
  }
  .checklist-section h3 {
    background: none;
    border-bottom: 1pt solid #000;
    padding: 2pt 0;
    font-size: 12pt;
  }
  .check-item { padding: 3pt 0; border-bottom: none; }
  .check-item .iname { font-size: 11pt; color: #000 !important; text-decoration: none !important; }
  .check-item .inote { color: #444; }
}
