:root {
  color-scheme: light;

  --bg:              #f9f5f3;
  --bg-soft:         #f2eae6;
  --surface:         #ffffff;
  --surface-2:       #f6f1ee;
  --text:            #211d17;
  --text-2:          #5f574a;
  --text-3:          #736a59;
  --border:          #e5d9d2;
  --border-strong:   #d1c1b7;

  --accent:          #d6381b;
  --accent-text:     #b62d11;
  --accent-hover:    #bf3013;
  --accent-soft:     #fbe9e4;
  --accent-ink:      #ffffff;

  --accent-deep:     #8f1f0c;
  --cover-a:         #b5aa9c;
  --cover-b:         #5b544a;
  --cover-warm-a:    #cf8068;
  --cover-warm-b:    #4d1508;

  --cat-skill:       #b62d11;
  --cat-life:        #527a52;

  --shadow-sm:  0 1px 2px rgba(33, 29, 23, .05);
  --shadow:     0 1px 2px rgba(33, 29, 23, .05), 0 10px 28px -14px rgba(33, 29, 23, .18);
  --shadow-lg:  0 2px 4px rgba(33, 29, 23, .05), 0 24px 56px -28px rgba(33, 29, 23, .3);

  --shadow-card: 0 1px 2px rgba(33, 29, 23, .05), 0 4px 12px -8px rgba(33, 29, 23, .16);

  --radius:     14px;
  --radius-sm:  9px;
  --radius-pill: 999px;

  --sans: "PuHuiTi", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;

  --mono: ui-monospace, "SF Mono", "Cascadia Code",
          "Cascadia Mono", Consolas, "Liberation Mono",
          "PuHuiTi", sans-serif;

  --maxw: 1080px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg:              #131110;
  --bg-soft:         #1a1815;
  --surface:         #231f1b;
  --surface-2:       #2e2923;
  --text:            #efe8dc;
  --text-2:          #c6bcaa;
  --text-3:          #a1968a;
  --border:          #3f382f;
  --border-strong:   #544b3f;

  --accent:          #ff6b4a;
  --accent-text:     #ff8468;
  --accent-hover:    #ff8161;
  --accent-soft:     #3b1a13;
  --accent-ink:      #1a0906;

  --cat-skill:       #ff8468;
  --cat-life:        #8dbb8c;

  --shadow-sm:  0 1px 2px rgba(0, 0, 0, .5);
  --shadow:     0 1px 2px rgba(0, 0, 0, .5), 0 10px 28px -14px rgba(0, 0, 0, .8);
  --shadow-lg:  0 2px 4px rgba(0, 0, 0, .5), 0 24px 56px -28px rgba(0, 0, 0, .9);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, .45);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
  transition: background-color .28s var(--ease), color .28s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (hover: hover) and (pointer: fine) {
  * { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border: 3px solid var(--bg);
    border-radius: 999px;
  }
}

.wrap {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

.mono { font-family: var(--mono); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow::before {
  content: "";
  width: 1.4em;
  height: 1px;
  background: var(--border-strong);
}

.cat {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .03em;
  color: var(--cat-skill);
  white-space: nowrap;
}
.cat::before { content: "["; opacity: .45; }
.cat::after  { content: "]"; opacity: .45; }

.dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--border-strong);
  display: inline-block;
  vertical-align: middle;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .55rem 1.05rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .02em;
  color: var(--text-2);
  background: var(--surface);
  transition: all .2s var(--ease);
}
.btn:hover {
  color: var(--accent-text);
  border-color: var(--accent-text);
  transform: translateY(-1px);
}
.btn--solid {
  background: var(--accent);
  border-color: var(--accent-text);
  color: var(--accent-ink);
}
.btn--solid:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-ink);
}

.icon {
  display: inline-block;
  flex: none;
  width: 1em; height: 1em;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  vertical-align: -.12em;
}
.icon-arrow-up { --icon: url("../images/arrow-up.svg"); }
.icon-arrow-right { --icon: url("../images/arrow-right.svg"); }
.icon-arrow-out { --icon: url("../images/arrow-out.svg"); }
.icon-chevron-down { --icon: url("../images/chevron-down.svg"); }
.icon-close { --icon: url("../images/close.svg"); }
.icon-menu { --icon: url("../images/menu.svg"); }
.icon-sun { --icon: url("../images/sun.svg"); }
.icon-moon { --icon: url("../images/moon.svg"); }

.icon-btn {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--text-2);
  transition: all .2s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--accent-text); }
.icon-btn .icon { width: 19px; height: 19px; }

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

.avatar-letter {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .92);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--border); }

@media (max-width: 900px) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
  flex-shrink: 0;
}
.brand-prompt { color: var(--accent-text); font-weight: 700; }
.brand-name { color: var(--text); }
.brand-caret {
  width: 7px; height: 1.05em;
  background: var(--accent);
  animation: blink 1.15s step-end infinite;
  translate: 0 1px;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}

.nav > a {
  position: relative;
  padding: .42rem .8rem;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  color: var(--text-2);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.nav > a:hover { color: var(--text); background: var(--surface-2); }
.nav > a.is-active { color: var(--text); font-weight: 600; }
.nav > a.is-active::after {
  content: "";
  position: absolute;
  left: .8rem; right: .8rem; bottom: .1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: .3rem; }
.nav-toggle { display: none; }

.nav--mobile { display: none; }

.nav-head { display: none; }

.hero {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  top: -20%; right: -8%;
  width: 460px; height: 460px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 68%);
  opacity: .85;
  pointer-events: none;
  z-index: -1;
}
.hero-prompt {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text-3);
  letter-spacing: .02em;
  margin-bottom: 1.6rem;
}
.hero-prompt .hero-user { color: var(--text-2); font-weight: 600; }
.hero-prompt b { color: var(--accent-text); font-weight: 600; }
.hero-caret {
  display: inline-block;
  width: 6px;
  height: .95em;
  margin-left: .5rem;
  background: var(--accent);
  vertical-align: -.12em;
}
.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.hero-tagline {
  font-family: var(--mono);
  font-size: clamp(.88rem, 1.6vw, 1.02rem);
  color: var(--text-2);
  letter-spacing: .06em;
  margin-bottom: 1.9rem;
}
.hero-motto {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text-3);
  padding: .5rem .85rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}
.hero-motto span { color: var(--accent-text); }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.4rem;
  align-items: center;
}
.hero-panel { display: none; }
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; }
  .hero-panel { display: block; }
}
@media (min-width: 1200px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) 392px; gap: 4rem; }
}

.term {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .55rem .85rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.term-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  opacity: .8;
}
.term-dot:first-child { background: var(--accent); opacity: .5; }
.term-file {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--text-3);
}
.term-body {
  margin: 0;
  padding: 1rem 1.1rem 1.1rem;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.9;
  color: var(--text-2);
  overflow-x: auto;
}
.term-body code {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  white-space: pre;
}
.term-cmd { color: var(--accent-text); }
.term-k { color: var(--accent-text); }
.term-v { color: var(--text); }
.term-caret {
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 1px;
  background: var(--accent);
  vertical-align: -1px;
  animation: termCaret 1.1s steps(1) infinite;
}
@keyframes termCaret {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (hover: none), (pointer: coarse) {
  .pager a:hover, .post-nav a:hover, .to-top:hover .icon,
  .prose img:hover, .moment-img:hover, .post-ref:hover .post-ref-more .icon { transform: none; }
  .book-card:hover, .movie-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
  .book-card:hover .cover-img, .movie-card:hover .cover-img { scale: 1; }
  .hero-panel:hover .term { transform: none; box-shadow: var(--shadow); }
  .link-card:hover { border-color: var(--border); box-shadow: none; }
  .link-card:hover .link-avatar,
  .profile-card:hover .avatar { transform: none; }
  .moment-img:hover { filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .term-caret { animation: none; }
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  padding: 3.5rem 0 5rem;
}
@media (min-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr) 292px; gap: 3.5rem; }
}
.layout--full { grid-template-columns: minmax(0, 1fr); }
.main-col { min-width: 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .9rem;
  margin-bottom: 2.2rem;

  border-bottom: 1px solid var(--border-strong);
}
.section-head h2 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.section-head h2::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--accent);
  rotate: 45deg;
}
.section-head .more {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text-3);
  transition: color .18s var(--ease);
}
.section-head .more:hover { color: var(--accent-text); }

.featured,
.profile-card,
.link-card,
.book-card,
.movie-card {
  box-shadow: var(--shadow-card);
}

.featured {
  position: relative;
  display: block;
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 2.6rem;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.featured::before {
  content: "";
  position: absolute; inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent 72%);
}
.featured:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: .25rem .6rem;
  border-radius: 4px;
  margin-bottom: 1.1rem;
}
.featured h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.35;
  letter-spacing: -.022em;
  font-weight: 600;
  margin-bottom: .8rem;
}

.featured p {
  color: var(--text-2);
  font-size: .9rem;
  line-height: 1.75;
  margin-bottom: 1.3rem;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.featured-meta {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--text-3);
}

.post-list { display: flex; flex-direction: column; gap: 1rem; }

.post-item {
  position: relative;
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);

  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.post-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.post-item-meta {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--text-3);
  margin-bottom: .7rem;
}
.post-item-title {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  line-height: 1.45;
  letter-spacing: -.015em;
  font-weight: 600;
  margin-bottom: .6rem;
}
.post-item-title a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .32s var(--ease), color .2s var(--ease);
}
.post-item:hover .post-item-title a,
.post-item-title a:hover {
  color: var(--accent-text);
  background-size: 100% 1px;
}
.post-item-excerpt {
  color: var(--text-2);
  font-size: .93rem;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .9rem;
}
.post-item-tags a {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--text-3);
  padding: .16rem .5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all .18s var(--ease);
}
.post-item-tags a:hover {
  color: var(--accent-text);
  border-color: var(--accent-text);
  background: var(--accent-soft);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--text-3);
}
.pager a {
  min-width: 32px; height: 32px;
  display: grid; place-items: center;
  padding: 0 .55rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform .22s var(--ease-out), border-color .22s, color .22s;
}
.pager a:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-2px); }

.pager--comments { margin-top: 1.8rem; padding-top: 1.2rem; }

.pager:empty { display: none; }

.sidebar { display: flex; flex-direction: column; gap: 1.4rem; }

@media (min-width: 1024px) {
  .sidebar {
    position: sticky;
    top: 92px;
    align-self: start;
  }
}
@media (min-width: 1024px) {
  .sidebar { position: sticky; top: 92px; align-self: start; }
}

.sidebar .widget {
  padding: 1.3rem 1.35rem 1.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.widget-title {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-bottom: .6rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.profile-card {
  text-align: center;
  padding: 1.9rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.avatar {
  position: relative;
  width: 68px; height: 68px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.avatar-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.profile-name { font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; }
.profile-bio {
  font-size: .84rem;
  color: var(--text-2);
  margin: .45rem 0 1.1rem;
  line-height: 1.65;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--border);
}
.profile-stats div { display: flex; flex-direction: column; gap: .1rem; }
.profile-stats b { font-family: var(--mono); font-size: 1.05rem; font-weight: 600; }
.profile-stats span { font-size: .7rem; color: var(--text-3); }

.profile-picks {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: left;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag-cloud a {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--text-2);
  padding: .28rem .6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all .18s var(--ease);
}
.tag-cloud a:hover {
  color: var(--accent-text);
  border-color: var(--accent-text);
  background: var(--accent-soft);
}

.mini-list { display: flex; flex-direction: column; gap: .8rem; }
.mini-list a { display: block; font-size: .8125rem; line-height: 1.5; color: var(--text-2); transition: color .18s; }
.mini-list a:hover { color: var(--accent-text); }

.mini-title { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 3.2rem 0 2rem;
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.footer-brand {
  position: relative;
  padding-bottom: 1.15rem;
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.footer-brand span { color: var(--accent-text); }

.footer-brand::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 26px; height: 2px;
  translate: -50% 0;
  border-radius: 2px;
  background: var(--accent);
  opacity: .8;
}
.footer-desc {
  max-width: 38ch;
  margin: 1.25rem auto 0;
  font-size: .92rem;
  line-height: 1.9;
  letter-spacing: .05em;
  color: var(--text-2);
}

.footer-desc::before {
  content: "//";
  margin-right: .55rem;
  font-family: var(--mono);
  font-size: .85em;
  color: var(--accent-text);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .2rem .1rem;
  margin-top: .35rem;
  font-size: .8rem;
}
.footer-social a {
  padding: .2rem .7rem;
  color: var(--text-3);
  transition: color .18s;
}
.footer-social a:hover { color: var(--accent-text); }
.footer-sep {
  display: inline-block;
  width: 1px;
  height: .72em;
  background: var(--border-strong);
}

.footer-social i:last-child { display: none; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .4rem 1.2rem;
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .02em;
  color: var(--text-3);
}
.footer-bottom a:hover { color: var(--accent-text); }

.footer-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .45rem;
  font-size: .66rem;
  color: color-mix(in srgb, var(--text-3) 82%, var(--bg));
}
.footer-meta a { color: inherit; }
.footer-dot { color: var(--border-strong); }

.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 80;
  transition: width .1s linear;
}

.article-head {
  padding: 3rem 0 2.2rem;
  border-bottom: 1px solid var(--border);
}

.article-head + .prose { padding-top: 2.2rem; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--text-3);
  margin-bottom: 1.5rem;
}
.breadcrumb a:hover { color: var(--accent-text); }
.article-title {
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  line-height: 1.32;
  letter-spacing: -.03em;
  font-weight: 600;
  margin-bottom: 1.35rem;
  text-wrap: pretty;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text-3);
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  padding: 1.5rem 0 5rem;
}
.post-main { min-width: 0; }

@media (min-width: 1024px) {
  .post-layout {
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 3.5rem;
  }

  .post-layout .article-head,
  .post-layout .prose,
  .post-layout .comments,
  .layout .prose,
  .layout .comments { max-width: none; }
}


.toc {
  display: none;
}
@media (min-width: 1024px) {
  .js .toc {
    display: block;
    position: sticky;
    top: 96px;
    align-self: start;

    margin-top: clamp(1.8rem, 4.5vw, 3rem);
    max-height: calc(100vh - 120px);
    overflow-y: auto;

    overflow-x: hidden;
    padding-left: 1.1rem;
    border-left: 1px solid var(--border);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }
  .toc::-webkit-scrollbar { width: 4px; }
  .toc::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
}
.toc-title {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: .9rem;
}

.toc ol { display: flex; flex-direction: column; gap: .1rem; }
.toc a {
  display: block;
  font-size: .82rem;
  line-height: 1.55;
  padding: .3rem 0;
  color: var(--text-2);
  border-left: 2px solid transparent;

  margin-left: -1.1rem;
  padding-left: 1.1rem;

  margin-right: 3px;
  transition: all .18s var(--ease);
}
.toc a:hover { color: var(--text); }
.toc a.is-active {
  color: var(--accent-text);
  border-left-color: var(--accent-text);
  font-weight: 600;
}
.toc .lvl-3 a { padding-left: 2rem; font-size: .78rem; color: var(--text-3); }

.prose {
  max-width: 36em;
  font-size: .9375rem;
  line-height: 1.8;
  color: var(--text);
  text-wrap: pretty;
  hanging-punctuation: first allow-end last;
}
.prose--wide { max-width: none; }
.prose > * + * { margin-top: 1.35em; }
@media (max-width: 560px) {
  .prose { font-size: 1rem; }
}

.prose h2 {
  font-size: 1.1875rem;
  line-height: 1.45;
  letter-spacing: -.02em;
  font-weight: 600;
  margin-top: 1.9em;
  text-wrap: balance;
  padding-top: .2em;
  scroll-margin-top: 96px;
}
.prose h2::before {
  content: "## ";
  font-family: var(--mono);
  color: var(--accent-text);
  opacity: .5;
  font-size: .8em;
}
.prose h3 {
  font-size: 1.03125rem;
  font-weight: 600;
  margin-top: 1.55em;
  scroll-margin-top: 96px;
  text-wrap: balance;
}
.prose h4 { font-size: .9375rem; font-weight: 600; margin-top: 1.3em; }

.prose a {
  color: var(--accent-text);
}

.prose p { color: var(--text); }
.prose strong { font-weight: 600; }

.prose ul, .prose ol { padding-left: 1.5em; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; }
.prose ul > li::before {
  content: "▸";
  position: absolute;
  left: -1.2em;
  color: var(--accent-text);
  font-size: .9em;
}
.prose ol { list-style: decimal; }
.prose ol > li::marker { color: var(--accent-text); font-family: var(--mono); font-size: .9em; }
.prose li + li { margin-top: .5em; }

.prose blockquote {
  padding: 1.1rem 1.4rem;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2);
  font-size: .96rem;
}
.prose blockquote p { color: inherit; }
.prose blockquote > * + * { margin-top: .8em; }

.prose blockquote > :first-child { margin-top: 0; }
.prose blockquote h2 {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-top: 0;
}
.prose blockquote h2::before { content: none; }
.prose blockquote h3 { font-size: 1rem; margin-top: 0; }

.prose blockquote dl { font-size: .92rem; margin: .1em 0; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.prose .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.prose .table-wrap > table { margin: 0; }
.prose thead { background: var(--surface-2); }
.prose th {
  text-align: left;
  font-weight: 600;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-2);
}
.prose th, .prose td {
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--border);
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: var(--surface-2); }

.prose img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  width: 100%;
  cursor: zoom-in;
}

.prose figure { margin: 1.8em 0; }
.prose figcaption {
  margin-top: .7rem;
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--text-3);
  text-align: center;
}

.prose hr {
  margin: 2.4em 0;
  border-top: 1px dashed var(--border-strong);
}

.prose kbd {
  font-family: var(--mono);
  font-size: .8em;
  padding: .15em .45em;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface-2);
}

.prose :not(pre) > code {
  font-family: var(--mono);
  font-size: .86em;
  padding: .12em .4em;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  word-break: break-word;
}

.code-block {
  position: relative;
  margin: 1.8em 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
}

.code-body {
  position: relative;
  display: flex;
  align-items: flex-start;
  overflow-x: auto;

  overflow-y: hidden;
  transition: max-height .42s var(--ease-out);
}

.code-lines {
  position: sticky;
  left: 0;
  z-index: 1;
  flex: none;
  padding: 1.15rem .75rem 1.15rem 1.05rem;
  background: var(--surface-2);
  box-shadow: 1px 0 0 var(--border);
  font-family: var(--mono);
  font-size: .875rem;
  line-height: 1.72;
  text-align: right;
  white-space: pre;
  color: var(--text-3);

  user-select: none;
  -webkit-user-select: none;
}
.code-block pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 1.15rem 1.25rem;
  overflow: visible;
  font-size: .875rem;
  line-height: 1.72;
  tab-size: 2;
}
.code-block pre code {
  font-family: var(--mono);
  background: none;
  padding: 0;
  border: 0;
  font-size: inherit;
  color: inherit;
}

.code-fold {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 130px;
  padding-bottom: .8rem;
  background: linear-gradient(to bottom, transparent, var(--surface-2) 76%);
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.code-fold.is-gone { opacity: 0; }
.code-fold-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .34rem .88rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .05em;
  color: var(--text-2);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.code-fold-btn:hover {
  color: var(--accent-text);
  border-color: var(--accent-text);
  background: var(--surface-2);
}
.code-fold-btn .icon {
  width: 12px; height: 12px;
  transition: transform .3s var(--ease-out);
}
.code-fold-btn:hover .icon { transform: translateY(2px); }
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .4rem .75rem .4rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.code-lang {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--text-3);
  padding: .2rem .5rem;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all .18s var(--ease);
}
.copy-btn:hover { color: var(--accent-text); border-color: var(--border-strong); }
.copy-btn.is-copied { color: var(--cat-life); border-color: currentColor; }

.article-foot {
  margin-top: 3.2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
}
.article-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.article-tags a {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--text-2);
  padding: .25rem .65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all .18s var(--ease);
}
.article-tags a:hover { color: var(--accent-text); border-color: var(--accent-text); background: var(--accent-soft); }

.post-item-tags a::before,
.article-tags a::before { content: "#"; }

.copyright {
  padding: 1.1rem 1.3rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  color: var(--text-2);
  line-height: 1.8;
  background: var(--surface-2);
}
.copyright .mono { font-size: .78rem; color: var(--text-3); }

.post-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  margin-top: 2rem;
}

.post-nav > span { display: contents; }

@media (min-width: 640px) {
  .post-nav { grid-template-columns: 1fr 1fr; }
  .post-nav .post-nav-next a { text-align: right; align-items: flex-end; }
}
.post-nav a {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: all .2s var(--ease);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.5;
}
.post-nav a:hover { border-color: var(--accent-text); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.post-nav a::before {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.post-nav-prev a::before { content: "← 上一篇"; }
.post-nav-next a::before { content: "下一篇 →"; }

.prose .post-nav a {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.15rem;
  color: var(--text);
}
.prose .post-nav a:hover { background: var(--surface); border-color: var(--accent-text); }

.post-nav a { min-width: 0; overflow-wrap: anywhere; }

.page-head {
  position: relative;
  padding: clamp(3rem, 7vw, 5rem) 0 2rem;
  border-bottom: 1px solid var(--border);
}

.page-head-mark {
  --mark-ink: color-mix(in srgb, var(--text-3) 62%, var(--bg));
  display: none;
  position: absolute;
  right: 0;
  bottom: 1.75rem;
  width: max-content;
  pointer-events: none;
  user-select: none;
  font-family: var(--mono);
  font-size: clamp(3.1rem, 6.1vw, 5.1rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(90deg, transparent 0%, var(--mark-ink) 62%, var(--mark-ink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
@media (min-width: 1024px) {
  .page-head-mark { display: block; }
}
.page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -.033em;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: .8rem;
}
.page-desc { color: var(--text-2); font-size: 1rem; max-width: 680px; }

.archive-body { max-width: none; }

.archive-year { margin-bottom: 3rem; }

:is(.year-label, .card-group-title) {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  margin-bottom: 1.4rem;
}
:is(.year-label, .card-group-title) > span {
  font-family: var(--mono);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--text);
}
:is(.year-label, .card-group-title) > em {
  font-family: var(--mono);
  font-style: normal;
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--text-3);
}

:is(.year-label, .card-group-title) > em:empty { display: none; }
:is(.year-label, .card-group-title)::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
  translate: 0 -.35em;
}

.timeline { border-left: 1px solid var(--border-strong); padding-left: 0; }
.tl-item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .85rem .6rem .85rem 1.7rem;
  border-radius: var(--radius-sm);
  transition: background-color .18s var(--ease);
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -4px; top: 1.35rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: all .2s var(--ease);
}
.tl-item:hover { background: var(--surface-2); }
.tl-item:hover::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-item time {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text-3);
  flex-shrink: 0;
  width: 3.2em;
}
.tl-item a {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  transition: color .18s;
  flex: 1;
}
.tl-item a:hover { color: var(--accent-text); }
.tl-item .cat {
  font-size: .66rem;
  flex-shrink: 0;
  padding: .1rem .45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-3);
}

.proj-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.2rem;
  align-items: start;
}
@media (min-width: 620px) { .proj-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) {
  .proj-grid { grid-template-columns: repeat(3, 1fr); }
  .proj-grid:has(> .proj-card:nth-child(2):last-child),
  .proj-grid:has(> .proj-card:nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); }
}

.proj-card {
  display: flex;
  flex-direction: column;
  height: 11.75rem;
  overflow: hidden;
  padding: 1.15rem 1.2rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(33, 29, 23, .045),
    0 1px 2px rgba(33, 29, 23, .03),
    0 8px 20px -14px rgba(33, 29, 23, .22);
  transition: transform .34s cubic-bezier(.22, .72, .3, 1),
              box-shadow .34s cubic-bezier(.22, .72, .3, 1);
}
.proj-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(33, 29, 23, .055),
    0 2px 5px rgba(33, 29, 23, .05),
    0 20px 36px -20px rgba(33, 29, 23, .32);
}
[data-theme="dark"] .proj-card {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .05),
    0 12px 24px -18px rgba(0, 0, 0, .7);
}
[data-theme="dark"] .proj-card:hover {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .07),
    0 20px 38px -20px rgba(0, 0, 0, .8);
}

.proj-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
}
.proj-name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -.018em;
  line-height: 1.35;
}
.proj-page .proj-name {
  margin: 0;
  min-width: 0;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -.018em;
  line-height: 1.35;
}
.proj-page .proj-name::before { content: none; }
.proj-page .proj-name a {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  color: inherit;
  text-decoration: none;
  background-image: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.proj-page .proj-name a:hover { color: var(--accent-text); border-color: currentColor; }
.proj-page .proj-repo {
  font-size: .74em;
  opacity: .55;
  transition: opacity .2s;
}
.proj-page .proj-name a:hover .proj-repo { opacity: 1; }
.proj-page .proj-desc {
  margin: .62rem 0 0;
  font-size: .84rem;
  line-height: 1.8;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 3.024rem;
}
.proj-page .proj-tags {
  margin: .8rem 0 0;
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: .25rem .55rem;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .04em;
  color: var(--text-3);
}
.proj-page .proj-tags span + span::before {
  content: "·";
  margin-right: .55rem;
  color: var(--border-strong);
}
.proj-page .proj-links {
  margin: 0;
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .1rem .6rem;
}
.proj-page .proj-links a {
  background-image: none;
  font-size: .74rem;
  line-height: 1.5;
  color: var(--text-3);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.proj-page .proj-links a:hover { color: var(--accent-text); border-color: currentColor; }

.proj-page .proj-posts {
  margin: .9rem 0 0;
  display: flex;
  align-items: baseline;
  gap: .25rem .4rem;
  font-size: .76rem;
  line-height: 1.7;
  min-height: 1.3rem;
  overflow: hidden;
}
.proj-page .proj-posts-label {
  flex: none;
  font-size: .72rem;
  color: var(--text-3);
}
.proj-page .proj-posts a {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-2);
  text-decoration: none;
  background-image: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.proj-page .proj-posts a:hover { color: var(--accent-text); border-color: currentColor; }

.links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 620px) { .links-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .links-grid { grid-template-columns: repeat(3, 1fr); } }

.media-loading, .media-error { padding: 2.6rem 0; color: var(--text-2); font-size: .92rem; }

.media-note {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: .9rem 0 0;
  padding: .16rem .58rem .16rem .5rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-family: var(--mono);
  font-size: .64rem;
  line-height: 1.7;
  letter-spacing: .02em;
  color: var(--text-3);
}
.media-note[hidden] { display: none; }
.media-note::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text-3) 50%, transparent);
}
.media-note.is-stale {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}
.media-note.is-stale::before { background: var(--accent); }
.card-group { margin-bottom: 3.5rem; }

.page-head + .card-group { margin-top: 2.4rem; }

.link-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease),
              opacity .18s var(--ease);
  align-self: start;
}
.link-card.is-covered { opacity: 0; }

.link-card:hover, .link-card:focus-visible {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.link-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.link-card--gone { cursor: default; }
.link-card--gone:hover { border-color: var(--border); box-shadow: none; }

.link-card--gone .link-shot {
  background-image:
    url("../images/offline.svg"),
    linear-gradient(135deg, var(--cover-a), var(--cover-b));
  background-size: cover, auto;
  background-position: 50% 0, 0 0;
  background-repeat: no-repeat, no-repeat;
}
.link-card--gone .link-shot::before { content: none; }

[data-theme="dark"] .link-card--gone .link-shot { filter: brightness(.68) saturate(.8); }

.link-shot {
  height: 96px;
  position: relative;
  background: linear-gradient(135deg, var(--cover-a), var(--cover-b));
  overflow: hidden;
  isolation: isolate;
}

.link-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 78%);
  transition: opacity .4s var(--ease);
}
.link-shot.is-loaded::before { opacity: 0; }

.shot-img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.shot-img.is-loaded { opacity: 1; }

.shot-scan {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background-image:
    linear-gradient(100deg, transparent 32%, rgba(255,255,255,.36) 50%, transparent 68%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.10) 0 1px, transparent 1px 4px);
  background-size: 60% 100%, 100% 100%;
  background-repeat: no-repeat, repeat;
  background-position: -70% 0, 0 0;
  transition: opacity .26s var(--ease);
}
.link-pop .link-shot.is-loading .shot-scan {
  opacity: 1;
  animation: shotScan 1.5s cubic-bezier(.45, 0, .55, 1) infinite;
}
@keyframes shotScan {
  from { background-position: -70% 0, 0 0; }
  to   { background-position: 170% 0, 0 0; }
}

.shot-state {
  position: absolute;
  left: 50%; top: 50%;
  translate: -50% -50%;
  z-index: 6;
  padding: .28rem .62rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .1em;
  white-space: nowrap;
  color: rgba(255, 255, 255, .94);
  background: rgba(24, 15, 6, .42);
  border: 1px solid rgba(255, 255, 255, .16);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.link-pop .link-shot.is-loading .shot-state,
.link-pop .link-shot.is-failed .shot-state {
  opacity: 1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

[data-theme="dark"] .shot-img { filter: brightness(.84) saturate(.92); }

.link-pop {
  position: fixed;
  z-index: 90;
  display: flex;
  flex-direction: column;
  margin: 0;
  width: 0;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) + 2px);
  background: var(--surface);
  box-shadow: 0 0 0 rgba(33, 29, 23, 0);
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  translate: 0 0;
  opacity: 0;
  transition: translate .5s var(--ease-pop),
              opacity .24s var(--ease),
              box-shadow .5s var(--ease-pop),
              border-color .38s var(--ease);
}

.link-pop.is-shown { visibility: visible; }
.link-pop.is-on {
  opacity: 1;
  translate: 0 -14px;
  border-color: color-mix(in srgb, var(--text) 24%, transparent);
  box-shadow:
    0 3px 8px rgba(33, 29, 23, .1),
    0 30px 60px -18px rgba(33, 29, 23, .36);
  pointer-events: auto;
  will-change: translate;
  transition: translate .5s var(--ease-pop),
              box-shadow .5s var(--ease-pop),
              border-color .38s var(--ease);
}
.link-pop.is-up.is-on { translate: 0 12px; }

.link-pop.is-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s var(--ease);
}
[data-theme="dark"] .link-pop.is-on {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, .55),
    0 24px 52px -16px rgba(0, 0, 0, .72);
}

.link-pop .link-shot {
  height: var(--shot-full, 240px);
  flex: none;
}
.link-pop .link-body { flex: none; }
.link-body { padding: 1.05rem 1.15rem 1.2rem; display: flex; gap: .8rem; }
.link-avatar {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 400;
  color: var(--accent-ink);
  background: linear-gradient(140deg, var(--cover-a), var(--cover-b));
  border: 1px solid rgba(255,255,255,.2);
}

.link-avatar::before { content: attr(data-letter); }
.link-favicon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  opacity: 0;
}
.link-avatar.has-favicon { background: var(--surface-2); }
.link-avatar.has-favicon::before { content: none; }
.link-avatar.has-favicon .link-favicon { opacity: 1; }

.link-card--gone .link-avatar {
  background: var(--surface-2);
  border-color: var(--border);
}
.link-card--gone .link-avatar::before {
  content: "";
  width: 20px;
  height: 20px;
  background: var(--text-3);
  opacity: .78;
  -webkit-mask: url("../images/offline-mark.svg") center / contain no-repeat;
  mask: url("../images/offline-mark.svg") center / contain no-repeat;
}

.link-card--gone:hover .link-avatar { transform: none; }
.link-name {
  font-weight: 600;
  font-size: .94rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .2rem;
}

.link-name .icon { width: 12px; height: 12px; color: var(--text-3); }
.link-desc {
  font-size: .82rem;
  color: var(--text-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  min-height: 3.2em;
}

.prose dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .55rem 1.15rem;
  margin: 1.5em 0;
  align-items: baseline;
}
.prose dl dt {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--text-3);
}
.prose dl dd {
  margin: 0;
  min-width: 0;
  color: var(--text);

  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .prose dl {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .prose dl dt { padding-top: .5rem; }
  .prose dl dd { margin-bottom: .45rem; }
}

.book-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
}
@media (min-width: 700px) { .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.book-card {
  display: flex;
  gap: .9rem;
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease);
}
.book-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }

.book-cover,
.poster {
  display: block;
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 4px;
  background: var(--cover-warm-b);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .16), 0 8px 18px -12px rgba(0, 0, 0, .55);
}
.book-cover { width: clamp(74px, 19vw, 96px); aspect-ratio: 1080 / 1532; }
@media (min-width: 1080px) { .book-cover { width: 88px; } }

.cover-ph {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: flex-end;
  padding: .5rem .4rem;
  background: linear-gradient(155deg, var(--cover-warm-a), var(--cover-warm-b));
}
.cover-ph em {
  font-style: normal;
  font-size: .58rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, .94);
  writing-mode: vertical-rl;
  max-height: 100%;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.cover-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: scale .5s var(--ease-out);
}
.cover-img.is-bad { opacity: 0; }
.book-card:hover .cover-img { scale: 1.045; }

.book-cover::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .4), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.cover-tag {
  position: absolute;
  z-index: 3;
  top: .3rem;
  left: .3rem;
  font-family: var(--mono);
  font-size: .56rem;
  letter-spacing: .04em;
  line-height: 1.5;
  padding: 0 .28rem;
  border-radius: 3px;
  background: rgba(14, 11, 8, .6);
  color: rgba(255, 255, 255, .92);
}
.cover-tag--want { background: color-mix(in srgb, var(--accent) 92%, transparent); color: var(--accent-ink); }
.cover-tag--doing { background: rgba(255, 255, 255, .94); color: var(--accent); }

.book-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.book-title {
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: .28rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-title a, .movie-title a { color: inherit; text-decoration: none; }
.book-title a:hover, .movie-title a:hover { color: var(--accent-text); }
.book-meta {
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--text-3);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-meta--sub { opacity: .82; }
.book-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  margin-top: .6rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}

.stars { font-size: .74rem; letter-spacing: .06em; color: var(--accent-text); }
.stars .empty { color: var(--border-strong); }
.stars--none {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .04em;
  color: var(--text-3);
}
.score {
  display: inline-flex;
  align-items: baseline;
  gap: .22rem;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--text-2);
  white-space: nowrap;
}
.score em {
  font-style: normal;
  font-size: .58rem;
  letter-spacing: .06em;
  color: var(--text-3);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}
@media (min-width: 640px) { .movie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 860px) { .movie-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 980px) { .movie-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.movie-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease);
}
.movie-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }

.poster { width: 100%; aspect-ratio: 1080 / 1532; border-radius: 0; box-shadow: none; }
.poster .cover-ph em {
  writing-mode: horizontal-tb;
  font-size: .7rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.movie-card:hover .cover-img { scale: 1.035; }

.movie-body { padding: .6rem .7rem .75rem; display: flex; flex-direction: column; flex: 1; }
.movie-title {
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: .22rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.movie-meta {
  font-family: var(--mono);
  font-size: .62rem;
  line-height: 1.7;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.movie-meta--sub { opacity: .8; }
.movie-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .3rem;
  margin-top: auto;
  padding-top: .5rem;
}
.movie-foot .stars { font-size: .68rem; }
.movie-foot .score { font-size: .64rem; }

.prose .post-timeline { margin-top: 3.6rem; }
.prose .post-timeline .post-timeline-title {
  font-size: 1.02rem;
  line-height: 1.4;
  letter-spacing: -.01em;
  font-weight: 600;
  margin: 0 0 2.2rem;
  padding: 0 0 .9rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .6rem;
  scroll-margin-top: 96px;
}
.prose .post-timeline .post-timeline-title::before {
  content: "";
  width: 8px;
  height: 8px;
  font-size: inherit;
  opacity: 1;
  border-radius: 2px;
  background: var(--accent);
  rotate: 45deg;
}
.prose .post-timeline .timeline-feed,
.prose .post-timeline .feed-item h3,
.prose .post-timeline .feed-item p,
.prose .post-timeline .feed-time { margin-top: 0; }

.timeline-feed { position: relative; }
.feed-item {
  position: relative;
  padding: 0 0 2.2rem 1.8rem;
  border-left: 1px solid var(--border);
}
.feed-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.feed-item::before {
  content: "";
  position: absolute;
  left: -4px; top: .55rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.feed-time {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--accent-text);
  margin-bottom: .3rem;
}
.feed-item h3 { font-size: 1rem; font-weight: 600; margin-bottom: .35rem; }
.feed-item p { font-size: .88rem; color: var(--text-2); line-height: 1.75; }

.err-wrap {
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 0;
}
.err-code {
  font-family: var(--mono);
  font-size: clamp(4rem, 16vw, 9rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.06em;
  color: var(--accent-text);
  margin-bottom: 1.4rem;
}
.err-line {
  font-family: var(--mono);
  font-size: .9rem;
  color: var(--text-2);
  margin-bottom: .5rem;
}
.err-line b { color: var(--accent-text); }
.err-text { color: var(--text-2); margin: 1.2rem 0 2rem; max-width: 40ch; }
.err-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .25s var(--ease);
  z-index: 50;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--accent-text); border-color: var(--accent-text); }
.to-top .icon { width: 17px; height: 17px; }

.lightbox {
  border: 0;
  padding: 0;
  margin: auto;
  background: transparent;
  max-width: 94vw;
  max-height: 92vh;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(20, 16, 13, .58);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
}
.lightbox img {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .7);
}
.lightbox-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: 16px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(20, 16, 13, .55);
  color: rgba(255, 255, 255, .92);
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.lightbox-close:hover {
  background: rgba(20, 16, 13, .78);
  border-color: rgba(255, 255, 255, .38);
  color: #fff;
}

.lightbox-close:focus-visible,
.lightbox-close:focus { outline: 2px solid rgba(255, 255, 255, .75); outline-offset: 2px; }
.lightbox-close .icon { width: 16px; height: 16px; }

@media (hover: none), (pointer: coarse) {
  .pager a:hover, .post-nav a:hover, .to-top:hover .icon,
  .prose img:hover, .moment-img:hover, .post-ref:hover .post-ref-more .icon { transform: none; }
  .book-card:hover, .movie-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
  .book-card:hover .cover-img, .movie-card:hover .cover-img { scale: 1; }
  .hero-panel:hover .term { transform: none; box-shadow: var(--shadow); }
  .link-card:hover { border-color: var(--border); box-shadow: none; }
  .link-card:hover .link-avatar,
  .profile-card:hover .avatar { transform: none; }
  .moment-img:hover { filter: none; }
}

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

  .reveal { opacity: 1; translate: none; scale: 1; }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 352px);
    margin: 0;
    padding: 0 1.15rem calc(2.5rem + env(safe-area-inset-bottom, 0px));

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: start;
    gap: .25rem .2rem;
    background: var(--bg);
    border-left: 1px solid var(--border);
    box-shadow: -30px 0 70px -34px rgba(28, 24, 19, .5);
    transform: translateX(100%);
    transition: transform .34s var(--ease);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    z-index: 92;
  }
  body.nav-open .nav { transform: none; }

  body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(24, 20, 15, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
    z-index: 91;
  }
  body.nav-open::after { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1;
    grid-column: 1 / -1;
    width: calc(100% + 2.3rem);
    margin: 0 -1.15rem .75rem;
    padding: .95rem 1.15rem .85rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .nav-head-title {
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-3);
  }
  .nav-toggle { display: grid; }
  .header-inner { gap: 1rem; }

  .site-header .nav { display: none; }
  .header-actions { margin-left: auto; }

  .nav.nav--mobile {
    display: flex;
    flex-direction: column;
    gap: 0;

    align-items: stretch;
  }

  .nav-grid {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    flex: none;
  }
  .nav-grid li { flex: 0 0 calc((100% - 12px) / 4); }
  .nav-grid a {
    display: grid;
    place-items: center;
    height: 42px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--text-2);
    transition: background-color .18s var(--ease), color .18s var(--ease);
  }
  .nav-grid a:hover { background: var(--surface-2); color: var(--text); }
  .nav-grid a.is-active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }

  .nav-card {
    flex: none;
    padding: 1.55rem 1.2rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    text-align: center;
  }

  .nav-card .avatar {
    display: block;
    width: 60px;
    height: 60px;
    margin: 0 auto .9rem;
    box-shadow: 0 0 0 4px var(--accent-soft);
  }
  .nav-card .avatar-letter { font-size: 1.3rem; }
  .nav-card-name { font-size: .95rem; font-weight: 600; letter-spacing: -.01em; }
  .nav-card-bio {
    font-size: .76rem;
    line-height: 1.65;
    color: var(--text-3);
    margin: .4rem auto 1.05rem;
  }
  .nav-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .3rem;
    padding-top: .85rem;
    border-top: 1px dashed var(--border);
  }
  .nav-card-stats div { display: flex; flex-direction: column; gap: .1rem; }
  .nav-card-stats b { font-family: var(--mono); font-size: .92rem; font-weight: 600; }
  .nav-card-stats span { font-size: .66rem; color: var(--text-3); }

  .nav-sec-title {
    font-family: var(--mono);
    font-size: .64rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-3);
    margin: 1.25rem 0 .5rem;
    flex: none;
  }
  .nav-recent { list-style: none; margin: 0; padding: 0; flex: none; }
  .nav-recent a {
    display: flex;
    align-items: baseline;
    gap: .55rem;
    padding: .32rem 0;
    font-size: .82rem;
    color: var(--text-2);
  }
  .nav-recent-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-recent a:hover .nav-recent-title { color: var(--accent-text); }

  .nav-recent { padding-bottom: .4rem; }

  .sidebar { display: none; }

  .hero::after { width: 300px; height: 300px; }
  .post-layout { gap: 2rem; }
}

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .wrap { width: calc(100% - 2rem); }

  .post-item { padding: 1.25rem 1.15rem; }
  .post-list { gap: .8rem; }

  .featured { padding: 1.35rem 1.25rem; margin-bottom: 1.8rem; }
  .featured h2 { font-size: 1.22rem; line-height: 1.32; margin-bottom: .6rem; }
  .featured p { font-size: .9rem; line-height: 1.7; margin-bottom: 1rem; -webkit-line-clamp: 2; line-clamp: 2; }
  .featured-badge { margin-bottom: .8rem; }
  .article-title { max-width: none; }
  .tl-item { flex-wrap: wrap; gap: .3rem .7rem; padding: .7rem .4rem .7rem 1.2rem; }
  .tl-item::before { top: 1.15rem; }
  .tl-item a { flex: 1 1 100%; order: 3; }
  .tl-item .cat { order: 2; }
}

.comments {
  margin-top: 4.5rem;
  padding-top: 2.6rem;
  border-top: 1px solid var(--border);
  max-width: 72ch;

  min-width: 0;
}
.comments-head {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .55rem;
}
.comments-head h2 {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.comments-count {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  padding: .1rem .55rem;
}

.comments-head + .comment-list { margin-top: 1.6rem; }

.comment-list,
.comment-list ol { list-style: none; margin: 0; padding: 0; }

.comments > .comment-list > .comment + .comment {
  margin-top: 1.7rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--border);
}
.comment-main { display: flex; gap: .9rem; --comment-avatar: 38px; }
.comment-avatar {
  flex: none;
  width: var(--comment-avatar);
  height: var(--comment-avatar);
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: .92rem;
  background: var(--accent-soft);
  color: var(--accent-text);
  user-select: none;
}
.comment-avatar--author {
  background: var(--accent);
  color: var(--accent-ink);
}
.comment-avatar-letter {
  grid-area: 1 / 1;
  line-height: 1;
}
.comment-avatar-img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: var(--surface-2);
}
.comment-body { min-width: 0; flex: 1; }
.comment-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: var(--comment-avatar);
  margin-bottom: .5rem;
}
.comment-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .12rem;
  min-height: var(--comment-avatar);
  min-width: 0;
  line-height: 1.25;
}
.comment-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem .45rem;
}
.comment-author { font-size: .92rem; font-weight: 600; }
.comment-badge {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: 3px;
  padding: .1rem .38rem;
}
.comment-badge--friend {
  color: var(--accent-text);
  background: transparent;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}
.comment-time {
  font-family: var(--mono);
  font-size: .7rem;
  line-height: 1.2;
  color: var(--text-3);
}
.comment-actions { flex: none; display: flex; }

.comment-actions > a,
.moment-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-family: var(--mono);
  font-size: .68rem;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: .32rem .62rem;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.comment-actions > a:hover,
.moment-reply-btn:hover {
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  background: var(--accent-soft);
}
.comment-content {
  font-size: .93rem;
  line-height: 1.85;
  color: var(--text-2);

  overflow-wrap: anywhere;
}
.comment-content p + p { margin-top: .7em; }
.comment-content code {
  font-family: var(--mono);
  font-size: .87em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .05rem .32rem;
  color: var(--text);
}

.comment-list ol {
  --indent: 1.5rem;
  margin-top: 1.4rem;
  padding-left: var(--indent);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.comment-list ol > .comment { position: relative; }

.comment-list ol > .comment::before {
  content: "";
  position: absolute;
  top: .85rem;
  left: calc(-1 * var(--indent));
  width: calc(var(--indent) - .55rem);
  height: 1px;
  background: var(--border-strong);
}
.comment-list ol ol {
  --indent: 1.15rem;
  margin-top: 1.1rem;
}
.comment-list ol .comment-main { --comment-avatar: 32px; }
.comment-list ol .comment-avatar { font-size: .82rem; }

.comment-list ol ol ol {
  --indent: 0;
  padding-left: 0;
  border-left: 0;
}
.comment-list ol ol ol > .comment::before { display: none; }

.comment-form {
  margin-top: 2.8rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.reply-hint {
  display: none;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  color: var(--text-2);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  margin-bottom: 1rem;
}
.reply-hint.is-on { display: flex; animation: hintIn .28s var(--ease-out); }
@keyframes hintIn {
  from { opacity: 0; translate: 0 -4px; }
}
.reply-hint b { color: var(--accent-text); font-weight: 600; }

.reply-hint #cancel-comment-reply-link {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--text-3);
  transition: color .18s var(--ease);
}
.reply-hint #cancel-comment-reply-link:hover { color: var(--text); }
.form-row {
  display: grid;
  gap: .75rem;
  margin-bottom: .75rem;
}
@media (min-width: 620px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .form-row--three { grid-template-columns: 1fr 1fr 1fr; }
}
.form-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.form-field label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color .18s var(--ease);
}
.form-field label.required::after {
  content: " *";
  color: var(--accent-text);
}
.form-field input,
.form-field textarea {
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .75rem;
  caret-color: var(--accent);
  transition: border-color .18s var(--ease),
              box-shadow .2s var(--ease),
              background-color .2s var(--ease);
}
.form-field textarea {
  resize: vertical;
  min-height: 118px;
  line-height: 1.7;
}

.form-field input:hover,
.form-field textarea:hover {
  border-color: color-mix(in srgb, var(--text-3) 62%, var(--border));
}

.form-field input:user-invalid,
.form-field textarea:user-invalid {
  border-color: var(--accent-text);
  background: color-mix(in srgb, var(--accent-soft) 62%, var(--bg));
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent),
    inset 0 1px 2px color-mix(in srgb, var(--text) 5%, transparent);
}

[data-theme="dark"] .form-field input:focus,
[data-theme="dark"] .form-field textarea:focus {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent),
    inset 0 1px 2px rgba(0, 0, 0, .4);
}

.form-field:focus-within label { color: var(--accent-text); }

.form-field:has(input:not(:placeholder-shown)) label,
.form-field:has(textarea:not(:placeholder-shown)) label { color: var(--text-2); }

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-3); }

.form-field input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  transition: background-color 9999s var(--ease-out) 0s;
}
.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.form-tip { font-size: .76rem; color: var(--text-3); }
.btn-submit {
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  padding: .62rem 1.35rem;
  cursor: pointer;

  box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 38%, transparent);
  transition: background-color .18s var(--ease),
              box-shadow .2s var(--ease),
              transform .12s var(--ease);
}
.btn-submit:hover {
  background: var(--accent-hover);
  box-shadow: 0 3px 12px -2px color-mix(in srgb, var(--accent) 46%, transparent);
}
.btn-submit:active {
  transform: translateY(1px);
  box-shadow: 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
}
.btn-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 900px) {
  .layout { padding-bottom: 2.6rem; }
  .sidebar { gap: 1.7rem; }
  .site-footer { margin-top: 0; }
  .comment-list ol { --indent: .95rem; }
  .comment-main { --comment-avatar: 32px; }
  .comment-avatar { font-size: .8rem; }
}
@media (max-width: 719px) {
  .comments { margin-top: 3rem; padding-top: 2rem; }
  .comment-form { padding: 1.15rem; }
  .form-foot { flex-direction: column; align-items: stretch; }
  .btn-submit { width: 100%; }
  .form-tip { order: 2; text-align: center; }

  .site-footer { padding: 2.4rem 0 1.6rem; }
  .footer-desc { margin-top: 1.1rem; font-size: .86rem; }
  .footer-social a { padding: .18rem .5rem; }
  .footer-bottom {
    margin-top: 1.7rem;
    padding-top: 1rem;
    font-size: .68rem;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
  }

  .footer-copy { text-align: center; }
  .footer-meta { justify-content: center; }
}

@media print {
  .site-header, .site-footer, .to-top, .toc, .progress-bar, .post-nav, .code-bar { display: none !important; }
  body { background: #fff; color: #000; }
  .prose { max-width: none; }

  .reveal { opacity: 1 !important; translate: none !important; scale: 1 !important; animation: none !important; }
}

:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-pop: cubic-bezier(.22, .72, .3, 1);
  --ease-soft: cubic-bezier(.65, 0, .35, 1);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes charIn {
  from { opacity: 0; transform: translateY(.42em) rotate(2.5deg); filter: blur(7px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes wipe {
  from { opacity: .3; clip-path: inset(0 100% 0 0); }
  to   { opacity: 1;  clip-path: inset(0 0 0 0); }
}
@keyframes panel {
  from { opacity: 0; transform: translateY(24px) rotate(1.2deg) scale(.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes scanLine {
  0%   { transform: translateY(-130%); opacity: 0; }
  18%  { opacity: .5; }
  100% { transform: translateY(560%); opacity: 0; }
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-46px, 34px, 0) scale(1.14); }
}
@keyframes spin {
  from { transform: rotate(-90deg) scale(.6); opacity: .3; }
  to   { transform: rotate(0) scale(1); opacity: 1; }
}
@keyframes popUp {
  0%   { transform: scale(.94); }
  55%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn  { from { opacity: 0; } }

.hero-prompt  { animation: rise .7s var(--ease-out) both .04s; }
.hero-tagline { animation: wipe .9s var(--ease-out) both .52s; }
.hero-motto   { animation: rise .7s var(--ease-out) both .66s; }
.hero-panel   { animation: panel 1s var(--ease-out) both .34s; }

.hero-title { animation: rise .85s var(--ease-out) both .18s; }
.hero-title.is-split { animation: none; }
.hero-title.is-split .ch {
  display: inline-block;
  animation: charIn .95s var(--ease-out) both;
  animation-delay: calc(.2s + var(--i, 0) * 62ms);
}
@keyframes charInLite {
  from { opacity: 0; translate: 0 .3em; }
  to   { opacity: 1; translate: none; }
}
@media (max-width: 900px) {
  .hero-title.is-split .ch {
    animation: charInLite .6s var(--ease-out) both;
    animation-delay: calc(.1s + var(--i, 0) * 38ms);
  }
}

.hero::after { animation: drift 24s var(--ease-soft) infinite alternate; }

@media (hover: hover) and (pointer: fine) {
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(360px circle at var(--mx, 70%) var(--my, 22%),
                color-mix(in srgb, var(--accent) 9%, transparent), transparent 72%);
    transition: opacity .45s var(--ease);
  }
  .hero:hover::before { opacity: 1; }
}

.term { position: relative; transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.term::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 55%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent,
              color-mix(in srgb, var(--accent) 15%, transparent), transparent);
  animation: scanLine 1.6s var(--ease-out) .9s 1 both;
}
.hero-panel:hover .term { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.term-dot { transition: background-color .3s var(--ease), opacity .3s var(--ease); }
.term:hover .term-dot:nth-child(2) { background: var(--accent); opacity: .85; }

.page-head > *, .article-head > * { animation: rise .75s var(--ease-out) both; }
.page-head > :nth-child(1), .article-head > :nth-child(1) { animation-delay: .04s; }
.page-head > :nth-child(2), .article-head > :nth-child(2) { animation-delay: .14s; }
.page-head > :nth-child(3), .article-head > :nth-child(3) { animation-delay: .24s; }
.page-head > :nth-child(4), .article-head > :nth-child(4) { animation-delay: .32s; }

@keyframes revealIn {
  from { opacity: 0; translate: var(--tx, 0) var(--ty, 16px); scale: var(--sc, 1); }
  to   { opacity: 1; translate: none; scale: 1; }
}
.js .reveal {
  --tx: 0px;
  --ty: 16px;
  --sc: 1;
  opacity: 0;
  translate: var(--tx) var(--ty);
  scale: var(--sc);
}
.js .reveal[data-reveal="left"]  { --tx: -22px; --ty: 0px; }
.js .reveal[data-reveal="right"] { --tx: 24px;  --ty: 0px; }
.js .reveal[data-reveal="zoom"]  { --sc: .955;  --ty: 0px; }
.js .reveal[data-reveal="fade"]  { --ty: 0px; }

.js .sidebar .reveal { --tx: -12px; --ty: 0px; }

.js .prose > .reveal { --ty: 12px; }
.js .reveal.in {
  opacity: 1;
  translate: none;
  scale: 1;
  animation: revealIn .62s var(--ease-out) backwards;
  animation-delay: var(--d, 0ms);
}

.nav > a::after {
  content: "";
  position: absolute;
  left: .8rem; right: .8rem; bottom: .1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  transition: transform .34s var(--ease-out), opacity .24s var(--ease);
}
.nav > a:hover::after { transform: scaleX(1); opacity: .42; }
.nav > a.is-active::after { transform: scaleX(1); opacity: 1; }

.site-header.is-stuck {
  box-shadow: 0 10px 28px -24px rgba(0, 0, 0, .45);
}

.section-head h2::before { transition: scale .45s var(--ease-out); }
.section-head:hover h2::before { scale: 1.35; }

.btn { position: relative; overflow: hidden; }
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 32%,
              color-mix(in srgb, var(--accent) 18%, transparent) 50%, transparent 68%);
  transform: translateX(-130%);
  transition: transform .65s var(--ease-out);
}
.btn:hover::after { transform: translateX(130%); }
.btn:active { transform: translateY(0) scale(.985); }

.featured::before { transform-origin: left center; transition: transform .55s var(--ease-out); }
.featured:hover::before { transform: scaleX(1.6); }

.avatar { transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.profile-card:hover .avatar { transform: rotate(-6deg) scale(1.05); box-shadow: 0 0 0 6px var(--accent-soft); }

.tag-cloud a:active, .post-item-tags a:active { transform: translateY(1px); }

.link-avatar { transition: transform .5s var(--ease-out); }
.link-card:hover .link-avatar { transform: rotate(-7deg) scale(1.05); }

.cover-tag { transition: transform .35s var(--ease-out), background-color .35s var(--ease); }
.book-card:hover .cover-tag, .movie-card:hover .cover-tag { transform: translateY(-2px); }

.to-top .icon { transition: transform .28s var(--ease-out); }
.to-top:hover .icon { transform: translateY(-2px); }
.to-top:hover { box-shadow: var(--shadow-lg); }

.icon-btn.is-spin .icon { animation: spin .42s var(--ease-out) both; }

.copy-btn.is-copied { animation: popUp .4s var(--ease-out); }

.prose a {
  border-bottom: 0;
  padding-bottom: .5px;
  background-image:
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(color-mix(in srgb, var(--accent) 34%, transparent),
                    color-mix(in srgb, var(--accent) 34%, transparent));
  background-size: 0% 1px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  transition: background-size .34s var(--ease-out), background-color .2s var(--ease), color .2s var(--ease);
}
.prose a:hover { background-size: 100% 1px, 100% 1px; }

.post-ref {
  margin: 2rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .25s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease-out);
}
.post-ref:hover {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--border));
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.post-ref-link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .34rem;
  padding: 1.05rem 1.15rem 1rem 1.3rem;
  color: inherit;
  text-decoration: none;
}

.post-ref-link::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--accent) 38%, var(--border));
  transition: background-color .25s var(--ease);
}
.post-ref:hover .post-ref-link::before { background: var(--accent); }

.prose .post-ref-link,
.prose .post-ref-link:hover {
  background: none;
  border-bottom: 0;
  padding-bottom: 1rem;
}
.post-ref-kicker {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.post-ref-kicker::before { content: "↳"; opacity: .75; }
.post-ref-title {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -.01em;
  color: var(--text);
  transition: color .2s var(--ease);
}
.post-ref:hover .post-ref-title { color: var(--accent-text); }
.post-ref-excerpt {
  font-size: .85rem;
  line-height: 1.7;
  color: var(--text-2);

  max-width: 46em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-ref-more {
  padding-top: .5rem;
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--accent-text);
}
.post-ref-more .icon {
  width: 13px; height: 13px;
  transition: transform .3s var(--ease-out);
}
.post-ref:hover .post-ref-more .icon { transform: translateX(3px); }

@media (max-width: 560px) {
  .post-ref-link { padding: .9rem 1rem .95rem 1.15rem; }
  .prose .post-ref-link,
  .prose .post-ref-link:hover { padding-bottom: .95rem; }
  .post-ref-excerpt { -webkit-line-clamp: 3; }
}

.prose tbody tr { transition: background-color .2s var(--ease); }

@keyframes tocIn { from { opacity: 0; transform: translateX(12px); } }
@media (min-width: 1024px) {
  .toc { animation: tocIn .65s var(--ease-out) .12s both; }
  .toc a.is-active { transform: translateX(3px); }
}

.progress-bar {
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  box-shadow: 0 0 10px -1px var(--accent);
  transition: width .08s linear;
}

dialog.lightbox[open] { animation: popUp .3s var(--ease-out) both; }
dialog.lightbox[open]::backdrop { animation: fadeIn .3s var(--ease) both; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .2s var(--ease-soft) both; }
::view-transition-new(root) { animation: vtIn .32s var(--ease-out) both; }

@media (hover: none), (pointer: coarse) {
  .pager a:hover, .post-nav a:hover, .to-top:hover .icon,
  .prose img:hover, .moment-img:hover, .post-ref:hover .post-ref-more .icon { transform: none; }
  .book-card:hover, .movie-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
  .book-card:hover .cover-img, .movie-card:hover .cover-img { scale: 1; }
  .hero-panel:hover .term { transform: none; box-shadow: var(--shadow); }
  .link-card:hover { border-color: var(--border); box-shadow: none; }
  .link-card:hover .link-avatar,
  .profile-card:hover .avatar { transform: none; }
  .moment-img:hover { filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-prompt, .hero-title, .hero-title .ch, .hero-tagline,
  .hero-motto, .hero-panel, .page-head > *, .article-head > *, .toc { animation: none !important; }
  .hero::before, .hero::after, .term::after { animation: none !important; }
  .hero-title .ch { opacity: 1 !important; filter: none !important; transform: none !important; }
  .js .reveal {
    opacity: 1 !important;
    translate: none !important;
    scale: 1 !important;
    animation: none !important;
    transition: none !important;
  }
  .prose a { background-size: 100% 1px, 100% 1px; }

  .link-shot, .shot-img, .shot-scan, .link-pop { transition: none !important; }
  .link-card:hover .link-shot.is-loading .shot-scan { animation: none !important; opacity: 0; }

  .form-field input, .form-field textarea, .form-field label { transition: none !important; }
  .reply-hint.is-on { animation: none !important; }
}

.moments-layout { padding-top: 1.6rem; padding-bottom: 4.5rem; }

@media (min-width: 1024px) {
  .moments-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 2.6rem; }
}
.moments-main { min-width: 0; }

.composer {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 1.05rem 1.15rem .9rem;
  box-shadow: var(--shadow-card);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.composer:focus-within {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.composer.is-drag { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.composer textarea {
  display: block;
  width: 100%;
  min-height: 1.9rem;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: .95rem;
  line-height: 1.78;
  color: var(--text);

  resize: none;
  outline: none;
  transition: min-height .24s var(--ease-out);
}
.composer:focus-within textarea { min-height: 6rem; }
.composer textarea::placeholder { color: var(--text-3); }

.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--text-3);
  transition: max-height .24s var(--ease-out), opacity .18s var(--ease), margin-top .24s var(--ease-out);
}
.composer:focus-within .composer-foot,
.composer.has-text .composer-foot {
  max-height: 4rem;
  margin-top: .6rem;
  opacity: 1;
}
.composer-id b { color: var(--text-2); font-weight: 600; }

.composer-foot { font-family: var(--mono); }
.composer-actions { display: inline-flex; align-items: center; gap: .5rem; }

.composer-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.composer-img:hover { color: var(--accent-text); background: var(--surface-2); }
.composer-img img { width: 18px; height: 18px; opacity: .62; }
[data-theme="dark"] .composer-img img { filter: invert(1); opacity: .72; }
.composer-tray { display: flex; flex-wrap: wrap; gap: .5rem; }
.composer-tray:not(:empty) { margin-top: .7rem; }
.tray-item {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
  font-size: .62rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.tray-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tray-item.is-loading { animation: trayPulse 1.1s var(--ease) infinite; }
.tray-item.is-fail { border-color: var(--accent); color: var(--accent-text); }
@keyframes trayPulse { 50% { opacity: .55; } }

.moment-imgs { display: grid; gap: 4px; margin-top: .85rem; max-width: 540px; }
.moment-imgs[data-n="1"] { display: block; }
.moment-img {
  display: block;
  background: var(--surface-2);
  cursor: zoom-in;
}

.moment-imgs[data-n="1"] .moment-img {
  width: auto;
  max-width: 100%;
  max-height: 470px;
  border-radius: 6px;
}

.moment-imgs[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.moment-imgs[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.moment-imgs[data-n="2"] .moment-img,
.moment-imgs[data-n="3"] .moment-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

.moment-img,
.prose img { cursor: zoom-in; }

.moments-feed { list-style: none; margin: 1.6rem 0 0; padding: 0; }
.moment-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .5rem;
}
.moment-time {
  display: block;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .08em;
  color: var(--text-3);
}
.moment-body { font-size: 1.0625rem; line-height: 1.85; color: var(--text); }
.moment-body p { margin: 0; }
.moment-body p + p { margin-top: .65rem; }

.moments-feed--timeline { border-left: 1px solid var(--border); }
.moments-feed--timeline > li { position: relative; padding: 0 0 2.4rem 1.9rem; }
.moments-feed--timeline > li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: .6rem;
  width: 7px;
  height: 7px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg);
}
.moments-feed--timeline > li:first-child::before {
  background: var(--accent);
  border-color: var(--accent);
}
.moments-feed--timeline > li:last-child { padding-bottom: .2rem; }

.moment-actions { flex: none; display: flex; }
.moment-reply-btn em {
  font-style: normal;
  color: var(--accent-text);
  font-size: .95em;
}

@media (max-width: 560px) {
  .moment-time { font-size: .78rem; }
  .moment-reply-btn,
  .comment-actions > a { font-size: .76rem; padding: .34rem .6rem; }
  .comment-time { font-size: .74rem; }
  .moments-feed--timeline > li::before {
    width: 10px;
    height: 10px;
    left: -5.5px;
    top: .65rem;
  }
}

.moment-replies {
  list-style: none;
  margin: .5rem 0 0;
  padding: .55rem .75rem;
  background: var(--bg-soft);
  border-radius: 6px;
  font-size: .9rem;
  line-height: 1.75;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.moment-replies > li {
  margin-inline: -.3rem;
  padding-inline: .3rem;
  border-radius: 4px;
  cursor: pointer;
  scroll-margin-top: 5.5rem;
  transition: background-color .15s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .moment-replies > li:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
}
.moment-replies > li:target { background: var(--accent-soft); }
.moment-replies > li + li {
  margin-top: .44rem;
  padding-top: .44rem;
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}
.moment-replies b {
  font-weight: 600;
  color: var(--accent-text);
}
.moment-reply-to { color: var(--text-3); }
.moment-reply-pending {
  font-style: normal;
  font-size: .74rem;
  color: var(--accent-text);
  white-space: nowrap;
  margin-left: .25rem;
}
.moment-reply-text { display: inline; color: var(--text-2); }
.moment-reply-text p { display: inline; margin: 0; }
.moment-reply-text p + p::before { content: " "; }

.moment-reply-text .moment-imgs[data-n] {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: none;
  margin: 0 0 0 4px;
  vertical-align: middle;
}
.moment-reply-text .moment-imgs .moment-img {
  width: 44px;
  height: 44px;
  max-width: none;
  max-height: none;
  object-fit: cover;
  border-radius: 4px;
}

.moment-reply-box { margin-top: .5rem; }
.moment-reply-box[hidden] { display: none; }
.moment-reply-box form {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.moment-reply-who { display: flex; gap: .4rem; }
.moment-reply-who input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: .86rem;
  padding: .34rem .55rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .18s var(--ease);
}
.moment-reply-who input:focus { border-color: var(--accent); }

.moment-reply-row {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  padding: .4rem .45rem .4rem .7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(33, 29, 23, .04);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.moment-reply-row:focus-within {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 1px 2px rgba(33, 29, 23, .04), 0 0 0 3px color-mix(in srgb, var(--accent) 7%, transparent);
}
.moment-reply-row textarea {
  flex: 1;
  min-width: 0;
  padding: .1rem 0;
  border: 0;
  outline: none;
  background: none;
  font-family: inherit;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--text);
  resize: none;
  max-height: 7rem;
}
.moment-reply-row textarea::placeholder { color: var(--text-3); }
.moment-reply-send {
  flex: none;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 7px;
  padding: .3rem .8rem;
  cursor: pointer;
  transition: background-color .18s var(--ease), opacity .18s var(--ease);
}
.moment-reply-send:hover { background: var(--accent-text); }
.moment-reply-send:disabled { opacity: .55; cursor: default; }

.moments-feed > li.is-new { animation: rise .45s var(--ease-out) both; }

.moment-img { transition: transform .25s var(--ease-out), filter .25s var(--ease); }
.prose img { transition: transform .3s var(--ease-out), filter .3s var(--ease), box-shadow .3s var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .moment-img:hover { transform: scale(1.012); filter: brightness(1.04); }
  .prose img:hover { transform: scale(1.012); box-shadow: var(--shadow); filter: brightness(1.02); }
}

.moment-year { scroll-margin-top: 100px; }
.moment-year .card-group-title {
  position: sticky;
  top: 68px;
  z-index: 20;
  margin: 0 0 1rem;
  padding: .55rem 0 .5rem;
  gap: .8rem;
  background: var(--bg);
}
.moment-year .card-group-title > span {
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.moment-year .card-group-title > em {
  font-size: .72rem;
  letter-spacing: .06em;
}

.moments-feed--timeline > li[id] { scroll-margin-top: 100px; }
.moment-year:first-of-type { margin-top: 1.6rem; }
.moment-year + .moment-year { margin-top: 2.2rem; }
.moment-year .moments-feed { margin-top: .2rem; }

.moment-year + .moment-year .moments-feed--timeline > li:first-child::before {
  background: var(--bg);
  border-color: var(--border-strong);
}

.moments-side { display: none; }
@media (min-width: 1024px) {
  .moments-side {
    display: block;
    position: sticky;
    top: 96px;
    align-self: start;
  }

  .moments-side .side-tree {
    max-height: calc(100vh - 190px);
    max-height: calc(100dvh - 190px);
    overflow-y: auto;
    overscroll-behavior: contain;

    padding-bottom: 1.4rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), transparent);
  }
  .moments-side .side-tree::-webkit-scrollbar { width: 0; height: 0; display: none; }
}
.side-block + .side-block { margin-top: 2.4rem; }

.moments-side .side-block {
  padding: 1.15rem 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.side-block h2 {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: .85rem;
  font-weight: 600;
}

.side-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .05rem;
}
.side-tree-year { position: relative; }
.side-year {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  padding: .34rem .45rem .34rem .55rem;
  border-radius: 6px;
  font-size: .9rem;
  color: var(--text-2);
  text-decoration: none;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.side-year:hover { background: var(--surface-2); color: var(--text); }
.side-year-n { font-family: var(--mono); letter-spacing: .02em; }
.side-year > em {
  margin-left: auto;
  font-style: normal;
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--text-3);
  transition: color .18s var(--ease);
}
.side-year:hover > em { color: var(--accent-text); }

.side-caret {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  margin-left: .3rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
  opacity: .45;
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}
.side-tree-year.is-open .side-caret { transform: rotate(45deg); opacity: .8; }

.side-tree-year.is-current > .side-year { position: relative; color: var(--accent-text); font-weight: 600; }
.side-tree-year.is-current > .side-year::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55rem;
  bottom: .55rem;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.side-months {
  list-style: none;
  display: none;
  margin: 0 0 .35rem;
  padding: 0 0 0 .85rem;
  margin-left: .78rem;
  border-left: 1px solid var(--border);
}
.side-tree-year.is-open .side-months { display: block; }
.side-month {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
  padding: .2rem .35rem;
  border-radius: 5px;
  font-size: .82rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color .16s var(--ease), background-color .16s var(--ease);
}
.side-month:hover { color: var(--accent-text); background: var(--surface-2); }
.side-month em {
  font-style: normal;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--text-3);
}
.side-month:hover em { color: inherit; }

.moments-more {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 1.4rem 0 0;
  text-align: center;
  text-decoration: none;
  padding: .8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: .9rem;
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease), background-color .18s var(--ease);
}
.moments-more:hover { border-color: var(--border-strong); color: var(--accent-text); background: var(--surface-2); }
.moments-more[hidden] { display: none; }

.moments-more[data-state],
.posts-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  margin: 1.4rem 0 0;
  padding: .75rem 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--text-3);
  cursor: default;
  transition: color .18s var(--ease);
}
.moments-more[data-state]:hover { border: 0; background: none; color: var(--text-3); }

.moments-more[data-state]::after,
.posts-more::after {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  animation: nudgeDown 1.9s var(--ease) infinite;
}
@keyframes nudgeDown {
  0%, 100% { translate: 0 -1px; opacity: .4; }
  50%      { translate: 0 3px;  opacity: 1; }
}

.moments-more[data-state="loading"]::after,
.posts-more[data-state="loading"]::after,
.moments-more[data-state="error"]::after,
.posts-more[data-state="error"]::after { content: none; }

.moments-more[data-state="done"]::before,
.posts-more[data-state="done"]::before,
.moments-more[data-state="done"]::after,
.posts-more[data-state="done"]::after {
  content: "";
  flex: 0 1 96px;
  height: 1px;
}
.moments-more[data-state="done"]::before,
.posts-more[data-state="done"]::before {
  background: linear-gradient(to right, transparent, var(--border-strong));
}
.moments-more[data-state="done"]::after,
.posts-more[data-state="done"]::after {
  width: auto;
  border: 0;
  transform: none;
  animation: none;
  background: linear-gradient(to left, transparent, var(--border-strong));
}

.moments-more[data-state="error"]:hover,
.posts-more[data-state="error"]:hover { color: var(--accent-text); }

.heatmap {
  --hm-gap: 3px;
  --hm-weeks: 53;
  margin: 1.2rem 0 .4rem;
  padding: 1.05rem 1.25rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.moments-main > .heatmap:first-child { margin-top: 0; }
.heatmap-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}
.heatmap-title {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-2);
}
.heatmap-legend {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-family: var(--mono);
  font-size: .6rem;
  color: var(--text-3);
}

.heatmap-legend i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--text-3) 9%, var(--surface));
}
.heatmap-legend i:nth-of-type(1) { background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.heatmap-legend i:nth-of-type(2) { background: color-mix(in srgb, var(--accent) 50%, var(--surface)); }
.heatmap-legend i:nth-of-type(3) { background: color-mix(in srgb, var(--accent) 74%, var(--surface)); }
.heatmap-legend i:nth-of-type(4) { background: var(--accent); }

.heatmap-scroll { max-width: 100%; }
.heatmap-months,
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(var(--hm-weeks), minmax(0, 1fr));
  gap: var(--hm-gap);
}
.heatmap-months {
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: .6rem;
  line-height: 1;
  color: var(--text-3);
}

.heatmap-months span { white-space: nowrap; }
.heatmap-grid {
  grid-auto-flow: column;
  grid-template-rows: repeat(7, auto);
}
.heatmap-grid i {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2px;
  background: color-mix(in srgb, var(--text-3) 9%, var(--surface));
  font-style: normal;
  transition: transform .16s var(--ease), background-color .16s var(--ease);
}

.heatmap-grid i.is-blank { visibility: hidden; }
.heatmap-grid i[data-lv="1"] { background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.heatmap-grid i[data-lv="2"] { background: color-mix(in srgb, var(--accent) 50%, var(--surface)); }
.heatmap-grid i[data-lv="3"] { background: color-mix(in srgb, var(--accent) 74%, var(--surface)); }
.heatmap-grid i[data-lv="4"] { background: var(--accent); }
.heatmap-grid i[data-date] { cursor: pointer; }
.heatmap-grid i[data-date]:hover { transform: scale(1.22); }

.heatmap-grid i[data-date]:focus-visible { outline-offset: 1px; }
.heatmap-grid i.is-today { box-shadow: inset 0 0 0 1.5px var(--accent); }

.card-group:has(+ .page-foot) { margin-bottom: 2.4rem; }
.layout--full:has(+ .page-foot) { padding-bottom: 2.6rem; }

.page-foot {
  padding-top: 2.4rem;
  padding-bottom: 4.6rem;
  border-top: 1px solid var(--border);
}
.page-foot-main { min-width: 0; }
.page-foot-intro > :first-child { margin-top: 0; }

.comments.comments--page {
  margin-top: 3rem;
  padding-top: 2.2rem;
}

.page-foot-main > .comments:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.pager > .page-navigator { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }

.pager .page-navigator li { flex: 0 0 auto; }
.pager .page-navigator li a,
.pager .page-navigator li > span { min-width: 32px; height: 32px; display: grid; place-items: center; padding: 0 .55rem; border-radius: var(--radius-sm); }
.pager .page-navigator li a:hover { border-color: var(--border-strong); color: var(--text); }
.pager .page-navigator li.current a { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

.form-login { margin: 0 0 1rem; font-size: .86rem; color: var(--text-3); }
.form-login b { color: var(--text); font-weight: 600; }
.comment-awaiting { margin: .5rem 0 0; font-size: .78rem; color: var(--accent-text); }
.comments-closed, .moments-empty { color: var(--text-3); font-size: .9rem; padding: 1.2rem 0; }

@supports (-webkit-touch-callout: none) {
  .form-field input,
  .form-field textarea,
  .composer textarea,
  .moment-reply-who input,
  .moment-reply-row textarea {
    font-size: 16px;
  }
}

@media (max-width: 1023px) {
  .wrap { max-width: 820px; }
  .page-head,
  .article-head,
  .prose,
  .comments,
  .sidebar,
  .card-group,
  .media-list,
  .links-grid,
  .proj-grid,
  .moments-main,
  .main-col,
  .archive-body {
    width: auto;
    max-width: none;
    margin-inline: 0;
  }
}

@media (max-width: 560px) {
  .prose h2 { font-size: 1.25rem; }
  .prose h3 { font-size: 1.125rem; }
  .prose h4 { font-size: 1.0625rem; }
}

@media (max-width: 900px) {
  .prose {
    text-wrap: wrap;
  }
}

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

.friends-page .friends-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 18.75rem);
  gap: clamp(1.75rem, 3vw, 2.5rem);
  align-items: start;
  padding: 2.4rem 0 4.6rem;
}

.friends-page .friends-left { min-width: 0; }
.friends-page .friends-left .card-group { margin-bottom: 2.4rem; }
.friends-page .friends-left .card-group:last-child { margin-bottom: 0; }

.friends-page .friends-content {
  min-width: 0;
  margin-top: 3rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--border);
}

.friends-page .links-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.friends-page .friends-feed { min-width: 0; }
.friends-page .friends-feed-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.friends-page .friends-feed-head {
  padding: 1.1rem 1.15rem 1rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(10rem 7rem at 105% -25%, color-mix(in srgb, var(--accent-soft) 72%, transparent), transparent 72%);
}
.friends-page .friends-feed-kicker {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;
}
.friends-page .friends-feed-title-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .35rem;
}
.friends-page .friends-feed-title-row h2 {
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.03em;
}
.friends-page .friends-feed-live {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  margin-left: auto;
  padding: .2rem .43rem;
  border: 1px solid color-mix(in srgb, var(--cat-life) 28%, var(--border));
  border-radius: var(--radius-pill);
  color: var(--cat-life);
  font-family: var(--mono);
  font-size: .54rem;
  line-height: 1;
  letter-spacing: .04em;
  white-space: nowrap;
}
.friends-page .friends-feed-live::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-life) 13%, transparent);
}

.friends-page .friends-feed-content { min-height: 10rem; }
.friends-page .friends-feed-loading {
  display: none;
  justify-content: center;
  gap: 5px;
  padding: 2.4rem 1.15rem .55rem;
}
.js .friends-page .friends-feed-loading { display: flex; }
.friends-page .friends-feed-loading i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
  animation: friendFeedPulse 1.1s ease-in-out infinite;
}
.friends-page .friends-feed-loading i:nth-child(2) { animation-delay: .14s; }
.friends-page .friends-feed-loading i:nth-child(3) { animation-delay: .28s; }
.friends-page .friends-feed-loading-text {
  display: none;
  padding: .15rem 1.15rem 2.3rem;
  color: var(--text-3);
  font-size: .72rem;
  text-align: center;
}
.js .friends-page .friends-feed-loading-text { display: block; }
@keyframes friendFeedPulse {
  0%, 100% { opacity: .3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.friends-page .friends-feed-state {
  padding: 2.5rem 1.15rem;
  color: var(--text-3);
  font-size: .78rem;
  line-height: 1.8;
  text-align: center;
}
.friends-page .friends-feed-state::before {
  content: "RSS";
  display: block;
  width: max-content;
  margin: 0 auto .75rem;
  padding: .24rem .5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .52rem;
  line-height: 1;
  letter-spacing: .12em;
}

.friends-page .friends-feed-favicon {
  position: relative;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: .7rem;
  line-height: 1;
}
.friends-page .friends-feed-favicon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: .26rem;
  background: var(--surface-2);
}

.friends-page .friends-feed-list { padding: .12rem 1.15rem .32rem; }
.friends-page .friends-feed-row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: .7rem;
  align-items: start;
  padding: .78rem 0 .8rem;
}
.friends-page .friends-feed-row + .friends-feed-row {
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}
.friends-page .friends-feed-row-copy { min-width: 0; }
.friends-page .friends-feed-row-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -.005em;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color .18s var(--ease);
}
.friends-page .friends-feed-row:hover .friends-feed-row-title { color: var(--accent-text); }
.friends-page .friends-feed-row-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  margin-top: .38rem;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .55rem;
  line-height: 1.2;
}
.friends-page .friends-feed-row-meta b {
  min-width: 0;
  overflow: hidden;
  color: var(--text-2);
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.friends-page .friends-feed-row-meta time {
  flex: none;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.friends-page .friends-feed-foot {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1.15rem .74rem;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 28%, var(--surface));
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .54rem;
  line-height: 1.4;
  letter-spacing: .01em;
}
.friends-page .friends-feed-foot svg {
  flex: none;
  width: .78rem;
  height: .78rem;
  color: var(--accent-text);
}
.friends-page .friends-feed-foot time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 1024px) {
  .friends-page .friends-feed {
    position: sticky;
    top: 92px;
    align-self: start;
  }
}

@media (max-width: 1023px) {
  .friends-page .friends-layout {
    display: block;
    padding-top: 2rem;
  }
  .friends-page .friends-feed { display: none; }
}

@media (max-width: 619px) {
  .friends-page .links-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .friends-page .friends-feed-loading i { animation: none; }
}
