/* SAWWA 3.2 — HELLA / editorial Greek-modern system */
:root{--cream:#f8f5ef;--paper:#fffefa;--ink:#25282d;--muted:#777c82;--gold:#b48b50;--gold-d:#8e642c;--border:#e9e0d4;--shadow:0 12px 36px rgba(62,49,28,.07)}
html,body{background:var(--cream);-webkit-tap-highlight-color:transparent}
body{font-family:Inter,'Segoe UI',Arial,sans-serif}
button{transition:background-color .17s ease,box-shadow .17s ease,color .17s ease}
.brand-button{font:600 24px/1.2 Georgia,serif;border:0;background:transparent;color:#202936;white-space:nowrap;cursor:pointer;padding:5px 0;letter-spacing:.27em}
.topbar{height:72px;position:relative;z-index:5;background:#fffefa;border-bottom:1px solid var(--border)}
.app-layout{min-height:calc(100dvh - 72px);grid-template-columns:216px minmax(0,1fr)}
.side-nav{height:calc(100dvh - 72px);padding:28px 14px;background:linear-gradient(175deg,#fffefa,#f5efe4)}
.nav-button{font-size:13px;min-height:49px;padding:12px 13px;border-radius:13px}
.nav-button.active{background:#f0e3cf;color:#8e642c}
.side-label{color:#a78c67}
.main-space{padding:25px clamp(16px,2.9vw,46px) 30px}
.page{max-width:1300px}
.eyebrow{letter-spacing:.21em;font-size:10px}
.page-head{margin-bottom:18px}
.page-head h1{font-size:clamp(30px,3.1vw,48px)}
.page-head p{max-width:550px}
.card,.context-block,.home-stat,.plan-card,.diary-paper{box-shadow:0 10px 28px rgba(57,43,26,.045);border:1px solid #eae2d7}
.card h2{font-family:Georgia,'Times New Roman',serif;font-weight:500}
.myth-hero{min-height:287px;overflow:hidden;padding:30px clamp(22px,3vw,45px);background:linear-gradient(100deg,#fffdf7 4%,#f7f0e4 56%,#e7d7bb 100%);margin-bottom:15px}
.myth-hero .myth-hero-copy{max-width:650px}
.myth-hero h1{color:#17202e;font-family:Georgia,'Times New Roman',serif;font-size:clamp(36px,4.4vw,64px);font-weight:500;line-height:1.08;max-width:650px}
.myth-hero p{max-width:370px;color:#696969;font-size:14px}
.myth-portrait{width:48%;height:100%;object-fit:cover;object-position:50% 40%;right:0;top:0;z-index:-2;opacity:.98}
.myth-hero:after{background:linear-gradient(90deg,#fffdf9 5%,#fffdf9f5 39%,#fffdf92b 65%,transparent 100%)}
.hero-motto{display:inline-flex;font-size:12px;color:#8c642f;background:#fffaf0e3;border:1px solid #ead8ba;border-radius:20px;padding:9px 13px;max-width:390px;line-height:1.4}
.myth-hero .quiet{background:#fffdf9d9}
/* Greek mythology through quiet typography, not decorative noise */
.page-myth-banner{min-height:163px;height:auto;padding:27px 35px;background:linear-gradient(107deg,#fffcf7,#f2e7d8);border:1px solid #ece2d6;border-radius:21px;margin:0 0 19px}
.page-myth-banner img{right:0;width:45%;object-fit:cover;object-position:49% 42%;height:100%;max-height:none}
.page-myth-banner:after{background:linear-gradient(90deg,#fffcf7 3%,#fffcf7ef 47%,#fffcf78c 60%,transparent 79%)}
.page-myth-banner p{font:italic 27px/1.25 Georgia,serif;max-width:min(550px,56%);color:#5c4632}
.chat-mini-motto,.profile-affirmation{display:flex;align-items:center;gap:10px;border-radius:14px;padding:10px 15px;color:#79623f;background:#f4ead9;border:1px solid #e8dcc8;font-size:12px;line-height:1.5;margin-bottom:14px}
.chat-mini-motto span,.profile-affirmation span{font:25px Georgia,serif;color:#a17941}
.profile-affirmation{margin-top:4px}
.chat-page-head{margin-bottom:12px}
#conversationsView .v32-chat-layout{grid-template-columns:minmax(195px,.75fr) minmax(380px,1.9fr) minmax(220px,.88fr);gap:13px}
#conversationsView .v2-chat-card{min-height:610px;height:min(73dvh,770px);box-shadow:var(--shadow)}
#conversationsView .conversation-list{max-height:min(73dvh,770px)}
#conversationsView .chat-heading{min-height:70px}
#conversationsView .chat-heading strong{font-size:14px;max-width:280px}
#conversationsView .chat-bubble.is-user{background:#efe3cf}
#conversationsView .chat-bubble.is-assistant{color:#333b43}
.chat-context-cover{height:150px}
.chat-context-cover img{object-position:50% 46%}
#conversationsView .chat-compose{border-radius:25px;border:1px solid #e8dece;background:#fffcf7;margin-bottom:10px;min-height:56px}
.chat-compose:focus-within,.home-talk-composer:focus-within{border-color:#c6a06a;box-shadow:0 0 0 3px #bf985b21}
#conversationsView .message-feed{overscroll-behavior:contain}
#conversationList .history-header{font-size:11px;letter-spacing:.12em;color:#937248;text-transform:uppercase;margin:7px}
#conversationsView .conversation-row{font-size:12px;overflow-wrap:anywhere}
.home-stat-grid{gap:12px}
.home-stat{background:#fffdf9;padding:18px 22px;min-height:126px}
.home-stat:focus-visible{outline:2px solid var(--gold)}
.home-stat>span{color:#8f6c3d}
.home-stat strong{font-size:21px}
.home-work-grid{margin-top:13px;gap:12px}
.status-flow{grid-template-columns:repeat(3,minmax(0,1fr))}
.home-path-band{margin-top:15px}
.home-talk-composer{border-radius:20px;min-height:63px;max-width:none;background:#fffefb}
.home-talk-composer input{font-size:14px}
.home-talk-composer .primary{width:46px;height:46px;border-radius:14px;padding:0}
.home-talk-composer>span{font-size:23px}
.quick-start-card button{border-radius:13px;gap:13px}
.profile-hero{min-height:252px}
.diary-paper{padding-top:24px}
.diary-intro{max-width:910px}
#pathView .path-goals .path-goal{border-radius:20px}
#companionView .companion-grid .card{border-radius:18px}
.app-footer{color:#a89e90}
/* The font and the art never contain baked-in headings. */
@media(max-width:1250px){
 #conversationsView .v32-chat-layout{grid-template-columns:190px minmax(0,1fr)}
 #conversationsView .chat-context{grid-column:1/-1;max-height:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:920px) and (min-width:801px){
 .app-layout{grid-template-columns:180px minmax(0,1fr)}
 .main-space{padding:20px 14px}
 .myth-portrait{width:42%}
}
@media(max-width:800px){
 .topbar{position:sticky;top:0;height:60px;box-shadow:0 3px 14px rgba(53,37,17,.04);padding:0 14px}
 .brand-button{font-size:21px;letter-spacing:.21em}
 .topbar-right{gap:8px}
 .topbar .dev-tag{display:none}
 .topbar .user-chip{display:flex!important;font-size:0;width:37px;height:37px;border:1px solid #d8c4a8;border-radius:50%;background:#f2e7d4;color:#75552c;max-width:37px;justify-content:center;align-items:center;overflow:hidden;padding:0}
 .topbar .user-chip:before{content:'♙';font:25px Georgia,serif}
 .topbar .icon-btn{height:35px;width:35px;font-size:21px}
 .app-layout{display:block;min-height:calc(100dvh - 60px)}
 .main-space{padding:12px 12px calc(91px + env(safe-area-inset-bottom))}
 .page{padding:0;max-width:100%}
 .side-nav{display:none}
 .mobile-nav{display:flex;position:fixed;z-index:30;bottom:0;left:0;right:0;gap:1px;padding:6px 4px calc(7px + env(safe-area-inset-bottom));min-height:65px;border-top:1px solid #eae1d3;background:#fffefaef;backdrop-filter:blur(20px);box-shadow:0 -5px 20px rgba(51,42,31,.08)}
 .mobile-nav button{min-width:0;flex:1;padding:5px 0;color:#8d8478;font-size:23px;line-height:1;border-radius:10px;background:transparent;display:flex;flex-direction:column;align-items:center;gap:5px}
 .mobile-nav button span{display:block;font-size:23px;height:24px;line-height:1}
 .mobile-nav button small{font-size:10px;white-space:nowrap;font-weight:650}
 .mobile-nav button.active{color:#986a2c;background:#f5ecdc}
 .myth-hero{min-height:290px;padding:23px 17px 17px;margin:0 0 12px;border-radius:20px;align-items:flex-start}
 .myth-hero h1{font-size:clamp(32px,9vw,44px);max-width:65%;margin:9px 0}
 .myth-hero p{font-size:12px;line-height:1.45;max-width:56%;margin-bottom:12px}
 .myth-portrait{width:66%;height:100%;object-fit:cover;object-position:center 50%;opacity:.95}
 .myth-hero:after{background:linear-gradient(90deg,#fffdf9 0%,#fffdf9f2 29%,#fffdf95c 61%,transparent 83%)}
 .hero-motto{font-size:10px;line-height:1.35;padding:7px 9px;max-width:54%;}
 .myth-hero .quiet{font-size:11px;padding:9px 12px;margin-top:2px}
 .home-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .home-stat{min-height:114px;padding:14px 12px}
 .home-stat:last-child{grid-column:1/-1;min-height:95px}
 .home-stat>span{font-size:9px;letter-spacing:.09em}
 .home-stat strong{font-size:17px}
 .home-stat strong.stat-number{font-size:35px}
 .home-stat small{font-size:10px}
 .home-work-grid{grid-template-columns:1fr;gap:11px;margin-top:11px}
 .work-flow-card,.quick-start-card{padding:17px}
 .work-flow-card .section-head{margin-bottom:4px}
 .status-flow{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .status-flow p{padding:6px 0;gap:4px}
 .status-flow strong{font-size:11px}.status-flow small{font-size:10px}
 .quick-start-card button{padding:11px;margin:2px 0}
 .home-talk-composer{position:relative;gap:7px;padding:7px;margin:12px 0 8px;min-height:55px}
 .home-talk-composer input{font-size:13px;padding:8px 2px}
 .home-talk-composer .primary{width:41px;height:41px}
 .home-talk-composer button:not(.primary){width:38px;height:38px}
 .home-path-band{padding:17px}
 .page-head{padding-top:12px;margin-bottom:15px;gap:10px}
 .page-head h1{font-size:31px}.page-head p{font-size:12px}
 .page-head .path-actions{gap:6px}
 .page-head .path-actions button{font-size:11px;padding:9px 12px}
 .page-myth-banner{min-height:125px;height:125px;padding:17px;border-radius:17px}
 .page-myth-banner img{width:51%}
 .page-myth-banner p{font-size:clamp(17px,5vw,22px);max-width:57%}
 .page-myth-banner:after{background:linear-gradient(90deg,#fffcf7 0%,#fffcf7ee 39%,#fffcf752 69%,transparent 88%)}
 .chat-mini-motto,.profile-affirmation{font-size:11px;padding:9px 11px;margin-bottom:10px}
 .chat-mini-motto span,.profile-affirmation span{font-size:21px}
 #conversationsView .chat-page-head{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:6px}
 #conversationsView .chat-page-head h1{font-size:27px;margin:4px 0}
 #conversationsView .chat-page-head .quiet{font-size:10px;padding:8px 11px}
 #conversationsView .v32-chat-layout{grid-template-columns:minmax(0,1fr);gap:0}
 #conversationsView .conversation-list{display:flex;align-items:center;gap:6px;max-height:76px;min-height:48px;overflow-x:auto;overflow-y:hidden;border:0;border-bottom:1px solid #ebdfcb;padding:0 0 8px;border-radius:0;white-space:nowrap;scrollbar-width:none}
 #conversationsView .conversation-list::-webkit-scrollbar{display:none}
 #conversationsView .conversation-list .history-header{flex:0 0 auto;margin:0 7px 0 0;letter-spacing:.08em}
 #conversationsView .conversation-list .conversation-row{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:158px;min-height:37px;border-radius:13px;padding:8px 10px;margin:0;border:1px solid #ebdfd1;background:#fffefb}
 #conversationsView .conversation-list .conversation-row.selected{border-color:#c5a775;background:#f5ebd9}
 #conversationsView .v2-chat-card{height:calc(100dvh - 280px);min-height:360px;max-height:750px;border-radius:17px;border:1px solid #ece0d0}
 #conversationsView .chat-heading{min-height:56px;padding:8px 12px}
 #conversationsView .chat-heading strong{max-width:calc(100vw - 130px)}
 .chat-heading-avatar{height:36px;width:36px}
 #conversationsView .message-feed{padding:15px 12px;min-height:0;flex:1;gap:8px}
 #conversationsView .chat-bubble{font-size:13px;line-height:1.6;max-width:93%}
 #conversationsView .chat-bubble.is-assistant{padding:8px 2px;max-width:100%}
 #conversationsView .chat-bubble.is-user{padding:11px 13px}
 #conversationsView .chat-compose{margin:0 8px 7px;max-width:calc(100% - 16px);min-height:50px}
 #conversationsView .chat-note{font-size:9px;line-height:1.45;margin:0 12px 10px}
 #conversationsView .chat-context{display:none}
 .chat-mini-motto{margin-top:3px}
 .profile-grid{grid-template-columns:1fr}
 .app-footer{font-size:9px;text-align:center;padding:12px 4px}
 .auth-art{min-height:205px}
 .auth-screen{grid-template-columns:1fr}
}
@media(max-width:380px){
 .topbar .icon-btn{display:none!important}
 .myth-hero{min-height:265px}
 .myth-hero h1{font-size:31px}
 .hero-motto{font-size:9px}
 .status-flow{grid-template-columns:1fr 1fr}
 .status-flow p:last-child{grid-column:1/-1}
 #conversationsView .v2-chat-card{height:calc(100dvh - 295px)}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}

/* SAWWA 3.3 — one command dashboard and account preferences */
.dashboard-hero{min-height:235px;padding:23px clamp(22px,3.5vw,48px);margin-bottom:24px}
.dashboard-hero .myth-hero-copy{z-index:2}
.dashboard-hero .myth-hero-copy h1{font-size:clamp(34px,4.3vw,59px)}
.dashboard-hero .myth-hero-copy p{max-width:385px}
.dashboard-hero .myth-portrait{z-index:0;pointer-events:none}
.dashboard-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:4px 0 15px}
.dashboard-heading h2{font:500 clamp(24px,2.45vw,33px)/1.25 Georgia,serif;margin:5px 0 6px}
.dashboard-heading p{font-size:12px;color:var(--muted)}
.dashboard-heading button{flex:0 0 auto}
.dashboard-stats{margin-bottom:14px}
.dashboard-stats .home-stat{min-width:0;text-align:left}
.dashboard-stats .home-stat strong{display:block;overflow-wrap:anywhere;font-size:19px}
.dashboard-stats .home-stat .stat-number{font-size:39px;line-height:1.35}
.dashboard-columns{display:grid;grid-template-columns:minmax(0,1.47fr) minmax(290px,1fr);gap:14px;align-items:start}
.dashboard-main-col,.dashboard-side-col{display:grid;gap:14px;min-width:0}
.dashboard-columns .card{padding:23px;border-radius:20px;min-width:0}
.dashboard-columns .section-head{display:flex;justify-content:space-between;align-items:baseline;gap:9px;margin-bottom:18px}
.dashboard-columns .section-head h2{font:500 23px Georgia,serif}
.dashboard-columns .text-action{font-size:12px;white-space:nowrap}
.dashboard-focus-card{background:linear-gradient(145deg,#fffdfa,#f8f1e5)!important}
.dashboard-focus-label{font-size:10px;color:#a07c49;letter-spacing:.14em;font-weight:750;margin:4px 0 12px}
.dashboard-next-title{display:block;font-size:19px;font-weight:750;line-height:1.45;overflow-wrap:anywhere}
.dashboard-next-meta{font-size:12px;color:var(--muted);line-height:1.6;margin-top:7px}
.dashboard-next-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.dashboard-next-buttons button{font-size:12px;padding:9px 13px}
.dashboard-focus-hint{font-size:12px;line-height:1.6;color:var(--muted);margin:14px 0 0}
.dashboard-attention{margin-top:13px;padding:11px 13px;border-radius:11px;background:#fff0e6;color:#9b492f;font-size:12px;line-height:1.55}
.dashboard-task-tabs{display:flex;justify-content:space-between;gap:7px;margin-bottom:12px;font-size:11px;color:var(--muted)}
#dashboardOverdueSummary{color:#ae573a;font-weight:700}
#homeTasks .task-row{margin:0;border-top:1px solid #efe7dc;padding:12px 0}
#homeTasks .task-row:first-child{border-top:0}
.dashboard-inline-actions{display:flex;gap:13px;align-items:center;justify-content:space-between;border-top:1px solid #efe7dc;margin-top:13px;padding-top:15px;flex-wrap:wrap}
.dashboard-inline-actions button{font-size:12px}
#homePlans{display:grid;gap:10px}
#homePlans .plan-card{border-radius:14px;margin:0;background:#fdf9f2;padding:17px;box-shadow:none}
#homePlans .plan-card h3{font-size:16px}
#homePlans .empty{margin:4px 0;padding:7px}
.dashboard-diary-preview{font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.dashboard-entry-date{display:block;color:#a07d4c;font-size:11px;margin-bottom:8px}
.dashboard-entry-title{display:block;font-size:15px;margin-bottom:7px}
.dashboard-diary-preview p{color:#615c55;white-space:pre-wrap;max-height:140px;overflow:hidden;line-height:1.65}
#dashboardConversation{min-height:45px;overflow-wrap:anywhere}
.dashboard-recent-chat{display:block;border:0;background:#f5ead9;padding:12px 14px;border-radius:12px;text-align:left;color:#685039;line-height:1.5;width:100%;font-weight:650}
#continueDashboardChat{margin-top:12px;font-size:12px}
.dashboard-composer{margin:17px 0 0}
.profile-grid .card{min-width:0}
.profile-settings{margin-top:20px;border-top:1px solid var(--border);padding-top:8px}
.profile-settings .setting-line{justify-content:space-between;gap:13px}
.profile-settings .setting-line select{max-width:190px;min-width:140px;background:#fffefa;color:#282b2c;border:1px solid #e8ddcf;border-radius:10px;padding:9px 11px}
.profile-settings .setting-line input[type=number]{width:75px;margin-left:auto;background:#fffefa;color:#282b2c;border:1px solid #e8ddcf;border-radius:10px;padding:7px 10px}
.profile-settings .setting-line input[type=checkbox]{width:16px;height:16px;flex-shrink:0}
.profile-settings .field-note{line-height:1.65;margin-top:9px}
.settings-notices{margin-top:16px;font-size:12px}
/* Avoid old deleted 'Today' settings view affecting rendering */
@media(max-width:1100px){.dashboard-columns{grid-template-columns:minmax(0,1fr) minmax(270px,.87fr)}.dashboard-columns .card{padding:19px}}
@media(max-width:800px){
 .dashboard-hero{min-height:265px;margin-bottom:15px}
 .dashboard-heading{align-items:flex-start;flex-direction:column;gap:9px;margin:0 0 14px}
 .dashboard-heading button{font-size:12px;padding:9px 12px}
 .dashboard-heading h2{font-size:25px}
 .dashboard-columns{grid-template-columns:1fr;gap:11px}
 .dashboard-main-col,.dashboard-side-col{gap:11px}
 .dashboard-columns .card{padding:18px}
 .dashboard-columns .section-head h2{font-size:20px}
 .dashboard-stats{margin-bottom:13px}
 .dashboard-stats .home-stat strong{font-size:16px}
 .dashboard-stats .home-stat .stat-number{font-size:30px}
 .dashboard-next-title{font-size:16px}
 .dashboard-composer{margin:12px 0 4px}
 .profile-settings .setting-line{font-size:12px}
 .profile-settings .setting-line select{min-width:125px;max-width:160px}
}
/* Persistent dark and system themes, leaving readable real content rather than darkening background images */
html[data-theme="dark"]{
 --cream:#141b23;--paper:#202936;--ink:#f1eee8;--muted:#b3b8bf;--gold:#c89e5d;--gold-d:#e3b875;--border:#384455;--shadow:0 9px 32px rgba(0,0,0,.23);color-scheme:dark;
}
html[data-theme="dark"] body,html[data-theme="dark"] .shell,html[data-theme="dark"] .main-space{background:#141b23!important;color:#f1eee8!important}
html[data-theme="dark"] .topbar,html[data-theme="dark"] .side-nav,html[data-theme="dark"] .mobile-nav{background:#19222d!important;border-color:#354052!important;color:#f1eee8!important}
html[data-theme="dark"] .nav-button,html[data-theme="dark"] .mobile-nav button{color:#c6c7c5!important}
html[data-theme="dark"] .nav-button.active,html[data-theme="dark"] .mobile-nav button.active{background:#3b3327!important;color:#eed09c!important}
html[data-theme="dark"] .brand-button,html[data-theme="dark"] .brand,html[data-theme="dark"] .page-head h1,html[data-theme="dark"] .dashboard-heading h2{color:#f1eee8!important}
html[data-theme="dark"] .card,html[data-theme="dark"] .home-stat,html[data-theme="dark"] .plan-card,html[data-theme="dark"] .path-goal,html[data-theme="dark"] .diary-paper,html[data-theme="dark"] .context-block,html[data-theme="dark"] .chat-card,html[data-theme="dark"] .conversation-list,html[data-theme="dark"] .auth-panel,html[data-theme="dark"] .profile-grid .card{background:#202936!important;color:#f0ede8!important;border-color:#374252!important;box-shadow:0 10px 30px rgba(0,0,0,.14)!important}
html[data-theme="dark"] .dashboard-focus-card,html[data-theme="dark"] .home-stat,html[data-theme="dark"] #homePlans .plan-card{background:#232e3b!important}
html[data-theme="dark"] .myth-hero,html[data-theme="dark"] .page-myth-banner{background:linear-gradient(102deg,#273341,#3d3b35)!important;border-color:#465060!important}
html[data-theme="dark"] .myth-hero:after{background:linear-gradient(90deg,#26313df8 0%,#26313de9 34%,#26313d50 64%,transparent 98%)!important}
html[data-theme="dark"] .page-myth-banner:after{background:linear-gradient(90deg,#273341 0%,#273341e9 48%,#2733411a 85%,transparent)!important}
html[data-theme="dark"] .myth-hero h1,html[data-theme="dark"] .myth-hero p,html[data-theme="dark"] .myth-hero .eyebrow,html[data-theme="dark"] .page-myth-banner p{color:#fff8eb!important}
html[data-theme="dark"] .hero-motto,html[data-theme="dark"] .chat-mini-motto,html[data-theme="dark"] .profile-affirmation{background:#313c48d9!important;border-color:#5c5342!important;color:#f0d09b!important}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] strong,html[data-theme="dark"] p,html[data-theme="dark"] .task-title,html[data-theme="dark"] .plan-head h3,html[data-theme="dark"] .diary-entry h3,html[data-theme="dark"] .context-title{color:inherit}
html[data-theme="dark"] .muted-text,html[data-theme="dark"] .hint,html[data-theme="dark"] small,html[data-theme="dark"] .task-meta,html[data-theme="dark"] .profile-muted,html[data-theme="dark"] .diary-entry p,html[data-theme="dark"] .dashboard-diary-preview p{color:#bcc1c8!important}
html[data-theme="dark"] .quiet,html[data-theme="dark"] .filter,html[data-theme="dark"] .history-header,html[data-theme="dark"] .conversation-row,html[data-theme="dark"] .chat-heading,html[data-theme="dark"] .dashboard-recent-chat,html[data-theme="dark"] .goal-draft-dock{background:#2e3947!important;color:#ede8dc!important;border-color:#455161!important}
html[data-theme="dark"] .chat-bubble.is-user{background:#454132!important;color:#fff6e5!important}
html[data-theme="dark"] .chat-bubble.is-assistant{background:transparent!important;color:#f1ece5!important}
html[data-theme="dark"] .chat-compose,html[data-theme="dark"] .home-talk-composer,html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{background:#26313e!important;color:#f0eee8!important;border-color:#455161!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#b1b7bd!important}
html[data-theme="dark"] .modal,html[data-theme="dark"] .auth-screen{background:#202936!important;color:#f1eee8!important}
html[data-theme="dark"] .diary-entry{border-color:#3e4857!important}
html[data-theme="dark"] .dashboard-attention{background:#49362f!important;color:#ffd0ad!important}
html[data-theme="dark"] .task-row,html[data-theme="dark"] .dashboard-inline-actions,html[data-theme="dark"] .section-head{border-color:#384657!important}
html[data-theme="dark"] .bar{background:#444f5a!important}
html[data-theme="dark"] .dev-tag{background:#303a44!important;color:#d5b683!important}

.first-visit-panel{position:fixed;z-index:90;left:50%;bottom:calc(75px + env(safe-area-inset-bottom));transform:translateX(-50%);width:min(420px,calc(100vw - 24px));box-sizing:border-box;background:#fffdf8;color:#24303c;border:1px solid #ccb790;border-radius:18px;padding:17px 20px;box-shadow:0 12px 46px #33291a40;display:grid;gap:8px;max-height:65dvh;overflow:auto}
.first-visit-panel h2,.first-visit-panel p{margin:0}.first-visit-panel small{font-size:12px;color:#795922}.first-visit-panel button{min-height:44px}.first-visit-panel textarea{font:inherit;width:100%;box-sizing:border-box;padding:10px;border:1px solid #baab93;border-radius:10px}.init-note:empty{display:none}.first-visit-panel .init-note{font-size:13px}.diary-links button{margin:3px}.diary-entry-body p{white-space:pre-line}

/* SAWWA 4.0.5 — readable typography and deliberate responsive constraints.
   Avoid page-wide transform/zoom scaling, which clips fixed panels and buttons. */
:root{font-size:16px}
html,body{max-width:100%;overflow-x:hidden}
body{font-size:16px;line-height:1.55}
.app-layout,.main-space,.page,.card,.diary-paper,.v2-chat-card,.chat-context{min-width:0}
.page-head p,.home-intro p,.myth-hero p{font-size:15px;line-height:1.65}
.nav-button{font-size:15px;line-height:1.35;min-width:0;overflow-wrap:anywhere}
.side-label,.eyebrow,.mini-badge{font-size:12px}
.side-foot,.side-foot small{font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.card p,.card li,.plan-card p,.task-row,.task-meta,.memory-content p,.context-task{font-size:15px;line-height:1.6;overflow-wrap:anywhere}
.home-stat small,.home-stat>span,.context-block small{font-size:13px}
.context-title{font-size:21px;overflow-wrap:anywhere}
.context-eyebrow,.context-muted{font-size:12px}
#conversationsView .chat-bubble,#conversationsView .chat-bubble.is-user,#conversationsView .chat-bubble.is-assistant{font-size:17px;line-height:1.72;overflow-wrap:anywhere;word-break:normal}
#conversationsView .chat-heading strong{font-size:16px;max-width:100%}
#conversationsView .chat-heading small{font-size:12px}
#conversationsView .chat-heading>div{min-width:0;flex:1}
#conversationsView .conversation-row{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:normal;overflow-wrap:anywhere}
#conversationsView .chat-compose input{min-width:0;flex:1;font-size:16px;padding:12px 6px}
#conversationsView .chat-note{font-size:12px;line-height:1.5}
#conversationsView .chat-layout{min-width:0}
#conversationsView .v32-chat-layout{grid-template-columns:minmax(160px,.72fr) minmax(0,2.15fr) minmax(210px,.9fr)}
#conversationsView .v2-chat-card{padding:18px 20px;min-width:0}
.chat-mini-motto,.profile-affirmation{font-size:14px}
.diary-entry p{font-size:16px;line-height:1.72}
.diary-entry h3{font-size:22px;line-height:1.35}
.diary-date,.diary-kind,.diary-intro p{font-size:13px}
.diary-action,.text-action,.inline-goal-choice,.inline-goal-buttons button{font-size:14px}
.diary-entry{min-width:0}
.diary-actions{flex-wrap:wrap;justify-content:flex-start}
.diary-entry-body,.diary-entry-body *{overflow-wrap:anywhere}
button,.primary,.quiet{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:40px}
.primary,.quiet{font-size:14px;line-height:1.3}
.chat-compose .primary{min-width:46px;flex-shrink:0}
.context-block{padding:17px 16px}
.first-visit-panel{width:min(520px,calc(100vw - 28px));padding:22px 24px;gap:12px;max-height:min(75dvh,760px)}
.first-visit-panel p{font-size:16px;line-height:1.6}
.first-visit-panel h2{font-size:clamp(23px,3vw,31px);line-height:1.2}
.first-visit-panel textarea{font-size:16px;line-height:1.5;min-height:96px;max-width:100%;resize:vertical}
.first-visit-panel .init-note{font-size:14px;line-height:1.5}
@media(max-width:1250px){
 #conversationsView .v32-chat-layout{grid-template-columns:minmax(160px,215px) minmax(0,1fr)}
 #conversationsView .chat-context{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-height:none}
}
@media(max-width:920px){
 .page-head{flex-wrap:wrap;align-items:flex-start}
 .diary-entry{gap:10px}
 .diary-actions{flex:0 1 auto}
}
@media(max-width:800px){
 .nav-button{font-size:15px}
 #conversationsView .v32-chat-layout{grid-template-columns:minmax(0,1fr)}
 #conversationsView .conversation-list .conversation-row{font-size:13px;max-width:190px;flex:0 0 auto}
 #conversationsView .v2-chat-card{padding:10px;min-height:390px;max-width:100%}
 #conversationsView .chat-bubble,#conversationsView .chat-bubble.is-assistant{font-size:16px;line-height:1.65}
 #conversationsView .chat-compose{margin:0 4px 6px;max-width:calc(100% - 8px)}
 #conversationsView .chat-compose input{font-size:16px}
 #conversationsView .chat-heading strong{font-size:15px}
 #conversationsView .chat-note{font-size:12px}
 .chat-mini-motto{font-size:13px}
 .page-head p,.home-intro p{font-size:14px}
 .diary-entry p{font-size:15px}
 .diary-entry h3{font-size:20px}
 .diary-actions{margin-top:9px}
 .mobile-nav button small{font-size:11px;max-width:100%;overflow:hidden;text-overflow:ellipsis}
 .home-talk-composer input{font-size:16px}
 .first-visit-panel{bottom:calc(72px + env(safe-area-inset-bottom));width:calc(100vw - 20px);max-height:calc(100dvh - 150px);padding:18px}
}
@media(max-width:420px){
 .context-block{padding:14px}
 .diary-paper{padding:18px 13px}
 .diary-entry{padding-left:15px}
 .topbar-right{min-width:0}
 .topbar-right .dev-tag{display:none}
 .first-visit-panel h2{font-size:24px}
}
/* Mobile context cards belong in My Path / Diary, not beneath a squeezed chat. */
@media(max-width:800px){
 #conversationsView .chat-context{display:none!important}
 #conversationsView .v2-chat-card{height:min(72dvh,780px);min-height:440px}
}
