:root {
  color-scheme: light dark;

  --ar-green: #96C049;
  --ar-green-hover: #85AD40;
  --ar-green-dark: #689F38;
  --ar-green-light: #B8D97A;
  --ar-pink: #D13464;
  --ar-pink-hover: #B92D58;
  --ar-gold-start: #FFD700;
  --ar-gold-end: #F59E0B;

  --ar-bg: light-dark(#F8FDF3, #121826);
  --ar-bg-end: light-dark(#E8F5E9, #1B2234);
  --ar-header-bg: light-dark(rgba(255, 255, 255, 0.84), rgba(18, 24, 38, 0.86));
  --ar-header-border: light-dark(rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0.08));
  --ar-surface: light-dark(#FFFFFF, #1E2638);
  --ar-surface-border: light-dark(#E2E8DF, rgba(255, 255, 255, 0.09));
  --ar-surface-shadow-color: light-dark(rgba(38, 66, 22, 0.08), rgba(0, 0, 0, 0.35));

  --ar-text: light-dark(#1A1A1A, #F5F7FA);
  --ar-text-muted: light-dark(#706762, #B4BCCB);
  --ar-accent-text: light-dark(#557C19, #B8D97A);
  --ar-accent-bonus: light-dark(#D13464, #FF8FB1);
  --ar-pill-bg: light-dark(#F1F8E9, rgba(209, 52, 100, 0.16));
  --ar-pill-text: light-dark(#4D6B1D, #FF8FB1);
  --ar-pill-border: light-dark(#D7E9BF, rgba(209, 52, 100, 0.38));

  --ar-stage-border-color: light-dark(#FFFFFF, rgba(209, 52, 100, 0.58));
  --ar-stage-shadow-color: light-dark(rgba(34, 62, 18, 0.14), rgba(209, 52, 100, 0.32));

  --ar-item-bg: light-dark(#FFFFFF, rgba(255, 255, 255, 0.03));
  --ar-item-border: light-dark(#ECEFE9, rgba(255, 255, 255, 0.07));
  --ar-item-hover-bg: light-dark(#F8FCF3, rgba(255, 255, 255, 0.07));
  --ar-item-active-bg: light-dark(#ECF7DA, rgba(150, 192, 73, 0.18));

  --ar-player-bg-start: light-dark(#2C302E, #161B26);
  --ar-player-bg-end: light-dark(#3A3F3C, #22293A);
  --ar-player-border-color: light-dark(rgba(255, 255, 255, 0.08), rgba(209, 52, 100, 0.28));

  --ar-fab-bg: light-dark(rgba(255, 255, 255, 0.94), rgba(30, 38, 56, 0.92));
  --ar-fab-text: light-dark(#1A1A1A, #F5F7FA);
  --ar-fab-border: light-dark(rgba(0, 0, 0, 0.08), rgba(209, 52, 100, 0.45));
  --ar-fab-hover: light-dark(#96C049, #D13464);

  --ar-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --ar-font-heading: "Montserrat", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  color-scheme: dark;
}

:root:has(> head > meta[name="color-scheme"][content="light"]) {
  color-scheme: light;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

.ar-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--ar-font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ar-text);
  background: linear-gradient(135deg, var(--ar-bg) 0%, var(--ar-bg-end) 100%);
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

.ar-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ar-page .page-content {
  padding-top: var(--header-height, 4.5rem);
  display: flex;
  flex-direction: column;
}

/* Portal Header Integration */
.ar-page .header-content {
  position: relative;
  gap: 0.75rem;
}

.ar-page .header .logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.ar-header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

@media (min-width: 768px) {
  .ar-header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

.ar-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.48rem 1rem;
  border-radius: 9999px;
  font-family: var(--ar-font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--ar-pink);
  border: 1px solid var(--ar-pink-hover);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(209, 52, 100, 0.28);
  transition: transform 0.15s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ar-theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--ar-pink-hover);
  box-shadow: 0 4px 14px rgba(209, 52, 100, 0.36);
}

.ar-theme-option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ar-theme-to-light {
  display: none;
}

.ar-lantern-vignette {
  display: none;
}

/* Isolate headings and portal bug modal from global light-only defaults */
.ar-main h1,
.ar-main h2,
.ar-main h3,
.ar-main h4 {
  color: var(--ar-text);
}

.ar-main .ar-bonus-title,
.ar-modal .ar-modal-title,
.ar-modal .ar-bonus-title {
  color: #FFFFFF;
}

.ar-page .bug-modal-box,
.ar-page .bug-modal-box input,
.ar-page .bug-modal-box textarea {
  color: #333333;
  background-color: #FFFFFF;
}

/* Color-scheme branching without JS-only classes */
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-theme-to-dark {
  display: none;
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-theme-to-light {
  display: inline-flex;
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-theme-toggle {
  background: var(--ar-green);
  border-color: var(--ar-green-hover);
  box-shadow: 0 2px 10px rgba(150, 192, 73, 0.28);
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-theme-toggle:hover {
  background: var(--ar-green-hover);
  box-shadow: 0 4px 14px rgba(150, 192, 73, 0.38);
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-lantern-vignette {
  display: block;
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-page {
  background: radial-gradient(circle at 35% 18%, rgba(209, 52, 100, 0.18) 0%, rgba(18, 24, 38, 0) 52%),
              linear-gradient(160deg, #121826 0%, #1B2234 100%);
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-page .header {
  background-color: rgba(18, 24, 38, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-page .header .logo-svg {
  filter: brightness(0) invert(1);
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-page .header .nav-link {
  color: #F5F7FA;
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-page .header .menu-toggle span {
  background-color: #F5F7FA;
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-page .header .mobile-menu {
  background-color: #1B2234;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-page .header .mobile-nav-link {
  color: #F5F7FA;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-page .header .mobile-search {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .ar-page .header .mobile-search-input {
  background-color: #121826;
  color: #F5F7FA;
  border-color: rgba(255, 255, 255, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-theme-to-dark {
    display: none;
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-theme-to-light {
    display: inline-flex;
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-theme-toggle {
    background: var(--ar-green);
    border-color: var(--ar-green-hover);
    box-shadow: 0 2px 10px rgba(150, 192, 73, 0.28);
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-theme-toggle:hover {
    background: var(--ar-green-hover);
    box-shadow: 0 4px 14px rgba(150, 192, 73, 0.38);
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-lantern-vignette {
    display: block;
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-page {
    background: radial-gradient(circle at 35% 18%, rgba(209, 52, 100, 0.18) 0%, rgba(18, 24, 38, 0) 52%),
                linear-gradient(160deg, #121826 0%, #1B2234 100%);
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-page .header {
    background-color: rgba(18, 24, 38, 0.88);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-page .header .logo-svg {
    filter: brightness(0) invert(1);
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-page .header .nav-link {
    color: #F5F7FA;
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-page .header .menu-toggle span {
    background-color: #F5F7FA;
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-page .header .mobile-menu {
    background-color: #1B2234;
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-page .header .mobile-nav-link {
    color: #F5F7FA;
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-page .header .mobile-search {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) .ar-page .header .mobile-search-input {
    background-color: #121826;
    color: #F5F7FA;
    border-color: rgba(255, 255, 255, 0.18);
  }
}

/* Main Grid */
.ar-main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
}

.ar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 1.5rem;
  align-items: start;
}

.ar-stage-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.ar-card {
  background: var(--ar-surface);
  border: 1px solid var(--ar-surface-border);
  border-radius: 24px;
  box-shadow: 0 10px 32px var(--ar-surface-shadow-color);
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Illustration Stage */
.ar-stage-card {
  padding: 1.25rem;
  user-select: none;
  -webkit-user-select: none;
}

.ar-stage-wrap {
  position: relative;
}

.ar-stage-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: #141A26;
  border: 3px solid var(--ar-stage-border-color);
  box-shadow: 0 14px 38px var(--ar-stage-shadow-color);
  touch-action: pan-y;
}

.ar-stage-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease, transform 0.35s ease, filter 0.35s ease;
  -webkit-user-drag: none;
}

.ar-stage-img.is-blurred {
  transform: scale(1.08);
  filter: blur(10px) brightness(0.65);
}

.ar-bonus-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: radial-gradient(circle at center, rgba(20, 26, 36, 0.62) 0%, rgba(16, 20, 28, 0.86) 100%);
  backdrop-filter: blur(8px);
}

.ar-bonus-overlay[hidden] {
  display: none;
}

.ar-bonus-emoji {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  margin-bottom: 1rem;
  background: rgba(150, 192, 73, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.ar-bonus-tag {
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  font-family: var(--ar-font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1A1A1A;
  background: linear-gradient(135deg, var(--ar-gold-start) 0%, var(--ar-gold-end) 100%);
  margin-bottom: 0.75rem;
}

.ar-bonus-title {
  margin: 0 0 0.5rem;
  font-family: var(--ar-font-heading);
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: #FFFFFF;
  max-width: 32rem;
  line-height: 1.25;
}

.ar-bonus-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 28rem;
}

.ar-lantern-vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(209, 52, 100, 0.04) 40%, rgba(209, 52, 100, 0.25) 100%);
}

.ar-stage-badge-top {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-family: var(--ar-font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  color: #FFFFFF;
  background: rgba(150, 192, 73, 0.94);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.ar-fullscreen-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.9rem;
  border-radius: 9999px;
  font-family: var(--ar-font-body);
  font-size: 0.75rem;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(26, 26, 26, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.ar-fullscreen-btn:hover {
  transform: scale(1.04);
  background: rgba(26, 26, 26, 0.9);
}

/* Prev / Next Floating Chapter Arrows */
.ar-nav-fab {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  background: var(--ar-fab-bg);
  color: var(--ar-fab-text);
  border: 1px solid var(--ar-fab-border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.ar-nav-prev { left: -0.65rem; }
.ar-nav-next { right: -0.65rem; }

.ar-nav-fab:hover:not(:disabled) {
  background: var(--ar-fab-hover);
  color: #FFFFFF;
  border-color: var(--ar-fab-hover);
  transform: translateY(-50%) scale(1.06);
}

.ar-nav-fab:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Chapter Info Above Illustration */
.ar-chapter-meta {
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 0 0.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.ar-chapter-meta-main {
  flex: 1 1 320px;
}

.ar-chapter-meta-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.ar-kind-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-family: var(--ar-font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  color: #FFFFFF;
  background: var(--ar-green);
}

.ar-kind-pill.is-bonus {
  background: var(--ar-pink);
}

.ar-status-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ar-text-muted);
}

.ar-chapter-title {
  margin: 0;
  font-family: var(--ar-font-heading);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 800;
  line-height: 1.25;
}

.ar-chapter-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--ar-text-muted);
}

.ar-chapter-duration {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--ar-text-muted);
}

/* Dark Charcoal Player Card */
.ar-player {
  background: linear-gradient(135deg, var(--ar-player-bg-start) 0%, var(--ar-player-bg-end) 100%);
  border: 1px solid var(--ar-player-border-color);
  border-radius: 24px;
  padding: 1.25rem 1.5rem;
  color: #FFFFFF;
  box-shadow: 0 12px 32px rgba(26, 26, 26, 0.2);
  user-select: none;
  -webkit-user-select: none;
}

.ar-progress-block {
  margin-bottom: 1.15rem;
}

.ar-seek-track-wrap {
  position: relative;
  height: 46px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 8px;
}

.ar-seek-track {
  width: 100%;
  height: 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.14);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 10px 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.28);
}

/* Progress fill = faint pheromone haze; the actual trail is painted on #ant-trail-canvas */
.ar-seek-fill {
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, rgba(150, 192, 73, 0.08) 0%, rgba(150, 192, 73, 0.16) 60%, rgba(184, 217, 122, 0.34) 100%);
  transition: background 0.4s ease;
}

.ar-seek-fill.is-walking {
  background: linear-gradient(90deg, rgba(150, 192, 73, 0.1) 0%, rgba(150, 192, 73, 0.2) 60%, rgba(200, 232, 140, 0.45) 100%);
}

.ar-ant-trail-canvas {
  position: absolute;
  left: 0;
  right: 0;
  top: -24px;
  bottom: 0;
  width: 100%;
  height: calc(100% + 24px);
  pointer-events: none;
  z-index: 2;
}

/* Lane the ant walks in: fades the ant out as it enters the nest at the end of the track */
.ar-ant-lane {
  position: absolute;
  left: -20px;
  right: 0;
  top: -30px;
  bottom: 0;
  pointer-events: none;
  z-index: 3;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 27px), transparent calc(100% - 17px));
  mask-image: linear-gradient(to right, #000 calc(100% - 27px), transparent calc(100% - 17px));
}

/* The gaster tip (where pheromone is laid) always sits exactly on the progress point */
.ar-ant-playhead {
  --ar-p: 0;
  pointer-events: none;
  position: absolute;
  bottom: 12px;
  left: calc(20px + (100% - 20px) * var(--ar-p));
  transform: translateX(-7.4px);
  width: 84px;
  height: 38.5px;
}

.ar-ant-nest {
  position: absolute;
  right: -9px;
  bottom: 7px;
  width: 48px;
  height: 46px;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.ar-ant-nest-glow {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.ar-ant-nest.is-near .ar-ant-nest-glow {
  opacity: 0.35;
}

.ar-ant-nest.is-complete .ar-ant-nest-glow {
  opacity: 0.85;
}

.ar-ant-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

.ar-ant-gland {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ar-ant-playhead.is-walking .ar-ant-gland {
  opacity: 0.55;
}

@media (max-width: 480px) {
  .ar-ant-playhead {
    width: 70px;
    height: 32px;
    bottom: 13px;
    transform: translateX(-6.2px);
  }
  .ar-ant-nest {
    width: 40px;
    height: 38px;
    right: -7px;
  }
  .ar-ant-lane {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 23px), transparent calc(100% - 14px));
    mask-image: linear-gradient(to right, #000 calc(100% - 23px), transparent calc(100% - 14px));
  }
}


.ar-seek-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.ar-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.9);
}

.ar-time-remaining {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

/* Primary Play / Skip Controls */
.ar-primary-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.ar-skip-btn {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  border: 0;
  background: rgba(255, 255, 255, 0.11);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.ar-skip-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ar-skip-btn:active {
  transform: scale(0.94);
}

.ar-skip-arrow {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

.ar-skip-label {
  font-size: 0.75rem;
  font-weight: 800;
  margin-top: 2px;
}

.ar-play-btn {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 9999px;
  border: 0;
  background: linear-gradient(135deg, var(--ar-green) 0%, #7BA633 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(150, 192, 73, 0.35);
  transition: transform 0.15s ease;
}

.ar-play-btn:hover {
  transform: scale(1.05);
}

.ar-play-btn:active {
  transform: scale(0.95);
}

.ar-play-btn.is-playing {
  animation: arPulseRing 1.9s infinite;
}

@keyframes arPulseRing {
  0% { box-shadow: 0 0 0 0 rgba(150, 192, 73, 0.55); }
  70% { box-shadow: 0 0 0 15px rgba(150, 192, 73, 0); }
  100% { box-shadow: 0 0 0 0 rgba(150, 192, 73, 0); }
}

.ar-play-icon {
  font-size: 1.85rem;
  line-height: 1;
  margin-left: 3px;
}

.ar-play-btn.is-playing .ar-play-icon {
  margin-left: 0;
}

.ar-spinner {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  animation: arSpin 0.8s linear infinite;
}

@keyframes arSpin {
  to { transform: rotate(360deg); }
}

/* Secondary Player Controls */
.ar-secondary-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ar-pill-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-family: var(--ar-font-body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ar-pill-ctrl:hover {
  background: rgba(255, 255, 255, 0.18);
}

.ar-pill-ctrl.is-on {
  background: rgba(150, 192, 73, 0.22);
  border-color: rgba(150, 192, 73, 0.55);
  color: #E2F5BE;
}

.ar-ctrl-accent {
  color: var(--ar-green-light);
}

.ar-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.4);
}

.ar-pill-ctrl.is-on .ar-dot {
  background: var(--ar-green);
}

.ar-sleep-active {
  color: #FBBF24;
}

.ar-player-feedback {
  margin: 0.85rem 0 0;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
  color: #FDE68A;
  text-align: center;
}

/* Right Chapter Sidebar */
.ar-sidebar {
  padding: 1.25rem;
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
}

.ar-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--ar-surface-border);
}

.ar-sidebar-title {
  margin: 0;
  font-family: var(--ar-font-heading);
  font-size: 1.1rem;
  font-weight: 800;
}

.ar-sidebar-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ar-text-muted);
}

.ar-tracks-badge {
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  font-family: var(--ar-font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  color: #FFFFFF;
  background: var(--ar-green);
}

.ar-sidebar-meta-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

.ar-total-duration {
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ar-text-muted);
  white-space: nowrap;
}

.ar-sidebar-progress {
  margin-bottom: 0.9rem;
}

.ar-sidebar-progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--ar-text-muted);
}

.ar-sidebar-progress-labels strong {
  color: var(--ar-accent-text);
}

.ar-mini-track {
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: rgba(128, 128, 128, 0.18);
  overflow: hidden;
}

.ar-mini-fill {
  width: 0%;
  height: 100%;
  border-radius: 9999px;
  background: var(--ar-green);
  transition: width 0.35s ease;
}

.ar-chapter-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.ar-chapter-list::-webkit-scrollbar {
  width: 7px;
}

.ar-chapter-list::-webkit-scrollbar-thumb {
  background: rgba(150, 192, 73, 0.45);
  border-radius: 9999px;
}

.ar-chapter-item {
  width: 100%;
  flex-shrink: 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem;
  border-radius: 16px;
  background: var(--ar-item-bg);
  border: 1px solid var(--ar-item-border);
  color: var(--ar-text);
  font-family: var(--ar-font-body);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.ar-chapter-item:hover {
  background: var(--ar-item-hover-bg);
  border-color: rgba(150, 192, 73, 0.55);
  transform: translateY(-1px);
}

.ar-chapter-item.is-active {
  background: var(--ar-item-active-bg);
  border: 2px solid var(--ar-green);
  box-shadow: 0 4px 14px rgba(150, 192, 73, 0.2);
}

.ar-thumb-wrap {
  position: relative;
  width: 64px;
  height: 48px;
  border-radius: 11px;
  overflow: hidden;
  flex-shrink: 0;
  background: #1B2234;
}

.ar-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
}

.ar-thumb-img.is-bonus {
  filter: blur(2px) brightness(0.7);
}

.ar-thumb-emoji {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(0, 0, 0, 0.32);
}

.ar-item-info {
  flex: 1;
  min-width: 0;
}

.ar-item-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.ar-item-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  background: rgba(150, 192, 73, 0.18);
  color: var(--ar-accent-text);
}

.ar-item-badge.is-bonus {
  background: rgba(209, 52, 100, 0.16);
  color: var(--ar-accent-bonus);
}

.ar-item-dur {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ar-text-muted);
}

.ar-item-title {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ar-item-status {
  width: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ar-check-badge {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: var(--ar-green);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ar-play-mini {
  font-size: 0.75rem;
  color: var(--ar-text-muted);
  opacity: 0.65;
}

/* Locked Chapters & Swinging Yellow Padlock */
.ar-chapter-item.is-locked {
  flex: 0 0 auto;
}

.ar-chapter-item.is-locked .ar-thumb-wrap,
.ar-chapter-item.is-locked .ar-item-info {
  opacity: 0.78;
  transition: opacity 0.22s ease;
}

.ar-chapter-item.is-locked:hover,
.ar-chapter-item.is-locked:focus-visible {
  border-color: #F59E0B;
  background: light-dark(#FFFBEB, rgba(250, 204, 21, 0.1));
}

.ar-chapter-item.is-locked:hover .ar-thumb-wrap,
.ar-chapter-item.is-locked:hover .ar-item-info,
.ar-chapter-item.is-locked:focus-visible .ar-thumb-wrap,
.ar-chapter-item.is-locked:focus-visible .ar-item-info {
  opacity: 0.92;
}

.ar-lock-svg {
  display: block;
  transform-origin: 50% 15%;
  will-change: transform;
}

.ar-chapter-item.is-locked:hover .ar-lock-svg,
.ar-chapter-item.is-locked:focus-visible .ar-lock-svg {
  animation: arLockSwing 0.85s ease-out both;
}

@keyframes arLockSwing {
  0%   { transform: rotate(0deg); }
  14%  { transform: rotate(18deg); }
  30%  { transform: rotate(-14deg); }
  46%  { transform: rotate(9deg); }
  64%  { transform: rotate(-6deg); }
  82%  { transform: rotate(3deg); }
  100% { transform: rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ar-chapter-item.is-locked:hover .ar-lock-svg,
  .ar-chapter-item.is-locked:focus-visible .ar-lock-svg {
    animation: none;
  }
}

/* Animated Equalizer */
.ar-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.ar-eq span {
  width: 4px;
  border-radius: 9999px;
  background: var(--ar-green);
}

.ar-eq-1 { animation: arEq1 0.8s ease-in-out infinite; }
.ar-eq-2 { animation: arEq2 0.7s ease-in-out infinite; }
.ar-eq-3 { animation: arEq3 0.9s ease-in-out infinite; }

.ar-eq.is-paused span {
  animation-play-state: paused;
  height: 6px !important;
}

@keyframes arEq1 { 0%, 100% { height: 6px; } 50% { height: 15px; } }
@keyframes arEq2 { 0%, 100% { height: 14px; } 50% { height: 5px; } }
@keyframes arEq3 { 0%, 100% { height: 8px; } 50% { height: 16px; } }

/* Audiobook QR Section (above portal footer) */
.ar-footer {
  padding: 1.5rem 1.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ar-text-muted);
}

.ar-qr-caption {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ar-text);
}

.ar-qr-link {
  display: block;
  padding: 0.5rem;
  border: 0;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 6px 20px var(--ar-surface-shadow-color);
  cursor: pointer;
}

.ar-qr-code {
  display: block;
  width: 160px;
  height: 160px;
}

.ar-qr-modal {
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  width: min(90vw, 480px);
  max-width: none;
  max-height: 92dvh;
  overflow: visible;
}

.ar-qr-modal[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.ar-qr-modal::backdrop {
  background: rgba(8, 12, 20, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ar-qr-expanded {
  display: block;
  width: 100%;
  padding: clamp(0.75rem, 3vw, 1.25rem);
  border: 0;
  border-radius: 24px;
  background: #FFFFFF;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  animation: arQrZoom 0.2s ease-out;
}

.ar-qr-expanded-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.ar-qr-modal-hint {
  margin: 0;
  color: #FFFFFF;
  font-size: 0.85rem;
  text-align: center;
}

@keyframes arQrZoom {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Native Fullscreen Dialog */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(8px);
}

.ar-modal {
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  width: min(94vw, 1080px);
  max-width: none;
  max-height: 94dvh;
  color: #FFFFFF;
}

.ar-modal[open] {
  display: flex;
  flex-direction: column;
}

.ar-modal-shell {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

.ar-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ar-modal-heading-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.ar-modal-title {
  margin: 0;
  font-family: var(--ar-font-heading);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ar-modal-close {
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  font-family: var(--ar-font-body);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.ar-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.ar-modal-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 80dvh;
  border-radius: 24px;
  overflow: hidden;
  background: #121826;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.ar-modal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  -webkit-user-drag: none;
}

.ar-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  border: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.ar-modal-prev { left: 0.85rem; }
.ar-modal-next { right: 0.85rem; }

.ar-modal-nav:hover:not(:disabled) {
  background: var(--ar-green);
}

.ar-modal-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Live Subtitle Caption Box */
.ar-subtitle-box {
  margin-top: 0.9rem;
  padding: 0.85rem 1.05rem;
  border-radius: 18px;
  background: var(--ar-pill-bg);
  border: 1px solid var(--ar-pill-border);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.ar-subtitle-box[hidden] {
  display: none;
}

.ar-subtitle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.ar-subtitle-badge {
  font-family: var(--ar-font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ar-pill-text);
}

.ar-subtitle-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ar-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid var(--ar-surface-border);
  background: var(--ar-surface);
  color: var(--ar-text);
  font-family: var(--ar-font-body);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease;
}

.ar-mini-btn:hover {
  border-color: var(--ar-green);
}

.ar-mini-btn.is-active {
  background: var(--ar-green);
  color: #FFFFFF;
  border-color: var(--ar-green-hover);
}

.ar-subtitle-text {
  margin: 0;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ar-text);
  min-height: 2.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.15s ease;
}

.ar-subtitle-box.is-size-md .ar-subtitle-text {
  font-size: 1rem;
}

.ar-subtitle-box.is-size-lg .ar-subtitle-text {
  font-size: 1.2rem;
}

.ar-subtitle-box.is-size-xl .ar-subtitle-text {
  font-size: 1.42rem;
}

.ar-subtitle-text.is-idle {
  color: var(--ar-text-muted);
  font-weight: 600;
}

/* Collapsible Read-Along Panel */
.ar-transcript-panel {
  padding: 1.15rem 1.25rem;
}

.ar-transcript-panel[hidden] {
  display: none;
}

.ar-transcript-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--ar-surface-border);
}

.ar-transcript-title {
  margin: 0;
  font-family: var(--ar-font-heading);
  font-size: 1rem;
  font-weight: 800;
}

.ar-transcript-hint {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: var(--ar-text-muted);
}

.ar-transcript-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 310px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.ar-transcript-list::-webkit-scrollbar {
  width: 7px;
}

.ar-transcript-list::-webkit-scrollbar-thumb {
  background: rgba(150, 192, 73, 0.45);
  border-radius: 9999px;
}

.ar-transcript-cue {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--ar-item-border);
  border-left: 4px solid transparent;
  background: var(--ar-item-bg);
  color: var(--ar-text);
  font-family: var(--ar-font-body);
  font-size: 0.88rem;
  line-height: 1.45;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ar-transcript-cue:hover {
  background: var(--ar-item-hover-bg);
  border-color: rgba(150, 192, 73, 0.45);
}

.ar-transcript-cue.is-current {
  background: var(--ar-item-active-bg);
  border-color: rgba(150, 192, 73, 0.5);
  border-left-color: var(--ar-green);
  font-weight: 700;
}

.ar-cue-time {
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  background: rgba(150, 192, 73, 0.16);
  color: var(--ar-accent-text);
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* Modal Live Subtitle Pill */
.ar-modal-subtitle {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  max-width: min(90%, 720px);
  padding: 0.55rem 1.1rem;
  border-radius: 16px;
  background: rgba(12, 16, 24, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.ar-modal-subtitle[hidden] {
  display: none;
}

/* Registration Invitation Dialog */
.ar-reg-modal {
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  width: min(92vw, 480px);
  max-width: none;
  max-height: 92dvh;
  color: var(--ar-text);
}

.ar-reg-modal[open] {
  display: flex;
  flex-direction: column;
  animation: arQrZoom 0.22s ease;
}

.ar-reg-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 26px;
  background: var(--ar-surface);
  border: 2px solid var(--ar-green);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.ar-reg-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #121826;
  overflow: hidden;
}

.ar-reg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}

.ar-reg-body {
  padding: 1.25rem 1.4rem 1.4rem;
  text-align: center;
}

.ar-reg-chapter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-family: var(--ar-font-heading);
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(209, 52, 100, 0.15);
  color: var(--ar-accent-bonus);
  margin-bottom: 0.55rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ar-reg-title {
  margin: 0 0 0.45rem;
  font-family: var(--ar-font-heading);
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ar-text);
}

.ar-reg-desc {
  margin: 0 0 1.2rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ar-text-muted);
}

.ar-reg-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.ar-reg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  font-family: var(--ar-font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ar-reg-btn:hover {
  transform: translateY(-1px);
}

.ar-reg-btn-primary {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--ar-green) 0%, #7BA633 100%);
  border: 0;
  box-shadow: 0 6px 18px rgba(150, 192, 73, 0.35);
}

.ar-reg-btn-primary:hover {
  background: linear-gradient(135deg, var(--ar-green-hover) 0%, #689F38 100%);
}

.ar-reg-btn-secondary {
  color: var(--ar-text);
  background: transparent;
  border: 2px solid var(--ar-surface-border);
}

.ar-reg-btn-secondary:hover {
  border-color: var(--ar-text-muted);
}

@media (max-width: 440px) {
  .ar-reg-actions {
    grid-template-columns: 1fr;
  }
}

/* Responsive Breakpoints */
@media (max-width: 1023px) {
  .ar-layout {
    display: flex;
    flex-direction: column;
  }

  .ar-stage-col,
  .ar-sidebar {
    width: 100%;
    min-width: 0;
  }

  .ar-sidebar {
    position: static;
  }

  .ar-chapter-list {
    max-height: 420px;
  }
}

@media (max-width: 767px) {
  .ar-page .header-content {
    padding: 0 0.25rem;
    gap: 0.4rem;
  }

  .ar-page .header .logo-svg {
    height: 1.8rem;
  }

  .ar-header-center {
    margin-left: auto;
    margin-right: 0.25rem;
  }

  .ar-theme-toggle {
    padding: 0.38rem 0.68rem;
    font-size: 0.72rem;
  }

  .ar-theme-option {
    gap: 0.3rem;
  }

  .ar-main {
    padding: 1rem;
  }

  .ar-stage-card {
    padding: 0.85rem;
    border-radius: 20px;
  }

  .ar-nav-prev { left: 0.35rem; }
  .ar-nav-next { right: 0.35rem; }

  .ar-nav-fab {
    width: 42px;
    height: 42px;
  }

  .ar-player {
    padding: 1rem;
    border-radius: 20px;
  }

  .ar-primary-controls {
    gap: 1rem;
  }

  .ar-secondary-controls {
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .ar-page .header .logo-svg {
    height: 1.55rem;
  }

  .ar-theme-toggle {
    padding: 0.34rem 0.55rem;
    font-size: 0.68rem;
  }
}
