/* DC 5: a calm, voice-first home, based on the owner's supplied reference. */
html[data-theme=dark],html[data-theme=dark] body{background:#000;color:#f4f4f4;--paper:#000;--muted:#939393;--line:#292929;--accent:#fff}
html[data-theme=dark] .topbar{background:#000;border:0}.topbar{height:92px;padding:18px 24px;position:relative}.header-left{gap:16px}.header-right{gap:12px}.private-label{display:none}.signed-in .topbar,.signed-in #workspace{margin-left:0}.topbar .brand{font-size:20px}.dc-home .topbar .brand,.dc-home #chatTitle,.dc-home #newChat{display:none}
#openHistory,.floating-voice{display:grid!important;place-items:center;width:48px;height:48px;border-radius:50%;background:linear-gradient(150deg,#272727,#1b1b1b);border:1px solid #343434;box-shadow:inset 0 1px 2px #ffffff12;color:#f6f6f6}#openHistory svg,.floating-voice svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.sidebar{width:300px;z-index:42;transform:translateX(-100%)!important;transition:transform .2s;background:#111!important;border-right:1px solid #292929!important;color:#eee}.history-open .sidebar{transform:none!important}.history-backdrop{z-index:41;background:#0009;backdrop-filter:blur(3px)}#closeHistory{display:block!important}.sidebar-top{padding-top:8px}.sidebar-footer{background:#111!important;gap:12px;border-color:#2a2a2a!important}.sidebar-utility{padding:12px;background:transparent;color:inherit;text-align:left;border-radius:12px}.sidebar .profile-trigger{margin-left:auto}.sidebar .logo-frame{background:#fff}.sidebar small{color:#888}
.dc-home #welcome{margin:0 auto;padding:0 20px;position:relative;min-height:0;display:flex;flex-direction:column;justify-content:flex-end;height:36dvh;max-height:450px}.dc-home .welcome-mark,.dc-home .welcome .eyebrow,.dc-home .welcome-note,.dc-home #welcomeVoice{display:none}.dc-greeting{font-size:22px!important;color:inherit!important;margin:0 0 12px!important;font-weight:400;line-height:1.3!important}.welcome h1{font-size:22px!important;letter-spacing:-.5px;font-weight:400!important;color:#aaa!important;margin:0!important}.follow-cards{max-width:730px;width:calc(100% - 40px);margin:30px auto 180px;position:relative}.follow-card{position:relative;display:flex;align-items:center;gap:16px;width:100%;padding:17px 18px;border-radius:25px;background:#181818;border:1px solid #303030;color:#f5f5f5;text-align:left;margin:12px 0;min-height:92px}.follow-card:first-child::after{content:'';position:absolute;left:10px;right:10px;bottom:-9px;height:20px;background:#111;border:1px solid #292929;border-top:0;border-radius:0 0 20px 20px;z-index:-1}.follow-card:nth-child(n+2){display:none}.follow-icon{flex:0 0 46px;height:46px;border:1px solid #333;border-radius:16px;display:grid;place-items:center;font-size:26px;color:#cbd6f1}.follow-copy{display:flex;flex-direction:column;gap:8px;overflow:hidden;min-width:0}.follow-copy strong{font-size:15px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.follow-copy>span{font-size:14px;color:#aaa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dc-home .attention{display:none}.conversation{max-width:780px;width:calc(100% - 36px)}
.signed-in .composer-wrap{left:50%;width:calc(100% - 36px);max-width:760px;bottom:calc(74px + env(safe-area-inset-bottom));padding:0;background:none!important}.composer{display:flex;align-items:flex-end;gap:4px;position:relative;border-radius:32px!important;padding:8px 10px!important;background:#202020!important;border:1px solid #393939!important;box-shadow:inset 0 1px 2px #ffffff12!important;min-height:56px}.composer textarea{order:2;flex:1;align-self:center;width:0;min-height:28px;height:28px;max-height:150px;padding:4px 7px!important;margin:0!important;border:0!important;resize:none;outline:none!important;background:transparent!important;font-size:17px;color:#eee;line-height:1.5}.composer textarea::placeholder{color:#8b8b8b}.composer-actions,.composer-left,.composer-right{display:contents}.composer #attach{order:1;flex:0 0 38px;font-size:34px;line-height:1;padding:0;background:transparent;color:#eee}.composer #talk{order:3;background:transparent!important;color:#fff!important;flex:0 0 38px}.composer #talk svg{width:25px;height:25px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round}.composer #submitTask{order:4;display:none;flex:0 0 38px;background:#f5f5f5;color:#111;border:0}.has-draft .composer #submitTask{display:grid}.has-draft .composer #talk{display:none}.composer #openFiles,.composer-caption,.footnote{display:none}.composer .attachment{position:absolute;bottom:calc(100% + 10px);left:0;right:0;background:#202020;border:1px solid #333;border-radius:15px;padding:12px;color:#ddd}.composer .attachment span{overflow-wrap:anywhere}.composer:has(.attachment:not([hidden])){margin-top:70px}
.bottom-nav{position:fixed;bottom:calc(8px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);height:52px;width:270px;display:flex;align-items:center;justify-content:space-between;z-index:5;background:#000;border-radius:30px}.nav-item{width:64px;height:45px;display:grid;place-items:center;border-radius:28px;background:transparent;color:#777;padding:10px}.nav-item.active{background:#202020;color:#f0f0f0}.nav-item svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.nav-item.active svg{fill:currentColor}.dc-home .bottom-nav{background:transparent}.notice{z-index:60;top:90px;background:#282828!important;color:#eee;border:1px solid #454545}
html[data-theme=dark] dialog,html[data-theme=dark] .settings-head,html[data-theme=dark] .settings-content,html[data-theme=dark] .voice-panel{background:#151515!important;color:#eee!important;border-color:#333!important}html[data-theme=dark] .settings-content h3,html[data-theme=dark] .settings-head h2,html[data-theme=dark] .voice-brand,html[data-theme=dark] label{color:#ddd}html[data-theme=dark] .quiet,html[data-theme=dark] .secondary,html[data-theme=dark] .settings-tile,html[data-theme=dark] .new-chat-button{background:#222;color:#ddd;border-color:#383838}html[data-theme=dark] input,html[data-theme=dark] textarea,html[data-theme=dark] select{background:#202020;color:#eee;border-color:#444}html[data-theme=dark] .message.user .bubble{background:#252525;color:#eee;border:0}html[data-theme=dark] .assistant-label,html[data-theme=dark] .fine{color:#aaa}html[data-theme=dark] .action-card,html[data-theme=dark] .saved-file,html[data-theme=dark] .agent-progress,html[data-theme=dark] .profile-card{background:#202020;color:#ddd;border-color:#363636}.profile-card{gap:14px}.voice-panel .voice-halo{background:#1a2431;box-shadow:none}.pairing h1{color:inherit}.pairing{padding:20px}.topbar:has(~ #login:not([hidden])) .brand{display:flex}
@media(min-width:901px){.topbar{padding-left:36px;padding-right:36px}.dc-home #welcome{height:34dvh}.dc-greeting{font-size:29px!important}.welcome h1{font-size:29px!important}.follow-card{padding:20px 22px}.follow-copy strong{font-size:17px}.follow-copy>span{font-size:15px}.bottom-nav{width:300px}.composer textarea{font-size:18px}}
@media(max-height:600px){.dc-home #welcome{height:22dvh}.follow-cards{margin-top:15px}.topbar{height:70px}.dc-greeting,.welcome h1{font-size:19px!important}}
html[data-theme=light] .follow-card,html[data-theme=light] .composer{background:#f1f1f1!important;color:#222;border-color:#ddd!important}html[data-theme=light] .composer textarea,html[data-theme=light] .composer #talk,html[data-theme=light] .composer #attach{color:#222!important}html[data-theme=light] .bottom-nav{background:#f7f8fa}html[data-theme=light] .follow-copy>span{color:#666}
.bottom-nav #openSettings{width:64px;height:45px;border:0;border-radius:28px;background:transparent;color:#777;padding:10px}.bottom-nav #openSettings:hover{background:#171717}.bottom-nav #openSettings svg{width:25px;height:25px}
#openHistory[hidden],.floating-voice[hidden],.bottom-nav[hidden]{display:none!important}

/* DC 5.2: app-sized surfaces, with one owner for each safe-area inset. */
:root{
  --safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);
  --view-height:100dvh;--view-top:0px;--keyboard-offset:0px;
  --gutter:clamp(16px,4vw,28px);--header-space:calc(76px + var(--safe-top));
  --dock-bottom:calc(80px + var(--safe-bottom));--dock-space:calc(156px + var(--safe-bottom));
}
html{scroll-padding-top:calc(var(--header-space) + 12px);scroll-padding-bottom:var(--dock-space);overscroll-behavior-y:none}
body,body.signed-in{padding:0;min-width:0;min-height:var(--view-height)}
.topbar,.signed-in .topbar{
  position:sticky;top:0;height:calc(76px + var(--safe-top));margin:0;
  padding:calc(14px + var(--safe-top)) calc(var(--gutter) + var(--safe-right)) 14px calc(var(--gutter) + var(--safe-left));
  gap:12px;border:0;z-index:10;
}
.header-left{flex:1;min-width:0;gap:12px}.header-right{flex-shrink:0;gap:8px}
.topbar .brand{flex-shrink:0}.chat-title{display:block;min-width:0;max-width:320px;font-size:14px}
#openHistory,.floating-voice,#newChat{width:44px;height:44px;min-width:44px;flex-shrink:0}
#openHistory svg,.floating-voice svg{width:23px;height:23px}
.signed-in #workspace{margin:0;min-width:0}
.dc-home #workspace{
  min-height:max(0px,calc(var(--view-height) - var(--header-space) - var(--dock-space)));
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:26px;padding:22px calc(var(--gutter) + var(--safe-right)) 22px calc(var(--gutter) + var(--safe-left));
}
.dc-home #welcome{height:auto;max-height:none;min-height:0;width:100%;padding:0;margin:0;flex:none}
.dc-greeting{font-size:clamp(21px,3vw,27px)!important;margin:0 0 12px!important}
.welcome h1{font-size:clamp(20px,2.6vw,26px)!important;line-height:1.45;letter-spacing:-.45px}
.follow-cards{width:100%;max-width:680px;margin:0;flex:none;isolation:isolate}
.follow-cards:empty{display:none}
.follow-card{min-height:82px;border-radius:22px;padding:15px;gap:13px;margin:0}
.follow-icon{flex-basis:42px;height:42px;border-radius:14px;font-size:23px}
.follow-copy strong{font-size:15px}.follow-copy>span{font-size:13px}
.dc-home #tasks:empty{display:none}
.conversation{max-width:780px;width:100%;margin:18px auto 0;padding:0 calc(var(--gutter) + var(--safe-right)) 0 calc(var(--gutter) + var(--safe-left))}
#tasks.conversation{padding-bottom:var(--dock-space)}
.signed-in .composer-wrap{
  position:fixed;left:calc(50% + (var(--safe-left) - var(--safe-right))/2);
  width:calc(100% - var(--gutter)*2 - var(--safe-left) - var(--safe-right));max-width:760px;
  bottom:calc(var(--dock-bottom) + var(--keyboard-offset));margin:0;padding:0;z-index:12;
}
.composer{min-height:58px;padding:6px!important;align-items:center;border-radius:30px!important}
.composer textarea{min-width:0;min-height:32px;max-height:min(144px,25dvh);font-size:16px;line-height:1.5;padding:4px 8px!important}
.composer #attach,.composer #talk,.composer #submitTask{flex:0 0 44px;width:44px;height:44px;min-height:44px}
.composer #attach{font-size:31px}.composer #talk svg{width:24px;height:24px}
.composer .attachment{max-height:min(180px,25dvh);overflow:auto}
.composer:has(.attachment:not([hidden])){margin-top:0}
.voice-bar{flex-wrap:wrap;gap:8px;margin-bottom:10px}.voice-bar #voiceStatus{min-width:0;flex:1;overflow-wrap:anywhere}
.bottom-nav{
  bottom:calc(8px + var(--safe-bottom));left:calc(50% + (var(--safe-left) - var(--safe-right))/2);
  width:min(340px,calc(100% - var(--safe-left) - var(--safe-right) - 32px));height:60px;
  gap:8px;padding:0 8px;border-radius:0;z-index:11;
}
.nav-item,.bottom-nav #openSettings{
  flex:1;width:auto;height:58px;min-width:0;min-height:48px;border-radius:18px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:6px;color:#949494;
}
.nav-item.active{color:#f5f5f5;background:#1d1d1d}
.nav-item svg,.bottom-nav #openSettings svg{width:22px;height:22px}
.nav-label{font-size:11px;font-weight:550;line-height:14px;letter-spacing:.1px}
.nav-item:active,#openHistory:active,.floating-voice:active{transform:scale(.96)}
.keyboard-open{--dock-bottom:10px}
.keyboard-open .bottom-nav{display:none!important}
.keyboard-open.dc-home #workspace{min-height:0;justify-content:flex-start;padding-block:16px;gap:16px}
.keyboard-open.dc-home .follow-cards{display:none}
.keyboard-open.dc-home .dc-greeting{display:none}
.compact-home.dc-home .follow-cards{display:none}
.notice:empty{display:none}
dialog::backdrop{background:#0009}
.sidebar{
  top:var(--view-top);bottom:auto;height:var(--view-height);width:min(320px,calc(100% - 32px));
  padding:calc(16px + var(--safe-top)) 16px calc(12px + var(--safe-bottom)) calc(16px + var(--safe-left));
  display:flex;flex-direction:column;overflow:hidden;overscroll-behavior:contain;
}
.sidebar-top{padding:0 0 18px;flex-shrink:0}.sidebar-top .icon-button{width:44px;height:44px}
.sidebar .new-chat-button,.sidebar-utility,.sidebar input{flex-shrink:0;min-height:44px}
.sidebar .project-picker{flex-shrink:0;margin:12px 0 2px}
.sidebar-label{margin:12px 4px 8px}
#historyList{flex:1;min-height:30px;overflow-y:auto;overscroll-behavior:contain}
.sidebar-footer{position:static;width:100%;flex-shrink:0;padding:14px 0 0;margin-top:12px;min-height:60px}
.sidebar-footer>div{min-width:0}.sidebar-footer small{font-size:11px}
.sidebar .profile-trigger{width:44px;height:44px;min-width:44px}
dialog[open],dialog.next-dialog[open],#projectDialog[open],#filesDialog[open],#controlsDialog[open],#continueDialog[open]{
  position:fixed;top:calc(var(--view-top) + var(--safe-top) + 12px);bottom:auto;
  margin:0 auto;max-height:calc(var(--view-height) - var(--safe-top) - var(--safe-bottom) - 24px);
  max-width:calc(100% - var(--safe-left) - var(--safe-right) - 24px);
  overflow-y:auto;overscroll-behavior:contain;scroll-padding-top:76px;border-radius:24px;
}
.settings-head{padding:16px 20px;gap:12px;min-height:72px}.settings-head h2{min-width:0;overflow-wrap:anywhere;font-size:20px}
.settings-head button{flex-shrink:0;min-width:44px;min-height:44px}
.settings-content{padding:0 20px 22px}.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.settings-tile{min-width:0;overflow-wrap:anywhere}.settings-tile strong{font-size:14px}
.profile-card{grid-template-columns:44px minmax(0,1fr);gap:10px 12px;padding:14px!important}
.profile-avatar{width:44px;height:44px}.profile-card h3{font-size:17px}
.next-dialog{padding:16px}.next-dialog>.settings-head{margin:-16px -16px 8px;padding-inline:20px}
.notice{top:calc(var(--view-top) + var(--header-space) + 8px);max-width:calc(100% - 32px);overflow-wrap:anywhere}
.pairing{max-width:440px;width:calc(100% - 32px);padding:20px;margin:clamp(16px,7dvh,70px) auto}
html[data-theme=light] .nav-item.active{background:#e9e9e9;color:#222}
html[data-theme=light] .welcome h1{color:#666!important}
@media(max-width:600px){
  .signed-in:not(.dc-home) .topbar .brand{display:none}.chat-title{max-width:none;flex:1}
  .settings-head{padding:14px 16px}.settings-content{padding:0 16px 20px}
  #settings{width:calc(100% - 24px)}
}
@media(max-height:500px){
  .topbar,.signed-in .topbar{height:calc(64px + var(--safe-top));padding-top:calc(10px + var(--safe-top));padding-bottom:10px}
  .dc-home #workspace{gap:16px;padding-block:12px}.dc-greeting{font-size:19px!important;margin-bottom:8px!important}
  .welcome h1{font-size:19px!important}.follow-card{min-height:66px;padding:10px 14px}
  .sidebar .project-picker,.sidebar-utility{display:none}.sidebar-top{padding-bottom:8px}
  .keyboard-open.dc-home #welcome{display:none}
}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}.nav-item:active,#openHistory:active,.floating-voice:active{transform:none}}

/* Native-style settings rows: one clear destination per row, full-width touch targets. */
.settings-grid{grid-template-columns:minmax(0,1fr);gap:0;border:1px solid #303030;border-radius:18px;overflow:hidden}
.settings-grid .settings-tile{
  display:grid;grid-template-columns:28px minmax(0,1fr) 12px;gap:4px 14px;
  align-items:center;min-height:78px;padding:16px!important;border:0;border-bottom:1px solid #303030;
  border-radius:0!important;background:#1d1d1d;box-shadow:none;
}
.settings-tile:last-child{border-bottom:0}.settings-tile strong,.settings-tile small{grid-column:2}
.settings-tile strong{grid-row:1;font-size:15px;font-weight:550}.settings-tile small{grid-row:2;line-height:1.45;font-size:12px}
.setting-icon{grid-column:1;grid-row:1/3;display:grid;place-items:center;color:#b9b9b9}
.setting-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.setting-chevron{grid-column:3;grid-row:1/3;color:#858585;font-size:23px}
html[data-theme=dark] .bottom-nav #openSettings{background:transparent;color:#949494;box-shadow:none;border:0}
html[data-theme=dark] .bottom-nav #openSettings.active{background:#1d1d1d;color:#f5f5f5}
html[data-theme=light] .settings-grid{border-color:#ddd}
html[data-theme=light] .settings-grid .settings-tile{background:#f5f5f5;border-color:#ddd}
html[data-theme=dark] .profile-card{border-color:#363636!important}
/* Live, local microphone status: never a static Listening label. */
.wake-health-chip{display:block;margin:22px auto 0;padding:11px 17px;max-width:90%;border-radius:24px;border:1px solid #454950;background:transparent;color:#aebcd1;font-size:13px;line-height:1.4;white-space:normal}.wake-health-chip[data-state=quiet],.wake-health-chip[data-state=stalled]{color:#e6bc80;border-color:#79613f}.wake-health-chip[data-state=capturing]{color:#b0ddc2;border-color:#47745c}
