:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --soft: #8a8a90;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.16);
  --paper: #f5f5f7;
  --card: rgba(255, 255, 255, 0.78);
  --card-solid: #ffffff;
  --blue: #0071e3;
  --blue-soft: rgba(0, 113, 227, 0.1);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.055);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.95), transparent 36rem),
    linear-gradient(180deg, #fbfbfd 0%, var(--paper) 58%, #f0f0f3 100%);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
  color: inherit;
}

.page-shell {
  min-height: 100vh;
  padding: 28px 16px 36px;
}

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 44px;
}

.login-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  padding: 5px 6px 5px 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 28px rgba(0, 0, 0, 0.045);
  backdrop-filter: blur(18px);
}

.login-avatar,
.profile-avatar,
.card-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #1d1d1f;
  color: #ffffff;
  font-weight: 760;
}

.login-avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.identity-copy {
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.login-switcher strong {
  font-size: 14px;
}

.logout-button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #4b4b50;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 0 12px;
}

.login-switcher select,
.auth-panel select,
.auth-panel input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  padding: 0 12px;
}

.auth-stage {
  max-width: 460px;
  margin: 0 auto;
}

.auth-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 26px;
}

.auth-panel h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.16;
}

.auth-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.auth-panel label {
  color: #3a3a3c;
  font-size: 13px;
  font-weight: 700;
}

.login-error {
  margin: 0;
  color: #b64030;
  font-size: 13px;
  font-weight: 700;
}

.view-tabs {
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  padding: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 28px rgba(0, 0, 0, 0.045);
  backdrop-filter: blur(18px);
}

.view-tabs button {
  min-width: 94px;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4b4b50;
  cursor: default;
  font-size: 15px;
  font-weight: 650;
  padding: 8px 18px;
}

.view-tabs .is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.095);
}

.hero {
  max-width: 680px;
  margin: 0 auto 34px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 44px;
  font-weight: 720;
  line-height: 1.05;
}

.hero p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.62;
}

.chart-stage {
  max-width: 100%;
  margin: 0 auto;
}

.style-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
}

.style-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 26px;
}

.style-panel:first-child {
  grid-row: span 2;
}

.style-panel h2,
.style-panel h3 {
  margin: 0 0 14px;
  line-height: 1.16;
}

.style-panel h2 {
  font-size: 30px;
}

.style-panel h3 {
  font-size: 20px;
}

.style-summary {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.style-summary p,
.style-note-list li {
  color: #3a3a3c;
  line-height: 1.82;
}

.style-note-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.style-note-list li {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-size: 13px;
}

.autobiography-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
  gap: 18px;
  max-width: 1240px;
  margin: 0 auto;
}

.biography-modebar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 18px 22px;
}

.biography-modebar h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.16;
}

.biography-mode-tabs {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  padding: 4px;
}

.biography-mode-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #515154;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  padding: 6px 14px;
}

.biography-mode-tabs button.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08);
}

.autobiography-stage.is-interview-mode {
  grid-template-columns: minmax(0, 880px);
  justify-content: center;
  max-width: 960px;
}

.autobiography-stage.is-interview-mode .document-panel,
.autobiography-stage.is-interview-mode .control-card,
.autobiography-stage.is-interview-mode .archive-card {
  display: none;
}

.autobiography-stage.is-interview-mode .interview-panel {
  position: static;
  width: 100%;
}

.autobiography-stage.is-interview-mode .question-card {
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto auto;
  min-height: min(720px, calc(100vh - 230px));
  padding: 32px;
}

.autobiography-stage.is-interview-mode .chat-head {
  margin-bottom: 22px;
}

.autobiography-stage.is-interview-mode .chat-head h2 {
  font-size: 30px;
}

.autobiography-stage.is-interview-mode .dialogue-log {
  max-height: none;
  margin-bottom: 18px;
}

.autobiography-stage.is-interview-mode textarea {
  font-size: 15px;
  line-height: 1.72;
}

.autobiography-stage.is-interview-mode .chat-composer textarea {
  min-height: 92px;
}

.autobiography-stage.is-document-mode .question-card {
  display: none;
}

.discover-stage,
.public-profile-stage {
  max-width: 1120px;
  margin: 0 auto;
}

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

.public-bio-card,
.public-profile-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.public-bio-card {
  display: grid;
  gap: 18px;
  min-height: 300px;
  padding: 24px;
  text-align: left;
}

.public-bio-card button {
  justify-self: start;
}

.public-card-head,
.public-profile-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.card-avatar {
  width: 42px;
  height: 42px;
  font-size: 16px;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  font-size: 22px;
}

.public-bio-card h2,
.public-profile-head h2 {
  margin: 0 0 8px;
  line-height: 1.16;
}

.public-bio-card h2 {
  font-size: 22px;
}

.public-profile-head h2 {
  font-size: 34px;
}

.public-bio-card p,
.public-profile-head p {
  color: var(--muted);
  line-height: 1.66;
}

.public-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-stats li {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #4b4b50;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.public-profile-panel {
  overflow: hidden;
}

.public-profile-head {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  padding: 30px 34px 26px;
}

.public-chapters {
  display: grid;
  gap: 0;
  padding: 6px 0;
}

.public-chapter {
  padding: 28px 34px;
}

.public-chapter + .public-chapter {
  border-top: 1px solid var(--line);
}

.public-chapter h3 {
  margin: 0 0 12px;
  font-size: 23px;
  line-height: 1.22;
}

.public-chapter p {
  max-width: 760px;
  color: #3a3a3c;
  font-size: 16px;
  line-height: 1.9;
}

.bio-panel,
.document-panel,
.interview-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.bio-panel,
.interview-card {
  padding: 24px;
}

.document-panel {
  min-height: 780px;
  overflow: hidden;
}

.document-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  padding: 26px 34px 20px;
  backdrop-filter: blur(18px);
}

.document-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.today-badge,
.chapter-nav button {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
}

.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.chapter-nav button {
  cursor: pointer;
  font: inherit;
}

.chapter-nav button:hover {
  border-color: rgba(0, 113, 227, 0.26);
  color: var(--ink);
}

.document-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 42px 34px 70px;
}

.doc-section + .doc-section {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.doc-kicker {
  margin-bottom: 10px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.doc-section h3 {
  margin: 0 0 22px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.16;
}

.doc-section p {
  color: #2d2d31;
  font-size: 17px;
  line-height: 2;
}

.new-entry {
  border-left: 3px solid rgba(52, 199, 89, 0.46);
  padding-left: 20px;
}

.new-text {
  border-radius: 5px;
  background: linear-gradient(180deg, transparent 58%, rgba(52, 199, 89, 0.18) 58%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.writing-status {
  margin: 8px 0 0;
  color: #167c3a;
  font-size: 13px;
  font-weight: 700;
}

.muted-section p:last-child {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.interview-panel {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 16px;
}

.question-head,
.chat-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.chat-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin: -8px -8px 16px;
  padding: 0 0 16px;
}

.chat-avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #111113;
  color: #fff;
  font-size: 15px;
  font-weight: 780;
}

.chat-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.16;
}

.chat-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chat-head .today-badge {
  margin-left: auto;
}

.question-head h2,
.interview-card h3 {
  margin: 0;
  line-height: 1.18;
}

.material-meter {
  display: grid;
  grid-template-columns: auto auto minmax(80px, 1fr);
  align-items: center;
  gap: 8px;
  margin: -2px 0 14px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.meter-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #c7c7cc;
  transition:
    background 180ms ease,
    box-shadow 180ms ease;
}

.meter-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.07);
}

.meter-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #c7c7cc;
  transition:
    width 180ms ease,
    background 180ms ease;
}

.material-meter.is-warming .meter-dot,
.material-meter.is-warming .meter-track span {
  background: #ff9f0a;
}

.material-meter.is-ready .meter-dot,
.material-meter.is-ready .meter-track span {
  background: #34c759;
}

.material-meter.is-ready .meter-dot {
  box-shadow: 0 0 0 5px rgba(52, 199, 89, 0.13);
  animation: meterPulse 1.8s ease-in-out infinite;
}

.material-meter.is-writing .meter-dot,
.material-meter.is-writing .meter-track span {
  background: #007aff;
}

.material-meter.is-writing .meter-dot {
  box-shadow: 0 0 0 5px rgba(0, 122, 255, 0.12);
  animation: meterPulse 1.2s ease-in-out infinite;
}

.rewrite-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 0;
}

.rewrite-actions .ghost-action {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

@keyframes meterPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.32);
  }
}

.bio-panel h2,
.bio-panel h3 {
  margin: 0 0 12px;
  line-height: 1.12;
}

.bio-panel h2 {
  font-size: 32px;
}

.bio-panel h3 {
  font-size: 20px;
}

.bio-panel p,
.bio-panel li {
  color: var(--muted);
  line-height: 1.68;
}

.draft-panel p {
  color: #3a3a3c;
  font-size: 16px;
  line-height: 1.92;
}

.bio-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.question-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.question-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 14px;
}

.answer-mode {
  display: inline-flex;
  gap: 4px;
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  padding: 4px;
}

.answer-mode button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #515154;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
}

.answer-mode button.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.075);
}

.question-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: #515154;
  cursor: pointer;
  font-size: 13px;
  font-weight: 680;
  padding: 7px 10px;
}

.question-tabs button:hover,
.question-tabs button.is-active {
  border-color: rgba(0, 113, 227, 0.26);
  background: #ffffff;
  color: var(--ink);
}

.question-tabs button.is-highlighted,
.today-badge.is-highlighted {
  border-color: rgba(0, 113, 227, 0.36);
  background: var(--blue-soft);
  color: #0057b8;
}

.chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.chat-quick-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #515154;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  padding: 6px 12px;
}

.chat-quick-actions button:hover,
.chat-quick-actions button.is-active {
  border-color: rgba(0, 113, 227, 0.28);
  background: #ffffff;
  color: var(--ink);
}

.dialogue-log {
  display: grid;
  align-content: end;
  gap: 12px;
  min-height: 280px;
  max-height: 48vh;
  margin-bottom: 16px;
  overflow-y: auto;
  padding: 4px 8px 4px 2px;
}

.dialogue-log:empty {
  display: none;
}

.dialogue-turn {
  display: grid;
  gap: 4px;
  max-width: min(78%, 620px);
}

.dialogue-turn.is-user {
  justify-self: end;
}

.dialogue-speaker {
  color: var(--soft);
  font-size: 11px;
  font-weight: 760;
}

.dialogue-bubble {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 255, 255, 0.86);
  color: #2b2b2f;
  font-size: 15px;
  line-height: 1.68;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.045);
}

.dialogue-turn.is-user .dialogue-bubble {
  border-color: rgba(0, 113, 227, 0.2);
  border-radius: 18px 18px 6px 18px;
  background: #dbeafe;
}

.dialogue-bubble.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 58px;
  min-height: 28px;
  padding: 11px 14px;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.typing-dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(72, 84, 105, 0.58);
  animation: typingBounce 1.12s infinite ease-in-out;
}

.typing-dots i:nth-child(2) {
  animation-delay: 0.14s;
}

.typing-dots i:nth-child(3) {
  animation-delay: 0.28s;
}

.typing-hint {
  color: rgba(29, 35, 48, 0.66);
  font-size: 13px;
  line-height: 1.4;
}

@keyframes typingBounce {
  0%,
  80%,
  100% {
    opacity: 0.42;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.question-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  padding: 18px;
}

.question-meta {
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.question-box h3 {
  font-size: 20px;
}

.answer-label {
  display: block;
  margin: 0 0 8px;
  color: #3a3a3c;
  font-size: 13px;
  font-weight: 700;
}

.chat-composer {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
  padding: 12px;
}

.chat-composer textarea {
  min-height: 86px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  padding: 4px 2px;
  resize: none;
}

.chat-composer textarea:focus {
  box-shadow: none;
}

.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 10px;
}

.composer-actions .ghost-action,
.composer-actions .primary-action {
  min-height: 38px;
  padding: 0 16px;
}

.composer-actions .primary-action {
  min-width: 76px;
}

.material-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.material-item {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.material-item.is-ignored {
  opacity: 0.58;
}

.material-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.material-item-head strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.material-item-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(60, 60, 67, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  padding: 4px 8px;
}

.material-item p {
  color: #3a3a3c;
  font-size: 13px;
  line-height: 1.62;
}

.material-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.material-item-actions button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #515154;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  padding: 4px 10px;
}

.material-archive-group {
  display: block;
}

.material-archive-group details {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 10px;
}

.material-archive-group summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
}

.version-history {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.version-item {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.version-item-head,
.version-meta,
.version-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.version-item-head strong {
  color: var(--ink);
  font-size: 13px;
}

.version-item-head span,
.version-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.version-item p {
  color: #3a3a3c;
  font-size: 13px;
  line-height: 1.58;
}

.version-actions {
  justify-content: flex-start;
}

.version-actions button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #515154;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  padding: 4px 10px;
}

.version-detail {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 2px;
  padding-top: 10px;
}

.version-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.version-compare div {
  display: grid;
  gap: 6px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.035);
  padding: 10px;
}

.version-compare strong {
  font-size: 12px;
}

.version-compare p {
  max-height: 220px;
  overflow: auto;
  color: #3a3a3c;
  font-size: 12px;
  line-height: 1.55;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  resize: vertical;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  padding: 13px 14px;
}

textarea:focus {
  border-color: rgba(0, 113, 227, 0.42);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.question-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.primary-action,
.ghost-action {
  min-height: 40px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 16px;
}

.primary-action {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.ghost-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: #3a3a3c;
}

.full-width {
  width: 100%;
  margin-top: 10px;
}

.archive-card li {
  color: var(--muted);
  line-height: 1.62;
}

.archive-card ul {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.archive-card li {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-size: 13px;
}

.archive-card strong {
  display: block;
  margin-bottom: 4px;
  color: #3a3a3c;
}

.is-empty {
  color: var(--soft) !important;
}

.is-hidden {
  display: none !important;
}

.chart-toolbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: max-content;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 28px rgba(0, 0, 0, 0.045);
  backdrop-filter: blur(18px);
}

.chart-toolbar button {
  min-width: 38px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  color: #424245;
  font-size: 14px;
  font-weight: 650;
  padding: 6px 12px;
}

.chart-toolbar button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.chart-toolbar #zoomFit {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.chart-toolbar span {
  min-width: 52px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.chart-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 22px;
}

.chart-canvas {
  width: 2700px;
  margin: 0 auto;
  transform-origin: top center;
}

.org-chart {
  position: relative;
  width: 2700px;
  min-height: 900px;
  margin: 0 auto;
}

.org-card {
  position: absolute;
  display: grid;
  place-items: center;
  width: 236px;
  min-height: 104px;
  border: 1px solid rgba(0, 0, 0, 0.075);
  border-radius: 23px;
  background: var(--card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    var(--shadow);
  backdrop-filter: blur(22px);
  cursor: pointer;
  padding: 18px 20px;
  text-align: center;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.org-card:hover,
.org-card.is-active {
  transform: translateY(-2px);
  border-color: rgba(0, 113, 227, 0.28);
  background: var(--card-solid);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 22px 60px rgba(0, 0, 0, 0.085);
}

.org-card.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  transform: translateX(-50%);
}

.org-card .role {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-family:
    ui-monospace, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.org-card .name {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 760;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.org-card .title {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.connector {
  position: absolute;
  pointer-events: none;
  background: var(--line-strong);
}

.connector.v {
  width: 1px;
}

.connector.h {
  height: 1px;
}

.skill-detail {
  max-width: 980px;
  margin: 10px auto 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 22px 24px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.skill-detail h2 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.15;
}

.skill-detail p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.detail-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.detail-block h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.detail-block ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #3a3a3c;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .page-shell {
    padding-top: 20px;
  }

  h1 {
    font-size: 34px;
  }

  .topbar {
    flex-direction: column;
    margin-bottom: 30px;
  }

  .view-tabs button {
    min-width: auto;
    padding-inline: 14px;
  }

  .chart-canvas,
  .org-chart {
    width: 2700px;
  }

  .org-chart {
    min-height: 900px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .autobiography-stage {
    grid-template-columns: 1fr;
  }

  .biography-modebar {
    flex-direction: column;
    align-items: stretch;
  }

  .biography-mode-tabs {
    width: 100%;
  }

  .biography-mode-tabs button {
    flex: 1;
  }

  .autobiography-stage.is-interview-mode {
    grid-template-columns: 1fr;
  }

  .autobiography-stage.is-interview-mode .question-card {
    min-height: auto;
    padding: 24px;
  }

  .style-stage {
    grid-template-columns: 1fr;
  }

  .discover-grid {
    grid-template-columns: 1fr;
  }

  .login-switcher {
    width: min(100%, 360px);
    justify-content: center;
  }

  .public-profile-head {
    padding: 24px;
  }

  .public-profile-head h2 {
    font-size: 27px;
  }

  .public-chapter {
    padding: 24px;
  }

  .style-panel:first-child {
    grid-row: auto;
  }

  .interview-panel {
    position: static;
  }

  .document-panel {
    min-height: auto;
  }

  .document-head {
    display: grid;
    padding: 22px;
  }

  .chapter-nav {
    justify-content: flex-start;
  }

  .document-body {
    padding: 30px 22px 42px;
  }
}

@media (max-width: 520px) {
  .hero p:last-child {
    font-size: 15px;
  }

  h1 {
    font-size: 30px;
  }

  .skill-detail {
    padding: 18px;
  }

  .question-actions {
    grid-template-columns: 1fr;
  }
}

.material-meter.is-error {
  border-color: rgba(182, 64, 48, 0.34);
  background: rgba(182, 64, 48, 0.08);
}

.material-meter.is-error .meter-dot,
.material-meter.is-error #meterFill {
  background: #b64030;
}
