/* 修仙局 · v4
   Clean white-card interface, after the supplied mobile reference. */

:root {
  --paper: #f8f9fa;
  --paper-2: #ffffff;
  --paper-3: #f1f3f2;
  --ink: #1e2422;
  --ink-soft: #3f4743;
  --muted: #7b8580;
  --muted-2: #9aa29d;
  --line: rgba(30, 36, 34, 0.1);
  --line-soft: rgba(30, 36, 34, 0.055);
  --cinnabar: #a33a2f;
  --cinnabar-deep: #872e25;
  --cinnabar-soft: rgba(163, 58, 47, 0.07);
  --jade: #4f6f60;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 25, 23, 0.02);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

body {
  background: var(--paper);
  font-size: 15px;
}

.paper-grain {
  opacity: 0.018;
}

/* ---------------- shell ---------------- */

.shell {
  grid-template-columns: 220px minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px 22px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.brand {
  gap: 10px;
  padding: 0 10px;
}

.brand-seal {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  box-shadow: none;
}

.brand-seal-sm {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 14px;
}

.brand-name {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.brand-sub {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.rail-nav {
  gap: 4px;
  margin-top: 34px;
}

.nav-item {
  gap: 11px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent !important;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13.5px;
  letter-spacing: 0.01em;
}

.nav-item:hover {
  color: var(--ink);
  background: #f5f7f6 !important;
}

.nav-item.is-active {
  color: var(--ink);
  background: #f1f3f2 !important;
}

.nav-item.is-active::before {
  display: none;
}

.nav-icon {
  color: var(--muted-2);
}

.nav-item.is-active .nav-icon {
  color: var(--ink);
}

.rail-foot {
  gap: 14px;
  padding: 0 6px;
}

.rail-search {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: var(--muted);
}

.rail-search:hover {
  border-color: #dce2de;
  color: var(--ink);
  background: #f7f9f8;
}

.rail-privacy {
  padding-left: 2px;
  color: var(--muted-2);
}

/* ---------------- page ---------------- */

.main {
  position: relative;
  max-width: 1120px;
  padding: 30px 44px 96px;
}

.main::before,
.main::after {
  display: none;
}

.page-head {
  margin-bottom: 22px;
}

.kicker {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.01em;
  text-transform: none;
}

.page-title {
  font-family: var(--sans);
  font-size: 38px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.12;
}

.page-lede {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

.title-seal {
  display: none;
}

.practice-bar {
  top: 0;
  right: 0;
}

.practice-switch {
  gap: 12px;
}

.practice-switch i {
  display: none;
}

.practice-switch button {
  padding: 6px 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.01em;
}

.practice-switch button:hover {
  color: var(--ink);
}

.practice-switch button.is-active {
  color: var(--ink);
  font-weight: 600;
}

.practice-switch button.is-active::after {
  bottom: 0;
  height: 1px;
  background: var(--ink);
}

.practice-search {
  color: var(--muted);
  font-size: 11px;
}

.practice-divider {
  background: var(--line);
}

/* ---------------- composer ---------------- */

.composer {
  margin-bottom: 24px;
  padding: 17px 18px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.composer::before {
  display: none;
}

.composer:focus-within {
  border-color: #d6ddda;
  box-shadow: 0 0 0 3px rgba(30, 36, 34, 0.035);
}

.composer textarea {
  min-height: 34px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.005em;
}

.composer textarea::placeholder {
  color: var(--muted-2);
  font-size: 16px;
}

.composer-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.composer-hint {
  color: var(--muted-2);
  font-size: 10px;
}

.btn-send {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: #f0f3f1;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.btn-send .ico {
  transform: rotate(-90deg);
}

.btn-send:hover {
  color: #ffffff;
  background: var(--ink);
}

/* ---------------- today ---------------- */

.today-grid {
  grid-template-columns: minmax(0, 1fr) 302px;
  gap: 28px;
}

.today-aside {
  top: 24px;
  gap: 14px;
  padding-left: 0;
  border-left: 0;
}

.card {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.card-eyebrow {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.01em;
}

.card-eyebrow-right {
  color: var(--muted-2);
}

.guide-card {
  padding: 17px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.guide-card::after {
  display: none;
}

.guide-card.is-muted {
  border-color: var(--line);
  background: #fbfcfb;
}

.guide-text {
  margin: 12px 0 13px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.guide-source {
  padding-left: 10px;
  border-left: 2px solid #e7ebea;
}

.guide-source-label {
  color: var(--muted-2);
}

.guide-source button {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 11.5px;
}

.guide-actions {
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.guide-context {
  margin-top: 8px;
}

.guide-why p {
  font-size: 10.5px;
  line-height: 1.75;
}

.on-this-day {
  padding: 17px 18px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.old-entry {
  border-bottom: 1px solid var(--line-soft);
}

.soft-prompt {
  padding: 13px 4px;
  border-top: 0;
}

.section-head {
  margin-bottom: 14px;
  padding-bottom: 0;
  border-bottom: 0;
}

.section-head h2 {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.section-count {
  color: var(--muted-2);
  font-size: 10px;
}

.entry {
  display: block;
  margin-bottom: 10px;
  padding: 14px 16px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.entry.is-new {
  animation: entryIn 0.4s var(--ease) both;
}

.entry-rail {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 18px;
  padding: 0;
}

.entry-time {
  color: var(--muted-2);
  font-size: 10px;
}

.entry-line {
  display: none;
}

.entry-body {
  min-width: 0;
}

.entry-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  opacity: 0.55;
  transition: opacity 0.18s var(--ease);
}

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

.entry-action {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted-2);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.entry-action:hover {
  color: var(--ink);
  background: #f1f3f2;
}

.entry-action[disabled] {
  opacity: 0.3;
  pointer-events: none;
}

.entry-meta {
  margin-bottom: 7px;
}

.path-chip {
  height: 19px;
  padding: 0 7px;
  border: 0;
  border-radius: 5px;
  color: var(--path-color);
  background: rgba(var(--path-rgb), 0.07);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.path-chip.is-pending {
  background: #f3f5f4;
  color: var(--muted-2);
}

.entry-original {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.85;
}

.entry-translation {
  margin-top: 9px;
  padding: 8px 0 0 10px;
  border-top: 1px solid var(--line-soft);
  border-left: 2px solid #e7ebea;
}

.trans-label {
  display: none;
}

.entry-translation p {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.03em;
}

.translation-pending {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}

/* ---------------- calendar ---------------- */

.calendar-wrap {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.cal-weekdays {
  margin-bottom: 0;
}

.cal-weekday {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
}

.cal-grid {
  gap: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.cal-cell {
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: #ffffff;
}

.cal-cell:nth-child(7n) {
  border-right: 0;
}

.cal-cell:hover {
  background: #f7f9f8;
}

.cal-cell.is-outside {
  background: #fafbfa;
}

.cal-cell.is-selected {
  background: #f3f6f4;
  box-shadow: inset 0 0 0 1px rgba(30, 36, 34, 0.5);
}

.cal-cell.is-today .cal-daynum {
  color: var(--cinnabar);
}

.calendar-foot {
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

/* ---------------- review ---------------- */

.review-paper {
  position: relative;
  padding: 32px 34px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.review-paper::before,
.review-paper::after {
  display: none;
}

.review-cover {
  padding-bottom: 20px;
}

.final-seal {
  border-radius: 2px;
  font-family: var(--sans);
  font-weight: 600;
}

.review-title {
  font-family: var(--sans);
  font-size: 34px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.review-kicker,
.review-range {
  letter-spacing: 0.02em;
}

.review-summary {
  margin-top: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 2;
  letter-spacing: 0.005em;
}

.review-verdict {
  margin-top: 20px;
}

.verdict-label,
.decision-label {
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.review-decision {
  margin-top: 18px;
  padding: 14px 16px;
  border: 0;
  border-radius: 10px;
  background: #f5f7f6;
}

.review-decision .next-step-text {
  margin-top: 5px;
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.review-folds {
  margin-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.review-fold {
  border-bottom: 1px solid var(--line-soft);
}

.fold-summary {
  padding: 14px 2px;
}

.fold-title {
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.fold-meta {
  font-size: 9.5px;
}

.fold-body {
  padding: 0 2px 18px 22px;
}

.review-point,
.recon-item,
.theme-item {
  border-color: var(--line-soft);
}

.point-text {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.9;
}

.recon-guide {
  font-family: var(--sans);
  font-size: 12.5px;
}

.theme-name {
  font-family: var(--sans);
  font-size: 13px;
}

.review-footer {
  border-top: 1px solid var(--line-soft);
}

/* ---------------- me ---------------- */

.profile-card {
  padding: 24px 26px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.profile-card::before,
.profile-card::after {
  display: none;
}

.profile-stage-label {
  margin-top: 22px;
  color: var(--muted-2);
}

.profile-stage-label::before {
  display: none;
}

.profile-kicker {
  color: var(--muted);
  letter-spacing: 0.02em;
}

.profile-stage {
  margin: 4px 0 18px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.profile-field {
  border-top: 1px solid var(--line-soft);
}

.profile-field p {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.85;
}

.profile-watermark {
  color: rgba(30, 36, 34, 0.018);
  font-size: 132px;
}

.profile-confirmed {
  border-radius: 100px;
  border: 0;
  background: #f1f6f3;
}

.profile-foot {
  border-top: 1px solid var(--line-soft);
}

.panel {
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.settings-panel {
  padding-bottom: 9px;
}

.privacy-wide {
  margin-top: 18px;
  padding: 19px 20px;
}

.privacy-side {
  border-left: 1px solid var(--line-soft);
}

.paths-grid {
  gap: 10px;
}

.path-card {
  min-height: 146px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.path-card:hover {
  transform: none;
  border-color: #dce2de;
  background: #ffffff;
  box-shadow: 0 8px 24px -20px rgba(20, 25, 23, 0.18);
}

.path-glyph {
  display: none;
}

.path-name {
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.path-count {
  color: var(--muted-2);
  font-size: 9px;
}

.path-desc {
  font-size: 9px;
}

.path-quote {
  font-family: var(--serif);
  font-size: 11px;
}

.path-foot {
  gap: 6px;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
}

.path-recent {
  font-size: 9px;
}

.paths-summary {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ---------------- mobile chrome ---------------- */

.mobile-bar {
  background: rgba(248, 249, 250, 0.94);
  border-bottom-color: var(--line);
}

.mobile-brand {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 650;
  letter-spacing: 0.01em;
}

.mobile-date {
  color: var(--muted-2);
}

.mobile-nav {
  background: rgba(248, 249, 250, 0.96);
  border-top-color: var(--line);
}

.mobile-nav-item {
  color: var(--muted-2);
  font-family: var(--sans);
}

.mobile-nav-item.is-active {
  color: var(--ink);
}

.mobile-nav-item.is-active .ico {
  color: var(--ink);
}

/* ---------------- overlays ---------------- */

.search-panel,
.modal {
  border-radius: 14px;
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 28px 80px -36px rgba(20, 25, 23, 0.4);
}

.search-head {
  border-bottom-color: var(--line-soft);
}

.search-input {
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0.01em;
}

.search-result:hover {
  background: #f7f9f8;
}

.day-sheet {
  border-left: 1px solid var(--line);
  background: var(--paper);
}

.sheet-guide {
  border-radius: 10px;
}

.btn-ink,
.btn-quiet,
.btn-danger,
.icon-btn,
.switch {
  border-radius: 8px;
}

.btn-ink {
  background: var(--ink);
}

.btn-ink:hover {
  background: #000000;
}

/* ---------------- demo ---------------- */

.demo-strip {
  max-width: 1120px;
  padding: 12px 44px 0;
}

.demo-strip-inner {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
}

.demo-tag {
  color: var(--cinnabar);
}

.demo-action {
  border-radius: 6px;
}

.delete-quote {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--line);
  border-radius: 0 6px 6px 0;
  background: #f7f9f8;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.8;
}

.demo-strip.is-compact .demo-strip-inner {
  padding: 5px 10px;
  border-style: dashed;
  background: #fbfcfb;
}

.demo-strip.is-compact .demo-copy {
  flex: 0 1 auto;
  color: var(--muted-2);
}

/* ---------------- today stream ---------------- */

.today-view {
  max-width: 1040px;
  margin: 0 auto;
}

.today-columns {
  display: grid;
  grid-template-columns: minmax(350px, 0.82fr) minmax(0, 1.18fr);
  gap: 38px;
  align-items: start;
}

.today-left,
.today-right {
  min-width: 0;
}

.today-right .stream {
  margin-top: 0;
}

.today-left .today-head {
  margin-bottom: 20px;
}

.guide-invite {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: -12px 2px 20px;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.guide-invite:hover {
  color: var(--ink);
}

.guide-invite-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cinnabar);
  opacity: 0.65;
}

.guide-invite em {
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-style: normal;
}

.guide-invite:hover em {
  border-color: var(--ink);
  color: var(--ink);
}

.today-view .guide-card {
  margin-bottom: 0;
  padding: 14px 16px 12px;
}

.on-this-day-strip {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: -8px 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.otd-label {
  flex: none;
  padding-top: 1px;
  color: var(--cinnabar);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.otd-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.otd-entry {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  min-height: 18px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: left;
}

.otd-year {
  flex: none;
  color: var(--muted-2);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.otd-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otd-entry:hover .otd-text {
  color: var(--ink);
}

.today-view .guide-text {
  margin: 9px 0 10px;
  font-size: 18px;
  line-height: 1.75;
}

.today-view .guide-source {
  display: block;
  overflow: hidden;
  padding-left: 0;
  border-left: 0;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.7;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-view .guide-source button {
  display: inline-block;
  max-width: calc(100% - 42px);
  overflow: hidden;
  font-family: var(--sans);
  font-size: 10.5px;
  vertical-align: bottom;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.today-view .guide-actions {
  margin-top: 8px;
  padding-top: 8px;
  gap: 14px;
}

.today-view .guide-context {
  display: none;
}

.today-view .guide-why {
  margin-top: 5px;
}

.stream {
  margin-top: 18px;
}

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

.stream-heading {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.stream-heading h2 {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.stream-heading span {
  color: var(--muted-2);
  font-size: 10px;
  white-space: nowrap;
}

.stream-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stream-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.01em;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.stream-action:hover {
  border-color: #dce2de;
  color: var(--ink);
  background: #f8faf9;
}

.stream-action.is-active {
  border-color: var(--ink);
  color: #ffffff;
  background: var(--ink);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 10px;
}

.filter-chip .ico {
  color: var(--muted-2);
}

.filter-chip:hover {
  border-color: #dce2de;
}

.stream-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.stream-search-icon {
  flex: none;
  color: var(--muted-2);
}

.stream-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
}

.stream-search input::placeholder {
  color: var(--muted-2);
}

.stream-search input::-webkit-search-cancel-button {
  display: none;
}

.stream-search-clear {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--muted-2);
}

.stream-search-clear:hover {
  color: var(--ink);
  background: #f1f3f2;
}

.stream-calendar {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mini-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.mini-cal-head > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.mini-cal-head .icon-btn {
  width: 28px;
  height: 28px;
}

.mini-cal-weekdays,
.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.mini-cal-weekdays {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 9px;
  text-align: center;
}

.mini-cal-weekdays span {
  padding: 3px 0;
}

.mini-cal-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.mini-cal-cell:hover {
  background: #f4f7f5;
}

.mini-cal-cell.is-outside {
  color: var(--muted-2);
  opacity: 0.45;
}

.mini-cal-cell.is-today {
  color: var(--cinnabar);
  font-weight: 600;
}

.mini-cal-cell.is-selected {
  color: #ffffff;
  background: var(--ink);
}

.mini-cal-cell.is-selected:hover {
  background: var(--ink);
}

.mini-cal-cell i {
  position: absolute;
  bottom: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

.mini-cal-cell.is-selected i {
  background: #ffffff;
}

.mini-cal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 9px;
}

.stream-day {
  margin-bottom: 24px;
}

.stream-day:last-child {
  margin-bottom: 0;
}

.stream-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}

.stream-day-date {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.stream-day-date h3 {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.stream-day-date span {
  color: var(--muted-2);
  font-size: 9.5px;
  white-space: nowrap;
}

.stream-day-guide {
  overflow: hidden;
  max-width: 55%;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-day-guide:hover {
  color: var(--ink);
}

.stream-entries {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stream-entries .entry {
  margin-bottom: 0;
}

.stream-empty {
  padding: 34px 12px;
  color: var(--muted-2);
  font-size: 12px;
  text-align: center;
}

.stream-empty .text-btn {
  margin-top: 8px;
}

.latest-record {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  margin: 12px 0 8px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  text-align: left;
}

.latest-record:hover {
  border-color: #dce2de;
  background: #fbfcfb;
}

.latest-record-meta {
  color: var(--muted-2);
  font-size: 9.5px;
}

.latest-record-text {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.7;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-view > .on-this-day {
  margin-top: 16px;
  margin-bottom: 0;
  padding: 14px 16px 6px;
}

.today-view > .on-this-day .old-entry {
  padding: 10px 0 9px;
}

.today-view > .on-this-day .old-entry p {
  font-size: 12.5px;
}

.today-view > .on-this-day .old-meta {
  font-size: 9px;
}

.today-view > .soft-prompt {
  margin-top: 4px;
}

@media (max-width: 680px) {
  .stream-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .stream-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .stream-day-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .stream-day-guide {
    max-width: 100%;
    text-align: left;
  }

  .stream-search input {
    font-size: 16px;
  }

  .mini-cal-cell {
    min-height: 28px;
  }
}

@media (max-width: 1160px) {
  .main {
    padding-right: 34px;
    padding-left: 34px;
  }

  .demo-strip {
    padding-right: 34px;
    padding-left: 34px;
  }

  .today-grid {
    grid-template-columns: minmax(0, 1fr) 282px;
    gap: 22px;
  }
}

@media (max-width: 960px) {
  .main {
    max-width: 760px;
    padding: 22px 18px 104px;
  }

  .demo-strip {
    max-width: 760px;
    padding: 12px 18px 0;
  }

  .today-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .today-columns {
    display: block;
  }

  .today-view {
    max-width: 760px;
  }

  .today-right .stream {
    margin-top: 18px;
  }

  .guide-invite {
    margin-top: -10px;
    margin-bottom: 17px;
  }

  .entry-actions {
    opacity: 1;
  }

  .today-aside {
    padding-left: 0;
  }

  .page-title {
    font-size: 34px;
  }

  .review-paper {
    padding: 26px 24px 24px;
  }

  .paths-grid {
    gap: 9px;
  }
}

@media (max-width: 680px) {
  .main {
    padding: 18px 16px 104px;
  }

  .demo-strip {
    padding: 10px 16px 0;
  }

  .page-title {
    font-size: 32px;
  }

  .composer {
    padding: 15px 15px 11px;
  }

  .composer textarea {
    font-size: 16px;
  }

  .composer textarea::placeholder {
    font-size: 15px;
  }

  .btn-send {
    width: 38px;
    height: 38px;
  }

  .entry {
    padding: 13px 14px 12px;
  }

  .entry-original {
    font-size: 15px;
  }

  .review-paper {
    padding: 22px 17px 20px;
  }

  .review-title {
    font-size: 28px;
  }

  .review-decision .next-step-text {
    font-size: 17.5px;
  }

  .profile-card {
    padding: 20px 18px 16px;
  }

  .profile-stage {
    font-size: 31px;
  }

  .paths-grid {
    gap: 8px;
  }

  .path-card {
    min-height: 128px;
    padding: 12px 11px 10px;
  }

  .path-name {
    font-size: 17px;
  }

  .path-quote {
    font-size: 10px;
  }

  .path-foot {
    padding-top: 7px;
  }

  .path-dot {
    width: 3px;
    height: 3px;
  }

  .path-dots {
    gap: 1px;
  }

  .privacy-side {
    padding-top: 15px;
    padding-left: 0;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .calendar-wrap {
    padding: 9px;
  }

  .cal-cell {
    border-right: 1px solid var(--line-soft);
  }

  .fold-body {
    padding-left: 0;
  }
}

/* Boot gate: the app stays hidden until the session and server state are ready. */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: #f8f9fa;
  color: #1b1c1e;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.boot-screen.is-done {
  opacity: 0;
  visibility: hidden;
}

.boot-seal {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #1b1c1e;
  color: #fff;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 28px;
  line-height: 1;
}

.boot-screen p {
  margin: 0;
  color: #7a7f86;
  font-size: 12px;
  letter-spacing: 0.16em;
}

.account-confirm-field {
  display: grid;
  gap: 7px;
  margin: 16px 0 8px;
}

.account-confirm-field span {
  color: #4b4f55;
  font-size: 12px;
}

.account-confirm-field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line, #e5e7ea);
  border-radius: 9px;
  padding: 0 12px;
  background: #fcfcfd;
  color: var(--ink, #1b1c1e);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.account-confirm-field input:focus {
  border-color: #b8bdc5;
}

.account-confirm-error {
  min-height: 18px;
  margin: 0 0 8px;
  color: #a34835;
  font-size: 12px;
}

.privacy-legal a {
  color: inherit;
  text-underline-offset: 3px;
}

.trans-source {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid var(--line-soft, #e5e7ea);
  border-radius: 999px;
  color: #7a7f86;
  font-size: 9px;
  letter-spacing: 0.08em;
  vertical-align: 1px;
}
