:root {
  color-scheme: light;
  --ink: #16202a;
  --ink-soft: #243241;
  --muted: #687687;
  --subtle: #91a0ae;
  --line: #d9e2df;
  --paper: #fffaf0;
  --page: #f3efe4;
  --panel: rgba(255, 253, 247, 0.92);
  --panel-solid: #fffdf7;
  --leaf: #2c8a70;
  --leaf-dark: #145c4b;
  --sun: #c68a3a;
  --rose: #ad6470;
  --blue: #456f9f;
  --night: #17211d;
  --shadow: 0 24px 70px rgba(31, 42, 52, 0.16);
  --soft-shadow: 0 14px 34px rgba(31, 42, 52, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(140deg, rgba(44, 138, 112, 0.11), transparent 30%),
    linear-gradient(225deg, rgba(198, 138, 58, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 253, 247, 0.8), rgba(243, 239, 228, 0.92)),
    var(--page);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(22, 32, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 32, 42, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}

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

button {
  cursor: pointer;
}

.page-shell {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.topbar {
  min-height: 54px;
  margin-bottom: 16px;
  border: 1px solid rgba(217, 226, 223, 0.78);
  border-radius: 18px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  background: rgba(255, 253, 247, 0.68);
  box-shadow: 0 10px 30px rgba(31, 42, 52, 0.06);
  backdrop-filter: blur(18px);
}

.brand-mark {
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.topbar span {
  font-size: 13px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 18px;
  min-height: 430px;
  align-items: stretch;
}

.hero-copy,
.hero-visual,
.toolbar,
.growth-map,
.diary-section,
.detail-card,
.writer-card {
  border: 1px solid rgba(217, 226, 223, 0.82);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  padding: clamp(30px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #f7fbf7;
  background:
    linear-gradient(150deg, rgba(23, 33, 29, 0.98), rgba(22, 32, 42, 0.94) 58%, rgba(31, 57, 67, 0.96)),
    var(--night);
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: clamp(24px, 5vw, 58px);
  bottom: clamp(24px, 5vw, 52px);
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32));
}

.eyebrow {
  width: fit-content;
  color: #b9e8d8;
  background: rgba(44, 138, 112, 0.18);
  border: 1px solid rgba(185, 232, 216, 0.26);
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 700;
}

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

h1 {
  max-width: 560px;
  margin-top: 26px;
  font-size: clamp(50px, 7vw, 90px);
  line-height: 1.02;
  letter-spacing: 0;
  font-family: "STSong", "SimSun", "Songti SC", "Noto Serif SC", serif;
  font-weight: 900;
}

.hero-copy p {
  margin-top: 20px;
  max-width: 560px;
  color: rgba(247, 251, 247, 0.72);
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: linear-gradient(135deg, #31a17d, var(--leaf-dark));
  box-shadow: 0 12px 26px rgba(44, 138, 112, 0.24);
}

.button.secondary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #2e4d74);
  box-shadow: 0 12px 26px rgba(69, 111, 159, 0.22);
}

.button.ghost {
  color: var(--leaf-dark);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
}

.hero-copy .button.ghost {
  color: #dbefe8;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-visual {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-content: end;
  background:
    linear-gradient(160deg, rgba(20, 92, 75, 0.88), rgba(45, 67, 93, 0.76)),
    url("https://images.unsplash.com/photo-1497215728101-856f4ea42174?auto=format&fit=crop&w=1400&q=80");
  background-size: cover;
  background-position: center;
}

.hero-visual.graph-panel {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  align-content: initial;
  padding: 24px;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 6%, rgba(19, 31, 38, 0.74)),
    linear-gradient(90deg, rgba(19, 31, 38, 0.42), transparent 58%);
}

.graph-header,
.knowledge-graph,
.graph-legend {
  position: relative;
  z-index: 1;
}

.graph-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  color: #f7fbf7;
}

.graph-header span {
  color: rgba(185, 232, 216, 0.78);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.graph-header strong {
  display: block;
  margin-top: 5px;
  font-size: 26px;
}

.graph-header p {
  max-width: 180px;
  color: rgba(247, 251, 247, 0.62);
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
}

.graph-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.graph-tools button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0 11px;
  color: #dbefe8;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 900;
}

body.graph-open {
  overflow: hidden;
}

.graph-fullscreen {
  position: fixed;
  inset: 18px;
  z-index: 30;
  min-height: auto;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(12, 20, 24, 0.42);
}

.graph-fullscreen .knowledge-graph {
  min-height: 0;
}

.graph-fullscreen .graph-header strong {
  font-size: 34px;
}

.knowledge-graph {
  min-height: 0;
  flex: 1;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 48%, rgba(185, 232, 216, 0.12), transparent 34%),
    rgba(13, 27, 31, 0.22);
}

.graph-legend {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: rgba(247, 251, 247, 0.68);
  font-size: 12px;
}

.graph-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.graph-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.legend-root {
  background: #31a17d;
}

.legend-topic {
  background: #c68a3a;
}

.legend-tag {
  background: #6f9fd2;
}

.legend-note {
  background: #dce8e4;
}

.garden-card {
  position: relative;
  z-index: 1;
  min-height: 116px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background: rgba(17, 30, 36, 0.34);
  backdrop-filter: blur(18px);
}

.garden-card.large {
  grid-column: span 2;
  min-height: 152px;
}

.garden-card span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.garden-card strong {
  margin-top: 10px;
  font-size: 26px;
}

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

.stat-card,
.note-card {
  border: 1px solid rgba(217, 226, 223, 0.92);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--leaf), var(--sun));
}

.stat-card span {
  color: var(--muted);
  font-size: 14px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  letter-spacing: 0;
}

.garden-workbench {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.1fr repeat(4, minmax(0, 0.8fr));
  gap: 14px;
}

.module-card {
  min-height: 178px;
  border: 1px solid rgba(217, 226, 223, 0.92);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 253, 247, 0.86);
  box-shadow: var(--soft-shadow);
}

.module-feature,
.module-daily,
.module-wander {
  justify-content: space-between;
}

.module-focus {
  grid-column: 2 / -1;
  min-height: 226px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.94), rgba(239, 248, 244, 0.88)),
    var(--panel-solid);
}

.module-feature {
  color: #f7fbf7;
  background:
    linear-gradient(145deg, rgba(20, 92, 75, 0.96), rgba(35, 63, 78, 0.94)),
    var(--night);
}

.module-wander {
  background:
    linear-gradient(145deg, rgba(255, 253, 247, 0.94), rgba(238, 246, 242, 0.92));
}

.module-daily {
  background:
    linear-gradient(145deg, rgba(255, 253, 247, 0.96), rgba(239, 248, 244, 0.9));
}

.module-kicker,
.module-heading span {
  color: var(--leaf-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-feature .module-kicker {
  color: #b9e8d8;
}

.module-card h2 {
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.2;
}

.module-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.75;
}

.module-feature p {
  color: rgba(247, 251, 247, 0.74);
}

.module-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.module-heading strong {
  font-size: 17px;
}

.topic-map,
.tag-cloud,
.recent-list {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-pill,
.cloud-tag,
.recent-item {
  border: 1px solid rgba(44, 138, 112, 0.18);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.topic-pill,
.cloud-tag {
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.topic-pill strong {
  color: var(--leaf-dark);
  font-size: 13px;
}

.cloud-tag {
  color: var(--leaf-dark);
  font-size: 13px;
}

.recent-list {
  flex-direction: column;
}

.recent-item {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  padding: 9px 10px;
  display: grid;
  gap: 2px;
  text-align: left;
}

.recent-item span {
  color: var(--subtle);
  font-size: 12px;
}

.recent-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-record {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.daily-record div {
  border: 1px solid rgba(44, 138, 112, 0.14);
  border-radius: 14px;
  padding: 10px 11px;
  display: grid;
  gap: 3px;
  background: rgba(255, 255, 255, 0.64);
}

.daily-record span {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
}

.daily-record strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-board {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) repeat(2, minmax(160px, 0.85fr)) minmax(124px, 0.56fr);
  gap: 12px;
  align-items: stretch;
}

.focus-summary,
.focus-column,
.focus-actions {
  min-width: 0;
  border: 1px solid rgba(44, 138, 112, 0.14);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.focus-summary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(145deg, rgba(23, 33, 29, 0.96), rgba(35, 63, 78, 0.88)),
    var(--night);
}

.focus-summary span,
.focus-column > span {
  color: var(--leaf-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.focus-summary span {
  color: #b9e8d8;
}

.focus-summary p {
  margin-top: 18px;
  color: rgba(247, 251, 247, 0.72);
  line-height: 1.75;
}

.focus-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.focus-item {
  width: 100%;
  border: 1px solid rgba(44, 138, 112, 0.14);
  border-radius: 14px;
  padding: 10px 11px;
  display: grid;
  gap: 4px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.78);
  text-align: left;
}

.focus-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-item span {
  overflow: hidden;
  color: var(--subtle);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-actions {
  display: grid;
  gap: 9px;
}

.quick-action {
  min-height: 42px;
  border: 1px solid rgba(44, 138, 112, 0.16);
  border-radius: 14px;
  color: #f7fbf7;
  font-weight: 900;
  background: var(--leaf-dark);
}

.quick-action.write {
  background: linear-gradient(135deg, #31a17d, var(--leaf-dark));
}

.quick-action.wander {
  background: linear-gradient(135deg, var(--blue), #2e4d74);
}

.quick-action.map {
  color: var(--leaf-dark);
  background: rgba(255, 255, 255, 0.78);
}

.inline-empty {
  color: var(--muted);
  font-size: 14px;
}

.growth-map {
  margin-top: 16px;
  border-radius: 24px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(230px, 0.78fr) minmax(0, 1.32fr);
  gap: 18px;
  box-shadow: var(--soft-shadow);
}

.diary-section {
  margin-top: 16px;
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--soft-shadow);
}

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

.diary-entry {
  min-height: 158px;
  border: 1px solid rgba(44, 138, 112, 0.16);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
  background:
    linear-gradient(145deg, rgba(255, 253, 247, 0.96), rgba(245, 241, 232, 0.92));
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.diary-entry:hover {
  border-color: rgba(44, 138, 112, 0.32);
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(31, 42, 52, 0.1);
}

.diary-entry span {
  color: var(--leaf-dark);
  font-size: 12px;
  font-weight: 900;
}

.diary-entry strong {
  font-size: 20px;
  line-height: 1.35;
}

.diary-entry p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.growth-intro {
  grid-column: 1;
  grid-row: 1;
  min-height: 220px;
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f7fbf7;
  background:
    linear-gradient(145deg, rgba(23, 33, 29, 0.98), rgba(35, 63, 78, 0.92)),
    var(--night);
}

.growth-intro span {
  width: fit-content;
  border: 1px solid rgba(185, 232, 216, 0.24);
  border-radius: 999px;
  padding: 8px 12px;
  color: #b9e8d8;
  background: rgba(44, 138, 112, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.growth-intro h2 {
  margin-top: auto;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
}

.growth-intro h2 strong {
  color: #f0d39d;
}

.growth-intro p {
  margin-top: 14px;
  color: rgba(247, 251, 247, 0.68);
  line-height: 1.75;
}

.growth-stats {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.growth-stats article {
  border: 1px solid rgba(217, 226, 223, 0.9);
  border-radius: 18px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 253, 247, 0.54));
}

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

.growth-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.1;
}

.growth-insights {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.growth-insights article {
  border: 1px solid rgba(217, 226, 223, 0.9);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 253, 247, 0.74);
}

.growth-insights span {
  color: var(--leaf-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.growth-insights strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.1;
}

.growth-insights p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.top-topic-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-topic {
  min-height: 32px;
  border: 1px solid rgba(44, 138, 112, 0.16);
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--leaf-dark);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 800;
}

.heatmap-shell {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-content: start;
}

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

.heatmap-head span {
  color: var(--leaf-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.heatmap-scale {
  display: flex;
  gap: 5px;
}

.heatmap-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.heatmap-month {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.heatmap-month-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 16px;
}

.heatmap-cells {
  display: grid;
  grid-template-columns: repeat(16, 10px);
  gap: 5px;
}

.heat-cell {
  width: 10px;
  height: 10px;
  min-width: 10px;
  min-height: 10px;
  border: 0;
  border-radius: 3px;
  padding: 0;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

button.heat-cell:hover {
  transform: scale(1.45);
  box-shadow: 0 0 0 3px rgba(49, 161, 125, 0.12);
}

.heat-cell.level-0 {
  background: rgba(22, 32, 42, 0.08);
}

.heat-cell.level-1 {
  background: #cfe6dc;
}

.heat-cell.level-2 {
  background: #8bcab2;
}

.heat-cell.level-3 {
  background: #31a17d;
}

.heat-cell.level-4 {
  background: #145c4b;
}

.toolbar {
  margin-top: 16px;
  border-radius: 20px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(130px, 0.38fr));
  gap: 12px;
  box-shadow: var(--soft-shadow);
}

.toolbar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 96px;
  resize: vertical;
  padding: 12px;
  line-height: 1.65;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(47, 125, 100, 0.14);
}

.section-head {
  margin: 26px 2px 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-head span {
  color: var(--leaf-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-head h2 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.2;
}

.status-line {
  min-height: 24px;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

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

.note-card {
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.note-card:hover {
  border-color: rgba(44, 138, 112, 0.28);
  transform: translateY(-4px);
  box-shadow: 0 22px 54px rgba(31, 42, 52, 0.14);
}

.note-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--leaf), var(--blue), var(--sun));
}

.note-open {
  width: 100%;
  height: 100%;
  min-height: 250px;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  color: inherit;
  background: transparent;
}

.note-cover {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.note-content {
  padding: 22px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.note-topline,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 13px;
}

.note-category,
.detail-meta span:first-child {
  color: var(--leaf-dark);
  font-weight: 800;
}

.note-card h3 {
  margin-top: 14px;
  font-size: 24px;
  line-height: 1.35;
}

.note-card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.tag {
  border: 1px solid rgba(47, 125, 100, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--leaf-dark);
  background: rgba(47, 125, 100, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 34px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.detail,
.writer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
}

.detail[aria-hidden="false"],
.writer[aria-hidden="false"] {
  display: block;
}

.detail-backdrop,
.writer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 32, 42, 0.42);
}

.detail-card,
.writer-card {
  position: absolute;
  top: 24px;
  right: 24px;
  bottom: 24px;
  width: min(760px, calc(100% - 48px));
  border-radius: 24px;
  overflow: auto;
}

.detail-card {
  width: min(1080px, calc(100% - 48px));
}

.writer-card {
  width: min(760px, calc(100% - 48px));
}

.close-button {
  position: sticky;
  top: 14px;
  z-index: 2;
  float: right;
  margin: 14px 14px 0 0;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  font-size: 24px;
  line-height: 1;
}

.detail-cover {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.detail-body {
  padding: clamp(24px, 5vw, 46px);
}

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 280px);
  gap: clamp(24px, 4vw, 42px);
  align-items: start;
}

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

.detail-sidebar {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 14px;
}

.writer-body {
  padding: clamp(24px, 5vw, 42px);
}

.writer-body h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.writer-form {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.writer-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.writer-form .full {
  grid-column: 1 / -1;
}

.writer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.writer-options label {
  width: fit-content;
  display: inline-flex;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
}

.writer-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--leaf);
}

.writer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.writer-help {
  display: block;
  margin-top: 8px;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.6;
}

.detail-edit-button {
  width: 100%;
  justify-content: center;
}

.writer-status {
  min-height: 22px;
  color: var(--leaf-dark);
  font-weight: 700;
}

.writer-status[data-error="true"] {
  color: var(--rose);
}

.detail-body h2 {
  margin-top: 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
}

.detail-main > p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.article-content {
  max-width: 720px;
  margin-top: 32px;
  color: #243140;
  font-size: 18px;
  line-height: 2;
}

.article-content h2,
.article-content h3 {
  scroll-margin-top: 28px;
}

.article-content h2 {
  margin-top: 38px;
  margin-bottom: 12px;
  font-size: 28px;
  color: var(--ink);
  line-height: 1.35;
}

.article-content h3 {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 22px;
  color: var(--ink-soft);
  line-height: 1.35;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content pre,
.article-content .code-card {
  margin: 14px 0;
}

.article-content ul,
.article-content ol {
  padding-left: 1.35em;
}

.article-content li {
  margin: 8px 0;
  padding-left: 4px;
}

.article-content blockquote {
  border-left: 4px solid var(--sun);
  padding: 14px 18px;
  color: #4b5870;
  background:
    linear-gradient(90deg, rgba(217, 145, 61, 0.13), rgba(255, 253, 247, 0.54));
  border-radius: 0 16px 16px 0;
}

.article-content code {
  border-radius: 6px;
  padding: 2px 6px;
  background: rgba(23, 32, 42, 0.08);
}

.code-card {
  overflow: hidden;
  border: 1px solid rgba(217, 226, 223, 0.16);
  border-radius: 16px;
  background: #16221d;
  box-shadow: 0 18px 34px rgba(31, 42, 52, 0.14);
}

.code-card figcaption {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 9px 14px;
  color: rgba(237, 245, 240, 0.62);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.article-content pre {
  overflow: auto;
  margin: 0;
  padding: 18px;
  color: #edf5f0;
  background: transparent;
}

.article-content pre code {
  padding: 0;
  background: transparent;
}

.article-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

.article-image {
  margin: 24px 0;
}

.article-image img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  border: 1px solid rgba(217, 226, 223, 0.85);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.72);
  box-shadow: var(--soft-shadow);
}

.article-image figcaption {
  margin-top: 10px;
  color: var(--subtle);
  font-size: 13px;
  text-align: center;
}

.reader-widget {
  border: 1px solid rgba(217, 226, 223, 0.9);
  border-radius: 18px;
  padding: 15px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: var(--soft-shadow);
}

.reader-widget > span {
  color: var(--leaf-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-toc,
.related-notes,
.detail-nav {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.detail-toc button,
.related-item,
.detail-nav button {
  width: 100%;
  border: 1px solid rgba(44, 138, 112, 0.14);
  border-radius: 13px;
  padding: 9px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  text-align: left;
}

.detail-toc button {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-toc .toc-child {
  padding-left: 22px;
  color: var(--muted);
  font-weight: 700;
}

.related-item {
  display: grid;
  gap: 4px;
}

.related-item strong,
.related-item span,
.detail-nav button {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-item span {
  color: var(--subtle);
  font-size: 12px;
}

.detail-nav button {
  color: var(--leaf-dark);
  font-weight: 900;
}

.detail-nav button:disabled {
  cursor: not-allowed;
  color: var(--subtle);
  background: rgba(22, 32, 42, 0.04);
}

@media (max-width: 920px) {
  .hero,
  .toolbar,
  .growth-map,
  .diary-grid,
  .garden-workbench {
    grid-template-columns: 1fr;
  }

  .heatmap-shell {
    grid-column: auto;
    grid-row: auto;
  }

  .growth-intro,
  .growth-stats,
  .module-focus {
    grid-column: auto;
    grid-row: auto;
  }

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

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

  .detail-sidebar {
    position: static;
  }

  .growth-insights {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .status-line {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero-copy,
  .hero-visual {
    border-radius: 20px;
  }

  .stats,
  .growth-stats,
  .heatmap-months,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .heatmap-cells {
    grid-template-columns: repeat(16, 9px);
    gap: 4px;
  }

  .heat-cell {
    width: 9px;
    height: 9px;
    min-width: 9px;
    min-height: 9px;
  }

  .focus-board {
    grid-template-columns: 1fr;
  }

  .graph-fullscreen {
    inset: 10px;
    border-radius: 20px;
  }

  .graph-fullscreen .graph-header {
    flex-direction: column;
  }

  .graph-fullscreen .graph-tools {
    width: 100%;
    justify-items: start;
  }

  .detail-card {
    inset: 10px;
    width: auto;
    border-radius: 18px;
  }

  .writer-card {
    inset: 10px;
    width: auto;
    border-radius: 18px;
  }

  .writer-form {
    grid-template-columns: 1fr;
  }
}
