: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;
}

[hidden] {
  display: none !important;
}

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,
textarea {
  font: inherit;
}

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

.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  width: auto;
  max-width: 100vw;
  height: 3px;
  overflow: hidden;
  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 minmax(0, 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);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.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;
  flex-wrap: wrap;
  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 {
  flex: 0 0 auto;
  white-space: nowrap;
}

.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;
  scroll-margin-top: 180px;
}

.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;
}

.prompt-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: min(650px, 100%);
}

.prompt-head-actions .search-box {
  flex: 1 1 320px;
}

.prompt-gallery-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--hot) 55%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--hot) 10%, var(--surface));
  color: var(--text);
  padding: 8px 13px;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.prompt-gallery-link span {
  color: var(--hot);
  font-size: 16px;
}

.prompt-gallery-link:hover {
  transform: translateY(-2px);
  border-color: var(--hot);
  background: color-mix(in srgb, var(--hot) 16%, var(--surface));
}

.prompt-gallery-link:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 2px;
}

.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);
}

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

.tool-card {
  --tool-accent: #7dff63;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tool-card:nth-child(2) {
  --tool-accent: #55d7ff;
}

.tool-card:nth-child(3) {
  --tool-accent: #ff5fb5;
}

.tool-card:nth-child(4) {
  --tool-accent: #ffc857;
}

.tool-card:nth-child(5) {
  --tool-accent: #9dff6d;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tool-accent) 58%, var(--line));
  background: color-mix(in srgb, var(--tool-accent) 6%, var(--surface));
}

.tool-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.tool-mark {
  display: inline-grid;
  min-width: 42px;
  min-height: 30px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--tool-accent) 65%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--tool-accent) 12%, transparent);
  color: var(--tool-accent);
  padding: 5px 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
}

.tool-domain {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-card h3 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.2;
}

.tool-card p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.tool-open {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 42px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  color: var(--text);
  padding-top: 13px;
  font-weight: 700;
}

.tool-open span {
  color: var(--tool-accent);
  font-size: 18px;
  transition: transform 0.2s ease;
}

.tool-open:hover span {
  transform: translate(2px, -2px);
}

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

.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-inline-link {
  color: color-mix(in srgb, var(--hot) 82%, white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.assistant-citations > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.assistant-citations > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.assistant-citations a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.assistant-citations a:hover {
  border-color: color-mix(in srgb, var(--hot) 52%, var(--line));
  color: color-mix(in srgb, var(--hot) 82%, white);
}

.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);
}

.generator-model {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  padding: 7px 10px;
  font-size: 13px;
}

.generator-model[data-state="online"] {
  border-color: color-mix(in srgb, var(--hot) 58%, var(--line));
  color: var(--text);
}

.generator-model[data-state="offline"] {
  color: var(--muted);
  opacity: 0.78;
}

.generator-workspace {
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(460px, 1.12fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 560px;
}

.generator-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid var(--line);
  padding: 24px;
}

.generator-prompt,
.generator-seed,
.generator-dimensions label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.generator-prompt textarea,
.generator-seed input,
.generator-dimensions input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
}

.generator-prompt textarea {
  min-height: 176px;
  padding: 14px;
  resize: vertical;
  line-height: 1.65;
}

.generator-prompt textarea:focus,
.generator-seed input:focus,
.generator-dimensions input:focus {
  border-color: color-mix(in srgb, var(--hot) 70%, var(--line));
}

.generator-engine,
.generator-mode,
.generator-controls fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.generator-engine legend,
.generator-mode legend,
.generator-controls legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.generator-engine-status {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.generator-engine-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
}

.generator-engine-status[data-state="online"]::before {
  background: var(--hot);
  box-shadow: 0 0 8px color-mix(in srgb, var(--hot) 75%, transparent);
}

.generator-engine-status[data-state="offline"]::before {
  background: #d56b65;
}

.segmented-control {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
}

.segmented-control label {
  min-width: 0;
  cursor: pointer;
}

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

.segmented-control span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
}

.segmented-control input:checked + span {
  border-color: var(--hot);
  background: color-mix(in srgb, var(--hot) 10%, var(--surface));
  color: var(--text);
}

.segmented-control input:disabled + span {
  cursor: not-allowed;
  opacity: 0.38;
}

.generator-controls {
  display: grid;
  gap: 16px;
}

.generator-ratios {
  grid-auto-flow: row;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.generator-dimensions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

.generator-dimensions label {
  gap: 5px;
}

.generator-dimensions input {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
}

.generator-dimensions button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
}

.generator-size-info {
  display: block;
  min-height: 18px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.generator-size-info[data-invalid="true"] {
  color: #d56b65;
}

.generator-quality {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
}

.generator-counts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: row;
}

.generator-reference {
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  padding: 10px;
}

.generator-reference.is-dragging {
  border-color: var(--hot);
}

.generator-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  color: var(--muted);
  cursor: pointer;
}

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

.generator-upload span {
  font-size: 22px;
  line-height: 1;
}

.generator-upload strong {
  color: var(--text);
  font-size: 13px;
}

.generator-reference-preview {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.generator-reference-preview img {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  object-fit: cover;
}

.generator-reference-preview span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generator-reference-preview button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.seed-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
}

.generator-seed input {
  min-width: 0;
  min-height: 42px;
  border-radius: 4px 0 0 4px;
  padding: 8px 10px;
}

.seed-input button,
.generator-result button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.seed-input button {
  border-left: 0;
  border-radius: 0 4px 4px 0;
  font-size: 20px;
}

.generator-submit {
  min-height: 48px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  font-weight: 700;
}

.generator-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.generator-status {
  min-height: 24px;
  margin: auto 0 0;
  color: var(--muted);
  font-size: 13px;
}

.generator-form.is-generating .generator-status {
  color: color-mix(in srgb, var(--hot) 72%, var(--text));
}

.generator-queue-panel {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  padding: 12px;
}

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

.generator-queue-head,
.generator-queue-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.generator-queue-head strong {
  color: var(--text);
  font-size: 13px;
}

.generator-queue-head span,
.generator-queue-metrics span {
  color: var(--muted);
  font-size: 11px;
}

.generator-progress-track {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 72%, transparent);
}

.generator-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--hot));
  transition: width 0.35s ease;
}

@media (max-width: 560px) {
  .generator-queue-metrics {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

.generator-preview {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-width: 0;
  background: var(--code-bg);
}

.generator-empty {
  grid-row: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  min-height: 500px;
  color: var(--code-text);
}

.generator-empty strong {
  font-size: 72px;
  line-height: 1;
}

.generator-empty span {
  color: color-mix(in srgb, var(--code-text) 55%, transparent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.generator-preview > img {
  grid-row: 1;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-height: 680px;
  object-fit: contain;
}

.generator-compare {
  --compare-position: 50%;
  position: relative;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  overflow: hidden;
  max-width: 100%;
  max-height: 720px;
  background: #050605;
  touch-action: none;
}

.generator-compare > img,
.compare-generated,
.compare-generated img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-generated {
  clip-path: inset(0 calc(100% - var(--compare-position)) 0 0);
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--compare-position);
  z-index: 3;
  width: 2px;
  background: #ffffff;
  transform: translateX(-1px);
  pointer-events: none;
}

.compare-divider i {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #090b09;
  color: #ffffff;
  font-style: normal;
  transform: translate(-50%, -50%);
}

.generator-compare input[type="range"] {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: ew-resize;
  opacity: 0;
}

.generator-result {
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 12px;
}

.generator-result button {
  flex: 0 0 auto;
  border-radius: 4px;
  padding: 8px 11px;
}

.generator-outputs {
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 10px;
}

.generator-outputs button {
  position: relative;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 1.45;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--code-bg);
  cursor: pointer;
}

.generator-outputs button.active {
  border-color: var(--hot);
}

.generator-outputs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.generator-outputs span {
  position: absolute;
  right: 5px;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 11px;
}

.generator-history {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

.generator-history-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.generator-history-head h3,
.generator-history-head p {
  margin: 0;
}

.generator-history-head h3 {
  font-size: 24px;
}

.generator-history-head button {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  padding: 7px 11px;
  cursor: pointer;
}

.generator-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.generator-history-card {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.generator-history-thumb {
  min-width: 0;
  min-height: 112px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--code-bg);
  padding: 0;
  cursor: pointer;
}

.generator-history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.generator-history-card > div {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
  padding: 12px;
}

.generator-history-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

.generator-history-card small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generator-history-card span {
  display: flex;
  gap: 6px;
}

.generator-history-card span button {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  padding: 5px 9px;
  cursor: pointer;
}

.generator-history-empty {
  margin: 0;
  border: 1px dashed var(--line);
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.generator-reference[hidden],
.generator-reference-preview[hidden],
.generator-empty[hidden],
.generator-preview > img[hidden],
.generator-compare[hidden],
.generator-result[hidden],
.generator-outputs[hidden],
.generator-history-empty[hidden] {
  display: none;
}

.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;
}

.history-controls {
  position: fixed;
  bottom: 24px;
  left: 22px;
  z-index: 30;
  display: flex;
  gap: 7px;
}

.history-controls .icon-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

@media (max-width: 600px) {
  .history-controls {
    bottom: 14px;
    left: 12px;
  }

  .history-controls .icon-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
}

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;
  }

  .topbar-actions {
    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,
  .generator-workspace,
  .profile-block,
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .generator-form {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .generator-preview {
    min-height: 520px;
  }

  .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,
  .tool-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;
  }

  .prompt-head-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .prompt-head-actions .search-box,
  .prompt-gallery-link {
    width: 100%;
  }

  .post-grid,
  .book-shelf,
  .category-menu,
  .prompt-side-list,
  .related-grid,
  .tool-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;
  }

  .generator-controls {
    grid-template-columns: 1fr;
  }

  .generator-form {
    padding: 18px;
  }

  .generator-empty {
    min-height: 320px;
  }

  .generator-result {
    align-items: flex-start;
    flex-direction: column;
  }

  .generator-outputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .generator-history-grid {
    grid-template-columns: 1fr;
  }

  .generator-history-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .generator-history-thumb {
    min-height: 126px;
  }

  .attach-button {
    width: 100%;
  }

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

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

/* ===== 动态粒子隧道背景（Canvas，纯黑底） ===== */
/* 深色模式保持纯黑，让粒子隧道成为主背景 */
/* 发光渐变大标题（深色下最出彩） */
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;
  }
}

/* 2026 industrial interface refresh */
:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #e9edf1;
  --surface-3: #dfe4e8;
  --text: #161b20;
  --muted: #5b6670;
  --line: #c9d0d6;
  --line-strong: #929da7;
  --accent: #147ea3;
  --hot: #3c9147;
  --warning: #9c6a0a;
  --danger: #b6404c;
  --code-bg: #101418;
  --code-text: #dff7e2;
  --shadow: 0 14px 34px rgba(18, 28, 36, 0.1);
  --radius: 4px;
}

html[data-theme="dark"] {
  --bg: #0a0c0e;
  --surface: #101316;
  --surface-2: #171b1f;
  --surface-3: #20262b;
  --text: #edf1f4;
  --muted: #929da6;
  --line: #2b3238;
  --line-strong: #505b64;
  --accent: #62d0f5;
  --hot: #8dde72;
  --warning: #f1bf55;
  --danger: #ff707a;
  --code-bg: #07090b;
  --code-text: #dff7e2;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}

html,
body {
  max-width: 100%;
  background: var(--bg) !important;
}

body {
  overflow-x: clip;
  font-family:
    "Segoe UI Variable Text",
    "Segoe UI",
    "Microsoft YaHei UI",
    system-ui,
    sans-serif;
  line-height: 1.6;
}

button,
input,
textarea,
select,
a {
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  border-radius: 3px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-shell {
  width: min(1240px, calc(100% - 40px));
}

.topbar {
  min-height: 70px;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.brand {
  min-width: 216px;
  gap: 11px;
}

.brand img {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  filter: grayscale(1) contrast(1.1);
}

.brand strong {
  font-size: 14px;
  font-weight: 720;
}

.brand small {
  color: var(--muted);
  font: 10px ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
}

.nav {
  gap: 2px;
}

.nav a {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.nav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.nav a.active,
.nav .nav-vip {
  color: var(--text);
  border-color: color-mix(in srgb, var(--hot) 60%, var(--line));
  background: color-mix(in srgb, var(--hot) 10%, var(--surface));
}

.topbar-actions {
  gap: 7px;
}

.icon-button,
.music-toggle,
.theme-toggle,
.menu-toggle,
.to-top {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: none;
}

.icon-button:hover,
.music-toggle:hover,
.theme-toggle:hover,
.menu-toggle:hover,
.to-top:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.music-toggle.active {
  color: var(--hot);
  border-color: var(--hot);
  box-shadow: inset 0 -2px 0 var(--hot);
}

.view {
  padding-block: 58px 76px;
}

.eyebrow {
  color: var(--accent);
  font: 700 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-head {
  align-items: end;
  gap: 24px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-head h2,
.view > h2 {
  margin-top: 6px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  font-weight: 760;
}

.section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.section-action-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.section-action-link:hover {
  color: var(--bg);
  background: var(--accent);
}

.search-box {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.search-box input {
  color: var(--text);
  background: transparent;
}

.hero-view {
  min-height: min(760px, calc(100vh - 70px));
  align-items: end;
  padding-top: 80px;
  padding-bottom: 62px;
}

.hero-copy h1 {
  max-width: 740px;
  font-size: clamp(52px, 8vw, 92px);
  line-height: 0.94;
  font-weight: 800;
}

.hero-copy .lead {
  max-width: 660px;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions {
  gap: 8px;
}

.primary-link,
.ghost-link,
.vip-link,
.contact-mail,
.tool-open,
.share-btn,
.copy-prompt,
.copy-code,
.back-button,
.generator-submit,
.community-submit {
  min-height: 42px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    background 0.16s ease;
}

.primary-link,
.contact-mail,
.generator-submit,
.community-submit {
  border-color: var(--hot);
  color: #071008;
  background: var(--hot);
}

.ghost-link,
.tool-open,
.share-btn,
.copy-prompt,
.copy-code,
.back-button {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface);
}

.primary-link:hover,
.ghost-link:hover,
.vip-link:hover,
.tool-open:hover,
.share-btn:hover,
.copy-prompt:hover,
.copy-code:hover,
.back-button:hover,
.community-submit:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.latest-panel,
.post-card,
.share-card,
.book-card,
.prompt-card,
.tool-card,
.profile-block,
.generator-workspace,
.generator-history {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: none;
}

.post-card:hover,
.share-card:hover,
.book-card:hover,
.prompt-card:hover,
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.tag,
.share-category,
.book-category,
.prompt-chip,
.tool-mark {
  border-radius: 2px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.category-menu {
  border-right: 1px solid var(--line);
}

.category-menu button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--muted);
}

.category-menu button:hover {
  color: var(--text);
  background: var(--surface-2);
}

.category-menu button.active {
  border-color: var(--hot);
  color: var(--text);
  background: color-mix(in srgb, var(--hot) 9%, var(--surface));
  box-shadow: inset 3px 0 0 var(--hot);
}

.directory-note {
  max-width: 820px;
  margin: -4px 0 26px;
  color: var(--muted);
}

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

.directory-card {
  position: relative;
  min-height: 150px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.directory-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}

.directory-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--accent);
  background: var(--surface-2);
  font: 800 11px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.directory-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.directory-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.directory-open {
  color: var(--muted);
  font-size: 16px;
}

.directory-empty {
  padding: 30px 0;
  color: var(--muted);
  text-align: center;
}

.community-heading .lead {
  max-width: 760px;
  margin-bottom: 0;
}

.community-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: start;
  gap: 14px;
}

.community-compose {
  display: grid;
  gap: 15px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.community-compose-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.community-compose-head h3,
.community-feed-head h3,
.community-rules h3 {
  margin: 5px 0 0;
  font-size: 20px;
}

.community-access,
.community-user-state,
.community-kind {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  background: var(--surface-2);
  font: 700 10px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.community-access[data-member="true"] {
  color: var(--hot);
  border-color: var(--hot);
}

.community-form-grid {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
}

.community-compose label {
  display: grid;
  gap: 7px;
}

.community-compose label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.community-compose input,
.community-compose textarea,
.community-compose select,
.community-reply-form input,
.community-reply-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--bg);
}

.community-compose input,
.community-compose select,
.community-reply-form input {
  min-height: 42px;
  padding: 0 11px;
}

.community-compose textarea,
.community-reply-form textarea {
  resize: vertical;
  padding: 11px;
}

.community-compose input:focus,
.community-compose textarea:focus,
.community-compose select:focus,
.community-reply-form input:focus,
.community-reply-form textarea:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: inset 3px 0 0 var(--accent);
}

.community-upload-field input {
  min-height: 52px;
  padding: 10px;
  border-style: dashed;
}

.community-upload-field small {
  color: var(--muted);
  font-size: 10px;
}

.community-compose-foot {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.community-compose-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.community-compose-foot p[data-tone="success"] {
  color: var(--hot);
}

.community-compose-foot p[data-tone="error"] {
  color: var(--danger);
}

.community-submit {
  min-width: 112px;
  padding: 0 20px;
  border: 1px solid var(--hot);
  cursor: pointer;
}

.community-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.community-rules {
  padding: 22px;
  border-top: 3px solid var(--accent);
  background: var(--surface-2);
}

.community-rules dl {
  margin: 20px 0;
}

.community-rules dl > div {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.community-rules dt {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.community-rules dd {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.community-rules button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  cursor: pointer;
}

.community-rules button:hover {
  color: var(--bg);
  background: var(--accent);
}

.community-feed-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 48px 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.community-feed-head span {
  color: var(--muted);
  font: 11px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.community-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.community-feed[data-loading="true"] {
  min-height: 180px;
  opacity: 0.6;
}

.community-post {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.community-post > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.community-post-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-post-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--accent);
  background: var(--surface-2);
  font: 800 12px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.community-post-identity > div {
  min-width: 0;
  display: grid;
}

.community-post-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.community-post-identity small {
  color: var(--muted);
  font-size: 10px;
}

.community-post > h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.community-post-body {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.community-post-body p {
  margin: 0 0 10px;
  white-space: pre-wrap;
}

.community-post-body p:last-child {
  margin-bottom: 0;
}

.community-shared-link {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 3px 10px;
  padding: 13px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
}

.community-shared-link strong {
  font-size: 12px;
}

.community-shared-link span {
  grid-column: 1;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-shared-link i {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--accent);
  font-style: normal;
}

.community-media {
  width: 100%;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #050607;
  object-fit: contain;
}

.community-post-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.community-post-actions button,
.community-reply-form button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.community-post-actions button:hover,
.community-reply-form button:hover {
  color: var(--text);
  border-color: var(--accent);
}

.community-replies {
  display: grid;
  gap: 10px;
}

.community-reply {
  padding: 10px 12px;
  border-left: 2px solid var(--line-strong);
  background: var(--surface-2);
}

.community-reply > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.community-reply strong {
  font-size: 11px;
}

.community-reply small {
  color: var(--muted);
  font-size: 9px;
}

.community-reply p {
  margin: 6px 0 0;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.community-reply-form {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.community-reply-form > div {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.community-reply-form span {
  color: var(--danger);
  font-size: 10px;
}

.community-empty,
.community-load-error {
  padding: 42px 0;
  color: var(--muted);
  text-align: center;
}

.site-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  max-width: min(360px, calc(100% - 40px));
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.site-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.generator-task-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 42px;
  padding: 0 8px;
  color: var(--accent);
}

.generator-task-indicator b {
  font-size: 11px;
  font-weight: 700;
}

.generator-task-indicator:hover,
.generator-task-indicator:focus-visible {
  border-color: var(--accent);
  color: var(--text);
}

.generator-task-indicator[hidden] {
  display: none;
}

@media (max-width: 1060px) {
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 24px, 1240px);
  }

  .topbar {
    min-height: 62px;
  }

  .brand {
    min-width: 0;
  }

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

  .view {
    padding-block: 40px 58px;
  }

  .hero-view {
    min-height: calc(100vh - 62px);
    padding-top: 58px;
    padding-bottom: 42px;
  }

  .hero-copy h1 {
    font-size: 52px;
  }

  .section-head,
  .section-actions {
    align-items: stretch;
  }

  .section-head {
    flex-direction: column;
  }

  .section-actions {
    width: 100%;
    flex-direction: column;
  }

  .section-action-link,
  .search-box {
    width: 100%;
  }

  .directory-grid,
  .community-feed,
  .community-layout {
    grid-template-columns: 1fr;
  }

  .directory-card {
    min-height: 136px;
  }

  .community-form-grid,
  .community-reply-form {
    grid-template-columns: 1fr;
  }

  .community-compose {
    padding: 17px;
  }

  .community-compose-head,
  .community-compose-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .community-submit {
    width: 100%;
  }

  .community-reply-form > div {
    grid-column: 1;
  }
}

@media (max-width: 420px) {
  .site-shell {
    width: calc(100% - 16px);
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .directory-card {
    grid-template-columns: 38px minmax(0, 1fr) 16px;
    gap: 10px;
    padding: 15px;
  }

  .directory-mark {
    width: 38px;
    height: 38px;
  }
}

/* Centered home dashboard */
.hero-view.active {
  display: flex;
  min-height: calc(100dvh - 92px);
  align-items: center;
  justify-content: center;
  padding-block: clamp(64px, 10vh, 110px);
}

.hero-copy {
  width: min(100%, 1120px);
  margin-inline: auto;
  text-align: center;
}

.hero-copy h1,
.hero-copy .lead,
.hero-copy .eyebrow {
  margin-inline: auto;
}

.hero-copy h1 {
  max-width: 1000px;
}

.hero-copy .lead {
  max-width: 760px;
}

.hero-actions {
  display: grid;
  width: min(100%, 980px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 38px auto 0;
}

.hero-actions > a {
  display: inline-flex;
  min-width: 0;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  text-align: center;
}

@media (max-width: 900px) {
  .hero-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .hero-view.active {
    min-height: calc(100dvh - 62px);
    padding-block: 48px 58px;
  }

  .hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 28px;
  }

  .hero-actions > a {
    min-height: 48px;
    padding-inline: 10px;
  }
}
