:root {
  color-scheme: light;
  --ink: #123e31;
  --body: #243b31;
  --muted: #56695d;
  --green: #1e5a40;
  --hover: #154533;
  --paper: #f9f7ef;
  --card: #fffdf7;
  --line: #c8cec0;
  --wash: #edf0e4;
  --radius: 15px;
  font: 16px/1.45 Inter, "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  color: var(--body);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; min-height: 100vh; }
[hidden], .sprites { display: none !important; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--ink); }
button, summary, select { cursor: pointer; }
button, input, select { -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; padding: 0; }
button:disabled, fieldset:disabled { opacity: .55; }
button:disabled { cursor: default; }
input, select { min-width: 0; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible, #scene [tabindex]:focus-visible { outline: 3px solid #b5672a; outline-offset: 3px; }
[aria-invalid=true] { border-color: #9f4428; }
button, a, summary, select { touch-action: manipulation; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: min(calc(100% - 64px), 1240px); margin-inline: auto; }
.masthead { min-height: 74px; display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #22513b; }
.brand, .garage-link { display: inline-flex; align-items: center; text-decoration: none; }
.brand { gap: 10px; color: #202c25; font-size: 1.62rem; letter-spacing: -.055em; line-height: 1; font-weight: 785; }
.brand svg { width: 37px; height: 37px; color: #124432; }
.garage-link { gap: 7px; padding: 9px 1px; font-weight: 660; font-size: .93rem; }
.garage-link:hover { color: #51785d; }
main { padding-bottom: max(48px, env(safe-area-inset-bottom)); }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: clamp(24px,3vw,42px) 0 25px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.35rem,4.7vw,4.15rem); color: var(--ink); font-weight: 800; letter-spacing: -.071em; line-height: 1.04; text-wrap: balance; }
.intro p { color: var(--muted); font-size: clamp(1rem,1.27vw,1.13rem); margin-top: 9px; }
.unit-group { display: flex; align-items: center; gap: 8px; padding-bottom: 2px; }
.unit-label { color: var(--muted); font-size: .87rem; font-weight: 580; }
.segment { display: inline-flex; align-items: stretch; gap: 2px; padding: 3px; white-space: nowrap; border: 1px solid #bcc6b8; border-radius: 9px; background: rgba(255,253,247,.8); }
.segment button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 5px; padding: 5px 10px; min-width: 36px; min-height: 32px; font-size: .9rem; line-height: 1; font-weight: 680; color: #466151; }
.segment button:hover { background: #e3e9de; }
.segment button[aria-pressed=true] { background: var(--green); color: #fffdf8; }
.segment .icon { width: 17px; height: 17px; }
.workspace { display: grid; grid-template-columns: minmax(0,1fr) clamp(300px,29vw,370px); align-items: start; gap: clamp(15px,2vw,26px); }
.plan-column, .side-column { min-width: 0; display: grid; align-content: start; gap: 14px; }
.plan, .panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.plan { overflow: hidden; background: #f1f2e8; border-color: #afbca9; }
.plan-head { padding: 15px 17px 5px; display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.plan-head h2 { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 1.06rem; line-height: 1.17; letter-spacing: -.03em; font-weight: 720; min-width: 0; overflow-wrap: anywhere; }
.plan-head h2 .icon { stroke-width: 1.7; width: 21px; }
.scene { width: 100%; height: clamp(310px,36vw,470px); position: relative; background-color: #f1f2e8; }
.scene > svg { display: block; width: 100%; height: 100%; -webkit-user-select: none; user-select: none; }
.scene svg [data-id] { cursor: grab; }
.scene svg [data-id]:active { cursor: grabbing; }
.plan-hint { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: .85rem; padding: 2px 12px 14px; }
.plan-hint .icon { width: 16px; height: 16px; }
.selection-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 17px; background: #faf9f2; border-top: 1px solid #c4cebe; }
.selected-label { min-width: 0; }
.selected-label strong { display: block; overflow-wrap: anywhere; line-height: 1.24; font-size: 1rem; letter-spacing: -.02em; color: var(--ink); }
.minor-label { display: block; color: var(--muted); font-size: .78rem; }
.orientation { display: flex; align-items: center; gap: 6px; flex: none; }
.orientation button, .primary, .delete { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 11px; border-radius: 7px; font-size: .92rem; line-height: 1.2; font-weight: 665; }
.orientation button { border: 1px solid #adbbab; background: var(--card); color: var(--ink); }
.orientation button:hover { background: #eaeee4; }
.orientation .icon { width: 17px; height: 17px; }
.result { display: flex; align-items: flex-start; gap: 12px; padding: 15px 18px; color: var(--ink); background: #edf2e5; border: 1px solid #b8c8ae; border-radius: 12px; }
.result-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: white; background: #397248; flex: none; }
.result-icon .icon { display: none; width: 19px; height: 19px; stroke-width: 2.2; }
.result[data-state=ok] .check, .result[data-state=warn] .alert, .result[data-state=empty] .idle { display: block; }
.result[data-state=warn] { color: #69361e; border-color: #dfbea2; background: #fcf0df; }
.result[data-state=warn] .result-icon { background: #9d5829; }
.result[data-state=empty] { color: #45604f; border-color: #c8d0bf; background: #eff2e9; }
.result[data-state=empty] .result-icon { background: #607661; }
.result h2 { font-size: 1.04rem; letter-spacing: -.025em; line-height: 1.3; margin-top: 1px; }
.result p { color: inherit; font-size: .9rem; line-height: 1.5; margin-top: 3px; overflow-wrap: anywhere; white-space: pre-line; }
.panel { padding: 17px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel h2, .panel-title { font-size: 1.13rem; line-height: 1.25; color: var(--ink); letter-spacing: -.035em; font-weight: 745; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; min-height: 24px; padding: 1px 7px; background: #edf0e5; color: #3c5945; border-radius: 5px; font-variant-numeric: tabular-nums; font-size: .8rem; font-weight: 700; }
.cargo-list { display: grid; gap: 5px; }
.cargo-item { display: flex; align-items: center; text-align: left; width: 100%; padding: 9px; column-gap: 10px; border: 1px solid transparent; border-radius: 8px; }
.cargo-item:hover { background: #f1f3e9; }
.cargo-item[aria-pressed=true], .cargo-item.selected { background: #edf2e6; border-color: #8ba486; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; background: var(--swatch, var(--color,#e39a54)); box-shadow: inset 0 0 0 1px rgba(58,57,30,.26); flex: none; }
.item-copy { display: block; min-width: 0; flex: 1; }
.item-copy strong, .item-copy small { display: block; overflow-wrap: anywhere; }
.item-copy strong { color: var(--ink); font-size: .97rem; font-weight: 680; letter-spacing: -.015em; }
.item-copy small { color: var(--muted); font-size: .8rem; margin-top: 1px; font-variant-numeric: tabular-nums; }
.add-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; border-top: 1px solid #dce1d3; padding-top: 13px; margin-top: 12px; }
input, select { width: 100%; border: 1px solid #b7c2b1; border-radius: 6px; padding: 8px 9px; color: var(--body); background-color: #fffef9; min-height: 40px; line-height: 1.3; }
select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='m2 3 4 4 4-4' stroke='%2346624a' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; text-overflow: ellipsis; }
.primary { font-size: .93rem; background: var(--green); color: white; border: 1px solid var(--green); white-space: nowrap; }
.primary:hover { background: var(--hover); }
.primary .icon { width: 17px; height: 17px; stroke-width: 2.25; }
.disclosure { padding: 0; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.disclosure > summary, .arch-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.disclosure > summary { padding: 15px 17px; border-radius: var(--radius); }
.disclosure > summary:hover { background: #f2f3e9; }
.summary-copy { display: grid; gap: 2px; }
.summary-sub, .field-help { font-size: .85rem; line-height: 1.48; color: var(--muted); }
.caret { width: 18px; height: 18px; color: var(--muted); }
details[open] > summary .caret { transform: rotate(180deg); }
.panel-body { display: grid; gap: 12px; padding: 0 17px 18px; margin: 0; border: 0; min-width: 0; }
.field, .fields label { display: grid; align-content: end; gap: 4px; min-width: 0; }
.field > span, .fields label > span { color: #36513e; font-size: .87rem; font-weight: 625; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px 10px; }
.fields.cargo-dims { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.unit-text { font-weight: 490; font-size: .79rem; color: #617260; }
.arch-details { padding-top: 9px; border-top: 1px solid #dce1d3; }
.arch-details > summary { padding: 5px 0; color: #36513e; font-size: .92rem; font-weight: 650; }
.arch-details .fields { margin-top: 8px; }
.field-help:empty { display: none; }
.delete { justify-self: start; color: #813d28; margin-left: -5px; padding: 4px 5px; }
.delete .icon { width: 16px; height: 16px; }
.delete:hover { background: #fbefe3; }
.notice { background: #fcf0df; color: #743d25; padding: 10px 15px; margin-bottom: 8px; border-radius: 7px; }
@media (max-width: 960px) and (min-width: 761px) {
  .shell { width: calc(100% - 40px); }
  .workspace { grid-template-columns: minmax(0,1fr) 285px; gap: 14px; }
  .plan-head { flex-wrap: wrap; }
  .panel { padding: 14px; }
  .disclosure { padding: 0; }
  .selection-tools { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  .masthead { min-height: 61px; }
  .brand { font-size: 1.4rem; gap: 7px; }
  .brand svg { width: 32px; height: 32px; }
  .intro { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 8px; margin: 21px 0 16px; }
  .intro > div:first-child { display: contents; }
  .intro h1 { grid-area: 1/1/2/3; font-size: clamp(2.15rem,7vw,3.2rem); letter-spacing: -.064em; }
  .intro p { margin: 0; grid-row: 2; font-size: .95rem; line-height: 1.43; }
  .unit-group { grid-area: 2/2; align-self: center; padding: 0; }
  .unit-label { display: none; }
  .unit-group .segment { padding: 2px; }
  .unit-group button { min-width: 29px; min-height: 30px; padding: 4px; }
  .workspace { grid-template-columns: 1fr; gap: 12px; }
  .plan-column, .side-column { gap: 12px; }
  .scene { height: clamp(260px,66vw,400px); }
  .plan-head { padding: 10px 10px 0; }
  .plan-head h2 { font-size: .97rem; gap: 5px; }
  .plan-head h2 .icon { width: 18px; }
  .views button { min-width: 31px; min-height: 31px; padding: 5px 6px; gap: 3px; font-size: .84rem; }
  .views .icon { width: 14px; height: 14px; }
  .plan-hint { padding-bottom: 10px; }
  .selection-tools { padding: 9px 11px; gap: 6px; }
  .orientation { gap: 4px; }
  .orientation button { min-height: 37px; padding: 6px 7px; gap: 4px; font-size: .87rem; }
  .result { padding: 13px; }
  .result p { font-size: .89rem; }
  .panel { padding: 15px; }
  .disclosure { padding: 0; }
  .disclosure > summary { padding: 15px; }
  .panel-body { padding-inline: 15px; }
}
@media (max-width: 360px) {
  .shell { width: calc(100% - 20px); }
  .views .icon { display: none; }
  .orientation button { gap: 3px; padding-inline: 5px; }
  .intro p { font-size: .9rem; }
  .scene { height: 242px; }
}

.fit-note, .save-state, #fitAttempt { font-size: .84rem; line-height: 1.45; color: var(--muted); }
.fit-note { margin: -4px 2px 0; }
.save-state { margin-top: 15px; }
.save-state:empty, .fit-attempt:has(button[hidden]):has(#fitAttempt:empty) { display: none; }
.fit-attempt { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
#findFit { min-height: 38px; padding: 6px 11px; border: 1px solid #91a78b; border-radius: 6px; color: var(--ink); background: #f3f5ea; font-weight: 660; }
#findFit:hover { background: #e5ebdb; }

.cargo-item[data-state=warn]::after { content: "!"; display: grid; place-items: center; flex: none; width: 20px; height: 20px; border: 1px solid #b17c4b; border-radius: 50%; color: #804622; background: #f8eada; font-size: .85rem; font-weight: 750; }

.related-plans{display:flex;align-items:center;gap:clamp(.5rem,2vw,1.3rem)}@media(max-width:470px){.related-plans .icon{display:none}.related-plans .garage-link{font-size:.82rem}}
