/* Shared compact navigation; desktop catalog layouts keep their existing shell. */
@media (max-width: 1199px) {
  html, body { min-width: 0; }
  .app-shell, html.catalog-responsive .app-shell { height: auto; min-height: 100dvh; overflow: visible; padding: 12px 24px calc(112px + env(safe-area-inset-bottom)); }
  .main-content { min-width: 0; overflow: visible; }
  .app-shell > .topbar { display: none !important; }
  .primary-nav { display: none !important; }
  html.search-responsive .header-search-wrap { display: none; }
  .brand-logo { width: 39.6px; height: 39.6px; }
  .topbar-actions { min-width: 0; }
  .back-to-top { bottom: calc(112px + env(safe-area-inset-bottom)); }
  .home-tabbar {
    position: fixed; z-index: 100; bottom: max(10px, env(safe-area-inset-bottom));
    left: 0; right: 0; transform: none;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; padding-inline: 16px; box-sizing: border-box;
  }
  .home-tabbar .home-dock-panel {
    flex: 0 1 auto;
    width: min(540px, calc(100% - 80px));
    min-width: 0;
  }
}
@media (max-width: 767px) {
  .app-shell, html.catalog-responsive .app-shell { padding-inline: 12px; }
}
html.search-responsive, html.search-responsive body { min-width: 0; }
html.search-responsive.search-scroll-lock,
html.search-responsive.search-scroll-lock body {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}
html.search-responsive:not(.search-overlay) .app-shell { height: auto; min-height: 100dvh; overflow: visible; }
html.search-responsive .home-tabbar { z-index: 100; }
html.search-overlay .home-tabbar { z-index: 100; }

html.search-overlay.search-scroll-lock .app-shell,
html.search-overlay.search-scroll-lock .main-content {
  overflow: hidden;
}

html.search-overlay.search-scroll-lock .screen-view.is-active:not(#search-view) {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
}
/* Keep the painted screen still while the search sheet opens. */
html.search-overlay .screen-view.is-active:not(#search-view),
html.search-overlay .screen-view.is-active:not(#search-view) * {
  animation-play-state: paused !important;
}
html.search-overlay #home-sheet,
html.search-overlay .compact-library-panel,
html.search-overlay .compact-home-panel {
  transition: none !important;
}
html.search-overlay .app-shell,
html.search-overlay .main-content {
  pointer-events: none;
}
html.search-overlay #search-view,
html.search-overlay #search-view * {
  pointer-events: auto;
}

#search-capture-trigger {
  display: none !important;
}
#search-view.is-active #search-capture-trigger {
  display: inline-grid !important;
  place-items: center;
  padding: 0;
}

#search-view {
  --search-unified-card-w: min(92vw, 336px);
  --search-series-cover-w: 76px;
  --search-series-cover-h: 115px;
  --search-series-cover-overlap: 26px;
  --search-series-covers-w: calc(var(--search-series-cover-w) * 3 - var(--search-series-cover-overlap) * 2);
  --search-collection-card-w: min(82%, 340px);
  --search-card-pad: 14px 16px;
  --search-card-gap: 6px;
  --search-book-surface: #f5f5f5;
  --search-book-cover-h: 108px;
  --search-book-copy-min-h: calc(15px * 1.25 * 2 + 13px * 1.3 + 13px * 1.45 * 3 + var(--search-card-gap) * 2);
  --search-book-card-h: calc(28px + max(var(--search-book-copy-min-h), var(--search-book-cover-h)));
  --search-series-surface: var(--color-background, #f4f4f2);
  --home-reads-collection-bg: var(--color-surface-soft-green);
  --search-collection-cover-h: 136px;
  --search-collection-card-h: calc(var(--search-collection-cover-h) + 28px);
}

.search-drawer {
  margin: 0; padding: 0; overflow: hidden; border: 0; background: #fff; color: var(--ink);
}
.search-drawer:not([hidden]) { display: block; }
.search-drawer-surface {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.search-drawer-scrim {
  position: fixed; inset: 0; z-index: 34;
  background: rgba(0, 0, 0, .28);
  pointer-events: auto;
}
.search-drawer-scrim[hidden] { display: none; }
.search-drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 0 0 auto;
  padding: 18px 20px 12px; background: #fff;
}
.search-drawer-head h1 {
  margin: 0; font-family: var(--font-head); font-size: var(--type-panel-size); line-height: var(--type-panel-line);
  font-weight: var(--weight-medium); letter-spacing: var(--tracking-panel);
}
.search-drawer-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
/* Same grey chip as capture drawer-close / secondary icon buttons. */
.search-drawer-actions .ds-icon-btn {
  border: 0;
  background: var(--color-background, #f5f5f5);
  color: var(--color-text-secondary, #666);
  box-shadow: none;
}
.search-drawer-actions .ds-icon-btn:hover:not(:disabled) {
  background: #ebebeb;
  color: var(--color-text, #111);
}
.search-drawer-actions .ds-icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-drawer-body {
  min-height: 0;
  padding: 12px 20px max(12px, env(safe-area-inset-bottom));
  overflow: hidden;
  overscroll-behavior: contain;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}
/* Поле поиска — те же токены, что у .search в хедере (controls.css). */
#search-view .search-drawer-field.search {
  width: 100%;
  max-width: 100%;
  align-items: center;
  padding: 0 12px 0 14px;
  background: var(--search-soft-background, var(--color-background, #F5F5F5));
  color: var(--ink, var(--color-text));
  box-shadow: none;
  overflow: visible;
}
#search-view .search-drawer-field > svg.rm-icon,
#search-view .search-drawer-field .header-search-clear {
  align-self: center;
  margin-top: 0;
  margin-bottom: 0;
}
#search-view .search-drawer-field.search:hover {
  background: var(--search-soft-hover, #EEEEEE);
  color: var(--ink, var(--color-text));
  box-shadow: none;
}
#search-view .search-drawer-field.search:focus-within {
  background: var(--search-soft-focus, var(--color-surface, #fff));
  color: var(--ink, var(--color-text));
  outline: none;
  box-shadow: var(--search-soft-focus-shadow, 0 2px 8px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.05));
}
#search-view .search-drawer-field .header-search-input,
#search-view .search-drawer-field .header-search-input:focus-visible {
  outline: none;
  box-shadow: none;
  border: 0;
  background: transparent;
  color: var(--ink, var(--color-text));
  flex: 1 1 0;
  width: auto;
  height: 22px;
  min-height: 0;
  margin: 0;
  padding: 0;
  line-height: 22px;
  min-width: 0;
  max-width: 100%;
}
#search-view .search-drawer-field .header-search-input::placeholder {
  color: var(--color-text-secondary);
}
#search-view .search-page-clear,
#search-view .search-page-clear svg {
  color: var(--ink, var(--color-text, #111));
  fill: currentColor;
  stroke: none;
  opacity: 1;
}
.search-page-notice {
  margin: 16px 0 0;
  color: var(--color-text-secondary);
  font-size: var(--type-body-size);
  flex-shrink: 0;
}
.search-page-notice[hidden], .search-page-clear[hidden] { display: none; }
.search-page-sections {
  display: grid;
  gap: 14px;
  margin-top: 0;
  padding-bottom: 12px;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.search-page-sections::-webkit-scrollbar {
  display: none;
}
.search-drawer-field {
  flex-shrink: 0;
  margin: 0 0 8px;
  order: -1;
  z-index: 2;
  background: transparent;
  padding-bottom: 0;
  will-change: transform;
}
html.keyboard-open .search-drawer-field {
  margin: 8px 0 0;
  order: 0;
  position: relative;
  bottom: auto;
  padding-top: 0;
  padding-bottom: 0;
}
.search-section { min-width: 0; }
.search-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.search-section-head h2 { margin: 0; font-family: var(--font-head); font-size: var(--type-section-size); line-height: var(--type-section-line); color: var(--color-text); }
.search-section-all { flex-shrink: 0; text-decoration: none; color: var(--color-text-secondary); font-size: var(--type-caption-size); }
.search-rail { display: flex; align-items: stretch; gap: 8px; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; padding: 4px 4px 12px; }
.search-rail::-webkit-scrollbar { display: none; }
.search-rail:focus { outline: none; }
.search-rail:focus-visible { outline: var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-field); }
.search-rail > .search-card { flex: 0 0 300px; width: 300px; min-width: 0; scroll-snap-align: start; scroll-margin-bottom: calc(96px + env(safe-area-inset-bottom)); content-visibility: visible; }
#search-view .search-rail[data-kind="books"] > .search-card.home-reads-card.is-compact {
  flex: 0 0 var(--search-unified-card-w);
  width: var(--search-unified-card-w);
  min-width: var(--search-unified-card-w);
  max-width: var(--search-unified-card-w);
  box-sizing: border-box;
  align-self: stretch;
  height: var(--search-book-card-h);
  min-height: var(--search-book-card-h);
  max-height: var(--search-book-card-h);
  overflow: hidden;
  background: var(--search-book-surface);
  border-radius: 18px;
  padding: var(--search-card-pad);
}
#search-view .search-rail[data-kind="series"] > .search-card.home-sheet-series {
  flex: 0 0 var(--search-unified-card-w);
  width: var(--search-unified-card-w);
  min-width: var(--search-unified-card-w);
  max-width: var(--search-unified-card-w);
  box-sizing: border-box;
  align-self: stretch;
  height: auto;
}
#search-view .search-rail[data-kind="books"] {
  align-items: stretch;
}
#search-view .search-rail[data-kind="series"] {
  align-items: stretch;
}
#search-view .search-rail[data-kind="books"] > .home-reads-card.is-compact[data-tone] {
  background: var(--search-book-surface);
}
#search-view .search-rail[data-kind="books"] .home-reads-card.is-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  grid-template-areas: "copy cover";
  column-gap: 14px;
  align-items: start;
  align-content: start;
  box-shadow: none;
}
#search-view .search-rail[data-kind="books"] .home-reads-copy {
  min-height: var(--search-book-copy-min-h);
}
#search-view .search-rail[data-kind="books"] .home-reads-cover {
  width: 72px;
  height: var(--search-book-cover-h);
  object-fit: cover;
}
#search-view .search-rail[data-kind="books"] .home-reads-desc,
#search-view .search-rail[data-kind="books"] .home-reads-copy:not(:has(.home-reads-desc))::after {
  min-height: calc(13px * 1.45 * 3);
}
#search-view .search-rail[data-kind="books"] .home-reads-copy:not(:has(.home-reads-desc))::after {
  content: "";
  display: block;
}
#search-view .home-reads-copy {
  display: flex;
  flex-direction: column;
  gap: var(--search-card-gap);
  min-width: 0;
}
#search-view :is(.home-reads-title, .home-sheet-series-name, .home-reads-card.is-featured .home-reads-title, .ds-author-card--portrait .ds-author-card-title) {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
#search-view :is(.home-reads-meta, .ds-author-card--portrait .ds-author-card-tagline) {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.3;
}
#search-view :is(.home-reads-desc, .home-sheet-series-desc) {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
}
#search-view .home-sheet-series {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: var(--search-card-gap);
  min-height: 100%;
  padding: var(--search-card-pad);
  border: 0;
  border-radius: 18px;
  background: var(--search-series-surface);
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-sizing: border-box;
}
#search-view .home-sheet-series-covers:not(:has(.home-sheet-series-cover)) {
  display: none;
}
#search-view .home-sheet-series-covers {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  align-self: flex-start;
  flex: 0 0 auto;
  width: var(--search-series-covers-w);
  min-width: var(--search-series-covers-w);
  max-width: var(--search-series-covers-w);
  min-height: var(--search-series-cover-h);
}
#search-view .home-sheet-series-cover {
  flex: 0 0 var(--search-series-cover-w);
  width: var(--search-series-cover-w);
  height: var(--search-series-cover-h);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.85);
}
#search-view .home-sheet-series-cover + .home-sheet-series-cover { margin-left: calc(-1 * var(--search-series-cover-overlap)); }
#search-view .home-sheet-series-cover:nth-child(1) { z-index: 3; }
#search-view .home-sheet-series-cover:nth-child(2) { z-index: 2; }
#search-view .home-sheet-series-cover:nth-child(3) { z-index: 1; }
#search-view .home-sheet-series-cover .home-reads-cover,
#search-view .home-sheet-series-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}
#search-view .home-sheet-series-copy {
  width: 0;
  min-width: 100%;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--search-card-gap);
  min-height: 0;
}
#search-view .home-sheet-series-name {
  margin: 0;
}
#search-view .search-rail[data-kind="collections"] > .home-reads-card.is-featured .home-reads-badge {
  display: none;
}
#search-view .search-rail.home-collections-rail {
  gap: 6px;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  align-items: flex-start;
}
#search-view .search-rail.home-collections-rail > .search-card.home-reads-card.is-featured {
  display: grid;
  flex: 0 0 var(--search-collection-card-w);
  width: var(--search-collection-card-w);
  min-width: var(--search-collection-card-w);
  max-width: var(--search-collection-card-w);
  height: var(--search-collection-card-h);
  min-height: var(--search-collection-card-h);
  max-height: var(--search-collection-card-h);
  overflow: hidden;
  align-self: flex-start;
  box-sizing: border-box;
  border-radius: var(--radius-field);
  background: var(--home-reads-collection-bg);
  padding: var(--search-card-pad);
}
#search-view .search-rail.home-collections-rail .home-reads-card.is-featured .home-reads-copy {
  gap: var(--search-card-gap);
}
#search-view .search-rail.home-collections-rail > .home-reads-card.is-featured:not(.has-illustration) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 40%);
  grid-template-areas: "copy cover";
  column-gap: 14px;
  align-items: start;
}
#search-view .search-rail.home-collections-rail .home-reads-cover-stack {
  grid-area: cover;
  position: relative;
  display: block;
  align-self: start;
  justify-self: end;
  width: 100%;
  height: var(--search-collection-cover-h);
  max-height: var(--search-collection-cover-h);
}
#search-view .search-rail.home-collections-rail .home-reads-cover-stack .home-reads-cover {
  position: absolute;
  inset: auto 0 0 auto;
  width: 82%;
  max-width: none;
  height: auto;
  max-height: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}
#search-view .search-rail.home-collections-rail .home-reads-cover-stack.has-two-covers .home-reads-cover:first-child {
  inset: 0 auto auto 0;
  transform: rotate(-7deg);
}
#search-view .search-rail.home-collections-rail .home-reads-cover-stack.has-two-covers .home-reads-cover:last-child {
  transform: rotate(4deg);
}
#search-view .search-rail.home-collections-rail .home-reads-card.has-illustration .home-reads-copy {
  max-width: 48%;
}
#search-view .search-rail.home-collections-rail .home-reads-art {
  position: absolute;
  left: auto;
  right: 10px;
  top: auto;
  bottom: 14px;
  width: 54%;
  max-width: 54%;
  height: var(--search-collection-cover-h);
  max-height: var(--search-collection-cover-h);
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
}
#search-view .search-rail.home-collections-rail > .home-reads-card.is-featured.has-illustration {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "copy";
  align-content: start;
}
.search-rail .medium-card.section-compact.four-up { display: flex; flex-direction: column; grid-template-columns: none; gap: 12px; padding: 0; border: 0; background: transparent; }
.search-rail .medium-card.section-compact.four-up .cover { width: 100%; height: auto; aspect-ratio: 2 / 3; flex: 0 0 auto; }
.search-rail .medium-card.section-compact.four-up .cover > img { width: 100%; height: 100%; object-fit: cover; }
.search-rail .medium-card.section-compact.four-up .card-copy { min-width: 0; padding: 0; }
.search-rail .medium-card.section-compact.four-up .title { font-size: var(--type-body-size); line-height: var(--type-body-line); }
.search-rail .medium-card.section-compact.four-up .author { font-size: var(--type-caption-size); }
.search-rail .ds-author-card { height: auto; }
.search-rail .col-card-title { overflow-wrap: anywhere; }
#search-view .search-rail[data-kind="authors"] > .search-card.ds-author-card--portrait {
  flex: 0 0 min(320px, 82vw);
  width: min(320px, 82vw);
  min-height: 100%;
  align-self: stretch;
  padding: var(--search-card-pad);
  border-radius: 18px;
  background: var(--color-surface, #fff);
  box-shadow: 0 2px 14px rgba(17, 17, 17, 0.08), 0 1px 3px rgba(17, 17, 17, 0.04);
}
#search-view .ds-author-card--portrait .ds-author-card-intro {
  gap: var(--search-card-gap);
}
#search-view .ds-author-card--portrait .ds-author-card-identity {
  display: flex;
  flex-direction: column;
  gap: var(--search-card-gap);
  min-width: 0;
}
#search-view .ds-author-card--portrait .ds-author-card-title {
  margin: 0;
}
#search-view .ds-author-card--portrait .ds-author-card-tagline {
  margin: 0;
}
#search-view .ds-author-card--portrait .ds-author-card-scores {
  margin: 10px 0 0;
  gap: 6px;
}
#search-view .ds-author-card--portrait .ds-author-card-footer {
  margin-top: auto;
  padding-top: 8px;
}
#search-view .ds-author-card--portrait .ds-author-card-stats {
  padding: 8px 6px;
}
.search-empty { width: 100%; margin: 0; padding: 20px 0; color: var(--color-text-secondary); }

@media (min-width: 1200px) {
  .search-drawer {
    position: static; inset: auto; width: auto; height: auto; max-height: none;
    border: 0; border-radius: 0; box-shadow: none; background: transparent; animation: none;
  }
  .search-drawer::backdrop { display: none; }
  .search-drawer-head { padding: 0; background: transparent; margin-bottom: 20px; }
  .search-drawer-head h1 { font-size: var(--type-page-size); line-height: var(--type-page-line); }
  .search-drawer-close { display: none; }
  .search-drawer-body { padding: 0; background: transparent; }
  .search-drawer-field { max-width: 100%; }
  .search-drawer-scrim { display: none !important; }
}

@media (max-width: 1199px) {
  html.search-responsive:not(.search-overlay) .app-shell > .topbar { display: none !important; }
  html.search-overlay .app-shell > .topbar { display: none !important; }
  #search-view.is-active {
    position: fixed;
    inset: 0;
    z-index: 45;
    pointer-events: none;
    display: block;
    background: transparent;
    overflow: hidden;
    max-width: 100%;
  }
  html.search-scroll-lock { overflow-x: hidden; max-width: 100%; }
  #search-view.is-active .search-drawer-scrim {
    position: absolute;
    inset: 0;
    pointer-events: auto;
    z-index: 1;
    touch-action: none;
    opacity: 0;
    transition: opacity var(--motion-screen) var(--motion-ease-out);
  }
  #search-view.is-search-sheet-open .search-drawer-scrim:not([hidden]) {
    opacity: 1;
  }
  #search-view.is-active .search-drawer:not([hidden]) {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: transparent;
  }
  #search-view.is-active .search-drawer-surface {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--sheet-bottom, 0px);
    top: auto;
    height: calc(var(--sheet-height, 100dvh) - 6px);
    max-height: calc(var(--sheet-height, 100dvh) - 6px);
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
    background: #fff;
    pointer-events: auto;
    transform: translateY(100%);
    transition: transform var(--motion-screen) var(--motion-ease-out);
    will-change: transform;
  }
  #search-view.is-active .search-drawer.is-open .search-drawer-surface {
    transform: translateY(0);
  }
  #search-view.is-active .search-drawer.is-dragging .search-drawer-surface {
    transition: none;
  }
  #search-view.is-active .search-drawer-head {
    touch-action: none;
    cursor: grab;
  }
  #search-view.is-active .search-drawer-head :is(button, a, input) {
    touch-action: manipulation;
    cursor: default;
  }
  /* Side inset lives on the field and section titles. Rails are full-bleed so
     cards scroll to the sheet edge; shadow room is block padding, not a side gutter. */
  #search-view {
    --search-sheet-gutter: 20px;
  }
  #search-view .search-drawer-body {
    padding-inline: 0;
  }
  #search-view .search-drawer-field.search {
    width: auto;
    max-width: none;
    margin-inline: var(--search-sheet-gutter);
  }
  #search-view .search-drawer-head h1 {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
  }
  #search-view .search-page-notice,
  #search-view .search-section-head {
    margin-inline: var(--search-sheet-gutter);
  }
  #search-view .search-section-head {
    align-items: center;
    margin-bottom: 1px;
  }
  #search-view .search-section-head h2 {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: var(--weight-medium);
    line-height: 1.3;
    letter-spacing: 0;
  }
  #search-view .ds-author-card--portrait .ds-author-card-footer {
    display: none;
  }
  #search-view .search-rail,
  #search-view .search-rail.home-collections-rail {
    padding: 4px 0 20px;
    scroll-padding-inline: var(--search-sheet-gutter);
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }
  #search-view .search-rail > :first-child {
    margin-left: var(--search-sheet-gutter);
  }
  #search-view .search-rail > :last-child {
    margin-right: var(--search-sheet-gutter);
  }
  #search-view .search-rail > .search-empty {
    width: auto;
    flex: 1 1 auto;
  }
  #search-view .search-rail[data-kind="authors"] > .search-card.ds-author-card--portrait {
    overflow: visible;
  }
  :is(#library-view, #authors-view, #series-view, #collections-view) :is(.books-heading, .authors-heading, .series-heading, .collections-heading) > h1 { display: none; }
}

@media (max-width: 767px) {
  #search-view .search-drawer-field .header-search-input {
    font-size: 16px;
    line-height: 22px;
    height: 22px;
  }
  #search-view { --search-sheet-gutter: 16px; }
  .search-drawer-head { padding-inline: 16px; }
  .search-page-sections { gap: 12px; margin-top: 16px; }
  #search-view .search-section-head h2 { font-size: 18px; line-height: 1.3; }
  .search-rail { gap: 6px; }
  .search-rail > .search-card:not(.home-reads-card):not(.home-sheet-series):not(.ds-author-card--portrait) {
    flex-basis: min(280px, 82vw);
    width: min(280px, 82vw);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .home-tabbar .home-dock-panel, .home-tabbar .home-dock-search,
  .home-tabbar .home-dock-toggle { background: var(--color-surface); }
}
@media (prefers-reduced-motion: reduce) {
  #search-view.is-active .search-drawer-surface,
  #search-view.is-active .search-drawer-scrim {
    transition: none;
  }
}

.search-rail .medium-card.section-compact.four-up { height: auto; border-radius: var(--radius-field); background: var(--color-surface); gap: 0; }
.search-rail .medium-card.section-compact.four-up .card-copy { padding: 10px 10px 12px; }
.search-rail .medium-card.section-compact.four-up .title { margin: 0; }
.search-rail .medium-card.section-compact.four-up .cover { border-radius: var(--radius-field) var(--radius-field) 0 0; }
.search-rail .has-gesture-menu { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.search-rail > .search-more { flex: 0 0 auto; align-self: center; }
