/* ==========================================================================
   trainain的小站 — Design Tokens (Calm Editorial Utility · Warm Paper & Charcoal)
   ========================================================================== */
:root {
  --bg-canvas: #FAF9F5;
  --bg-surface: #F4F2EA;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #EAE7DC;

  --ink-primary: #181816;
  --ink-secondary: #4D4D48;
  --ink-muted: #686862;

  --border-hairline: rgba(24, 24, 22, 0.10);
  --border-strong: rgba(24, 24, 22, 0.22);

  --accent: #16686C;
  --accent-hover: #115357;
  --accent-soft: rgba(22, 104, 108, 0.10);
  --accent-border: rgba(22, 104, 108, 0.28);
  --accent-ink: #FFFFFF;

  --spot-fill: #E6E5E1;

  /* Harmonized Editorial Semantic & Reaction Tones */
  --tone-heart: #C84456;
  --tone-heart-bg: rgba(200, 68, 86, 0.10);
  --tone-heart-bd: rgba(200, 68, 86, 0.34);

  --tone-blue: #1A6D8A;
  --tone-blue-bg: rgba(26, 109, 138, 0.10);
  --tone-blue-bd: rgba(26, 109, 138, 0.34);

  --tone-red: #B94834;
  --tone-red-bg: rgba(185, 72, 52, 0.10);
  --tone-red-bd: rgba(185, 72, 52, 0.34);

  /* Editorial Plate Tints (for custom SVG work covers) */
  --plate-oat: #E3DACC;
  --plate-sage: #BCD1CA;
  --plate-paper: #EFECE3;

  --shadow-overlay: 0 0 0 1px var(--border-hairline), 0 18px 48px rgba(20, 20, 18, 0.14);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Newsreader", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --shell-max: 1120px;
  --header-h: 60px;
}

html[data-theme="dark"] {
  --bg-canvas: #161615;
  --bg-surface: #1F1F1D;
  --bg-elevated: #242422;
  --bg-subtle: #2B2B28;

  --ink-primary: #F2F0EA;
  --ink-secondary: #B8B6AE;
  --ink-muted: #918F88;

  --border-hairline: rgba(242, 240, 234, 0.11);
  --border-strong: rgba(242, 240, 234, 0.24);

  --accent: #3FA9AE;
  --accent-hover: #53BCC1;
  --accent-soft: rgba(63, 169, 174, 0.14);
  --accent-border: rgba(63, 169, 174, 0.36);
  --accent-ink: #111616;

  --spot-fill: rgba(242, 240, 234, 0.14);

  --tone-heart: #F27889;
  --tone-heart-bg: rgba(242, 120, 137, 0.14);
  --tone-heart-bd: rgba(242, 120, 137, 0.36);

  --tone-blue: #56B8D6;
  --tone-blue-bg: rgba(86, 184, 214, 0.14);
  --tone-blue-bd: rgba(86, 184, 214, 0.36);

  --tone-red: #E47F6B;
  --tone-red-bg: rgba(228, 127, 107, 0.14);
  --tone-red-bd: rgba(228, 127, 107, 0.36);

  --plate-oat: #282622;
  --plate-sage: #1E2726;
  --plate-paper: #22221F;

  --shadow-overlay: 0 0 0 1px var(--border-hairline), 0 24px 60px rgba(0, 0, 0, 0.55);
}

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

html {
  background: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg-canvas);
  color: var(--ink-primary);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.modal-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button, input {
  font-family: inherit;
  color: inherit;
}

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

.tabular {
  font-variant-numeric: tabular-nums;
}

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

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

/* ==========================================================================
   Widescreen Editorial Magazine Shell — Header, Hero, Nav, Footer, Palette
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 28px;
}

/* Sticky Masthead */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg-canvas) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-hairline);
}

.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5px;
  justify-self: start;
  padding: 4px 6px 4px 2px;
  border-radius: var(--radius-sm);
  color: var(--ink-primary);
  white-space: nowrap;
  transition: opacity 140ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .brand-mark:hover {
    opacity: 0.78;
  }
}

.brand-t {
  width: 14.5px;
  height: 20px;
  display: inline-block;
  align-self: baseline;
  transform: translateY(2px);
  margin-right: -1px;
  flex-shrink: 0;
  color: currentColor;
}

.brand-word {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
  touch-action: manipulation;
}

.nav-tab svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  .nav-tab:hover:not(.active) {
    color: var(--ink-primary);
    background: var(--bg-surface);
  }
}

.nav-tab.active {
  color: var(--ink-primary);
  background: var(--bg-surface);
}

/* Right Utility Trio (Icon-Only Restraint) */
.header-tools {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink-primary);
  cursor: pointer;
  padding: 0;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out), transform 100ms var(--ease-out);
  touch-action: manipulation;
  position: relative;
}

.icon-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover:not(:disabled) {
    background: var(--bg-surface);
    border-color: var(--border-hairline);
    color: var(--ink-primary);
  }
}

.icon-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.icon-btn.playing {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.icon-btn.playing::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 12px;
  border: 1.5px solid var(--accent);
  opacity: 0;
  pointer-events: none;
  animation: radarPulse 2.2s var(--ease-out) infinite;
}

@keyframes radarPulse {
  0% { transform: scale(0.94); opacity: 0.45; }
  100% { transform: scale(1.16); opacity: 0; }
}

/* Editorial Creator Hero — Full-Bleed Borderless Banner */
.hero-section {
  padding: 0 0 28px;
}
.hero-banner-frame {
  position: relative;
  width: 100%;
  height: 248px;
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: var(--bg-surface);
}
.hero-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 36%;
}
.hero-identity {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 0;
  margin-top: -54px;
  position: relative;
  z-index: 2;
}
.hero-avatar-wrap {
  width: 108px;
  height: 108px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-canvas);
  border: 1.5px solid var(--bg-canvas);
  box-shadow: 0 0 0 1px var(--border-hairline), 0 4px 12px rgba(24, 24, 22, 0.06);
  flex-shrink: 0;
}
html[data-theme="dark"] .hero-avatar-wrap {
  box-shadow: 0 0 0 1px var(--border-strong), 0 6px 18px rgba(0, 0, 0, 0.34);
}
.hero-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-meta {
  padding-bottom: 4px;
  min-width: 0;
}
.hero-name-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink-primary);
}
.hero-handle {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-muted);
}
.hero-bio {
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-secondary);
  max-width: 60ch;
  word-break: break-word;
}
.hero-divider {
  border: none;
  border-top: 1px solid var(--border-hairline);
  margin: 22px 0 0;
}

.hero-index-line {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
}

.hero-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-stat-item svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: var(--ink-primary);
}

.hero-contacts {
  padding-top: 52px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 140ms var(--ease-out), color 140ms var(--ease-out), background-color 140ms var(--ease-out), transform 100ms var(--ease-out);
  touch-action: manipulation;
}

.contact-chip svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  .contact-chip:hover {
    border-color: var(--border-strong);
    color: var(--ink-primary);
    background: var(--bg-surface);
  }
}

.contact-chip:active {
  transform: scale(0.96);
}

/* Main Workspace Area */
.site-main {
  flex: 1;
  padding-bottom: 72px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Editorial Footer */
.site-footer {
  border-top: 1px solid var(--border-hairline);
  padding: 26px 0 calc(28px + env(safe-area-inset-bottom));
  background: var(--bg-canvas);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 4px 0;
  font-size: 13px;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: color 140ms var(--ease-out);
}

.footer-link svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--ink-primary);
}

@media (hover: hover) and (pointer: fine) {
  .footer-link:hover {
    color: var(--accent);
  }
}

.footer-colophon {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

/* Toast Notification */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  z-index: 200;
  background: var(--ink-primary);
  color: var(--bg-canvas);
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}

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

/* Command Palette (⌘K) */
.cmd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(16, 16, 14, 0.44);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 24px;
}

.cmd-backdrop.open {
  display: flex;
}

.cmd-dialog {
  width: 100%;
  max-width: 560px;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-overlay);
  overflow: hidden;
  animation: popIn 160ms var(--ease-out);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.97) translateY(-6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.cmd-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-hairline);
}

.cmd-input-row svg {
  width: 18px;
  height: 18px;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.cmd-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--ink-primary);
  outline: none;
}

.cmd-input::placeholder {
  color: var(--ink-muted);
}

.cmd-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.cmd-group-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 8px 10px 4px;
}

.cmd-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  color: var(--ink-primary);
  font-size: 14px;
}

.cmd-item.selected,
.cmd-item:hover {
  background: var(--bg-surface);
}

.cmd-item-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.cmd-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13.5px;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero-identity {
    padding: 0;
  }
  .hero-contacts {
    grid-column: 1 / -1;
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  .site-header {
    height: auto;
  }
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: 46px auto;
    gap: 0 8px;
  }
  .brand-mark {
    grid-column: 1;
    grid-row: 1;
  }
  .brand-word {
    display: inline;
    font-size: 21px;
  }
  .brand-t {
    width: 14px;
    height: 19px;
    transform: translateY(1.8px);
    margin-right: -1px;
  }
  .header-tools {
    grid-column: 2;
    grid-row: 1;
  }
  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: center;
    gap: 4px;
    padding: 0 0 8px;
    border-top: none;
  }
  .nav-tab {
    padding: 5px 12px;
    font-size: 13px;
  }
  .nav-tab svg {
    width: 18px;
    height: 18px;
  }
  .hero-section {
    padding: 0 0 20px;
  }
  .hero-banner-frame {
    height: 168px;
    border-radius: 0;
  }
  .hero-identity {
    display: flex;
    align-items: flex-end;
    gap: 13px;
    margin-top: -44px;
    padding: 0;
  }
  .hero-avatar-wrap {
    width: 86px;
    height: 86px;
    border-radius: 16px;
  }
  .hero-meta {
    padding-bottom: 3px;
  }
  .hero-name {
    font-size: 24px;
  }
  .hero-bio {
    margin-top: 12px;
    font-size: 14px;
  }
  .hero-divider {
    margin-top: 18px;
  }
  .contact-chip span {
    font-size: 12.5px;
  }
}

/* ==========================================================================
   Editorial Gallery (Asymmetric 2x2), Shares Ledger, Journal & Reactions
   ========================================================================== */
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-hairline);
}

.filter-strip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 130ms var(--ease-out), color 130ms var(--ease-out), border-color 130ms var(--ease-out);
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  .filter-pill:hover:not(.active) {
    background: var(--bg-surface);
    color: var(--ink-primary);
  }
}

.filter-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.section-count {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-muted);
}

/* Asymmetric 12-Col Editorial Magazine Grid (Zero Orphans) */
.works-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px;
}

.work-card {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 140ms var(--ease-out), background-color 140ms var(--ease-out);
}

/* Staggered Editorial Proportions for 4-item default gallery: 7+5, then 5+7 */
.works-grid.is-editorial-four .work-card:nth-child(1),
.works-grid.is-editorial-four .work-card:nth-child(4) {
  grid-column: span 7;
}

.works-grid.is-editorial-four .work-card:nth-child(2),
.works-grid.is-editorial-four .work-card:nth-child(3) {
  grid-column: span 5;
}

/* Single or odd filtered count: lead card spans full width as editorial split */
.works-grid.is-odd .work-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}

.works-grid.is-odd .work-card:first-child .work-cover {
  height: 100%;
  min-height: 290px;
  aspect-ratio: auto;
}

@media (hover: hover) and (pointer: fine) {
  .work-card:hover {
    border-color: var(--border-strong);
  }
  .work-card:hover .work-title {
    color: var(--accent);
  }
}

.work-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-hairline);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.works-grid.is-odd .work-card:first-child .work-cover {
  border-bottom: none;
  border-right: 1px solid var(--border-hairline);
}

.work-cover img.cover-bleed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.work-cover.cover-book-stage {
  aspect-ratio: auto;
  height: 320px;
  background: var(--plate-paper);
  padding: 20px 18px;
}

.work-cover.cover-book-stage img {
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 7px;
  border: 1px solid var(--border-hairline);
  box-shadow: 0 12px 26px rgba(24, 24, 22, 0.11);
  transition: transform 220ms var(--ease-out);
}

.works-grid.is-odd .work-card:first-child .work-cover.cover-book-stage {
  height: auto;
  min-height: 356px;
  padding: 24px 22px;
}

.works-grid.is-odd .work-card:first-child .work-cover.cover-book-stage img {
  max-height: 326px;
}

@media (max-width: 640px) {
  .work-cover.cover-book-stage,
  .works-grid.is-odd .work-card:first-child .work-cover.cover-book-stage {
    height: 356px;
    min-height: 356px;
    padding: 18px 16px;
  }
  .work-cover.cover-book-stage img,
  .works-grid.is-odd .work-card:first-child .work-cover.cover-book-stage img {
    max-height: 320px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .work-card:hover .work-cover.cover-book-stage img {
    transform: translateY(-2px);
  }
}

html[data-theme="dark"] .work-cover.cover-book-stage img {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
}

.work-cover.cover-plate-oat {
  background: var(--plate-oat);
}

.work-cover.cover-plate-sage {
  background: var(--plate-sage);
}

.work-cover-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.work-claude-ico {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-primary);
}

.work-claude-ico svg {
  width: 34px;
  height: 34px;
}

.work-title-group {
  min-width: 0;
  flex: 1;
}

.share-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.share-claude-ico {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-primary);
}

.share-claude-ico svg {
  width: 42px;
  height: 42px;
}

.work-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px 14px;
  gap: 10px;
}

.work-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.work-type {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}

.work-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.work-title {
  margin: 2px 0 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink-primary);
  transition: color 140ms var(--ease-out);
}

.work-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.work-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.work-footer-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.work-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out), transform 120ms var(--ease-out);
  touch-action: manipulation;
}
.work-dl-btn svg {
  width: 19px;
  height: 19px;
}
@media (hover: hover) and (pointer: fine) {
  .work-dl-btn:hover {
    background: var(--bg-surface);
    border-color: var(--border-hairline);
    color: var(--ink-primary);
  }
}
.work-dl-btn:active {
  transform: scale(0.94);
}
.work-dl-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.work-open-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
}

/* Tier-2 Tactile Reaction Bar */
.reaction-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.react-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out), transform 100ms var(--ease-out);
  touch-action: manipulation;
  overflow: visible;
}

.react-btn:active {
  transform: scale(0.93);
}

.react-ico-wrap {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.react-ico-wrap svg {
  width: 15px;
  height: 15px;
}

.react-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.react-btn.react-heart.voted {
  color: var(--tone-heart);
  background: var(--tone-heart-bg);
  border-color: var(--tone-heart-bd);
}

.react-btn.react-blue.voted {
  color: var(--tone-blue);
  background: var(--tone-blue-bg);
  border-color: var(--tone-blue-bd);
}

.react-btn.react-red.voted {
  color: var(--tone-red);
  background: var(--tone-red-bg);
  border-color: var(--tone-red-bd);
}

@media (hover: hover) and (pointer: fine) {
  .react-btn.react-heart:hover {
    border-color: var(--tone-heart-bd);
    color: var(--tone-heart);
  }
  .react-btn.react-blue:hover {
    border-color: var(--tone-blue-bd);
    color: var(--tone-blue);
  }
  .react-btn.react-red:hover {
    border-color: var(--tone-red-bd);
    color: var(--tone-red);
  }
}

.react-btn.pop-heart .react-ico-wrap {
  animation: heartPop 460ms var(--ease-spring);
}
.react-btn.pop-blue .react-ico-wrap {
  animation: thumbUpPop 460ms var(--ease-spring);
}
.react-btn.pop-red .react-ico-wrap {
  animation: thumbDownPop 420ms var(--ease-spring);
}
.react-btn.settle .react-ico-wrap {
  animation: reactSettle 200ms var(--ease-out);
}

@keyframes heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.38) rotate(-10deg); }
  62% { transform: scale(0.92) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes thumbUpPop {
  0% { transform: scale(1) rotate(0); }
  25% { transform: scale(0.88) rotate(12deg); }
  58% { transform: scale(1.3) rotate(-12deg) translateY(-2px); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes thumbDownPop {
  0% { transform: scale(1); }
  38% { transform: scale(1.22) translateY(2px); }
  100% { transform: scale(1); }
}

@keyframes reactSettle {
  0% { transform: scale(0.86); }
  100% { transform: scale(1); }
}

.react-ring {
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-pill);
  border: 1.5px solid currentColor;
  opacity: 0;
  pointer-events: none;
  animation: reactRingBurst 480ms var(--ease-out) forwards;
}

@keyframes reactRingBurst {
  0% { transform: scale(0.85); opacity: 0.55; }
  100% { transform: scale(1.22); opacity: 0; }
}

/* Shares Ledger */
.shares-ledger {
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-hairline);
  transition: background-color 140ms var(--ease-out);
}

.share-row:last-child {
  border-bottom: none;
}

@media (hover: hover) and (pointer: fine) {
  .share-row:hover {
    background: var(--bg-surface);
  }
}

.share-info {
  min-width: 0;
}

.share-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-primary);
}

.share-date {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.share-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Quiet Editorial Empty State (Journal / Posts) */
.empty-editorial {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 68px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
}

.empty-editorial svg {
  width: 112px;
  height: 112px;
  margin-bottom: 14px;
  color: var(--ink-primary);
}

.empty-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-primary);
}

.empty-sub {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--ink-muted);
}

@media (max-width: 900px) {
  .works-grid.is-editorial-four .work-card:nth-child(n),
  .work-card {
    grid-column: span 6;
  }
  .works-grid.is-odd .work-card:first-child {
    grid-template-columns: 1fr;
  }
  .works-grid.is-odd .work-card:first-child .work-cover {
    border-right: none;
    border-bottom: 1px solid var(--border-hairline);
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .works-grid {
    gap: 16px;
  }
  .works-grid.is-editorial-four .work-card:nth-child(n),
  .work-card {
    grid-column: 1 / -1;
  }
  .work-body {
    padding: 15px 16px 14px;
  }
  .work-title {
    font-size: 18px;
  }
  .share-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
}

/* ==========================================================================
   Immersive Work Viewer (Novel Reader + Lightbox + PDF Booklet + Iframe)
   ========================================================================== */
.work-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--bg-canvas);
  display: none;
  flex-direction: column;
}

.work-modal.open {
  display: flex;
  animation: modalFadeIn 180ms var(--ease-out);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

.subpage-bar {
  position: relative;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg-canvas) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-hairline);
}

.subpage-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.subpage-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subpage-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.read-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0%;
  background: var(--accent);
  transition: width 90ms linear;
}

.subpage-body {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.subpage-body.is-iframe {
  overflow: hidden;
  display: flex;
}

.work-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg-canvas);
}

/* Novel Reader */
.novel-shell {
  max-width: 724px;
  margin: 0 auto;
  padding: 36px 24px 88px;
}

.novel-toc-drawer {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-hairline);
}

.novel-toc-drawer.open {
  display: flex;
}

.toc-chip {
  border: 1px solid var(--border-hairline);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 130ms var(--ease-out), color 130ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .toc-chip:hover {
    border-color: var(--accent-border);
    color: var(--accent);
  }
}

.toc-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.novel-prose {
  font-family: var(--font-serif);
  font-size: var(--novel-size, 17px);
  line-height: 1.95;
  color: var(--ink-primary);
}

.novel-cover-figure {
  margin: 0 auto 36px;
  max-width: 440px;
  text-align: center;
  cursor: zoom-in;
}

.novel-cover-figure img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-hairline);
}

.novel-figure {
  margin: 34px 0;
  text-align: center;
  cursor: zoom-in;
}

.novel-figure img {
  width: 100%;
  max-height: 680px;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
}

.novel-cover-figure figcaption,
.novel-figure figcaption {
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink-muted);
}

.novel-header {
  text-align: center;
  margin: 0 0 38px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-hairline);
}

.novel-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.novel-meta-line {
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-muted);
}

.novel-chapter {
  margin: 46px 0 20px;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  letter-spacing: 0.12em;
}

.novel-prose p {
  margin: 0 0 1.25em;
  text-align: justify;
}

.novel-divider {
  margin: 36px auto;
  width: 48px;
  height: 1px;
  background: var(--border-strong);
}

.reader-end-bar {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.reader-end-note {
  font-size: 13px;
  color: var(--ink-muted);
}

/* PDF Booklet Reader */
.pdf-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.pdf-page-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-muted);
  padding: 0 6px;
}

.pdf-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.pdf-sheet {
  width: 100%;
  max-width: 780px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  overflow: hidden;
}

.pdf-sheet img {
  width: 100%;
  height: auto;
}

/* Illustration Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(14, 14, 13, 0.90);
  backdrop-filter: blur(8px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-top {
  position: absolute;
  top: 16px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #F2F0EA;
}

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(242, 240, 234, 0.78);
}

.lightbox-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(242, 240, 234, 0.18);
  background: rgba(28, 28, 26, 0.72);
  color: #F2F0EA;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-btn svg {
  width: 20px;
  height: 20px;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 100%;
  max-height: calc(100dvh - 120px);
}

.lightbox-img {
  max-width: min(86vw, 1080px);
  max-height: calc(100dvh - 130px);
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-caption {
  margin-top: 14px;
  font-size: 13.5px;
  color: rgba(242, 240, 234, 0.86);
  text-align: center;
}

@media (max-width: 640px) {
  .subpage-bar {
    padding: 0 12px;
  }
  .novel-shell {
    padding: 24px 16px 72px;
  }
  .lightbox-stage {
    gap: 8px;
  }
}

  
/* ==========================================================================
   Claude Hand-Drawn Icon Library Modal (120 Mode A SVG Icons)
   ========================================================================== */
.iconlib-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 20px 72px;
}

.iconlib-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.iconlib-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
}

.iconlib-search-row:focus-within {
  border-color: var(--border-strong);
}

.iconlib-search-row svg {
  width: 20px;
  height: 20px;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.iconlib-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink-primary);
  font-size: 14.5px;
  font-family: var(--font-sans);
}

.iconlib-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.iconlib-cats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.iconlib-cat-pill {
  border: 1px solid var(--border-hairline);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out);
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  .iconlib-cat-pill:hover:not(.active) {
    background: var(--bg-surface);
    color: var(--ink-primary);
  }
}

.iconlib-cat-pill.active {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: var(--bg-canvas);
}

.iconlib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px;
}

.iconlib-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  cursor: pointer;
  text-align: center;
  transition: border-color 140ms var(--ease-out), background-color 140ms var(--ease-out), transform 120ms var(--ease-out);
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  .iconlib-card:hover {
    border-color: var(--border-strong);
    background: var(--bg-surface);
  }
  .iconlib-card:hover .iconlib-card-dl {
    opacity: 1;
  }
}

.iconlib-card:active {
  transform: scale(0.97);
}

.iconlib-card svg.iconlib-glyph {
  width: 46px;
  height: 46px;
  color: var(--ink-primary);
}

.iconlib-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-primary);
  line-height: 1.25;
}

.iconlib-en {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  line-height: 1;
}

.iconlib-card-dl {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 140ms var(--ease-out), background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.iconlib-card-dl svg {
  width: 15px;
  height: 15px;
}

.iconlib-card-dl:hover {
  opacity: 1;
  background: var(--bg-canvas);
  color: var(--ink-primary);
}

.iconlib-empty {
  text-align: center;
  padding: 56px 16px;
  color: var(--ink-muted);
  font-size: 14px;
}

@media (max-width: 640px) {
  .iconlib-shell {
    padding: 16px 14px 56px;
  }
  .iconlib-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
  }
  .iconlib-card {
    padding: 14px 8px 12px;
  }
  .iconlib-card svg.iconlib-glyph {
    width: 40px;
    height: 40px;
  }
}


/* ==========================================================================
   Editorial Posts Feed & Markdown Reader
   ========================================================================== */
.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 180ms var(--ease-out), transform 180ms var(--ease-out), background-color 180ms var(--ease-out);
}

.post-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.post-card-main {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.post-card-body {
  flex: 1;
  min-width: 0;
}

.post-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.post-pin-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-size: 11px;
  font-weight: 500;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  font-size: 11px;
}

.post-card-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-primary);
}

.post-card-summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-thumb {
  width: 132px;
  height: 92px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-hairline);
  flex-shrink: 0;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
}

.post-read-hint {
  font-size: 12px;
  color: var(--ink-muted);
}

.post-reader-header {
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-hairline);
}

.post-reader-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.35;
  color: var(--ink-primary);
}

.post-reader-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  margin: 18px 0 8px;
}

.md-prose h1, .md-prose h2, .md-prose h3, .md-prose h4 {
  font-family: var(--font-serif);
  color: var(--ink-primary);
  margin: 1.6em 0 0.65em;
  line-height: 1.4;
}
.md-prose h2 { font-size: 1.32em; color: var(--accent); }
.md-prose h3 { font-size: 1.15em; }
.md-prose p { margin: 0 0 1.15em; }
.md-prose blockquote {
  margin: 1.2em 0;
  padding: 10px 16px;
  border-left: 3px solid var(--accent);
  background: var(--bg-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-secondary);
}
.md-prose blockquote p:last-child { margin-bottom: 0; }
.md-prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
}
.md-prose pre {
  margin: 1.2em 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  overflow-x: auto;
  line-height: 1.6;
}
.md-prose pre code {
  padding: 0;
  background: transparent;
  border: none;
  font-size: 13px;
}
.md-prose ul, .md-prose ol {
  margin: 0 0 1.15em;
  padding-left: 1.5em;
}
.md-prose li { margin-bottom: 0.35em; }
.md-prose hr {
  border: none;
  border-top: 1px solid var(--border-hairline);
  margin: 28px 0;
}
.md-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.md-prose figure {
  margin: 22px 0;
  text-align: center;
  cursor: zoom-in;
}
.md-prose figure img {
  margin: 0 auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
}
.md-prose figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-muted);
  font-family: var(--font-sans);
}

.file-viewer-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 22px 72px;
  text-align: center;
}

.file-viewer-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.file-viewer-preview {
  max-width: 100%;
  max-height: 520px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
}

.file-viewer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}
.file-viewer-btn:hover { background: var(--accent-hover); }

.share-desc {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.footer-admin-link {
  margin-left: 10px;
  color: var(--ink-muted);
  opacity: 0.68;
  transition: opacity 150ms var(--ease-out), color 150ms var(--ease-out);
}
.footer-admin-link:hover {
  opacity: 1;
  color: var(--accent);
}

@media (max-width: 640px) {
  .post-card { padding: 16px; }
  .post-card-main { flex-direction: column-reverse; gap: 12px; }
  .post-card-thumb { width: 100%; height: 160px; }
  .post-reader-title { font-size: 22px; }
}
