.wiata-page {
    --ink: #263c31;
    --muted: #536358;
    --line: #d7dcd0;
    --forest: #24553b;
    --paper: #f7f7f1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px clamp(48px, 7vw, 100px);
    color: var(--ink);
}
.wiata-page [hidden] { display: none !important; }
.wiata-page h1, .wiata-page h2 {
    margin: 0;
    font-family: Merriweather, Georgia, serif;
    color: var(--ink);
    letter-spacing: -.035em;
    line-height: 1.15;
}
.wiata-page h1 { font-size: clamp(32px, 4vw, 55px); font-weight: 500; }
.wiata-page h2 { font-size: clamp(25px, 3vw, 38px); font-weight: 500; }
.wiata-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 25px;
}
.wiata-quote__heading p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}
.wiata-jump, .wiata-product {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 19px;
    border-radius: 6px;
    background: var(--forest);
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}
.wiata-jump:hover, .wiata-product:hover { background: #193e2a; color: white; }
.wiata-workbench {
    display: grid;
    grid-template-columns: clamp(242px, 25%, 302px) minmax(0, 1fr);
    grid-template-areas: "tools tools" "panel model";
    gap: 10px clamp(12px, 1.5vw, 20px);
    align-items: start;
}
.wiata-workbench[data-panel-open="false"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "tools" "model";
}
.wiata-workbench[data-panel-open="false"] .wiata-inspector { display: none; }
.wiata-view-tools { grid-area: tools; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wiata-view-tools button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 13px;
    min-height: 42px;
    border: 1px solid #bcc8bb;
    border-radius: 6px;
    background: white;
    color: var(--ink);
    font-weight: 600;
    font-size: 13px;
    line-height: 1.25;
}
.wiata-view-tools button[aria-expanded="true"], .wiata-view-tools button[aria-pressed="true"] {
    background: #e8efe7;
    border-color: #9aad9a;
    color: var(--forest);
}
.wiata-view-tools button:hover { border-color: var(--forest); }
.wiata-view-tools svg, .wiata-camera svg { flex: none; }
.wiata-icon-contract, [data-wiata-fullscreen][aria-pressed="true"] .wiata-icon-expand { display: none; }
[data-wiata-fullscreen][aria-pressed="true"] .wiata-icon-contract { display: inline; }
.wiata-view-tools:not(:has(button:not([hidden]))) { display: none; }
.wiata-inspector { grid-area: panel; }
.wiata-model-column {
    grid-area: model;
    display: grid;
    min-width: 0;
    gap: 12px;
}
.wiata-inspector, .wiata-element-info, .wiata-stage-wrap {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
}
.wiata-stage-wrap { min-width: 0; background: var(--paper); overflow: hidden; }
.wiata-stage {
    position: relative;
    isolation: isolate;
    height: clamp(425px, 36vw, 525px);
    background: radial-gradient(ellipse at 42% 33%, #fbfaf6, #ecebe3 75%, #e5e5dd);
}
@media (min-width: 801px) {
    .wiata-workbench[data-panel-open="false"]:not(.is-expanded-view):not(:fullscreen) .wiata-stage {
        height: clamp(480px, 45vw, 660px);
    }
}
@media (pointer: coarse) and (max-height: 540px) and (orientation: landscape) {
    .wiata-workbench:not(.is-expanded-view) .wiata-stage {
        max-height: 72vh;
        max-height: 72svh;
    }
}
.wiata-stage canvas, .wiata-poster, [data-wiata-labels] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.wiata-stage canvas { display: block; opacity: 0; touch-action: none; }
.wiata-stage[data-state="ready"] canvas { opacity: 1; cursor: grab; }
.wiata-stage[data-state="ready"] canvas:active { cursor: grabbing; }
.wiata-poster { object-fit: contain; background: #b7b7af; }
.wiata-stage[data-state="ready"] .wiata-poster { visibility: hidden; }
[data-wiata-labels] { pointer-events: none; overflow: hidden; }
.wiata-layers, .wiata-camera {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    background: #fffffff5;
    border: 1px solid #cdd1c6;
    border-radius: 7px;
    box-shadow: 0 2px 6px #273a2514;
}
.wiata-layers { left: 16px; top: 16px; padding: 0 4px; }
.wiata-layers label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    cursor: pointer;
    padding: 0 10px;
    position: relative;
    font-size: 13px;
    font-weight: 600;
}
.wiata-layers input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.wiata-switch {
    width: 27px;
    height: 16px;
    border: 1px solid #89978b;
    border-radius: 15px;
    background: #f5f6ef;
    display: flex;
    align-items: center;
    padding: 2px;
}
.wiata-switch::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #68786a; }
.wiata-layers input:checked + .wiata-switch { background: var(--forest); border-color: var(--forest); }
.wiata-layers input:checked + .wiata-switch::before { transform: translateX(10px); background: white; }
.wiata-page :focus-visible, .wiata-layers input:focus-visible + .wiata-switch { outline: 3px solid #237951; outline-offset: 3px; }
.wiata-page canvas:focus-visible { outline-offset: -4px; }
.wiata-camera { bottom: 14px; right: 15px; }
.wiata-camera button { display: grid; place-items: center; min-width: 43px; height: 42px; font-size: 23px; color: var(--ink); }
.wiata-camera button + button { border-left: 1px solid var(--line); }
.wiata-camera button:enabled:hover { background: #e8eee6; }
.wiata-camera button:disabled, .wiata-layers label:has(input:disabled) { opacity: .6; }
.wiata-stage-wrap [data-wiata-status] {
    padding: 9px 16px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}
.wiata-stage-wrap [data-wiata-status]:empty { display: none; }
.wiata-metrics { margin: 0; }
.wiata-metrics > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding: 11px 0; }
.wiata-metrics dt { font-size: 13px; color: var(--muted); }
.wiata-metrics dd { margin: 0; font-size: 14px; font-weight: 650; color: var(--ink); text-align: right; white-space: nowrap; }
.wiata-detail-figure { margin: 18px 0 0; }
.wiata-detail-figure img { display: block; width: 100%; aspect-ratio: 2; object-fit: cover; border-radius: 5px; }
.wiata-detail-figure figcaption { margin-top: 5px; color: var(--muted); font-size: 12px; }
.wiata-bom, .wiata-quote { margin-top: clamp(44px, 5vw, 72px); scroll-margin-top: 100px; }
.wiata-bom__scroll { margin-top: 20px; border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
.wiata-bom__table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--ink); }
.wiata-bom__table td, .wiata-bom__table th { text-align: left; vertical-align: middle; padding: 12px; }
.wiata-bom__table thead { background: #e9eee5; }
.wiata-bom__table thead th { font-size: 12px; font-weight: 650; }
.wiata-bom__table th:first-child, .wiata-bom__table td:first-child { padding-left: 16px; padding-right: 0; width: 37px; }
.wiata-bom__table tbody tr + tr { border-top: 1px solid var(--line); }
.wiata-bom__table tbody tr:nth-child(even) { background: #f9faf6; }
.wiata-bom__table small { display: block; margin-top: 3px; font-size: 12px; font-weight: normal; color: var(--muted); }
.wiata-bom__table a, .wiata-bom__note a, .wiata-quote a { color: var(--forest); text-decoration: underline; text-underline-offset: 2px; }
.wiata-bom__table strong { white-space: nowrap; }
.wiata-bom__table .wiata-bom__qty { width: 76px; min-height: 40px; padding: 7px; border: 1px solid #acb7ac; background: white; border-radius: 5px; }
.wiata-bom__table .wiata-bom__qty:disabled { background: #eceee8; }
.wiata-bom__table .td-check, .wiata-quote .td-check { width: 19px; height: 19px; cursor: pointer; accent-color: var(--forest); }
.wiata-all-label { display: none; }
.wiata-bom__note, .wiata-bom__status, .wiata-quote__message small, .wiata-quote__actions p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.wiata-bom__note { max-width: 90ch; margin: 15px 0; }
.wiata-bom__actions, .wiata-quote__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.wiata-bom__status:not(:empty) { margin-top: 10px; }
.wiata-quote { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: clamp(18px, 3vw, 40px); }
.wiata-quote__form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(210px, .75fr); gap: 17px 30px; margin-top: 22px; }
.wiata-quote__fields { display: grid; gap: 12px; }
.wiata-quote__form .td-input, .wiata-page .td-textarea { width: 100%; border: 1px solid #aeb8ac; border-radius: 5px; background: white; }
.wiata-quote__message .td-textarea { min-height: 211px; resize: vertical; }
.wiata-quote__consent, .wiata-quote__actions { grid-column: 1 / -1; }
.wiata-quote__consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.6; }
.wiata-quote__consent input { flex-shrink: 0; }

@media (max-width: 800px) {
    .wiata-page { padding: 12px 16px 44px; }
    .wiata-intro { display: block; }
    .wiata-jump { margin-top: 15px; }
    .wiata-workbench { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tools" "model" "panel"; }
    .wiata-workbench[data-panel-open="true"] { grid-template-areas: "tools" "panel" "model"; }
    .wiata-workbench[data-panel-open="true"] .wiata-inspector { max-height: min(45vh, 23rem); overflow-y: auto; }
    .wiata-stage { height: clamp(330px, 65vw, 465px); }
    .wiata-detail-figure { display: none; }
    .wiata-layers { left: 10px; top: 10px; }
    .wiata-quote__form { grid-template-columns: 1fr; }
    .wiata-bom__table thead th:not(:first-child) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
    .wiata-bom__table thead, .wiata-bom__table thead tr, .wiata-bom__table thead th:first-child, .wiata-bom__table tbody { display: block; width: 100%; }
    .wiata-bom__table thead th:first-child { padding: 12px; }
    .wiata-bom__table thead label { display: inline-flex; gap: 10px; align-items: center; }
    .wiata-all-label { display: inline; }
    .wiata-bom__table tbody tr { display: grid; padding: 14px; gap: 10px; }
    .wiata-bom__table tbody th, .wiata-bom__table tbody td, .wiata-bom__table tbody td:first-child { padding: 0; }
    .wiata-bom__table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
}
@media (max-width: 380px) {
    .wiata-metrics dd { white-space: normal; }
    .wiata-layers label { padding: 0 7px; }
}
@media (max-width: 550px) {
    .wiata-stage-wrap { padding-top: 44px; }
    .wiata-layers {
        inset: -44px 0 auto;
        height: 44px;
        padding-left: 8px;
        border: 0;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
        box-shadow: none;
    }
}
