:root {
  color-scheme: light;
  --navy: #002f54;
  --ink: #243746;
  --muted: #516171;
  --page: #f7f8f6;
  --line: #c9d1d1;
  --accent: #e6f0f1;
  font-family: "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--page); line-height: 1.55; }
.site-head {
  background: #fff; border-bottom: 1px solid var(--line); color: #002f54;
  min-height: 56px; padding: 4px max(16px, calc((100vw - 1152px) / 2));
}
.site-home { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; }
.site-home img { width: 116px; height: auto; display: block; }
.site-home span { border-left: 1px solid rgb(0 47 84 / 12%); padding-left: 12px; font-size: 11px; font-weight: 700; letter-spacing: .28em; }
@media (min-width: 850px) { .site-head { min-height: 72px; } }
main { max-width: 1150px; margin: auto; padding: 0 22px 68px; }
.page-head { padding: 42px 0 30px; }
.page-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.page-links a { display: inline-flex; min-height: 44px; align-items: center; }
h1, h2, legend { color: var(--navy); }
h1 { margin: 7px 0 12px; font-size: clamp(1.85rem, 4vw, 2.7rem); line-height: 1.2; }
p { margin: .55rem 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.controls, .result { background: #fff; border: 1px solid var(--line); padding: 25px; border-radius: 12px; }
.bed-construction { margin-bottom: 22px; padding: 16px; background: #f7f6ee; border-radius: 8px; }
.bed-construction summary, .measure-help summary, .result summary { color: var(--navy); cursor: pointer; }
.bed-construction p { margin: .35rem 0 .6rem; }
.bed-parts { display: grid; grid-template-columns: minmax(0,1.25fr) auto minmax(0,1fr); align-items: center; column-gap: 12px; }
.bed-part { min-width: 0; text-align: center; color: var(--navy); font-size: .86rem; }
.bed-part img { display: block; width: min(100%, 230px); height: auto; margin: 0 auto 2px; }
.bed-part-cover img { width: min(100%, 200px); }
.bed-parts-plus { color: var(--navy); font-size: 1.45rem; }
fieldset { padding: 12px 0 20px; margin: 0 0 19px; border: 0; border-bottom: 1px solid var(--line); min-width: 0; }
legend { padding: 0; font-size: 1.07rem; font-weight: 700; }
input, select, textarea, button { font: inherit; }
input[type=radio], input[type=checkbox] { accent-color: var(--navy); width: 1.1rem; height: 1.1rem; margin: 0 .2rem 0 0; vertical-align: -.18rem; }
input[type=number], select, textarea { width: 100%; background: #fff; color: var(--ink); border: 1px solid #91a1a9; border-radius: 6px; padding: .55rem .6rem; }
input:disabled, select:disabled { color: #596673; background: #f4f5f3; }
label { cursor: pointer; }
.choices { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.choices label, .controls label:has(> input[type=checkbox]), .controls .any {
  min-height: 44px; display: inline-flex; align-items: center; gap: .35rem;
}
.bed-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.bed-choice { display: block; padding: 5px; border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
.bed-choice:has(input:checked) { border-color: var(--navy); background: var(--accent); }
.bed-choice:has(input:focus-visible) { outline: 3px solid #1b708d; outline-offset: 3px; }
.bed-choice img { width: 100%; height: auto; aspect-ratio: 1; display: block; border-radius: 5px; }
.bed-choice-info { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 2px 3px; padding: 7px 3px 5px; }
.bed-choice-info input { align-self: start; margin-top: .19rem; }
.bed-choice-name { color: var(--navy); font-weight: 700; overflow-wrap: anywhere; }
.bed-choice-info small { grid-column: 2; line-height: 1.45; color: var(--muted); }
.bed-model { display: grid; grid-template-rows: 1fr auto; gap: 5px; min-width: 0; }
.bed-photo { display: grid; aspect-ratio: 1; overflow: hidden; background: #f7f6ee; border-radius: 5px; }
.bed-photo img { grid-area: 1 / 1; height: 100%; object-fit: contain; }
.bed-photo img { width: 100%; }
/* Interior photos are pre-cropped to the same aspect ratio as each exterior photo, so both fill the same box. */
.bed-photo .core-photo { visibility: hidden; }
.bed-model:has(.bed-core-toggle[aria-pressed="true"]) .bed-photo img { visibility: hidden; }
.bed-model:has(.bed-core-toggle[aria-pressed="true"]) .bed-photo .core-photo { visibility: visible; }
@media (hover: hover) and (pointer: fine) {
  .bed-model .bed-choice:hover .bed-photo img { visibility: hidden; }
  .bed-model .bed-choice:hover .bed-photo .core-photo { visibility: visible; }
}
.bed-core-toggle:not(.primary) { justify-self: start; padding: .35rem .6rem; min-height: 44px; font-size: .82rem; }
.bed-core-toggle[aria-pressed="true"]:not(.primary) { background: var(--accent); }
.size-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 7px; }
.size-fields span { font-size: .82rem; color: var(--muted); }
.size-fields input, .size-fields select { display: block; margin-top: 3px; }
.stock-guidance { background: var(--accent); margin: .65rem 0; padding: .6rem .8rem; border-radius: 6px; font-size: .9rem; }
.stock-guidance p { margin: 0; }
.stock-guidance a { min-height: 44px; display: inline-flex; align-items: center; color: var(--navy); }
.measure-help { margin: 8px 0; font-size: .91rem; }
.measure-diagram {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  width: min(100%, 195px); min-height: 74px; margin-top: 8px; padding: 8px;
  background: #f7f6ee; border: 1px solid #91a1a9; border-radius: 6px; color: var(--navy); text-align: center;
}
.field-error { color: #9c212d; font-weight: 600; }
input[aria-invalid="true"] { border-color: #9c212d; }
.help { font-size: .91rem; color: var(--muted); }
.help a { color: var(--navy); text-underline-offset: .15em; }
.fabric-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.swatch { padding: 6px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; min-width: 0; }
.swatch:has(input:checked) { border-color: var(--navy); background: var(--accent); }
.swatch img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #efefeb; border-radius: 5px; }
.swatch .label { display: block; margin-top: 6px; color: var(--navy); font-size: .87rem; font-weight: 650; }
.swatch small { display: block; margin: 3px 0 3px .2rem; color: var(--muted); line-height: 1.4; }
.swatch .availability { color: var(--navy); font-weight: 600; }
.primary, .consult { background: var(--navy); color: white; font-weight: 650; border: 1px solid var(--navy); }
button, .consult { min-height: 44px; padding: .6rem .9rem; border-radius: 6px; cursor: pointer; }
button:not(.primary) { background: #fff; border: 1px solid #91a1a9; color: var(--navy); }
button[aria-disabled="true"] { cursor: progress; opacity: .66; }
.consult { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; margin: .35rem 0; }
.result { position: sticky; top: 14px; max-height: calc(100dvh - 28px); overflow: auto; scroll-margin-top: 14px; }
.result h2 { font-size: 1.25rem; margin: 0; }
.price { color: var(--navy); font-weight: 700; font-size: clamp(1.35rem, 2.55vw, 2.05rem); margin: .4rem 0 0; }
.price span { white-space: nowrap; }
.price span:only-child { white-space: normal; }
#amount-context { margin: 0 0 .35rem; }
#details { display: grid; gap: 4px; padding: .55rem .7rem .55rem 1.65rem; background: var(--accent); font-size: .85rem; border-radius: 6px; }
.result details { margin-top: .55rem; padding-top: .55rem; border-top: 1px solid var(--line); }
.result details summary { min-height: 44px; align-content: center; }
#compare { margin: 12px 0; padding: 0; list-style: none; }
#compare li { border-bottom: 1px solid var(--line); padding: .5rem 0; display: grid; gap: 2px; font-size: .86rem; }
#compare strong { color: var(--navy); }
#summary { margin-top: 5px; }
#copy-status { font-size: .82rem; }
.mobile-only, .mobile-result { display: none; }
:focus-visible { outline: 3px solid #1b708d; outline-offset: 3px; }
@media (max-width: 780px) {
  .layout { grid-template-columns: 1fr; }
  main:has(.mobile-result:not([hidden])) { padding-bottom: 120px; }
  .result { position: static; max-height: none; overflow: visible; }
  .mobile-result {
    position: fixed; z-index: 1; inset: auto 0 0;
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 8px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-top: 1px solid var(--line); background: #fff; color: var(--navy);
    box-shadow: 0 -2px 12px #002f5414;
  }
  .mobile-result span > * { display: block; }
  .mobile-result small { font-size: .78rem; }
  .mobile-result button { flex-shrink: 0; padding-inline: .65rem; }
}
@media (max-width: 430px) {
  main { padding-inline: 12px; }
  .page-head { padding: 25px 5px 21px; }
  .controls, .result { padding: 17px 13px; }
  .fabric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bed-choices { gap: 7px; }
  .bed-choice-name { font-size: .9rem; }
  .bed-parts { column-gap: 5px; }
  .mobile-only { display: block; }
}

.site-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-home { color: inherit; text-decoration: none; }
.back-guide { font-size: .82rem; color: inherit; min-height: 44px; display: inline-flex; align-items: center; }
.site-foot { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center; padding: 2rem 16px 6rem; font-size: .85rem; }
.site-foot a { color: inherit; min-height: 44px; display: inline-flex; align-items: center; }
.noscript { padding: 1rem 16px; }
.any-tile { display: grid; place-items: center; aspect-ratio: 1; border-radius: 5px; background: #f7f6ee; border: 1px dashed #b9c1c6; color: var(--navy); font-weight: 650; text-align: center; line-height: 1.5; }
.option-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.option-grid img { object-fit: cover; }
@media (max-width: 430px) { .option-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
