:root {
  --site-accent: #be185d;
  scroll-padding-top: 5.5rem;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  max-width: 1440px;
  margin: auto;
  padding: .55rem 1rem;
}

.site-brand, .search-link, .site-menu summary, .site-desktop a, .site-menu nav a, .site-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
  border-radius: .75rem;
}

.site-brand { margin-right: auto; gap: .55rem; color: #0f172a; white-space: nowrap; }
.site-brand span { background: var(--site-accent); color: #fff; padding: .3rem .58rem; border-radius: .65rem; }
.search-link, .site-menu summary, .site-desktop a, .site-menu nav a { padding: 0 .65rem; }
.search-link, .site-menu summary { color: var(--site-accent); background: #fdf2f8; }
.site-desktop, .site-menu:not([open]) nav { display: none; }
.site-menu summary { cursor: pointer; list-style: none; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu nav {
  position: absolute;
  top: 100%;
  right: 1rem;
  left: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem;
  background: #fff;
  border: 1px solid #fbcfe8;
  box-shadow: 0 8px 20px #0f172a18;
  border-radius: .85rem;
  padding: .55rem;
}
.site-menu nav a:hover, .site-desktop a:hover { background: #fdf2f8; color: var(--site-accent); }

.hero { height: clamp(20rem, 46vw, 32.5rem); }
.hero .slide[hidden] { display: none; }
.hero .slide img { width: 100%; height: 100%; object-fit: cover; }
.site-cta { padding: 0 1rem; color: #fff; background: var(--site-accent); cursor: pointer; }
.site-cta:hover { background: #9d174d; }
.slide-dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: #0f172a90;
  border-radius: 50%;
}
.slide-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.slide-dot[aria-pressed="true"]::before { background: #f472b6; box-shadow: 0 0 0 2px #fff; }

.site-search { margin-top: 1.5rem; padding: 1rem; background: #fff; border: 1px solid #fce7f3; border-radius: .9rem; }
.site-search h2 { font-weight: 700; margin-bottom: .5rem; }
.site-search form { display: flex; gap: .5rem; max-width: 36rem; }
.site-search input { flex: 1; min-width: 0; border: 1px solid #94a3b8; border-radius: .65rem; padding: .55rem .7rem; font-size: 1rem; }
#search-status:not(:empty), #search-results:not(:empty) { margin-top: .65rem; }
#search-results a { display: inline-flex; align-items: center; min-height: 44px; color: var(--site-accent); text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-drama-card] { min-width: 0; }
[data-drama-card] img, .genre-art { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
[data-drama-card] h3 { white-space: normal; overflow-wrap: anywhere; }
[data-drama-card]:target { outline: 3px solid var(--site-accent); outline-offset: 2px; }
.genre-art { display: grid; align-content: center; justify-items: center; gap: .4rem; padding: .5rem; color: #fff; text-align: center; }
.genre-art span { font-weight: 800; font-size: clamp(1.1rem, 4vw, 2rem); }
.genre-mystery { background: linear-gradient(145deg, #30144d, #87304c); }
.genre-romance { background: linear-gradient(145deg, #80335b, #a83b4f); }
.genre-fantasy { background: linear-gradient(145deg, #104462, #583782); }
.editorial-note { border-radius: .85rem; padding: 1.2rem; background: #fdf2f8; }
.faq-entry { margin-top: .65rem; background: #fff; border: 1px solid #e2e8f0; border-radius: .75rem; }
.faq-entry summary { min-height: 44px; padding: .75rem 1rem; cursor: pointer; font-weight: 650; }
.faq-entry p { padding: 0 1rem .9rem; color: #475569; }
.site-footer { padding: 1.5rem 1rem max(1.5rem, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e2e8f0; text-align: center; color: #475569; }
:focus-visible { outline: 2px solid #9d174d; outline-offset: 3px; }

@media (min-width: 960px) {
  .site-menu { display: none; }
  .site-desktop { display: flex; gap: .35rem; }
  [data-drama-card] img, .genre-art { aspect-ratio: 4 / 5; }
}
@media (max-width: 480px) {
  .header-inner { padding-inline: .75rem; }
  .site-menu nav { left: .75rem; right: .75rem; }
  main .grid { gap: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .slide { transition: none; }
}
