:root {
  color-scheme: light;
  --bg: #fbfbf9;
  --bg-glass: rgba(251, 251, 249, 0.84);
  --ink: #0c0c0b;
  --ink-soft: #73716b;
  --ink-mid: #45453f;
  --ink-faint: #a4a29a;
  --line: #e4e2da;
  --line-strong: #0c0c0b;
  --hover: #f1f0ea;
  --card: #ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --pad: clamp(22px, 5vw, 72px);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0a;
  --bg-glass: rgba(11, 11, 10, 0.82);
  --ink: #f4f3ee;
  --ink-soft: #9b9a93;
  --ink-mid: #cfcec7;
  --ink-faint: #67665f;
  --line: #262620;
  --line-strong: #f4f3ee;
  --hover: #141413;
  --card: #111110;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

#app {
  min-height: calc(100vh - 155px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

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

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.app-shell {
  max-width: 1560px;
  margin: 0 auto;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 74px;
  padding: 0 var(--pad);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand-rule {
  width: 22px;
  height: 1px;
  background: var(--ink);
  display: block;
}

.brand-sub {
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--ink-soft);
  text-transform: uppercase;
  padding-top: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-link {
  position: relative;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  padding: 6px 2px;
  transition: color 0.25s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right 0.3s var(--ease);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link:hover::after {
  right: 0;
}

.topbar-date {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-right: 6px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.icon-btn:hover {
  border-color: var(--ink);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

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

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

.btn-solid:hover {
  background: transparent;
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(54px, 8.4vw, 108px) var(--pad) clamp(36px, 5vw, 62px);
  border-bottom: 1px solid var(--line);
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(38px, 7vw, 78px);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 8.2vw, 104px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  max-width: min(15ch, 100%);
}

.hero-title .dim {
  color: var(--ink-faint);
}

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: clamp(38px, 6vw, 68px);
}

.hero-desc {
  margin: 0;
  max-width: min(46ch, 100%);
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-soft);
}

.hero-stats {
  display: flex;
  gap: clamp(26px, 4vw, 54px);
}

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

.stat-num {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Index ---------- */

.section {
  overflow-x: clip;
  padding: clamp(38px, 5.4vw, 68px) var(--pad) clamp(60px, 8vw, 100px);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}

.section-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-count {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s var(--ease);
}

.search-bar:focus-within {
  border-color: var(--line-strong);
}

.search-icon {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--ink-faint);
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  color: var(--ink-faint);
}

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

.search-clear {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-faint);
  font-size: 16px;
  line-height: 1;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

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

.search-clear[hidden] {
  display: none;
}

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-row {
  border-bottom: 1px solid var(--line);
}

.post-row a {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  padding: 30px 0;
}

.post-row a::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--pad) * -0.35);
  background: var(--hover);
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: -1;
}

.post-row a:hover::before {
  opacity: 1;
}

.index-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  align-self: start;
  padding-top: 10px;
  transition: color 0.3s var(--ease);
}

.post-row a:hover .index-num {
  color: var(--ink);
}

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

.post-main h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(23px, 2.5vw, 34px);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.018em;
  transition: transform 0.4s var(--ease);
}

.post-row a:hover .post-main h3 {
  transform: translateX(8px);
}

.post-excerpt {
  margin: 12px 0 0;
  max-width: min(66ch, 100%);
  font-size: 13.5px;
  line-height: 1.78;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-side {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.6;
  transition: opacity 0.3s var(--ease), color 0.3s var(--ease);
}

.metric svg {
  width: 14px;
  height: 14px;
}

.post-row a:hover .metric {
  opacity: 1;
  color: var(--ink-soft);
}

.empty {
  padding: 90px 0;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.empty-title {
  font-family: var(--serif);
  font-size: 26px;
  margin: 0 0 12px;
}

.empty p {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 13px;
}

/* ---------- Article ---------- */

.post-view {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 80px) 26px 110px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: clamp(32px, 5vw, 54px);
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}

.back-link:hover {
  color: var(--ink);
  gap: 13px;
}

.post-head {
  padding-bottom: clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: clamp(32px, 4.4vw, 48px);
}

.post-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 22px;
}

.post-head h1 {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(33px, 4.9vw, 57px);
  line-height: 1.16;
  letter-spacing: -0.028em;
}

.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-soft);
}

.avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--serif);
  font-size: 14px;
  text-transform: uppercase;
}

.byline-sep {
  width: 1px;
  height: 12px;
  background: var(--line);
}

.byline-actions {
  margin-left: auto;
}

.text-btn {
  padding: 0;
  border: 0;
  background: none;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.text-btn:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.prose {
  font-size: clamp(16px, 1.32vw, 18px);
  line-height: 1.95;
  letter-spacing: 0.005em;
  color: var(--ink);
}

.prose > p {
  margin: 0 0 1.55em;
}

.prose > p:first-of-type::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.7em;
  line-height: 0.82;
  padding: 0.08em 0.14em 0 0;
}

.prose h2 {
  margin: 2.1em 0 0.75em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5em;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.prose blockquote {
  margin: 1.9em 0;
  padding: 2px 0 2px 22px;
  border-left: 2px solid var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08em;
  color: var(--ink-soft);
}

.prose hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 2.6em 0;
}

/* ---------- Like ---------- */

.like-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: clamp(48px, 7vw, 76px) 0 clamp(44px, 6vw, 68px);
  padding: clamp(36px, 5vw, 52px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.like-btn {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  transition: background-color 0.28s var(--ease), color 0.28s var(--ease), transform 0.28s var(--ease);
}

.like-btn svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s var(--ease);
}

.like-btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.like-btn:hover svg {
  transform: scale(1.08);
}

.like-btn.liked {
  background: var(--ink);
  color: var(--bg);
  cursor: default;
  opacity: 1;
}

.like-btn.liked svg {
  fill: currentColor;
}

.like-hint {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 17px;
}

.like-count {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Comments ---------- */

.comments-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.comments-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 27px;
  letter-spacing: -0.02em;
}

.comment-form {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--card);
  margin-bottom: 34px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.input,
.textarea {
  width: 100%;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s var(--ease);
}

.input:focus,
.textarea:focus {
  border-bottom-color: var(--ink);
}

.textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.75;
}

.comment-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-note {
  font-size: 11px;
  color: var(--ink-faint);
}

.btn-small {
  padding: 11px 18px;
  font-size: 11px;
}

.comment {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0 18px;
}

.comment-thread {
  border-bottom: 1px solid var(--line);
}

.comment-thread > .comment:last-child {
  padding-bottom: 24px;
}

.replies {
  margin: 0 0 0 22px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.comment-reply {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 0;
}

.comment-reply:last-child {
  padding-bottom: 24px;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.me-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  vertical-align: 1px;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

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

.reply-form {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.reply-input {
  min-height: 68px;
  font-size: 13px;
}

.reply-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

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

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 7px;
}

.comment-author {
  font-size: 13px;
  font-weight: 600;
}

.comment-time {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.comment-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-mid);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comments-empty {
  padding: 30px 0 42px;
  color: var(--ink-faint);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

/* ---------- Write ---------- */

.write-view {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 74px);
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) 26px 40px;
}

.write-head {
  margin-bottom: clamp(36px, 5vw, 54px);
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-strong);
}

.write-head h1 {
  margin: 16px 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5.2vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.write-head p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.write-form {
  display: grid;
  grid-template-rows: auto minmax(300px, 1fr) auto auto;
  flex: 1;
  gap: 6px;
}

.title-input {
  width: 100%;
  padding: 10px 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(26px, 3.6vw, 38px);
  letter-spacing: -0.02em;
  outline: none;
  transition: border-color 0.25s var(--ease);
}

.title-input::placeholder,
.author-input::placeholder,
.content-input::placeholder {
  color: var(--ink-faint);
}

.title-input:focus,
.author-input:focus,
.content-input:focus {
  border-color: var(--ink);
}

.author-input {
  width: 260px;
  max-width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 13px;
  outline: none;
  transition: border-color 0.25s var(--ease);
}

.content-input {
  width: 100%;
  min-height: 46vh;
  padding: 26px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.95;
  resize: none;
  outline: none;
  transition: border-color 0.25s var(--ease);
}

.write-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0 4px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.write-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 2px;
  font-size: 11px;
  color: var(--ink-faint);
}

.write-meta strong {
  font-weight: 500;
  color: var(--ink);
}

.counter {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.counter-num {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0;
  color: var(--ink);
}

.counter.ready .counter-num {
  color: var(--ink);
}

.counter-bar {
  width: 90px;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}

.counter-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 0.3s var(--ease);
}

/* ---------- Me ---------- */

.me-view {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) 26px 100px;
}

.me-head {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line-strong);
}

.me-head h1 {
  margin: 16px 0 30px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5.2vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.name-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.name-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

.name-info strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.25;
}

.avatar-lg {
  width: 46px;
  height: 46px;
  font-size: 17px;
}

.name-row .btn {
  margin-left: 6px;
}

.me-note {
  margin: 18px 0 0;
  max-width: 54ch;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.name-form {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  flex-wrap: wrap;
}

.name-input {
  flex: 1;
  min-width: 170px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  font-family: var(--serif);
  font-size: 19px;
  outline: none;
}

.tabbar {
  align-items: center;
  margin-top: 34px;
  padding-bottom: 0;
  border-bottom-color: var(--line);
}

.tabbar-items {
  display: flex;
  gap: 28px;
}

.tabbar-arrows {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  border: 0;
  background: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  transition: color 0.2s var(--ease);
}

.tab span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0;
}

.tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--ink);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

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

.tab.active {
  color: var(--ink);
}

.tab.active::after {
  height: 2px;
  opacity: 1;
}

.tab-panel {
  padding-top: 8px;
}

.tab-panel[hidden] {
  display: none;
}

@keyframes panelInLeft {
  from {
    opacity: 0;
    transform: translateX(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes panelInRight {
  from {
    opacity: 0;
    transform: translateX(-22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.tab-panel.slide-left {
  animation: panelInLeft 0.32s var(--ease);
}

.tab-panel.slide-right {
  animation: panelInRight 0.32s var(--ease);
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--ink-faint);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.icon-action svg {
  width: 15px;
  height: 15px;
}

.icon-action:hover {
  color: var(--ink);
  border-color: var(--line);
}

.icon-danger:hover {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}

.manage-row {
  position: relative;
}

.manage-row .manage-link {
  padding-right: 48px;
}

.delete-btn {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.delete-btn svg {
  width: 16px;
  height: 16px;
}

.manage-row:hover .delete-btn,
.delete-btn:focus-visible {
  opacity: 1;
}

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

@media (hover: none) {
  .comment-actions {
    opacity: 1;
  }

  .delete-btn {
    opacity: 0.55;
  }
}

/* ---------- States ---------- */

.skeleton {
  padding: clamp(50px, 8vw, 100px) var(--pad);
}

.skeleton-line {
  height: 14px;
  margin-bottom: 14px;
  background: var(--line);
  animation: pulse 1.4s ease-in-out infinite;
  border-radius: 2px;
}

.skeleton-line.w-40 {
  width: 40%;
}

.skeleton-line.w-70 {
  width: 70%;
}

.skeleton-line.w-90 {
  width: 90%;
}

.skeleton-line.tall {
  height: 46px;
  margin: 26px 0;
}

.skeleton-line.tall.w-70 {
  width: 70%;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.error-view {
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(80px, 14vw, 160px) 26px;
  text-align: center;
}

.error-code {
  font-family: var(--serif);
  font-size: clamp(72px, 14vw, 132px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink-faint);
}

.error-view h1 {
  margin: 18px 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
}

.error-view p {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 200;
  transform: translate(-50%, 18px);
  padding: 13px 24px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  letter-spacing: 0.05em;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  max-width: calc(100vw - 40px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 30px var(--pad);
}

.footer-inner {
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-mark {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.12em;
}

.footer-note {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* ---------- Animation ---------- */

.fade-up {
  animation: fadeUp 0.55s var(--ease) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .topbar-date {
    display: none;
  }

  .post-row a {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 16px;
    padding: 24px 0;
  }

  .post-side {
    gap: 16px;
  }

  .metric svg {
    width: 13px;
    height: 13px;
  }

  .post-excerpt {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 620px) {
  .topbar {
    height: 64px;
    gap: 10px;
  }

  .brand-rule {
    display: none;
  }

  .brand {
    gap: 7px;
  }

  .brand-sub {
    font-size: 8px;
    letter-spacing: 0.22em;
  }

  .brand-mark {
    font-size: 21px;
  }

  .btn {
    padding: 10px 14px;
    font-size: 11px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .hero-meta {
    margin-bottom: 34px;
  }

  .hero-foot {
    gap: 28px;
  }

  .hero-stats {
    width: 100%;
    justify-content: space-between;
    gap: 18px;
    padding-top: 4px;
  }

  .stat-num {
    font-size: 24px;
  }

  .post-row a {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .post-side {
    gap: 12px;
    font-size: 10px;
  }

  .metric {
    gap: 4px;
  }

  .index-num {
    font-size: 10px;
    padding-top: 7px;
  }

  .post-main h3 {
    font-size: 21px;
  }

  .post-excerpt {
    font-size: 13px;
  }

  .post-view,
  .write-view {
    padding-left: 20px;
    padding-right: 20px;
  }

  .write-view {
    min-height: calc(100vh - 64px);
  }

  .prose > p:first-of-type::first-letter {
    font-size: 3.2em;
  }

  .byline {
    flex-wrap: wrap;
    gap: 9px;
  }

  .comment-form {
    padding: 16px;
  }

  .comment-form-foot {
    align-items: flex-end;
  }

  .write-bar {
    gap: 12px;
  }

  .counter-bar {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  #app {
    min-height: calc(100vh - 145px);
  }

  .me-view {
    padding-left: 20px;
    padding-right: 20px;
  }

  .name-row .btn {
    margin-left: 0;
  }

  .tabbar {
    margin-top: 28px;
  }

  .tabbar-items {
    gap: 22px;
  }

  .manage-row .manage-link {
    padding-right: 34px;
  }

  .byline-actions {
    margin-left: auto;
    width: auto;
    padding-top: 0;
  }
}
