:root{--black:#111;--wood:#c99452;--wood-light:#e0bb7a;--wood-dark:#7b5528;--bg:#f4f6f3}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:#111}header{background:white;border-bottom:4px solid var(--green);padding:14px 22px;display:flex;align-items:center;justify-content:space-between;gap:18px}.brand{display:flex;align-items:center;gap:14px}.logo-text{font-size:42px;font-weight:900;color:#18303d;letter-spacing:-2px}header h1{margin:0;color:var(--green-dark);font-size:30px;text-align:right}.app{max-width:1440px;margin:0 auto;padding:16px;display:grid;grid-template-columns:330px 1fr;gap:16px}.panel,.sheet{background:white;border:1px solid #d6ddd3;border-radius:12px;box-shadow:0 8px 22px rgba(0,0,0,.08)}.panel{padding:16px}.type-tabs{max-width:1440px;margin:14px auto 0;padding:0 16px;display:flex;gap:8px}.type-tab{width:auto;margin:0;padding:11px 26px;background:#fff;color:var(--green-dark);border:2px solid var(--green);border-radius:10px 10px 0 0}.type-tab.active{background:var(--green);color:#fff}.type-tab:hover{background:var(--green-dark);color:#fff}.conditional.hidden{display:none}.section-title{background:var(--green);color:white;padding:9px 12px;margin:14px 0 10px;border-radius:8px;font-weight:bold}label{display:block;font-weight:bold;font-size:13px;margin-top:9px}input,select{width:100%;box-sizing:border-box;padding:8px;border:1px solid #c8d1c4;border-radius:7px;margin-top:4px;font-size:14px}button{width:100%;margin-top:12px;padding:12px;background:var(--green);color:white;border:0;border-radius:8px;font-size:15px;font-weight:bold;cursor:pointer}button:hover{background:var(--green-dark)}.sheet{padding:14px}.sheet-top{display:flex;justify-content:space-between;align-items:center;border-bottom:3px solid var(--green);padding-bottom:10px;margin-bottom:12px}.sheet-top h2{margin:0;color:var(--green-dark);font-size:26px}.badges span{display:inline-block;margin-top:7px;margin-right:6px;padding:7px 11px;background:var(--green);color:white;border-radius:4px;font-weight:bold}.badges span.black{background:var(--black)}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.box{border:1px solid #d0d7cc;border-radius:10px;padding:8px;background:#fff}.box.wide{grid-column:1/-1}.box h3{margin:0 0 8px;padding:8px;background:var(--green);color:white;text-align:center;border-radius:7px;font-size:15px}svg{width:100%;height:auto;background:#fff}.box.wide svg{background:linear-gradient(180deg,#ffffff 0%,#f7faf7 75%,#eef3ee 100%)}.cost-results{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.cost-tile{border:2px solid var(--green);border-radius:10px;padding:15px;background:#f1f8f1}.cost-tile span{display:block;font-size:13px;color:#275d36}.cost-tile strong{display:block;font-size:23px;color:#145526;margin-top:6px}.summary{margin-top:12px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.summary-card{border:1px solid #d0d7cc;border-radius:10px;padding:12px;line-height:1.55}.summary-card h3{margin:0 0 8px;color:var(--green-dark)}table{width:100%;border-collapse:collapse;font-size:13px}th,td{border:1px solid #ccd4c8;padding:6px;text-align:center}th{background:#eef5ec}.note{font-size:12px;opacity:.75;margin-top:8px}@media(max-width:1000px){.app,.grid,.summary{grid-template-columns:1fr}header{display:block;text-align:center}header h1{text-align:center;margin-top:8px}.brand{justify-content:center}}@media print{.panel,button,.type-tabs{display:none!important}body{background:white}.app{display:block;max-width:none;padding:0}.sheet{box-shadow:none;border:0;border-radius:0}@page{size:A4 portrait;margin:0}}
/* Większe, pełnoszerokościowe rzuty 2D: bez obcinania wymiarów. */
@media screen and (min-width:1001px){
 .sheet .grid>.box:not(.wide){grid-column:1 / -1}
 .sheet .grid>.box:not(.wide)>svg{display:block;width:100%;height:560px;object-fit:contain}
}
@media screen and (max-width:1000px){
 .sheet .grid>.box:not(.wide)>svg{display:block;width:100%;height:auto}
}

/* Przełącznik orientacji desek dolnych */
/* Kompaktowy przełącznik X/Y z miękką animacją */
.orientation-control{display:flex;align-items:center;gap:9px;margin:4px 0 12px;padding:2px 0;justify-content:flex-start}
.orientation-axis{font-size:12px;font-weight:750;color:#819087;transition:color .3s ease;line-height:1}
.orientation-axis.selected{color:#145526}
.orientation-toggle{position:relative;display:inline-flex;align-items:center;width:52px;height:28px;min-width:52px;border:1px solid #c3d7c9;border-radius:999px;background:#e6eee8;padding:3px;cursor:pointer;transition:background-color .35s ease,border-color .35s ease,box-shadow .35s ease;box-sizing:border-box;appearance:none;box-shadow:inset 0 1px 3px #00000012}
.orientation-toggle[aria-checked="true"]{background:#237849;border-color:#237849;box-shadow:inset 0 1px 3px #00000013,0 0 0 2px #2378490a}
.orientation-toggle:hover{box-shadow:inset 0 1px 3px #00000012,0 0 0 3px #23784912}
.orientation-toggle:focus-visible{outline:2px solid #83bba0;outline-offset:3px}
.orientation-dot{display:block;width:20px;height:20px;flex:none;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0003;transform:translateX(0);transition:transform .44s cubic-bezier(.22,1.35,.42,1),box-shadow .3s ease;will-change:transform}
.orientation-toggle[aria-checked="true"] .orientation-dot{transform:translateX(24px)}
.orientation-toggle:active .orientation-dot{box-shadow:0 1px 7px #0004;scale:1.1 .94}
.orientation-dot{transition:transform .55s cubic-bezier(.2,1.55,.35,1),scale .22s ease,box-shadow .3s ease}
.orientation-toggle.switch-pop .orientation-dot{animation:toggle-glide .55s cubic-bezier(.2,1.25,.35,1)}
@keyframes toggle-glide{0%{scale:1 1}35%{scale:1.2 .84}70%{scale:.94 1.06}100%{scale:1 1}}
@media(prefers-reduced-motion:reduce){.orientation-toggle,.orientation-dot,.orientation-axis{transition:none;animation:none!important}}

/* MAKO-DREW / odświeżony interfejs */
:root{--ink:#17271d;--muted:#65736a;--surface:#fff;--edge:#dce7dc;--ease:cubic-bezier(.22,1,.36,1)}
body{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:radial-gradient(circle at 85% 0%,#e8f2e7 0,transparent 35%),#f4f7f3}
header{border-bottom:1px solid #dbe8dd;box-shadow:0 3px 18px #173a2210;padding:17px 28px}
.logo-text{letter-spacing:-2.3px}header h1{font-size:clamp(18px,2.3vw,28px);letter-spacing:-.7px}
.app{gap:20px;padding:20px}.panel,.sheet{border:1px solid var(--edge);border-radius:18px;box-shadow:0 12px 34px #173a2210}
.panel{padding:18px}.sheet{padding:18px}.section-title{background:#e9f3e9;color:#1b6335;border-radius:9px;font-size:13px;letter-spacing:.15px;padding:11px 13px}
label{color:#3e5344}input,select{border:1px solid #d7e2d8;background:#fbfdfb;border-radius:9px;padding:10px 11px;transition:border-color .2s,box-shadow .2s,background .2s}
input:focus,select:focus{outline:none;border-color:#39935a;box-shadow:0 0 0 3px #2c985322;background:#fff}
button{transition:background .2s,transform .22s var(--ease),box-shadow .2s}button:active{transform:scale(.985)}
.type-tabs{gap:8px;margin-top:20px}.type-tab{position:relative;overflow:hidden;border:1px solid #d6e6d9;border-radius:13px;padding:12px 22px;box-shadow:0 3px 12px #183d2510;transition:color .3s,background .35s,box-shadow .35s,transform .35s var(--ease)}
.type-tab.active{background:#1c7040;border-color:#1c7040;box-shadow:0 7px 20px #1c704030;transform:translateY(-2px)}
.type-tab:hover{transform:translateY(-2px)}.type-tab.active:hover{background:#176337}
.sheet-top{border-bottom:1px solid #e0eae0;padding-bottom:14px}.sheet-top h2{font-size:clamp(20px,2.2vw,27px);letter-spacing:-.65px}
.badges span{border-radius:8px;font-size:12px;letter-spacing:.2px;padding:8px 10px}
.box{border:1px solid #e1e9e1;border-radius:14px;padding:10px;box-shadow:0 3px 13px #203e2110;overflow:hidden;transition:box-shadow .3s,transform .3s var(--ease)}
.box:hover{box-shadow:0 9px 26px #203e211b}.box h3{background:#eaf3eb;color:#236a3d;border-radius:9px;font-size:12px;letter-spacing:1px;padding:10px}
.box svg{display:block}.summary-card,.cost-tile{border-radius:13px}.summary-card{border-color:#e0e9e0}.cost-tile{border:1px solid #cce3d1;background:linear-gradient(135deg,#f0f9f1,#fff);padding:18px}.cost-tile strong{letter-spacing:-.6px}
.orientation-toggle{transition:background .35s var(--ease),box-shadow .3s}.orientation-toggle:focus-visible,.type-tab:focus-visible{outline:3px solid #5cb47b;outline-offset:3px}
.visual-enter{animation:visualReveal .52s var(--ease) both}
.visual-enter svg{animation:visualDraw .58s var(--ease) both;transform-origin:center}
@keyframes visualReveal{from{opacity:.55;filter:brightness(1.055)}to{opacity:1;filter:brightness(1)}}
@keyframes visualDraw{from{opacity:.58;transform:translateY(6px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
.type-switch-enter{animation:typePanel .55s var(--ease) both}
.type-switch-enter .box{animation:typeCard .55s var(--ease) both}
.type-switch-enter .box:nth-child(2){animation-delay:.045s}
.type-switch-enter .box:nth-child(3){animation-delay:.08s}
.type-switch-enter .box:nth-child(4){animation-delay:.12s}
.type-switch-enter .box:nth-child(5){animation-delay:.16s}
@keyframes typePanel{from{opacity:.68}to{opacity:1}}
@keyframes typeCard{from{opacity:.45;transform:translateY(13px) scale(.986)}to{opacity:1;transform:translateY(0) scale(1)}}
.conditional:not(.hidden){animation:controlReveal .38s var(--ease) both}
@keyframes controlReveal{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important}}
@media print{.visual-enter,.visual-enter svg,.type-switch-enter,.type-switch-enter .box,.conditional:not(.hidden){animation:none!important;transform:none!important;filter:none!important}}

/* Liquid tab navigation */
.liquid-tabs{position:relative;isolation:isolate;display:flex;width:max-content;max-width:calc(100% - 32px);padding:5px!important;gap:3px!important;background:#e7f0e8;border:1px solid #d0e2d3;border-radius:18px;box-shadow:inset 0 2px 5px #123a2410,0 8px 22px #123a2412;overflow:hidden}
.liquid-tabs .type-tab{position:relative;z-index:2;flex:1;margin:0!important;min-width:138px;border:0!important;border-radius:13px!important;background:transparent!important;box-shadow:none!important;color:#526b58!important;transform:none!important;transition:color .38s ease!important}
.liquid-tabs .type-tab.active{color:white!important;text-shadow:0 1px 2px #123c2440}
.liquid-tabs .type-tab:hover{transform:none!important;color:#1b5c34!important}
.liquid-tabs .type-tab.active:hover{color:white!important}
.liquid-indicator{position:absolute;z-index:1;left:5px;top:5px;height:calc(100% - 10px);width:120px;border-radius:14px;background:linear-gradient(125deg,#22834a,#145a33);box-shadow:0 5px 13px #155d3542,inset 0 1px 1px #ffffff50;transform:none;transform-origin:0 0;transition:none!important;animation:none!important;will-change:transform;pointer-events:none}
.liquid-indicator::after{content:"";position:absolute;inset:2px 16% auto 16%;height:35%;border-radius:100%;background:linear-gradient(#ffffff3d,#ffffff00);pointer-events:none}
.extra-layer-section{margin-top:16px;border:1px solid #cde2d1;background:linear-gradient(145deg,#f1f8f2,#fff);padding:12px;border-radius:14px}
.extra-layer-section.hidden{display:none}.extra-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.extra-head strong{font-size:13px;color:#185c33}.extra-head small{display:block;font-size:11px;color:#647568;margin-top:4px}
.extra-master-switch{flex:0 0 48px!important;width:48px!important;height:27px!important;border-radius:99px!important;margin:0!important;padding:3px!important;background:#d5e4d7!important;box-shadow:inset 0 1px 3px #183b2422;transition:background .35s!important}
.extra-master-switch[aria-checked="true"]{background:#247a45!important}.extra-master-dot{display:block;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 2px 5px #0003;transition:transform .5s cubic-bezier(.2,1.4,.3,1)}.extra-master-switch[aria-checked="true"] .extra-master-dot{transform:translateX(21px)}.extra-controls{padding-top:10px;animation:controlReveal .35s ease both}.extra-controls[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){.liquid-tabs.liquid-moving .liquid-indicator{animation:none!important}}
/* Animated old-to-new pallet transition */
.box{position:relative}
.pallet-transition-layer{position:absolute;z-index:3;pointer-events:none;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:inherit;background:rgba(255,255,255,.10)}
.pallet-transition-layer svg{width:100%;height:100%;object-fit:contain;animation:oldPalletOut .55s cubic-bezier(.25,.7,.3,1) both}
@keyframes oldPalletOut{0%{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}100%{opacity:0;transform:translateY(-12px) scale(.96);filter:blur(4px)}}
.pallet-new-draw{animation:newPalletIn .7s cubic-bezier(.18,1,.3,1) both;transform-origin:50% 55%}
@keyframes newPalletIn{0%{opacity:.15;transform:translateY(12px) scale(.96);filter:blur(3px)}65%{opacity:1;filter:blur(0)}100%{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}}
@media(max-width:600px){.liquid-tabs{width:calc(100% - 32px)}.liquid-tabs .type-tab{min-width:0;padding:11px 12px}}
@media(prefers-reduced-motion:reduce){.liquid-indicator{transition:none!important}.pallet-transition-layer,.pallet-new-draw{animation:none!important}}
@media print{.pallet-transition-layer{display:none!important}.pallet-new-draw{animation:none!important}}

/* Shared switch design: all new toggles inherit the orientation animation */
.extra-master-switch.orientation-toggle{position:relative;display:inline-flex;align-items:center;flex:0 0 52px!important;width:52px!important;min-width:52px;height:28px!important;padding:3px!important;margin:0!important;box-sizing:border-box;border:1px solid #c3d7c9!important;border-radius:999px!important;background:#e6eee8!important;box-shadow:inset 0 1px 3px #00000012!important;transition:background-color .36s ease,border-color .36s ease,box-shadow .36s ease!important}
.extra-master-switch.orientation-toggle[aria-checked="true"]{background:#237849!important;border-color:#237849!important}
.extra-master-switch .extra-master-dot.orientation-dot{width:20px;height:20px;min-width:20px;display:block;border-radius:50%;transform:translateX(0);box-shadow:0 1px 4px #0003;transition:transform .55s cubic-bezier(.22,1.13,.35,1),box-shadow .3s ease,scale .25s ease;will-change:transform}
.extra-master-switch[aria-checked="true"] .extra-master-dot.orientation-dot{transform:translateX(24px)}
.extra-master-switch.switch-pop .extra-master-dot.orientation-dot{animation:toggle-glide .55s cubic-bezier(.2,1.25,.35,1)}
@media(prefers-reduced-motion:reduce){.extra-master-switch .extra-master-dot.orientation-dot{animation:none!important;transition:none!important}.liquid-tabs.liquid-moving .liquid-indicator{animation:none!important}}

/* Tab motion is owned by moveLiquidIndicator in ui/animations.js. */
.liquid-tabs{overflow:visible!important;contain:layout style}
.liquid-indicator::before{content:"";position:absolute;inset:0;border-radius:inherit;background:inherit;filter:blur(8px);opacity:.20;z-index:-1}
.liquid-tabs .type-tab{transition:color .48s cubic-bezier(.25,.1,.25,1)!important}
/* SVG motion: old drawing recedes while new drawing emerges; never affects export */
.box{isolation:isolate}
.pallet-transition-layer{inset:auto!important;display:block!important;background:transparent!important;overflow:hidden!important;z-index:4!important;transform-origin:center center;animation:makoOldFade .55s cubic-bezier(.25,.1,.25,1) both;}
.pallet-transition-layer svg{display:block;width:100%!important;height:auto!important;animation:none!important;filter:none!important;transform:none!important}
.pallet-new-draw{animation:makoNewFade .66s cubic-bezier(.22,1,.36,1) both!important;transform-origin:50% 50%}
@keyframes makoOldFade{0%{opacity:.95;transform:translateY(0) scale(1);filter:blur(0)}100%{opacity:0;transform:translateY(-5px) scale(.975);filter:blur(2px)}}
@keyframes makoNewFade{0%{opacity:.22;transform:translateY(7px) scale(.975);filter:blur(1.8px)}65%{opacity:1;filter:blur(0)}100%{opacity:1;transform:none;filter:none}}
@media(prefers-reduced-motion:reduce){.pallet-new-draw,.pallet-transition-layer{animation:none!important}.liquid-indicator{transition:none!important}}
@media print{.pallet-transition-layer{display:none!important}.pallet-new-draw{animation:none!important;transform:none!important}}

/* Delikatny motion blur: wyłącznie w ruchu, ostry stan końcowy. */
@keyframes makoOldFade{0%{opacity:.95;transform:translateY(0) scale(1);filter:blur(0)}45%{opacity:.55;transform:translateY(-3px) scale(.987);filter:blur(1.3px)}100%{opacity:0;transform:translateY(-5px) scale(.975);filter:blur(2.5px)}}
@keyframes makoNewFade{0%{opacity:.2;transform:translateY(7px) scale(.975);filter:blur(2.5px)}38%{opacity:.8;filter:blur(1px)}75%{opacity:1;filter:blur(.25px)}100%{opacity:1;transform:none;filter:blur(0)}}
@keyframes visualDraw{0%{opacity:.58;transform:translateY(6px) scale(.985);filter:blur(1.7px)}55%{opacity:.9;filter:blur(.55px)}100%{opacity:1;transform:none;filter:blur(0)}}
@keyframes typeCard{0%{opacity:.45;transform:translateY(13px) scale(.986);filter:blur(1.6px)}65%{filter:blur(.4px)}100%{opacity:1;transform:none;filter:blur(0)}}
@keyframes controlReveal{0%{opacity:0;transform:translateY(-5px);filter:blur(1.1px)}100%{opacity:1;transform:none;filter:blur(0)}}
@keyframes toggle-glide{0%{scale:1 1;filter:blur(0)}35%{scale:1.2 .84;filter:blur(.8px)}70%{scale:.94 1.06;filter:blur(.35px)}100%{scale:1 1;filter:blur(0)}}
@keyframes extraToggleGlide{0%{filter:blur(0)}45%{filter:blur(.8px)}100%{filter:blur(0)}}
.extra-master-switch.switch-pop .extra-master-dot{animation:extraToggleGlide .55s ease both}
@media(prefers-reduced-motion:reduce){.pallet-transition-layer,.pallet-new-draw,.visual-enter,.visual-enter svg,.type-switch-enter .box,.conditional:not(.hidden),.orientation-toggle.switch-pop .orientation-dot,.extra-master-switch.switch-pop .extra-master-dot{animation:none!important;filter:none!important}}
@media print{.liquid-indicator,.orientation-dot,.pallet-new-draw,.visual-enter svg,.type-switch-enter .box{filter:none!important;animation:none!important}}

@media print{body{background:#fff!important;color:#111!important}.panel,.sheet,.box{background:white!important;color:#111!important;border-color:#ddd!important;box-shadow:none!important}.box svg{background:white!important}}

/* Nowe animacje: nieruchoma kamera, deski przesuwają się wewnątrz SVG */
@media screen{
 .visual-enter,.visual-enter svg,.type-switch-enter,.type-switch-enter .box,
 .pallet-new-draw,.pallet-transition-layer{animation:none!important;filter:none!important;transform:none!important}
 .extra-layer-section{background:#293c32!important;border:1px solid #42634c!important;box-shadow:inset 0 1px 0 #ffffff0c,0 5px 16px #00000016!important}
 .extra-layer-section .extra-head{background:#31483a!important;border-color:#4a6c53!important}
 .extra-layer-section .extra-head strong{color:#d9f1df!important}
 .extra-layer-section .extra-head small{color:#a5c4ad!important}
 .extra-layer-section .extra-controls{background:#293c32!important;border-color:#405b49!important}
 .extra-layer-section label{color:#c5ddcb!important}
 .extra-layer-section input,.extra-layer-section select{background:#1e2e25!important;border-color:#4a6852!important;color:#effaf1!important}
}
/* Animacja konstrukcji: stabilna kamera, zero rozmycia, ostre linie i miękki ruch */
#topView,#bottomView,#sideLengthView,#sideWidthView,#isoView{filter:none!important;transform:none!important;backface-visibility:hidden}
@media(prefers-reduced-motion:reduce){#topView,#bottomView,#sideLengthView,#sideWidthView,#isoView{transition:none!important}}

/* Duże, wygodne sterowanie wartościami liczbowymi */
.mako-number-control{display:flex;align-items:stretch;gap:5px;width:100%;min-height:46px;margin:3px 0 10px}
.mako-number-control input[type=number]{min-width:0;flex:1;width:100%;margin:0!important;text-align:center;font-size:15px;font-weight:650;appearance:textfield;-moz-appearance:textfield}
.mako-number-control input::-webkit-inner-spin-button,.mako-number-control input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.mako-step{display:grid;place-items:center;flex:0 0 46px;min-width:46px;height:46px;border-radius:11px;border:1px solid #53635a;background:#34433a;color:#e8f5eb;font-size:24px;font-weight:450;line-height:1;cursor:pointer;user-select:none;transition:background .18s,transform .18s}
.mako-step:hover{background:#246b43;border-color:#3d9663}.mako-step:active{transform:scale(.94)}
.mako-step:focus-visible{outline:2px solid #7bd59c;outline-offset:2px}
@media(max-width:550px){.mako-step{flex-basis:44px;min-width:44px;height:46px}}
@media print{.mako-step{display:none!important}}
/* Wyraźniejsze nagłówki sekcji ustawień */
@media screen{
 .panel .section-title{font-size:18px!important;font-weight:750!important;line-height:1.3!important;letter-spacing:.05px!important;padding:13px 14px!important;margin-top:19px!important;margin-bottom:12px!important}
 .extra-layer-section .extra-head strong{font-size:17px!important;font-weight:750!important;line-height:1.3!important;letter-spacing:.05px!important}
 .extra-layer-section .extra-head small{font-size:12px!important;line-height:1.5!important}
}
.chamfer-setting{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 14px;margin-bottom:16px;border:1px solid #47624e;border-radius:13px;background:#2a4033}
.chamfer-setting strong{display:block;font-size:17px;color:#e0f4e5}.chamfer-setting small{display:block;color:#a8c8b0;font-size:12px;margin-top:4px}
@media print{.chamfer-setting{display:none!important}}

.chamfer-depth{margin:-7px 0 18px;padding:13px 15px 15px;border:1px solid #405849;background:#26382d;border-radius:12px;transition:opacity .25s ease}
.chamfer-depth.is-disabled{opacity:.45}
.chamfer-depth-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:11px;font-size:13px;color:#dcece0}
.chamfer-depth output{font-weight:750;color:#8de1a3;font-size:16px;font-variant-numeric:tabular-nums}
.chamfer-depth input[type=range]{width:100%;height:7px;accent-color:#58b977;cursor:pointer;padding:0;border:0;background:transparent;box-shadow:none}
.chamfer-depth-foot{display:flex;justify-content:space-between;color:#98b6a0;font-size:11px;margin-top:7px}
@media print{.chamfer-depth{display:none!important}}
.front-markings{margin-top:22px;padding:14px;border:1px solid #486451;border-radius:12px;background:#26372d}.front-markings .section-title{margin-top:0}.mark-help{font-size:12px;line-height:1.5;color:#bed3c4;margin:8px 0}.mark-grid{display:grid;gap:10px}.mark-item{padding:10px;border:1px solid #46594d;border-radius:10px;background:#303d34;color:#e9f3ec}.mark-item strong{display:block;margin-bottom:6px;font-size:13px}.mark-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.mark-upload{display:inline-block;padding:8px 10px;background:#1f7a3a;color:white;border-radius:7px;cursor:pointer;font-size:12px}.mark-upload input{display:none}.mark-remove{padding:7px 9px!important;margin:0!important;width:auto!important;font-size:12px!important;background:#425348!important;color:#e4f2e8!important}.mark-preview{max-width:54px;max-height:40px;object-fit:contain}.mark-item .mark-state{font-size:11px;color:#b6ccbc} 
.mark-item.mark-disabled{opacity:.52;background:#252e29;border-color:#3c4840}
.mark-item.mark-disabled .mark-upload{cursor:not-allowed;background:#46534a}
.mark-item.mark-disabled .mark-remove{cursor:not-allowed}

.liquid-tabs .type-tab{min-width:125px}
.expert-section{border:1px solid #486651;border-radius:16px;background:linear-gradient(145deg,#1d3025,#18231d);padding:16px;overflow:hidden;color:#e6f5e9}
.expert-section[hidden]{display:none!important}
.expert-head,.expert-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.expert-head h3{margin:0;color:#a4e9b6;font-size:17px;letter-spacing:.07em}.expert-head p{margin:7px 0;color:#b5c9ba;font-size:13px}
#expertReset{width:auto;padding:10px 16px;background:#245a39;border:1px solid #5b966c;color:#fff;border-radius:9px;cursor:pointer}
#expertView{background:radial-gradient(ellipse at 50% 45%,#30483a 0%,#1b2b22 65%,#132018 100%)!important;border-radius:12px;display:block;width:100%;height:auto;max-height:min(88vh,980px);min-height:430px;touch-action:none;cursor:grab;user-select:none}
.expert-stage{position:relative;min-width:0}.expert-zoom{position:absolute;right:9px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;gap:12px;padding:14px 9px;border:1px solid #57765e;border-radius:14px;background:#14241ddd;z-index:5;color:#c6ead0;box-shadow:0 4px 16px #0005}.expert-zoom input{writing-mode:vertical-lr;direction:rtl;appearance:slider-vertical;width:22px;height:190px;accent-color:#80d39a;cursor:pointer}.expert-zoom output{font-size:12px;font-weight:700;min-width:40px;text-align:center}.expert-zoom label{font-size:12px;font-weight:700}.expert-zoom button{border:0;background:#315b3c;color:#fff;border-radius:6px;width:26px;height:26px;cursor:pointer;font-size:18px}#expertView.dragging{cursor:grabbing}.expert-footer{font-size:12px;color:#a8c7af}.expert-footer #expertStatus{font-weight:700;color:#9ee2af}
body.expert-active .sheet>.grid,body.expert-active .sheet>.summary,body.expert-active .sheet>.cost-results{display:none!important}
@media(max-width:650px){.liquid-tabs .type-tab{min-width:0!important;font-size:12px;padding:10px 6px!important}.expert-section{padding:8px}#expertView{min-height:260px}}
@media print{#expertSection{display:none!important}body.expert-active .sheet>.grid,body.expert-active .sheet>.summary,body.expert-active .sheet>.cost-results{display:grid!important}}
.expert-zoom{backdrop-filter:blur(14px);background:rgba(19,35,27,.9);border:1px solid #63876b;box-shadow:0 12px 35px #0007;transition:box-shadow .2s}
.expert-zoom input{accent-color:#98e4aa;touch-action:none}
.expert-zoom button{width:32px;height:32px;border-radius:10px;background:#355e41;transition:background .15s,transform .15s}
.expert-zoom button:hover{background:#4d805b;transform:scale(1.06)}
.expert-zoom button:active{transform:scale(.95)}
#expertView{image-rendering:auto}

/* Skrzyniopalety */
body.crate-active .crate-controls{background:linear-gradient(145deg,#23352e,#182820);border:1px solid #456653;box-shadow:0 12px 30px #07160d28;color:#e7f3e9}
body.crate-active .crate-controls .section-title{color:#e3f4e7}
body.crate-active .crate-controls label{color:#d2e7d8}
body.crate-active .crate-controls input:not([type="checkbox"]),body.crate-active .crate-controls select{background:#32483b;color:#f4fff5;border-color:#63836a}
body.crate-active .crate-controls .crate-note{color:#b6d0be}
.crate-controls{margin:15px 0;padding:13px;border:1px solid #c7dfcc;background:linear-gradient(140deg,#edf7ee,#fff);border-radius:14px}
.crate-controls.hidden{display:none!important}
.crate-checks{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:13px 0}
.crate-checks label{display:flex;align-items:center;gap:8px;font-size:12px}
.crate-checks input{width:17px;height:17px;flex:none}
.crate-note{font-size:12px;color:#57705e;line-height:1.5}
.liquid-tabs{flex-wrap:nowrap}.liquid-tabs .type-tab{min-width:130px}
@media(max-width:680px){.liquid-tabs{width:calc(100% - 24px);max-width:none;margin-left:12px!important}.liquid-tabs .type-tab{min-width:0;font-size:11px;padding:10px 5px}}

/* Dark, high-contrast workspace reserved for crate drawings. */
body.crate-active .sheet{background:#1b2824;color:#e7eee9}
body.crate-active .sheet-top{background:#263a31;border-color:#486456}
body.crate-active .sheet-top h2{color:#e7f1e9}
body.crate-active .grid .box{background:#24352d;border-color:#476252}
body.crate-active .grid .box h3{color:#d5e8d9}
body.crate-active .grid .box svg{background:#1c2924;border-radius:9px}
body.crate-active .summary-card,body.crate-active .cost-tile{background:#273b30;color:#e4f1e7;border-color:#496353}
body.crate-active .summary-card h3{color:#e1f3e5}
body.crate-active .summary-card table{color:#e6efe7}
body.crate-active .crate-dimensions text{paint-order:stroke;stroke:#fff;stroke-width:1px}
body.crate-active #topView text,body.crate-active #sideLengthView text,body.crate-active #sideWidthView text{paint-order:stroke;stroke:#f8f7f0;stroke-width:3px;stroke-linejoin:round}
.crate-external-setting{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0;padding:12px;border:1px solid #54735b;border-radius:12px;background:#162b20}
.crate-external-setting strong{display:block;font-size:13px;color:#eff8f0}.crate-external-setting small{display:block;font-size:11px;color:#c1d6c6;margin-top:5px}.crate-external-setting .orientation-control{display:flex;align-items:center;gap:6px;flex:none}.crate-external-setting .orientation-axis{font-size:11px;color:#e0e9e0}

.expert-chooser{padding:12px 16px;text-align:center;background:radial-gradient(ellipse at center,#30483a,#15241c);border:1px solid #54705b;border-radius:14px;color:#e7f4e8}.expert-chooser p{font-size:12px;font-weight:650;margin:0 0 10px}.expert-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;max-width:900px;margin:auto}.expert-choice-grid button{background:#21382a;border:1px solid #6b9174;border-radius:12px;padding:11px 12px;color:#fff;font-size:14px;font-weight:750;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}.expert-choice-grid button:hover,.expert-choice-grid button:focus-visible{background:#34583e;border-color:#b1e6b9;transform:translateY(-2px)}.expert-choice-grid span{display:block;margin-top:3px;font-size:11px;color:#bdd3c2;font-weight:400}.expert-choice-grid button.selected{background:#42724c;border-color:#c4efc8;box-shadow:inset 0 0 0 1px #c4efc8}.expert-chooser:has(+ .expert-stage:not([hidden])){margin-bottom:12px}@media(max-width:620px){.expert-choice-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.expert-choice-grid button{padding:9px 3px;font-size:11px}.expert-choice-grid span{font-size:9px}}
#expertChooser[hidden],#expertStage[hidden],#expertFooter[hidden]{display:none!important}

/* Informacje techniczne wbudowane w widok, bez zasłaniania modelu. */
.expert-volume-badge{position:absolute;left:18px;bottom:18px;z-index:4;background:rgba(13,29,20,.91);color:#e2f5e5;border:1px solid #60846a;border-radius:10px;padding:11px 15px;pointer-events:none;box-shadow:0 3px 14px #0004;font-size:13px;line-height:1.55;max-width:52%}
.expert-volume-badge strong{display:block;font-size:19px;color:#b9e9c4;font-variant-numeric:tabular-nums}
.expert-edit-dimensions{position:absolute;left:18px;top:18px;z-index:4;background:rgba(13,29,20,.92);border:1px solid #60846a;border-radius:10px;padding:11px 15px;color:#e2f5e5;pointer-events:none;font-size:13px;line-height:1.65;max-width:65%}
.expert-edit-dimensions strong{color:#b9e9c4;font-size:15px}
.expert-edit-dimensions [data-measure]{font-variant-numeric:tabular-nums}
@media(max-width:650px){.expert-volume-badge{left:8px;bottom:8px;padding:7px 10px;font-size:11px}.expert-volume-badge strong{font-size:14px}.expert-edit-dimensions{left:8px;top:8px;padding:7px 10px;font-size:11px}}


.chamfer-help{font-size:12px;color:#b8d6c0;line-height:1.5;margin-top:10px}
.mako-step:disabled{opacity:.4;cursor:default}

/* Shared geometry for tab labels and the independently moving background. */
.liquid-tabs .type-tab{display:flex;align-items:center;justify-content:center;text-align:center;padding-left:14px;padding-right:14px;line-height:1.25;flex-basis:0;min-width:0;white-space:nowrap}
