:root {
  --paper: #f6f1e8;
  --paper-deep: #ebe3d6;
  --ink: #1f2420;
  --muted: #77776f;
  --line: rgba(31, 36, 32, 0.13);
  --green: #315f48;
  --orange: #e46f40;
  --white: #fffdf8;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 85% 5%, rgba(228,111,64,.09), transparent 28rem), var(--paper); }
button, input { font: inherit; }
button { color: inherit; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.brand { color: inherit; display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-family: Georgia, "Songti SC", serif; font-size: 21px; letter-spacing: .08em; }
.brand small { font-size: 7px; letter-spacing: .22em; margin-top: 5px; color: var(--muted); }
.brand-mark { width: 34px; height: 34px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; transform: rotate(8deg); }
.brand-mark i { display: block; border-radius: 50%; background: var(--green); box-shadow: inset -2px -2px 0 rgba(0,0,0,.15); }
.brand-mark i:nth-child(2) { background: #efb34f; }.brand-mark i:nth-child(3) { background: var(--orange); }.brand-mark i:nth-child(4) { background: #6589a6; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.offline-pill { font-size: 12px; color: var(--muted); }.offline-pill span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #5b9566; margin-right: 5px; }
.offline-pill.online { color: #9b4d2f; }.offline-pill.online span { background: var(--orange); }
.button { cursor: pointer; border: 0; border-radius: 999px; padding: 11px 18px; background: none; }
.button.ghost { border: 1px solid var(--line); background: rgba(255,255,255,.35); }
.install-button { border: 1px solid var(--green); background: var(--green); color: white; }
.install-button:hover { background: #274d3a; }
.button.primary { margin-top: 26px; width: 100%; display: flex; justify-content: space-between; align-items: center; border-radius: 9px; padding: 15px 18px; background: var(--ink); color: white; box-shadow: 0 8px 18px rgba(31,36,32,.14); }
.button.primary:hover:not(:disabled) { background: var(--green); transform: translateY(-1px); }
.button.primary:disabled { opacity: .38; cursor: not-allowed; }
main { max-width: 1440px; margin: auto; padding: 0 clamp(20px, 5vw, 72px) 50px; }
.file-launch-notice { display: none; max-width: 1440px; margin: 18px auto 0; padding: 14px clamp(20px, 5vw, 72px); border: 1px solid rgba(196,75,48,.35); background: #fff3eb; align-items: center; justify-content: space-between; gap: 20px; }
.file-protocol .file-launch-notice { display: flex; }
.file-launch-notice div { display: flex; flex-direction: column; gap: 4px; }
.file-launch-notice strong { color: #8d3527; font-size: 13px; }
.file-launch-notice small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.file-launch-notice .button { flex: none; border-color: #b9543e; background: #b9543e; color: white; text-decoration: none; }
.hero { min-height: 275px; display: flex; align-items: flex-end; justify-content: space-between; gap: 50px; padding: 42px 0 34px; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--orange); margin: 0 0 13px; }
h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-weight: 500; font-size: clamp(38px, 5vw, 68px); line-height: 1.08; letter-spacing: -.035em; }
h1 em { color: var(--green); font-style: normal; position: relative; } h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--orange); transform: rotate(-1deg); }
.hero-copy { max-width: 390px; margin: 0 0 8px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.workspace { min-height: 650px; display: grid; grid-template-columns: minmax(280px, 345px) 1fr; border: 1px solid var(--line); background: rgba(255,253,248,.55); box-shadow: 0 24px 70px rgba(57,48,35,.08); }
.control-panel { padding: 30px; border-right: 1px solid var(--line); background: rgba(255,255,255,.28); }
.step-heading { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 18px; }.step-heading > span { display: grid; place-items: center; width: 27px; height: 27px; flex: none; border-radius: 50%; background: var(--green); color: white; font: 10px Georgia, serif; }
.step-heading p { margin: 0 0 3px; font-size: 14px; font-weight: 700; }.step-heading small { color: var(--muted); font-size: 11px; }
.dropzone { min-height: 135px; border: 1px dashed #afa99e; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; cursor: pointer; transition: .2s ease; background: rgba(255,255,255,.25); }
.dropzone:hover, .dropzone.dragging { border-color: var(--green); background: rgba(49,95,72,.06); }.dropzone input { display: none; }.dropzone strong { font-size: 13px; }.dropzone small { font-size: 10px; color: var(--muted); }.upload-icon { color: var(--orange); font-size: 23px; transform: rotate(-45deg); }
.sample-link, .text-button { cursor: pointer; border: 0; background: none; padding: 10px 0; color: var(--green); font-size: 11px; }.sample-link { width: 100%; }
.pipeline-panel { margin-top: 10px; }
.mode-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }.mode-cards input { position: absolute; opacity: 0; }.mode-cards span { cursor: pointer; min-height: 53px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 3px; border: 1px solid var(--line); padding: 9px 10px; }.mode-cards b { font-size: 10px; }.mode-cards small { color: var(--muted); font-size: 8px; line-height: 1.35; }.mode-cards input:checked + span { border-color: var(--green); color: var(--green); background: rgba(49,95,72,.08); }
.subject-picker { margin-top: 9px; padding: 9px; background: var(--paper-deep); border: 1px solid var(--line); }.subject-instruction { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }.subject-instruction strong { font-size: 10px; }.subject-instruction small { color: var(--muted); font-size: 8px; }
.subject-canvas-wrap { position: relative; width: 100%; max-height: 260px; display: grid; place-items: center; overflow: hidden; background-color: #ddd8ce; background-image: linear-gradient(45deg,#c9c4ba 25%,transparent 25%),linear-gradient(-45deg,#c9c4ba 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#c9c4ba 75%),linear-gradient(-45deg,transparent 75%,#c9c4ba 75%); background-size: 16px 16px; background-position: 0 0,0 8px,8px -8px,-8px 0; }.subject-canvas-wrap canvas { display: block; max-width: 100%; max-height: 260px; width: auto; height: auto; cursor: crosshair; touch-action: none; }.target-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 2px var(--orange),0 2px 8px rgba(0,0,0,.3); pointer-events: none; display: none; }
.mask-tools { display: grid; grid-template-columns: repeat(2,1fr); gap: 4px; margin-top: 7px; }.mask-tool { cursor: pointer; border: 1px solid var(--line); padding: 6px 4px; background: rgba(255,255,255,.45); color: var(--muted); font-size: 8px; }.mask-tool.active { color: white; border-color: var(--green); background: var(--green); }
.ai-notice, .pixel-notice { margin-top: 8px; padding: 10px 11px; border: 1px solid rgba(228,111,64,.3); background: rgba(228,111,64,.07); display: flex; flex-direction: column; gap: 4px; }
.pixel-notice { border-color: rgba(49,95,72,.28); background: rgba(49,95,72,.06); }
.ai-notice strong, .pixel-notice strong { font-size: 9px; }.ai-notice small, .pixel-notice small { color: var(--muted); font-size: 8px; line-height: 1.55; }
.ai-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 3px; }.ai-flow span { padding: 3px 5px; border-radius: 3px; background: rgba(255,255,255,.62); color: #6d3e2c; font-size: 7px; }.ai-flow i { color: var(--orange); font-size: 8px; font-style: normal; }
.ai-notice.ready { border-color: rgba(51,126,89,.3); background: rgba(51,126,89,.07); }
.ai-notice.ready .ai-flow i { color: #337e59; }
.ai-model-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; margin-top: 6px; }
.ai-model-options input { position: absolute; opacity: 0; }
.ai-model-options span { cursor: pointer; min-height: 46px; display: flex; flex-direction: column; justify-content: center; gap: 2px; border: 1px solid rgba(92,74,61,.2); border-radius: 5px; padding: 7px 8px; background: rgba(255,255,255,.55); }
.ai-model-options b { font-size: 8px; }
.ai-model-options small { font-size: 7px; line-height: 1.35; }
.ai-model-options input:checked + span { border-color: var(--green); background: var(--green); color: white; }
.ai-model-options input:checked + span small { color: rgba(255,255,255,.72); }
.ai-quota-note { padding: 5px 6px; border-left: 2px solid var(--green); background: rgba(255,255,255,.45); }
.ai-quota-note.warning { border-left-color: var(--orange); color: #8d482e; }
.ai-actions { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.ai-actions button, .ai-actions a { border: 1px solid rgba(92,74,61,.2); border-radius: 4px; background: rgba(255,255,255,.72); color: var(--ink); font: inherit; font-size: 7px; line-height: 1; padding: 6px 7px; text-decoration: none; cursor: pointer; }
.ai-actions button:disabled { opacity: .5; cursor: wait; }
.ai-setup { margin-top: 4px; border-top: 1px solid rgba(92,74,61,.12); padding-top: 5px; }
.ai-setup summary { cursor: pointer; color: var(--ink); font-size: 8px; font-weight: 700; }
.ai-setup summary small { color: var(--muted); font-size: 7px; font-weight: 400; }
.ai-setup ol { margin: 6px 0 0; padding-left: 16px; color: var(--muted); font-size: 7px; line-height: 1.7; }
.ai-setup code { border-radius: 2px; background: rgba(92,74,61,.08); padding: 1px 3px; color: var(--ink); font-size: 7px; }
.divider { height: 1px; background: var(--line); margin: 17px 0 24px; }
.field-label { display: flex; justify-content: space-between; font-size: 11px; margin: 19px 0 10px; font-weight: 600; }.field-label output { color: var(--orange); }.field-label.standalone { margin-bottom: 9px; }
input[type="range"] { width: 100%; accent-color: var(--green); }
.range-labels { display: flex; justify-content: space-between; padding: 0 3px; color: var(--muted); font-size: 9px; }
.field-note { margin: 6px 0 0; color: var(--orange); font-size: 8px; line-height: 1.5; }
.resolution-advice { margin-top: 8px; padding: 9px; border: 1px solid rgba(49,95,72,.28); background: rgba(49,95,72,.07); display: grid; gap: 8px; }
.resolution-advice strong, .resolution-advice small { display: block; }
.resolution-advice strong { color: var(--green); font-size: 9px; line-height: 1.45; }
.resolution-advice small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.resolution-advice button { cursor: pointer; width: 100%; border: 1px solid var(--green); border-radius: 5px; padding: 7px 8px; background: var(--green); color: white; font-size: 9px; }
.resolution-advice button:hover { background: #244b38; }
.palette-note { margin: 6px 0 0; color: var(--muted); font-size: 8px; }.palette-note b { color: var(--green); letter-spacing: .04em; }
.ratio-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }.ratio-options input { position: absolute; opacity: 0; }.ratio-options span { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 3px; border: 1px solid var(--line); font-size: 10px; }.ratio-options small { color: var(--muted); font-size: 8px; }.ratio-options input:checked + span { border-color: var(--green); background: rgba(49,95,72,.09); color: var(--green); }.composition-tune { margin-top: 13px; padding: 9px 11px 12px; border: 1px solid var(--line); }.composition-tune summary { cursor: pointer; font-size: 10px; font-weight: 700; }.composition-tune summary small { float: right; color: var(--muted); font-weight: 400; }.composition-tune .field-label { margin-top: 13px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }.segmented input { position: absolute; opacity: 0; }.segmented span { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 3px; border: 1px solid var(--line); font-size: 11px; }.segmented small { color: var(--muted); font-size: 8px; }.segmented input:checked + span { background: var(--green); color: white; border-color: var(--green); }.segmented input:checked + span small { color: rgba(255,255,255,.68); }
.result-panel { position: relative; min-width: 0; padding: clamp(22px, 4vw, 48px); }
.empty-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }.empty-state p { margin: 20px 0 5px; font: 20px Georgia, "Songti SC", serif; }.empty-state small { color: var(--muted); }
.empty-board { width: 178px; aspect-ratio: 1; opacity: .35; background-image: radial-gradient(circle, #969187 2.5px, transparent 3px); background-size: 17.8px 17.8px; mask-image: linear-gradient(to bottom, black, transparent); }
.result-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }.result-topline h2 { font: 25px Georgia, "Songti SC", serif; margin: 0; }
.result-actions { display: flex; gap: 8px; }
.button.primary { border-color: var(--green); background: var(--green); color: white; }.button.primary:hover { background: #244b38; }
.score-card { display: grid; grid-template-columns: 95px repeat(3, 1fr); align-items: center; padding: 16px 20px; border: 1px solid var(--line); background: var(--paper); }
.score-ring { width: 68px; height: 68px; border: 5px solid var(--orange); border-right-color: #dacfc0; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; transform: rotate(-15deg); }.score-ring > * { transform: rotate(15deg); }.score-ring strong { font: 23px Georgia, serif; }.score-ring span { font-size: 8px; color: var(--muted); }
.metric { border-left: 1px solid var(--line); padding-left: clamp(12px, 3vw, 28px); }.metric span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 7px; }.metric strong { font: 18px Georgia, serif; }.metric del { color: #a29c92; font-size: 14px; }.metric b { color: var(--green); }
.editor-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.45); }
.tool-group { display: flex; gap: 4px; min-width: 0; overflow-x: auto; }.tool { cursor: pointer; border: 0; background: transparent; min-width: 58px; padding: 7px 8px; color: var(--muted); font-size: 9px; border-radius: 5px; }.tool span { display: block; font-size: 17px; line-height: 1.2; margin-bottom: 3px; }.tool:hover, .tool.active { color: white; background: var(--green); }
.history-group { display: flex; align-items: center; gap: 6px; flex: none; }.active-color { display: flex; align-items: center; gap: 7px; padding-right: 8px; color: var(--muted); font-size: 9px; }.active-color i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); background: repeating-linear-gradient(45deg,#eee,#eee 4px,#ddd 4px,#ddd 8px); }.active-color b { max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { cursor: pointer; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.5); font-size: 17px; }.icon-button:disabled { opacity: .3; cursor: not-allowed; }
.editor-hint { margin: 7px 3px 0; color: var(--muted); font-size: 9px; }
.quality-message { margin: 8px 0 0; padding: 7px 9px; border-left: 3px solid var(--green); background: rgba(49,95,72,.06); color: var(--green); font-size: 9px; }.quality-message.review { border-color: #c58a35; background: rgba(197,138,53,.08); color: #8b6025; }.quality-message.poor { border-color: #b95243; background: rgba(185,82,67,.08); color: #9a3e32; }
.portrait-gate { margin-top: 9px; padding: 12px; border: 1px solid rgba(49,95,72,.28); background: rgba(49,95,72,.055); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.portrait-gate.review { border-color: rgba(197,138,53,.42); background: rgba(197,138,53,.07); }.portrait-gate.poor { border-color: rgba(185,82,67,.42); background: rgba(185,82,67,.07); }
.portrait-gate > div { min-width: 0; }.portrait-gate span { display: block; color: var(--muted); font-size: 8px; letter-spacing: .08em; }.portrait-gate strong { display: block; margin-top: 3px; color: var(--green); font: 16px Georgia, "Songti SC", serif; }.portrait-gate.review strong { color: #8b6025; }.portrait-gate.poor strong { color: #9a3e32; }
.portrait-gate p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }.portrait-gate ul { margin: 5px 0 0; padding-left: 15px; color: var(--muted); font-size: 8px; line-height: 1.6; }.portrait-gate .button { flex: none; padding: 8px 11px; font-size: 9px; }
.portrait-gate .identity-signal { display: inline-block; margin-top: 7px; padding: 4px 6px; border-radius: 4px; background: rgba(49,95,72,.1); color: var(--green); font-weight: 700; }.portrait-gate .identity-signal.review { background: rgba(197,138,53,.12); color: #8b6025; }.portrait-gate .identity-signal.poor { background: rgba(185,82,67,.12); color: #9a3e32; }
.pattern-workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(230px,300px); gap: 16px; align-items: start; margin-top: 20px; }
.pattern-stage { min-width: 0; }.pattern-stage-heading { min-height: 49px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 9px; }.pattern-stage-heading h3 { margin: 0 0 4px; font: 17px Georgia, "Songti SC", serif; }.pattern-stage-heading p { margin: 0; color: var(--muted); font-size: 9px; }
.view-toggle { display: flex; flex: none; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.42); }.view-toggle button { cursor: pointer; border: 0; border-radius: 5px; padding: 6px 8px; background: transparent; color: var(--muted); font-size: 9px; }.view-toggle button.active { background: var(--green); color: white; }
.pattern-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }.zoom-controls { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.42); }.zoom-controls button { cursor: pointer; min-width: 28px; height: 26px; border: 0; border-radius: 5px; padding: 0 7px; background: transparent; color: var(--ink); font-size: 11px; }.zoom-controls button:hover { background: rgba(49,95,72,.1); color: var(--green); }.zoom-controls button:disabled { opacity: .3; cursor: default; }.zoom-controls output { min-width: 38px; color: var(--muted); text-align: center; font-size: 9px; }
.canvas-shell { display: grid; place-items: center; min-height: 360px; max-height: 720px; padding: 14px; background: #e9e2d8; overflow: auto; }.canvas-shell canvas { width: min(100%, 680px); height: auto; image-rendering: pixelated; box-shadow: 0 5px 14px rgba(31,36,32,.16); cursor: crosshair; }.canvas-shell.code-mode { place-items: center; }.canvas-shell.code-mode canvas { width: min(100%, 680px); max-width: 680px; }.canvas-shell canvas.editing { touch-action: none; cursor: cell; }
.palette-section { min-width: 0; border: 1px solid var(--line); padding: 12px; background: rgba(255,255,255,.32); position: sticky; top: 10px; }.palette-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 7px; }.palette-heading h3 { font: 16px Georgia, "Songti SC", serif; margin: 0 0 4px; }.palette-heading p { font-size: 8px; line-height: 1.5; color: var(--muted); margin: 0; }.palette-heading .text-button { flex: none; padding-top: 1px; font-size: 8px; }
.palette-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; max-height: 610px; overflow: auto; margin-top: 10px; padding-right: 2px; }.swatch { cursor: pointer; border: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 6px; padding: 5px; text-align: left; }.swatch:hover, .swatch.active { border-color: var(--green); background: white; }.swatch-color { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset -2px -2px 3px rgba(0,0,0,.15); }.swatch strong, .swatch small { display: block; }.swatch strong { font-size: 9px; }.swatch small { color: var(--muted); font-size: 8px; margin-top: 1px; }
footer { max-width: 1440px; margin: auto; padding: 0 clamp(20px, 5vw, 72px) 35px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: white; padding: 11px 18px; border-radius: 99px; opacity: 0; pointer-events: none; transition: .25s; font-size: 12px; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
.install-dialog { width: min(470px, calc(100vw - 28px)); border: 1px solid var(--line); border-radius: 16px; padding: 26px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 100px rgba(0,0,0,.28); }.install-dialog::backdrop { background: rgba(31,36,32,.52); backdrop-filter: blur(4px); }.install-dialog-icon { width: 70px; height: 70px; margin-bottom: 18px; overflow: hidden; border-radius: 18px; box-shadow: 0 9px 24px rgba(31,36,32,.13); }.install-dialog-icon img { display: block; width: 100%; height: 100%; }.install-guide-copy { margin: 16px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }.install-guide-steps { margin: 0; padding: 0; list-style: none; counter-reset: install-step; display: grid; gap: 8px; }.install-guide-steps li { counter-increment: install-step; display: grid; grid-template-columns: 25px 1fr; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.38); font-size: 11px; line-height: 1.5; }.install-guide-steps li::before { content: counter(install-step); display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--green); color: white; font-size: 9px; }.install-version { margin: 14px 0 0; color: var(--muted); font-size: 9px; }
.update-banner { position: fixed; z-index: 20; right: 18px; bottom: 18px; width: min(430px, calc(100vw - 36px)); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid rgba(49,95,72,.35); border-radius: 12px; background: var(--white); box-shadow: 0 16px 48px rgba(31,36,32,.22); }.update-banner div { min-width: 0; }.update-banner strong,.update-banner small { display: block; }.update-banner strong { font-size: 12px; }.update-banner small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }.update-banner .button { flex: none; padding: 9px 12px; border-radius: 7px; background: var(--green); color: white; font-size: 9px; }.update-banner .button:disabled { opacity: .55; }
.projects-dialog { width: min(620px, calc(100vw - 28px)); max-height: min(720px, calc(100vh - 28px)); border: 1px solid var(--line); padding: 25px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 100px rgba(0,0,0,.26); }.projects-dialog::backdrop { background: rgba(31,36,32,.48); backdrop-filter: blur(3px); }.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; }.dialog-heading h2 { margin: 0; font: 27px Georgia, "Songti SC", serif; }.dialog-copy { color: var(--muted); font-size: 11px; margin: 0; }.project-dialog-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 8px 0 20px; }.project-dialog-tools .button { flex: none; padding: 7px 11px; font-size: 9px; }.project-list { display: grid; gap: 8px; }.project-empty { border: 1px dashed var(--line); padding: 50px 15px; text-align: center; color: var(--muted); font-size: 12px; }.project-card { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 10px; background: rgba(255,255,255,.35); }.project-thumb { width: 44px; height: 44px; display: grid; place-items: center; background: var(--paper-deep); color: var(--green); font: 12px Georgia,serif; }.project-info strong,.project-info small { display: block; }.project-info strong { font-size: 12px; margin-bottom: 4px; }.project-info small { color: var(--muted); font-size: 9px; }.project-actions { display: flex; gap: 5px; }.project-actions button { cursor: pointer; border: 1px solid var(--line); background: white; padding: 6px 9px; font-size: 9px; }.project-actions .delete { color: #a6493d; }
.build-dialog { width: min(1180px, calc(100vw - 24px)); height: min(850px, calc(100vh - 24px)); max-width: none; max-height: none; border: 1px solid var(--line); padding: 22px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 100px rgba(0,0,0,.3); }.build-dialog::backdrop { background: rgba(31,36,32,.62); backdrop-filter: blur(4px); }
.build-heading { display: flex; justify-content: space-between; align-items: flex-start; }.build-heading h2 { margin: 0; font: 28px Georgia,"Songti SC",serif; }.build-heading > div > p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.build-progress-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-top: 16px; padding: 11px 14px; border: 1px solid var(--line); background: rgba(255,255,255,.45); }.build-progress-card span,.build-progress-card strong { display: block; }.build-progress-card span { color: var(--muted); font-size: 8px; }.build-progress-card strong { margin-top: 2px; font: 15px Georgia,serif; }.build-progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: var(--paper-deep); }.build-progress-track i { display: block; width: 0; height: 100%; background: var(--green); transition: width .2s ease; }.build-progress-card b { min-width: 36px; color: var(--green); font-size: 11px; text-align: right; }
.build-layout { height: calc(100% - 135px); display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 14px; margin-top: 14px; }.build-stage { min-width: 0; display: flex; flex-direction: column; }.build-stage-title { display: flex; justify-content: space-between; align-items: center; min-height: 42px; }.build-stage-title span,.build-stage-title small { display: block; color: var(--muted); font-size: 8px; }.build-stage-title strong { display: inline-block; margin: 2px 7px 0 0; font: 16px Georgia,serif; }.build-stage-title button { cursor: pointer; border: 1px solid var(--line); border-radius: 5px; padding: 6px 9px; background: white; color: var(--ink); font-size: 9px; }.build-stage-title button.active { border-color: var(--green); background: var(--green); color: white; }
.build-canvas-shell { flex: 1; min-height: 0; overflow: auto; padding: 12px; background: #e9e2d8; }.build-canvas-shell canvas { display: block; margin: auto; image-rendering: pixelated; box-shadow: 0 4px 16px rgba(31,36,32,.18); cursor: pointer; }
.build-sidebar { min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); padding: 11px; background: rgba(255,255,255,.35); }.build-board-card { margin-bottom: 8px; padding: 9px; border: 1px solid var(--line); background: rgba(49,95,72,.06); }.build-board-card span,.build-board-card strong,.build-board-card small { display: block; }.build-board-card span { color: var(--muted); font-size: 7px; }.build-board-card strong { margin-top: 2px; font: 13px Georgia,serif; }.build-board-card small { margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.35; }.build-board-nav { display: grid; grid-template-columns: 30px 1fr 30px; gap: 4px; margin-top: 8px; }.build-board-nav button { cursor: pointer; min-height: 27px; border: 1px solid var(--line); background: white; color: var(--ink); font-size: 9px; }.build-board-nav button:first-child,.build-board-nav button:last-child { font-size: 16px; }.build-board-nav button.active { border-color: var(--green); background: var(--green); color: white; }.build-board-nav button:disabled { cursor: default; opacity: .35; }.build-actions { display: grid; gap: 6px; }.build-actions .button { width: 100%; padding: 8px; font-size: 9px; }.build-actions .button:disabled { cursor: default; opacity: .42; }.build-sidebar > p { margin: 10px 0 7px; color: var(--muted); font-size: 8px; }.build-palette { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 5px; }.build-color { cursor: pointer; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 7px; border: 1px solid var(--line); padding: 6px; background: transparent; text-align: left; }.build-color.active { border-color: var(--green); background: rgba(49,95,72,.08); }.build-color i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset -2px -2px 3px rgba(0,0,0,.15); }.build-color strong,.build-color small { display: block; }.build-color strong { font-size: 9px; }.build-color small { color: var(--muted); font-size: 7px; }.build-color b { color: var(--orange); font-size: 8px; }
.print-dialog { width: min(1380px, calc(100vw - 20px)); height: min(920px, calc(100vh - 20px)); max-width: none; max-height: none; border: 1px solid var(--line); padding: 14px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 100px rgba(0,0,0,.3); }.print-dialog::backdrop { background: rgba(31,36,32,.68); backdrop-filter: blur(4px); }.print-dialog-heading { min-height: 58px; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 1px 5px 12px; }.print-dialog-heading h2 { margin: 0; font: 25px Georgia,"Songti SC",serif; }.print-dialog-heading > div:first-child > p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 9px; }.print-dialog-actions { display: flex; align-items: center; gap: 8px; flex: none; }.print-dialog-actions .button { padding: 9px 15px; font-size: 10px; }.print-dialog iframe { width: 100%; height: calc(100% - 68px); border: 1px solid var(--line); background: #dedbd4; }

@media (max-width: 900px) {
  .hero { min-height: 245px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 18px; }.hero-copy { max-width: 580px; }
  .workspace { grid-template-columns: 1fr; }.control-panel { border-right: 0; border-bottom: 1px solid var(--line); }.result-panel { min-height: 520px; }.pattern-workspace { grid-template-columns: 1fr; }.palette-section { position: static; order: -1; }.palette-list { max-height: 235px; }.build-layout { grid-template-columns: 1fr; height: calc(100% - 135px); }.build-sidebar { height: 300px; max-height: 300px; }.build-palette { grid-template-columns: repeat(auto-fill,minmax(135px,1fr)); }.build-canvas-shell { min-height: 300px; }
}
@media (max-width: 600px) {
  .file-launch-notice { align-items: stretch; flex-direction: column; }.file-launch-notice .button { text-align: center; }
  .project-dialog-tools { align-items: stretch; flex-direction: column; }.project-dialog-tools .button { width: 100%; }.project-card { grid-template-columns: 38px 1fr; }.project-thumb { width: 38px; height: 38px; }.project-actions { grid-column: 1/3; justify-content: flex-end; }
  .offline-pill { display: none; }.topbar { height: 66px; padding-inline: 14px; }.topbar-actions { gap: 5px; }.topbar .button { padding: 8px 9px; font-size: 9px; }.brand > span:last-child { display: none; }.hero { min-height: 230px; }.workspace { margin-inline: -20px; border-left: 0; border-right: 0; }.score-card { grid-template-columns: 70px 1fr 1fr; gap: 10px; }.metric { padding-left: 10px; }.metric:last-child { grid-column: 2 / 4; border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; }.editor-bar { align-items: stretch; flex-direction: column; }.tool-group { width: 100%; }.history-group { justify-content: flex-end; }.portrait-gate { align-items: stretch; flex-direction: column; }.portrait-gate .button { width: 100%; }.result-panel { padding: 22px 15px; }.result-topline { align-items: flex-start; gap: 10px; }.result-topline h2 { font-size: 20px; }.result-actions { flex-direction: column; }.result-actions .button { padding: 7px 11px; font-size: 9px; }.pattern-stage-heading { flex-direction: column; }.pattern-controls { width: 100%; align-items: stretch; }.view-toggle, .zoom-controls { justify-content: center; }.canvas-shell { min-height: 280px; max-height: 520px; }
  .build-dialog { width: calc(100vw - 12px); height: calc(100vh - 12px); padding: 13px; }.build-heading h2 { font-size: 23px; }.build-progress-card { grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; padding: 9px; }.build-progress-track { grid-column: 1 / 3; grid-row: 2; }.build-layout { height: calc(100% - 125px); gap: 8px; margin-top: 8px; }.build-stage-title { min-height: 48px; }.build-stage-title strong { font-size: 14px; }.build-canvas-shell { min-height: 220px; padding: 7px; }.build-sidebar { height: 390px; max-height: 390px; padding: 8px; }.build-sidebar > p { margin-top: 9px; }.build-palette { grid-template-columns: repeat(2,minmax(0,1fr)); }.build-color { grid-template-columns: 18px minmax(0,1fr); gap: 5px; padding: 5px; }.build-color i { width: 18px; height: 18px; }.build-color b { grid-column: 2; }
  .print-dialog { width: calc(100vw - 8px); height: calc(100vh - 8px); padding: 8px; }.print-dialog-heading { min-height: 76px; align-items: flex-start; gap: 8px; padding: 2px 2px 8px; }.print-dialog-heading h2 { font-size: 20px; }.print-dialog-heading > div:first-child > p:last-child { max-width: 190px; font-size: 7px; line-height: 1.4; }.print-dialog-actions { gap: 4px; }.print-dialog-actions .button { padding: 8px; font-size: 8px; }.print-dialog iframe { height: calc(100% - 84px); }
}
