.hero-with-search {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding: 40px;
  min-height: 256px;
}
.hero-with-search h1 {
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.journal-hero-intro p {
  max-width: 33em;
  margin-top: 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.journal-hero-search { min-width: 0; }
.hero-search-control { position: relative; }
.hero-with-search.has-live-results { position: relative; z-index: 5; }
.hero-search-suggestions { position: absolute; z-index: 10; top: calc(100% + 10px); left: 0; right: 0; padding: 10px; border-radius: 18px; background: var(--paper); box-shadow: 0 16px 48px #14264126; overflow-wrap: anywhere; }
.hero-search-suggestions .hero-search-status { padding: 6px 10px 8px; margin: 0; color: var(--muted); font-size: 13px; line-height: 20px; }
.hero-search-status a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.hero-search-options { display: flex; flex-direction: column; gap: 4px; }
.hero-search-option { display: flex; flex-direction: column; gap: 5px; padding: 10px; border-radius: 12px; }
.hero-search-option:hover,.hero-search-option[aria-selected="true"] { background: var(--cream); }
.hero-search-option-title { color: var(--ink); font-size: 15px; font-weight: 600; line-height: 22px; }
.hero-search-option-meta { color: var(--muted); font-size: 12px; line-height: 18px; }
.hero-search-suggestions mark { padding: 0; border-radius: 2px; background: #ffe56a; color: inherit; font-weight: inherit; }
.hero-search-all,.hero-search-retry { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 10px; color: var(--blue); font-size: 14px; font-weight: 600; }
.drawer-search { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; border-radius: 14px; background: var(--cream); color: var(--muted); font-size: 16px; }
.journal-search-label {
  display: block;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
}
.journal-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 16px;
  min-width: 0;
  border-radius: 16px;
  background: var(--cream);
}
.journal-search-form input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 8px 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
}
.journal-search-form input::placeholder { color: var(--muted); opacity: 1; }
.page-search-form input::-webkit-search-cancel-button,.quick-search-form input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.journal-search-form:focus-within { outline: 2px solid var(--blue); outline-offset: 3px; }
.journal-search-form .journal-search-submit { min-height: 48px; flex: none; padding: 0 20px; border-radius: 12px; }
.journal-search-form .journal-search-clear {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: transparent;
  color: var(--muted);
}
.journal-search-clear > .icon { pointer-events: none; }
.journal-search-form input:placeholder-shown + .journal-search-clear { visibility: hidden; pointer-events: none; }
@media (hover: hover) {
  .journal-search-form .journal-search-clear:hover { background: var(--cream); }
}
.frequent-searches { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 14px; font-size: 13px; line-height: 20px; }
.frequent-searches > span { color: var(--muted); }
.frequent-searches a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; }
.frequent-searches a:hover { text-decoration-color: currentColor; }
.journal-search-page { width: 100%; max-width: 1092px; }
.journal-search-page h1 { margin-bottom: 24px; font-size: 40px; line-height: 1.15; letter-spacing: -.03em; }
.journal-search-page .journal-search-form { background: var(--paper); }
.journal-search-page .journal-search-form input { font-size: 18px; }
.journal-search-summary { margin: 28px 0 20px; font-size: 18px; font-weight: 600; line-height: 26px; }
.journal-search-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.journal-search-card { display: flex; flex-direction: column; min-width: 0; background: var(--paper); border-radius: 24px; padding: 6px; }
.journal-search-photo { display: grid; width: 100%; aspect-ratio: 4/3; border-radius: 20px; overflow: hidden; background: var(--cream); }
.journal-search-photo img { width: 100%; height: 100%; object-fit: cover; }
.search-photo-fallback { align-self: center; justify-self: center; color: var(--muted); font-size: 24px; font-weight: 700; }
.journal-search-copy { display: flex; flex-direction: column; align-items: flex-start; flex: 1; gap: 12px; padding: 16px 12px 14px; }
.journal-search-copy h2 { font-size: 19px; line-height: 26px; font-weight: 600; letter-spacing: -.015em; overflow-wrap: anywhere; }
.journal-search-copy h2 a:hover { color: var(--blue); }
.search-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: auto; color: var(--muted); font-size: 12px; line-height: 18px; }
.journal-search-page mark,.quick-search-dialog mark { padding: 0; border-radius: 2px; background: #ffe56a; color: inherit; font-weight: inherit; }
.journal-search-empty,.journal-search-error { padding: 28px; border-radius: 20px; background: var(--paper); font-size: 16px; line-height: 26px; }
.journal-search-error button,.quick-search-error button { min-height: 44px; color: var(--blue); font-weight: 600; }
.quick-search-dialog { width: min(760px,calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 96px); margin: clamp(16px,8vh,72px) auto auto; border: 0; border-radius: 24px; padding: 0; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px #14264133; }
.quick-search-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.quick-search-dialog::backdrop { background: #18233b80; }
.quick-search-form { display: flex; flex: none; align-items: center; gap: 12px; padding: 16px 16px 16px 24px; }
.quick-search-form input { flex: 1; min-width: 0; padding: 8px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 22px; line-height: 28px; }
.quick-search-form input::placeholder { color: var(--muted); }
.quick-search-form button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--cream); color: var(--muted); font-size: 28px; }
.quick-search-content { flex: 0 1 auto; min-height: 0; max-height: min(58dvh,620px); overflow: auto; overscroll-behavior: contain; padding: 0 12px 12px; }
.quick-search-status { padding: 18px 12px 20px; color: var(--muted); font-size: 16px; line-height: 26px; }
.quick-search-status a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.quick-search-results { display: flex; flex-direction: column; gap: 4px; }
.quick-search-result { display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; border-radius: 14px; }
.quick-search-result:hover,.quick-search-result[aria-selected="true"] { background: var(--cream); }
.quick-search-title { font-size: 17px; line-height: 25px; font-weight: 600; }
.quick-search-meta { color: var(--muted); font-size: 13px; line-height: 19px; }
.quick-search-all { display: inline-flex; align-items: center; min-height: 44px; margin-left: 12px; color: var(--blue); font-size: 14px; font-weight: 600; }
.quick-search-keys { flex: none; padding: 12px 24px 16px; color: var(--muted); font-size: 12px; line-height: 18px; }
.quick-search-error { padding: 0 12px 12px; }
.listing-layout { row-gap: 0; }
.listing-controls { min-width: 0; grid-column: 1; grid-row: 1; }
.listing-controls > h2 { margin-bottom: 20px; }
.listing-layout > .listing-main { grid-column: 1; grid-row: 2; }
.listing-layout > .sidebar { grid-column: 2; grid-row: 2; }
.sidebar-sticky-group { display: flex; flex-direction: column; gap: 16px; }
.not-found-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
@media (max-width: 1100px) {
  .hero-with-search { gap: 32px; grid-template-columns: minmax(0,1fr); }
  .journal-hero-search { width: 100%; max-width: 720px; }
  .journal-hero-intro p { max-width: 42em; }
}
@media (max-width: 900px) {
  .journal-search-results { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
  .hero-with-search { padding: 32px; }
}
@media (max-width: 600px) {
  .hero-search-suggestions { position: static; margin-top: 12px; background: var(--cream); box-shadow: none; }
  .hero-search-option-title { font-size: 16px; line-height: 23px; }
  .hero-search-option:hover,.hero-search-option[aria-selected="true"] { background: var(--paper); }
  .journal-search-page { width: auto; margin: 0 16px; }
  .hero-with-search { padding: 28px 24px; gap: 26px; min-height: 0; }
  .hero-with-search h1 { font-size: 36px; line-height: 1.1; }
  .journal-hero-intro p { margin-top: 16px; font-size: 16px; }
  .journal-search-label { font-size: 14px; margin-bottom: 10px; }
  .journal-search-form { gap: 6px; padding-left: 12px; }
  .hero-search-form > .icon { display: none; }
  .journal-search-form .journal-search-submit { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .frequent-searches { gap: 8px 12px; font-size: 12px; }
  .journal-search-page h1 { font-size: 30px; margin-bottom: 20px; }
  .journal-search-page .journal-search-form input { font-size: 16px; }
  .page-search-form > .icon { display: none; }
  .journal-search-results { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .journal-search-summary { margin: 24px 0 16px; font-size: 17px; }
  .journal-search-copy { padding: 16px 14px; }
  .quick-search-form { padding: 12px; gap: 8px; }
  .quick-search-form > .icon { display: none; }
  .quick-search-form input { font-size: 18px; }
  .quick-search-keys { padding: 8px 24px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .journal-search-card,.quick-search-result,.journal-search-form { scroll-behavior: auto; transition: none; }
}
