:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --paper: #fffdf8;
  --card: #ffffff;
  --ink: #202522;
  --muted: #766f66;
  --line: #e8e0d4;
  --main: #285146;
  --main-soft: #f1f5f1;
  --gold: #ad8d55;
  --shadow: 0 4px 14px rgba(38, 55, 47, 0.06);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  border: 0;
  cursor: pointer;
}

.phone-page {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  overflow-x: hidden;
}

main {
  padding: 13px;
}

.has-bottom-nav main {
  padding-bottom: 92px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 12px;
  padding: calc(9px + env(safe-area-inset-top)) 14px 9px;
  background: rgba(247, 244, 238, 0.96);
  border-bottom: 1px solid rgba(232, 224, 212, 0.86);
  backdrop-filter: blur(14px);
}

.header-logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(173, 141, 85, 0.45);
  border-radius: 50%;
  background: var(--paper);
  color: var(--main);
  font-size: 26px;
  box-shadow: 0 5px 14px rgba(40, 81, 70, 0.12);
}

.header-logo img,
.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-title strong {
  display: block;
  color: var(--main);
  font-size: 18px;
  line-height: 1.2;
}

.header-title span {
  display: inline-flex;
  margin-top: 3px;
  border: 1px solid rgba(173, 141, 85, 0.32);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--gold);
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.35;
}

.logo-wrap {
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper);
}

.logo-wrap.small {
  width: 40px;
  height: 40px;
  margin: 0 0 8px;
}

.reception-hero,
.room-detail-head,
.notice-card,
.profile-form,
.consult-head,
.consult-note,
.report-generate-card,
.report-cover,
.report-block,
.chart-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.reception-hero {
  min-height: 190px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 20px 18px;
  background: linear-gradient(135deg, #fffdf8, #f5efe4);
}

.brand-panel {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(173, 141, 85, 0.28);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.78);
  padding: 10px;
}

.brand-panel.compact {
  grid-template-columns: 52px minmax(0, 1fr);
  margin-bottom: 10px;
  padding: 9px;
}

.brand-panel img {
  width: 66px;
  height: 66px;
  border: 1px solid rgba(173, 141, 85, 0.42);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 5px 14px rgba(40, 81, 70, 0.12);
}

.brand-panel.compact img {
  width: 52px;
  height: 52px;
}

.brand-panel strong {
  display: block;
  color: var(--main);
  font-size: 22px;
  line-height: 1.18;
}

.brand-panel.compact strong {
  font-size: 20px;
}

.brand-panel span {
  display: inline-flex;
  margin-top: 5px;
  border: 1px solid rgba(173, 141, 85, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--gold);
  padding: 3px 9px;
  font-size: 12px;
  line-height: 1.35;
}

.reception-hero h1,
.room-detail-head h1,
.page-title h1,
.consult-head h1,
.report-cover h1 {
  margin: 0;
  color: var(--main);
  font-size: 23px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

.reception-hero p,
.hall-brief p,
.room-detail-head p,
.page-title p,
.mode-entry p,
.notice-card p,
.consult-head p,
.consult-note p,
.report-generate-card span,
.report-cover span,
.disclaimer,
.small-note,
.mine-profile p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.reception-hero p {
  margin: 0;
}

.primary-button,
.soft-button {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 700;
}

.primary-button {
  width: 100%;
  margin-top: 16px;
  color: #fffdf8;
  background: var(--main);
}

.soft-button {
  color: var(--main);
  background: var(--main-soft);
}

.text-link {
  min-height: 36px;
  padding: 0;
  color: var(--main);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.full {
  width: 100%;
}

.section {
  margin-top: 18px;
}

.section-title {
  margin-bottom: 10px;
}

.section-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.section-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.today-list,
.room-list,
.mode-list,
.record-list,
.mine-list,
.admin-list {
  display: grid;
  gap: 8px;
}

.hall-brief {
  margin: 2px 0 12px;
}

.hall-brief p {
  margin: 0 0 9px;
}

.category-strip,
.tag-row,
.quick-row,
.record-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar,
.tag-row::-webkit-scrollbar,
.quick-row::-webkit-scrollbar,
.record-tabs::-webkit-scrollbar {
  display: none;
}

.category-strip button,
.tag,
.record-tabs button,
.quick-row button {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--main);
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid rgba(232, 224, 212, 0.88);
  padding: 0 10px;
  font-size: 12px;
}

.category-strip button {
  min-height: 32px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.7);
}

.tag.testing {
  color: #8a672d;
  background: #f7efe0;
}

.tag-row {
  margin-top: 8px;
}

.room-card {
  min-height: 70px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.directory-room {
  min-height: 76px;
  grid-template-columns: 42px minmax(0, 1fr) 14px;
  gap: 11px;
  padding: 7px 12px;
  border-color: rgba(232, 224, 212, 0.9);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 2px 10px rgba(38, 55, 47, 0.035);
}

.room-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(173, 141, 85, 0.38);
  border-radius: 12px;
  color: #f8ead0;
  background: linear-gradient(145deg, var(--main), #173a31);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(40, 81, 70, 0.14);
}

.directory-icon {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(173, 141, 85, 0.46);
  border-radius: 13px;
  background: linear-gradient(145deg, var(--main), #173a31);
}

.directory-icon svg {
  width: 22px;
  height: 22px;
  color: #f8ead0;
}

.directory-icon svg * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directory-icon span {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 224, 212, 0.9);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.98);
  color: var(--gold);
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
}

.room-main {
  min-width: 0;
}

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

.room-card h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-room h3 {
  font-size: 15px;
  line-height: 1.15;
}

.room-card p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-room p {
  margin-top: 3px;
}

.mode-mini {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 4px;
}

.directory-room .mode-mini {
  margin-top: 5px;
}

.mode-mini span {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--main-soft);
  color: var(--main);
  padding: 0 7px;
  font-size: 10px;
}

.directory-room .mode-mini span {
  background: rgba(241, 245, 241, 0.95);
  color: var(--main);
}

.room-arrow {
  color: var(--gold);
  font-size: 22px;
  line-height: 1;
  text-align: right;
}

.room-detail-head,
.page-title,
.notice-card,
.consult-head,
.report-generate-card {
  padding: 14px;
}

.advisor-detail-mark {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.page-title {
  padding: 0 2px;
  margin-bottom: 12px;
}

.room-detail-head span,
.mode-entry span,
.report-generate-card p,
.report-cover p,
.record-card span {
  color: var(--gold);
  font-size: 12px;
}

.mode-entry {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 13px 14px;
}

.mode-entry h2,
.notice-card h2,
.report-generate-card h2,
.report-block h2,
.chart-block h2 {
  margin: 5px 0;
  color: var(--main);
  font-size: 18px;
}

.profile-form {
  display: grid;
  gap: 10px;
  padding: 13px;
}

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

.profile-form label span {
  color: var(--muted);
  font-size: 13px;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 12px;
}

.profile-form select {
  appearance: none;
}

.profile-form textarea {
  min-height: 78px;
  resize: vertical;
  line-height: 1.55;
}

.profile-form em {
  margin-left: 6px;
  color: var(--gold);
  font-style: normal;
  font-size: 11px;
}

.form-message {
  min-height: 18px;
  margin: 0;
  color: #9b5f41;
  font-size: 12px;
  line-height: 1.5;
}

.archive-summary {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(232, 224, 212, 0.86);
  border-radius: 12px;
  background: var(--paper);
}

.archive-summary p {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.archive-summary span {
  color: #9d9488;
}

.archive-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-block {
  margin-top: 10px;
  padding: 14px;
}

.chart-transition {
  margin-top: 18px;
  padding: 26px 18px 20px;
  border: 1px solid rgba(232, 224, 212, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 26px rgba(38, 55, 47, 0.06);
}

.chart-transition > span {
  display: block;
  color: #9d9488;
  font-size: 12px;
  font-weight: 700;
}

.chart-transition h1 {
  margin: 6px 0 6px;
  color: var(--ink);
  font-size: 27px;
  letter-spacing: 0;
}

.chart-transition > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.chart-lite-summary {
  display: grid;
  gap: 9px;
  margin: 18px 0 20px;
}

.chart-lite-summary p {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.chart-lite-summary span {
  color: #9d9488;
}

.chart-lite-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtle-link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 12px;
}

.subtle-link-row button {
  min-height: 28px;
  padding: 0;
  color: #8c867e;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}

.chart-block h3 {
  margin: 12px 0 7px;
  color: var(--main);
  font-size: 15px;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}

.pillar-grid article {
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.pillar-grid span {
  color: var(--muted);
  font-size: 11px;
}

.pillar-grid strong {
  color: var(--main);
  font-size: 18px;
}

.cycle-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.chart-actions,
.output-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.inline-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.upload-mock {
  min-height: 40px;
  border-radius: 12px;
  color: var(--main);
  background: var(--main-soft);
}

.mock-upload-box {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px dashed rgba(173, 141, 85, 0.42);
  border-radius: 12px;
  background: var(--paper);
  padding: 12px;
}

.mock-upload-box strong {
  color: var(--main);
  font-size: 14px;
}

.mock-upload-box small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.upload-field-box {
  gap: 8px;
}

.upload-file-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(173, 141, 85, 0.32);
  border-radius: 10px;
  background: var(--main-soft);
  color: var(--ink);
  padding: 7px;
  font-size: 12px;
}

.upload-file-input::file-selector-button {
  margin-right: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--main);
  color: #fff;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
}

.chart-details {
  margin-top: 10px;
}

.chart-details summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  color: var(--main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.option-note {
  border-radius: 12px;
  background: var(--paper);
  padding: 10px 12px;
}

.option-note p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.small-note {
  margin: 10px 2px 0;
  font-size: 12px;
}

.consult-head span {
  display: inline-block;
  margin: 7px 0;
  color: var(--gold);
  font-size: 12px;
}

.consult-note {
  margin-top: 9px;
  padding: 11px 12px;
  background: var(--paper);
}

.quick-row {
  margin: 10px -2px 8px;
  padding: 0 2px 4px;
  scroll-padding: 2px;
}

.practitioner-output-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: 10px -2px 8px;
  padding: 0 2px 4px;
  scroll-padding: 2px;
  scrollbar-width: none;
}

.practitioner-output-tabs::-webkit-scrollbar {
  display: none;
}

.practitioner-output-tabs button {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid rgba(173, 141, 85, 0.26);
  border-radius: 999px;
  color: var(--main);
  background: rgba(255, 253, 248, 0.86);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
}

.message-list {
  display: grid;
  gap: 10px;
  min-height: 210px;
  align-content: end;
}

.chat-start-list {
  min-height: auto;
  margin-bottom: 10px;
  align-content: start;
}

.message {
  max-width: 90%;
  border-radius: 18px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.68;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.message.user {
  justify-self: end;
  color: var(--main);
  background: var(--main-soft);
}

.message.advisor {
  justify-self: start;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(38, 55, 47, 0.055);
}

.message.advisor.waiting {
  color: var(--muted);
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(173, 141, 85, 0.18);
}

.message.advisor.structured {
  width: 100%;
  max-width: 100%;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.advisor-content-card {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(232, 224, 212, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  padding: 12px;
  box-shadow: 0 10px 24px rgba(38, 55, 47, 0.055);
}

.advisor-content-head {
  display: grid;
  gap: 3px;
}

.advisor-content-head span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.advisor-content-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.advisor-summary-block,
.advisor-message-section {
  border-radius: 13px;
  background: rgba(250, 247, 241, 0.72);
  padding: 9px 10px;
}

.advisor-summary-block h3,
.advisor-message-section h3 {
  margin: 0 0 7px;
  color: var(--main);
  font-size: 13px;
  line-height: 1.35;
}

.advisor-summary-block ul,
.advisor-message-section ul,
.advisor-reference-note ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.advisor-summary-block li,
.advisor-message-section li,
.advisor-reference-note li {
  color: #5e574e;
  font-size: 13px;
  line-height: 1.68;
}

.advisor-summary-block li::before,
.advisor-message-section li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 7px 2px 0;
  border-radius: 999px;
  background: rgba(173, 141, 85, 0.58);
}

.advisor-section-list {
  display: grid;
  gap: 7px;
}

.advisor-follow-list .advisor-message-section {
  background: rgba(241, 245, 241, 0.72);
}

.advisor-message-section.is-emphasis {
  background: rgba(248, 240, 226, 0.74);
}

.advisor-more-sections,
.advisor-reference-note {
  border-radius: 12px;
  background: rgba(250, 247, 241, 0.56);
  padding: 8px 10px;
}

.advisor-more-sections summary,
.advisor-reference-note summary {
  color: #9d9488;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.advisor-more-sections .advisor-section-list {
  margin-top: 8px;
}

.advisor-reference-note li {
  margin-top: 6px;
  color: #8c867e;
  font-size: 12px;
}

.chat-profile-card,
.chat-chart-summary {
  margin-top: 10px;
  border: 1px solid rgba(232, 224, 212, 0.78);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(38, 55, 47, 0.055);
}

.chat-profile-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

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

.chat-profile-card label {
  display: grid;
  gap: 6px;
  margin: 0;
}

.chat-profile-card span {
  color: #6c665d;
  font-size: 12px;
  font-weight: 700;
}

.chat-profile-card em {
  margin-left: 4px;
  color: var(--gold);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.chat-profile-card input,
.chat-profile-card select,
.chat-profile-card textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 10px 11px;
  color: var(--ink);
  font-size: 14px;
}

.chat-profile-card textarea {
  min-height: 72px;
  resize: vertical;
}

.bazi-parts-field {
  grid-column: 1 / -1;
}

.bazi-date-parts,
.bazi-time-parts {
  display: grid;
  gap: 8px;
}

.bazi-date-parts {
  grid-template-columns: 1.25fr 0.9fr 0.9fr;
}

.bazi-time-parts {
  grid-template-columns: 1fr 1fr;
}

.bazi-date-parts select,
.bazi-time-parts select {
  width: 100%;
  min-width: 0;
}

.upload-placeholder {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px dashed rgba(173, 141, 85, 0.42);
  border-radius: 12px;
  background: var(--paper);
  padding: 12px;
}

.upload-placeholder strong {
  color: var(--main);
  font-size: 14px;
}

.upload-placeholder small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.chat-profile-wide {
  grid-column: 1 / -1;
}

.chat-profile-card .primary-button {
  margin-top: 2px;
}

.chat-chart-summary {
  padding: 14px;
}

.chat-chart-summary h2 {
  margin: 0 0 2px;
  color: var(--main);
  font-size: 18px;
}

.consult-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 12px 0 6px;
}

.consult-input input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 11px 12px;
}

.consult-input button {
  border-radius: 12px;
  color: #fffdf8;
  background: var(--main);
  padding: 0 14px;
}

.report-cover {
  padding: 17px;
}

.result-cover,
.result-meta-card,
.result-section {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.result-cover {
  padding: 17px;
  background: linear-gradient(135deg, #fffdf8, #f6f1e8);
}

.result-cover p {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 12px;
}

.result-cover h1 {
  margin: 0;
  color: var(--main);
  font-size: 22px;
  line-height: 1.25;
}

.result-cover span,
.result-cover small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.result-cover span {
  margin-top: 7px;
}

.result-cover small {
  margin-top: 8px;
}

.result-meta-card {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.88);
}

.result-meta-card p {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.result-meta-card span {
  color: #9d9488;
}

.result-meta-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-section {
  margin-top: 10px;
  padding: 14px;
}

.result-section h2 {
  margin: 0 0 8px;
  color: var(--main);
  font-size: 16px;
  line-height: 1.25;
}

.result-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.result-summary {
  background: #fffaf0;
  border-color: rgba(173, 141, 85, 0.26);
}

.result-summary ul {
  color: var(--ink);
}

.result-analysis {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.result-analysis .result-section {
  margin-top: 0;
  box-shadow: none;
}

.result-advice {
  background: rgba(241, 245, 241, 0.76);
}

.result-follow {
  background: var(--paper);
}

.follow-question-list {
  display: grid;
  gap: 7px;
}

.follow-question-list button {
  min-height: 38px;
  border: 1px solid rgba(232, 224, 212, 0.92);
  border-radius: 999px;
  background: var(--card);
  color: var(--main);
  padding: 0 12px;
  text-align: left;
  font-size: 13px;
}

.result-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.result-actions .primary-button,
.result-actions .soft-button {
  margin-top: 0;
}

.result-actions button:disabled {
  opacity: 0.68;
  cursor: default;
}

.result-disclaimer {
  color: #8c867e;
  line-height: 1.65;
}

.report-block {
  margin-top: 9px;
  padding: 14px;
}

.report-block ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.disclaimer {
  margin: 12px 2px 0;
  font-size: 12px;
}

.disclaimer strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
}

.record-tabs {
  margin-bottom: 10px;
}

.record-card {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 7px 12px;
}

.record-card > div {
  min-width: 0;
  overflow: hidden;
}

.record-card h3 {
  margin: 2px 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-card p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-card .record-summary {
  margin: 3px 0;
  color: var(--ink);
  opacity: 0.76;
}

.record-card button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--gold);
  background: transparent;
  font-size: 22px;
  line-height: 1;
}

.mine-profile {
  padding: 2px 2px 8px;
}

.mine-profile h1 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.mine-profile p {
  margin: 5px 0 0;
}

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

.mine-core-grid button {
  height: 74px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 0 13px;
  text-align: left;
}

.mine-core-grid strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.mine-core-grid span,
.mine-list span,
.mine-action-list span,
.admin-list span {
  color: var(--gold);
}

.mine-more .section-title h2 {
  font-size: 16px;
}

.mine-list button,
.admin-list button,
.mine-action-list button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  padding: 0 13px;
  font-size: 14px;
}

.mine-action-list {
  display: grid;
  gap: 8px;
}

.site-code-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 18px 14px;
  box-shadow: var(--shadow);
  text-align: center;
}

.site-code-qr {
  width: min(74vw, 260px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.site-qr-svg {
  width: 100%;
  height: 100%;
}

.site-code-card h2 {
  margin: 2px 0 0;
  color: var(--main);
  font-size: 18px;
}

.site-code-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}

.admin-entry {
  width: 100%;
  min-height: 34px;
  margin-top: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.admin-stats {
  margin-bottom: 12px;
}

.admin-stats article {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 13px;
}

.admin-stats strong {
  display: block;
  margin-bottom: 6px;
  color: var(--main);
  font-size: 22px;
  line-height: 1;
}

.admin-stats span {
  color: var(--muted);
  font-size: 13px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(100%, 430px);
  min-height: calc(60px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  transform: translateX(-50%);
  border-top: 1px solid rgba(232, 224, 212, 0.9);
  background: rgba(255, 253, 248, 0.96);
  padding: 5px 12px calc(5px + env(safe-area-inset-bottom));
  backdrop-filter: blur(16px);
}

.bottom-nav button {
  min-height: 48px;
  border-radius: 10px;
  color: #aaa39a;
  background: transparent;
  font-size: 12px;
}

.bottom-nav button.active {
  color: var(--main);
  background: transparent;
  font-weight: 700;
}

.api-fallback-card {
  margin: 0 0 10px;
  padding: 12px;
}

.api-fallback-card p {
  margin: 0 0 10px;
}

@media (max-width: 380px) {
  .chat-profile-grid {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 94%;
  }

  .message.advisor.structured {
    max-width: 100%;
  }

  .advisor-content-card {
    padding: 12px;
  }

  .advisor-content-head h2 {
    font-size: 16px;
  }

  .practitioner-output-tabs button,
  .quick-row button {
    min-height: 31px;
    padding: 0 10px;
  }
}

@media (max-width: 430px) {
  .message-list {
    min-height: 180px;
  }

  .advisor-summary-block li,
  .advisor-message-section li {
    font-size: 12.5px;
  }

  .consult-input {
    margin-bottom: 4px;
  }
}

@media (min-width: 520px) {
  .phone-page {
    min-height: calc(100vh - 36px);
    margin: 18px auto;
    border-radius: 24px;
    box-shadow: 0 10px 34px rgba(31, 38, 35, 0.08);
  }

  .bottom-nav {
    bottom: 18px;
    border-radius: 0 0 24px 24px;
  }
}
