:root {
  --dw-orange: #e8703a;
  --dw-orange-dark: #d4612f;
  --dw-orange-soft: #fdf0e9;
  --dw-cream: #faf7f4;
  --dw-ink: #1a1a2e;
  --dw-sub: #6b7280;
  --dw-line: #ece7e1;
  --dw-green: #1a6b4a;
  --dw-green-soft: #e8f5ee;
  --dw-gold: #c8860c;
}

.davi-symbol {
  background-color: #fff !important;
  background-image: url("./assets/davi-motion-symbol-black-orange-transparent.png") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: cover !important;
  color: transparent !important;
  font-size: 0 !important;
}

body {
  color: var(--dw-ink);
  background: #fafaf8;
}

.shell {
  max-width: 1040px;
  padding: 0 20px 64px;
}

.topbar {
  min-height: 64px;
  padding: 10px 0;
  border-color: var(--dw-line);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--dw-orange);
  font-size: 12px;
}
.brand-wordmark { width: 118px; height: auto; display: none; object-fit: contain; }

.brand strong { font-size: 15px; }
.brand > span > span { font-size: 11px; }
.top-actions .btn { min-height: 36px; padding: 8px 11px; font-size: 13px; }
.grunge-strip { display: none !important; }

.skill-launcher {
  max-width: 860px;
  margin: 70px auto 38px;
  text-align: center;
}

.skill-launcher-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.skill-launcher-brand img {
  width: min(220px, 58vw);
  height: auto;
  display: block;
  object-fit: contain;
}

.skill-launcher h1 {
  max-width: none;
  margin: 0 0 7px;
  color: #292522;
  font-size: 28px;
  line-height: 1.25;
  text-align: center;
}
#view-home .skill-launcher h1 { text-align: center !important; margin-inline: auto; }
#view-home .skill-launcher > p:not(.quick-note) { text-align: center !important; }

.skill-launcher > p:not(.quick-note) {
  margin: 0 0 20px;
  color: #8a837c;
  font-size: 13px;
}

.skill-tabs,
.skill-prompts {
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 5px;
  scrollbar-width: none;
}

.skill-tabs::-webkit-scrollbar,
.skill-prompts::-webkit-scrollbar { display: none; }

.skill-tabs button,
.skill-prompts button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid #ded9d4;
  border-radius: 10px;
  background: #fff;
  color: #5f5953;
  font-size: 12px;
  font-weight: 650;
}

.skill-tabs button.active {
  border-color: var(--dw-orange);
  background: var(--dw-orange-soft);
  color: var(--dw-orange-dark);
}

.skill-prompts {
  justify-content: flex-start;
  margin: 10px auto 10px;
}

.skill-prompts button {
  min-height: 32px;
  border: 0;
  border-radius: 9px;
  background: #f2f0ed;
  color: #5d5751;
  font-size: 11px;
}

.skill-prompts button:hover { background: #eae7e3; color: #2f2b27; }

.home-assistant-head {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 9px;
  text-align: left;
  cursor: pointer;
}
.home-assistant-head:hover { opacity: .82; }

.home-assistant-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--dw-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.home-assistant-mark.store-select-mark {
  border: 1px solid #e4ded8;
  background: #f7f5f2;
  color: #4c4640;
}
.home-assistant-mark.store-select-mark svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.home-assistant-head div,
.home-assistant-head strong,
.home-assistant-head small { display: block; }
.home-assistant-head strong { font-size: 13px; }
.home-assistant-head small { margin-top: 2px; color: #928a82; font-size: 10px; }

.home-chat {
  max-height: 360px;
  overflow-y: auto;
  margin-bottom: 10px;
  border: 1px solid #e3ded9;
  border-radius: 15px;
  background: #fbfaf8;
  padding: 14px;
  text-align: left;
}

.home-chat[hidden] { display: none; }
.home-chat-messages { display: grid; gap: 10px; }

.home-chat-message {
  width: fit-content;
  max-width: 84%;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.home-chat-message.user {
  justify-self: end;
  background: var(--dw-orange);
  color: #fff;
}

.home-chat-message.assistant {
  justify-self: start;
  background: #fff;
  color: #403a35;
  box-shadow: 0 2px 8px rgba(42, 35, 29, .05);
}

.home-chat-message.loading::after {
  content: "…";
  display: inline-block;
  overflow: hidden;
  width: 1.4em;
  vertical-align: bottom;
  animation: assistantDots 1.1s steps(4, end) infinite;
}

.home-chat-suggestions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-top: 11px;
  scrollbar-width: none;
}

.home-chat-suggestions:empty { display: none; }
.home-chat-suggestions::-webkit-scrollbar { display: none; }
.home-chat-suggestions button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #e2ddd8;
  border-radius: 9px;
  background: #fff;
  color: #655e57;
  font-size: 11px;
}

.skill-composer {
  position: relative;
  overflow: visible;
  border: 1px solid #ddd8d3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(42, 35, 29, .06);
  text-align: left;
}

.skill-composer textarea {
  min-height: 106px;
  padding: 17px 18px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: none;
  font-size: 14px;
}

.skill-composer textarea:focus { border: 0; box-shadow: none; }

.file-drop-hint {
  position: absolute;
  inset: 8px;
  z-index: 32;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  padding: 18px;
  border: 2px dashed rgba(232, 112, 58, .72);
  border-radius: 14px;
  background: rgba(255, 250, 247, .96);
  color: #4c433c;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(.985);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}

.file-drop-hint > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--dw-orange);
  color: #fff;
  font-size: 20px;
}

.file-drop-hint strong { font-size: 13px; }
.file-drop-hint small { color: #8e857d; font-size: 10px; }
.is-dragging-file > .file-drop-hint { opacity: 1; visibility: visible; transform: scale(1); }
.assistant-panel > .file-drop-hint { inset: 8px; }

.skill-composer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 10px;
}

.skill-attach,
.skill-send {
  border: 0;
  background: transparent;
}

.skill-attach {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px;
  color: #716a64;
  font-size: 12px;
}

.skill-mode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  background: var(--dw-orange-soft);
  color: var(--dw-orange-dark);
  font-size: 12px;
  font-weight: 700;
}

.skill-mode b {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(232, 112, 58, .15);
  font-size: 12px;
  line-height: 1;
}

.skill-mode:hover b { background: var(--dw-orange); color: #fff; }

.quick-attachments {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 7px 14px 6px;
  scrollbar-width: none;
}

.quick-attachments[hidden] { display: none; }
.quick-attachments::-webkit-scrollbar { display: none; }

.quick-file-chip {
  flex: 0 0 auto;
  max-width: 210px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 7px 6px 9px;
  border: 1px solid #e6e1dc;
  border-radius: 9px;
  background: #f8f6f4;
  color: #5f5953;
  font-size: 11px;
}

.quick-file-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-file-chip button {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e9e5e1;
  color: #7f7770;
  font-size: 12px;
}

.image-file-chip {
  position: relative;
  width: 58px;
  height: 58px;
  max-width: none;
  display: inline-flex;
  padding: 0;
  overflow: visible;
  border: 1px solid #ded9d4;
  border-radius: 11px;
  background: #eeeae6;
}

.image-file-chip > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.image-file-chip > button {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 2;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #77706a;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 2px 7px rgba(32, 27, 23, .16);
}

.file-list .image-file-chip { width: 72px; height: 72px; padding: 0; }
.assistant-file-chip.image-file-chip { width: 58px; height: 58px; max-width: none; padding: 0; }
.assistant-attachments { padding: 7px 7px 0; }

.skill-action-menu {
  position: absolute;
  left: 10px;
  bottom: 58px;
  z-index: 8;
  width: 248px;
  display: grid;
  gap: 3px;
  padding: 7px;
  border: 1px solid #ddd8d3;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(39, 32, 27, .16);
}

.skill-action-menu[hidden] { display: none; }

.skill-action-menu > button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #3f3934;
  text-align: left;
}

.skill-action-menu > button:hover { background: #f5f2ef; }
.action-menu-icon {
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f2efec;
  color: #4e4842;
  font-size: 15px;
}

.action-menu-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skill-action-menu button div,
.skill-action-menu button strong,
.skill-action-menu button small { display: block; }
.skill-action-menu button div { min-width: 0; flex: 1; }
.skill-action-menu button strong { font-size: 12px; }
.skill-action-menu button small { margin-top: 3px; color: #999189; font-size: 10px; }
.skill-action-menu button b { color: #aaa29a; font-size: 18px; font-weight: 400; }
.skill-action-menu .action-menu-icon-text { font-size: 10px; font-weight: 850; }

.skill-picker {
  position: absolute;
  left: 10px;
  bottom: 58px;
  z-index: 8;
  width: 284px;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid #ddd8d3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(39, 32, 27, .16);
}

.skill-picker[hidden] { display: none; }

.skill-picker-title {
  padding: 6px 9px 8px;
  color: #918980;
  font-size: 11px;
  font-weight: 700;
}

.skill-picker > button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #3f3934;
  text-align: left;
}

.skill-picker > button:hover,
.skill-picker > button.active { background: #f5f2ef; }

.skill-picker > button > span {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--dw-orange-soft);
  color: var(--dw-orange);
  font-size: 11px;
  font-weight: 800;
}

.skill-picker > button div,
.skill-picker > button strong,
.skill-picker > button small { display: block; }
.skill-picker > button div { min-width: 0; }
.skill-picker > button strong { font-size: 12px; }
.skill-picker > button small { margin-top: 3px; color: #999189; font-size: 10px; }
.home-archive-picker .skill-picker-title { display: flex; align-items: center; gap: 8px; }
.home-archive-picker .skill-picker-title button { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 8px; background: #f2f0ed; color: #746d66; font-size: 18px; }
.home-archive-picker { width: min(360px, calc(100vw - 24px)); max-height: min(520px, 72vh); overflow: hidden; }
.home-archive-list { min-width: 0; max-height: min(440px, 62vh); overflow-x: hidden; overflow-y: auto; }
.home-archive-list > button { width: 100%; max-width: 100%; min-width: 0; min-height: 54px; display: flex; align-items: center; gap: 10px; overflow: hidden; padding: 8px; border: 0; border-radius: 10px; background: transparent; color: #3f3a35; text-align: left; }
.home-archive-list > button:hover,
.home-archive-list > button.active { background: #f5f2ef; }
.home-archive-list > button > span { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--dw-orange-soft); color: var(--dw-orange-dark); font-size: 10px; font-weight: 800; }
.home-archive-list button div { min-width: 0; max-width: 100%; flex: 1 1 auto; overflow: hidden; }
.home-archive-list button strong,
.home-archive-list button small { display: block; }
.home-archive-list button strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.home-archive-list button small { margin-top: 3px; overflow: hidden; color: #999189; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.home-archive-loading { padding: 16px 9px; color: #99918a; font-size: 11px; line-height: 1.6; }
.skill-mode.archive-mode { min-width: 0; max-width: 210px; flex: 0 1 auto; background: #f2f0ed; color: #5d5650; }
.skill-mode.archive-mode span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.skill-send {
  margin-left: auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--dw-orange);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
}

.skill-send:disabled { position: relative; opacity: 1; background: #d9dadd; color: #fff; cursor: not-allowed; }
.skill-send:disabled:hover::after,
.skill-send:disabled:focus-visible::after { content: attr(data-tooltip); position: absolute; right: 0; bottom: calc(100% + 9px); z-index: 20; width: max-content; max-width: 150px; padding: 7px 10px; border-radius: 7px; background: #2f2b28; color: #fff; font-size: 11px; font-weight: 500; line-height: 1.3; white-space: nowrap; box-shadow: 0 5px 14px rgba(35, 29, 24, .18); }
.skill-send:disabled:hover::before,
.skill-send:disabled:focus-visible::before { content: ""; position: absolute; right: 14px; bottom: calc(100% + 4px); z-index: 20; border: 5px solid transparent; border-top-color: #2f2b28; }
.skill-launcher .quick-note { margin: 9px 0 0; text-align: left; }

.btn {
  border-color: var(--dw-line);
  border-radius: 10px;
  box-shadow: none;
}

.btn.primary {
  border-color: var(--dw-orange);
  background: linear-gradient(135deg, var(--dw-orange), var(--dw-orange-dark));
}

.btn.green {
  border-color: var(--dw-green);
  background: var(--dw-green);
}

#view-home .hero {
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
  margin: 18px 0 28px;
}

#view-home .hero-main {
  min-height: 370px;
  padding: 34px;
  border-color: #ffe2c9;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff3e8 0%, #fff 58%, #fff8f0 100%);
  box-shadow: 0 12px 32px rgba(80, 47, 20, .07);
}

#view-home .hero-main::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  top: -95px;
  right: -75px;
  border-radius: 50%;
  background: rgba(242, 122, 26, .1);
}

#view-home .stamp-note,
#view-home .eyebrow,
#view-home .proof-row,
#view-home .quick-note { display: none; }

#view-home h1 {
  max-width: 520px;
  margin-bottom: 10px;
  color: #2d2a26;
  font-size: clamp(29px, 4vw, 42px);
  line-height: 1.3;
}

#view-home .lead {
  margin-bottom: 18px;
  color: #6b6560;
  font-size: 14px;
  line-height: 1.7;
}

#view-home .quick-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--dw-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(27, 22, 18, .04);
}

#view-home .quick-box input {
  min-width: 0;
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

#view-home .quick-box .btn {
  min-width: 42px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
  font-size: 0;
}

#view-home .quick-box .btn::after { content: "↑"; font-size: 18px; }
#view-home .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
#view-home .hero-actions .btn.primary { min-height: 50px; font-size: 16px; }
#view-home .hero-actions .btn:not(.primary) { min-height: 34px; border: 0; background: transparent; color: var(--dw-orange); font-size: 12px; }

#view-home .video-card {
  padding: 22px;
  border-color: var(--dw-line);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(27, 22, 18, .06);
}

#view-home .video-card .eyebrow { display: inline-flex; color: var(--dw-orange); background: var(--dw-orange-soft); }
#view-home .video-cover { min-height: 160px; border: 0; border-radius: 14px; background: #2d2a26; }
#view-home .video-cover .play { color: #fff; background: var(--dw-orange); }

.section-head { margin: 28px 0 12px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head p { margin: 5px 0 0; font-size: 13px; }

#view-home .scene-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

#view-home .scene-grid::-webkit-scrollbar { display: none; }
#view-home .scene-card {
  flex: 0 0 216px;
  min-height: 210px;
  padding: 16px;
  border-color: var(--dw-line);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(27, 22, 18, .05);
  scroll-snap-align: start;
}

#view-home .scene-card.featured { border-color: rgba(232, 112, 58, .35); }
#view-home .scene-icon { border-radius: 10px; color: var(--dw-orange); background: var(--dw-orange-soft); }
#view-home .scene-card h3 { font-size: 15px; }
#view-home .scene-card p { font-size: 12px; line-height: 1.55; }
#view-home .scene-meta { font-size: 11px; }
#view-home .scene-meta b { color: var(--dw-orange); }
.mobile-skill-scenes { display: none; }
.mobile-conversation-dock { display: contents; }
#view-home .vip-card { background: #fffdf5; }
#view-home .vip-card .scene-icon { color: var(--dw-gold); background: #fff5d9; }
#view-home .vip-card .scene-meta b { color: var(--dw-gold); }
#view-home .soft-band { margin-top: 20px; border-radius: 14px; background: #fff; }

#view-check { color: var(--dw-ink); }
#view-check > .hero {
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  margin: 18px 0;
}

#view-check .hero-main,
#view-check .video-card,
#view-check .panel {
  border-color: var(--dw-line);
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(27, 22, 18, .05);
}

#view-check .hero-main { padding: 24px; background: var(--dw-cream); }
#view-check .hero-main h1 { font-size: 27px; }
#view-check .hero-main .lead { font-size: 14px; line-height: 1.7; }
#view-check .hero-main .eyebrow { color: var(--dw-orange); background: var(--dw-orange-soft); }
#view-check .hero-main .hero-actions .btn:first-child { background: var(--dw-orange); border-color: var(--dw-orange); }
#view-check .profile-import-card { padding: 22px; border: 2px dashed rgba(232,112,58,.28); background: rgba(253,240,233,.65); }
#view-check .profile-import-card .eyebrow { color: var(--dw-orange); background: #fff; }
#view-check .profile-import-card h2 { font-size: 18px; }
#view-check .profile-shot-list { display: none; }
#view-check .profile-import-card .btn.green { border-color: rgba(232,112,58,.25); background: #fff; color: var(--dw-orange); }
#view-check .steps { display: none; }
#view-check .layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
#view-check #diagnosisForm { background: transparent; box-shadow: none; padding: 0; border: 0; }
#view-check #diagnosisForm > h2 { font-size: 19px; }
#view-check .panel-sub { font-size: 13px; }
#view-check .carried-question { border: 1px solid rgba(45,156,111,.15); border-radius: 13px; background: #eefbf4; box-shadow: none; }
#view-check .input-mode-switch { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 8px; border: 0; border-radius: 0; background: transparent; }
#view-check .input-mode-switch button { min-height: 34px; padding: 4px 6px; font-size: 13px; }
#view-check .input-mode-switch button.active { color: var(--dw-orange); background: transparent; border-bottom: 2px solid var(--dw-orange); border-radius: 0; }
#view-check .guide-progress { border-radius: 12px; background: var(--dw-orange-soft); color: #82411f; }
#view-check .form-grid { grid-template-columns: 1fr; gap: 0; padding: 4px 18px; border: 1px solid #f3f0ed; border-radius: 16px; background: #fff; box-shadow: 0 2px 10px rgba(27,22,18,.035); }
#view-check .field { padding: 16px 0; border-bottom: 1px solid #f3f0ed; }
#view-check .field:last-child { border-bottom: 0; }
#view-check label { color: var(--dw-ink); font-size: 13px; }
#view-check input,
#view-check select,
#view-check textarea { border-color: transparent; border-radius: 10px; background: #f5f2ef; box-shadow: none; }
#view-check input:focus,
#view-check select:focus,
#view-check textarea:focus { border-color: rgba(232,112,58,.4); box-shadow: 0 0 0 3px rgba(232,112,58,.08); }
#view-check .message-composer { border: 0; border-radius: 12px; background: #f5f2ef; box-shadow: none; }
#view-check .message-composer textarea { background: transparent; }
#view-check .composer-bar { background: transparent; }
#view-check .attach-btn { border-color: var(--dw-line); border-radius: 9px; color: var(--dw-orange); }
#view-check .quick-actions { position: sticky; bottom: 12px; z-index: 4; padding: 10px; border: 1px solid var(--dw-line); border-radius: 14px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
#view-check .quick-actions .btn.primary { flex: 1; min-height: 48px; }

.processing-modal { padding: 16px; background: rgba(38,31,26,.5); }
.processing-dialog {
  --progress: 0;
  width: min(100%, 420px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 24px;
  border: 0;
  border-radius: 22px;
  background: #fffaf5;
  text-align: center;
  box-shadow: 0 24px 70px rgba(35,25,18,.2);
}

.processing-ring {
  width: 142px;
  height: 142px;
  display: grid;
  place-items: center;
  margin: 4px auto 18px;
  border-radius: 50%;
  background: conic-gradient(var(--dw-orange) calc(var(--progress) * 1%), #f0e6dc 0);
  position: relative;
}

.processing-ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fffaf5; }
.processing-ring-value { position: relative; z-index: 1; color: var(--dw-orange); font-size: 40px; font-weight: 760; }
.processing-ring-value small { font-size: 13px; font-weight: 500; }
.processing-mark { display: none; }
.processing-dialog h2 { font-size: 20px; }
.processing-dialog > p { min-height: 0; margin-bottom: 10px; font-size: 13px; }
.processing-track { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.processing-meta { justify-content: center; margin: 0 0 16px; }
.processing-meta strong { display: none; }
.processing-meta span { border-radius: 999px; padding: 6px 12px; color: var(--dw-orange); background: var(--dw-orange-soft); }
.processing-timeline { display: grid; gap: 0; margin: 18px 0; padding: 16px; border: 1px solid var(--dw-line); border-radius: 15px; background: #fff; text-align: left; }
.processing-step { display: grid; grid-template-columns: 24px 1fr; gap: 11px; min-height: 48px; color: #a39e98; font-size: 13px; }
.processing-step-dot { width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid #ddd5ce; border-radius: 50%; background: #fff; font-size: 11px; }
.processing-step.done { color: #2d2a26; }
.processing-step.done .processing-step-dot { border-color: #2d9c6f; background: #2d9c6f; color: #fff; }
.processing-step.active { color: var(--dw-orange); font-weight: 700; }
.processing-step.active .processing-step-dot { border-color: var(--dw-orange); box-shadow: 0 0 0 5px rgba(232,112,58,.1); }
.processing-leave-note { border-radius: 12px; background: #f4ece4; color: #6b6560; text-align: left; }
.processing-dialog.error .processing-ring { background: #fce8e5; }
.processing-dialog.error .processing-ring-value { color: #c63d32; }
.processing-dialog.error .processing-ring-value small { display: none; }

#view-report { max-width: 760px; margin: 18px auto 0; }
#view-report > .panel { padding: 0; border: 0; background: transparent; box-shadow: none; }
#view-report .result-top,
#view-report .report-section,
#view-report .report-followup,
#view-report .cta-band { border: 1px solid #f0f0ed; border-radius: 16px; background: #fff; box-shadow: 0 4px 14px rgba(17,24,39,.045); }
#view-report .result-top { padding: 20px; }
#view-report .result-top .eyebrow { color: var(--dw-green); background: var(--dw-green-soft); }
#view-report .result-top h1 { margin-bottom: 7px; font-size: 24px; }
#view-report .result-top p { margin: 0; color: var(--dw-sub); font-size: 13px; }
#view-report .result-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
#view-report .result-card { min-height: 100px; padding: 15px; border-color: #edf1ee; border-radius: 13px; box-shadow: none; }
#view-report .result-card span { font-size: 11px; }
#view-report .result-card strong { color: var(--dw-green); font-size: 14px; line-height: 1.45; }
#view-report .report-section { margin-top: 12px; padding: 20px; }
#view-report .report-section h2 { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; font-size: 17px; }
#view-report .report-section h2::before { content: ""; width: 5px; height: 20px; border-radius: 4px; background: var(--dw-green); }
#view-report .list { gap: 10px; }
#view-report .list li { border: 0; border-radius: 12px; background: #fafaf8; box-shadow: none; }
#view-report .list li b { font-size: 14px; }
#view-report .list li span { font-size: 13px; }
#view-report .actions-section .list { counter-reset: action; }
#view-report .actions-section .list li { position: relative; padding-left: 55px; }
#view-report .actions-section .list li::before { counter-increment: action; content: counter(action); position: absolute; left: 15px; top: 15px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--dw-green); font-weight: 800; }
#view-report .cta-band { margin-top: 12px; }
#view-report .report-followup { padding: 18px; border-color: #e1eee8; background: #f7fbf9; }
#view-report .followup-row input { border-color: #dfe9e4; }
.dw-assistant-fab { border: 0; border-radius: 999px; background: var(--dw-orange); box-shadow: 0 8px 22px rgba(232,112,58,.28); }
.dw-assistant-fab span { color: var(--dw-orange); }

@media (max-width: 760px) {
  .shell { padding: 0 14px 100px; }
  .topbar { min-height: 54px; }
  .brand > span > span { display: none; }
  .skill-launcher-brand { display: none; }
  .top-actions .btn { max-width: 115px; overflow: hidden; text-overflow: ellipsis; }
  #view-home .hero { display: block; margin-top: 12px; }
  #view-home .hero-main { min-height: 0; padding: 22px 18px; border-radius: 16px; }
  #view-home h1 { font-size: 24px; }
  #view-home .video-card { margin-top: 14px; }
  #view-home .video-card .hint-list { display: none; }
  #view-home .scene-card { flex-basis: 158px; min-height: 190px; padding: 14px; }
  #view-home .skill-composer { position: fixed; left: 14px; right: 14px; bottom: calc(64px + env(safe-area-inset-bottom) + 8px); z-index: 35; width: auto; margin: 0; border-radius: 16px; box-shadow: 0 8px 26px rgba(35, 29, 24, .16); }
  #view-home .skill-composer textarea { min-height: 78px; }
  #view-home .home-assistant-head { position: fixed; left: 14px; right: 14px; bottom: calc(64px + env(safe-area-inset-bottom) + 286px); z-index: 34; margin: 0; padding: 6px 2px; background: rgba(255,255,255,.96); }
  #view-home > .skill-launcher .skill-tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  #view-home > .skill-launcher .skill-tabs::-webkit-scrollbar { display: none; }
  #view-home > .skill-launcher .skill-prompts { display: flex; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  #view-home > .skill-launcher .skill-prompts::-webkit-scrollbar { display: none; }
  #view-home > .skill-launcher .skill-tabs button,
  #view-home > .skill-launcher .skill-prompts button { flex: 0 0 auto; }
  #view-home .mobile-skill-scenes { display: none !important; }
  #view-home .skill-composer { position: relative; left: auto; right: auto; bottom: auto; z-index: auto; width: 100%; margin: 0; box-shadow: 0 8px 24px rgba(42, 35, 29, .06); }
  #view-home .home-assistant-head { position: relative; left: auto; right: auto; bottom: auto; z-index: auto; padding: 0; background: transparent; }
  body.mobile-input-focus #view-home > .skill-launcher > *:not(.mobile-conversation-dock) { display: none !important; }
  body.mobile-input-focus > .shell > .topbar { display: none; }
  body.mobile-input-focus #view-home { min-height: 100dvh; padding-bottom: 0; }
  body.mobile-input-focus #view-home > .soft-band { display: none !important; }
  #view-home { padding-bottom: 330px; }
  #view-home .mobile-conversation-dock { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 35; display: block; padding: 10px 12px 12px; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; }
  #view-home .mobile-conversation-dock .skill-tabs,
  #view-home .mobile-conversation-dock .skill-prompts,
  #view-home .mobile-conversation-dock .home-assistant-head,
  #view-home .mobile-conversation-dock .skill-composer { position: relative; left: auto; right: auto; bottom: auto; z-index: auto; }
  #view-home .mobile-conversation-dock .skill-composer { width: 100%; }
  #view-home > .skill-launcher .skill-tabs,
  #view-home > .skill-launcher .skill-prompts,
  #view-home > .section-head,
  #view-home > .scene-grid { display: none; }
  .mobile-skill-scenes { position: fixed; left: 14px; right: 14px; bottom: calc(64px + env(safe-area-inset-bottom) + 166px); z-index: 34; display: block; margin: 0; padding: 4px 0; }
  .mobile-skill-scenes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .mobile-skill-scenes-grid button { min-width: 0; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; overflow: hidden; border: 0; border-radius: 13px; background: #f3f3f3; color: #45413e; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; box-shadow: 0 1px 0 rgba(35,29,24,.03); }
  .mobile-skill-scenes-grid button span { flex: 0 0 auto; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: #fff; color: #2f2b28; font-size: 10px; font-weight: 800; }
  .mobile-skill-scenes-grid button.active { background: #ecebea; color: #2f2b28; font-weight: 700; }
  .mobile-skill-scenes-grid button:nth-child(n + 4) { display: none; }
  .mobile-skill-scenes.expanded .mobile-skill-scenes-grid button:nth-child(n + 4) { display: inline-flex; }
  .mobile-skill-more { display: block; width: 100%; margin-top: 5px; padding: 3px; border: 0; background: transparent; color: #9a9189; font-size: 10px; }
  .mobile-skill-scenes.expanded .mobile-skill-more { color: var(--dw-orange); }
  #view-home > .skill-launcher .skill-tabs,
  #view-home > .skill-launcher .skill-prompts { display: flex; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  #view-home > .skill-launcher .skill-tabs::-webkit-scrollbar,
  #view-home > .skill-launcher .skill-prompts::-webkit-scrollbar { display: none; }
  #view-home > .skill-launcher .skill-tabs button,
  #view-home > .skill-launcher .skill-prompts button { flex: 0 0 auto; }
  #view-home .mobile-skill-scenes { display: none !important; }
  #view-home .skill-composer { position: relative; left: auto; right: auto; bottom: auto; z-index: auto; width: 100%; margin: 0; box-shadow: 0 8px 24px rgba(42, 35, 29, .06); }
  #view-home .home-assistant-head { position: relative; left: auto; right: auto; bottom: auto; z-index: auto; padding: 0; background: transparent; }
  #view-home .soft-band { align-items: stretch; flex-direction: column; }
  #view-check > .hero { display: flex; flex-direction: column; }
  #view-check .hero-main { padding: 18px; }
  #view-check .hero-main h1 { font-size: 23px; }
  #view-check .hero-main .lead { margin-bottom: 12px; }
  #view-check .layout { display: block; }
  #view-check .layout > aside { display: none; }
  #view-check .form-grid { padding: 0 15px; }
  #view-check .quick-actions { bottom: 8px; }
  #view-check .quick-actions #fillDemo { display: none; }
  .processing-dialog { padding: 20px 18px; }
  #view-report { margin-top: 12px; }
  #view-report .result-grid { grid-template-columns: 1fr; }
  #view-report .result-card { min-height: 72px; }
  #view-report .report-section { padding: 17px; }
  #view-report .followup-row { grid-template-columns: minmax(0, 1fr) 44px; }
  #view-report .followup-row .btn { width: 44px; min-width: 44px; padding: 0; overflow: hidden; font-size: 0; }
  #view-report .followup-row .btn::after { content: "↑"; font-size: 18px; }
}

/* Kimi-inspired desktop workspace navigation */
:root {
  --sidebar-width: 224px;
  --sidebar-compact-width: 72px;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  border-right: 1px solid #eeeae6;
  background: #f8f7f5;
  color: #302d2a;
  transition: width .22s ease;
}

.sidebar-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 8px;
}

.sidebar-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.sidebar-brand-mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(145deg, #f27a3d, #df642e);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -.4px;
}

.sidebar-brand-copy {
  min-width: 0;
  display: block;
  white-space: nowrap;
}

.sidebar-brand-copy strong,
.sidebar-brand-copy small {
  display: block;
}

.sidebar-brand-copy strong {
  font-size: 14px;
  line-height: 1.2;
}

.sidebar-brand-copy small {
  margin-top: 2px;
  color: #8a847e;
  font-size: 10px;
}

.sidebar-collapse {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8a847e;
}

.sidebar-collapse:hover,
.sidebar-collapse:focus-visible {
  background: #ece9e5;
  color: #38342f;
}

.sidebar-collapse svg,
.sidebar-item svg,
.sidebar-primary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-nav {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding-top: 6px;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-primary,
.sidebar-item {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #3f3a35;
  text-align: left;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.2;
  white-space: nowrap;
}

.sidebar-primary {
  margin-bottom: 10px;
  border: 1px solid #dedad5;
  background: #fff;
  box-shadow: 0 1px 3px rgba(45, 38, 31, .03);
}

.sidebar-primary:hover,
.sidebar-item:hover {
  background: #eeece9;
  color: #211e1b;
}

.sidebar-primary.active,
.sidebar-item.active {
  background: #ebe8e4;
  color: #171513;
  font-weight: 760;
}

.sidebar-primary span,
.sidebar-item span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-primary kbd {
  padding: 3px 5px;
  border: 0;
  border-radius: 5px;
  background: #f1efec;
  color: #aaa39b;
  font-family: inherit;
  font-size: 9px;
  font-weight: 600;
}

.sidebar-item em {
  padding: 3px 5px;
  border-radius: 5px;
  background: #fff0e7;
  color: #dd672f;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.sidebar-group {
  display: grid;
  gap: 2px;
}

.sidebar-section-label {
  margin: 17px 10px 6px;
  color: #aaa39c;
  font-size: 11px;
  font-weight: 650;
}

.sidebar-conversations { display: grid; gap: 2px; }
.sidebar-conversation {
  width: 100%;
  min-height: 36px;
  overflow: hidden;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5c5650;
  text-align: left;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-conversation:hover { background: #eeece9; color: #211e1b; }
.sidebar-conversation.active { background: #e9e6e2; color: #171513; font-weight: 720; }
.sidebar-conversations-empty { padding: 7px 10px; color: #aaa39c; font-size: 11px; }

.sidebar-foot {
  padding-top: 9px;
  border-top: 1px solid #e9e5e1;
}

.sidebar-account { position: relative; }

.sidebar-user {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.sidebar-user:hover,
.sidebar-user[aria-expanded="true"] { background: #eeece9; }

.sidebar-user > span,
.account-avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2d2a26;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.sidebar-user div,
.sidebar-user strong,
.sidebar-user small { display: block; min-width: 0; }
.sidebar-user div { flex: 1; }
.sidebar-user strong { font-size: 12px; }
.sidebar-user small { margin-top: 2px; color: #99928b; font-size: 9px; white-space: nowrap; }
.sidebar-user > svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #aaa39c;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 9px);
  width: 244px;
  overflow: hidden;
  border: 1px solid #dedad5;
  border-radius: 15px;
  background: #fff;
  padding: 7px;
  box-shadow: 0 16px 42px rgba(35, 30, 25, .14);
}

.account-menu[hidden] { display: none; }

.account-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  padding: 8px 9px 11px;
  border-bottom: 1px solid #eeeae6;
}

.account-avatar { background: var(--dw-orange-soft); color: var(--dw-orange); }
.account-menu-head div,
.account-menu-head strong,
.account-menu-head small { display: block; min-width: 0; }
.account-menu-head strong { font-size: 13px; }
.account-menu-head small { margin-top: 3px; color: #99928b; font-size: 10px; }

.account-menu-item {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3f3a35;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
}

.account-menu-item:hover { background: #f4f2ef; }
.account-menu-item span { flex: 1; }
.account-menu-item b { color: #aaa39c; font-weight: 500; }
.account-menu-item em {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--dw-orange);
  color: #fff;
  font-size: 10px;
  font-style: normal;
}

.account-menu-item.account-logout {
  margin-top: 5px;
  border-top: 1px solid #eeeae6;
  border-radius: 0 0 8px 8px;
  color: #dc4b41;
}

body[data-view="chat"] > .shell {
  max-width: none;
  height: 100vh;
  padding: 0;
  overflow: hidden;
}
body[data-view="chat"] > .shell .topbar { display: none; }
body[data-view="chat"] > .shell main,
#view-chat.active { height: 100%; }

.chat-page { position: relative; height: 100%; min-height: 0; display: flex; flex-direction: column; background: #fff; }
.chat-page-head {
  flex: 0 0 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid #f0edea;
  background: rgba(255, 255, 255, .94);
}
.chat-page-title { min-width: 0; flex: 1; }
.chat-page-title strong,
.chat-page-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-page-title strong { color: #2e2a27; font-size: 14px; }
.chat-page-title small { margin-top: 3px; color: #99918a; font-size: 10px; }
.chat-new-button,
.chat-history-toggle {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #e3dfdb;
  border-radius: 9px;
  background: #fff;
  color: #5e5751;
  font-size: 11px;
  font-weight: 700;
}
.chat-new-button::before { content: "＋ "; }
.chat-history-toggle { display: none; width: 36px; padding: 7px; }
.chat-history-toggle svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.chat-thread {
  min-height: 0;
  flex: 1;
  width: min(100%, 880px);
  overflow-y: auto;
  margin: 0 auto;
  padding: 46px 30px 28px;
  scroll-behavior: smooth;
}
.chat-welcome { margin: 10vh auto 26px; text-align: center; }
.chat-welcome[hidden] { display: none; }
.chat-welcome > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--dw-orange);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.chat-welcome h1 { margin: 0 0 7px; color: #292522; font-size: 22px; }
.chat-welcome p { margin: 0; color: #918a83; font-size: 12px; }
.chat-messages { display: grid; gap: 24px; }
.chat-message {
  position: relative;
  width: fit-content;
  max-width: 82%;
  color: #35302c;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.chat-message.user { justify-self: end; padding: 11px 15px; border-radius: 15px 15px 4px 15px; background: #f1efed; }
.chat-message.assistant { justify-self: start; width: 100%; max-width: 100%; padding: 3px 0 3px 46px; }
.chat-message.assistant::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff url("./assets/davi-motion-symbol-black-orange-transparent.png") center / cover no-repeat;
}
.chat-message.loading { color: #99918a; }
.chat-message.loading::after { content: "…"; display: inline-block; animation: assistantDots 1.1s steps(4, end) infinite; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0 46px; }
.chat-suggestions:empty { display: none; }
.chat-suggestions button { padding: 8px 11px; border: 1px solid #e5e0dc; border-radius: 10px; background: #fff; color: #655e57; font-size: 11px; }
.chat-suggestions button:hover { border-color: #d5cec8; background: #faf9f7; }
.chat-composer {
  position: relative;
  z-index: 8;
  flex: 0 0 auto;
  width: min(calc(100% - 48px), 768px);
  margin: 0 auto 24px;
  overflow: visible;
  border: 1px solid #ddd8d3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(43, 36, 30, .09);
}
.chat-composer textarea { width: 100%; min-height: 68px; resize: none; padding: 15px 17px 5px; border: 0; outline: 0; background: transparent; color: #2f2a26; font: inherit; font-size: 14px; line-height: 1.55; }
.chat-composer-bar { display: flex; align-items: center; gap: 8px; padding: 7px 10px 10px; }
.chat-attach,
.chat-send { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 11px; font-size: 18px; }
.chat-attach { background: #f2f0ed; color: #5e5751; }
.chat-attach[aria-expanded="true"] { background: #e8e4df; color: #2f2a26; transform: rotate(45deg); }
.chat-send { margin-left: auto; background: var(--dw-orange); color: #fff; font-weight: 800; }
.chat-send:disabled { position: relative; opacity: 1; background: #d9dadd; color: #fff; cursor: not-allowed; }
.chat-send:disabled:hover::after,
.chat-send:disabled:focus-visible::after { content: attr(data-tooltip); position: absolute; right: 0; bottom: calc(100% + 9px); z-index: 20; width: max-content; max-width: 150px; padding: 7px 10px; border-radius: 7px; background: #2f2b28; color: #fff; font-size: 11px; font-weight: 500; line-height: 1.3; white-space: nowrap; box-shadow: 0 5px 14px rgba(35, 29, 24, .18); }
.chat-send:disabled:hover::before,
.chat-send:disabled:focus-visible::before { content: ""; position: absolute; right: 13px; bottom: calc(100% + 4px); z-index: 20; border: 5px solid transparent; border-top-color: #2f2b28; }
.chat-skill-badge { padding: 7px 10px; border-radius: 9px; background: var(--dw-orange-soft); color: var(--dw-orange-dark); font-size: 10px; font-weight: 750; }
.chat-archive-badge { min-width: 0; max-width: 220px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 8px 7px 10px; border: 0; border-radius: 9px; background: #f2f0ed; color: #5d5650; font-size: 10px; font-weight: 750; }
.chat-archive-badge[hidden] { display: none; }
.chat-archive-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-archive-badge b { flex: 0 0 auto; color: #9b938c; font-size: 12px; }
.chat-composer-hint { flex: 1; color: #aaa39c; text-align: right; font-size: 9px; }
.chat-attachments { display: flex; gap: 7px; overflow-x: auto; padding: 10px 12px 0; }
.chat-attachments[hidden] { display: none; }
.chat-file-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 6px 8px; border-radius: 8px; background: #f3f1ee; color: #5b554f; font-size: 10px; }
.chat-file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-chip button { border: 0; background: transparent; color: #948c84; }
.chat-file-chip.image-file-chip { width: 58px; height: 58px; max-width: none; padding: 0; border: 1px solid #ded9d4; border-radius: 11px; background: #eeeae6; }
.chat-file-chip.image-file-chip > button { border: 2px solid #fff; background: #77706a; color: #fff; }
.chat-add-menu,
.chat-option-menu {
  position: absolute;
  bottom: 52px;
  left: 10px;
  z-index: 12;
  width: min(310px, calc(100vw - 48px));
  max-height: min(420px, 62vh);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #ded9d4;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(37, 31, 26, .16);
}
.chat-add-menu[hidden],
.chat-option-menu[hidden] { display: none; }
.chat-add-menu > button,
.chat-option-menu > button,
.chat-archive-menu #chatArchiveList > button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #3f3a35;
  text-align: left;
}
.chat-add-menu > button:hover,
.chat-option-menu > button:hover,
.chat-option-menu > button.active,
.chat-archive-menu #chatArchiveList > button:hover,
.chat-archive-menu #chatArchiveList > button.active { background: #f4f1ee; }
.chat-add-menu > button > span,
.chat-option-menu > button > span,
.chat-archive-menu #chatArchiveList > button > span {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--dw-orange-soft);
  color: var(--dw-orange-dark);
  font-size: 10px;
  font-weight: 800;
}
.chat-add-menu button div,
.chat-option-menu button div,
.chat-archive-menu button div { min-width: 0; flex: 1; }
.chat-add-menu button strong,
.chat-add-menu button small,
.chat-option-menu button strong,
.chat-option-menu button small,
.chat-archive-menu button strong,
.chat-archive-menu button small { display: block; }
.chat-add-menu button strong,
.chat-option-menu button strong,
.chat-archive-menu button strong { font-size: 12px; }
.chat-add-menu button small,
.chat-option-menu button small,
.chat-archive-menu button small { margin-top: 3px; overflow: hidden; color: #99918a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.chat-add-menu button b { color: #aaa29a; font-size: 17px; font-weight: 400; }
.chat-option-menu-head { position: sticky; top: -8px; z-index: 2; display: flex; align-items: center; gap: 7px; margin: -1px -1px 4px; padding: 7px 5px 8px; border-bottom: 1px solid #eeeae6; background: #fff; }
.chat-option-menu-head button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: #f2f0ed; color: #746d66; font-size: 19px; }
.chat-option-menu-head strong { font-size: 12px; }
.chat-menu-loading { padding: 16px 9px; color: #99918a; font-size: 11px; }
.chat-history-drawer,
.chat-history-backdrop { display: none; }

.top-login-btn { display: none; }

.mobile-tabbar { display: none; }
#reportAuthModal { z-index: 60; }

.auth-dialog {
  width: min(100%, 520px);
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(32, 27, 22, .22);
}

.auth-dialog .advisor-close {
  top: 13px;
  right: 13px;
  z-index: 2;
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .78);
  color: #6e5749;
}

.auth-hero {
  min-height: 116px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 25px 28px;
  background:
    radial-gradient(circle at 82% 20%, rgba(255,255,255,.72) 0 12px, transparent 13px),
    radial-gradient(circle at 72% 68%, rgba(255,255,255,.28) 0 28px, transparent 29px),
    linear-gradient(135deg, #f28a4a, #e36432);
  color: #fff;
}

.auth-hero-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  color: var(--dw-orange);
  font-size: 13px;
  font-weight: 900;
}

.auth-hero div,
.auth-hero strong,
.auth-hero small { display: block; }
.auth-hero strong { font-size: 19px; }
.auth-hero small { margin-top: 5px; color: rgba(255,255,255,.82); font-size: 12px; }

.auth-content { padding: 26px 30px 28px; }
.auth-dialog .auth-content h2 { margin: 0 0 7px; font-size: 20px; }
.auth-dialog .auth-lead { margin-bottom: 20px; font-size: 13px; }
.auth-dialog .auth-form { gap: 13px; }
.auth-dialog .field { display: grid; gap: 7px; }
.auth-dialog .field label { color: #4e4842; font-size: 12px; font-weight: 700; }
.auth-dialog input { min-height: 46px; border-color: #e5e0db; background: #fbfaf9; }
.auth-dialog .sms-row .btn { min-height: 46px; color: var(--dw-orange); }
.auth-dialog .auth-submit { min-height: 48px; border-color: var(--dw-orange); background: var(--dw-orange); }
.auth-dialog .consent-row input { min-height: 18px; accent-color: var(--dw-orange); }

body > .shell {
  width: calc(100% - var(--sidebar-width));
  max-width: 1240px;
  margin-left: var(--sidebar-width);
  margin-right: auto;
  transition: width .22s ease, margin-left .22s ease;
}

body > .shell .topbar .brand { display: none; }
body > .shell .topbar { justify-content: flex-end; }

body.sidebar-collapsed .app-sidebar { width: var(--sidebar-compact-width); }
body.sidebar-collapsed > .shell {
  width: calc(100% - var(--sidebar-compact-width));
  margin-left: var(--sidebar-compact-width);
}

body.sidebar-collapsed .sidebar-brand-copy,
body.sidebar-collapsed .sidebar-primary span,
body.sidebar-collapsed .sidebar-primary kbd,
body.sidebar-collapsed .sidebar-item span,
body.sidebar-collapsed .sidebar-item em,
body.sidebar-collapsed .sidebar-section-label,
body.sidebar-collapsed .sidebar-user div {
  display: none;
}
body.sidebar-collapsed .sidebar-conversations { display: none; }

body.sidebar-collapsed .sidebar-head {
  flex-direction: column;
  min-height: 76px;
  justify-content: flex-start;
}

body.sidebar-collapsed .sidebar-collapse svg { transform: rotate(180deg); }
body.sidebar-collapsed .sidebar-primary,
body.sidebar-collapsed .sidebar-item { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .sidebar-user { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .sidebar-user > svg { display: none; }
body.sidebar-collapsed .account-menu { left: 54px; bottom: 0; }

@media (max-width: 900px) and (min-width: 721px) {
  body:not(.sidebar-collapsed) .app-sidebar { width: var(--sidebar-compact-width); }
  body:not(.sidebar-collapsed) > .shell {
    width: calc(100% - var(--sidebar-compact-width));
    margin-left: var(--sidebar-compact-width);
  }
  body:not(.sidebar-collapsed) .sidebar-brand-copy,
  body:not(.sidebar-collapsed) .sidebar-primary span,
  body:not(.sidebar-collapsed) .sidebar-primary kbd,
  body:not(.sidebar-collapsed) .sidebar-item span,
  body:not(.sidebar-collapsed) .sidebar-item em,
  body:not(.sidebar-collapsed) .sidebar-section-label,
  body:not(.sidebar-collapsed) .sidebar-user div { display: none; }
  body:not(.sidebar-collapsed) .sidebar-conversations { display: none; }
  body:not(.sidebar-collapsed) .sidebar-head { flex-direction: column; min-height: 76px; justify-content: flex-start; }
  body:not(.sidebar-collapsed) .sidebar-primary,
  body:not(.sidebar-collapsed) .sidebar-item,
  body:not(.sidebar-collapsed) .sidebar-user { justify-content: center; padding-inline: 0; }
  body:not(.sidebar-collapsed) .sidebar-user > svg { display: none; }
  body:not(.sidebar-collapsed) .account-menu { left: 54px; bottom: 0; }
}

@media (max-width: 720px) {
  .app-sidebar { display: none; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  body > .shell,
  body.sidebar-collapsed > .shell {
    width: auto;
    margin: 0 auto;
  }
  body > .shell .topbar .brand { display: inline-flex; }
  body > .shell .topbar { justify-content: space-between; }
  .top-login-btn { display: none; }
  .topbar .brand-mark { display: none !important; }
  .brand-wordmark { display: block; width: 112px; }
  body[data-view="home"] .mobile-cta,
  .dw-assistant-fab { display: none !important; }

  body[data-view="chat"] { padding-bottom: 0; }
  body[data-view="chat"] .mobile-tabbar { display: none; }
  body[data-view="chat"] > .shell { height: 100dvh; }
  .chat-page-head { flex-basis: 56px; padding: 0 12px; }
  .chat-history-toggle { display: grid; place-items: center; }
  .chat-new-button { width: auto; min-width: 78px; overflow: visible; padding: 8px 11px; font-size: 12px; white-space: nowrap; }
  .chat-new-button::before { content: "+  "; font-size: 18px; font-weight: 500; vertical-align: -1px; }
  .chat-thread { padding: 28px 16px 20px; }
  .chat-welcome { margin-top: 12vh; }
  .chat-message { max-width: 88%; font-size: 13px; }
  .chat-message.assistant { max-width: 100%; padding-left: 40px; }
  .chat-message.assistant::before { width: 29px; height: 29px; border-radius: 9px; }
  .chat-suggestions { flex-wrap: nowrap; overflow-x: auto; margin-left: 40px; padding-bottom: 2px; }
  .chat-suggestions button { flex: 0 0 auto; max-width: 240px; }
  .chat-composer { width: calc(100% - 24px); margin-bottom: calc(10px + env(safe-area-inset-bottom)); border-radius: 16px; }
  .chat-composer textarea { min-height: 62px; padding: 13px 14px 4px; font-size: 13px; }
  .chat-composer-hint { display: none; }
  .chat-history-backdrop { position: fixed; inset: 0; z-index: 69; display: block; background: rgba(32, 27, 23, .25); }
  .chat-history-backdrop[hidden] { display: none; }
  .chat-history-drawer { position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(82vw, 310px); display: block; padding: 14px 10px; background: #f8f7f5; box-shadow: 16px 0 38px rgba(35, 30, 25, .14); }
  .chat-history-drawer[hidden] { display: none; }
  .chat-history-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 5px 12px; }
  .chat-history-drawer-head strong { font-size: 14px; }
  .chat-history-drawer-head button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #ece9e5; color: #716a63; font-size: 18px; }
  #mobileChatHistory { display: grid; gap: 3px; overflow-y: auto; }

  .mobile-tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 44;
    min-height: calc(64px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    padding: 7px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid #ebe6e1;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -8px 26px rgba(36, 30, 25, .07);
    backdrop-filter: blur(16px);
  }

  .mobile-tab {
    min-width: 0;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 3px 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #918a83;
    font-size: 10px;
    font-weight: 650;
  }

  .mobile-tab svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-tab.active,
  .mobile-tab.logged-in { color: var(--dw-orange); }

  .mobile-tab-assistant { position: relative; color: #6f6861; }
  .mobile-dw-mark {
    width: 34px;
    height: 26px;
    display: grid;
    place-items: center;
    margin-top: -13px;
    border: 3px solid #fff;
    border-radius: 9px;
    background: var(--dw-orange);
    color: #fff;
    box-shadow: 0 5px 14px rgba(232, 112, 58, .22);
    font-size: 9px;
    font-weight: 900;
  }

  .skill-launcher {
    margin: 28px 0 26px;
    text-align: left;
  }

  .skill-launcher-brand { justify-content: flex-start; margin-bottom: 14px; }
  .skill-launcher-brand img { width: min(190px, 66vw); }
  .skill-launcher h1 { font-size: 22px; }
  .skill-launcher > p:not(.quick-note) { margin-bottom: 15px; line-height: 1.55; }
  .skill-tabs,
  .skill-prompts { justify-content: flex-start; margin-inline: -2px; }
  .skill-tabs button { padding-inline: 11px; }
  .skill-prompts { margin-top: 7px; }
  .skill-composer { border-radius: 15px; }
  .skill-composer textarea { min-height: 92px; padding: 14px 14px 6px; font-size: 13px; }
  .skill-composer-bar { padding: 6px 8px 8px; }
  .skill-attach span { display: none; }
  .skill-attach { width: 36px; height: 36px; justify-content: center; padding: 0; font-size: 24px; line-height: 1; }
  .skill-mode { min-width: 0; max-width: 116px; }
  #selectedSkillChip { max-width: 150px; }
  .skill-mode > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .skill-mode b { flex: 0 0 auto; }
  .skill-mode.archive-mode { max-width: 126px; }
  .skill-send { width: 36px; height: 36px; border-radius: 11px; }
  .skill-composer textarea:focus { border: 0 !important; border-color: transparent !important; outline: 0 !important; box-shadow: none !important; }

  .auth-dialog { width: min(100%, 480px); border-radius: 17px; }
  .auth-hero { min-height: 96px; padding: 20px; }
  .auth-hero-mark { width: 40px; height: 40px; border-radius: 11px; }
  .auth-hero strong { font-size: 16px; }
  .auth-content { padding: 22px 18px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-sidebar,
  body > .shell { transition: none; }
}
