:root{--bg: #fff;--sidebar: #fafafa;--text: #202020;--muted: #808080;--border: #ededed;--hover: rgba(0, 0, 0, .06);--accent: #db4c3f;--accent-hover: #c3392c;--accent-soft: #ffefe5;--danger: #b00020;--radius: 8px;--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;color-scheme:light dark}@media(prefers-color-scheme:dark){:root{--bg: #1e1e1e;--sidebar: #282828;--text: #f0f0f0;--muted: #a0a0a0;--border: #333;--hover: rgba(255, 255, 255, .08);--accent: #e5594c;--accent-hover: #f06a5d;--accent-soft: #3d2622;--danger: #ff8a80}}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 var(--font)}h1,h2,h3,p{margin:0}button,select,input{font:inherit;color:inherit}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.app{display:grid;grid-template-columns:280px minmax(0,1fr) 320px;min-height:100vh}.sidebar{position:sticky;top:0;align-self:start;height:100vh;overflow-y:auto;padding:16px 12px;background:var(--sidebar);display:flex;flex-direction:column;gap:8px}.content{padding:32px 40px 64px;max-width:820px;width:100%;margin:0 auto;display:flex;flex-direction:column;gap:24px}.settings{position:sticky;top:0;align-self:start;height:100vh;overflow-y:auto;padding:24px 20px;border-left:1px solid var(--border);display:flex;flex-direction:column;gap:20px}.brand{display:flex;align-items:center;gap:8px;padding:4px 8px 12px;font-size:16px;font-weight:700}.brand-mark{display:grid;place-items:center;width:26px;height:26px;border-radius:6px;background:var(--accent);color:#fff;font-weight:700}.add-button{display:flex;align-items:center;gap:8px;padding:8px;border-radius:6px;color:var(--accent);font-weight:600;cursor:pointer}.add-button:hover,.add-button:focus-within{background:var(--hover)}.add-plus{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--accent);color:#fff}.nav{display:flex;flex-direction:column;gap:2px;margin-top:8px}.nav ul,.layers{list-style:none;margin:0;padding:0}.nav-title{padding:4px 8px;color:var(--muted);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em}.nav-empty{padding:4px 8px;color:var(--muted)}.nav-row{display:flex;align-items:center;border-radius:6px}.nav-row:hover{background:var(--hover)}.nav-row.is-active{background:var(--accent-soft);color:var(--accent);font-weight:600}.nav-item{display:flex;align-items:center;gap:8px;flex:1;min-width:0;padding:7px 8px;border:0;border-radius:6px;background:none;text-align:left;cursor:pointer}.nav-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-row .nav-item:hover{background:none}.sidebar-actions>.nav-item{width:100%}.sidebar-actions>.nav-item:hover:not(:disabled),.sidebar-actions>label.nav-item:hover,.sidebar-actions>label.nav-item:focus-within{background:var(--hover)}.nav-item:disabled{opacity:.45;cursor:default}.nav-delete{display:grid;place-items:center;width:24px;height:24px;margin-right:4px;border:0;border-radius:4px;background:none;color:var(--muted);opacity:0;cursor:pointer}.nav-row:hover .nav-delete,.nav-delete:focus-visible{opacity:1}.nav-delete:hover{background:var(--hover);color:var(--text)}.sidebar-actions{margin-top:auto;padding-top:8px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:2px}label.nav-item{cursor:pointer}.content-head{display:flex;align-items:baseline;gap:12px}.content-head h1{font-size:26px;font-weight:700;overflow-wrap:anywhere}.busy{color:var(--muted)}.alert{padding:10px 12px;border-radius:var(--radius);background:var(--accent-soft);color:var(--danger)}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:8px;border-bottom:1px solid var(--border)}.section-head h2{font-size:16px}.count{margin-left:4px;color:var(--muted);font-weight:400}.card .preview{display:block;max-width:100%;max-height:480px;height:auto;margin:16px auto 0;border:1px solid var(--border);border-radius:var(--radius);background:#fff}.empty{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:64px;text-align:center;color:var(--muted)}.empty h2{color:var(--text);font-size:18px}.layer{display:grid;grid-template-columns:auto 56px minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:10px 4px;border-bottom:1px solid var(--border)}.layer:hover{background:var(--hover);border-radius:6px}.layer-dot{width:20px;height:20px;border:2px solid;border-radius:50%;box-shadow:0 0 0 1px var(--border)}.layer-thumb{width:56px;height:56px;object-fit:contain;border:1px solid var(--border);border-radius:6px;background:#fff}.layer-text h3{font-size:14px;font-weight:600}.layer-text p{color:var(--muted);font-size:12px}.btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border:1px solid transparent;border-radius:6px;background:none;font-weight:500;cursor:pointer;white-space:nowrap}.btn-secondary{background:var(--hover)}.btn-secondary:hover{background:var(--accent-soft);color:var(--accent)}.btn-ghost{padding:4px 8px;color:var(--muted)}.btn-ghost:hover{background:var(--hover);color:var(--text)}.input,.select{padding:6px 8px;border:1px solid var(--border);border-radius:6px;background:var(--bg)}:is(button,select,input[type=checkbox],input[type=range]):focus-visible,.add-button:focus-within,label.nav-item:focus-within{outline:2px solid var(--accent);outline-offset:1px}.settings-head{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.settings-head .btn-ghost{margin-left:-8px}.settings-head h2{font-size:18px}.settings section{display:flex;flex-direction:column;gap:12px}.settings h3{color:var(--muted);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em}.field{display:flex;flex-direction:column;gap:2px}.field-head{display:flex;justify-content:space-between}.field-head output{color:var(--muted);font-variant-numeric:tabular-nums}input[type=range]{width:100%;accent-color:var(--accent)}input[type=checkbox]{accent-color:var(--accent);width:16px;height:16px}.check{display:flex;align-items:center;gap:8px;cursor:pointer}.hint{color:var(--muted);font-size:12px}.hint.is-warning{color:var(--danger)}.input{width:100%}@media(max-width:1100px){.app{grid-template-columns:240px minmax(0,1fr)}.settings{grid-column:2;position:static;height:auto;border-left:0;border-top:1px solid var(--border)}}@media(max-width:760px){.app{grid-template-columns:minmax(0,1fr)}.sidebar{position:static;height:auto}.settings{grid-column:1}.content{padding:20px 16px 40px}.layer{grid-template-columns:auto 48px minmax(0,1fr)}.layer .select,.layer .btn{grid-column:3;justify-self:start}}
