/* 中古スマホ比べるくん — design tokens and components.
   White base, pale yellow for grouped information, dark warm text. Yellow is the only
   strong colour and is reserved for primary actions and the name/price block of a card. */
/* Self-hosted heading face (see public/fonts/LICENSE.txt). swap: text shows at once in the
   fallback and re-renders when the 137 KB file arrives. */
@font-face {
  font-family: "Sumaho Rounded";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/sumaho-rounded-800.woff2") format("woff2");
}
:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f5;      /* list ground: white cards separate from it by value */
  --sun-soft: #fff7bd;     /* limited helper background only */
  --sun: #ffe100;          /* opaque, never tinted or covered */
  --sun-deep: #f2d500;     /* hover: still vivid */
  --ink: #292929;
  --muted: #666666;
  --line: #dadada;
  --line-sun: #e6cf00;
  --green: #35734b;
  --green-soft: #e8f1ea;
  --alert: #b23a2a;
  --alert-soft: #fdecea;
  --focus: #2b6cb0;
  --sh-ink: 0, 0, 0;
  --sh-rest: 0 1px 2px rgba(var(--sh-ink), 0.05), 0 2px 6px rgba(var(--sh-ink), 0.05);
  --sh-raised: 0 1px 2px rgba(var(--sh-ink), 0.06), 0 6px 14px rgba(var(--sh-ink), 0.07);
  --sh-lift: 0 2px 4px rgba(var(--sh-ink), 0.06), 0 10px 20px rgba(var(--sh-ink), 0.1);
  --sh-float: 0 4px 8px rgba(var(--sh-ink), 0.08), 0 16px 32px rgba(var(--sh-ink), 0.14);
  --edge-sun: #d9bf00;
  --edge-paper: #d6d6d6;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --t: 200ms;
  --r-card: 16px;
  --r-field: 12px;
  --r-button: 12px;
  --font:
    -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  /* Display face: bold, rounded, a little playful. "Sumaho Rounded" is the self-hosted subset of
     M PLUS Rounded 1c (public/fonts, OFL); glyphs outside the subset fall through to the bold
     system gothic. Hiragino Maru is deliberately absent: it only ships in W4 and looks thin. */
  --font-display: "Sumaho Rounded", "M PLUS Rounded 1c", var(--font);
  --max: 1180px;
  --gutter: 28px;
  --g-line: #2a2a2a;
  --g-body: #ffffff;
  --g-screen: #ffffff;
  --g-screen-soft: #ffffff;
  --g-soft: #e4e4e4;
  --g-sun: #ffe100;
  --g-ground: transparent;
  --g-lens: #ffffff;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
html {
  overflow-x: clip;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: var(--tray-space, 0px);
}
a {
  color: var(--ink);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 800;
  margin: 0 0 10px;
}
h1 .phrase {
  display: inline-block;
  max-width: 100%;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.sr-only,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip:focus {
  display: block;
  padding: 8px 12px;
  background: var(--sun);
}
.sub {
  font-size: 13px;
  color: var(--muted);
}
.nowrap {
  white-space: nowrap;
}

/* ---------- controls ---------- */
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
.button {
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-button);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  /* 2px warm edge below = thickness; a faint drop = sits on the page */
  box-shadow:
    0 2px 0 var(--edge-paper),
    0 3px 6px rgba(var(--sh-ink), 0.06);
  transition:
    background-color var(--t) var(--ease),
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    transform var(--t) var(--ease);
}
button:active,
.button:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 var(--edge-paper),
    0 1px 2px rgba(var(--sh-ink), 0.06);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}
.primary {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--ink);
  box-shadow:
    0 2px 0 var(--edge-sun),
    0 4px 10px rgba(var(--sh-ink), 0.1);
}
.primary:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 var(--edge-sun),
    0 1px 3px rgba(var(--sh-ink), 0.08);
}
@media (hover: hover) {
  button:hover,
  .button:hover {
    background: #fafafa;
    border-color: #cfcfcf;
    transform: translateY(-1px);
    box-shadow:
      0 3px 0 var(--edge-paper),
      0 6px 12px rgba(var(--sh-ink), 0.08);
  }
  .primary:hover {
    background: var(--sun-deep);
    border-color: var(--sun-deep);
    transform: translateY(-1px);
    box-shadow:
      0 3px 0 var(--edge-sun),
      0 8px 16px rgba(var(--sh-ink), 0.12);
  }
  button:hover:active,
  .button:hover:active,
  .primary:hover:active {
    transform: translateY(1px);
  }
}
/* Keyboard focus never relies on the shadow. */
button:focus-visible,
.button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
input,
select {
  min-height: 44px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: #fff;
}
input::placeholder {
  color: #9a9a9a;
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  /* A file, not a data: URL: the CSP allows images from this site only. */
  background-image: url("/img/select-arrow.svg");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* ---------- header ---------- */
header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px var(--gutter);
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand .g-brand {
  width: 30px;
  height: 30px;
  flex: none;
}
/* 比べるくん beside the name: phones only (wide screens keep the hero's). */
.brand-art,
.nav-scrim {
  display: none;
}
@keyframes nav-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
/* Text logo: display face; 「くん」 is set a little smaller on a yellow capsule.
   Baseline alignment keeps the glyph bottoms of both parts level, so the capsule's
   inner padding hangs below the line instead of lifting くん. */
.brand-text {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}
.brand-kun {
  display: inline-block;
  position: relative;
  top: 0.025em; /* the face sets kana slightly high; level くん with the kanji bottoms */
  margin-left: 0.06em;
  /* く has a wide left bearing: less left padding keeps the ink centred in the capsule */
  padding: 0.1em 0.25em 0.13em 0.12em;
  border-radius: 999px;
  background: var(--sun);
  font-size: 0.85em;
  letter-spacing: 0;
  line-height: 1;
}
.brand .brand-text {
  font-size: 22px;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.menu-toggle {
  display: none;
}
#site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 700;
}
#site-nav a {
  text-decoration: none;
  padding: 6px 0;
}
#site-nav a:hover {
  text-decoration: underline;
}
.nav-compare {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px !important;
  border: 1px solid var(--line);
  border-radius: 999px;
}
[data-count] {
  display: inline-block;
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sun);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.pr-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.4;
  padding: 1px 5px;
  border: 1px solid currentColor;
  border-radius: 4px;
  margin-right: 8px;
}
.pr-tag {
  margin: 0 0 0 6px;
  vertical-align: 1px;
}

/* ---------- page ---------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 48px;
}
.intro .lead {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}

/* home: a white-to-pale-grey stage that bleeds to the viewport edges. No decorative shapes:
   yellow is kept for the search button and the selected states. Height follows the content. */
.home {
  position: relative;
  margin: -28px calc(50% - 50vw) 0;
  padding: 28px max(var(--gutter), calc(50vw - var(--max) / 2)) 24px;
  background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  border-radius: 0 0 32px 32px;
}
.hero {
  text-align: center;
}
/* The page's h1 is the search-facing name of the page, small above the catch copy; the catch keeps
   the large display type it had as the heading. */
.hero-kicker {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--muted);
}
.hero-catch {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  margin: 0 0 6px;
  color: var(--ink);
}
.hero-catch .phrase,
.hero-lead .phrase {
  display: inline-block;
}
.hero-lead {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
}
/* The battery/warranty line is secondary to the main description. */
.hero-lead-sub {
  font-size: 13.5px;
}
/* One search bar: keyword | budget | round yellow button. White, rounded, a quiet shadow. */
.hero-search-wrap {
  position: relative;
  max-width: 860px;
  margin: 20px auto 0;
}
.hero-search {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 80px;
  padding: 8px 8px 8px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--sh-raised);
  text-align: left;
}
.hs-field {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  min-width: 0;
  padding: 0 24px 0 32px;
  border-radius: 999px;
  cursor: text;
  transition: background-color var(--t) var(--ease);
}
.hs-q {
  flex: 1 1 auto;
}
.hs-budget {
  flex: 0 0 236px;
  cursor: pointer;
}
/* Thin divider between the fields (hidden where a field is active). */
.hs-budget::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: var(--line);
}
.hs-label {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
}
.hs-field input,
.hs-field select {
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 2px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  outline: none;
}
.hs-field input::placeholder {
  color: #8a8a8a;
}
/* The built-in clear button only once something is typed (empty, its space clipped the example). */
.hs-field input:placeholder-shown::-webkit-search-cancel-button {
  display: none;
}
.hs-value {
  display: none;
}
.hs-field select {
  appearance: none;
  padding-right: 22px;
  background: url("/img/select-arrow.svg") right 2px center / 12px 8px no-repeat;
  cursor: pointer;
}
/* The field being used is lifted out of the bar: white pill with its own shadow, divider hidden. */
.hs-field:focus-within {
  background: #fff;
  box-shadow: 0 0 0 2px var(--ink), var(--sh-raised);
}
.hs-field:focus-within::before,
.hs-field:focus-within + .hs-field::before {
  opacity: 0;
}
@media (hover: hover) {
  .hs-field:hover:not(:focus-within) {
    background: var(--bg-soft);
  }
}
.hs-submit {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 64px;
  height: 64px;
  margin-left: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--edge-sun);
  cursor: pointer;
  transition:
    background-color var(--t) var(--ease),
    transform var(--t) var(--ease);
}
.hs-submit:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
@media (hover: hover) {
  .hs-submit:hover {
    background: var(--sun-deep);
  }
}
.hs-submit:active {
  transform: translateY(1px);
  box-shadow: none;
}
.hs-icon {
  width: 24px;
  height: 24px;
}
.hs-submit-text {
  display: none;
}
/* 比べるくん (wave) — absolutely placed, so it never adds height to the hero and never sits on a
   field, the button or the copy. Wide screens: standing beside the bar's right end, on its
   baseline. Narrower: small, beside the heading's top-right (the heading is centred, so its sides
   are free). */
.hero {
  position: relative;
}
.hero .hero-search-wrap {
  position: static;
}
.hero-character {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: auto;
  height: 72px;
  pointer-events: none;
}
@media (min-width: 1180px) {
  .hero .hero-search-wrap {
    position: relative;
  }
  .hero-character {
    top: auto;
    right: auto;
    left: calc(100% + 20px);
    bottom: 0;
    height: 132px;
  }
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition:
    border-color var(--t) var(--ease),
    background-color var(--t) var(--ease);
}
.chip:active {
  background: var(--sun-soft);
}
.chip.is-on {
  background: var(--sun);
  border-color: var(--sun);
}
.other-makers {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0 0;
}
.other-makers > span {
  margin-right: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
@media (hover: hover) {
  .chip:hover {
    border-color: var(--ink);
  }
}
/* section titles */
.step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 14px;
}

/* home: makers. Text-led cards; the maker name is the whole card, series names say what is inside. */
.makers {
  padding: 22px 0 0;
}
.makers .section-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
}
.makers h2 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0;
}
.makers .sub {
  font-size: 13px;
  color: var(--muted);
}
.maker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
/* One compact card per maker: picture left, name right. Clicking applies the maker condition
   to the list below; the selected maker is marked in yellow. */
.maker-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: #fff;
  text-decoration: none;
  box-shadow: var(--sh-rest);
  transition:
    box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease),
    transform var(--t) var(--ease);
}
.maker-card.is-on {
  border-color: var(--sun);
  background: var(--sun-soft);
}
.maker-art {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
}
.maker-art img {
  display: block;
  width: auto;
  height: 92%;
  max-width: 100%;
  object-fit: contain;
  transition: transform var(--t) var(--ease);
}
.maker-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.maker-art.is-missing {
  background: var(--bg-soft);
}
.maker-art-note {
  font-size: 12px;
  color: var(--muted);
}
.maker-card strong {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.2;
}
.maker-series {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Phones' maker buttons (3 × 2, text only); wide screens use the picture cards / .maker-mini. */
.maker-pad {
  display: none;
}
.mp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.mp-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 5px 4px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  text-align: center;
  text-decoration: none;
  line-height: 1.25;
}
.mp-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* With a logo: logo left, name and series right. */
.mp-btn.has-logo {
  flex-direction: row;
  gap: 5px;
  text-align: left;
}
.mp-logo {
  flex: none;
  width: auto;
  max-width: 22px;
  height: 18px;
  object-fit: contain;
}
/* Apple's file keeps its header padding (14×44, glyph in the middle): sized so the glyph is ~16px. */
.mp-logo-apple {
  height: 46px;
  max-width: none;
  margin-block: -14px;
}
/* Google's G fills about a third of its square file (official margins kept): the same approach. */
.mp-logo-google {
  height: 44px;
  max-width: none;
  margin: -13px -14px;
}
/* A wordmark in place of the name: the name's line height, the file's own colour and margins. */
.mp-wordmark {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 18px;
}
.mp-wordmark .mp-logo {
  width: auto;
  max-width: 100%;
  height: 11px;
}
/* Narrow phones: a little smaller, so "Samsung" stays on one line beside its logo. */
@media (max-width: 374px) {
  .mp-btn.has-logo {
    gap: 4px;
    padding-inline: 3px;
  }
  .mp-btn.has-logo .mp-logo {
    max-width: 18px;
    height: 15px;
  }
  .mp-btn.has-logo strong {
    font-size: 13px;
  }
  .mp-btn.has-logo .mp-logo-apple {
    max-width: none;
    height: 40px;
    margin-block: -12px;
  }
  .mp-btn.has-logo .mp-logo-google {
    max-width: none;
    height: 40px;
    margin: -12px -13px;
  }
}
.mp-btn strong {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.mp-text > span,
.mp-all > span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.mp-btn.is-on {
  border-color: var(--sun);
  background: var(--sun);
}
.mp-btn.is-on .mp-text > span,
.mp-btn.is-on > span {
  color: var(--ink);
}
.mp-all[aria-expanded="true"] {
  border-color: var(--ink);
}
.mp-all-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
}
.mp-all-panel[hidden] {
  display: none;
}
.mp-clear {
  align-self: center;
  margin-left: auto;
  padding: 6px 4px;
  font-size: 12.5px;
  font-weight: 700;
}
/* Small maker switches on the model page (no big cards there). */
.maker-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.list-sub-inline {
  margin-left: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}
.maker-card:active {
  transform: translateY(1px);
  box-shadow: var(--sh-rest);
}
.maker-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
@media (hover: hover) {
  .maker-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-lift);
  }
  .maker-card:hover .maker-art img {
    transform: translateY(-2px) scale(1.03);
  }
}

/* maker / model pages: breadcrumb + head row. Place first, then the count and tools.
   The breadcrumb markup is shared with the columns (.breadcrumb ol); only its spacing differs here. */
#search-form > .breadcrumb {
  padding-top: 14px;
}
#search-form > .breadcrumb ol {
  margin: 0;
  font-size: 13px;
}
#search-form > .breadcrumb a {
  color: var(--ink);
}
.list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 8px 0 12px;
}
.list-head h1 {
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 6px;
}
/* What the page compares, under the name: one heading, two weights. */
.h1-sub {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}
/* Maker page: every model page as plain links, folded under the list (internal links). */
.model-links {
  margin: 20px 0 0;
  padding: 0 16px;
  background: var(--bg-soft);
  border-radius: var(--r-card);
}
.model-links > details > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.model-links > details[open] {
  padding-bottom: 12px;
}
.model-links-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 6px 0;
}
.model-links-group + .model-links-group {
  border-top: 1px solid var(--line);
}
.model-links-series {
  min-width: 6.5em;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.model-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.model-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
@media (hover: hover) {
  .model-links a:hover {
    border-color: var(--ink);
  }
}
.list-sub {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.list-facts {
  display: block;
  color: var(--ink);
  font-weight: 700;
}
.list-sub strong {
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.list-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.list-search input {
  height: 42px;
  width: 240px;
  max-width: 100%;
}
.list-tools .count {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--sun);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* maker page: series groups, variants as cards. The series name is the heading; cards carry only the variant. */
.workspace {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  /* Each column ends with its own content: the list ground never stretches to the sidebar. */
  align-items: start;
  gap: 32px;
  padding-top: 8px;
}
.filters {
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: #fff;
}
.check-group {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.check-group legend {
  font-size: 13px;
  font-weight: 700;
  padding: 0;
  margin-bottom: 4px;
}
.filter-fields .check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  font-size: 13.5px;
  font-weight: 500;
}
.filter-fields .check input {
  width: 17px;
  height: 17px;
  min-height: 0;
  margin: 0;
  accent-color: var(--ink);
}
.check-caption {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  margin: 4px 0 1px;
}
.filter-clear {
  font-size: 12.5px;
  font-weight: 700;
  margin-left: 4px;
}
.latest-note {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.sort-basis {
  font-weight: 700;
  color: var(--ink);
}
.ext-icon {
  width: 14px;
  height: 14px;
  margin-left: 5px;
  vertical-align: -2px;
}
.nav-budget {
  position: relative;
}
.nav-budget summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 0;
}
.nav-budget summary::-webkit-details-marker {
  display: none;
}
.nav-budget summary::after {
  content: " ▾";
  font-size: 11px;
}
.nav-budget-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--sh-lift);
}
.nav-budget-menu a {
  padding: 8px 12px !important;
  border-radius: 10px;
  white-space: nowrap;
}
.nav-budget-menu a:hover {
  background: var(--sun-soft);
  text-decoration: none !important;
}
#results {
  scroll-margin-top: 12px;
}
.filters .section-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 14px;
}
.filters .step-title {
  font-size: 17px;
  margin: 0;
  white-space: nowrap;
}
.filters .section-title > a {
  font-size: 12.5px;
}
#filter-toggle,
.fb-model,
.sheet-head {
  display: none;
}
#filter-options[hidden] {
  display: none;
}
.filter-fields {
  display: grid;
  gap: 14px;
}
.filter-fields label {
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.filter-fields select,
.filter-fields input {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 400;
}
.filter-fields fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}
.filter-fields > .filter-fold + .filter-fold {
  border-top: 0;
}
.filter-fields legend {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 0;
}
.range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}
.range input {
  width: 100%;
  padding-left: 10px;
  padding-right: 6px;
}
.range label {
  flex: 1;
  min-width: 0;
}
.apply-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.apply-row .apply {
  flex: 1;
}
.reset-link {
  display: none;
}
.filter-help {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
  margin: 12px 0 0;
}
/* Checkbox rows: short values (容量・状態・キャリア・色) sit side by side as pills. */
.check-row {
  display: flex;
  flex-direction: column;
}
.check-pills .check-row {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.check-pills .check {
  min-height: 34px;
  padding: 3px 11px 3px 9px !important;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.check-pills .check:has(input:checked) {
  border-color: var(--sun);
  background: var(--sun);
}
.check-pills .check input {
  width: 15px !important;
  height: 15px !important;
}
.budget-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.budget-quick .chip {
  min-height: 28px;
  padding: 2px 10px;
  font-size: 12.5px;
}
/* Selected-count badge in a filter heading (also on closed groups). */
.filter-fields legend .count,
.mm-entry-head .count,
.filter-fold > summary .count {
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sun);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  vertical-align: 1px;
}
/* Rarer conditions start closed; the heading tells whether they are in use. */
.filter-fold {
  border-top: 1px solid var(--line);
}
.filter-fold:last-child {
  border-bottom: 1px solid var(--line);
}
.filter-fold > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-size: 13.5px;
  font-weight: 700;
}
.filter-fold > summary::-webkit-details-marker {
  display: none;
}
.filter-fold > summary::after {
  content: "＋";
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}
.filter-fold[open] > summary::after {
  content: "－";
}
.filter-fold-body {
  display: grid;
  gap: 12px;
  padding: 2px 0 14px;
}
.filter-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

/* results */
.h2-sub {
  margin-left: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.relax {
  list-style: none;
  padding: 0;
  margin: 4px auto 14px;
  max-width: 420px;
  display: grid;
  gap: 6px;
  text-align: left;
}
.relax a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
}
.relax a span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* Model card: a compact row for choosing a model — picture | name and a short line | price from,
   and the way into its offers. The whole card opens the dialog (offers.js), hence the pointer.
   Heights follow the content; nothing is fixed. */
.model-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 240px;
  gap: 16px 20px;
  align-items: center;
  padding: 14px 20px;
  margin: 12px 0 0;
  border-radius: var(--r-card);
  background: #fff;
  box-shadow: 0 1px 2px rgba(var(--sh-ink), 0.04);
  cursor: pointer;
  transition:
    box-shadow var(--t) var(--ease),
    transform var(--t) var(--ease);
}
@media (hover: hover) {
  .model-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-lift);
  }
}
.model-card .model-art img,
.model-card .model-art .g-fallback {
  width: 72px;
  height: 84px;
}
.model-card h3 {
  margin: 0 0 4px;
  font-size: 19px;
  line-height: 1.35;
}
.model-card h3 a {
  text-decoration: none;
}
.model-card h3 a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.model-meta {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
/* One column exactly as wide as the side track: price, note and button share one right edge on
   every card (an auto column grew with the button's text and pushed past the card). */
.model-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  text-align: right;
}
.model-price {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0 8px;
}
.model-price .price {
  font-size: 24px;
  white-space: nowrap;
}
.model-price .from {
  margin-left: 1px;
  font-size: 14px;
  font-weight: 700;
}
.price-basis {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.model-side .button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
}
.results > .step-title {
  margin-bottom: 10px;
}
/* Above the list: switch + sort on one row, then count and the applied conditions. */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
}
.results-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}
.results-count {
  font-size: 16px;
  margin: 0;
}
.results-count strong {
  font-size: 24px;
  margin: 0 2px 0 6px;
  font-variant-numeric: tabular-nums;
}
.results-count small {
  font-size: 13px;
  font-weight: 400;
}
/* Offers behind the model count: same line, one step quieter than the model count. */
.results-offers {
  margin-left: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}
.results-count .results-offers strong {
  font-size: 18px;
  color: var(--ink);
}
.results-meta .active-filters {
  margin-top: 0;
}
.apply-state {
  margin: 8px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--alert);
}
.filter-bar-clear {
  display: none;
}
.sort-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.sort-label select {
  width: 200px;
  font-size: 13px;
}
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--sun);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.filter-chip {
  box-shadow: 0 1px 0 var(--edge-sun);
  transition:
    background-color var(--t) var(--ease),
    transform var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}
@media (hover: hover) {
  .filter-chip:hover {
    background: var(--sun);
    transform: translateY(-1px);
    box-shadow: 0 2px 0 var(--edge-sun), 0 4px 8px rgba(var(--sh-ink), 0.08);
  }
}
.filter-chip:active {
  transform: translateY(1px);
  box-shadow: none;
}
.results {
  padding: 18px 20px 20px;
  border-radius: var(--r-card);
  background: var(--bg-soft);
}
.group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  margin: 22px 0 2px;
  padding: 0 4px 6px;
}
.group-head span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

/* offer card: image stand-in | facts | price & actions */
.offer {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 232px;
  gap: 18px;
  padding: 18px 20px;
  margin: 12px 0 0;
  border-radius: var(--r-card);
  background: #fff;
  box-shadow: 0 1px 2px rgba(var(--sh-ink), 0.04);
  transition:
    box-shadow var(--t) var(--ease),
    transform var(--t) var(--ease);
}
@media (hover: hover) {
  .offer:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-lift);
  }
}
/* Model illustration: a fixed, reserved box (no layout shift) on a light grey ground so a
   white handset keeps its edge; the picture is contained, never cropped or stretched. The
   fallback icon sits behind the picture and shows only when there is none or it failed. */
.model-art {
  margin: 2px 0 0;
  text-align: center;
}
.model-art img,
.model-art .g-fallback {
  display: block;
  width: 76px;
  height: 92px;
  margin: 0 auto;
  padding: 8px 10px;
  box-sizing: border-box;
  border-radius: 12px;
  background: var(--bg-soft);
  object-fit: contain;
}
.model-art img {
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.18));
}
.model-art .g-fallback {
  width: 76px;
  height: 92px;
  padding: 10px 20px;
  color: var(--muted);
}
.model-art:not(.is-fallback):not(.is-failed) .g-fallback,
.model-art.is-failed img {
  display: none;
}
.model-art figcaption {
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
  margin-top: 3px;
}
.offer h3 {
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}
.offer h3 span {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.original-title {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 10px;
}
.original-title summary {
  cursor: pointer;
  list-style: none;
}
.original-title summary::before {
  content: "▸ ";
}
.original-title[open] summary::before {
  content: "▾ ";
}
.original-title p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.facts {
  margin: 0 0 10px;
  font-size: 13.5px;
}
.facts > div {
  display: flex;
  gap: 10px;
  margin-bottom: 3px;
}
.facts dt {
  flex: none;
  width: 68px;
  color: var(--muted);
}
.facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.facts .policy {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
}
.seller {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  margin: 0 0 4px;
}
.seller b {
  font-weight: 700;
}
.seller .provider {
  color: var(--muted);
}
/* "同じ内容の出品 ○点": the store lists identical units separately; shown once with the count. */
.same-count {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.same-count b {
  color: var(--ink);
  font-weight: 700;
}
.same-count span {
  display: inline-block; /* the note wraps as a whole, never "点）" alone */
  font-size: 11.5px;
}
.updated {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}
.stale {
  color: var(--alert);
  font-weight: 700;
}
.same-variant {
  display: inline-block;
  font-size: 13px;
  padding: 4px 0;
}
.offer-price {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  text-align: right;
}
.price-label {
  font-size: 12px;
  color: var(--muted);
}
.price {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.price small {
  font-size: 14px;
  font-weight: 700;
  margin-left: 1px;
}
.price-sub {
  font-size: 12.5px;
  line-height: 1.5;
}
.unknown-price {
  font-size: 20px;
}
.is-soldout .price {
  color: var(--muted);
}
.soldout-badge {
  align-self: flex-end;
  font-size: 12px;
  font-weight: 700;
  color: var(--alert);
  border: 1px solid #e5bfb3;
  background: var(--alert-soft);
  border-radius: 6px;
  padding: 1px 7px;
  margin-bottom: 4px;
}
.price-disclaimer {
  font-size: 12px;
  text-align: right;
  line-height: 1.5;
}
.shop-link {
  width: 100%;
  font-size: 14px;
}
.compare-add {
  width: 100%;
  font-size: 13.5px;
}
.compare-add[aria-pressed="true"] {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}
.offer-price > .sub {
  text-align: right;
  font-size: 12px;
}
.demo-purchase {
  font-size: 12px;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 26px 0 10px;
  font-size: 13px;
}
.results > .sub:last-child {
  margin: 0;
}

/* empty states */
.empty {
  text-align: center;
  padding: 40px 16px;
  margin: 18px 0;
  border-radius: var(--r-card);
  background: #fff;
}
/* 比べるくん in an empty / error state: centred above the heading, sized by its own outline. */
.empty .kun-art {
  display: block;
  width: auto;
  height: 112px;
  margin: 0 auto 10px;
}
.empty h2,
.empty h3 {
  font-size: 19px;
  margin-bottom: 6px;
}
.empty p {
  color: var(--muted);
  margin-bottom: 14px;
}

/* notices */
.notice {
  background: var(--sun-soft);
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin: 0 0 14px;
}
.notice.local-only {
  background: var(--alert-soft);
  border-color: #e5bfb3;
}
.diff-key {
  background: var(--sun-soft);
  padding: 1px 6px;
  border-radius: 4px;
}

/* compare page */
.intro-plain {
  margin-bottom: 18px;
}
.intro-plain a {
  font-size: 14px;
}
.compare-scope {
  margin: 0 0 10px;
}
.comparison-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  margin: 12px 0 16px;
  box-shadow: var(--sh-rest);
}
.comparison-scroll table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 14px;
}
.comparison-scroll th,
.comparison-scroll td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-width: 220px;
  max-width: 320px;
  vertical-align: top;
  text-align: left;
  background: #fff;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.comparison-scroll tr > *:last-child {
  border-right: 0;
}
.comparison-scroll tbody tr:last-child > * {
  border-bottom: 0;
}
.comparison-scroll tr > th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--ink);
}
.comparison-scroll thead th {
  vertical-align: bottom;
}
.comparison-scroll thead th:first-child {
  z-index: 3;
}
.comparison-scroll .compare-icon {
  width: 22px;
  height: 22px;
  margin-bottom: 4px;
}
.compare-store {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}
.comparison-scroll h2 {
  font-size: 16px;
  margin: 2px 0 8px;
}
.remove-item {
  min-height: 36px;
  padding: 4px 10px;
  font-size: 12.5px;
}
.comparison-scroll .different td {
  background: var(--bg-soft);
}
.comparison-scroll tr.different > th:first-child {
  background: var(--sun);
}
.comparison-scroll th small {
  display: block;
  color: var(--green);
  font-size: 11px;
}
.cell-note {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.compare-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
}
.compare-foot p {
  margin: 0;
}

/* compare tray (fixed) */
#compare-tray {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(920px, calc(100% - 32px));
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-float);
  z-index: 5;
}
#compare-tray[hidden] {
  display: none;
}
#compare-tray > div {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}
#selected-names {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
#selected-names button {
  min-height: 30px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 400;
  background: var(--sun-soft);
  border-color: transparent;
  box-shadow: none;
}
#announcement:not(:empty) {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tray-space, 90px) + 12px);
  transform: translateX(-50%);
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  max-width: 90vw;
  z-index: 10;
}

/* policy pages: one readable column centred in the page; the text itself stays left-aligned */
.legal {
  max-width: 800px;
  margin: 0 auto;
}
.legal h1 {
  font-size: 28px;
  line-height: 1.35;
  margin-bottom: 6px;
}
.legal-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--muted);
}
.legal-lead > p:first-child {
  font-size: 16px;
  line-height: 1.85;
}
.legal-lead {
  margin-bottom: 20px;
}
.legal-toc {
  background: var(--bg-soft);
  border-radius: var(--r-field);
  padding: 14px 18px 12px;
  margin: 0 0 8px;
}
.legal-toc-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 6px;
}
.legal-toc ol {
  margin: 0;
  padding-left: 1.5em;
  columns: 2;
  column-gap: 28px;
  font-size: 14px;
}
.legal-toc li {
  break-inside: avoid;
  padding: 3px 0;
  line-height: 1.6;
}
.legal-toc a {
  text-decoration: none;
}
.legal-toc a:hover {
  text-decoration: underline;
}
.legal section {
  padding: 22px 0 10px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.legal-toc + section,
.legal-lead + section {
  border-top: 0;
}
.legal h2 {
  font-size: 19px;
  line-height: 1.45;
  margin-bottom: 10px;
}
.legal p,
.legal li {
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.legal p {
  margin-bottom: 10px;
}
.legal ul {
  margin: 0 0 10px;
  padding-left: 1.3em;
}
.legal li + li {
  margin-top: 4px;
}
.legal .sub {
  font-size: 13px;
  color: var(--muted);
}
.legal mark.unset {
  background: var(--sun-soft);
  padding: 0 4px;
  border-radius: 3px;
}
.legal-actions {
  margin: 12px 0;
}
.table-scroll {
  overflow-x: auto;
}
.policy-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  margin: 4px 0 14px;
}
.policy-table caption {
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  padding: 0 0 6px;
}
.policy-table th,
.policy-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.policy-table thead th {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 2px solid var(--line);
}
.policy-table tbody th {
  font-weight: 700;
}
.policy-table.kv tbody th {
  width: 11em;
  background: var(--bg-soft);
}
.legal-lead .policy-table.kv tbody th {
  width: 9em;
}

/* footer */
footer {
  background: var(--bg-soft);
  border-top: 0;
  padding: 26px var(--gutter) 30px;
}
footer > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.footer-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 12px;
}
.footer-name {
  display: inline-flex;
  align-items: center;
}
.footer-name {
  text-decoration: none;
}
.footer-name .brand-text {
  font-size: 18px;
}
.footer-tagline {
  font-size: 13px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 56px;
  font-size: 13.5px;
}
.footer-heading {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 6px;
}
.footer-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  max-width: 460px;
}
.footer-links a {
  text-decoration: none;
  display: inline-block;
  padding: 2px 0;
}
.footer-links a:hover {
  text-decoration: underline;
}
footer .attribution {
  margin-top: 14px;
  font-size: 12.5px;
}
footer .attribution a {
  margin-right: 12px;
}

/* ---------- graphics ---------- */
.g {
  display: block;
  overflow: visible;
}
.g .g-body { fill: var(--g-body); stroke: var(--g-line); }
.g .g-screen { fill: var(--g-screen); stroke: #e4e4e4; stroke-width: 1.5; }
.g .g-screen-soft { fill: var(--g-screen-soft); stroke: #e4e4e4; stroke-width: 1.5; }
.g .g-line { stroke: var(--g-line); }
.g .g-soft { fill: var(--g-soft); }
.g .g-sun { fill: var(--g-sun); stroke: var(--g-line); }
.g .g-ground { fill: var(--g-ground); }
.g .g-lens { fill: var(--g-lens); stroke: var(--g-line); }
.g .g-tag { fill: var(--g-sun); stroke: var(--g-line); }
.g .g-text { fill: var(--g-line); stroke: none; font: 800 18px var(--font); }
.g .g-side { fill: #ebebeb; }
.g .g-screen-white { fill: #ffffff; }
.g .g-screen-sun { fill: var(--g-sun); }
.g .g-sun-block { fill: var(--g-sun); }
.g .g-white { fill: #ffffff; }
.g .g-grey { fill: #e4e4e4; }
.g .g-check { stroke: var(--g-line); }
.g .g-shadow { fill: rgba(0, 0, 0, 0.22); }
.g-brand .g-sun { stroke: var(--g-line); }

/* ---------- responsive ---------- */
/* ---------- 比べるくん (src/character.ts) ---------- */
/* Intro with the character on the left; poses face or point toward the text on their right. */
.intro-kun {
  display: flex;
  align-items: center;
  gap: 18px;
}
.intro-kun > .kun-art {
  flex: none;
  width: auto;
  height: 96px;
}
.intro-kun-text {
  min-width: 0;
}
/* Error and not-found pages: apology, what happened, next step. */
.error-page {
  max-width: 560px;
  margin: 12px auto 0;
  padding: 28px 16px 8px;
  text-align: center;
}
.error-page .kun-art {
  display: block;
  width: auto;
  height: 136px;
  margin: 0 auto 14px;
}
.error-page h1 {
  font-size: 24px;
  line-height: 1.4;
  margin: 0 0 8px;
}
.error-page p {
  margin: 0 0 18px;
  color: var(--muted);
}
/* Keep Japanese phrases whole when the line wraps (no orphaned 「でした」). */
.empty .phrase,
.error-page .phrase,
.intro-kun .phrase {
  display: inline-block;
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
/* Inquiry sent. */
.contact-done:has(.kun-art) {
  text-align: center;
}
.contact-done .kun-art {
  display: block;
  width: auto;
  height: 112px;
  margin: 0 auto 10px;
}

@media (max-width: 1000px) {
  .maker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 22px;
  }
  .offer {
    grid-template-columns: 64px minmax(0, 1fr) 200px;
    gap: 14px;
  }
  .model-art img,
  .model-art .g-fallback {
    width: 64px;
    height: 78px;
  }
}
@media (max-width: 760px) {
  :root {
    --gutter: 16px;
  }
  body {
    font-size: 14.5px;
  }
  h1 {
    font-size: 26px;
  }
  /* Header: 比べるくん, the name, the menu button — one row that never wraps. */
  .header-inner {
    position: relative;
    z-index: 1;
    min-height: 56px;
    padding: 6px 8px 6px 12px;
    gap: 8px;
    background: #fff;
  }
  .brand {
    gap: 6px;
    font-size: 18px;
  }
  .brand-art {
    display: block;
    flex: none;
    width: auto;
    height: 38px;
  }
  .brand .g-brand {
    width: 26px;
    height: 26px;
  }
  .menu-toggle {
    position: relative;
    display: inline-flex;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }
  .menu-toggle span {
    position: absolute;
    left: 11px;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition:
      transform var(--t) var(--ease),
      opacity var(--t) var(--ease);
  }
  .menu-toggle span:nth-child(1) {
    top: 15px;
  }
  .menu-toggle span:nth-child(2) {
    top: 21px;
  }
  .menu-toggle span:nth-child(3) {
    top: 27px;
  }
  /* Open: the three lines become a ×. */
  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
  /* The menu: a panel over the page from the header's lower right, out of the flow so nothing
     below moves. Tall menus scroll inside. */
  #site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 10px;
    width: min(80vw, 320px);
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    overscroll-behavior: contain;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--sh-float);
    animation: nav-in 0.16s var(--ease);
  }
  #site-nav.is-open {
    display: flex;
  }
  #site-nav a {
    padding: 12px 2px;
    border-bottom: 1px solid var(--line);
  }
  #site-nav a:last-child {
    border-bottom: 0;
  }
  .nav-compare {
    justify-content: space-between;
    border: 0;
    border-radius: 0;
    padding: 12px 2px !important;
  }
  /* Scrolled past the header: the menu button floats at the top right, the panel opens below it.
     Above the page and the help launcher, below the filter sheet and dialogs. */
  body.nav-float header {
    z-index: 1100;
  }
  body.nav-float .menu-toggle {
    position: fixed;
    top: 8px;
    right: 8px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--sh-raised);
    animation: nav-in 0.16s var(--ease);
  }
  body.nav-float #site-nav {
    position: fixed;
    top: 60px;
    max-height: calc(100dvh - 72px);
  }
  /* While open the header (with its panel) sits above a light scrim over everything else. */
  body.nav-open header {
    z-index: 1250;
  }
  .nav-scrim:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
  }
  main {
    padding-top: 18px;
    padding-bottom: 36px;
  }
  .home {
    margin-top: -18px;
    padding: 20px 16px 22px;
    border-radius: 0 0 24px 24px;
  }
  .hero-catch {
    font-size: 24px;
  }
  .hero-lead {
    font-size: 14px;
  }
  .hero-character {
    height: 56px;
  }
  /* Phone: the character sits beside the heading only; the lead and links take the full width. */
  .intro-kun {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
  }
  .intro-kun-text {
    display: contents;
  }
  .intro-kun-text > * {
    grid-column: 2;
  }
  .intro-kun-text > h1 ~ * {
    grid-column: 1 / -1;
  }
  .intro-kun > .kun-art {
    grid-row: 1;
    height: 64px;
  }
  .intro-kun:has(.eyebrow) > .kun-art {
    grid-row: 1 / 3;
  }
  .empty .kun-art,
  .contact-done .kun-art {
    height: 96px;
  }
  .error-page {
    padding-top: 16px;
  }
  .error-page .kun-art {
    height: 112px;
  }
  .error-page h1 {
    font-size: 22px;
  }
  .budget {
    padding-top: 20px;
  }
  .intro .lead {
    font-size: 14px;
  }
  .step-title {
    font-size: 17px;
    margin-bottom: 10px;
  }
  /* Makers: the compact 3 × 2 buttons replace the picture cards and the other-maker chips. */
  .makers {
    padding: 12px 0 0;
  }
  .makers .section-title {
    margin-bottom: 6px;
  }
  .makers h2 {
    font-size: 15px;
  }
  .makers .sub,
  .maker-grid,
  .other-makers,
  .maker-mini.has-pad {
    display: none;
  }
  .maker-pad {
    display: block;
  }
  #search-form > .maker-pad {
    margin-bottom: 12px;
  }
  .nav-budget-menu {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 12px;
  }
  .nav-budget summary {
    padding: 12px 2px;
    border-bottom: 1px solid var(--line);
  }
  #search-form > .breadcrumb {
    padding-top: 10px;
  }
  #search-form > .breadcrumb ol {
    font-size: 12.5px;
  }
  .list-head {
    padding: 8px 0 12px;
    gap: 10px;
  }
  .list-head h1 {
    font-size: 21px;
  }
  .list-tools {
    width: 100%;
  }
  .list-search {
    flex: 1;
    min-width: 0;
  }
  .list-search input {
    width: 100%;
    font-size: 16px;
  }
  .change-model {
    flex: none;
  }
  .series-list {
    gap: 16px;
  }
  .variant-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .variant-card {
    padding: 12px 14px;
  }
  .workspace {
    display: block;
    padding-top: 0;
  }
  .filters {
    padding: 0;
    border: 0;
    margin-bottom: 10px;
  }
  .filters .section-title {
    display: none;
  }
  /* 機種を選ぶ | 絞り込み: one row of two equal buttons (the model one says what is chosen). */
  .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .filter-bar > :only-child {
    grid-column: 1 / -1;
  }
  #filter-toggle,
  .fb-model {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 48px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 1px 0 var(--edge-paper);
  }
  #filter-toggle {
    justify-content: center;
  }
  .fb-icon {
    flex: none;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .fb-model {
    justify-content: space-between;
    text-align: left;
  }
  .fb-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .fb-label {
    font-size: 14px;
    line-height: 1.3;
  }
  .fb-value {
    overflow: hidden;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #filter-toggle .count {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--sun);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
  }
  /* The sheet: fixed over the page, cancel at the top, apply at the bottom. */
  #filter-options:not([hidden]) {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 1300;
    max-height: 88dvh;
    overflow-y: auto;
    padding: 0 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    background: #fff;
    box-shadow: var(--sh-float);
  }
  body.sheet-open {
    overflow: hidden;
  }
  body.sheet-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1290;
    background: rgba(0, 0, 0, 0.35);
  }
  #filter-options .filter-help {
    display: none;
  }
  .sheet-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 12px;
    margin-bottom: 4px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .sheet-head strong {
    font-size: 16px;
  }
  #filter-cancel {
    padding: 6px 10px;
    min-height: 36px;
    border: 0;
    box-shadow: none;
    background: transparent;
    font-size: 14px;
  }
  .apply-row {
    position: sticky;
    bottom: 0;
    margin: 14px -16px 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
  }
  .filter-fields {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .filter-fields fieldset {
    grid-column: 1 / -1;
  }
  .filter-fields select,
  .filter-fields input,
  .range input {
    font-size: 16px; /* prevents iOS zoom */
  }
  .reset-link {
    display: inline-flex;
    flex: none;
  }
  .results {
    padding: 10px 10px 14px;
    margin: 0 -6px;
  }
  /* Count and sort share a row while both fit; narrower screens wrap to two. */
  .results-bar {
    gap: 6px 10px;
  }
  .results-count {
    font-size: 14.5px;
  }
  .results-count strong {
    font-size: 21px;
    margin-left: 4px;
  }
  .results-count small {
    font-size: 12px;
  }
  .results-offers {
    margin-left: 8px;
    font-size: 12.5px;
  }
  .results-count .results-offers strong {
    font-size: 16px;
  }
  /* Applied conditions: one scrolling row of small removable labels, never a tall block. */
  .results-meta {
    margin-top: 8px;
  }
  .active-filters {
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
    margin: 0 -10px;
    padding: 0 10px 2px;
    overflow-x: auto;
    scrollbar-width: none;
    box-sizing: content-box;
  }
  .active-filters > * {
    flex: none;
  }
  .filter-chip {
    min-height: 32px;
    padding: 2px 10px;
    font-size: 12.5px;
  }
  .results > .step-title {
    display: none;
  }
  /* The switch already shows both counts; the heading stays for screen readers only. */
  .results-meta .results-count {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .results-meta:not(:has(.active-filters, .sub)) {
    margin-top: 0;
  }
  /* Maker switches: one scrolling row instead of several wrapped ones. */
  .maker-mini {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 calc(-1 * var(--gutter)) 12px;
    padding: 0 var(--gutter) 2px;
    scrollbar-width: none;
  }
  .maker-mini .chip {
    flex: none;
  }
  .sort-label .sort-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .sort-label select {
    width: auto;
    min-height: 40px;
    padding: 6px 30px 6px 12px;
    background-position: right 10px center;
    font-size: 16px;
  }
  .group-head {
    font-size: 15px;
    margin-top: 18px;
  }
  .h2-sub {
    display: block;
    margin: 0;
  }
  /* Phone: the name across the top; the picture left with maker/year, price and its basis to
     its right; the button across the bottom. The two wrappers dissolve (display: contents) so the
     wide layout keeps its markup. Rows follow the content: long names wrap, nothing is fixed. */
  .model-card {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr auto;
    grid-template-areas:
      "name name"
      ". meta"
      ". price"
      ". note"
      "btn btn";
    gap: 0 14px;
    align-items: start;
    padding: 12px 14px;
    margin-top: 8px;
  }
  .model-main,
  .model-side {
    display: contents;
  }
  .model-card h3 {
    grid-area: name;
    margin: 0 0 8px;
    font-size: 16.5px;
    line-height: 1.35;
  }
  .model-card .model-art {
    grid-column: 1;
    grid-row: 2 / 5;
    margin: 0;
  }
  .model-card .model-art img,
  .model-card .model-art .g-fallback {
    width: 64px;
    height: 76px;
  }
  .model-card .model-art figcaption {
    font-size: 9.5px;
    white-space: nowrap;
  }
  .model-card .model-meta {
    grid-area: meta;
    font-size: 12px;
  }
  .model-price {
    grid-area: price;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin-top: 2px;
  }
  .model-price .price {
    font-size: 24px;
    line-height: 1.25;
  }
  .model-card .price-disclaimer {
    grid-area: note;
    margin-top: 4px;
    text-align: left;
  }
  .model-side .button {
    grid-area: btn;
    width: 100%;
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 14px;
    white-space: normal;
    box-shadow: 0 1px 0 var(--edge-sun);
  }
  .filter-fold,
  .budget {
    grid-column: 1 / -1;
  }
  /* card: one column of facts, then a full-width price/action row */
  /* Phone: picture left of the text, price block full width below. */
  .offer {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 14px 14px;
  }
  .offer-price {
    grid-column: 1 / -1;
  }
  .model-art img,
  .model-art .g-fallback {
    width: 60px;
    height: 74px;
    padding: 6px 8px;
  }
  .model-art .g-fallback {
    padding: 8px 15px;
  }
  .model-art figcaption {
    font-size: 9.5px;
  }
  .offer h3 {
    font-size: 16px;
  }
  .facts {
    font-size: 13px;
  }
  .facts dt {
    width: 72px;
  }
  .offer-price {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "price price"
      "note note"
      "shop add"
      "sub sub";
    gap: 8px;
    align-items: stretch;
  }
  .price-block {
    grid-area: price;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 10px;
    text-align: left;
    padding: 8px 12px;
  }
  .price-block .price-label {
    width: 100%;
  }
  .price-block .price {
    font-size: 22px;
  }
  .soldout-badge {
    align-self: flex-start;
  }
  .price-disclaimer {
    grid-area: note;
    text-align: left;
  }
  .shop-link {
    grid-area: shop;
    font-size: 13.5px;
    padding: 9px 8px;
    line-height: 1.35;
    text-align: center;
  }
  .compare-add {
    grid-area: add;
    width: auto;
    padding: 9px 12px;
  }
  .offer-price > .sub {
    grid-area: sub;
    text-align: left;
  }
  .comparison-scroll tr > th:first-child {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    padding: 10px;
    font-size: 12.5px;
  }
  .comparison-scroll th,
  .comparison-scroll td {
    min-width: 170px;
    padding: 10px 12px;
  }
  .comparison-scroll h2 {
    font-size: 15px;
  }
  #compare-tray {
    width: calc(100% - 20px);
    bottom: 10px;
    padding: 8px 10px;
    flex-wrap: nowrap;
  }
  #compare-tray > div {
    font-size: 12.5px;
  }
  #selected-names {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  #selected-names button {
    flex: none;
    white-space: nowrap;
  }
  #compare-tray > .primary {
    flex: none;
    padding: 8px 12px;
  }
  #clear-compare {
    flex: none;
    padding: 8px;
    font-size: 12px;
  }
  .legal h1 {
    font-size: 23px;
  }
  .legal h2 {
    font-size: 18px;
  }
  .legal-lead > p:first-child {
    font-size: 15.5px;
  }
  .legal-toc ol {
    columns: 1;
  }
  /* Tables become stacked label/value blocks so text never gets squeezed into narrow columns. */
  .legal .policy-table,
  .legal .policy-table tbody,
  .legal .policy-table tr,
  .legal .policy-table th,
  .legal .policy-table td {
    display: block;
    width: auto;
  }
  .legal .policy-table thead {
    display: none;
  }
  .legal .policy-table caption {
    display: block;
    padding-bottom: 2px;
  }
  .legal .policy-table tr {
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }
  .legal .policy-table th,
  .legal .policy-table td {
    border: 0;
    padding: 0;
  }
  .legal .policy-table.kv tbody th,
  .legal-lead .policy-table.kv tbody th {
    width: auto;
    background: none;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 2px;
  }
  .legal .policy-table.grid tbody th {
    margin-bottom: 4px;
  }
  .legal .policy-table.grid td {
    display: grid;
    grid-template-columns: 6.5em minmax(0, 1fr);
    gap: 8px;
    padding: 2px 0;
  }
  .legal .policy-table.grid td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.9;
  }
  footer {
    padding: 22px 16px 26px;
  }
  .footer-links {
    gap: 14px;
    flex-direction: column;
  }
  .footer-group ul {
    gap: 2px 18px;
  }
  .footer-links a {
    padding: 5px 0;
  }
}
@media (max-width: 359px) {
  /* The heading's free sides are narrow here: smaller, nudged into the gutter. */
  .hero-character {
    right: -6px;
    height: 42px;
  }
}
@media (max-width: 380px) {
  .brand {
    font-size: 17px;
  }
  .brand .brand-text {
    font-size: 18px;
  }
  .offer-price {
    grid-template-columns: 1fr;
    grid-template-areas:
      "price"
      "note"
      "shop"
      "add"
      "sub";
  }
  .compare-add {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .offer:hover,
  .maker-card:hover,
  .variant-card:hover,
  button:hover,
  .button:hover,
  .filter-chip:hover {
    transform: none !important;
  }
}
/* The tray counter is plain text; only the header pill carries the yellow badge. */
#compare-tray [data-count] {
  background: none;
  padding: 0;
  min-width: 0;
}
/* Contact form: one column, readable labels, errors right under each field. */
.contact {
  max-width: 720px;
}
.contact-lead {
  font-size: 15px;
  margin: 4px 0 6px;
}
.contact-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 20px;
}
.contact-form .field {
  margin-bottom: 18px;
}
.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.contact-form .req,
.contact-form .opt {
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  vertical-align: 1px;
}
.contact-form .req {
  background: #fbe7e4;
  color: #a33a24;
}
.contact-form .opt {
  background: var(--paper);
  color: var(--muted);
}
.contact-form input:not([type="checkbox"]),
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-size: 16px; /* no iOS zoom on focus */
}
.contact-form textarea {
  min-height: 180px;
  padding: 10px;
  border: 1px solid #bcc9c2;
  border-radius: 5px;
  font: inherit;
  font-size: 16px;
  line-height: 1.7;
  resize: vertical;
}
.contact-form [aria-invalid="true"] {
  border-color: #b8432c;
  background: #fffaf9;
}
.contact-form .hint {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}
.contact-form .counter {
  text-align: right;
}
.contact-form .counter.over {
  color: #b8432c;
  font-weight: 600;
}
.field-error,
.form-error {
  color: #b8432c;
  font-size: 13px;
  font-weight: 600;
  margin: 6px 0 0;
}
.form-error {
  background: #fdf0ed;
  border-left: 3px solid #b8432c;
  padding: 10px 12px;
  margin-bottom: 16px;
}
.contact-form .agree label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
}
.contact-form .agree input {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin-top: 3px;
  flex: none;
}
.contact-form .cf-turnstile {
  margin: 4px 0 16px;
  min-height: 65px;
}
.contact-submit button {
  min-width: 200px;
}
.contact-done {
  background: var(--tint);
  border-radius: 6px;
  padding: 20px;
}
.contact-done h2 {
  font-size: 18px;
}
@media (max-width: 640px) {
  .contact-submit button {
    width: 100%;
  }
}

/* ===== Columns (articles): reading layout on the site's palette ===== */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb li + li::before {
  content: "›";
  margin: 0 8px;
}
.breadcrumb li[aria-current] {
  color: var(--ink);
  overflow-wrap: anywhere;
}
.column-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 14px 0 18px;
  scrollbar-width: none;
}
.column-tabs::-webkit-scrollbar {
  display: none;
}
.column-tabs a {
  flex: none;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
}
.column-tabs a[aria-current] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.column-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.column-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
}
.column-card a:hover {
  border-color: var(--ink);
}
.column-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--sun-soft);
}
.column-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.column-thumb-blank {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
}
.column-card-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
}
.column-card strong {
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.column-summary {
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.column-card time {
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
}
.column-cat {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--sun);
  color: var(--ink);
}
.latest-columns {
  margin: 32px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.latest-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.latest-head h2 {
  font-size: 18px;
  margin: 0;
}
.column-list.compact .column-thumb {
  aspect-ratio: 21 / 9;
}

/* Article page */
.article {
  max-width: 760px;
  margin: 0 auto;
}
.article-head h1 {
  font-size: 28px;
  line-height: 1.45;
  margin: 10px 0 10px;
  overflow-wrap: anywhere;
}
.article-summary {
  font-size: 16px;
  color: #444;
  line-height: 1.85;
  margin: 0 0 10px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 8px;
}
.article-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0 0 16px;
}
.article-tags li {
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.article-hero {
  margin: 0 0 20px;
}
.article-hero img,
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.toc {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 24px;
}
.toc-title {
  font-weight: 800;
  margin: 0 0 6px;
}
.toc ol {
  margin: 0;
  padding-left: 1.4em;
}
.toc li {
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.toc .toc-3 {
  margin-left: 1em;
  list-style: circle;
  font-size: 14px;
}
.article-body {
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.article-body h2 {
  font-size: 21px;
  line-height: 1.5;
  margin: 2.2em 0 0.8em;
  padding: 6px 0 6px 12px;
  border-left: 6px solid var(--sun);
  scroll-margin-top: 80px;
}
.article-body h3 {
  font-size: 18px;
  margin: 1.8em 0 0.6em;
  scroll-margin-top: 80px;
}
.article-body p {
  margin: 0 0 1.2em;
}
.article-body ul,
.article-body ol {
  padding-left: 1.4em;
  margin: 0 0 1.2em;
}
.article-body a {
  color: var(--green);
  text-underline-offset: 3px;
}
.article-figure {
  display: block;
  margin: 1.4em 0;
}
.article-caption {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
/* "Invented example" box (:::example): the label makes clear the numbers are not real offers. */
.article-example {
  margin: 0 0 1.4em;
  padding: 12px 16px 2px;
  background: var(--bg-soft);
  border-radius: 8px;
}
.article-example-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 6px !important;
}
/* Button to a comparison page ({{cta:/path|label}}): one clear next step. */
.article-cta {
  margin: 0 0 1.6em !important;
}
.article-cta .button {
  max-width: 100%;
  white-space: normal;
}
.article-body .table-scroll {
  overflow-x: auto;
  margin: 0 0 1.4em;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.article-table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 14px;
  line-height: 1.6;
}
.article-table th,
.article-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.article-table td {
  white-space: normal;
  min-width: 8em;
}
.article-table thead th {
  background: var(--sun-soft);
}
.article-table .a-right {
  text-align: right;
}
.article-table .a-center {
  text-align: center;
}
.article-code {
  background: var(--bg-soft);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
}
.article-refs,
.article-models,
.article-related {
  margin: 32px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.article-refs h2,
.article-models h2,
.article-related h2 {
  font-size: 18px;
  margin: 0 0 10px;
}
.article-refs ul,
.article-related ul {
  padding-left: 1.2em;
  margin: 0;
  line-height: 1.9;
}
.article-refs span {
  font-size: 12px;
  color: var(--muted);
}
.article-models ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 10px 0 0;
}
.article-related a {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.article-disclaimer {
  margin-top: 28px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.preview-banner {
  max-width: 760px;
  margin: 0 auto 14px;
}
@media (max-width: 640px) {
  .article-head h1 {
    font-size: 23px;
  }
  .article-body {
    font-size: 15.5px;
    line-height: 1.9;
  }
  .article-body h2 {
    font-size: 19px;
  }
  .column-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ===== Beginner guide (src/guide/buying-guide.ts) ===== */
.guide {
  font-size: 16px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.guide p {
  margin: 0 0 1em;
}
.guide ul {
  padding-left: 1.3em;
  margin: 0 0 1em;
}
.guide [id] {
  scroll-margin-top: 24px;
}
/* In-page jumps glide unless the reader asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  html:has(.guide-layout) {
    scroll-behavior: smooth;
  }
}

/* Page table of contents (.gd-nav). Wide: a quiet right column that follows the reader within
   the article (the body narrows to ~660px before it gives way). Narrow (≤960px): a sticky
   one-line bar that opens the list. */
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 200px;
  grid-template-areas: "body nav";
  justify-content: center;
  column-gap: clamp(32px, 4vw, 56px);
  align-items: start;
}
.guide-layout > .guide {
  grid-area: body;
  max-width: none;
  margin: 0;
  min-width: 0;
}
.gd-nav {
  grid-area: nav;
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px - var(--tray-space, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 14px;
  line-height: 1.5;
}
.gd-nav-bar {
  display: none;
}
.gd-nav-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 8px;
  letter-spacing: 0.04em;
}
.gd-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.gd-nav a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 3px solid transparent;
  color: var(--muted);
  text-decoration: none;
}
.gd-nav a[aria-current] {
  border-left-color: var(--sun);
  color: var(--ink);
  font-weight: 800;
}
@media (hover: hover) {
  .gd-nav a:hover {
    color: var(--ink);
    text-decoration: underline;
  }
}
.gd-nav a:focus-visible {
  outline-offset: -2px;
}
.guide h4 {
  font-size: 16px;
  margin: 1.4em 0 0.4em;
}
.guide .gd-sec a,
.guide .gd-faq a,
.guide .gd-links a {
  color: var(--green);
}
/* Marker: one or two per section. Dark text on the yellow band, never yellow text. */
.gd-mark {
  background: linear-gradient(transparent 60%, var(--sun) 60%);
  color: var(--ink);
  font-weight: 700;
  padding: 0 1px;
}
.gd-cite {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0.4em;
}
.gd-cite a {
  color: var(--muted) !important;
}
.guide .ph {
  display: inline-block;
}
.gd-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* Title and intro: text left, the character with its line on the right. */
.gd-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 8px 24px;
  align-items: center;
  margin-bottom: 18px;
}
.gd-head h1 {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.4;
  margin: 8px 0 4px;
}
.gd-sub {
  font-weight: 700;
  margin: 0 0 8px !important;
}
.gd-lead {
  margin: 0 !important;
}
.gd-head .kun-say {
  flex-direction: column-reverse;
  align-items: center;
  gap: 6px;
}
.gd-head .kun-say p::before {
  left: 50%;
  top: auto;
  bottom: -8px;
  transform: translateX(-50%) rotate(45deg);
  border: 0;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

/* 比べるくん + one line. */
.kun-say {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
}
.kun-say .kun-art {
  flex: none;
  width: auto;
}
.kun-say p {
  position: relative;
  margin: 0 !important;
  padding: 10px 16px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.65;
}
.kun-say p::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-50%) rotate(45deg);
}

/* まずはここをチェック！ */
.gd-check {
  background: var(--sun-soft);
  border-radius: var(--r-card);
  padding: 16px 18px 18px;
  margin-bottom: 16px;
}
.gd-check h2 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0 0 10px;
}
.gd-check ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.gd-check a {
  display: block;
  height: 100%;
  padding: 9px 12px 10px;
  background: #fff;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--sh-rest);
}
.gd-check b {
  display: block;
  font-size: 16px;
}
.gd-check b::after {
  content: " ↓";
  font-weight: 400;
  color: var(--muted);
}
.gd-check span {
  display: block;
  font-size: 13.5px;
  line-height: 1.55;
  color: #444;
}
@media (hover: hover) {
  .gd-check a:hover {
    box-shadow: var(--sh-raised);
  }
}

/* STEP sections. */
.gd-step {
  margin-top: 44px;
}
.gd-step > h2 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.45;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.gd-step-no {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 3px 12px;
}
.gd-sec {
  margin-top: 30px;
}
.gd-sec > h3,
.gd-sample-h,
.gd-arrival h3 {
  font-size: 19px;
  line-height: 1.5;
  margin: 0 0 10px;
  padding-left: 12px;
  border-left: 5px solid var(--sun);
}
.gd-sample-h {
  margin-top: 30px;
}

/* Term pairs and 「何を見る？」 rows: label column + content. */
.gd-terms,
.gd-look {
  margin: 0 0 1em;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.gd-terms > div,
.gd-look > div {
  display: grid;
  grid-template-columns: 11em minmax(0, 1fr);
  gap: 4px 16px;
  padding: 10px 14px;
}
.gd-terms > div + div,
.gd-look > div + div {
  border-top: 1px solid var(--line);
}
.gd-terms dt,
.gd-look dt {
  font-weight: 800;
}
.gd-terms dd,
.gd-look dd {
  margin: 0;
}
.gd-look {
  background: #fff;
}
.gd-look dt {
  font-size: 15px;
}
.gd-look > div:first-child {
  background: var(--bg-soft);
}
.gd-look ul {
  margin: 0;
}
.gd-how {
  list-style: none;
  padding: 0 !important;
}
.gd-how li {
  padding: 6px 0;
}
.gd-how b {
  display: inline-block;
  min-width: 5.5em;
  margin-right: 6px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--bg-soft);
  font-size: 14px;
  text-align: center;
}

/* Two-column tables; one card per row on phones. */
.gd-table-wrap {
  margin: 0 0 1.2em;
}
.gd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.65;
}
.gd-table caption {
  text-align: left;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 6px;
}
.gd-table th,
.gd-table td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.gd-table thead th {
  background: var(--sun-soft);
  font-size: 13px;
  border-bottom: 0;
}
.gd-table tbody th {
  width: 34%;
  font-weight: 700;
}
.gd-table-wrap .gd-note {
  margin: 6px 0 0;
}

/* Storage diagram (illustration). */
.gd-fig {
  margin: 0 0 1.4em;
}
.gd-fig figcaption {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 8px;
}
.gd-storage {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.gd-storage-bar {
  display: flex;
  height: 36px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
}
.gd-seg + .gd-seg {
  border-left: 2px solid #fff;
}
.gd-seg-photo { flex-grow: 38; background: var(--sun); }
.gd-seg-app { flex-grow: 22; background: var(--ink); }
.gd-seg-other { flex-grow: 15; background: #9a9a9a; }
.gd-seg-free {
  flex-grow: 25;
  background: repeating-linear-gradient(135deg, #fff 0 6px, #ececec 6px 9px);
}
.gd-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 0 !important;
  margin: 10px 0 0 !important;
  font-size: 14px;
}
.gd-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.gd-key {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
}

/* Numbered short procedures. */
.gd-steps {
  list-style: none;
  counter-reset: gd-step;
  padding: 0;
  margin: 0 0 1em;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.gd-steps li {
  counter-increment: gd-step;
  position: relative;
  padding: 10px 14px 12px 48px;
  border-radius: 12px;
  background: var(--bg-soft);
  font-size: 15px;
  line-height: 1.65;
}
.gd-steps li::before {
  content: counter(gd-step);
  position: absolute;
  left: 12px;
  top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sun);
  font-weight: 800;
  text-align: center;
  line-height: 26px;
}
.gd-steps b {
  display: block;
}
.gd-steps span {
  display: block;
  color: #444;
  font-size: 14px;
}
.gd-links {
  font-size: 15px;
}
.gd-example {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 12px 16px 2px;
  margin: 0 0 1em;
  font-size: 15px;
}
.gd-example-title {
  font-weight: 800;
  margin: 0 0 4px !important;
}
.gd-tip {
  padding: 10px 14px;
  border-left: 5px solid var(--sun);
  background: var(--bg-soft);
  border-radius: 0 10px 10px 0;
  font-size: 15px;
}
.gd-tip b {
  margin-right: 6px;
}

/* Listing diagram: a fictional card with numbered spots + the meaning of each number. */
.gd-sample {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px;
}
.gd-sample-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 10px;
  border: 1.5px dashed var(--ink);
  border-radius: 999px;
  margin: 0 0 10px !important;
}
.gd-sample-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px 20px;
  align-items: start;
}
.gd-sample-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--sh-raised);
  padding: 6px 14px;
}
.gd-s-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 !important;
  padding: 8px 0;
  font-size: 15px;
  line-height: 1.5;
}
.gd-s-row + .gd-s-row {
  border-top: 1px dashed var(--line);
}
.gd-s-row small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.gd-s-title span {
  font-weight: 800;
}
.gd-s-price strong {
  font-size: 20px;
}
.gd-num,
.gd-sample-list li::before {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  line-height: 24px;
}
.gd-sample-list {
  list-style: none;
  counter-reset: gd-sample;
  padding: 0;
  margin: 0;
}
.gd-sample-list li {
  counter-increment: gd-sample;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 10px;
  padding: 6px 0;
  font-size: 15px;
  line-height: 1.55;
}
.gd-sample-list li::before {
  content: counter(gd-sample);
  grid-row: span 2;
}
.gd-sample-list span {
  font-size: 14px;
  color: #444;
}

/* 支払総額 = 商品価格 + … */
.gd-sum {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}
.gd-sum span {
  padding: 4px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
}
.gd-sum i {
  font-style: normal;
  font-weight: 800;
}

/* How this site works: four steps in one row (2×2 on phones). */
.gd-flow {
  list-style: none;
  counter-reset: gd-flow;
  padding: 0;
  margin: 0 0 1em;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.gd-flow li {
  counter-increment: gd-flow;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  padding: 8px 10px 10px;
  font-size: 14px;
  line-height: 1.5;
  background: #fff;
}
.gd-flow li::before {
  content: counter(gd-flow);
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sun);
  font-weight: 800;
  text-align: center;
  line-height: 22px;
  margin-right: 6px;
}
.gd-flow b {
  font-size: 15px;
}
.gd-flow span {
  display: block;
  color: #444;
  margin-top: 4px;
}

/* Arrival checklist. */
.gd-deadline {
  display: inline-block;
  font-weight: 700;
  background: var(--sun-soft);
  border-radius: 8px;
  padding: 4px 12px;
}
.gd-checklist {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 10px 16px 14px;
  margin: 0 0 20px;
  min-width: 0;
}
.gd-checklist legend {
  font-weight: 800;
  padding: 0 6px;
}
.gd-progress {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px !important;
}
.gd-checklist ul {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
}
.gd-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  line-height: 1.5;
}
.gd-checklist input {
  flex: none;
  width: 22px;
  height: 22px;
  min-height: 0;
  margin: 0;
  accent-color: var(--ink);
}
.gd-checklist input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.gd-checklist label:has(input:checked) span {
  color: var(--muted);
}
.gd-reset {
  min-height: 40px;
  font-size: 14px;
}

/* FAQ (folded: the question is the summary). */
.gd-faq details {
  border-bottom: 1px solid var(--line);
}
.gd-faq details:first-of-type {
  border-top: 1px solid var(--line);
}
.gd-faq summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 12px 36px 12px 0;
  font-weight: 700;
  line-height: 1.6;
}
.gd-faq summary::-webkit-details-marker {
  display: none;
}
.gd-faq summary::before {
  content: "Q.";
  font-family: var(--font-display);
  margin-right: 8px;
}
.gd-faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 10px;
  font-size: 22px;
  font-weight: 400;
}
.gd-faq details[open] summary::after {
  content: "−";
}
.gd-faq summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.gd-faq details p {
  margin: 0 0 14px !important;
  font-size: 15px;
}

/* Search CTA. */
.gd-search {
  margin-top: 44px;
  background: var(--sun-soft);
  border-radius: var(--r-card);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
  align-items: center;
}
.gd-search h2 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.45;
  margin: 0 0 6px;
}
.gd-search .kun-say {
  margin: 0;
  flex-direction: column-reverse;
  gap: 6px;
  max-width: 220px;
}
.gd-search .kun-say p {
  font-size: 14px;
}
.gd-search .kun-say p::before {
  left: 50%;
  top: auto;
  bottom: -8px;
  transform: translateX(-50%) rotate(45deg);
  border: 0;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.gd-cta {
  min-width: 220px;
}
.gd-sublinks {
  list-style: none;
  padding: 0 !important;
  margin: 14px 0 0 !important;
  font-size: 14px;
}
.gd-sublinks li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 3px 0;
}
.gd-sublinks span {
  min-width: 7em;
  font-weight: 700;
}
.gd-sublinks a {
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
@media (hover: hover) {
  .gd-sublinks a:hover {
    border-color: var(--ink);
  }
}
.gd-terms > div {
  grid-template-columns: 12.5em minmax(0, 1fr);
}
.gd-refs ul {
  font-size: 14px;
  line-height: 1.7;
}
.gd-refs li + li {
  margin-top: 4px;
}
.gd-meta {
  margin: 12px 0 8px;
  font-size: 14px;
}
.gd-meta > div {
  display: flex;
  gap: 12px;
}
.gd-meta dt {
  font-weight: 700;
  min-width: 6em;
}
.gd-meta dd {
  margin: 0;
}

/* Column list: the pinned guide (「はじめての方へ」). */
.guide-pin {
  margin: 18px 0 6px;
}
.guide-pin .ph {
  display: inline-block;
}
.guide-pin-label {
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 6px;
}
.guide-pin a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 16px;
  align-items: center;
  padding: 14px 18px;
  border-radius: var(--r-card);
  background: var(--sun);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 2px 0 var(--edge-sun);
}
.guide-pin strong {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.45;
}
.guide-pin span {
  grid-column: 1;
  font-size: 14px;
}
.guide-pin .guide-pin-go {
  grid-column: 3;
  grid-row: 1 / span 2;
  font-weight: 800;
  font-size: 15px;
}
/* Thumbnail on the left; the text column and the arrow keep their places. */
.guide-pin a {
  grid-template-columns: 168px minmax(0, 1fr) auto;
}
.guide-pin-thumb {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}
.guide-pin strong,
.guide-pin span {
  grid-column: 2;
}
@media (max-width: 600px) {
  .guide-pin a {
    grid-template-columns: 104px minmax(0, 1fr);
    padding: 12px 14px;
  }
  .guide-pin .guide-pin-go {
    display: none;
  }
  .guide-pin strong {
    font-size: 17px;
  }
}

@media (max-width: 960px) {
  .guide-layout {
    display: block;
  }
  .guide-layout > .guide {
    max-width: 760px;
    margin: 0 auto;
  }
  .gd-nav {
    max-height: none;
    overflow: visible;
    margin-bottom: 16px;
  }
  .gd-nav:not([data-ready]) .gd-nav-panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 14px;
  }
  /* With guide.js: a slim bar under the top edge; the list drops down over the text. */
  .gd-nav[data-ready] {
    top: 0;
    z-index: 20;
    margin: 0 calc(-1 * var(--gutter)) 14px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .gd-nav-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 0 var(--gutter);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 400;
    justify-content: flex-start;
    text-align: left;
    cursor: pointer;
  }
  .gd-nav .gd-nav-bar:active,
  .gd-nav .gd-nav-bar:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
  }
  .gd-nav-bar[hidden] {
    display: none;
  }
  .gd-nav-label {
    flex: none;
    font-weight: 800;
    padding-right: 10px;
    border-right: 1px solid var(--line);
  }
  .gd-nav-current {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--muted);
  }
  .gd-nav-chev {
    flex: none;
    width: 9px;
    height: 9px;
    margin: -4px 4px 0 0;
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transform: rotate(45deg);
    transition: transform var(--t) var(--ease);
  }
  .gd-nav-bar[aria-expanded="true"] .gd-nav-chev {
    margin-top: 4px;
    transform: rotate(-135deg);
  }
  .gd-nav-bar:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: -3px;
  }
  .gd-nav[data-ready] .gd-nav-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: min(70vh, 460px);
    overflow-y: auto;
    padding: 12px var(--gutter) 14px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--sh-raised);
  }
  .gd-nav[data-ready]:not(.is-open) .gd-nav-panel {
    display: none;
  }
  .gd-nav a {
    padding: 9px 0 9px 14px;
    font-size: 15px;
  }
  /* Headings land below the bar. */
  .guide [id] {
    scroll-margin-top: 64px;
  }
}
@media (max-width: 760px) {
  .gd-head {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 14px;
  }
  .gd-head h1 {
    font-size: 24px;
  }
  .gd-head .kun-say,
  .gd-search .kun-say {
    flex-direction: row;
    align-items: center;
    max-width: none;
  }
  .gd-head .kun-say {
    margin: 12px 0 0;
  }
  .gd-head .kun-say .kun-art {
    height: 56px;
  }
  .gd-head .kun-say p,
  .gd-search .kun-say p {
    font-size: 14px;
    padding: 8px 12px;
  }
  .gd-head .kun-say p::before,
  .gd-search .kun-say p::before {
    left: -8px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) rotate(45deg);
    border: 0;
    border-left: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
  }
  .kun-say .kun-art {
    height: 60px;
  }
  .gd-check {
    padding: 14px 12px;
    margin-left: -4px;
    margin-right: -4px;
  }
  .gd-check ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .gd-check a {
    padding: 8px 10px;
  }
  .gd-check span {
    font-size: 13px;
  }
  .gd-step {
    margin-top: 36px;
  }
  .gd-step > h2 {
    font-size: 21px;
  }
  .gd-sec > h3,
  .gd-sample-h,
  .gd-arrival h3 {
    font-size: 18px;
  }
  .gd-terms > div,
  .gd-look > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .gd-table thead {
    display: none;
  }
  .gd-table caption {
    display: block;
  }
  .gd-table,
  .gd-table tbody,
  .gd-table tr,
  .gd-table th,
  .gd-table td {
    display: block;
    width: auto !important;
  }
  .gd-table tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 6px;
  }
  .gd-table tbody th,
  .gd-table td {
    padding: 0;
    border: 0;
  }
  .gd-sample-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .gd-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gd-checklist ul {
    grid-template-columns: minmax(0, 1fr);
  }
  .gd-search {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 16px;
  }
  .gd-search .kun-say {
    order: -1;
  }
  .gd-search .kun-say .kun-art {
    height: 64px;
  }
  .gd-cta {
    width: 100%;
  }
  .guide-pin strong {
    font-size: 17px;
  }
}

/* ===== Article admin (operator only) ===== */
body.admin {
  background: var(--bg-soft);
}
.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
}
.admin-header a {
  color: #fff;
}
.admin-brand {
  font-weight: 800;
  text-decoration: none;
}
.admin-header nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}
.admin-user {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.85;
}
.admin-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px 120px;
}
.admin-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 12px;
}
.admin-title-row h1 {
  font-size: 22px;
  margin: 0;
  overflow-wrap: anywhere;
}
.admin-title-row .button.primary {
  margin-left: auto;
}
.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 14px;
}
.admin-tabs a,
.admin-tabs button {
  flex: none;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  text-decoration: none;
  color: var(--ink);
  min-height: 0;
}
.admin-tabs [aria-current],
.admin-tabs [aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.admin-row a {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
}
.admin-row strong {
  overflow-wrap: anywhere;
}
.admin-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}
.admin-slug {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.badge-pending {
  background: var(--sun);
  border-color: var(--line-sun);
}
.badge-changes_requested {
  background: var(--alert-soft);
  color: var(--alert);
  border-color: var(--alert);
}
.badge-approved {
  background: var(--green-soft);
  color: var(--green);
  border-color: var(--green);
}
.badge-live {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.badge-down {
  background: var(--bg-soft);
}
.admin-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  counter-reset: step;
}
.admin-steps li {
  position: relative;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}
.admin-steps small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
}
.admin-steps .is-done {
  border-color: var(--green);
  background: var(--green-soft);
}
.admin-steps .is-current {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background: var(--sun-soft);
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.admin-actions .danger,
button.danger {
  color: var(--alert);
  border-color: var(--alert);
}
body.admin [hidden] {
  display: none !important;
}
.admin-comment-box {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}
.admin-comment-box textarea,
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.admin-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.admin-field {
  margin: 0 0 14px;
}
.admin-field > label,
.admin-label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  margin: 0;
}
.admin-body {
  min-height: 360px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px !important;
  line-height: 1.7;
}
.admin-help {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}
.admin-error {
  color: var(--alert);
  font-size: 13px;
  margin: 4px 0 0;
}
.admin-error:empty {
  display: none;
}
.admin-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.admin-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.admin-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 14px;
}
.admin-check input {
  width: auto;
}
.admin-images {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 14px;
}
.admin-upload {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.admin-upload button {
  grid-column: 1 / -1;
}
.admin-preview {
  background: var(--bg);
  padding: 8px 0;
}
.admin-savebar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 0 0;
  margin-top: 10px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.admin-events,
.admin-revisions {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}
.admin-events li,
.admin-revisions li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}
.admin-events p {
  flex-basis: 100%;
  margin: 4px 0 0;
  white-space: pre-wrap;
}
/* Article pipeline screens (/admin/editorial). */
.ed-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 14px;
}
.ed-panel h2 {
  font-size: 16px;
  margin: 0 0 10px;
}
.ed-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}
.ed-facts div {
  display: grid;
  grid-template-columns: 13em 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
}
.ed-facts dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}
.ed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ed-table th,
.ed-table td {
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.ed-panel:has(.ed-table) {
  overflow-x: auto;
}
.ed-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 8px 0;
}
.ed-form label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  flex: 1 1 14em;
}
.ed-grid label small {
  color: var(--muted);
}
.ed-panel button,
.admin-revisions button {
  font-size: 13px;
}
@media (max-width: 640px) {
  .ed-facts div {
    grid-template-columns: 1fr;
  }
}
#admin-toast:not(:empty) {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  max-width: 92vw;
  z-index: 50;
}
#admin-toast.is-error {
  background: var(--alert);
}
@media (max-width: 640px) {
  .admin-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-field-row,
  .admin-upload {
    grid-template-columns: 1fr;
  }
  .admin-user {
    margin-left: 0;
    flex-basis: 100%;
  }
}

/* ---------- model cards: buy button + comparison dialog (src/offers-view.ts, public/offers.js) ---------- */
.results-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.ad-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
/* The offer-card rules give .shop-link a named grid area; in the dialog it is a plain item. */
.button.outline {
  background: #fff;
  border-color: var(--ink);
  box-shadow: none;
}
@media (hover: hover) {
  .button.outline:hover {
    background: var(--bg-soft);
  }
}
.button.is-disabled {
  background: var(--bg-soft);
  border-color: var(--line);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
  font-size: 12.5px;
}
.model-side .price-disclaimer {
  font-size: 11.5px;
}
body.dialog-open {
  overflow: hidden;
}
/* Offers dialog: fixed header (title + close), one scrolling body. Centred on PC with 24px around;
   a full-width panel on phones. Above the compare tray (top layer). */
.offers-dialog {
  width: min(1000px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--sh-float);
  overflow: hidden;
}
.offers-dialog[open] {
  display: flex;
  flex-direction: column;
}
.offers-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}
.od-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 14px 10px 24px;
  border-bottom: 1px solid var(--line);
}
.od-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
}
.od-close {
  flex: none;
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}
.od-close::before {
  content: "×";
  margin-right: 6px;
  font-size: 16px;
  line-height: 1;
}
.od-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 24px 28px;
  word-break: auto-phrase;
}
.od-state {
  margin: 24px 0;
  text-align: center;
  color: var(--muted);
}
.od-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: od-spin 0.8s linear infinite;
}
@keyframes od-spin {
  to {
    transform: rotate(360deg);
  }
}
.od-error {
  color: var(--ink);
}
.od-error-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
/* B. Short model summary (the name is in the header, not repeated here). */
.om-model {
  display: flex;
  align-items: center;
  gap: 14px;
}
.om-model .model-art img,
.om-model .model-art .g-fallback {
  width: 44px;
  height: 52px;
}
.om-model .model-art figcaption {
  display: none;
}
.om-model-meta {
  margin: 0;
  font-size: 14px;
}
.om-model-meta span {
  white-space: nowrap;
}
.om-model-links {
  margin: 2px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 16px;
  font-size: 13px;
}
.om-more-spec > summary {
  cursor: pointer;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.om-more-spec[open] {
  flex-basis: 100%;
}
.om-more-spec dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 24px;
  margin: 8px 0 4px;
}
.om-more-spec dl > div {
  display: grid;
  grid-template-columns: 8em minmax(0, 1fr);
  gap: 8px;
}
.om-more-spec dt {
  color: var(--muted);
}
.om-more-spec dd {
  margin: 0;
}
.om-spec-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.unknown {
  color: var(--muted);
}
/* C. Count, applied conditions, order. */
.om-compare {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.om-compare-head h3 {
  margin: 0;
  font-size: 16px;
}
.om-compare-head h3 strong {
  font-size: 20px;
  margin: 0 2px;
}
.om-lead {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.om-conditions {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 700;
}
.om-order {
  margin: 2px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.om-order .ad-note {
  font-size: 12.5px;
}
/* D. Offer cards (.oc-*, distinct from the list's .model-card): head (seller | price), facts in
   two aligned columns, more facts folded, then the two buttons. */
.oc-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.oc {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.oc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.oc-seller {
  min-width: 0;
}
.oc-store {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.oc-mall {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.oc-price {
  flex: none;
  max-width: 55%;
  text-align: right;
}
.oc-amount {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.oc-amount small {
  font-size: 14px;
}
.oc-note {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.oc-total {
  display: block;
  color: var(--ink);
  font-weight: 700;
}
.oc-price .price-disclaimer {
  display: inline-block;
  margin-top: 2px;
  font-size: 11.5px;
}
.oc-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 28px;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
}
.oc-row {
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}
.oc-row dt {
  color: var(--muted);
}
.oc-row dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.oc-row dd small {
  color: var(--muted);
}
.oc-more {
  margin-top: 8px;
  font-size: 13.5px;
}
.oc-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  cursor: pointer;
  list-style: none;
  color: var(--muted);
}
.oc-more > summary::-webkit-details-marker {
  display: none;
}
.oc-more > summary::after {
  content: "＋";
}
.oc-more[open] > summary::after {
  content: "－";
}
.oc-more .oc-facts {
  margin-top: 4px;
}
/* The two buttons share one height; only the shop button is yellow; neither stretches. */
.oc-actions {
  container-type: inline-size;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.oc-actions .button {
  min-height: 46px;
  padding: 8px 16px;
  white-space: nowrap;
  font-size: 15px;
}
.oc-actions .oc-shop {
  flex: 0 1 300px;
  grid-area: auto;
}
.oc-actions .oc-shop.is-disabled {
  font-size: 13.5px;
}
.oc-actions .oc-compare {
  flex: 0 0 168px;
  width: auto;
  grid-area: auto;
}
.sl-short {
  display: none;
}
@container (max-width: 470px) {
  .oc-actions .oc-shop {
    flex: 1 1 auto;
  }
}
@container (max-width: 400px) {
  .oc-actions .sl-full {
    display: none;
  }
  .oc-actions .sl-short {
    display: inline;
  }
}
/* E. The one short note, after the offers. */
.om-latest,
.om-more-offers {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.om-empty {
  margin-top: 14px;
  padding: 18px;
  border-radius: var(--r-card);
  background: var(--bg-soft);
  text-align: center;
}
@media (max-width: 760px) {
  .offers-dialog {
    width: 100vw;
    max-width: 100vw;
    height: calc(100dvh - 12px);
    max-height: none;
    margin: 12px 0 0;
    border-radius: 18px 18px 0 0;
  }
  .od-bar {
    min-height: 60px;
    padding: 8px 10px 8px 16px;
  }
  .od-title {
    font-size: 15.5px;
  }
  .od-body {
    padding: 14px 16px calc(28px + env(safe-area-inset-bottom));
  }
  .oc {
    padding: 14px;
  }
  /* Phone: who sells it, then its price, then the facts — one column. */
  .oc-head {
    flex-direction: column;
    gap: 6px;
  }
  .oc-price {
    max-width: none;
    text-align: left;
  }
  .oc-amount {
    font-size: 23px;
  }
  .oc-facts,
  .om-more-spec dl {
    grid-template-columns: minmax(0, 1fr);
  }
  .oc-actions .oc-shop {
    flex: 1 1 100%;
  }
  .oc-actions .oc-compare {
    flex: 1 1 100%;
  }
}
@media (max-width: 420px) {
  .model-side {
    grid-template-columns: minmax(0, 1fr);
  }
  .model-side .button {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .od-spinner {
    animation: none;
  }
}

/* Under the list heading: one small line — demo notice, newest fetch, listing rules. */
.list-notes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 14px;
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.list-notes > :not(.list-demo) {
  white-space: nowrap;
}
.list-notes span {
  font-variant-numeric: tabular-nums;
}
.list-notes a {
  color: var(--muted);
}
.list-demo {
  color: var(--ink);
}
.list-demo strong {
  display: inline-block;
  margin-right: 6px;
  padding: 0 6px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.5;
}
/* ---------- hero copy and a lower search bar ---------- */
.hero-catch {
  margin-bottom: 4px;
}
.hero-search-wrap {
  margin-top: 16px;
}
.hero-search {
  min-height: 68px;
  padding: 6px 6px 6px 0;
}
.hs-field {
  padding: 0 20px 0 28px;
}
.hs-budget {
  flex-basis: 196px;
}
.hs-label {
  font-size: 11.5px;
  line-height: 1.3;
}
.hs-field input,
.hs-field select {
  padding-top: 1px;
  line-height: 1.35;
}
.hs-submit {
  width: 48px;
  height: 48px;
  margin-left: 6px;
}
.hs-icon {
  width: 22px;
  height: 22px;
}
@media (max-width: 760px) {
  /* Phones: the search bar right under the header. The copy stays as the page's h1 for headings
     and screen readers only; 比べるくん is in the header. */
  .home {
    padding-top: 10px;
    padding-bottom: 12px;
  }
  .hero-lead,
  .hero-catch,
  .hero-character {
    display: none;
  }
  .hero-kicker {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .hero-search-wrap {
    margin-top: 0;
  }
  /* One row as on wide screens: keyword | budget | round icon button. The budget keeps the width
     of its longest choice; the keyword takes the rest. */
  .hero-search {
    min-height: 0;
    padding: 4px 4px 4px 0;
    border-radius: 16px;
  }
  .hs-field {
    min-height: 48px;
    padding: 4px 6px 4px 14px;
    border-radius: 12px;
  }
  /* Smaller visible text; the controls stay 16px so iOS does not zoom on focus. */
  .hs-field input::placeholder {
    font-size: 14px;
  }
  .hs-budget select {
    position: absolute;
    inset: 0;
    height: 100%;
    opacity: 0;
  }
  .hs-value {
    display: block;
    overflow: hidden;
    padding: 2px 12px 0 0;
    background: url("/img/select-arrow.svg") right 0 center / 10px 7px no-repeat;
    font-size: 14px;
    line-height: 1.5;
    white-space: nowrap;
  }
  .hs-label {
    font-size: 10.5px;
    white-space: nowrap;
  }
  .hs-budget {
    flex: 0 0 98px;
    padding: 4px 6px 4px 10px;
  }
  .hs-submit {
    width: 46px;
    height: 46px;
    margin-left: 2px;
  }
  .hs-icon {
    width: 20px;
    height: 20px;
  }
}

/* ---------- 比べるくんの選び方ヘルプ (src/help.ts, public/help.js) ----------
   Above the page content and the compare tray (z 5), below the header menu and the sheets/
   dialogs. The launcher rises above the tray when the tray is shown (--tray-space). */
.kun-help {
  --kh-right: 20px;
  --kh-bottom: max(16px, var(--tray-space, 0px));
  display: none;
}
.kun-help.is-ready:not([hidden]) {
  display: block;
}
.kh-launch {
  position: fixed;
  right: var(--kh-right);
  bottom: calc(var(--kh-bottom) + env(safe-area-inset-bottom));
  z-index: 6;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0 14px 0 4px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--sh-raised);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  animation: kh-in 0.18s var(--ease);
}
.kh-launch-face {
  display: flex;
}
.kh-launch-art {
  width: auto;
  height: 64px;
  margin: -18px 0 0;
}
.kh-launch-text {
  align-self: center;
  white-space: nowrap;
}
.kh-launch:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
@media (hover: hover) {
  .kh-launch:hover {
    border-color: var(--ink);
  }
}
.is-open .kh-launch {
  border-color: var(--ink);
  background: var(--sun-soft);
}
/* Wide screens: a panel above the launcher; the page behind stays usable. */
.kh-panel {
  position: fixed;
  inset: auto var(--kh-right) calc(var(--kh-bottom) + 64px + env(safe-area-inset-bottom)) auto;
  z-index: 30;
  width: min(344px, calc(100vw - 32px));
  max-height: calc(100dvh - var(--kh-bottom) - 96px);
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-top: 4px solid var(--sun);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--sh-float);
  color: var(--ink);
  overflow: hidden;
}
.kh-panel[open] {
  display: flex;
  flex-direction: column;
  animation: kh-in 0.18s var(--ease);
}
@keyframes kh-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.kh-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 10px 14px;
  border-bottom: 1px solid var(--line);
}
.kh-head-art {
  flex: none;
  width: auto;
  height: 40px;
}
.kh-title {
  flex: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}
.kh-close {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  font-size: 24px;
  line-height: 1;
}
@media (hover: hover) {
  .kh-close:hover {
    background: var(--bg-soft);
  }
}
.kh-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px 14px;
}
.kh-intro {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.6;
  word-break: auto-phrase;
}
.kh-ph {
  display: inline-block;
}
.kh-questions {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.kh-questions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}
.kh-questions button::after {
  content: "›";
  margin-left: 8px;
  color: var(--muted);
  font-size: 18px;
}
@media (hover: hover) {
  .kh-questions button:hover {
    border-color: var(--ink);
    background: var(--sun-soft);
  }
}
.kh-guide {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
}
.kh-q {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.5;
  outline: none;
}
.kh-conclusion {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--sun-soft);
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.55;
  word-break: auto-phrase;
}
.kh-detail {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.75;
}
.kh-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
}
.kh-back {
  display: block;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
  font-size: 13.5px;
  font-weight: 700;
}
/* The launcher must not hide the footer's last links. */
body:has(.kun-help.is-ready) footer {
  padding-bottom: calc(88px + var(--tray-space, 0px));
}
/* Phones: a smaller launcher and a modal sheet from the bottom. */
@media (max-width: 760px) {
  .kun-help {
    --kh-right: 12px;
    --kh-bottom: max(12px, var(--tray-space, 0px));
  }
  /* Narrow: the character alone in a 46px circle (the name is its aria-label), so it covers as
     little of a card as possible. */
  .kh-launch {
    justify-content: center;
    align-items: center;
    width: 46px;
    height: 46px;
    min-height: 0;
    padding: 0;
    border-radius: 50%;
  }
  .kh-launch-face {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 50%;
    text-align: center;
  }
  .kh-launch-art {
    height: 42px;
    margin: 9px 0 0;
  }
  .kh-launch {
    transition: transform var(--t) var(--ease);
  }
  /* Over a card's price or button: slid to the edge, its left part still showing. */
  .is-tucked .kh-launch {
    transform: translateX(calc(var(--kh-right) + 26px));
  }
  /* A small tag keeps the action named next to the face. */
  .kh-launch-text {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 6px;
    border-radius: 999px;
    background: var(--sun);
    font-size: 10.5px;
    line-height: 1.6;
  }
  .kh-wide {
    display: none;
  }
  .kh-panel {
    inset: auto 0 0 0;
    width: 100%;
    max-width: 100%;
    max-height: 78dvh;
    border-radius: 20px 20px 0 0;
    border-width: 4px 0 0;
    animation-name: kh-up;
  }
  .kh-panel[open] {
    animation-name: kh-up;
  }
  .kh-panel::backdrop {
    background: rgba(0, 0, 0, 0.35);
  }
  .kh-body {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  body.help-open {
    overflow: hidden;
  }
}
@keyframes kh-up {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kh-launch,
  .kh-panel[open] {
    animation: none;
  }
}

/* ---------- price / stock alerts (src/alerts, public/alerts.js) ----------
   The button beside the result count on every list has the shop links' colour (.button.primary);
   only its size is set here. The sign-up is a compact dialog on PC and a bottom sheet on phones. */
.alert-cta {
  min-height: 40px;
  padding: 6px 16px;
  font-size: 14px;
  white-space: nowrap;
}
.alert-icon {
  width: 16px;
  height: 16px;
  flex: none;
}
.alert-invite {
  margin: 20px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  max-width: 560px;
  text-align: center;
}
.alert-invite p {
  margin: 0 0 10px;
  font-weight: 700;
}
.alert-invite .button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.alert-dialog {
  width: min(460px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--sh-float);
  overflow: auto;
}
.alert-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}
.alert-dialog-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px 12px 22px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.alert-dialog-head h2 {
  flex: 1;
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}
.alert-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
}
.alert-close:hover {
  background: var(--bg-soft);
}
.alert-dialog-body {
  padding: 16px 22px 22px;
}
.alert-form .field {
  margin-bottom: 14px;
}
.alert-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}
.alert-form .req {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}
.alert-form input:not([type="checkbox"]),
.alert-form select {
  width: 100%;
  font-size: 16px; /* no iOS zoom on focus */
}
.alert-form [aria-invalid="true"] {
  border-color: var(--alert);
}
.alert-form .hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.alert-model {
  display: flex;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: var(--r-field);
  background: var(--bg-soft);
}
.alert-model dt {
  font-size: 13px;
  color: var(--muted);
}
.alert-model dd {
  margin: 0;
  font-weight: 700;
}
.yen-input {
  display: flex;
  align-items: center;
  gap: 8px;
}
.yen-input span {
  flex: none;
  font-weight: 700;
}
.alert-dropped {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--sun);
  background: var(--sun-soft);
  font-size: 13px;
  line-height: 1.7;
}
.alert-dropped strong {
  display: block;
}
.alert-submit button {
  width: 100%;
  min-height: 48px;
}
.alert-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.alert-sent {
  outline: none;
}
.alert-sent-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
}
.alert-sent .button {
  margin-top: 8px;
}
/* Pages reached from mails (confirm, manage). */
.alert-page {
  max-width: 560px;
  margin: 8px auto 0;
}
.alert-page h1 {
  font-size: 24px;
  line-height: 1.4;
  margin-bottom: 10px;
}
.alert-page-art {
  display: block;
  width: auto;
  height: 104px;
  margin: 0 0 8px;
}
.alert-page form {
  margin: 14px 0;
}
.alert-page .alert-form {
  margin-top: 4px;
}
.alert-conds {
  margin: 10px 0 14px;
}
.alert-conds > div {
  display: grid;
  grid-template-columns: 6em minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.alert-conds dt {
  color: var(--muted);
}
.alert-conds dd {
  margin: 0;
}
.alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.alert-stop {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.alert-stop p {
  font-size: 13.5px;
}
.outbox li {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
/* Arrival from a notification mail. */
.alert-landing {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: var(--r-card);
  background: var(--sun-soft);
}
.alert-landing-title {
  margin: 0 0 6px;
  font-weight: 800;
}
.alert-landing ul {
  margin: 0 0 6px;
  padding-left: 1.2em;
}
.alert-landing li.is-off {
  color: var(--muted);
}
.offer.is-notified {
  box-shadow: 0 0 0 2px var(--sun), var(--sh-rest);
}
.offer-flag {
  display: inline-block;
  margin: 0 0 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--sun);
  font-size: 12px;
  font-weight: 800;
}
.offer-flag.is-near {
  background: var(--bg-soft);
  color: var(--ink);
}
.near-offers {
  margin-top: 18px;
}
@media (max-width: 760px) {
  .results-title .alert-cta {
    margin-top: 2px;
  }
  /* Bottom sheet: full width, anchored to the bottom, thumb-reachable submit. */
  .alert-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: calc(100dvh - 24px);
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
  }
  .alert-dialog-head {
    padding: 10px 8px 10px 16px;
  }
  .alert-dialog-head h2 {
    font-size: 16px;
  }
  .alert-dialog-body {
    padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
  }
  .alert-page h1 {
    font-size: 21px;
  }
}

/* ---------- メーカー・機種を選ぶ (src/model-picker.ts, public/picker.js) ----------
   The entry is the first filter. The chooser: a modal on wide screens (header, search and
   footer always visible; the two lists scroll inside), screens inside the sheet on phones. */
.mm-entry {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
}
.mm-entry-head {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}
.mm-open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-height: 52px;
  padding: 8px 40px 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1 6.5 6l-5 5' fill='none' stroke='%23292929' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 16px center / 8px 12px no-repeat;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
}
.mm-open-label {
  font-size: 14px;
  font-weight: 800;
}
.mm-open-value {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  overflow-wrap: anywhere;
}
@media (hover: hover) {
  .mm-open:hover {
    background-color: var(--sun-soft);
  }
}
.mm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mm-chips[hidden] {
  display: none;
}
.mm-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 32px;
  padding: 2px 2px 2px 10px;
  border-radius: 999px;
  background: var(--sun-soft);
  font-size: 12.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.mm-chip button {
  flex: none;
  width: 30px;
  height: 30px;
  min-height: 0;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  line-height: 1;
}
.mm-more {
  min-height: 32px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
  font-size: 12.5px;
  font-weight: 700;
}

/* The chooser (wide screens: modal). */
.mm {
  padding: 0;
  border: 0;
  color: var(--ink);
}
.mm:modal {
  width: min(920px, calc(100vw - 48px));
  max-width: none;
  height: min(720px, 85dvh);
  max-height: 85dvh;
  border-radius: 18px;
  box-shadow: var(--sh-float);
  overflow: hidden;
}
.mm[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.mm::backdrop {
  background: rgba(0, 0, 0, 0.4);
}
body.mm-open {
  overflow: hidden;
}
.mm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 20px;
  border-bottom: 1px solid var(--line);
}
.mm-head h2 {
  flex: 1;
  margin: 0;
  font-size: 17px;
  outline: none;
}
.mm-x {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  font-size: 24px;
  line-height: 1;
}
.mm-back {
  flex: none;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
}
.mm-back[hidden] {
  display: none;
}
.mm-search {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.mm-search input {
  width: 100%;
  height: 44px;
  font-size: 16px;
}
.mm-hint {
  margin: 4px 2px 0;
  font-size: 12px;
  color: var(--muted);
}
.mm-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 0;
}
.mm-makers,
.mm-models {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mm-makers {
  border-right: 1px solid var(--line);
  background: var(--bg-soft);
}
.mm-makers ul {
  margin: 0;
  padding: 8px;
  list-style: none;
}
.mm-maker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
}
.mm-maker-name {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}
.mm-maker-name small {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
}
/* Shown maker: white card with a dark edge. Chosen makers: a check and count (not colour only). */
.mm-maker[aria-current="true"] {
  border-color: var(--ink);
  background: #fff;
}
.mm-maker-sel {
  flex: none;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.mm-maker.is-chosen .mm-maker-sel {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--sun);
}
@media (hover: hover) {
  .mm-maker:hover:not([aria-current="true"]) {
    background: #fff;
  }
}
.mm-models {
  padding: 12px 20px 16px;
  outline: none;
}
.mm-pane-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  outline: none;
}
.mm-pane-title span {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.mm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.mm-row[hidden] {
  display: none;
}
.mm-row input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ink);
}
.mm-row small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}
[data-maker-all] {
  font-weight: 800;
}
.mm-series {
  border-bottom: 1px solid var(--line);
}
.mm-fold {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 6px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 800;
  text-align: left;
}
.mm-fold::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--t) var(--ease);
}
.mm-fold[aria-expanded="true"]::before {
  transform: rotate(45deg);
}
.mm-fold-title {
  flex: 1;
  overflow-wrap: anywhere;
}
.mm-fold-title small {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.mm-sel {
  flex: none;
  font-size: 12px;
  white-space: nowrap;
}
.mm-sel:not(:empty) {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--sun);
}
.mm-series-body {
  padding: 0 0 6px 28px;
}
.mm-series-body .mm-row:last-child {
  border-bottom: 0;
}
[data-series-all] {
  font-weight: 700;
}
.mm-empty {
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.mm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.mm-status {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.mm-actions {
  display: flex;
  flex: none;
  gap: 8px;
}
.mm-actions button {
  min-height: 44px;
}
.mm-ok {
  min-width: 140px;
}
/* Searching: results replace the maker's series/models. */
.mm[data-step="search"] .mm-pane {
  display: none;
}

/* Phones: the chooser takes the sheet's place, one screen at a time (makers → models). */
@media (max-width: 760px) {
  #filter-options.is-picking:not([hidden]) {
    display: flex;
    flex-direction: column;
    height: 88dvh;
    padding: 0;
    overflow: hidden;
  }
  #filter-options.is-picking > :not(.mm) {
    display: none;
  }
  .mm[open]:not(:modal) {
    position: static;
    flex: 1;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    background: #fff;
  }
  .mm-head {
    padding: 8px 6px 8px 12px;
  }
  .mm-head h2 {
    font-size: 15.5px;
    white-space: nowrap;
  }
  .mm-back {
    padding: 0 6px;
  }
  .mm-search {
    padding: 10px 16px;
  }
  .mm-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .mm-makers {
    border-right: 0;
    background: #fff;
  }
  .mm-makers ul {
    padding: 4px 12px;
  }
  .mm-maker {
    min-height: 52px;
    border-radius: 0;
    border-width: 0 0 1px;
    border-bottom-color: var(--line);
  }
  .mm-maker[aria-current="true"] {
    border-color: var(--line);
  }
  .mm-maker::after {
    content: "›";
    flex: none;
    font-size: 20px;
    color: var(--muted);
  }
  .mm[data-step="makers"] .mm-models,
  .mm[data-step="models"] .mm-makers,
  .mm[data-step="search"] .mm-makers {
    display: none;
  }
  .mm-models {
    padding: 8px 16px 12px;
  }
  .mm-foot {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }
  .mm-status {
    flex-basis: 100%;
    font-size: 12.5px;
  }
  .mm-actions {
    flex: 1;
  }
  .mm-cancel {
    display: none;
  }
  .mm-ok {
    flex: 1;
    min-width: 0;
  }
}
