/* =========================================================
   YUME — personal ACG & games blog (light default / dark)
   ========================================================= */

@font-face {
  font-family: "ZCOOL";
  src: url("assets/fonts/ZCOOLQingKeHuangYou-Regular.subset.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("assets/fonts/Silkscreen-Regular.subset.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("assets/fonts/Silkscreen-Bold.subset.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root,
:root[data-theme="light"] {
  --bg: #f7f3fb;
  --surface: #ffffff;
  --surface-2: #fbf8ff;
  --surface-3: #f2ebfc;
  --surface-4: #eae1f8;
  --ink: #1b1528;
  --ink-2: #3b3150;
  --muted: #7c7292;
  --faint: #a69bbe;
  --line: rgba(27, 21, 40, 0.1);
  --line-2: rgba(27, 21, 40, 0.16);
  --violet: #7c5cff;
  --pink: #ff4d9d;
  --mint: #1fbfa9;
  --yellow: #f0b429;
  --orange: #ff8a4c;
  --blue: #46a5f7;
  --grad: linear-gradient(120deg, #7c5cff, #ff4d9d);
  --grad-name: linear-gradient(100deg, #7c5cff 8%, #ff4d9d 58%, #ff8a4c);
  --card-shadow: 0 24px 60px -36px rgba(60, 40, 100, 0.35);
  --glow: rgba(124, 92, 255, 0.16);
  --header-bg: rgba(255, 255, 255, 0.78);
  --header-shadow: 0 16px 40px -26px rgba(60, 40, 100, 0.3);
  --grid-line: rgba(27, 21, 40, 0.045);
  --art-bg: linear-gradient(160deg, #ede3ff, #ffe7f1);
  --footer-bg: linear-gradient(135deg, #f0e7ff, #fff 48%, #ffeaf3);
  --input-bg: #fbf8ff;
  --display: "ZCOOL", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --latin: "ZCOOL", "PingFang SC", sans-serif;
  --pixel: "Silkscreen", monospace;
}

:root[data-theme="dark"] {
  --bg: #0a0810;
  --surface: #15111f;
  --surface-2: #191426;
  --surface-3: #201a2d;
  --surface-4: #2a2238;
  --ink: #f5f1ff;
  --ink-2: #d9d1ee;
  --muted: #9a90b4;
  --faint: #6f6688;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.16);
  --violet: #8b5cf6;
  --pink: #ff4d9d;
  --mint: #5cf2d6;
  --yellow: #ffe45c;
  --orange: #ff8a4c;
  --blue: #46a5f7;
  --grad: linear-gradient(120deg, #8b5cf6, #ff4d9d);
  --grad-name: linear-gradient(100deg, #c4b5ff 0%, #ff8cc6 55%, #ffe45c);
  --card-shadow: 0 30px 70px -40px #000;
  --glow: rgba(139, 92, 246, 0.28);
  --header-bg: rgba(15, 12, 24, 0.75);
  --header-shadow: 0 16px 40px -24px #000;
  --grid-line: rgba(255, 255, 255, 0.035);
  --art-bg: linear-gradient(160deg, #2a1d40, #171020);
  --footer-bg: linear-gradient(135deg, #1e1730, #12101c 55%, #1b1022);
  --input-bg: #0b0911;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  max-width: 100%;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--pink);
  color: #fff;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(
      45% 40% at 8% 0%,
      var(--glow),
      transparent 65%
    ),
    radial-gradient(
      36% 34% at 92% 4%,
      rgba(255, 77, 157, 0.1),
      transparent 65%
    ),
    radial-gradient(
      42% 38% at 50% 105%,
      rgba(255, 170, 120, 0.08),
      transparent 65%
    ),
    var(--bg);
  transition: background 0.3s ease;
}

.grid-lines {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(
    72% 62% at 50% 16%,
    #000 0%,
    rgba(0, 0, 0, 0.45) 55%,
    transparent 100%
  );
  mask-image: radial-gradient(
    72% 62% at 50% 16%,
    #000 0%,
    rgba(0, 0, 0, 0.45) 55%,
    transparent 100%
  );
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 36px;
}

.pixel {
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- header ---------- */

.hdr {
  position: sticky;
  top: 14px;
  z-index: 80;
  max-width: 1180px;
  margin: 14px auto 0;
  padding: 0 12px;
}

.hdr-in {
  height: 66px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-radius: 18px;
  background: var(--header-bg);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--header-shadow);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-size: 16px;
  box-shadow: 0 8px 22px -10px var(--violet);
}

.brand-txt {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-txt b {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, var(--ink) 20%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-txt em {
  margin-top: 3px;
  font-family: var(--pixel);
  font-style: normal;
  font-size: 6px;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  border: 1px solid var(--line);
}

.nav a {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.nav a.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 2px 10px -4px rgba(60, 40, 100, 0.2);
}

.tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.tool-btn {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease,
    border-color 0.2s ease;
}

.tool-btn svg {
  width: 15px;
  height: 15px;
}

.tool-btn:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  border-color: var(--line);
}

.theme-btn .ic-sun {
  display: none;
}

.theme-btn .ic-moon {
  display: block;
}

:root[data-theme="dark"] .theme-btn .ic-sun {
  display: block;
}

:root[data-theme="dark"] .theme-btn .ic-moon {
  display: none;
}

.login-btn {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(70, 165, 247, 0.35);
  background: rgba(70, 165, 247, 0.08);
  font-family: var(--pixel);
  font-size: 7px;
  letter-spacing: 0.08em;
  color: #2b8fe0;
  transition: background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}

:root[data-theme="dark"] .login-btn {
  color: #9fd4ff;
}

.login-btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #06121f;
}

.menu-btn {
  display: none;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: 58px;
  padding-top: 62px;
  padding-bottom: 54px;
}

.hero-copy {
  min-width: 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--violet) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--violet) 20%, transparent);
  font-family: var(--pixel);
  font-size: 7px;
  letter-spacing: 0.1em;
  color: var(--violet);
  text-transform: uppercase;
}

.kicker i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
}

.hero h1 {
  margin: 20px 0 16px;
  font-family: var(--display);
  line-height: 0.98;
}

.hero h1 .hi {
  display: block;
  margin-bottom: 5px;
  font-family: var(--latin);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.hero h1 .name {
  display: inline-block;
  font-size: 108px;
  line-height: 0.92;
  background: var(--grad-name);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 26px rgba(124, 92, 255, 0.22));
}

.hero h1 .star {
  display: inline-block;
  margin-left: 8px;
  font-size: 30px;
  color: var(--pink);
  transform: translateY(-54px) rotate(12deg);
}

.hero .tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-family: var(--latin);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-2);
}

.hero .tagline i {
  font-style: normal;
  color: var(--faint);
}

.hero .tagline .c1 { color: var(--pink); }
.hero .tagline .c2 { color: var(--mint); }
.hero .tagline .c3 { color: var(--orange); }

.hero .intro {
  max-width: 500px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--muted);
}

.hero .intro b {
  color: var(--ink);
  font-weight: 700;
}

.now-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 8px 24px -20px rgba(60, 40, 100, 0.4);
  font-size: 11px;
  color: var(--muted);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.now-line:hover {
  border-color: color-mix(in srgb, var(--violet) 35%, transparent);
  transform: translateY(-1px);
}

.now-line .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 18%, transparent);
}

.now-line b {
  color: var(--ink);
  font-weight: 600;
}

.now-line svg {
  width: 12px;
  height: 12px;
  color: var(--faint);
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  font-family: var(--latin);
  font-size: 13px;
  font-weight: 600;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-links a span {
  color: var(--pink);
}

.hero-links a:hover {
  color: var(--pink);
  border-color: var(--pink);
}

.hero-links em {
  font-style: normal;
  color: var(--faint);
}

.socials {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.social {
  width: 37px;
  height: 37px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: transform 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}

.social svg {
  width: 16px;
  height: 16px;
}

.social:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--violet) 40%, transparent);
  box-shadow: 0 10px 24px -16px rgba(60, 40, 100, 0.5);
}

.social.bili:hover { background: #00a1d6; border-color: #00a1d6; color: #fff; }
.social.x:hover { background: #111; border-color: #111; color: #fff; }
.social.pixiv:hover { background: #0096fa; border-color: #0096fa; color: #fff; }
.social.steam:hover { background: #1b2838; border-color: #66c0f4; color: #66c0f4; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--pixel);
  font-size: 7px;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-transform: uppercase;
}

.hero-meta i {
  font-style: normal;
  color: var(--line-2);
}

/* ---------- profile card ---------- */

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-art::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  top: 70px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--violet) 24%, transparent),
    transparent 68%
  );
  filter: blur(18px);
  z-index: -1;
}

.profile-card {
  position: relative;
  width: 420px;
  border-radius: 26px;
  overflow: visible;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
  transform: rotate(-1.6deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.profile-card:hover {
  transform: rotate(0deg) translateY(-4px);
}

.pc-art {
  position: relative;
  height: 470px;
  overflow: hidden;
  border-radius: 25px 25px 0 0;
  background: var(--art-bg);
}

.pc-art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pc-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 55%,
    color-mix(in srgb, var(--ink) 14%, transparent) 100%
  );
  pointer-events: none;
}

.pc-label {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 3;
  font-family: var(--pixel);
  font-size: 7px;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  text-transform: uppercase;
}

:root[data-theme="dark"] .pc-label {
  color: rgba(255, 255, 255, 0.6);
}

.pc-online {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--line);
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.pc-online i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
}

.sticky {
  position: absolute;
  right: -18px;
  top: 140px;
  z-index: 4;
  padding: 10px 12px;
  background: #ffe9a8;
  color: #3c290f;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
  border-radius: 2px;
  transform: rotate(5deg);
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.5);
}

.sticky::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 36px;
  height: 11px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.pc-info {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
}

.pc-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
}

.pc-name span {
  padding: 4px 7px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--violet) 25%, transparent);
  background: color-mix(in srgb, var(--violet) 8%, transparent);
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: 0.06em;
  color: var(--violet);
}

.pc-role {
  margin: 5px 0 0;
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.pc-tags span {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 10px;
  color: var(--muted);
}

/* ---------- ticker ---------- */

.ticker {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100vw;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  contain: paint;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 30px;
  width: max-content;
  padding: 10px 0;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}

.ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--pixel);
  font-size: 7px;
  letter-spacing: 0.1em;
  color: var(--faint);
  text-transform: uppercase;
}

.ticker-track b {
  color: var(--ink-2);
  font-weight: 400;
}

.ticker-track i {
  color: var(--pink);
  font-style: normal;
}

@keyframes ticker {
  to { transform: translateX(-25%); }
}

/* ---------- section ---------- */

.section {
  position: relative;
  z-index: 2;
  padding-top: 80px;
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 24px;
}

.sec-title {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-width: 0;
}

.sec-label {
  margin-top: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--violet) 22%, transparent);
  background: color-mix(in srgb, var(--violet) 7%, transparent);
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: 0.08em;
  color: var(--violet);
  white-space: nowrap;
}

.sec-title h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 48px;
  line-height: 1;
  font-weight: 400;
  color: var(--ink);
}

.sec-title .en {
  align-self: flex-end;
  padding-bottom: 6px;
  font-family: var(--latin);
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
}

.sec-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--pixel);
  font-size: 7px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.sec-more svg {
  width: 11px;
  height: 11px;
}

.sec-more:hover {
  color: var(--violet);
  border-color: var(--violet);
}

/* ---------- notes ---------- */

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.note-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 16px 40px -32px rgba(60, 40, 100, 0.35);
  transition: transform 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.note-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--violet) 30%, transparent);
  box-shadow: var(--card-shadow);
}

.note-cover {
  position: relative;
  aspect-ratio: 16 / 9.5;
  overflow: hidden;
  background: var(--surface-3);
}

.note-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.note-card:hover .note-cover img {
  transform: scale(1.04);
}

.note-chip {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: 0.06em;
  color: var(--violet);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.note-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 17px 17px;
}

.note-date {
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: 0.06em;
  color: var(--faint);
  text-transform: uppercase;
}

.note-body h3 {
  margin: 6px 0 6px;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: color 0.2s ease;
}

.note-card:hover h3 {
  color: var(--violet);
}

.note-body p {
  margin: 0 0 12px;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-read {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.note-read svg {
  width: 10px;
  height: 10px;
  color: var(--violet);
}

/* ---------- works ---------- */

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.work-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 16px 40px -32px rgba(60, 40, 100, 0.35);
  transition: transform 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.work-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--violet) 30%, transparent);
  box-shadow: var(--card-shadow);
}

.work-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-3);
}

.work-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.work-card:hover .work-cover img {
  transform: scale(1.04);
}

.work-cover .idx {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  font-family: var(--pixel);
  font-size: 6px;
  color: var(--ink);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.work-body {
  padding: 14px 17px 17px;
}

.work-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.work-body h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: color 0.2s ease;
}

.work-card:hover h3 {
  color: var(--violet);
}

.work-body .year {
  font-family: var(--pixel);
  font-size: 6px;
  color: var(--faint);
  white-space: nowrap;
}

.work-body p {
  margin: 5px 0 11px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--latin);
  font-size: 8.5px;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- now ---------- */

.now-panel {
  position: relative;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--surface-3);
  padding: 28px;
  overflow: hidden;
}

.now-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.now-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 36px;
  line-height: 1;
  font-weight: 400;
  color: var(--ink);
}

.now-head .pixel {
  color: var(--faint);
}

.now-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 18px;
}

.watch-box,
.play-box {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 15px;
}

.box-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-transform: uppercase;
}

.box-label b {
  color: var(--violet);
  font-weight: 400;
}

.anime-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.anime-card {
  display: block;
  min-width: 0;
}

.anime-art {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.3s ease;
}

.anime-card:hover .anime-art {
  transform: translateY(-4px);
}

.anime-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.02) 35%,
    rgba(0, 0, 0, 0.58) 100%
  );
}

.anime-art .jp {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  writing-mode: vertical-rl;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.94);
}

.anime-art .ep {
  position: absolute;
  left: 8px;
  bottom: 7px;
  z-index: 2;
  font-family: var(--pixel);
  font-size: 5px;
  color: rgba(255, 255, 255, 0.7);
}

.anime-art.frieren {
  background: linear-gradient(170deg, #d8c6e6 0%, #9a7fbd 40%, #4a335e 100%);
}

.anime-art.frieren::before {
  content: "";
  position: absolute;
  right: -10px;
  top: 14px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fbf0d2;
  box-shadow: 0 0 26px rgba(251, 240, 210, 0.5);
}

.anime-art.dandadan {
  background: linear-gradient(160deg, #2a1c3d 0%, #1a1029 60%, #0d0814 100%);
}

.anime-art.dandadan::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 40%;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  border-radius: 50%;
  border: 2px solid #9ef0c8;
  box-shadow: 0 0 20px rgba(158, 240, 200, 0.35);
}

.anime-art.kusuriya {
  background: linear-gradient(165deg, #2a5048 0%, #143430 55%, #0b1a19 100%);
}

.anime-art.kusuriya::before {
  content: "";
  position: absolute;
  right: 10px;
  top: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(232, 199, 122, 0.85);
}

.anime-meta {
  padding-top: 6px;
}

.anime-meta h3 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.anime-meta p {
  margin: 2px 0 5px;
  font-family: var(--pixel);
  font-size: 5px;
  letter-spacing: 0.05em;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-bar {
  height: 3px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  overflow: hidden;
}

.mini-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--pink);
}

.anime-card:nth-child(2) .mini-bar i { background: var(--mint); }
.anime-card:nth-child(3) .mini-bar i { background: var(--yellow); }

.play-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #12101a;
}

.play-art {
  position: relative;
  aspect-ratio: 16 / 8.5;
  background: radial-gradient(
    60% 60% at 50% 30%,
    #6a4a2a 0%,
    #2a1c16 55%,
    #0d0a09 100%
  );
  overflow: hidden;
}

.play-art::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
  border-radius: 50%;
  border: 1px solid rgba(255, 228, 92, 0.8);
  box-shadow: 0 0 26px rgba(255, 228, 92, 0.22);
}

.play-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 40%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

.play-art .label {
  position: absolute;
  left: 10px;
  top: 9px;
  z-index: 2;
  font-family: var(--pixel);
  font-size: 5px;
  letter-spacing: 0.08em;
  color: #ffe9a8;
}

.play-art .title {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  z-index: 2;
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.2;
  color: #fff;
}

.play-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 10px;
}

.play-stat {
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.play-stat span {
  display: block;
  font-family: var(--pixel);
  font-size: 5px;
  color: #8e84a8;
}

.play-stat b {
  display: block;
  margin-top: 1px;
  font-family: var(--latin);
  font-size: 12px;
  font-weight: 700;
  color: #f5f1ff;
}

.play-stats .full {
  grid-column: 1 / -1;
}

.play-stats .full .mini-bar {
  margin-top: 5px;
  background: rgba(255, 255, 255, 0.1);
}

.listening {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.listening .disc {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: repeating-radial-gradient(
    circle,
    var(--surface-3) 0 2px,
    var(--surface) 2px 4px
  );
  position: relative;
}

.listening .disc::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--pink);
}

.listening .txt {
  line-height: 1.3;
  min-width: 0;
}

.listening .txt span {
  display: block;
  font-family: var(--pixel);
  font-size: 5px;
  color: var(--faint);
}

.listening .txt b {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- about ---------- */

.about {
  padding-top: 76px;
}

.about-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 40px;
  padding: 34px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.about-card::before {
  content: "ABOUT";
  position: absolute;
  right: -10px;
  bottom: -30px;
  font-family: var(--display);
  font-size: 150px;
  line-height: 1;
  color: color-mix(in srgb, var(--violet) 5%, transparent);
  pointer-events: none;
}

.about h2 {
  margin: 10px 0 12px;
  font-family: var(--display);
  font-size: 32px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--ink);
}

.about p {
  margin: 0;
  max-width: 540px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--muted);
}

.about p b {
  color: var(--ink);
}

.about-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
}

.about-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.badge i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--pink);
}

.badge:nth-child(2) i { background: var(--mint); }
.badge:nth-child(3) i { background: var(--yellow); }
.badge:nth-child(4) i { background: var(--violet); }

.about-mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-family: var(--latin);
  font-size: 12px;
  font-weight: 600;
  color: var(--violet);
  border-bottom: 1px solid color-mix(in srgb, var(--violet) 35%, transparent);
  padding-bottom: 2px;
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  z-index: 2;
  padding-top: 80px;
  padding-bottom: 26px;
}

.footer-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 40px;
  padding: 40px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--footer-bg);
  overflow: hidden;
}

.footer-note .pixel {
  color: var(--violet);
}

.footer-note h2 {
  margin: 12px 0 10px;
  font-family: var(--display);
  font-size: 42px;
  line-height: 1.15;
  font-weight: 400;
  color: var(--ink);
}

.footer-note p {
  margin: 0;
  max-width: 420px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--muted);
}

.footer-sign {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--display);
  font-size: 18px;
  color: var(--ink);
}

.footer-sign span {
  font-family: var(--pixel);
  font-size: 5.5px;
  color: var(--faint);
  letter-spacing: 0.08em;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-content: center;
}

.footer-links span {
  display: block;
  margin-bottom: 8px;
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.footer-links a {
  display: block;
  padding: 3px 0;
  font-size: 12px;
  color: var(--ink-2);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
  color: var(--violet);
  padding-left: 3px;
}

.footer-cat {
  position: absolute;
  right: 34px;
  bottom: 18px;
  width: 150px;
  color: var(--ink);
  opacity: 0.9;
  pointer-events: none;
}

.footer-cat .moon {
  color: var(--yellow);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 6px 0;
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.footer-bottom .right {
  display: flex;
  gap: 14px;
}

.footer-bottom a:hover {
  color: var(--ink);
}

/* ---------- article ---------- */

.read-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 120;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.read-bar i {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--grad);
}

.art {
  padding-top: 46px;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--faint);
}

.crumb i {
  font-style: normal;
  color: var(--line-2);
}

.crumb b {
  color: var(--violet);
  font-weight: 400;
}

.art-head {
  max-width: 980px;
  margin: 0 auto;
}

.art-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--pixel);
  font-size: 7px;
  letter-spacing: 0.1em;
  color: var(--violet);
  text-transform: uppercase;
}

.art-kicker i {
  width: 22px;
  height: 1px;
  background: var(--violet);
  opacity: 0.5;
}

.art-title {
  margin: 12px 0 14px;
  font-family: var(--body);
  font-size: 50px;
  line-height: 1.22;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}

.art-title .hl {
  background: var(--grad-name);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.art-deck {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.art-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-transform: uppercase;
}

.art-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-2);
}

.art-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.art-tags .tag {
  font-size: 8px;
}

.art-author {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-family: var(--latin);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.mini-ava {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: var(--grad);
  color: #fff;
  font-family: var(--display);
  font-size: 13px;
}

.art-cover {
  max-width: 980px;
  margin: 26px auto 0;
}

.art-cover .img {
  position: relative;
  aspect-ratio: 16 / 7.2;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-3);
}

.art-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art-cover figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.art-body {
  display: grid;
  grid-template-columns: 210px minmax(0, 680px);
  gap: 54px;
  justify-content: center;
  padding-top: 40px;
}

.art-aside {
  position: sticky;
  top: 104px;
  align-self: start;
}

.toc-title {
  margin-bottom: 10px;
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.toc a {
  display: block;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.toc a:hover,
.toc a.active {
  color: var(--violet);
  padding-left: 4px;
}

.toc-meta {
  margin-top: 14px;
  font-family: var(--pixel);
  font-size: 5.5px;
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.prose {
  min-width: 0;
  font-size: 16px;
  line-height: 2;
  color: var(--ink-2);
}

.prose > p {
  margin: 0 0 22px;
}

.prose .lead {
  font-size: 17.5px;
  line-height: 1.95;
  color: var(--ink);
}

.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 40px 0 12px;
  font-size: 26px;
  line-height: 1.45;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.prose h2 span {
  flex: none;
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--violet);
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 19px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--ink);
}

.prose p {
  margin: 0 0 22px;
}

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

.prose a {
  color: var(--violet);
  border-bottom: 1px solid color-mix(in srgb, var(--violet) 35%, transparent);
}

.prose blockquote {
  position: relative;
  margin: 28px 0;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--violet) 18%, transparent);
  background: var(--surface-3);
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.7;
  color: var(--ink);
}

.prose blockquote p {
  margin: 0;
}

.prose blockquote .speaker {
  display: block;
  margin-bottom: 6px;
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: 0.1em;
  color: var(--violet);
}

.prose blockquote .who {
  display: block;
  margin-top: 6px;
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.prose ul {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.prose li {
  position: relative;
  padding: 8px 0 8px 20px;
  border-bottom: 1px dashed var(--line);
}

.prose li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--violet);
}

.prose hr {
  margin: 40px 0 24px;
  border: 0;
  height: 1px;
  background: var(--line);
}

.end-note {
  font-family: var(--display);
  font-size: 14px;
  color: var(--faint);
}

.art-foot {
  max-width: 944px;
  margin: 42px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.author-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.local-ava {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 13px;
  background: var(--grad);
  color: #fff;
  font-family: var(--display);
  font-size: 23px;
}

.author-card b {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
}

.author-card b span {
  font-family: var(--pixel);
  font-size: 5.5px;
  color: var(--faint);
}

.author-card p {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}

.author-card .follow {
  margin-left: auto;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  font-family: var(--pixel);
  font-size: 6px;
  color: var(--ink-2);
  transition: background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}

.author-card .follow:hover {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

.prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.pn-item {
  display: block;
  padding: 18px 22px 18px 0;
  border-right: 1px solid var(--line);
  transition: padding-left 0.2s ease;
}

.pn-item:hover {
  padding-left: 6px;
}

.pn-item.next {
  padding: 18px 0 18px 22px;
  border-right: 0;
  text-align: right;
}

.pn-item.next:hover {
  padding-left: 22px;
  padding-right: 6px;
}

.pn-item a {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
}

.pn-item a:hover { color: var(--violet); }

.prevnext .label {
  display: block;
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.prevnext b {
  display: block;
  margin-top: 5pxx;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--ink);
}

.prevnext a:hover b {
  color: var(--violet);
}

/* ---------- responsive ---------- */

@media (max-width: 1060px) {
  .hero h1 .name {
    font-size: 92px;
  }

  .profile-card {
    width: 380px;
  }

  .pc-art {
    height: 430px;
  }

  .sec-title h2 {
    font-size: 42px;
  }
}

@media (max-width: 960px) {
  .wrap {
    padding: 0 26px;
  }

  .nav {
    display: none;
  }

  .menu-btn {
    display: inline-grid;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
    padding-top: 42px;
  }

  .hero h1 .name {
    font-size: 94px;
  }

  .profile-card {
    width: 390px;
  }

  .notes-grid,
  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .now-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .about-side {
    align-items: flex-start;
  }

  .about-badges {
    justify-content: flex-start;
  }

  .footer-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer-cat {
    width: 120px;
    right: 24px;
    opacity: 0.45;
  }

  .art-body {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 34px;
  }
}

@media (max-width: 700px) {
  .hdr {
    top: 8px;
    margin-top: 8px;
    padding: 0 10px;
  }

  .hdr-in {
    height: 58px;
    padding: 0 12px;
    border-radius: 16px;
  }

  .mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .brand-txt b {
    font-size: 19px;
  }

  .login-btn {
    padding: 5px 7px;
    font-size: 6px;
  }

  .hero h1 .name {
    font-size: 74px;
  }

  .hero h1 .star {
    font-size: 22px;
    transform: translateY(-32px);
  }

  .hero h1 .hi {
    font-size: 18px;
  }

  .hero .tagline {
    font-size: 14px;
  }

  .hero .intro {
    font-size: 13px;
  }

  .now-line {
    font-size: 10px;
  }

  .hero-meta {
    font-size: 6px;
  }

  .profile-card {
    width: 100%;
    max-width: 370px;
  }

  .pc-art {
    height: 420px;
  }

  .sticky {
    right: 4px;
    top: 96px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .sec-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .sec-title h2 {
    font-size: 36px;
  }

  .sec-title .en {
    font-size: 11px;
    padding-bottom: 3px;
  }

  .notes-grid,
  .works-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .now-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .now-head h2 {
    font-size: 30px;
  }

  .about-card {
    padding: 22px;
    border-radius: 20px;
  }

  .about h2 {
    font-size: 27px;
  }

  .footer {
    padding-top: 56px;
  }

  .footer-card {
    padding: 24px;
    border-radius: 20px;
  }

  .footer-note h2 {
    font-size: 34px;
  }

  .footer-cat {
    display: none;
  }

  .footer-links {
    gap: 18px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .art {
    padding-top: 28px;
  }

  .art-title {
    font-size: 32px;
    line-height: 1.3;
  }

  .art-deck {
    font-size: 13px;
  }

  .art-cover .img {
    aspect-ratio: 4 / 3;
    border-radius: 16px;
  }

  .art-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-top: 26px;
  }

  .art-aside {
    position: static;
  }

  .toc {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
  }

  .toc a {
    font-size: 10.5px;
  }

  .prose {
    font-size: 15px;
    line-height: 1.95;
  }

  .prose .lead {
    font-size: 16px;
  }

  .prose h2 {
    font-size: 22px;
  }

  .prose blockquote {
    font-size: 17px;
  }

  .author-card {
    flex-wrap: wrap;
  }

  .author-card .follow {
    margin-left: 0;
  }

  .prevnext {
    grid-template-columns: minmax(0, 1fr);
  }

  .prevnext a,
  .prevnext a.next {
    padding: 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .prevnext a:hover,
  .prevnext a.next:hover {
    padding-left: 4px;
  }
}

/* =========================================================
   KOOK login
   ========================================================= */

.login-page {
  min-height: 100vh;
}

.login-hdr {
  max-width: 1060px;
  margin: 0 auto;
  padding: 28px 36px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.login-hdr-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-back {
  font-family: var(--latin);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s ease;
}

.login-back:hover {
  color: var(--violet);
}

.login-main {
  max-width: 1060px;
  margin: 25px auto 50px;
  padding: 0 36px;
}

@media (min-width: 901px) {
  .login-main {
    min-height: calc(100vh - 128px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  min-height: 632px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.login-form {
  display: flex;
  flex-direction: column;
  padding: 42px 46px 32px;
}

.kook-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.kook-brand img {
  width: 90px;
  height: auto;
}

.kook-brand .kook-dark {
  display: none;
}

:root[data-theme="dark"] .kook-brand .kook-light {
  display: none;
}

:root[data-theme="dark"] .kook-brand .kook-dark {
  display: block;
}

.kook-brand span {
  color: var(--faint);
  font-size: 12px;
}

.kook-brand b {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
}

.login-form h1 {
  margin: 0 0 7px;
  font-family: var(--display);
  font-size: 42px;
  line-height: 1.1;
  font-weight: 400;
  color: var(--ink);
}

.login-sub {
  margin: 0 0 21px;
  font-size: 13px;
  color: var(--muted);
}

.kook-oauth {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #46a5f7;
  color: #fff;
  box-shadow: 0 16px 34px -20px rgba(70, 165, 247, 0.9);
  transition: background 0.2s ease, transform 0.2s ease;
}

.kook-oauth:hover {
  background: #2f95ec;
  transform: translateY(-1px);
}

.kook-oauth img {
  width: 44px;
  flex: none;
}

.kook-oauth span {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  min-width: 0;
}

.kook-oauth strong {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.kook-oauth small {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
}

.kook-oauth em {
  margin-left: auto;
  font-style: normal;
  font-size: 17px;
}

.login-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 17px 0;
  font-size: 10px;
  color: var(--faint);
  white-space: nowrap;
}

.login-or::before,
.login-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.login-form-inner label {
  display: block;
  font-family: var(--pixel);
  font-size: 6.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-form-inner input {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--input-bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form-inner input::placeholder {
  color: var(--faint);
}

.login-form-inner input:focus {
  border-color: #46a5f7;
  box-shadow: 0 0 0 3px rgba(70, 165, 247, 0.15);
}

.login-help {
  margin: 7px 0 12px;
  font-size: 10px;
  line-height: 1.7;
  color: var(--faint);
}

.login-help code {
  padding: 1px 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--violet) 8%, transparent);
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--violet);
}

.kook-submit {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 10px;
  background: #46a5f7;
  color: #fff;
  font-family: var(--latin);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.kook-submit span {
  font-size: 15px;
}

.kook-submit:hover {
  background: #2f95ec;
}

.login-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 9.5px;
  color: var(--faint);
}

.login-hints span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.login-hints svg {
  width: 12px;
  height: 12px;
  color: #46a5f7;
}

.login-foot {
  margin: auto 0 0;
  padding-top: 20px;
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--faint);
}

.login-foot a {
  color: var(--violet);
  border-bottom: 1px solid color-mix(in srgb, var(--violet) 35%, transparent);
}

.login-art {
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--art-bg);
}

.login-art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-note {
  position: absolute;
  top: 34px;
  right: 26px;
  z-index: 3;
  padding: 10px 12px;
  background: #ffe9a8;
  color: #3c290f;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
  border-radius: 2px;
  transform: rotate(5deg);
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.4);
}

.login-note::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 34px;
  height: 11px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(255, 255, 255, 0.55);
}

.login-art-cap {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.login-art-cap b {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
}

.login-art-cap span {
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.login-mini {
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

@media (max-width: 900px) {
  .login-main {
    max-width: 540px;
  }

  .login-card {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .login-art {
    display: none;
  }

  .login-form {
    padding: 34px 32px 28px;
  }
}

@media (max-width: 700px) {
  .login-hdr {
    padding: 18px 20px 0;
  }

  .login-main {
    padding: 0 18px;
    margin: 18px auto 40px;
  }

  .login-card {
    border-radius: 20px;
  }

  .login-form {
    padding: 28px 22px 26px;
  }

  .login-form h1 {
    font-size: 34px;
  }

  .kook-brand {
    margin-bottom: 20px;
  }

  .kook-brand img {
    width: 74px;
  }

  .login-foot {
    padding-top: 16px;
  }
}

/* ---------- note filters ---------- */

.note-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -6px 0 18px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.note-filters::-webkit-scrollbar { display: none; }

.note-filters a {
  flex: none;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.note-filters a:hover {
  border-color: color-mix(in srgb, var(--violet) 35%, transparent);
  color: var(--violet);
}

.note-filters a.active {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

.filter-fill { flex: 1; }

.filter-search {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.filter-search svg { width: 11px; height: 11px; }

/* ---------- explore ---------- */

.explore {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding-top: 24px;
}

.ex-card {
  position: relative;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ex-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--violet) 30%, transparent);
  box-shadow: 0 14px 30px -24px rgba(60, 40, 100, 0.4);
}

.ex-label {
  display: block;
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-transform: uppercase;
}

.ex-card b {
  display: block;
  margin: 5px 0 2px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 400;
  color: var(--ink);
}

.ex-card > span:not(.ex-label) {
  display: block;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ex-card em {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 13px;
  color: var(--faint);
  transition: color 0.2s ease, transform 0.2s ease;
}

.ex-card:hover em {
  color: var(--violet);
  transform: translateY(-50%) translateX(2px);
}

/* ---------- compact footer ---------- */

.footer {
  padding-top: 64px;
  padding-bottom: 20px;
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 15px 0 13px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.fb-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.fb-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.fb-brand img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  border: 1px solid var(--line);
}

.fb-text {
  font-size: 9.5px;
  color: var(--faint);
  white-space: nowrap;
}

.fb-text b { color: var(--ink-2); font-weight: 500; }
a.fb-text:hover { color: var(--violet); }

.fb-sep {
  width: 1px;
  height: 11px;
  background: var(--line);
  flex: none;
}

.fb-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: 9.5px;
  color: var(--faint);
  white-space: nowrap;
}

.fb-right a:hover { color: var(--violet); }

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-top: 11px;
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.footer-meta i { font-style: normal; color: var(--line-2); }

/* chibi crop + polish basics */
.pc-art { height: 435px; }
.pc-art .chibi { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc-art .chibi-dark { display: none; }
[data-theme="dark"] .pc-art .chibi-light { display: none; }
[data-theme="dark"] .pc-art .chibi-dark { display: block; }
.profile-card .pc-online,
.profile-card .sticky { display: none; }

@media (max-width: 960px) {
  .explore { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .note-filters { margin-top: 0; }
  .explore { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-card:last-child { grid-column: 1 / -1; }
  .footer { padding-top: 48px; }
  .footer-bar { align-items: flex-start; gap: 8px; }
  .fb-left { gap: 7px; }
  .fb-sep { display: none; }
  .fb-right {
    margin-left: 0;
    width: 100%;
    padding-top: 4px;
    border-top: 1px solid var(--line);
  }
  .fb-text { white-space: normal; }
  .footer-meta { justify-content: flex-start; flex-wrap: wrap; }
}

/* ---------- archive ---------- */

.archive { padding-top: 44px; }

.archive-head {
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 24px;
}

.archive-head h1 {
  margin: 10px 0 8px;
  font-size: 46px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.archive-head p { margin: 0 0 18px; font-size: 13px; color: var(--muted); }

.archive-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.archive-filters::-webkit-scrollbar { display: none; }

.archive-filters a {
  flex: none;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.archive-filters a:hover { border-color: color-mix(in srgb, var(--violet) 35%, transparent); color: var(--violet); }
.archive-filters a.active { background: var(--violet); border-color: var(--violet); color: #fff; }

.archive-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 254px;
  gap: 46px;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline { min-width: 0; border-top: 1px solid var(--line-2); }

.year-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 20px 0 10px;
}

.year-row h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  font-weight: 400;
  color: var(--ink);
}

.year-row span { font-family: var(--pixel); font-size: 5.5px; letter-spacing: 0.08em; color: var(--faint); }

.post-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px 16px;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.2s ease;
}

.post-row:hover { padding-left: 5px; }

.post-row time { font-family: var(--pixel); font-size: 6.5px; letter-spacing: 0.04em; color: var(--faint); }

.post-row .cat {
  display: block;
  margin-bottom: 2px;
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: 0.06em;
  color: var(--violet);
}

.post-row h3 {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.2s ease;
}

.post-row:hover h3 { color: var(--violet); }
.post-row .read { font-family: var(--pixel); font-size: 5.5px; color: var(--faint); text-align: right; }

.post-row em {
  font-style: normal;
  font-size: 12px;
  color: var(--faint);
  transition: color 0.2s ease, transform 0.2s ease;
}

.post-row:hover em { color: var(--violet); transform: translateX(2px); }

.archive-side {
  position: sticky;
  top: 102px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-card {
  padding: 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.side-about { display: flex; align-items: center; gap: 9px; }

.side-about img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  border: 1px solid var(--line);
}

.side-about b { display: block; font-size: 12px; color: var(--ink); }
.side-about span { display: block; margin-top: 1px; font-size: 9.5px; color: var(--faint); }

.side-card h3 {
  margin: 0 0 8px;
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-transform: uppercase;
}

.side-card a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 11px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.side-card a:hover { color: var(--violet); }
.side-card a em { font-style: normal; font-family: var(--pixel); font-size: 5.5px; color: var(--faint); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 5px; }

.tag-cloud a {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 9.5px;
  color: var(--muted);
}

.tag-cloud a:hover { border-color: color-mix(in srgb, var(--violet) 35%, transparent); color: var(--violet); }

@media (max-width: 960px) {
  .archive-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .archive-side { position: static; display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .archive { padding-top: 28px; }
  .archive-head h1 { font-size: 34px; }
  .archive-side { grid-template-columns: minmax(0, 1fr); }
  .post-row { grid-template-columns: 42px minmax(0, 1fr) 14px; gap: 10px; }
  .post-row .read { display: none; }
  .post-row h3 { font-size: 13.5px; }
}

/* ---------- polish pass ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

[data-theme="dark"] .grain { opacity: .045; }

.hero-art { position: relative; }

.hero-art::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: 512px;
  height: 512px;
  transform: translate(-50%, -50%) rotate(-14deg);
  border: 1px dashed var(--line-2);
  border-radius: 50%;
  opacity: .7;
  z-index: 0;
}

.hero-art .profile-card { position: relative; z-index: 2; }

.hdoodle {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  line-height: 1;
}

.hd-star {
  top: 2px;
  left: -26px;
  font-size: 28px;
  color: var(--yellow);
  text-shadow: 0 3px 0 rgba(42, 33, 56, .08);
}

.hd-heart {
  right: -19px;
  bottom: 76px;
  width: 27px;
  height: 27px;
  color: var(--pink);
  transform: rotate(9deg);
}

.hd-pad {
  left: -35px;
  bottom: 58px;
  width: 32px;
  height: 32px;
  color: var(--mint);
  transform: rotate(-13deg);
}

.pc-tape {
  position: absolute;
  top: -9px;
  left: 34px;
  width: 82px;
  height: 19px;
  z-index: 6;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .55);
  transform: rotate(-3deg);
  box-shadow: 0 4px 10px -6px rgba(40, 20, 60, .3);
  pointer-events: none;
}

[data-theme="dark"] .pc-tape {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .1);
}

.quote-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 46px 0 0;
  text-align: center;
  flex-wrap: wrap;
}

.quote-strip p {
  margin: 0;
  font-family: var(--display);
  font-size: 27px;
  line-height: 1.35;
  letter-spacing: .02em;
  color: var(--ink);
}

.qs-star {
  font-size: 15px;
  color: var(--violet);
  transform: translateY(-3px);
}

.qs-en {
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: .12em;
  color: var(--faint);
  transform: translateY(4px);
}

.note-feature {
  position: relative;
  display: block;
  aspect-ratio: 16 / 6.5;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
  background: var(--surface-2);
}

.note-feature > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

.note-feature:hover > img { transform: scale(1.035); }

.nf-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 6, 24, .02) 24%, rgba(12, 6, 24, .5) 66%, rgba(12, 6, 24, .9) 100%);
}

.nf-index {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 2;
  font-family: var(--pixel);
  font-size: 6px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .62);
}

.nf-copy {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 24px;
  z-index: 2;
  color: #fff;
}

.nf-chip {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(6px);
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: .06em;
  color: #fff;
}

.nf-copy h3 {
  margin: 9px 0 7px;
  font-size: 31px;
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: -.035em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .22);
}

.nf-copy p {
  margin: 0 0 10px;
  max-width: 700px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .78);
}

.nf-meta {
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .55);
}

.notes-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.footer-bar { position: relative; border-top: 0; }

.footer-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), var(--pink), transparent);
  opacity: .35;
}

@media (max-width: 900px) {
  .quote-strip p { font-size: 21px; }
  .quote-strip { padding-top: 36px; gap: 9px; }
  .nf-copy h3 { font-size: 22px; }
  .notes-subgrid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .hero-art::before { width: 390px; height: 390px; }
  .hd-star { left: -12px; }
  .hd-heart { right: -8px; }
  .hd-pad { left: -12px; }
  .quote-strip { flex-direction: column; gap: 6px; padding-top: 30px; }
  .quote-strip p { font-size: 19px; }
  .qs-en { transform: none; }
  .note-feature { aspect-ratio: 4 / 3.4; border-radius: 18px; }
  .nf-copy { left: 20px; right: 20px; bottom: 18px; }
  .nf-copy h3 { font-size: 20px; }
  .nf-copy h3 br { display: none; }
  .nf-copy p { display: none; }
  .nf-meta { font-size: 5px; }
}


/* identity pass */
.hero h1 .name { font-size: 92px; letter-spacing: -.03em; }
.profile-card .pc-online { display: inline-flex; }
.profile-card .sticky { display: block; }
.pc-art .chibi { object-fit: cover; }

/* ---------- Typecho integration ---------- */

.art-tags a {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 10px;
  color: var(--muted);
  margin: 0 4px 4px 0;
}

.art-tags a:hover { color: var(--violet); border-color: var(--violet); }

.empty-state {
  padding: 44px 24px;
  border: 1px dashed var(--line-2);
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
}

.empty-state p { margin: 0 0 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--grad);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 26px -16px rgba(124, 92, 255, .7);
}

.page-nav, .comment-nav {
  display: flex;
  gap: 8px;
  padding-top: 22px;
  font-size: 11px;
  color: var(--muted);
}

.page-nav a, .comment-nav a {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.page-nav a:hover, .comment-nav a:hover { color: var(--violet); border-color: var(--violet); }

.archive-search {
  display: flex;
  align-items: center;
  gap: 5px;
}

.archive-search input {
  width: 150px;
  height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 10px;
  outline: none;
}

.archive-search button {
  height: 29px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
}

.page-art .art-head { max-width: 820px; }
.page-body { display: block; max-width: 760px; margin: 0 auto; padding: 42px 0 0; }
.page-body .prose { max-width: 100%; }

.author-card .local-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* comments */

.comments {
  max-width: 760px;
  margin: 46px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.comments-head { margin-bottom: 18px; }
.comments-head h2 { margin: 6px 0 0; font-size: 22px; font-weight: 800; color: var(--ink); }

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list li {
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.comment-list .comment-author { font-size: 12px; font-weight: 700; color: var(--ink); }
.comment-list .comment-meta { margin: 3px 0 8px; font-family: var(--pixel); font-size: 5.5px; color: var(--faint); }
.comment-list .comment-content { font-size: 13px; line-height: 1.8; color: var(--muted); }
.comment-list .comment-reply { margin-top: 8px; font-size: 10px; }

.respond { margin-top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.respond h3 { margin: 0 0 14px; font-size: 17px; font-weight: 800; color: var(--ink); }
.comment-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.comment-form p { margin: 0 0 10px; }
.comment-form label { display: block; margin-bottom: 4px; font-size: 10px; color: var(--muted); }
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--input-bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 12px;
  outline: none;
}
.comment-form textarea { line-height: 1.7; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 12%, transparent); }
.comment-form .btn { margin-top: 4px; }
.comment-login, .comments-closed { font-size: 11px; color: var(--muted); }

/* theme option classes */

.theme-radius-small .note-card, .theme-radius-small .work-card, .theme-radius-small .ex-card,
.theme-radius-small .side-card, .theme-radius-small .about-card, .theme-radius-small .profile-card,
.theme-radius-small .now-panel, .theme-radius-small .art-cover, .theme-radius-small .author-card { border-radius: 12px; }

.theme-radius-large .note-card, .theme-radius-large .work-card, .theme-radius-large .ex-card,
.theme-radius-large .side-card, .theme-radius-large .about-card, .theme-radius-large .profile-card,
.theme-radius-large .now-panel, .theme-radius-large .art-cover, .theme-radius-large .author-card { border-radius: 28px; }

.theme-density-compact .section { padding-top: 58px; }
.theme-density-roomy .section { padding-top: 108px; }
.theme-density-compact .note-body, .theme-density-compact .work-body { padding: 13px 14px 11px; }
.theme-density-roomy .note-body, .theme-density-roomy .work-body { padding: 24px 22px 20px; }

.theme-font-small .prose { font-size: 14px; }
.theme-font-large .prose { font-size: 16.5px; }

.theme-card-soft .note-card, .theme-card-soft .work-card, .theme-card-soft .ex-card,
.theme-card-soft .side-card, .theme-card-soft .about-card, .theme-card-soft .profile-card,
.theme-card-soft .now-panel { border-color: transparent; box-shadow: 0 22px 50px -38px rgba(60, 40, 100, .55); }

.theme-card-plain .note-card, .theme-card-plain .work-card, .theme-card-plain .ex-card,
.theme-card-plain .side-card, .theme-card-plain .about-card, .theme-card-plain .profile-card,
.theme-card-plain .now-panel { box-shadow: none; background: var(--surface-2); }

@media (max-width: 900px) {
  .nav {
    display: none;
    position: absolute;
    left: 18px;
    right: 18px;
    top: 66px;
    z-index: 60;
    padding: 10px;
    background: var(--header-bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 20px 40px -20px rgba(60, 40, 100, .3);
    backdrop-filter: blur(18px);
  }

  .nav.nav-open { display: flex; flex-direction: column; }
  .nav.nav-open a { padding: 9px 10px; }

  .comment-fields { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .archive-search { display: none; }
}

/* ---------- handwriting accent ---------- */


:root {
  --hand: "ZCOOL", "PingFang SC", cursive;
}

.hero h1 .hi {
  font-family: var(--hand);
  font-size: 30px;
  letter-spacing: .02em;
}

.hero h1 .name {
  font-family: var(--display);
}

.quote-strip p {
  font-family: var(--hand);
  font-size: 33px;
  letter-spacing: .02em;
}

.sticky {
  font-family: var(--hand);
  font-size: 17px;
  line-height: 1.2;
}

.hero .txt-link,
.hero-links { white-space: nowrap; }

.ticker-in { padding-left: 24px; }

@media (max-width: 700px) {
  .hero h1 .hi { font-size: 24px; }
  .quote-strip p { font-size: 24px; }
}


/* about layout */
.about-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}
.about-main h2 { margin: 0; }
.about-main p { margin: 0; }
.about-mail { white-space: nowrap; align-self: flex-start; }
.about-side { justify-content: center; }
.about-badges { max-width: 190px; }

/* now play */
.play-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 10px; }
.play-stat { padding: 7px 8px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); }
.play-stat span { display: block; font-family: var(--pixel); font-size: 5px; color: var(--faint); }
.play-stat b { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-2); }
.play-stat.full { grid-column: 1 / -1; }
.listening { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 9px; color: var(--muted); }
.listening i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }

/* ---------- pages: posts / taxonomy / links / works / now / about ---------- */

.posts-page .archive-head,
.taxonomy-page .archive-head,
.links-page .archive-head,
.works-page .archive-head,
.now-page .archive-head { max-width: 1180px; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
}

.post-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.post-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--violet) 30%, transparent); }
.post-card-cover { position: relative; overflow: hidden; }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card-cover .note-chip { position: absolute; top: 10px; left: 10px; }
.post-card-body { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 5px; }
.post-card-body h2 { margin: 0; font-size: 17px; line-height: 1.45; color: var(--ink); }
.post-card-body p { margin: 0; font-size: 11px; line-height: 1.7; color: var(--muted); }
.post-card-body .note-read { margin-top: auto; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1180px;
}
.cat-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.cat-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--violet) 30%, transparent); }
.cat-index { font-family: var(--pixel); font-size: 6px; color: var(--violet); }
.cat-card h2 { margin: 10px 0 6px; font-size: 23px; color: var(--ink); }
.cat-card p { margin: 0 0 16px; min-height: 44px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.cat-meta { font-family: var(--pixel); font-size: 5.5px; color: var(--faint); }

.tag-page-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  max-width: 1000px;
}
.tag-page-cloud a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}
.tag-page-cloud a:hover { border-color: var(--violet); color: var(--violet); }
.tag-page-cloud em { font-style: normal; font-family: var(--pixel); font-size: 5.5px; color: var(--faint); }

/* friend links v2 */
.links-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.links-summary-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 9px; }
.links-summary-pill b { color: var(--ink); font-family: var(--latin); font-size: 12px; }
.links-summary-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 14%, transparent); }
.links-summary-hint { color: var(--faint); font-family: var(--pixel); font-size: 5.5px; letter-spacing: .04em; }
.links-summary-link { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 26%, var(--line)); }
.links-summary-link:hover { background: color-mix(in srgb, var(--violet) 6%, var(--surface)); }

.links-section { max-width: 1100px; margin-bottom: 24px; }
.links-section.is-pinned { padding-bottom: 4px; }
.links-group-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.links-group-kicker { color: var(--violet); font-family: var(--pixel); font-size: 5.5px; letter-spacing: .08em; }
.links-group-head h2 { margin: 0; color: var(--ink); font-family: var(--display); font-size: 20px; letter-spacing: -.02em; }
.links-group-head i { flex: 1 1 auto; height: 1px; background: var(--line); }
.links-group-head > span:last-child { color: var(--faint); font-family: var(--pixel); font-size: 5.5px; }
.links-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 1100px; }
.link-card {
  --link-color: var(--violet);
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 15px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s ease, box-shadow .25s ease;
}
.link-card::after { content: ""; position: absolute; top: -42px; right: -42px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--link-color) 18%, transparent), transparent 68%); pointer-events: none; }
.link-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--violet) 30%, transparent); box-shadow: 0 30px 60px -36px color-mix(in srgb, var(--violet) 55%, transparent); }
.link-avatar { position: relative; width: 52px; height: 52px; flex: none; display: grid; overflow: hidden; place-items: center; border-radius: 15px; background: linear-gradient(145deg, color-mix(in srgb, var(--link-color) 72%, #fff), var(--link-color)); color: #fff; font-family: var(--display); font-size: 23px; box-shadow: 0 12px 24px -14px var(--link-color); transition: transform .25s ease; }
.link-card:hover .link-avatar { transform: rotate(-4deg) scale(1.03); }
.link-avatar-initial { position: absolute; z-index: 0; inset: 0; display: grid; place-items: center; text-shadow: 0 1px 2px rgba(0,0,0,.12); transition: opacity .18s ease; }
.link-avatar.is-loaded .link-avatar-initial { opacity: 0; }
.link-avatar img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.link-copy { min-width: 0; }
.link-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link-top h2 { margin: 0; min-width: 0; font-size: 17px; line-height: 1.3; color: var(--ink); }
.link-top h2 a { color: inherit; }
.link-top h2 a:hover { color: var(--violet); }
.link-pin { color: var(--yellow); font-size: 11px; line-height: 1; }
.link-card.is-pinned { border-color: color-mix(in srgb, var(--yellow) 34%, var(--line)); }
.link-health { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--faint); font-family: var(--pixel); font-size: 5.5px; letter-spacing: .03em; white-space: nowrap; }
.link-health i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.link-health.is-online { background: color-mix(in srgb, var(--mint) 12%, var(--surface)); color: color-mix(in srgb, var(--mint) 82%, var(--ink)); }
.link-health.is-nofeed { background: color-mix(in srgb, var(--yellow) 14%, var(--surface)); color: color-mix(in srgb, var(--yellow) 70%, #6b4a00); }
.link-health.is-offline { background: color-mix(in srgb, #ef5b5b 12%, var(--surface)); color: #c94b4b; }
.link-desc { display: -webkit-box; overflow: hidden; margin: 7px 0 8px; color: var(--muted); font-size: 11.5px; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.link-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--faint); font-family: var(--pixel); font-size: 5.5px; letter-spacing: .02em; }
.link-meta span { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.link-latest { display: flex; align-items: baseline; gap: 7px; margin-top: 12px; padding-top: 9px; border-top: 1px dashed var(--line); min-width: 0; }
.link-latest-kicker { flex: none; color: var(--faint); font-family: var(--pixel); font-size: 5px; letter-spacing: .06em; }
.link-latest a { overflow: hidden; min-width: 0; color: var(--ink-2); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.link-latest a:hover { color: var(--violet); }
.link-latest time { flex: none; margin-left: auto; color: var(--faint); font-family: var(--pixel); font-size: 5.5px; }
.link-latest.is-empty { opacity: .8; }

/* friend circle */
.circle-page { max-width: 1100px; }
.circle-list { display: flex; flex-direction: column; gap: 10px; max-width: 980px; }
.circle-card { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 13px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--card-shadow); transition: transform .2s ease, border-color .2s ease; }
.circle-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--violet) 26%, transparent); }
.circle-avatar { position: relative; width: 46px; height: 46px; display: grid; overflow: hidden; place-items: center; border-radius: 13px; background: linear-gradient(145deg, color-mix(in srgb, var(--link-color) 70%, #fff), var(--link-color)); color: #fff; font-family: var(--display); font-size: 20px; }
.circle-avatar-initial { position: absolute; z-index: 0; inset: 0; display: grid; place-items: center; transition: opacity .18s ease; }
.circle-avatar.is-loaded .circle-avatar-initial { opacity: 0; }
.circle-avatar img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.circle-copy { min-width: 0; }
.circle-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--faint); font-size: 8px; }
.circle-friend { color: var(--violet); font-weight: 600; }
.circle-category { padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; font-family: var(--pixel); font-size: 5.5px; }
.circle-meta time { margin-left: auto; font-family: var(--pixel); font-size: 5.5px; }
.circle-copy h2 { margin: 5px 0 4px; font-size: 15px; line-height: 1.45; color: var(--ink); }
.circle-copy h2 a:hover { color: var(--violet); }
.circle-copy p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.circle-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--faint); font-family: var(--pixel); font-size: 5.5px; }
.circle-back { margin-top: 22px; }
@media (max-width: 600px) {
  .circle-card { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 13px; }
  .circle-avatar { width: 38px; height: 38px; border-radius: 11px; font-size: 16px; }
  .circle-meta time { margin-left: 0; }
  .circle-copy h2 { font-size: 14px; }
}

.links-apply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
  gap: 30px;
  align-items: start;
  max-width: 1100px;
  margin-top: 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(420px 220px at 0 0, color-mix(in srgb, var(--violet) 7%, transparent), transparent 70%),
    var(--surface);
  box-shadow: var(--card-shadow);
}
.links-apply h2 { margin: 7px 0 8px; font-size: 28px; letter-spacing: -.035em; color: var(--ink); }
.links-apply-copy > p { max-width: 440px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.links-apply-notes { display: flex; flex-direction: column; gap: 7px; margin: 16px 0 0; padding: 0; list-style: none; }
.links-apply-notes li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.links-apply-notes li span { width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--violet); }
.links-success { margin-top: 12px !important; color: #2f9a66 !important; }
.links-error { margin-top: 12px !important; color: #d9534f !important; }
.links-form { display: flex; flex-direction: column; gap: 10px; }
.links-form-field { display: flex; flex-direction: column; gap: 5px; color: var(--faint); font-size: 9px; }
.links-form-field input,
.links-form-field textarea,
.links-form-field select {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  outline: none;
  background: var(--input-bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 11px;
  line-height: 1.6;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.links-form-field input:focus,
.links-form-field textarea:focus,
.links-form-field select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 10%, transparent); }
.links-form-hint { display: block; margin-top: 4px; color: var(--faint); font-size: 8px; line-height: 1.5; }
.links-form-field textarea { resize: vertical; }
.links-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.links-form .btn { align-self: flex-start; margin-top: 3px; }
.links-form-hint { color: var(--faint); font-size: 8px; line-height: 1.6; }
.links-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.works-page-grid { max-width: 1180px; }
.works-note { max-width: 1180px; margin-top: 22px; padding: 20px; border: 1px dashed var(--line-2); border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.works-note p { margin: 0; font-size: 11px; color: var(--muted); }

.now-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 1180px; margin-top: 18px; }
.now-list { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.now-list h2 { margin: 0 0 10px; font-size: 16px; color: var(--ink); }
.now-list a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 11px; color: var(--muted); }
.now-list a:last-child { border-bottom: 0; }
.now-list a:hover { color: var(--violet); }
.now-list em { font-style: normal; font-family: var(--pixel); font-size: 5.5px; color: var(--faint); }

.about-page { max-width: 1180px; }
.about-hero { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 44px; align-items: center; }
.about-portrait { position: relative; }
.about-portrait > img { width: 100%; border-radius: 24px; border: 1px solid var(--line); background: var(--surface-3); }
.about-sticker { position: absolute; right: -10px; bottom: 20px; padding: 8px 12px; background: #ffe9a8; color: #3c290f; font-family: var(--display); font-size: 15px; transform: rotate(5deg); box-shadow: 0 12px 24px -16px rgba(0,0,0,.4); }
.about-copy h1 { margin: 10px 0 14px; font-size: 46px; line-height: 1.2; color: var(--ink); }
.about-lead { margin: 0 0 12px; font-size: 15px; line-height: 1.8; color: var(--ink-2); }
.about-text { margin: 0; font-size: 13px; line-height: 1.9; color: var(--muted); }
.about-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.about-tags span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 9px; color: var(--muted); }
.about-socials { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.about-socials a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 9px; color: var(--muted); }
.about-socials svg { width: 12px; height: 12px; }
.about-socials a:hover { color: var(--violet); border-color: var(--violet); }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.about-block { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.about-block h2 { margin: 8px 0 8px; font-size: 20px; color: var(--ink); }
.about-block p { margin: 0 0 12px; font-size: 11px; line-height: 1.8; color: var(--muted); }
.about-note { margin-top: 18px; padding: 22px; border: 1px dashed var(--line-2); border-radius: 16px; background: color-mix(in srgb, var(--violet) 4%, var(--surface)); }
.about-note p { margin: 8px 0 6px; font-family: var(--hand); font-size: 22px; color: var(--ink-2); }
.about-note span:last-child { font-family: var(--pixel); font-size: 5.5px; color: var(--faint); }

.guestbook-intro { padding-bottom: 6px; }
.guestbook-tip { font-size: 10px !important; color: var(--faint) !important; }

/* header login state */
.login-user { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login-out { font-size: 10px; color: var(--faint); margin-left: 2px; }

/* login page */
.login-error, .login-notice { padding: 9px 11px; border-radius: 9px; font-size: 11px; line-height: 1.6; margin-bottom: 10px; }
.login-error { color: #b23b4b; background: #fff0f2; border: 1px solid #ffd4da; }
.login-notice { color: #2b7a68; background: #effbf7; border: 1px solid #c9efe5; }
.login-logged { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.login-logged-ava { width: 38px; height: 38px; flex: none; overflow: hidden; border-radius: 50%; }
.login-logged-ava img { width: 100%; height: 100%; object-fit: cover; }
.login-logged b { display: block; font-size: 12px; color: var(--ink); }
.login-logged span { display: block; margin-top: 2px; font-size: 10px; color: var(--faint); }
.login-logged-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.login-logged-actions .kook-oauth { flex: 1 1 100%; }
.login-back { font-size: 10px; color: var(--muted); }
.login-back:hover { color: var(--violet); }
.login-form-inner code { padding: 1px 4px; border-radius: 4px; background: var(--surface-3); font-size: 9px; color: var(--violet); }
.login-form-inner .login-help a { color: var(--violet); }

@media (max-width: 1000px) {
  .posts-grid, .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-hero { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; }
  .about-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .posts-grid, .cat-grid, .links-grid, .now-lists, .about-grid { grid-template-columns: 1fr; }
  .post-card { grid-template-columns: 120px minmax(0, 1fr); min-height: 150px; }
  .about-hero { grid-template-columns: 1fr; }
  .about-portrait { max-width: 320px; }
  .about-copy h1 { font-size: 34px; }
  .links-apply, .works-note { flex-direction: column; align-items: flex-start; }
}

/* ---------- full-width layout + scrollbar ---------- */

:root {
  --page-max: 1760px;
}

.wrap,
.hdr {
  max-width: var(--page-max);
}

.hero {
  min-height: calc(100vh - 110px);
}

.hero-intro {
  max-width: 620px;
}

.posts-page .archive-head,
.taxonomy-page .archive-head,
.links-page .archive-head,
.works-page .archive-head,
.now-page .archive-head,
.posts-grid,
.cat-grid,
.links-grid,
.works-page-grid,
.works-note,
.now-lists,
.about-page {
  max-width: var(--page-max);
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--violet) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--violet), var(--pink));
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--pink), var(--orange));
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }
}

@media (max-width: 700px) {
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
}

.txt-link { display: inline-flex; align-items: center; gap: 5px; }
.txt-link svg { width: 12px; height: 12px; flex: none; }

.footer-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;
  padding: 0 0 14px;
  font-size: 10px;
  color: var(--faint);
}
.footer-pages a:hover { color: var(--violet); }

.tag-page-cloud a {
  font-size: 14px;
  padding: 11px 15px;
}
.tag-page-cloud em { font-size: 6px; }

.login-art-cap { display: none; }

@media (max-width: 700px) {
  .footer-pages { justify-content: flex-start; gap: 6px 12px; }
}

.kook-oauth-form { margin: 0; }
button.kook-oauth {
  width: 100%;
  border: 0;
  text-align: left;
  font-family: var(--body);
  cursor: pointer;
}
button.kook-oauth:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- logged-in header ---------- */

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  max-width: 150px;
  padding: 0 10px 0 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 10px;
  line-height: 1;
  transition: border-color .2s ease, background .2s ease;
}
.user-chip:hover { border-color: color-mix(in srgb, var(--violet) 35%, transparent); background: var(--surface-2); }
.user-avatar {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-3);
}
.user-name {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logout-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--faint);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.logout-btn svg { width: 15px; height: 15px; }
.logout-btn:hover { color: var(--pink); border-color: color-mix(in srgb, var(--pink) 35%, transparent); background: color-mix(in srgb, var(--pink) 7%, transparent); }

@media (max-width: 700px) {
  .user-chip { max-width: 116px; padding-right: 8px; }
  .user-name { max-width: 64px; }
  .logout-btn { width: 30px; height: 30px; }
}

/* keep the hero compact instead of forcing a full viewport of empty space */
.hero { min-height: 0; }

@media (max-width: 520px) {
  .user-name { display: none; }
  .user-chip { padding: 0 4px; max-width: none; }
}

/* =========================================================
   Motion / AJAX layer
   ========================================================= */

.yume-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}
.yume-progress.active { opacity: 1; }
.yume-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--violet), var(--pink), var(--orange));
  box-shadow: 0 0 14px var(--violet);
  transition: width .28s ease;
}

main {
  transition: opacity .2s ease, transform .2s ease;
}
main.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}
main.is-entering {
  opacity: 0;
  transform: translateY(10px);
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

.hdr { transition: top .25s ease, transform .25s ease; }
.hdr.is-scrolled { top: 8px; }
.hdr.is-scrolled .hdr-in {
  height: 60px;
  box-shadow: 0 18px 42px -26px rgba(60, 40, 100, .5);
}

.nav a { position: relative; }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--violet);
  transform: translateX(-50%);
  animation: nav-dot .35s ease both;
}
@keyframes nav-dot {
  from { opacity: 0; transform: translateX(-50%) scale(.2); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.profile-card, .note-feature { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; }
.profile-card:hover, .note-feature:hover { box-shadow: 0 34px 70px -42px rgba(60, 40, 100, .55); }
.note-card, .work-card, .ex-card, .cat-card, .link-card, .post-card { transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s ease, box-shadow .3s ease; }

.theme-btn:hover svg { transform: rotate(18deg) scale(1.05); }
.theme-btn svg { transition: transform .35s ease; }

.code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 6px;
  background: rgba(20, 12, 36, .55);
  color: #e9e2f7;
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: .06em;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease, background .2s ease;
}
.prose pre:hover .code-copy { opacity: 1; }
.code-copy:hover { background: var(--violet); }

.prose img, .art-cover img { cursor: zoom-in; }

.yume-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 36px;
  background: rgba(8, 6, 14, .82);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity .22s ease;
}
.yume-lightbox.show { opacity: 1; }
.yume-lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 84vh;
  border-radius: 14px;
  box-shadow: 0 40px 100px rgba(0,0,0,.5);
  transform: scale(.96);
  transition: transform .22s ease;
}
.yume-lightbox.show img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(0,0,0,.25);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
body.lightbox-open { overflow: hidden; }

.yume-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1100;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11px;
  box-shadow: 0 18px 40px -24px rgba(60,40,100,.55);
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity .22s ease, transform .22s ease;
}
.yume-toast.show { opacity: 1; transform: translate(-50%, 0); }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .32s;
}

@media (max-width: 900px) {
  .hdr.is-scrolled .hdr-in { height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  main.is-leaving, main.is-entering { opacity: 1; transform: none; }
}

.prose pre { position: relative; }

/* ---------- search overlay ---------- */

.search-btn svg { width: 15px; height: 15px; }

.yume-search {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: start center;
  padding: 12vh 22px 30px;
  background: rgba(12, 8, 22, .55);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.yume-search.show { opacity: 1; pointer-events: auto; }
body.search-open { overflow: hidden; }
.search-panel {
  width: min(680px, 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 40px 100px -40px rgba(0,0,0,.45);
  transform: translateY(-10px) scale(.985);
  transition: transform .24s ease;
  overflow: hidden;
}
.yume-search.show .search-panel { transform: none; }
.search-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 0; }
.search-close {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.search-input {
  width: calc(100% - 36px);
  margin: 12px 18px 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  outline: none;
}
.search-input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 12%, transparent); }
.search-hint { margin: 8px 18px 0; font-size: 9px; color: var(--faint); }
.search-results { max-height: 46vh; overflow-y: auto; padding: 12px 10px 12px; }
.search-empty { margin: 0; padding: 18px 10px; font-size: 11px; color: var(--faint); }
.search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 11px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.5;
}
.search-result:hover { background: var(--surface-2); color: var(--violet); }
.search-result em { font-style: normal; color: var(--faint); }
.search-result span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.comments-fresh { animation: comments-in .4s ease both; }
@keyframes comments-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 700px) {
  .yume-search { padding-top: 8vh; }
  .search-results { max-height: 50vh; }
}

/* ---------- KOOK guestbook / comments ---------- */

.comments-sub { margin: 5px 0 0; font-size: 10px; line-height: 1.7; color: var(--faint); }
.comment-me {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}
.comment-me img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.comment-me b { display: block; font-size: 12px; color: var(--ink); }
.comment-me span { display: block; margin-top: 2px; font-size: 9px; color: var(--faint); }
.comment-me > a { margin-left: auto; font-size: 10px; color: var(--muted); }
.comment-me > a:hover { color: var(--violet); }

.comment-list { display: flex; flex-direction: column; gap: 10px; }
.comment-list .comment-item {
  display: flex;
  gap: 11px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 30px -30px rgba(60,40,100,.35);
}
.comment-avatar {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-3);
}
.comment-body { min-width: 0; flex: 1; }
.comment-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.comment-top b { font-size: 12px; color: var(--ink); }
.comment-kook {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(70,165,247,.1);
  color: #3f8fe0;
  font-family: var(--pixel);
  font-size: 4.5px;
  letter-spacing: .05em;
}
.comment-top time { margin-left: auto; font-family: var(--pixel); font-size: 5px; color: var(--faint); }
.comment-text { margin-top: 4px; font-size: 12px; line-height: 1.8; color: var(--muted); }
.comment-text p { margin: 0 0 6px; }
.comment-text p:last-child { margin-bottom: 0; }

.comment-empty {
  padding: 26px 18px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  background: color-mix(in srgb, var(--violet) 3%, var(--surface));
  text-align: center;
}
.comment-empty span { font-family: var(--pixel); font-size: 5.5px; letter-spacing: .1em; color: var(--violet); }
.comment-empty p { margin: 8px 0 0; font-size: 11px; color: var(--faint); }

.comment-gate {
  margin-top: 16px;
  padding: 24px;
  border: 1px solid color-mix(in srgb, #46a5f7 25%, var(--line));
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(70,165,247,.08), rgba(124,92,255,.05));
}
.comment-gate h3 { margin: 8px 0 6px; font-size: 22px; color: var(--ink); }
.comment-gate p { margin: 0 0 14px; max-width: 520px; font-size: 11px; line-height: 1.8; color: var(--muted); }
.comment-gate .btn { background: #46a5f7; box-shadow: 0 12px 26px -16px rgba(70,165,247,.8); }
.comment-gate-note { display: block; margin-top: 10px; font-size: 9px; color: var(--faint); }

.comment-nav { padding-top: 14px; }
.comments-closed { font-size: 11px; color: var(--muted); }

.guestbook-page .comments { max-width: 100%; margin-top: 26px; padding-top: 24px; }
.guestbook-page .comments-head h2 { font-size: 26px; }
.guestbook-page .respond { margin-top: 16px; }
.guestbook-page .comment-gate { margin-top: 8px; }

.guestbook-note {
  margin: 0 0 18px;
  padding: 13px 15px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  background: color-mix(in srgb, var(--violet) 3%, var(--surface));
}
.guestbook-note p { margin: 5px 0 0; font-size: 10.5px; line-height: 1.8; color: var(--faint); }

/* integration cover art */
.anime-art.has-image,
.play-art.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.anime-art.has-image .jp,
.anime-art.has-image .ep,
.play-art.has-image .label,
.play-art.has-image .title { position: relative; z-index: 2; }

/* live cover <img> */
.anime-art, .play-art { position: relative; overflow: hidden; }
.anime-cover, .play-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.anime-art.has-image::after,
.play-art.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(20,14,34,.02), rgba(20,14,34,.68));
  pointer-events: none;
}
.anime-art.has-image .jp,
.anime-art.has-image .ep,
.play-art.has-image .label,
.play-art.has-image .title { position: relative; z-index: 2; }

/* ---------- article polish ---------- */

.art-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
}
.art-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--body);
  font-size: 10px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.art-tool svg { width: 13px; height: 13px; }
.art-tool:hover { color: var(--violet); border-color: var(--violet); transform: translateY(-1px); }
.art-tool-note { margin-left: auto; font-family: var(--pixel); font-size: 5.5px; letter-spacing: .08em; color: var(--faint); }

.toc-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--body);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.toc-toggle span { margin-left: auto; font-size: 15px; color: var(--violet); transition: transform .2s ease; }
.toc-toggle[aria-expanded="true"] span { transform: rotate(45deg); }

.related { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); }
.related-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.related-head h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; color: var(--ink); }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.related-card {
  display: block;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.related-card:hover { transform: translateY(-3px); border-color: var(--violet); box-shadow: 0 20px 38px -30px rgba(60,40,100,.45); }
.related-cover { overflow: hidden; aspect-ratio: 16 / 9; border-radius: 8px; background: var(--surface-3); }
.related-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.related-card:hover .related-cover img { transform: scale(1.04); }
.related-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-family: var(--pixel); font-size: 5px; color: var(--faint); }
.related-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-card h3 { margin: 5px 0 3px; font-size: 12px; line-height: 1.55; color: var(--ink-2); }

@media (max-width: 900px) {
  .toc-toggle { display: inline-flex; }
  .art-aside { display: none; }
  .art-aside.toc-open { display: block; }
  .art-aside.toc-open .toc { margin-top: 8px; }
  .art-tool-note { display: none; }
  .related-grid { grid-template-columns: 1fr; }
  .related-card { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 10px; align-items: center; }
  .related-cover { grid-row: span 2; aspect-ratio: 16 / 10; }
  .related-meta { margin-top: 0; }
  .related-card h3 { margin: 0; }
}

/* KOOK brand icon */
.social img.kook-mark,
.about-socials img.kook-mark {
  width: 15px;
  height: 15px;
  object-fit: contain;
  display: inline-block;
}
.about-socials img.kook-mark { width: 13px; height: 13px; }
.kook-mark-light { display: none !important; }
[data-theme="dark"] .kook-mark-dark { display: none !important; }
[data-theme="dark"] .kook-mark-light { display: inline-block !important; }

/* GitHub repo covers */
.work-cover.repo-cover {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 3px;
  padding: 18px;
  background:
    radial-gradient(120% 90% at 86% 10%, color-mix(in srgb, var(--repo-color) 65%, transparent), transparent 58%),
    linear-gradient(145deg, color-mix(in srgb, var(--repo-color) 72%, #171120), #171120 78%);
}
.work-cover.repo-cover::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  transform: rotate(8deg);
}
.repo-cover .idx {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  background: rgba(20,14,32,.45);
  border-color: rgba(255,255,255,.16);
  color: rgba(255,255,255,.78);
}
.repo-cover .repo-owner,
.repo-cover .repo-name,
.repo-cover .repo-meta { position: relative; z-index: 2; }
.repo-cover .repo-owner {
  font-family: var(--pixel);
  font-size: 5.5px;
  letter-spacing: .08em;
  color: rgba(255,255,255,.55);
}
.repo-cover .repo-name {
  max-width: 88%;
  font-size: clamp(18px, 2.3vw, 28px);
  line-height: 1.15;
  letter-spacing: -.04em;
  color: #fff;
  overflow-wrap: anywhere;
}
.repo-cover .repo-meta {
  margin-top: 0;
  font-family: var(--pixel);
  font-size: 5.5px;
  color: rgba(255,255,255,.62);
}
.work-body p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- profile page ---------- */

.profile-page { padding-top: 30px; }
.profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(80% 120% at 90% 0%, color-mix(in srgb, var(--pink) 13%, transparent), transparent 60%),
    radial-gradient(70% 100% at 0% 100%, color-mix(in srgb, var(--violet) 12%, transparent), transparent 60%),
    var(--surface);
  overflow: hidden;
}
.profile-hero::after {
  content: "PROFILE";
  position: absolute;
  right: 24px;
  bottom: -18px;
  font-family: var(--display);
  font-size: 92px;
  color: color-mix(in srgb, var(--violet) 7%, transparent);
  pointer-events: none;
}
.profile-avatar-wrap { position: relative; width: 180px; height: 180px; }
.profile-avatar {
  width: 180px;
  height: 180px;
  border-radius: 28px;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 22px 50px -32px rgba(60,40,100,.6);
  background: var(--surface-3);
}
.profile-online {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--mint);
}
.profile-intro { position: relative; z-index: 2; min-width: 0; }
.profile-kicker { display: flex; align-items: center; gap: 10px; margin: 8px 0 6px; }
.profile-kicker .pixel { color: var(--violet); }
.profile-role {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-family: var(--pixel);
  font-size: 5px;
  color: var(--muted);
}
.profile-intro h1 { margin: 0; font-size: clamp(38px, 5vw, 58px); line-height: 1.05; letter-spacing: -.04em; color: var(--ink); }
.profile-handle { margin: 6px 0 0; font-family: var(--pixel); font-size: 7px; color: var(--faint); }
.profile-bio { max-width: 560px; margin: 12px 0 0; font-size: 12px; line-height: 1.8; color: var(--muted); }
.profile-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.profile-actions .btn { height: 34px; font-size: 10px; }
.profile-link { font-size: 10px; color: var(--faint); }
.profile-link:hover { color: var(--violet); }

.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.profile-stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.profile-stat span { display: block; font-family: var(--pixel); font-size: 5.5px; color: var(--faint); }
.profile-stat b { display: block; margin-top: 4px; font-size: 28px; line-height: 1.1; color: var(--ink); }
.profile-stat b.small { font-size: 17px; }
.profile-stat em { display: block; margin-top: 3px; font-family: var(--pixel); font-size: 5px; color: var(--faint); font-style: normal; }

.profile-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 22px; }
.profile-side { display: flex; flex-direction: column; gap: 12px; }
.profile-card { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.profile-card h2 { margin: 0 0 10px; font-size: 15px; color: var(--ink); }
.profile-kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 10px; }
.profile-kv:last-child { border-bottom: 0; }
.profile-kv span { color: var(--faint); }
.profile-kv b { color: var(--ink-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.profile-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-socials a { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.profile-socials a:hover { color: var(--violet); border-color: var(--violet); }
.profile-socials svg { width: 14px; height: 14px; }

.profile-main { min-width: 0; }
.profile-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.profile-section-head h2 { margin: 0; font-size: 25px; color: var(--ink); }
.profile-comments { display: flex; flex-direction: column; gap: 9px; }
.profile-comment { display: block; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .25s ease, transform .25s ease; }
.profile-comment:hover { border-color: var(--violet); transform: translateY(-2px); }
.profile-comment-top { display: flex; justify-content: space-between; gap: 12px; font-family: var(--pixel); font-size: 5.5px; color: var(--faint); }
.profile-comment-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--violet); }
.profile-comment p { margin: 5px 0 0; font-size: 11.5px; line-height: 1.75; color: var(--muted); }
.profile-empty { padding: 28px; border: 1px dashed var(--line-2); border-radius: 14px; text-align: center; background: var(--surface); }
.profile-empty span { font-family: var(--pixel); font-size: 5.5px; color: var(--violet); }
.profile-empty p { margin: 7px 0 8px; font-size: 11px; color: var(--faint); }

.profile-gate { max-width: 660px; margin: 40px auto; padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.profile-gate h1 { margin: 8px 0; font-size: 32px; color: var(--ink); }
.profile-gate p { margin: 0 0 16px; font-size: 12px; line-height: 1.8; color: var(--muted); }

@media (max-width: 860px) {
  .profile-hero { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .profile-avatar-wrap, .profile-avatar { width: 130px; height: 130px; }
  .profile-avatar { border-radius: 22px; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-side { flex-direction: row; }
  .profile-card { flex: 1; }
}

/* threaded comments */
.comment-children {
  list-style: none;
  margin: 9px 0 0 20px;
  padding-left: 14px;
  border-left: 1px dashed var(--line-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comment-item .comment-item { margin: 0; }
.comment-reply {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--faint);
  font-family: var(--body);
  font-size: 9px;
  cursor: pointer;
}
.comment-reply:hover { color: var(--violet); }
.reply-to {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 10px;
  color: var(--muted);
}
.reply-to[hidden] { display: none; }
.reply-to b { color: var(--violet); }
.reply-cancel {
  border: 0;
  background: none;
  color: var(--faint);
  font-size: 9px;
  cursor: pointer;
}
@media (max-width: 620px) {
  .comment-children { margin-left: 8px; padding-left: 9px; }
}

/* profile v2 */
.profile-cover {
  position: relative;
  height: 210px;
  margin-top: 8px;
  padding: 26px 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(80% 180% at 88% -20%, color-mix(in srgb, var(--pink) 32%, transparent), transparent 60%),
    radial-gradient(80% 180% at 6% 120%, color-mix(in srgb, var(--violet) 36%, transparent), transparent 62%),
    linear-gradient(135deg, #251b42, #15101f);
}
.profile-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
}
.profile-cover::after {
  content: "PROFILE";
  position: absolute;
  right: 16px;
  bottom: -34px;
  font-family: var(--display);
  font-size: 150px;
  line-height: 1;
  letter-spacing: -.06em;
  color: rgba(255,255,255,.06);
  pointer-events: none;
}
.profile-cover-kicker { position: relative; z-index: 2; font-family: var(--pixel); font-size: 5.5px; letter-spacing: .14em; color: rgba(255,255,255,.55); }
.profile-cover h2 { position: relative; z-index: 2; margin: 16px 0 4px; font-size: clamp(30px, 4.2vw, 52px); line-height: 1; letter-spacing: -.05em; color: #fff; }
.profile-cover p { position: relative; z-index: 2; margin: 0; font-size: 10px; color: rgba(255,255,255,.5); }
.profile-cover-uid { position: absolute; z-index: 2; right: 26px; top: 24px; font-family: var(--pixel); font-size: 5.5px; color: rgba(255,255,255,.5); }
.profile-hero { margin-top: -64px; position: relative; z-index: 3; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); }
.profile-kook-badge { padding: 3px 7px; border-radius: 999px; background: rgba(70,165,247,.12); color: #3f8fe0; font-family: var(--pixel); font-size: 5px; }
.profile-tabs { display: flex; align-items: center; gap: 6px; margin: 18px 0 14px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); width: fit-content; }
.profile-tab { height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--faint); font-family: var(--body); font-size: 10px; cursor: pointer; }
.profile-tab span { margin-left: 3px; font-family: var(--pixel); font-size: 5px; }
.profile-tab.active { background: var(--violet); color: #fff; box-shadow: 0 8px 18px -12px var(--violet); }
.profile-panel[hidden] { display: none; }
.profile-more { margin-left: auto; border: 0; background: none; color: var(--violet); font-family: var(--body); font-size: 9px; cursor: pointer; }
.profile-section-head-posts { margin-top: 22px; }
.profile-post-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.profile-post { display: flex; gap: 9px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); transition: border-color .25s ease, transform .25s ease; }
.profile-post:hover { border-color: var(--violet); transform: translateY(-2px); }
.profile-post-cover { width: 74px; height: 52px; flex: none; overflow: hidden; border-radius: 7px; background: var(--surface-3); }
.profile-post-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-post time, .profile-post-card time { font-family: var(--pixel); font-size: 5px; color: var(--faint); }
.profile-post h3 { margin: 4px 0 0; font-size: 11px; line-height: 1.5; color: var(--ink-2); }
.profile-post-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.profile-post-card { padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .25s ease, transform .25s ease; }
.profile-post-card:hover { border-color: var(--violet); transform: translateY(-2px); }
.profile-post-card .profile-post-cover { width: 100%; height: 120px; border-radius: 8px; }
.profile-post-meta { padding: 8px 3px 3px; }
.profile-post-meta h3 { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink); }

@media (max-width: 860px) {
  .profile-cover { height: 170px; padding: 20px; }
  .profile-cover h2 { margin-top: 10px; }
  .profile-cover::after { font-size: 100px; }
  .profile-hero { margin-top: -44px; }
  .profile-post-list, .profile-post-grid { grid-template-columns: 1fr; }
  .profile-post-card .profile-post-cover { height: 150px; }
}

/* comment composer */
.comment-time { margin-left: auto; font-family: var(--pixel); font-size: 5px; color: var(--faint); }
.comment-actions { display: flex; gap: 12px; margin-top: 6px; }
.comment-copy { padding: 0; border: 0; background: none; color: var(--faint); font-family: var(--body); font-size: 9px; cursor: pointer; }
.comment-copy:hover { color: var(--violet); }
.comment-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}
.comment-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.comment-tools button {
  min-width: 26px;
  height: 25px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: var(--body);
  font-size: 10px;
  cursor: pointer;
}
.comment-tools button:hover { background: var(--surface); color: var(--violet); }
.comment-counter { margin-left: auto; font-family: var(--pixel); font-size: 5px; color: var(--faint); }
.comment-emoji-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.comment-emoji-panel[hidden] { display: none; }
.comment-emoji-panel button { width: 27px; height: 27px; border: 0; border-radius: 6px; background: transparent; font-size: 15px; cursor: pointer; }
.comment-emoji-panel button:hover { background: var(--surface-2); }
.comment-preview {
  margin-bottom: 8px;
  padding: 12px;
  border: 1px dashed var(--line-2);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  min-height: 48px;
}
.comment-preview[hidden] { display: none; }
.comment-preview code { padding: 1px 4px; border-radius: 4px; background: var(--surface-3); font-family: var(--pixel); font-size: 10px; }
.comment-preview pre { margin: 6px 0; padding: 9px; overflow: auto; border-radius: 6px; background: var(--surface-3); }
.comment-preview blockquote { margin: 6px 0; padding-left: 9px; border-left: 2px solid var(--violet); color: var(--faint); }
.comment-preview a { color: var(--violet); text-decoration: underline; }
.comment-preview-empty { color: var(--faint); }

/* now playing list */
.play-list { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.play-list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-family: var(--pixel); font-size: 5.5px; color: var(--faint); }
.play-list-head a { color: var(--violet); }
.play-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.play-row + .play-row { border-top: 1px dashed var(--line); }
.play-row-cover { width: 52px; height: 30px; flex: none; overflow: hidden; border-radius: 5px; background: var(--surface-3); }
.play-row-cover img { width: 100%; height: 100%; object-fit: cover; }
.play-row-name { min-width: 0; }
.play-row-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--ink-2); }
.play-row-name em { display: block; margin-top: 2px; font-style: normal; font-family: var(--pixel); font-size: 5px; color: var(--faint); }

/* about v2 */
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.about-stat { padding: 15px 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.about-stat span { display: block; font-family: var(--pixel); font-size: 5.5px; color: var(--faint); }
.about-stat b { display: block; margin-top: 4px; font-size: 28px; line-height: 1.1; color: var(--ink); }
.about-stat em { display: block; margin-top: 3px; font-family: var(--pixel); font-size: 5px; color: var(--faint); font-style: normal; }
.about-stack { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.about-stack span { padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--pixel); font-size: 5px; color: var(--faint); }
.about-timeline { margin-top: 22px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.about-timeline-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.about-timeline-head h2 { margin: 0; font-size: 26px; letter-spacing: -.03em; color: var(--ink); }
.about-timeline-list { display: flex; flex-direction: column; }
.about-timeline-item { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 18px; padding: 13px 0; border-top: 1px dashed var(--line); }
.about-timeline-item time { font-family: var(--pixel); font-size: 7px; color: var(--violet); }
.about-timeline-item h3 { margin: 0 0 4px; font-size: 15px; color: var(--ink); }
.about-timeline-item p { margin: 0; max-width: 680px; font-size: 11px; line-height: 1.8; color: var(--muted); }
@media (max-width: 760px) {
  .about-stats { grid-template-columns: 1fr 1fr; }
  .about-timeline-item { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
}

/* ticker motion guarantee */
.ticker-track {
  will-change: transform;
  backface-visibility: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation-duration: 30s !important;
    animation-iteration-count: infinite !important;
    animation-play-state: running !important;
  }
}

/* KOOK guild widget */
.kook-section { padding-top: 62px; }
.kook-card {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid color-mix(in srgb, #46a5f7 22%, var(--line));
  border-radius: 20px;
  background:
    radial-gradient(70% 160% at 92% -20%, rgba(70,165,247,.18), transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, #46a5f7 7%, var(--surface)), var(--surface));
}
.kook-card::after {
  content: "KOOK";
  position: absolute;
  right: 20px;
  bottom: -22px;
  font-family: var(--display);
  font-size: 110px;
  line-height: 1;
  color: rgba(70,165,247,.06);
  pointer-events: none;
}
.kook-main { position: relative; z-index: 2; display: flex; align-items: center; gap: 16px; }
.kook-brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.kook-icon { width: 54px; height: 54px; border-radius: 15px; object-fit: cover; border: 1px solid var(--line); background: var(--surface); }
.kook-brand h2 { margin: 4px 0 3px; font-size: 24px; letter-spacing: -.03em; color: var(--ink); }
.kook-brand p { margin: 0; font-size: 10px; color: var(--muted); }
.kook-online { margin-left: auto; display: flex; align-items: center; gap: 5px; flex: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.kook-online i { width: 6px; height: 6px; border-radius: 50%; background: #31c48d; box-shadow: 0 0 0 3px rgba(49,196,141,.13); animation: kook-pulse 2s ease infinite; }
.kook-online b { font-size: 15px; color: var(--ink); }
.kook-online span { font-family: var(--pixel); font-size: 5px; color: var(--faint); }
@keyframes kook-pulse { 50% { box-shadow: 0 0 0 7px rgba(49,196,141,.03); } }
.kook-bottom { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; margin-top: 15px; padding-top: 13px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.kook-members { display: flex; align-items: center; }
.kook-member { width: 26px; height: 26px; margin-left: -7px; border: 2px solid var(--surface); border-radius: 50%; overflow: hidden; background: var(--surface-3); }
.kook-member:first-child { margin-left: 0; }
.kook-member img { width: 100%; height: 100%; object-fit: cover; }
.kook-members em { margin-left: 7px; font-style: normal; font-family: var(--pixel); font-size: 5px; color: var(--faint); }
.kook-channels { display: flex; gap: 4px; flex-wrap: wrap; }
.kook-channels span { padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 8px; color: var(--muted); }
.kook-join { margin-left: auto; height: 32px; font-size: 10px; background: #46a5f7; box-shadow: 0 10px 22px -14px rgba(70,165,247,.75); }
@media (max-width: 700px) {
  .kook-main { align-items: flex-start; }
  .kook-online { margin-left: 0; }
  .kook-brand h2 { font-size: 19px; }
  .kook-icon { width: 44px; height: 44px; }
  .kook-join { margin-left: 0; }
}

/* comment link dialog */
.yume-link-dialog {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 8, 22, .55);
  backdrop-filter: blur(9px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.yume-link-dialog.show { opacity: 1; pointer-events: auto; }
body.link-dialog-open { overflow: hidden; }
.yume-link-panel {
  width: min(420px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.5);
  transform: translateY(8px) scale(.985);
  transition: transform .22s ease;
}
.yume-link-dialog.show .yume-link-panel { transform: none; }
.yume-link-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.yume-link-head b { font-size: 15px; color: var(--ink); }
.yume-link-close { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--faint); font-size: 16px; cursor: pointer; }
.yume-link-panel label { display: block; font-size: 9px; color: var(--faint); }
.yume-link-input { display: block; width: 100%; height: 40px; margin-top: 5px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--input-bg); color: var(--ink); font-family: var(--body); font-size: 12px; outline: none; box-sizing: border-box; }
.yume-link-input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 12%, transparent); }
.yume-link-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 14px; }
.yume-link-actions button { height: 32px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 10px; cursor: pointer; }
.yume-link-actions .yume-link-ok { background: var(--violet); border-color: var(--violet); color: #fff; }

/* posts below profile layout */
.profile-posts-block {
  margin-top: 22px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.profile-posts-block .profile-section-head-posts { margin-top: 14px; }
.profile-posts-block .profile-post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .profile-posts-block .profile-post-list { grid-template-columns: 1fr; }
}

/* profile v3 */
.profile-head {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 250px;
  gap: 24px;
  align-items: center;
  margin-top: -58px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 50px -38px rgba(60,40,100,.5);
}
.profile-head .profile-avatar-wrap,
.profile-head .profile-avatar { width: 158px; height: 158px; }
.profile-head .profile-avatar { border-radius: 24px; }
.profile-head-copy { min-width: 0; }
.profile-head-copy .crumb { margin-bottom: 6px; }
.profile-head-copy h1 { margin: 0; font-size: clamp(34px, 4.2vw, 48px); line-height: 1; letter-spacing: -.045em; color: var(--ink); }
.profile-head-copy .profile-handle { margin: 5px 0 0; }
.profile-head-copy .profile-bio { margin: 9px 0 0; }
.profile-head-copy .profile-actions { margin-top: 12px; }
.profile-badge {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-family: var(--pixel);
  font-size: 5px;
  color: var(--faint);
}
.profile-head-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.profile-head-stats .profile-stat { padding: 9px 10px; border-radius: 10px; background: var(--surface-2); border-color: transparent; }
.profile-head-stats .profile-stat b { font-size: 21px; margin-top: 2px; }
.profile-head-stats .profile-stat b.small { font-size: 12px; }
.profile-head-stats .profile-stat em { display: none; }
.profile-now-card p { margin: 0 0 4px; font-size: 10px; line-height: 1.65; color: var(--muted); }
.profile-now-card .txt-link { margin-top: 7px; }

@media (max-width: 1000px) {
  .profile-head { grid-template-columns: 130px minmax(0, 1fr); }
  .profile-head .profile-avatar-wrap,
  .profile-head .profile-avatar { width: 120px; height: 120px; }
  .profile-head-stats { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 620px) {
  .profile-head { grid-template-columns: 1fr; text-align: left; margin-top: -40px; padding: 18px; }
  .profile-head-stats { grid-column: auto; grid-template-columns: 1fr 1fr; }
  .profile-head .profile-avatar-wrap,
  .profile-head .profile-avatar { width: 104px; height: 104px; }
}

/* profile full-width overview */
.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.profile-info-grid .profile-card { height: 100%; }
.profile-feed-full { margin-top: 18px; }
.profile-feed-full .profile-section-head { margin-bottom: 12px; }
@media (max-width: 760px) {
  .profile-info-grid { grid-template-columns: 1fr; }
}

/* keep profile info cards compact */
.profile-info-grid { align-items: start; }
.profile-info-grid .profile-card { height: auto; }

/* reset the original hero card styles inside profile page cards */
.profile-page .profile-card {
  width: auto;
  transform: none;
  box-shadow: none;
  border-radius: 16px;
  overflow: visible;
}
.profile-page .profile-card:hover {
  transform: none;
  box-shadow: none;
}

/* now page layout refinement */
.now-grid { align-items: start; }
.watch-box, .play-box { height: auto; }

/* article author chip */
.art-author {
  padding: 4px 9px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 10px;
  font-weight: 500;
}
.art-author .mini-ava {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  font-size: 0;
}

/* now page: fill left column with watching + listening/reading */
.now-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.now-grid .now-lists { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 0; max-width: none; }
.now-grid .now-list { padding: 14px; }
.now-grid .now-list h2 { font-size: 14px; }
.now-grid .now-list a { font-size: 10px; padding: 7px 0; }
.play-art { display: block; }
@media (max-width: 820px) {
  .now-grid .now-lists { grid-template-columns: 1fr; }
}

/* now auto-scroll + steam profile */
.now-grid .anime-row {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.now-grid .anime-row .anime-card {
  flex: 0 0 calc((100% - 18px) / 3);
}
.now-grid .anime-row::-webkit-scrollbar { height: 4px; }
.now-grid .anime-row::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

.steam-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.steam-profile img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.steam-profile b { display: block; font-size: 10px; color: var(--ink-2); }
.steam-profile em { display: block; margin-top: 2px; font-style: normal; font-family: var(--pixel); font-size: 5px; color: var(--faint); }

.play-scroll { max-height: 156px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.now-scroll { max-height: 160px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.play-scroll::-webkit-scrollbar,
.now-scroll::-webkit-scrollbar { width: 4px; }
.play-scroll::-webkit-scrollbar-thumb,
.now-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

@media (max-width: 760px) {
  .now-grid .anime-row .anime-card { flex-basis: calc((100% - 9px) / 2); }
}

/* now marquee polish */
.now-grid .anime-row,
.play-scroll,
.now-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.now-grid .anime-row::-webkit-scrollbar,
.play-scroll::-webkit-scrollbar,
.now-scroll::-webkit-scrollbar { display: none; }
.now-scroll { max-height: 118px; }
.play-scroll { max-height: 145px; }

/* home about side card */
.about-side { align-items: stretch; }
.about-side-card {
  width: 100%;
  height: 100%;
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(80% 100% at 100% 0%, color-mix(in srgb, var(--pink) 12%, transparent), transparent 60%),
    var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}
.about-side-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface);
  box-shadow: 0 10px 24px -16px rgba(60,40,100,.5);
  margin-bottom: 3px;
}
.about-side-card > b { font-size: 14px; color: var(--ink); }
.about-side-card .pixel { color: var(--violet); }
.about-side-card .about-badges { max-width: none; justify-content: center; margin-top: 4px; }
.about-side-card .badge { font-size: 5px; padding: 4px 7px; }
.about-side-card .badge i { width: 5px; height: 5px; border-radius: 50%; background: var(--violet); }
.about-side-card .badge:nth-child(2) i { background: var(--pink); }
.about-side-card .badge:nth-child(3) i { background: var(--mint); }
.about-side-card .badge:nth-child(4) i { background: var(--yellow); }
.about-side-link { margin-top: 5px; font-size: 9px; color: var(--muted); }
.about-side-link svg { width: 11px; height: 11px; vertical-align: -2px; }
.about-side-link:hover { color: var(--violet); }
.about-card .about-mark {
  font-size: 78px;
  right: 18px;
  bottom: 10px;
  color: color-mix(in srgb, var(--violet) 4%, transparent);
}
@media (max-width: 760px) {
  .about-side-card { min-height: 0; }
}

/* ---------- typography overhaul ---------- */
html {
  --fs-ui: 16.5px;
  --fs-copy: 15.5px;
  --fs-micro: 9px;
  --fs-small: 13.5px;
}
html.theme-font-small {
  --fs-ui: 15px;
  --fs-copy: 14.5px;
  --fs-micro: 8px;
  --fs-small: 12.5px;
}
html.theme-font-medium {
  --fs-ui: 16.5px;
  --fs-copy: 15.5px;
  --fs-micro: 9px;
  --fs-small: 13.5px;
}
html.theme-font-large {
  --fs-ui: 18px;
  --fs-copy: 17px;
  --fs-micro: 10px;
  --fs-small: 14.5px;
}
body { font-size: var(--fs-ui); line-height: 1.8; }
p, li { line-height: 1.85; }

.pixel,
.sec-label,
.art-kicker,
.qs-en,
.ticker-track span,
.box-label,
.ex-label,
.badge,
.note-meta,
.work-meta,
.art-meta,
.profile-kicker,
.post-card .meta,
.crumb.pixel,
.footer,
.footer-bottom {
  font-size: var(--fs-micro);
  letter-spacing: 0.09em;
}
.tag { font-size: var(--fs-micro); }
.nav a { font-size: 12.5px; }
html.theme-font-large .nav a { font-size: 13.5px; }

.about-main p,
.hero-copy p,
.hero p,
.about-lead,
.about-text,
.page-body,
.art-body,
.post-card p,
.work-body p,
.note-body p {
  font-size: var(--fs-copy);
  line-height: 1.9;
}
.about-side-card > b { font-size: 16px; }
.about-side-link { font-size: 10.5px; }
.about-mail { font-size: 12px; }

.now-list a { font-size: 12px; }
.now-list em { font-size: var(--fs-micro); }
.anime-meta h3 { font-size: 13.5px; }
.anime-meta p { font-size: 10.5px; }
.play-stat span { font-size: var(--fs-micro); }
.play-stat b { font-size: 13px; }
.play-row-name b { font-size: 11.5px; }
.play-row-name em { font-size: var(--fs-micro); }
.listening span { font-size: 11px; }

.art-body,
.prose { font-size: var(--fs-copy); line-height: 1.95; }
html.theme-font-small .prose { font-size: var(--fs-copy); }
html.theme-font-large .prose { font-size: var(--fs-copy); }

.footer { font-size: 11px; }
.footer-bottom { font-size: var(--fs-micro); }

@media (max-width: 760px) {
  html { --fs-ui: 16px; --fs-copy: 15px; --fs-micro: 8.5px; }
}

/* reading refinements */
.toc.is-empty { display: none; }
.toc-empty { margin: 8px 0 0; font-size: 11px; color: var(--faint); line-height: 1.7; }
.prose pre { counter-reset: code-line; }
.prose pre code .code-line { display: block; min-height: 1.65em; }
.prose pre code .code-line::before {
  counter-increment: code-line;
  content: counter(code-line);
  display: inline-block;
  width: 2.1em;
  margin-right: .9em;
  color: color-mix(in srgb, var(--faint) 70%, transparent);
  text-align: right;
  user-select: none;
}
.prose details.spoiler {
  margin: 1.2em 0;
  padding: 10px 13px;
  border: 1px dashed color-mix(in srgb, var(--pink) 45%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--pink) 5%, var(--surface));
}
.prose details.spoiler summary { cursor: pointer; font-weight: 600; color: var(--pink); }
.prose figure figcaption { margin-top: 6px; font-size: 11px; color: var(--faint); text-align: center; }

/* listening / reading should show every row, no clipping and no auto-scroll */
.now-scroll {
  max-height: none;
  overflow: visible;
}

/* collection library */
.collection-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 24px 0 16px; }
.collection-stats > div { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.collection-stats b { display: block; font-family: var(--display); font-size: 30px; line-height: 1; color: var(--ink); }
.collection-stats span { display: block; margin-top: 4px; font-size: 9px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }
.collection-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.collection-filters a { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; color: var(--muted); }
.collection-filters a.active, .collection-filters a:hover { color: var(--violet); border-color: var(--violet); background: color-mix(in srgb, var(--violet) 6%, transparent); }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.collection-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.collection-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow); }
.collection-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #ded5ff, #ffd6e7); }
.collection-cover.is-game { background: linear-gradient(135deg, #2e2346, #6b4a9a); }
.collection-cover.is-book { background: linear-gradient(135deg, #e5dcc8, #b7a88c); }
.collection-cover.is-music { background: linear-gradient(135deg, #ffd9e8, #bba8ff); }
.collection-cover img { width: 100%; height: 100%; object-fit: cover; }
.collection-type, .collection-status { position: absolute; top: 8px; padding: 4px 7px; border-radius: 999px; background: rgba(20,16,35,.55); color: #fff; font-size: 7px; letter-spacing: .07em; backdrop-filter: blur(6px); }
.collection-type { left: 8px; }
.collection-status { right: 8px; }
.collection-copy { padding: 12px 13px 13px; }
.collection-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.collection-top h2 { margin: 0; font-size: 15px; line-height: 1.4; color: var(--ink); }
.collection-rating { flex: none; font-size: 9px; color: var(--yellow); }
.collection-progress { margin: 5px 0 0; font-family: var(--pixel); font-size: 7px; color: var(--violet); }
.collection-note { margin: 7px 0 0; font-size: 11px; line-height: 1.7; color: var(--muted); }
.collection-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; font-size: 8px; color: var(--faint); }
.collection-meta a { color: var(--violet); }
@media (max-width: 900px) { .collection-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .collection-grid { grid-template-columns: 1fr; } .collection-stats { grid-template-columns: 1fr 1fr; } }

/* moments v2 */
.moments-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.moments-summary-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 9px; }
.moments-summary-pill b { color: var(--ink); font-family: var(--latin); font-size: 12px; }
.moments-summary-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 14%, transparent); }
.moments-summary-hint { color: var(--faint); font-family: var(--pixel); font-size: 5.5px; letter-spacing: .04em; }
.moments-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 16px; }
.moments-search { display: flex; align-items: center; gap: 5px; }
.moments-search input { width: 190px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 9px; outline: none; background: var(--input-bg); color: var(--ink); font-family: var(--body); font-size: 10px; }
.moments-search input:focus { border-color: var(--violet); }
.moments-search button { height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 9px; cursor: pointer; }
.moments-search button:hover { border-color: var(--violet); color: var(--violet); }
.moments-tagbar { display: flex; flex-wrap: wrap; gap: 4px; }
.moments-tagbar a { padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 8px; }
.moments-tagbar a:hover, .moments-tagbar a.active { border-color: var(--violet); color: var(--violet); background: color-mix(in srgb, var(--violet) 6%, var(--surface)); }
.moments-tagbar em { font-style: normal; color: var(--faint); font-family: var(--pixel); font-size: 5px; }
.moments-clear { color: var(--faint); font-size: 8px; text-decoration: underline; }
.moment-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.moment-tags a { padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--violet); font-size: 8px; }
.moment-pin { color: var(--yellow); font-size: 11px; }
.moment-month.is-pinned .moment-card { border-color: color-mix(in srgb, var(--yellow) 32%, var(--line)); }
.moment-card.is-pinned::before { background: var(--yellow); }
.moments-timeline { max-width: 900px; margin: 0 auto; }
.moment-month { margin-top: 28px; }
.moment-month:first-child { margin-top: 8px; }
.moment-month-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding-left: 34px; }
.moment-month-label { color: var(--ink); font-family: var(--display); font-size: 19px; letter-spacing: -.02em; }
.moment-month-head i { flex: 1 1 auto; height: 1px; background: var(--line); }
.moment-month-count { color: var(--faint); font-family: var(--pixel); font-size: 5.5px; letter-spacing: .04em; }
.moments-stream { position: relative; padding-left: 34px; }
.moments-stream::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 12px; width: 1px; background: linear-gradient(var(--line-2), var(--line), transparent); }
.moment-card { position: relative; margin-bottom: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--card-shadow); scroll-margin-top: 110px; transition: transform .22s ease, border-color .22s ease; }
.moment-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--violet) 24%, transparent); }
.moment-card::before { content: ""; position: absolute; left: -30px; top: 25px; width: 7px; height: 7px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line-2); }
.moment-card-head { display: flex; align-items: center; gap: 9px; }
.moment-card-head time { display: flex; align-items: baseline; gap: 7px; }
.moment-card-head time b { color: var(--ink); font-family: var(--latin); font-size: 15px; font-weight: 650; }
.moment-card-head time span { color: var(--faint); font-family: var(--pixel); font-size: 5.5px; letter-spacing: .04em; }
.moment-relative { color: var(--faint); font-size: 8px; }
.moment-mood { display: inline-grid; min-width: 23px; height: 23px; margin-left: auto; padding: 0 5px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.moment-anchor { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; color: var(--faint); font-family: var(--pixel); font-size: 8px; }
.moment-anchor:hover { background: var(--surface-2); color: var(--violet); }
.moment-text { margin: 10px 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.95; word-break: break-word; }
.moment-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-width: 760px; margin-top: 12px; }
.moment-images.is-single { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
.moment-images a { display: block; overflow: hidden; border-radius: 10px; background: var(--surface-3); }
.moment-images img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s ease; }
.moment-images.is-single img { aspect-ratio: 16 / 9; }
.moment-images a:hover img { transform: scale(1.03); }
.moment-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--violet); font-size: 9px; }
.moment-link:hover { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 6%, transparent); }
.moment-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line); }
.moment-signature { color: var(--faint); font-family: var(--pixel); font-size: 5.5px; letter-spacing: .04em; }
.moment-no { color: color-mix(in srgb, var(--violet) 45%, var(--faint)); font-family: var(--pixel); font-size: 5.5px; letter-spacing: .06em; }
@media (max-width: 760px) {
  .links-grid { grid-template-columns: 1fr; }
  .links-apply { grid-template-columns: 1fr; padding: 20px; }
  .links-form-row { grid-template-columns: 1fr; }
  .moment-month-head { padding-left: 24px; }
  .moments-stream { padding-left: 24px; }
  .moment-card { padding: 16px; }
  .moment-card::before { left: -20px; }
  .moment-card-head { flex-wrap: wrap; }
  .moment-mood { margin-left: 0; }
  .moment-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* archive writing heatmap */
.archive-heat { margin: 22px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.archive-heat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 9px; color: var(--faint); }
.heat-grid { display: grid; grid-template-rows: repeat(7, 9px); grid-auto-flow: column; gap: 3px; overflow-x: auto; padding-bottom: 3px; max-width: 100%; }
.heat-cell { width: 9px; height: 9px; border-radius: 2px; background: var(--surface-3); }
.heat-cell.level-1 { background: color-mix(in srgb, var(--violet) 28%, var(--surface-3)); }
.heat-cell.level-2 { background: color-mix(in srgb, var(--violet) 58%, var(--surface-3)); }
.heat-cell.level-3 { background: var(--violet); }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 7px; font-size: 8px; color: var(--faint); }
.heat-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.heat-legend .level-0 { background: var(--surface-3); }
.heat-legend .level-1 { background: color-mix(in srgb, var(--violet) 28%, var(--surface-3)); }
.heat-legend .level-2 { background: color-mix(in srgb, var(--violet) 58%, var(--surface-3)); }
.heat-legend .level-3 { background: var(--violet); }

/* home about card refinement */
.about-card {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  padding: 28px 30px;
  align-items: center;
}
.about-card::before { display: none; }
.about-card .about-mark { display: none; }
.about-main { gap: 9px; }
.about-main p { max-width: 560px; }
.about-side-card {
  height: auto;
  min-height: 0;
  padding: 16px 14px;
  gap: 5px;
}
.about-side-avatar { width: 64px; height: 64px; }
.about-side-card .about-badges { margin-top: 2px; }
.about-side-link { margin-top: 3px; }
@media (max-width: 760px) {
  .about-card { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px; }
  .about-side { align-items: stretch; }
  .about-side-card { padding: 16px; }
}

/* ---------- view transitions ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: yume-vt-out .22s ease both; }
  ::view-transition-new(root) { animation: yume-vt-in .32s ease both; }
  .art-cover img, .note-feature .note-cover img { view-transition-name: yume-cover; }
  ::view-transition-group(yume-cover) { animation-duration: .42s; }
}
@keyframes yume-vt-out { to { opacity: 0; transform: translateY(6px); } }
@keyframes yume-vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- gallery lightbox ---------- */
.yume-lightbox .lightbox-stage { display: flex; flex-direction: column; align-items: center; gap: 7px; max-width: 92vw; }
.yume-lightbox .lightbox-stage img { max-width: 88vw; max-height: 76vh; }
.yume-lightbox .lightbox-caption { margin: 0; max-width: 72ch; color: rgba(255,255,255,.72); font-size: 11px; text-align: center; }
.yume-lightbox .lightbox-count { font-family: var(--pixel); font-size: 8px; color: rgba(255,255,255,.45); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(20,16,30,.55);
  color: #fff; font-size: 22px; line-height: 1; cursor: pointer; backdrop-filter: blur(8px);
}
.lightbox-nav.prev { left: 18px; }
.lightbox-nav.next { right: 18px; }
.lightbox-nav[hidden] { display: none; }
@media (max-width: 600px) {
  .lightbox-nav { width: 32px; height: 32px; }
  .lightbox-nav.prev { left: 6px; }
  .lightbox-nav.next { right: 6px; }
}

/* ---------- footnotes / marginal notes ---------- */
.footnote-mark {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; margin: 0 2px; padding: 0 4px;
  border: 1px solid color-mix(in srgb, var(--violet) 35%, var(--line)); border-radius: 5px;
  background: color-mix(in srgb, var(--violet) 7%, transparent); color: var(--violet);
  font-family: var(--pixel); font-size: 8px; cursor: help; vertical-align: 2px;
}
.footnote-pop {
  position: absolute; left: 50%; bottom: calc(100% + 7px); z-index: 50;
  width: min(300px, 72vw); padding: 8px 10px; transform: translateX(-50%) translateY(4px);
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  box-shadow: var(--card-shadow); color: var(--muted); font-family: var(--body);
  font-size: 11px; line-height: 1.7; text-align: left; opacity: 0; pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.footnote-mark.is-open .footnote-pop { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 760px) { .footnote-pop { position: fixed; left: 6vw; right: 6vw; bottom: 76px; width: auto; transform: none; } }

/* inline spoiler */
.prose .spoiler-inline, .prose .spoiler:not(details) {
  padding: 1px 5px; border-radius: 4px; background: var(--ink); color: transparent;
  cursor: pointer; text-shadow: none; transition: color .2s ease, background .2s ease;
}
.prose .spoiler-inline.is-open, .prose .spoiler:not(details).is-open {
  background: color-mix(in srgb, var(--violet) 9%, var(--surface)); color: var(--ink);
}

/* ---------- mobile dock ---------- */
.mobile-dock { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .mobile-dock {
    position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 90;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
    padding: 7px 5px; border: 1px solid var(--line); border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    box-shadow: 0 18px 40px -22px rgba(40,25,65,.55); backdrop-filter: blur(18px);
  }
  .mobile-dock a, .mobile-dock button {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 4px 0; border: 0; background: none; color: var(--faint);
    font-size: 9px; text-decoration: none; cursor: pointer;
  }
  .mobile-dock span { font-size: 15px; line-height: 1; color: var(--muted); }
  .mobile-dock a.active, .mobile-dock a.active span { color: var(--violet); }
  .mobile-dock button:active, .mobile-dock a:active { transform: scale(.96); }
}

/* profile edit */
.profile-edit-panel { display: none; margin: 18px 0 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.profile-edit-panel .profile-section-head { margin-bottom: 12px; }
.profile-edit-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 9px; align-items: end; }
.profile-edit-form label { display: flex; flex-direction: column; gap: 4px; font-size: 10px; color: var(--faint); }
.profile-edit-form input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); font-size: 12px; }
.profile-edit-error { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: #fff2f3; color: #c45b5b; font-size: 11px; }
.profile-edit-ok { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: #f1fbf6; color: #2f8f63; font-size: 11px; }
@media (max-width: 760px) { .profile-edit-form { grid-template-columns: 1fr; } }

/* Prism syntax highlight (CDN script, theme-native colors) */
.prose pre code .token.comment,
.prose pre code .token.prolog,
.prose pre code .token.doctype,
.prose pre code .token.cdata { color: #8c839d; }
.prose pre code .token.punctuation { color: #a89cc0; }
.prose pre code .token.property,
.prose pre code .token.tag,
.prose pre code .token.boolean,
.prose pre code .token.number,
.prose pre code .token.constant,
.prose pre code .token.symbol { color: #ff8cc6; }
.prose pre code .token.selector,
.prose pre code .token.attr-name,
.prose pre code .token.string,
.prose pre code .token.char,
.prose pre code .token.builtin { color: #7fcfb6; }
.prose pre code .token.operator,
.prose pre code .token.entity,
.prose pre code .token.url { color: #e6c46a; }
.prose pre code .token.atrule,
.prose pre code .token.attr-value,
.prose pre code .token.keyword { color: #b79cff; }
.prose pre code .token.function,
.prose pre code .token.class-name { color: #9bd1ff; }
.prose pre code .token.regex,
.prose pre code .token.important { color: #ffb07c; }

/* about side link refinement */
.about-side-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.about-side-link svg { display: block; width: 11px; height: 11px; }
.about-side-link:hover { color: var(--violet); border-color: var(--violet); background: var(--surface-2); }

/* works: GitHub screenshot covers + load more */
.repo-cover .repo-shot {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .92;
}
.repo-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(16,11,26,.04) 18%, rgba(16,11,26,.86) 100%);
  pointer-events: none;
}
.repo-cover::after { z-index: 2; }
.repo-cover:has(.repo-shot)::after { display: none; }
.repo-cover .idx, .repo-cover .repo-owner, .repo-cover .repo-name, .repo-cover .repo-meta { z-index: 2; }
.works-more-wrap { display: flex; justify-content: center; margin: 24px 0 4px; }
.works-more { display: inline-flex; align-items: center; gap: 7px; }
.works-more-count { display: inline-flex; min-width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 999px; background: rgba(124,92,255,.12); font-family: var(--pixel); font-size: 8px; }
.js .works-page-grid .work-extra { display: none; }

/* GitHub screenshot cards: avoid duplicating the repo name over the screenshot */
.repo-cover:has(.repo-shot) .repo-name { display: none; }
.repo-cover:has(.repo-shot) .repo-owner { margin-top: auto; }

.works-more[hidden] { display: none !important; }
