:root{--bg:#f4f1fa;--panel:#fff;--field:#fcfbfe;--ink:#241d33;--muted:#6f6782;--line:#e4dcf1;--line-strong:#d3c6ea;--accent:#6b46c1;--accent-strong:#539;--accent-soft:#f1ebfd;--accent-ink:#fff;--missing-bg:#fff8e1;--missing-line:#f2c94c;--missing-ink:#8a5a00;--rec:#c0392b;--rec-soft:#fdecea;--radius:16px;--radius-sm:10px;--shadow:0 1px 2px #241d330a, 0 6px 20px #6b46c10f;color:var(--ink);background:var(--bg);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:16px;line-height:1.45}*{box-sizing:border-box}body{background:var(--bg);margin:0}h1,h2,h3,p{margin:0}button{font:inherit;border-radius:var(--radius-sm);border:1px solid var(--line-strong);background:var(--panel);min-height:38px;color:var(--ink);cursor:pointer;white-space:nowrap;justify-content:center;align-items:center;gap:.45em;padding:0 14px;font-size:.95rem;transition:background .12s,border-color .12s,color .12s;display:inline-flex}button:hover:not(:disabled){border-color:var(--accent)}button:disabled{opacity:.45;cursor:default}button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:600}button.primary:hover:not(:disabled){background:var(--accent-strong)}button.ghost{color:var(--muted);background:0 0;border-color:#0000}button.ghost:hover:not(:disabled){background:var(--accent-soft);color:var(--accent-strong);border-color:#0000}button.danger{background:var(--rec-soft);border-color:var(--rec);color:var(--rec);font-weight:600}button.small{min-height:30px;padding:0 10px;font-size:.85rem}.segmented{display:inline-flex}.segmented button{border-radius:0}.segmented button:first-child{border-radius:var(--radius-sm) 0 0 var(--radius-sm)}.segmented button:last-child{border-radius:0 var(--radius-sm) var(--radius-sm) 0;margin-left:-1px}textarea,input,select{font:inherit;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--field);width:100%;color:var(--ink);padding:.7em .85em}textarea{resize:vertical;min-height:8rem;line-height:1.55}textarea:focus,input:focus,select:focus{border-color:var(--accent);background:var(--panel);outline:none;box-shadow:0 0 0 3px #6b46c126}textarea::placeholder{color:#a39bb5}.chip{vertical-align:middle;background:var(--accent-soft);color:var(--accent-strong);white-space:nowrap;border-radius:999px;margin-left:.6em;padding:.15em .65em;font-size:.75rem;font-weight:600;display:inline-block}.chip.warn{background:var(--missing-bg);color:var(--missing-ink);border:1px solid var(--missing-line)}.spinner{border:2px solid #6b46c140;border-top-color:var(--accent);vertical-align:-.15em;border-radius:50%;width:1em;height:1em;animation:.8s linear infinite spin;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}.login{background:radial-gradient(circle at 30% 20%, #e9ddff, var(--bg) 60%);place-items:center;min-height:100vh;padding:16px;display:grid}.login-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);gap:1rem;width:min(380px,100%);padding:2rem;display:grid;box-shadow:0 10px 40px #6b46c11f}.login-card h1{color:var(--accent-strong);align-items:center;gap:.5em;font-size:1.25rem;display:flex}.login-card label{gap:.35rem;font-size:.95rem;font-weight:600;display:grid}.login-card button{min-height:44px}.error{color:var(--rec)}.app{flex-direction:column;min-height:100vh;display:flex}.topbar{z-index:5;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);background:#ffffffe6;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:10px 24px;display:grid;position:sticky;top:0}.brand{align-items:center;gap:10px;min-width:0;display:flex}.logo{background:var(--accent-soft);border-radius:10px;flex:none;place-items:center;width:36px;height:36px;font-size:1.15rem;display:grid}.brand h1{color:var(--accent-strong);white-space:nowrap;text-overflow:ellipsis;font-size:1.05rem;overflow:hidden}.modes{background:var(--bg);border:1px solid var(--line);border-radius:12px;gap:2px;padding:4px;display:inline-flex}.modes button{min-height:36px;color:var(--muted);background:0 0;border:none;border-radius:9px;padding:0 16px;font-weight:500}.modes button:hover:not(.active){background:var(--panel);color:var(--ink)}.modes button.active{background:var(--panel);color:var(--accent-strong);font-weight:600;box-shadow:0 1px 3px #241d331f}.top-actions{justify-content:flex-end;gap:4px;display:flex}.page{flex-direction:column;flex:1;gap:14px;width:100%;max-width:1480px;margin:0 auto;padding:14px 24px 32px;display:flex}.mode-hint{text-align:center;color:var(--muted);font-size:.9rem}.banner{background:var(--rec-soft);color:var(--rec);border-radius:var(--radius-sm);border:1px solid #f3c4bf;justify-content:space-between;align-items:center;gap:12px;padding:8px 8px 8px 14px;display:flex}.grid{flex:1;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);grid-template-areas:"form notes""example output";grid-auto-rows:minmax(0,auto);gap:20px;display:grid}.example-card{grid-area:example}.form-card{grid-area:form}.grid .notes-card{grid-area:notes}.grid .output-card{grid-area:output}.column{flex-direction:column;gap:20px;width:100%;max-width:880px;margin:0 auto;display:flex}.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);flex-direction:column;gap:14px;min-width:0;padding:18px 20px 20px;display:flex}.card-head{align-items:flex-start;gap:12px;display:flex}.step{background:var(--accent-soft);width:28px;height:28px;color:var(--accent-strong);border-radius:50%;flex:none;place-items:center;margin-top:1px;font-size:.9rem;font-weight:700;display:grid}.card-title{flex:1;min-width:0}.card-title h2{font-size:1.05rem;font-weight:650;line-height:1.6}.card-title .optional{color:var(--muted);font-size:.95rem;font-weight:400}.card-title p{color:var(--muted);margin-top:1px;font-size:.875rem}.card-actions{flex:none;gap:6px;display:flex}.card-body{flex-direction:column;flex:1;gap:14px;min-height:0;display:flex}.card-body>textarea{flex:1;min-height:12rem}.grid .notes{min-height:10rem}.column .notes,.column .output{field-sizing:content;flex:none;min-height:14rem;max-height:65vh}.output{min-height:14rem}.output.streaming{background:#fbf9fe}.recorder{background:linear-gradient(135deg,#f4effe,#efe7fd);border:1px solid #e6dbfa;border-radius:14px;flex-wrap:wrap;align-items:center;gap:14px;padding:12px 14px;display:flex}.recorder.is-recording{background:linear-gradient(135deg,#fff4f2,#fdecea);border-color:#f6cdc8}.mic{color:#fff;background:linear-gradient(135deg, #7c4fd6, var(--accent-strong));border:none;border-radius:50%;flex:none;width:58px;height:58px;padding:0;box-shadow:0 6px 16px #6b46c159}.mic:hover:not(:disabled){transform:scale(1.04)}.mic.on{background:var(--rec);animation:1.4s ease-in-out infinite pulse;box-shadow:0 6px 16px #c0392b59}@keyframes pulse{50%{box-shadow:0 0 0 10px #c0392b1f}}.rec-status{flex-direction:column;flex:1;gap:4px;min-width:12em;display:flex}.rec-status strong{align-items:center;gap:.5em;font-size:1rem;display:flex}.rec-status small{color:var(--muted);font-size:.85rem}.is-recording .rec-status strong{color:var(--rec)}.time{font-variant-numeric:tabular-nums;color:var(--ink);font-weight:600}.meter{background:#c0392b26;border-radius:3px;width:min(180px,100%);height:6px;overflow:hidden}.meter span{background:var(--rec);height:100%;transition:width 80ms linear;display:block}.mic-pick{background:var(--panel);border:1px solid var(--line-strong);min-width:0;max-width:260px;color:var(--muted);border-radius:999px;flex:0 auto;align-items:center;gap:8px;padding:0 6px 0 12px;display:inline-flex}.mic-pick:focus-within{border-color:var(--accent)}.mic-pick svg{flex:none}.mic-pick select{box-shadow:none;width:auto;min-width:0;max-width:100%;color:var(--ink);text-overflow:ellipsis;cursor:pointer;background:0 0;border:none;padding:8px 4px;font-size:.875rem}.mic-pick select:disabled{cursor:default;opacity:.6}.toolbar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.spacer{flex:1}.empty{text-align:center;border:1.5px dashed var(--line-strong);min-height:12rem;color:var(--muted);background:var(--field);border-radius:12px;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:8px;padding:24px;display:flex}.empty span{font-size:1.6rem}.empty p{max-width:30em}.sections{flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;display:flex}.section{background:var(--field);border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:12px;flex-direction:column;gap:2px;padding:10px 12px 8px 14px;display:flex}.section.missing{background:var(--missing-bg);border-color:#f5e3a8;border-left-color:var(--missing-line)}.section-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.section-head h3{color:var(--accent-strong);font-size:.9rem;font-weight:650}.section.missing h3{color:var(--missing-ink)}.section textarea{field-sizing:content;resize:none;background:0 0;border-color:#0000;width:calc(100% + 6px);min-height:2.5em;margin-left:-6px;padding:4px 6px}.section textarea:hover{border-color:var(--line)}.section textarea:focus{background:var(--panel)}.mic-help{border-radius:12px;flex-direction:column;gap:6px;padding:10px 14px;font-size:.92rem;display:flex}.mic-help ol{gap:4px;margin:0;padding-left:1.3em;display:grid}.mic-help.info{background:var(--field);border:1px solid var(--line);color:var(--muted);flex-flow:wrap;justify-content:space-between;align-items:center;gap:8px}.mic-help.info button{min-height:32px;font-size:.85rem}.mic-help.warn{background:var(--missing-bg);border:1px solid var(--missing-line)}.mic-help.warn strong{color:#7a4f00;font-size:1rem}.row{flex-wrap:wrap;align-items:center;gap:8px;margin-top:4px;display:flex}.mic-ask{top:calc(env(safe-area-inset-top,0px) + 12px);z-index:10;background:var(--accent-strong);color:#fff;border-radius:12px;align-items:flex-start;gap:.6em;max-width:340px;padding:.8em 1em;display:flex;position:fixed;left:24px;box-shadow:0 10px 30px #55339959}.mic-ask.center{top:40%;left:50%;transform:translate(-50%)}.mic-ask p{margin:.2em 0 0}.mic-ask-arrow{font-size:2rem;line-height:1;animation:1s ease-in-out infinite nudge}@keyframes nudge{50%{transform:translateY(-6px)}}@media (width<=1100px){.topbar{grid-template-columns:1fr auto}.modes{grid-area:2/1/auto/-1;justify-self:center}}@media (width<=900px){.grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"form""example""notes""output"}}@media (width<=600px){.topbar{gap:8px;padding:8px 12px}.brand h1{font-size:.95rem}.logo{width:30px;height:30px}.modes{justify-self:stretch}.modes button{white-space:normal;flex:1;min-height:40px;padding:4px 6px;font-size:.85rem;line-height:1.2}.top-actions button{padding:0 8px}.page{padding:12px 12px 24px}.card{border-radius:14px;padding:14px}.mic-pick{flex-basis:100%;max-width:none}.mic-pick select{flex:1}}@media (width<=480px){.brand h1{display:none}}
