:root {
  color-scheme: light;

  /* Palette éditoriale — crème, ivoire, pierre, sauge, lavande */
  --sand: #e6ddd2;
  --stone: #d9d0c4;
  --cream: #f0e9df;
  --ivory: #f6f1e8;
  --parchment: #faf6ef;
  --warm-beige: #e8dfd3;
  --soft-gray: #9a9288;
  --lavender-gray: #d5ced8;
  --sage-dust: #c8cfc4;
  --charcoal: #2c2a28;

  --bg: var(--cream);
  --bg-light: var(--parchment);
  --surface: var(--ivory);
  --surface-raised: #f3efe8;
  --text: var(--charcoal);
  --muted: #6f6a64;
  --caption: rgba(44, 42, 40, 0.42);
  --body: rgba(44, 42, 40, 0.82);
  --accent: #3d6b65;
  --border: color-mix(in srgb, var(--muted) 18%, transparent);
  --gold: #b8994f;
  --gold-light: #d4bc82;
  --page-gutter: 18vw;
  --sidebar-width: 190px;
  --submenu-width: 200px;
  --feed-width: min(680px, 44vw);
  --layout-gap: 14px;
  --sidebar-nudge: 18px;
}

* {
  box-sizing: border-box;
}

html {
  background-color: var(--stone);
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: transparent;
}

body {
  position: relative;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
}

@media (min-width: 861px) {
  .page-shell--detail-open {
    cursor: pointer;
  }

  .page-shell--detail-open #app,
  .page-shell--detail-open .sidebar {
    cursor: auto;
  }
}

.page-brand {
  position: fixed;
  z-index: 1;
  top: calc(env(safe-area-inset-top, 0px) + 32px);
  left: 0;
  max-width: var(--page-gutter);
  padding: 0 1.5vw 0 2.8vw;
  pointer-events: none;
  display: inline-grid;
  align-items: flex-start;
  gap: 0.15em;
}

.page-brand__name {
  margin: 0;
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: var(--charcoal);
  text-shadow: 0 1px 18px rgba(250, 246, 239, 0.9);
}

.page-brand__tagline {
  margin: 0;
  display: flex;
  justify-content: space-between;
  width: 0;
  min-width: 100%;
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  font-size: clamp(1rem, 1.45vw, 1.3rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--charcoal) 72%, transparent);
  text-shadow: 0 1px 14px rgba(250, 246, 239, 0.85);
}

#app {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100dvh;
  width: var(--feed-width);
  min-width: 0;
  margin: 0;
  max-width: var(--feed-width);
}

.feed {
  width: 100%;
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.feed::-webkit-scrollbar {
  display: none;
  width: 0;
}

.slide {
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.slide--content {
  align-items: stretch;
  padding:
    calc(env(safe-area-inset-top, 0px) + 12px)
    14px
    calc(env(safe-area-inset-bottom, 0px) + 56px);
}

.slide__inner {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 48px);
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--muted) 32%, transparent);
  background: color-mix(in srgb, var(--parchment) 94%, transparent);
  backdrop-filter: blur(10px);
  box-shadow:
    0 1px 0 rgba(255, 252, 247, 0.85) inset,
    0 0 0 1px rgba(255, 252, 247, 0.35),
    0 18px 50px rgba(88, 78, 66, 0.1),
    0 4px 14px rgba(88, 78, 66, 0.05);
}

.slide__inner.is-detail-open .slide__media {
  opacity: 0.72;
  transition: opacity 0.35s ease;
}

.slide__media {
  flex: 6 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 8px 0;
  transition: opacity 0.35s ease;
}

.slide__image-wrap {
  flex: 1 1 0;
  min-height: 48vh;
  border-radius: 12px;
  overflow: hidden;
  background: var(--warm-beige);
  box-shadow: none;
}

.slide__image-wrap--zoomable {
  cursor: zoom-in;
}

.slide__image-wrap--zoomable:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

.slide__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.slide__image--top {
  object-position: top center;
}

.slide__image--bottom {
  object-position: bottom center;
}

.slide__image--contain {
  object-fit: contain;
  background: var(--warm-beige);
}

.slide__image--failed {
  display: none;
}

.slide__image-wrap--failed::after {
  content: 'Image indisponible';
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 120px;
  padding: 24px;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.slide__caption {
  margin: 6px 0 0;
  flex-shrink: 0;
  padding: 0 2px;
  font-size: 0.8125rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--caption);
}

.slide__body {
  flex: 4 1 0;
  min-height: 0;
  padding: 16px 20px 12px;
  display: flex;
  flex-direction: column;
}

.slide__scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.slide__scroll::-webkit-scrollbar {
  display: none;
  width: 0;
}

.slide__title {
  margin: 0 0 16px;
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--text);
}

.slide__text {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.58;
  color: var(--body);
  text-align: justify;
}

.slide__text--expandable {
  cursor: pointer;
}

.slide__detail {
  font-size: 1rem;
  line-height: 1.62;
  color: var(--body);
  white-space: pre-wrap;
}

.slide__detail-toggle {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.slide__detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  padding: 0;
  background: rgba(44, 42, 40, 0.12);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.slide__inner.is-detail-open .slide__detail-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.slide__detail-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  height: var(--sheet-height, 92%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 18px 18px 0 0;
  border: 1px solid var(--border);
  border-bottom: 0;
  background: color-mix(in srgb, var(--ivory) 97%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 -16px 48px rgba(88, 78, 66, 0.14);
  transform: translateY(100%);
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.35s ease;
  pointer-events: none;
}

.slide__inner.is-detail-open .slide__detail-sheet {
  transform: translateY(0);
  pointer-events: auto;
}

.slide__detail-sheet-header {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.slide__detail-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 35%, transparent);
}

.slide__detail-sheet-close {
  align-self: flex-end;
  margin-top: -2px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.slide__detail-sheet-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 20px 24px;
}

.slide__detail-sheet-title {
  margin: 0 0 14px;
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.28;
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .slide__detail-sheet,
  .slide__detail-backdrop,
  .slide__media {
    transition: none;
  }
}

.slide__actions {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.slide__tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--warm-beige) 55%, transparent);
  color: var(--muted);
  font: inherit;
  font-size: 0.6875rem;
  line-height: 1.25;
  letter-spacing: 0.015em;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.slide__tag:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}

.slide__tag--active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  color: var(--accent);
  font-weight: 600;
}

.slide__report {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}

.slide__report:hover:not(:disabled) {
  color: var(--text);
}

.slide__report:disabled,
.slide__report--done {
  color: var(--accent);
  cursor: default;
}

.slide__report svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.report-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
}

.report-dialog[hidden] {
  display: none;
}

.report-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 42, 40, 0.28);
  backdrop-filter: blur(2px);
}

.report-dialog__panel {
  position: relative;
  width: min(100%, 400px);
  max-height: min(90dvh, 560px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--ivory);
  box-shadow:
    0 24px 64px rgba(88, 78, 66, 0.12),
    0 1px 0 rgba(255, 252, 247, 0.6) inset;
}

.report-dialog__title {
  margin: 0 0 8px;
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.report-dialog__card {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.report-dialog__hint {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.report-dialog__reasons {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.report-reason-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.report-reason-list__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--body);
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.report-reason-list__item:hover {
  background: color-mix(in srgb, var(--muted) 8%, transparent);
}

.report-reason-list__item--active {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

.report-reason-list__radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  flex-shrink: 0;
}

.report-reason-list__item--active .report-reason-list__radio {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 4px var(--accent);
}

.report-dialog__message-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.report-dialog__message {
  width: 100%;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--parchment);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.45;
  resize: vertical;
}

.report-dialog__message:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 1px;
}

.report-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.report-dialog__cancel,
.report-dialog__submit {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.report-dialog__cancel {
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
}

.report-dialog__submit {
  background: var(--accent);
  color: var(--parchment);
}

.report-dialog__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  z-index: 40;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--charcoal) 88%, transparent);
  color: var(--parchment);
  font-size: 0.875rem;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(44, 42, 40, 0.18);
  pointer-events: none;
}

.toast[hidden] {
  display: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding:
    calc(env(safe-area-inset-top, 0px) + 12px)
    12px
    calc(env(safe-area-inset-bottom, 0px) + 12px);
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 11, 10, 0.92);
}

.image-lightbox__close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  right: 8px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.image-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.image-lightbox__close svg {
  width: 20px;
  height: 20px;
}

.image-lightbox__figure {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 1200px);
  max-height: 100%;
  margin: 0;
}

.image-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 72px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.image-lightbox__img--top {
  object-position: top center;
}

.image-lightbox__caption {
  margin: 12px 0 0;
  max-width: min(100%, 640px);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
}

.image-lightbox__caption:empty {
  display: none;
}

.sidebar,
.consent {
  position: relative;
  z-index: 1;
}

.sidebar {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: calc(
    50% - (var(--feed-width) / 2) - var(--sidebar-width) - var(--layout-gap) - var(--sidebar-nudge)
  );
  transform: translateY(-50%);
  flex: none;
  width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  max-height: min(92dvh, 820px);
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0;
  pointer-events: none;
  padding: 12px 10px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--ivory) 94%, transparent);
  backdrop-filter: blur(16px);
  box-shadow:
    0 8px 28px rgba(88, 78, 66, 0.06),
    0 1px 0 rgba(255, 252, 247, 0.5) inset;
  transition: left 180ms ease;
}

.sidebar--submenu-open {
  left: calc(
    50% - (var(--feed-width) / 2) - var(--sidebar-width) - var(--submenu-width)
      - var(--layout-gap) - var(--sidebar-nudge) - 10px
  );
}

.sidebar__panel--categories {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  pointer-events: auto;
  max-height: min(72vh, 560px);
}

.tag-nav {
  position: relative;
  display: flex;
  min-height: 0;
  overflow: visible;
}

.tag-nav__primary {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-height: min(72vh, 560px);
}

.tag-nav__submenu {
  position: absolute;
  top: 0;
  left: calc(100% + 10px);
  width: var(--submenu-width);
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 8px 6px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--ivory) 96%, transparent);
  backdrop-filter: blur(16px);
  box-shadow:
    0 8px 28px rgba(88, 78, 66, 0.08),
    0 1px 0 rgba(255, 252, 247, 0.5) inset;
  z-index: 2;
}

.tag-nav__submenu[hidden] {
  display: none !important;
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.sidebar__panel {
  pointer-events: auto;
  padding: 8px 6px;
  border-radius: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.sidebar__panel + .sidebar__panel {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.sidebar__heading {
  margin: 0 0 6px;
  padding: 0 2px;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.category-list__item {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 4px 8px;
  background: transparent;
  color: var(--body);
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
}

.category-list__item:hover {
  background: color-mix(in srgb, var(--muted) 8%, transparent);
}

.category-list__item--active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-weight: 600;
}

.category-list__item--group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.category-list__item--all-group,
.category-list__item--group,
.tag-nav__submenu .category-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.category-list__count {
  flex: 0 0 auto;
  font-size: 0.625rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  opacity: 0.85;
}

.category-list__item--active .category-list__count {
  color: var(--accent);
  opacity: 0.75;
}

.category-list__chevron {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1;
}

.category-list__item--active .category-list__chevron {
  color: var(--accent);
}

.category-list__item--all-group {
  font-weight: 600;
  color: var(--muted);
}

.sidebar__panel--skip {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar__skip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--ivory) 82%, transparent);
  color: var(--muted);
  font: inherit;
  font-size: 0.6875rem;
  cursor: pointer;
}

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

.sidebar__link {
  pointer-events: auto;
  display: block;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  font-size: 0.6875rem;
  line-height: 1.15;
  padding: 6px 4px;
}

.sidebar__link + .sidebar__link {
  margin-top: 2px;
}

.sidebar__panel-footer {
  display: none;
}

.sidebar__panel--links {
  padding-top: 0;
}

@media (max-width: 860px) {
  .sidebar__link--desktop {
    display: none !important;
  }

  .sidebar__panel-footer {
    display: block;
  }
}

@media (min-width: 861px) {
  .sidebar__panel-footer {
    display: none !important;
  }
}

@media (max-width: 860px) {
  :root {
    --mobile-bar-height: 52px;
    --mobile-bar-offset: calc(env(safe-area-inset-bottom, 0px) + var(--mobile-bar-height) + 20px);
  }

  .page-brand {
    display: none;
  }

  .page-shell {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  #app {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    flex: none;
    width: 100%;
    max-width: none;
  }

  .slide--content {
    padding:
      calc(env(safe-area-inset-top, 0px) + 10px)
      22px
      var(--mobile-bar-offset);
    align-items: stretch;
  }

  .slide__media {
    flex: 0 1 auto;
    padding: 6px 18px 0;
    align-items: center;
  }

  .slide__image-wrap {
    width: 100%;
    max-width: 84%;
    flex: 0 1 auto;
    min-height: 0;
    margin: 0 auto;
    border-radius: 14px;
    box-shadow: none;
  }

  .slide__image-wrap--contain {
    height: auto;
  }

  .slide__image-wrap--contain .slide__image {
    width: 100%;
    height: auto;
    max-height: 36vh;
    object-fit: contain;
    background: var(--warm-beige);
  }

  .slide__image-wrap:not(.slide__image-wrap--contain) {
    aspect-ratio: 4 / 3;
    max-height: 42vh;
  }

  .slide__image-wrap:not(.slide__image-wrap--contain) .slide__image {
    height: 100%;
    object-fit: cover;
  }

  .slide__body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px 18px 14px;
    display: flex;
    flex-direction: column;
  }

  .slide__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .slide__actions {
    display: none;
  }

  .slide__caption {
    max-width: 84%;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.6875rem;
    line-height: 1.3;
  }

  .slide__title {
    font-size: 1.2rem;
    line-height: 1.25;
    margin-bottom: 10px;
  }

  .slide__text {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .slide__detail-toggle {
    font-size: 0.875rem;
    margin-top: 8px;
  }

  .slide__inner:not(.is-detail-open) {
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .slide__inner:not(.is-detail-open) .slide__body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .slide__inner:not(.is-detail-open) .slide__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .slide__inner:not(.is-detail-open) .slide__detail-sheet,
  .slide__inner:not(.is-detail-open) .slide__detail-backdrop {
    display: none !important;
  }

  .slide__inner.is-detail-open {
    overflow: hidden;
    height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--mobile-bar-offset) - 20px);
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--mobile-bar-offset) - 20px);
    display: flex;
    flex-direction: column;
  }

  .slide__inner.is-detail-open .slide__scroll,
  .slide__inner.is-detail-open .slide__detail-toggle {
    display: none;
  }

  .slide__inner.is-detail-open .slide__body {
    display: none;
  }

  .slide__inner.is-detail-open .slide__media {
    flex: 1 1 auto;
    min-height: 0;
    opacity: 0.35;
  }

  .slide__detail-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: min(72%, 520px);
    max-height: 78%;
    transform: translateY(100%);
  }

  .slide__inner.is-detail-open .slide__detail-sheet {
    display: flex;
    transform: translateY(0);
    pointer-events: auto;
  }

  .slide__inner.is-detail-open .slide__detail-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .slide__detail-sheet-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .slide__detail-sheet-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .slide__detail {
    font-size: 0.875rem;
    line-height: 1.55;
  }

  .mobile-bottom-bar {
    position: fixed;
    z-index: 20;
    left: 12px;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
  }

  .mobile-bottom-bar > * {
    pointer-events: auto;
  }

  .mobile-bottom-bar__skip {
    display: flex;
    gap: 8px;
    margin-left: auto;
  }

  .mobile-nav-toggle,
  .mobile-plus-toggle,
  .mobile-bottom-bar__skip .sidebar__skip {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--ivory) 94%, transparent);
    backdrop-filter: blur(12px);
    box-shadow:
      0 8px 24px rgba(88, 78, 66, 0.1),
      0 1px 0 rgba(255, 252, 247, 0.6) inset;
    color: var(--text);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
  }

  .mobile-bottom-bar__skip .sidebar__skip {
    min-width: 56px;
    font-weight: 600;
  }

  .mobile-nav-toggle[aria-expanded='true'],
  .mobile-plus-toggle[aria-expanded='true'] {
    background: color-mix(in srgb, var(--accent) 14%, var(--ivory));
    color: var(--accent);
  }

  .mobile-plus-menu[hidden] {
    display: none !important;
  }

  .mobile-plus-menu {
    position: fixed;
    inset: 0;
    z-index: 22;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding:
      12px
      12px
      calc(env(safe-area-inset-bottom, 0px) + var(--mobile-bar-height) + 16px);
  }

  .mobile-plus-scrim {
    position: absolute;
    inset: 0;
    border: 0;
    margin: 0;
    padding: 0;
    background: rgba(28, 26, 24, 0.42);
    cursor: pointer;
  }

  .mobile-plus-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 320px);
    padding: 10px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--ivory) 96%, transparent);
    backdrop-filter: blur(16px);
    box-shadow:
      0 12px 36px rgba(88, 78, 66, 0.14),
      0 1px 0 rgba(255, 252, 247, 0.6) inset;
  }

  .mobile-plus-item {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.9375rem;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }

  .mobile-plus-item + .mobile-plus-item {
    margin-top: 2px;
  }

  .mobile-plus-item:hover,
  .mobile-plus-item:focus-visible {
    background: color-mix(in srgb, var(--muted) 8%, transparent);
  }

  .sidebar__panel--skip-desktop {
    display: none !important;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 14;
    border: 0;
    margin: 0;
    padding: 0;
    background: rgba(28, 26, 24, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .sidebar-scrim:not([hidden]) {
    display: block;
  }

  .page-shell--nav-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    display: contents;
  }

  .sidebar__panel--categories {
    position: fixed;
    z-index: 16;
    left: 12px;
    right: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition:
      opacity 180ms ease,
      transform 220ms ease;
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--mobile-bar-height) + 16px);
    max-height: min(58dvh, 420px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 14px 14px 10px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--ivory) 96%, transparent);
    backdrop-filter: blur(16px);
    box-shadow:
      0 12px 36px rgba(88, 78, 66, 0.14),
      0 1px 0 rgba(255, 252, 247, 0.6) inset;
  }

  .sidebar__panel-footer {
    flex: 0 0 auto;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .page-shell--nav-open .sidebar__panel--categories {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .sidebar__panel--skip {
    display: none !important;
  }

  .slide__inner {
    width: min(100%, 560px);
    max-width: none;
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--mobile-bar-offset) - 12px);
    margin: 0 auto;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--muted) 28%, transparent);
    background: color-mix(in srgb, var(--parchment) 96%, transparent);
    backdrop-filter: blur(10px);
    box-shadow:
      0 1px 0 rgba(255, 252, 247, 0.8) inset,
      0 12px 36px rgba(88, 78, 66, 0.08),
      0 2px 8px rgba(88, 78, 66, 0.04);
  }

  .slide__tags {
    display: none;
  }

  .tag-nav {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .tag-nav__primary {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }

  .tag-nav__submenu {
    position: static;
    left: auto;
    width: 100%;
    max-height: min(50dvh, 360px);
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }

  .tag-nav__submenu-header {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .tag-nav__back {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--ivory) 90%, transparent);
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
  }

  .sidebar--submenu-open .tag-nav__primary {
    display: none;
  }

  .sidebar--submenu-open {
    transform: none;
  }

  .category-list {
    max-height: 100%;
    overflow-y: auto;
  }

  .sidebar__panel + .sidebar__panel {
    margin-top: 0;
    padding-top: 14px;
    border-top: 0;
  }

  .loading,
  .error,
  .empty-filter {
    padding-bottom: var(--mobile-bar-offset);
  }
}

@media (min-width: 861px) {
  .mobile-bottom-bar,
  .mobile-plus-menu,
  .mobile-nav-toggle,
  .sidebar-scrim {
    display: none !important;
  }
}

.slide--ad {
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
}

.slide--ad .slide__inner {
  width: min(100%, 360px);
  min-height: auto;
  padding: 28px 24px 32px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-label {
  margin: 0 0 24px;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.ad-slot {
  position: relative;
  width: 300px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.ad-slot ins {
  display: inline-block;
  width: 300px;
  height: 250px;
}

.ad-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  z-index: 1;
}

.ad-slot.is-filled .ad-loading,
.ad-slot.is-fallback .ad-loading {
  display: none;
}

.ad-placeholder {
  width: 300px;
  height: 250px;
  border-radius: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.ad-hint {
  margin: 32px 0 0;
  color: rgba(44, 42, 40, 0.38);
  font-size: 0.9375rem;
}

.loading,
.error,
.empty-filter {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 56px);
  text-align: center;
}

.empty-filter button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.error {
  color: #7a4545;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.consent {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  padding: 16px;
  background: color-mix(in srgb, var(--ivory) 94%, transparent);
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 32px rgba(44, 42, 40, 0.05);
  backdrop-filter: blur(12px);
}

.consent[hidden] {
  display: none;
}

.consent p {
  margin: 0 0 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--body);
}

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

.consent button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.consent__accept {
  background: var(--accent);
  color: var(--parchment);
}

.consent__decline {
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
}
