:root {
  color-scheme: light;
  --bg: #f8f6f1;
  --surface: #ffffff;
  --surface-muted: #efebe3;
  --text: #171a16;
  --muted: #6e746b;
  --subtle: #9ea497;
  --line: #e2ded4;
  --line-strong: #d1cabd;
  --primary: #2f6d4f;
  --primary-dark: #1f4b37;
  --primary-soft: #e4f0e8;
  --accent: #d96b57;
  --accent-soft: #f8e5dd;
  --amber: #9a6a2f;
  --amber-soft: #f4e8d4;
  --cyan: #4b8f8c;
  --cyan-soft: #e3f0ef;
  --shadow: 0 18px 46px rgba(23, 26, 22, 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
}

#app {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  isolation: isolate;
}

#modal-root {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100dvh;
  pointer-events: none;
}

#modal-root:empty {
  display: none;
}

#modal-root > * {
  pointer-events: auto;
}

.public-shell,
.public-intro {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

.public-intro {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 34px max(34px, calc((100% - 1280px) / 2)) 34px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 246, 241, 0.92) 52%, rgba(236, 232, 224, 0.88) 100%),
    linear-gradient(180deg, #ffffff, #f1ece4);
}

.public-intro::before {
  content: "";
  position: absolute;
  right: -18vw;
  bottom: -20vh;
  width: 76vw;
  height: 44vh;
  border-radius: 0;
  background: linear-gradient(135deg, rgba(31, 75, 55, 0.09), rgba(255, 255, 255, 0.22));
  transform: skewY(-7deg);
  pointer-events: none;
}

.public-intro::after {
  content: "";
  position: absolute;
  inset: 112px auto 0 0;
  width: 1px;
  height: calc(100% - 190px);
  background: rgba(31, 75, 55, 0.14);
  pointer-events: none;
}

.public-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.public-actions,
.intro-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.public-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(31, 75, 55, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.public-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.public-nav a:hover {
  background: rgba(47, 109, 79, 0.09);
  color: var(--primary-dark);
}

.public-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px 0 13px;
  border: 1px solid rgba(31, 75, 55, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(23, 26, 22, 0.08);
}

.public-login-button .icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-dark);
  color: #fff;
}

.public-login-button svg {
  width: 15px;
  height: 15px;
}

.public-login-button:hover {
  border-color: rgba(31, 75, 55, 0.36);
  background: #fff;
}

.intro-hero {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
  gap: 46px;
  align-items: center;
  padding: 70px 0 38px;
}

.intro-copy h1 {
  max-width: 690px;
  margin: 0;
  color: var(--text);
  font-size: 64px;
  line-height: 1.08;
  letter-spacing: 0;
}

.intro-copy p:not(.eyebrow) {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.9;
}

.intro-proof {
  display: inline-flex;
  width: fit-content;
  max-width: min(680px, 100%);
  padding: 13px 15px;
  border: 1px solid rgba(47, 109, 79, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.68);
  color: var(--primary-dark) !important;
  font-size: 15px !important;
  font-weight: 850;
  line-height: 1.6 !important;
}

.intro-buttons {
  margin-top: 34px;
}

.intro-buttons .primary-button,
.public-actions .primary-button {
  min-height: 48px;
  padding: 0 24px;
  border-color: var(--primary-dark);
  background: linear-gradient(180deg, #385f48, var(--primary-dark));
  box-shadow: 0 18px 36px rgba(31, 75, 55, 0.22);
}

.intro-buttons .soft-button {
  min-height: 48px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(31, 75, 55, 0.26);
  color: var(--primary-dark);
}

.intro-note {
  max-width: 280px !important;
  margin-top: 58px !important;
  color: rgba(31, 75, 55, 0.68) !important;
  font-size: 15px !important;
  line-height: 1.8 !important;
}

.intro-note::before {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  margin-bottom: 16px;
  background: rgba(31, 75, 55, 0.42);
}

.intro-preview {
  position: relative;
  min-width: 0;
  overflow: hidden;
  min-height: 520px;
  padding: 18px;
  border: 1px solid rgba(31, 75, 55, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(18, 22, 19, 0.88), rgba(18, 22, 19, 0.98)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(239, 235, 227, 0.9));
  box-shadow: 0 34px 90px rgba(23, 26, 22, 0.18), 0 0 0 10px rgba(255, 255, 255, 0.28);
}

.intro-preview::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  pointer-events: none;
}

.workspace-preview {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 484px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfaf6, #f0ece4);
}

.workspace-side {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px 16px;
  border-right: 1px solid rgba(226, 222, 212, 0.82);
  background: rgba(255, 255, 255, 0.68);
}

.workspace-side strong {
  color: var(--primary-dark);
  font-size: 25px;
  line-height: 1;
}

.workspace-side span {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
}

.workspace-side b {
  display: block;
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
}

.workspace-side b.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.workspace-main {
  min-width: 0;
  padding: 28px;
}

.workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.workspace-head h2 {
  max-width: 520px;
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.22;
}

.workspace-head p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.workspace-head span {
  display: block;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle at 58% 38%, #fff 0 6px, transparent 7px),
    linear-gradient(135deg, var(--accent), var(--primary));
}

.workspace-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.preview-record {
  position: relative;
  min-height: 176px;
  padding: 18px 16px;
  border: 1px solid rgba(226, 222, 212, 0.82);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
}

.preview-record.accent {
  background: rgba(228, 240, 232, 0.82);
}

.preview-record span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.preview-record strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.preview-record p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.preview-card {
  max-width: 360px;
  min-height: 170px;
  margin: 18px 0 0 auto;
  background:
    linear-gradient(180deg, rgba(23, 26, 22, 0.2), rgba(23, 26, 22, 0.62)),
    linear-gradient(135deg, #d9dfd2, #35513c);
  color: #fff;
}

.preview-card p,
.preview-card footer {
  color: rgba(255, 255, 255, 0.76);
}

.preview-card span {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 900;
  transform: rotate(-4deg);
}

.brand strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
}

.brand span,
.sidebar-note span,
.recent-item em,
.view-head p,
.panel-heading p,
.export-panel p,
.settings-card p,
.account-card p,
.account-mini span {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 800;
}

.icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-note {
  position: absolute;
  right: 16px;
  bottom: 28px;
  left: 16px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.sidebar-note strong {
  color: var(--text);
  font-size: 15px;
}

.admin-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--primary-dark);
  font-weight: 800;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 246, 241, 0.86);
  backdrop-filter: blur(16px);
}

.search {
  display: flex;
  align-items: center;
  width: min(520px, 44vw);
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
}

.search span {
  width: 14px;
  height: 14px;
  margin-right: 10px;
  border: 2px solid var(--subtle);
  border-radius: 99px;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.profile-button,
.soft-button,
.primary-button,
.side-action,
.link-button {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
}

.profile-button,
.soft-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  font-weight: 800;
}

.primary-button {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.primary-button .icon {
  color: #fff;
}

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

.public-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr) auto;
  align-items: start;
  justify-self: stretch;
  width: 100%;
  gap: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
}

.footer-brand span {
  max-width: 560px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.footer-columns section {
  display: grid;
  gap: 8px;
}

.footer-columns strong {
  color: var(--text);
  font-size: 13px;
}

.footer-columns a {
  color: var(--muted);
  font-weight: 760;
}

.footer-columns a:hover {
  color: var(--primary-dark);
}

.language-links {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
}

.language-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 850;
}

.language-links a.active {
  background: var(--primary-dark);
  color: #fff;
}

.footer-meta {
  grid-column: 1 / -1;
  color: var(--subtle);
  font-size: 12px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
}

.mode-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.mode-tabs button {
  flex: 1;
  min-height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.mode-tabs button.active {
  background: var(--surface);
  color: var(--primary-dark);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(430px, 1.12fr) 340px;
  gap: 16px;
  padding: 16px 20px 28px;
}

.recorder-panel,
.document-panel,
.rail-card,
.filter-panel,
.table-panel,
.detail-panel,
.topic-card,
.review-panel,
.template-list,
.card-canvas,
.export-panel,
.settings-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.recorder-panel,
.document-panel {
  min-height: 560px;
  padding: 24px;
}

.panel-heading,
.rail-head,
.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.compact {
  align-items: center;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.thought-field {
  position: relative;
  display: grid;
  width: min(360px, 100%);
  height: 360px;
  margin: 28px auto 16px;
  place-items: center;
}

.greenhouse-glass {
  position: absolute;
  inset: 32px;
  border: 1px solid rgba(75, 143, 140, 0.22);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(75, 143, 140, 0.11), rgba(255, 255, 255, 0.2) 58%, transparent 59%);
}

.greenhouse-ground,
.tree-trunk,
.tree-branch,
.leaf,
.fruit,
.memory-thread {
  position: absolute;
}

.greenhouse-ground {
  bottom: 94px;
  width: 160px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-muted);
}

.tree-trunk {
  bottom: 108px;
  width: 6px;
  height: 92px;
  border-radius: 99px;
  background: var(--primary-dark);
}

.tree-branch {
  width: 54px;
  height: 4px;
  border-radius: 99px;
  background: var(--primary);
  transform-origin: right center;
}

.tree-branch.left {
  top: 154px;
  left: 132px;
  transform: rotate(-30deg);
}

.tree-branch.right {
  top: 138px;
  right: 130px;
  transform: rotate(28deg);
  transform-origin: left center;
}

.leaf {
  width: 58px;
  height: 34px;
  border-radius: 58px 58px 7px 58px;
  background: var(--primary);
}

.leaf-one {
  top: 116px;
  left: 112px;
  transform: rotate(-28deg);
}

.leaf-two {
  top: 132px;
  right: 104px;
  transform: scaleX(-1) rotate(-26deg);
}

.fruit {
  top: 112px;
  left: 174px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
}

.memory-thread {
  width: 110px;
  height: 1px;
  background: rgba(75, 143, 140, 0.26);
}

.memory-thread.one {
  top: 78px;
  left: 82px;
  transform: rotate(-18deg);
}

.memory-thread.two {
  top: 232px;
  right: 66px;
  transform: rotate(22deg);
}

.thought-seed {
  position: relative;
  display: grid;
  width: 180px;
  height: 180px;
  place-items: center;
  padding: 28px;
  border: 1px solid rgba(47, 109, 79, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 18px rgba(47, 109, 79, 0.045);
  text-align: center;
}

.thought-seed.is-recording {
  animation: pulse 1.8s ease-in-out infinite;
}

.thought-seed strong {
  font-size: 14px;
}

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 76px;
  gap: 4px;
}

.waveform i {
  display: block;
  width: 4px;
  border-radius: 999px;
  background: rgba(47, 109, 79, 0.52);
  transition: height 220ms ease;
}

.waveform i.strong {
  background: rgba(47, 109, 79, 0.72);
}

.waveform i.accent {
  background: rgba(217, 107, 87, 0.5);
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  margin: 0 auto 16px;
  padding: 0 14px;
  color: var(--muted);
}

.status-row span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--subtle);
}

.status-row.active {
  color: var(--primary-dark);
}

.status-row.active span {
  background: var(--accent);
}

.control-row {
  display: grid;
  grid-template-columns: 1fr 104px 1fr;
  align-items: center;
  gap: 18px;
  max-width: 360px;
  margin: 0 auto;
}

.side-action {
  display: grid;
  height: 68px;
  place-items: center;
  padding: 8px;
  color: var(--primary-dark);
  font-weight: 800;
}

.side-action span:last-child {
  font-size: 13px;
}

.record-action {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 18px 38px rgba(47, 109, 79, 0.24);
}

.record-action.active {
  background: var(--accent);
}

.record-action .icon {
  width: 36px;
  height: 36px;
}

.pause-button {
  display: flex;
  width: 112px;
  margin: 18px auto 0;
}

.tabs {
  display: flex;
  gap: 26px;
  margin: 20px 0 14px;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  padding: 0 0 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tabs button.active {
  color: var(--primary);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.transcript,
.fragment-list {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  font-size: 17px;
  line-height: 1.7;
}

.transcript p,
.fragment-list p {
  margin: 0;
}

.transcript time,
.fragment-list time {
  display: inline-block;
  width: 54px;
  color: var(--subtle);
  font-size: 13px;
}

.pipeline-section {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pipeline-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pipeline-head span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.pipeline-head h2 {
  margin: 0;
}

.fragment-list {
  margin: 0;
}

.fragment-list p {
  display: grid;
  grid-template-columns: 54px 64px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(226, 222, 212, 0.68);
}

.fragment-list b {
  color: var(--primary-dark);
  font-size: 13px;
}

.article-block {
  color: var(--text);
  font-size: 17px;
  line-height: 1.72;
}

.thought-link p {
  margin: 0;
}

.process-banner {
  display: grid;
  gap: 4px;
  margin: 18px 0;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
}

.process-banner span,
.summary-block p,
.detail-panel p,
.topic-card p,
.review-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.tags,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-actions {
  margin-top: 18px;
}

.tags span,
.voice-card span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
}

.status,
.recent-item b,
.record-row b {
  font-size: 12px;
  font-weight: 900;
}

.good {
  color: var(--primary);
}

.busy {
  color: var(--amber);
}

.bad {
  color: var(--accent);
}

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

.right-rail {
  display: grid;
  align-content: start;
  gap: 16px;
}

.rail-card {
  padding: 18px;
}

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

.recent-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.recent-item.active {
  background: var(--surface-muted);
}

.recent-item strong,
.recent-item em {
  display: block;
}

.account-mini {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
}

.account-mini strong,
.account-mini span {
  display: block;
}

.source-dot {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.voice-card {
  display: grid;
  min-height: 226px;
  padding: 24px;
  border: 1px solid #efdfce;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fffaf3, #ffffff);
  box-shadow: 0 18px 45px rgba(74, 47, 22, 0.1);
}

.voice-card h3 {
  font-size: 20px;
  line-height: 1.25;
}

.voice-card p {
  color: #41504c;
  line-height: 1.7;
}

.voice-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.voice-card footer {
  align-self: end;
  color: var(--muted);
  font-size: 12px;
}

.data-view,
.card-studio,
.settings-view,
.account-view,
.admin-view,
.single-view {
  padding: 24px;
}

.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.view-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.data-layout {
  display: grid;
  grid-template-columns: 160px minmax(390px, 0.9fr) minmax(430px, 1.1fr);
  gap: 16px;
}

.filter-panel,
.detail-panel,
.template-list,
.export-panel,
.settings-card,
.account-card,
.admin-card,
.login-panel {
  padding: 20px;
}

.filter-panel {
  display: grid;
  align-content: start;
  gap: 8px;
}

.filter-panel button,
.template-list button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.filter-panel button.active,
.template-list button.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 900;
}

.table-panel {
  overflow: hidden;
}

.record-row {
  display: grid;
  grid-template-columns: 64px 1fr 116px 74px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.record-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.thought-grid,
.settings-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(520px, 1.22fr);
  gap: 16px;
}

.account-layout-full {
  grid-template-columns: 1fr;
}

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

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.7fr) minmax(560px, 1.3fr);
  gap: 16px;
}

.admin-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-flow article {
  min-height: 110px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.admin-flow b {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
}

.admin-flow strong,
.admin-flow span {
  display: block;
}

.admin-flow span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.topic-card {
  min-height: 176px;
  padding: 22px;
}

.topic-card span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.review-panel {
  grid-column: span 2;
  padding: 24px;
}

.card-studio {
  display: grid;
  grid-template-columns: 220px minmax(430px, 1fr) 280px;
  gap: 16px;
}

.card-canvas {
  display: grid;
  min-height: 650px;
  place-items: center;
  padding: 30px;
  background: linear-gradient(180deg, rgba(228, 240, 232, 0.9), rgba(255, 255, 255, 0.88));
}

.voice-card.large {
  width: min(420px, 90%);
  aspect-ratio: 0.8;
  min-height: 0;
  padding: 42px;
}

.voice-card.large.文艺 {
  background:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82)),
    var(--accent-soft);
}

.voice-card.large.商务 {
  border-color: rgba(47, 109, 79, 0.22);
  background: #ffffff;
}

.voice-card.large.个人 {
  background:
    linear-gradient(rgba(31, 75, 55, 0.86), rgba(31, 75, 55, 0.86)),
    var(--primary-dark);
  color: #fff;
}

.voice-card.large.个人 p,
.voice-card.large.个人 footer {
  color: rgba(255, 255, 255, 0.76);
}

.voice-card.large h3 {
  font-size: 30px;
}

.export-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.settings-card,
.account-card,
.admin-card,
.login-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.settings-card,
.account-card,
.admin-card {
  min-height: 150px;
}

.admin-card h2 {
  margin-top: 0;
}

.admin-card p {
  color: var(--muted);
  line-height: 1.65;
}

.admin-editor {
  display: grid;
  align-content: start;
  gap: 14px;
}

.admin-editor label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-editor input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: 0;
  background: var(--bg);
  color: var(--text);
}

.admin-table {
  align-self: start;
}

.template-row {
  grid-template-columns: 130px 1fr 90px 120px 74px;
}

.admin-metric {
  display: block;
  margin: 8px 0;
  color: var(--primary-dark);
  font-size: 28px;
}

.wide-table {
  margin-top: 16px;
}

.admin-table-head,
.admin-table-row {
  display: grid;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.admin-table-head {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

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

.admin-table-row span:first-child {
  color: var(--text);
  font-weight: 850;
}

.wide-table .admin-table-head,
.wide-table .admin-table-row {
  grid-template-columns: 1.1fr 0.75fr 0.55fr 0.6fr 1.25fr;
}

.user-table .admin-table-head,
.user-table .admin-table-row {
  grid-template-columns: 0.75fr 1.25fr 0.7fr 0.5fr 0.8fr 0.7fr 0.8fr;
}

.record-admin-table .admin-table-head,
.record-admin-table .admin-table-row {
  grid-template-columns: 0.55fr 1.35fr 0.55fr 0.65fr 1.2fr 0.6fr;
}

.audit-table .admin-table-head,
.audit-table .admin-table-row {
  grid-template-columns: 0.55fr 0.7fr 1fr 1.25fr 0.6fr;
}

.setting-admin-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.login-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.login-panel p {
  margin-bottom: 2px;
  color: var(--muted);
  line-height: 1.65;
}

.login-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-panel input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: 0;
  background: var(--bg);
  color: var(--text);
}

.account-card dl {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  margin: 14px 0 0;
}

.account-card dt {
  color: var(--muted);
}

.account-card dd {
  margin: 0;
  color: var(--text);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100vw;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  z-index: 1001;
  display: grid;
  align-items: center;
  justify-content: center;
  place-items: center;
  padding: 24px;
  background: rgba(23, 26, 22, 0.28);
  transform: none;
}

.import-dialog {
  display: grid;
  width: min(560px, 100%);
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(23, 26, 22, 0.18);
}

.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  padding: 28px;
  overflow: auto;
  background: rgba(23, 26, 22, 0.32);
}

.web-auth-dialog {
  display: grid;
  width: min(432px, calc(100vw - 48px));
  min-width: 0;
  max-width: 432px;
  max-height: calc(100dvh - 56px);
  gap: 10px;
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 246, 241, 0.98));
  box-shadow: 0 24px 80px rgba(23, 26, 22, 0.2);
}

.web-auth-dialog .panel-heading.compact {
  align-items: flex-start;
  margin-bottom: 2px;
}

.web-auth-dialog .panel-heading h2 {
  font-size: 21px;
  line-height: 1.18;
}

.web-auth-dialog .panel-heading p {
  max-width: 320px;
  line-height: 1.5;
}

.web-auth-dialog .auth-input {
  height: 42px;
  background: #fff;
}

.web-auth-dialog > .primary-button {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  border-radius: var(--radius-md);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.auth-tabs button {
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.auth-tabs button.active {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: 0 8px 18px rgba(23, 26, 22, 0.08);
}

.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: 0;
  background: var(--bg);
  color: var(--text);
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
  align-items: center;
}

.auth-code-button {
  width: 118px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.auth-policy {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid rgba(47, 109, 79, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.auth-policy input {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--primary-dark);
}

.auth-policy a {
  color: var(--primary-dark);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-message {
  margin: 0;
  color: var(--primary-dark);
  font-size: 13px;
  line-height: 1.55;
}

.import-textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: 0;
  color: var(--text);
  font: inherit;
  line-height: 1.65;
}

.web-toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(47, 109, 79, 0.22);
  border-radius: var(--radius-md);
  background: var(--primary-dark);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 18px 50px rgba(23, 26, 22, 0.18);
}

.hero-account {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  background: var(--primary-soft);
}

.hero-account h2,
.hero-account p {
  margin-bottom: 4px;
}

.hero-account b {
  color: var(--primary-dark);
}

.single-view .document-panel {
  max-width: 920px;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 18px rgba(47, 109, 79, 0.045);
  }
  50% {
    box-shadow: 0 0 0 30px rgba(217, 107, 87, 0.07);
  }
}

@media (max-width: 1320px) and (min-width: 901px) {
  .home-grid {
    grid-template-columns: minmax(340px, 0.95fr) minmax(400px, 1.05fr);
  }

  .right-rail {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-layout {
    grid-template-columns: 150px minmax(360px, 1fr);
  }

  .detail-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .public-intro {
    padding: 18px;
  }

  .public-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .public-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .public-login-button {
    min-height: 42px;
    padding-right: 14px;
  }

  .intro-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 42px;
  }

  .intro-copy h1 {
    font-size: 38px;
  }

  .intro-copy p:not(.eyebrow) {
    font-size: 16px;
  }

  .intro-note {
    margin-top: 30px !important;
  }

  .intro-preview {
    min-height: auto;
  }

  .workspace-preview {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .workspace-side {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace-side span {
    margin: 0 auto 0 0;
  }

  .workspace-main {
    padding: 18px;
  }

  .auth-backdrop {
    padding: 18px;
  }

  .web-auth-dialog {
    width: min(100%, 420px);
    max-height: calc(100dvh - 36px);
    padding: 20px;
    border-radius: 18px;
  }

  .workspace-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-card {
    max-width: none;
    margin-left: 0;
  }

  .public-footer {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 18px;
  }

  .footer-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .language-links {
    width: fit-content;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px 12px 10px;
  }

  .brand {
    margin-bottom: 14px;
  }

  .sidebar-note {
    display: none;
  }

  nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
  }

  .nav-item {
    justify-content: center;
    min-width: 0;
    padding: 0;
  }

  .nav-item span:not(.icon) {
    display: none;
  }

  .topbar {
    gap: 8px;
    padding: 10px 12px;
  }

  .view-head,
  .view-actions {
    flex-wrap: wrap;
  }

  .search {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  .profile-button {
    width: 42px;
    padding: 0;
    overflow: hidden;
    color: transparent;
  }

  .profile-button .icon {
    color: var(--primary-dark);
  }

  .home-grid,
  .data-layout,
  .thought-grid,
  .card-studio,
  .settings-grid,
  .admin-grid,
  .admin-flow,
  .admin-layout,
  .account-layout,
  .account-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .right-rail,
  .review-panel {
    grid-column: auto;
  }

  .recorder-panel,
  .document-panel {
    min-height: auto;
    padding: 20px;
  }

  .thought-field {
    height: 320px;
  }

  .control-row {
    grid-template-columns: 1fr 92px 1fr;
    gap: 14px;
  }

  .record-action {
    width: 92px;
    height: 92px;
  }

  .record-row {
    grid-template-columns: 54px 1fr;
    gap: 8px;
    padding: 12px;
  }
}

@media (max-width: 560px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }

  .auth-code-row {
    grid-template-columns: 1fr;
  }

  .auth-code-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
