*{box-sizing:border-box}body{margin:0;background:#fafaf5;color:#263d34;font:14px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--paper:#fafaf5;--card:#fff;--ink:#263d34;--muted:#717c73;--line:#dedfd5;--soft:#eef0e8;--green:#244c42;--accent:#dfb76f}button,input,select,textarea{font:inherit}button{cursor:pointer;transition:background .16s,transform .16s;color:inherit;border:1px solid var(--line);background:var(--card);border-radius:7px;padding:9px 12px}button:hover{background:var(--soft)}button:active{transform:translateY(1px)}button:disabled{cursor:wait;opacity:.5}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #c29751;outline-offset:2px}input,select,textarea{width:100%;background:var(--card);border:1px solid var(--line);border-radius:6px;padding:10px 11px;color:var(--ink);min-width:0}input[type=color]{width:28px;height:28px;padding:2px;border:0;flex:none}input[type=number]{font-variant-numeric:tabular-nums}.topbar{height:76px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 26px;gap:20px}.brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-size:22px;letter-spacing:-1px}.brand svg{width:33px;height:33px;stroke:currentColor;stroke-width:1.5;fill:none}.brand b{font-weight:400;color:var(--muted)}.top-note{color:var(--muted);font-size:12px;letter-spacing:.04em}.top-actions{display:flex;align-items:center;gap:8px}#saved{font-size:11px;color:var(--muted);margin-right:10px}.ghost{border-color:transparent;background:transparent}.studio{display:grid;grid-template-columns:286px minmax(350px,1fr) 295px;min-height:850px;height:calc(100vh - 111px);max-height:1100px}.design-panel{overflow:auto;padding:25px 23px 30px;border-right:1px solid var(--line)}.panel-intro{margin-bottom:28px}.eyebrow{font-size:9px;letter-spacing:.15em;font-weight:600;margin:0 0 9px;color:var(--muted)}h1{font-size:36px;font-weight:400;letter-spacing:-1.6px;line-height:1.04;margin:0 0 13px;font-family:Georgia,"Times New Roman",serif}h1 em{font-weight:400;color:#8c7550}.panel-intro>p:last-child{font-size:12px;color:var(--muted);max-width:190px}h2{font-size:15px;margin:0 0 15px;font-weight:600;letter-spacing:-.3px}.design-panel section{margin-top:26px}.design-panel section h2 span{color:#9a9f91;font-size:10px;font-weight:400;margin-right:9px}.field{display:block;font-size:11px;color:var(--muted);margin:13px 0}.field input,.field select,.field textarea{display:block;margin-top:5px;font-size:12px}.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.two .field{margin-top:0;margin-bottom:0}.family-tabs{display:flex;background:var(--soft);padding:3px;border-radius:7px;gap:3px;margin-bottom:10px}.family-tabs button{flex:1;background:transparent;border:0;font-size:12px;padding:8px}.family-tabs .active{background:var(--card);box-shadow:0 1px 3px #0000000c}.structures{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.structure{padding:10px 4px 8px;font-size:9px;background:transparent;line-height:1.25}.structure svg{display:block;width:35px;height:40px;margin:0 auto 6px;stroke:#7d897d;stroke-width:1.3;fill:none}.structure.active{border-color:var(--green);background:#e5ece2}.structure.active svg{stroke:var(--green)}.text-button{background:none;border:0;padding:3px 0;color:#6e7e6d;font-size:11px;text-align:left}.hint{font-size:11px;line-height:1.6;color:var(--muted);margin:8px 0}.palettes{display:flex;gap:7px;margin:0 0 12px}.palettes button{padding:5px;display:flex;gap:0;border-radius:30px}.palettes i{width:19px;height:25px;display:block;border-radius:20px 0 0 20px}.palettes i+i{border-radius:0 20px 20px 0}.color-field{display:flex;align-items:center;gap:7px;font-size:10px}.preview-panel{position:relative;min-height:560px;overflow:hidden;background:#eeeee5;isolation:isolate}.preview-top{position:absolute;z-index:1;left:28px;right:28px;top:29px;display:flex;justify-content:space-between;pointer-events:none}.preview-top h2{font-family:Georgia,serif;font-size:26px;line-height:1.1;font-weight:400;margin:0 0 8px}.preview-top p{font-size:11px;color:var(--muted);margin:0}.piece-tag{font:11px/1.5 ui-monospace,monospace;color:var(--muted);padding-top:8px}#viewport{position:absolute;inset:0}#viewport canvas{display:block;width:100%;height:100%;touch-action:none}.viewer-controls{position:absolute;z-index:2;left:50%;bottom:81px;transform:translateX(-50%);display:flex;gap:3px;background:var(--card);padding:4px;border:1px solid var(--line);border-radius:8px;box-shadow:0 3px 15px #273e3320;white-space:nowrap}.viewer-controls button{border:0;font-size:10px;padding:7px 10px}.model-state{position:absolute;left:50%;bottom:133px;transform:translateX(-50%);font-size:10px;display:flex;align-items:center;gap:8px;white-space:nowrap;background:var(--paper);border-radius:15px;padding:6px 12px;box-shadow:0 2px 8px #00000009}.model-state.ready{color:#487857}.model-state.error{color:#ad493e}.spinner{display:inline-block;flex:none;width:11px;height:11px;border:1.5px solid #bdc7ba;border-top-color:var(--green);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.preview-bottom{position:absolute;bottom:20px;left:25px;right:25px;display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:9px}.model-warning{position:absolute;z-index:3;bottom:155px;left:20px;right:20px;background:#fff3d8;border:1px solid #e2c58c;padding:10px;border-radius:5px;font-size:11px;color:#73562e}.batch-panel{border-left:1px solid var(--line);display:flex;flex-direction:column;padding:27px 20px 20px;overflow:hidden;background:var(--paper)}.batch-heading{display:flex;align-items:center;justify-content:space-between}.batch-heading h2{font-size:23px;font-weight:400;font-family:Georgia,serif;margin:0}.batch-heading h2 span{font:11px/1 ui-sans-serif,system-ui;background:var(--soft);padding:4px 7px;border-radius:5px;vertical-align:middle;margin-left:4px}.batch-heading button{font-size:11px}.import-actions{display:flex;gap:7px;margin-top:13px}.import-actions button{font-size:11px;flex:1;padding:10px 5px}.template-links{display:flex;gap:10px;margin-top:6px}.template-links button{background:transparent;border:0;font-size:10px;color:var(--muted);padding:3px 0}.participants{overflow:auto;flex:1;margin:22px -3px 20px;padding:0 3px;min-height:150px}.person{display:flex;align-items:center;gap:10px;width:100%;padding:12px 9px;background:transparent;border:1px solid transparent;text-align:left;border-bottom-color:var(--line);border-radius:6px}.person.active{background:#e9ede3;border-color:#c6d0bc}.person .medal-number{width:28px;height:32px;border:1px solid #d4c29c;background:#f0e9d8;border-radius:12px 12px 9px 9px;display:grid;place-items:center;font-size:11px;color:#8c6a35;flex:none}.person .person-text{flex:1;min-width:0}.person strong{display:block;font-size:12px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.person small{display:block;font-size:9px;color:var(--muted);margin-top:2px}.person .qty{font-size:10px;color:var(--muted)}.batch-footer{border-top:1px solid var(--line);padding-top:18px}.total-line{display:flex;justify-content:space-between;align-items:baseline;font-size:11px}.total-line strong{font:23px/1.2 Georgia,serif;font-weight:400}.primary{background:var(--green);border-color:var(--green);color:#fff;padding:12px 15px}.primary:hover{background:#326153;color:white}.secondary{background:transparent;border-color:var(--line)}.batch-footer>button{width:100%;margin-top:7px;font-size:12px}.batch-footer>.primary{display:flex;justify-content:space-between;align-items:center;text-align:left}.privacy-note{text-align:center;font-size:9px;color:var(--muted);margin-top:15px}.app-footer{height:35px;display:flex;justify-content:space-between;align-items:center;padding:0 24px;border-top:1px solid var(--line);color:var(--muted);font-size:9px;letter-spacing:.02em}dialog{border:1px solid var(--line);border-radius:14px;background:var(--paper);color:var(--ink);padding:0;width:min(850px,95vw);max-height:90vh;box-shadow:0 20px 80px #0003}dialog::backdrop{background:#182b2466;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:center;padding:24px 26px;border-bottom:1px solid var(--line)}.dialog-head h2{font:27px/1.2 Georgia,serif;font-weight:400;margin:0}.dialog-head>button{border:0;background:transparent;font-size:24px}.dialog-content{padding:20px 26px;max-height:65vh;overflow:auto}.dialog-footer{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);padding:18px 26px}.table-scroll{width:100%;overflow:auto;margin:15px 0}table{border-collapse:collapse;width:100%;font-size:12px}th{text-align:left;font-size:10px;color:var(--muted);font-weight:500;padding:8px 5px;border-bottom:1px solid var(--line)}td{padding:5px;border-bottom:1px solid var(--line)}td input{padding:8px;min-width:75px;font-size:12px}td:first-child input{min-width:180px}td:nth-child(2) input{min-width:140px}td:nth-child(4) input{width:80px}td button{border:0;background:transparent;padding:5px 10px}.mapping{display:grid;grid-template-columns:repeat(2,1fr);gap:0 15px}#import-preview td{white-space:nowrap;max-width:250px;overflow:hidden;text-overflow:ellipsis}.error{color:#ad493e;font-size:12px}.progress-content{text-align:center;padding:36px;max-height:none}.progress-content h2{font:30px Georgia,serif}.progress-symbol{font-size:52px;color:#b49357}.progress-content p{font-size:12px}progress{width:100%;height:8px;accent-color:var(--green);margin:15px 0}#progress-dialog{max-width:450px}#toast{position:fixed;z-index:20;left:50%;bottom:32px;transform:translate(-50%,15px);padding:12px 22px;color:white;background:#263e34;border-radius:8px;box-shadow:0 5px 30px #0002;opacity:0;pointer-events:none;transition:.2s;max-width:90vw;font-size:12px}#toast.show{opacity:1;transform:translate(-50%,0)}[hidden]{display:none!important}body[data-theme=dark]{--paper:#1b231f;--card:#242e28;--ink:#e6e8dc;--muted:#a2afa3;--line:#354137;--soft:#303d32;--green:#40735c;color:var(--ink);background:var(--paper)}body[data-theme=dark] .person.active,body[data-theme=dark] .structure.active{background:#354638;border-color:#708b69}body[data-theme=dark] .preview-panel{background:#242b27}body[data-theme=dark] h1 em{color:#c6b18d}
@media(min-width:1600px){.studio{grid-template-columns:310px minmax(350px,1fr) 330px}.design-panel{padding:30px}.batch-panel{padding:30px 25px}.preview-top{left:40px;top:38px}.preview-top h2{font-size:32px}}@media(max-width:1100px){.studio{grid-template-columns:250px minmax(320px,1fr);height:auto;max-height:none;min-height:780px}.batch-panel{grid-column:1/-1;border-left:0;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:0 25px}.participants{grid-column:1;grid-row:4/8;max-height:320px;margin-top:12px}.batch-footer{grid-column:2;grid-row:1/8;padding-top:0;border:0}.batch-heading{grid-column:1}.preview-panel{min-height:900px}.design-panel{max-height:1000px}.top-note{display:none}.app-footer{height:auto;min-height:35px}}@media(max-width:650px){.topbar{height:64px;padding:0 14px}.brand{font-size:17px;gap:6px}.brand svg{width:26px}.top-actions{gap:0}.top-actions button{font-size:10px;padding:7px}.top-note,#saved{display:none}.studio{display:flex;flex-direction:column;min-height:0}.preview-panel{order:0;height:560px;min-height:560px}.design-panel{order:1;padding:22px 18px;border:0;max-height:none;overflow:visible}.batch-panel{order:2;display:flex;padding:24px 18px}.panel-intro h1 br{display:none}.panel-intro h1{font-size:30px;letter-spacing:-1px}.panel-intro h1 em{margin-left:6px}.panel-intro>p:last-child{max-width:none}.design-panel section{margin-top:23px}.design-panel section h2{font-size:16px}.structures{gap:10px}.structure{font-size:11px}.structure svg{width:40px;height:45px}.field{font-size:12px}.field input,.field select{font-size:14px;padding:11px}.participants{max-height:350px;min-height:180px}.preview-top{left:22px;right:22px;top:24px}.preview-top h2{font-size:25px}.preview-bottom{font-size:8px;left:16px;right:16px}.viewer-controls{bottom:70px}.model-state{bottom:116px}.batch-footer{border-top:1px solid var(--line);padding-top:15px}.batch-heading h2{font-size:26px}.person{padding:14px 10px}.person strong{font-size:14px}.person small{font-size:11px}.dialog-head,.dialog-content,.dialog-footer{padding:17px}.dialog-head h2{font-size:23px}.mapping{grid-template-columns:1fr 1fr;gap:0 10px}.app-footer{font-size:8px;gap:10px;padding:8px 18px}.import-actions button{font-size:13px}.batch-footer>button{padding:14px}.template-links button{font-size:11px}}
