/* Inventory navigation is separate from saved snapshots and calculation results. */
.inventory-nav { display: flex; gap: 5px; padding: 5px; border-radius: 12px; background: #edf2ed; margin: 18px 0; }
.inventory-nav button { flex: 1; padding: 12px 6px; color: #5b7069; border: 0; border-radius: 8px; background: transparent; font-size: 12px; font-weight: 650; white-space: nowrap; }
.inventory-nav button[aria-pressed=true] { background: #126e62; color: #fff; box-shadow: 0 3px 10px #183b3815; }
#your-items-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; margin-left: 3px; border-radius: 12px; background: #dfe8e1; color: #164a40; font-size: 11px; }
.preset-list { display: grid; gap: 11px; max-height: 530px; overflow: auto; padding: 3px; }
.preset-card { display: flex; align-items: center; gap: 15px; padding: 18px 16px; text-align: left; border: 1px solid #dfe6dd; border-radius: 12px; color: var(--ink); background: linear-gradient(120deg, #fff, #f7f9f3); box-shadow: 0 3px 8px #183b3807; }
.preset-card:hover { border-color: #7caa98; background: #f3f8f0; }
.preset-card strong { display: block; font-size: 18px; font-weight: 650; }
.preset-card small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.preset-house { display: grid; place-items: center; width: 54px; height: 54px; flex-shrink: 0; background: #e3eee4; color: #4b806c; border-radius: 12px; font-size: 40px; line-height: 1; }
.preset-arrow { margin-left: auto; color: var(--teal); font-size: 22px; }
#preset-review h3 { font-size: 22px; margin-top: 10px; }
/* Keep quantities clear of both classic and overlay scrollbars. Overlay bars
   do not reserve a scrollbar-gutter, so retain explicit inner spacing too. */
.preset-contents { list-style: none; padding: 0 18px 0 0; max-height: 310px; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #bfcec6 transparent; overscroll-behavior: contain; border-top: 1px solid var(--line); }
.preset-contents li { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: start; gap: 18px; padding: 10px 2px; border-bottom: 1px solid #edf0e9; font-size: 12px; }
.preset-contents li > span { min-width: 0; overflow-wrap: anywhere; }
.preset-contents strong { white-space: nowrap; font-weight: 600; text-align: end; }
.preset-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.preset-actions .secondary-button { background: var(--teal); color: #fff; border-color: var(--teal); padding: 12px 16px; }
.change-confirm { margin: 14px 0; background: #fff7e7; border: 1px solid #e4d4b4; padding: 12px; border-radius: 8px; font-size: 12px; line-height: 1.5; }
.change-confirm .text-button { margin-left: 10px; }
#inventory-message { color: #35664e; font-size: 12px; line-height: 1.6; }
#inventory-message:empty { display: none; }
.inventory-empty { padding: 35px 18px; border: 1px dashed var(--line); color: var(--muted); border-radius: 10px; text-align: center; font-size: 13px; line-height: 1.7; }
.remove-item { display: none; align-self: center; font-size: 10px; color: #876b59; padding-bottom: 0; }
.inventory[data-view=yours] .remove-item { display: block; }
.inventory[data-view=yours] .catalog-filters { grid-template-columns: 1fr; }
.inventory[data-view=yours] label[for=catalog-category] { display: none; }
.asset-thumbnail { background: radial-gradient(ellipse at 50% 70%, #e1e5de, #f4f5f1 70%); height: 125px; border-radius: 8px; }
.carton-card { padding: 11px; box-shadow: 0 2px 6px #183b3805; }
.carton-grid { gap: 12px; }
.planning-panel { box-shadow: 0 10px 40px #24413806; }
#viewer { background: #f2f3ef; }
@media(max-width:620px) {
    .inventory-nav button { font-size: 11px; }
    .preset-card { padding: 13px; }
    .preset-list { max-height: 420px; }
    .asset-thumbnail { height: 108px; }
}
.packing-profiles { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:14px 0 8px; }
.packing-profiles button { text-align:left; border:1px solid #d7dfd7; background:#fff; color:#24453e; border-radius:14px; padding:14px; cursor:pointer; min-width:0; }
.packing-profiles button[aria-pressed="true"] { border:2px solid #167465; background:#edf6ee; padding:13px; }
.packing-profiles strong,.packing-profiles span,.packing-profiles small { display:block; }
.packing-profiles strong { font-size:15px; margin-bottom:9px; }
.packing-profiles span { font-size:13px; line-height:1.6; }
.packing-profiles small { color:#587269; margin-top:8px; line-height:1.5; }
.support-consent { padding:14px; margin:12px 0; background:#f4f5ee; border-radius:12px; }
.support-consent label { display:flex; align-items:flex-start; gap:9px; font-weight:600; font-size:13px; }
.support-consent input { width:auto; margin-top:3px; flex:none; }
.recommendation-details { margin:12px 0; }
@media(max-width:700px) { .packing-profiles { grid-template-columns:1fr; } }
.room-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 18px; max-height:140px; overflow:auto; }
.room-tabs button { border:1px solid #bfcfc3; background:#fff; padding:9px 13px; border-radius:20px; color:#295448; }
.room-tabs button[aria-pressed=true] { background:#176b5d; color:#fff; border-color:#176b5d; }
#plan-accounting { padding:12px 15px; background:#edf5ed; border-radius:10px; font-size:14px; font-weight:600; }
#viewer { height:clamp(380px,58vh,700px); min-width:0; overflow:hidden; }
.waiting-panel { border:1px solid #deac63; background:#fff6e6; padding:18px; border-radius:14px; margin:16px 0; }
.waiting-panel h3 { color:#805116; margin:0 0 8px; }
.waiting-panel p,.waiting-panel li { font-size:13px; line-height:1.6; }
.waiting-panel ul { padding-left:20px; max-height:280px; overflow:auto; }
.room-assignments { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:12px; margin:14px 0; max-height:750px; overflow:auto; }
.room-assignment { border:1px solid #d9e4da; border-radius:12px; padding:16px; min-width:0; }
.room-assignment>button { border:0; background:transparent; padding:0; color:#176b5d; font-weight:700; font-size:16px; text-align:left; }
.room-assignment ul { padding-left:18px; max-height:240px; overflow:auto; font-size:13px; line-height:1.8; }
#room-size,#layout-select { width:100%; margin:8px 0; }
@media(max-width:620px) { #viewer { height:420px; } .room-tabs button { font-size:12px; } }
/* One primary action, two clearly described presentation modes. */
.build-split { display:flex;position:relative;margin:16px 0 8px;isolation:isolate; }
.build-split .primary-button { margin:0;flex:1;min-width:0;border-radius:11px 0 0 11px;text-align:left; }
#build-mode-label { display:block;font-size:11px;font-weight:400;letter-spacing:.02em;margin-top:5px;opacity:.85; }
#build-mode-toggle { width:52px;flex:none;background:var(--teal);color:white;border:0;border-left:1px solid #ffffff45;border-radius:0 11px 11px 0;font-size:26px; }
.build-mode-menu { position:absolute;left:0;right:0;bottom:calc(100% + 8px);padding:6px;background:#fff;border:1px solid #b6cdbf;border-radius:14px;box-shadow:0 12px 40px #173c3826;z-index:20; }
.build-mode-menu button { display:flex;align-items:center;gap:12px;width:100%;padding:14px 12px;border:0;border-radius:9px;text-align:left;background:white;color:#234d41; }
.build-mode-menu button[aria-checked=true] { background:#eaf3ed; }
.build-mode-menu button:hover { background:#f0f6f0; }
.build-mode-menu strong,.build-mode-menu small { display:block; }
.build-mode-menu strong { font-size:14px; }.build-mode-menu small { font-size:12px;margin-top:5px;line-height:1.5;color:#526e62; }
.mode-glyph { font-size:25px;width:27px;text-align:center;flex:none; }
.build-split button:disabled { opacity:.5;cursor:wait; }
.loading-player { background:linear-gradient(135deg,#f6f9f3,#edf4ee);border:1px solid #ceddd0;border-radius:0 0 16px 16px;padding:20px;margin-top:-5px; }
.loading-title { display:flex;align-items:flex-start;justify-content:space-between;gap:16px; }.loading-title .eyebrow { font-size:10px;margin:0 0 8px; }.loading-title h3 { margin:0;font-size:17px;line-height:1.5; }
#loading-phase { font-size:12px;line-height:1.6;color:#376957;min-height:20px;margin:9px 0 13px; }
.loading-player fieldset { border:0;padding:0;margin:0;min-width:0; }.loading-buttons { display:flex;gap:8px;align-items:center;flex-wrap:wrap; }
#loading-play { background:#176b5d;color:white;border-color:#176b5d;min-width:84px; }
.loading-progress { display:flex;align-items:center;gap:12px;margin:18px 0;font-size:12px; }.loading-progress label { flex:none; }.loading-progress input { flex:1;min-width:30px;accent-color:#176b5d;padding:0; }.loading-progress output { white-space:nowrap;font-variant-numeric:tabular-nums; }
.loading-options { display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:12px; }.loading-options select { width:auto;padding:7px 24px 7px 9px; }.loading-options label:last-child { display:flex;align-items:center;gap:7px;margin-left:auto; }.loading-options input { width:auto;accent-color:#176b5d; }
.loading-disclaimer { font-size:11px;line-height:1.7;color:#617366;margin:16px 0; }.loading-player summary { cursor:pointer;font-size:12px;color:#265744; }
.loading-order { max-height:230px;overflow:auto;padding-left:28px;font-size:12px;line-height:1.7; }.loading-order li { padding:6px;border-radius:7px; }.loading-order li[aria-current=step] { background:#dcebe0; }.loading-order button { border:0;background:transparent;text-align:left;color:#244d3e; }.loading-order small { display:block;color:#67786b; }
.build-split button:focus-visible,.loading-player button:focus-visible,.loading-player input:focus-visible,.loading-player select:focus-visible { outline:3px solid #b47931;outline-offset:3px; }
@media(max-width:620px) { .loading-player { padding:15px 12px; }.loading-title { gap:8px; }.loading-title h3 { font-size:15px; }.loading-progress { gap:8px; }.loading-options label:last-child { margin-left:0; } }
@media(prefers-reduced-motion:reduce) { .build-split *,.loading-player * { scroll-behavior:auto;transition:none; } }
.room-inventory-input { margin:18px 0;padding:18px;border:1px solid #d2ded4;border-radius:14px;background:#f5f8f1; }
.room-inventory-input h3 { margin:0 0 16px;font-size:17px; }.room-inventory-input label { display:block;font-size:12px;font-weight:600;margin-top:12px; }
.room-inventory-input select,.room-inventory-input textarea,.room-inventory-input input { width:100%;margin:7px 0;box-sizing:border-box; }
#room-list-json { resize:vertical;min-height:180px;border:1px solid #c4d4c8;border-radius:8px;padding:12px;background:#fff;color:#24453c;font:11px/1.7 Consolas,monospace; }
.room-list-actions { display:flex;flex-wrap:wrap;gap:10px;align-items:center; }#room-list-status { font-size:12px;line-height:1.6; }
#room-list-preview { padding-left:16px;font-size:11px;line-height:1.7;max-height:200px;overflow:auto; }#room-list-preview li { margin:8px 0; }
.plan-price { padding:15px 18px;background:#edf5ed;border-radius:12px;font-size:16px;font-weight:650;line-height:1.6;margin:18px 0 8px; }.room-rent { color:#176b5d;font-size:13px;font-weight:650; }
