/* API integration overrides; original prototype.css is retained verbatim. */
[hidden]{display:none!important}.global-status{position:relative;margin:0;padding:8px 24px;min-height:24px;background:#f1e8ed;overflow-wrap:anywhere}.global-status:empty{display:none}.login form{margin:20px 0}.login input{margin-bottom:12px}.row select{flex:1;min-width:120px}.row{flex-wrap:wrap}#send-button{font-size:12px;flex-shrink:0}#messages{min-height:120px}.message p{white-space:pre-wrap;overflow-wrap:anywhere}.message strong{font-size:12px;color:var(--muted)}#profile .row{margin-top:18px}.field{max-width:100%}.bottom-nav{padding-bottom:env(safe-area-inset-bottom)}@media(max-width:760px){.sidebar{display:flex;position:static;height:auto;padding:12px 20px}.sidebar .brand,.sidebar .tiny,.sidebar .nav,.sidebar .side-note{display:none}.sidebar .account-button{margin:0;padding:6px;border:0}.layout{display:block}.compose-box{flex-wrap:wrap}.compose-box textarea{flex-basis:100%}#send-button{margin-left:auto}.content{padding-bottom:100px}.bottom-nav{grid-template-columns:repeat(3,1fr)}.topbar{gap:10px;flex-wrap:wrap}.global-status{padding:8px 20px}.login{padding:28px 20px}} 
/* Messenger: independent thread scrolling keeps the composer in reach. */
body{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.login{overflow:auto;width:100%;flex-shrink:1}.global-status{flex:none;font-size:12px;padding:6px 20px}
.layout{width:100%;flex:1;min-height:0;grid-template-columns:190px minmax(0,1fr);overflow:hidden}
.sidebar{height:100%;position:static;padding:28px 18px}.sidebar .tiny{margin-bottom:30px}.side-note{font-size:22px}.account-button{font-size:12px}
.workspace{padding:0 28px;display:flex;flex-direction:column;min-height:0}.topbar{min-height:64px;flex:none}.topbar .eyebrow{font-size:10px}.badge{white-space:normal}
.content{overflow:auto;width:100%;min-height:0}.chat-content{max-width:none;margin:0;padding:0;display:grid;grid-template-columns:170px minmax(0,1fr);flex:1;min-height:0}
.dialogues{padding:22px 16px 16px 0;border-right:1px solid var(--line);overflow:auto;min-width:0}.dialogues-heading{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:18px}.dialogues-heading h2{font:18px Georgia,serif;margin:0}.dialogues-heading .btn{font-size:12px;min-height:40px;padding:8px 12px}
#chats{display:flex;flex-direction:column;gap:6px}#chats button{background:transparent;text-align:left;border-radius:10px;padding:11px 12px;min-height:44px;font-size:13px;overflow-wrap:anywhere}#chats button:hover{background:#f5ecef}#chats button[aria-current=true]{background:#eadbe3;color:#49253c;font-weight:600}.dialogues-note{font:italic 14px/1.5 Georgia,serif;color:var(--muted);margin-top:24px}
.conversation{min-width:0;min-height:0;display:flex;flex-direction:column;padding-left:26px}.conversation-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px 0 16px;border-bottom:1px solid var(--line);flex:none}.conversation-heading h1{font-size:28px;margin:3px 0}.conversation-heading .eyebrow{font-size:10px;margin:0}.conversation-heading .btn{font-size:12px;white-space:nowrap;padding:9px 12px}
.thread{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 12px 24px 2px;scrollbar-gutter:stable}#messages{min-height:0;max-width:760px;margin:auto}.message{white-space:normal;margin:20px 0;max-width:94%;scroll-margin:20px}.message p{font-size:15px;line-height:1.75;margin:7px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.message strong{font-size:11px;font-weight:600;letter-spacing:.04em;color:#6f4b60}.message.user{margin-left:auto;max-width:82%;padding:14px 18px;background:#eee0e7;border:1px solid #e6d3dd;border-radius:18px 18px 4px 18px}.message.assistant{padding:16px 18px;background:#fffdfb;border:1px solid var(--line);border-radius:4px 18px 18px 18px}.message.assistant strong{color:var(--plum)}
.empty-chat{text-align:center;margin:auto;padding:clamp(20px,7vh,70px) 16px;color:var(--muted)}.empty-chat>span{font:44px Georgia,serif;color:#987087}.empty-chat h2{color:var(--plum);font-size:28px;margin:14px 0}.empty-chat p{font-size:14px;line-height:1.7}.empty-chat small{font-size:11px}
.composer{position:static;flex:none;background:var(--paper);padding:12px 0 14px;border-top:1px solid var(--line)}.composer .form-label{font-size:12px;margin:0 0 7px;color:#6f4b60}.compose-box{padding:10px 12px;border-radius:16px;gap:10px}.compose-box textarea{font-size:16px;line-height:1.5;min-height:48px;max-height:130px;resize:vertical}.compose-box:focus-within{border-color:#82506d;box-shadow:0 0 0 1px #82506d}#send-button{min-width:104px;font-size:12px}.hint{font-size:11px;text-align:left;margin:7px 0 0}#send-status{font-size:13px;line-height:1.5;margin:8px 0 0;overflow-wrap:anywhere}#send-status:empty{display:none}#send-status[data-state=error]{color:#8c2444;background:#fbe9ee;border-left:3px solid #a63658;padding:8px 10px;border-radius:4px}#send-status[data-state=sending]{color:var(--plum)}button:disabled{cursor:wait;opacity:.65}textarea:read-only{background:#faf4f6}
@media(max-width:1100px){.layout{grid-template-columns:156px minmax(0,1fr)}.workspace{padding:0 20px}.chat-content{grid-template-columns:140px minmax(0,1fr)}.conversation{padding-left:18px}.sidebar{padding:24px 12px}.nav button{padding:12px 10px;gap:8px}.conversation-heading h1{font-size:25px}}
@media(max-width:760px){.layout{display:flex;flex-direction:column;min-height:0}.sidebar{height:auto;padding:4px 16px;border:0;border-bottom:1px solid var(--line);flex:none;align-items:flex-end}.sidebar .account-button{padding:4px;min-height:32px;font-size:11px}.workspace{flex:1;min-height:0;padding:0 16px}.topbar{min-height:46px;gap:8px}.topbar strong{font-size:19px}.topbar .badge{font-size:9px;padding:4px 6px}.chat-content{display:flex;flex-direction:column;min-height:0}.dialogues{flex:none;border-right:0;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px;padding:9px 0;overflow:visible}.dialogues-heading{margin:0;flex:none}.dialogues-heading h2,.dialogues-note{display:none}.dialogues-heading .btn{min-height:40px}.dialogues #chats{flex:1;min-width:0;flex-direction:row;overflow-x:auto;padding:4px;gap:5px}#chats button{white-space:nowrap;flex:none;min-height:40px;padding:8px 10px;font-size:12px}.conversation{flex:1;min-height:0;padding:0}.conversation-heading{padding:10px 0}.conversation-heading .eyebrow{display:none}.conversation-heading h1{font-size:23px}.conversation-heading .btn{padding:6px 10px;min-height:36px;font-size:11px}.thread{padding:8px 3px 14px 0}.message p{font-size:15px;line-height:1.65}.message{max-width:97%;margin:14px 0}.message.user{max-width:88%;padding:12px 14px}.message.assistant{padding:13px 14px}.empty-chat{padding:24px 12px}.empty-chat h2{font-size:25px}.composer{padding:9px 0}.compose-box{flex-wrap:nowrap;padding:8px;gap:6px}.compose-box textarea{flex-basis:auto;min-width:0;max-height:100px}#send-button{min-width:88px;padding:10px;font-size:11px}.composer .form-label{font-size:11px}.hint{font-size:10px}.bottom-nav{position:static;flex:none;min-height:58px;padding:4px 4px max(4px,env(safe-area-inset-bottom));display:flex}.bottom-nav button{min-height:44px;flex:1}.content{padding:20px 0 28px}.global-status{font-size:11px;padding:4px 16px}.empty-chat p{margin-bottom:10px}.login{margin:0 auto;padding:24px}.login h1{font-size:42px}}
@media(max-height:560px){.conversation-heading{padding:6px 0}.conversation-heading .eyebrow,.composer .form-label,.hint{display:none}.topbar{min-height:38px}.empty-chat{padding:12px}.composer{padding:6px 0}.message{margin:10px 0}}

/* One compact account header; nonempty status messages remain visible. */
.topbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;min-height:56px;padding:5px 0}
.topbar .header-brand{font:22px Georgia,serif;letter-spacing:.12em}
.topbar .badge{justify-self:start;font-size:11px;line-height:1.4;background:transparent;color:#6f4b60;padding:0}
.header-logout{background:transparent;border:1px solid var(--line);border-radius:10px;padding:8px 12px;min-height:44px;font-size:12px;color:var(--plum);white-space:nowrap}
.header-logout:hover{background:#f1e6e9}
@media(max-width:760px){.sidebar{display:none}.topbar{min-height:52px;gap:10px}.topbar .header-brand{font-size:19px}.topbar .badge{font-size:10px}.header-logout{padding:8px;min-width:54px;font-size:11px}}

.profile-content{max-width:900px}.profile-content>h1{font-size:34px}.profile-content>.muted{max-width:650px;font-size:14px}.profile-saved{padding:16px 18px;background:#f1e8ed;border-radius:14px;margin:20px 0}.profile-saved strong{font-size:13px}#profile-summary{font-size:13px;line-height:1.6;margin:8px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;max-height:130px;overflow:auto}.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.profile-field{min-width:0}.profile-field .form-label{font-size:13px;font-weight:600;margin-bottom:8px}.profile-field textarea{font-size:15px;line-height:1.6;resize:vertical;min-height:110px}.legacy-note{border:1px solid var(--line);border-radius:12px;padding:14px;margin:20px 0}.legacy-note summary{cursor:pointer;color:var(--plum);font-size:14px}.legacy-note textarea{font-size:14px;line-height:1.6}.profile-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}#profile-status{font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}#profile-status:empty{display:none}@media(max-width:760px){.profile-grid{grid-template-columns:1fr;gap:16px}.profile-field textarea{font-size:16px;min-height:95px}.profile-content>h1{font-size:30px}.profile-actions .btn{flex:1}}

/* Motion follows the original prototype's 5px / 200ms entrance, never delays I/O. */
@keyframes muse-enter{from{opacity:.5;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@keyframes muse-ready{from{opacity:.55;transform:scale(.85)}to{opacity:1;transform:scale(1)}}
#panel-chat:not([hidden]),#panel-code:not([hidden]),#panel-access:not([hidden]){animation:muse-enter 180ms ease-out}
.message-enter{animation:muse-enter 220ms ease-out}
.btn,.header-logout,.nav button,.bottom-nav button,#chats button{transition:background-color 150ms ease-out,color 150ms ease-out,box-shadow 150ms ease-out,transform 100ms ease-out}
@media(hover:hover) and (pointer:fine){.btn:not(:disabled):hover{box-shadow:0 3px 10px #552f461c}.btn.light:not(:disabled):hover{background:#e8d8e0}.header-logout:not(:disabled):hover{background:#f1e6e9}}
.btn:not(:disabled):active,.header-logout:not(:disabled):active,.nav button:not(:disabled):active,.bottom-nav button:not(:disabled):active,#chats button:not(:disabled):active{transform:translateY(1px)}
button:focus-visible{outline:3px solid #8c4c71;outline-offset:3px}
#send[aria-busy=true] .compose-box{border-color:#8c4c71;background:#fffcfd}
#send-status[data-state=sending]::before{content:'';display:inline-block;width:7px;height:7px;margin-right:8px;border-radius:50%;background:var(--plum);animation:muse-ready 200ms ease-out}
@media(prefers-reduced-motion:reduce){#workspace *,#workspace *::before,#workspace *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}#workspace button:active{transform:none!important}}

.home-screen-help{margin:20px 0;border:1px solid var(--line);border-radius:14px;padding:14px 18px;font-size:13px;line-height:1.65}.home-screen-help summary{cursor:pointer;color:var(--plum);min-height:32px}.home-screen-help p{margin:12px 0}.home-screen-help a{overflow-wrap:anywhere}@media(display-mode:standalone){.home-screen-help{display:none!important}}

.remember-local{display:block;font-size:13px;margin:14px 0;color:var(--ink)}.remember-local input{width:18px;height:18px;vertical-align:middle;accent-color:var(--plum);margin:0 6px 0 0}.remember-local span{display:block;font-size:11px;line-height:1.5;color:var(--muted);margin:6px 0 0 26px}

/* A more expressive workspace; no artificial wait or continuous motion. */
.conversation{background:radial-gradient(ellipse at 55% 0%,#f4e5ec80,transparent 55%)}
.conversation-heading{padding:20px 4px 18px}.conversation-heading h1{font-size:30px;letter-spacing:-.025em}
.empty-chat{max-width:690px;margin:auto;padding:30px 12px 25px}.muse-emblem{display:grid;place-items:center;margin:0 auto 18px;width:70px;height:70px;border-radius:24px;background:#552f46;color:#f6e6d9;font:44px Georgia,serif;box-shadow:0 12px 24px #552f4617;transform:rotate(-6deg)}
.empty-chat h2{font-size:clamp(29px,3.3vw,42px);letter-spacing:-.035em;margin:12px 0}.empty-chat .eyebrow{font-size:9px;letter-spacing:.15em}.empty-chat>p:not(.eyebrow){font-size:14px;line-height:1.7}.quick-tasks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:24px 0 18px}.quick-tasks button{min-width:0;text-align:left;border:1px solid #e3d1dc;border-radius:17px;padding:17px 14px;background:#fffdfb;transition:transform 180ms ease,background-color 180ms ease,border-color 180ms ease}.quick-tasks span{display:block;color:#8c4c71;font-size:23px;margin-bottom:14px}.quick-tasks strong{display:block;font-size:13px;line-height:1.4;color:#4f2b41}.quick-tasks small{display:block;font-size:11px;line-height:1.5;color:#776b70;margin-top:6px}.mock-caption{font-size:10px!important}
@media(hover:hover){.quick-tasks button:not(:disabled):hover{background:#f6edf2;border-color:#b78ca6;transform:translateY(-3px)}}
.quick-tasks button:not(:disabled):active{transform:translateY(1px)}
.message.assistant{border-left:3px solid #c7a5b9;box-shadow:0 5px 18px #552f4606}.message.user{background:#ead8e3}
.reply-wait{display:flex;gap:10px;align-items:center;padding:16px;color:#76566a;font-size:12px}.wait-mark{font-size:26px;color:#8c4c71}.wait-line{display:block;width:95px;height:3px;border-radius:4px;background:#e5cedb;margin-top:7px;transform-origin:left;animation:muse-wait-in 700ms ease-out}
@keyframes muse-wait-in{from{transform:scaleX(.2);opacity:.5}to{transform:scaleX(1);opacity:1}}
@keyframes muse-enter{from{opacity:.25;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
#panel-chat:not([hidden]),#panel-code:not([hidden]),#panel-access:not([hidden]){animation-duration:340ms}.message-enter{animation-duration:380ms}.empty-chat .muse-emblem{animation:muse-emblem-in 450ms ease-out}
@keyframes muse-emblem-in{from{opacity:.3;transform:rotate(-12deg) translateY(7px)}to{opacity:1;transform:rotate(-6deg) translateY(0)}}
@media(max-width:760px){.conversation-heading h1{font-size:25px}.empty-chat{padding:20px 0}.muse-emblem{width:52px;height:52px;font-size:34px;border-radius:18px;margin-bottom:13px}.quick-tasks{gap:7px;margin:18px 0}.quick-tasks button{padding:12px 9px;border-radius:13px}.quick-tasks span{font-size:20px;margin-bottom:8px}.quick-tasks strong{font-size:11px}.quick-tasks small{font-size:10px}.empty-chat h2{font-size:30px}}
@media(max-width:380px){.quick-tasks{grid-template-columns:1fr}.quick-tasks button{display:grid;grid-template-columns:24px 1fr;column-gap:8px;padding:10px}.quick-tasks span{grid-row:1/3;margin:0}.quick-tasks small{margin-top:2px}}
@media(prefers-reduced-motion:reduce){#workspace .quick-tasks button{transform:none!important}.muse-emblem{animation:none!important}}

/* Readable, safe Markdown; compact completed one-shot state. */
.message .message-body{font-size:15px;line-height:1.65;letter-spacing:normal;overflow-wrap:anywhere}
.message .message-body p{margin:.7em 0;white-space:pre-line;font:inherit;line-height:inherit}
.message .message-body strong{font-size:inherit;line-height:inherit;letter-spacing:normal;color:inherit;font-weight:650}
.message .message-body ol,.message .message-body ul{padding-left:1.5em;margin:.7em 0}
.message .message-body li{padding-left:.25em;margin:.45em 0;white-space:pre-line}
.message .message-body>:first-child{margin-top:.5em}.message .message-body>:last-child{margin-bottom:0}
#one-shot-notice{flex:none;border-top:1px solid var(--line);padding:10px 0;font-size:12px;line-height:1.45}
#one-shot-notice p{margin:0 0 8px}#one-shot-notice[data-state=complete]{padding:8px 0;color:var(--muted)}
#one-shot-notice[data-state=complete] p{margin:0}.message.assistant{max-width:100%}
@media(max-width:760px){.message .message-body{font-size:15px;line-height:1.6}#one-shot-notice[data-state=complete]{font-size:11px;padding:6px 0}.message .message-body ol,.message .message-body ul{padding-left:1.25em}}

/* Keep an editable draft after the paid test; sending remains disabled. */
.composer[data-test-state=complete]{padding:6px 0 8px}
.composer[data-test-state=complete] .form-label{display:none}
.composer[data-test-state=complete] .compose-box{padding:6px 10px}
.composer[data-test-state=complete] textarea{min-height:40px;max-height:90px}
.composer[data-test-state=complete] #send-button:disabled{cursor:not-allowed}
.composer[data-test-state=complete] .hint{margin-top:4px;font-size:10px}

/* Only shown by the isolated offline scenario capability. */
#scenario-controls {font-size:.85rem;margin-bottom:.6rem}
#scenario-controls label {margin-right:.6rem}
#scenario-genre {font:inherit;color:inherit;background:var(--cream,#fffaf5);border:1px solid #b8a4b2;border-radius:.6rem;padding:.4rem;max-width:100%}
#revision-status {margin:.4rem 0;line-height:1.45}
.revise-scenario {margin-top:.5rem;font-size:.8rem}
#scenario-genre:focus-visible {outline:2px solid #67445f;outline-offset:3px}

#profile-comparison pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;max-height:260px;overflow:auto}#test-orders article{padding:12px 0;border-top:1px solid var(--line)}#test-orders button{margin:4px}

.chat-row {display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:4px;align-items:start}.chat-row button {min-height:44px;overflow-wrap:anywhere}.chat-row .chat-remove {grid-column:1/-1}.trash-row {display:flex;flex-wrap:wrap;gap:6px;padding:8px 0}.trash-row span {flex:1 1 100%;overflow-wrap:anywhere}#trash-history {max-height:50vh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}.chat-row [hidden],#trash-panel[hidden] {display:none}

/* Trash is a separate flow panel, never a horizontal navigation item. */
#trash-panel{box-sizing:border-box;min-width:0;max-width:100%;width:100%;margin:12px 0;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--cream,#fffaf7);white-space:normal;overflow-wrap:anywhere}
#trash-panel h3{margin:0 0 8px;font:20px Georgia,serif}#trash-panel p{line-height:1.5}#close-trash{min-height:44px;max-width:100%;white-space:normal}
#trash-list,#trash-history{min-width:0;max-width:100%}#trash-panel .trash-row button{min-height:44px;max-width:100%;white-space:normal}
@media(max-width:760px){
 .dialogues{flex-wrap:wrap;min-width:0;max-width:100%;align-items:flex-start}
 .dialogues-heading,#refresh-chats,#show-trash{order:0;max-width:100%}
 .dialogues #chats{order:1;flex:0 1 100%;width:100%;box-sizing:border-box}
 .dialogues #trash-panel{order:2;flex:0 0 100%;width:100%;max-width:100%;margin:4px 0 10px}
 .dialogues .chat-row{flex:0 0 auto;max-width:100%}
 #chats .chat-remove{white-space:normal}
}

/* Release candidate: quiet depth, clear actions, no network fonts or heavy blur. */
.sidebar{background:linear-gradient(165deg,#f6eeee,#f0e3e8)}
.conversation-heading{border-bottom-color:#e9dfe4}
.quick-tasks button{box-shadow:0 3px 12px #552f4607;border:1px solid #e7d9e0}
.quick-tasks button:hover{border-color:#b68b9f;box-shadow:0 5px 16px #552f4610}
.compose-box{background:#fffdfc;box-shadow:0 4px 18px #552f4608}
.nav button[aria-current=page]{box-shadow:0 4px 12px #552f4614}
.nav button,.bottom-nav button{touch-action:manipulation}
.thread{overscroll-behavior:contain}
#panel-code,#panel-access{overscroll-behavior:contain;scrollbar-gutter:stable}
@media(hover:hover){.nav button:not([aria-current=page]):hover,.bottom-nav button:not([aria-current=page]):hover{background:#eee1e8}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

.payment-return{max-width:620px}.payment-return h1{font-size:clamp(28px,6vw,40px);line-height:1.15}.payment-return .btn{display:inline-flex;margin:6px 8px 6px 0}.payment-return .notice{font-size:13px}
/* Subscription resource card: shared desktop/mobile layout. */
.quota-card { border:1px solid #ddc5cd; }
.quota-balance { font-size:1.2rem; font-weight:600; }
.quota-card progress { display:block; width:100%; height:12px; accent-color:#6f314b; border-radius:99px; }
.quota-card progress[hidden] { display:none; }
.quota-card[data-warning="low"],.quota-card[data-warning="critical"] { border-color:#a65369; }
.quota-plan-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:20px; }
.quota-plan { min-width:0; padding:18px; border:1px solid #e3d6da; border-radius:18px; background:#fffaf7; }
.quota-plan h3 { overflow-wrap:anywhere; }
.quota-plan .btn { width:100%; white-space:normal; }
@media(max-width:760px) { .quota-plan-grid { grid-template-columns:1fr; } .quota-card .row { flex-wrap:wrap; } }
