:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;color:#1c3027;background:#f2f8f5;font-size:16px;--green:#167654;--muted:#788a80;--line:#e3ece6;--vh:100dvh;--offset:0px}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input,textarea{font:inherit}button{cursor:pointer;border:0;color:var(--green);background:transparent;min-height:44px;padding:10px 16px;touch-action:manipulation}button:disabled{cursor:default;opacity:.45}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #399879;outline-offset:3px}button:hover:not(:disabled){filter:brightness(.96)}[hidden]{display:none!important}#app{height:var(--vh);transform:translateY(var(--offset));max-width:900px;margin:auto;display:flex;flex-direction:column;background:linear-gradient(180deg,#eef7f1,#f8fbf9)}header{height:64px;flex:none;display:flex;align-items:center;gap:12px;padding:8px 20px;border-bottom:1px solid var(--line);background:#f7fbf8}header strong{font-size:18px;flex:1;text-align:center}.icon{width:44px;height:44px;flex:none;display:flex;align-items:center;justify-content:center;padding:0;font-size:28px;border-radius:50%;background:#edf4ef}.quiet{font-size:14px;color:var(--muted)}main{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:24px 24px 16px;scrollbar-width:thin}.welcome{max-width:600px;margin:clamp(24px,12vh,100px) auto 24px}.welcome h1{font-size:28px;line-height:1.4;letter-spacing:-.6px;margin:0 0 26px}.welcome .muted{margin-top:24px;font-size:13px}.examples{display:grid;gap:8px}.examples button{text-align:left;background:#fff;border:1px solid var(--line);border-radius:14px;display:flex;justify-content:space-between}.login{max-width:420px;margin:10vh auto}.login h1{font-size:28px}.login input{width:100%;height:50px;padding:12px;border:1px solid #d5e4db;border-radius:12px;margin:12px 0;background:#fff}.muted{color:var(--muted);font-size:14px;line-height:1.6}.error{color:#b24d37;font-size:14px;line-height:1.5}.primary{background:var(--green);color:white;border-radius:12px;font-weight:600}.secondary{border:1px solid #d8e6dd;background:#fff;border-radius:12px}.wide{width:100%}.turn{margin-bottom:18px}.prompt{margin:0 0 14px auto;padding:12px 16px;background:#dff0e7;border-radius:18px 18px 5px 18px;max-width:86%;width:fit-content;white-space:pre-wrap;line-height:1.6;overflow-wrap:anywhere}.prompt img{display:block;max-width:200px;max-height:180px;border-radius:10px;margin-top:8px}.reply{line-height:1.7;margin:0 2px 12px;white-space:pre-wrap;overflow-wrap:anywhere}.status{color:var(--muted);font-size:14px;padding:8px 2px}.cards{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 2px 10px;align-items:flex-start}.card{background:#fff;border:1px solid #e1ebe5;border-radius:20px;padding:20px;box-shadow:0 4px 16px #183d2810;min-width:0}.cards .card{flex:0 0 min(100%,600px);scroll-snap-align:start}.source{font-size:12px;line-height:1.5;color:var(--muted);margin-bottom:8px}.card h2{font-size:18px;line-height:1.4;margin:0 0 8px}.badge{display:inline-block;font-size:12px;color:var(--green);background:#edf6f0;border-radius:6px;padding:3px 7px;margin-bottom:12px}.rich{font-size:16px;line-height:1.8;overflow-wrap:anywhere}.rich p{margin:0 0 12px}.rich h1,.rich h2,.rich h3{font-size:18px;margin:20px 0 10px}.rich h1:first-child,.rich h2:first-child,.rich h3:first-child{margin-top:0}.rich img{display:block;width:auto;height:auto;max-width:100%;max-height:360px;object-fit:contain;margin:14px auto}.rich table{border-collapse:collapse;width:100%;font-size:14px;margin:14px 0}.rich th,.rich td{border:1px solid var(--line);padding:8px;vertical-align:top}.rich ul,.rich ol{padding-left:22px}.rich .katex{font-size:1.08em}.math-block{display:block;overflow-x:auto;overflow-y:hidden}.math-inline{white-space:normal}.actions{display:flex;gap:6px;border-top:1px solid var(--line);padding-top:10px;margin-top:12px;flex-wrap:wrap}.actions button{font-size:14px;padding:8px 10px;border-radius:8px;background:#f2f7f4}.actions .primary{background:var(--green);color:#fff;margin-left:auto}.actions .analysis-button{background:white}.list{display:grid;gap:12px;max-width:640px;margin:auto}.list-item{text-align:left;display:block;width:100%}.list-item strong{display:block;font-size:16px;line-height:1.5}.list-item .muted{font-size:12px;margin-top:6px}.script-head{display:flex;align-items:center;justify-content:space-between;margin:24px 0 12px}.script-head h2{font-size:18px;margin:0}.script-status{font-size:13px;color:var(--muted)}.script-actions{margin-top:16px;display:flex;gap:10px}.script-actions button{flex:1}#script-editor{width:100%;min-height:50vh;border:1px solid var(--line);border-radius:12px;padding:14px;line-height:1.7;resize:vertical}.job-state{display:flex;align-items:center;gap:8px;margin:0 0 12px;font-size:18px}.dot{width:8px;height:8px;border-radius:50%;background:#71ad93}.job-actions{display:flex;gap:10px;margin-top:16px}.job-actions button{flex:1}video{width:100%;border-radius:12px;background:#141a17;max-height:420px}.empty{text-align:center;padding:60px 16px;color:var(--muted)}#composer{flex:none;padding:10px 20px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#f8fbf9}#composer .input-row{display:flex;align-items:flex-end;gap:10px;background:#fff;border:1px solid #dce8df;border-radius:22px;padding:8px;box-shadow:0 2px 8px #21432b05}textarea#input{border:0;outline:none;background:transparent;flex:1;min-width:0;font-size:16px;line-height:24px;padding:10px 0;max-height:132px;resize:none;display:block}textarea#input::placeholder{color:#91a096}.send{width:44px;height:44px;flex:none;border-radius:50%;background:var(--green);color:#fff;font-size:24px;padding:0}#attachment{padding:0 8px 8px;display:flex;gap:12px;align-items:center}#attachment img{width:64px;height:64px;object-fit:cover;border-radius:8px}nav{display:flex;flex:none;border-top:1px solid var(--line);background:white;padding-bottom:env(safe-area-inset-bottom)}nav button{flex:1;font-size:14px;padding:14px;color:var(--muted)}nav button.active{color:var(--green);font-weight:600}dialog{border:0;border-radius:24px 24px 0 0;padding:0;width:min(100%,760px);max-width:100%;max-height:85dvh;position:fixed;inset:auto 0 0;margin:0 auto;box-shadow:0 -8px 40px #152f2520;background:#fff}dialog::backdrop{background:#12291e66}.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:1}.drawer-head strong{font-size:18px}.drawer-body{padding:20px 24px calc(24px + env(safe-area-inset-bottom));overflow:auto;max-height:calc(85dvh - 78px);overscroll-behavior:contain}#toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%);border-radius:12px;background:#203c30;color:white;padding:12px 18px;max-width:90%;z-index:10;font-size:14px}@media(max-width:600px){header{height:56px;padding:6px 16px}main{padding:18px 16px 12px}.welcome{margin-top:8vh}.welcome h1{font-size:26px}.card{padding:16px;border-radius:18px}#composer{padding:8px 12px calc(8px + env(safe-area-inset-bottom))}.actions{gap:4px}.actions button{padding:8px;font-size:13px}.cards .card{flex-basis:100%}.drawer-body{padding:16px}.login{margin-top:8vh}}@media(min-width:900px){#app{border-left:1px solid var(--line);border-right:1px solid var(--line)}main{padding:32px 40px}#composer{padding-left:40px;padding-right:40px}.turn{max-width:720px;margin:0 auto 18px}}

header{display:grid;grid-template-columns:44px 1fr 44px}header #back{grid-column:1}header #title{grid-column:2;grid-row:1}header #account{grid-column:3;grid-row:1;padding:0}
