/* hongguo.love — Warm Porcelain Editorial Magazine Design System (.hg-*) */
:root {
  color-scheme: light dark;
  --hg-surface-paper: #FAF8F6;
  --hg-surface-card: #FFFFFF;
  --hg-surface-tint: #FFF1F3;
  --hg-surface-glass: rgba(250, 248, 246, 0.84);
  --hg-surface-muted: #F3EFEA;
  --hg-line-hairline: rgba(24, 24, 27, 0.08);
  --hg-line-strong: rgba(24, 24, 27, 0.16);

  --hg-coral-primary: #FF385C;
  --hg-coral-hover: #E11D48;
  --hg-coral-soft: rgba(255, 56, 92, 0.10);
  --hg-rose-soft: #FB7185;
  --hg-amber-warm: #F59E0B;
  --hg-emerald-done: #059669;

  --hg-ink-title: #18181B;
  --hg-ink-body: #3F3F46;
  --hg-ink-caption: #71717A;
  --hg-ink-on-coral: #FFFFFF;

  --hg-font-editorial: "LXGW WenKai", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --hg-font-serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;

  --hg-radius-sm: 10px;
  --hg-radius-md: 14px;
  --hg-radius-card: 18px;
  --hg-radius-sheet: 24px;
  --hg-radius-pill: 9999px;
  --hg-container-max: 1280px;
  --hg-shadow-soft: 0 8px 30px rgba(24, 24, 27, 0.05);
  --hg-shadow-hover: 0 14px 36px rgba(255, 56, 92, 0.13);
}

@media (prefers-color-scheme: dark) {
  :root {
    --hg-surface-paper: #161416;
    --hg-surface-card: #211D21;
    --hg-surface-tint: #2D1E24;
    --hg-surface-glass: rgba(22, 20, 22, 0.86);
    --hg-surface-muted: #2A242A;
    --hg-line-hairline: rgba(255, 255, 255, 0.09);
    --hg-line-strong: rgba(255, 255, 255, 0.18);
    --hg-coral-soft: rgba(255, 56, 92, 0.18);
    --hg-ink-title: #FAF7F5;
    --hg-ink-body: #D4CFD2;
    --hg-ink-caption: #A19AA0;
    --hg-shadow-soft: 0 10px 32px rgba(0, 0, 0, 0.32);
    --hg-shadow-hover: 0 16px 40px rgba(255, 56, 92, 0.22);
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: var(--hg-font-editorial);
  font-size: 16px;
  background-color: var(--hg-surface-paper);
  color: var(--hg-ink-body);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body.hg-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 75% 320px at 50% -80px, var(--hg-surface-tint), transparent 72%),
    var(--hg-surface-paper);
  color: var(--hg-ink-body);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--hg-coral-primary);
  outline-offset: 2px;
}

.hg-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 8px 16px;
  border-radius: var(--hg-radius-pill);
  background: var(--hg-coral-primary);
  color: var(--hg-ink-on-coral);
  font-size: 0.875rem;
  font-weight: 600;
  transform: translateY(-220%);
  transition: transform 0.18s ease;
}

.hg-skip-link:focus-visible {
  transform: translateY(0);
}

/* Frosted Glass Navigation */
.hg-glass-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--hg-surface-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--hg-line-hairline);
}

.hg-nav-inner {
  max-width: var(--hg-container-max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.hg-brand-glyph {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--hg-coral-primary), var(--hg-rose-soft));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(255, 56, 92, 0.25);
}

.hg-brand-copy {
  display: flex;
  flex-direction: column;
}

.hg-brand-name {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--hg-ink-title);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.hg-brand-tag {
  font-size: 0.72rem;
  color: var(--hg-ink-caption);
  letter-spacing: 0.04em;
}

.hg-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.hg-nav-link {
  padding: 7px 14px;
  border-radius: var(--hg-radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--hg-ink-body);
  transition: background-color 0.16s ease, color 0.16s ease;
}

.hg-nav-link:hover,
.hg-nav-link--active {
  background: var(--hg-surface-tint);
  color: var(--hg-coral-primary);
}

.hg-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hg-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px;
  border-radius: var(--hg-radius-pill);
  border: 1px solid var(--hg-line-strong);
  background: var(--hg-surface-card);
  color: var(--hg-ink-caption);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.hg-search-trigger:hover {
  border-color: var(--hg-coral-primary);
  color: var(--hg-ink-title);
  box-shadow: var(--hg-shadow-soft);
}

.hg-kbd {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--hg-surface-muted);
  color: var(--hg-ink-caption);
}

/* Main Container */
.hg-editorial {
  max-width: var(--hg-container-max);
  margin: 0 auto;
  padding: 28px 20px 72px;
}

/* Breadcrumb */
.hg-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.84rem;
  color: var(--hg-ink-caption);
}

.hg-breadcrumb a:hover {
  color: var(--hg-coral-primary);
}

.hg-breadcrumb-sep {
  opacity: 0.45;
}

.hg-breadcrumb-current {
  color: var(--hg-ink-title);
  font-weight: 500;
}

/* Editorial Masthead */
.hg-masthead {
  background: linear-gradient(135deg, var(--hg-surface-card) 0%, var(--hg-surface-tint) 100%);
  border: 1px solid var(--hg-line-hairline);
  border-radius: var(--hg-radius-sheet);
  padding: 30px 32px;
  margin-bottom: 28px;
  box-shadow: var(--hg-shadow-soft);
}

.hg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hg-coral-primary);
  background: var(--hg-coral-soft);
  padding: 4px 11px;
  border-radius: var(--hg-radius-pill);
  margin-bottom: 12px;
}

.hg-h1 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  line-height: 1.28;
  color: var(--hg-ink-title);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hg-lead-copy {
  margin: 0;
  max-width: 780px;
  font-size: 0.98rem;
  color: var(--hg-ink-body);
}

.hg-mood-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hg-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--hg-radius-pill);
  background: var(--hg-surface-card);
  border: 1px solid var(--hg-line-hairline);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--hg-ink-body);
  transition: all 0.16s ease;
}

.hg-pill:hover,
.hg-pill--active {
  background: var(--hg-coral-primary);
  border-color: var(--hg-coral-primary);
  color: var(--hg-ink-on-coral);
}

.hg-pill-count {
  font-size: 0.74rem;
  opacity: 0.8;
}

/* Section Headers */
.hg-section {
  margin-top: 38px;
}

.hg-section--first {
  margin-top: 0;
}

.hg-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.hg-section-title {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--hg-ink-title);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hg-section-title::before {
  content: "";
  width: 5px;
  height: 18px;
  border-radius: 4px;
  background: var(--hg-coral-primary);
}

.hg-section-more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--hg-coral-primary);
}

.hg-section-more:hover {
  color: var(--hg-coral-hover);
  text-decoration: underline;
}

/* CSS Grid Dense Editorial Bento & Masonry Waterfall */
.hg-bento-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 20px;
  align-items: start;
}

.hg-bento-item {
  margin: 0;
  background: var(--hg-surface-card);
  border: 1px solid var(--hg-line-hairline);
  border-radius: var(--hg-radius-card);
  overflow: hidden;
  box-shadow: var(--hg-shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
}

.hg-bento-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--hg-shadow-hover);
  border-color: rgba(255, 56, 92, 0.28);
}

/* Card Type 1: 16:9 Span-2 Editorial Lead Card with Blockquote */
.hg-bento-item--lead {
  grid-column: span 2;
}

.hg-media-16x9 {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--hg-surface-muted);
}

.hg-media-16x9 .hg-cover-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  transition: transform 0.35s ease;
}

/* Card Type 2: 3:4 Vertical Poster Card */
.hg-media-3x4 {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--hg-surface-muted);
}

.hg-media-3x4 .hg-cover-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.hg-bento-item:hover .hg-cover-img {
  transform: scale(1.035);
}

.hg-badge-float {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: var(--hg-radius-pill);
  background: rgba(24, 24, 27, 0.72);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.73rem;
  font-weight: 600;
}

.hg-badge-float--coral {
  background: var(--hg-coral-primary);
}

.hg-badge-ep {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(24, 24, 27, 0.74);
  color: #FFFFFF;
  font-size: 0.73rem;
  font-weight: 600;
}

.hg-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.hg-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--hg-ink-title);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hg-bento-item--lead .hg-card-title {
  font-size: 1.18rem;
  -webkit-line-clamp: 1;
}

.hg-card-title a:hover {
  color: var(--hg-coral-primary);
}

.hg-quote {
  margin: 2px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--hg-coral-primary);
  background: var(--hg-surface-tint);
  border-radius: 0 var(--hg-radius-sm) var(--hg-radius-sm) 0;
  font-size: 0.88rem;
  color: var(--hg-ink-body);
  font-style: normal;
  line-height: 1.55;
}

.hg-card-caption {
  margin: 0;
  font-size: 0.82rem;
  color: var(--hg-ink-caption);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hg-card-meta {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--hg-ink-caption);
}

.hg-tag-mini {
  color: var(--hg-coral-primary);
  font-weight: 600;
}

/* Card Type 3: Stacked Curation Card (.hg-bento-item--stack) */
.hg-bento-item--stack {
  background: linear-gradient(180deg, var(--hg-surface-tint) 0%, var(--hg-surface-card) 58%);
  padding: 18px 16px 16px;
}

.hg-stack-stage {
  position: relative;
  width: 82%;
  margin: 8px auto 14px;
  aspect-ratio: 3 / 4;
}

.hg-stack-layer {
  position: absolute;
  inset: 0;
  border-radius: var(--hg-radius-md);
  border: 1px solid var(--hg-line-strong);
  background: var(--hg-surface-card);
  box-shadow: var(--hg-shadow-soft);
}

.hg-stack-layer--back2 {
  transform: translate(12px, -10px) rotate(4.5deg) scale(0.92);
  background: var(--hg-rose-soft);
  opacity: 0.35;
}

.hg-stack-layer--back1 {
  transform: translate(-10px, -6px) rotate(-3.5deg) scale(0.95);
  background: var(--hg-coral-soft);
}

.hg-stack-front {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--hg-radius-md);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(24, 24, 27, 0.14);
}

.hg-stack-front .hg-cover-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

/* Curation Hub Grid */
.hg-curation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.hg-curation-banner {
  background: var(--hg-surface-card);
  border: 1px solid var(--hg-line-hairline);
  border-radius: var(--hg-radius-sheet);
  overflow: hidden;
  box-shadow: var(--hg-shadow-soft);
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hg-curation-banner:hover {
  transform: translateY(-3px);
  box-shadow: var(--hg-shadow-hover);
}

.hg-curation-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Pagination */
.hg-pagination {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hg-page-link {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--hg-radius-pill);
  border: 1px solid var(--hg-line-hairline);
  background: var(--hg-surface-card);
  color: var(--hg-ink-body);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hg-page-link:hover {
  border-color: var(--hg-coral-primary);
  color: var(--hg-coral-primary);
}

.hg-page-link--current {
  background: var(--hg-coral-primary);
  border-color: var(--hg-coral-primary);
  color: var(--hg-ink-on-coral);
}

/* Story Detail & Player Layout (/story/<slug>/) */
.hg-story-header {
  background: linear-gradient(135deg, var(--hg-surface-tint) 0%, var(--hg-surface-card) 100%);
  border: 1px solid var(--hg-line-hairline);
  border-radius: var(--hg-radius-sheet);
  padding: 22px 26px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  box-shadow: var(--hg-shadow-soft);
}

.hg-cover-box {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--hg-radius-md);
  overflow: hidden;
  background: var(--hg-surface-muted);
  border: 1px solid var(--hg-line-hairline);
}

.hg-cover-box .hg-cover-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.hg-cover-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background: var(--hg-surface-muted);
  text-align: center;
  font-size: 0.75rem;
  color: var(--hg-ink-caption);
}

.hg-cover-box[data-state="error"] .hg-cover-fallback,
.hg-cover-box[data-state="empty"] .hg-cover-fallback {
  display: flex;
}

.hg-cover-box[data-state="error"] .hg-cover-img,
.hg-cover-box[data-state="empty"] .hg-cover-img {
  opacity: 0;
}

.hg-cover-retry {
  padding: 3px 10px;
  border-radius: var(--hg-radius-pill);
  border: 1px solid var(--hg-line-strong);
  background: var(--hg-surface-card);
  color: var(--hg-ink-title);
  font-size: 0.74rem;
  cursor: pointer;
}

.hg-story-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-size: 0.86rem;
  color: var(--hg-ink-caption);
}

.hg-status-badge {
  padding: 2px 10px;
  border-radius: var(--hg-radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--hg-coral-soft);
  color: var(--hg-coral-primary);
}

.hg-status-badge--done {
  background: rgba(5, 150, 105, 0.12);
  color: var(--hg-emerald-done);
}

.hg-story-desc {
  margin: 6px 0 0;
  font-size: 0.94rem;
  color: var(--hg-ink-body);
  line-height: 1.65;
}

.hg-theater-grid {
  display: grid;
  grid-template-columns: minmax(310px, 440px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.hg-player-frame,
.hg-episode-panel {
  background: var(--hg-surface-card);
  border: 1px solid var(--hg-line-hairline);
  border-radius: var(--hg-radius-sheet);
  overflow: hidden;
  box-shadow: var(--hg-shadow-soft);
}

.hg-stage-bar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hg-line-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hg-stage-ep {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hg-ink-title);
}

.hg-stage-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hg-ctrl-btn,
.hg-ctrl-select {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--hg-radius-pill);
  border: 1px solid var(--hg-line-strong);
  background: var(--hg-surface-paper);
  color: var(--hg-ink-title);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.hg-ctrl-btn:hover:not(:disabled),
.hg-ctrl-select:hover:not(:disabled) {
  border-color: var(--hg-coral-primary);
  color: var(--hg-coral-primary);
}

.hg-ctrl-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hg-player-mount {
  width: 100%;
  height: min(75vh, 720px);
  background: #0F0E10;
}

.hg-status-alert {
  padding: 10px 16px;
  background: var(--hg-surface-tint);
  border-top: 1px solid rgba(255, 56, 92, 0.25);
  color: var(--hg-coral-hover);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
}

.hg-status-alert[hidden] {
  display: none;
}

.hg-status-msg {
  margin: 0;
}

.hg-ep-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  max-height: min(64vh, 580px);
  overflow-y: auto;
}

.hg-ep-btn {
  padding: 8px 10px;
  border-radius: var(--hg-radius-sm);
  border: 1px solid var(--hg-line-hairline);
  background: var(--hg-surface-paper);
  color: var(--hg-ink-title);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}

.hg-ep-btn:hover:not(:disabled) {
  border-color: var(--hg-coral-primary);
  color: var(--hg-coral-primary);
}

.hg-ep-btn--on {
  background: var(--hg-coral-primary);
  border-color: var(--hg-coral-primary);
  color: var(--hg-ink-on-coral);
}

.hg-ep-btn--on:hover:not(:disabled) {
  background: var(--hg-coral-hover);
  color: var(--hg-ink-on-coral);
}

/* Backlink Curations Box on Story Page */
.hg-backlink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.hg-backlink-card {
  background: linear-gradient(135deg, var(--hg-surface-card), var(--hg-surface-tint));
  border: 1px solid var(--hg-line-hairline);
  border-radius: var(--hg-radius-card);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  box-shadow: var(--hg-shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.hg-backlink-card:hover {
  transform: translateY(-2px);
  border-color: var(--hg-coral-primary);
}

/* Search Drawer & Search Page */
.hg-search-drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(24, 24, 27, 0.48);
  backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 16px 24px;
}

.hg-search-drawer--open {
  display: flex;
}

.hg-drawer-dialog {
  width: min(680px, 100%);
  max-height: 82vh;
  background: var(--hg-surface-card);
  border: 1px solid var(--hg-line-strong);
  border-radius: var(--hg-radius-sheet);
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.hg-search-form {
  display: flex;
  gap: 8px;
}

.hg-search-input {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--hg-radius-pill);
  border: 1px solid var(--hg-line-strong);
  background: var(--hg-surface-paper);
  color: var(--hg-ink-title);
  font-family: inherit;
  font-size: 0.95rem;
}

.hg-search-submit,
.hg-drawer-close {
  height: 44px;
  padding: 0 18px;
  border-radius: var(--hg-radius-pill);
  border: 1px solid var(--hg-line-hairline);
  background: var(--hg-coral-primary);
  color: var(--hg-ink-on-coral);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.hg-drawer-close {
  background: var(--hg-surface-muted);
  color: var(--hg-ink-body);
}

.hg-drawer-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hg-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.hg-search-hit {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: var(--hg-radius-md);
  border: 1px solid var(--hg-line-hairline);
  background: var(--hg-surface-paper);
}

.hg-search-hit:hover {
  border-color: var(--hg-coral-primary);
}

.hg-search-status {
  margin: 0;
  font-size: 0.85rem;
  color: var(--hg-ink-caption);
}

/* 404 Editorial Illustration Card */
.hg-empty-card {
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(180deg, var(--hg-surface-card), var(--hg-surface-tint));
  border: 1px solid var(--hg-line-hairline);
  border-radius: var(--hg-radius-sheet);
  margin-bottom: 32px;
}

.hg-empty-art {
  width: 160px;
  height: 120px;
  margin: 0 auto 14px;
  display: block;
}

/* Footer */
.hg-footer {
  border-top: 1px solid var(--hg-line-hairline);
  background: var(--hg-surface-card);
  padding: 36px 20px;
  margin-top: 56px;
}

.hg-footer-inner {
  max-width: var(--hg-container-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.84rem;
  color: var(--hg-ink-caption);
}

.hg-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hg-footer-links a:hover {
  color: var(--hg-coral-primary);
}

@media (max-width: 1024px) {
  .hg-bento-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hg-curation-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .hg-theater-grid {
    grid-template-columns: 1fr;
  }
  .hg-nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .hg-nav-inner {
    flex-wrap: wrap;
  }
  .hg-nav-link {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .hg-bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .hg-bento-item--lead {
    grid-column: span 2;
  }
  .hg-masthead {
    padding: 20px 18px;
  }
  .hg-story-header {
    grid-template-columns: 88px minmax(0, 1fr);
    padding: 16px;
  }
  .hg-curation-banner {
    grid-template-columns: 1fr;
  }
}
