:root { color-scheme:light; --ink:#20242b; --muted:#626a77; --line:#e2e5e9; --surface:#fff; --background:#f7f8fa; --accent:#9b7621; --accent-dark:#765a16; font-family:Raleway,"Segoe UI",system-ui,sans-serif; }
* { box-sizing:border-box; }
html { min-height:100%; background:var(--background); }
body { min-height:100vh; margin:0; color:var(--ink); background:var(--background); }
button,input,textarea { font:inherit; }
:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
[hidden] { display:none!important; }
.app-header { min-height:76px; padding:9px max(22px,calc((100vw - 1200px)/2)); display:flex; justify-content:space-between; align-items:center; gap:18px; background:#fff; border-bottom:1px solid var(--line); }
.brand { display:block; width:min(220px,52vw); }
.brand img { display:block; width:100%; height:auto; }
.app-header nav a,.back-link { color:#4f5865; font-size:.9rem; font-weight:700; text-decoration:none; }
.app-header nav a:hover,.back-link:hover { color:var(--accent-dark); text-decoration:underline; text-underline-offset:3px; }
.page { width:min(100% - 40px,1120px); margin:0 auto; padding:24px 0 42px; }
.back-link { display:inline-block; margin-bottom:20px; }
.intro { max-width:760px; margin-bottom:22px; }
.eyebrow { margin:0 0 6px; color:var(--accent-dark); font-size:.7rem; font-weight:850; letter-spacing:.13em; text-transform:uppercase; }
h1,h2,h3,p { margin-top:0; }
h1 { margin-bottom:8px; font-family:Cinzel,Georgia,serif; font-size:clamp(2rem,5vw,3rem); line-height:1.15; letter-spacing:-.03em; }
.intro>p:last-child,.panel-title p:last-child { margin-bottom:0; color:var(--muted); line-height:1.6; }
.panel { min-width:0; padding:clamp(18px,3vw,26px); background:var(--surface); border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 28px rgb(25 34 48 / 4%); }
.project-bar { margin-bottom:16px; display:flex; justify-content:space-between; align-items:end; gap:18px; }
.field { min-width:0; display:grid; gap:6px; }
.field>span,.editor-heading { color:#4c5562; font-size:.8rem; font-weight:750; }
.field input,.field textarea { width:100%; min-width:0; min-height:40px; padding:9px 10px; color:var(--ink); background:#fff; border:1px solid #cbd1d9; border-radius:6px; }
.family-field { width:min(280px,100%); }
.project-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:7px; }
.primary-button,.secondary-button { min-height:38px; padding:7px 12px; border-radius:6px; font-size:.82rem; font-weight:700; cursor:pointer; }
.primary-button { color:#fff; background:var(--accent); border:1px solid var(--accent); }
.primary-button:hover { background:var(--accent-dark); border-color:var(--accent-dark); }
.secondary-button { color:#3e4753; background:#fff; border:1px solid #cbd1d9; }
.secondary-button:hover { background:#f4f1e9; border-color:#c5b47f; }
.studio-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr); align-items:start; gap:16px; }
.panel-title { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:18px; }
.panel-title h2 { margin-bottom:5px; font-size:1.28rem; }
.panel-title p:last-child { font-size:.84rem; }
.section-mark { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; color:var(--accent); background:#f4f1e9; border-radius:11px; font-size:1.1rem; font-weight:800; }
.character-picker { display:grid; grid-template-columns:repeat(16,minmax(0,1fr)); gap:4px; }
.character-button { min-width:0; aspect-ratio:1; padding:0; display:grid; place-items:center; color:#414854; background:#fafbfc; border:1px solid #e4e7eb; border-radius:4px; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:.78rem; cursor:pointer; }
.character-button:hover { border-color:#c5b47f; background:#f4f1e9; }
.character-button[aria-pressed="true"] { color:#fff; background:var(--accent); border-color:var(--accent); }
.character-button.has-drawing:not([aria-pressed="true"])::after { width:4px; height:4px; position:absolute; align-self:end; justify-self:end; margin:0 2px 2px 0; background:var(--accent); border-radius:50%; content:""; }
.character-button.has-drawing { position:relative; }
.editor { margin-top:18px; padding:16px; background:#fafbfc; border:1px solid var(--line); border-radius:8px; }
.editor-heading { display:flex; justify-content:space-between; gap:10px; }
.editor-heading span:last-child { color:var(--muted); font-weight:500; }
.vector-tools { margin-top:12px; display:flex; flex-wrap:wrap; gap:6px; }
.edit-tools { margin-top:6px; }
.tool-button { min-height:34px; padding:6px 10px; font-size:.76rem; }
.tool-button[aria-pressed="true"] { color:#fff; background:var(--accent); border-color:var(--accent); }
.tool-button:disabled { color:#9299a3; background:#f1f3f5; border-color:#e1e4e8; cursor:not-allowed; }
.editor-view-controls { margin-top:10px; display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; padding:9px 10px; background:#f2f4f6; border:1px solid var(--line); border-radius:6px; }
.snap-control { display:inline-flex; align-items:center; gap:6px; color:#4c5562; font-size:.75rem; font-weight:700; }
.snap-control input { accent-color:var(--accent); }
.compact-field { display:grid; grid-template-columns:auto minmax(64px,90px); align-items:center; gap:3px 7px; color:#4c5562; font-size:.7rem; font-weight:700; }
.compact-field input[type="number"] { width:78px; min-height:30px; padding:5px 7px; border:1px solid #cbd1d9; border-radius:5px; }
.compact-field output { grid-column:2; color:var(--muted); font-size:.65rem; font-weight:500; }
.point-size-field { min-width:150px; grid-template-columns:auto minmax(90px,1fr); }
.point-size-field input { min-width:0; accent-color:var(--accent); }
.zoom-control { display:flex; align-items:center; gap:5px; color:#4c5562; font-size:.72rem; font-weight:700; }
.zoom-control output { min-width:42px; color:var(--ink); text-align:center; font-size:.7rem; }
.vector-workspace { width:100%; margin:14px auto; display:flex; justify-content:center; overflow:auto; }
#outline-editor { display:block; width:min(100%,430px); height:auto; overflow:hidden; border:1px solid #dfe3e8; border-radius:5px; background:#fff; touch-action:none; user-select:none; }
#outline-editor[data-tool="pen"] { cursor:crosshair; }
#outline-editor[data-tool="select"] { cursor:default; }
#outline-editor[data-tool="rectangle"],#outline-editor[data-tool="ellipse"] { cursor:crosshair; }
.canvas-background { fill:#fff; }
.grid-lines { fill:none; stroke:#edf0f3; stroke-width:1; }
.metric-guide { stroke:#b5bcc6; stroke-width:1.5; stroke-dasharray:8 7; }
.baseline-guide { stroke:#b3882e; stroke-width:2; }
.bearing-guide { stroke:#278451; stroke-width:1.5; stroke-dasharray:7 6; }
.advance-guide { stroke:#b3882e; stroke-width:1.5; stroke-dasharray:3 6; }
.guide-label { fill:#858d99; font:14px system-ui,sans-serif; pointer-events:none; }
.glyph-fill { fill:#20242b; fill-opacity:.18; }
.outline-path { fill:transparent; stroke:#20242b; stroke-width:4; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.outline-path.selected { stroke:#9b7621; }
.outline-node { fill:#fff; stroke:#20242b; stroke-width:3; vector-effect:non-scaling-stroke; cursor:move; }
.outline-node.selected { fill:#f4d98c; stroke:#765a16; }
.outline-node.start-node { stroke:#278451; }
.handle-line { stroke:#9b7621; stroke-width:2; stroke-dasharray:6 5; vector-effect:non-scaling-stroke; pointer-events:none; }
.incoming-handle-line { stroke:#278451; }
.control-handle { fill:#fff; stroke:#9b7621; stroke-width:3; vector-effect:non-scaling-stroke; cursor:crosshair; }
.incoming-handle { stroke:#278451; }
.metric-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:10px 0 14px; }
.metric-fields .field input { min-height:36px; }
.editor-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.status,.note { color:var(--muted); font-size:.74rem; line-height:1.5; }
.status { margin-left:auto; }
.note { margin:13px 0 0; }
.specimen-field textarea { resize:vertical; line-height:1.5; }
.size-field { margin-top:13px; }
.size-field>span { display:flex; justify-content:space-between; }
.size-field input { min-height:0; padding:0; accent-color:var(--accent); }
.specimen { min-height:180px; margin-top:14px; padding:16px; overflow-wrap:anywhere; display:flex; align-content:flex-start; align-items:flex-start; flex-wrap:wrap; gap:3px 0; background:#fafbfc; border:1px solid var(--line); border-radius:7px; }
.specimen svg { display:block; flex:0 0 auto; height:auto; overflow:visible; shape-rendering:geometricPrecision; }
.specimen-empty { align-self:center; width:100%; color:var(--muted); text-align:center; font-size:.85rem; }
.font-details { margin-top:14px; display:flex; justify-content:space-between; gap:10px; color:var(--muted); font-size:.8rem; }
.font-details strong { color:var(--ink); }
.privacy-note { margin:20px 0 0; color:var(--muted); text-align:center; font-size:.79rem; }
.toast { position:fixed; right:18px; bottom:max(18px,env(safe-area-inset-bottom)); z-index:5; max-width:calc(100vw - 36px); padding:11px 15px; color:#fff; background:#252b34; border-radius:7px; box-shadow:0 8px 24px rgb(0 0 0 / 20%); font-size:.85rem; opacity:0; pointer-events:none; transform:translateY(8px); transition:opacity .15s ease,transform .15s ease; }
.toast.visible { opacity:1; transform:translateY(0); }
@media(max-width:820px) { .studio-layout{grid-template-columns:1fr;}.project-bar{align-items:stretch;flex-direction:column;}.family-field{width:100%;}.project-actions{justify-content:flex-start;} }
@media(max-width:520px) { .app-header{min-height:65px;padding:8px 13px;}.brand{width:min(165px,45vw);}.page{width:min(100% - 26px,1120px);padding-top:17px;}.character-picker{grid-template-columns:repeat(10,minmax(0,1fr));gap:5px;}.character-button{font-size:.85rem;}.editor{padding:12px;}.status{width:100%;margin-left:0;}.metric-fields{grid-template-columns:1fr 1fr;}.tool-button{padding:6px 8px;font-size:.72rem;} }
@media(prefers-reduced-motion:reduce) { .toast{transition:none;} }
