.df-steps{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding:0;margin:0 0 16px;counter-reset:s}
.df-steps li{flex:1 1 150px;background:#eef1f6;border-radius:6px;padding:8px 10px;font-size:.88rem;color:#4a5160;border-left:5px solid #c7cfdb}
.df-steps li b{display:block;color:#0B2545}
.df-steps li[data-state="ready"]{background:#e7f4ec;border-left-color:#1e8449;color:#1e5c34}
.df-steps li[data-state="busy"]{background:#fff6e0;border-left-color:#C9A227}
.df-steps li[data-state="todo"] small::before{content:'○ '}
.df-steps li[data-state="ready"] small::before{content:'✓ '}
.df-card{margin-bottom:18px}
.df-drop{display:block;border:2px dashed #9AA6B6;border-radius:8px;padding:22px;text-align:center;cursor:pointer;background:#fbfcfe}
.df-drop.over{border-color:#C9A227;background:#fffaf0}
.df-drop input{position:absolute;width:1px;height:1px;opacity:0}
.df-auto{font-size:.9rem;display:inline-flex;gap:6px;align-items:center}
.df-files{width:100%;border-collapse:collapse;margin-top:10px;font-size:.9rem}
.df-files th,.df-files td{border-bottom:1px solid #e3e7ee;padding:6px;text-align:left}
.df-3d{height:460px;border:1px solid #dde3ec;border-radius:6px;background:#f4f6fa}
.df-frame{position:absolute;left:-10000px;top:0;width:1280px;height:900px;border:0;visibility:hidden}
.df-kits{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px}
.df-kit{border:1px solid #dde3ec;border-radius:6px;padding:10px;background:#fff}
.df-kit b a{color:#0B2545}
.df-kit small{display:block;color:#5a6474}
.df-ok{color:#1e8449;font-weight:700}.df-no{color:#7a5200}
@media (max-width:640px){.df-3d{height:320px}}

/* toolkit picker + results dashboard (traffic-light status: green ready, amber running / out of date, red failed, grey not selected) */
.df-picker{margin:14px 0 4px;border:1px solid #dde3ec;border-radius:8px;padding:12px 14px;background:#fbfcfe}
.df-picker h3{margin:0 0 4px;color:#0B2545;font-size:1.02rem}
.df-presets{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 10px}
.df-presets button{font-size:13px;padding:6px 11px}
.df-presets button[aria-pressed="true"]{background:#0B2545;color:#fff;border-color:#0B2545}
.df-groups{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.df-group{border:1px solid #e3e7ee;border-radius:6px;background:#fff;padding:8px 10px}
.df-group h4{margin:0 0 6px;font-size:.86rem;text-transform:uppercase;letter-spacing:.04em;color:#0B2545;border-bottom:2px solid #C9A227;padding-bottom:3px;display:flex;justify-content:space-between;align-items:center}
.df-group h4 small{text-transform:none;letter-spacing:0;font-weight:400;color:#5a6474}
.df-pick{display:grid;grid-template-columns:20px 1fr;gap:2px 6px;padding:5px 0;border-bottom:1px dashed #eef1f6;font-size:.9rem;align-items:start}
.df-pick:last-child{border-bottom:0}
.df-pick input{margin-top:3px;accent-color:#0B2545}
.df-pick b{color:#0B2545}
.df-pick small{grid-column:2;color:#5a6474;line-height:1.3}
.df-pick .df-lock{grid-column:2;color:#7a5200;font-size:.78rem}
.df-pick .df-stage{font-size:.72rem;background:#eef1f6;border-radius:4px;padding:0 4px;margin-left:4px;color:#4a5160;font-weight:400}
.df-pick[data-locked="1"] b::after{content:' 🔒';font-size:.75rem}
.df-depnote{font-size:.84rem;color:#4a5160;margin:8px 0 0}
.df-count{font-weight:700;color:#0B2545}
.df-dash{display:grid;gap:12px}
.df-dash h4{margin:4px 0 6px;color:#0B2545;border-bottom:2px solid #C9A227;padding-bottom:3px;font-size:.9rem;text-transform:uppercase;letter-spacing:.04em}
.df-dash .df-kits{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
.df-kit{border-left:6px solid #c7cfdb;position:relative}
.df-kit[data-status="ready"]{border-left-color:#1e8449}
.df-kit[data-status="running"],.df-kit[data-status="stale"],.df-kit[data-status="todo"]{border-left-color:#C9A227}
.df-kit[data-status="failed"]{border-left-color:#b42318}
.df-kit[data-status="off"]{background:#f3f4f7;color:#8a919e;border-left-color:#c7cfdb}
.df-kit[data-status="off"] b a{color:#6b7280}
.df-kit .df-st{display:inline-block;font-size:.74rem;font-weight:700;border-radius:10px;padding:1px 8px;margin:4px 0}
.df-kit[data-status="ready"] .df-st{background:#e7f4ec;color:#1e8449}
.df-kit[data-status="running"] .df-st,.df-kit[data-status="stale"] .df-st,.df-kit[data-status="todo"] .df-st{background:#fff6e0;color:#7a5200}
.df-kit[data-status="failed"] .df-st{background:#fdecea;color:#b42318}
.df-kit[data-status="off"] .df-st{background:#e5e7eb;color:#6b7280}
.df-kit dl{display:grid;grid-template-columns:auto auto;gap:0 8px;margin:4px 0 0;font-size:.82rem}
.df-kit dt{color:#5a6474}.df-kit dd{margin:0;font-weight:700;color:#0B2545;text-align:right}
.df-kit .tk-btn{margin-top:6px;padding:5px 10px;font-size:13px}
.df-flash{box-shadow:0 0 0 3px #C9A227;transition:box-shadow .3s}
/* design mode cards (racking only / mezzanine only / full design) */
.df-modes{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin-top:8px}
.df-mode{position:relative;text-align:left;border:2px solid #dde3ec;border-radius:10px;background:#fff;padding:14px 14px 12px 52px;cursor:pointer;display:flex;flex-direction:column;gap:4px;font:inherit;color:#1d2735}
.df-mode:hover{border-color:#9fb0c8}
.df-mode:focus-visible{outline:3px solid #C9A227;outline-offset:2px}
.df-mode[aria-checked="true"]{border-color:#0B2545;background:#f4f7fb;box-shadow:inset 4px 0 0 #C9A227}
.df-mode b{color:#0B2545;font-size:1.02rem}
.df-mode small{font-size:.84rem;color:#4a5668;line-height:1.35}
.df-mode .df-mode-tag{color:#8a6a00;font-weight:600}
.df-mode-n{position:absolute;left:14px;top:14px;width:26px;height:26px;border-radius:50%;background:#0B2545;color:#fff;display:grid;place-items:center;font-weight:700;font-size:.9rem}
.df-mode[aria-checked="true"] .df-mode-n{background:#C9A227;color:#0B2545}
.df-targets{display:grid;gap:10px;margin:12px 0}
.df-tg{border:1px solid #dde3ec;border-radius:8px;padding:8px 12px 10px;display:flex;flex-wrap:wrap;gap:8px 14px;align-items:flex-end;background:#fbfcfe}
.df-tg legend{font-weight:700;color:#0B2545;padding:0 4px}
.df-tg label{display:flex;flex-direction:column;font-size:.86rem;gap:2px}
.df-tg input,.df-tg select{padding:5px 7px;border:1px solid #c5cfdd;border-radius:6px;min-width:130px;font:inherit}
.df-tg small{flex-basis:100%;color:#4a5668;font-size:.82rem}
.df-withdata{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:10px 12px;border:1px dashed #C9A227;border-radius:8px;background:#fffcf2;margin:4px 0 10px}
.df-withdata small{flex-basis:100%;color:#4a5668;padding-left:22px}
.df-mphoto{border:1px solid #dde3ec;border-radius:8px;padding:10px 12px;margin:12px 0;background:#fbfcfe}
.df-mphoto h3{margin:0 0 6px;color:#0B2545;font-size:1rem}
.df-mthumb{max-width:360px;max-height:220px;border:1px solid #dde3ec;border-radius:6px;display:block;margin-top:6px}
.df-modetag{display:inline-block;background:#fffcf2;border:1px solid #C9A227;color:#5c4700;border-radius:999px;padding:1px 8px;font-size:.8rem}
.df-pick[data-na="1"]{opacity:.6}
.df-kit[data-status="nodata"]{opacity:.65}
#setup[hidden],#dataActions[hidden],#setupPhoto[hidden],#uploadNote[hidden],#drawMore[hidden]{display:none!important}
/* ---------- home wizard frame (?wizard=step): show only the parts of this page that belong to the step ---------- */
body.wz{background:#fff}
body.wz .tk-header,body.wz .tk-footer,body.wz .tk-hero,body.wz .tk-datastrip,body.wz .tk-help,body.wz #steps,body.wz #modeCard,body.wz #tkToast{display:none!important}
body.wz .tk-main{padding:0 2px;max-width:none}
body.wz .df-card{margin:0 0 12px;box-shadow:none}
/* page buttons the wizard replaces with its own Next / Build */
body.wz #setup .tk-actions,body.wz #dataActions,body.wz #redesign,body.wz #editSel{display:none!important}
/* upload */
body.wz-s-upload #targets,body.wz-s-upload #design,body.wz-s-upload #review,body.wz-s-upload #kits,body.wz-s-upload #picker,body.wz-s-upload #setupStatus{display:none!important}
body.wz-s-upload:not(.wz-data) #upload{display:none!important}
body.wz-s-upload.wz-m-full #setup{display:none!important}
/* check */
body.wz-s-check #setupDrawing,body.wz-s-check #setupPhoto,body.wz-s-check .df-withdata,body.wz-s-check #dataIn,body.wz-s-check #uploadNote,body.wz-s-check #drawMore,body.wz-s-check #design,body.wz-s-check #review,body.wz-s-check #kits,body.wz-s-check #setupStatus{display:none!important}
body.wz-s-check.wz-m-full #setup{display:none!important}
/* design */
body.wz-s-design #setupDrawing,body.wz-s-design #setupPhoto,body.wz-s-design .df-withdata,body.wz-s-design #targets,body.wz-s-design #upload,body.wz-s-design #review,body.wz-s-design #kits{display:none!important}
body.wz-s-design #setup h2{display:none}
/* review */
body.wz-s-review #setup,body.wz-s-review #upload,body.wz-s-review #kits{display:none!important}
/* export */
body.wz-s-export #setup,body.wz-s-export #upload,body.wz-s-export #design,body.wz-s-export #review{display:none!important}
body.wz-s-export #kits{display:block!important}
body.wz-s-check:not(.wz-data):not(.tk-adv) #upload{display:none!important}
body.wz-s-check #setup > p.tk-note:not(#setupStatus),body.wz-s-design #setup > p.tk-note:not(#setupStatus){display:none!important}
/* the wizard shows its own step title and one-line explanation */
body.wz #setup > h2,body.wz #setup > p.tk-note:not(#setupStatus),body.wz #upload > h2{display:none!important}
/* full design: include mezzanine floor(s) */
#fullMezz .fm-on{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;margin:4px 0 10px}
#fullMezz .fm-t{width:100%;border-collapse:collapse;font-size:14px}
#fullMezz .fm-t th{text-align:left;font-weight:600;color:#4a5a72;padding:4px 6px;border-bottom:1px solid #e3e8f0}
#fullMezz .fm-t td{padding:4px 6px;border-bottom:1px solid #eef1f6}
#fullMezz .fm-t input{width:110px}
#fullMezz .fm-row{display:flex;flex-wrap:wrap;gap:14px;margin:10px 0}
#fullMezz .fm-row label{display:flex;flex-direction:column;gap:3px;font-size:14px}
.fm-res{margin:8px 0;padding:8px 10px;border-left:4px solid var(--gold,#C9A227);background:#fffaf0;font-size:14px}
.fm-flags{margin:6px 0 0 18px;padding:0}
.fm-okl{color:#2d6a3e}
@media (max-width:820px){#fullMezz .fm-t thead{display:none}#fullMezz .fm-t tr{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:6px 0}#fullMezz .fm-t input,#fullMezz .fm-t select{width:100%}}
/* wizard: the mezzanine option is part of Check in the full path */
body.wz #fullMezz{display:none!important}
body.wz-s-check.wz-m-full #fullMezz:not([hidden]){display:block!important}
.why-design{margin:10px 0;padding:10px 14px;border:1px solid #dde3ec;border-left:4px solid #0B2545;border-radius:8px;background:#fbfcfe}
.why-design summary{cursor:pointer;color:#0B2545}
.why-design ul{margin:6px 0 0;padding-left:18px}
.why-design li{margin:3px 0}
.why-src{color:#6b7684;margin-left:4px}
.fm-auto{display:flex;flex-wrap:wrap;gap:6px 16px;margin:6px 0}

/* Existing layout start option */
#exLayout[hidden]{display:none!important}
#exLayout .ex-on{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;margin:4px 0 10px}
#exLayout .ex-f{border:1px solid #e3e8f0;border-radius:8px;padding:8px 12px;margin:10px 0;display:flex;flex-direction:column;gap:6px}
#exLayout .ex-f label{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
#exLayout .ex-lv{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
#exLayout .ex-lv input{width:140px}
body.wz #exLayout{display:none!important}
body.wz-s-upload.wz-m-full.wz-ex #exLayout:not([hidden]),body.wz-s-check.wz-m-full.wz-ex #exLayout:not([hidden]){display:block!important}
.ex-plan svg{width:100%;height:auto;max-height:520px;border:1px solid #e3e8f0;border-radius:6px;background:#fff}
.ex-key{display:flex;gap:6px 14px;flex-wrap:wrap;align-items:center;font-size:13px}
.ex-key span{display:inline-block;width:14px;height:10px;border-radius:2px;margin-right:-8px}
.ex-flags li{margin:2px 0}
/* data profile (zones, pick waves, gold zone, default sizes) */
#readBar { width: 100%; height: .6rem; accent-color: #C9A227; }
#profile h3 { margin: 1.1rem 0 .4rem; color: #0B2545; }
.df-zmap { display: block; margin: .5rem 0; font-size: .9rem; }
.df-zmap textarea { display: block; width: 100%; max-width: 40rem; font: inherit; font-family: ui-monospace, monospace; margin-top: .25rem; }
#dfAssume { margin-top: 1rem; }
.df-flags { font-size: .88rem; color: #444; }

/* building size: data-sized (default) or my building */
[data-sz-mode=data] .sz-mine{display:none}[data-sz-mode=mine] .sz-datanote{display:none}
#sizeCard .sz-mine{display:flex;gap:12px;flex-wrap:wrap}#sizeCard [data-sz-mode=data] .sz-mine{display:none}
body.wz #sizeCard{display:none!important}body.wz-s-check.wz-m-full #sizeCard:not([hidden]){display:block!important}
