html.mx-cabinet[data-page="dashboard"] body #chatView #heroSection:not(.chat-active) {
  & .chat-start-sheet {
    width: min(100%,1024px); max-width: none;
    padding: 0 clamp(14px,4vw,60px) 22px;
    background: #eaf1e3 url("/entry/paper-fibre.webp");
    border: 1px solid #ccdac5; border-radius: 18px;
  }
  & .chat-start-sheet::before, & .cabinet-intro::after { content: none; }
  & .cabinet-intro {
    display: grid; grid-template-columns: minmax(0,1fr) clamp(92px,12vw,164px);
    gap: 18px; justify-items: start; align-items: center; align-content: center;
    min-height: 0; padding: 24px 0 16px; margin: 0;
  }
  & .chat-start-copy { min-width: 0; }
  & .cabinet-title { text-align: left !important; font-size: clamp(30px,3.1vw,46px) !important; }
  & .cabinet-intro .hero-subtitle { margin: 6px 0 0 !important; max-width: 48ch !important; text-align: left !important; }
  & .chat-notebook { width: 100%; height: auto; max-height: 112px; object-fit: contain; }
  & .chat-store-link {
    display: inline-block; margin: 8px 0 0; padding: 0; background: none; border: 0; color: #22523a;
    text-align: left; font: 600 13px/1.5 Inter,system-ui,sans-serif; text-decoration: underline; text-underline-offset: 3px;
  }
  & .chat-store-link[hidden] { display: none !important; }
  & .hero-input-row { width: 100% !important; max-width: none !important; }
  & .hero-input-card { border-radius: 12px !important; box-shadow: none !important; }
  & #heroCasesSection { margin-top: clamp(24px,3vw,38px) !important; }
  & #heroCasesGrid .hero-case-card-img { order: 0; display: block; object-fit: cover; }
  & #heroCasesGrid .hero-case-card-body { display: grid; align-content: start; gap: 5px; }
  & #heroCasesGrid .hero-case-card-tag { display: block; margin: 0 !important; }
  & #heroCasesGrid .hero-case-card-title { margin: 0 !important; }
  & #heroCasesGrid .hero-case-sub { margin: 0; }
  @media (max-width: 600px) {
    & .chat-start-sheet { padding: 0 10px 10px; border-radius: 14px; }
    & .cabinet-intro { gap: 10px; grid-template-columns: minmax(0,1fr) 72px; padding: 14px 4px; }
    & .cabinet-title { font-size: 28px !important; }
    & .chat-store-link { min-height: 26px; margin-top: 2px; }
  }
}
html.mx-cabinet[data-page="dashboard"] body #chatView #heroSection {
  & .thread-heading { display: none; }
  &.chat-active .thread-heading {
    display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px;
    box-sizing: border-box; width: min(100%,816px); margin: 0 auto 6px; padding: 10px 14px;
    border-bottom: 1px solid #d2dbcf; background: #f7f7f2; text-align: left;
  }
  & #threadTitle { margin: 0; min-width: 0; color: #23372a; font: 650 18px/1.3 Inter,system-ui,sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  & .thread-actions { display: flex; flex: none; gap: 6px; }
  & .thread-actions button, & .chat-message-foot button {
    color: #365740; font: 570 13px/1.3 Inter,system-ui,sans-serif;
    border: 1px solid #cbd4c8; border-radius: 7px; background: transparent; min-height: 36px; padding: 5px 10px;
  }
  & .thread-actions button:hover { background: #eaf0e6; }
  & .chat-message-foot { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
  & .msg.user .chat-message-foot { justify-content: flex-end; }
  & #messages .chat-message-foot .message-timestamp { float: none; margin: 0 !important; }
  & #messages .chat-message-foot .copy-btn-unified { margin: 0 !important; }
  & .chat-message-body { min-width: 0; overflow-wrap: anywhere; }
  & .chat-message-body > :first-child { margin-top: 0; }
  & .chat-message-body > :last-child { margin-bottom: 0; }
  @media (max-width: 600px) {
    &.chat-active .thread-heading { padding: 6px 10px; gap: 5px; }
    & #threadTitle { font-size: 15px; }
    & .thread-actions { gap: 4px; }
    & .thread-actions button { min-height: 40px; padding: 5px 7px; }
  }
}
html.mx-cabinet[data-page="dashboard"] body aside#sidebar.sidebar {
  & .sidebar-header { display: grid; gap: 12px; align-content: start; padding: 18px 18px 15px !important; }
  & .history-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
  & #historyTitle { font: 680 22px/1.2 Inter,system-ui,sans-serif !important; color:#23372a !important; margin: 0; }
  & #historyClose { border: 0; background: none; color:#48624e; padding: 6px 3px; font-size: 13px; }
  & #newChatBtn { width: 100%; min-height: 40px; justify-content: center; }
  & .history-search { display: grid; gap: 4px; color: #405545; font: 600 13px/1.4 Inter,system-ui,sans-serif; }
  & #historySearch, & .history-rename input { border: 1px solid #bfcbbb; border-radius: 7px; padding: 8px 10px; width: 100%; background: #fff; color:#23372a; min-height: 38px; font-size: 15px; }
  & #chatList { padding: 6px 12px 16px; }
  & .chat-group-label { margin: 16px 4px 6px; color: #526959; font: 600 12px/1.4 Inter,system-ui,sans-serif; }
  & .history-entry { display: grid !important; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 3px; padding: 2px 3px !important; min-height: 44px; }
  & .history-open { display: grid; min-width: 0; align-content: center; gap: 2px; padding: 6px 7px; width: 100%; text-align: left; background: none; border: 0; }
  & .history-open .chat-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px !important; }
  & .history-open .chat-item-time { padding: 0; position: static; color: #637568; font-size: 12px; }
  & .history-entry::before, & .history-entry::after { content: none !important; }
  & .chat-item-actions { position: static !important; display: flex !important; align-items: center; gap: 1px; opacity: 1 !important; pointer-events: auto !important; transform: none !important; }
  & .chat-item-actions button { display: grid; place-items: center; width: 32px; min-height: 36px; }
  & .history-rename { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 6px; }
  & .history-rename input { grid-column: 1/-1; }
  & .history-rename button { min-height: 34px; border-radius: 6px; border: 1px solid #c8d4c4; color: #234a31; background: #fff; }
  & .history-state { padding: 12px 6px; font-size: 14px; color: #54665a; }
}
