@font-face {
  font-family: "Scene Roboto";
  src: url("roboto.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --scene-page: #0f0f0f;
  --scene-rail: #181818;
  --scene-panel: #1c1c1c;
  --scene-float: #222222;
  --scene-hover: #292929;
  --scene-line: #343434;
  --scene-text: #f2f2f2;
  --scene-soft: #c5c5c5;
  --scene-muted: #a0a0a0;
  --scene-violet: #bd9bff;
  --scene-focus: #65a9fa;
  --scene-button-a: #7035bd;
  --scene-button-b: #075caf;
  --scene-active: #2e2240;
  --scene-good: #a4ddba;
  --scene-negative: #ffa9ad;
  --scene-rail-width: 208px;
  --scene-command-height: 62px;
  font-family: "Scene Roboto", Roboto, system-ui, sans-serif;
  background: var(--scene-page);
  color: var(--scene-text);
}

:root[data-theme="light"] {
  color-scheme: light;
  --scene-page: #f9f9fa;
  --scene-rail: #fff;
  --scene-panel: #fff;
  --scene-float: #f3f3f5;
  --scene-hover: #ededf0;
  --scene-line: #dedde3;
  --scene-text: #201c26;
  --scene-soft: #4b4656;
  --scene-muted: #625d6d;
  --scene-violet: #633199;
  --scene-focus: #045eba;
  --scene-active: #f0e8fc;
  --scene-good: #21734a;
  --scene-negative: #a4283a;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, input, textarea, select { min-width: 0; }
button:disabled { opacity: .45; cursor: not-allowed; }
button, fieldset { border: 0; }
button { background: transparent; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
ul { padding: 0; margin: 0; list-style: none; }
button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--scene-focus);
  outline-offset: 2px;
}
i[data-lucide], .lucide {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  vertical-align: middle;
}

.scene-skip {
  position: fixed;
  z-index: 12;
  inset: 8px auto auto 8px;
  padding: 10px 14px;
  transform: translateY(-150%);
  background: var(--scene-panel);
  border-radius: 5px;
}
.scene-skip:focus { transform: none; }

.scene-workspace {
  display: grid;
  grid-template-columns: var(--scene-rail-width) minmax(0, 1fr);
  min-height: 100vh;
}
.scene-stage, .scene-main { min-width: 0; }
.scene-navigation {
  height: 100dvh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 12px 16px;
  gap: 20px;
  background: var(--scene-rail);
  border-right: 1px solid var(--scene-line);
  overflow-y: auto;
}
.scene-brand, .scene-mobile-brand {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 7px;
  width: fit-content;
  border-radius: 3px;
}
.scene-brand { padding: 0 8px 0; }
.scene-brand img, .scene-mobile-brand img { object-fit: contain; object-position: left; }
:root[data-theme="light"] :is(.scene-brand, .scene-mobile-brand) img { filter: invert(1); }
.scene-brand span, .scene-mobile-brand span {
  color: var(--scene-muted);
  font-size: .8125rem;
}
.scene-nav-links { display: grid; gap: 5px; }
.scene-nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 7px;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--scene-soft);
  font-size: .9375rem;
  font-weight: 500;
}
.scene-nav-links a:hover, .scene-nav-links a[aria-current="page"] { background: var(--scene-hover); color: var(--scene-text); }
.scene-nav-links a[aria-current="page"] { background: var(--scene-active); color: var(--scene-violet); }
.scene-nav-links a .lucide { width: 19px; height: 19px; }
.scene-nav-bottom { margin-top: auto; display: grid; gap: 14px; }
.scene-nav-note {
  padding: 13px 8px 0;
  border-top: 1px solid var(--scene-line);
  color: var(--scene-muted);
  font-size: .8125rem;
  line-height: 1.6;
}
.scene-mobile-brand, .scene-mobile-navigation { display: none; }

.scene-commandbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--scene-rail);
  border-bottom: 1px solid var(--scene-line);
}
.scene-command-inner {
  max-width: 1580px;
  margin-inline: auto;
  min-height: var(--scene-command-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 18px;
}
.scene-search, .scene-tag-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--scene-line);
  background: var(--scene-page);
  border-radius: 7px;
  color: var(--scene-muted);
}
.scene-search { padding: 0 9px 0 11px; min-height: 40px; width: min(530px, 100%); }
.scene-search input, .scene-tag-search input {
  min-height: 32px;
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 1rem;
  color: var(--scene-text);
  outline: 0;
  padding: 0;
}
.scene-search input::-webkit-search-cancel-button, .scene-tag-search input::-webkit-search-cancel-button { display: none; }
.scene-search:focus-within, .scene-tag-search:focus-within { border-color: var(--scene-focus); }
.scene-search-key {
  display: grid;
  place-items: center;
  width: 20px;
  height: 23px;
  flex: 0 0 auto;
  background: var(--scene-float);
  border: 1px solid var(--scene-line);
  border-radius: 4px;
  font-size: .8125rem;
}
.scene-command-actions, .scene-catalog-actions, .scene-editor-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.scene-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 12px;
  background: var(--scene-panel);
  border: 1px solid var(--scene-line);
  border-radius: 7px;
  color: var(--scene-text);
  font-size: .875rem;
  font-weight: 600;
  text-align: center;
}
.scene-button:hover { background: var(--scene-hover); }
.scene-primary {
  color: #fff;
  background: linear-gradient(105deg, var(--scene-button-a), var(--scene-button-b));
  border-color: transparent;
}
.scene-primary:hover { background: linear-gradient(105deg, #8346cb, #136bc0); }
.scene-quiet-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 5px;
  color: var(--scene-muted);
  font-size: .875rem;
}
.scene-quiet-action:hover { background: var(--scene-hover); color: var(--scene-text); }
.scene-icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 33px;
  height: 33px;
  padding: 0;
  border-radius: 6px;
  color: var(--scene-muted);
}
.scene-icon-button:hover { background: var(--scene-hover); color: var(--scene-text); }
.scene-icon-button[aria-pressed="true"] { color: var(--scene-violet); }
.scene-icon-button[aria-pressed="true"] .lucide-bookmark,
.scene-profile [aria-pressed="true"] .lucide-bookmark { fill: currentColor; }
.scene-search .scene-icon-button { width: 26px; height: 26px; }

.scene-main { max-width: 1580px; margin-inline: auto; }
.scene-discover {
  display: grid;
  align-items: start;
  grid-template-columns: 192px minmax(0, 1fr);
  gap: 17px;
  padding: 14px 18px 0;
}
.scene-filters {
  position: sticky;
  top: calc(var(--scene-command-height) + 14px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100dvh - var(--scene-command-height) - 25px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scene-line) transparent;
}
.scene-filters details {
  flex: 0 0 auto;
  border: 1px solid var(--scene-line);
  border-radius: 7px;
  background: var(--scene-panel);
  overflow: hidden;
}
.scene-filters summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr) 14px;
  min-height: 35px;
  padding: 6px 8px;
  gap: 6px;
  align-items: center;
  background: var(--scene-float);
  color: var(--scene-soft);
  font-size: .875rem;
  font-weight: 550;
}
.scene-filters summary::-webkit-details-marker { display: none; }
.scene-filters summary .lucide { width: 14px; height: 14px; }
.scene-filters details[open] summary .lucide-chevron-down { transform: rotate(180deg); }
.scene-filters details[open] summary { border-bottom: 1px solid var(--scene-line); }
.scene-tag-tools { padding: 7px 7px 5px; }
.scene-tag-search { padding-inline: 7px; gap: 6px; }
.scene-tag-search .lucide, .scene-tag-search i { width: 14px; height: 14px; }
.scene-tag-search input { font-size: .875rem; min-height: 31px; }
.scene-tag-list {
  margin-top: 5px;
  overflow: auto;
  max-height: 292px;
  scrollbar-width: thin;
}
.scene-tag-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  border-radius: 5px;
}
.scene-tag-line:hover { background: var(--scene-hover); }
.scene-tag-check {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  padding: 4px 1px 4px 3px;
  gap: 6px;
  min-height: 32px;
  cursor: pointer;
  font-size: .875rem;
}
.scene-tag-check input { accent-color: #8752e5; width: 13px; height: 13px; margin: 0; cursor: pointer; }
.scene-tag-check span { line-height: 1.25; overflow-wrap: anywhere; }
.scene-tag-check small { color: var(--scene-muted); font-size: .75rem; }
.scene-tag-line[data-excluded="true"] .scene-tag-check span { color: var(--scene-negative); }
.scene-tag-exclude { height: 25px; width: 24px; }
.scene-tag-exclude[aria-pressed="true"] { color: var(--scene-negative); background: var(--scene-hover); }
.scene-tag-exclude .lucide, .scene-tag-exclude i { width: 13px; height: 13px; }
.scene-more-note { padding: 8px 4px; color: var(--scene-muted); font-size: .875rem; }
.scene-filter-fields {
  display: grid;
  gap: 9px;
  padding: 11px 10px;
  color: var(--scene-soft);
  font-size: .875rem;
}
.scene-filter-fields label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.scene-filter-fields input { accent-color: #8752e5; margin: 0; }
.scene-filter-select { margin: 7px; }
.scene-select {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 36px;
  border-radius: 7px;
  border: 1px solid var(--scene-line);
  background: var(--scene-panel);
  color: var(--scene-soft);
}
.scene-select select {
  width: 100%;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: inherit;
  padding: 6px 26px 6px 9px;
  min-height: 35px;
  cursor: pointer;
  font-size: .875rem;
}
.scene-select option { background: var(--scene-panel); }
.scene-select .lucide { pointer-events: none; position: absolute; right: 8px; width: 14px; height: 14px; }
.scene-sort { width: 138px; }
.scene-sort select { padding-left: 28px; }
.scene-sort .lucide-list-filter { right: auto; left: 8px; }
.scene-mobile-filters, .scene-show-results { display: none; }

.scene-shelf { min-width: 0; }
.scene-spotlight { position: relative; margin-bottom: 12px; border-radius: 8px; }
.scene-spotlight-visual {
  --scene-spotlight-height: clamp(96px, 13vw, 205px);
  --scene-spotlight-art: url("../story-art/spotlights/roleplay-spotlight.png");
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: var(--scene-spotlight-height);
  padding: 12px 0;
  border-radius: inherit;
  overflow: hidden;
  background: #1c1740;
  color: #f8f5fe;
}
.scene-spotlight-visual[data-spotlight="builder"] {
  --scene-spotlight-art: url("../story-art/spotlights/character-studio-spotlight.png");
  background: #16142f;
}
.scene-spotlight-visual::before, .scene-spotlight-visual::after {
  position: absolute;
  content: "";
  inset-block: 0;
  width: min(34%, calc(var(--scene-spotlight-height) * 1.57));
  z-index: -1;
  background-image: var(--scene-spotlight-art);
  background-size: auto var(--scene-spotlight-height);
  background-repeat: no-repeat;
}
.scene-spotlight-visual::before {
  inset-inline-start: 0;
  background-position: calc(var(--scene-spotlight-height) * -.5) center;
  mask-image: linear-gradient(to right, #000 66%, transparent);
}
.scene-spotlight-visual::after {
  inset-inline-end: 0;
  background-position: right center;
  mask-image: linear-gradient(to left, #000 66%, transparent);
}
.scene-spotlight-copy {
  width: min(51%, 420px);
  display: grid;
  gap: 6px;
  text-align: center;
  overflow-wrap: anywhere;
}
.scene-spotlight-copy strong { font-size: 1.55rem; line-height: 1.12; }
.scene-spotlight-copy > span { color: #d8d0f1; font-size: .875rem; }
.scene-spotlight-visual:hover .scene-spotlight-copy > span { color: #fff; text-decoration: underline; }
.scene-spotlight-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 24px;
}
.scene-spotlight-pages button {
  width: 17px;
  height: 17px;
  padding: 0;
  color: var(--scene-muted);
  border-radius: 4px;
}
.scene-spotlight-pages button::after {
  display: block;
  content: "";
  background: currentColor;
  width: 6px;
  height: 6px;
  border-radius: 4px;
  margin: auto;
}
.scene-spotlight-pages button:hover, .scene-spotlight-pages button[aria-pressed="true"] { color: var(--scene-violet); }
.scene-spotlight-pages button[aria-pressed="true"]::after { width: 15px; }
.scene-catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px 14px;
  margin-bottom: 13px;
  scroll-margin-top: calc(var(--scene-command-height) + 14px);
}
.scene-catalog-heading h1 { font-size: 1.45rem; line-height: 1.2; font-weight: 700; }
.scene-result-summary { color: var(--scene-muted); font-size: .875rem; line-height: 1.4; margin-top: 3px; min-height: 1.3em; }
.scene-applied { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.scene-applied button { min-height: 28px; min-width: 0; }
.scene-applied .lucide { width: 13px; height: 13px; }
.scene-applied .scene-filter-pill { background: var(--scene-active); color: var(--scene-violet); }
.scene-applied .scene-filter-pill[data-excluded="true"] { color: var(--scene-negative); }
.scene-character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
}
.scene-character-grid > li { display: flex; min-width: 0; }
.scene-character {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--scene-line);
  border-radius: 8px;
  background: var(--scene-panel);
  transition: border-color 120ms ease, background 120ms ease;
}
.scene-character:hover { border-color: #73618d; background: var(--scene-float); }
.scene-card-picture {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
  display: block;
  border-radius: 7px 7px 0 0;
  overflow: hidden;
  padding: 0;
  background: var(--scene-hover);
}
.scene-card-picture img { width: 100%; height: 100%; object-fit: cover; }
.scene-feature-flag {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 3px 7px;
  border: 1px solid #a97de2;
  border-radius: 4px;
  background: #20152ee8;
  color: #efe0ff;
  font-size: .75rem;
  font-weight: 650;
}
.scene-card-content {
  flex: 1;
  display: grid;
  grid-template-rows: 55px 38px 43px auto;
  gap: 6px;
  padding: 8px 8px 7px;
}
.scene-card-identity { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 1px; }
.scene-card-identity h2 { font-size: .9375rem; line-height: 1.12; font-weight: 700; }
.scene-character-name {
  text-align: left;
  padding: 0;
  border-radius: 3px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  width: 100%;
}
.scene-character-name:hover, .scene-credit:hover { color: var(--scene-violet); }
.scene-credit {
  display: block;
  padding: 0;
  margin-top: 4px;
  max-width: 100%;
  border-radius: 3px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  color: var(--scene-muted);
  font-size: .8125rem;
}
.scene-save-card { width: 30px; height: 31px; }
.scene-save-card .lucide { width: 16px; height: 16px; }
.scene-character-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--scene-soft);
  font-size: .875rem;
  line-height: 1.35;
}
.scene-character-tags, .scene-profile-tags {
  display: flex;
  align-items: flex-start;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 3px;
}
.scene-character-tags { overflow: hidden; }
.scene-tag-pill {
  display: inline-block;
  max-width: 100%;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--scene-line);
  background: var(--scene-float);
  color: var(--scene-soft);
  font-size: .75rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-align: left;
}
.scene-tag-pill:hover { color: var(--scene-violet); border-color: currentColor; }
.scene-character-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3px;
  border-top: 1px solid var(--scene-line);
  color: var(--scene-muted);
  min-height: 24px;
  padding-top: 4px;
  font-size: .8125rem;
}
.scene-character-stats span { display: inline-flex; align-items: center; gap: 4px; }
.scene-character-stats :is(.lucide, i) { width: 13px; height: 13px; }
.scene-empty {
  min-height: 230px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 13px;
  text-align: center;
  color: var(--scene-muted);
  border-block: 1px solid var(--scene-line);
  padding: 18px 12px;
}
.scene-empty > .lucide { width: 27px; height: 27px; }
.scene-empty h2 { color: var(--scene-text); font-size: 1rem; }
.scene-paging { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-block: 17px; }
.scene-paging:empty { display: none; }
.scene-paging .scene-button { min-width: 36px; }
.scene-paging [aria-current="page"] { color: var(--scene-violet); border-color: currentColor; background: var(--scene-active); }
.scene-lorebook-promo {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-top: 1px solid var(--scene-line);
  padding-block: 19px;
}
.scene-lorebook-promo img { width: min(34%, 228px); height: auto; object-fit: contain; }
.scene-lorebook-promo h2 { font-size: 1.12rem; }
.scene-lorebook-promo p { color: var(--scene-muted); margin: 5px 0 9px; font-size: .875rem; line-height: 1.4; }
.scene-footer {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 12px 18px 0;
  padding: 13px 0 18px;
  border-top: 1px solid var(--scene-line);
  color: var(--scene-muted);
  font-size: .875rem;
  line-height: 1.4;
}
.scene-footer nav { display: flex; gap: 14px; flex-wrap: wrap; }
.scene-footer a:hover { color: var(--scene-text); text-decoration: underline; }
.scene-muted { color: var(--scene-muted); }

.scene-content-screen { padding: 21px 18px 12px; min-height: 55vh; }
.scene-screen-header { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.scene-screen-header h2 { font-size: 1.65rem; line-height: 1.2; }
.scene-screen-header p { margin-top: 5px; color: var(--scene-muted); line-height: 1.4; }
.scene-studio { display: grid; grid-template-columns: minmax(0, 570px) minmax(0, 350px); align-items: start; gap: 25px; }
.scene-editor { display: grid; gap: 13px; min-width: 0; }
.scene-editor label {
  display: grid;
  gap: 6px;
  color: var(--scene-soft);
  line-height: 1.4;
  font-size: .9375rem;
  font-weight: 550;
}
.scene-editor :is(input, textarea, select) {
  display: block;
  width: 100%;
  padding: 8px 10px;
  color: var(--scene-text);
  border: 1px solid var(--scene-line);
  border-radius: 6px;
  background: var(--scene-panel);
  font-size: 1rem;
  font-weight: 400;
}
.scene-editor textarea { resize: vertical; }
.scene-editor-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scene-editor-actions { flex-wrap: wrap; }
.scene-editor-preview {
  min-width: 0;
  border-left: 1px solid var(--scene-line);
  padding-left: 21px;
}
.scene-editor-preview img { width: min(100%, 275px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.scene-editor-preview h2, .scene-my-characters h2, .scene-lore-entry-panel h2 { font-size: 1.12rem; }
.scene-editor-preview h2 { margin-top: 11px; overflow-wrap: anywhere; }
.scene-editor-preview p { margin-top: 6px; color: var(--scene-muted); overflow-wrap: anywhere; line-height: 1.45; }
.scene-my-characters { border-top: 1px solid var(--scene-line); margin-top: 26px; padding-top: 13px; }
.scene-my-characters h2, .scene-lore-entry-panel h2 { margin-bottom: 10px; }
.scene-conversation-list, .scene-lore-list { display: grid; max-width: 900px; }
.scene-conversation-row, .scene-lore-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  min-width: 0;
  border-bottom: 1px solid var(--scene-line);
}
.scene-conversation-person {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  text-align: left;
  gap: 11px;
  padding: 3px;
  border-radius: 6px;
}
.scene-conversation-person:hover { background: var(--scene-hover); }
.scene-conversation-person img { width: 44px; height: 44px; object-fit: cover; border-radius: 5px; }
.scene-conversation-person strong, .scene-conversation-person small { display: block; overflow-wrap: anywhere; }
.scene-conversation-person small { margin-top: 3px; font-size: .875rem; color: var(--scene-muted); }
.scene-inline-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.scene-lore-row { display: block; }
.scene-lore-row h3 { font-size: 1rem; padding-bottom: 4px; overflow-wrap: anywhere; }
.scene-lore-row p { color: var(--scene-soft); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.scene-lore-row .scene-inline-actions { margin-top: 4px; }
.scene-lorebooks-art { width: min(35%, 211px); height: auto; }
.scene-help-topics { max-width: 700px; border-top: 1px solid var(--scene-line); }
.scene-help-topics details { padding: 13px 2px; border-bottom: 1px solid var(--scene-line); }
.scene-help-topics summary { cursor: pointer; font-weight: 650; width: fit-content; }
.scene-help-topics p { margin-top: 10px; color: var(--scene-soft); line-height: 1.5; max-width: 62ch; }
.scene-help-theme { margin-top: 15px; }
.scene-field-status { color: var(--scene-good); font-size: .875rem; }
.scene-field-status:empty { display: none; }

.scene-profile {
  position: fixed;
  width: min(570px, calc(100% - 20px));
  max-height: calc(100dvh - 24px);
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--scene-line);
  background: var(--scene-panel);
  color: var(--scene-text);
  overflow: auto;
  box-shadow: 0 15px 55px #0008;
}
.scene-profile::backdrop { background: #000a; }
.scene-profile-close { position: absolute; top: 7px; right: 7px; }
.scene-profile-heading { display: flex; gap: 12px; align-items: center; padding-right: 25px; }
.scene-profile-heading img { width: 76px; height: 76px; object-fit: cover; border-radius: 7px; }
.scene-profile-heading h2 { font-size: 1.32rem; overflow-wrap: anywhere; }
.scene-profile-label { margin-bottom: 3px; font-size: .8125rem; color: var(--scene-violet); font-weight: 650; }
.scene-profile-heading .scene-muted { font-size: .875rem; margin-top: 4px; overflow-wrap: anywhere; }
.scene-profile-description { margin-top: 14px; color: var(--scene-soft); font-size: 1rem; line-height: 1.45; overflow-wrap: anywhere; }
.scene-profile-tags { margin-top: 9px; }
.scene-opening {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-left: 2px solid var(--scene-violet);
  background: var(--scene-float);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.scene-draft-editor { padding-top: 12px; margin-top: 13px; border-top: 1px solid var(--scene-line); }
.scene-toast {
  position: fixed;
  z-index: 8;
  inset: auto 14px 15px auto;
  max-width: min(360px, calc(100% - 28px));
  border: 1px solid var(--scene-line);
  border-radius: 7px;
  background: var(--scene-float);
  color: var(--scene-text);
  padding: 9px 12px;
  box-shadow: 0 4px 18px #0005;
  overflow-wrap: anywhere;
}
.scene-noscript { padding: 16px; color: var(--scene-negative); }

@media (max-width: 1180px) {
  :root { --scene-rail-width: 174px; }
  .scene-discover { grid-template-columns: 178px minmax(0, 1fr); gap: 12px; padding-inline: 14px; }
}
@media (max-width: 980px) {
  :root { --scene-rail-width: 157px; }
  .scene-discover { grid-template-columns: minmax(0, 1fr); }
  .scene-filters {
    position: static;
    display: none;
    max-height: none;
    overflow: visible;
    scroll-margin-top: calc(var(--scene-command-height) + 9px);
  }
  .scene-filters[data-expanded="true"] { display: flex; }
  .scene-mobile-filters, .scene-show-results { display: inline-flex; }
  .scene-show-results { align-self: start; }
  .scene-tag-list { max-height: 198px; }
  .scene-studio { gap: 16px; }
}
@media (max-width: 690px) {
  :root { --scene-command-height: 99px; }
  .scene-workspace { display: block; padding-bottom: calc(57px + env(safe-area-inset-bottom)); }
  .scene-navigation { display: none; }
  .scene-mobile-brand { display: flex; grid-area: brand; gap: 3px; }
  .scene-mobile-brand span { font-size: .75rem; }
  .scene-command-inner {
    display: grid;
    grid-template-areas: "brand actions" "search search";
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    padding: 7px 11px;
  }
  .scene-search { grid-area: search; width: 100%; min-height: 35px; }
  .scene-search-key { display: none; }
  .scene-command-actions { grid-area: actions; justify-content: end; }
  .scene-command-actions .scene-button { min-height: 34px; }
  .scene-bookmarks-link { display: none; }
  .scene-mobile-navigation {
    position: fixed;
    z-index: 6;
    inset: auto 0 0;
    background: var(--scene-rail);
    border-top: 1px solid var(--scene-line);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 54px;
    padding: 3px 5px calc(3px + env(safe-area-inset-bottom));
  }
  .scene-mobile-navigation a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 5px;
    padding: 3px 1px;
    color: var(--scene-muted);
    text-align: center;
    font-size: .75rem;
  }
  .scene-mobile-navigation a[aria-current="page"] { color: var(--scene-violet); background: var(--scene-active); }
  .scene-discover, .scene-content-screen { padding-inline: 11px; }
  .scene-discover { padding-top: 10px; }
  .scene-character-grid { gap: 9px; }
  .scene-footer { margin-inline: 11px; }
  .scene-studio { grid-template-columns: minmax(0, 1fr); }
  .scene-editor-preview { border: 0; padding-left: 0; }
  .scene-editor-preview img { width: min(100%, 210px); }
  .scene-toast { bottom: calc(62px + env(safe-area-inset-bottom)); }
}
@media (max-width: 421px) {
  .scene-character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scene-catalog-heading h1 { font-size: 1.25rem; }
  .scene-spotlight-visual { --scene-spotlight-height: 106px; }
  .scene-spotlight-copy strong { font-size: 1.14rem; }
  .scene-card-content { padding-inline: 6px; grid-template-rows: 55px 38px 45px auto; }
  .scene-character-name { font-size: .875rem; }
  .scene-profile { padding: 13px; }
  .scene-lorebook-promo { gap: 10px; }
  .scene-lorebook-promo img { width: 24%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
