:root { color-scheme: light; font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans JP", sans-serif; color: #203247; background: #f3f6f8; font-size: 16px; }
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.65; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 3px solid #06799a; outline-offset: 4px; }
a { color: #175c80; text-underline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(1060px, calc(100% - 64px)); margin: auto; padding: 40px 0 64px; }
h1 { font-size: 2rem; line-height: 1.35; margin: 0 0 12px; letter-spacing: -.02em; }
h2 { font-size: 1.4rem; line-height: 1.5; margin: 0; }
h3 { font-size: 1.15rem; margin: 0 0 16px; }
h4 { font-size: 1.2rem; margin: 12px 0 4px; overflow-wrap: anywhere; }
.masthead p { margin: 0; color: #4b6071; }
.eyebrow { font-size: .875rem; color: #516c7d; margin: 0 0 4px; }
.notice { margin: 20px 0 32px; padding: 12px 16px; border-left: 3px solid #95aabd; background: #e9eff4; color: #4b6071; font-size: .875rem; }
.finder, .results, .about { background: #fff; border: 1px solid #d6e0e7; border-radius: 12px; padding: 28px; }
.results, .about { margin-top: 36px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.text-button, .secondary { background: #fff; border: 1px solid #a5bbc9; border-radius: 6px; padding: 9px 16px; color: #254c65; min-height: 44px; font-weight: 600; }
.text-button { flex-shrink: 0; }
.device-groups { display: grid; gap: 24px; }
.device-group { min-width: 0; position: relative; margin: 0; padding: 28px 20px 20px; border: 1px solid #cbd9e2; border-radius: 8px; background: #f8fafc; }
.device-group legend { padding: 0 6px; font-weight: 700; }
.remove-group { position: absolute; right: 12px; top: -18px; min-height: 36px; padding: 4px 10px; border: 0; background: #f8fafc; color: #6b5151; font-size: .875rem; text-decoration: underline; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
label { display: flex; flex-direction: column; gap: 8px; font-size: .9375rem; font-weight: 600; min-width: 0; }
input, select { width: 100%; min-width: 0; height: 46px; margin-top: auto; border: 1px solid #99aebb; border-radius: 6px; padding: 8px 10px; color: #203247; background: #fff; }
small { font-size: .875rem; font-weight: 400; color: #536878; }
.form-actions { margin: 16px 0 24px; }
.additional-options { padding-top: 20px; border-top: 1px solid #e0e7ec; }
.reserve-label { max-width: 360px; }
.reserve-label input { max-width: 160px; }
.input-help { font-size: .875rem; color: #536878; margin: 24px 0; }
.primary { min-height: 48px; min-width: 240px; border: 0; border-radius: 7px; padding: 12px 24px; background: #075e78; color: #fff; font-weight: 700; }
.primary:hover { background: #06475b; }
.form-error { padding: 12px 16px; color: #882c27; background: #fff0ee; border-left: 3px solid #b14034; }
.results-empty { color: #536878; }
.results-empty h2 { font-size: 1rem; }
.results-empty p { margin: 8px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-grid article { padding: 16px; border-radius: 8px; background: #f0f4f7; display: flex; flex-direction: column-reverse; gap: 4px; }
.stat-grid strong { font-size: 2rem; line-height: 1.2; color: #23475e; }
.stat-grid span { font-size: .875rem; }
.reduction, .reduction-detail { color: #536878; font-size: .875rem; }
.result-section, .exclusion-summary { margin-top: 32px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.result-card { min-width: 0; padding: 20px; border-radius: 8px; border: 1px solid #bdd6d6; border-top: 3px solid #337577; background: #fff; overflow-wrap: anywhere; }
.result-card.confirmation { border-color: #dfcda6; border-top-color: #997131; background: #fffdf8; }
.card-label { display: inline-block; margin: 0; padding: 3px 9px; border-radius: 4px; background: #e5f1ef; color: #205d59; font-weight: 700; font-size: .875rem; }
.confirmation .card-label { background: #f4ead3; color: #765315; }
.result-card > p:not(.card-label) { font-size: .9375rem; }
.reason { color: #3e5361; padding-top: 12px; border-top: 1px solid #e0e7ec; }
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.spec-grid div { min-width: 0; }
dt { color: #536878; font-size: .875rem; }
dd { margin: 3px 0 0; font-weight: 650; }
.card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.card-actions .detail-toggle, .card-actions .official-source { grid-column: 1 / -1; }
.card-actions a, .detail-toggle { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; border-radius: 6px; padding: 8px 10px; border: 1px solid #b5c6d0; background: #fff; text-decoration: none; color: #254c65; font-weight: 600; font-size: .875rem; }
.card-actions .retailer-link { min-width: 0; min-height: 44px; text-decoration: none; }
.card-actions .retailer-link[data-retailer="Amazon"] { background: #fff0dc; border-color: #e7bd85; color: #754310; }
.card-actions .retailer-link[data-retailer="Amazon"]:hover { background: #ffe3bb; border-color: #c99149; }
.card-actions .retailer-link[data-retailer="Rakuten"] { background: #fde9e9; border-color: #e7aaaa; color: #8b3030; }
.card-actions .retailer-link[data-retailer="Rakuten"]:hover { background: #fad5d5; border-color: #c97979; }
.detail { margin-top: 16px; padding: 12px; background: #f0f4f7; font-size: .875rem; }
.exclusion-summary { padding: 20px; background: #f4f6f8; border-radius: 8px; }
.exclusion-summary ul { list-style: none; padding: 0; margin: 0; }
.exclusion-summary li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #dce4eb; }
.about { font-size: .875rem; color: #536878; }
.about h2 { font-size: 1.1rem; }
.analytics-debug { margin-top: 24px; padding: 12px; background: #203247; color: #fff; border-radius: 6px; font-family: monospace; font-size: .875rem; overflow-wrap: anywhere; }
@media (min-width: 1100px) { .field-grid { grid-template-columns: .7fr 1.2fr 1.3fr 1fr; } }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cards { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .shell { width: calc(100% - 32px); padding-top: 24px; }
  h1 { font-size: 1.75rem; }
  .finder, .results, .about { padding: 18px; }
  .field-grid { grid-template-columns: 1fr; gap: 16px; }
  .device-group { padding: 24px 14px 16px; }
  .section-heading { flex-wrap: wrap; }
  .primary { width: 100%; min-width: 0; }
  .result-card { padding: 16px; }
  .card-actions { grid-template-columns: 1fr; }
  .stat-grid { gap: 8px; }
  .stat-grid article { padding: 12px; }
  .stat-grid span { font-size: .875rem; }
}
