/* ============================================================
   SHAPE, MOTION, LAYOUT
   ============================================================ */
:root {
  --r: 10px;
  --r-sm: 10px;
  --r-lg: 14px;
  --r-full: 999px;

  --t: 160ms ease;
  --t-slow: 280ms ease;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-hard: 0 10px 28px rgba(0, 0, 0, 0.5);

  --max-w: 1680px;
  --gutter: clamp(12px, 2vw, 24px);
  --header-h: 64px;
  --sidebar-w: 300px;

  /* System fonts only: no web-font download, fastest possible render */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: var(--font);

  /* ---- TYPE SCALE ---- */
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.95rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.15rem + 0.6vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-3xl: clamp(2rem, 1.7rem + 1.6vw, 3rem);
}

/* ============ RESET ============ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
  /* clip (not hidden) so position: sticky keeps working */
  overflow-x: clip;
}

img, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--t);
}
a:hover { color: var(--accent); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul, ol { list-style: none; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

/* ============ UTILITIES ============ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}

.screen-reader-text, .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;
}

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: height var(--t), box-shadow var(--t);
}

.site-header.scrolled {
  height: 56px;
  box-shadow: var(--shadow-2);
}

.header-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
}

/* Logo */
.site-logo {
  flex-shrink: 0;
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.site-logo a { color: var(--ink); }
.site-logo a span { color: var(--accent); }
.site-logo img { max-height: 34px; width: auto; }

/* Nav */
.header-nav { display: flex; gap: 0; align-items: center; }
.header-nav .menu { display: flex; gap: 2px; }
.header-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--r-full);
  transition: color var(--t), background var(--t);
}
.header-nav a:hover { color: var(--ink); background: var(--bg-2); }
.header-nav .current-menu-item > a {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Search */
.header-search {
  margin-left: auto;
  position: relative;
  flex-shrink: 0;
}

.header-search input[type="search"] {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  color: var(--ink);
  padding: 9px 16px 9px 40px;
  border-radius: var(--r-full);
  width: min(260px, 32vw);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--t), background var(--t), width var(--t);
}
.header-search input[type="search"]::placeholder { color: var(--ink-3); }
.header-search input[type="search"]:focus {
  border-color: var(--accent);
  background: var(--bg-2);
  width: min(320px, 42vw);
}

.header-search::before {
  content: "";
  position: absolute;
  left: 14px; top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  background-color: var(--ink-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
  transition: background-color var(--t);
}
.header-search:focus-within::before { background-color: var(--accent); }

/* Search suggestions */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-hard);
  max-height: 380px;
  overflow-y: auto;
  display: none;
  z-index: 200;
  padding: 6px;
}
.search-suggestions.active {
  display: block;
  animation: cd-drop 160ms ease;
}
.suggestion {
  display: flex;
  gap: 12px;
  padding: 8px;
  border-radius: var(--r);
  align-items: center;
  transition: background var(--t);
  text-decoration: none;
}
.suggestion:hover { background: var(--bg-3); }
.suggestion img, .suggestion-placeholder {
  width: 44px; height: 64px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--bg-4);
}
.suggestion-info { flex: 1; min-width: 0; }
.suggestion-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion-meta {
  font-size: var(--text-xs);
  color: var(--ink-3);
}

@keyframes cd-drop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border-radius: var(--r);
}
.mobile-toggle:hover { background: var(--bg-2); }
.mobile-toggle span {
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: var(--t);
}

/* ============ MAIN LAYOUT ============ */
.main-content {
  min-height: 60vh;
  padding: clamp(16px, 2.5vw, 32px) 0 clamp(40px, 5vw, 64px);
}
.layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
  gap: clamp(18px, 2.5vw, 32px);
  align-items: start; /* required so the sidebar can stick */
}
.layout-single-column { display: block; }
.main-column { min-width: 0; }

/* ============ SECTION HEADINGS ============ */
.section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: clamp(24px, 3vw, 40px) 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 1.1em;
  background: var(--accent);
  border-radius: var(--r-full);
  flex-shrink: 0;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: clamp(24px, 3vw, 40px) 0 16px;
}
.section-header .section-title {
  margin: 0;
  padding: 0;
  border: none;
}
.section-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-2);
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  transition: color var(--t), background var(--t), border-color var(--t);
}
.section-link:hover {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}

/* ============ GRIDS ============ */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: clamp(12px, 1.8vw, 20px);
}

.scroll-row {
  display: flex;
  gap: clamp(12px, 1.5vw, 18px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.scroll-row > * { scroll-snap-align: start; flex-shrink: 0; }
.scroll-row .movie-card { width: clamp(140px, 18vw, 180px); }

/* ============ MOVIE CARD ============ */
.movie-card {
  --mc-r: var(--r-lg);
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--mc-r);
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.movie-card:hover,
.movie-card:focus-within {
  border-color: var(--accent-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hard);
}
.movie-card-link {
  display: block;
  color: inherit;
  outline: none;
}
.movie-card-link:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
  border-radius: var(--mc-r);
}

.movie-card .poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg-2);
}
.movie-card .poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.movie-card:hover .poster img { transform: scale(1.05); }
.movie-card .poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  pointer-events: none;
}

.movie-card .card-type-badge,
.movie-card .card-rating {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 9px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  border-radius: var(--r-full);
}
.movie-card .card-type-badge {
  top: 10px; left: 10px;
  color: var(--on-accent);
  background: var(--accent);
}
.movie-card .card-rating {
  top: 10px; right: 10px;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--accent-line);
}

.movie-card .card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 14px;
  background: var(--bg-1);
}
.movie-card .card-title {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t);
}
.movie-card:hover .card-title { color: var(--accent); }
.movie-card .card-year {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-3);
}

/* Left accent bar replaced by a clean top glow line */
.movie-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
  z-index: 3;
}
.movie-card:hover::before,
.movie-card:focus-within::before { transform: scaleX(1); }

/* ============ HERO ============ */
.hero-banner {
  position: relative;
  min-height: clamp(360px, 46vh, 520px);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 16px 0 24px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center top;
  isolation: isolate;
  border: 1px solid var(--line);
}
.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 2%, rgba(10, 10, 10, 0.8) 35%, rgba(10, 10, 10, 0.1) 75%, transparent 100%),
    linear-gradient(to right, rgba(10, 10, 10, 0.88) 0%, transparent 65%);
  z-index: 1;
}
.hero-overlay {
  padding: clamp(20px, 3.5vw, 44px);
  width: 100%;
  max-width: 760px;
  position: relative;
  z-index: 2;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--r-full);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.hero-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
  line-height: 1.05;
  text-wrap: balance;
}
.hero-meta {
  color: var(--ink-2);
  margin-bottom: 24px;
  font-size: var(--text-sm);
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: var(--text-sm);
  border: 1px solid transparent;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
  white-space: nowrap;
  line-height: 1.2;
  cursor: pointer;
  min-height: 44px;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: var(--text-xs); min-height: 36px; }
.btn-lg { padding: 15px 30px; font-size: var(--text-base); min-height: 52px; }
.btn-block { display: flex; width: 100%; }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============ GENRE CHIPS ============ */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: 10px;
}
.genre-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: border-color var(--t), color var(--t), background var(--t);
}
.genre-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.genre-count {
  color: var(--ink-3);
  font-size: var(--text-xs);
  font-weight: 600;
}
.genre-chip:hover .genre-count { color: var(--accent); }

/* ============ SINGLE POST ============ */
.single-header { margin: 16px 0 24px; }
.single-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  text-wrap: balance;
}

.single-movie-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(20px, 3vw, 36px);
  margin-bottom: 36px;
}
.single-poster {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 2/3;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.single-poster img { width: 100%; height: 100%; object-fit: cover; }
.single-meta-block { min-width: 0; }

.single-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
}

.meta-list {
  list-style: none;
  margin-bottom: 24px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0 20px;
}
.meta-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
}
.meta-list li:last-child { border-bottom: none; }
.meta-list strong {
  color: var(--ink-3);
  font-size: var(--text-xs);
  font-weight: 600;
  min-width: 110px;
  padding-top: 2px;
}

.action-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }

.download-section {
  background: var(--bg-1);
  border-radius: var(--r-lg);
  padding: clamp(18px, 2.5vw, 28px);
  margin: 28px 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
}
.download-section h2 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.download-note {
  color: var(--ink-3);
  font-size: var(--text-xs);
  margin-bottom: 18px;
}
.download-group { display: flex; flex-wrap: wrap; gap: 10px; }

.masked-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: background var(--t), color var(--t), border-color var(--t);
  min-height: 46px;
}
.masked-link:hover:not(.countdown-active) {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.masked-link::before { content: '\2B07'; }
.masked-link.subtitle-btn::before { content: '\1F4AC'; }
.masked-link.stream-btn::before { content: '\25B6'; }
.comment-body.comment-spoiler::before { content: 'SPOILER \2014  tap to reveal'; }
.skip-link:focus {
    position: fixed; top: 8px; left: 8px; z-index: 300;
    width: auto; height: auto; margin: 0; padding: 10px 16px;
    clip: auto; overflow: visible;
    background: var(--accent); color: var(--on-accent);
    border-radius: var(--r-full); font-weight: 700;
}
#main:focus { outline: none; }
.cast-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.cast-item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  transition: border-color var(--t);
}
.cast-item:hover { border-color: var(--accent); }
.cast-role {
  color: var(--ink-3);
  font-size: var(--text-xs);
  margin-left: 6px;
}

.single-content {
  line-height: 1.8;
  font-size: var(--text-base);
  color: var(--ink-2);
  margin: 28px 0;
  max-width: 75ch;
}
.single-content p { margin-bottom: 1.5em; }
.single-content h2, .single-content h3 {
  margin: 2em 0 0.8em;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.single-content h2 { font-size: var(--text-xl); }
.single-content h3 { font-size: var(--text-lg); }

/* ============ TRAILER ============ */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 28px 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
}
.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.related-posts { margin: 48px 0 28px; }

/* ============ SIDEBAR (STICKY) ============ */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.widget {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.widget:last-child { margin-bottom: 0; }
.widget-title {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-title::before {
  content: "";
  width: 3px; height: 1em;
  background: var(--accent);
  border-radius: var(--r-full);
}

.trending-list { list-style: none; }
.trending-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--r);
  transition: background var(--t);
}
.trending-item:hover { background: var(--bg-2); }
.trending-item:last-child { border-bottom: none; }
.trending-rank {
  font-size: var(--text-sm);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  min-width: 24px;
  line-height: 1;
}
.trending-item:hover .trending-rank { color: var(--accent); }
.trending-thumb { flex-shrink: 0; }
.trending-thumb img {
  width: 44px; height: 64px;
  object-fit: cover;
  border-radius: var(--r-sm);
}
.trending-info { flex: 1; min-width: 0; }
.trending-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 3px;
}
.trending-meta {
  font-size: var(--text-xs);
  color: var(--ink-3);
}

/* ============ ARCHIVE ============ */
.archive-header { margin: 16px 0 24px; }
.archive-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.archive-desc {
  color: var(--ink-2);
  margin-top: 10px;
  font-size: var(--text-base);
  max-width: 70ch;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 40px 0;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  color: var(--ink-2);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: border-color var(--t), color var(--t), background var(--t);
}
.pagination .page-numbers:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pagination .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.pagination .dots {
  background: none;
  border-color: transparent;
  cursor: default;
  color: var(--ink-4);
}

/* ============ FILTER BAR ============ */
.filter-bar {
  position: sticky;
  top: calc(var(--header-h) + 6px);
  z-index: 50;
  background: var(--bg-glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px;
  margin-bottom: 24px;
}
.filter-body { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-select {
  background-color: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--ink);
  padding: 10px 32px 10px 14px;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  min-width: 130px;
  flex: 1;
  cursor: pointer;
  transition: border-color var(--t);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.filter-select:hover { border-color: var(--line-strong); }
.filter-select:focus {
  border-color: var(--accent);
  outline: none;
}
.filter-toggle {
  display: none;
  width: 100%;
  background: none;
  color: var(--accent);
  font-weight: 600;
  text-align: left;
  padding: 6px 0;
  font-size: var(--text-sm);
}

/* ============ COMMENTS ============ */
.comments-area {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
.comments-area .section-title {
  margin: 0 0 16px;
  padding: 0;
  border: none;
}
.comment-list {
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}
.comment-list.children {
  margin-top: 0;
  margin-left: 22px;
  padding-left: 14px;
  border-left: 1px solid var(--line-2);
}
.comment-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.comment-avatar img {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  object-fit: cover;
  flex-shrink: 0;
}
.comment-content-wrapper { flex: 1; min-width: 0; }
.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: var(--text-sm);
  flex-wrap: wrap;
}
.comment-flag { font-size: 1.1rem; line-height: 1; }
.comment-author { font-weight: 700; color: var(--ink); }
.comment-date {
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin-left: auto;
}
.comment-body {
  margin-bottom: 8px;
  line-height: 1.65;
  font-size: var(--text-base);
  color: var(--ink-2);
  word-break: break-word;
}
.comment-body.comment-spoiler {
  filter: blur(6px);
  cursor: pointer;
  transition: filter var(--t);
  user-select: none;
  position: relative;
}
.comment-body.comment-spoiler.revealed {
  filter: none;
  user-select: auto;
  cursor: default;
}
.comment-body.comment-spoiler::before {
  content: 'SPOILER — tap to reveal';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(10, 10, 10, 0.8);
  border-radius: var(--r-sm);
  z-index: 2;
  pointer-events: none;
}
.comment-body.comment-spoiler.revealed::before { opacity: 0; }

.comment-actions { display: flex; align-items: center; gap: 8px; }
.comment-votes { display: flex; gap: 6px; flex-wrap: wrap; }
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--line-2);
  padding: 6px 12px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-3);
  transition: color var(--t), border-color var(--t), background var(--t);
  min-height: 34px;
}
.vote-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.vote-btn.liked {
  background: var(--accent-dim);
  border-color: var(--accent-line);
  color: var(--accent);
}
.comment-reply-link {
  background: transparent;
  border: none;
  color: var(--ink-3);
  padding: 5px 10px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--t);
}
.comment-reply-link:hover { color: var(--accent); }

.comment-sort {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 14px 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-3);
}
.comment-sort a {
  color: var(--ink-3);
  padding: 5px 12px;
  border-radius: var(--r-full);
  transition: color var(--t), background var(--t);
}
.comment-sort a:hover { color: var(--ink); }
.comment-sort a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.comment-form { margin-top: 28px; }
.comment-form p { margin-bottom: 16px; }
.comment-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--ink-3);
}
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  padding: 12px 14px;
  border-radius: var(--r);
  color: var(--ink);
  font-size: var(--text-sm);
  transition: border-color var(--t);
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form textarea:focus,
.comment-form input:focus {
  border-color: var(--accent);
  outline: none;
}
.comment-form-spoiler {
  color: var(--ink-3);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.comment-form-spoiler input {
  accent-color: var(--accent);
  width: 16px; height: 16px;
}

.comment-respond {
  margin-top: 20px;
  padding: 18px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.comment-respond .comment-reply-title {
  font-size: var(--text-lg);
  margin-bottom: 14px;
  font-weight: 700;
}
.no-comments {
  text-align: center;
  color: var(--ink-3);
  padding: 20px 0;
  font-size: var(--text-sm);
}

/* ============ SEASON / EPISODE ============ */
.season-header { margin-bottom: 28px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: 16px;
}
.back-link:hover { color: var(--accent); }

.episode-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.episode-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color var(--t), background var(--t);
}
.episode-item:hover { background: var(--bg-2); border-color: var(--line-2); }
.ep-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.episode-item:hover .ep-number {
  border-color: var(--accent);
  color: var(--accent);
}
.ep-info { flex: 1; min-width: 0; }
.ep-title {
  font-weight: 600;
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: var(--text-base);
}
.ep-meta {
  font-size: var(--text-xs);
  color: var(--ink-3);
}
.ep-arrow {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--t), transform var(--t), color var(--t);
  color: var(--ink-3);
}
.episode-item:hover .ep-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: var(--text-xs);
  margin-bottom: 20px;
  color: var(--ink-3);
}
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--ink-4); }

/* ============ EPISODE NAV ============ */
.episode-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 28px 0 16px;
}
.episode-nav-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--t), color var(--t);
}
.episode-nav-btn:hover:not(.disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.episode-nav-btn.next { text-align: right; }
.episode-nav-btn.disabled { visibility: hidden; }
.episode-nav-btn .nav-label {
  font-size: var(--text-xs);
  color: var(--ink-3);
  font-weight: 600;
}
.episode-nav-btn .nav-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}
.episode-nav-btn:hover .nav-title { color: var(--accent); }

/* ============ SEASON PICKER ============ */
.season-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.season-picker-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-3);
}
.season-picker-list { display: flex; gap: 6px; flex-wrap: wrap; }
.season-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 6px 14px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: border-color var(--t), color var(--t), background var(--t);
}
.season-pill:hover { border-color: var(--accent); color: var(--accent); }
.season-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* ============ MODERN GENRE GRID ============ */
.genre-modern-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 32px;
}
.genre-modern-card {
  position: relative;
  display: block;
  height: 120px;
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--t), border-color var(--t);
  border: 1px solid var(--line);
  background: var(--bg-1);
}
.genre-modern-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.genre-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.genre-name {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
}
.genre-arrow {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition: background var(--t), border-color var(--t), color var(--t);
}
.genre-modern-card:hover .genre-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.genre-modern-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  z-index: 1;
}
.genre-modern-card:nth-child(1)::before { background: #ff5f3d; }
.genre-modern-card:nth-child(2)::before { background: #ffb800; }
.genre-modern-card:nth-child(3)::before { background: #ff4d6d; }
.genre-modern-card:nth-child(4)::before { background: #00c2ff; }
.genre-modern-card:nth-child(5)::before { background: #ff2d2d; }
.genre-modern-card:nth-child(6)::before { background: #b84dff; }
.genre-modern-card:nth-child(7)::before { background: #ffcc00; }
.genre-modern-card:nth-child(8)::before { background: #00e676; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  padding: 48px 0 24px;
  margin-top: 56px;
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--ink-3);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-menu { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-menu a { color: var(--ink-3); }
.footer-menu a:hover { color: var(--accent); }

/* ============ 404 ============ */
.error-404 { text-align: center; padding: clamp(48px, 8vw, 100px) 20px; }
.error-404 h1 {
  font-size: clamp(4rem, 14vw, 10rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.9;
  margin-bottom: 20px;
  color: var(--accent);
}
.error-404 p {
  color: var(--ink-2);
  margin-bottom: 24px;
  font-size: var(--text-lg);
}
.error-404 .search-form {
  max-width: 440px;
  margin: 0 auto 20px;
  display: flex;
  gap: 10px;
}
.error-404 .search-field {
  flex: 1;
  padding: 12px 18px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  color: var(--ink);
  transition: border-color var(--t);
}
.error-404 .search-field:focus {
  border-color: var(--accent);
  outline: none;
}

.load-more-wrap { text-align: center; margin-top: 36px; }

/* ============ PERFORMANCE MODE ============ */
body.performance-mode *,
body.performance-mode *::before,
body.performance-mode *::after {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
}
body.performance-mode .site-header,
body.performance-mode .filter-bar {
  background: var(--bg);
}

/* ============ CARD BADGES ============ */
.card-badges {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2;
}
.badge-ep,
.badge-status {
  background: rgba(0, 0, 0, 0.78);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-2);
}
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.status-complete .status-dot { background: #00e676; }
.status-ongoing .status-dot { background: var(--accent); }

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--ink-3);
  font-weight: 500;
}
.card-season, .card-ep { color: var(--ink-3); }
.card-year { color: var(--ink-3); }

.series-year-suffix {
  font-size: 0.55em;
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 6px;
  letter-spacing: 0;
}

/* ============ LAZY IMAGE ============ */
img[data-src] { opacity: 0; transition: opacity 0.35s ease; }
img.loaded { opacity: 1; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
  :root { --sidebar-w: 280px; }
  .layout-with-sidebar { gap: 28px; }
  .header-search input[type="search"] { width: min(220px, 30vw); }
  .header-search input[type="search"]:focus { width: min(280px, 40vw); }
}

@media (max-width: 1024px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
  /* Sticky only makes sense in the two-column layout */
  .sidebar { position: static; max-height: none; overflow: visible; margin-top: 36px; }
  .single-movie-layout { grid-template-columns: 220px 1fr; gap: 24px; }
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr)); gap: 14px; }
  .genre-modern-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .genre-modern-card { height: 140px; }
}

@media (max-width: 768px) {
  :root {
    --header-h: 56px;
    --gutter: clamp(10px, 2.5vw, 20px);
  }
  .main-content { padding: 14px 0 40px; }
  .site-header .header-inner { gap: 10px; }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 10px var(--gutter) 20px;
    flex-direction: column;
    align-items: stretch;
  }
  .header-nav.open { display: flex; animation: cd-drop 160ms ease; }
  .header-nav .menu { flex-direction: column; gap: 0; }
  .header-nav a { padding: 12px; border-radius: var(--r); }

  .mobile-toggle { display: flex; order: -1; }
  .header-search { margin-left: auto; }
  .header-search input[type="search"] {
    width: 40px;
    padding: 8px;
    cursor: pointer;
    background: transparent;
    border-color: transparent;
  }
  .header-search input[type="search"]:focus {
    width: min(240px, 65vw);
    padding: 10px 14px 10px 36px;
    background: var(--bg-2);
    border-color: var(--line-2);
  }
  .header-search::before { left: 11px; width: 15px; height: 15px; }

  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 125px), 1fr)); gap: 12px; }
  .scroll-row { gap: 10px; }
  .scroll-row .movie-card { width: 135px; }
  .movie-card .card-info { padding: 10px 11px 12px; }
  .movie-card .card-title { font-size: var(--text-xs); }

  .single-movie-layout { grid-template-columns: 1fr; gap: 20px; }
  .single-poster { max-width: 200px; margin: 0 auto; }
  .hero-banner { min-height: 340px; margin: 12px 0 20px; }
  .hero-actions .btn { flex: 1; }

  .download-section { padding: 16px; }
  .download-group { flex-direction: column; }
  .download-group .masked-link { width: 100%; justify-content: center; }
  .action-buttons .btn { flex: 1; justify-content: center; }

  .filter-toggle { display: block; }
  .filter-body { display: none; flex-direction: column; margin-top: 12px; gap: 10px; }
  .filter-bar.open .filter-body { display: flex; }
  .filter-select { width: 100%; }

  .section-title { margin-top: 28px; margin-bottom: 14px; }
  .meta-list strong { min-width: 90px; }
  .episode-item { padding: 10px 12px; gap: 12px; }

  .genre-modern-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .genre-modern-card { height: 100px; }
  .genre-name { font-size: var(--text-lg); }
  .genre-arrow { width: 26px; height: 26px; top: 9px; right: 9px; }

  .episode-nav { grid-template-columns: 1fr; }
  .episode-nav-btn.next { text-align: left; }
  .episode-nav-btn.disabled { display: none; }

  .footer-widgets { gap: 24px; margin-bottom: 24px; }
  .site-footer { padding: 36px 0 20px; margin-top: 40px; }
}

@media (max-width: 480px) {
  :root { --gutter: 10px; }
  .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .scroll-row .movie-card { width: 125px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .comment-votes { flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 12px; }
  .error-404 .search-form { flex-direction: column; }
  .meta-list li { flex-direction: column; gap: 4px; }
  .meta-list strong { min-width: auto; }
  .genre-modern-card { height: 88px; }
  .genre-name { font-size: var(--text-base); }
  .genre-arrow { width: 24px; height: 24px; }
  .genre-modern-grid { gap: 6px; }
}

/* ============ TOUCH / MOTION ============ */
@media (hover: none) {
  .movie-card:hover { transform: none; box-shadow: none; border-color: var(--line); }
  .movie-card:hover .poster img { transform: none; }
  .btn-primary:hover, .masked-link:hover:not(.countdown-active), .genre-chip:hover,
  .genre-modern-card:hover { transform: none; }
  .movie-card:active { transform: scale(0.985); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ PRINT ============ */
@media print {
  .site-header, .site-footer, .sidebar, .filter-bar, .download-section,
  .action-buttons, .comments-area, .hero-banner::before { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .movie-card, .widget, .comment-item { border: 1px solid #ccc; break-inside: avoid; }
}
/* Add to style.css */
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}
.suggestion-card {
    /* Inherit standard card styles */
}
.card-not-uploaded {
    opacity: 0.7;
    filter: grayscale(40%);
    transition: all 0.3s ease;
}
.card-not-uploaded:hover {
    opacity: 1;
    filter: grayscale(0%);
}
.card-not-uploaded .card-season {
    color: var(--accent-2); /* Or a muted color */
}

/* ============ REQUEST PAGE ============ */
.request-intro {
  color: var(--ink-2);
  margin: 8px 0 28px;
  max-width: 60ch;
}

/* Notices */
.notice {
  padding: 14px 18px;
  margin-bottom: 20px;
  max-width: 720px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-left-width: 3px;
  border-radius: var(--r);
  font-size: var(--text-sm);
}
.notice strong { display: block; margin-bottom: 2px; color: var(--ink); }
.notice p { color: var(--ink-2); }
.notice a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.notice-success {
  background: rgba(0, 230, 118, 0.08);
  border-color: rgba(0, 230, 118, 0.3);
  border-left-color: #00e676;
}
.notice-error {
  background: var(--accent-2-soft);
  border-color: var(--accent-2);
  border-left-color: var(--accent-2);
}
.small-text { font-size: var(--text-xs); color: var(--ink-3); margin-top: 8px; }

/* Form */
.request-form {
  display: grid;
  gap: 18px;
  max-width: 720px;
  padding: clamp(18px, 3vw, 28px);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.form-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.request-form label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}
.request-form input[type="text"],
.request-form input[type="email"],
.request-form input[type="number"],
.request-form select,
.request-form textarea {
  width: 100%;
  background-color: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 12px 14px;
  color: var(--ink);
  font-size: var(--text-sm);
  transition: border-color var(--t), background-color var(--t);
}
.request-form input::placeholder,
.request-form textarea::placeholder { color: var(--ink-3); }
.request-form input:hover,
.request-form select:hover,
.request-form textarea:hover { border-color: var(--line-strong); }
.request-form input:focus,
.request-form select:focus,
.request-form textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.request-form textarea { min-height: 120px; resize: vertical; }
.request-form select {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form-help { font-size: var(--text-xs); color: var(--ink-3); }
.request-form .btn { justify-self: start; }

/* Request history */
.user-requests-section { margin-top: 48px; max-width: 720px; }
.request-history { display: flex; flex-direction: column; gap: 10px; }
.request-history-item {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--r);
  padding: 16px 18px;
}
.request-history-item.status-pending  { border-left-color: var(--ink-3); }
.request-history-item.status-approved { border-left-color: #00e676; }
.request-history-item.status-added    { border-left-color: var(--accent); }
.request-history-item.status-rejected { border-left-color: var(--accent-2); }

.request-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.request-type.badge,
.request-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.2;
}
.request-type.badge {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}
.request-status { border: 1px solid var(--line-2); color: var(--ink-2); }
.request-status.status-approved {
  color: #00e676;
  background: rgba(0, 230, 118, 0.1);
  border-color: rgba(0, 230, 118, 0.3);
}
.request-status.status-added {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-line);
}
.request-status.status-rejected {
  color: var(--accent-2);
  background: var(--accent-2-soft);
  border-color: var(--accent-2);
}
.request-date { margin-left: auto; font-size: var(--text-xs); color: var(--ink-3); }
.request-title {
  display: inline;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}
.request-year { margin-left: 8px; font-size: var(--text-xs); color: var(--ink-3); }

.admin-reply {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--bg-2);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
}
.admin-reply strong {
  display: block;
  margin-bottom: 4px;
  font-size: var(--text-xs);
  color: var(--accent);
}
.admin-reply p { color: var(--ink-2); }

.no-requests {
  max-width: 720px;
  margin-top: 40px;
  padding: 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: var(--text-sm);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
}
.text-center { text-align: center; }
.user-requests-section .text-center { margin-top: 20px; }

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .request-date { margin-left: 0; width: 100%; }
  .request-form .btn { justify-self: stretch; }
}
/* ============================================================
   HEADER SUB-MENU / DROPDOWN
   ============================================================ */

/* Parent item that has children */
.header-nav .menu-item-has-children {
  position: relative;
}

/* Dropdown indicator caret on parent */
.header-nav .menu-item-has-children > a::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--t);
  flex-shrink: 0;
}
.header-nav .menu-item-has-children:hover > a::after,
.header-nav .menu-item-has-children:focus-within > a::after {
  transform: rotate(-135deg) translateY(-1px);
}

/* Sub-menu panel */
.header-nav .sub-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-hard);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 200;

  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--t), transform var(--t), visibility var(--t);
}

/* Reveal on hover / keyboard focus */
.header-nav .menu-item-has-children:hover > .sub-menu,
.header-nav .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Sub-menu links */
.header-nav .sub-menu a {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r);
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--t), background var(--t);
}
.header-nav .sub-menu a:hover {
  color: var(--ink);
  background: var(--bg-3);
}
.header-nav .sub-menu .current-menu-item > a,
.header-nav .sub-menu a.current-menu-item {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Nested (second-level) sub-menus — fly out to the right */
.header-nav .sub-menu .menu-item-has-children > a::after {
  margin-left: auto;
  transform: rotate(-45deg) translateY(0);
}
.header-nav .sub-menu .sub-menu {
  top: -6px;
  left: calc(100% + 4px);
}
.header-nav .sub-menu .menu-item-has-children:hover > .sub-menu,
.header-nav .sub-menu .menu-item-has-children:focus-within > .sub-menu {
  transform: translateY(0);
}

/* Optional: small header label inside mega-style dropdowns */
.header-nav .sub-menu .menu-heading {
  padding: 8px 12px 4px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* ============ MOBILE: accordion sub-menus ============ */
/* Mobile: details/summary accordion — native, always works */
@media (max-width: 768px) {
  .nav-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--ink-2);
    cursor: pointer;
    list-style: none;
    border-radius: var(--r);
  }
  .nav-details > summary::-webkit-details-marker { 
    display: none; 
  }
  .nav-details > summary::after {
    content: "";
    width: 7px; 
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 160ms ease;
  }
  .nav-details[open] > summary::after {
    transform: rotate(-135deg);
  }
  .nav-details > .sub-menu {
    display: flex !important;
    flex-direction: column;
    padding-left: 12px;
    margin: 0 0 4px;
    border-left: 2px solid var(--line-2);
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .nav-details > .sub-menu a {
    padding: 10px 12px;
    font-size: var(--text-sm);
  }
}

/* Desktop: keep your existing hover dropdown, hide the summary chevron */
@media (min-width: 769px) {
  .nav-details { 
    position: relative; 
  }
  
  .nav-details > summary {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    color: var(--ink-2);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--r-full);
    cursor: pointer;
    list-style: none;
  }
  
  /* Hide default marker and custom chevron on desktop */
  .nav-details > summary::-webkit-details-marker { 
    display: none; 
  }
  .nav-details > summary::after {
    display: none; /* Hide chevron on desktop */
  }
  
  /* Prevent click from toggling [open] state on desktop */
  .nav-details > summary {
    pointer-events: none; /* Disable click on summary */
  }
  .nav-details > summary * {
    pointer-events: auto; /* Re-enable for child elements if needed */
  }
  
  /* Ensure details stays closed on desktop */
  .nav-details[open] {
    /* Keep it open but don't show mobile styles */
  }
  
  .nav-details > .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: var(--bg-2);
    border: 1px solid var(--line-2);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-hard);
    padding: 6px;
    display: none;
    flex-direction: column;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease, visibility 200ms ease;
  }
  
  /* Show on hover */
  .nav-details:hover > .sub-menu {
    display: flex;
    opacity: 1;
    visibility: visible;
  }
}
  .masked-link svg {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }