/**
 * Anime Phoenix — Michi (道) Watch Orders Stylesheet
 *
 * Catalog (/michi), Franchise Guides (/michi/<slug>) and legal pages
 * (/privacy, /terms). Shared header/drawer/footer live in components.css.
 *
 * Design language — "Phoenix magazine":
 *   • Phoenix identity is strictly crimson (no gold anywhere on these pages).
 *   • Magazine header row: display title + live search above a red rule.
 *   • 2:3 poster grid with deep bottom shade — titles stay readable on any
 *     artwork (light posters included) via gradient + hard text shadow.
 *   • Guide steps are two-column cards: notes on the start side, poster
 *     thumbnail + red "watch this part" button on the end side.
 *   • Solid header chrome; generous top clearance on every page hero.
 */

/* ==========================================================================
   1. Page scaffolding + header chrome
   ========================================================================== */

.michi-page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #0a0a0c;
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden;
  scroll-padding-top: calc(var(--header-height) + 72px);
}

.michi-page-wrapper > main {
  flex: 1 0 auto;
  width: 100%;
}

.michi-page-wrapper .site-header {
  background: var(--bg-glass-heavy);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom-color: transparent;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.michi-container {
  width: 100%;
  max-width: var(--max-width-container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* Wider canvas on large screens - the magazine breathes */
@media (min-width: 1600px) {
  .michi-container {
    max-width: 1480px;
  }
}

@media (min-width: 2000px) {
  .michi-container {
    max-width: 1660px;
  }
}

.michi-narrow-container {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* Guide reading column also gains room on very large displays */
@media (min-width: 1600px) {
  .michi-narrow-container {
    max-width: 1180px;
  }
}

.michi-page-wrapper .hidden {
  display: none !important;
}

/* Breadcrumb */
.michi-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-5) 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.michi-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.michi-breadcrumb a:hover {
  color: var(--color-primary-text);
}

.michi-breadcrumb a:focus-visible {
  outline: 2px solid var(--color-primary-text);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.michi-breadcrumb .sep {
  color: var(--text-dim);
  user-select: none;
}

.michi-breadcrumb .current {
  color: var(--text-secondary);
}

/* Red flame word inside display headings — Phoenix identity, never gold.
   Gentle animated shift keeps it alive without stealing attention. */
.michi-title-accent {
  background: linear-gradient(100deg, var(--color-primary-text) 20%, #ff6b4a 50%, var(--color-primary-text) 80%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--color-primary-text);
  animation: michi-flame 7s linear infinite;
}

@keyframes michi-flame {
  to { background-position: 220% center; }
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .michi-title-accent {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--color-primary-text);
    animation: none;
  }
}

/* Eyebrow badge */
.michi-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-primary-text);
}

.michi-hero-badge::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
}

/* ==========================================================================
   2. Catalog — magazine header + poster grid
   ========================================================================== */

.michi-hero {
  position: relative;
  padding: calc(var(--header-height) + 6rem) 0 0;
  /* Same color path as the guide-page header scrim: deep charcoal fading
     from top, warm crimson tint rising from the bottom edge */
  background:
    linear-gradient(180deg, rgba(10, 10, 12, 0.94) 0%, rgba(10, 10, 12, 0.88) 42%, rgb(10 10 12) 100%),
    linear-gradient(0deg, rgba(94, 4, 23, 0.42) 0%, transparent 55%);
  overflow: hidden;
}

/* Phoenix emblem watermark — a ghost of the homepage hero core, anchored
   to the far edge of the magazine header. Purely decorative. */
.michi-hero-emblem {
  position: absolute;
  z-index: 0;
  top: 10%;
  inset-inline-end: -5%;
  width: clamp(300px, 36vw, 560px);
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: radial-gradient(circle, #000 40%, transparent 78%);
  mask-image: radial-gradient(circle, #000 40%, transparent 78%);
  animation: michi-emblem-breathe 11s ease-in-out infinite alternate;
}

.michi-hero-emblem img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.12;
}

.michi-hero .michi-container {
  position: relative;
  z-index: 1;
}

/* Rising ember particles + drifting glows — fixed page-wide Phoenix fire.
   Sits under all content, over the body background. */
.michi-embers {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.michi-page-wrapper > main,
.michi-page-wrapper > header,
.michi-page-wrapper > nav,
.michi-page-wrapper > footer {
  position: relative;
  z-index: 1;
}

.michi-embers-glow {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(182, 9, 45, 0.07) 0%, transparent 62%);
  animation: michi-glow-drift 26s ease-in-out infinite alternate;
  will-change: transform;
}

.michi-embers-glow-a {
  top: -18vmax;
  inset-inline-start: -10vmax;
}

.michi-embers-glow-b {
  bottom: -16vmax;
  inset-inline-end: -12vmax;
  animation-duration: 34s;
  animation-direction: alternate-reverse;
}

@keyframes michi-glow-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 4vmax, 0) scale(1.15); }
}

.michi-ember {
  position: absolute;
  bottom: -12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(239, 43, 86, 0.75);
  box-shadow: 0 0 6px 1px rgba(182, 9, 45, 0.55);
  opacity: 0;
  animation: michi-ember-rise 11s linear infinite;
  animation-delay: calc(var(--e-i) * -0.9s);
  will-change: transform, opacity;
}

@keyframes michi-ember-rise {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0;
  }
  12% {
    opacity: 0.75;
  }
  55% {
    opacity: 0.45;
  }
  100% {
    transform: translate3d(var(--e-x, 30px), calc(-1 * var(--e-h, 60vh)), 0) scale(0.4);
    opacity: 0;
  }
}

/* Deterministic per-ember variety without inline styles.
   --e-i seeds the staggered negative animation-delay (unitless seconds). */
.michi-ember:nth-child(3n)     { --e-x: -46px; --e-h: 62vh; --e-i: 1.4; left: 12%; animation-duration: 12s; }
.michi-ember:nth-child(3n+1)   { --e-x: 34px;  --e-h: 48vh; --e-i: 5.2; left: 38%; animation-duration: 9.5s; }
.michi-ember:nth-child(3n+2)   { --e-x: -22px; --e-h: 55vh; --e-i: 9.7; left: 64%; animation-duration: 13s; }
.michi-ember:nth-child(1)      { --e-i: 0.3; }
.michi-ember:nth-child(4)      { --e-i: 2.1; left: 22%; }
.michi-ember:nth-child(8)      { --e-i: 3.4; left: 50%; }
.michi-ember:nth-child(11)     { --e-i: 4.6; left: 78%; }
.michi-ember:nth-child(14)     { --e-i: 6.1; left: 88%; }
.michi-ember:nth-child(18)     { --e-i: 7.3; left: 30%; }
.michi-ember:nth-child(22)     { --e-i: 8.5; left: 58%; }
.michi-ember:nth-child(26)     { --e-i: 10.9; left: 94%; }
.michi-ember:nth-child(5n)     { width: 3px; height: 3px; }
.michi-ember:nth-child(7n)     { width: 5px; height: 5px; }
.michi-ember:nth-child(11n)    { width: 6px; height: 6px; }

.michi-hero .michi-breadcrumb {
  padding-top: 0;
}

/* Full-width display title — flame accent word */
/* Title row: heading + kanji seal side by side. In RTL the seal lands to the
   LEFT of the title - reading like a Japanese hanko stamped at the end of the line */
.michi-hero-title-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 0 0 0.9rem;
}

.michi-hero-title {
  margin: 0;
  font-family: var(--font-arabic);
  font-size: clamp(1.9rem, 4.6vw, 3.6rem);
  font-weight: 900;
  line-height: 1.3;
  color: var(--text-primary);
  text-wrap: balance;
}

/* 道 ("michi" - the way/path) rendered as a crimson hanko seal */
.michi-hero-kanji {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(3rem, 5.4vw, 4.4rem);
  height: clamp(3rem, 5.4vw, 4.4rem);
  border-radius: 14px;
  font-family: var(--font-arabic);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  color: #ff7a86;
  background: linear-gradient(145deg, rgba(211, 18, 59, 0.28), rgba(138, 6, 33, 0.34));
  border: 1px solid rgba(211, 18, 59, 0.45);
  box-shadow:
    0 0 24px rgba(211, 18, 59, 0.28),
    inset 0 0 12px rgba(211, 18, 59, 0.2);
  transform: rotate(3deg);
  animation: kanji-seal-glow 5s ease-in-out infinite alternate;
}

@keyframes kanji-seal-glow {
  from { box-shadow: 0 0 16px rgba(211, 18, 59, 0.2), inset 0 0 10px rgba(211, 18, 59, 0.14); }
  to   { box-shadow: 0 0 30px rgba(211, 18, 59, 0.38), inset 0 0 14px rgba(211, 18, 59, 0.26); }
}

.michi-hero-subtitle {
  max-width: 70ch;
  margin: 0 0 var(--space-6);
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--text-secondary);
}

/* Search row */
.michi-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 0 1 380px;
  min-width: 280px;
}

.michi-search-wrapper {
  position: relative;
  flex: 1;
}

.michi-search-input {
  width: 100%;
  padding: 0.8rem 3rem 0.8rem 1.2rem;
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  background: var(--bg-glass);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.michi-search-input::placeholder {
  color: var(--text-dim);
}

.michi-search-input:hover {
  border-color: var(--border-active);
}

.michi-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--bg-glass-heavy);
  box-shadow: var(--glow-red-sm);
}

.michi-search-icon {
  position: absolute;
  inset-inline-start: 1rem;
  top: 50%;
  translate: 0 -50%;
  color: var(--text-dim);
  pointer-events: none;
}

.michi-catalog-count {
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.michi-catalog-section {
  position: relative;
  overflow: hidden;
  padding: 4rem 0 7rem;
  /* Mirror of the guide pages' related-section fade: transparent over the
     card field, landing on near-black so the footer seam disappears */
  background: linear-gradient(180deg, rgba(4, 4, 6, 0) 40%, rgb(2 2 2) 99%);
}

.michi-catalog-emblem {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 4%;
  transform: translate(0, -50%);
  width: clamp(340px, 38vw, 580px);
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: radial-gradient(circle, #000 45%, transparent 80%);
  mask-image: radial-gradient(circle, #000 45%, transparent 80%);
  animation: phoenix-emblem-drift 26s ease-in-out infinite alternate;
}

.michi-catalog-emblem img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.12;
}

.michi-catalog-section .michi-container {
  position: relative;
  z-index: 1;
}

.michi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

@media (max-width: 1100px) {
  .michi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1600px) {
  .michi-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 680px) {
  .michi-grid { grid-template-columns: 1fr; }
}

/* Staggered entrance */
@keyframes michi-card-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Poster card — 2:3, deep shade, one stretched link */
.michi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Shorter than the classic 2/3 poster crop — cards read as slimmer
   * teaser tiles and the grid shows more of the catalog per screen. */
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  isolation: isolate;
  animation: michi-card-in 0.6s var(--ease-smooth) backwards;
  transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth), border-color 0.4s ease;
}

/* Glass edge highlight (top) + brand accent line (bottom, grows on hover) */
.michi-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  pointer-events: none;
}

.michi-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  bottom: 0;
  inset-inline-start: 0;
  width: 42%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #d3123b, rgba(211, 18, 59, 0));
  box-shadow: 0 0 12px rgba(211, 18, 59, 0.5);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.4s ease, transform 0.4s var(--ease-smooth);
  pointer-events: none;
}

.michi-card:hover::after,
.michi-card:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.michi-card:hover .michi-card-num {
  border-color: rgba(211, 18, 59, 0.55);
  background: rgba(59, 5, 16, 0.55);
}

.michi-card:nth-child(1) { animation-delay: 0.02s; }
.michi-card:nth-child(2) { animation-delay: 0.08s; }
.michi-card:nth-child(3) { animation-delay: 0.16s; }
.michi-card:nth-child(4) { animation-delay: 0.24s; }
.michi-card:nth-child(5) { animation-delay: 0.32s; }
.michi-card:nth-child(6) { animation-delay: 0.4s; }
.michi-card:nth-child(7) { animation-delay: 0.48s; }
.michi-card:nth-child(8) { animation-delay: 0.56s; }
.michi-card:nth-child(9) { animation-delay: 0.64s; }
.michi-card:nth-child(10) { animation-delay: 0.72s; }

.michi-card:hover {
  transform: translateY(-8px);
  border-color: rgba(182, 9, 45, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.michi-card-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 0.8s var(--ease-smooth), filter 0.4s ease;
}

.michi-card:hover .michi-card-img {
  transform: scale(1.08);
  filter: brightness(0.65);
}

.michi-card-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Dark only where the text lives — poster art stays clear above */
  background: linear-gradient(to top, rgba(5, 5, 6, 0.96) 0%, rgba(5, 5, 6, 0.78) 26%, rgba(5, 5, 6, 0.28) 52%, transparent 74%);
  transition: background 0.4s ease;
}

.michi-card:hover .michi-card-shade {
  background: linear-gradient(to top, rgba(5, 5, 6, 1) 0%, rgba(5, 5, 6, 0.85) 30%, rgba(5, 5, 6, 0.35) 56%, transparent 78%);
}

.michi-card-num {
  position: absolute;
  top: 0.9rem;
  inset-inline-end: 0.9rem;
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(8, 8, 8, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.michi-card-content {
  margin-top: auto;
  padding: 1.5rem 1.2rem 1.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transform: translateY(7px);
  transition: transform 0.4s var(--ease-smooth);
}

.michi-card:hover .michi-card-content {
  transform: translateY(0);
}

/* Red tick above the title — magazine-style section marker */
.michi-card-content::before {
  content: "";
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-text));
  box-shadow: var(--glow-red-sm);
  margin-bottom: 0.15rem;
}

.michi-card-title {
  margin: 0;
  font-family: var(--font-arabic);
  font-size: 1.28rem;
  font-weight: 900;
  line-height: 1.55;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Circular arrow chip - mirrors the related-guides hover affordance */
.michi-card-arrow {
  position: absolute;
  z-index: 2;
  bottom: 0.78rem;
  inset-inline-end: 0.78rem;
  display: grid;
  place-items: center;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #d3123b, #8a0621);
  box-shadow: 0 6px 18px -6px rgba(211, 18, 59, 0.8);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.michi-card:hover .michi-card-arrow,
.michi-card:focus-within .michi-card-arrow {
  opacity: 1;
  transform: scale(1);
}

/* One stretched focusable per card */
.michi-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.michi-card-link:focus-visible::after {
  outline: 2px solid var(--color-primary-text);
  outline-offset: -2px;
}

.michi-no-results {
  grid-column: 1 / -1;
  padding: var(--space-8) var(--space-6);
  border: 1px dashed var(--border-medium);
  border-radius: 12px;
  background: var(--bg-secondary);
  text-align: center;
  color: var(--text-muted);
}

.michi-no-results h2 {
  margin: 0 0 var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-xl);
}

.michi-no-results p {
  margin: 0;
}

/* ==========================================================================
   3. Guide hero
   ========================================================================== */

.michi-guide-header {
  position: relative;
  padding: calc(var(--header-height) + 6rem) 0 var(--space-7);
  overflow: hidden;
  background: transparent;
}

.michi-guide-header .michi-embers {
  z-index: 1;
}

.michi-guide-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.michi-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: saturate(0.85);
  /* Slow cinematic drift — the poster breathes behind the header */
  animation: michi-kenburns 28s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes michi-kenburns {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.09) translate3d(0, -1.5%, 0); }
}

.michi-backdrop-scrim {
  position: absolute;
  inset: 0;
  /* Bottom edge lands fully opaque so it melts into the page background
     with no visible seam */
  background:
    linear-gradient(180deg, rgba(10, 10, 12, 0.94) 0%, rgba(10, 10, 12, 0.88) 42%, rgb(10 10 12) 100%),
    linear-gradient(0deg, rgba(94, 4, 23, 0.42) 0%, transparent 55%);
}

.michi-guide-header-content {
  position: relative;
  z-index: 1;
  padding-bottom: var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* Red accent rule mirroring the catalog hero — full-width title above */
.michi-guide-header-content::after {
  content: "";
  position: absolute;
  bottom: -1px;
  inset-inline-start: 0;
  width: 80px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-primary);
  box-shadow: var(--glow-red-sm);
}

.michi-guide-header .michi-breadcrumb a,
.michi-guide-header .michi-breadcrumb .current {
  color: rgba(255, 255, 255, 0.82);
}

.michi-guide-header .michi-breadcrumb a:hover {
  color: #ffffff;
}

.michi-guide-arabic-title {
  margin: var(--space-4) 0 var(--space-2);
  font-family: var(--font-arabic);
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.3;
  color: #ffffff;
  text-wrap: balance;
}

.michi-guide-en-title {
  margin-bottom: var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-primary-text);
}

/* Route summary chips — red family only */
.michi-route-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.michi-route-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.michi-route-chip-num {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.michi-route-chip-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.michi-route-chip-steps,
.michi-route-chip-movies,
.michi-route-chip-essential {
  border-color: rgba(182, 9, 45, 0.35);
}

.michi-route-chip-steps .michi-route-chip-num,
.michi-route-chip-movies .michi-route-chip-num,
.michi-route-chip-essential .michi-route-chip-num,
.michi-route-chip-recommended .michi-route-chip-num {
  color: var(--color-primary-text);
}

.michi-route-chip-optional .michi-route-chip-num {
  color: var(--text-secondary);
}

/* Action buttons */
.michi-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.michi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-arabic);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform 0.25s var(--ease-smooth);
}

.michi-btn:active {
  transform: translateY(1px);
}

.michi-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.michi-btn-sm {
  padding: 0.5rem 1.05rem;
  min-height: 38px;
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

.michi-btn-primary {
  background: var(--grad-red-primary);
  border-color: var(--border-red);
  color: #ffffff;
}

.michi-btn-primary:hover {
  background: var(--grad-red-glow);
  box-shadow: var(--glow-red-sm);
}

.michi-btn-outline {
  background: var(--bg-glass);
  border-color: var(--border-medium);
  color: rgba(255, 255, 255, 0.88);
}

.michi-btn-outline:hover {
  border-color: var(--border-red);
  color: #ffffff;
}

/* ==========================================================================
   4. In-guide sub-navigation
   Scrolls away with the page (non-sticky by design): stacking a second
   fixed bar under the header covered a quarter of the viewport and the
   anchor offsets already clear the main header.
   ========================================================================== */

.michi-subnav {
  position: static;
  background: rgba(10, 10, 14, 0.92);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.michi-subnav-row {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  overflow-x: auto;
  scrollbar-width: none;
  max-width: var(--max-width-container);
}

.michi-subnav-row::-webkit-scrollbar {
  display: none;
}

.michi-subnav-link {
  flex: 0 0 auto;
  padding: 0.65rem 0.95rem;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.michi-subnav-link:hover {
  color: var(--text-primary);
  border-bottom-color: var(--color-primary);
}

.michi-subnav-link:focus-visible {
  outline: 2px solid var(--color-primary-text);
  outline-offset: -2px;
  border-radius: var(--radius-xs);
}

/* Anchored sections stop below the header (subnav no longer sticky) */
.michi-section-heading {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

/* ==========================================================================
   5. Guide body — authored content (plugin blueprint classes)
   ========================================================================== */

.michi-guide-body {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 7rem;
}

.michi-guide-body .michi-narrow-container {
  position: relative;
  z-index: 1;
}

.michi-watch-guide {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.michi-guide-intro {
  padding: var(--space-5);
  border: 1px solid var(--border-subtle);
  border-inline-start: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.michi-guide-intro p {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.95;
  color: var(--text-secondary);
}

.michi-guide-intro strong {
  color: var(--text-primary);
}

.michi-guide-intro em {
  color: var(--color-primary-text);
  font-style: normal;
  font-weight: 600;
}

.michi-section-heading {
  margin: var(--space-2) 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-arabic);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 800;
  color: var(--text-primary);
  position: relative;
}

.michi-section-heading::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -1px;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-text));
  border-radius: var(--radius-full);
}

/* Timeline — the rail lives in its own lane beside the cards, with a live
   ember node per step that breathes on essential entries */
.michi-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.michi-timeline::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  inset-inline-start: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--color-primary) 0%, rgba(182, 9, 45, 0.15) 100%);
  opacity: 0.45;
  pointer-events: none;
}

/* Scroll-driven entrance — cards wake as they enter the viewport.
   Animates `translate`/opacity (not `transform`) so the hover lift
   composes on top instead of fighting the animation. */
@supports (animation-timeline: view()) {
  .michi-step-card {
    animation: michi-step-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 42%;
  }
}

@keyframes michi-step-reveal {
  from { opacity: 0.15; translate: 0 30px; }
  to   { opacity: 1; translate: 0 0; }
}

/* Step card — notes on the start side, poster + watch button on the end side */
.michi-step-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-inline-start: 3rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  transition: border-color 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

/* Live ember node pinned to the rail, level with the step number.
   Alignment contract with the rail (::before of .michi-timeline, 12px inset,
   2px wide → centre at 13px from the timeline start edge):
     dot centre = (card margin) − 3px start-border − |inset| + 5px half-dot
   Setting |inset| = margin − 5px lands the centre exactly on 13px.
   Hence: inset-inline-start = calc(-<card margin> + 5px). Every breakpoint
   that overrides .michi-step-card margin-inline-start MUST recompute this
   offset in the same shape (pinned by the michi-runtime 7b rail/dot test). */
.michi-step-card::before {
  content: "";
  position: absolute;
  top: 34px;
  inset-inline-start: calc(-3rem + 5px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(182, 9, 45, 0.22), 0 0 12px rgba(182, 9, 45, 0.5);
  transition: box-shadow 0.3s var(--ease-smooth), scale 0.3s var(--ease-smooth);
  z-index: 1;
}

.michi-step-card[data-priority="essential"]::before {
  animation: michi-node-pulse 2.8s ease-in-out infinite;
}

@keyframes michi-node-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(182, 9, 45, 0.22), 0 0 12px rgba(182, 9, 45, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(182, 9, 45, 0.3), 0 0 20px rgba(182, 9, 45, 0.8); }
}

/* Red light-sweep along the top edge on hover */
.michi-step-card::after {
  content: "";
  position: absolute;
  top: -1px;
  inset-inline: 0;
  height: 2px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, transparent 0%, var(--color-primary-text) 50%, transparent 100%);
  opacity: 0;
  transform: scaleX(0.2);
  transition: opacity 0.4s ease, transform 0.5s var(--ease-smooth);
  pointer-events: none;
}

.michi-step-card:hover {
  border-color: rgba(182, 9, 45, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(182, 9, 45, 0.14);
}

.michi-step-card:hover::before {
  box-shadow: 0 0 0 5px rgba(182, 9, 45, 0.32), 0 0 18px rgba(182, 9, 45, 0.8);
}

.michi-step-card:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.michi-step-card[data-priority="essential"] {
  border-inline-start: 3px solid var(--color-primary);
  background: linear-gradient(180deg, rgba(182, 9, 45, 0.06), transparent 30%), var(--bg-card);
}

.michi-step-card[data-priority="recommended"] {
  border-inline-start: 3px solid var(--color-primary-text);
}

.michi-step-card[data-priority="optional"] {
  border-inline-start: 3px solid var(--border-medium);
}

.michi-step-card[data-priority="skip"] {
  border-inline-start: 3px solid var(--text-dim);
  opacity: 0.85;
}

.michi-step-card > * {
  grid-column: 1;
}

.michi-step-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5) var(--space-2);
}

.michi-step-number {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.michi-step-card[data-priority="essential"] .michi-step-number {
  border-color: rgba(182, 9, 45, 0.45);
  background: rgba(182, 9, 45, 0.12);
  color: var(--color-primary-text);
}

.michi-step-card[data-priority="recommended"] .michi-step-number {
  border-color: rgba(182, 9, 45, 0.35);
  background: rgba(182, 9, 45, 0.08);
  color: var(--color-primary-text);
}

.michi-step-card:hover .michi-step-number {
  border-color: rgba(182, 9, 45, 0.55);
  color: var(--color-primary-text);
  box-shadow: 0 0 16px rgba(182, 9, 45, 0.35);
}

.michi-step-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1 1 240px;
  min-width: 0;
}

.michi-step-title {
  margin: 0;
  font-family: var(--font-arabic);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.5;
  color: var(--text-primary);
}

.michi-step-badge {
  align-self: flex-start;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.michi-step-badge.badge-essential {
  border-color: rgba(182, 9, 45, 0.4);
  background: rgba(182, 9, 45, 0.12);
  color: var(--color-primary-text);
}

.michi-step-badge.badge-recommended {
  border-color: rgba(182, 9, 45, 0.28);
  background: rgba(182, 9, 45, 0.07);
  color: var(--color-primary-text);
}

.michi-step-badge.badge-optional {
  border-color: var(--border-subtle);
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.michi-step-badge.badge-skip {
  border-color: var(--border-subtle);
  background: transparent;
  color: var(--text-dim);
}

.michi-step-year {
  margin-inline-start: auto;
  padding: 0.25rem 0.8rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.michi-step-meta {
  padding: 0 var(--space-5);
  color: var(--text-dim);
  font-size: var(--text-sm);
}

.michi-step-meta span {
  color: var(--text-muted);
}

.michi-step-body {
  padding: var(--space-3) var(--space-5) var(--space-5);
}

.michi-step-body p {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--text-secondary);
}

.michi-step-body strong {
  color: var(--text-primary);
}

.michi-step-body em {
  color: var(--color-primary-text);
  font-style: normal;
  font-weight: 600;
}

/* Canonical movie milestone inside a TV-series step */
.michi-movie-milestone {
  position: relative;
  margin-top: var(--space-3);
  padding: var(--space-4) var(--space-5) var(--space-4) 2.6rem;
  border: 1px solid rgba(182, 9, 45, 0.35);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(182, 9, 45, 0.08), rgba(182, 9, 45, 0.02)),
    var(--bg-secondary);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.85;
}

.michi-movie-milestone::before {
  content: "🎬";
  position: absolute;
  inset-inline-start: 0.9rem;
  top: 50%;
  translate: 0 -50%;
  opacity: 0.9;
}

.michi-movie-milestone strong {
  color: var(--color-primary-text);
}

/* Watch side — poster thumb over the red watch button (end column) */
.michi-step-watch-side {
  grid-column: 2;
  grid-row: 1 / span 9;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
  margin: var(--space-4);
  padding-inline-start: var(--space-4);
  border-inline-start: 1px solid var(--border-subtle);
}

.michi-step-poster {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s var(--ease-smooth), border-color var(--transition-fast), box-shadow 0.35s var(--ease-smooth);
}

.michi-step-card:hover .michi-step-poster {
  /* Calm, professional: no tilt, no jump — just a gentle focus zoom */
  transform: scale(1.04);
  border-color: rgba(182, 9, 45, 0.55);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), var(--glow-red-sm);
}

.michi-step-watch {
  width: 100%;
  white-space: nowrap;
}

.michi-step-card:hover .michi-step-watch {
  box-shadow: 0 0 18px rgba(182, 9, 45, 0.45);
}

/* Extra platform works — every DB entry no step claimed rides inside the
   watch side as a compact flat list (title + badge, no nested boxes). */
.michi-step-extra-title {
  font-family: var(--font-arabic);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-top: 0.2rem;
}

.michi-step-extra-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: #b9b9c8;
  font-family: var(--font-arabic);
  font-size: 0.72rem;
  line-height: 1.5;
  text-decoration: none;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.michi-step-extra-link:hover {
  border-color: rgba(182, 9, 45, 0.55);
  color: var(--color-primary-text);
  background: rgba(182, 9, 45, 0.08);
}

.michi-step-extra-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.michi-step-extra-badge {
  flex-shrink: 0;
  font-size: 0.6rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: rgba(182, 9, 45, 0.14);
  color: var(--color-primary-text);
}

/* Pro tips callout */
.michi-pro-tips {
  padding: var(--space-5);
  border: 1px solid var(--border-red);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}

.michi-pro-tips h2,
.michi-pro-tips h3,
.michi-pro-tips h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 var(--space-2);
  font-family: var(--font-arabic);
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--color-primary-text);
}

.michi-pro-tips p {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--text-secondary);
}

.michi-pro-tips strong {
  color: var(--text-primary);
}

/* Alternative route callout - an optional, authored supplementary watch path
   (e.g. the classic 2006 release order in the Fate guide). Lives inside the
   guide content as <aside class="michi-alt-route">; all classes stay outside
   the heading blueprint so harvest + re-render round-trips keep it intact. */
.michi-alt-route {
  padding: var(--space-6);
  border: 1px solid var(--border-red);
  border-inline-start: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(211, 18, 59, 0.08), rgba(211, 18, 59, 0.015) 55%),
    var(--bg-secondary);
}

.michi-alt-route-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 var(--space-4);
}

.michi-alt-route-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  color: #ff7a86;
  background: linear-gradient(145deg, rgba(211, 18, 59, 0.28), rgba(138, 6, 33, 0.34));
  border: 1px solid rgba(211, 18, 59, 0.45);
}

.michi-alt-route-title {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--font-arabic);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary-text);
}

.michi-alt-route-chip {
  flex: none;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ff7a86;
  background: rgba(211, 18, 59, 0.14);
  border: 1px solid rgba(211, 18, 59, 0.4);
}

.michi-alt-route-intro {
  margin: 0 0 var(--space-3);
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--text-secondary);
}

.michi-alt-route-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 0 var(--space-4);
  padding-inline-start: 1.4rem;
}

.michi-alt-route-list li {
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.michi-alt-route-list li::marker {
  color: var(--color-primary-text);
  font-weight: 700;
}

.michi-alt-route-list strong {
  color: var(--text-primary);
}

.michi-alt-route-note {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-inline-start: 2px solid rgba(211, 18, 59, 0.5);
  border-radius: var(--radius-md);
  background: rgba(211, 18, 59, 0.06);
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.michi-alt-route-note strong {
  color: var(--color-primary-text);
}

/* Authored links inside content */
.michi-watch-guide a:not([class]) {
  color: var(--color-primary-text);
  text-decoration: underline;
  text-decoration-color: rgba(239, 43, 86, 0.45);
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.michi-watch-guide a:not([class]):hover {
  color: var(--text-accent);
}

.michi-watch-guide a:not([class]):focus-visible {
  outline: 2px solid var(--color-primary-text);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ==========================================================================
   6. Legal pages (/privacy, /terms)
   ========================================================================== */

.legal-hero .michi-hero-title {
  margin-bottom: var(--space-3);
}

.legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 var(--space-4);
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.legal-updated time {
  color: var(--text-secondary);
  font-weight: 600;
}

.legal-content {
  padding: var(--space-7) 0 var(--space-8);
}

.legal-intro {
  margin: 0 0 var(--space-6);
  padding: var(--space-5);
  border: 1px solid var(--border-subtle);
  border-inline-start: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  font-size: var(--text-base);
  line-height: 1.95;
  color: var(--text-secondary);
}

.legal-section {
  margin-bottom: var(--space-7);
}

.legal-section h2 {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-arabic);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 800;
  color: var(--text-primary);
}

.legal-section p {
  margin: 0 0 var(--space-3);
  font-size: var(--text-base);
  line-height: 1.95;
  color: var(--text-secondary);
}

.legal-section ul {
  margin: 0 0 var(--space-4);
  padding-inline-start: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.legal-section li {
  position: relative;
  padding-inline-start: 0.4rem;
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--text-secondary);
}

.legal-section li::marker {
  color: var(--color-primary-text);
}

.legal-note {
  padding: var(--space-3) var(--space-4);
  border-inline-start: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  background: rgba(182, 9, 45, 0.06);
  color: var(--text-secondary) !important;
}

.legal-cta h2 {
  justify-content: center;
}

.legal-cta p {
  display: flex;
  justify-content: center;
  margin: 0;
}

/* ==========================================================================
   7. Homepage watch-orders section (#watch-orders)
   ========================================================================== */

.watch-orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-4);
}

/* Home watch-orders teaser card: franchise poster dimmed behind the
 * title, everything token-driven and CSP-clean (img element, no inline
 * style attributes). */
.watch-orders-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform 0.3s var(--ease-smooth);
}

.watch-orders-card-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.16;
  filter: saturate(0.85);
  transition: opacity 0.4s var(--ease-smooth), transform 0.8s var(--ease-smooth);
}

.watch-orders-card:hover .watch-orders-card-bg {
  opacity: 0.28;
  transform: scale(1.06);
}

.watch-orders-card-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--bg-card) 26%, rgba(10, 10, 12, 0.55) 70%, rgba(10, 10, 12, 0.25) 100%);
}

.watch-orders-card-text {
  min-width: 0;
}

.watch-orders-card:hover {
  border-color: var(--border-red);
  box-shadow: var(--glow-red-sm);
  transform: translateY(-3px);
}

.watch-orders-card:focus-visible {
  outline: 2px solid var(--color-primary-text);
  outline-offset: 3px;
}

.watch-orders-card-title {
  margin: 0;
  font-family: var(--font-arabic);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-primary);
}

.watch-orders-card-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-primary-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: inline-block;
  vertical-align: bottom;
}

.watch-orders-card-arrow {
  flex: 0 0 auto;
  color: var(--text-dim);
  transition: color var(--transition-fast), translate 0.3s var(--ease-smooth);
}

.watch-orders-card:hover .watch-orders-card-arrow {
  color: var(--color-primary-text);
  translate: -3px 0;
}

.watch-orders-cta {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
}

@media (max-width: 480px) {
  .watch-orders-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   8. Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .michi-toolbar {
    flex-basis: 100%;
  }

  /* Step card collapses to one column; poster row sits under the notes */
  .michi-step-card {
    grid-template-columns: 1fr;
    margin-inline-start: 2.25rem;
  }

  .michi-step-card::before {
    inset-inline-start: calc(-2.25rem + 5px);
    top: 30px;
  }

  .michi-step-card > * {
    grid-column: 1;
  }

  .michi-step-watch-side {
    grid-row: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    margin: 0 var(--space-4) var(--space-4);
    padding: var(--space-3) 0 0;
    border-inline-start: none;
    border-top: 1px solid var(--border-subtle);
  }

  .michi-step-poster {
    width: 64px;
    height: 96px;
  }

  .michi-step-watch {
    flex: 1;
  }

  /* Extras flow under the poster+button row on small screens. */
  .michi-step-extra-title {
    width: 100%;
    text-align: start;
    margin-top: 0.3rem;
  }

  .michi-step-extra-link {
    width: 100%;
  }

  .michi-step-header {
    padding-inline: var(--space-4);
  }

  .michi-step-meta,
  .michi-step-body {
    padding-inline: var(--space-4);
  }

  .michi-step-year {
    margin-inline-start: 0;
  }

  .michi-guide-actions .michi-btn {
    flex: 1 1 100%;
  }

  .michi-movie-milestone {
    padding-inline-start: 2.4rem;
  }
}

@media (max-width: 480px) {
  .michi-container,
  .michi-narrow-container {
    padding-inline: var(--space-4);
  }

  .michi-hero {
    padding-top: calc(var(--header-height) + 4rem);
  }

  .michi-card-title {
    font-size: 1rem;
  }

  .michi-timeline {
    gap: var(--space-3);
  }

  .michi-step-card {
    margin-inline-start: 1.8rem;
  }

  .michi-step-card::before {
    inset-inline-start: calc(-1.8rem + 5px);
  }
}

/* Ultra-wide: give the reading column more room instead of pinning it */
@media (min-width: 1600px) {
  .michi-narrow-container {
    max-width: 1180px;
  }
}

/* Reduced motion: entrance and embers become plain appearances */
@media (prefers-reduced-motion: reduce) {
  .michi-card {
    animation: none;
  }

  .michi-step-card {
    animation: none;
    translate: 0 0;
  }

  .michi-step-card[data-priority="essential"]::before {
    animation: none;
  }

  .michi-ember,
  .michi-embers-glow {
    display: none;
  }

  .michi-backdrop-img {
    animation: none;
  }

  .michi-title-accent {
    animation: none;
  }

  .michi-hero-kanji {
    animation: none;
  }
}

/* ==========================================================================
 * Related guides - automatic internal linking between guides
 * Poster-led cards: the banner fills the card under a deep bottom scrim,
 * a glass "دليل مشاهدة" badge sits on top, the Arabic title overlays the
 * shade, and an arrow chip slides in on hover. Calm lift, no tilt.
 * ========================================================================== */

.michi-related {
  position: relative;
  z-index: 1;
  padding: var(--space-12) 0 var(--space-16);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(4, 4, 6, 0) 40%, rgb(2 2 2) 99%);
}

.michi-related .michi-container {
  position: relative;
  z-index: 1;
}

/* Phoenix emblem watermark — ghosted into the guide-body background (the
   section above the related rail) with an ultra-subtle vertical drift. */
/* Phoenix emblem watermark - mirrors the homepage's section-emblem exactly:
   side-anchored, vertically centered, radial mask fade, ultra-slow drift. */
.michi-guide-emblem {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 4%;
  transform: translate(0, -50%);
  width: clamp(340px, 38vw, 580px);
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: radial-gradient(circle, #000 45%, transparent 80%);
  mask-image: radial-gradient(circle, #000 45%, transparent 80%);
  animation: phoenix-emblem-drift 26s ease-in-out infinite alternate;
}

.michi-guide-emblem img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.12;
}

.michi-related-title {
  font-family: var(--font-arabic);
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 var(--space-5);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.michi-related-title::before {
  content: '';
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: linear-gradient(135deg, #d3123b, #ff7043);
  transform: rotate(45deg);
  box-shadow: 0 0 16px rgba(211, 18, 59, 0.75);
}

.michi-related-title::after {
  content: '';
  flex: 1;
  height: 1px;
  margin-inline-start: 0.3rem;
  background: linear-gradient(to left, rgba(211, 18, 59, 0.45), rgba(182, 9, 45, 0.05));
}

.michi-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.michi-related-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.michi-related-poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

.michi-related-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(5, 5, 9, 0.94) 10%, rgba(5, 5, 9, 0.44) 48%, rgba(5, 5, 9, 0.05) 74%);
}

.michi-related-badge {
  position: absolute;
  z-index: 2;
  top: 0.7rem;
  inset-inline-start: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  font-family: var(--font-arabic);
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffd9d6;
  background: rgba(182, 9, 45, 0.22);
  border: 1px solid rgba(211, 18, 59, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  letter-spacing: 0.02em;
}

.michi-related-name {
  position: absolute;
  z-index: 2;
  inset-inline: 0.85rem;
  bottom: 0.8rem;
  padding-inline-end: 2.6rem;
  font-family: var(--font-arabic);
  font-weight: 800;
  font-size: 1.06rem;
  line-height: 1.55;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.michi-related-arrow {
  position: absolute;
  z-index: 2;
  bottom: 0.78rem;
  inset-inline-end: 0.78rem;
  display: grid;
  place-items: center;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #d3123b, #8a0621);
  box-shadow: 0 6px 18px -6px rgba(211, 18, 59, 0.8);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.michi-related-card:hover,
.michi-related-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(211, 18, 59, 0.6);
  box-shadow: 0 20px 44px -20px rgba(211, 18, 59, 0.6);
}

.michi-related-card:hover .michi-related-poster,
.michi-related-card:focus-visible .michi-related-poster {
  transform: scale(1.06);
  opacity: 1;
}

.michi-related-card:hover .michi-related-arrow,
.michi-related-card:focus-visible .michi-related-arrow {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 900px) {
  .michi-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .michi-related-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes michi-emblem-breathe {
  from { opacity: 0.55; transform: translate(-50%, -50%) scale(0.985); }
  to   { opacity: 1;    transform: translate(-50%, -50%) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .michi-related-card,
  .michi-related-poster,
  .michi-related-arrow,
  .michi-guide-emblem,
  .michi-catalog-emblem,
  .michi-card-arrow,
  .michi-hero-emblem {
    transition: none;
    animation: none;
  }
}

/* ==========================================================================
 * Catalog pagination (/michi/page/N/) — RTL-first, token-driven
 * ========================================================================== */
.michi-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.michi-page-num,
.michi-page-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: border-color 0.25s var(--ease-smooth), background 0.25s var(--ease-smooth), color 0.25s var(--ease-smooth);
}

.michi-page-num:hover,
.michi-page-nav:hover {
  border-color: var(--color-primary);
  background: rgba(182, 9, 45, 0.12);
}

.michi-page-num.is-current {
  background: linear-gradient(135deg, #d3123b, #8a0621);
  border-color: transparent;
  color: #ffffff;
  cursor: default;
}

.michi-page-nav.is-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.michi-page-nav:focus-visible,
.michi-page-num:focus-visible {
  outline: 2px solid var(--color-primary-text);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .michi-page-num,
  .michi-page-nav {
    min-width: 2.5rem;
    padding: 0.45rem 0.8rem;
  }
}
