:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-2: #eeeeea;
  --text: #111111;
  --muted: #60605b;
  --line: #d8d8d1;
  --accent: #252525;
  --hot: #95ff66;
  --code-bg: #10110f;
  --code-text: #e7ffe0;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
  --radius: 8px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0b0d0b;
  --surface-2: #141714;
  --text: #f3f6f1;
  --muted: #a7b2aa;
  --line: #23271f;
  --accent: #ffffff;
  --hot: #7dff5b;
  --code-bg: #05060a;
  --code-text: #dfffda;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(127, 255, 91, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(127, 255, 91, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  line-height: 1.65;
}

img {
  max-width: 100%;
}

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

button,
input {
  font: inherit;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 3px;
  background: transparent;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--hot);
  transform: scaleX(0);
  transform-origin: left center;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.nav a,
.filter-row button,
.category-menu button {
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  padding: 8px 10px;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.nav a:hover,
.nav a.active,
.filter-row button.active,
.category-menu button.active,
.category-menu button:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle {
  display: none;
}

main {
  min-height: calc(100vh - 76px);
}

.view {
  display: none;
  padding: 64px 0 80px;
}

.view.active {
  display: block;
}

.hero-view.active {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 42px;
  align-items: end;
  min-height: calc(100vh - 92px);
  padding-top: 72px;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(48px, 8vw, 106px);
  line-height: 0.96;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.lead.small {
  font-size: 17px;
}

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

.primary-link,
.ghost-link,
.contact-mail,
.back-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 9px 14px;
  border: 1px solid var(--accent);
}

.primary-link {
  background: var(--accent);
  color: var(--bg);
}

.ghost-link,
.back-button {
  background: transparent;
  color: var(--text);
}

.latest-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel-head,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.panel-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.panel-head a {
  color: var(--text);
}

.stack-list {
  display: grid;
}

.mini-post {
  display: grid;
  gap: 5px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.mini-post:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.mini-post strong {
  font-size: 16px;
}

.meta {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.section-head {
  margin-bottom: 24px;
}

.section-head h2,
.narrow h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
  letter-spacing: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px 12px;
}

.search-box span {
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.prompt-tag-filter {
  max-height: 128px;
  overflow: auto;
  padding-right: 4px;
}

.filter-row button,
.category-menu button {
  background: transparent;
  cursor: pointer;
}

.filter-row button:focus-visible,
.category-menu button:focus-visible,
.copy-prompt:focus-visible,
.primary-link:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 2px;
}

.post-grid,
.book-shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.post-card,
.share-card,
.book-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 220px;
  padding: 18px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-card h3,
.share-card h3,
.book-card h3 {
  margin: 0;
  line-height: 1.25;
  font-size: 22px;
}

.post-card p,
.share-card p,
.book-card p {
  margin: 0;
  color: var(--muted);
}

.post-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--muted);
  font-size: 12px;
}

.pinned {
  border-color: color-mix(in srgb, var(--hot) 52%, var(--line));
}

.category-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.category-menu {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
}

.category-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  min-height: 42px;
}

.category-menu button small {
  color: var(--hot);
  font-size: 12px;
  line-height: 1;
}

.book-layout {
  margin-top: 4px;
}

.share-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  align-content: start;
}

.share-card {
  min-height: 0;
}

.share-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

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

.assistant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.assistant-panel,
.assistant-side {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.assistant-panel {
  min-height: 560px;
  display: grid;
  grid-template-rows: 1fr auto;
}

.assistant-messages {
  display: grid;
  gap: 12px;
  align-content: start;
  max-height: 560px;
  overflow: auto;
  padding: 18px;
}

.assistant-message {
  max-width: 82%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-2);
}

.assistant-message.user {
  justify-self: end;
  border-color: color-mix(in srgb, var(--hot) 44%, var(--line));
  background: color-mix(in srgb, var(--hot) 8%, var(--surface));
}

.assistant-message p {
  margin: 0;
}

.assistant-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.assistant-results a {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface);
}

.assistant-results span {
  color: color-mix(in srgb, var(--hot) 72%, var(--muted));
  font-size: 12px;
}

.assistant-results small {
  color: var(--muted);
}

.assistant-form {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.assistant-compose {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.assistant-form input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  padding: 11px 12px;
  outline: 0;
}

.attach-button {
  display: inline-grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.attach-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.attach-button span {
  font-size: 22px;
  line-height: 1;
}

.assistant-form button,
.assistant-side button {
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  padding: 10px 14px;
}

.assistant-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.assistant-file {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 8px;
}

.assistant-file img,
.assistant-file video,
.file-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--code-bg);
  color: var(--code-text);
}

.file-icon {
  display: grid;
  place-items: center;
  font-size: 10px;
}

.assistant-file strong,
.assistant-file small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-file small {
  color: var(--muted);
}

.assistant-file button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.assistant-upload-summary {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.assistant-upload-summary div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: var(--surface);
}

.assistant-upload-summary strong,
.assistant-upload-summary small {
  display: block;
}

.assistant-upload-summary small {
  color: var(--muted);
}

.assistant-side {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.assistant-side h3 {
  margin: 0 0 4px;
}

.assistant-side button {
  text-align: left;
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.copy-code {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 10px;
  cursor: pointer;
}

.narrow {
  max-width: 860px;
  margin: 0 auto;
}

.profile-block {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.profile-block img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.profile-block h3 {
  margin: 0 0 10px;
  font-size: 28px;
}

.profile-block p {
  color: var(--muted);
}

.photo-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 14px;
}

.photo-grid figure {
  margin: 0;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--text) 12%, transparent), transparent),
    var(--surface);
  overflow: hidden;
}

.photo-grid span {
  display: block;
  min-height: 260px;
  background:
    repeating-linear-gradient(90deg, transparent 0 16px, color-mix(in srgb, var(--text) 9%, transparent) 16px 17px),
    radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--hot) 38%, transparent), transparent 22%),
    linear-gradient(145deg, color-mix(in srgb, var(--text) 18%, transparent), transparent 60%);
}

.photo-grid figcaption {
  padding: 14px;
  color: var(--muted);
}

.contact-mail {
  margin-top: 24px;
  background: var(--accent);
  color: var(--bg);
  font-size: 18px;
}

.article-view h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.article-body {
  margin-top: 28px;
}

.article-body h2 {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.article-body p {
  color: var(--muted);
}

.article-body a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--hot) 60%, var(--line));
  transition: color 0.18s ease;
}

.article-body a:hover {
  color: color-mix(in srgb, var(--hot) 80%, var(--text));
  text-decoration-color: var(--hot);
}

.toc {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
}

.toc button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 0;
  text-align: left;
}

.toc button:hover {
  color: var(--text);
}

pre {
  overflow: auto;
  margin: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 16px;
  background: var(--code-bg);
  color: var(--code-text);
  line-height: 1.55;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.code-block {
  overflow: hidden;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
}

.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid color-mix(in srgb, var(--code-text) 18%, transparent);
  padding: 8px 10px;
  color: var(--code-text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.code-head button {
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--code-text) 28%, transparent);
  border-radius: var(--radius);
  background: transparent;
  color: var(--code-text);
  cursor: pointer;
  padding: 4px 9px;
}

.related-posts {
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.related-posts h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

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

.related-grid .post-card {
  min-height: 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--text);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 4px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  padding: 7px 14px;
  font-size: 14px;
}

.share-btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.vip-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 9px 16px;
  border: 1px solid color-mix(in srgb, var(--hot) 70%, var(--accent));
  background: var(--hot);
  color: #0a0c08;
  font-weight: 600;
  transition:
    filter 0.2s ease,
    transform 0.2s ease;
}

.vip-link:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.nav a.nav-vip {
  color: var(--text);
  border-color: color-mix(in srgb, var(--hot) 55%, var(--line));
  background: color-mix(in srgb, var(--hot) 16%, transparent);
}

.nav a.nav-vip:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--hot) 70%, var(--line));
  background: color-mix(in srgb, var(--hot) 30%, transparent);
}

.photo-item {
  position: relative;
  margin: 0;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--text) 12%, transparent), transparent),
    var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.photo-item:hover,
.photo-item:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--hot) 52%, var(--line));
  outline: none;
}

.photo-item img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.photo-item span {
  display: block;
  min-height: 260px;
  background:
    repeating-linear-gradient(90deg, transparent 0 16px, color-mix(in srgb, var(--text) 9%, transparent) 16px 17px),
    radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--hot) 38%, transparent), transparent 22%),
    linear-gradient(145deg, color-mix(in srgb, var(--text) 18%, transparent), transparent 60%);
}

.photo-item figcaption {
  padding: 14px;
  color: var(--muted);
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 30;
  width: 44px;
  height: 44px;
  font-size: 18px;
  box-shadow: var(--shadow);
}

.to-top[hidden] {
  display: none;
}

body.no-scroll {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 28px;
  background: color-mix(in srgb, #000 78%, transparent);
  backdrop-filter: blur(6px);
}

.lightbox.open {
  display: grid;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.lightbox-stage {
  margin: 0;
  max-width: min(960px, 100%);
  text-align: center;
}

.lightbox-media img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.lightbox-placeholder span {
  display: block;
  width: min(520px, 80vw);
  height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(157, 255, 109, 0.12) 18px 19px),
    radial-gradient(circle at 68% 30%, rgba(157, 255, 109, 0.32), transparent 26%),
    #101110;
}

.lightbox-placeholder p,
.lightbox-stage figcaption {
  margin-top: 14px;
  color: #d9dad4;
  font-size: 15px;
}

.prompt-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.prompt-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px);
  padding: 12px;
}

.prompt-count {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.prompt-count strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.prompt-side-list {
  display: grid;
  gap: 6px;
}

.prompt-side-list button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
}

.prompt-side-list button:hover,
.prompt-side-list button.active {
  border-color: color-mix(in srgb, var(--hot) 36%, var(--line));
  background: color-mix(in srgb, var(--hot) 10%, transparent);
  color: var(--text);
}

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

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

.prompt-more {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  padding: 10px 0 24px;
}

.prompt-more button {
  border: 1px solid color-mix(in srgb, var(--hot) 42%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--hot) 12%, var(--surface));
  color: var(--text);
  cursor: pointer;
  padding: 10px 18px;
  font-weight: 700;
}

.prompt-more button:hover {
  background: color-mix(in srgb, var(--hot) 22%, var(--surface));
  box-shadow: 0 0 22px color-mix(in srgb, var(--hot) 22%, transparent);
}

.prompt-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.prompt-media {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
}

.prompt-media img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.play-badge {
  position: absolute;
  inset: 0;
  width: 54px;
  height: 54px;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 20px;
  padding-left: 3px;
}

.prompt-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.prompt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag.soft {
  color: color-mix(in srgb, var(--hot) 68%, var(--muted));
  background: color-mix(in srgb, var(--hot) 8%, transparent);
}

.prompt-body h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.prompt-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.prompt-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.prompt-details summary {
  cursor: pointer;
  padding: 9px 10px;
  color: var(--text);
  font-size: 13px;
  list-style-position: inside;
}

.prompt-details[open] summary {
  border-bottom: 1px solid var(--line);
  color: color-mix(in srgb, var(--hot) 72%, var(--text));
}

.prompt-text {
  margin: 0;
  max-height: 210px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 10px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.prompt-text.translated {
  color: var(--text);
}

.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copy-prompt {
  align-self: flex-start;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  padding: 7px 13px;
  font-size: 13px;
}

.copy-prompt.ghost {
  background: transparent;
  color: var(--text);
}

.prompt-source {
  text-decoration: none;
}

.lightbox-media iframe {
  width: min(900px, 92vw);
  height: min(506px, 52vh);
  border: 0;
  border-radius: var(--radius);
  background: #000;
}

.giscus-wrap {
  margin-top: 26px;
  min-height: 160px;
}

.giscus-wrap .giscus,
.giscus-wrap .giscus-frame {
  width: 100%;
}

.not-found {
  display: grid;
  min-height: 100vh;
  align-content: center;
  padding: 48px 0;
}

.not-found h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 1;
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .menu-toggle {
    display: inline-grid;
    margin-left: auto;
    grid-column: 2;
    grid-row: 1;
  }

  .theme-toggle {
    grid-column: 3;
    grid-row: 1;
  }

  .nav {
    display: none;
    grid-column: 1 / -1;
    justify-content: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nav.open {
    display: grid;
  }

  .nav a {
    text-align: center;
  }

  .hero-view.active,
  .category-layout,
  .prompt-layout,
  .assistant-layout,
  .profile-block,
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .hero-view.active {
    min-height: auto;
  }

  .category-menu {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prompt-sidebar {
    position: static;
  }

  .prompt-side-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .prompt-side-list button {
    text-align: center;
  }

  .post-grid,
  .book-shelf,
  .related-grid,
  .prompt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    min-width: 0;
  }

  .brand strong {
    max-width: 128px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .view {
    padding: 42px 0 58px;
  }

  .hero-copy h1 {
    font-size: 42px;
    line-height: 1.05;
    max-width: 100%;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

  .post-grid,
  .book-shelf,
  .category-menu,
  .prompt-side-list,
  .related-grid,
  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .post-card,
  .share-card,
  .book-card {
    min-height: 0;
  }

  .assistant-panel {
    min-height: 520px;
  }

  .assistant-message {
    max-width: 100%;
  }

  .assistant-compose {
    grid-template-columns: 1fr;
  }

  .attach-button {
    width: 100%;
  }

  .profile-block img {
    width: 140px;
    height: 140px;
  }

  .photo-grid figure {
    min-height: 240px;
  }
}

/* ===== 动态粒子隧道背景（Canvas，纯黑底） ===== */
.fx-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
  pointer-events: none;
}

/* 深色模式保持纯黑，让粒子隧道成为主背景 */
html[data-theme="dark"] body {
  background: #000000;
}

/* 发光渐变大标题（深色下最出彩） */
html[data-theme="dark"] .hero-copy h1 {
  background: linear-gradient(100deg, #eafff0 0%, #7dff5b 46%, #3fe0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 26px rgba(125, 255, 91, 0.28));
}

/* ===== UI 美化：卡片悬浮发光、按钮微交互、过渡 ===== */
.post-card,
.share-card,
.book-card,
.prompt-card {
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease;
}

.post-card:hover,
.share-card:hover,
.book-card:hover,
.prompt-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--hot) 48%, var(--line));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.14),
    0 0 0 1px color-mix(in srgb, var(--hot) 24%, transparent);
}

.mini-post {
  border-radius: var(--radius);
  padding-left: 10px;
  padding-right: 10px;
  margin-left: -10px;
  margin-right: -10px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.mini-post:hover {
  background: color-mix(in srgb, var(--hot) 9%, transparent);
  transform: translateX(2px);
}

.primary-link,
.ghost-link,
.contact-mail,
.vip-link,
.share-btn,
.copy-prompt,
.copy-code {
  transition:
    transform 0.18s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.primary-link:hover,
.contact-mail:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--hot) 32%, transparent);
}

.ghost-link:hover,
.share-btn:hover,
.copy-prompt:hover,
.copy-code:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--hot) 55%, var(--accent));
}

.vip-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--hot) 45%, transparent);
}

.brand img {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.brand:hover img {
  transform: scale(1.06);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hot) 30%, transparent);
}

.prompt-media img,
.photo-item img {
  transition: transform 0.4s ease;
}

.prompt-card:hover .prompt-media img {
  transform: scale(1.04);
}

.topbar {
  transition: box-shadow 0.3s ease;
}

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

  .post-card,
  .share-card,
  .book-card,
  .prompt-card,
  .primary-link,
  .ghost-link,
  .vip-link,
  .share-btn,
  .mini-post,
  .brand img,
  .prompt-media img {
    transition: none;
  }

  .post-card:hover,
  .share-card:hover,
  .book-card:hover,
  .prompt-card:hover,
  .primary-link:hover,
  .contact-mail:hover,
  .vip-link:hover,
  .prompt-card:hover .prompt-media img,
  .brand:hover img {
    transform: none;
  }
}
