/* ==========================================================================
   Clothing Studio – "Obsidian & Amber"
   Basis: UI/UX-Pro-Max-Regeln (Dark Mode mit hohem Kontrast, SVG-Icons mit einheitlicher
   Strichstärke, sichtbare Fokus-/Hover-Zustände, Raster 4/8px, Token statt Rohwerte).
   ========================================================================== */
@font-face { font-family: 'Inter Variable'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../vendor/fonts/inter-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../vendor/fonts/inter-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Flächen: tief → hoch */
  --bg: #08090c; --panel: #0f1014; --panel2: #15171d; --raise: #1c1f27; --raise2: #252936;
  /* Linien */
  --line: #1e2128; --line-2: #2c303b; --line-3: #3a3f4d; --hair: rgba(255,255,255,.06);
  /* Text (Kontrast auf --panel: text 15:1, text-2 9:1, dim 5.4:1) */
  --text: #eceef3; --text-2: #b6bbc8; --dim: #8b91a2;
  /* Akzent Amber + Status */
  --gold: #f5b83d; --gold-2: #e8981c; --gold-d: #b9831a; --gold-bg: #231d0e; --gold-line: #4d3d14; --gold-ink: #1a1405;
  --red: #ff6b6b; --orange: #ffa84a; --green: #4fd38a; --blue: #62adff;
  --red-bg: #2a1a1d; --orange-bg: #262016; --green-bg: #14271d; --blue-bg: #15202e;
  /* Maße */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-sm: 0; --r: 0; --r-lg: 0; --r-xl: 0;
  --shadow-1: 0 1px 0 var(--hair) inset, 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 1px 0 var(--hair) inset, 0 12px 32px rgba(0,0,0,.5);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold);
  --ease: 140ms cubic-bezier(.2,.7,.2,1);
  --font: 'Inter Variable', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.5 var(--font); font-feature-settings: 'cv11', 'ss03'; overflow: hidden; user-select: none; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.screen { position: fixed; inset: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
b, strong { font-weight: 600; }
.num, .val, #stats3d, #uvInfo { font-variant-numeric: tabular-nums; }

/* ---- Icons ------------------------------------------------------------- */
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 15px; height: 15px; }

/* ---- Buttons ----------------------------------------------------------- */
button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--raise); border: 1px solid var(--line-2); border-radius: 0; padding: 6px 12px; cursor: pointer; font-weight: 500; line-height: 1.3; transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease), transform var(--ease); box-shadow: var(--shadow-1); }
button:hover:not(:disabled) { border-color: var(--line-3); background: var(--raise2); }
button:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
button:disabled { opacity: .38; cursor: default; box-shadow: none; }
button.primary { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: var(--gold-ink); border-color: #ffd36e55; font-weight: 600; box-shadow: 0 1px 0 #fff5 inset, 0 4px 14px #e8981c33; }
button.primary:hover:not(:disabled) { background: linear-gradient(180deg, #ffc955, #f0a22a); border-color: #ffd36e88; }
button.danger:hover:not(:disabled) { border-color: var(--red); color: var(--red); background: var(--red-bg); }
button.ghost { background: transparent; border-color: transparent; box-shadow: none; }
button.ghost:hover:not(:disabled) { background: var(--raise); border-color: var(--line-2); }
button.sm { padding: 3px 9px; font-size: 12px; border-radius: 0; }
.ibtn { width: 34px; height: 34px; padding: 0; background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); border-radius: 0; }
.ibtn:hover:not(:disabled) { color: var(--text); background: var(--raise); border-color: var(--line-2); }
:focus { outline: none; }
:focus-visible { box-shadow: var(--ring); }
select:focus-visible, input:focus-visible, textarea:focus-visible { box-shadow: 0 0 0 3px #f5b83d33; }

/* ---- Eingaben ---------------------------------------------------------- */
input[type=text], input[type=search], select, textarea, input[type=number] { background: #0b0c10; border: 1px solid var(--line-2); border-radius: 0; padding: 7px 10px; width: 100%; user-select: text; transition: border-color var(--ease), box-shadow var(--ease); }
input[type=text]:hover, input[type=search]:hover, select:hover, textarea:hover, input[type=number]:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { border-color: var(--gold-d); }
input::placeholder, textarea::placeholder { color: #5f6575; }
input[type=search] { padding-left: 32px; background: #0b0c10 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b91a2' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px center; }
select { appearance: none; padding-right: 28px; cursor: pointer; background: #0b0c10 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b91a2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; }
select option { background: var(--panel2); color: var(--text); }
input[type=range] { --p: 50%; appearance: none; width: 100%; height: 18px; background: transparent; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 0; background: linear-gradient(90deg, var(--gold) var(--p), var(--raise2) var(--p)); }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 0; background: #fff; border: 3px solid var(--gold); box-shadow: 0 1px 4px rgba(0,0,0,.6); transition: transform var(--ease); }
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.15); }
input[type=range]:focus-visible { box-shadow: none; } input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px #f5b83d55; }
input[type=color] { width: 38px; height: 30px; padding: 2px; border: 1px solid var(--line-2); background: #0b0c10; border-radius: 0; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; } input[type=color]::-webkit-color-swatch { border: 0; border-radius: 0; }
label.chk { display: flex; gap: var(--s2); align-items: center; cursor: pointer; color: var(--text-2); }
input[type=checkbox] { appearance: none; width: 16px; height: 16px; margin: 0; flex: none; border: 1.5px solid var(--line-3); border-radius: 0; background: #0b0c10; cursor: pointer; transition: background var(--ease), border-color var(--ease); display: inline-grid; place-content: center; }
input[type=checkbox]:hover { border-color: var(--gold-d); }
input[type=checkbox]:checked { background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1405' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--gold); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #2a2e39; border-radius: 0; border: 2px solid transparent; background-clip: content-box; } ::-webkit-scrollbar-thumb:hover { background: #40465a; background-clip: content-box; border: 2px solid transparent; } ::-webkit-scrollbar-track { background: transparent; }

/* ---- Startseite -------------------------------------------------------- */
#start { display: flex; flex-direction: column; align-items: center; overflow: auto; padding: 72px var(--s5) 48px;
  background: radial-gradient(900px 380px at 50% -6%, #3a2a0c66, transparent 70%), radial-gradient(600px 300px at 85% 10%, #1b2a4a33, transparent 70%), radial-gradient(#ffffff14 1px, transparent 1.2px) 0 0 / 26px 26px, var(--bg); }
#start .brand { text-align: center; margin-bottom: 44px; }
.brandmark { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 0; display: grid; place-items: center; background: linear-gradient(145deg, #2a2210, #14110a); border: 1px solid var(--gold-line); box-shadow: 0 8px 32px #e8981c33, 0 1px 0 #fff2 inset; color: var(--gold); }
.brandmark .ic { width: 30px; height: 30px; stroke-width: 1.6; }
#start .brand h1 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.8px; line-height: 1.15; }
#start .brand h1 b { background: linear-gradient(90deg, var(--gold), #ffd98a 60%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
#start .brand p { margin: 10px 0 0; color: var(--dim); font-size: 15px; }
.cards { display: grid; grid-template-columns: repeat(3, 248px); gap: var(--s3); margin-bottom: 40px; }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line-2); border-radius: 0; padding: 18px; min-height: 124px; font-weight: 400; box-shadow: var(--shadow-1); }
.card:hover:not(:disabled) { border-color: var(--gold-d); background: linear-gradient(180deg, #1c1a14, var(--panel)); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.45), 0 0 0 1px #f5b83d22; }
.card .cico { width: 38px; height: 38px; border-radius: 0; display: grid; place-items: center; background: var(--gold-bg); border: 1px solid var(--gold-line); color: var(--gold); }
.card h3 { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--text); }
.card p { margin: 0; color: var(--dim); font-size: 12.5px; line-height: 1.45; }
.card.off { opacity: .4; cursor: default; }
.recent { width: 760px; max-width: 100%; }
.recent h4 { margin: 0 0 var(--s2); color: var(--dim); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 1.2px; }
.recent .row { display: flex; align-items: center; gap: var(--s3); padding: 11px var(--s4); border: 1px solid var(--line); border-bottom: 0; background: var(--panel); cursor: pointer; transition: background var(--ease); }
.recent .row:first-of-type { border-radius: 0; }
.recent .row:last-child { border-bottom: 1px solid var(--line); border-radius: 0; }
.recent .row:only-of-type { border-radius: 0; }
.recent .row:hover { background: var(--panel2); }
.recent .row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.recent .row small { color: var(--dim); margin-left: auto; white-space: nowrap; }

/* ---- App-Gerüst -------------------------------------------------------- */
#app { display: grid; grid-template-rows: 52px 1fr 30px; }
#top { display: flex; align-items: center; gap: 2px; padding: 0 var(--s3); background: var(--panel); border-bottom: 1px solid var(--line); }
#top .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; margin: 0 var(--s3) 0 var(--s1); letter-spacing: -.2px; white-space: nowrap; }
#top .logo .lm { width: 28px; height: 28px; border-radius: 0; display: grid; place-items: center; background: linear-gradient(145deg, #2a2210, #14110a); border: 1px solid var(--gold-line); color: var(--gold); }
#top .logo .lm .ic { width: 16px; height: 16px; }
#top .logo b { color: var(--gold); font-weight: 700; }
#top .sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 var(--s2); }
#top .spacer { flex: 1; }
#top .name { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 0; background: var(--panel2); border: 1px solid var(--line-2); color: var(--text-2); max-width: 280px; margin-right: var(--s2); }
#top .name span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#top .name .dirty { width: 7px; height: 7px; border-radius: 0; background: var(--gold); box-shadow: 0 0 8px var(--gold); flex: none; }
#top button.primary { padding: 7px 14px; margin-left: var(--s1); }
#main { display: grid; grid-template-columns: 72px 272px minmax(320px, 1fr) 372px; min-height: 0; }

/* ---- Werkzeugleiste ---------------------------------------------------- */
#tools { background: var(--panel); border-right: 1px solid var(--line); padding: var(--s2) var(--s2); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.tool { position: relative; width: 100%; flex-direction: column; gap: 4px; padding: 10px 0 8px; font-size: 10.5px; font-weight: 500; color: var(--dim); background: transparent; border-color: transparent; box-shadow: none; border-radius: 0; }
.tool .ic { width: 22px; height: 22px; }
.tool:hover:not(:disabled) { color: var(--text); background: var(--panel2); border-color: transparent; }
.tool.active { color: var(--gold); background: var(--gold-bg); border-color: var(--gold-line); }
.tool.active::before { content: ''; position: absolute; left: -9px; top: 22%; bottom: 22%; width: 3px; border-radius: 0; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.tool.lock { opacity: .34; cursor: not-allowed; }
.tool.lock:hover { background: transparent !important; color: var(--dim); }
.tgroup { margin: 10px 8px 4px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 1.2px; color: #626878; font-weight: 600; text-align: center; }

/* ---- Pack-Panel -------------------------------------------------------- */
#packpanel { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.ph { padding: var(--s3) var(--s4) var(--s2); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); display: flex; align-items: center; justify-content: space-between; }
.ph .cnt { margin-left: 8px; padding: 0 7px; border-radius: 0; background: var(--raise); color: var(--text-2); letter-spacing: 0; font-size: 11px; }
.pfilter { padding: 0 var(--s3) var(--s3); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pfilter input[type=search] { grid-column: 1 / 3; }
.plist { overflow-y: auto; flex: 1; border-top: 1px solid var(--line); padding: var(--s2); display: flex; flex-direction: column; gap: 2px; }
.pitem { padding: 9px 10px; border-radius: 0; cursor: pointer; border: 1px solid transparent; transition: background var(--ease), border-color var(--ease); }
.pitem:hover { background: var(--panel2); } .pitem.sel { background: var(--gold-bg); border-color: var(--gold-line); }
.pitem .n { display: flex; align-items: center; gap: 6px; font-weight: 600; word-break: break-all; line-height: 1.35; }
.pitem .s { color: var(--dim); font-size: 11.5px; display: flex; gap: var(--s2); margin-top: 4px; flex-wrap: wrap; align-items: center; }
.badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 0; font-size: 10.5px; font-weight: 600; background: var(--raise); color: var(--text-2); }
.badge.error { background: var(--red-bg); color: var(--red); } .badge.warn { background: var(--orange-bg); color: var(--orange); } .badge.ok { background: var(--green-bg); color: var(--green); } .badge.gold { background: var(--gold-bg); color: var(--gold); }
.pact { padding: var(--s2) var(--s3); border-top: 1px solid var(--line); display: flex; gap: 6px; flex-wrap: wrap; }
.texlist { border-top: 1px solid var(--line); max-height: 38%; overflow-y: auto; padding: var(--s2); }
.texrow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; cursor: pointer; border-radius: 0; border: 1px solid transparent; transition: background var(--ease); }
.texrow:hover { background: var(--panel2); } .texrow.sel { background: var(--gold-bg); border-color: var(--gold-line); }
.texrow canvas { width: 40px; height: 40px; background: conic-gradient(#1b1d24 25%, #23262e 0 50%, #1b1d24 0 75%, #23262e 0) 0 0 / 10px 10px; border: 1px solid var(--line-2); border-radius: 0; object-fit: contain; flex: none; }
.texrow .t { min-width: 0; } .texrow .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; } .texrow .t small { color: var(--dim); font-size: 11.5px; }

/* ---- Bühne ------------------------------------------------------------- */
#stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #07080a; }
#stagebar { display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s3); background: var(--panel); border-bottom: 1px solid var(--line); min-height: 46px; flex-wrap: nowrap; overflow: hidden; }
#stagebar > * { flex: none; }
#cap2d { position: absolute; left: var(--s3); top: var(--s3); z-index: 2; max-width: calc(100% - 24px); display: flex; align-items: baseline; gap: 8px; padding: 5px 12px; border-radius: 0; background: #0f1014d9; backdrop-filter: blur(8px); border: 1px solid var(--line-2); pointer-events: none; white-space: nowrap; overflow: hidden; }
#cap2d b { overflow: hidden; text-overflow: ellipsis; } #cap2d span { color: var(--dim); font-size: 12px; }
#cap2d:empty { display: none; }
#stagebar .z { color: var(--dim); min-width: 44px; text-align: right; }
#viewport { position: relative; flex: 1; overflow: hidden; cursor: default; background:
  radial-gradient(900px 600px at 50% 40%, transparent 55%, #00000088 100%),
  conic-gradient(#0e0f13 25%, #12141a 0 50%, #0e0f13 0 75%, #12141a 0) 0 0 / 24px 24px; }
#world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#cv { display: block; image-rendering: pixelated; background: conic-gradient(#2a2c33 25%, #34363e 0 50%, #2a2c33 0 75%, #34363e 0) 0 0 / 16px 16px; box-shadow: 0 0 0 1px #3a3d46, 0 24px 60px #000c; border-radius: 0; }
#ov { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
#uvov { position: absolute; left: 0; top: 0; pointer-events: none; display: none; }
#dropHint { position: absolute; inset: var(--s4); border: 2px dashed var(--gold); border-radius: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; color: var(--gold); background: #f5b83d12; backdrop-filter: blur(2px); pointer-events: none; }
#viewEmpty, #hint3d { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); color: var(--dim); text-align: center; padding: 30px; }
#viewEmpty h3, #hint3d h3 { color: var(--text); margin: 0; font-size: 17px; font-weight: 600; }
#hint3d { pointer-events: none; }

/* ---- 3D-Ansicht -------------------------------------------------------- */
#view3d { position: absolute; inset: 0; background: radial-gradient(800px 500px at 50% 35%, #14161d, #07080a); }
#view3d canvas { display: block; width: 100%; height: 100%; cursor: grab; }
#view3d canvas:active { cursor: grabbing; }
#view3d canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); }
#stats3d { position: absolute; left: var(--s3); bottom: var(--s3); color: var(--dim); font-size: 12px; pointer-events: none; background: #0f1014cc; padding: 3px 10px; border-radius: 0; border: 1px solid var(--line); }
#stats3d:empty { display: none; }
#cam3d { position: absolute; left: 50%; bottom: var(--s4); transform: translateX(-50%); z-index: 3; display: none; }
#scene3d { position: absolute; top: var(--s3); right: var(--s3); width: 272px; background: #0f1014d9; backdrop-filter: blur(10px); border: 1px solid var(--line-2); border-radius: 0; padding: var(--s2) var(--s2) var(--s2); display: none; z-index: 2; box-shadow: var(--shadow-2); }
#scene3d h4 { margin: 4px 6px 6px; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dim); font-weight: 600; }
#scene3d .srow { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 0; cursor: pointer; border: 1px solid transparent; }
#scene3d .srow:hover { background: var(--panel2); } #scene3d .srow.sel { border-color: var(--gold-line); background: var(--gold-bg); }
#scene3d .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#scene3d .tag { font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 0; background: var(--raise); color: var(--text-2); }
#scene3d .tag.body { background: #3a2d25; color: #e8c2a8; } #scene3d .tag.cloth { background: var(--gold-bg); color: var(--gold); }
.seg { display: inline-flex; background: #0b0c10; border: 1px solid var(--line-2); border-radius: 0; padding: 2px; gap: 2px; }
.seg button { background: transparent; border-color: transparent; box-shadow: none; padding: 3px 11px; font-size: 12px; border-radius: 0; color: var(--text-2); }
.seg button:hover:not(:disabled) { background: var(--raise); border-color: transparent; color: var(--text); }
.seg button.on { background: var(--gold-bg); color: var(--gold); border-color: var(--gold-line); }
.seg.float { background: #0f1014e6; backdrop-filter: blur(10px); box-shadow: var(--shadow-2); border-radius: 0; padding: 3px; }
.seg.float button { border-radius: 0; padding: 5px 13px; }
select.sm3 { width: auto; padding: 3px 26px 3px 9px; font-size: 12px; border-radius: 0; }

/* ---- Seitenpanel (Assistent + Eigenschaften) --------------------------- */
#side { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
#assistant { margin: var(--s3) var(--s3) 0; padding: var(--s4); max-height: 46%; overflow-y: auto; flex: none; border-radius: 0; border: 1px solid var(--gold-line); background: radial-gradient(260px 120px at 0% 0%, #f5b83d1c, transparent 70%), linear-gradient(180deg, #18150d, #111015); box-shadow: 0 0 0 1px #f5b83d0d, var(--shadow-1); }
#assistant:empty { display: none; }
#props { flex: 1; overflow-y: auto; padding: var(--s3) var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.sec { padding: var(--s3) var(--s4) var(--s2); border: 1px solid var(--line); border-radius: 0; background: var(--panel2); }
.sec h4 { margin: 0 0 var(--s3); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dim); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.fld { display: grid; grid-template-columns: 92px 1fr 48px; gap: var(--s2); align-items: center; margin-bottom: 10px; }
.fld > span:first-child { color: var(--text-2); }
.fld .val { text-align: right; color: var(--text); font-weight: 500; }
.fld.wide { grid-template-columns: 92px 1fr; }
.row2 { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.layer { display: flex; align-items: center; gap: 4px; padding: 5px 6px; border: 1px solid var(--line-2); border-radius: 0; margin-bottom: 6px; cursor: pointer; background: var(--panel); transition: border-color var(--ease), background var(--ease); }
.layer:hover { border-color: var(--line-3); }
.layer.sel { border-color: var(--gold-d); background: var(--gold-bg); }
.layer button { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); padding: 1px 6px; } .layer button:hover:not(:disabled) { background: var(--raise); } .layer button.danger { color: var(--dim); } .layer button.danger:hover { color: var(--red); background: var(--red-bg); }
.layer .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 2px; }
.layer.off .nm { opacity: .45; text-decoration: line-through; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.swatch { width: 24px; height: 24px; border-radius: 0; border: 1px solid #ffffff2a; cursor: pointer; transition: transform var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.5); } .swatch:hover { transform: scale(1.14); }

.ai .tag { font-size: 10.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold); display: flex; justify-content: space-between; align-items: center; }
.ai .step { font-size: 16px; font-weight: 650; margin: 6px 0 8px; letter-spacing: -.2px; }
.ai p { margin: 0 0 6px; color: var(--text-2); } .ai p b { color: var(--text); }
.ai .why { color: var(--dim); font-style: italic; }
.ai .next { color: var(--dim); font-size: 12px; margin-top: 6px; }
.steps { display: flex; gap: 4px; margin: 10px 0 6px; } .steps i { flex: 1; height: 5px; border-radius: 0; background: var(--raise2); } .steps i.done { background: var(--green); } .steps i.cur { background: var(--gold); box-shadow: 0 0 10px #f5b83d88; }
.prob { padding: 8px 12px; border-left: 3px solid var(--orange); background: var(--orange-bg); margin: 6px 0; cursor: pointer; border-radius: 0; transition: filter var(--ease); }
.prob:hover { filter: brightness(1.25); }
.prob.error { border-color: var(--red); background: var(--red-bg); } .prob.info { border-color: var(--blue); background: var(--blue-bg); }
.prob b { display: block; } .prob small { color: var(--dim); word-break: break-all; }

/* ---- Statusleiste ------------------------------------------------------ */
#bottom { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s3); background: var(--panel); border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
#bottom .spacer { flex: 1; } #bottom .pill { cursor: pointer; padding: 2px 8px; border-radius: 0; transition: background var(--ease), color var(--ease); } #bottom .pill:hover { color: var(--text); background: var(--raise); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 0; margin-right: 6px; background: var(--dim); } .dot.red { background: var(--red); box-shadow: 0 0 8px #ff6b6b88; } .dot.orange { background: var(--orange); } .dot.green { background: var(--green); }

/* ---- Dialoge, Toasts --------------------------------------------------- */
#modal { position: fixed; inset: 0; background: #000b; backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 50; }
.dlg { background: var(--panel2); border: 1px solid var(--line-2); border-radius: 0; min-width: 480px; max-width: 780px; max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px #000d, 0 0 0 1px #ffffff08 inset; }
.dlg header { padding: var(--s5) var(--s5) var(--s2); font-size: 17px; font-weight: 650; letter-spacing: -.2px; }
.dlg .body { padding: var(--s1) var(--s5) var(--s4); overflow-y: auto; user-select: text; }
.dlg footer { padding: var(--s3) var(--s5); display: flex; gap: var(--s2); justify-content: flex-end; border-top: 1px solid var(--line); }
.dlg .body p { margin: 0 0 var(--s2); color: var(--text-2); }
.chk-list { margin: var(--s2) 0; } .chk-list div { display: flex; gap: var(--s2); padding: 8px 0; border-bottom: 1px solid var(--line); } .chk-list .st { width: 18px; } .chk-list small { color: var(--dim); display: block; }
.grid2 { display: grid; grid-template-columns: 110px 1fr; gap: var(--s2); align-items: center; margin-bottom: var(--s2); }
#toast { position: fixed; bottom: 42px; left: 16px; z-index: 70; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; pointer-events: none; }
#toast div { background: var(--raise); border: 1px solid var(--line-2); border-left: 3px solid var(--gold); padding: 10px 16px; border-radius: 0; box-shadow: var(--shadow-2); max-width: 520px; animation: tin .18s ease-out; }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } }
#toast div.err { border-left-color: var(--red); } #toast div.ok { border-left-color: var(--green); }
#busy { position: fixed; inset: 0; background: #000b; backdrop-filter: blur(3px); z-index: 80; display: flex; align-items: center; justify-content: center; gap: var(--s3); font-size: 15px; }
.spin { width: 22px; height: 22px; border: 3px solid #444; border-top-color: var(--gold); border-radius: 50%; animation: sp .8s linear infinite; } @keyframes sp { to { transform: rotate(360deg); } }
.note { color: var(--dim); font-size: 12px; margin: var(--s1) 0 var(--s2); }
.kbd { background: var(--raise); border: 1px solid var(--line-2); border-radius: 0; padding: 0 6px; font-size: 11px; }

@media (max-width: 1280px) { #main { grid-template-columns: 68px 232px minmax(260px, 1fr) 328px; } .cards { grid-template-columns: repeat(2, 248px); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 0s !important; } }
