:root { color-scheme: light; --ink:#171713; --muted:#77736b; --line:#d7d0c4; --paper:#f3efe6; --red:#c8342f; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; color:var(--ink); background:#e9e4da; font-family:Manrope,Arial,sans-serif; }
button,input,textarea,select { font:inherit; }
button { color:inherit; }
.app-shell { width:min(1480px,calc(100% - 32px)); min-height:calc(100vh - 32px); margin:16px auto; background:var(--paper); border:1px solid #cac3b8; box-shadow:0 18px 55px #443d3020; }
.topbar { height:74px; padding:0 30px; display:flex; align-items:center; border-bottom:1px solid var(--line); }
.brand { display:flex; gap:11px; align-items:center; width:370px; color:var(--ink); text-decoration:none; font-weight:800; letter-spacing:.08em; }
.brand-mark { display:grid; place-items:center; width:32px; height:37px; background:var(--red); color:white; font:700 25px/1 'PT Serif',serif; transform:rotate(-3deg); box-shadow:2px 2px 0 #171713; }
.topbar p { margin:0; color:var(--muted); font-size:13px; letter-spacing:.02em; }
.status { margin-left:auto; color:#68655e; font-size:12px; font-weight:600; }
.status i { display:inline-block; width:7px; height:7px; margin-right:7px; background:#71946c; border-radius:50%; }
.workspace { display:grid; grid-template-columns:400px 1fr; min-height:calc(100vh - 108px); }
.controls { padding:30px; border-right:1px solid var(--line); overflow:auto; }
.section-heading,.preview-title>div { display:flex; align-items:center; gap:12px; }
.section-heading span,.preview-title>div>span { color:var(--red); font:700 12px/1 Manrope,sans-serif; }
h1,h2 { margin:0; font:700 19px/1.2 'PT Serif',Georgia,serif; }
textarea { width:100%; min-height:132px; margin-top:17px; padding:17px 18px; resize:vertical; border:1px solid #bbb3a7; border-radius:2px; outline:none; background:#f9f6ef; font:700 18px/1.45 'PT Serif',Georgia,serif; }
textarea:focus { border-color:#81796e; box-shadow:0 0 0 3px #8d84741a; }
.counter { display:flex; justify-content:space-between; margin-top:8px; color:#918b81; font-size:10px; }
.counter b { font-weight:600; }
.settings-heading { margin-top:31px; padding-top:27px; border-top:1px solid var(--line); }
.control-row,.palette-head { display:flex; justify-content:space-between; align-items:center; margin-top:23px; }
.control-row strong,.field-title strong,.palette-head strong { display:block; font-size:13px; }
.control-row small,.palette-head small,.seed-block small { display:block; margin-top:4px; color:#918b81; font-size:10px; }
.switch input { position:absolute; opacity:0; }
.switch span { display:block; width:42px; height:23px; padding:3px; border-radius:20px; background:#aaa49a; cursor:pointer; transition:.2s; }
.switch span:after { content:""; display:block; width:17px; height:17px; background:white; border-radius:50%; transition:.2s; }
.switch input:checked+span { background:var(--red); }
.switch input:checked+span:after { transform:translateX(19px); }
.field-group { margin-top:24px; }
.field-group select { width:100%; margin-top:9px; padding:10px 11px; border:1px solid #bbb3a7; border-radius:0; outline:none; background:#f9f6ef; color:#292722; font-size:12px; }
.two-cols { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.two-cols strong { display:block; font-size:11px; }
.field-title { display:flex; justify-content:space-between; align-items:center; }
output { padding:3px 8px; background:#e6e0d6; color:#6e685e; border-radius:2px; font-size:10px; }
input[type=range] { width:100%; height:3px; margin-top:16px; accent-color:var(--red); }
.text-button { padding:0; border:0; background:none; color:var(--red); cursor:pointer; font-size:11px; font-weight:700; }
.palette { margin-top:13px; display:grid; gap:8px; }
.color-row { display:grid; grid-template-columns:38px 1fr 48px 25px; align-items:center; gap:9px; }
.color-row input[type=color] { width:38px; height:30px; padding:0; border:1px solid #bbb3a7; background:none; cursor:pointer; }
.color-row input[type=range] { margin:0; }
.color-row output { text-align:center; padding:3px 2px; }
.remove-color { border:0; background:none; color:#999188; cursor:pointer; font-size:18px; }
.paper-palette-head { margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.paper-palette { display:grid; grid-template-columns:repeat(6,1fr); gap:7px; margin-top:13px; }
.paper-swatch { position:relative; height:29px; }
.paper-swatch input[type=color] { width:100%; height:100%; padding:0; border:1px solid #b9b0a2; cursor:pointer; }
.paper-swatch button { position:absolute; right:-5px; top:-8px; display:none; width:16px; height:16px; padding:0; border:0; border-radius:50%; background:#1b1b17; color:white; cursor:pointer; font-size:12px; line-height:15px; }
.paper-swatch:hover button { display:block; }
.seed-block { margin-top:25px; padding-top:23px; border-top:1px solid var(--line); }
.seed-block label { font-size:9px; color:#888177; letter-spacing:.14em; }
.seed-input { display:flex; margin-top:7px; }
.seed-input input { min-width:0; flex:1; padding:10px 12px; border:1px solid #bbb3a7; background:#f9f6ef; font:600 13px monospace; outline:none; }
.seed-input button { width:42px; border:1px solid #171713; background:#171713; color:white; cursor:pointer; font-size:20px; }
.preview-area { min-width:0; padding:30px 36px 24px; display:flex; flex-direction:column; }
.preview-title { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.alpha-label { color:#969087; font-size:9px; letter-spacing:.1em; }
.canvas-wrap { position:relative; flex:1; min-height:430px; display:grid; place-items:center; overflow:hidden; border:1px solid #d0c9be; background-color:#f8f7f3; background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNjAiIGhlaWdodD0iMTYwIj48ZmlsdGVyIGlkPSJuIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC43MiIgbnVtT2N0YXZlcz0iMyIgc3RpdGNoVGlsZXM9InN0aXRjaCIvPjxmZUNvbG9yTWF0cml4IHR5cGU9InNhdHVyYXRlIiB2YWx1ZXM9IjAiLz48ZmVDb21wb25lbnRUcmFuc2Zlcj48ZmVGdW5jQSB0eXBlPSJ0YWJsZSIgdGFibGVWYWx1ZXM9IjAgMC4yMiIvPjwvZmVDb21wb25lbnRUcmFuc2Zlcj48L2ZpbHRlcj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCglMjNuKSIvPjwvc3ZnPg=="),linear-gradient(45deg,#e8e5df 25%,transparent 25%),linear-gradient(-45deg,#e8e5df 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e8e5df 75%),linear-gradient(-45deg,transparent 75%,#e8e5df 75%); background-size:160px 160px,24px 24px,24px 24px,24px 24px,24px 24px; background-position:0 0,0 0,0 12px,12px -12px,-12px 0; }
canvas { display:block; max-width:94%; max-height:88%; filter:drop-shadow(0 8px 8px #2a211422); }
.actions { display:flex; align-items:center; gap:10px; margin-top:18px; }
.actions button { height:43px; padding:0 18px; border:1px solid #1b1b17; cursor:pointer; font-size:11px; font-weight:700; letter-spacing:.02em; }
.primary { background:#1b1b17; color:white; }
.primary:hover { background:var(--red); border-color:var(--red); }
.secondary { background:transparent; }
.actions>span { margin-left:auto; color:#8d877e; font:10px monospace; }
.hint { margin:10px 0 0; color:#9a948b; font-size:9px; text-align:center; }
#toast { position:fixed; left:50%; bottom:28px; padding:11px 17px; transform:translate(-50%,20px); background:#1b1b17; color:#fff; opacity:0; pointer-events:none; transition:.25s; font-size:12px; box-shadow:0 7px 20px #0004; }
#toast.show { opacity:1; transform:translate(-50%,0); }
.text-box-probe { position:absolute; left:-10000px; top:-10000px; visibility:hidden; white-space:nowrap; text-box:normal; text-box-trim:none; text-box-edge:auto; }
.text-box-probe.is-trimmed { text-box:trim-both cap alphabetic; text-box-trim:both; text-box-edge:cap alphabetic; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
@media (max-width:850px) { .app-shell{width:100%;margin:0;border:0}.topbar{padding:0 20px}.topbar p{display:none}.brand{width:auto}.workspace{grid-template-columns:1fr}.controls{border-right:0;border-bottom:1px solid var(--line);padding:24px}.preview-area{padding:24px}.canvas-wrap{min-height:420px}.alpha-label{display:none} }
@media (max-width:480px) { .status{display:none}.preview-area{padding:20px 14px}.canvas-wrap{min-height:330px}.actions{flex-wrap:wrap}.actions button{flex:1}.actions>span{width:100%;text-align:center}.two-cols{grid-template-columns:1fr} }
