:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #1a2630; background: #f5f3ed; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 85% 0%, #d9e6df 0, transparent 30rem), #f5f3ed; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 44px 0 56px; }
.app-content { transition: opacity .16s ease; }
.loading-card { display: none; min-height: 58vh; place-content: center; justify-items: center; color: #426254; }
.is-loading .app-content { opacity: 0; pointer-events: none; }
.is-loading .loading-card { display: grid; }
.loading-mark { display: block; width: 38px; height: 38px; border: 4px solid #c0d3c9; border-top-color: #426254; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.hero { margin-bottom: 28px; max-width: 670px; }
.eyebrow, .step { margin: 0 0 7px; color: #4f7563; font-size: .72rem; letter-spacing: .13em; font-weight: 800; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.04; font-weight: 500; letter-spacing: -.04em; }
.hero > p:last-child { margin-bottom: 0; color: #53616a; font-size: 1.02rem; }
.planner-grid { display: grid; grid-template-columns: minmax(330px, .86fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.right-column { display: grid; gap: 20px; }
.panel { background: rgba(255,255,255,.88); border: 1px solid #e2e1db; border-radius: 14px; padding: 23px; box-shadow: 0 10px 30px rgba(53,65,57,.05); }
.panel-heading, .frame-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.panel h2 { margin: 0; font: 500 1.28rem/1.1 Georgia, serif; }
.wall-controls { margin: 24px 0 26px; }
label > span, .wall-controls > label { color: #46555c; display: block; margin-bottom: 7px; font-size: .82rem; font-weight: 700; }
.wall-field { display: flex; gap: 9px; }
input { min-width: 0; width: 100%; border: 1px solid #cdd3cf; border-radius: 7px; color: #17242a; background: #fff; padding: 10px 11px; outline-offset: 2px; }
input:focus { border-color: #517b66; outline: 2px solid #d8e7de; }
.unit-toggle { display: flex; border: 1px solid #cdd3cf; border-radius: 7px; overflow: hidden; background: #fff; }
.unit-toggle button { border: 0; min-width: 42px; color: #58676a; background: transparent; padding: 0 9px; font-weight: 700; }
.unit-toggle button + button { border-left: 1px solid #cdd3cf; }
.unit-toggle .active { color: #fff; background: #426c59; }
.field-error { min-height: 1.05em; margin: 5px 0 0; color: #ae3d37; font-size: .74rem; line-height: 1.25; }
.count, .row-width { border-radius: 99px; background: #e6f0e9; color: #38614d; padding: 5px 9px; white-space: nowrap; font-size: .75rem; font-weight: 800; }
.frame-list { display: grid; gap: 10px; margin-top: 15px; }
.empty-frames { margin: 15px 0 10px; padding: 13px; border: 1px dashed #c9d5ce; border-radius: 8px; color: #64736f; text-align: center; font-size: .88rem; }
.frame-card { padding: 12px; border: 1px solid #dce3dd; border-radius: 9px; background: #fcfcfa; }
.frame-card-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.remove-frame { color: #9b3f39; border: 0; border-radius: 6px; background: #fae9e7; padding: 9px 10px; font-size: .78rem; font-weight: 800; }
.measurements { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.frame-field .field-error { display: block; }
.last-frame-note { align-self: end; margin: 0; padding: 10px 2px; color: #78837f; font-size: .76rem; line-height: 1.2; }
.add-frame { width: 100%; margin-top: 13px; padding: 11px; border: 1px solid #719280; border-radius: 7px; color: #315745; background: #eef5f0; font-weight: 800; }
.add-frame:disabled { cursor: not-allowed; border-color: #d6dad6; color: #89918c; background: #f2f3f0; }
.warning { margin: 18px 0 0; border-left: 4px solid #b94e3b; border-radius: 5px; background: #fff0ec; color: #843329; padding: 12px 13px; font-weight: 700; font-size: .9rem; line-height: 1.4; }
.preview { min-height: 210px; display: grid; place-items: center; margin-top: 14px; overflow: hidden; border-radius: 10px; background: #f1f4f0; }
.preview svg { display: block; width: 100%; max-width: 850px; }
.wall-bar { fill: #dae6de; stroke: #93ab9e; stroke-width: 2; }
.frame-rect { fill: #d8a876; stroke: #8d593d; stroke-width: 2; }
.overflow-frame { fill: #f5d5cf; stroke: #b94e3b; stroke-width: 3; }
.frame-label { fill: #422919; font-family: system-ui, sans-serif; font-size: 14px; font-weight: 800; }
.svg-wall-label { fill: #65746e; font-family: system-ui, sans-serif; font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.preview-empty, .results-empty { margin: 0; padding: 24px; color: #67746f; text-align: center; font-size: .9rem; }
.positions-note { margin: 17px 0 11px; color: #64716f; font-size: .86rem; }
.positions { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { color: #66736e; border-bottom: 1px solid #dfe4df; padding: 0 8px 8px; text-align: left; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
td { border-bottom: 1px solid #ebeeeb; padding: 10px 8px; white-space: nowrap; }
td:first-child { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.start-position { color: #285d46; font-weight: 800; }
@media (max-width: 800px) { .shell { width: min(100% - 24px, 640px); padding-top: 28px; } .planner-grid { grid-template-columns: 1fr; } }
@media (max-width: 450px) { .panel { padding: 17px; } .measurements { grid-template-columns: 1fr; } .last-frame-note { padding-top: 0; } .preview { justify-content: start; } }
