:root {
  --bg: #f4f1ea;
  --bg-elev: #fffcf7;
  --ink: #1c1915;
  --muted: #5e584e;
  --line: #e3dacb;
  --header: #14242c;
  --header-ink: #f6f1e6;
  --accent: #1f4d45;
  --copper: #9a4e24;
  --copper-bright: #c9843d;
  --chip: #efe6d6;
  --footer: #ebe6dc;
  --measure: 40rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.85;
  line-break: strict;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
.brand-name,
.footer-brand {
  font-family: "Iowan Old Style", "Palatino Linotype", "Yu Mincho", "Hiragino Mincho ProN", "YuMincho", serif;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

h1 {
  margin: 0.2rem 0 0.8rem;
  font-size: clamp(1.7rem, 1.15rem + 2.1vw, 2.65rem);
  max-width: 18em;
}

h2 {
  margin: 2.3rem 0 0.55rem;
  font-size: clamp(1.32rem, 1.12rem + 0.8vw, 1.7rem);
  max-width: 22em;
}

h3 {
  margin: 1.45rem 0 0.35rem;
  font-size: 1.15rem;
}

p,
li {
  max-width: var(--measure);
}

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

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--copper-bright);
  outline-offset: 2px;
}

::selection {
  background: #ead7bf;
}

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--chip);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

blockquote {
  margin: 1.1rem 0;
  padding: 0.85rem 1rem;
  max-width: var(--measure);
  background: var(--bg-elev);
  border-left: 3px solid var(--copper-bright);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 5;
  background: #fff;
  color: var(--ink);
  padding: 0.45rem 0.75rem;
}

.skip-link:focus {
  top: 0.75rem;
}

.site-header {
  background: var(--header);
  color: var(--header-ink);
  border-top: 4px solid var(--copper-bright);
}

.header-inner {
  width: min(72rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0.85rem 0 0.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  flex: 1 1 12rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
}

.brand-name {
  display: block;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.brand-sub {
  display: block;
  max-width: 22rem;
  font-size: 0.72rem;
  line-height: 1.45;
  opacity: 0.8;
}

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle-label {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(246, 241, 230, 0.4);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.15rem;
  width: 100%;
  padding-bottom: 0.7rem;
}

.site-nav a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.55rem;
  border-radius: 0.4rem;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 #e2b15a;
}

.site-main {
  flex: 1;
  width: min(72rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.6rem 0 3.5rem;
}

.hero {
  padding: 0.4rem 0 0.5rem;
}

.eyebrow {
  margin: 0;
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.lede {
  font-size: 1.08rem;
  max-width: var(--measure);
}

.cta-row,
.card-grid,
.tag-row,
.subnav,
.table-scroll,
.coax,
.steps,
.legend,
.footer-links {
  max-width: none;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.2rem 0 0.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--header-ink);
  text-decoration: none;
  border: 1px solid var(--accent);
}

.button-secondary {
  background: transparent;
  color: var(--accent);
}

.button-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.band {
  margin-top: 2.4rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem 1.1rem;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card p,
.card li,
.hero p,
figcaption p,
.footer-inner p {
  max-width: none;
}

.card p:last-child,
.site-footer p:last-child {
  margin-bottom: 0;
}

.card a.more {
  font-weight: 700;
}

.subnav,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.3rem 0 1.2rem;
}

.subnav a,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink);
}

.subnav a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--header-ink);
}

.term-en {
  margin: -0.15rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.coax {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.9rem 1.1rem;
  align-items: center;
  margin: 1rem 0 1.3rem;
  max-width: 42rem;
}

.coax svg {
  width: 100%;
  height: auto;
  display: block;
}

.assembly {
  margin: 1rem 0 1.3rem;
  max-width: var(--measure);
}

.assembly svg {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0.7rem;
}

.legend {
  list-style: none;
  padding: 0;
  margin: 0 0 0.4rem;
}

.legend li {
  display: flex;
  align-items: center;
  margin: 0.15rem 0;
  max-width: none;
}

.swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  margin-right: 0.45rem;
  flex: 0 0 auto;
}

.swatch-jacket { background: #1f4d45; }
.swatch-shield { background: #c9843d; }
.swatch-dielectric { background: #f7f4ee; border: 1px solid #cfc6b8; }
.swatch-center { background: #e2b15a; }

.steps {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  counter-reset: step;
  max-width: var(--measure);
}

.steps li {
  position: relative;
  counter-increment: step;
  padding: 0.75rem 0 0.85rem 3rem;
  border-top: 1px solid var(--line);
  max-width: none;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--header-ink);
  font-size: 0.85rem;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  margin: 1rem 0 1.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
}

.table-scroll table,
.site-main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.6;
}

.table-scroll table {
  min-width: 36rem;
  margin: 0;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

th {
  background: #f3ecdf;
  font-weight: 700;
}

.page-list {
  padding-left: 1.15rem;
}

.page-list li {
  margin: 0.2rem 0;
}

.placeholder {
  max-width: var(--measure);
  background: var(--bg-elev);
  border: 1px dashed var(--copper-bright);
  border-radius: 14px;
  padding: 1rem 1.05rem;
}

.placeholder p {
  max-width: none;
}

.form-frame {
  display: block;
  width: 100%;
  min-height: 36rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.site-footer {
  background: var(--footer);
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 1.8rem 0 2.6rem;
}

.footer-inner {
  width: min(72rem, calc(100% - 2.5rem));
  margin: 0 auto;
}

.footer-brand {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-size: 1.15rem;
}

.footer-meta {
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.figure-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.9rem;
  margin: 1rem 0 1.4rem;
}

.figure-card {
  margin: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.9rem 1rem;
}

.figure-card svg {
  width: min(100%, 13.5rem);
  height: auto;
  display: block;
  margin: 0 auto 0.6rem;
}

.figure-card p,
.figure-card figcaption {
  max-width: none;
  margin: 0;
  font-size: 0.95rem;
}

.talk {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0 1.6rem;
}

.say {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  max-width: 40rem;
}

.say .name {
  margin: 0;
  padding-top: 0.65rem;
  font-weight: 700;
  font-size: 0.95rem;
  max-width: none;
}

.say .bubble {
  margin: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.7rem 0.9rem;
  max-width: none;
}

.say-mina .bubble {
  background: #f3f7f4;
}

.say-ken .bubble {
  background: #fbf6ee;
}

.adult-box {
  margin-top: 1.6rem;
  padding: 0.95rem 1rem 1.05rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
}

.adult-box h2 {
  margin-top: 0;
}

.adult-box p,
.adult-box li {
  max-width: none;
}

@media (max-width: 959px) {
  .nav-toggle-label {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0.2rem 0 0.8rem;
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .site-nav a {
    border-bottom: 1px solid rgba(246, 241, 230, 0.12);
    border-radius: 0;
  }
}

@media (max-width: 560px) {
  .coax {
    grid-template-columns: 1fr;
  }

  .coax svg {
    width: min(100%, 11rem);
  }

  .brand-sub {
    font-size: 0.68rem;
  }
}

.calc {
  max-width: 40rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem 1.15rem;
  margin: 1rem 0 1.4rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.calc-field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.calc-field input,
.calc-field select {
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  padding: 0.45rem 0.65rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfc6b8;
  border-radius: 8px;
}

.calc-field input[aria-invalid="true"] {
  border-color: var(--copper);
  background: #fff8f3;
}

.calc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.2rem;
  gap: 0.5rem;
}

.calc-custom {
  margin-top: 0.9rem;
  padding-top: 0.2rem;
}

.calc-custom p {
  max-width: none;
}

.calc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.calc-actions button {
  font: inherit;
  cursor: pointer;
}

.calc-error {
  max-width: none;
  margin: 0.85rem 0 0;
  color: var(--copper);
  font-weight: 700;
}

.calc-summary {
  max-width: none;
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.85rem;
  background: var(--chip);
  border-radius: 10px;
}

.calc-summary:empty {
  display: none;
}

@media (max-width: 560px) {
  .calc-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
