*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}:root{--bg: #18202E;--bg-card: #1E2A3E;--border-outer: #0E1420;--border-inner: #4A6A9B;--border-highlight: #6B8FCC;--text: #F0F0F0;--text-dim: #8AAAD0;--accent: #F8C838;--accent-hover: #FFE070;--accent-green: #58D858;--error: #F87171;--font: "Bitcount Prop Double", monospace;--font-mono: "Courier New", "Courier", monospace}html{background:var(--bg)}body{font-family:var(--font);color:var(--text);font-size:24px;line-height:1.4;-webkit-font-smoothing:none;-moz-osx-font-smoothing:unset}main{max-width:640px;margin:0 auto;padding:40px 20px 80px}header{margin-bottom:32px}h1{font-size:36px;font-weight:200;line-height:1.2;text-shadow:3px 3px 0 var(--border-outer)}.accent{color:var(--accent)}.subtitle{color:var(--text-dim);font-size:22px;font-weight:400;margin-top:6px}.subtitle a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}.subtitle a:hover{color:var(--accent-hover)}.card{background:var(--bg-card);border:3px solid var(--border-inner);border-radius:8px;padding:24px;margin-bottom:24px;box-shadow:0 0 0 3px var(--border-outer),inset 0 0 0 2px #6a8fcc26}h2{font-weight:300;margin-bottom:20px;color:var(--accent);text-transform:uppercase;letter-spacing:.08em;font-size:30px;text-shadow:1px 1px 0 var(--border-outer)}.field{margin-bottom:20px}.field label{display:block;font-size:20px;font-weight:300;margin-bottom:6px;color:var(--text)}.field-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.field-header label{margin-bottom:0}.hint{color:var(--text-dim);font-weight:400}input[type=text],input[type=number],textarea{width:100%;background:#0e1420;border:2px solid var(--border-inner);border-radius:4px;padding:10px 12px;color:var(--text);font-family:var(--font);font-size:22px;outline:none;box-shadow:inset 2px 2px #0006}input:focus,textarea:focus{border-color:var(--accent);box-shadow:inset 2px 2px #0006,0 0 0 1px var(--accent)}textarea{font-family:var(--font-mono);font-size:12px;resize:vertical;white-space:pre;overflow-x:auto}.dim-presets{display:flex;gap:6px}.preset{background:var(--bg);border:2px solid var(--border-inner);border-radius:4px;color:var(--text-dim);font-size:20px;padding:8px 16px;cursor:pointer;font-family:var(--font)}.preset:hover{border-color:var(--accent);color:var(--text)}.preset.active{border-color:var(--accent);color:var(--accent);background:#f8c8381a}.palette-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.color-cell{display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 4px;border:2px solid var(--border-inner);border-radius:4px;cursor:pointer;user-select:none}.color-cell:hover{border-color:var(--border-highlight)}.color-cell.selected{border-color:var(--accent);background:#f8c8381a}.color-cell .swatch{width:28px;height:28px;border-radius:2px;border:2px solid rgba(255,255,255,.15)}.color-cell .key{font-size:16px;font-weight:200;color:var(--accent);line-height:1}.btn-primary{display:inline-flex;align-items:center;justify-content:center;background:var(--accent);color:var(--border-outer);border:3px solid var(--border-outer);border-radius:6px;padding:10px 24px;font-weight:400;font-size:26px;cursor:pointer;font-family:var(--font);text-transform:uppercase;letter-spacing:.03em;box-shadow:0 4px 0 var(--border-outer),inset 0 -2px #0003,inset 0 2px #ffffff40}.btn-primary:hover{background:var(--accent-hover);box-shadow:0 4px 0 var(--border-outer),inset 0 -2px #00000026,inset 0 2px #ffffff4d}.btn-primary.copied{background:var(--accent-green)}.btn-primary:active{box-shadow:0 1px 0 var(--border-outer),inset 0 2px #0003;transform:translateY(3px)}.btn-small{background:var(--bg);border:2px solid var(--border-inner);border-radius:4px;color:var(--text-dim);font-size:18px;padding:4px 12px;cursor:pointer;font-family:var(--font);box-shadow:0 2px 0 var(--border-outer)}.btn-small:hover{border-color:var(--accent);color:var(--text)}.btn-small:active{box-shadow:none;transform:translateY(2px)}.btn-small.copied{border-color:var(--accent-green);color:var(--accent-green)}.prompt-wrap{margin-top:20px}.prompt-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.prompt-label{font-size:20px;font-weight:700;color:var(--text)}.prompt-out{background:#0e1420;border:2px solid var(--border-inner);border-radius:4px;padding:14px;font-family:var(--font);font-size:18px;line-height:1.5;white-space:pre-wrap;word-break:break-word;color:var(--text);max-height:400px;overflow-y:auto;box-shadow:inset 2px 2px #0006}.canvas-wrap{margin-top:20px}.canvas{border:3px solid var(--border-inner);border-radius:4px;display:block;image-rendering:pixelated;max-width:100%;box-shadow:0 0 0 3px var(--border-outer)}.canvas-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:12px}.toolbar-actions{display:flex;gap:6px}.legend{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.legend-item{display:flex;align-items:center;gap:5px;font-size:18px;color:var(--text-dim)}.legend-swatch{width:12px;height:12px;border-radius:2px;border:2px solid rgba(255,255,255,.15)}.error{color:var(--error);font-size:16px;font-weight:300;margin-top:12px;padding:10px;background:#f871711a;border:2px solid var(--error);border-radius:4px}.error-fix{margin-top:10px}.error-fix-label{font-size:18px;color:var(--accent);margin-bottom:6px}.error-fix-prompt-wrap{position:relative}.error-fix-prompt{background:#0e1420;border:2px solid var(--border-inner);border-radius:4px;padding:10px 70px 10px 12px;font-family:var(--font);font-size:16px;line-height:1.4;white-space:pre-wrap;word-break:break-word;color:var(--text);max-height:160px;overflow-y:auto}.error-fix-prompt-wrap .btn-small{position:absolute;top:8px;right:8px}.hidden{display:none!important}@media (max-width: 480px){.palette-grid{grid-template-columns:repeat(5,1fr)}}
