:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #142033;
  --muted: #64748b;
  --line: #d8e0eb;
  --blue: #1f6feb;
  --blue-dark: #1659d2;
  --blue-soft: #eaf2ff;
  --green: #2ea763;
  --green-soft: #eefaf0;
  --amber: #d99213;
  --shadow: 0 18px 44px rgba(20, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand,
.site-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--blue);
  font-size: 32px;
  transform: rotate(-15deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  color: #27364f;
  font-weight: 700;
}

.heart-button,
.link-button,
.menu-button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 800;
}

.heart-button {
  color: #e03668;
}

.menu-button {
  display: none;
  font-size: 26px;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px 24px 0;
}

.associate-ad {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #b8d4ff;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.associate-ad-top {
  width: min(920px, 100%);
  margin: 0 auto 22px;
}

.associate-ad-heading {
  display: grid;
  gap: 4px;
}

.associate-ad-heading span,
.ad-label {
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff6df;
  color: #8a5b00;
  font-size: 12px;
  font-weight: 900;
}

.associate-ad-heading strong {
  font-size: 17px;
  line-height: 1.35;
}

.associate-ad-heading small,
.associate-ad-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.associate-ad-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.associate-ad-links.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.associate-ad-links.single {
  grid-template-columns: 1fr;
}

.associate-ad-links.single .associate-ad-card:nth-child(n + 2) {
  display: none;
}

.associate-ad-card {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  background: #f8fbff;
}

.associate-ad-card:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.associate-ad-card strong {
  color: var(--blue-dark);
  font-size: 15px;
  line-height: 1.35;
}

.service-summary {
  margin: 0 0 22px;
  color: #27364f;
  font-weight: 800;
}

.service-summary p {
  margin: 0;
}

.service-summary p + p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.service-summary .auto-note {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid #b8d4ff;
  border-radius: 999px;
  background: #f5f9ff;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-title h1,
.section-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.step {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

fieldset {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

legend,
.field span,
.eyebrow {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  color: #1d2b43;
  font-weight: 900;
}

em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.float-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.float-option {
  display: grid;
  gap: 9px;
  justify-items: center;
  min-height: 144px;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.float-option:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.float-icon {
  position: relative;
  width: 42px;
  height: 62px;
}

.float-icon::before,
.float-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.float-icon::before {
  top: 0;
  width: 2px;
  height: 62px;
  background: #27364f;
}

.float-icon::after {
  top: 18px;
  width: 26px;
  height: 34px;
  border-radius: 50% 50% 44% 44%;
  background: linear-gradient(#ef7748 0 28%, #222 29% 100%);
}

.float-icon.none::before {
  display: none;
}

.float-icon.none::after {
  top: 30px;
  width: 32px;
  height: 2px;
  border-radius: 999px;
  background: #94a3b8;
}

.float-icon.slim::after {
  width: 16px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(#f7f7f7 0 38%, #111 39% 100%);
}

.float-icon.cone::after {
  top: 24px;
  width: 33px;
  height: 33px;
  clip-path: polygon(50% 0, 96% 100%, 4% 100%);
  border-radius: 0;
  background: #222;
}

.float-icon.ball::after {
  top: 22px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(#ef7748 0 30%, #222 31% 100%);
}

.float-icon.stick::after {
  width: 8px;
  height: 52px;
  border-radius: 999px;
  background: linear-gradient(#ed6f3b 0 22%, #111 23% 72%, #f3f3f3 73%);
}

.float-icon.other::after {
  width: 16px;
  height: 42px;
  border-radius: 999px;
  background: #1d1d1d;
}

.float-option span {
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.float-option input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}

.field-grid,
.details-grid .mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}

.field-grid > :only-child {
  grid-column: 1 / -1;
}

.field input,
.field select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 16px;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.14);
}

.field-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.segmented,
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.chip-grid.is-hidden {
  display: none;
}

.segmented label,
.chip-grid label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #27364f;
  cursor: pointer;
  font-weight: 800;
}

.segmented.small label {
  min-width: 78px;
}

.segmented input,
.chip-grid input {
  accent-color: var(--blue);
}

.segmented label:has(input:checked),
.chip-grid label:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-dark);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.owned-box,
.option-box {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.fieldset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.fieldset-row legend {
  margin: 0;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #26374f;
  font-weight: 800;
}

.check-inline input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.option-box {
  border-color: #a9cdfd;
  background: #f4f9ff;
}

.option-box p {
  margin: 8px 0 0 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.advice-settings {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 22px;
  overflow: hidden;
}

.advice-settings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 18px;
  cursor: pointer;
  color: #27364f;
  font-weight: 900;
  list-style: none;
}

.advice-settings summary::-webkit-details-marker {
  display: none;
}

.advice-settings summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  font-size: 18px;
  line-height: 1;
}

.advice-settings[open] summary {
  border-bottom: 1px solid var(--line);
}

.advice-settings[open] summary::after {
  content: "-";
}

.advice-settings summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.advice-settings-body {
  padding: 18px;
}

.advice-settings .helper-text {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.result-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid #a9ddb3;
  border-radius: 8px;
  background: var(--green-soft);
}

.result-card > div {
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 18px;
}

.result-card > div:first-child {
  border-right: 1px dashed #c7d9ce;
}

#totalWeight {
  display: block;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.15;
  font-weight: 950;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-top: 9px;
  padding: 0 13px;
  border: 1px solid #9bdca8;
  border-radius: 7px;
  background: #dcf7e0;
  color: #1e8a4f;
  font-size: 13px;
  font-weight: 900;
}

.float-preview {
  position: relative;
  min-height: 160px;
}

.waterline {
  position: absolute;
  top: 82px;
  left: 22%;
  width: 60%;
  height: 2px;
  background: #5ec5ef;
}

.preview-float {
  position: relative;
  display: block;
  width: 26px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(#f4a13e 0 18%, #1f2937 19% 70%, #8bd3e8 71%);
}

.preview-float::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -28px;
  width: 2px;
  height: 128px;
  background: #1f2937;
  transform: translateX(-50%);
}

.float-preview p {
  margin: 8px 0 0;
  font-weight: 900;
}

.table-block {
  margin-top: 22px;
}

.table-block h3,
.block-header h3,
.advice strong,
.info-band h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-weight: 800;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  background: #f7f9fc;
  color: #26374f;
  font-size: 13px;
}

tfoot td {
  border-bottom: 0;
  background: #fbfcfe;
}

tfoot td:last-child {
  color: var(--blue-dark);
}

.weight-dot {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border-radius: 50%;
  vertical-align: middle;
  background: radial-gradient(circle at 35% 28%, #cfd5de, #5f6b7c 70%);
}

.block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.link-button {
  color: var(--blue);
  font-size: 13px;
}

.alternative-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #fff;
}

.alternative-item:first-child {
  border-radius: 8px 8px 0 0;
}

.alternative-item:last-child {
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
}

.alternative-item strong {
  color: #27364f;
}

.mini-badge {
  padding: 4px 9px;
  border-radius: 7px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.advice {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid #b8d4ff;
  border-radius: 8px;
  background: #f5f9ff;
}

.advice p,
.advice-list,
.notice {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.advice-list {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.reason-text {
  margin: 0 0 12px;
  color: #42526a;
  font-size: 13px;
  font-weight: 700;
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.ghost-action {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #445168;
  cursor: pointer;
  font-weight: 900;
}

.ghost-action:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.ad-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 34px;
  margin: 28px 0 42px;
  align-items: stretch;
}

.ad-grid .square {
  justify-self: center;
  width: min(300px, 100%);
  min-height: 250px;
}

.content-section {
  margin: 0 0 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  scroll-margin-top: 92px;
}

.content-heading {
  max-width: 840px;
  margin-bottom: 22px;
}

.content-heading h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.35;
}

.content-heading p,
.content-note {
  margin: 0;
  color: #42526a;
  font-weight: 700;
}

.guide-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide;
}

.guide-list li {
  position: relative;
  min-height: 154px;
  padding: 48px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  counter-increment: guide;
}

.guide-list li::before {
  content: counter(guide);
  position: absolute;
  top: 16px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.guide-list strong,
.guide-list span {
  display: block;
}

.guide-list strong {
  margin-bottom: 8px;
}

.guide-list span,
.content-grid p {
  color: #42526a;
  font-size: 13px;
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.content-grid article {
  min-height: 166px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.content-grid h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: 14px;
}

.data-table {
  min-width: 620px;
}

.data-table td:nth-child(2),
.data-table th:nth-child(2) {
  text-align: right;
  white-space: nowrap;
}

.data-table td:nth-child(3),
.data-table th:nth-child(3) {
  text-align: left;
}

.product-guide {
  background: #f5f9ff;
  border-color: #b8d4ff;
}

.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.product-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #9dc4ff;
  border-radius: 8px;
  background: #fff;
  color: var(--blue-dark);
  font-weight: 900;
}

.product-links a:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.info-band {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  margin-bottom: 40px;
}

.info-band > div,
.faq-box {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.feature-grid article {
  min-height: 142px;
  padding: 20px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.feature-grid article:last-child {
  border-right: 0;
}

.feature-grid span {
  color: var(--blue);
  font-size: 42px;
  line-height: 1;
}

.feature-grid h3 {
  margin: 12px 0 6px;
  font-size: 14px;
}

.feature-grid p,
.faq-box p {
  margin: 0;
  color: #42526a;
  font-size: 13px;
  font-weight: 700;
}

.faq-box details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.faq-box details:last-child {
  padding-bottom: 0;
}

.faq-box summary {
  cursor: pointer;
  color: #1d2b43;
  font-weight: 900;
}

.faq-box p {
  margin-top: 8px;
}

.site-footer {
  min-height: 88px;
  padding: 0 32px;
  background: #243246;
  color: #fff;
}

.site-footer span:last-of-type {
  color: #cbd5e1;
}

.site-footer nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  color: #eef3f8;
  font-weight: 700;
}

dialog {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(20, 32, 51, 0.4);
}

dialog form {
  padding: 22px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-header button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.saved-list {
  display: grid;
  gap: 10px;
}

.saved-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.saved-actions {
  display: flex;
  gap: 8px;
}

.saved-item button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  font-weight: 900;
  padding: 0 12px;
}

.saved-item button[data-delete-id] {
  color: #b42318;
}

@media (max-width: 980px) {
  .site-header {
    padding: 0 18px;
  }

  .nav-links {
    display: none;
  }

  .menu-button {
    display: block;
  }

  main {
    padding: 18px 12px 0;
  }

  .app-shell,
  .ad-grid,
  .info-band {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
  }

  .float-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }

  .float-option {
    flex: 0 0 104px;
    scroll-snap-align: start;
  }

  .field-grid,
  .details-grid .mini-grid,
  .result-card,
  .result-actions {
    grid-template-columns: 1fr;
  }

  .result-card > div:first-child {
    border-right: 0;
    border-bottom: 1px dashed #c7d9ce;
  }

  .fieldset-row,
  .block-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-list,
  .content-grid,
  .associate-ad-links,
  .associate-ad-links.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .site-footer nav {
    flex-wrap: wrap;
    margin-left: 0;
    gap: 16px;
  }
}

@media (max-width: 520px) {
  .brand small {
    display: none;
  }

  .section-title h1,
  .section-title h2 {
    font-size: 18px;
  }

  .chip-grid label,
  .segmented label {
    flex: 1 1 74px;
    padding: 0 10px;
  }

  .product-links a {
    flex: 1 1 100%;
  }

  th,
  td {
    padding: 10px 8px;
    font-size: 13px;
  }

  .alternative-item {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 20px;
  }

  .content-heading h2 {
    font-size: 18px;
  }

  .feature-grid,
  .guide-list,
  .content-grid,
  .associate-ad-links,
  .associate-ad-links.compact {
    grid-template-columns: 1fr;
  }
}
