/* Museum boards 02–03: existing memory-feed and blind-box DOM only.
   Root layout changes require native content, so fixture components are untouched. */

body.student-page.museum-refined #podcastPanel:has(.flashcard-blindbox, .memory-feed-card, .memory-feed-empty) {
  --memory-ink: var(--ink, #171816);
  --memory-fg: var(--fg, #e7e1d4);
  --memory-accent: var(--accent, #b59a65);
  --memory-line: var(--line, rgba(181, 154, 101, .25));
  --memory-muted: #aaa28f;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--memory-ink) !important;
  box-shadow: none !important;
  color: var(--memory-fg) !important;
}

body.student-page.museum-refined #podcastPanel.active-mobile-panel:has(.flashcard-blindbox, .memory-feed-card, .memory-feed-empty) {
  height: calc(100svh - 74px - env(safe-area-inset-bottom, 0px)) !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.student-page.museum-refined #podcastPanel .memory-feed-shell:has(.flashcard-blindbox, .memory-feed-card, .memory-feed-empty) {
  display: flex !important;
  flex-direction: column;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  background: var(--memory-ink) !important;
  overflow: hidden !important;
}

body.student-page.museum-refined #podcastPanel:has(.flashcard-blindbox, .memory-feed-card, .memory-feed-empty) .memory-feed-toolbar {
  position: relative !important;
  inset: auto !important;
  flex: 0 0 auto;
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) 32px !important;
  gap: 10px !important;
  min-height: 58px !important;
  padding: max(8px, env(safe-area-inset-top, 0px)) 14px 8px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--memory-line) !important;
  border-radius: 0 !important;
  background: var(--memory-ink) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.student-page.museum-refined #podcastPanel:has(.flashcard-blindbox, .memory-feed-card, .memory-feed-empty) .memory-feed-mode-switch {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.student-page.museum-refined #podcastPanel:has(.flashcard-blindbox, .memory-feed-card, .memory-feed-empty) .memory-feed-mode-switch button {
  min-height: 40px !important;
  padding: 3px 0 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--memory-muted) !important;
  font: 400 15px / 1.4 var(--font-body, "Songti SC", serif) !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

body.student-page.museum-refined #podcastPanel:has(.flashcard-blindbox, .memory-feed-card, .memory-feed-empty) .memory-feed-mode-switch button.active { color: var(--memory-accent) !important; }
body.student-page.museum-refined #podcastPanel:has(.flashcard-blindbox, .memory-feed-card, .memory-feed-empty) .memory-feed-mode-switch button.active::after { width: 70%; height: 1px; background: var(--memory-accent) !important; box-shadow: none !important; }
body.student-page.museum-refined #podcastPanel:has(.flashcard-blindbox, .memory-feed-card, .memory-feed-empty) .memory-feed-text-button { width: 32px !important; min-width: 32px !important; padding: 6px !important; border: 0 !important; border-radius: 2px !important; background: transparent !important; color: var(--memory-accent) !important; }
body.student-page.museum-refined #podcastPanel:has(.flashcard-blindbox, .memory-feed-card, .memory-feed-empty) .memory-feed-text-button img { width: 20px !important; height: 20px !important; filter: brightness(0) invert(.8) sepia(.3) !important; }

body.student-page.museum-refined #podcastPanel #podcastLibrary:has(.flashcard-blindbox, .memory-feed-card, .memory-feed-empty) {
  display: block !important;
  flex: 1 1 auto;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 0 24px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--memory-ink) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-snap-type: y proximity !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: contain;
  scroll-padding-bottom: 24px;
}

/* Let the selected card's era scene reach the blind-box surface; keep the
   toolbar, image feed and reading cards themselves opaque and readable. */
body.student-page.museum-refined #podcastPanel:has(.flashcard-blindbox),
body.student-page.museum-refined #podcastPanel .memory-feed-shell:has(.flashcard-blindbox),
body.student-page.museum-refined #podcastPanel #podcastLibrary:has(.flashcard-blindbox) {
  background: transparent !important;
}

/* The existing <details> keeps filtering collapsed until the user opens it. */
body.student-page.museum-refined #podcastPanel .flashcard-blindbox {
  --flashcard-height: clamp(260px, calc(100svh - 450px), 460px);
  width: min(100%, 720px) !important;
  min-height: 0 !important;
  margin-inline: auto !important;
  padding: 0 22px 8px !important;
  color: var(--memory-fg) !important;
  background: transparent !important;
  font-family: var(--font-body, "Songti SC", serif) !important;
}

body.student-page.museum-refined #podcastPanel .flashcard-blindbox-hero { gap: 4px !important; margin: 0 0 8px !important; padding: 0 !important; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-hero span { color: var(--memory-muted) !important; font-size: 11px !important; font-weight: 400 !important; letter-spacing: .04em !important; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-hero strong { color: var(--memory-fg) !important; font-family: var(--font-display, "Songti SC", serif) !important; font-size: 25px !important; font-weight: 400 !important; line-height: 1.4 !important; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-hero p { color: var(--memory-muted) !important; font-size: 12px !important; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox.has-card .flashcard-blindbox-hero :is(strong, p) { display: none !important; }

body.student-page.museum-refined #podcastPanel .flashcard-blindbox-range-bar {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: calc(100% + 44px);
  margin-inline: -22px;
  padding-inline: 18px;
  border-bottom: 1px solid var(--memory-line);
}
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-range {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.student-page.museum-refined #podcastPanel .flashcard-blindbox-range summary { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 0 !important; color: var(--memory-accent) !important; line-height: 1.5; list-style: none; cursor: pointer; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-range summary::-webkit-details-marker { display: none; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-range summary :is(span, strong) { color: var(--memory-fg) !important; font-size: 12px !important; font-weight: 400 !important; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-range summary > span { flex-shrink: 0; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-range summary strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-range[open] summary strong { white-space: normal; overflow-wrap: anywhere; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-range[open] summary .flashcard-control-icon { transform: rotate(180deg); }
body.student-page.museum-refined #podcastPanel .flashcard-control-icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 20px; object-fit: contain; filter: brightness(0) invert(.75) sepia(.3); }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-range summary .flashcard-control-icon { width: 15px; height: 15px; flex-basis: 15px; }
body.student-page.museum-refined #podcastPanel .flashcard-sound-toggle { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; flex: 0 0 auto; padding: 5px 0; border: 0; background: transparent; color: var(--memory-accent); font: 400 12px / 1.4 var(--font-body); box-shadow: none; }
body.student-page.museum-refined #podcastPanel .flashcard-sound-toggle:disabled { opacity: .45; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; padding: 6px 0 16px !important; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-filter { display: grid; min-width: 0; gap: 5px; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-filter span { color: var(--memory-muted) !important; font-weight: 400 !important; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-filter select { width: 100%; min-width: 0; min-height: 40px !important; border: 1px solid var(--memory-line) !important; border-radius: 3px !important; background: #22241f !important; color: var(--memory-fg) !important; font-family: var(--font-body, "Songti SC", serif) !important; box-shadow: none !important; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-filter option { background: #22241f; color: #e7e1d4; }

body.student-page.museum-refined #podcastPanel .flashcard-blindbox-deck-meta { display: flex; align-items: center; justify-content: space-between; min-height: 36px; gap: 8px !important; margin: 0 0 8px !important; color: var(--memory-muted) !important; font-size: 11px !important; }
body.student-page.museum-refined #podcastPanel :is(.flashcard-blindbox-deck-meta button, .student-flashcard-summary > button) { position: static !important; min-height: 36px !important; border: 0 !important; border-radius: 0 !important; padding: 6px 0 6px 10px !important; background: transparent !important; color: var(--memory-accent) !important; font: 400 12px / 1.4 var(--font-body, "Songti SC", serif) !important; box-shadow: none !important; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-deck-meta button.active { color: var(--memory-fg) !important; text-decoration: underline; text-underline-offset: 5px; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox .student-flashcard-shell { width: min(100%, 460px) !important; margin: 0 auto !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; animation: none !important; }
body.student-page.museum-refined #podcastPanel .student-flashcard-summary { position: relative !important; height: auto !important; min-height: 36px !important; margin: 0 0 10px !important; color: var(--memory-fg) !important; gap: 10px; }
body.student-page.museum-refined #podcastPanel .student-flashcard-summary > div { display: block !important; min-width: 0; }
body.student-page.museum-refined #podcastPanel .student-flashcard-summary strong { color: var(--memory-fg) !important; font-size: 13px !important; font-weight: 400 !important; }
body.student-page.museum-refined #podcastPanel .student-flashcard-summary > div > span { max-width: none !important; color: var(--memory-muted) !important; font-size: 11px !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }

body.student-page.museum-refined #podcastPanel .flashcard-blindbox-stage-wrap {
  width: min(100%, calc(var(--flashcard-height) * .667)) !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  margin: 0 auto 14px !important;
}

/* The active face establishes height, so long course answers expand rather than
   disappearing below a fixed card or forcing the question face to be too tall. */
body.student-page.museum-refined #podcastPanel :is(.student-flashcard-stage, .student-flashcard-card) {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  transform: none !important;
}

body.student-page.museum-refined #podcastPanel .student-flashcard-stage {
  perspective: 1600px !important;
}

body.student-page.museum-refined #podcastPanel .student-flashcard-card {
  display: block !important;
  transform: rotateY(0deg) !important;
  transform-style: preserve-3d !important;
  transition: transform 520ms cubic-bezier(.45, 0, .55, 1) !important;
}

body.student-page.museum-refined #podcastPanel .student-flashcard-shell.is-flipped .student-flashcard-card {
  transform: rotateY(180deg) !important;
}

body.student-page.museum-refined #podcastPanel .student-flashcard-face {
  position: relative !important;
  inset: auto !important;
  display: grid !important;
  grid-area: 1 / 1;
  grid-template-rows: auto auto 1fr auto !important;
  gap: 12px !important;
  width: 100% !important;
  height: auto !important;
  min-height: var(--flashcard-height) !important;
  max-height: none !important;
  padding: 24px 22px 22px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #e7dec8 url('/assets/museum/r210/card-paper.png') center / 100% 100% !important;
  color: #302d25 !important;
  box-shadow: 0 6px 20px #0002 !important;
  overflow: visible !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  transition: visibility 0s linear 260ms !important;
  text-align: center !important;
}

body.student-page.museum-refined #podcastPanel .student-flashcard-front { visibility: visible; transform: rotateY(0deg) !important; }
body.student-page.museum-refined #podcastPanel .student-flashcard-back { position: absolute !important; inset: 0 !important; visibility: hidden; transform: rotateY(180deg) !important; }
body.student-page.museum-refined #podcastPanel .student-flashcard-shell.is-flipped .student-flashcard-back { position: relative !important; visibility: visible; }
body.student-page.museum-refined #podcastPanel .student-flashcard-shell.is-flipped .student-flashcard-front { position: absolute !important; inset: 0 !important; visibility: hidden; }
body.student-page.museum-refined #podcastPanel .student-flashcard-face strong { display: block !important; align-self: center !important; max-height: none !important; margin: 0 !important; color: #302d25 !important; font-family: var(--font-display, "Songti SC", serif) !important; font-size: clamp(20px, 5.1vw, 27px) !important; font-weight: 400 !important; line-height: 1.65 !important; white-space: pre-line !important; overflow: visible !important; overflow-wrap: anywhere; -webkit-line-clamp: unset !important; }
body.student-page.museum-refined #podcastPanel .student-flashcard-back strong { font-family: var(--font-body, "Songti SC", serif) !important; font-size: clamp(17px, 4.5vw, 22px) !important; line-height: 1.8 !important; }
body.student-page.museum-refined #podcastPanel .flashcard-illustration { display: block; justify-self: center; width: 100%; height: clamp(80px, calc(var(--flashcard-height) * .34), 180px); object-fit: contain; mix-blend-mode: multiply; }
body.student-page.museum-refined #podcastPanel .flashcard-era-mark { display: block; justify-self: center; width: 40px; height: 48px; object-fit: contain; mix-blend-mode: multiply; }
body.student-page.museum-refined #podcastPanel .student-flashcard-face :is(small, em) { color: #6b624e !important; font: 400 12px / 1.6 var(--font-body, "Songti SC", serif) !important; white-space: normal !important; overflow-wrap: anywhere; letter-spacing: .05em !important; }
body.student-page.museum-refined #podcastPanel .student-flashcard-instruction { min-height: 32px !important; margin: 0 !important; padding: 8px 2px !important; color: var(--memory-muted) !important; font-size: 12px !important; line-height: 1.6; }

body.student-page.museum-refined #podcastPanel .student-flashcard-ratings { position: static !important; inset: auto !important; width: 100% !important; min-height: 0 !important; margin: 16px 0 0 !important; padding: 0 !important; gap: 9px !important; }
body.student-page.museum-refined #podcastPanel .student-flashcard-ratings[hidden] { display: none !important; }
body.student-page.museum-refined #podcastPanel .student-flashcard-ratings button { min-height: 52px !important; padding: 8px 4px !important; border: 1px solid var(--memory-line) !important; border-radius: 3px !important; background: transparent !important; color: var(--memory-fg) !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
body.student-page.museum-refined #podcastPanel .student-flashcard-ratings button.good { border-color: var(--memory-accent) !important; color: var(--memory-accent) !important; }
body.student-page.museum-refined #podcastPanel .student-flashcard-ratings :is(span, small) { color: inherit !important; font-family: var(--font-body, "Songti SC", serif) !important; font-weight: 400 !important; }
body.student-page.museum-refined #podcastPanel .student-flashcard-ratings small { display: block !important; margin-top: 4px; color: var(--memory-muted) !important; font-size: 10px !important; }
body.student-page.museum-refined #podcastPanel :is(.flashcard-blindbox-empty, .flashcard-blindbox-ready) { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 0 !important; gap: 12px !important; margin-top: 22px !important; color: var(--memory-fg) !important; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-ready-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; width: min(70vw, 260px) !important; min-height: 340px; aspect-ratio: 2/3; padding: 28px; border: 0 !important; border-radius: 9px !important; background: #e7dec8 url('/assets/museum/r210/card-paper.png') center / 100% 100% !important; color: #3b3124; box-shadow: 0 8px 22px #0003 !important; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-ready-card img { width: 74px; height: 100px; object-fit: contain !important; mix-blend-mode: multiply; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-ready-card > span { font: 400 22px / 1.5 var(--font-display); color: #3b3124; }
body.student-page.museum-refined #podcastPanel :is(.flashcard-blindbox-empty, .flashcard-blindbox-ready) > strong { color: var(--memory-fg) !important; font-family: var(--font-display, "Songti SC", serif) !important; font-size: 22px !important; font-weight: 400 !important; }
body.student-page.museum-refined #podcastPanel :is(.flashcard-blindbox-empty, .flashcard-blindbox-ready) > span { color: var(--memory-muted) !important; font-size: 13px !important; }

body.student-page.museum-refined #podcastPanel .flashcard-primary-flip { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--memory-accent); border-radius: 3px; background: transparent; color: var(--memory-accent); font: 400 19px / 1.5 var(--font-display); box-shadow: none; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-footer button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 5px 0; border: 0; border-radius: 0; background: transparent; color: var(--memory-accent); font: 400 14px / 1.5 var(--font-body); box-shadow: none; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-footer button:disabled { opacity: .45; }

/* The same paper and type treatment inside a real knowledge-point flashcard module. */
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] {
  width: min(100%, 520px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-summary :is(strong, span),
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-nav span { color: var(--muted); font-weight: 400; }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] :is(.student-flashcard-filter, .student-flashcard-nav button) { border-radius: 3px; border-color: var(--line); background: transparent; color: var(--accent); font-weight: 400; }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-stage { height: auto; min-height: 0; border-radius: 8px; }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-card { height: auto; min-height: 0; transition: transform 520ms cubic-bezier(.45,0,.55,1); }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-face { position: relative; display: grid; min-height: 310px; padding: 30px 28px; border: 0; border-radius: 8px; background: #e7dec8 url('/assets/museum/r210/card-paper.png') center / 100% 100%; color: #302d25; overflow: visible; box-shadow: 0 8px 20px #0002; transition: visibility 0s linear 260ms; }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-front { visibility: visible; }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-back { position: absolute; visibility: hidden; }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell].is-flipped .student-flashcard-front { position: absolute; visibility: hidden; }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell].is-flipped .student-flashcard-back { position: relative; visibility: visible; }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-face strong { font-family: var(--font-display); font-size: clamp(21px, 5vw, 28px); font-weight: 400; color: #302d25; overflow-wrap: anywhere; }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-back strong { font-family: var(--font-body); font-size: 18px; line-height: 1.85; }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-face :is(small, em) { color: #6b624e; font: 400 12px / 1.6 var(--font-body); }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-ratings button { border-radius: 3px; background: transparent; color: var(--fg); border-color: var(--line); }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-ratings button.good { color: var(--accent); border-color: var(--accent); }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] :is(.student-flashcard-ratings, .student-flashcard-instruction)[hidden] { display: none !important; }
body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] .student-flashcard-instruction { min-height: 0; color: var(--muted); font-size: 12px; }

/* A full image occupies its own column, leaving the real actions unobstructed. */
body.student-page.museum-refined #podcastPanel .memory-feed-card {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 54px;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 12px 6px;
  width: min(100%, 900px) !important;
  height: auto !important;
  min-height: calc(100dvh - 146px) !important;
  max-height: none !important;
  margin: 0 auto !important;
  padding: 16px 10px 28px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--memory-line) !important;
  border-radius: 0 !important;
  background: var(--memory-ink) !important;
  color: var(--memory-fg) !important;
  overflow: visible !important;
}

body.student-page.museum-refined #podcastPanel .memory-feed-carousel {
  position: relative !important;
  inset: auto !important;
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-width: 0 !important;
  height: clamp(310px, 63dvh, 740px) !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 2px !important;
  background: transparent !important;
}

/* A definite zero-minimum grid track keeps intrinsic image height from growing
   past the carousel (notably the landscape tablet's shorter artwork viewport). */
body.student-page.museum-refined #podcastPanel .memory-feed-slide { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); place-items: center; height: 100% !important; max-height: 100% !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-slide::before { content: none !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-slide img { position: relative !important; width: 100% !important; height: 100% !important; min-width: 0 !important; min-height: 0 !important; max-height: 100% !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; object-fit: contain !important; object-position: center !important; filter: none !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-shade { background: none !important; pointer-events: none !important; }

body.student-page.museum-refined #podcastPanel .memory-feed-actions { position: relative !important; inset: auto !important; z-index: 3; grid-column: 2; grid-row: 1; display: flex !important; flex-direction: column; justify-content: center; align-items: center; gap: 18px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-actions button { width: 48px !important; min-width: 44px !important; min-height: 44px !important; padding: 4px 2px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: var(--memory-accent) !important; box-shadow: none !important; pointer-events: auto !important; font-weight: 400 !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-actions button img { width: 22px !important; height: 22px !important; filter: brightness(0) invert(.8) sepia(.3) !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-actions :is(span, strong) { color: inherit !important; font: 400 11px / 1.5 var(--font-body, "Songti SC", serif) !important; text-shadow: none !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-actions [aria-pressed="true"] { color: var(--memory-fg) !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-actions button:disabled { opacity: .45 !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-actions [data-memory-feed-favorite] { order: 0; }
body.student-page.museum-refined #podcastPanel .memory-feed-actions [data-memory-feed-play] { order: 1; }
body.student-page.museum-refined #podcastPanel .memory-feed-actions [data-memory-feed-annotate] { order: 2; }
body.student-page.museum-refined #podcastPanel .memory-feed-actions [data-memory-feed-video] { order: 3; }
body.student-page.museum-refined #podcastPanel .memory-feed-actions [data-memory-feed-comments] { order: 4; }
body.student-page.museum-refined #podcastPanel .memory-feed-actions [data-memory-feed-enter] { order: 5; }
body.student-page.museum-refined #podcastPanel .memory-feed-actions [data-memory-feed-favorite]::after { content: "收藏"; display: block; font: 400 11px / 1.5 var(--font-body); }
body.student-page.museum-refined #podcastPanel .memory-feed-actions [data-memory-feed-favorite] img { content: url('/assets/museum/r210/icons/bookmark.svg'); }
body.student-page.museum-refined #podcastPanel .memory-feed-actions [data-memory-feed-play] img { content: url('/assets/museum/r210/icons/volume.svg'); }
body.student-page.museum-refined #podcastPanel .memory-feed-actions [data-memory-feed-annotate] img { content: url('/assets/museum/r210/icons/pencil.svg'); }
body.student-page.museum-refined #podcastPanel .memory-feed-actions [data-memory-feed-enter] img { content: url('/assets/museum/r210/icons/notebook.svg'); }

body.student-page.museum-refined #podcastPanel .memory-feed-copy { position: relative !important; inset: auto !important; z-index: 3; grid-column: 1 / -1; grid-row: 2; gap: 6px !important; padding: 0 6px 0 0 !important; color: var(--memory-fg) !important; text-shadow: none !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-copy > strong { color: var(--memory-fg) !important; font-family: var(--font-display, "Songti SC", serif) !important; font-size: 22px !important; font-weight: 400 !important; line-height: 1.5; }
body.student-page.museum-refined #podcastPanel .memory-feed-copy > span { color: var(--memory-muted) !important; font: 400 12px / 1.6 var(--font-body, "Songti SC", serif) !important; white-space: normal !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-collection-link { width: 100% !important; min-height: 34px !important; padding: 6px 0 !important; border: 0 !important; border-top: 1px solid var(--memory-line) !important; border-radius: 0 !important; color: var(--memory-muted) !important; background: transparent !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-collection-link :is(strong, em) { color: inherit !important; font-family: var(--font-body, "Songti SC", serif) !important; font-weight: 400 !important; }

/* Lecture controls keep the existing .expanded and .is-playing behavior. */
body.student-page.museum-refined #podcastPanel .memory-feed-audio { position: relative !important; inset: auto !important; grid-column: 1 / -1; grid-row: 3; min-height: 0 !important; margin: 0 6px 0 0 !important; padding: 0 !important; border: 1px solid var(--memory-line) !important; border-radius: 4px !important; background: transparent !important; color: var(--memory-fg) !important; box-shadow: none !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio.expanded { display: grid !important; grid-template-columns: 28px 30px minmax(40px, 1fr) 30px 40px 30px; gap: 4px; padding: 8px !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio-controls { position: relative !important; inset: auto !important; min-height: 36px !important; align-items: center; justify-content: space-between; gap: 4px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; pointer-events: auto !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio-controls button { width: 38px !important; min-width: 36px !important; min-height: 36px !important; padding: 7px !important; border: 0 !important; border-radius: 2px !important; background: transparent !important; color: var(--memory-accent) !important; font-family: var(--font-body, "Songti SC", serif) !important; font-weight: 400 !important; box-shadow: none !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio-controls button img { width: 21px !important; height: 21px !important; filter: brightness(0) invert(.8) sepia(.3) !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-progress { gap: 8px !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-progress input[type="range"] { background: #555347 !important; accent-color: var(--memory-accent) !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-progress input::-webkit-slider-runnable-track { background: #555347 !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-progress input::-webkit-slider-thumb { background: var(--memory-accent) !important; box-shadow: none !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-progress input::-moz-range-track { background: #555347 !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-progress input::-moz-range-thumb { background: var(--memory-accent) !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-progress > span { color: var(--memory-muted) !important; font-size: 11px !important; text-shadow: none !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio.expanded .memory-feed-audio-controls { display: contents !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio.expanded .memory-feed-progress { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; align-self: center; min-width: 0; gap: 3px !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio.expanded .memory-feed-progress input { width: 100%; min-width: 0; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio.expanded .memory-feed-audio-controls button { width: 100% !important; min-width: 0 !important; padding: 4px !important; grid-row: 1; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio.expanded [data-memory-feed-play] { grid-column: 1; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio.expanded [data-memory-feed-skip="-10"] { grid-column: 2; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio.expanded [data-memory-feed-skip="10"] { grid-column: 4; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio.expanded [data-memory-feed-speed] { grid-column: 5; font-size: 12px; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio.expanded [data-memory-feed-timer] { grid-column: 6; }
body.student-page.museum-refined #podcastPanel .memory-feed-audio.expanded [data-memory-sleep-summary] { grid-column: 1 / -1; grid-row: 2; color: var(--memory-muted); text-align: center; font-size: 10px; }

body.student-page.museum-refined #podcastPanel .memory-feed-search { border: 1px solid var(--memory-line) !important; border-radius: 4px !important; background: var(--memory-ink) !important; color: var(--memory-fg) !important; box-shadow: 0 8px 20px #0003 !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-search :is(button, input) { border: 1px solid var(--memory-line) !important; border-radius: 2px !important; background: #22241f !important; color: var(--memory-fg) !important; font-family: var(--font-body, "Songti SC", serif) !important; }
body.student-page.museum-refined #podcastPanel .memory-feed-empty { padding: 60px 24px; color: var(--memory-muted); background: transparent; }
body.student-page.museum-refined #podcastPanel :is(.flashcard-blindbox, .memory-feed-card, .memory-feed-search) :is(button, select, input):focus-visible { outline: 2px solid var(--memory-accent) !important; outline-offset: 3px; }
body.student-page.museum-refined #podcastPanel .flashcard-blindbox-range summary:focus-visible { outline: 2px solid var(--memory-accent); outline-offset: 2px; }

/* Shared native lecture dock; visibility, positioning and player state stay native. */
body.student-page.museum-refined #modulePodcastDock {
  gap: 7px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--line, rgba(181, 154, 101, .3)) !important;
  border-radius: 4px !important;
  background: var(--ink, #171816) !important;
  color: var(--fg, #e7e1d4) !important;
  box-shadow: 0 6px 20px #0003 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  font-family: var(--font-body, "Songti SC", serif) !important;
}

body.student-page.museum-refined #modulePodcastDock .module-podcast-now > img { width: 22px; height: 22px; filter: brightness(0) invert(.8) sepia(.3); }
body.student-page.museum-refined #modulePodcastDock :is(strong, button, select) { color: var(--fg, #e7e1d4) !important; font-family: var(--font-body, "Songti SC", serif) !important; font-weight: 400 !important; }
body.student-page.museum-refined #modulePodcastDock :is(small, span) { color: #aaa28f !important; font-weight: 400 !important; }
body.student-page.museum-refined #modulePodcastDock :is(button, select) { min-height: 38px !important; border: 1px solid var(--line, rgba(181, 154, 101, .3)) !important; border-radius: 2px !important; background: transparent !important; color: var(--accent, #b59a65) !important; box-shadow: none !important; }
body.student-page.museum-refined #modulePodcastDock input[type="range"] { accent-color: var(--accent, #b59a65) !important; box-shadow: none !important; }
body.student-page.museum-refined #modulePodcastDock select option { background: #22241f; color: #e7e1d4; }
body.student-page.museum-refined #modulePodcastDock :is(button, select, input):focus-visible { outline: 2px solid var(--accent, #b59a65); outline-offset: 3px; }

@media (max-width: 380px) {
  body.student-page.museum-refined #podcastPanel:has(.flashcard-blindbox, .memory-feed-card) .memory-feed-toolbar { gap: 5px !important; padding-inline: 9px !important; }
  body.student-page.museum-refined #podcastPanel:has(.flashcard-blindbox, .memory-feed-card) .memory-feed-mode-switch { gap: 7px !important; }
  body.student-page.museum-refined #podcastPanel:has(.flashcard-blindbox, .memory-feed-card) .memory-feed-mode-switch button { font-size: 13px !important; }
  body.student-page.museum-refined #podcastPanel .flashcard-blindbox { padding-inline: 16px !important; }
  body.student-page.museum-refined #podcastPanel .flashcard-blindbox-range-bar { width: calc(100% + 32px); margin-inline: -16px; padding-inline: 14px; }
  body.student-page.museum-refined #podcastPanel .student-flashcard-face { padding-inline: 22px !important; }
  body.student-page.museum-refined #podcastPanel .memory-feed-card { grid-template-columns: minmax(0, 1fr) 46px; padding-left: 10px !important; }
  body.student-page.museum-refined #podcastPanel .memory-feed-actions { gap: 12px !important; }
}

@media (min-width: 700px) {
  body.student-page.museum-refined #podcastPanel .flashcard-blindbox { --flashcard-height: clamp(280px, calc(100svh - 450px), 620px); padding-top: 0 !important; }
  body.student-page.museum-refined #podcastPanel .flashcard-blindbox-filters { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  body.student-page.museum-refined #podcastPanel .memory-feed-card { grid-template-columns: minmax(0, 1fr) 70px; gap: 18px 14px; padding: 24px 30px 34px !important; }
  body.student-page.museum-refined #podcastPanel .memory-feed-actions { gap: 24px !important; }
  body.student-page.museum-refined #podcastPanel .memory-feed-actions button { width: 58px !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.student-page.museum-refined #podcastPanel .student-flashcard-card { transition: none !important; }
  body.student-page.museum-refined #podcastPanel .student-flashcard-face { transition: none !important; }
  body.student-page.museum-refined .student-flashcard-shell[data-flashcard-shell] :is(.student-flashcard-card, .student-flashcard-face) { transition: none !important; }
}

body.student-page.museum-refined[data-museum-motion="off"] :is(.student-flashcard-card, .student-flashcard-face) { transition: none !important; }

/* r217: the artwork itself fills the width, not just a letterboxed frame.
   Each active image provides its own intrinsic ratio. Long portrait artwork
   scrolls vertically; the real carousel still pages horizontally. */
body.student-page.museum-refined #podcastPanel .memory-feed-card {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto !important;
  gap: 12px 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  padding: 8px 0 24px !important;
}

body.student-page.museum-refined #podcastPanel .memory-feed-card > .memory-feed-visual {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: var(--memory-image-aspect, auto);
}

body.student-page.museum-refined #podcastPanel .memory-feed-card .memory-feed-visual > .memory-feed-carousel {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  touch-action: pan-x pan-y !important;
  border-radius: 0 !important;
}

body.student-page.museum-refined #podcastPanel .memory-feed-card .memory-feed-visual > .memory-feed-actions {
  --memory-action-count: 4;
  --memory-rail-height: calc(var(--memory-action-count) * 48px + (var(--memory-action-count) - 1) * 10px);
  position: sticky !important;
  top: max(12px, calc(100svh - 172px - var(--memory-rail-height) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))) !important;
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  justify-content: flex-start;
  width: 48px;
  height: var(--memory-rail-height);
  max-height: calc(100% - 28px);
  margin: 14px max(10px, env(safe-area-inset-right, 0px)) 14px 0 !important;
  gap: 10px !important;
  overflow-y: auto;
  scrollbar-width: none;
  pointer-events: none;
}

body.student-page.museum-refined #podcastPanel .memory-feed-card .memory-feed-visual > .memory-feed-actions:has(> :nth-child(5)) { --memory-action-count: 5; }
body.student-page.museum-refined #podcastPanel .memory-feed-card .memory-feed-visual > .memory-feed-actions:has(> :nth-child(6)) { --memory-action-count: 6; }
body.student-page.museum-refined #podcastPanel .memory-feed-card .memory-feed-visual > .memory-feed-actions::-webkit-scrollbar { display: none; }
body.student-page.museum-refined #podcastPanel .memory-feed-card .memory-feed-visual > .memory-feed-actions button {
  flex: 0 0 48px;
  width: 48px !important;
  min-height: 48px !important;
  border-radius: 10px !important;
  background: rgba(23, 24, 22, .58) !important;
  color: #f2ecde !important;
  pointer-events: auto !important;
}

body.student-page.museum-refined #podcastPanel .memory-feed-card .memory-feed-visual > .memory-feed-actions button[aria-pressed="true"] { color: var(--memory-accent) !important; }

body.student-page.museum-refined #podcastPanel .memory-feed-card > .memory-feed-copy {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)) !important;
}

body.student-page.museum-refined #podcastPanel .memory-feed-card > .memory-feed-copy > strong {
  white-space: normal;
  overflow-wrap: anywhere;
}

body.student-page.museum-refined #podcastPanel .memory-feed-card > .memory-feed-audio {
  margin-inline: 16px !important;
}

body.student-page.museum-refined #podcastPanel .memory-feed-card .memory-feed-collection-link {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  column-gap: 5px;
}
body.student-page.museum-refined #podcastPanel .memory-feed-card .memory-collection-art-icon {
  display: inline-flex;
  align-items: center;
  width: 32px;
  gap: 0;
}
body.student-page.museum-refined #podcastPanel .memory-feed-card .memory-collection-art-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: brightness(0) invert(.76) sepia(.3);
}

/* r221: one topic per resting page. The opt-in attribute is owned by the small
   paging module; flashcards and the r220 release remain unchanged without it. */
body.student-page.museum-refined #podcastPanel #podcastLibrary[data-memory-paging="active"] {
  padding: 0 !important;
  scroll-padding: 0 !important;
  scroll-snap-type: y mandatory !important;
}

body.student-page.museum-refined #podcastPanel #podcastLibrary[data-memory-paging="active"] > .memory-feed-card {
  box-sizing: border-box !important;
  min-height: var(--memory-page-height) !important;
  height: auto !important;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

body.student-page.museum-refined #podcastPanel #podcastLibrary[data-memory-paging="active"] .memory-feed-actions button {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  /* The invisible 48px hit area and existing focus/selected states remain. */
}

body.student-page.museum-refined #podcastPanel #podcastLibrary[data-memory-paging="active"] .memory-feed-actions button img {
  filter: brightness(0) invert(.9) sepia(.2) drop-shadow(0 0 1px #171816) drop-shadow(0 1px 2px #171816d9) !important;
}

body.student-page.museum-refined #podcastPanel #podcastLibrary[data-memory-paging="active"] .memory-feed-actions :is(span, strong),
body.student-page.museum-refined #podcastPanel #podcastLibrary[data-memory-paging="active"] .memory-feed-actions [data-memory-feed-favorite]::after {
  text-shadow: 0 0 1px #171816, 0 1px 2px #171816e6 !important;
}
