
:root {
  --bg: #f4f1eb;
  --surface: #ffffff;
  --surface-soft: #fbf9f5;
  --ink: #1a1f25;
  --muted: #5a6772;
  --line: #d8d2c7;
  --brand: #244f6b;
  --brand-2: #d9772f;
  --accent: #f0ece4;
  --warn: #fff6ec;
  --radius: 16px;
  --shadow: 0 14px 34px rgba(28, 28, 28, 0.09);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Source Sans 3", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(to right, rgba(42, 55, 69, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(42, 55, 69, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 15% 0%, #fff8ee 0%, transparent 36%),
    radial-gradient(circle at 85% 0%, #e8f1f8 0%, transparent 38%),
    var(--bg);
  background-size: 22px 22px, 22px 22px, auto, auto, auto;
  line-height: 1.55;
}
a { color: #1c4f72; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1100px, 92vw); margin: 0 auto; }
.tiny { font-size: 0.84rem; color: var(--muted); }
.muted-copy { color: var(--muted); margin: 0.3rem 0 0.8rem; }
.site-header {
  position: sticky; top: 0; z-index: 30; backdrop-filter: blur(8px);
  background: rgba(244, 241, 235, 0.92); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; }
.brand {
  font-family: "Fraunces", serif;
  font-size: 1.32rem;
  font-weight: 800;
  color: #111;
  letter-spacing: 0.01em;
}
nav { display: flex; gap: 1rem; flex-wrap: wrap; }
nav a {
  color: #2c3f4c;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.25rem;
}
.hero { padding: 2.9rem 0 1.9rem; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1rem; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.9rem, 3.4vw, 3.1rem);
  line-height: 1.08;
  font-family: "Fraunces", serif;
  letter-spacing: -0.01em;
  max-width: 18ch;
}
.kicker {
  display: inline-block;
  font-size: 0.8rem;
  border-radius: 999px;
  background: #e7edf3;
  color: #244f6b;
  border: 1px solid #c8d3de;
  padding: 0.25rem 0.62rem;
  margin-bottom: 0.8rem;
  font-weight: 700;
}
.hero-note {
  margin-top: 0.7rem;
  padding: 0.55rem 0.7rem;
  background: #fdf5ea;
  border: 1px solid #e9d2b4;
  border-radius: 10px;
  color: #6a4d33;
}
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(24, 29, 35, 0.12);
  border-color: #b9c6d2;
}
h2 { margin: 0 0 0.6rem; font-size: clamp(1.2rem, 2vw, 1.7rem); font-family: "Fraunces", serif; }
h3 { margin: 0 0 0.4rem; font-size: 1.03rem; }
section { padding: 1.1rem 0 1.2rem; }
.breadcrumbs {
  margin: 1rem auto 0;
  width: min(1100px, 92vw);
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.breadcrumbs a {
  color: #395669;
  font-weight: 600;
  text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { color: #8b98a3; }
.breadcrumbs [aria-current="page"] { color: #243645; font-weight: 700; }
.calc-shell { width: min(1100px, 92vw); margin: 1rem auto 2.2rem; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 1rem; align-items: start; }
.input-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.65rem; }
.field { display: block; margin-bottom: 0.15rem; font-size: 0.92rem; font-weight: 700; color: #223441; }
.field span { display: block; margin-bottom: 0.24rem; }
.unit-switch {
  display: inline-flex;
  gap: 0.35rem;
  border: 1px solid #c6cfda;
  background: #eef2f6;
  border-radius: 999px;
  padding: 0.2rem;
  margin-bottom: 0.65rem;
}
.unit-btn {
  border: none;
  min-height: 40px;
  padding: 0 0.8rem;
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  color: #344a59;
  background: transparent;
  cursor: pointer;
}
.unit-btn.is-active {
  background: #234a64;
  color: #fff;
}
.unit-btn:focus-visible {
  outline: 3px solid #f4a66f;
  outline-offset: 1px;
}
.calc-form input {
  margin-top: 0.04rem;
  width: 100%;
  border: 1px solid #b8c5cf;
  border-radius: 9px;
  min-height: 44px;
  padding: 0.6rem 0.62rem;
  font: inherit;
  background: #fdfdfc;
}
.calc-form input:focus-visible {
  outline: 3px solid #e48645;
  outline-offset: 1px;
  border-color: #7f9cb2;
}
.submit-wrap { margin-top: 0.9rem; }
button[type="submit"] {
  margin-top: 0;
  min-height: 44px;
  background: linear-gradient(120deg, #244f6b, #1d3d52);
  color: white;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  padding: 0.7rem 1rem;
  cursor: pointer;
}
button[type="submit"]:hover { filter: brightness(1.04); }
button[type="submit"]:focus-visible { outline: 3px solid #f4a66f; outline-offset: 2px; }
.calc-side { position: sticky; top: 78px; }
.result { background: linear-gradient(140deg, #f0f6fb, #fff8f0); border: 1px solid #c4d3df; border-radius: 14px; padding: 0.95rem; }
.result .value { font-size: 1.8rem; font-weight: 700; margin: 0.45rem 0; }
.ad-slot { border: 1px dashed #d9b28a; border-radius: 10px; background: var(--warn); color: #7a573a; padding: 0.8rem; font-size: 0.9rem; }
.affiliate-meta { margin-left: 0.4rem; color: #687887; white-space: nowrap; }
.tool-grid {
  display: grid;
  gap: 0.62rem;
}
.tool-card {
  border: 1px solid #ccd4db;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
}
.tool-link {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 0.68rem;
  align-items: center;
  min-height: 84px;
  padding: 0.45rem;
}
.tool-thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #cad2da;
  background: #e6eaef;
}
.tool-copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 0.65rem; background: #fff; margin-bottom: 0.5rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.site-footer { margin-top: 2.1rem; border-top: 1px solid var(--line); background: #ece9e1; padding: 1.2rem 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 1rem; margin-bottom: 0.5rem; }
ul { margin: 0.5rem 0; padding-left: 1.2rem; }
a:focus-visible {
  outline: 3px solid #e48645;
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 920px) {
  .hero-grid, .calc-shell, .footer-grid, .grid, .input-grid { grid-template-columns: 1fr; }
  .calc-side { position: static; }
}
@media (max-width: 700px) {
  .wrap { width: min(100%, 94vw); }
  .site-header { position: sticky; top: 0; }
  .header-inner {
    display: block;
    padding: 0.62rem 0 0.52rem;
  }
  .brand {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 1.18rem;
  }
  nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.42rem;
    padding-bottom: 0.12rem;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar { display: none; }
  nav a {
    min-height: 38px;
    border: 1px solid #cfd6dd;
    border-radius: 999px;
    background: #ffffff;
    padding: 0 0.68rem;
    font-size: 0.92rem;
    flex: 0 0 auto;
  }
  .hero {
    padding: 1.25rem 0 1rem;
  }
  .hero h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
    max-width: 100%;
  }
  .panel,
  .card {
    padding: 0.82rem;
    border-radius: 14px;
  }
  .breadcrumbs {
    margin-top: 0.72rem;
    font-size: 0.84rem;
  }
  .calc-shell {
    margin-top: 0.72rem;
    gap: 0.7rem;
  }
  .unit-switch {
    width: 100%;
    justify-content: stretch;
  }
  .unit-btn {
    flex: 1 1 0;
    min-height: 42px;
  }
  .submit-wrap {
    position: sticky;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 0.35rem);
    padding-top: 0.35rem;
    background: linear-gradient(to top, rgba(244, 241, 235, 0.95), rgba(244, 241, 235, 0.75) 60%, transparent);
    z-index: 12;
  }
  .calc-form input {
    min-height: 46px;
  }
  button[type="submit"] {
    width: 100%;
    min-height: 46px;
  }
  .result .value {
    font-size: 1.58rem;
  }
  .tool-link {
    grid-template-columns: 72px 1fr;
    min-height: 72px;
    padding: 0.4rem;
  }
  .tool-thumb {
    width: 72px;
    height: 72px;
  }
}
