:root[data-theme="light"] { --bg:#f4f2ed; --surface:#fffefa; --ink:#21342d; --muted:#6b746e; --line:#e0e2d9; --accent:#285846; --accent-ink:#fff; --accent-soft:#e7eee5; }
body { font-size:15px; }
.top { background:rgba(255,254,250,.96); padding:18px 32px; box-shadow:0 2px 12px #21342d04; }
.brand { font-size:22px; letter-spacing:-.7px; }
main { max-width:1200px; padding:32px 32px 130px; }
.card { border-radius:18px; padding:26px; margin-bottom:22px; box-shadow:0 4px 18px #21342d03; }
.card h2 { font-size:22px; margin-bottom:8px; }
.card .sub { max-width:760px; line-height:1.65; margin-bottom:20px; }
.studio-intro { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:12px 0 30px; }
.eyebrow { color:var(--accent); font-size:11px; letter-spacing:2px; font-weight:700; margin-bottom:13px; }
.studio-intro h1 { font-size:clamp(28px,3.5vw,43px); font-weight:500; letter-spacing:-1.3px; line-height:1.15; }
.studio-intro p { color:var(--muted); margin:14px 0 0; }
.intro-mark { width:110px; height:110px; display:grid; place-items:center; border:1px solid #d8dfd3; border-radius:50%; color:#899887; font-size:30px; font-family:Georgia,serif; flex-shrink:0; }
.btn { border-radius:10px; padding:11px 20px; }
.tabs button { border-radius:9px; padding:10px 15px; }
.linkbtn { text-decoration:none; }
.field input,.field select,.field textarea,.search { border-radius:9px; background:#fff; padding:11px 13px; }
.drop { min-height:220px; padding:22px; background:#f7f8f3; border-radius:13px; justify-content:center; align-items:center; text-align:center; }
.drop img { max-height:310px; }
.styles { grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; }
.style { min-height:110px; padding:18px; border-radius:12px; background:#fafaf6; position:relative; overflow:hidden; }
.style::before { content:""; display:block; width:28px; height:3px; background:#a5b8a0; margin-bottom:14px; }
.style b { font-size:17px; margin-bottom:5px; }
.style span { line-height:1.5; }
.style[aria-pressed="true"] { box-shadow:inset 0 0 0 1px var(--accent); }
.preset-test { display:block; margin-top:10px; color:var(--accent); font-size:11px; line-height:1.4; }
.preset-heading { grid-column:1/-1; border-top:1px solid var(--line); padding-top:22px; margin-top:12px; }
.preset-heading h3 { margin-bottom:8px; }
.scene-editor { margin-top:24px; padding-top:22px; border-top:1px solid var(--line); }
.scene-editor h3 { margin-bottom:8px; }
.scene-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:20px; }
.scene-group { min-width:0; padding:16px; border:1px solid var(--line); border-radius:12px; background:#fafaf6; }
.scene-group h4 { margin:0 0 12px; font-weight:600; }
.scene-choice { display:flex; gap:8px; align-items:center; margin-bottom:10px; }
.scene-group select { min-width:0; width:100%; border:1px solid var(--line); border-radius:8px; padding:11px 8px; background:#fff; }
.scene-choice select { flex:1; }
.scene-choice button { flex-shrink:0; }
.angle-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:16px; margin:20px 0; }
.angle-card { min-width:0; padding:16px; background:#f7f8f3; border:1px solid var(--line); border-radius:12px; }
.angle-card h3 { margin-bottom:12px; }
.angle-card .drop { min-height:180px; padding:14px; background:#fffefa; }
.angle-card .drop img { max-height:230px; object-fit:contain; }
.angle-card .field { margin-top:14px; }
.angle-card select { width:100%; min-width:0; }
.row .field { min-width:0; max-width:100%; }
#model-files { max-width:100%; }
.reference-upload { border-top:1px solid var(--line); padding-top:14px; }
.reference-upload summary,.paid-api summary { cursor:pointer; font-weight:600; margin-bottom:14px; }
.reference-upload .drop { max-width:450px; }
.prompt-panel { scroll-margin-top:100px; }
.prompt-preview { padding:18px 0; border-top:1px solid var(--line); }
.prompt-preview h3 { margin-bottom:8px; }
.prompt-preview textarea,.fixrow textarea { width:100%; display:block; border:1px solid var(--line); padding:14px; border-radius:9px; font:13px/1.6 ui-monospace,Consolas,monospace; background:#f8faf6; margin:12px 0; resize:vertical; }
.paid-api { margin-top:20px; border:1px solid var(--line); padding:18px; border-radius:12px; }
.paid-api .btn { margin:4px 8px 4px 0; }
.fixrow { flex-wrap:wrap; }
.fixrow>div { flex-basis:100%; min-width:0; }
.card>label.field textarea { max-width:100%; }
.chip { border-radius:8px; background:#fff; padding:9px 12px; }
.cats { gap:8px; padding:6px 0 14px; }
.cats button { border-radius:8px; padding:9px 14px; }
.tier { padding:19px; border-radius:12px; background:#fafaf6; }
.tier b { font-size:17px; margin-bottom:6px; }
.dock { background:rgba(255,254,250,.97); box-shadow:0 -4px 24px #21342d06; padding-top:15px; padding-bottom:15px; }
.login { max-width:530px; margin:10vh auto; }
.login .card { padding:42px; border-radius:22px; box-shadow:0 20px 60px #263e2f10; }
.login h1 { font-size:36px; line-height:1.15; font-weight:500; }
.login .sub { margin-top:16px; }
.login .field { margin-top:18px; }
.login-link { display:block; color:var(--muted); font-size:13px; text-align:center; margin-top:22px; }
.admin-shell { --bg:#eef1ed; --accent:#344c41; }
.admin-shell .top { border-left:5px solid var(--accent); }
.admin-shell main { max-width:1420px; }
.admin-shell .studio-intro { padding-bottom:22px; }
.admin-nav { display:flex; gap:12px; margin-bottom:25px; flex-wrap:wrap; }
.admin-nav a { color:var(--accent); text-decoration:none; padding:8px 14px; border:1px solid var(--line); background:var(--surface); border-radius:8px; }
.stats { gap:14px; margin-bottom:25px; }
.stat { border-radius:14px; padding:22px; }
.stat b { font-size:30px; margin-bottom:6px; }
.admin-shell th { background:#f3f5ef; padding:13px 12px; font-size:12px; }
.admin-shell td { padding:13px 12px; }
.admin-shell .row .field { flex:1 1 170px; }
.workshop-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:12px; margin:18px 0; align-items:start; }
.workshop details { border:1px solid var(--line); border-radius:10px; padding:13px; }
.workshop summary { cursor:pointer; font-weight:600; }
.workshop details .field { margin-top:14px; }
.workshop select { width:100%; }
.workshop>textarea { width:100%; border:1px solid var(--line); border-radius:10px; padding:18px; background:#f7f9f4; font:13px/1.7 ui-monospace,Consolas,monospace; resize:vertical; }
.ref-check { display:block; margin:16px 0; }
.workshop .row { margin-bottom:16px; }
.card[id] { scroll-margin-top:100px; }
.compare-stage { position:relative; background:#e8e9e3; overflow:hidden; border-radius:12px; }
.compare-stage>img { width:100%; display:block; cursor:default; border-radius:0; }
.compare-stage>img.compare-before { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#e8e9e3; }
.compare-line { position:absolute; top:0; bottom:0; width:3px; background:white; box-shadow:0 0 6px #0006; pointer-events:none; }
.compare-labels { display:flex; justify-content:space-between; gap:10px; margin-top:12px; font-size:13px; }
.comparison input[type=range] { width:100%; min-height:44px; accent-color:var(--accent); cursor:ew-resize; }
.compare-box { width:min(1100px,95vw); max-width:1100px; }
@media(max-width:650px) { .top { padding:13px 16px; gap:10px; } main { padding:22px 15px 130px; } .card { padding:20px 16px; border-radius:14px; } .intro-mark { display:none; } .studio-intro { padding-bottom:24px; } .login { margin:6vh auto; } .login .card { padding:30px 24px; } .styles { grid-template-columns:1fr 1fr; } .style { padding:13px; min-height:125px; } .style b { font-size:15px; } .stats { grid-template-columns:1fr 1fr; } .stat { padding:16px; } .stat b { font-size:25px; } .workshop-options { grid-template-columns:1fr; } }

.control-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:18px}.approval-panel{border:2px solid #345746}.approval-panel>img{display:block;max-width:100%;max-height:65vh;object-fit:contain;margin:12px auto}.approval-panel button{margin:8px}.region-box{width:min(1000px,95vw);max-height:92vh;overflow:auto}.region-canvas{display:block;width:100%;height:auto;touch-action:none;cursor:crosshair;border:1px solid #aaa}.region-box>.row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.region-box input,.region-box textarea{width:100%;margin-bottom:10px}.region-box button,.export-action{margin:8px 8px 0 0}#style-categories [aria-pressed=true]{background:#345746;color:white}

.region-canvas{width:auto;max-width:100%;height:auto;max-height:38vh;margin:12px auto}.region-box>.row .field{min-width:0}.region-box textarea{height:90px;min-height:70px}

.board-editor{width:min(1150px,96vw);max-height:92vh;overflow:auto}.board-editor-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:18px;margin:20px 0}.board-material-card{background:#f3f0e8;border:1px solid #ddd7c9;padding:18px;border-radius:14px}.board-material-card input,.board-material-card select{width:100%;min-width:0}.board-material-card .field{display:block;margin:12px 0}.board-sample{width:100%;height:auto;background:#e5e2d9}.board-editor-actions{position:sticky;bottom:0;background:#fffdf6;padding:14px 0;border-top:1px solid #ddd;display:flex;gap:8px;flex-wrap:wrap}.board-crop-box{width:min(1000px,96vw);max-height:92vh;overflow:auto}.board-crop-canvas{display:block;width:auto;max-width:100%;max-height:48vh;height:auto;margin:12px auto;touch-action:none;cursor:crosshair}.board-crop-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.board-crop-fields input{width:100%;min-width:0}.board-crop-box button{margin:12px 8px 0 0}
.sample-quality{font-size:12px;line-height:1.6;padding:10px 12px;border-radius:8px;background:#e8ede1;color:#3d5e45}.quality-limited{background:#f2ead6;color:#735b28}.quality-low{background:#f3e1d8;color:#8b4732}.board-crop-preview{display:block;max-width:100%;height:auto;margin:12px auto;background:#e8e7df}.output-options{border-top:1px solid var(--line);padding-top:20px;margin-top:22px}.output-options h3{margin-bottom:15px}.board-material-card .sample-quality{min-height:70px}
