:root {
  color-scheme: light;
  --bg: #f3faf9;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --surface-soft: #eaf6f4;
  --ink: #18343b;
  --text: #28444a;
  --muted: #74888b;
  --line: rgba(216, 233, 231, 0.9);
  --primary: #1a9b8c;
  --primary-strong: #0b6f65;
  --blue-gray: #638997;
  --accent: #4f93b4;
  --success: #209273;
  --shadow: 0 16px 36px rgba(67, 116, 119, 0.09);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -10rem, rgba(128, 212, 204, 0.26), transparent 28rem),
    radial-gradient(circle at 92% 6rem, rgba(128, 180, 214, 0.18), transparent 24rem),
    linear-gradient(180deg, #fbfefd 0%, var(--bg) 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
}

.app-shell {
  width: min(100% - 24px, 460px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 8px 0 126px;
}

.app-header {
  position: sticky;
  top: 8px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(67, 116, 119, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  overflow: hidden;
  border-radius: 8px;
  background: #05051b;
  box-shadow: 0 10px 24px rgba(24, 58, 73, 0.2);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--ink);
  font-size: 15px;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.auth-chip {
  min-height: 34px;
  max-width: 108px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu {
  position: fixed;
  top: 72px;
  right: max(12px, calc((100vw - 460px) / 2 + 12px));
  z-index: 30;
  width: min(88vw, 286px);
  overflow: hidden;
  border: 1px solid rgba(216, 233, 231, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 54px rgba(42, 82, 88, 0.18);
  backdrop-filter: blur(18px);
}

.menu-section {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-bottom: 1px solid rgba(216, 233, 231, 0.72);
}

.menu-section:last-child {
  border-bottom: 0;
}

.menu-section span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.menu-section strong {
  color: var(--ink);
  font-size: 14px;
}

.menu-section button {
  min-height: 38px;
  border-radius: 12px;
  color: var(--text);
  background: transparent;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.menu-section button:hover {
  background: rgba(234, 246, 244, 0.86);
}

.danger-section button {
  color: #b64b4b;
}

.brain-switch-sheet,
.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: grid;
  align-items: end;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 52, 59, 0.18);
}

.sheet-card,
.confirm-card {
  position: relative;
  width: min(100% - 24px, 460px);
  margin: 0 auto calc(14px + env(safe-area-inset-bottom));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 60px rgba(42, 82, 88, 0.2);
}

.confirm-dialog {
  align-items: center;
  background: rgba(24, 52, 59, 0.18);
}

.confirm-card {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
}

.confirm-card p {
  margin: 0;
  color: var(--muted);
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.danger-button {
  background: #c45757 !important;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.switch-brain-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.switch-brain-list button {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(246, 252, 251, 0.94);
  font-weight: 750;
  text-align: left;
}

.switch-brain-list button.active-switch-brain {
  border-color: rgba(26, 155, 140, 0.4);
  color: var(--primary-strong);
  background: rgba(226, 245, 242, 0.98);
}

.auth-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.auth-mode-switch button {
  min-height: 32px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.auth-mode-switch button.active-auth-mode {
  color: var(--primary-strong);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(67, 116, 119, 0.08);
}

.auth-form input {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: #ffffff;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--surface-soft);
  font-size: 12px;
  white-space: nowrap;
}

.screen {
  display: none;
  scroll-margin-top: 72px;
  padding-top: 16px;
}

.screen.active-screen {
  display: block;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(23px, 6.5vw, 30px);
  line-height: 1.16;
}

.home-screen h1 {
  margin-top: 0;
  font-size: clamp(22px, 6vw, 27px);
  font-weight: 850;
}

.persona-copy {
  min-height: 34px;
  max-width: 360px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.42s ease, transform 0.42s ease;
}

.persona-copy.visible {
  opacity: 1;
  transform: translateY(0);
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.screen-head {
  margin-bottom: 10px;
}

.screen-head p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.home-ask-card,
.question-list,
.learning-card,
.progress-card,
.growth-log,
.recent-card,
.brain-manage-card,
.upload-card,
.chat-window {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-screen {
  min-height: calc(100vh - 198px);
}

.home-intro {
  display: grid;
  gap: 10px;
  min-height: calc(100vh - 306px);
  align-content: center;
  padding-bottom: 18px;
}

.home-subtitle {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.65;
}

.home-value-line {
  margin: 0 0 4px;
  color: var(--primary-strong);
  font-size: 15px;
  font-weight: 800;
}

.home-screen.talk-mode .home-subtitle {
  font-size: 19px;
}

.home-screen.talk-mode .home-value-line {
  max-width: 300px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.home-brand-line {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  color: var(--muted);
  text-align: center;
}

.home-brand-line span {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.home-brand-line small {
  font-size: 12px;
}

.industry-onboarding {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(216, 233, 231, 0.86);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.industry-onboarding h2 {
  font-size: 19px;
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.industry-grid button {
  min-height: 42px;
  border: 1px solid rgba(216, 233, 231, 0.94);
  border-radius: 14px;
  color: var(--text);
  background: rgba(246, 252, 251, 0.95);
  font-weight: 750;
}

.industry-grid button.active-industry {
  border-color: rgba(26, 155, 140, 0.42);
  color: var(--primary-strong);
  background: rgba(226, 245, 242, 0.98);
}

.custom-industry {
  display: grid;
  gap: 6px;
}

.custom-industry span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.custom-industry input {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.home-screen.needs-industry .recommend-panel,
.home-screen.needs-industry .home-ask-card {
  display: none;
}

.home-screen.active-screen.chatting {
  display: flex;
  min-height: calc(100vh - 186px);
  flex-direction: column;
  padding-top: 10px;
}

.home-screen.active-screen.chatting .home-intro {
  display: none;
}

.home-screen.active-screen.chatting .chat-more-button {
  display: inline-flex;
}

.hidden {
  display: none !important;
}

.chat-more-button {
  position: sticky;
  top: 68px;
  z-index: 9;
  display: none;
  width: fit-content;
  min-height: 32px;
  margin-left: auto;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(67, 116, 119, 0.1);
  font-size: 12px;
  font-weight: 850;
}

.chat-more-menu,
.message-action-menu {
  position: fixed;
  z-index: 44;
  display: grid;
  gap: 4px;
  min-width: 168px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 48px rgba(42, 82, 88, 0.18);
  backdrop-filter: blur(18px);
}

.chat-more-menu {
  top: 106px;
  right: max(12px, calc((100vw - 460px) / 2 + 12px));
}

.message-action-menu button,
.chat-more-menu button {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 11px;
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
}

.message-action-menu button:hover,
.chat-more-menu button:hover {
  background: var(--surface-soft);
}

.chat-more-menu button:disabled {
  color: var(--muted);
  opacity: 0.58;
}

.auto-highlight {
  display: inline;
  color: var(--ink);
  font-size: 1.04em;
  font-weight: 850;
}

.insight-card,
.experience-digest {
  display: grid;
  gap: 6px;
  margin-bottom: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(216, 233, 231, 0.92);
  border-radius: 14px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(246, 252, 251, 0.98), rgba(235, 248, 246, 0.94));
  box-shadow: 0 10px 22px rgba(67, 116, 119, 0.07);
  white-space: normal;
}

.insight-card span,
.experience-digest strong {
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 850;
}

.insight-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.experience-digest {
  align-self: stretch;
  max-width: 84%;
  margin: 4px 0 4px;
}

.experience-digest span {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.brain-bar {
  margin-bottom: 10px;
}

.brain-bar button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(67, 116, 119, 0.08);
  font-size: 13px;
  font-weight: 900;
}

.brain-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.brain-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brain-list,
.brain-form {
  display: grid;
  gap: 8px;
}

.brain-value {
  display: grid;
  gap: 8px;
  padding: 4px 10px 2px;
  text-align: center;
}

.brain-value p {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.75;
}

.brain-value span {
  color: var(--primary-strong);
  font-weight: 800;
}

.brain-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.brain-benefits div {
  min-height: 36px;
  padding: 9px 10px;
  border: 1px solid rgba(216, 233, 231, 0.72);
  border-radius: 12px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 250, 248, 0.88));
  box-shadow: 0 10px 22px rgba(67, 116, 119, 0.06);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.brain-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(246, 252, 251, 0.92);
  text-align: left;
}

.brain-card strong {
  color: var(--ink);
}

.brain-card span,
.brain-card small {
  color: var(--muted);
  line-height: 1.4;
}

.brain-card.active-brain {
  border-color: rgba(26, 155, 140, 0.36);
  background: rgba(234, 246, 244, 0.95);
}

.brain-form input,
.brain-form select,
.brain-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: #ffffff;
}

.brain-form label {
  display: grid;
  gap: 6px;
}

.brain-form label span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.brain-form textarea {
  resize: vertical;
  line-height: 1.5;
}

.brain-guide {
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--primary-strong);
  background: rgba(234, 246, 244, 0.78);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.7;
  text-align: center;
}

.brain-brand {
  display: grid;
  gap: 3px;
  padding: 8px 0 2px;
  color: var(--muted);
  text-align: center;
}

.brain-brand strong {
  color: var(--ink);
  font-size: 15px;
}

.brain-brand span {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.brain-brand small {
  font-size: 12px;
}

.home-ask-card {
  position: fixed;
  right: max(10px, calc((100vw - 460px) / 2 + 10px));
  bottom: calc(60px + env(safe-area-inset-bottom));
  left: max(10px, calc((100vw - 460px) / 2 + 10px));
  z-index: 10;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 62px;
  gap: 8px;
  align-items: end;
  padding: 8px 8px 9px;
  border: 1px solid rgba(116, 156, 154, 0.44);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(50, 94, 98, 0.22);
}

.ask-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.ask-divider::before,
.ask-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(116, 156, 154, 0.28);
}

.home-ask-card textarea {
  width: 100%;
  min-height: 56px;
  max-height: 136px;
  padding: 11px 12px;
  resize: none;
  border: 1px solid rgba(116, 156, 154, 0.46);
  border-radius: 17px;
  outline: none;
  color: var(--text);
  background: #f7fcfb;
  font-size: 15px;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.home-ask-card textarea::placeholder,
.chat-form input::placeholder {
  color: #8a9894;
}

.primary-button,
.ghost-button,
.voice-button,
.voice-reserved {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #17a798 0%, #2a8fc7 100%);
}

.ghost-button,
.voice-button,
.voice-reserved {
  color: var(--primary);
  background: rgba(234, 246, 244, 0.9);
}

.home-ask-card .voice-reserved {
  min-height: 42px;
  width: 42px;
  padding: 0;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(234, 246, 244, 0.62);
  font-size: 17px;
}

.disabled,
.primary-button:disabled,
.ghost-button:disabled,
.voice-button:disabled,
.voice-reserved:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: rgba(234, 246, 244, 0.9);
  font-size: 14px;
}

.learning-card,
.progress-card,
.growth-log,
.brain-manage-card,
.recent-card {
  margin-top: 10px;
  padding: 12px;
}

.recommend-panel {
  margin-top: 6px;
}

.recommend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.recommend-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.recommend-head button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(234, 246, 244, 0.9);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.question-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.question-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  max-width: 100%;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 22px rgba(67, 116, 119, 0.07);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.2;
}

.talk-pill {
  border-color: rgba(216, 233, 231, 0.88);
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
}

.learning-card h2,
.progress-card h2,
.growth-log h2,
.recent-card h2 {
  margin-bottom: 8px;
}

.chat-screen {
  min-height: auto;
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  max-height: none;
  overflow: auto;
  padding: 12px 2px 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  transition: min-height 0.2s ease;
}

.chat-window:not(.has-messages) {
  display: none;
}

.chat-window.has-messages {
  min-height: calc(100vh - 218px);
}

.home-chat.has-messages {
  margin-top: 0;
  padding-bottom: 98px;
  scroll-padding-bottom: 112px;
}

.chat-bottom-anchor {
  width: 1px;
  height: 1px;
  flex: 0 0 1px;
}

.message {
  max-width: 84%;
  padding: 11px 13px;
  border-radius: 16px;
  line-height: 1.64;
  white-space: pre-line;
  word-break: break-word;
  box-shadow: 0 10px 22px rgba(67, 116, 119, 0.07);
}

.message.assistant {
  align-self: flex-start;
  color: var(--text);
  background: var(--surface-strong);
}

.message.pending {
  color: var(--muted);
}

.message.user {
  align-self: flex-end;
  color: #ffffff;
  background: linear-gradient(135deg, #1a9b8c 0%, #2a8fc7 100%);
}

.message small {
  display: block;
  margin-top: 8px;
  color: inherit;
  opacity: 0.72;
}

.source-details {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
}

.source-details summary {
  cursor: pointer;
  font-weight: 750;
}

.source-details ul {
  display: grid;
  gap: 4px;
  margin: 7px 0 0;
  padding-left: 16px;
}

.source-details li {
  line-height: 1.45;
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  width: fit-content;
  margin-top: 6px;
  opacity: 0.72;
  transition: opacity 0.18s ease;
}

.feedback-actions button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
  color: #60777a;
  background: transparent;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.feedback-actions:hover,
.message:focus-within .feedback-actions {
  opacity: 1;
}

.feedback-actions button:hover {
  color: var(--ink);
  background: rgba(214, 230, 228, 0.72);
}

.feedback-actions button:active {
  transform: scale(0.94);
}

.feedback-actions button:disabled {
  cursor: default;
  opacity: 1;
}

.feedback-actions button.is-active {
  color: var(--primary-strong);
  background: rgba(226, 244, 241, 0.95);
}

.feedback-actions svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.suggestion-message {
  display: grid;
  gap: 10px;
}

.chat-suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-suggestion-list button {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: rgba(234, 246, 244, 0.92);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.2;
  text-align: left;
}

.save-experience {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 12px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--success);
  cursor: pointer;
  font-weight: 800;
}

.chat-form {
  position: fixed;
  right: max(12px, calc((100vw - 460px) / 2 + 12px));
  bottom: calc(60px + env(safe-area-inset-bottom));
  left: max(12px, calc((100vw - 460px) / 2 + 12px));
  z-index: 10;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 64px;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(67, 116, 119, 0.14);
  backdrop-filter: blur(18px);
}

.home-screen.brain-panel-open .home-ask-card {
  display: none;
}

.chat-form input {
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  outline: none;
  background: var(--surface-soft);
}

.chat-form .primary-button,
.chat-form .voice-button {
  min-height: 40px;
  padding: 0;
}

.upload-options {
  display: grid;
  gap: 8px;
}

.upload-card {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 6px 10px;
  min-height: 88px;
  padding: 12px;
  cursor: pointer;
}

.upload-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-kind {
  display: grid;
  width: 40px;
  height: 40px;
  grid-row: 1 / span 3;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #1a9b8c 0%, #5aa7cf 100%);
  font-weight: 900;
}

.upload-card strong,
.upload-card small,
.upload-card em {
  display: block;
  grid-column: 2;
}

.upload-card > strong,
.upload-card > small,
.upload-card > em {
  grid-column: 2 / 3;
}

.upload-card strong {
  color: var(--ink);
  font-size: 17px;
}

.upload-card small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

.upload-card em {
  grid-column: 2;
  color: var(--blue-gray);
  font-style: normal;
  font-size: 12px;
}

.upload-card.highlight {
  background: rgba(231, 247, 245, 0.92);
}

.learned-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.learned-grid div {
  min-height: 64px;
  padding: 8px;
  border-radius: 8px;
  background: #fbfefd;
}

.learned-grid strong,
.learned-grid span {
  display: block;
}

.learned-grid strong {
  color: var(--ink);
  font-size: 20px;
}

.learned-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.progress-row span {
  color: var(--text);
  font-weight: 700;
}

.progress-row strong {
  color: var(--primary);
  text-align: right;
}

.progress-row i {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--primary) var(--value), transparent var(--value)),
    var(--surface-soft);
}

.growth-log p,
.muted {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ghost-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.experience-feed {
  display: grid;
  gap: 10px;
}

.empty-state {
  display: grid;
  min-height: 86px;
  place-items: center;
  padding: 12px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
  line-height: 1.7;
}

.doc-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #fbfefd;
}

.doc-type {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: #6c9ead;
  font-size: 11px;
  font-weight: 900;
}

.doc-card h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 15px;
}

.doc-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.source-line {
  margin-top: 8px !important;
  font-size: 12px !important;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.tag-row span {
  min-height: 26px;
  padding: 0 9px;
  font-size: 12px;
}

.mobile-tabbar {
  position: fixed;
  right: max(0px, calc((100vw - 460px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 460px) / 2));
  z-index: 11;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 54px;
  padding: 5px 10px calc(5px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
}

.mobile-tabbar button {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

.mobile-tabbar button:hover {
  color: var(--primary);
  background: var(--surface-soft);
}

.mobile-tabbar button.active-tab {
  color: var(--primary);
  background: var(--surface-soft);
}

@media (min-width: 760px) {
  body {
    background:
      radial-gradient(circle at 16% -14rem, rgba(128, 212, 204, 0.28), transparent 34rem),
      radial-gradient(circle at 86% 8rem, rgba(128, 180, 214, 0.2), transparent 28rem),
      linear-gradient(180deg, #fbfefd 0%, #eef8f7 100%);
  }

  .app-shell {
    width: 460px;
    margin-top: 18px;
    border-radius: 8px;
  }
}
