* { box-sizing: border-box; }
:root { color-scheme: light; color: #273450; background: #f3f4f9; font: 17px/1.65 system-ui, sans-serif; }
body { margin: 0; }
main { max-width: 920px; margin: auto; padding: 24px clamp(12px, 4vw, 32px) 40px; }
header { background: #dcece5; border-radius: 20px; padding: clamp(16px, 4vw, 32px); }
.eyebrow, small, .muted { color: #4b5b75; }
.eyebrow { margin: 0; font-size: .83rem; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); line-height: 1.24; margin: .25em 0; }
h2, h3, p { overflow-wrap: anywhere; }
header p:last-child { margin-bottom: 0; }
section { margin-top: 16px; padding: clamp(14px, 4vw, 25px); background: #fffef9; border: 1px solid #cbdcd2; border-radius: 16px; min-width: 0; }
section > h2:first-child, .heading h2, .heading h3 { margin: 0; }
.heading, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.heading { justify-content: space-between; margin: 12px 0; }
button { font: inherit; font-weight: 700; min-height: 46px; max-width: 100%; overflow-wrap: anywhere; padding: 8px 14px; border: 1px solid #245747; border-radius: 9px; background: #245747; color: white; cursor: pointer; }
button.secondary { background: white; color: #245747; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #b14f17; outline-offset: 3px; }
#cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); }
.card { background: #f7fbf8; border: 1px solid #cbdcd2; border-radius: 12px; padding: 14px; overflow-wrap: anywhere; }
.card h3, .card p { margin: 0 0 6px; }
.latest { color: #245747; font-weight: 750; }
dt { font-weight: 700; }
dd { margin: 0 0 .6em; white-space: pre-wrap; overflow-wrap: anywhere; }
label { display: block; margin-top: 12px; font-weight: 650; }
input, textarea { display: block; width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #8194b5; border-radius: 8px; color: inherit; background: white; font: inherit; }
form .actions { margin-top: 15px; }
#notice { min-height: 1.65em; padding: 6px 0; }
#notice[data-error] { color: #843423; font-weight: 700; }
dialog { max-width: min(550px, calc(100% - 24px)); border: 1px solid #245747; border-radius: 12px; padding: 20px; }
dialog::backdrop { background: #1e2e4e87; }
[hidden] { display: none !important; }
.card { display: flex; flex-direction: column; align-items: flex-start; }
.card button { margin-top: auto; }


.dimensions { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; width: 100%; margin: 8px 0 12px; }
.dimensions div { background: #e6f2ed; padding: 8px 4px; border-radius: 8px; text-align: center; min-width: 0; }
.dimensions dt { font-size: .82rem; }
.dimensions dd { font-size: 1.1rem; font-weight: 760; margin: 0; }
.dimensions small { display: block; font-size: .75rem; }
.comparison { margin-top: 24px; padding-top: 10px; border-top: 1px solid #ccdcd2; }
.dimension-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.dimension-fields label { font-size: .86rem; white-space: nowrap; }
.dimension-fields input { padding-inline: 5px; }
#compare button { margin-top: 12px; }
.field-error { margin: 3px 0; color: #8a3027; font-size: .78rem; }
.field-error:empty { display: none; }
input[aria-invalid=true] { border-color: #8a3027; }
.memo { white-space: pre-wrap; }
.result-list { padding: 0; list-style: none; display: grid; gap: 5px; }
.result-list li { border: 1px solid #cbdcd2; border-radius: 8px; padding: 8px 10px; font-weight: 700; }
.result-list .over { color: #812d25; border-color: #deb6ac; background: #fff3f0; }
.caution { color: #4b5b75; font-size: .86rem; }
