:root {
  --paper: #fbf8f1;
  --paper-strong: #f4efe5;
  --ink: #2b2522;
  --muted: #726a65;
  --line: #d8d0c5;
  --green: #3f9970;
  --green-dark: #267451;
  --green-soft: #e9f4ee;
  --pink: #fcabb6;
  --pink-soft: #fff0f2;
  --yellow: #fcdc4a;
  --white: #ffffff;
  --shadow: 0 14px 34px rgba(43, 37, 34, 0.08);
  --radius: 18px;
  --content: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
  letter-spacing: 0.01em;
}
img { display: block; max-width: 100%; }
a { color: var(--green-dark); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-140%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 241, 0.94);
  border-bottom: 1px solid rgba(216, 208, 197, 0.82);
  backdrop-filter: blur(10px);
}
.header-inner {
  width: min(calc(100% - 32px), var(--content));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  padding: 4px;
  object-fit: contain;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list a {
  display: block;
  padding: 10px 12px;
  color: var(--ink);
  border-radius: 999px;
  font-size: 0.92rem;
  text-decoration: none;
}
.nav-list a:hover,
.nav-list a[aria-current="page"] { background: var(--green-soft); }
.nav-toggle { display: none; }

main { overflow: hidden; }
.container { width: min(calc(100% - 32px), var(--content)); margin-inline: auto; }
.narrow { width: min(calc(100% - 32px), 820px); margin-inline: auto; }
.section { padding: 76px 0; }
.section-compact { padding: 48px 0; }
.section-title {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.35;
  letter-spacing: 0.035em;
}
.section-lead { margin: 0 0 30px; color: var(--muted); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--green-dark);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--yellow); border-radius: 99px; }

.hero { padding: 72px 0 50px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, 0.65fr);
  align-items: center;
  gap: 56px;
}
.hero h1 {
  margin: 0;
  max-width: 790px;
  font-size: clamp(2.15rem, 5.2vw, 4.25rem);
  line-height: 1.2;
  letter-spacing: 0.025em;
}
.hero h1 .marker {
  background: linear-gradient(transparent 67%, rgba(252, 220, 74, 0.75) 67%);
}
.hero-copy { max-width: 720px; margin: 24px 0 0; color: var(--muted); font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin: 18px 0 0; color: var(--muted); font-size: 0.88rem; }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 330px; }
.hero-visual::before {
  content: "";
  position: absolute;
  width: min(300px, 92%);
  aspect-ratio: 1;
  background: var(--pink-soft);
  border: 2px solid var(--ink);
  border-radius: 47% 53% 52% 48% / 45% 43% 57% 55%;
  transform: rotate(-4deg);
}
.hero-cat { position: relative; z-index: 1; width: min(215px, 72%); filter: drop-shadow(0 14px 12px rgba(43,37,34,.12)); }
.hero-badge {
  position: absolute;
  right: 0;
  bottom: 18px;
  z-index: 2;
  padding: 8px 13px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
  transform: rotate(3deg);
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  color: var(--white);
  background: var(--green-dark);
  border: 2px solid var(--green-dark);
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 5px 0 #174e37;
  transition: transform .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(1px); box-shadow: 0 3px 0 #174e37; text-decoration: none; }
.button:active { transform: translateY(4px); box-shadow: 0 0 0 #174e37; }
.button-secondary { color: var(--ink); background: var(--white); border-color: var(--ink); box-shadow: 0 5px 0 var(--ink); }
.button-small { min-height: 42px; padding: 8px 14px; font-size: .92rem; }
.button-amazon { color: var(--ink); background: var(--yellow); border-color: var(--ink); box-shadow: 0 5px 0 var(--ink); }
.button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }

.tool-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: 24px;
  padding: 24px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.tool-shell::before {
  content: "";
  position: absolute;
  inset: 12px -10px -10px 12px;
  z-index: -1;
  background: var(--green-soft);
  border-radius: 24px;
}
.form-panel, .result-panel { min-width: 0; }
.panel-title { margin: 0 0 18px; font-size: 1.24rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label, .field legend { display: block; margin: 0 0 6px; font-weight: 800; font-size: .92rem; }
.input-wrap { position: relative; display: flex; align-items: stretch; }
.input-wrap input, .input-wrap select, .field > input, .field > select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fffdf9;
  border: 1.5px solid #a99f96;
  border-radius: 10px;
  outline: none;
}
.input-wrap input { padding-right: 58px; }
.input-wrap input:focus, .input-wrap select:focus, .field > input:focus, .field > select:focus {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(63,153,112,.16);
}
.unit {
  position: absolute;
  right: 12px;
  top: 50%;
  color: var(--muted);
  font-size: .84rem;
  transform: translateY(-50%);
  pointer-events: none;
}
.help { margin: 6px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.preset-button {
  padding: 7px 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: .82rem;
}
.preset-button:hover { border-color: var(--green-dark); }

.result-panel {
  padding: 22px;
  background: var(--paper);
  border-radius: 16px;
  border: 1px solid var(--line);
}
.result-lead { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }
.result-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.result-main strong { font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1; color: var(--green-dark); }
.result-main span { font-weight: 800; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.result-card { padding: 13px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.result-card dt { color: var(--muted); font-size: .78rem; }
.result-card dd { margin: 4px 0 0; font-size: 1.15rem; font-weight: 800; }
.result-note { margin: 16px 0 0; color: var(--muted); font-size: .8rem; }
.result-figure { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: 20px; }
.result-figure img { width: 108px; }
.result-figure p { margin: 0; font-size: .82rem; color: var(--muted); }
.empty-state { display: grid; place-items: center; min-height: 340px; text-align: center; color: var(--muted); }
.empty-state img { width: 132px; margin: 0 auto 14px; }

.notice {
  padding: 16px 18px;
  background: var(--pink-soft);
  border-left: 5px solid var(--pink);
  border-radius: 10px;
}
.notice p { margin: 0; }
.dev-notice { display: none; margin-top: 14px; }
.dev-notice.is-visible { display: block; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.feature-number { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 16px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; font-weight: 900; }
.feature h3 { margin: 0 0 8px; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }

.split-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr);
  align-items: center;
  gap: 42px;
  padding: 36px;
  background: var(--green-soft);
  border: 2px solid var(--ink);
  border-radius: 24px;
}
.split-card img { width: min(260px, 100%); justify-self: center; }
.split-card h2 { margin: 0 0 10px; font-size: clamp(1.55rem, 3vw, 2.15rem); }
.split-card p { margin: 0 0 22px; color: var(--muted); }

.amazon-box {
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.amazon-box-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.amazon-box-head img { width: 112px; }
.amazon-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.amazon-links .button { width: 100%; }
.affiliate-note { margin: 16px 0 0; color: var(--muted); font-size: .78rem; }

.article-header { padding: 62px 0 30px; }
.breadcrumb { margin: 0 0 18px; color: var(--muted); font-size: .82rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 8px; color: #b1a79e; }
.article-header h1 { margin: 0; max-width: 850px; font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.3; }
.article-lead { max-width: 760px; margin: 18px 0 0; color: var(--muted); font-size: 1.05rem; }
.article-body { padding: 20px 0 70px; }
.article-body h2 { margin: 52px 0 14px; padding-left: 14px; border-left: 5px solid var(--yellow); font-size: 1.65rem; line-height: 1.4; }
.article-body h3 { margin: 34px 0 10px; font-size: 1.2rem; }
.article-body p, .article-body li { color: #4d4642; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body table { width: 100%; border-collapse: collapse; background: var(--white); }
.article-body th, .article-body td { padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-body th { background: var(--paper-strong); }
.inline-figure { float: right; width: 180px; margin: 0 0 20px 30px; }
.clearfix::after { content: ""; display: table; clear: both; }
.callout { margin: 28px 0; padding: 22px; background: var(--green-soft); border-radius: 14px; }
.callout h3 { margin-top: 0; }

.compare-shell { padding: 28px; background: var(--white); border: 2px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); }
.compare-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.product-panel { padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.product-panel h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 1.2rem; }
.product-tag { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); font-size: .86rem; }
.compare-result { margin-top: 18px; padding: 22px; background: var(--green-soft); border-radius: 16px; }
.compare-result h2 { margin: 0 0 10px; font-size: 1.25rem; }
.winner { font-size: 1.6rem; font-weight: 900; color: var(--green-dark); }
.compare-table { width: 100%; margin-top: 14px; border-collapse: collapse; background: var(--white); }
.compare-table th, .compare-table td { padding: 11px; border: 1px solid var(--line); text-align: right; }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; }

.faq { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { position: relative; padding: 18px 42px 18px 0; font-weight: 800; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 8px; top: 50%; font-size: 1.4rem; transform: translateY(-50%); }
details[open] summary::after { content: "−"; }
details p { margin: 0 0 20px; color: var(--muted); }

.site-footer { padding: 42px 0 24px; background: var(--ink); color: #eee8e2; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; }
.footer-title { margin: 0 0 8px; font-weight: 900; }
.footer-text { margin: 0; max-width: 600px; color: #c9c0b8; font-size: .85rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: start; gap: 10px 18px; }
.footer-links a { color: #eee8e2; font-size: .85rem; }
.footer-affiliate-note { max-width: 760px; margin: 22px 0 0; color: #c7bfb9; font-size: .72rem; line-height: 1.7; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid #4b4440; color: #aaa19b; font-size: .78rem; }

@media (max-width: 900px) {
  .hero-grid, .tool-shell, .split-card { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 240px; }
  .hero-visual::before { width: 220px; }
  .hero-cat { width: 150px; }
  .hero-badge { right: 16%; }
  .feature-grid, .amazon-links { grid-template-columns: 1fr 1fr; }
  .inline-figure { width: 145px; }
}


/* 日付入力は親幅を超えないようにする */
.date-helper,
.date-helper-grid,
.date-helper-grid > .field {
  min-width: 0;
  max-width: 100%;
}
.date-helper input[type="date"] {
  display: block;
  inline-size: 100%;
  width: 100%;
  min-inline-size: 0;
  min-width: 0;
  max-inline-size: 100%;
  max-width: 100%;
}

@media (max-width: 720px) {
  .site-header {
    position: relative;
    z-index: 200;
    overflow: visible;
  }
  .header-inner {
    position: relative;
    min-height: 62px;
  }
  .nav-toggle {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .nav-list { display: block; }
  .nav-list a { padding: 12px; }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .section { padding: 56px 0; }
  .tool-shell { padding: 15px; }
  .compare-top, .feature-grid, .amazon-links, .footer-grid { grid-template-columns: 1fr; }
  .result-panel { padding: 18px; }
  .split-card { padding: 25px; }
  .amazon-box { padding: 22px; }
  .amazon-box-head { align-items: flex-start; }
  .amazon-box-head img { width: 86px; }
  .footer-links { justify-content: flex-start; }
  .inline-figure { float: none; width: 135px; margin: 0 auto 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Amazon product rail */
body.has-product-rail { padding-bottom: 158px; }
.product-rail {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 12px;
  z-index: 80;
  width: min(calc(100% - 32px), 1180px);
  margin: 0 auto;
  padding: 10px 12px 8px;
  background: rgba(255, 253, 249, .97);
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(43, 37, 34, .18);
  backdrop-filter: blur(12px);
}
.product-rail[hidden], .product-rail-launcher[hidden] { display: none !important; }
.product-rail__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 7px;
}
.product-rail__title-wrap { display: flex; align-items: center; min-width: 0; gap: 9px; }
.product-rail__cat { width: 34px; height: 34px; object-fit: contain; }
.product-rail__title-line { display: flex; align-items: center; gap: 7px; line-height: 1.25; }
.product-rail__title-line strong { font-size: .9rem; }
.product-rail__ad {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 6px;
  color: var(--muted);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 800;
}
.product-rail__sub { display: block; margin-top: 1px; color: var(--muted); font-size: .69rem; line-height: 1.3; }
.product-rail__controls { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.product-rail__arrow,
.product-rail__collapse {
  display: inline-grid;
  min-width: 30px;
  min-height: 30px;
  place-items: center;
  padding: 3px 8px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9px;
  line-height: 1;
}
.product-rail__arrow { font-size: 1.35rem; }
.product-rail__collapse { font-size: .72rem; font-weight: 700; }
.product-rail__arrow:hover,
.product-rail__collapse:hover { border-color: var(--green-dark); background: var(--green-soft); }
.product-rail__viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #bdb3aa transparent;
  scroll-snap-type: x proximity;
  border-radius: 12px;
}
.product-rail__viewport:focus-visible { outline: 3px solid rgba(63, 153, 112, .24); outline-offset: 2px; }
.product-rail__viewport::-webkit-scrollbar { height: 5px; }
.product-rail__viewport::-webkit-scrollbar-thumb { background: #bdb3aa; border-radius: 999px; }
.product-rail__track { display: flex; gap: 9px; width: max-content; padding: 1px 1px 4px; }
.product-rail__card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 236px;
  min-height: 70px;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  scroll-snap-align: start;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.product-rail__card:hover {
  border-color: var(--green-dark);
  box-shadow: 0 8px 18px rgba(43, 37, 34, .09);
  transform: translateY(-1px);
  text-decoration: none;
}
.product-rail__badge {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  border-radius: 11px;
  font-size: .8rem;
  font-weight: 900;
}
.product-rail__card[data-accent="2"] .product-rail__badge { background: var(--green-soft); }
.product-rail__card[data-accent="3"] .product-rail__badge { background: var(--pink-soft); }
.product-rail__card[data-accent="4"] .product-rail__badge { background: #eef2ff; }
.product-rail__copy { display: block; min-width: 0; line-height: 1.25; }
.product-rail__copy strong {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-rail__label { display: block; color: var(--green-dark); font-size: .62rem; font-weight: 800; }
.product-rail__detail {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: .65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-rail__go { color: var(--green-dark); font-size: .68rem; font-weight: 900; white-space: nowrap; }
.product-rail__go span { margin-left: 2px; }
.product-rail-launcher {
  position: fixed;
  right: 18px;
  bottom: 16px;
  z-index: 80;
  min-height: 42px;
  padding: 8px 13px;
  color: var(--ink);
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(43, 37, 34, .18);
  font-size: .78rem;
  font-weight: 800;
}
.product-rail-launcher:hover { transform: translateY(-1px); }

@media (max-width: 720px) {
  body.has-product-rail { padding-bottom: 146px; }
  .product-rail {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: calc(100% - 16px);
    padding: 8px 9px 6px;
    border-radius: 15px;
  }
  .product-rail__cat { width: 28px; height: 28px; }
  .product-rail__title-line strong { font-size: .8rem; }
  .product-rail__sub { display: none; }
  .product-rail__arrow { display: none; }
  .product-rail__collapse { min-height: 28px; padding: 3px 7px; }
  .product-rail__card { width: 205px; min-height: 66px; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 7px; padding: 8px; }
  .product-rail__badge { width: 34px; height: 34px; border-radius: 10px; }
  .product-rail__copy strong { font-size: .76rem; }
  .product-rail__detail { font-size: .61rem; }
  .product-rail__go { font-size: .63rem; }
}
.product-rail-launcher img { width: 24px; height: 24px; object-fit: contain; }

/* v0.2.0: actual-use calculator and recommendation cards */
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading .panel-title { margin: 7px 0 0; }
.accuracy-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid rgba(33, 99, 70, .22);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .02em;
}
.accuracy-chip-result { margin-bottom: 5px; }
.date-helper {
  padding: 13px 14px;
  background: #fffdf9;
  border: 1px dashed #b8ada4;
  border-radius: 12px;
}
.date-helper summary { padding: 0 32px 0 0; font-size: .88rem; }
.date-helper summary::after { right: 2px; }
.date-helper-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.date-helper .field > input { background: var(--white); }
.text-button {
  margin-top: 12px;
  padding: 7px 11px;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid rgba(33, 99, 70, .3);
  border-radius: 9px;
  font-size: .82rem;
  font-weight: 800;
}
.text-button:hover { border-color: var(--green-dark); }
.help.is-error { color: #a83939; font-weight: 700; }
.stock-field { max-width: calc(50% - 8px); }
.result-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.result-heading-row .result-lead { margin-bottom: 0; }
.result-type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  text-align: right;
}
.result-main-yen { margin-top: 10px; }
.result-main-yen strong { font-size: clamp(2.5rem, 6vw, 4.2rem); }
.saving-guide {
  margin-top: 22px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.saving-guide-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.saving-guide-head h3 { margin: 0; font-size: 1.15rem; }
.saving-guide-head .eyebrow { margin-bottom: 4px; font-size: .65rem; }
.saving-unit {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--green-dark);
  background: var(--green-soft);
  border-radius: 9px;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}
.saving-intro { margin: 10px 0 14px; color: var(--muted); font-size: .82rem; line-height: 1.65; }
.affiliate-disclosure {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 3px 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 800;
  line-height: 1.4;
}
.recommendation-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.recommendation-card {
  position: relative;
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.recommendation-badge {
  display: inline-flex;
  margin-bottom: 7px;
  padding: 3px 7px;
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid rgba(47, 42, 39, .25);
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 900;
}
.recommendation-card:nth-child(2) .recommendation-badge { background: var(--green-soft); }
.recommendation-card:nth-child(3) .recommendation-badge { background: var(--pink-soft); }
.recommendation-card h4 { margin: 0; font-size: 1rem; line-height: 1.45; }
.recommendation-line { margin: 4px 0 0; color: var(--green-dark); font-size: .76rem; font-weight: 800; }
.recommendation-copy { margin: 8px 0 12px; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.recommendation-button { width: 100%; min-height: 40px; padding: 8px 12px; font-size: .78rem; box-shadow: 0 3px 0 var(--ink); }
.recommendation-note { margin: 12px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.6; }
.result-figure { align-items: center; }
.result-figure img { flex: 0 0 auto; margin-left: auto; margin-right: auto; }

@media (min-width: 1160px) {
  .tool-shell { grid-template-columns: minmax(0, .92fr) minmax(410px, 1.08fr); }
}

@media (max-width: 720px) {
  /* v0.2.4: スマホでは主要入力と結果を2列にして縦幅を抑える */
  .form-grid, .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid { gap: 14px 10px; }
  .form-grid .field label, .form-grid .field legend {
    margin-bottom: 5px;
    font-size: .82rem;
    line-height: 1.35;
  }
  .form-grid .help {
    margin-top: 5px;
    font-size: .71rem;
    line-height: 1.45;
  }
  .form-grid .input-wrap input,
  .form-grid .input-wrap select,
  .form-grid .field > input,
  .form-grid .field > select {
    min-height: 44px;
    padding: 8px 9px;
    font-size: .88rem;
  }
  .form-grid .input-wrap input { padding-right: 46px; }
  .form-grid .unit { right: 9px; font-size: .75rem; }
  .form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
  }
  .form-actions .button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 9px 7px;
    font-size: .9rem;
  }
  .result-grid { gap: 8px; }
  .result-card { padding: 10px; }
  .result-card dt { font-size: .7rem; line-height: 1.35; }
  .result-card dd {
    margin-top: 3px;
    font-size: 1rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .result-main { margin-bottom: 14px; padding-bottom: 14px; }
  .result-note { margin-top: 12px; }
  .date-helper-grid { grid-template-columns: 1fr; gap: 10px; }
  .date-helper-grid > .field { overflow: hidden; }
  .date-helper input[type="date"] {
    inline-size: 13rem;
    width: 13rem;
    max-inline-size: calc(100% - 8px);
    max-width: calc(100% - 8px);
    min-height: 42px;
    padding: 7px 8px;
    font-size: 16px;
  }
  .stock-field { max-width: none; }
  .result-heading-row, .saving-guide-head { display: block; }
  .result-type, .saving-unit { margin-top: 8px; }
  .saving-guide { padding: 15px; }
  .result-figure { display: block; text-align: center; }
  .result-figure p { text-align: left; }
  .result-figure img { display: block; margin: 16px auto 0; }
}

.empty-state[hidden], [data-result-content][hidden] { display: none !important; }

