/* =========================================================
   ONE BLOOD — ペットの日々カロリー
   Static stylesheet. Mobile-first, single column.
   Palette: warm ivory + deep blood red + soft pet green/terracotta.
   ========================================================= */

:root {
  /* Surfaces */
  --bg: #F8F4EC;          /* warm ivory */
  --bg-alt: #FBF8F1;
  --surface: #FFFFFF;
  --surface-2: #F2ECDF;   /* subtle warm card */
  --border: #E5DDCB;
  --border-strong: #D4C9AE;

  /* Ink */
  --ink: #1F1A14;
  --ink-2: #43382B;
  --ink-3: #756755;
  --ink-4: #A8997F;

  /* Accents */
  --blood: #8A1B2C;       /* ONE BLOOD deep red */
  --blood-hover: #6F1322;
  --blood-soft: #F4DCDF;
  --green: #5C7A4E;       /* gentle pet green */
  --green-soft: #E2EAD7;
  --terra: #B5663F;       /* terracotta */
  --terra-soft: #F1DDCB;

  /* Status */
  --good: #5C7A4E;
  --warn: #B5663F;
  --over: #8A1B2C;

  /* Typography */
  --font-display: "Zen Kaku Gothic New", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  --font-body: "Noto Sans JP", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* Radius / shadow */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;
  --shadow-1: 0 1px 2px rgba(31,26,20,.04), 0 8px 24px -12px rgba(31,26,20,.10);
  --shadow-2: 0 1px 2px rgba(31,26,20,.05), 0 22px 48px -22px rgba(31,26,20,.18);

  /* Layout */
  --maxw: 980px;
  --pad: 20px;

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--blood); text-decoration: none; }
a:hover { color: var(--blood-hover); }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--blood);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px var(--pad);
  background: rgba(248, 244, 236, .85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(229, 221, 203, .6);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--blood);
}
.brand-mark { color: var(--blood); flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 14px;
  color: var(--ink);
}
.brand-sub {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.header-nav { display: none; gap: 22px; }
.header-nav a {
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.pet-menu {
  position: relative;
  margin-left: auto;
}
.pet-menu__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(67, 34, 25, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 28px rgba(67, 34, 25, 0.08);
  cursor: pointer;
}
.pet-menu__button:hover,
.pet-menu__button[aria-expanded="true"] {
  border-color: rgba(154, 25, 36, 0.28);
  background: #fffdf8;
  color: var(--blood);
}
.pet-menu__button:focus-visible {
  outline: 3px solid rgba(154, 25, 36, 0.22);
  outline-offset: 3px;
}
.pet-menu__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: min(78vw, 260px);
  padding: 10px;
  border: 1px solid rgba(67, 34, 25, 0.14);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 22px 54px rgba(67, 34, 25, 0.16);
}
.pet-menu__panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}
.pet-menu__panel a:hover,
.pet-menu__panel a:focus-visible {
  background: rgba(154, 25, 36, 0.08);
  color: var(--blood);
}
@media (min-width: 760px) {
  .header-nav { display: inline-flex; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 56px var(--pad) 48px;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid; gap: 36px;
}
@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    padding: 96px var(--pad) 80px;
  }
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--blood);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(38px, 8vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  color: var(--ink);
}
.hero-sub {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
  color: var(--blood);
  margin: 0 0 14px;
}
.hero-lead {
  font-size: 15.5px;
  color: var(--ink-2);
  max-width: 44ch;
  margin: 0 0 28px;
}
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--blood); color: #fff;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.cta:hover { background: var(--blood-hover); color: #fff; transform: translateY(-1px); }
.cta:active { transform: translateY(0); }

.hero-pillars {
  list-style: none; padding: 0; margin: 36px 0 0;
  display: grid; gap: 12px;
}
.hero-pillars li {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: var(--ink-2);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.pillar-num {
  font-family: var(--font-mono);
  color: var(--blood);
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* Hero figure / orb */
.hero-figure {
  display: flex; justify-content: center;
  position: relative;
}
.hero-orb {
  position: relative;
  width: min(78vw, 360px);
  aspect-ratio: 1;
}
.orb-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
}
.orb-ring-1 { inset: 0; border-color: rgba(138,27,44,.18); }
.orb-ring-2 { inset: 14%; border-color: rgba(181,102,63,.30); border-style: dashed; }
.orb-ring-3 { inset: 28%; border-color: rgba(92,122,78,.42); }
.orb-core {
  position: absolute; inset: 42%;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #C72A40 0%, var(--blood) 55%, #5E0F1B 100%);
  box-shadow: 0 14px 36px -16px rgba(138,27,44,.6);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.orb-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

/* ===== Section heads ===== */
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--blood);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-tag.light { color: rgba(255,255,255,.85); }
.section-head { margin-bottom: 28px; }
.section-head h2,
.info-section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 4.4vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 12px;
}
.section-lead {
  color: var(--ink-2);
  font-size: 15.5px;
  margin: 0;
  max-width: 56ch;
}

/* ===== Calculator section ===== */
.calculator {
  max-width: var(--maxw);
  margin: 24px auto 0;
  padding: 32px var(--pad) 16px;
}

/* Species toggle */
.species-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--surface-2);
  padding: 8px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  margin-bottom: 22px;
}
.species-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: transparent;
  border: none;
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--ink-3);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 16px;
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.species-btn svg { color: var(--ink-3); transition: color .2s var(--ease); }
.species-btn:hover { color: var(--ink); }
.species-btn:hover svg { color: var(--ink); }
.species-btn.is-active {
  background: var(--surface);
  color: var(--blood);
  box-shadow: var(--shadow-1);
}
.species-btn.is-active svg { color: var(--blood); }

/* ===== Form / cards ===== */
.calc-form { display: grid; gap: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-1);
}
@media (min-width: 720px) {
  .card { padding: 28px; }
}

fieldset.card { margin: 0; min-width: 0; }
.card legend {
  display: flex; align-items: center; gap: 12px;
  padding: 0 0 12px;
  width: 100%;
}
.step-num {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--blood-soft);
  color: var(--blood);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}
.step-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.step-lead {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--ink-3);
}

/* Fields */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.hint {
  font-size: 12px;
  color: var(--ink-3);
  margin: 2px 0 0;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  font: inherit;
  font-size: 16px; /* prevent iOS zoom */
  color: var(--ink);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23756755' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
input:focus, select:focus {
  border-color: var(--blood);
  background: var(--surface);
  outline: none;
  box-shadow: 0 0 0 3px rgba(138,27,44,.12);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 560px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* Combo (input + select) */
.combo {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 8px;
}
@media (max-width: 380px) {
  .combo { grid-template-columns: 1fr; }
}

/* Segmented control */
.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px;
  border-radius: 12px;
}
.seg-item { position: relative; }
.seg-item input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-item span {
  display: block; text-align: center;
  padding: 10px 6px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.seg-item input:checked + span {
  background: var(--surface);
  color: var(--blood);
  box-shadow: var(--shadow-1);
}
.seg-item input:focus-visible + span {
  outline: 2px solid var(--blood);
  outline-offset: 2px;
}

/* Checkbox row */
.check-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--terra-soft);
  border: 1px solid rgba(181,102,63,.25);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-2);
}
.check-row input { width: 18px; height: 18px; accent-color: var(--terra); }

/* Entry list */
.entry-list { display: grid; gap: 14px; margin-bottom: 14px; }
.entry {
  position: relative;
  background: var(--bg-alt);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: 16px;
}
.entry .field { margin-bottom: 12px; }
.entry-sum {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blood);
  font-weight: 500;
}
.entry-remove {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-3);
  display: grid; place-items: center;
  transition: color .15s, border-color .15s;
}
.entry-remove:hover { color: var(--blood); border-color: var(--blood); }

/* Buttons */
.ghost-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  border: 1.5px dashed var(--border-strong);
  color: var(--ink-2);
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  transition: border-color .15s, color .15s, background .15s;
}
.ghost-btn:hover { border-color: var(--blood); color: var(--blood); background: var(--blood-soft); }

.actions {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 4px;
  align-items: stretch;
}
@media (min-width: 560px) {
  .actions { flex-direction: row; align-items: center; justify-content: flex-end; }
}
.primary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--blood); color: #fff;
  border: none;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 14px;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-2);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.primary-btn:hover { background: var(--blood-hover); transform: translateY(-1px); }
.primary-btn:active { transform: translateY(0); }
.text-btn {
  background: transparent; border: none;
  color: var(--ink-3); font-weight: 700; font-size: 14px;
  padding: 12px 14px; text-decoration: underline;
}
.text-btn:hover { color: var(--blood); }

/* ===== Result ===== */
.result {
  margin-top: 28px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
}
@media (min-width: 720px) { .result { padding: 32px; } }

.result-head { margin-bottom: 22px; }
.result-head h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 3.6vw, 28px);
  margin: 0 0 6px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
@media (min-width: 640px) {
  .result-grid { grid-template-columns: repeat(3, 1fr); }
}
.kpi {
  display: grid; gap: 6px;
  padding: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.kpi-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  font-weight: 700;
}
.kpi-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  color: var(--ink);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi-value small {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  margin-left: 4px;
}
.kpi-sub {
  font-size: 12px;
  color: var(--ink-3);
}
.kpi-accent {
  background: linear-gradient(180deg, #FFFBF3 0%, #F4DCDF 100%);
  border-color: rgba(138,27,44,.2);
}
.kpi-accent .kpi-value { color: var(--blood); }

/* Balance card */
.balance-card {
  padding: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 18px;
}
.balance-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.balance-head h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}
.balance-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
}
.balance-pill.is-good { background: var(--green-soft); color: var(--good); border-color: rgba(92,122,78,.3); }
.balance-pill.is-under { background: var(--terra-soft); color: var(--terra); border-color: rgba(181,102,63,.3); }
.balance-pill.is-over { background: var(--blood-soft); color: var(--blood); border-color: rgba(138,27,44,.3); }

.balance-bar { margin-top: 6px; }
.bar-track {
  position: relative;
  height: 14px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: visible;
  border: 1px solid var(--border);
}
.bar-range {
  position: absolute; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--green-soft), #C8DBB6);
  border-radius: 999px;
  border: 1px solid rgba(92,122,78,.35);
}
.bar-mark {
  position: absolute;
  top: -6px; bottom: -6px;
  width: 4px;
  border-radius: 4px;
  background: var(--blood);
  box-shadow: 0 0 0 4px rgba(138,27,44,.18);
  transition: left .5s var(--ease);
}
.bar-legend {
  display: flex; justify-content: space-between;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.balance-note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}

/* Next step */
.next-step {
  padding: 20px;
  background: var(--green-soft);
  border: 1px solid rgba(92,122,78,.25);
  border-radius: var(--r-md);
  margin-bottom: 16px;
}
.next-step h4 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--good);
  letter-spacing: 0.02em;
}
.next-step ul {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 8px;
}
.next-step li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.next-step li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--good);
}

.result-disclaimer {
  margin: 0;
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  font-size: 13px;
  color: var(--ink-3);
}
.result-disclaimer strong { color: var(--blood); }

/* ===== Info sections ===== */
.info-section {
  padding: 64px var(--pad);
  background: var(--bg);
}
.info-section.safety {
  background: linear-gradient(180deg, var(--bg) 0%, #F0E8D7 100%);
}
.info-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.phase-list {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: grid; gap: 14px;
}
@media (min-width: 720px) {
  .phase-list { grid-template-columns: repeat(3, 1fr); }
}
.phase-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px;
}
.phase-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--terra);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.phase-list h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}
.phase-list p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

.safety-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 16px;
  display: grid;
  gap: 10px;
}
.safety-list li {
  position: relative;
  padding: 14px 16px 14px 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14.5px;
  color: var(--ink-2);
}
.safety-list li::before {
  content: "!";
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--terra-soft);
  color: var(--terra);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
}
.safety-list strong { color: var(--ink); }

.safety-foot {
  font-size: 14px; color: var(--ink-3); margin: 16px 0 0;
}

/* ===== ONE BLOOD band ===== */
.oneblood-band {
  padding: 72px var(--pad);
  background: #1F1A14;
  color: #F1E8D5;
}
.oneblood-band h2 { color: #fff; }
.oneblood-band p {
  max-width: 56ch;
  color: rgba(241,232,213,.86);
  font-size: 15.5px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px var(--pad) 56px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid; gap: 14px;
}
.footer-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--blood);
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 13px;
  color: var(--ink);
}
.footer-brand svg { color: var(--blood); }
.footer-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-3);
  max-width: 64ch;
}
.footer-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
}

/* Reveal animation for result */
.result.is-visible {
  animation: fadeInUp .55s var(--ease);
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===================================================================
 * 03 「次の一歩」 — 非判断的・選択肢カード型デザイン
 * 警告色や数値で責めない。選びやすさ・自己効力感を視覚化。
 * =================================================================== */

/* Hero pillar (03) — soft accented row */
.hero-pillars li.pillar-soft {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 14px 14px 14px;
  background: linear-gradient(180deg, rgba(92,122,78,.08) 0%, rgba(92,122,78,.02) 100%);
  border: 1px solid rgba(92,122,78,.18);
  border-top: 1px solid rgba(92,122,78,.18);
  border-radius: 14px;
}
.hero-pillars li.pillar-soft .pillar-num {
  color: var(--green);
  background: rgba(92,122,78,.14);
  padding: 4px 8px;
  border-radius: 6px;
  align-self: center;
}
.hero-pillars li.pillar-soft .pillar-text {
  display: flex; flex-direction: column; gap: 4px;
}
.hero-pillars li.pillar-soft .pillar-text strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.hero-pillars li.pillar-soft .pillar-text small {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.55;
}

/* Result panel: gentle, non-judgmental "next step" card */
.next-step-v2 {
  position: relative;
  padding: 22px 22px 18px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(92,122,78,.10) 0%, transparent 55%),
    radial-gradient(120% 80% at 100% 100%, rgba(181,102,63,.08) 0%, transparent 55%),
    var(--surface);
  border: 1px solid rgba(92,122,78,.22);
  border-radius: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-1);
}

.ns-header { margin-bottom: 16px; }
.ns-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--good);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(92,122,78,.12);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.ns-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  line-height: 1.4;
  letter-spacing: 0.01em;
  display: flex; flex-direction: column; gap: 6px;
}
.ns-title small {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.65;
}

/* Tabs */
.ns-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  background: rgba(31,26,20,.04);
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
}
.ns-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-3);
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.ns-tab:hover { color: var(--ink-2); }
.ns-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(31,26,20,.06);
}

/* Roadmap-like soft connector */
.ns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.ns-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px solid rgba(92,122,78,.22);
  border-radius: 14px;
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.ns-card:hover {
  transform: translateY(-1px);
  border-color: rgba(92,122,78,.45);
  background: #FFFEF8;
}
.ns-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: rgba(92,122,78,.12);
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
}
.ns-card[data-tone="activity"] .ns-icon { background: rgba(71,201,198,.14); }
.ns-card[data-tone="care"] .ns-icon { background: rgba(181,102,63,.14); }
.ns-card[data-tone="rest"] .ns-icon { background: rgba(31,26,20,.06); }
.ns-body { display: flex; flex-direction: column; gap: 4px; }
.ns-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.ns-card-meta {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.ns-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  padding: 2px 8px;
  background: rgba(31,26,20,.04);
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.ns-card-note {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.55;
}

/* "Today is rest" card — extra-soft variant */
.ns-card.is-rest {
  background: linear-gradient(180deg, rgba(31,26,20,.04), rgba(31,26,20,.01));
  border-style: dashed;
}

.ns-empty {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink-3);
  background: var(--bg-alt);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
}

.ns-foot {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
  text-align: left;
}

/* Mobile — single-column friendly */
@media (max-width: 640px) {
  .next-step-v2 { padding: 18px 16px 16px; }
  .ns-grid { grid-template-columns: 1fr; }
  .ns-tabs { width: 100%; }
  .ns-tab { flex: 1; text-align: center; }
}
/* ===== PET menu fix: mobile dropdown stability ===== */
.pet-menu {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.pet-menu__panel[hidden] {
  display: none !important;
}

@media (max-width: 759px) {
  .site-header {
    align-items: center;
  }

  .header-nav {
    display: none !important;
  }

  .pet-menu {
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .pet-menu__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    display: grid;
    gap: 2px;
  }

  .pet-menu__panel[hidden] {
    display: none !important;
  }

  .pet-menu__panel a {
    display: flex;
    width: 100%;
  }
}