/*
Theme Name: Micro-Drama
Description: Accessible, content-first child theme for the Micro-Drama database.
Author: Micro-Drama
Template: blocksy
Version: 0.2.2
Requires at least: 6.7
Requires PHP: 8.2
License: GNU General Public License v2 or later
Text Domain: micro-drama
*/

:root {
  /* =========================================================================
   * 1. Color System (Dark-First Default)
   * ========================================================================= */
  --md-bg: #09090b;
  --md-surface: #18181b;
  --md-surface-2: #27272a;
  --md-surface-3: #3f3f46;
  --md-text: #f4f4f5;
  --md-muted: #a1a1aa;
  --md-text-tertiary: #71717a;
  --md-line: #2f2f35;
  --md-line-subtle: rgba(255, 255, 255, 0.08);
  --md-line-strong: #3f3f46;
  --md-brand: #e11d48;
  --md-brand-strong: #be123c;
  --md-brand-subtle: rgba(225, 29, 72, 0.15);
  --md-accent: #38bdf8;
  --md-success: #34d399;
  --md-warning: #facc15;
  --md-error: #f43f5e;

  /* =========================================================================
   * 2. Spacing Scale (8-Point Modular Scale)
   * ========================================================================= */
  --md-space-3xs: 0.125rem;
  --md-space-2xs: 0.25rem;
  --md-space-xs: 0.5rem;
  --md-space-sm: 0.75rem;
  --md-space-md: 1rem;
  --md-space-lg: 1.5rem;
  --md-space-xl: 2rem;
  --md-space-2xl: 3rem;
  --md-space-3xl: 4rem;

  /* =========================================================================
   * 3. Typography Scale & Font Stacks
   * ========================================================================= */
  --md-font-display: "Plus Jakarta Sans", "Outfit", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --md-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --md-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --md-letter-spacing-display: -0.028em;
  --md-letter-spacing-tight: -0.018em;
  --md-text-xs: 0.75rem;
  --md-text-sm: 0.875rem;
  --md-text-base: 1rem;
  --md-text-lg: 1.125rem;
  --md-text-xl: 1.25rem;
  --md-text-2xl: 1.5rem;
  --md-text-3xl: 1.875rem;
  --md-text-4xl: 2.25rem;
  --md-small-text-min: 0.8125rem;
  --md-prose-font-size: clamp(1rem, 0.975rem + 0.125vw, 1.0625rem);
  --md-line-height-tight: 1.25;
  --md-line-height-snug: 1.375;
  --md-line-height-normal: 1.5;
  --md-line-height-relaxed: 1.75;
  --md-prose-line-height: 1.82;
  --md-font-weight-normal: 400;
  --md-font-weight-medium: 500;
  --md-font-weight-semibold: 600;
  --md-font-weight-bold: 700;
  --md-font-weight-extrabold: 800;

  /* =========================================================================
   * 4. Border Radius & Elevation (Shadows)
   * ========================================================================= */
  --md-radius-sm: 0.5rem;
  --md-radius: 0.75rem;
  --md-radius-md: 0.875rem;
  --md-radius-lg: 1.25rem;
  --md-radius-full: 9999px;
  --md-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --md-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --md-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.7);

  /* =========================================================================
   * 5. Aspect Ratios & Layout Bounds
   * ========================================================================= */
  --md-poster-aspect: 9 / 16;
  --md-aspect-poster: 9 / 16;
  --md-aspect-video: 16 / 9;
  --md-aspect-square: 1 / 1;
  --md-content: min(1536px, calc(100% - 4rem));
  --md-container-max: min(1536px, calc(100% - 4rem));
  --md-reading-measure: 72ch;
  --md-card-gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --md-card-min-width: 140px;
  --md-header-height: 64px;
  --md-sticky-cta-height: 72px;

  /* =========================================================================
   * 6. Accessibility & Motion
   * ========================================================================= */
  --md-focus-ring-color: var(--md-accent);
  --md-focus-ring-width: 3px;
  --md-focus-ring-offset: 3px;
  --md-focus-ring: 3px solid var(--md-accent);
  --md-touch-target-min: 44px;
  --md-transition-fast: 150ms ease;
  --md-transition-normal: 250ms ease;
  --md-transition-slow: 350ms ease;

  /* =========================================================================
   * 7. Blocksy Parent Theme Bridge
   * ========================================================================= */
  --theme-palette-color-1: var(--md-brand);
  --theme-palette-color-2: var(--md-brand-strong);
  --theme-palette-color-3: var(--md-surface);
  --theme-palette-color-4: var(--md-surface-2);
  --theme-palette-color-5: var(--md-bg);
  --theme-palette-color-6: var(--md-text);
  --theme-palette-color-7: var(--md-muted);
  --theme-palette-color-8: var(--md-line);
  --theme-text-color: var(--md-text);
  --theme-headings-color: var(--md-text);
  --theme-border-color: var(--md-line);
  --theme-container-width: var(--md-content);
  --theme-content-spacing: var(--md-space-lg);

  /* =========================================================================
   * 8. WordPress Gutenberg Preset Bridge
   * ========================================================================= */
  --wp--preset--color--brand: var(--md-brand);
  --wp--preset--color--brand-strong: var(--md-brand-strong);
  --wp--preset--color--accent: var(--md-accent);
  --wp--preset--color--bg: var(--md-bg);
  --wp--preset--color--surface: var(--md-surface);
  --wp--preset--color--surface-2: var(--md-surface-2);
  --wp--preset--color--text: var(--md-text);
  --wp--preset--color--muted: var(--md-muted);
  --wp--preset--color--line: var(--md-line);
  --wp--preset--color--success: var(--md-success);
  --wp--preset--color--warning: var(--md-warning);
  --wp--preset--color--error: var(--md-error);
}

body {
  background: var(--md-bg);
  color: var(--md-text);
  font-family: var(--md-font-sans);
  margin: 0;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: var(--md-focus-ring);
  outline-offset: var(--md-focus-ring-offset);
}

.md-container {
  margin-inline: auto;
  max-width: var(--md-content);
  width: 100%;
}

.md-main {
  background: var(--md-bg);
  color: var(--md-text);
  min-height: 65vh;
  padding-block: clamp(2rem, 5vw, 4.5rem);
}

.md-section-heading h1,
.md-section-heading h2,
.md-page-heading h1,
.md-card h2,
.md-card h3,
.md-entity-copy h1,
.md-panel h2 {
  color: var(--md-text);
  font-family: var(--md-font-display);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
}

.md-home-hero h1,
.md-home-hero h2,
.md-single-title-row h1,
.md-collection-hero__inner h1,
.md-page-heading h1,
.md-entity-copy h1,
.md-rank-number,
.md-metric-value,
.md-stat-value {
  font-family: var(--md-font-display);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
  font-optical-sizing: auto;
}

.md-poster-image {
  overflow: hidden;
}

.md-rankings-main {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.md-404-main {
  padding-top: clamp(0.5rem, 1.2vw, 1rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.error404 .md-breadcrumbs {
  margin-bottom: 0.45rem;
}

.page-template-rankings .md-breadcrumbs {
  width: var(--md-content);
}

.md-rankings-main .md-page-description {
  margin: 0.75rem 0 0;
}

.md-ranking-notice {
  align-items: center;
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-inline-start: 3px solid var(--md-brand);
  border-radius: var(--md-radius);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
}

.md-ranking-notice > div {
  flex: 1 1 26rem;
}

.md-ranking-notice h2 {
  color: var(--md-text);
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}

.md-ranking-notice p {
  color: var(--md-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.md-ranking-method {
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.md-ranked-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.md-ranked-list > li {
  min-width: 0;
}

.md-section {
  margin-block: clamp(2.5rem, 6vw, 5rem);
}

.md-section:first-child {
  margin-top: 0;
}

.md-section-heading,
.md-page-heading {
  align-items: flex-end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.md-section-heading > div {
  min-width: 0;
}

.md-section-heading h2 {
  align-items: flex-start;
  display: inline-flex;
  gap: 0.65rem;
  letter-spacing: -0.025em;
  margin: 0;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  .md-section-heading:not(.md-sidebar *):not(.md-home-sidebar *):not(.md-single-sidebar *) h2 {
    white-space: nowrap;
  }
}

.md-page-heading h1 {
  align-items: flex-start;
  display: flex;
  gap: 0.65rem;
  letter-spacing: -0.025em;
  margin: 0;
  overflow-wrap: break-word;
}

.md-section-heading h2::before,
.md-page-heading h1::before {
  align-self: flex-start;
  background: linear-gradient(180deg, var(--md-brand) 0%, #fb7185 100%);
  border-radius: 999px;
  content: '';
  display: inline-block;
  flex: 0 0 4px;
  flex-shrink: 0;
  height: 1.05em;
  margin-top: 0.15em;
  width: 4px;
}

.md-eyebrow {
  color: var(--md-brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}

.md-muted,
.md-card-meta,
.md-page-description {
  color: var(--md-muted);
}

.md-page-description {
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 65ch;
}

.md-breadcrumbs {
  width: min(1180px, calc(100% - 2rem));
  margin: 1.25rem auto 0;
  color: var(--md-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.md-breadcrumbs ol {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.md-breadcrumbs li {
  align-items: center;
  display: inline-flex;
}

.md-breadcrumbs a {
  color: var(--md-muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.md-breadcrumbs a:hover {
  color: var(--md-text);
}

.md-breadcrumbs [aria-current="page"] {
  color: var(--md-text);
  font-weight: 600;
}

.md-breadcrumbs li + li::before {
  content: "›";
  color: var(--md-line);
  font-size: 1rem;
  line-height: 1;
  margin-right: 0.45rem;
}

.md-button {
  align-items: center;
  background: var(--md-brand);
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 750;
  gap: 0.45rem;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.65rem 1.15rem;
  text-decoration: none;
}

.md-button:hover {
  background: var(--md-brand-strong);
  color: #fff;
}

.md-button--ghost {
  background: transparent;
  border-color: var(--md-line);
  color: var(--md-text);
}

.md-button--ghost:hover {
  background: var(--md-surface-2);
}

.md-grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
}

.md-grid--people,
.md-grid--platforms {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.md-rating {
  align-items: center;
  color: var(--md-warning);
  display: inline-flex;
  font-weight: 800;
  gap: 0.25rem;
}

.md-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-block: 0.75rem;
}

.md-taxonomy-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.md-taxonomy-groups h3 {
  margin-top: 0;
}

.md-tag {
  background: var(--md-surface-2);
  border: 1px solid var(--md-line);
  border-radius: 999px;
  color: var(--md-muted);
  display: inline-flex;
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  text-decoration: none;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.md-tag:hover {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.88) 0%, rgba(190, 18, 60, 0.95) 100%);
  border-color: #fb7185;
  color: #fff;
  box-shadow: 0 3px 12px rgba(225, 29, 72, 0.35);
  transform: translateY(-1px);
}

.md-filter {
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  margin-bottom: 2rem;
  padding: 1rem;
}

.md-filter label {
  color: var(--md-muted);
  display: grid;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.35rem;
  text-transform: uppercase;
}

.md-filter input,
.md-filter select,
.md-search-form input {
  background: var(--md-bg);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius-sm);
  color: var(--md-text);
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  text-transform: none;
}

.md-filter-actions {
  align-items: end;
  display: flex;
  gap: 0.5rem;
}

.md-filter-actions .md-button {
  border: 0;
  cursor: pointer;
  min-height: 2.75rem;
}

.md-empty {
  background: var(--md-surface);
  border: 1px dashed var(--md-line);
  border-radius: var(--md-radius);
  padding: clamp(2rem, 8vw, 5rem);
  text-align: center;
}

.md-404-hero {
  background: radial-gradient(ellipse at 50% 0%, rgba(225, 29, 72, 0.09) 0%, var(--md-surface) 75%);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius-lg, 1.25rem);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: clamp(0.95rem, 1.5vw, 1.35rem) clamp(1rem, 2vw, 1.85rem);
  text-align: center;
}

.md-404-hero .md-eyebrow {
  align-items: center;
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.28);
  border-radius: 999px;
  color: #fb7185;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 0.3rem;
  padding: 0.2rem 0.65rem;
  text-transform: uppercase;
}

.md-404-hero h1 {
  color: #ffffff;
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin: 0 0 0.25rem;
}

html[data-md-theme="light"] .md-404-hero h1 {
  color: var(--md-text);
}

.md-404-hero .md-muted {
  color: var(--md-muted);
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0 auto 0.85rem;
  max-width: 500px;
}

.md-404-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin: 0 auto;
  max-width: 600px;
}

.md-404-search-form {
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--md-line);
  border-radius: 999px;
  display: flex;
  flex: 1 1 300px;
  gap: 0.35rem;
  margin: 0;
  max-width: 420px;
  padding: 0.22rem 0.25rem 0.22rem 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.md-404-search-form:focus-within {
  border-color: var(--md-brand);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18);
}

html[data-md-theme="light"] .md-404-search-form {
  background: rgba(255, 255, 255, 0.88);
}

.md-404-search-input-wrap {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 0.45rem;
  min-width: 0;
}

.md-404-search-icon {
  color: var(--md-muted);
  fill: none;
  flex-shrink: 0;
  height: 0.95rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 0.95rem;
}

.md-404-search-form input {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--md-text);
  font-size: 0.84rem;
  height: 2.15rem;
  min-height: 0;
  outline: none;
  padding: 0;
  width: 100%;
}

.md-404-search-btn {
  background: linear-gradient(135deg, var(--md-brand) 0%, #fb7185 100%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
  min-height: 2.15rem;
  padding: 0.35rem 0.9rem;
  white-space: nowrap;
}

.md-404-home-btn {
  align-items: center;
  border: 1px solid var(--md-line);
  border-radius: 999px;
  color: var(--md-text);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  gap: 0.4rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.95rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.md-404-home-btn:hover {
  background: var(--md-surface-2);
  border-color: var(--md-line-strong, #3f3f46);
  color: #fff;
}

.md-404-trending {
  margin-top: clamp(0.9rem, 1.5vw, 1.35rem);
}

.md-404-trending .md-section-heading {
  margin-bottom: 0.7rem;
}


.md-pagination {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.md-pagination .nav-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.md-pagination .page-numbers {
  align-items: center;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 8px;
  color: #d4d4d8;
  display: inline-flex;
  font-size: 0.9375rem;
  font-weight: 600;
  min-height: 44px;
  min-width: 44px;
  height: auto;
  justify-content: center;
  padding: 0 0.5rem;
  text-decoration: none;
  transition: all 180ms ease;
  user-select: none;
}

.md-pagination .page-numbers:hover {
  background: #27272a;
  border-color: #3f3f46;
  color: #ffffff;
  transform: translateY(-1px);
}

.md-pagination .page-numbers:active {
  transform: translateY(0);
}

.md-pagination .page-numbers.current,
.md-pagination .page-numbers[aria-current="page"] {
  background: #f97316;
  border-color: #f97316;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.45);
  color: #ffffff;
  cursor: default;
  font-weight: 700;
  transform: none;
}

.md-pagination .page-numbers.dots {
  background: transparent;
  border-color: transparent;
  color: #71717a;
  cursor: default;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  min-width: 1.5rem;
  padding: 0 0.25rem;
  transform: none;
}

.md-pagination .page-numbers.prev,
.md-pagination .page-numbers.next {
  color: #a1a1aa;
}

.md-pagination .page-numbers.prev svg,
.md-pagination .page-numbers.next svg {
  display: block;
  height: 16px;
  width: 16px;
}

.md-pagination .page-numbers.is-disabled {
  background: #18181b;
  border-color: transparent;
  cursor: not-allowed;
  opacity: 0.35;
  pointer-events: none;
  transform: none;
}

.md-entity-hero {
  display: grid;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
}

.md-entity-poster {
  aspect-ratio: var(--md-poster-aspect, 9 / 16);
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius);
  box-shadow: var(--md-shadow);
  overflow: hidden;
}

.md-entity-poster:has(img.attachment-md-avatar),
.md-entity-poster:has(img.md-avatar-image),
.md-entity-poster--avatar {
  aspect-ratio: 1;
}

.md-entity-poster img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.md-entity-copy h1 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0 0 0.8rem;
}

.md-entity-copy .md-original-title {
  color: var(--md-muted);
  font-size: 1.1rem;
}

.md-facts {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  margin-block: 1.5rem;
}

.md-fact {
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius-sm);
  padding: 0.8rem;
}

.md-fact dt {
  color: var(--md-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.md-fact dd {
  font-size: 1rem;
  font-weight: 750;
  margin: 0.3rem 0 0;
}

.md-content-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.65fr);
}

.md-single-primary {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.md-panel {
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
  padding: clamp(1.1rem, 3vw, 1.75rem);
}

.md-panel h2 {
  margin-top: 0;
}

.md-offer-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.md-offer-item {
  align-items: center;
  background: var(--md-surface-2);
  border: 1px solid transparent;
  border-radius: var(--md-radius-sm);
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  padding: 0.8rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.md-offer-item[hidden] {
  display: none !important;
}

.md-offer-item--primary {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.45);
}

.md-offer-item .md-button {
  background: var(--md-surface);
  border: 1px solid var(--md-line-strong);
  box-shadow: none;
  color: var(--md-text);
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 2.2rem;
  padding: 0.35rem 0.85rem;
}

.md-offer-item .md-button:hover,
.md-offer-item .md-button:focus-visible {
  background: var(--md-surface-3);
  border-color: var(--md-text-tertiary);
  color: var(--md-text);
}

.md-offer-item--primary .md-button--primary {
  background: rgba(225, 29, 72, 0.14);
  border-color: rgba(225, 29, 72, 0.5);
  color: var(--md-text);
}

.md-offer-item--primary .md-button--primary:hover,
.md-offer-item--primary .md-button--primary:focus-visible {
  background: var(--md-brand);
  border-color: var(--md-brand);
  color: #fff;
}

.md-offers-toggle {
  align-items: center;
  background: transparent;
  border: 1px dashed var(--md-line-strong);
  border-radius: var(--md-radius-sm);
  color: var(--md-muted);
  cursor: pointer;
  display: flex;
  font-size: 0.8rem;
  font-weight: 700;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.65rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.85rem;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  width: 100%;
}

.md-offers-toggle:hover,
.md-offers-toggle:focus-visible {
  background: var(--md-surface-2);
  border-color: var(--md-text-tertiary);
  color: var(--md-text);
}

.md-offers-toggle svg {
  fill: none;
  height: 1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 0.2s ease;
  width: 1rem;
}

.md-offers-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.md-offer-badge {
  align-items: center;
  background: var(--md-brand, #e11d48);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  line-height: 1;
  margin-left: 0.4rem;
  padding: 0.2rem 0.5rem;
  text-transform: uppercase;
  vertical-align: middle;
}

.md-offer-notice {
  border-radius: var(--md-radius-sm);
  font-size: 0.84rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.85rem;
}

.md-offer-notice--unavailable {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fca5a5;
}

.md-offer-copy {
  display: grid;
  gap: 0.15rem;
}

.md-offer-copy small {
  color: var(--md-muted);
}

.md-offer-status {
  color: var(--md-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.md-offer-status--unavailable {
  color: #fca5a5;
}

.md-prose {
  color: #d8dceb;
  font-size: 1.05rem;
  line-height: 1.85;
}

.md-prose > :first-child {
  margin-top: 0;
}

.md-prose a {
  color: var(--md-accent);
}

.md-reading-column {
  inline-size: 100%;
  margin-inline: auto;
  max-inline-size: var(--md-reading-measure);
}

.md-prose--reading {
  font-size: var(--md-prose-font-size);
  line-height: var(--md-prose-line-height);
}

.md-prose--reading .md-reading-column > :first-child {
  margin-block-start: 0;
}

.md-prose--reading .md-reading-column > :last-child {
  margin-block-end: 0;
}

.md-prose--reading :is(h1, h2, h3, h4, h5, h6) {
  color: var(--md-text);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-block: 1.8em 0.7em;
  overflow-wrap: anywhere;
  scroll-margin-top: 6rem;
  text-wrap: balance;
}

.md-prose--reading h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
}

.md-prose--reading h2 {
  border-block-end: 1px solid var(--md-line);
  font-size: clamp(1.45rem, 3vw, 1.75rem);
  padding-block-end: 0.42em;
}

.md-prose--reading h3 {
  border-inline-start: 3px solid var(--md-brand);
  font-size: clamp(1.2rem, 2.25vw, 1.4rem);
  padding-inline-start: 0.7em;
}

.md-prose--reading h4 {
  font-size: 1.1rem;
}

.md-prose--reading :is(h5, h6) {
  font-size: 1rem;
}

.md-prose--reading p {
  margin-block: 0 1.2em;
  overflow-wrap: break-word;
  text-align: start;
}

.md-prose--reading :is(ul, ol) {
  margin-block: 0 1.25em;
  padding-inline-start: 1.6em;
}

.md-prose--reading li {
  padding-inline-start: 0.2em;
}

.md-prose--reading li + li {
  margin-block-start: 0.45em;
}

.md-prose--reading blockquote {
  background: rgb(225 29 72 / 8%);
  border-inline-start: 3px solid var(--md-brand);
  border-radius: var(--md-radius-sm);
  color: var(--md-text);
  margin: 0 0 1.35em;
  padding: 1em 1.15em;
}

.md-prose--reading blockquote > :last-child {
  margin-block-end: 0;
}

.md-prose--reading :is(figure, .wp-block-image, .wp-block-embed, .wp-block-video) {
  margin-block: 0 1.35em;
}

.md-prose--reading :is(img, video, iframe, embed) {
  block-size: auto;
  max-inline-size: 100%;
}

.md-prose--reading :is(figcaption, .wp-element-caption, small) {
  color: var(--md-muted);
  font-size: var(--md-small-text-min);
  line-height: 1.55;
}

.md-prose--reading :is(figcaption, .wp-element-caption) {
  margin-block-start: 0.6em;
  text-align: center;
}

.md-prose--reading hr {
  border: 0;
  border-block-start: 1px solid var(--md-line);
  margin-block: 2em;
}

.md-prose--reading :not(pre) > :is(code, kbd, samp) {
  background: var(--md-surface-2);
  border: 1px solid var(--md-line);
  border-radius: 0.3rem;
  color: var(--md-text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  padding: 0.12em 0.35em;
}

.md-prose--reading pre {
  background: #050506;
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius-sm);
  color: #e4e4e7;
  direction: ltr;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875rem;
  line-height: 1.65;
  margin-block: 0 1.35em;
  overflow-x: auto;
  padding: 1rem;
  tab-size: 2;
  text-align: left;
}

.md-prose--reading pre code {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0;
}

.md-prose--reading :is(.wp-block-table, table) {
  margin-block: 0 1.35em;
}

.md-prose--reading .wp-block-table {
  overflow-x: auto;
}

.md-prose--reading table {
  border-collapse: collapse;
  font-size: 0.9375rem;
  inline-size: 100%;
}

.md-prose--reading :is(th, td) {
  border: 1px solid var(--md-line);
  padding: 0.65em 0.75em;
  text-align: start;
  vertical-align: top;
}

.md-prose--reading th {
  background: var(--md-surface-2);
  color: var(--md-text);
  font-weight: 800;
}

.md-prose--reading a {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
}

.md-prose--reading :is(h1, h2, h3, h4, h5, h6) a {
  color: inherit;
  text-decoration: none;
}

.md-prose--reading:lang(zh),
.md-prose--reading:lang(ja),
.md-prose--reading:lang(ko) {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.9;
}

.md-prose--reading:lang(zh) p {
  text-align: justify;
  text-justify: inter-ideograph;
}

.md-prose--reading:lang(zh) :is(h1, h2, h3, h4, h5, h6),
.md-prose--reading:lang(ja) :is(h1, h2, h3, h4, h5, h6),
.md-prose--reading:lang(ko) :is(h1, h2, h3, h4, h5, h6),
.md-prose--reading:lang(ar) :is(h1, h2, h3, h4, h5, h6) {
  letter-spacing: 0;
}

.md-prose--reading:lang(ar) {
  font-family: "Noto Sans Arabic", "Geeza Pro", Tahoma, "Segoe UI", sans-serif;
  line-height: 1.95;
}

.md-prose--reading:lang(ar) :is(h1, h2, h3, h4, h5, h6) {
  line-height: 1.42;
}

.md-prose--reading:lang(th) {
  font-family: Thonburi, Tahoma, "Leelawadee UI", sans-serif;
  line-height: 1.95;
}

@media (max-width: 767px) {
  .md-prose--reading {
    font-size: 1rem;
    line-height: 1.78;
  }

  .md-prose--reading :is(h1, h2, h3, h4, h5, h6) {
    text-wrap: wrap;
  }

  .md-prose--reading pre {
    margin-inline: -0.25rem;
    padding: 0.85rem;
  }
}

.md-spoiler {
  background: rgb(255 200 87 / 12%);
  border: 1px solid rgb(255 200 87 / 45%);
  border-radius: var(--md-radius-sm);
  color: var(--md-warning);
  font-weight: 700;
  padding: 0.75rem 1rem;
}

.md-search-page-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.md-search-close-btn {
  align-items: center;
  background: var(--md-surface-2);
  border: 1px solid var(--md-line);
  border-radius: 999px;
  color: var(--md-muted);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.md-search-close-btn svg {
  fill: none;
  height: 1.1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 1.1rem;
}

.md-search-close-btn:hover {
  background: var(--md-surface);
  border-color: var(--md-brand);
  color: var(--md-text);
  transform: translateY(-1px);
}

.md-search-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-block: 1.5rem 2.5rem;
}

.md-search-input-wrap {
  flex: 1;
  min-width: 220px;
  position: relative;
}

.md-search-input-icon {
  color: var(--md-muted);
  fill: none;
  height: 1.1rem;
  left: 0.9rem;
  pointer-events: none;
  position: absolute;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
}

.md-search-form input {
  background: var(--md-surface);
  border: 1.5px solid var(--md-line);
  border-radius: var(--md-radius-sm);
  color: var(--md-text);
  font-size: 0.95rem;
  min-height: 2.85rem;
  padding: 0.6rem 0.9rem 0.6rem 2.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: 100%;
}

.md-search-form input:focus {
  background: var(--md-surface);
  border-color: var(--md-brand);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18);
  outline: 0;
}

.md-search-cancel-btn {
  display: inline-flex;
}

.md-footer-note {
  color: var(--md-muted);
  font-size: 0.85rem;
  margin-top: 2rem;
}

@media (max-width: 820px) {
  .md-entity-hero,
  .md-content-grid,
  .md-taxonomy-groups {
    grid-template-columns: 1fr;
  }

  .md-entity-poster {
    max-width: 240px;
  }
}

@media (max-width: 520px) {
  .md-section-heading,
  .md-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .md-search-page-heading {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
  }

  .md-search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .md-search-form .md-button,
  .md-search-form .md-search-cancel-btn {
    justify-content: center;
    min-height: 2.75rem;
    width: 100%;
  }

  .md-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Responsive application shell */
.md-site-shell {
  background: var(--md-bg);
  min-height: 100vh;
}

.md-site-header {
  background: rgb(9 9 11 / 85%);
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.md-site-header__inner {
  align-items: center;
  display: flex;
  height: 71px;
  justify-content: space-between;
  margin-inline: auto;
  max-width: 1600px;
  padding-inline: 2rem;
}

.md-site-header__start,
.md-site-header__end,
.md-desktop-nav {
  align-items: center;
  display: flex;
}

.md-site-header__start {
  gap: 2rem;
}

.md-site-header__end {
  gap: 0.75rem;
}

.md-brand {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  line-height: 1;
  text-decoration: none;
}

.md-brand__logo {
  aspect-ratio: 2172 / 724;
  background: url("assets/images/microdramabase-logo-on-dark.png") center / contain no-repeat;
  display: block;
  width: 10.5rem;
}

.md-desktop-nav {
  align-items: center;
  display: flex;
  gap: 0.35rem;
}

.md-desktop-nav a {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9999px;
  color: #a1a1aa;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.45rem 0.85rem;
  position: relative;
  text-decoration: none;
  transition: background 200ms cubic-bezier(0.4, 0, 0.2, 1),
              border-color 200ms cubic-bezier(0.4, 0, 0.2, 1),
              color 200ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.md-desktop-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.md-desktop-nav a:active {
  transform: translateY(0);
}

.md-desktop-nav a[aria-current="page"] {
  background: rgba(225, 29, 72, 0.16);
  border-color: rgba(225, 29, 72, 0.35);
  box-shadow: 0 0 16px rgba(225, 29, 72, 0.15);
  color: #fff;
}

.md-desktop-nav a[aria-current="page"]:hover {
  background: rgba(225, 29, 72, 0.22);
  border-color: rgba(225, 29, 72, 0.5);
  box-shadow: 0 4px 18px rgba(225, 29, 72, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.md-header-search {
  position: relative;
}

.md-header-search svg,
.md-mobile-search svg {
  fill: none;
  height: 1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 1rem;
}

.md-header-search svg {
  color: #a1a1aa;
  left: 0.9rem;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.md-header-search input {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 999px;
  color: #fff;
  font-size: 0.875rem;
  height: 44px;
  padding: 0 1rem 0 2.5rem;
  transition: border-color 160ms ease, background 160ms ease;
  width: clamp(220px, 20vw, 320px);
}

.md-header-search input:focus {
  background: #27272a;
  border-color: #52525b;
  outline: 0;
}

.md-account-button {
  align-items: center;
  background: #e11d48;
  border-radius: 999px;
  box-shadow: 0 0 18px rgb(225 29 72 / 35%);
  color: #fff;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  min-width: 92px;
  padding: 0 0.9rem;
  text-decoration: none;
  transition: background 160ms ease, box-shadow 200ms ease, transform 160ms ease;
  white-space: nowrap;
  width: 92px;
}

.md-submit-button {
  align-items: center;
  background: transparent;
  border: 1px solid #3f3f46;
  border-radius: 999px;
  color: #f4f4f5;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 750;
  height: 44px;
  justify-content: center;
  min-width: 76px;
  padding: 0 0.9rem;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.md-submit-button:hover {
  background: #27272a;
  border-color: #71717a;
  color: #fff;
  transform: translateY(-1px);
}

.md-account-button:hover {
  background: #f43f5e;
  box-shadow: 0 0 24px rgb(244 63 94 / 48%);
  color: #fff;
  transform: translateY(-1px);
}

.md-mobile-search {
  color: #fff;
  display: none;
  padding: 0.5rem;
}

.md-icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #a1a1aa;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  padding: 0;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
  width: 40px;
}

.md-icon-button:hover,
.md-icon-button[aria-expanded="true"] {
  background: #18181b;
  border-color: #3f3f46;
  color: #fff;
}

.md-icon-button svg {
  fill: none;
  height: 1.15rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1.15rem;
}

.md-language-switcher {
  position: relative;
}

.md-language-button {
  gap: 0.3rem;
  padding-inline: 0.55rem;
  width: auto;
}

.md-language-button > span {
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.md-language-menu {
  background: rgb(24 24 27 / 98%);
  border: 1px solid #3f3f46;
  border-radius: 0.75rem;
  box-shadow: 0 18px 45px rgb(0 0 0 / 48%);
  display: grid;
  gap: 0.25rem;
  max-height: min(70vh, 31rem);
  min-width: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.4rem;
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 0.65rem);
  z-index: 140;
}

.md-language-menu[hidden] {
  display: none;
}

.md-language-menu :is(button, a) {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0.5rem;
  color: #d4d4d8;
  cursor: pointer;
  display: flex;
  font: inherit;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  text-align: start;
  text-decoration: none;
  width: 100%;
}

.md-language-menu :is(button, a):hover,
.md-language-menu :is(button, a):focus-visible,
.md-language-menu :is(button, a)[aria-checked="true"] {
  background: #27272a;
  color: #fff;
}

.md-language-menu small {
  color: #a1a1aa;
  font-size: 0.65rem;
  font-weight: 800;
}

.md-theme-icon--moon {
  display: none;
}

html[data-md-theme="light"] .md-theme-icon--sun {
  display: none;
}

html[data-md-theme="light"] .md-theme-icon--moon {
  display: block;
}

/* Shared artwork and cards */
.md-poster-image,
.md-card-media img,
.md-entity-poster img,
.md-rank-poster img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.md-demo-art {
  filter: brightness(1.08) saturate(1.08);
}

.md-card {
  background: transparent;
  border: 0;
  border-radius: var(--md-radius);
  box-shadow: none;
  min-width: 0;
  overflow: visible;
  padding: 0;
  position: relative;
}

.md-drama-card {
  --md-card-preview-depth: 0px;
  --md-card-preview-x: 0px;
  --md-card-preview-y: -8px;
  --md-card-preview-scale: 1.055;
  --md-card-ease: cubic-bezier(0.33, 0, 0.2, 1);
  --md-card-preview-surface: 18 18 20;
  --md-card-preview-surface-opacity: 45%;
  --md-card-preview-filter: blur(32px) saturate(1.4);
  --md-card-preview-border: rgb(255 255 255 / 10%);
  --md-card-preview-tint-opacity: 0.45;
  --md-card-preview-scrim-opacity: 20%;
  --md-card-preview-end-opacity: 78%;
  --md-card-preview-title: #f4f4f5;
  --md-card-preview-text: #e4e4e7;
  --md-card-preview-muted: #d4d4d8;

  backface-visibility: hidden;
  border-radius: var(--md-radius);
  isolation: isolate;
  transform-origin: center top;
  transition: transform 620ms var(--md-card-ease);
}

html[data-md-theme="light"] .md-drama-card {
  --md-card-preview-surface: 17 17 19;
  --md-card-preview-surface-opacity: 100%;
  --md-card-preview-filter: none;
  --md-card-preview-border: rgb(255 255 255 / 15%);
  --md-card-preview-tint-opacity: 0.28;
  --md-card-preview-scrim-opacity: 65%;
  --md-card-preview-end-opacity: 100%;
  --md-card-preview-title: #fff;
  --md-card-preview-text: #d4d4d8;
  --md-card-preview-muted: #d4d4d8;
}

.md-card-preview-backdrop {
  backdrop-filter: var(--md-card-preview-filter);
  -webkit-backdrop-filter: var(--md-card-preview-filter);
  background: rgb(var(--md-card-preview-surface) / var(--md-card-preview-surface-opacity));
  border: 1px solid var(--md-card-preview-border);
  border-radius: 1.25rem;
  box-shadow: 0 28px 65px -12px rgb(0 0 0 / 85%), inset 0 1px 0 0 rgb(255 255 255 / 14%);
  inset: -0.65rem -0.65rem calc(-1 * var(--md-card-preview-depth) - 0.25rem);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  transition: opacity 420ms ease;
  z-index: -1;
}

.md-card-preview-backdrop img {
  filter: blur(36px);
  height: 100%;
  object-fit: cover;
  opacity: var(--md-card-preview-tint-opacity);
  transform: scale(1.1);
  width: 100%;
}

.md-card-preview-backdrop::after {
  background: linear-gradient(180deg, transparent 15%, rgb(var(--md-card-preview-surface) / var(--md-card-preview-scrim-opacity)) 65%, rgb(var(--md-card-preview-surface) / var(--md-card-preview-end-opacity)));
  content: "";
  inset: 0;
  position: absolute;
}

.md-card-link {
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  outline: 0;
  text-decoration: none;
}

.md-card-media {
  aspect-ratio: var(--md-poster-aspect, 9 / 16);
  background: #27272a;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 0.75rem;
  box-shadow: 0 10px 24px -4px rgb(0 0 0 / 45%), inset 0 1px 0 0 rgb(255 255 255 / 12%);
  flex: 0 0 auto;
  overflow: hidden;
  position: relative;
  transition: border-color 460ms ease, border-radius 540ms var(--md-card-ease), box-shadow 540ms ease;
}

.md-card-media:has(img.attachment-md-avatar),
.md-card-media:has(img.md-avatar-image) {
  aspect-ratio: 1;
}

.md-card-media::after {
  background: linear-gradient(180deg, transparent 52%, rgb(9 9 11 / 8%) 70%, rgb(9 9 11 / 72%) 100%);
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 460ms ease;
  z-index: 2;
}

.md-card-media img {
  backface-visibility: hidden;
  opacity: 0.92;
  transition: filter 520ms ease, opacity 460ms ease, transform 820ms var(--md-card-ease);
}

/* Keep the complete poster and its lettering inside a uniform card frame. */
.md-drama-card .md-card-media img {
  object-fit: contain;
  object-position: center;
}

.md-card-badge,
.md-card-rating {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 0.35rem;
  font-size: var(--md-text-xs);
  font-weight: 900;
  line-height: 1.4;
  padding: 0.18rem 0.45rem;
  position: absolute;
  top: 0.5rem;
  z-index: 3;
}

.md-card-badge {
  background: rgb(225 29 72 / 92%);
  color: #fff;
  left: 0.5rem;
  text-transform: uppercase;
}

.md-card-badge--new {
  background: rgb(37 99 235 / 92%);
}

.md-card-rating {
  background: rgb(0 0 0 / 72%);
  border: 1px solid rgb(255 255 255 / 12%);
  color: #eab308;
  bottom: 0.5rem;
  left: 0.5rem;
  top: auto;
}

.md-card-play-indicator {
  align-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgb(225 29 72 / 90%);
  border: 1px solid rgb(255 255 255 / 26%);
  border-radius: 50%;
  box-shadow: 0 10px 26px rgb(0 0 0 / 55%), 0 0 20px rgb(225 29 72 / 36%);
  color: #fff;
  display: flex;
  height: 2.75rem;
  justify-content: center;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 280ms ease, transform 360ms var(--md-card-ease);
  width: 2.75rem;
  z-index: 3;
}

.md-card-play-indicator svg {
  fill: currentColor;
  height: 1.15rem;
  margin-left: 2px;
  width: 1.15rem;
}

.md-card-reveal {
  left: 0;
  opacity: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.6rem 0.15rem 0.65rem;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 100%;
  transform: translateY(0.65rem);
  transition: opacity 360ms ease, transform 560ms var(--md-card-ease), visibility 0s linear 560ms;
  visibility: hidden;
  z-index: 4;
}

.md-card-excerpt {
  color: var(--md-card-preview-text);
  display: -webkit-box;
  font-size: var(--md-text-xs);
  font-weight: 550;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.md-card-actions {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
  margin-top: 0.65rem;
}

.md-card-watch-link {
  align-items: center;
  background: var(--md-brand);
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: #fff;
  display: flex;
  font-size: 0.75rem;
  font-weight: 750;
  gap: 0.5rem;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  text-decoration: none;
  transition: background-color 160ms ease;
  width: 100%;
}

.md-card-watch-link:hover {
  background: var(--md-brand-strong);
  color: #fff;
}

.md-card-reveal a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -3px;
}

.md-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.75rem 0 0;
  position: relative;
  z-index: 3;
}

.md-card-body h3 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 160ms ease;
  white-space: nowrap;
}

/* Show the complete title both before and during previews so rows stay stable. */
.md-drama-card .md-card-body h3 {
  display: block;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.md-card:hover .md-card-body h3 {
  color: #fb7185;
}

.md-card-meta {
  align-items: center;
  color: #a1a1aa;
  display: flex;
  font-size: var(--md-text-xs);
  gap: 0.5rem;
  justify-content: space-between;
  margin-top: 0.35rem;
  min-width: 0;
}

.md-card-meta > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.md-card-episodes {
  background: rgb(9 9 11 / 82%);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 0.25rem;
  bottom: 0.5rem;
  color: #f4f4f5;
  font-size: 0.7rem;
  inset-inline-end: 0.5rem;
  line-height: 1.4;
  padding: 0.15rem 0.35rem;
  position: absolute;
  z-index: 2;
}

.md-drama-card .md-card-meta {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.2rem;
  justify-content: flex-start;
  margin-top: auto;
  padding-top: 0.35rem;
}

.md-card-platform,
.md-card-genre,
.md-card-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.md-drama-card .md-card-meta > span {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.md-card-meta-divider {
  flex: 0 0 auto;
  opacity: 0.65;
}

.md-card-link:focus-visible .md-card-media {
  outline: 2px solid #fb7185;
  outline-offset: 3px;
}

/* Poster feedback also works when the viewport cannot fit a full preview. */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .md-drama-card:where(:hover) {
    transform: translateY(-6px) scale(1.025);
    z-index: 2;
  }

  .md-drama-card:where(:hover) .md-card-media {
    border-color: rgb(255 255 255 / 22%);
    box-shadow: 0 18px 38px -16px rgb(0 0 0 / 88%);
  }

  .md-drama-card:where(:hover) .md-card-media::after,
  .md-drama-card:where(:hover) .md-card-play-indicator {
    opacity: 1;
  }

  .md-drama-card:where(:hover) .md-card-play-indicator {
    transform: translate(-50%, -50%) scale(1);
  }

  .md-drama-card:where(:hover) .md-card-media img {
    filter: saturate(1.08) contrast(1.04);
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 768px) {
  .md-home-body {
    padding-top: 2rem;
  }

  .md-drama-card.is-preview-open {
    transform: translate3d(var(--md-card-preview-x), var(--md-card-preview-y), 0) scale(var(--md-card-preview-scale));
    /* Keep preview actions above fixed utilities and TranslatePress's floating selector. */
    z-index: 100000;
  }

  .md-drama-card.is-preview-closing {
    z-index: 99998;
  }

  .md-drama-card.is-preview-top-clipped {
    clip-path: inset(var(--md-card-preview-clip-top) -100px calc(-1 * var(--md-card-preview-depth) - 100px));
  }

  .is-preview-open .md-card-preview-backdrop,
  .is-preview-open .md-card-media::after,
  .is-preview-open .md-card-play-indicator {
    opacity: 1;
  }

  .is-preview-open .md-card-play-indicator {
    transform: translate(-50%, -50%) scale(1);
  }

  .is-preview-open .md-card-media {
    border-color: rgb(255 255 255 / 22%);
    box-shadow: 0 18px 38px -16px rgb(0 0 0 / 88%);
  }

  .is-preview-open .md-card-media img {
    filter: saturate(1.08) contrast(1.04);
    opacity: 1;
    transform: none;
  }

  .md-drama-card.is-preview-open .md-card-body h3,
  html[data-md-theme="light"] .md-drama-card.is-preview-open .md-card-body h3 {
    color: var(--md-card-preview-title) !important;
  }

  .md-drama-card.is-preview-open .md-card-meta,
  html[data-md-theme="light"] .md-drama-card.is-preview-open .md-card-meta {
    color: var(--md-card-preview-muted) !important;
  }

  .is-preview-open .md-card-reveal {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 140ms, 100ms, 0s;
    visibility: visible;
  }

  .is-preview-overlaid .md-card-link {
    /* Reveal the poster-tinted backdrop where the synopsis overlaps the card. */
    mask-image: linear-gradient(#000 calc(var(--md-card-reveal-top) - 1rem), transparent var(--md-card-reveal-top));
  }

  .is-preview-overlaid .md-card-reveal {
    padding-inline: 0.75rem;
    top: var(--md-card-reveal-top);
  }
}

/* Homepage */
.md-home-main,
.md-single-main {
  padding-block: 0;
}

.md-home-hero {
  background: #09090b;
  border-radius: 1rem;
  height: 520px;
  margin: 1.5rem auto 0;
  max-width: 1536px;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  width: calc(100% - 4rem);
}

.md-home-hero__slide {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 720ms ease;
  visibility: hidden;
  z-index: 0;
}

.md-home-hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  z-index: 1;
}

.md-home-hero__backdrop,
.md-single-hero__backdrop {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.md-home-hero__backdrop {
  opacity: 0.22;
}

.md-home-hero__shade {
  background:
    linear-gradient(90deg, #09090b 4%, rgb(9 9 11 / 94%) 38%, rgb(9 9 11 / 24%) 78%, transparent),
  linear-gradient(0deg, #09090b 0%, transparent 48%);
  inset: 0;
  position: absolute;
}

.md-home-hero__slide-link {
  cursor: pointer;
  display: block;
  inset: 0;
  position: absolute;
  z-index: 1;
}

.md-home-hero__content {
  align-items: center;
  display: flex;
  gap: clamp(2rem, 3vw, 3rem);
  height: 100%;
  padding-inline: clamp(2.5rem, 5vw, 4rem);
  pointer-events: none;
  position: relative;
  z-index: 2;
}

.md-home-hero__poster,
.md-home-hero__title-link,
.md-home-hero__actions,
.md-hero-chip {
  pointer-events: auto;
}

.md-home-hero__control {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgb(0 0 0 / 42%);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 48px;
  justify-content: center;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(0.92);
  transition: background 180ms ease, opacity 220ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  width: 48px;
  z-index: 8;
}

.md-home-hero__control:hover {
  background: rgb(0 0 0 / 72%);
}

.md-home-hero__control svg {
  fill: none;
  height: 1.45rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 1.45rem;
}

.md-home-hero__control--previous {
  left: 1rem;
}

.md-home-hero__control--next {
  right: 1rem;
}

.md-home-hero__dots {
  align-items: center;
  background: rgb(9 9 11 / 48%);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 999px;
  bottom: 22px;
  display: flex;
  left: 50%;
  padding: 0 6px;
  position: absolute;
  transform: translateX(-50%);
  z-index: 10;
}

.md-home-hero__dots[hidden] {
  display: none;
}

.md-home-hero__dot {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  width: 44px;
}

.md-home-hero__dot::before {
  background: rgb(255 255 255 / 48%);
  border-radius: 50%;
  content: "";
  height: 7px;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  width: 7px;
}

.md-home-hero__dot:hover::before {
  background: #fff;
}

.md-home-hero__dot[aria-pressed="true"]::before {
  background: #fb7185;
  box-shadow: 0 0 0 3px rgb(251 113 133 / 20%);
  transform: scale(1.2);
}

.md-home-hero__dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

.md-home-hero__progress {
  background: rgb(255 255 255 / 14%);
  bottom: 0;
  height: 3px;
  left: 0;
  overflow: hidden;
  position: absolute;
  right: 0;
  z-index: 9;
}

.md-home-hero__progress > span {
  animation: md-hero-progress 8s linear forwards;
  background: linear-gradient(90deg, #e11d48, #fb7185);
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  width: 100%;
}

.md-home-hero.is-paused .md-home-hero__progress > span {
  animation-play-state: paused;
}

@keyframes md-hero-progress {
  to {
    transform: scaleX(1);
  }
}

@media (hover: hover) and (pointer: fine) {
  .md-home-hero:hover .md-home-hero__control,
  .md-home-hero:focus-within .md-home-hero__control {
    opacity: 0.78;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
  }

  .md-home-hero .md-home-hero__control:hover,
  .md-home-hero .md-home-hero__control:focus-visible {
    opacity: 1;
  }
}

.md-home-hero__poster {
  aspect-ratio: var(--md-poster-aspect, 9 / 16);
  background: #18181b;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 0.75rem;
  box-shadow: 0 24px 50px rgb(0 0 0 / 58%);
  cursor: pointer;
  display: block;
  flex: 0 0 clamp(200px, 18vw, 240px);
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.md-home-hero__poster,
.md-single-poster {
  animation: md-poster-enter 720ms cubic-bezier(0.22, 1, 0.36, 1);
  isolation: isolate;
  transform-origin: center bottom;
  transition: border-color 320ms ease, box-shadow 420ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.md-home-hero__poster::before,
.md-single-poster::before {
  background: linear-gradient(105deg, transparent 20%, rgb(255 255 255 / 12%) 46%, transparent 72%);
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-120%);
  z-index: 4;
}

.md-has-js [data-md-poster-reveal].is-loading::before {
  animation: md-poster-shimmer 1.15s ease-in-out infinite;
  opacity: 1;
}

.md-has-js [data-md-poster-reveal] > img {
  transition: filter 500ms ease, opacity 480ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.md-has-js [data-md-poster-reveal].is-loading > img {
  opacity: 0;
  transform: scale(1.045);
}

.md-has-js [data-md-poster-reveal].is-loaded > img {
  opacity: 1;
  transform: scale(1);
}

@keyframes md-poster-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.965);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes md-poster-shimmer {
  0% {
    transform: translateX(-120%);
  }

  65%,
  100% {
    transform: translateX(120%);
  }
}

@media (hover: hover) and (pointer: fine) {
  .md-home-hero__poster:hover,
  .md-single-poster:hover {
    border-color: rgb(244 63 94 / 58%);
    box-shadow: 0 30px 62px rgb(0 0 0 / 68%), 0 0 30px rgb(225 29 72 / 18%);
    transform: perspective(900px) translateY(-8px) rotateX(1.5deg) rotateY(-1.5deg) scale(1.025);
  }

  [data-md-poster-reveal]:hover > img,
  .md-has-js [data-md-poster-reveal].is-loaded:hover > img {
    filter: brightness(1.08) saturate(1.12);
    transform: scale(1.045);
  }
}

.md-home-hero__copy {
  align-items: flex-start;
  display: flex;
  flex: 1;
  flex-direction: column;
  max-width: 850px;
  min-width: 0;
}

.md-home-hero__eyebrow {
  align-items: center;
  background: rgba(225, 29, 72, 0.14);
  border: 1px solid rgba(251, 113, 133, 0.28);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.12);
  color: #fb7185;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  gap: 0.45rem;
  letter-spacing: 0.1em;
  margin: 0 0 0.95rem;
  padding: 0.25rem 0.8rem;
  text-transform: uppercase;
  width: fit-content;
}

.md-home-hero__eyebrow::before {
  background: #fb7185;
  border-radius: 50%;
  box-shadow: 0 0 8px #fb7185;
  content: '';
  height: 6px;
  width: 6px;
}

.md-home-hero h1,
.md-home-hero__copy > h2 {
  color: #fff;
  font-size: clamp(2.75rem, 4.65vw, 4rem);
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin: 0 0 1rem;
}

.md-home-hero__title-link {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.md-home-hero__title-link:hover {
  color: #fda4af;
}

.md-home-hero h1 span,
.md-home-hero__copy > h2 span {
  color: #a1a1aa;
  font-size: 0.62em;
  font-weight: 300;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.md-home-hero__meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.md-home-hero__meta > strong {
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 0.45rem;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.18);
  color: #facc15;
  display: inline-flex;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  gap: 0.3rem;
  padding: 0.32rem 0.65rem;
}

.md-home-hero__meta > span {
  color: #d4d4d8;
  font-size: 0.85rem;
}

.md-home-hero__platform {
  color: #fb7185 !important;
  font-weight: 800;
}

.md-hero-chip,
.md-single-tags .md-tag {
  background: rgb(39 39 42 / 78%);
  border: 1px solid #3f3f46;
  border-radius: 999px;
  color: #d4d4d8;
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  text-decoration: none;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.md-hero-chip:hover,
.md-single-tags .md-tag:hover {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.88) 0%, rgba(190, 18, 60, 0.95) 100%);
  border-color: #fb7185;
  color: #fff;
  box-shadow: 0 3px 12px rgba(225, 29, 72, 0.35);
  transform: translateY(-1px);
}

.md-home-hero__description {
  color: #d4d4d8;
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
  line-height: 1.7;
  margin: 0 0 1.8rem;
  max-width: 720px;
}

.md-home-hero__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.md-secondary-cta {
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 800;
  gap: 0.45rem;
  justify-content: center;
  min-height: 52px;
  padding: 0.8rem 1.65rem;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.md-secondary-cta:hover {
  background: rgb(255 255 255 / 18%);
  border-color: rgb(255 255 255 / 38%);
  color: #fff;
  transform: scale(1.03);
}

.md-primary-cta {
  align-items: center;
  background: #e11d48;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgb(225 29 72 / 32%);
  color: #fff;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 900;
  gap: 0.55rem;
  justify-content: center;
  min-height: 52px;
  padding: 0.8rem 2rem;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.md-primary-cta:hover {
  background: #f43f5e;
  color: #fff;
  transform: scale(1.03);
}

.md-primary-cta svg {
  fill: currentColor;
  height: 1.2rem;
  width: 1.2rem;
}

.md-primary-cta--no-offer {
  background: var(--md-surface-2);
  box-shadow: none;
  color: var(--md-text);
}

.md-primary-cta--no-offer:hover {
  background: var(--md-line);
  color: var(--md-text);
}

.md-primary-cta--no-offer svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.md-primary-cta--no-offer svg path {
  fill: currentColor;
  stroke: none;
}

.md-cta-mobile {
  display: none;
}

.md-home-body {
  padding-bottom: 1rem;
}

.md-ad {
  align-items: center;
  background-color: #18181b;
  background-image: radial-gradient(rgb(82 82 91 / 36%) 1px, transparent 1px);
  background-size: 18px 18px;
  border: 1px solid #27272a;
  border-radius: 0.5rem;
  color: #52525b;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  position: relative;
  text-align: center;
}

.md-ad span {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.md-ad small {
  background: #27272a;
  border-radius: 0.25rem;
  font-size: 0.65rem;
  margin-top: 0.5rem;
  padding: 0.2rem 0.45rem;
}

.md-ad--leaderboard {
  height: 250px;
  margin: 1.25rem 0;
  max-width: 100%;
  width: 100%;
}

.md-ad--rectangle {
  height: 250px;
  width: 100%;
}

.md-home-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.md-home-layout--full {
  grid-template-columns: minmax(0, 1fr);
}

.md-home-layout > *,
.md-home-primary {
  min-width: 0;
}

.md-home-section {
  margin-bottom: clamp(2.75rem, 5vw, 4.25rem);
}

.md-home-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.md-home-heading h2,
.md-ranking-card h2 {
  align-items: flex-start;
  color: #fff;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 850;
  gap: 0.65rem;
  letter-spacing: -0.025em;
  margin: 0;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  .md-home-heading:not(.md-sidebar *):not(.md-home-sidebar *) h2 {
    white-space: nowrap;
  }
}

.md-home-heading h2::before,
.md-ranking-card h2::before {
  align-self: flex-start;
  background: linear-gradient(180deg, var(--md-brand) 0%, #fb7185 100%);
  border-radius: 999px;
  content: '';
  display: inline-block;
  flex: 0 0 4px;
  flex-shrink: 0;
  height: 1.05em;
  margin-top: 0.15em;
  width: 4px;
}

.md-home-heading > span {
  color: #a1a1aa;
  font-size: 1.75rem;
}

.md-home-heading a {
  color: #f43f5e;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.md-studios-row {
  display: flex;
  gap: 1rem;
  margin-top: -0.4rem;
  overflow-x: auto;
  padding: 0.4rem 0 0.75rem;
  scrollbar-width: none;
}

.md-home-layout--full .md-studio-card {
  flex: 1 0 150px;
}

.md-studios-row::-webkit-scrollbar,
.md-mobile-carousel::-webkit-scrollbar,
.md-home-drama-grid::-webkit-scrollbar {
  display: none;
}

.md-studio-card {
  --md-studio-accent: 255 255 255;

  align-items: center;
  background: linear-gradient(145deg, #18181b, #050506);
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  flex: 0 0 192px;
  flex-direction: column;
  height: 112px;
  justify-content: center;
  min-width: 0;
  isolation: isolate;
  overflow: hidden;
  padding: 1rem;
  position: relative;
  text-align: center;
  text-decoration: none;
  transition: border-color 240ms ease, box-shadow 320ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.md-studio-card::before {
  background:
    radial-gradient(circle at 50% 110%, rgb(var(--md-studio-accent) / 28%), transparent 62%),
    linear-gradient(145deg, rgb(var(--md-studio-accent) / 10%), transparent 65%);
  content: "";
  inset: 0;
  opacity: 0;
  position: absolute;
  transform: translateY(16%) scale(0.92);
  transition: opacity 300ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.md-studio-card strong {
  color: rgb(var(--md-studio-accent));
  font-size: 1.15rem;
  font-weight: 950;
  line-height: 1.15;
  transition: text-shadow 240ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.md-studio-card span {
  color: #a1a1aa;
  font-size: 0.65rem;
  margin-top: 0.45rem;
}

.md-studio-card:focus-visible {
  border-color: rgb(var(--md-studio-accent));
  box-shadow: 0 12px 28px rgb(var(--md-studio-accent) / 15%);
  color: #fff;
  transform: translateY(-3px);
}

.md-studio-card:focus-visible::before {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.md-studio-card:focus-visible strong {
  text-shadow: 0 0 20px rgb(var(--md-studio-accent) / 36%);
  transform: translateY(-1px);
}

@media (hover: hover) and (pointer: fine) {
  .md-studio-card:hover {
    border-color: rgb(var(--md-studio-accent));
    box-shadow: 0 12px 28px rgb(var(--md-studio-accent) / 15%);
    color: #fff;
    transform: translateY(-3px);
  }

  .md-studio-card:hover::before {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .md-studio-card:hover strong {
    text-shadow: 0 0 20px rgb(var(--md-studio-accent) / 36%);
    transform: translateY(-1px);
  }
}

.md-studio-card--2 {
  --md-studio-accent: 244 63 94;
}

.md-studio-card--3 {
  --md-studio-accent: 96 165 250;
}

.md-studio-card--4 {
  --md-studio-accent: 168 85 247;
}

.md-home-drama-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (min-width: 1025px) {
  .md-home-layout:not(.md-home-layout--full) .md-home-drama-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.md-new-releases {
  display: none;
}

.md-home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.md-ranking-card {
  background: rgb(24 24 27 / 42%);
  border: 1px solid rgb(39 39 42 / 82%);
  border-radius: 1rem;
  padding: 1.25rem;
}

.md-ranking-card__heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.md-ranking-card h2 {
  font-size: 1.05rem;
}

.md-ranking-card__heading > span {
  color: #a1a1aa;
}

.md-ranking-card ol {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.md-ranking-card li {
  align-items: center;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 2rem 3rem minmax(0, 1fr);
  position: relative;
}

.md-rank-number {
  color: #3f3f46;
  font-size: 1.75rem;
  font-style: italic;
  font-weight: 950;
  text-align: center;
  transform-origin: center;
  transition: color 220ms ease, text-shadow 320ms ease, transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.md-ranking-card li:first-child .md-rank-number {
  color: #e11d48;
}

.md-rank-poster {
  aspect-ratio: var(--md-poster-aspect, 9 / 16);
  background: #27272a;
  border: 1px solid transparent;
  border-radius: 0.3rem;
  box-shadow: 0 8px 16px rgb(0 0 0 / 22%);
  overflow: hidden;
  transition: border-color 240ms ease, box-shadow 360ms ease, transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.md-rank-poster img {
  transition: filter 360ms ease, transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.md-ranking-card li:focus-within .md-rank-number {
  color: #fb7185;
  text-shadow: 0 0 18px rgb(244 63 94 / 45%);
  transform: translateX(2px) scale(1.16) rotate(-4deg);
}

.md-ranking-card li:focus-within .md-rank-poster {
  border-color: rgb(244 63 94 / 72%);
  box-shadow: 0 12px 24px rgb(225 29 72 / 28%);
  transform: translateY(-4px) scale(1.07) rotate(-1.5deg);
}

.md-ranking-card li:focus-within .md-rank-poster img {
  filter: brightness(1.12) saturate(1.1);
  transform: scale(1.1);
}

@media (hover: hover) and (pointer: fine) {
  .md-ranking-card li:hover .md-rank-number {
    color: #fb7185;
    text-shadow: 0 0 18px rgb(244 63 94 / 45%);
    transform: translateX(2px) scale(1.16) rotate(-4deg);
  }

  .md-ranking-card li:hover .md-rank-poster {
    border-color: rgb(244 63 94 / 72%);
    box-shadow: 0 12px 24px rgb(225 29 72 / 28%);
    transform: translateY(-4px) scale(1.07) rotate(-1.5deg);
  }

  .md-ranking-card li:hover .md-rank-poster img {
    filter: brightness(1.12) saturate(1.1);
    transform: scale(1.1);
  }
}

.md-rank-title {
  color: #e4e4e7;
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.3;
  overflow: visible;
  overflow-wrap: anywhere;
  text-decoration: none;
  text-overflow: clip;
  white-space: normal;
}

.md-rank-meta {
  align-items: center;
  color: #a1a1aa;
  display: flex;
  font-size: var(--md-text-xs);
  justify-content: space-between;
  margin-top: 0.35rem;
}

.md-rank-meta strong {
  background: rgb(234 179 8 / 10%);
  border-radius: 0.2rem;
  color: #eab308;
  padding: 0.1rem 0.3rem;
}

.md-ranking-card__more {
  border-top: 1px solid rgb(63 63 70 / 45%);
  color: #a1a1aa;
  display: block;
  font-size: var(--md-text-xs);
  font-weight: 700;
  margin-top: 1.15rem;
  padding-top: 0.85rem;
  text-align: center;
  text-decoration: none;
}

/* Single drama */
.md-single-hero {
  background: #050506;
  border-radius: 1rem;
  margin: 1.5rem auto 0;
  max-width: 1536px;
  min-height: 540px;
  overflow: hidden;
  position: relative;
  width: calc(100% - 4rem);
}

.md-single-hero__backdrop {
  opacity: 0.22;
}

.md-single-hero__shade {
  background:
    linear-gradient(90deg, #09090b 5%, rgb(9 9 11 / 93%) 45%, rgb(9 9 11 / 28%) 82%),
    linear-gradient(0deg, #09090b, transparent 48%);
  inset: 0;
  position: absolute;
}

.md-single-hero__content {
  align-items: center;
  column-gap: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: clamp(220px, 20vw, 270px) minmax(0, 1fr);
  min-height: 500px;
  padding: 2.75rem 3.5rem;
  position: relative;
  row-gap: 1.15rem;
  z-index: 2;
}

.md-single-poster {
  align-self: center;
  background: #09090b;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 0.85rem;
  box-shadow: 0 24px 55px rgb(0 0 0 / 62%);
  grid-column: 1;
  grid-row: 1 / span 2;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.md-single-poster img {
  display: block;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.md-single-play {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.md-single-play > span {
  align-items: center;
  background: #fff;
  border: 8px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
  box-shadow: 0 8px 30px rgb(0 0 0 / 45%);
  color: #09090b;
  display: flex;
  height: 56px;
  justify-content: center;
  transition: transform 180ms ease;
  width: 56px;
}

.md-single-play:hover > span {
  transform: scale(1.08);
}

.md-single-play svg {
  fill: currentColor;
  height: 1.5rem;
  margin-left: 0.18rem;
  width: 1.5rem;
}

.md-single-copy {
  align-self: end;
  grid-column: 2;
  grid-row: 1;
  max-width: 900px;
  min-width: 0;
}

.md-single-hero__wide {
  align-self: start;
  grid-column: 2;
  grid-row: 2;
  max-width: 900px;
  min-width: 0;
}

.md-single-title-row {
  align-items: flex-start;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
}

.md-single-title-row h1 {
  color: #fff;
  font-size: clamp(2.35rem, 4.2vw, 3.85rem);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.md-single-rating {
  align-items: flex-end;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
}

.md-single-rating strong {
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 0.45rem;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.18);
  color: #facc15;
  display: inline-flex;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
}

.md-single-rating span {
  color: #a1a1aa;
  font-size: var(--md-text-xs);
  margin-top: 0.3rem;
}

.md-original-title {
  color: #a1a1aa;
  margin: 0.6rem 0 0;
}

.md-single-meta {
  align-items: center;
  color: #a1a1aa;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 650;
  gap: 0.75rem;
  margin-top: 1rem;
}

.md-single-meta span + span::before {
  background: #3f3f46;
  border-radius: 50%;
  content: "";
  display: inline-block;
  height: 4px;
  margin-right: 0.75rem;
  vertical-align: middle;
  width: 4px;
}

.md-single-platform {
  color: #fb7185;
}

a.md-single-platform {
  text-decoration: none;
}

a.md-single-platform:hover,
a.md-single-platform:focus-visible {
  text-decoration: underline;
}

.md-offer-platform-link {
  color: inherit;
  text-decoration: none;
}

.md-offer-platform-link:hover,
.md-offer-platform-link:focus-visible {
  text-decoration: underline;
}

.md-single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.md-single-tags .md-tags {
  display: contents;
}

.md-single-description {
  color: #d4d4d8;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  max-width: 760px;
}

.md-single-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.md-primary-cta__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.md-primary-cta__text strong {
  font-weight: 850;
}

.md-primary-cta__sub {
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.88;
}

.md-secondary-cta,
.md-source-link {
  align-items: center;
  border: 1px solid #3f3f46;
  border-radius: 999px;
  color: #d4d4d8;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 0.45rem;
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  text-decoration: none;
}

.md-secondary-cta svg {
  fill: none;
  height: 1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 1rem;
}

.md-secondary-cta:hover,
.md-source-link:hover {
  background: #27272a;
  border-color: #52525b;
  color: #fff;
}

.md-single-trust-line {
  align-items: center;
  color: var(--md-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.76rem;
  gap: 0.65rem 1rem;
  margin-top: 1rem;
}

.md-single-trust-line__badge {
  align-items: center;
  color: var(--md-success);
  display: inline-flex;
  font-weight: 700;
  gap: 0.35rem;
}

.md-single-trust-line__badge svg {
  fill: currentColor;
  height: 0.95rem;
  width: 0.95rem;
}

.md-single-trust-line__date time {
  color: var(--md-text);
  font-weight: 600;
}

.md-single-trust-line__link {
  color: var(--md-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.md-single-trust-line__link:hover,
.md-single-trust-line__link:focus-visible {
  color: #fff;
}

.md-single-topbar,
.md-quick-watch-bar {
  display: none;
}

.md-single-body {
  padding-top: 1.5rem;
}

.md-single-body .md-ad--leaderboard {
  margin: 1.5rem 0 1.25rem;
  max-width: 100%;
  width: 100%;
}

.md-single-body .md-ad--rectangle {
  margin-bottom: 0;
}

.md-watch-panel {
  scroll-margin-top: 6rem;
}

.md-single-sidebar {
  align-content: start;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.md-single-body .md-content-grid {
  align-items: start;
}

.md-single-body .md-panel {
  padding: clamp(1rem, 2vw, 1.35rem);
}

.md-single-body .md-panel h2 {
  align-items: flex-start;
  border-block-end: none;
  display: inline-flex;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  gap: 0.65rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 1.15rem;
  overflow-wrap: break-word;
  padding-block-end: 0;
}

@media (min-width: 768px) {
  .md-single-body .md-panel:not(.md-single-sidebar *) h2 {
    white-space: nowrap;
  }
}

.md-single-body .md-panel h2::before {
  align-self: flex-start;
  background: linear-gradient(180deg, var(--md-brand) 0%, #fb7185 100%);
  border-radius: 999px;
  content: '';
  display: inline-block;
  flex: 0 0 4px;
  flex-shrink: 0;
  height: 1.05em;
  margin-top: 0.15em;
  width: 4px;
}

.md-single-body .md-panel > :last-child {
  margin-bottom: 0;
}

.md-single-recommendations {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
}

.md-single-body .md-single-recommendations > .md-section {
  margin: 0;
}

@media (min-width: 1200px) {
  .md-single-body .md-content-grid {
    grid-template-rows: auto 1fr;
  }

  .md-single-sidebar {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .md-single-sidebar .md-watch-panel {
    position: sticky;
    top: 5.75rem;
    z-index: 15;
  }

  .md-single-recommendations {
    grid-column: 1;
  }
}

.md-single-recommendations .md-similar-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.md-single-primary .md-reading-column {
  margin-inline: 0;
}

.md-detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.md-detail-list > div {
  border-top: 1px solid var(--md-line);
  display: grid;
  gap: 0.35rem;
  grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1.2fr);
  padding: 0.75rem 0;
}

.md-detail-list > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.md-detail-list dt {
  color: var(--md-muted);
  font-size: var(--md-text-xs);
  font-weight: 800;
  text-transform: uppercase;
}

.md-detail-list dd {
  color: var(--md-text);
  font-size: 0.86rem;
  font-weight: 700;
  margin: 0;
  text-align: right;
}

/* Top Core Metrics + Properties Table */
.md-core-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.md-metric-card {
  background: var(--md-surface-2);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.1rem 1.05rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}
.md-metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.1) 0%, rgba(56, 189, 248, 0.06) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.md-metric-card:hover {
  border-color: rgba(225, 29, 72, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 15px rgba(225, 29, 72, 0.12);
  transform: translateY(-2px);
}
.md-metric-card:hover::before {
  opacity: 1;
}

.md-metric-label {
  color: var(--md-muted);
  font-size: var(--md-text-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.md-metric-value {
  align-items: baseline;
  color: var(--md-text);
  display: flex;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  gap: 0.35rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.md-metric-value span:not(.md-status-dot) {
  color: var(--md-muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: normal;
}

.md-spoiler-reveal {
  align-items: center;
  background: var(--md-surface);
  border: 1px dashed var(--md-line-strong);
  border-radius: var(--md-radius-sm);
  color: var(--md-text);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  width: fit-content;
}

.md-spoiler-reveal:hover,
.md-spoiler-reveal:focus-visible {
  background: var(--md-surface-3);
  border-color: var(--md-text-tertiary);
}

.md-spoiler-reveal svg {
  fill: none;
  height: 0.95rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 0.95rem;
}

.md-spoiler-reveal[hidden],
.md-spoiler-content[hidden] {
  display: none !important;
}

.md-spoiler-content {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
}

.md-spoiler-hide {
  background: transparent;
  border: 0;
  color: var(--md-muted);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.35rem;
  text-decoration: underline;
}

.md-spoiler-hide:hover,
.md-spoiler-hide:focus-visible {
  color: var(--md-text);
}

/* FAQ Panel */
.md-faq-list {
  display: grid;
  gap: 0.65rem;
}

.md-faq-item {
  background: var(--md-surface-2);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius-sm);
  padding: 0.85rem 1rem;
}

.md-faq-item summary {
  color: var(--md-text);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.4;
}

.md-faq-answer {
  color: var(--md-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 0.6rem;
}

.md-faq-answer p {
  margin: 0;
}

.md-faq-spoiler {
  margin-top: 0.6rem;
}

.md-status-dot {
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  width: 10px;
}
.md-status-dot--completed {
  background-color: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}
.md-status-dot--ongoing {
  background-color: #eab308;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.6);
}

.md-facts-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  margin: 0;
}

.md-facts-list > div {
  border-top: 1px solid var(--md-line);
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(7rem, 35%) minmax(0, 1fr);
  padding: 0.8rem 0;
}

.md-facts-list > .md-facts-list__wide,
.md-facts-list > div:last-child:nth-child(odd),
.md-facts-list--credits > div {
  grid-column: 1 / -1;
}

.md-facts-list dt {
  color: var(--md-muted);
  font-size: var(--md-text-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.md-facts-list dd {
  color: var(--md-text);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  overflow-wrap: anywhere;
}

.md-facts-subheading {
  border-top: 1px solid var(--md-line);
  color: var(--md-muted);
  font-size: var(--md-text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 1.6rem 0 1.1rem;
  padding-top: 1.25rem;
  text-transform: uppercase;
}

/* Cast rail: linked actor cards with avatars. */
.md-cast-list {
  display: flex;
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  overflow-x: auto;
  padding: 0 0 1rem;
  scrollbar-color: var(--md-line) transparent;
  scrollbar-width: thin;
}

.md-cast-list::-webkit-scrollbar {
  height: 6px;
}

.md-cast-list::-webkit-scrollbar-thumb {
  background-color: var(--md-line);
  border-radius: 3px;
}

.md-cast-item {
  flex: 0 0 140px;
  min-width: 0;
}

.md-cast-card {
  background: var(--md-surface-2);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius-sm);
  color: var(--md-text);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 220ms ease, box-shadow 260ms ease, transform 220ms ease;
}

.md-cast-avatar {
  aspect-ratio: 1;
  background: var(--md-surface);
  display: block;
  overflow: hidden;
}

.md-cast-avatar img {
  transition: transform 300ms ease;
}

.md-cast-copy {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem 0.85rem;
}

.md-cast-name {
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.md-cast-role {
  color: var(--md-muted);
  font-size: var(--md-text-xs);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.md-cast-card:focus-visible {
  border-color: var(--md-brand);
}

@media (hover: hover) and (pointer: fine) {
  .md-cast-card:hover {
    border-color: rgb(244 63 94 / 58%);
    box-shadow: 0 12px 24px rgb(0 0 0 / 22%);
    transform: translateY(-3px);
  }

  .md-cast-card:hover .md-cast-avatar img {
    transform: scale(1.05);
  }
}

.md-verification-panel {
  border-top: 3px solid var(--md-brand);
}

.md-verification-panel .md-eyebrow {
  margin-bottom: 0.35rem;
}

.md-verification-panel .md-source-link {
  margin-top: 1.25rem;
}

.md-verification-panel .md-footer-note {
  border-top: 1px solid var(--md-line);
  margin-top: 1.25rem;
  padding-top: 0.9rem;
}

.md-completeness {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
}

.md-meter {
  background: var(--md-surface-2);
  border-radius: 999px;
  display: block;
  height: 6px;
  overflow: hidden;
  width: 100%;
}

.md-meter__fill {
  background: linear-gradient(90deg, var(--md-brand), #fb7185);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.md-watch-tip {
  font-size: var(--md-small-text-min);
  margin: 0.75rem 0 0;
}

.md-watch-tip a {
  color: var(--md-accent);
}

.md-content-warning {
  background: rgb(245 158 11 / 10%);
  border: 1px solid rgb(245 158 11 / 36%);
  border-radius: var(--md-radius-sm);
  color: #fcd34d;
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
}

.md-content-warning strong {
  font-size: var(--md-text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.md-content-warning span {
  color: var(--md-text);
  font-size: 0.88rem;
  line-height: 1.55;
}

.md-similar-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.md-similar-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.md-similar-reason {
  color: var(--md-muted, #a1a1aa);
  font-size: 0.75rem;
  line-height: 1.4;
  margin: 0.4rem 0 0;
}

@media (max-width: 767px) {
  .md-similar-item {
    flex: 0 0 128px;
    scroll-snap-align: start;
  }

  .md-similar-grid .md-similar-item .md-card {
    flex: 0 0 auto;
  }
}

@media (max-width: 374px) {
  .md-similar-item {
    flex-basis: 116px;
  }
}

/* Footer */
.md-site-footer {
  background: #09090b;
  border-top: 1px solid rgb(39 39 42 / 70%);
  margin-top: 2.5rem;
  padding: 2rem;
}

.md-site-footer__inner {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-inline: auto;
  max-width: 1536px;
}

.md-site-footer p,
.md-site-footer nav {
  color: #a1a1aa;
  font-size: 0.72rem;
  margin: 0;
}

.md-site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.md-site-footer a {
  color: #a1a1aa;
  text-decoration: none;
}

/* Legal pages */
.md-legal-main {
  padding-block: clamp(3rem, 7vw, 6rem);
}

.md-legal-page {
  max-width: 880px;
}

.md-legal-page--reading {
  width: min(880px, calc(100% - 2rem));
}

.md-legal-page > header {
  margin-bottom: 2rem;
}

.md-legal-page > header h1 {
  color: var(--md-text);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0;
}

.md-legal-page > header > p:last-child {
  color: var(--md-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 1rem 0 0;
}

.md-mobile-nav {
  display: none;
}

.md-utility-actions {
  bottom: max(2rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  z-index: 110;
}

.md-utility-button {
  align-items: center;
  background: rgb(24 24 27 / 88%);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 50%;
  box-shadow: 0 12px 30px rgb(0 0 0 / 32%);
  color: #f4f4f5;
  cursor: pointer;
  display: flex;
  height: 48px;
  justify-content: center;
  padding: 0;
  transition: background-color 160ms ease, border-color 160ms ease, opacity 160ms ease, transform 160ms ease;
  width: 48px;
}

.md-utility-button[hidden] {
  display: none;
}

.md-utility-button:hover {
  background: var(--md-brand);
  border-color: var(--md-brand);
  color: #fff;
  transform: translateY(-2px);
}

.md-utility-button.is-copied {
  background: #16a34a;
  border-color: #22c55e;
}

.md-utility-button svg {
  fill: none;
  height: 1.3rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1.3rem;
}

@media (max-width: 1199px) {
  .md-home-hero__control {
    display: none;
  }
}

/* iPad and tablet */
@media (min-width: 768px) and (max-width: 1199px) {
  :root {
    --md-content: calc(100% - 3rem);
  }

  .md-site-header__inner {
    padding-inline: 1.5rem;
  }

  .md-desktop-nav {
    display: none;
  }

  .md-header-search input {
    width: min(36vw, 300px);
  }

  .md-home-hero,
  .md-single-hero {
    width: calc(100% - 3rem);
  }

  .md-home-hero {
    height: 480px;
  }

  .md-home-hero__content,
  .md-single-hero__content {
    gap: 2rem;
    padding: 2rem;
  }

  .md-single-hero__content {
    grid-template-columns: clamp(180px, 18vw, 210px) minmax(0, 1fr);
    row-gap: 1rem;
  }

  .md-home-hero__poster,
  .md-single-poster {
    flex: 0 0 clamp(180px, 18vw, 210px);
    max-height: none;
  }

  .md-home-hero h1,
  .md-single-title-row h1 {
    font-size: clamp(2.1rem, 4.5vw, 3rem);
  }

  .md-home-hero__description,
  .md-single-description {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .md-ad--leaderboard {
    height: 150px;
  }

  .md-home-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .md-home-drama-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .md-home-sidebar {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  }

  .md-content-grid {
    grid-template-columns: 1fr;
  }

  .md-single-body .md-content-grid > aside.md-single-sidebar {
    display: contents;
  }

  .md-single-body .md-watch-panel {
    order: -1;
  }

  .md-single-body .md-single-primary {
    order: 0;
  }

  .md-single-body .md-verification-panel {
    order: 1;
  }

  .md-single-body .md-single-recommendations {
    order: 2;
  }

  .md-single-body .md-ranking-card {
    order: 3;
  }

  .md-single-body .md-ad--rectangle {
    margin-bottom: 0;
  }

  .md-similar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Mobile application views */
@media (max-width: 767px) {
  :root {
    --md-content: calc(100% - 2rem);
  }

  body {
    padding-bottom: 5.5rem;
  }

  body.single-md_drama {
    padding-bottom: 0;
  }

  .single-md_drama .md-single-main {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .md-section-heading h2,
  .md-home-heading h2,
  .md-ranking-card h2,
  .md-single-body .md-panel h2 {
    white-space: normal;
    overflow-wrap: break-word;
  }

  .md-site-header {
    height: 88px;
  }

  .home .md-site-header {
    background: linear-gradient(180deg, rgb(0 0 0 / 92%), transparent);
    border: 0;
    position: absolute;
    width: 100%;
  }

  .md-site-header__inner {
    height: 88px;
    padding: max(1.25rem, env(safe-area-inset-top)) 1.5rem 0;
  }

  .md-site-header__end {
    gap: 0.2rem;
  }

  .md-language-menu {
    box-sizing: border-box;
    inset-inline: auto;
    left: 1rem;
    max-height: min(70vh, calc(100vh - 7rem));
    max-width: calc(100% - 2rem);
    min-width: 0;
    position: fixed;
    right: auto;
    top: 5.5rem;
    width: calc(100% - 2rem);
  }

  html[dir="rtl"] .md-language-menu {
    left: auto;
    right: 1rem;
  }

  .md-brand__logo {
    width: min(9.5rem, 38vw);
  }

  .md-desktop-nav,
  .md-header-search,
  .md-submit-button,
  .md-account-button {
    display: none;
  }

  .md-mobile-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
  }

  .md-language-button {
    padding: 0;
    min-height: 44px;
    min-width: 44px;
    width: 44px;
  }

  .md-language-button > span {
    display: none;
  }

  .md-language-menu {
    right: -2.5rem;
  }

  .md-icon-button {
    height: 44px;
    width: 44px;
  }

  .md-mobile-search svg {
    height: 1.5rem;
    width: 1.5rem;
  }

  .md-home-hero {
    border-radius: 0;
    height: 480px;
    margin: 0;
    width: 100%;
  }

  .md-home-hero__backdrop {
    opacity: 1;
  }

  .md-home-hero__shade {
    background: linear-gradient(0deg, #000 2%, rgb(0 0 0 / 42%) 52%, rgb(0 0 0 / 22%) 100%);
  }

  .md-home-hero__content {
    display: block;
    padding: 0;
  }

  .md-home-hero__poster {
    display: none;
  }

  .md-home-hero__copy {
    align-items: center;
    bottom: 0;
    left: 0;
    max-width: none;
    padding: 1.5rem;
    position: absolute;
    text-align: center;
    width: 100%;
  }

  .md-home-hero__eyebrow {
    display: block;
  }

  .md-home-hero h1,
  .md-home-hero__copy > h2 {
    font-size: clamp(1.9rem, 8.5vw, 2.35rem);
    letter-spacing: -0.035em;
    margin-bottom: 0.85rem;
  }

  .md-home-hero h1 span,
  .md-home-hero__copy > h2 span,
  .md-home-hero__meta > strong,
  .md-home-hero__platform {
    display: none;
  }

  .md-home-hero__meta {
    gap: 0.45rem;
    justify-content: center;
    margin-bottom: 1.15rem;
  }

  .md-home-hero__meta > span {
    background: rgb(39 39 42 / 82%);
    border: 1px solid #3f3f46;
    border-radius: 0.25rem;
    color: #d4d4d8;
    font-size: 0.68rem;
    padding: 0.3rem 0.55rem;
  }

  .md-home-hero__description,
  .md-cta-desktop {
    display: none;
  }

  .md-home-hero__actions,
  .md-home-hero__actions .md-primary-cta,
  .md-single-actions .md-primary-cta {
    width: 100%;
  }

  .md-home-hero__actions .md-primary-cta {
    background: #fff;
    border-radius: 999px;
    box-shadow: none;
    color: #09090b;
    max-width: 280px;
    min-height: 48px;
    padding: 0.7rem 1.4rem;
  }

  .md-home-hero__actions .md-primary-cta:hover {
    background: #e4e4e7;
    color: #09090b;
  }

  .md-single-actions .md-primary-cta {
    background: linear-gradient(135deg, var(--md-brand) 0%, #be123c 100%);
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.35);
    color: #fff;
    justify-content: center;
    max-width: none;
    min-height: 48px;
    padding: 0.65rem 1.25rem;
  }

  .md-single-actions .md-primary-cta:hover {
    background: var(--md-brand-strong);
    color: #fff;
  }

  /* The no-offer variant stays visually neutral on mobile too. */
  .md-single-actions .md-primary-cta--no-offer,
  .md-single-actions .md-primary-cta--no-offer:hover {
    background: var(--md-surface-2);
    box-shadow: none;
    color: var(--md-text);
  }

  .md-cta-mobile {
    display: inline;
  }

  .md-home-body {
    padding-bottom: 0;
  }

  .md-home-body > .md-ad,
  .md-studios-section,
  .md-home-sidebar {
    display: none;
  }

  .md-home-layout {
    display: block;
  }

  .md-home-section {
    margin: 1.5rem 0 2rem;
  }

  .md-home-heading {
    margin-bottom: 1rem;
  }

  .md-home-heading h2 {
    font-size: 1.08rem;
  }

  .md-home-heading a {
    display: none;
  }

  .md-grid,
  .md-grid--people,
  .md-grid--platforms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md-home-drama-grid,
  .md-similar-grid,
  .md-single-recommendations .md-similar-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-right: 0;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .md-mobile-carousel {
    display: flex;
    gap: 0.75rem;
    margin-right: -1rem;
    overflow-x: auto;
    padding: 0 1rem 0.35rem 0;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .md-home-drama-grid .md-card,
  .md-similar-grid .md-card {
    display: block;
    flex: none;
    width: auto;
  }

  .md-mobile-carousel .md-card {
    display: block;
    flex: 0 0 128px;
    scroll-snap-align: start;
  }

  .md-card-overlay,
  .md-card-rating {
    display: none;
  }

  .md-card-media {
    border-radius: 0.5rem;
  }

  .md-card-badge {
    font-size: 0.6rem;
    left: 0;
    max-width: calc(100% - 44px);
    right: auto;
    top: 0;
  }

  .md-card-body {
    padding-top: 0.55rem;
  }

  .md-card-body h3 {
    font-size: 0.82rem;
  }

  .md-card-meta {
    font-size: var(--md-text-xs);
    margin-top: 0.2rem;
  }

  .md-drama-card .md-card-meta > span:first-child {
    display: block;
    max-width: 100%;
  }

  .md-card-episodes {
    bottom: 0.35rem;
    font-size: 0.6rem;
    inset-inline-end: 0.35rem;
  }

  .md-new-releases {
    display: block;
  }

  .md-site-footer {
    display: none;
  }

  .md-mobile-nav {
    align-items: flex-start;
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    background: rgba(18, 18, 22, 0.82);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    height: calc(84px + env(safe-area-inset-bottom));
    justify-content: space-around;
    left: 0;
    padding: 0.75rem 0.5rem env(safe-area-inset-bottom);
    position: fixed;
    width: 100%;
    z-index: 120;
  }

  .md-utility-actions {
    bottom: calc(100px + env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
  }

  .md-utility-button {
    height: 44px;
    width: 44px;
  }

  .md-mobile-nav a {
    align-items: center;
    color: #a1a1aa;
    display: flex;
    flex: 1;
    flex-direction: column;
    font-size: var(--md-text-xs);
    font-weight: 650;
    gap: 0.25rem;
    max-width: none;
    min-width: 0;
    overflow: hidden;
    padding-inline: 0.15rem;
    text-align: center;
    text-decoration: none;
    text-overflow: ellipsis;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease;
  }

  .md-mobile-nav a:active {
    transform: scale(0.92);
  }

  .md-mobile-nav a[aria-current="page"] {
    color: #fff;
  }

  .md-mobile-nav a[aria-current="page"] svg {
    filter: drop-shadow(0 2px 8px rgba(225, 29, 72, 0.4));
    stroke-width: 2;
  }

  .md-mobile-nav svg {
    fill: none;
    height: 1.45rem;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
    width: 1.45rem;
  }

  .md-mobile-nav a:first-child svg {
    fill: currentColor;
    stroke: none;
  }

  /* Immersive mobile drama detail */
  .single-md_drama .md-site-header,
  .single-md_drama .md-mobile-nav,
  .single-md_drama .md-breadcrumbs {
    display: none;
  }

  .single-md_drama .md-utility-actions {
    bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 120;
  }

  html:has(body.single-md_drama) {
    scroll-padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .single-md_drama .md-watch-panel {
    scroll-margin-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    scroll-margin-top: 1rem;
  }

  .md-single-hero {
    background: linear-gradient(180deg, #13131a 0%, #09090b 100%);
    border-bottom: 1px solid var(--md-line);
    border-radius: 0;
    margin: 0;
    min-height: 0;
    overflow: hidden;
    width: 100%;
  }

  .md-single-hero__backdrop {
    display: block;
    filter: blur(22px);
    opacity: 0.16;
    transform: scale(1.08);
  }

  .md-single-hero__shade {
    background: linear-gradient(180deg, rgb(9 9 11 / 72%) 0%, #09090b 100%);
    display: block;
  }

  .md-single-topbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: max(0.85rem, env(safe-area-inset-top)) 1rem 0.25rem;
    position: relative;
    width: 100%;
    z-index: 5;
  }

  .md-single-topbar > div {
    display: flex;
    gap: 0.5rem;
  }

  .md-single-topbar > a,
  .md-single-topbar > div > a,
  .md-single-topbar .md-language-button {
    align-items: center;
    background: rgb(255 255 255 / 8%);
    border: 1px solid rgb(255 255 255 / 12%);
    border-radius: 50%;
    color: #fff;
    display: flex;
    height: 40px;
    justify-content: center;
    padding: 0;
    text-decoration: none;
    width: 40px;
  }

  .md-single-topbar button.is-copied {
    background: #16a34a;
  }

  .md-single-topbar svg {
    fill: none;
    height: 1.15rem;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 1.15rem;
  }

  .md-single-hero__content {
    align-items: start;
    column-gap: 0.9rem;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 0;
    padding: 0.5rem 1rem 1.25rem;
    row-gap: 0.9rem;
  }

  .md-single-poster {
    align-self: start;
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 0.65rem;
    box-shadow: 0 12px 28px rgb(0 0 0 / 55%);
    grid-column: 1;
    grid-row: 1;
    max-height: none;
    width: 112px;
  }

  .md-single-poster::after {
    display: none;
  }

  .md-single-play {
    z-index: 2;
  }

  .md-single-play > span {
    border-width: 5px;
    height: 40px;
    width: 40px;
  }

  .md-single-play svg {
    height: 1.1rem;
    width: 1.1rem;
  }

  .md-single-copy {
    align-self: start;
    background: transparent;
    border-radius: 0;
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
    max-width: none;
    min-width: 0;
    padding: 0;
    position: relative;
    z-index: 3;
  }

  .md-single-hero__wide {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    min-width: 0;
  }

  .md-single-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

  .md-single-title-row:has(.md-single-rating) h1 {
    max-width: 100%;
  }

  .md-single-title-row h1 {
    flex: 1;
    font-size: 1.32rem;
    line-height: 1.16;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .md-single-rating {
    align-items: center;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.35);
    border-radius: 999px;
    flex-direction: row;
    gap: 0.4rem;
    padding: 0.2rem 0.6rem;
  }

  .md-single-rating strong {
    background: transparent;
    border: 0;
    box-shadow: none;
    font-size: 0.8rem;
    padding: 0;
  }

  .md-single-rating span {
    color: #e4e4e7;
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 0;
  }

  .md-original-title {
    font-size: 0.78rem;
    margin-top: 0.35rem;
  }

  .md-single-meta {
    font-size: var(--md-text-xs);
    gap: 0.45rem;
    margin-top: 0.55rem;
  }

  .md-single-meta span + span::before {
    margin-right: 0.45rem;
  }

  .md-single-tags {
    gap: 0.32rem;
    margin-top: 0.55rem;
  }

  .md-single-tags .md-tag {
    font-size: 0.68rem;
    padding: 0.18rem 0.48rem;
  }

  .md-single-description {
    color: #d4d4d8;
    display: -webkit-box;
    font-size: 0.84rem;
    line-height: 1.5;
    margin-top: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .md-single-actions {
    gap: 0.55rem;
    margin-top: 0.85rem;
  }

  .md-single-actions .md-primary-cta {
    border-radius: 0.75rem;
    flex: 1 1 100%;
    font-size: 0.88rem;
    max-width: none;
  }

  /* Secondary actions collapse into one compact row under the primary CTA. */
  .md-single-actions .md-secondary-cta {
    flex: 1 1 0;
    justify-content: center;
    min-height: 2.75rem;
    padding-inline: 0.65rem;
  }

  .md-single-actions .md-watchlist-label,
  .md-single-actions .md-share-trigger > span {
    display: none;
  }

  .md-single-actions .md-secondary-cta svg {
    height: 1.15rem;
    width: 1.15rem;
  }

  .md-single-trust-line {
    font-size: 0.72rem;
    gap: 0.4rem 0.75rem;
    margin-top: 0.75rem;
  }

  /* Quick Watch Floating Bottom Bar */
  .md-quick-watch-bar {
    bottom: 0;
    display: block;
    left: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    transform: translateY(110%);
    transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), visibility 0.35s;
    visibility: hidden;
    z-index: 110;
  }

  .md-quick-watch-bar.is-visible {
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .md-quick-watch-bar__inner {
    align-items: center;
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    background: rgba(18, 18, 22, 0.88);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.5);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  }

  html[data-md-theme="light"] .md-quick-watch-bar__inner {
    background: rgba(255, 255, 255, 0.92);
    border-top-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.08);
  }

  .md-quick-watch-bar__poster {
    aspect-ratio: var(--md-poster-aspect, 9 / 16);
    border-radius: 0.35rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    flex: 0 0 36px;
    height: auto;
    overflow: hidden;
    width: 36px;
  }

  .md-quick-watch-bar__poster img {
    height: 100%;
    object-fit: cover;
    width: 100%;
  }

  .md-quick-watch-bar__info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
  }

  .md-quick-watch-bar__title {
    color: var(--md-text);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .md-quick-watch-bar__meta {
    align-items: center;
    color: var(--md-muted);
    display: flex;
    font-size: 0.75rem;
    gap: 0.45rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .md-quick-watch-bar__platform {
    color: #fb7185;
    font-weight: 700;
  }

  .md-quick-watch-bar__free {
    color: var(--md-muted);
    font-weight: 600;
  }

  .md-quick-watch-bar__rating {
    color: #facc15;
    font-weight: 800;
  }

  .md-quick-watch-bar__btn {
    align-items: center;
    background: linear-gradient(135deg, var(--md-brand) 0%, #fb7185 100%);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.4);
    color: #fff;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.82rem;
    font-weight: 800;
    gap: 0.35rem;
    min-height: 44px;
    min-width: 44px;
    padding: 0.45rem 0.95rem;
    text-decoration: none;
    white-space: nowrap;
  }

  .md-quick-watch-bar__btn svg {
    fill: currentColor;
    height: 0.85rem;
    width: 0.85rem;
  }

  .md-quick-watch-bar__platform--unavailable {
    color: var(--md-muted);
    font-style: italic;
    font-weight: 500;
  }

  .md-quick-watch-bar__btn--check {
    background: var(--md-surface-2);
    border: 1px solid var(--md-line);
    box-shadow: none;
    color: var(--md-text);
  }

  .md-quick-watch-bar__btn--check svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .md-quick-watch-bar__btn--check svg path {
    fill: currentColor;
    stroke: none;
  }

  .single-md_drama .md-comments-area input,
  .single-md_drama .md-comments-area textarea,
  .single-md_drama .md-comments-area button,
  .single-md_drama .md-offer-item a,
  .single-md_drama .md-content-grid a,
  .single-md_drama .md-content-grid button {
    scroll-margin-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .single-md_drama .md-offer-item a.md-button {
    min-height: 44px;
  }

  @media (prefers-reduced-motion: reduce) {
    .md-quick-watch-bar {
      transition: none;
    }
  }

  .md-single-body {
    padding-top: 1rem;
  }

  .md-single-body > .md-ad,
  .md-content-grid > aside > .md-ad {
    display: none;
  }

  .md-content-grid {
    display: block;
    margin-top: 1rem;
  }

  .md-panel {
    padding: 1rem;
  }

  .md-content-grid aside,
  .md-content-grid .md-section {
    margin-top: 1rem;
  }

  .md-single-body .md-content-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .md-single-body .md-content-grid > aside.md-single-sidebar {
    display: contents;
  }

  .md-single-body .md-watch-panel {
    margin-top: 0;
    order: -1;
  }

  .md-single-body .md-single-primary {
    order: 0;
  }

  .md-single-body .md-verification-panel {
    margin-top: 0;
    order: 1;
  }

  .md-single-body .md-single-recommendations {
    order: 2;
  }

  .md-single-body .md-ranking-card {
    margin-top: 0;
    order: 3;
  }

  .md-core-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md-section {
    margin-block: 2.25rem;
  }

}

@media (min-width: 480px) and (max-width: 767px) {
  .md-home-drama-grid,
  .md-similar-grid,
  .md-single-recommendations .md-similar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 374px) {
  .md-home-hero {
    height: 450px;
  }

  .md-home-hero__copy,
  .md-single-copy {
    padding-inline: 1rem;
  }

  .md-mobile-carousel .md-card {
    flex-basis: 116px;
  }

  .md-single-title-row h1 {
    font-size: 1.35rem;
  }
}

/* User-selected light theme. Cinematic hero media remains intentionally dark. */
html[data-md-theme="dark"] {
  color-scheme: dark;
}

html[data-md-theme="light"] {
  --md-bg: #f4f4f5;
  --md-surface: #fff;
  --md-surface-2: #e4e4e7;
  --md-surface-3: #d4d4d8;
  --md-text: #18181b;
  --md-muted: #52525b;
  --md-text-tertiary: #71717a;
  --md-line: #d4d4d8;
  --md-line-subtle: rgba(0, 0, 0, 0.06);
  --md-line-strong: #a1a1aa;
  --md-brand-subtle: rgba(225, 29, 72, 0.1);
  --md-shadow-sm: 0 2px 8px rgb(24 24 27 / 8%);
  --md-shadow: 0 10px 30px rgb(24 24 27 / 14%);
  --md-shadow-lg: 0 20px 50px rgb(24 24 27 / 20%);

  color-scheme: light;
}

html[data-md-theme="light"] .md-prose--reading {
  color: var(--md-muted);
}

html[data-md-theme="light"] .md-site-header {
  background: rgb(255 255 255 / 88%);
  border-bottom-color: rgb(24 24 27 / 10%);
}

html[data-md-theme="light"] .md-brand__logo {
  background-image: url("assets/images/microdramabase-logo-on-light.png");
}

html[data-md-theme="light"] .md-desktop-nav a {
  background: transparent;
  border-color: transparent;
  color: #52525b;
}

html[data-md-theme="light"] .md-desktop-nav a:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  color: #09090b;
}

html[data-md-theme="light"] .md-desktop-nav a[aria-current="page"] {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.25);
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.1);
  color: #e11d48;
}

html[data-md-theme="light"] .md-desktop-nav a[aria-current="page"]:hover {
  background: rgba(225, 29, 72, 0.14);
  border-color: rgba(225, 29, 72, 0.35);
  color: #be123c;
}

html[data-md-theme="light"] .md-header-search input {
  background: #f4f4f5;
  border-color: #d4d4d8;
  color: #18181b;
}

html[data-md-theme="light"] .md-header-search input:focus {
  background: #fff;
  border-color: #a1a1aa;
}

html[data-md-theme="light"] .md-icon-button,
html[data-md-theme="light"] .md-mobile-search {
  color: #52525b;
}

html[data-md-theme="light"] .md-icon-button:hover,
html[data-md-theme="light"] .md-icon-button[aria-expanded="true"],
html[data-md-theme="light"] .md-mobile-search:hover,
html[data-md-theme="light"] .md-mobile-search:focus-visible {
  background: #f4f4f5;
  border-color: #d4d4d8;
  color: #09090b;
}

html[data-md-theme="light"] .md-search-page-heading .md-search-close-btn {
  background: #e4e4e7;
  border-color: #d4d4d8;
  color: #52525b;
}

html[data-md-theme="light"] .md-search-page-heading .md-search-close-btn:hover {
  background: #fff;
  border-color: var(--md-brand);
  color: #09090b;
}

html[data-md-theme="light"] .md-search-form input {
  background: #fff;
  border-color: #cbd5e1;
  color: #18181b;
}

html[data-md-theme="light"] .md-search-form input:focus {
  background: #fff;
  border-color: var(--md-brand);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18);
}

html[data-md-theme="light"] .md-search-cancel-btn {
  background: transparent;
  border-color: #d4d4d8;
  color: #52525b;
}

html[data-md-theme="light"] .md-search-cancel-btn:hover {
  background: #e4e4e7;
  color: #18181b;
}

html[data-md-theme="light"] .md-tag:hover,
html[data-md-theme="light"] .md-hero-chip:hover,
html[data-md-theme="light"] .md-single-tags .md-tag:hover {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%) !important;
  border-color: #be123c !important;
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(225, 29, 72, 0.3);
  transform: translateY(-1px);
}

html[data-md-theme="light"] .md-submit-button {
  border-color: #d4d4d8;
  color: #27272a;
}

html[data-md-theme="light"] .md-submit-button:hover {
  background: #f4f4f5;
  border-color: #a1a1aa;
  color: #09090b;
}

html[data-md-theme="light"] .md-language-menu {
  background: rgb(255 255 255 / 98%);
  border-color: #d4d4d8;
  box-shadow: 0 18px 45px rgb(24 24 27 / 18%);
}

html[data-md-theme="light"] .md-language-menu :is(button, a) {
  color: #3f3f46;
}

html[data-md-theme="light"] .md-language-menu :is(button, a):hover,
html[data-md-theme="light"] .md-language-menu :is(button, a):focus-visible,
html[data-md-theme="light"] .md-language-menu :is(button, a)[aria-checked="true"] {
  background: #f4f4f5;
  color: #09090b;
}

html[data-md-theme="light"] .md-home-heading h2,
html[data-md-theme="light"] .md-ranking-card h2,
html[data-md-theme="light"] .md-card-body h3,
html[data-md-theme="light"] .md-rank-title {
  color: #18181b !important;
}

html[data-md-theme="light"] .md-content-warning {
  background: rgb(180 83 9 / 8%);
  border-color: rgb(180 83 9 / 35%);
  color: #92400e;
}

html[data-md-theme="light"] .md-offer-item--primary {
  background: rgba(225, 29, 72, 0.05);
  border-color: rgba(225, 29, 72, 0.35);
}

html[data-md-theme="light"] .md-offer-notice--unavailable {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

html[data-md-theme="light"] .md-offer-status--unavailable {
  color: #b91c1c;
}

html[data-md-theme="light"] .md-studio-card {
  background: linear-gradient(145deg, #fff, #f4f4f5);
  border-color: #d4d4d8;
}

html[data-md-theme="light"] .md-studio-card--1 {
  --md-studio-accent: 24 24 27;
}

html[data-md-theme="light"] .md-studio-card:hover,
html[data-md-theme="light"] .md-studio-card:focus-visible {
  border-color: rgb(var(--md-studio-accent));
  box-shadow: 0 12px 28px rgb(var(--md-studio-accent) / 18%);
}

html[data-md-theme="light"] .md-studio-card span,
html[data-md-theme="light"] .md-card-meta,
html[data-md-theme="light"] .md-rank-meta,
html[data-md-theme="light"] .md-ranking-card__more {
  color: #52525b !important;
}

html[data-md-theme="light"] .md-legal-page h1,
html[data-md-theme="light"] .md-legal-page h2 {
  color: #18181b !important;
}

html[data-md-theme="light"] .md-ranking-card {
  background: rgb(255 255 255 / 82%);
  border-color: #d4d4d8;
}

html[data-md-theme="light"] .md-secondary-cta,
html[data-md-theme="light"] .md-source-link {
  border-color: #a1a1aa;
  color: #3f3f46;
}

html[data-md-theme="light"] .md-secondary-cta:hover,
html[data-md-theme="light"] .md-source-link:hover {
  background: #f4f4f5;
  border-color: #71717a;
  color: #09090b;
}

html[data-md-theme="light"] .md-ad {
  background-color: #e4e4e7;
  border-color: #d4d4d8;
  color: #71717a;
}

html[data-md-theme="light"] .md-ad small {
  background: #d4d4d8;
  color: #52525b;
}

html[data-md-theme="light"] .md-site-footer {
  background: #fff;
  border-top-color: #d4d4d8;
}

html[data-md-theme="light"] .md-site-footer a {
  color: #52525b;
}

html[data-md-theme="light"] .md-utility-button {
  background: rgb(255 255 255 / 92%);
  border-color: #d4d4d8;
  box-shadow: 0 12px 30px rgb(24 24 27 / 14%);
  color: #3f3f46;
}

html[data-md-theme="light"] .md-utility-button:hover {
  background: var(--md-brand);
  border-color: var(--md-brand);
  color: #fff;
}

html[data-md-theme="light"] .md-utility-button.is-copied {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

html[data-md-theme="light"] .md-mobile-nav {
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  background: rgba(255, 255, 255, 0.84);
  border-top-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
}

html[data-md-theme="light"] .md-mobile-nav a[aria-current="page"] {
  color: #e11d48;
}

html[data-md-theme="light"] .md-card-media {
  background: #f4f4f5;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.1), inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
}

html[data-md-theme="light"] .md-panel {
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.04), inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
}

@media (max-width: 767px) {
  html[data-md-theme="light"] .home .md-site-header {
    background: linear-gradient(180deg, rgb(0 0 0 / 82%), transparent);
  }

  html[data-md-theme="light"] .home .md-brand__logo {
    background-image: url("assets/images/microdramabase-logo-on-dark.png");
  }

  html[data-md-theme="light"] .home .md-icon-button,
  html[data-md-theme="light"] .home .md-mobile-search {
    color: #fff;
  }

  html[data-md-theme="light"] .md-single-hero {
    background: linear-gradient(180deg, #e4e4e7 0%, #ffffff 100%);
    border-bottom-color: #d4d4d8;
  }

  html[data-md-theme="light"] .md-single-hero__shade {
    background: linear-gradient(180deg, rgb(255 255 255 / 78%) 0%, #ffffff 100%);
  }

  html[data-md-theme="light"] .md-single-topbar > a,
  html[data-md-theme="light"] .md-single-topbar > div > a,
  html[data-md-theme="light"] .md-single-topbar .md-language-button {
    background: rgb(255 255 255 / 88%);
    border-color: #d4d4d8;
    color: #18181b;
  }

  html[data-md-theme="light"] .md-single-copy {
    background: transparent;
  }

  html[data-md-theme="light"] .md-single-title-row h1,
  html[data-md-theme="light"] .md-single-description {
    color: #18181b;
  }

  html[data-md-theme="light"] .md-single-meta,
  html[data-md-theme="light"] .md-single-rating span,
  html[data-md-theme="light"] .md-original-title {
    color: #52525b;
  }

  html[data-md-theme="light"] .md-home-hero__eyebrow {
    background: rgba(225, 29, 72, 0.08);
    border-color: rgba(225, 29, 72, 0.25);
    color: var(--md-brand-strong);
  }

  html[data-md-theme="light"] .md-home-hero__meta > strong {
    background: #fff;
    border-color: rgba(202, 138, 4, 0.35);
    box-shadow: 0 2px 8px rgba(202, 138, 4, 0.14);
    color: #b45309;
  }

  html[data-md-theme="light"] .md-single-rating {
    background: rgba(250, 204, 21, 0.16);
    border-color: rgba(202, 138, 4, 0.35);
  }

  html[data-md-theme="light"] .md-single-rating strong {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #b45309;
  }

  html[data-md-theme="light"] .md-single-platform {
    color: #be123c;
  }

  html[data-md-theme="light"] .md-single-tags .md-tag {
    background: #e4e4e7;
    border-color: #d4d4d8;
    color: #3f3f46;
  }

  html[data-md-theme="light"] .md-single-actions .md-primary-cta {
    background: linear-gradient(135deg, var(--md-brand) 0%, #be123c 100%);
    color: #fff;
  }

  html[data-md-theme="light"] .md-single-actions .md-primary-cta:hover {
    background: var(--md-brand-strong);
    color: #fff;
  }

  /* The no-offer variant stays visually neutral on light mobile as well. */
  html[data-md-theme="light"] .md-single-actions .md-primary-cta--no-offer,
  html[data-md-theme="light"] .md-single-actions .md-primary-cta--no-offer:hover {
    background: #e4e4e7;
    color: #18181b;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .md-home-hero__poster:hover,
  .md-single-poster:hover,
  .md-drama-card:where(:hover),
  .md-drama-card:where(:hover) .md-card-media img,
  .md-drama-card.is-preview-open .md-card-media img,
  .md-studio-card:hover,
  .md-ranking-card li:hover .md-rank-number,
  .md-ranking-card li:hover .md-rank-poster,
  .md-ranking-card li:hover .md-rank-poster img {
    transform: none;
  }

  .md-home-hero__progress {
    display: none;
  }
}

/* Drama sharing and QR poster */
.md-share-trigger {
  background: transparent;
  cursor: pointer;
}

.md-share-trigger svg {
  fill: none;
  height: 1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1rem;
}

.md-share-dialog {
  background: transparent;
  border: 0;
  color: var(--md-text);
  margin: auto;
  max-height: calc(100dvh - 2rem);
  max-width: min(1120px, calc(100vw - 2rem));
  overflow: visible;
  padding: 0;
  width: 100%;
}

.md-share-dialog::backdrop {
  backdrop-filter: blur(12px);
  background: rgb(3 7 18 / 78%);
}

.md-share-dialog__surface {
  background:
    radial-gradient(circle at 0 0, rgb(225 29 72 / 16%), transparent 34%),
    #111114;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 1.5rem;
  box-shadow: 0 36px 100px rgb(0 0 0 / 62%);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
}

.md-share-dialog__header {
  align-items: flex-start;
  border-bottom: 1px solid rgb(255 255 255 / 9%);
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 1.6rem 1.75rem 1.35rem;
}

.md-share-dialog__header .md-eyebrow {
  margin: 0 0 0.35rem;
}

.md-share-dialog__header h2 {
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
  margin: 0;
}

.md-share-dialog__header p:last-child {
  color: #a1a1aa;
  line-height: 1.55;
  margin: 0.55rem 0 0;
}

.md-share-dialog__close {
  align-items: center;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 50%;
  color: #f4f4f5;
  cursor: pointer;
  display: flex;
  flex: 0 0 auto;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.md-share-dialog__close:hover {
  background: var(--md-brand);
  border-color: var(--md-brand);
}

.md-share-dialog__close svg {
  fill: none;
  height: 1.15rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
  width: 1.15rem;
}

.md-share-dialog__body {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  padding: 1.75rem;
}

.md-share-dialog__body--options-only {
  grid-template-columns: minmax(0, 1fr);
}

.md-share-dialog__options {
  min-width: 0;
}

.md-share-channels {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.md-share-channel {
  align-items: center;
  background: #18181b;
  border: 1px solid #2d2d32;
  border-radius: 0.85rem;
  color: #e4e4e7;
  display: flex;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 0.65rem;
  min-height: 3.35rem;
  padding: 0.65rem;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.md-share-channel:hover {
  border-color: #52525b;
  color: #fff;
  transform: translateY(-2px);
}

.md-share-channel > span {
  align-items: center;
  background: #3f3f46;
  border-radius: 0.55rem;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-size: 0.9rem;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.md-share-channel--facebook > span { background: #1877f2; }
.md-share-channel--x > span { background: #050505; }
.md-share-channel--whatsapp > span { background: #20b859; }
.md-share-channel--telegram > span { background: #229ed9; }
.md-share-channel--weibo > span { background: #e6162d; }
.md-share-channel--email > span { background: #7c3aed; }

.md-share-utility-row {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.md-share-utility-row button {
  background: transparent;
  border: 1px solid #3f3f46;
  border-radius: 999px;
  color: #d4d4d8;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  min-height: 2.7rem;
  padding: 0.6rem 1rem;
}

.md-share-utility-row button:hover,
.md-share-utility-row button.is-copied {
  background: #27272a;
  border-color: #71717a;
  color: #fff;
}

.md-share-utility-row button.is-copied {
  border-color: #22c55e;
  color: #86efac;
}

.md-share-poster-callout {
  align-items: center;
  background:
    linear-gradient(120deg, rgb(225 29 72 / 18%), rgb(124 58 237 / 13%)),
    #18181b;
  border: 1px solid rgb(244 63 94 / 28%);
  border-radius: 1rem;
  display: flex;
  gap: 1.2rem;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 1rem;
}

.md-share-poster-callout strong {
  color: #fff;
  display: block;
  font-size: 0.95rem;
}

.md-share-poster-callout p {
  color: #a1a1aa;
  font-size: 0.76rem;
  line-height: 1.5;
  margin: 0.35rem 0 0;
  max-width: 32rem;
}

.md-share-poster-callout .md-button {
  border: 0;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}

.md-share-poster-callout .md-button[disabled] {
  cursor: wait;
  opacity: 0.58;
}

.md-share-poster-callout .md-button.is-busy::before {
  animation: md-spin 0.8s linear infinite;
  border: 2px solid rgb(255 255 255 / 35%);
  border-radius: 50%;
  border-top-color: #fff;
  content: "";
  flex: 0 0 auto;
  height: 0.95rem;
  width: 0.95rem;
}

.md-share-dialog__status {
  color: #a1a1aa;
  font-size: 0.76rem;
  min-height: 1.2rem;
  margin: 0.75rem 0 0;
}

.md-share-dialog__status.is-error {
  color: #fda4af;
}

.md-share-preview {
  align-items: center;
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  justify-content: center;
  min-height: 330px;
  padding: 0.85rem;
}

.md-share-preview[hidden] {
  display: none;
}

.md-share-preview img {
  background: #18181b;
  border-radius: 0.75rem;
  box-shadow: 0 18px 44px rgb(0 0 0 / 44%);
  display: block;
  height: auto;
  max-height: min(58dvh, 590px);
  max-width: 100%;
  object-fit: contain;
}

.md-share-download {
  justify-content: center;
  text-decoration: none;
  width: 100%;
}

html[data-md-theme="light"] .md-share-dialog__surface {
  background:
    radial-gradient(circle at 0 0, rgb(225 29 72 / 12%), transparent 34%),
    #fff;
  border-color: #e4e4e7;
  color: #18181b;
}

html[data-md-theme="light"] .md-share-dialog__header {
  border-color: #e4e4e7;
}

html[data-md-theme="light"] .md-share-dialog__header h2,
html[data-md-theme="light"] .md-share-poster-callout strong {
  color: #18181b;
}

html[data-md-theme="light"] .md-share-dialog__header p:last-child,
html[data-md-theme="light"] .md-share-poster-callout p,
html[data-md-theme="light"] .md-share-dialog__status {
  color: #52525b;
}

html[data-md-theme="light"] .md-share-channel,
html[data-md-theme="light"] .md-share-poster-callout {
  background-color: #fafafa;
  border-color: #e4e4e7;
  color: #27272a;
}

html[data-md-theme="light"] .md-share-preview {
  background: #f4f4f5;
  border-color: #e4e4e7;
}

@media (max-width: 768px) {
  .md-share-dialog {
    max-height: calc(100dvh - 1rem);
    max-width: calc(100vw - 1rem);
  }

  .md-share-dialog__surface {
    border-radius: 1.1rem;
    max-height: calc(100dvh - 1rem);
  }

  .md-share-dialog__header {
    padding: 1.25rem 1.15rem 1rem;
  }

  .md-share-dialog__body {
    display: block;
    padding: 1.15rem;
  }

  .md-share-preview {
    margin-top: 1rem;
  }
}

@media (max-width: 640px) {
  .md-share-channels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md-share-poster-callout {
    align-items: stretch;
    flex-direction: column;
  }

  .md-share-poster-callout .md-button {
    justify-content: center;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .md-share-channel {
    transition: none;
  }
}

/* Mix Tabs UI */
.md-mix-tabs {
  margin-top: clamp(2.5rem, 4.5vw, 3.75rem);
}
.md-mix-tabs__nav {
  align-items: center;
  border-bottom: 2px solid var(--md-line);
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  position: relative;
  scrollbar-width: none;
}
.md-mix-tabs__nav::-webkit-scrollbar { display: none; }
.md-mix-tabs__btn {
  background: transparent;
  border: 0;
  border-radius: var(--md-radius-sm) var(--md-radius-sm) 0 0;
  color: var(--md-muted);
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  min-height: 44px;
  padding: 0.75rem 1rem 0.95rem;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.md-mix-tabs__btn:hover {
  color: var(--md-text);
}
.md-mix-tabs__btn.active {
  background: linear-gradient(180deg, transparent 0%, rgba(225, 29, 72, 0.12) 100%);
  color: #fff;
}
html[data-md-theme="light"] .md-mix-tabs__btn.active {
  background: linear-gradient(180deg, transparent 0%, rgba(225, 29, 72, 0.08) 100%);
  color: var(--md-brand-strong);
}
.md-mix-tabs__btn.active::after {
  background: linear-gradient(90deg, var(--md-brand) 0%, #fb7185 100%);
  border-radius: 3px 3px 0 0;
  bottom: -2px;
  box-shadow: 0 0 10px rgba(225, 29, 72, 0.5);
  content: '';
  height: 3px;
  left: 0;
  position: absolute;
  width: 100%;
}
.md-mix-tabs__more {
  align-items: center;
  align-self: center;
  color: var(--md-brand);
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 750;
  gap: 0.25rem;
  margin-left: auto;
  min-height: 44px;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.md-mix-tabs__more:hover {
  color: #fb7185;
  transform: translateX(3px);
}

.md-mix-tabs__content[hidden] { display: none; }
.md-mix-tabs__description { color: var(--md-muted); font-size: 0.85rem; margin: 0 0 1.25rem; }
.md-mix-tabs__loader { display: block; margin-block-start: 1rem; width: 100%; }
.md-mix-tabs__loader[hidden] { display: none; }
@keyframes md-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.md-skeleton-grid {
  display: grid;
  gap: clamp(1rem, 1.8vw, 1.5rem);
  grid-template-columns: repeat(var(--md-home-grid-columns, 5), minmax(0, 1fr));
  width: 100%;
}
.md-skeleton-card { display: flex; flex-direction: column; gap: 0.65rem; min-width: 0; pointer-events: none; user-select: none; }
.md-skeleton-poster {
  aspect-ratio: var(--md-poster-aspect, 9 / 16);
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
  width: 100%;
}
.md-skeleton-poster::after,
.md-skeleton-line::after,
.md-skeleton-badge::after,
.md-skeleton-meta-pill::after {
  animation: md-shimmer 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.07) 50%, transparent 100%);
  content: '';
  inset: 0;
  position: absolute;
  transform: translateX(-100%);
}
html[data-md-theme="light"] .md-skeleton-poster::after,
html[data-md-theme="light"] .md-skeleton-line::after,
html[data-md-theme="light"] .md-skeleton-badge::after,
html[data-md-theme="light"] .md-skeleton-meta-pill::after {
  background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.05) 50%, transparent 100%);
}
.md-skeleton-badge { background: rgba(255, 255, 255, 0.08); border-radius: 0.35rem; height: 1.15rem; left: 0.5rem; overflow: hidden; position: absolute; top: 0.5rem; width: 2.25rem; z-index: 2; }
.md-skeleton-meta-pill { background: rgba(255, 255, 255, 0.08); border-radius: 0.35rem; bottom: 0.5rem; height: 1rem; overflow: hidden; position: absolute; right: 0.5rem; width: 2.75rem; z-index: 2; }
.md-skeleton-line { background: var(--md-surface); border-radius: 4px; height: 0.875rem; overflow: hidden; position: relative; }
.md-skeleton-line--title { width: 82%; }
.md-skeleton-line--short { height: 0.75rem; width: 52%; }
@media (max-width: 999.98px) { .md-skeleton-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 689.98px) { .md-skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.md-mix-tabs__status { color: var(--md-muted); font-size: 0.85rem; margin: 1rem 0 0; text-align: center; }
.md-mix-tabs__status:empty { display: none; }
.md-mix-tabs__load-more { display: flex; margin: 1.4rem auto 0; width: max-content; }
.md-mix-tabs__load-more[hidden] { display: none; }
@keyframes md-spin { to { transform: rotate(360deg); } }

/* Timeline / Kuaixun UI */
.md-updates-widget { margin-bottom: 0; }
.md-updates-widget__heading { align-items: baseline; display: flex; justify-content: space-between; margin-bottom: 1.2rem; }
.md-updates-widget__heading h2 { align-items: center; display: flex; font-size: 1.05rem; gap: 0.55rem; margin: 0; }
.md-updates-widget__heading h2 > span { background: var(--md-brand); border-radius: 50%; box-shadow: 0 0 10px var(--md-brand); height: 0.5rem; width: 0.5rem; }
.md-updates-widget__heading > a { color: var(--md-brand); font-size: 0.75rem; font-weight: 750; text-decoration: none; }
.md-update-timeline { border-left: 2px solid var(--md-line); margin-left: 0.3rem; padding-left: 1.15rem; }
.md-update-item { margin-bottom: 1.15rem; position: relative; }
.md-update-item:last-child { margin-bottom: 0; }
.md-update-item__dot { background: var(--md-surface); border: 2px solid var(--md-brand); border-radius: 50%; height: 0.65rem; left: -1.55rem; position: absolute; top: 0.3rem; transition: background-color 0.2s ease; width: 0.65rem; }
.md-update-item:hover .md-update-item__dot { background: var(--md-brand); }
.md-update-item__meta { align-items: center; color: var(--md-muted); display: flex; flex-wrap: wrap; font-size: 0.68rem; font-weight: 750; gap: 0.45rem; text-transform: uppercase; }
.md-update-item__meta span { background: rgb(244 63 94 / 12%); border-radius: 99px; color: #fb7185; padding: 0.12rem 0.4rem; }
.md-update-item h2, .md-update-item h3 { font-size: 0.92rem; line-height: 1.4; margin: 0.3rem 0; }
.md-update-item h2 a, .md-update-item h3 a { color: var(--md-text); text-decoration: none; }
.md-update-item h2 a:hover, .md-update-item h3 a:hover { color: var(--md-brand); }
.md-update-item__relation { align-items: center; display: flex; flex-wrap: wrap; font-size: 0.76rem; gap: 0.55rem; margin: 0.25rem 0 0; }
.md-update-item__relation a { color: var(--md-brand); font-weight: 750; text-decoration: none; }
.md-update-item__relation strong { color: var(--md-muted); }
.md-update-item__excerpt { color: var(--md-muted); font-size: 0.9rem; line-height: 1.6; }
.md-update-item__excerpt p { margin: 0; }
.md-update-timeline--archive { margin: 0 auto; max-width: 860px; padding-left: 2rem; }
.md-update-timeline--archive .md-update-item { background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-radius); margin-bottom: 1.5rem; padding: 1.4rem; }
.md-update-timeline--archive .md-update-item__dot { left: -2.46rem; top: 1.75rem; }
.md-update-timeline--archive .md-update-item h2 { font-size: 1.3rem; }
.md-update-detail { max-width: 880px; padding-bottom: 4rem; padding-top: 3rem; width: min(880px, calc(100% - 2rem)); }
.md-update-detail > header { margin-bottom: 2rem; }
.md-update-detail h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; margin: 0.6rem 0 1rem; }
.md-update-detail__meta, .md-update-detail__links { align-items: center; display: flex; flex-wrap: wrap; gap: 1rem; }
.md-update-detail__meta { color: var(--md-muted); }

/* Ranked Sidebar */
.md-ranking-card {
  margin-top: 0;
}
.md-ranking-card li[hidden] { display: none; }
.md-ranking-card__toggle { align-items: center; background: rgb(244 63 94 / 9%); border: 1px solid rgb(244 63 94 / 28%); border-radius: 0.45rem; color: #fb7185; cursor: pointer; display: flex; font-size: 0.76rem; font-weight: 800; gap: 0.45rem; justify-content: center; margin-top: 1.15rem; padding: 0.65rem 0.8rem; transition: background-color 0.2s ease, border-color 0.2s ease; width: 100%; }
.md-ranking-card__toggle:hover, .md-ranking-card__toggle:focus-visible { background: rgb(244 63 94 / 15%); border-color: rgb(244 63 94 / 55%); }
.md-ranking-card__toggle + .md-ranking-card__more { margin-top: 0.9rem; }

/* Collections */
.md-feature-heading { display: block; margin: 2.5rem 0; max-width: 760px; }
.md-feature-heading h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0.4rem 0 0.8rem; }
.md-feature-heading > p:last-child { color: var(--md-muted); font-size: 1.05rem; line-height: 1.6; margin: 0; }
.md-collection-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 4rem; }
.md-collection-card { background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-radius-lg); overflow: hidden; transition: border-color 0.2s ease, transform 0.2s ease; }
.md-collection-card:hover { border-color: var(--md-brand); transform: translateY(-3px); }
.md-collection-card__media { aspect-ratio: 16 / 9; display: block; overflow: hidden; position: relative; }
.md-collection-card__media::after { background: linear-gradient(transparent 40%, rgb(0 0 0 / 80%)); content: ""; inset: 0; position: absolute; }
.md-collection-card__media img { height: 100%; object-fit: cover; transition: transform 0.45s ease; width: 100%; }
.md-collection-card:hover .md-collection-card__media img { transform: scale(1.04); }
.md-collection-card__media span { bottom: 0.8rem; color: #fff; font-size: 0.75rem; font-weight: 800; left: 1rem; position: absolute; z-index: 1; }
.md-collection-card__body { padding: 1.25rem; }
.md-collection-card__body > p { color: var(--md-brand); font-size: 0.7rem; font-weight: 850; letter-spacing: 0.08em; margin: 0; text-transform: uppercase; }
.md-collection-card__body h2 { font-size: 1.25rem; margin: 0.45rem 0; }
.md-collection-card__body h2 a { color: var(--md-text); text-decoration: none; }
.md-collection-card__body > div { color: var(--md-muted); font-size: 0.9rem; line-height: 1.55; }
.md-collection-hero { background-image: linear-gradient(90deg, rgb(5 5 6 / 96%), rgb(5 5 6 / 58%)), var(--md-collection-cover); background-position: center; background-size: cover; min-height: 420px; }
.md-collection-hero__inner { display: flex; flex-direction: column; justify-content: center; min-height: 420px; }
.md-collection-hero__inner h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1.05; margin: 0.5rem 0 1rem; max-width: 860px; }
.md-collection-hero__inner > p:not(.md-eyebrow) { color: #d4d4d8; font-size: 1.05rem; line-height: 1.65; max-width: 680px; }
.md-collection-hero__inner > span { align-self: flex-start; background: rgb(0 0 0 / 45%); border: 1px solid rgb(255 255 255 / 18%); border-radius: 99px; color: #fff; font-size: 0.8rem; font-weight: 800; margin-top: 0.75rem; padding: 0.45rem 0.8rem; }
.md-collection-results { padding-bottom: 4rem; padding-top: 2.5rem; }

/* Review masonry and multi-image cards */
.md-review-masonry { column-count: 3; column-gap: 1.5rem; padding-bottom: 3rem; }
.md-review-card { background: var(--md-surface); border: 1px solid var(--md-line); border-radius: var(--md-radius-lg); break-inside: avoid; display: inline-block; margin: 0 0 1.5rem; overflow: hidden; transition: border-color 0.2s ease, transform 0.2s ease; width: 100%; }
.md-review-card:hover { border-color: var(--md-brand); transform: translateY(-2px); }
.md-review-card__media { display: grid; gap: 2px; grid-template-columns: repeat(2, 1fr); min-height: 190px; overflow: hidden; }
.md-review-card__media img { height: 100%; min-height: 110px; object-fit: cover; width: 100%; }
.md-review-card__media--1 { display: block; }
.md-review-card__media--1 img { aspect-ratio: 16 / 10; }
.md-review-card__media--2 img { min-height: 230px; }
.md-review-card__media--3 img:first-child { grid-row: span 2; }
.md-review-card__media--4 { grid-template-rows: repeat(2, 1fr); }
.md-review-card__body { padding: 1.25rem; }
.md-review-card__drama { color: var(--md-brand); font-size: 0.7rem; font-weight: 850; letter-spacing: 0.06em; margin: 0 0 0.45rem; text-transform: uppercase; }
.md-review-card h2 { font-size: 1.25rem; line-height: 1.35; margin: 0; }
.md-review-card h2 a { color: var(--md-text); text-decoration: none; }
.md-review-card__excerpt { color: var(--md-muted); font-size: 0.9rem; line-height: 1.65; }
.md-review-card footer { border-top: 1px solid var(--md-line); color: var(--md-muted); display: flex; font-size: 0.75rem; justify-content: space-between; margin-top: 1rem; padding-top: 0.9rem; }

@media (max-width: 1024px) {
  .md-collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-review-masonry { column-count: 2; }
}

@media (max-width: 640px) {
  .md-mix-tabs__more { display: none; }
  .md-mix-tabs__description { display: none; }
  .md-collection-grid { grid-template-columns: 1fr; }
  .md-collection-hero, .md-collection-hero__inner { min-height: 360px; }
  .md-review-masonry { column-count: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .md-mix-tabs__loader > span:first-child,
  .md-skeleton-poster::after,
  .md-skeleton-line::after,
  .md-skeleton-badge::after,
  .md-skeleton-meta-pill::after {
    animation: none;
  }
}

/* ==========================================================================
   Watchlist (My List) Button & Account Dashboard Styles
   ========================================================================== */

.md-card-media {
  position: relative;
}

.md-card-watchlist-btn {
  align-items: center;
  background: rgba(15, 15, 18, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  position: absolute;
  right: 8px;
  top: 8px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  width: 44px;
  z-index: 5;
}

.md-card-watchlist-btn:hover {
  background: rgba(225, 29, 72, 0.9);
  border-color: var(--md-brand);
  color: #fff;
  transform: scale(1.08);
}

.md-card-watchlist-btn .md-icon-bookmark {
  fill: transparent;
  height: 18px;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: fill 0.18s ease, stroke 0.18s ease;
  width: 18px;
}

.md-card-watchlist-btn[data-in-list="true"],
.md-card-watchlist-btn.is-in-list {
  background: var(--md-brand);
  border-color: var(--md-brand-strong);
  color: #fff;
}

.md-card-watchlist-btn[data-in-list="true"] .md-icon-bookmark,
.md-card-watchlist-btn.is-in-list .md-icon-bookmark {
  fill: currentColor;
}

.md-single-watchlist-btn {
  align-items: center;
  display: inline-flex;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.md-single-watchlist-btn .md-icon-bookmark {
  fill: transparent;
  height: 18px;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: fill 0.18s ease;
  width: 18px;
}

.md-single-watchlist-btn[data-in-list="true"],
.md-single-watchlist-btn.is-in-list {
  background: var(--md-brand);
  border-color: var(--md-brand);
  color: #fff;
}

.md-single-watchlist-btn[data-in-list="true"] .md-icon-bookmark,
.md-single-watchlist-btn.is-in-list .md-icon-bookmark {
  fill: currentColor;
}

.md-watchlist-btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Visible (transient) watchlist error message; the aria-live region handles screen readers. */
.md-inline-status {
  color: #fda4af;
  display: block;
  flex-basis: 100%;
  font-size: var(--md-text-xs);
  font-weight: 700;
  line-height: 1.4;
  margin-top: 0.35rem;
}

.md-inline-status[hidden] {
  display: none;
}

/* Light theme: cards sit on light surfaces; the desktop hero stays dark. */
html[data-md-theme="light"] .md-card .md-inline-status {
  color: #b91c1c;
}

@media (max-width: 767px) {
  html[data-md-theme="light"] .md-single-actions .md-inline-status {
    color: #b91c1c;
  }
}

.md-guest-watchlist-banner {
  background: var(--md-brand-subtle);
  border: 1px solid var(--md-brand);
  border-radius: var(--md-radius);
  color: var(--md-text);
  margin-bottom: var(--md-space-md);
  padding: var(--md-space-sm) var(--md-space-md);
}

.md-guest-watchlist-banner[hidden] {
  display: none;
}

.md-guest-watchlist-banner strong {
  color: var(--md-brand);
  display: block;
  font-size: var(--md-text-sm);
  margin-bottom: var(--md-space-3xs);
}

.md-guest-watchlist-banner__text {
  color: var(--md-muted);
  font-size: var(--md-text-xs);
  margin: 0;
}

/* Shared Form Controls & Anti-Spam Honeypot (used by comments.php, account.php, submission-form.php) */
.md-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.md-form-group label {
  color: var(--md-text);
  font-size: 0.9rem;
  font-weight: 600;
}

.md-input {
  background: var(--md-surface-2);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius-sm);
  color: var(--md-text);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s ease, outline 0.2s ease;
  width: 100%;
}

.md-input:focus {
  border-color: var(--md-brand);
  outline: none;
}

.md-honeypot {
  height: 1px;
  inset-inline-start: -10000px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

/* Account & Submission dashboard layout styles moved to assets/account.css (loaded on demand) */

/* Discussion & Comments Area */
.md-comments-area {
  margin-top: 2.5rem;
  padding: 2rem;
}

/* Blocksy can replace the author/email markup and override focus colors. */
.md-comments-area input:is([type="text"], [type="email"], [type="url"]),
.md-comments-area textarea {
  background-color: var(--md-surface-2);
  border-color: var(--md-line);
  color: var(--md-text);
  caret-color: var(--md-text);
}

.md-comments-area input:is([type="text"], [type="email"], [type="url"]):focus,
.md-comments-area textarea:focus {
  background-color: var(--md-surface-2);
  border-color: var(--md-brand);
  color: var(--md-text);
}

.md-comments-area input::placeholder,
.md-comments-area textarea::placeholder {
  color: var(--md-muted);
  opacity: 1;
}

.md-comments-header {
  border-bottom: 1px solid var(--md-line);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.md-comments-title {
  font-size: 1.4rem;
  margin: 0 0 0.25rem;
}

.md-comments-subtitle {
  font-size: 0.9rem;
  margin: 0;
}

.md-comment-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
}

.md-comment-list .comment {
  border-bottom: 1px solid var(--md-line);
  padding-bottom: 1.5rem;
}

.md-comment-list .children {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  list-style: none;
  margin: 1.25rem 0 0 1.5rem;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--md-line);
}

.comment-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-meta {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.comment-author .avatar {
  border-radius: 50%;
  vertical-align: middle;
}

.comment-author .fn {
  color: var(--md-text);
  font-style: normal;
  font-weight: 600;
}

.comment-metadata {
  color: var(--md-muted);
  font-size: 0.8rem;
}

.comment-metadata a {
  color: inherit;
  text-decoration: none;
}

.comment-metadata a:hover {
  text-decoration: underline;
}

.comment-content {
  color: var(--md-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.comment-awaiting-moderation {
  background: rgb(250 204 21 / 10%);
  border: 1px solid rgb(250 204 21 / 32%);
  border-radius: var(--md-radius-sm);
  color: var(--md-warning);
  display: inline-block;
  font-size: var(--md-small-text-min);
  font-weight: 700;
  margin: 0;
  padding: 0.3rem 0.65rem;
}

html[data-md-theme="light"] .comment-awaiting-moderation {
  background: rgb(180 83 9 / 8%);
  border-color: rgb(180 83 9 / 32%);
  color: #92400e;
}

.comment-content p {
  margin: 0 0 0.5rem;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.reply {
  font-size: 0.85rem;
}

.comment-reply-link {
  color: var(--md-accent);
  text-decoration: none;
  font-weight: 500;
}

.comment-reply-link:hover {
  text-decoration: underline;
}

.comment-respond {
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius);
  padding: 1.5rem;
}

.comment-reply-title {
  font-size: 1.2rem;
  margin: 0 0 1rem;
}

.md-comment-policy {
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.md-comments-area .comment-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.md-comments-area .comment-form > * {
  grid-column: 1 / -1;
  margin: 0;
}

.md-comments-area .comment-form-author {
  grid-column: 1;
}

.md-comments-area .comment-form-email {
  grid-column: 2;
}

.md-comments-area .comment-form-cookies-consent {
  align-items: flex-start;
  display: flex;
  font-size: 0.85rem;
  gap: 0.5rem;
}

.md-comments-area .comment-form-cookies-consent input {
  margin-top: 0.2rem;
}

.md-comment-textarea {
  resize: vertical;
  min-height: 90px;
}

@media (max-width: 640px) {
  .md-comments-area .comment-form-author,
  .md-comments-area .comment-form-email {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   ShortTV-Style All Dramas Page Showcase & Multi-Tier Filter Bar
   ========================================================================== */

.md-dramas-main {
  padding-top: 1.5rem;
}

.md-dramas-filter-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

/* Row 1: Genres / Categories Horizontal Navigation */
.md-filter-row--genres {
  border-bottom: 1px solid var(--md-line);
  padding-bottom: 0.4rem;
}

.md-filter-scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.md-filter-scroll-container::-webkit-scrollbar {
  display: none;
}

.md-genre-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  padding-bottom: 0.35rem;
}

.md-genre-tab {
  color: var(--md-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  position: relative;
  text-decoration: none;
  border-radius: var(--md-radius-sm);
  transition: color 180ms ease, background 180ms ease;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.md-genre-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.md-genre-tab.is-active {
  color: #f97316;
  font-weight: 700;
}

.md-genre-tab.is-active::after {
  content: "";
  position: absolute;
  bottom: -0.4rem;
  left: 0.85rem;
  right: 0.85rem;
  height: 2.5px;
  background: #f97316;
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.6);
}

/* Row 2: Tropes / Themes Pill Tags */
.md-filter-row--tropes {
  margin-top: 0.15rem;
}

.md-trope-pills-container {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  position: relative;
}

.md-trope-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.md-filter-pill[hidden],
.md-filter-more-btn[hidden],
.md-home-hero__rotation[hidden] {
  display: none;
}

.md-filter-pill {
  align-items: center;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 9999px;
  color: #a1a1aa;
  display: inline-flex;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.45rem 0.95rem;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  max-width: 100%;
  overflow-wrap: anywhere;
  min-height: 36px;
}

.md-filter-pill:hover {
  background: #27272a;
  border-color: #3f3f46;
  color: #fff;
  transform: translateY(-1px);
}

.md-filter-pill:active {
  transform: translateY(0);
}

.md-filter-pill.is-active {
  background: #e11d48;
  border-color: #e11d48;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.4);
}

.md-filter-pill--sm {
  font-size: 0.75rem;
  font-weight: 500;
  min-height: 28px;
  padding: 0.25rem 0.65rem;
}

.md-trope-operator-switch {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
  margin-left: auto;
  flex-shrink: 0;
}

.md-trope-operator-label {
  color: #71717a;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.md-filter-more-btn {
  align-items: center;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 9999px;
  color: #d4d4d8;
  cursor: pointer;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  gap: 0.35rem;
  line-height: 1;
  min-height: 36px;
  padding: 0.45rem 0.95rem;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.md-filter-more-btn svg {
  height: 14px;
  width: 14px;
  transition: transform 200ms ease;
}

.md-filter-more-btn:hover {
  background: #27272a;
  border-color: #3f3f46;
  color: #fff;
}

.md-filter-more-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Row 3: Section Toolbar, Titles, Count & Sort */
.md-dramas-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-block: 0.75rem 0.25rem;
}

.md-dramas-toolbar__start {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.md-dramas-title {
  color: var(--md-text);
  font-size: clamp(1.35rem, 2.2vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

.md-dramas-count {
  color: var(--md-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.md-clear-filters-btn {
  align-items: center;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 9999px;
  color: #fb7185;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 600;
  gap: 0.3rem;
  line-height: 1;
  padding: 0.3rem 0.65rem;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.md-clear-filters-btn svg {
  height: 12px;
  width: 12px;
}

.md-clear-filters-btn:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fff;
}

.md-sort-tabs {
  align-items: center;
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-radius: 9999px;
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.25rem;
}

.md-sort-tab {
  align-items: center;
  border-radius: 9999px;
  color: var(--md-muted);
  display: inline-flex;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.35rem 0.75rem;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.md-sort-tab:hover {
  color: var(--md-text);
}

.md-sort-tab.is-active {
  background: var(--md-surface-2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  color: var(--md-text);
  font-weight: 700;
}

/* High-Density Responsive Poster Grid */
.md-grid--dramas {
  display: grid;
  gap: clamp(0.75rem, 1.8vw, 1.35rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

@media (min-width: 480px) {
  .md-grid--dramas {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 680px) {
  .md-grid--dramas {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .md-grid--dramas {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .md-grid--dramas {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1480px) {
  .md-grid--dramas {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

/* Light Theme Adaptations for All Dramas Page */
html[data-md-theme="light"] .md-genre-tab {
  color: #71717a;
}

html[data-md-theme="light"] .md-genre-tab:hover {
  color: #09090b;
  background: rgba(0, 0, 0, 0.04);
}

html[data-md-theme="light"] .md-genre-tab.is-active {
  color: #ea580c;
}

html[data-md-theme="light"] .md-genre-tab.is-active::after {
  background: #ea580c;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.4);
}

html[data-md-theme="light"] .md-filter-pill {
  background: #f4f4f5;
  border-color: #e4e4e7;
  color: #52525b;
}

html[data-md-theme="light"] .md-filter-pill:hover {
  background: #e4e4e7;
  border-color: #d4d4d8;
  color: #09090b;
}

html[data-md-theme="light"] .md-filter-pill.is-active {
  background: #e11d48;
  border-color: #e11d48;
  color: #fff;
}

html[data-md-theme="light"] .md-filter-more-btn {
  background: #f4f4f5;
  border-color: #e4e4e7;
  color: #52525b;
}

html[data-md-theme="light"] .md-filter-more-btn:hover {
  background: #e4e4e7;
  border-color: #d4d4d8;
  color: #09090b;
}

html[data-md-theme="light"] .md-clear-filters-btn {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.2);
  color: #e11d48;
}

html[data-md-theme="light"] .md-clear-filters-btn:hover {
  background: rgba(225, 29, 72, 0.15);
  color: #be123c;
}

html[data-md-theme="light"] .md-sort-tabs {
  background: #f4f4f5;
  border-color: #e4e4e7;
}

html[data-md-theme="light"] .md-sort-tab.is-active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  color: #09090b;
}

html[data-md-theme="light"] .md-pagination .page-numbers {
  background: #f4f4f5;
  border-color: #e4e4e7;
  color: #52525b;
}

html[data-md-theme="light"] .md-pagination .page-numbers:hover {
  background: #e4e4e7;
  border-color: #d4d4d8;
  color: #09090b;
}

html[data-md-theme="light"] .md-pagination .page-numbers.current,
html[data-md-theme="light"] .md-pagination .page-numbers[aria-current="page"] {
  background: #ea580c;
  border-color: #ea580c;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
  color: #ffffff;
}

html[data-md-theme="light"] .md-pagination .page-numbers.dots {
  background: transparent;
  border-color: transparent;
  color: #a1a1aa;
}

html[data-md-theme="light"] .md-pagination .page-numbers.is-disabled {
  background: #f4f4f5;
  border-color: transparent;
  opacity: 0.35;
}

/* Actor Profile & Credits (MD-P1-03) */
.md-card-character {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: var(--md-text-xs, 0.75rem);
  line-height: 1.25;
  margin-top: 0.2rem;
  min-width: 0;
}

.md-card-character__role {
  color: var(--md-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.md-card-character__role .md-muted {
  font-weight: 500;
  opacity: 0.85;
}

.md-card-credit-badge {
  align-items: center;
  background: var(--md-surface-2, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--md-line, rgba(255, 255, 255, 0.1));
  border-radius: var(--md-radius-sm, 4px);
  color: var(--md-muted, #d4d4d8);
  display: inline-flex;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  padding: 0.1rem 0.35rem;
  text-transform: uppercase;
}

.md-card-credit-badge.md-badge--lead {
  background: rgba(225, 29, 72, 0.15);
  border-color: rgba(225, 29, 72, 0.3);
  color: #fb7185;
}

.md-card-credit-badge.md-badge--supporting {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.md-card-credit-badge.md-badge--cameo,
.md-card-credit-badge.md-badge--guest {
  background: rgba(161, 161, 170, 0.15);
  border-color: rgba(161, 161, 170, 0.3);
  color: #d4d4d8;
}

html[data-md-theme="light"] .md-card-credit-badge.md-badge--lead {
  background: rgba(225, 29, 72, 0.1);
  border-color: rgba(225, 29, 72, 0.25);
  color: #e11d48;
}

html[data-md-theme="light"] .md-card-credit-badge.md-badge--supporting {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
  color: #2563eb;
}

.md-entity-aliases {
  align-items: baseline;
  color: var(--md-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.md-entity-native-name {
  color: var(--md-text);
  font-size: 1.15rem;
  font-weight: 600;
}

.md-entity-aka {
  font-size: 0.9rem;
}

.md-actor-external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.md-actor-credits-section {
  margin-top: 2.5rem;
}

.md-credits-heading {
  align-items: center;
  border-bottom: 1px solid var(--md-line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.md-credits-heading__title-group {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.md-credits-heading__title-group h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.md-credits-count-pill {
  align-items: center;
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-radius: 9999px;
  color: var(--md-muted);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  justify-content: center;
  padding: 0.15rem 0.6rem;
}

.md-credits-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.md-role-filter-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.md-filter-pill__count {
  font-size: 0.75rem;
  margin-left: 0.35rem;
  opacity: 0.8;
}

.md-actor-bio-placeholder {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-top: 0.75rem;
}

/* Catalog controls share the theme palette in both color modes. */
.md-desktop-nav a {
  white-space: nowrap;
}

@media (min-width: 1200px) and (max-width: 1359px) {
  .md-header-search input {
    width: 11rem;
  }
}

.md-catalog-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 42rem;
  margin-bottom: 0.4rem;
}

.md-catalog-search input[type="search"],
.md-catalog-facets select,
.md-catalog-facets input[type="number"] {
  background-color: var(--md-surface);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius-sm);
  color: var(--md-text);
  font: inherit;
  min-width: 0;
  min-height: 44px;
}

.md-catalog-facets input[type="number"] {
  padding-inline: 0.75rem;
}

.md-catalog-search input[type="search"] {
  flex: 1;
  width: 100%;
  padding-inline: 0.9rem;
}

.md-catalog-search input::placeholder {
  color: var(--md-muted);
}

.md-catalog-search .md-button {
  flex-shrink: 0;
  min-height: 44px;
}

.md-catalog-filters {
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius);
  background: var(--md-surface);
}

.md-catalog-filters summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  color: var(--md-text);
  font-size: 0.875rem;
  font-weight: 600;
}

summary:focus-visible {
  outline: 3px solid var(--md-accent);
  outline-offset: 3px;
}

.md-catalog-facets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  align-items: end;
  gap: 1rem;
  padding: 0.25rem 1rem 1rem;
}

.md-catalog-facets label {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  color: var(--md-muted);
  font-size: 0.875rem;
}

.md-catalog-facets select,
.md-catalog-facets input[type="number"] {
  width: 100%;
}

.md-catalog-facets .md-button {
  min-height: 44px;
  align-self: end;
}

.md-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.md-active-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 100%;
  min-height: 36px;
  padding: 0.4rem 0.8rem;
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-radius: 999px;
  color: var(--md-text);
  font-size: 0.8125rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.md-active-filter:hover {
  color: var(--md-text);
  border-color: var(--md-brand);
  background: var(--md-surface-2);
}

.md-home-hero__rotation {
  position: absolute;
  z-index: 10;
  inset-inline-end: 1rem;
  bottom: 1rem;
  min-height: 44px;
  max-width: calc(100% - 9rem);
  padding: 0.5rem 0.85rem;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 999px;
  background: rgb(0 0 0 / 72%);
  color: #fff;
  font-size: 0.8125rem;
  cursor: pointer;
}

.md-home-hero__rotation:hover {
  background: #18181b;
}

@media (max-width: 1199px) {
  .md-has-js .md-home-hero .md-home-hero__control {
    display: flex;
    top: auto;
    bottom: 1rem;
    height: 44px;
    width: 44px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .md-home-hero__control--previous {
    left: auto;
    right: auto;
    inset-inline-start: 1rem;
  }

  .md-home-hero__control--next {
    left: auto;
    right: auto;
    inset-inline-start: 4.25rem;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .md-header-search input {
    width: clamp(160px, 22vw, 240px);
  }

  /* Let the longest featured title set the shared slide height on tablets. */
  .md-home-hero {
    display: grid;
    height: auto;
    min-height: 480px;
  }

  .md-home-hero__slide {
    position: relative;
    grid-area: 1 / 1;
  }

  .md-home-hero__content {
    height: auto;
    min-height: 480px;
    padding-bottom: 5.5rem;
  }
}

@media (max-width: 767px) {
  .md-home-hero__rotation {
    bottom: auto;
    max-width: calc(100% - 2rem);
    top: 6rem;
  }

  .md-home-hero__control--next {
    inset-inline-end: 1rem;
    inset-inline-start: auto;
  }

  .md-home-hero__copy {
    padding-bottom: 5.5rem;
  }

  body .trp-language-switcher.trp-floating-switcher.trp-switcher-position-bottom {
    bottom: calc(100px + env(safe-area-inset-bottom));
    left: 1rem;
    right: auto;
    max-width: calc(100% - 6rem);
    border-radius: var(--md-radius-sm);
  }

  .md-catalog-facets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .md-catalog-facets .md-button {
    grid-column: 1 / -1;
  }

  .md-catalog-search input[type="search"],
  .md-catalog-facets select,
  .md-catalog-facets input[type="number"] {
    font-size: 16px;
  }

  .md-filter-pill,
  .md-filter-more-btn {
    min-height: 44px;
    min-width: 44px;
  }

  .md-home-hero__dots {
    bottom: 1rem;
    max-width: calc(100% - 7.25rem);
    padding-inline: 0;
  }

  .md-home-hero__dot {
    margin-inline: -6px;
  }

  .md-mix-tabs__btn {
    min-height: 44px;
    padding-inline: 0.85rem;
  }
}
