.browse-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.intro {
  background: transparent;
}
.origin-badge,
.cover-format.ai-label {
  display: inline-block;
  color: #ffe0af;
  background: #302516;
  border: 1px solid #a58660;
  border-radius: 2px;
  padding: 6px 9px;
  font:
    600 11px Arial,
    sans-serif;
  letter-spacing: 0.03em;
  text-transform: none;
}
.art-disclosure {
  border: 1px solid #786349;
  background: #201b16;
  padding: 18px;
  margin: 20px 0;
}
.art-disclosure p {
  color: #e0cfb9;
  margin-bottom: 0;
}
.disclosure-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 8px;
}
.disclosure-choice input[type='checkbox'] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  accent-color: #d78b9a;
}
body[data-view='studio'] .art-sections {
  display: none;
}
@media (max-width: 560px) {
  #library {
    scroll-margin-top: 150px;
  }
  .art-sections {
    gap: 10px;
    margin-bottom: 24px;
  }
  .art-sections a {
    padding: 16px 12px;
  }
  .art-sections strong {
    font-size: 24px;
  }
  .art-sections a > span:last-child {
    font-size: 12px;
  }
}
.browse-options label {
  display: block;
  font-size: 0.85rem;
  color: #d9d5d4;
}
.browse-options select {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  background: #19191f;
  color: #f1eeee;
  border: 1px solid #5a555c;
  padding: 8px;
}
.browse-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.browse-actions label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.browse-hint {
  color: #c5bfc3;
  font-size: 0.85rem;
}
.library-work {
  min-width: 0;
}
.library-work h3 {
  overflow-wrap: anywhere;
}
.library-work .reader-save {
  min-height: 44px;
  margin: 10px 0;
  font-size: 0.85rem;
}
.work-tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.work-tag-links button {
  background: #222129;
  border: 1px solid #4a4650;
  color: #eee5e8;
  padding: 7px 10px;
  font-size: 0.78rem;
  min-height: 36px;
  text-align: left;
}
.cover-link img {
  object-fit: cover;
}
.cover-link .cover-error {
  display: grid;
  place-content: center;
  padding: 16px;
  min-height: 250px;
  color: #f2e6ed;
  background: #25212a;
}
.library-skeleton {
  aspect-ratio: 2/3;
  background: #242127;
  border: 1px solid #3b353e;
  border-radius: 2px;
}
.art-reader-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 20px 0;
}
.art-reader-actions button {
  min-height: 44px;
}
.art-detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.art-detail-tags a {
  padding: 8px 12px;
  border: 1px solid #5a5058;
  color: #f1dfe6;
}
.reader-page {
  height: auto;
  max-width: 100%;
  display: block;
}
.art-image-link {
  display: block;
}
.art-image-link:focus-visible,
.cover-link:focus-visible {
  outline: 3px solid #f4b8cf;
  outline-offset: 4px;
}
#library-results[aria-busy='true'] {
  min-height: 180px;
}
#search-form input {
  min-height: 44px;
}
#library-prev,
#library-next {
  min-height: 44px;
}
@media (max-width: 600px) {
  .browse-options {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .browse-options label:last-child {
    grid-column: 1/-1;
  }
  .home-layout {
    display: block;
  }
  .catalogue-sidebar {
    margin-top: 32px;
  }
  .search-row {
    display: flex;
    gap: 8px;
  }
  .search-row input {
    min-width: 0;
    flex: 1;
  }
  .work-tag-links {
    gap: 5px;
  }
  .work-tag-links button {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .art-reader-actions {
    align-items: stretch;
  }
  .art-reader-actions .button {
    flex: 1;
    text-align: center;
  }
  .library-work h3 {
    font-size: 1rem;
  }
  .library-work p {
    font-size: 0.85rem;
  }
  .main-nav {
    flex-wrap: wrap;
    gap: 10px;
  }
  .main-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
#library > .browse-options,
#library > .browse-actions,
#library > .browse-hint,
#library > #folio-promotions {
  grid-column: 1 / -1;
}
#library .browse-actions label {
  white-space: nowrap;
  margin: 0;
}
#library .browse-actions input[type='checkbox'] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  margin: 0;
  flex: 0 0 18px;
  accent-color: #d25a7a;
}
#search-form {
  min-width: 0;
  max-width: 100%;
}
#search-form .search-row input {
  width: 0;
  flex: 1 1 0;
  min-width: 0;
}
#search-form .search-row button {
  flex: 0 0 auto;
  min-width: 0;
}

/* Browse polish */
.catalogue-sidebar #tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
#tag-cloud .tag-cloud-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  min-height: 44px;
  color: #f6f0e8;
  background: #241d20;
  border: 1px solid #76565f;
  border-radius: 3px;
  overflow-wrap: anywhere;
  max-width: 100%;
  text-decoration: none;
}
#tag-cloud .tag-cloud-link:hover,
#tag-cloud .tag-cloud-link[aria-current='true'] {
  border-color: #e35b68;
  background: #3b2028;
}
#tag-cloud .tag-cloud-link:focus-visible {
  outline: 3px solid #f1b36a;
  outline-offset: 3px;
}
.tag-cloud-count {
  font:
    12px Arial,
    sans-serif;
  color: #d1c3c0;
}
.tag-cloud-size-0 {
  font-size: 13px;
}
.tag-cloud-size-1 {
  font-size: 14px;
}
.tag-cloud-size-2 {
  font-size: 16px;
}
.tag-cloud-size-3 {
  font-size: 18px;
}
#work-count {
  white-space: nowrap;
}
@media (max-width: 1100px) {
  #library {
    grid-template-columns: minmax(0, 1fr);
  }
  #library > .section-heading,
  #search-form {
    grid-column: 1 / -1;
  }
  #search-form {
    margin-bottom: 12px;
  }
}
.browse-options {
  gap: 12px;
  margin: 22px 0 14px;
}
.browse-options label {
  color: #cfc3bd;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.browse-options select {
  margin-top: 8px;
  border-radius: 3px;
}
.browse-actions {
  margin: 18px 0;
}
.browse-hint {
  color: #b9ada8;
}
.work-tag-links button {
  border-radius: 3px;
  background: #241c20;
  border-color: #624950;
  color: #eedfe0;
}
.work-tag-links button:hover {
  border-color: #dc7882;
}
.library-skeleton {
  background: linear-gradient(90deg, #211b1e 25%, #2a2226 50%, #211b1e 75%);
  background-size: 200% 100%;
  animation: folio-skeleton 1.4s ease-in-out infinite;
}
@keyframes folio-skeleton {
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .library-skeleton {
    animation: none;
  }
}

/* Compact public browsing: search and artwork first. */
.intro {
  border: 0;
  padding: 26px 0 18px;
  margin: 0;
}
.intro h1 {
  font-size: clamp(28px, 3.4vw, 42px);
  margin: 0;
}
.art-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid #4b3b41;
}
.art-sections a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 3px;
  font:
    600 13px Arial,
    sans-serif;
  color: #d7c9c7;
  text-decoration: none;
  white-space: nowrap;
}
.art-sections a[aria-current='page'] {
  color: #fff0eb;
  background: #39252c;
  border-color: #a86879;
}
.art-sections a[data-format='ai'][aria-current='page'] {
  color: #ffe0af;
  background: #302516;
  border-color: #a58660;
}
.art-sections a:focus-visible,
.browse-toolbar summary:focus-visible {
  outline: 3px solid #f1b36a;
  outline-offset: 3px;
}
.home-layout {
  display: block;
}
#library {
  display: block;
  padding-top: 0;
  scroll-margin-top: 90px;
}
#library > .section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 16px;
}
#library .section-heading h2 {
  font-size: 24px;
  margin: 0;
}
.section-description {
  color: #cbbfba;
  font-size: 12px;
  margin: 5px 0 0;
}
#work-count {
  color: #c4b7b2;
}
#search-form {
  margin: 0 0 12px;
  width: 100%;
}
.browse-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.browse-toolbar {
  display: flex;
  align-items: start;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}
.browse-toolbar .saved-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #665058;
  border-radius: 3px;
  font-size: 12px;
}
.saved-toggle input[type='checkbox'] {
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
  margin: 0;
  padding: 0;
  accent-color: #d78b9a;
}
.browse-toolbar summary {
  cursor: pointer;
  border: 1px solid #665058;
  border-radius: 3px;
  min-height: 44px;
  padding: 11px 14px;
  color: #f0e3df;
  font-size: 12px;
  background: #211a1e;
}
.browse-toolbar details[open] {
  flex: 1 0 100%;
  order: 3;
}
.browse-toolbar details[open] summary {
  width: fit-content;
}
.browse-toolbar .browse-options {
  border: 1px solid #4b3b41;
  padding: 16px;
  margin: 8px 0 0;
  background: #191519;
}
.browse-toolbar #tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0;
}
#browse-clear {
  min-height: 44px;
  padding: 9px 12px;
  font-size: 12px;
}
#library-results {
  gap: 28px 18px;
}
#library-results:empty {
  display: none;
}
.empty-library {
  padding: 44px 22px;
  border: 1px solid #423239;
  background: #171316;
  border-radius: 3px;
}
.empty-library[hidden] {
  display: none;
}
.empty-library .library-seal {
  width: 38px;
  height: 38px;
  opacity: 0.65;
}
.empty-library h3 {
  margin: 0 0 6px;
  font-size: 20px;
}
.empty-library p {
  color: #c4b7b2;
  font-size: 13px;
  margin: 0;
}
#library > .actions:has(#library-page[hidden]) {
  display: none;
}
.catalogue-sidebar {
  padding-top: 0;
}
.catalogue-sidebar section[hidden] {
  display: none;
}
@media (max-width: 560px) {
  .header-shell {
    gap: 6px 16px;
    padding-block: 12px;
  }
  .main-nav {
    column-gap: 13px;
    row-gap: 0;
  }
  .main-nav a {
    font-size: 10px;
  }
  .intro {
    padding: 22px 0 14px;
  }
  .art-sections {
    gap: 4px;
    margin-bottom: 20px;
  }
  .art-sections a {
    padding: 8px 9px;
    font-size: 12px;
  }
  #library {
    scroll-margin-top: 150px;
  }
  #library .section-heading h2 {
    font-size: 22px;
  }
  .browse-toolbar {
    gap: 6px;
    margin-bottom: 20px;
  }
  .browse-toolbar .browse-options {
    grid-template-columns: 1fr;
  }
  #library-results {
    gap: 22px 12px;
  }
}

/* Balanced discovery, with an artwork-first gallery beneath it. */
body:not([data-view='studio']) .intro {
  justify-content: center;
  text-align: center;
  padding: clamp(30px, 5vw, 64px) 0 24px;
}
body:not([data-view='studio']) .intro h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}
.art-sections {
  justify-content: center;
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 16px;
}
.art-sections a {
  border-radius: 22px;
  padding-inline: 20px;
}
#search-form {
  width: min(100%, 700px);
  margin: 0 auto 40px;
}
#search-form .search-row {
  display: flex;
  gap: 0;
  border: 1px solid #81606a;
  background: #1d171b;
  border-radius: 5px;
  overflow: hidden;
}
#search-form .search-row:focus-within {
  outline: 2px solid #f1b36a;
  outline-offset: 3px;
}
#search-form .search-row input {
  border: 0;
  background: transparent;
  min-height: 54px;
  padding: 14px 18px;
  margin: 0;
}
#search-form .search-row button {
  border: 0;
  border-left: 1px solid #81606a;
  border-radius: 0;
  padding-inline: 22px;
  margin: 0;
  color: #ffe8e2;
}
.gallery-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}
.gallery-view {
  display: flex;
  border: 1px solid #665058;
  border-radius: 4px;
  padding: 3px;
}
.gallery-view button {
  border: 0;
  background: transparent;
  color: #cbbfba;
  font-size: 12px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 2px;
}
.gallery-view button[aria-pressed='true'] {
  background: #453039;
  color: #fff0eb;
}
.gallery-view button:focus-visible {
  outline: 2px solid #f1b36a;
  outline-offset: 2px;
}
.browse-toolbar {
  padding-bottom: 18px;
  border-bottom: 1px solid #4b3b41;
}
#browse-clear {
  margin-left: auto;
  background: transparent;
  border-color: transparent;
  color: #d7c9c7;
}
#library-results {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body[data-gallery-size='compact'] #library-results {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.empty-library {
  min-height: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: transparent;
  border: 1px dashed #59424b;
}
.empty-library .library-seal {
  display: block;
  margin: 0;
}
body:not([data-view='studio']) footer.shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 30px;
  align-items: center;
  padding-block: 30px;
  margin-top: 24px;
}
body:not([data-view='studio']) footer > p:last-child {
  grid-column: 2;
  grid-row: 1 / 3;
  text-align: right;
  line-height: 2;
  max-width: 440px;
  justify-self: end;
}
body:not([data-view='studio']) footer > p {
  margin: 0;
}
@media (max-width: 1000px) {
  body[data-gallery-size='compact'] #library-results {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  #library-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-gallery-size='compact'] #library-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .gallery-controls {
    gap: 10px;
  }
  .gallery-view button {
    padding-inline: 8px;
  }
  body:not([data-view='studio']) footer.shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  body:not([data-view='studio']) footer > p:last-child {
    text-align: center;
  }
}
@media (max-width: 560px) {
  body:not([data-view='studio']) .intro {
    padding-top: 30px;
    padding-bottom: 18px;
  }
  .art-sections a {
    padding-inline: 10px;
  }
  #search-form {
    margin-bottom: 28px;
  }
  #search-form .search-row input {
    padding-inline: 12px;
    font-size: 13px;
  }
  #search-form .search-row button {
    padding-inline: 14px;
  }
  #library > .section-heading {
    align-items: start;
  }
  .gallery-controls {
    flex-direction: column-reverse;
    align-items: end;
    gap: 4px;
  }
  .empty-library {
    min-height: 200px;
    flex-direction: column;
  }
  body[data-gallery-size='compact'] .work-tag-links {
    display: none;
  }
}

.header-shell:has(.site-account) {
  display: grid;
  grid-template-columns: auto 1fr auto;
}
.header-shell:has(.site-account) .main-nav {
  justify-content: center;
}
.site-account {
  padding: 10px 14px;
  border: 1px solid #665058;
  border-radius: 3px;
  color: #f0e3df;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
@media (max-width: 800px) {
  .header-shell:has(.site-account) {
    grid-template-columns: 1fr auto;
    padding-block: 12px;
    gap: 10px;
  }
  .header-shell:has(.site-account) .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
  }
  .site-account {
    grid-column: 2;
    grid-row: 1;
  }
}

.creator-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
