/* Linked with the review document: mounted Review imports stylesheets, never inline page styles. */
.cc-page .commandbar{position:relative}
.cc-page .cc-review-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin:12px 16px 4px}
/* The standalone hero already carries its Card Review title. */
.cc-page .page > .cc-review-head{display:none}
#bw-study-frame .cc-page .cc-review-head{display:flex}
.cc-page .cc-review-kicker{margin:0 0 2px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--study-ink-3,inherit)}
.cc-page .cc-review-title{margin:0;font-family:"Newsreader",Georgia,serif;font-size:32px;font-weight:600;line-height:1.1;color:var(--study-ink,inherit)}
.cc-page :is(#cc-exam-bar,#cc-seed-cc-exam-bar){display:grid;grid-template-columns:minmax(0,1fr);justify-items:start;gap:0;margin:0 16px 6px;font-size:13px;color:var(--study-ink-3,inherit)}
.cc-page :is(#cc-exam-value,#cc-seed-cc-exam-value){display:block}
.cc-page .cc-exam-bar .cc-exam-link{display:flex;align-items:center;width:fit-content;min-height:44px;padding:8px 0;color:var(--study-accent-ink,inherit);text-decoration:underline}
.cc-page .cc-card-flag{position:absolute;top:6px;right:6px;width:44px;height:44px;border:0!important;background:transparent!important;box-shadow:none!important;color:var(--study-ink-3,inherit);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;z-index:2}
.cc-page .cc-card-flag[aria-pressed="true"]{color:var(--study-accent,inherit)}
.cc-page .cc-card-flag svg{width:20px;height:20px}
.cc-page #study-card{position:relative}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .card-kicker{padding-right:52px!important}
.cc-page .cc-progress-line{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:10px 0 6px;font-size:14px;color:var(--study-ink-3,inherit)}
.cc-page .cc-progress-line:empty{display:none}

#bw-study-frame .cc-page[data-study-review] {
  background:var(--study-ground)!important;
  color:var(--study-ink)!important;
  font-family:var(--study-font-body)!important;
  font-variant-numeric:tabular-nums;
}
#bw-study-frame .cc-page[data-study-review] [hidden] { display:none!important; }
#bw-study-frame .cc-page[data-study-review] .page {
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
  overflow-x:clip;
  background:var(--study-ground)!important;
  color:var(--study-ink)!important;
}
#bw-study-frame .cc-page[data-study-review] .shell {
  display:block;
  width:min(var(--study-column),calc(100% - var(--study-space-8) - var(--study-space-8)));
  margin:0 auto;
  padding:var(--study-space-6) 0 var(--study-space-8);
  box-sizing:border-box;
  min-width:0;
  background:var(--study-ground)!important;
  border:0!important;
  border-radius:0;
  box-shadow:none!important;
}
#bw-study-frame .cc-page[data-study-review] .zone-title {
  margin:0 auto var(--study-space-6);
  max-width:var(--study-column);
  color:var(--study-ink);
}
#bw-study-frame .cc-page[data-study-review] .zone-title h1 {
  margin:0;
  color:var(--study-ink);
  font-family:var(--study-font-display);
  font-size:var(--study-title-size);
  font-weight:500;
  line-height:var(--study-title-line);
  letter-spacing:normal;
  text-transform:none;
}
#bw-study-frame .cc-page[data-study-review] .zone-title p { display:none!important; }
#bw-study-frame .cc-page[data-study-review] .page :is(.commandbar,.cc-account-tools,.library,.rail,.cc-account-actions,.bwui-footer,.bw-disclaimer,.bw-report-page-action) { display:none!important; }
/* A195: Cluecards is the actual deck chooser, not a review-only landing page.
   The fully wired catalog is exposed only in Decks; Today and Rounds retain
   their separate, identical due queue. Never duplicate the catalog or FSRS. */
#bw-study-frame .cc-page[data-study-review][data-study-review-place="decks"] .page .study-deck-browser-toggle {
  display:flex; align-items:center; justify-content:center;
  width:min(var(--study-column),100%); min-height:44px; margin:8px auto 12px;
  padding:10px 16px; border:1px solid var(--study-line-strong); border-radius:10px;
  background:var(--study-surface); color:var(--study-ink);
  font:inherit; font-weight:600; cursor:pointer;
}
#bw-study-frame .cc-page[data-study-review][data-study-review-place="decks"] .page .study-deck-browser-toggle:focus-visible {
  outline:2px solid var(--study-accent); outline-offset:2px;
}
#bw-study-frame .cc-page[data-study-review][data-study-review-place="decks"][data-study-deck-browse] .page .library {
  display:block!important; width:min(var(--study-column),100%); margin:0 auto 16px;
}
#bw-study-frame .cc-page[data-study-review][data-study-review-place="decks"][data-study-deck-browse] .page .stage {
  display:none!important;
}
#bw-study-frame .cc-page[data-study-review] .stage { display:block; width:100%; margin:0; }
#bw-study-frame .cc-page[data-study-review] .workspace {
  display:flex;
  width:100%;
  max-width:none;
  flex-direction:column;
  gap:var(--study-space-4);
  margin:0;
  padding:0;
  overflow:visible;
  border:0!important;
  border-radius:0;
  background:var(--study-ground)!important;
  box-shadow:none!important;
  color:var(--study-ink);
}
#bw-study-frame .cc-page[data-study-review] :is(.cc-card-toolbar,.cc-study-nav #cc-home,.cc-study-nav #cc-seed-cc-home,.session-head,.cc-hidden-misses,.progress-track,.cc-quick-switch) { display:none!important; }
/* Decks keeps its bare card; Today shows the shared Daily Rounds card whole (deck label and why-due line included). */
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) :is(.card-kicker,.bw-why-here) { display:none!important; }
#bw-study-frame .cc-page[data-study-review] #cc-hidden-misses[data-study-visible] {
  display:flex!important;
  flex-direction:column;
  align-items:flex-start;
  gap:var(--study-space-3);
}
#bw-study-frame .cc-page[data-study-review] .session-stats { display:none!important; }
#bw-study-frame .cc-page[data-study-review] .cc-session-summary { display:none!important; }
#bw-study-frame .cc-page[data-study-review] .cc-session-summary:not([hidden]) {
  display:block!important;
  width:100%;
  max-width:var(--study-read);
  box-sizing:border-box;
  margin:var(--study-space-4) auto 0;
  padding:clamp(16px,3vw,27px);
  border:1px solid var(--study-line);
  border-radius:var(--study-panel-radius);
  background:var(--study-raise);
  color:var(--study-ink-2);
  font-size:var(--study-body-size);
  line-height:var(--study-body-line);
}
#bw-study-frame .cc-page[data-study-review] .cc-session-summary:not([hidden]) > h2 {
  margin:0 0 var(--study-space-3);
  color:var(--study-ink);
  font-family:var(--study-font-display);
  font-size:1.5rem;
  font-weight:500;
  line-height:1.2;
  letter-spacing:0;
  text-transform:none;
}
#bw-study-frame .cc-page[data-study-review] .cc-session-summary:not([hidden]) > #cc-summary-text {
  margin:var(--study-space-3) 0 0;
  color:var(--study-ink-3);
  font-size:var(--study-meta-size);
  line-height:var(--study-meta-line);
}
#bw-study-frame .cc-page[data-study-review] .study-review-summary-stats {
  display:grid;
  grid-template-columns:repeat(5,auto);
  justify-content:space-between;
  gap:var(--study-space-2);
  margin:0;
}
#bw-study-frame .cc-page[data-study-review] .study-review-summary-stat {
  display:grid;
  justify-items:center;
  gap:2px;
  min-width:0;
  padding:var(--study-space-2) 6px;
  border:1px solid var(--study-line);
  border-radius:var(--study-control-radius);
}
#bw-study-frame .cc-page[data-study-review] .study-review-summary-stat strong {
  color:var(--study-ink);
  font-family:var(--study-font-body);
  font-size:1.375rem;
  font-weight:600;
  line-height:1.1;
  font-variant-numeric:tabular-nums;
}
#bw-study-frame .cc-page[data-study-review] .study-review-summary-stat span {
  color:var(--study-ink-3);
  font-size:var(--study-meta-size);
  line-height:var(--study-meta-line);
  text-align:center;
}
@media (max-width:359px) {
  #bw-study-frame .cc-page[data-study-review] .study-review-summary-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (min-width:640px) {
  #bw-study-frame .cc-page[data-study-review] .study-review-summary-stats { grid-template-columns:repeat(5,minmax(0,7.5rem)); justify-content:start; }
}
#bw-study-frame .cc-page[data-study-review] .study-review-summary-saved {
  margin:var(--study-space-2) 0 0;
  color:var(--study-ink-3);
  font-size:var(--study-meta-size);
  line-height:var(--study-meta-line);
}
#bw-study-frame .cc-page[data-study-review] .study-review-summary-actions {
  display:flex;
  flex-wrap:wrap;
  gap:var(--study-space-3);
  margin-top:var(--study-space-4);
}
#bw-study-frame .cc-page[data-study-review] .study-review-summary-actions button {
  display:inline-flex;
  flex:1 1 8rem;
  min-height:48px;
  align-items:center;
  justify-content:center;
  padding:0 var(--study-space-4);
  border:1px solid var(--study-line-strong);
  border-radius:var(--study-control-radius);
  background:transparent;
  color:var(--study-ink);
  font:inherit;
  font-size:var(--study-label-size);
  font-weight:600;
  text-decoration:none!important;
  cursor:pointer;
}
#bw-study-frame .cc-page[data-study-review] .study-review-summary-actions .study-review-summary-primary {
  border-color:var(--study-accent)!important;
  background:var(--study-accent)!important;
  color:var(--study-accent-ink)!important;
}
#bw-study-frame .cc-page[data-study-review] .study-review-summary-actions button:hover { border-color:var(--study-accent); color:var(--study-accent); }
#bw-study-frame .cc-page[data-study-review] .study-review-summary-actions .study-review-summary-primary:hover { color:var(--study-accent-ink); }
#bw-study-frame .cc-page[data-study-review] #cc-hidden-misses[data-study-visible] :is(button,a) {
  display:inline-flex;
  min-height:44px;
  align-items:center;
  padding:0;
  border:0!important;
  background:transparent!important;
  color:var(--study-accent)!important;
  font:inherit;
  font-size:var(--study-label-size);
  text-decoration:underline;
  text-underline-offset:var(--study-space-1);
}
#bw-study-frame .cc-page[data-study-review] .cc-study-nav {
  display:flex;
  width:100%;
  align-items:center;
  margin:0;
  color:var(--study-ink-3);
  font-family:var(--study-font-body);
  font-size:var(--study-meta-size);
  line-height:var(--study-meta-line);
}
#bw-study-frame .cc-page[data-study-review] .study-review-controls {
  display:flex;
  width:100%;
  flex-direction:column;
  gap:var(--study-space-3);
  min-width:0;
}
#bw-study-frame .cc-page[data-study-review] .study-review-exam {
  display:grid;
  gap:var(--study-space-2);
  width:100%;
  max-width:var(--study-read);
  min-width:0;
}
#bw-study-frame .cc-page[data-study-review] .study-review-exam-status {
  margin:0;
  color:var(--study-ink-2);
  font-size:var(--study-meta-size);
  line-height:var(--study-meta-line);
}
#bw-study-frame .cc-page[data-study-review] .study-review-exam-status:empty { display:none; }
#bw-study-frame .cc-page[data-study-review].study-review-setup { max-width:var(--study-read); }
#bw-study-frame .cc-page[data-study-review] .study-review-deck {
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:var(--study-space-3);
  width:100%;
  max-width:var(--study-read);
  box-sizing:border-box;
  color:var(--study-ink-2);
  font-size:var(--study-label-size);
  line-height:var(--study-label-line);
}
#bw-study-frame .cc-page[data-study-review] .study-review-deck > span { color:var(--study-ink-3); }
#bw-study-frame .cc-page[data-study-review] .study-review-deck select {
  min-width:0;
  text-overflow:ellipsis;
  -webkit-appearance:none;
  appearance:none;
  width:100%;
  min-height:44px;
  box-sizing:border-box;
  padding:0 calc(var(--study-space-3) + 18px) 0 var(--study-space-3);
  border:1px solid var(--study-line);
  border-radius:var(--study-control-radius);
  background:var(--study-surface);
  color:var(--study-ink);
  background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position:calc(100% - 16px) 50%,calc(100% - 11px) 50%;
  background-size:5px 5px;
  background-repeat:no-repeat;
  font:inherit;
  font-size:var(--study-label-size);
}
#bw-study-frame .cc-page[data-study-review] .study-review-deck-name {
  overflow:hidden;
  color:var(--study-ink);
  text-overflow:ellipsis;
  white-space:nowrap;
}
#bw-study-frame .cc-page[data-study-review] .study-review-deck-options {
  display:grid;
  gap:var(--study-space-2);
  max-width:var(--study-read);
  padding:var(--study-space-3) var(--study-space-4);
  border-bottom:1px solid var(--study-line);
}
#bw-study-frame .cc-page[data-study-review] .study-review-also-due {
  margin:var(--study-space-2) 0 0;
  color:var(--study-ink-3);
  font-size:var(--study-meta-size);
  line-height:var(--study-meta-line);
}
#bw-study-frame .cc-page[data-study-review] #cc-my-review,
#bw-study-frame .cc-page[data-study-review] #cc-change-deck {
  display:flex;
  width:100%;
  min-height:44px;
  align-items:center;
  gap:var(--study-space-2);
  padding:var(--study-space-2) 0;
  border:0!important;
  border-bottom:1px solid var(--study-line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--study-ink-2)!important;
  font:inherit;
  font-size:var(--study-label-size);
  text-align:left;
  cursor:pointer;
}
#bw-study-frame .cc-page[data-study-review] #cc-my-review strong { color:var(--study-ink); font:inherit; }
#bw-study-frame .cc-page[data-study-review] #cc-my-review span,
#bw-study-frame .cc-page[data-study-review] #cc-my-review small { color:var(--study-ink-3); font-size:var(--study-meta-size); }
#bw-study-frame .cc-page[data-study-review] .mode-controls {
  display:flex!important;
  flex-wrap:nowrap;
  width:100%;
  min-width:0;
  gap:var(--study-space-2);
  margin:0!important;
  box-sizing:border-box;
  padding:0;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  border:0!important;
  border-radius:0;
  background:transparent!important;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  mask-image:none;
}
#bw-study-frame .cc-page[data-study-review] .mode-controls::-webkit-scrollbar { display:none; }
#bw-study-frame .cc-page[data-study-review] .mode-controls button {
  display:inline-flex;
  min-width:max-content;
  min-height:44px;
  flex:0 0 auto;
  align-items:center;
  justify-content:center;
  padding:0 var(--study-space-4);
  border:1px solid var(--study-line)!important;
  border-radius:var(--study-pill-radius)!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--study-ink-2)!important;
  font:inherit;
  font-size:var(--study-label-size);
  white-space:nowrap;
  cursor:pointer;
  transition:background var(--study-t-press),border-color var(--study-t-press),color var(--study-t-press);
}
#bw-study-frame .cc-page[data-study-review] .mode-controls button.active {
  border-color:var(--study-line-strong)!important;
  background:var(--study-accent-wash)!important;
  color:var(--study-ink)!important;
}
#bw-study-frame .cc-page[data-study-review] .study-review-progress-line {
  display:flex;
  min-width:0;
  min-height:var(--study-space-8);
  align-items:center;
  gap:var(--study-space-2);
  color:var(--study-ink-3);
  font-size:var(--study-meta-size);
  line-height:var(--study-meta-line);
}
#bw-study-frame .cc-page[data-study-review] #cc-study-progress {
  flex:1 1 auto;
  min-width:0;
  color:var(--study-ink-3);
  font-size:var(--study-meta-size);
  line-height:var(--study-meta-line);
  text-align:left;
  overflow-wrap:anywhere;
}
#bw-study-frame .cc-page[data-study-review] .study-review-saved-mark {
  position:relative;
  display:inline-flex;
  width:16px;
  height:16px;
  flex:0 0 16px;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  border:1.5px solid currentColor;
  border-radius:50%;
  color:var(--study-ink-4);
}
#bw-study-frame .cc-page[data-study-review] .study-review-saved-mark[data-state="pending"] { border-style:dashed; color:var(--study-accent); }
#bw-study-frame .cc-page[data-study-review] .study-review-saved-mark[data-state="confirmed"] {
  border-color:var(--study-accent);
  background:var(--study-accent);
  color:var(--study-accent-ink);
}
#bw-study-frame .cc-page[data-study-review] .study-review-saved-mark[data-state="confirmed"]::after {
  width:7px;
  height:4px;
  border-bottom:1.5px solid currentColor;
  border-left:1.5px solid currentColor;
  content:"";
  transform:rotate(-45deg) translate(1px,-1px);
}
#bw-study-frame .cc-page[data-study-review] .study-review-saved-mark[data-state="stale"]::after {
  width:6px;
  height:6px;
  border:1px solid currentColor;
  border-radius:50%;
  content:"";
}
#bw-study-frame .cc-page[data-study-review] .study-review-saved-mark[data-state="dead"]::after {
  width:4px;
  height:4px;
  border-radius:50%;
  background:currentColor;
  content:"";
}
/* Save indicator: a spinner while a save is in flight, a check that fades
   once it is confirmed, and a rose warning that stays until the save is retried. */
#bw-study-frame .cc-page[data-study-review] .study-review-saved-mark[data-state="saving"] {
  border-color:var(--study-accent);
  border-top-color:transparent;
  color:var(--study-accent);
  animation:study-saved-spin .8s linear infinite;
}
#bw-study-frame .cc-page[data-study-review] .study-review-saved-mark[data-state="saving"]::after { display:none; }
#bw-study-frame .cc-page[data-study-review] .study-review-saved-mark[data-state="confirmed"] {
  animation:study-saved-fade .5s ease 1.6s forwards;
}
#bw-study-frame .cc-page[data-study-review] .study-review-saved-mark[data-state="dead"],
#bw-study-frame .cc-page[data-study-review] .study-review-saved-mark[data-state="stale"] {
  border-color:var(--study-rose,#b3261e);
  color:var(--study-rose,#b3261e);
}
@keyframes study-saved-spin { to { transform:rotate(360deg); } }
@keyframes study-saved-fade { to { opacity:0; visibility:hidden; } }
@media (prefers-reduced-motion:reduce) {
  #bw-study-frame .cc-page[data-study-review] .study-review-saved-mark[data-state="saving"] { animation:none; border-top-color:var(--study-accent); }
  #bw-study-frame .cc-page[data-study-review] .study-review-saved-mark[data-state="confirmed"] { animation:none; }
}
#bw-study-frame .cc-page[data-study-review] .study-review-save-status {
  color:var(--study-ink-3);
  font-size:var(--study-meta-size);
  line-height:var(--study-meta-line);
  white-space:nowrap;
  overflow-wrap:normal;
  flex:none;
}
#bw-study-frame .cc-page[data-study-review] .study-review-save-status[data-state="dead"] { color:var(--study-rose); }
#bw-study-frame .cc-page[data-study-review] .study-review-save-review {
  min-height:44px;
  padding:0 var(--study-space-2);
  border:0;
  background:transparent;
  color:var(--study-accent);
  font:inherit;
  text-decoration:underline;
  text-underline-offset:var(--study-space-1);
  cursor:pointer;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .bw-study-flashcard {
  --sc-paper:var(--study-raise);
  --sc-ink:var(--study-ink);
  --sc-muted:var(--study-ink-3);
  --sc-edge:var(--study-line);
  --sc-accent:var(--study-accent);
  width:100%;
  max-width:var(--study-read);
  min-width:0;
  margin:0 auto;
}
#bw-study-frame .cc-page[data-study-review] :is(.study-review-controls,.study-review-progress-line) {
  width:100%;
  max-width:var(--study-read);
  box-sizing:border-box;
  margin-inline:auto;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .bw-study-explanation-details {
  color:var(--study-accent);
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) :is(#study-card,#cc-seed-study-card) {
  width:100%;
  max-width:var(--study-read);
  min-height:0;
  box-sizing:border-box;
  margin:0 auto;
  padding:var(--study-space-8);
  border:1px solid var(--study-line-strong)!important;
  border-radius:var(--study-panel-radius)!important;
  background:var(--study-raise)!important;
  box-shadow:none!important;
  color:var(--study-ink);
  transform:none;
  transition:border-color var(--study-t-reveal);
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #study-card:is([data-gesture-grade],[data-confirm-grade]) {
  border-color:rgb(var(--cc-feedback-rgb))!important;
  background:linear-gradient(135deg,rgba(var(--cc-feedback-rgb),.18),rgba(var(--cc-feedback-rgb),.08)),var(--study-raise)!important;
  box-shadow:0 0 0 3px rgba(var(--cc-feedback-rgb),.18)!important;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .card-clue {
  max-width:var(--study-read);
  padding:var(--study-space-6) 0;
  color:var(--study-ink-2)!important;
  font-family:var(--study-font-body)!important;
  font-size:var(--study-stem-size)!important;
  font-weight:400;
  line-height:var(--study-stem-line);
  letter-spacing:normal;
  overflow-wrap:anywhere;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .card-answer {
  padding-top:var(--study-space-4);
  border-color:var(--study-line)!important;
  color:var(--study-ink);
}
#bw-study-frame .cc-page[data-study-review] .card-answer.cc-answer-empty { display:none; }
/* The sentence is the answer: one divider, and the explanation keeps its own spacing instead of the hidden answer block's. */
#bw-study-frame .cc-page[data-study-review] .card-answer.cc-answer-front-only { border-top-width:0!important; padding-top:0; }
#bw-study-frame .cc-page[data-study-review] .card-answer.cc-answer-front-only .bw-study-explanation-details { margin-top:var(--study-space-4); }
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .answer-label {
  color:var(--study-ink-3)!important;
  font-size:var(--study-meta-size);
  font-weight:500;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .answer-text {
  color:var(--study-ink)!important;
  font-family:var(--study-font-body)!important;
  font-size:var(--study-choice-size)!important;
  font-weight:400;
  line-height:var(--study-choice-line);
  letter-spacing:normal;
  overflow-wrap:anywhere;
}
/* A cloze reveal shows the missing terms; the question remains above. */
#bw-study-frame .cc-page[data-study-review] #answer-text .cc-cloze-answer-terms {
  margin:0;
  font-size:1.3em;
  font-weight:700;
  line-height:1.2;
  overflow-wrap:anywhere;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .explain-text {
  max-width:var(--study-read);
  color:var(--study-ink-2)!important;
  font-family:var(--study-font-body)!important;
  font-size:var(--study-body-size)!important;
  line-height:var(--study-body-line);
  overflow-wrap:anywhere;
}
#bw-study-frame .cc-page[data-study-review] :is(.source-link,#cc-miss-sources a) {
  display:inline-flex;
  min-height:44px;
  align-items:center;
  margin-top:var(--study-space-2);
  color:var(--study-accent)!important;
  font-size:var(--study-label-size)!important;
  line-height:var(--study-label-line);
  text-decoration:underline;
  text-underline-offset:var(--study-space-1);
  overflow-wrap:anywhere;
}
#bw-study-frame .cc-page[data-study-review] .media-strip { display:grid; gap:var(--study-space-3); }
#bw-study-frame .cc-page[data-study-review] .media-strip img { max-width:100%; height:auto; border-radius:var(--study-control-radius); }
#bw-study-frame .cc-page[data-study-review] .controls {
  display:flex;
  width:100%;
  max-width:var(--study-read);
  flex-direction:column;
  gap:var(--study-space-3);
  margin:0 auto;
  padding:0;
  box-sizing:border-box;
  border:0!important;
  border-radius:0;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none;
}
#bw-study-frame .cc-page[data-study-review] .reveal-row {
  display:flex;
  min-height:48px;
  align-items:center;
  justify-content:center;
  gap:var(--study-space-3);
  margin:0;
}
#bw-study-frame .cc-page[data-study-review] .nav-btn {
  min-width:44px;
  min-height:44px;
  border:1px solid var(--study-line)!important;
  border-radius:var(--study-control-radius)!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--study-ink-3)!important;
  font:inherit;
}
#bw-study-frame .cc-page[data-study-review] .reveal-button {
  min-width:min(100%,var(--study-read));
  min-height:48px;
  flex:1 1 auto;
  border:0!important;
  border-radius:var(--study-control-radius)!important;
  background:var(--study-accent)!important;
  box-shadow:none!important;
  color:var(--study-accent-ink)!important;
  font-family:var(--study-font-body)!important;
  font-size:var(--study-label-size)!important;
  font-weight:500;
  transition:transform var(--study-t-press),background var(--study-t-press);
}
#bw-study-frame .cc-page[data-study-review] .grade-controls {
  display:grid;
  width:100%;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:var(--study-space-2);
  margin:0;
}
#bw-study-frame .cc-page[data-study-review] .grade-btn {
  display:flex;
  box-sizing:border-box;
  width:100%;
  height:48px;
  min-width:0;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:var(--study-space-1);
  padding:var(--study-space-1) var(--study-space-2);
  border:1px solid var(--study-line)!important;
  border-radius:var(--study-control-radius)!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--study-ink)!important;
  font-family:var(--study-font-body)!important;
  font-size:var(--study-label-size)!important;
  font-weight:500;
  line-height:var(--study-label-line);
  white-space:normal;
  overflow-wrap:anywhere;
  transition:background var(--study-t-press),border-color var(--study-t-press),transform var(--study-t-press);
}
#bw-study-frame .cc-page[data-study-review] .grade-btn.again { color:var(--study-rose)!important; }
#bw-study-frame .cc-page[data-study-review] .grade-btn small {
  display:block;
  color:var(--study-ink-3)!important;
  font-size:var(--study-meta-size)!important;
  font-weight:400;
  line-height:var(--study-meta-line);
}
#bw-study-frame .cc-page[data-study-review] .grade-btn.again small { color:var(--study-rose)!important; }
#bw-study-frame .cc-page[data-study-review] .grade-btn:hover:not(:disabled),
#bw-study-frame .cc-page[data-study-review] .grade-btn:focus-visible { background:var(--study-accent-wash)!important; }
#bw-study-frame .cc-page[data-study-review] :is(.grade-btn,.reveal-button,.nav-btn):active:not(:disabled) { transform:scale(.98); }
#bw-study-frame .cc-page[data-study-review] .grade-btn:disabled,
#bw-study-frame .cc-page[data-study-review] .reveal-button:disabled { color:var(--study-ink-4)!important; cursor:not-allowed; }
#bw-study-frame .cc-page[data-study-review] .cc-more {
  width:100%;
  max-width:var(--study-read);
  margin:0 auto;
  border-top:1px solid var(--study-line);
  color:var(--study-ink-2);
}
#bw-study-frame .cc-page[data-study-review] .cc-more > summary {
  display:flex;
  min-height:44px;
  align-items:center;
  justify-content:space-between;
  color:var(--study-ink-2);
  font-size:var(--study-label-size);
  cursor:pointer;
  list-style:none;
}
#bw-study-frame .cc-page[data-study-review] .cc-more > summary::-webkit-details-marker { display:none; }
#bw-study-frame .cc-page[data-study-review] .cc-more > summary span { transition:transform var(--study-t-expand); }
#bw-study-frame .cc-page[data-study-review] .cc-more[open] > summary span { transform:rotate(180deg); }
#bw-study-frame .cc-page[data-study-review] .cc-review-actions,
#bw-study-frame .cc-page[data-study-review] .study-review-utility-list {
  display:flex;
  flex-direction:column;
  gap:0;
  min-width:0;
}
#bw-study-frame .cc-page[data-study-review] .cc-review-actions :is(button,a),
#bw-study-frame .cc-page[data-study-review] .study-review-utility-list > :is(button,a,.bw-report-action) {
  display:flex;
  flex:0 0 auto;
  width:100%;
  min-height:46px;
  align-items:center;
  justify-content:center;
  padding:var(--study-space-2) 0;
  border:0!important;
  border-bottom:1px solid var(--study-line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--study-ink-2)!important;
  font:inherit;
  font-size:var(--study-label-size);
  line-height:var(--study-label-line);
  text-align:left;
  text-decoration:none;
  cursor:pointer;
}
#bw-study-frame .cc-page[data-study-review] .study-review-report-action .bw-report-trigger {
  display:flex;
  width:100%;
  min-height:44px;
  align-items:center;
  padding:var(--study-space-2) 0;
  border:0!important;
  border-bottom:1px solid var(--study-line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--study-ink-2)!important;
  font:inherit;
  font-size:var(--study-label-size);
  text-align:left;
}
#bw-study-frame .cc-page[data-study-review] .cc-review-actions :is(button,a):hover,
#bw-study-frame .cc-page[data-study-review] .study-review-utility-list :is(button,a):hover { color:var(--study-accent)!important; text-decoration:underline; text-underline-offset:var(--study-space-1); }
#bw-study-frame .cc-page[data-study-review] .cc-review-actions kbd { display:none; }
#bw-study-frame .cc-page[data-study-review] .cc-review-settings { display:grid; gap:var(--study-space-3); padding:var(--study-space-4) 0; color:var(--study-ink-2); }
#bw-study-frame .cc-page[data-study-review] .study-review-set-size {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:var(--study-space-3);
  padding:var(--study-space-3) 0;
  color:var(--study-ink-2);
  font-size:var(--study-label-size);
}
#bw-study-frame .cc-page[data-study-review] .study-review-set-size select {
  min-height:44px;
  padding:0 var(--study-space-3);
  border:1px solid var(--study-line);
  border-radius:var(--study-control-radius);
  background:var(--study-surface);
  color:var(--study-ink);
  font:inherit;
}
#bw-study-frame .cc-page[data-study-review] .cc-review-settings input { accent-color:var(--study-accent); }
#bw-study-frame .cc-page[data-study-review] #cc-recall-attempt,
#bw-study-frame .cc-page[data-study-review] #cc-recall-source,
#bw-study-frame .cc-page[data-study-review] #cc-recall-takeaway {
  width:100%;
  max-width:var(--study-read);
  box-sizing:border-box;
  margin:0 auto;
  padding:var(--study-space-4);
  border:1px solid var(--study-line);
  border-radius:var(--study-panel-radius);
  background:var(--study-surface);
  color:var(--study-ink-2);
  font-size:var(--study-body-size);
  line-height:var(--study-body-line);
}
#bw-study-frame .cc-page[data-study-review] .cc-review-status,
#bw-study-frame .cc-page[data-study-review] #cc-load-status,
#bw-study-frame .cc-page[data-study-review] #cc-progress-status { color:var(--study-ink-3); font-size:var(--study-meta-size); line-height:var(--study-meta-line); }
#bw-study-frame .cc-page[data-study-review] .study-review-empty {
  width:100%;
  max-width:var(--study-read);
  box-sizing:border-box;
  margin:0 auto;
  padding:var(--study-space-6) 0;
  color:var(--study-ink-2);
}
#bw-study-frame .cc-page[data-study-review] .study-review-empty p { margin:0 0 var(--study-space-3); font-size:var(--study-body-size); line-height:var(--study-body-line); }
#bw-study-frame .cc-page[data-study-review] .study-review-empty :is(a,button) {
  display:inline-flex;
  min-height:44px;
  align-items:center;
  justify-content:center;
  padding:0 var(--study-space-4);
  border:1px solid var(--study-line-strong);
  border-radius:var(--study-control-radius);
  background:var(--study-surface);
  color:var(--study-ink);
  font:inherit;
  font-size:var(--study-label-size);
  text-decoration:none;
  cursor:pointer;
}
#bw-study-frame .cc-page[data-study-review] :is(button,a,input,select,textarea,summary):focus-visible {
  outline:2px solid var(--study-focus)!important;
  outline-offset:3px;
}
/* Containers and programmatic focus targets (the review host, the card, tabindex wrappers) never draw a ring. */
#bw-study-frame .cc-page[data-study-review] :is([tabindex],#study-card,.workspace,.stage):focus,
#bw-study-frame .cc-page[data-study-review] :is([tabindex],#study-card,.workspace,.stage):focus-visible,
#bw-study-frame [data-study-view-host]:focus,
#bw-study-frame [data-study-view-host]:focus-visible { outline:none!important; }
#bw-study-frame .cc-page[data-study-review] :is(.cc-picker-dialog,#cc-hidden-dialog) {
  border:1px solid var(--study-line-strong);
  border-radius:var(--study-panel-radius);
  background:var(--study-surface);
  color:var(--study-ink);
  font-family:var(--study-font-body);
}
#bw-study-frame .cc-page[data-study-review] :is(.cc-picker-dialog,#cc-hidden-dialog)::backdrop { background:var(--study-ground); opacity:.72; }

@media (max-width:640px) {
  #bw-study-frame .cc-page[data-study-review] .shell {
    width:calc(100% - var(--study-phone-gutter) - var(--study-phone-gutter));
    padding:var(--study-space-4) 0 calc(var(--study-space-8) + env(safe-area-inset-bottom));
  }
  #bw-study-frame .cc-page[data-study-review] .zone-title { margin-bottom:var(--study-space-4); }
  #bw-study-frame .cc-page[data-study-review] .mode-controls { flex-wrap:wrap; }
  #bw-study-frame .cc-page[data-study-review] .mode-controls button { flex:1 1 calc((100% - var(--study-space-2) - var(--study-space-2)) / 3)!important; }
  #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) :is(#study-card,#cc-seed-study-card) { padding:var(--study-space-6) var(--study-space-4); }
  #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .card-clue { padding:var(--study-space-4) 0; }
  #bw-study-frame .cc-page[data-study-review] .grade-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion:reduce) {
  #bw-study-frame .cc-page[data-study-review] *,
  #bw-study-frame .cc-page[data-study-review] *::before,
  #bw-study-frame .cc-page[data-study-review] *::after {
    scroll-behavior:auto!important;
    animation-duration:0ms!important;
    animation-iteration-count:1!important;
    transition-duration:0ms!important;
    transform:none!important;
  }
}

/* A saved queue is simply the page while its refresh runs. Only a failed refresh
   speaks, once and quietly; the rating hint is a muted line, never a banner. */
#bw-study-frame .cc-page[data-study-review] .study-review-freshness {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.35rem .75rem;
  margin:0 0 .5rem;
  font-size:.82rem;
  color:var(--study-ink-4,inherit);
}
#bw-study-frame .cc-page[data-study-review] .study-review-freshness p { margin:0; }
#bw-study-frame .cc-page[data-study-review] .study-review-freshness button {
  min-height:44px;
  padding:0 .25rem;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  text-decoration:underline;
  text-underline-offset:.22em;
  cursor:pointer;
}
#bw-study-frame .cc-page[data-study-review] .study-review-hint {
  margin:.5rem 0 0;
  font-size:.82rem;
  color:var(--study-ink-4,inherit);
  text-align:center;
}

.cc-engine-feedback{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  justify-content:center;
  align-items:center;
  margin:.5rem 0;
}
.cc-engine-feedback:not(:has(button:not([hidden]),p:not([hidden]))){
  display:none;
}
.cc-engine-feedback .cc-feedback-status{
  flex-basis:100%;
  margin:0;
}

/* ─── Missed question answered as a question (flag studyWorkspaceRealQuestions) ─── */
#bw-study-frame .cc-page[data-study-review] .cc-question-retry {
  box-sizing:border-box;
  width:100%;
  max-width:var(--study-read);
  margin:0 auto;
  padding:var(--study-space-4);
  border:1px solid var(--study-line);
  border-radius:var(--study-panel-radius);
  background:var(--study-surface);
  color:var(--study-ink);
  font-family:var(--study-font-body);
}
#bw-study-frame .cc-page[data-study-review] .cc-question-retry[hidden] { display:none; }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-kicker {
  margin:0 0 var(--study-space-3);
  color:var(--study-ink-3);
  font-size:var(--study-meta-size);
  line-height:var(--study-meta-line);
}
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-stem p {
  margin:0 0 var(--study-space-3);
  font-size:var(--study-stem-size);
  line-height:var(--study-stem-line);
  white-space:pre-line;
}
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-lead { font-weight:600; }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-media img { display:block; max-width:100%; height:auto; margin:0 0 var(--study-space-3); }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-choices {
  display:grid;
  gap:var(--study-space-2);
  margin:0 0 var(--study-space-3);
  padding:0;
  border:0;
  min-width:0;
}
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-choice {
  display:grid;
  grid-template-columns:auto auto 1fr;
  align-items:center;
  gap:var(--study-space-2);
  min-height:44px;
  box-sizing:border-box;
  padding:var(--study-space-2) var(--study-space-3);
  border:1px solid var(--study-line);
  border-radius:var(--study-control-radius);
  font-size:var(--study-choice-size);
  line-height:var(--study-choice-line);
  cursor:pointer;
}
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-choice input { margin:0; align-self:center; width:18px; height:18px; }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-choice :is(b,span) { margin:0; }
/* Card gesture hints do not apply while a question is being answered. */
#bw-study-frame .cc-page[data-study-review]:has(#cc-question-retry:not([hidden])) #cc-tap-hint { display:none!important; }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-choice:has(input:checked) { border-color:var(--study-accent); background:var(--study-accent-wash); }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-choice[data-result="correct"] { border-color:var(--study-accent); background:var(--study-accent-wash); }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-choice[data-result="selected"] { border-color:var(--study-rose); }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-choice:has(input:disabled) { cursor:default; }
#bw-study-frame .cc-page[data-study-review] :is(.cc-question-retry-submit,.cc-question-retry-next) {
  width:100%;
  min-height:48px;
  border:0;
  border-radius:var(--study-control-radius);
  background:var(--study-accent);
  color:var(--study-accent-ink);
  font:inherit;
  font-size:var(--study-label-size);
  font-weight:500;
  cursor:pointer;
}
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-submit:disabled { background:var(--study-line); color:var(--study-ink-3); cursor:not-allowed; }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-status { margin:var(--study-space-2) 0 0; color:var(--study-ink-2); font-size:var(--study-meta-size); }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-status:empty { display:none; }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-feedback { margin-top:var(--study-space-3); font-size:var(--study-body-size); line-height:var(--study-body-line); }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-feedback[hidden] { display:none; }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-feedback p { margin:0 0 var(--study-space-2); }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-verdict { font-weight:600; }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-verdict[data-correct="false"] { color:var(--study-rose); }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-answer { font-weight:600; }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-links { display:flex; flex-wrap:wrap; gap:var(--study-space-3); }
#bw-study-frame .cc-page[data-study-review] .cc-question-retry-links a { color:var(--study-accent); }
#bw-study-frame .cc-page[data-study-review] .cc-miss-browser-items { margin:var(--study-space-1) 0 0; padding-left:var(--study-space-4); }
#bw-study-frame .cc-page[data-study-review] .cc-miss-browser-question { display:flex; flex-wrap:wrap; gap:var(--study-space-3); align-items:baseline; }
#bw-study-frame .cc-page[data-study-review] .cc-miss-browser-when { color:var(--study-ink-3); font-size:var(--study-meta-size); }
#bw-study-frame .cc-page[data-study-review] .cc-miss-browser-question[data-due="true"] .cc-miss-browser-when { color:var(--study-ink); font-weight:600; }
#bw-study-frame .cc-page[data-study-review] .cc-miss-browser-card { color:var(--study-ink-2); font-size:var(--study-meta-size); }
/* The card face steps aside while a missed question is answered as a question. */
#bw-study-frame .cc-page[data-study-review] #study-card[data-cc-retry-hidden] { display:none!important; }
/* Review inside Today (Mo 10-31): one queue of all three sources, narrowed by these chips.
   The exam, deck and card-mode controls belong to Decks (/cluecards/), not to Today. */
#bw-study-frame .cc-page[data-study-review][data-study-review-place="today"] :is(.study-review-exam,.study-review-controls > .study-review-deck,.mode-controls) { display:none!important; }
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .study-review-sources { display:none!important; }
/* Every source stays in view: the chips wrap rather than scroll, whatever the counts. */
#bw-study-frame .cc-page[data-study-review] .study-review-sources {
  display:flex;
  flex-wrap:wrap;
  gap:var(--study-space-2);
  width:100%;
  min-width:0;
}
#bw-study-frame .cc-page[data-study-review] .study-review-sources button {
  display:inline-flex;
  min-width:max-content;
  min-height:44px;
  flex:0 0 auto;
  align-items:center;
  gap:6px;
  padding:0 var(--study-space-3);
  border:1px solid var(--study-line)!important;
  border-radius:var(--study-pill-radius)!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--study-ink-2)!important;
  font:inherit;
  font-size:var(--study-label-size);
  white-space:nowrap;
  cursor:pointer;
  transition:background var(--study-t-press),border-color var(--study-t-press),color var(--study-t-press);
}
#bw-study-frame .cc-page[data-study-review] .study-review-sources button[aria-pressed="true"] {
  border-color:var(--study-line-strong)!important;
  background:var(--study-accent-wash)!important;
  color:var(--study-ink)!important;
}
#bw-study-frame .cc-page[data-study-review] .study-review-source-count { color:var(--study-ink-3); font-variant-numeric:tabular-nums; }
#bw-study-frame .cc-page[data-study-review] .study-review-sources button[aria-pressed="true"] .study-review-source-count { color:var(--study-ink-2); }
/* Review inside Today is a focus mode (Mo 10-31): a slim top row, one big dark-glass card over the
   dimmed porch art, the answer or the four grades in thumb reach, and everything else in a bottom
   sheet. The palette is the night one whatever the theme (the art behind is always dimmed).
   Decks (/cluecards/) keeps its own page of controls. The doubled id outranks the site-wide
   square-button rule (two ids) without touching Decks. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review][data-study-review-place="today"] {
  --study-ink:#f3f1f8; --study-ink-2:#d9d5e6; --study-ink-3:#a9a4bb; --study-ink-4:#6f6a80;
  --study-line:rgba(255,255,255,.1); --study-line-strong:rgba(255,255,255,.16);
  --study-raise:rgba(16,17,27,.72); --study-surface:rgba(22,22,34,.86);
  --study-accent:#c295f4; --study-accent-ink:#0b0714; --study-accent-wash:rgba(194,149,244,.16);
  --today-glass:rgba(16,17,27,.72); --today-glass-line:rgba(255,255,255,.1); --today-pill:rgba(24,24,36,.8);
  --today-ease:cubic-bezier(.22,.61,.36,1);
  background:transparent!important; color:var(--study-ink)!important;
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review][data-study-review-place="today"] :is(.page,.shell,.workspace) { background:transparent!important; }
/* Active standalone Review/Miss Deck reuse the focus layout and sheet, not Today's backdrop palette. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .shell { width:calc(100% - 32px); max-width:760px; padding:max(6px,env(safe-area-inset-top)) 0 max(16px,env(safe-area-inset-bottom)); }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .workspace { gap:12px; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) :is(.study-review-controls,.study-review-progress-line,.bw-study-flashcard,.controls,.study-review-empty,#study-card,#cc-seed-study-card) { max-width:none; }
/* Slim top row: close and "N of M" over a thin line. Options stay below the card. */
#bw-study-frame .cc-page[data-study-review] .study-review-focusbar { display:none; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .study-review-focusbar:not([hidden]) {
  display:grid; grid-template-columns:44px minmax(0,1fr); align-items:center; gap:12px; min-height:68px;
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .study-review-close {
  display:inline-flex; width:44px; height:44px; align-items:center; justify-content:center; padding:0;
  border:1px solid var(--sheet-line,var(--study-line))!important; border-radius:999px!important; background:var(--today-pill,var(--study-surface))!important;
  color:var(--study-ink)!important; box-shadow:none!important; cursor:pointer;
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .study-review-close svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .study-review-focus-progress { display:flex; min-width:0; flex-direction:column; align-items:center; gap:3px; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-focus-progress > .study-review-deck { display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px; max-width:none; font-size:11px; white-space:nowrap; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-focus-progress > .study-review-deck select { min-height:44px; padding:0 24px 0 8px; font-size:16px; }
#bw-study-frame .cc-page[data-study-review] .study-review-options-open { display:none; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .study-review-options-open:not([hidden]) {
  display:inline-flex; align-items:center; justify-content:center; align-self:center;
  min-height:44px; padding:8px 16px; border:1px solid var(--study-line-strong)!important;
  border-radius:var(--study-control-radius)!important; background:transparent!important; color:var(--study-ink-2)!important;
  font:inherit; font-size:.875rem; cursor:pointer;
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .study-review-focus-count { color:var(--study-ink-2); font-size:.875rem; font-variant-numeric:tabular-nums; line-height:1; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .study-review-focus-track { display:block; width:min(100%,220px); height:3px; overflow:hidden; border-radius:3px; background:var(--study-line-strong); }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .study-review-focus-track > i { display:block; height:100%; width:0; border-radius:inherit; background:var(--study-accent); transition:width .45s var(--today-ease,ease); }
/* The long progress sentence stays for screen readers; the top row shows the position. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) #cc-study-progress { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .study-review-progress-line { min-height:0; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .study-review-progress-line:not(:has(> :not(#cc-study-progress):not([hidden]))) { display:none; }
/* The card is the Daily Rounds flashcard (Mo 10-31: "use that design for the new today page"):
   paper, deck label, why-due line, serif prompt, divider, "Answer" and the answer in green all come
   from the shared .bw-study-flashcard rules in /cluecards/study-card-20261012.css, so Rounds and
   Today and active standalone review stay one layout and read it top-down. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) :is(#study-card,#cc-seed-study-card) {
  justify-content:flex-start;
  min-height:max(300px,calc(100svh - 232px - var(--bw-study-reserved-bottom,0px) - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  box-shadow:0 18px 48px rgba(0,0,0,.32);
}
/* A308: reserve space for the source-mode row and Show answer on a 390px phone.
   The shared frame's focus-mode min-height is more specific, so this Today-only
   override must be important. Longer prompts still grow without clipping. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review][data-study-review-place="today"] :is(#study-card,#cc-seed-study-card) {
  min-height:clamp(180px,calc(100svh - 420px - var(--bw-study-reserved-bottom,0px) - env(safe-area-inset-top) - env(safe-area-inset-bottom)),280px)!important;
}
/* Daily Rounds (Mo 11-10): the card is as tall as its content; no empty panel under "Show answer". */
#bw-study-frame#bw-study-frame .cc-page[data-study-review][data-study-review-place="rounds"] :is(#study-card,#cc-seed-study-card) {
  min-height:0;
}
/* The Decks page's own dark-scheme ink (accessibility-theme, dashboard-integration) is !important;
   focused review takes the shared card's tokens back, so its paper and ink match. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .card-kicker { padding:0 52px 0 0!important; border:0!important; color:var(--sc-good)!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .bw-why-here { color:var(--sc-muted)!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .card-clue { color:var(--sc-ink)!important; }
/* Today uses the Daily Rounds face with the requested editorial serif prompt; other review surfaces keep their own type. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review][data-study-review-place="today"] .bw-study-front { font-family:"Newsreader",Georgia,serif!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .card-answer { border-color:var(--sc-edge)!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .answer-label { color:var(--sc-muted)!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .answer-text { color:var(--sc-good)!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .explain-text { color:var(--sc-ink)!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) :is(.bw-study-explanation-details,.bw-study-explanation-details > summary) { border-color:var(--sc-edge)!important; color:var(--sc-accent)!important; }
/* Rounds shows one label top-left; the deck title stays in the options sheet. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) :is(#card-source,#cc-seed-card-source) { display:none; }
/* Like Rounds, the revealed card keeps its prompt (blanks as [...]) above a divider and the answer,
   instead of turning over to an answer-only side. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .bw-study-flip-inner { display:flex; flex-direction:column; gap:18px; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .bw-study-flip[data-face="answer"] .bw-study-side-front { display:block; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .bw-study-flip-button { display:none!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .bw-study-flip .bw-study-back { border-top-width:1px!important; padding-top:18px!important; }
/* Thumb reach: one lavender Show answer, or the four grades in one row. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .bw-study-controls { margin-top:12px; }
/* Today: the card shadow painted over the grades and Show answer (the card is a stacking context); lift the controls above it. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .bw-study-controls { position:relative; z-index:1; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .reveal-button {
  /* Keep the answer between Previous and Next within the phone's visible width. */
  width:auto; min-width:0; flex:1 1 0; min-height:56px; border-radius:16px!important;
  background:var(--study-accent)!important; color:var(--study-accent-ink)!important;
  font-size:1.0625rem!important; font-weight:600; letter-spacing:.01em;
}
/* Prev / Next: small arrows under the action (swipe does the same). */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .controls { gap:0; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .cc-review-pagination { display:flex; justify-content:space-between; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .nav-btn {
  width:40px; min-width:40px; height:40px; min-height:40px; padding:0;
  border:0!important; border-radius:999px!important; background:transparent!important; color:var(--study-ink-3)!important; font-size:1.125rem;
}
/* The bottom sheet: source chips first, then Review options and the gesture help. */
/* Review options sheet colours (1031 follow-up): tokens on the sheet, night values by default and Paper values
   under the light study scheme, so the sheet follows the site Theme like the rest of the page. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet {
  --sheet-bg:#121019; --sheet-fill:rgba(255,255,255,.05); --sheet-fill-2:rgba(255,255,255,.07);
  --sheet-line:rgba(255,255,255,.08); --sheet-knob:#f3f1f8; --sheet-pill:rgba(255,255,255,.06);
}
html[data-bw-study-scheme="light"] #bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet {
  --sheet-bg:#f7f5fb; --sheet-fill:rgba(20,16,32,.05); --sheet-fill-2:rgba(20,16,32,.07);
  --sheet-line:rgba(20,16,32,.12); --sheet-knob:#ffffff; --sheet-pill:rgba(20,16,32,.06);
  --study-ink:#1d1a26; --study-ink-2:#3b3649; --study-ink-3:#5f5970; --study-line:rgba(20,16,32,.12);
  --study-line-strong:rgba(20,16,32,.2); --study-accent:#6f3fb0; --study-accent-ink:#ffffff; --study-accent-wash:rgba(111,63,176,.12);
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet {
  position:fixed; inset:auto 0 var(--bw-study-reserved-bottom,0px); width:100%; max-width:760px; max-height:calc(86dvh - var(--bw-study-reserved-bottom,0px)); margin:0 auto; box-sizing:border-box;
  padding:8px 20px max(20px,env(safe-area-inset-bottom)); overflow:auto;
  border:1px solid var(--today-glass-line,var(--study-line)); border-bottom:0; border-radius:22px 22px 0 0;
  background:var(--sheet-bg); color:var(--study-ink);
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet[open] { animation:study-sheet-up .32s var(--today-ease,ease) both; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet::backdrop { background:rgba(4,4,8,.5); }
@keyframes study-sheet-up { from { transform:translateY(100%); } to { transform:none; } }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-head { display:flex; align-items:center; justify-content:space-between; min-height:52px; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-head h2 { margin:0; color:var(--study-ink); font-size:1.125rem; font-weight:500; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-done { min-height:44px; min-width:44px; padding:0 18px; border:0!important; border-radius:999px!important; background:var(--study-accent-wash)!important; color:var(--study-accent)!important; box-shadow:none!important; outline:0; font:inherit; font-size:.9375rem; font-weight:600; line-height:1; cursor:pointer; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-done:focus-visible { outline:2px solid var(--study-accent); outline-offset:2px; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-done:focus:not(:focus-visible) { outline:0!important; box-shadow:none!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .study-review-set-size select { -webkit-appearance:none; appearance:none; color:var(--study-ink)!important; -webkit-text-fill-color:var(--study-ink); background-color:var(--sheet-fill-2)!important; background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%)!important; background-position:calc(100% - 17px) 50%,calc(100% - 12px) 50%!important; background-size:5px 5px,5px 5px!important; background-repeat:no-repeat!important; padding-right:34px!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .study-review-set-size select option { background:var(--sheet-bg); color:var(--study-ink); }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-head h2:focus { outline:0!important; box-shadow:none!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body { display:flex; flex-direction:column; gap:14px; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .study-review-controls { margin:0; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sources { gap:8px; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sources button {
  flex:1 1 auto; justify-content:center; min-height:46px; padding:0 16px;
  border:1px solid var(--sheet-line)!important; border-radius:999px!important;
  background:var(--sheet-pill)!important; color:var(--study-ink-2)!important; font-weight:500;
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sources button[aria-pressed="true"] { border-color:transparent!important; background:var(--study-accent)!important; color:var(--study-accent-ink)!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-source-count { color:inherit!important; opacity:.72; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .cc-more { border-top:0; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .cc-more > summary { display:none; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body #cc-tap-hint.cc-tap-hint { margin:0; padding:10px 8px 10px 14px; border:0; border-radius:14px; background:var(--sheet-fill); color:var(--study-ink-3); font-size:.8125rem; line-height:1.5; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body #cc-tap-hint-dismiss { min-width:36px; min-height:36px; border:0!important; background:transparent!important; color:var(--study-ink-3)!important; }
/* Inside the sheet: tidy rows, switches for the toggles, side-by-side utilities. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body :is(.cc-more,.study-review-utility-list,.cc-review-actions,.cc-review-settings) { border:0!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .session-bar { display:none; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .study-review-utility-list { display:flex; flex-direction:column; gap:12px; padding:0; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .cc-review-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .cc-review-actions button { width:100%; min-height:44px; justify-content:center; border:1px solid var(--sheet-line)!important; border-radius:12px!important; background:var(--sheet-fill)!important; color:var(--study-ink-2)!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .cc-review-settings { display:flex; flex-direction:column; padding:2px 16px!important; border-radius:16px; background:var(--sheet-fill)!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body label.cc-review-toggle { display:flex!important; align-items:center; justify-content:space-between; gap:12px; min-height:52px; margin:0!important; color:var(--study-ink); font-size:1rem; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body label.cc-review-toggle input {
  order:2; position:relative; flex:none; width:46px!important; height:28px; min-height:0!important; margin:0!important; padding:0!important;
  -webkit-appearance:none; appearance:none; border:0!important; border-radius:999px!important; background:var(--study-line-strong)!important; cursor:pointer;
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body label.cc-review-toggle input::before { content:""; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:var(--sheet-knob); transition:transform .2s var(--today-ease,ease); }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body label.cc-review-toggle input:checked { background:var(--study-accent)!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body label.cc-review-toggle input:checked::before { transform:translateX(18px); }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .study-review-set-size { display:flex!important; align-items:center; justify-content:space-between; gap:12px; min-height:56px; margin:0!important; padding:0 16px; border-radius:16px; background:var(--sheet-fill); color:var(--study-ink); }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .study-review-set-size select { width:auto!important; min-width:128px; margin:0!important; border-radius:12px!important; background:var(--sheet-fill-2)!important; color:var(--study-ink)!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .study-review-utility-list > p { margin:0; color:var(--study-ink-3); font-size:.8125rem; line-height:1.5; }
/* Review options sheet, one system (Mo 10-31 10:34): filters are an even grid (2 columns for four, 3 for three),
   equal-height pills; action tiles share one size and radius in a 2-column grid; View source question is a text
   link on its own row under them; Done is a normal header button. Colours come from the study tokens. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .study-review-sources { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; width:100%; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .study-review-sources[data-count="3"] { grid-template-columns:repeat(3,minmax(0,1fr)); }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .study-review-sources button { width:100%; min-width:0; min-height:44px; margin:0; padding:0 10px; gap:6px; justify-content:center; box-shadow:none!important; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .cc-review-actions { gap:8px; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .cc-review-actions button { min-height:44px; margin:0; padding:0 12px; border-radius:14px!important; box-shadow:none!important; font-size:.9375rem; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .cc-review-actions a#cc-view-question:not([hidden]) { grid-column:1 / -1; justify-self:center; display:inline-flex; align-items:center; min-height:44px; padding:0 12px; border:0; background:none; color:var(--study-accent); font-size:.9375rem; text-decoration:underline; text-underline-offset:3px; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .cc-review-settings,
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"],[data-cc-prototype]) .study-review-sheet-body .study-review-set-size { border-radius:14px; }
/* Status cards (nothing due, a failure, choose an exam) use the same glass card. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review][data-study-review-place="today"] .study-review-empty {
  min-height:200px; padding:28px 24px; border:1px solid var(--today-glass-line); border-radius:22px;
  background:var(--today-glass); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); color:var(--study-ink-2);
}
/* Not ready yet: the card frame itself, softly shimmering; no loading text block. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-empty[data-study-waiting] {
  position:relative; overflow:hidden;
  min-height:max(300px,calc(100svh - 232px - var(--bw-study-reserved-bottom,0px) - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  border:1px solid var(--study-line); border-radius:var(--study-panel-radius); background:var(--study-raise);
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-empty[data-study-pending] { visibility:hidden; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-empty[data-study-waiting] > * { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-empty[data-study-waiting]::before {
  content:""; position:absolute; left:24px; right:24px; top:calc(50% - 50px); height:100px;
  background:
    linear-gradient(var(--study-line),var(--study-line)) 0 0/88% 22px no-repeat,
    linear-gradient(var(--study-line),var(--study-line)) 0 38px/64% 22px no-repeat,
    linear-gradient(var(--study-line),var(--study-line)) 0 84px/30% 12px no-repeat;
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-empty[data-study-waiting]::after {
  content:""; position:absolute; inset:0;
  background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.07) 50%,transparent 70%) 0 0/250% 100%;
  animation:study-today-shimmer 1.6s var(--today-ease,ease) infinite;
}
/* A291: Card Review keeps the real loading message, never a blank grey
   300px+ faux card while waiting for the authoritative scoped queue. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]):not([data-study-review-place="rounds"]) .study-review-empty[data-study-waiting] {
  min-height:0; padding:12px 0; border:0; border-radius:0; background:transparent;
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]):not([data-study-review-place="rounds"]) .study-review-empty[data-study-waiting] > * {
  position:static; width:auto; height:auto; overflow:visible; clip:auto; white-space:normal;
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]):not([data-study-review-place="rounds"]) .study-review-empty[data-study-waiting]::before,
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]):not([data-study-review-place="rounds"]) .study-review-empty[data-study-waiting]::after {
  content:none; animation:none;
}
@keyframes study-today-shimmer { from { background-position:120% 0; } to { background-position:-20% 0; } }
@media (prefers-reduced-motion:reduce) {
  #bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-empty[data-study-waiting]::after { animation:none; }
  #bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) .study-review-sheet[open] { animation:none; }
}
/* The four grades always share one row (Mo 10-31): label over its interval, every phone width. */
#bw-study-frame .cc-page[data-study-review] .grade-controls { grid-template-columns:repeat(4,minmax(0,1fr))!important; gap:8px; }
#bw-study-frame .cc-page[data-study-review] .grade-btn { min-width:0; padding-inline:4px; white-space:nowrap; overflow-wrap:normal; }
#bw-study-frame .cc-page[data-study-review] .grade-btn small { white-space:nowrap; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review][data-study-review-place="today"] .grade-btn { height:60px; border-radius:14px!important; }
/* Review and Today share the Rounds grade palette. These controls use .grade-btn rather than
   .bw-study-flashcard .bw-study-grade, so they need their own --sc-grade values and
   --sc-on-grade ink; without them the var() background is invalid and becomes transparent.
   The site Theme's resolved study scheme chooses paper or dark palette, never the device alone.
   Every grade remains a distinct solid fill with its interval directly underneath. */
#bw-study-frame .cc-page[data-study-review] {
  --sc-again:#b42336; --sc-hard:#975b00; --sc-good:#17643a; --sc-easy:#1458a6;
  --sc-on-grade:#fff;
}
html[data-bw-study-scheme="dark"] #bw-study-frame .cc-page[data-study-review] {
  --sc-again:#ff8a8f; --sc-hard:#ffc15a; --sc-good:#78e2a0; --sc-easy:#79b8ff;
  --sc-on-grade:#15121b;
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .grade-btn.again { --sc-grade:var(--sc-again); }
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .grade-btn.hard { --sc-grade:var(--sc-hard); }
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .grade-btn.good { --sc-grade:var(--sc-good); }
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .grade-btn.easy { --sc-grade:var(--sc-easy); }
/* The doubled id outranks site-wide button rules that otherwise clear their borders. In Today
   the grades sit on dimmed artwork, so Paper gets a light rim standing off that ground. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .grade-btn {
  display:block; height:auto; min-height:52px; padding:8px 4px; text-align:center;
  border:0!important; background:var(--sc-grade)!important; color:var(--sc-on-grade)!important; font-weight:600;
  -webkit-backdrop-filter:none; backdrop-filter:none;
}
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .grade-btn small { display:block; margin-top:4px; color:inherit!important; font-weight:400; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .grade-btn:is(:hover,:focus-visible):not(:disabled) { background:var(--sc-grade)!important; filter:brightness(1.08); }
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .grade-btn:focus-visible { outline:3px solid var(--study-focus,var(--study-accent)); outline-offset:2px; }
#bw-study-frame#bw-study-frame .cc-page[data-study-review] .grade-btn:disabled { color:var(--sc-on-grade)!important; opacity:.55; }
html[data-bw-study-scheme="light"] #bw-study-frame#bw-study-frame .cc-page[data-study-review][data-study-review-place="today"] .grade-btn {
  border:2px solid rgba(255,255,255,.82)!important;
}
/* "Card 1 of 50, 0 percent correct, 2:01" is the spoken progress sentence (Today keeps it for screen readers only);
   on Decks it read as screen-reader text left on the page. Screen readers still get it in both places. */
#bw-study-frame .cc-page[data-study-review] #cc-study-progress { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
#bw-study-frame .cc-page[data-study-review] .study-review-progress-line { position:relative; min-height:0; }

/* Card Review layout (/cluecards/ only; the Today review keeps its own look). Mock 10-31: eyebrow + title,
   one row of filter pills, a progress line with a thin bar, a kicker on the card, a full-width Reveal answer,
   quiet Previous / Next links, a "Help personalize" box, and a collapsed "Card options" row. IDs unchanged. */
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .study-review-exam { display:none!important; }
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .mode-controls {
  display:flex!important; flex-wrap:nowrap; overflow-x:auto; gap:6px; padding:4px 0 2px; scrollbar-width:none;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .mode-controls button {
  flex:1 1 0; min-width:0; min-height:44px; padding:0 6px; border-radius:999px; border:1px solid var(--study-line-strong);
  background:transparent; color:var(--study-ink-2); font-size:13px; white-space:nowrap;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .mode-controls button.active {
  background:var(--study-accent); border-color:var(--study-accent); color:var(--study-accent-ink);
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .progress-track {
  display:block!important; height:4px; border-radius:999px; background:var(--study-line); overflow:hidden; margin:0 0 12px;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .progress-fill {
  height:100%; background:var(--study-accent); border-radius:999px;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .card-kicker {
  display:flex!important; justify-content:space-between; gap:8px; padding:0 0 10px; color:var(--study-ink-2);
  font-size:12px; letter-spacing:.04em; text-transform:uppercase; font-weight:600;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .card-kicker #card-subject::before {
  content:""; display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--study-accent); margin-right:8px; vertical-align:middle;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .reveal-button {
  width:100%!important; min-height:52px; border-radius:var(--study-control-radius); background:var(--study-accent)!important;
  color:var(--study-accent-ink)!important; border:0; font-weight:600; font-size:16px;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .cc-review-pagination {
  justify-content:space-between; align-items:center;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #prev-button,
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #next-button {
  width:auto!important; min-width:44px; height:44px; background:transparent!important; border:0!important; box-shadow:none!important;
  color:var(--study-ink-2); font-size:14px; padding:0 4px;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #prev-button::after { content:" Previous"; }
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #next-button::before { content:"Next card "; }
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .cc-engine-feedback:has(> button:not([hidden])) {
  display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:14px 0 8px; padding:12px; border-radius:var(--study-panel-radius);
  border:1px solid var(--study-line); background:var(--study-surface);
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .cc-engine-feedback:has(> button:not([hidden]))::before {
  content:"Help personalize your practice"; grid-column:1 / -1; color:var(--study-ink-3); font-size:13px; font-weight:600;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .cc-engine-feedback button {
  min-height:44px; border-radius:var(--study-control-radius); background:var(--study-well); color:var(--study-ink);
  border:1px solid var(--study-line); font-size:14px;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #cc-more > summary {
  min-height:44px; display:flex; align-items:center; color:var(--study-ink-2); font-size:15px;
}

/* Card Review follow-up (10-31, coordinator review of #8506): serif question, mock-style pills, tighter groups. */
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .card-clue { font-family:var(--study-font-display); font-weight:500; letter-spacing:0; }
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .study-review-controls { gap:8px; padding:0; }
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .mode-controls {
  padding:0!important; margin:0 0 4px!important; border:0!important; background:transparent!important; box-shadow:none!important; gap:8px!important;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .mode-controls button {
  border:1px solid var(--study-line-strong)!important; border-radius:999px!important; background:var(--study-surface)!important;
  color:var(--study-ink-2)!important; box-shadow:none!important; min-height:44px; font-size:13px;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .mode-controls button.active {
  background:var(--study-accent)!important; border-color:var(--study-accent)!important; color:var(--study-accent-ink)!important;
}
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .cc-progress-line { margin:2px 0 6px; }
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .progress-track { margin:0 0 10px; }
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .cc-read-status { margin:0; }
#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .cc-read-status p:empty { display:none; }

html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) :is(#study-card,#cc-seed-study-card) .card-clue { font-family:"Newsreader",Georgia,serif!important; font-weight:500; letter-spacing:0; }
.study-mounted-review #study-card .cc-card-flag { top:6px!important; right:6px!important; }
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .mode-controls button { border-radius:999px!important; }
html body #study-card .cc-card-flag { background:transparent!important; border:0!important; box-shadow:none!important; }

/* Card Review part 2 (10-31, mock de4ef689; /cluecards/ only, not the Today review). Colors and motion follow the
   site Theme and Animations through the --study-* tokens. Pills are outlined; only the active one is filled.
   Selectors carry three IDs (frame, #main, the deck select) so they beat the header's double-ID !important resets. */
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main .study-review-controls > .study-review-deck {
  position:absolute!important; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls .cc-collection,
html body #bw-study-frame .cc-page[data-cc-review-seed] #cc-seed-main .study-review-controls .cc-collection {
  display:flex; align-items:center; gap:12px; width:100%; min-height:64px; box-sizing:border-box; padding:10px 14px;
  border:1px solid var(--study-line-strong)!important; border-radius:16px!important; background:var(--study-surface)!important; color:var(--study-ink)!important;
  font:inherit; text-align:left; cursor:pointer;
}
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls .cc-collection:focus-visible,
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls dialog.cc-collection-sheet button:focus-visible,
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls dialog.cc-collection-sheet input:focus-visible { outline:3px solid var(--study-accent); outline-offset:3px; }
.cc-collection-tile { flex:0 0 44px; width:44px; height:44px; border-radius:12px; display:inline-flex; align-items:center; justify-content:center; background:var(--study-accent-wash); color:var(--study-accent); }
.cc-collection-tile svg, .cc-collection-chev svg { width:22px; height:22px; }
.cc-collection-text { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.cc-collection-eyebrow { font-size:12px; letter-spacing:.08em; text-transform:uppercase; font-weight:600; color:var(--study-ink-3); }
.cc-collection-name { font-size:17px; font-weight:600; color:var(--study-ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cc-collection-chev { flex:0 0 auto; display:inline-flex; color:var(--study-ink-3); }

html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main dialog.cc-collection-sheet {
  position:fixed; inset:auto 0 var(--bw-study-reserved-bottom,0px); margin:0 auto; width:min(100%,560px); max-width:100%; max-height:calc(80dvh - var(--bw-study-reserved-bottom,0px)); box-sizing:border-box;
  display:flex; flex-direction:column; gap:12px; padding:8px 16px calc(20px + env(safe-area-inset-bottom,0px));
  border:0; border-radius:22px 22px 0 0; background:var(--study-raise,var(--study-surface)); color:var(--study-ink);
  box-shadow:0 -12px 40px rgba(0,0,0,.35); overflow:hidden;
}
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main dialog.cc-collection-sheet:not([open]) { display:none; }
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main dialog.cc-collection-sheet::backdrop { background:rgba(8,6,14,.55); }
.cc-sheet-grab { width:44px; height:5px; margin:4px auto 0; border-radius:3px; background:var(--study-line-strong); }
.cc-sheet-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.cc-sheet-head h2 { margin:0; font-size:20px; font-weight:600; line-height:1.2; color:var(--study-ink); }
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls dialog.cc-collection-sheet .cc-sheet-close { min-width:44px; min-height:44px; padding:0 16px; border-radius:999px!important; border:1px solid var(--study-line-strong)!important; background:transparent!important; color:var(--study-ink-2)!important; font:inherit; font-size:14px; cursor:pointer; }
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls dialog.cc-collection-sheet .cc-sheet-search input { box-sizing:border-box; width:100%; min-height:48px; padding:0 14px; border-radius:14px!important; border:1px solid var(--study-line-strong)!important; background:var(--study-well,var(--study-surface))!important; color:var(--study-ink)!important; font:inherit; font-size:16px; }
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls dialog.cc-collection-sheet .cc-sheet-search input::placeholder { color:var(--study-ink-3); }
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main dialog.cc-collection-sheet .cc-sheet-list { list-style:none; margin:0; padding:0 2px 4px 0; display:flex; flex-direction:column; gap:6px; overflow-y:auto; overscroll-behavior:contain; min-height:0; flex:1 1 auto; }
.cc-sheet-group { padding:10px 4px 2px; font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--study-ink-3); }
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls dialog.cc-collection-sheet .cc-sheet-item { width:100%; min-height:48px; box-sizing:border-box; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; border-radius:14px!important; border:1px solid var(--study-line)!important; background:transparent!important; color:var(--study-ink)!important; font:inherit; font-size:16px; text-align:left; cursor:pointer; }
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls dialog.cc-collection-sheet .cc-sheet-item[aria-current="true"] { border-color:var(--study-accent)!important; background:var(--study-accent-wash)!important; font-weight:600; }
.cc-sheet-name { min-width:0; overflow-wrap:anywhere; }
.cc-sheet-due { flex:0 0 auto; font-size:13px; white-space:nowrap; color:var(--study-ink-3); }
.cc-sheet-empty { margin:0; font-size:14px; color:var(--study-ink-3); }

html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls .mode-controls button {
  background:transparent!important; border:1px solid var(--study-line-strong)!important; border-radius:999px!important;
  color:var(--study-ink-2)!important; box-shadow:none!important; min-height:44px;
}
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls .mode-controls button.active,
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls .mode-controls button[aria-pressed="true"] {
  background:var(--study-accent)!important; border-color:var(--study-accent)!important; color:var(--study-accent-ink)!important; font-weight:600;
}
html body .cc-page p.cc-exam-bar#cc-exam-bar { margin:0 16px 6px!important; padding:0!important; max-width:none; }
html body .cc-page .cc-review-head { margin:12px 16px 4px!important; padding:0!important; }
/* Keep the first prompt above the mobile tab bar without removing any review controls. */
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .cc-review-head {
  margin:8px 16px 0!important; padding:0!important;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .cc-review-kicker {
  margin:0 0 2px!important; padding:0!important; font-size:11px!important; line-height:16px!important;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .cc-review-title {
  margin:0!important; padding:0!important; font-size:28px!important; line-height:32px!important;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) :is(#cc-exam-bar,#cc-seed-cc-exam-bar) {
  margin:2px 16px 0!important; padding:0!important; font-size:13px!important; line-height:18px!important;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review] #cc-exam-bar {
  display:grid!important; grid-template-columns:minmax(0,1fr); justify-items:start; gap:0;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review] #cc-exam-value { display:block!important; }
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) .cc-exam-link {
  box-sizing:border-box; min-height:44px; padding:4px 0!important; margin:0!important;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) :is(#main,#cc-seed-main).shell {
  padding-top:0!important;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) :is(#main,#cc-seed-main) .workspace {
  gap:8px!important;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) :is(#main,#cc-seed-main) .study-review-controls {
  margin:0!important; padding:0!important; gap:6px!important;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) :is(#main,#cc-seed-main) :is(.cc-progress-line,.study-review-progress-line) {
  min-height:0; margin:0!important; padding:0!important; font-size:13px; line-height:20px;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) :is(#main,#cc-seed-main) .progress-track {
  margin:0!important;
}
html body #bw-study-frame .cc-page[data-study-review] #main :is(#cc-preference-status,#cc-feedback-status,#cc-load-status):empty {
  display:none!important;
}
html body #bw-study-frame .cc-page[data-study-review] #main :is(#cc-preference-status,#cc-feedback-status,#cc-load-status) {
  margin:0!important;
}
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main:has(#study-review-deck) .study-review-controls .cc-progress-right,
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main .cc-progress-line .cc-progress-right {
  display:inline-flex; align-items:center; gap:6px; white-space:nowrap;
}
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) #main .cc-progress-right[hidden] { display:none!important; }
html body #bw-study-frame .cc-page[data-study-review] #main #cc-progress-right > svg {
  display:block!important; width:16px!important; height:16px!important; margin:0!important;
  flex:0 0 16px; align-self:center;
}
html body #bw-study-frame .cc-page[data-study-review] #main #cc-progress-line { align-items:center; }
html body #bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) :is(#main,#cc-seed-main) .progress-track { display:block!important; }
html body #bw-study-frame .cc-page[data-study-review] #main #study-card .cc-card-flag { background:transparent!important; border:0!important; box-shadow:none!important; }
.cc-engine-feedback button { display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.cc-engine-feedback button svg { width:18px; height:18px; flex:0 0 auto; }
html body .cc-page .cc-undo-tools { display:flex; justify-content:flex-end; min-width:0; }
html body .cc-page .cc-undo-tools:has([hidden]) { display:none; }
html body #bw-study-frame .cc-page #main .cc-undo-pill {
  display:inline-flex!important; align-items:center; justify-content:center; gap:8px;
  min-height:44px; padding:8px 16px!important; border-radius:999px!important;
  border:1px solid var(--study-line-strong)!important; background:var(--study-raise,var(--study-surface))!important;
  color:var(--study-ink)!important; font:inherit; font-size:14px; cursor:pointer;
}
html body #bw-study-frame .cc-page #main .cc-undo-pill[hidden] { display:none!important; }
html body #bw-study-frame .cc-page #main .cc-undo-pill:disabled { opacity:.5; cursor:default; }
html body #bw-study-frame .cc-page #main .cc-undo-pill:focus-visible { outline:3px solid var(--study-accent); outline-offset:3px; }
.cc-review-toggle:has(#cc-shake-undo) { flex-wrap:wrap; }
.cc-review-toggle:has(#cc-shake-undo) small { display:block; width:100%; font-size:12px; line-height:1.5; color:var(--study-ink-3); }

.cc-chain-context { width:100%; color:var(--sc-ink,var(--study-ink)); font-size:15px; line-height:1.5; overflow-wrap:anywhere; }
html body .cc-chain-context[hidden],html body .cc-page .bw-why-here[hidden] { display:none!important; }
.cc-chain-context h3 { margin:0 0 8px; font:600 14px/1.4 var(--study-font-body,system-ui,sans-serif); color:var(--study-ink-3,var(--sc-muted)); }
.cc-chain-context section + section { margin-top:16px; }
.cc-chain-context p { margin:0 0 12px; }
.cc-chain-context ol { margin:0; padding-left:1.4em; }
.cc-chain-context li + li { margin-top:10px; }
.cc-chain-context-answers { margin-top:20px; }

/* The private seed occupies the same shell, without owning document IDs or
   pushing the incoming workspace down while its first card is admitted. */
#bw-study-frame [data-cc-review-first-paint] { position:absolute; inset:0 0 auto; z-index:2; width:100%; }
#bw-study-frame [data-cc-review-first-paint] #cc-seed-study-card .card-kicker { padding-right:52px!important; }
#bw-study-frame [data-cc-review-first-paint] #cc-seed-card-subject::before {
  content:""; display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--study-accent); margin-right:8px; vertical-align:middle;
}
html body #bw-study-frame [data-cc-review-first-paint] { padding:inherit; box-sizing:border-box; }
html body #bw-study-frame [data-cc-review-first-paint] :is(#cc-seed-cc-preference-status,#cc-seed-cc-feedback-status,#cc-seed-cc-load-status):empty { display:none!important; }
html body #bw-study-frame [data-cc-review-first-paint] .cc-study-nav { display:none!important; }
/* The collection adjunct fills the progress sentence after mount. Reserve its
   one text line before that callback so the admitted card cannot move later. */
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-study-review-place="today"]) :is(#main,#cc-seed-main) .cc-progress-line { min-height:20px; }
/* Set by ccFitCard: long card text shrinks to the card rather than scrolling, since swipes grade. */
#bw-study-frame#bw-study-frame .cc-page[data-study-review]:is([data-study-review-place="today"],[data-cc-view="study"]) :is(#study-card,#cc-seed-study-card) > * { zoom:var(--cc-fit,1); }

/* Read-only future flashcards: intentionally distinct from the actionable due queue. */
.cc-page #cc-upcoming-reviews:not([hidden]){
  display:block;width:100%;box-sizing:border-box;margin:20px auto 4px;
  padding:clamp(16px,3vw,24px);border:1px solid var(--study-line,#c9bfd5);
  border-radius:var(--study-panel-radius,14px);background:var(--study-raise,#fff);
  color:var(--study-ink,#30253b);
}
.cc-page .cc-upcoming-heading h2{font-size:clamp(1.2rem,2vw,1.5rem);font-weight:650;margin:0 0 6px;color:inherit;}
.cc-page .cc-upcoming-heading p,.cc-page #cc-upcoming-status{font-size:.92rem;line-height:1.5;margin:0 0 12px;color:var(--study-ink-3,#61566b);}
.cc-page .cc-upcoming-list{list-style:none;padding:0;margin:4px 0 12px;display:grid;gap:0;}
.cc-page .cc-upcoming-list li{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:11px 0;border-top:1px solid var(--study-line,#d9d1df);min-width:0;}
.cc-page .cc-upcoming-list strong{font-size:.94rem;font-weight:550;line-height:1.45;overflow-wrap:anywhere;color:var(--study-ink,#30253b);}
.cc-page .cc-upcoming-list time{font-size:.86rem;white-space:nowrap;color:var(--study-ink-3,#61566b);font-variant-numeric:tabular-nums;}
.cc-page .cc-upcoming-actions{display:flex;flex-wrap:wrap;gap:8px;}
.cc-page .cc-upcoming-actions button{min-height:44px;padding:9px 14px;border-radius:10px;border:1px solid var(--study-line,#ac9bc0);background:var(--study-raise,#fff);color:var(--study-ink,#30253b);font:inherit;cursor:pointer;}
.cc-page .cc-upcoming-actions button:focus-visible{outline:3px solid var(--study-accent,#8758bc);outline-offset:3px;}
@media(max-width:540px){.cc-page .cc-upcoming-list li{flex-direction:column;align-items:flex-start;gap:3px}.cc-page #cc-upcoming-reviews:not([hidden]){margin:14px 0 0;}}

/* A286 / Card Review: one cohesive card, independent of Today's inline review.
   The controller moves the *original* Reveal/grade buttons into this dock only
   on Decks. Theme tokens and motion preferences remain authoritative. */
.cc-page .cc-concept-label { display:none; }
html body .cc-page .cc-page-settings {
  display:inline-grid; place-items:center; flex:0 0 44px; width:44px; height:44px;
  box-sizing:border-box; margin:0; padding:10px; border:1px solid var(--study-line-strong,rgba(127,127,127,.22))!important;
  border-radius:12px!important; background:var(--study-surface,transparent)!important;
  color:var(--study-ink-2,currentColor)!important; box-shadow:none!important; cursor:pointer;
}
html body .cc-page .cc-page-settings svg { width:20px; height:20px; }
html body .cc-page .cc-page-settings:is(:hover,[aria-expanded="true"]) { border-color:var(--study-accent)!important; color:var(--study-accent)!important; }
html body .cc-page .cc-page-settings:focus-visible { outline:3px solid var(--study-accent); outline-offset:3px; }
#bw-study-frame .cc-page[data-study-review]:not([data-cc-prototype]) .cc-page-settings { display:none!important; }
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-head { align-items:center; }
#bw-study-frame .cc-page[data-cc-prototype] .cc-concept-label {
  display:block; margin:4px 0 0; padding:0;
  color:var(--study-ink-3); font:500 13px/1.5 var(--study-font-body,system-ui,sans-serif);
}
#bw-study-frame .cc-page[data-cc-prototype] #study-card {
  height:auto!important; max-height:none!important; min-height:0!important;
  justify-content:flex-start; overflow:visible; cursor:default;
}
#bw-study-frame .cc-page[data-cc-prototype] #study-card .card-clue {
  padding-top:18px!important; padding-bottom:24px!important;
  line-height:1.48; font-weight:500; overflow-wrap:anywhere;
}
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions {
  display:flex; flex-direction:column; gap:0; width:100%;
  box-sizing:border-box; margin-top:10px; padding:0;
  border:0; zoom:1!important;
}
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions[hidden] { display:none!important; }
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions #reveal-button {
  display:flex; justify-content:center; align-items:center; min-height:54px;
  width:100%!important; min-width:0; margin:0;
  border-radius:12px!important; font-size:16px; font-weight:600;
}
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions #reveal-button[hidden],
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions .grade-controls[hidden] { display:none!important; }
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions .grade-controls {
  display:grid!important; grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px; width:100%; min-width:0; margin:0;
}
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions .grade-btn {
  box-sizing:border-box; min-width:0; min-height:58px; width:100%;
  padding:8px 2px; border-radius:12px!important; line-height:1.2;
  font-size:clamp(12px,3.2vw,14px); white-space:nowrap;
}
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions .grade-btn small {
  display:block!important; margin-top:5px; line-height:1.1;
  font-size:clamp(10px,2.7vw,12px)!important; white-space:nowrap;
}
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-pagination {
  display:flex!important; flex-direction:row; align-items:center; justify-content:space-between;
  width:100%; min-width:0; margin:0; padding:0 3px;
}
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-pagination[hidden] { display:none!important; }
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-pagination #prev-button,
#bw-study-frame .cc-page[data-cc-prototype] .cc-review-pagination #next-button {
  flex:0 0 auto; width:auto; min-width:44px; min-height:44px;
  font-size:14px; font-weight:500;
}
#bw-study-frame .cc-page[data-cc-prototype] .cc-engine-feedback:has(> button:not([hidden])) {
  margin-top:12px; margin-bottom:10px; padding:14px;
}
#bw-study-frame .cc-page[data-cc-prototype] #cc-more > summary { justify-content:space-between; }
@media (max-width:480px) {
  #bw-study-frame .cc-page[data-cc-prototype] #study-card { padding:20px 18px!important; }
  #bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions { padding:0; }
  #bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions .grade-controls { gap:5px; }
  #bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions .grade-btn { min-height:60px; padding:8px 1px; }
}
@media (prefers-reduced-motion:reduce) {
  #bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions,
  #bw-study-frame .cc-page[data-cc-prototype] .cc-review-inline-actions .grade-btn { animation:none!important; transition:none!important; }
}

/* The active Decks view inherits a focus-mode `data-cc-view="study"` alias;
   bring back its real page header and natural order for Card Review. */
html body #bw-study-frame#bw-study-frame#bw-study-frame#bw-study-frame .cc-page[data-cc-prototype] .page > .cc-review-head {
  display:flex!important; align-items:center; justify-content:space-between;
  max-width:var(--study-read); margin:0 auto 8px!important;
  padding:0!important;
}
html body #bw-study-frame#bw-study-frame#bw-study-frame#bw-study-frame .cc-page[data-cc-prototype] .page > #cc-exam-bar {
  display:grid!important; grid-template-columns:minmax(0,1fr);
  max-width:var(--study-read); margin:0 auto 12px!important;
  padding:0!important; color:var(--study-ink-3)!important;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-cc-prototype] .workspace > .bw-study-flashcard {
  order:0!important;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-cc-prototype] .workspace > .chain-rush {
  order:10!important; margin-top:2px;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-cc-prototype] .page > .cc-review-head + #cc-exam-bar .cc-exam-link { color:var(--study-accent)!important; }
html body #bw-study-frame#bw-study-frame .cc-page[data-cc-prototype] .cc-review-head .cc-review-title {
  color:var(--study-ink)!important; font-size:clamp(28px,4.5vw,38px)!important; line-height:1.15;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-cc-prototype] .cc-review-head .cc-review-kicker {
  color:var(--study-ink-3)!important;
}
@media(max-width:580px){
  html body #bw-study-frame#bw-study-frame .cc-page[data-cc-prototype] .page > :is(.cc-review-head,#cc-exam-bar) {
    width:calc(100% - 32px); max-width:none;
  }
}

/* The standalone 390px review frame sits at viewport y=0 while the shared
   mobile header is fixed above it (73px in the current shell). Reserve that
   space so Card Review settings are tappable instead of under the menu icon. */
@media(max-width:580px){
  html body #bw-study-frame#bw-study-frame#bw-study-frame#bw-study-frame .cc-page[data-cc-prototype] .page > .cc-review-head {
    padding-top:calc(76px + env(safe-area-inset-top,0px))!important;
  }
}

/* A286 account-owned exam: retain the internal pathway value for the library
   controller but never expose an exam chooser on Cluecards (including Home,
   the expanded deck finder or the mounted review). Account settings owns it. */
.cc-page .cc-pathway-native,
.cc-page #cc-pathway { display:none!important; }


/* A Rounds visit is a card-first reading surface. All counts and answer/rating
   controls remain owned by the canonical review controller, not a warm-up. */
#bw-study-frame .cc-page[data-study-review-place="rounds"] :is(.study-review-controls,.study-review-focus,.study-review-focus-bar,.study-review-exam,.study-review-sources,.mode-controls,.cc-review-head,.cc-study-nav,.cc-more,.study-review-deck-name,.study-review-hint,.study-review-also-due) {display:none!important}
#bw-study-frame .cc-page[data-study-review-place="rounds"] .zone-title {margin-bottom:var(--study-space-2)}
#bw-study-frame .cc-page[data-study-review-place="rounds"] .study-review-progress-line {margin-block:0 var(--study-space-2)}


/* Rounds has exactly one heading and the canonical Card N of N line, not
   Today's focus bar, deck selector, or an account/exam explanation. */
#bw-study-frame .cc-page[data-study-review-place="rounds"] .cc-review-head {
  display:flex!important;
  align-items:flex-start;
  width:min(var(--study-column),calc(100% - 64px));
  max-width:var(--study-read);
  margin:var(--study-space-4) auto var(--study-space-2);
  padding:0;
}
#bw-study-frame .cc-page[data-study-review-place="rounds"] .cc-review-title {
  font-family:var(--study-font-display);
  font-size:var(--study-title-size);
  font-weight:500;
  line-height:var(--study-title-line);
}
#bw-study-frame .cc-page[data-study-review-place="rounds"] :is(.cc-review-kicker,.cc-exam-bar,.study-review-focusbar) {display:none!important}
#bw-study-frame .cc-page[data-study-review-place="rounds"] .study-review-progress-line {
  display:flex!important;
  margin:0 auto var(--study-space-2);
}

/* Older Deck review styles use doubled frame IDs and an id selector to force
   the exam banner on and the spoken progress off. Rounds explicitly overrides
   those two rules: one visible title, one visible Card N of N, then the card. */
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review][data-study-review-place="rounds"] :is(#cc-exam-bar,#cc-seed-cc-exam-bar) {
  display:none!important;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review][data-study-review-place="rounds"] #cc-study-progress {
  display:block!important;
  position:static!important;
  width:auto!important;
  height:auto!important;
  min-width:0;
  overflow:visible!important;
  clip:auto!important;
  clip-path:none!important;
  white-space:normal!important;
}

/* 2026-11-08: the public Review selector is three source modes, not the old
   deck taxonomy. It stays visible above the prompt (including Rounds and Today),
   with 44px+ touch targets and complete count labels on a 390px phone. */
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-mode-selector {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  width:100%;max-width:var(--study-column,720px);box-sizing:border-box;
  gap:8px;margin:0 auto 8px;padding:0 12px;
  align-items:stretch;position:relative;z-index:2;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-mode-selector button {
  display:flex!important;flex-direction:column;align-items:center;justify-content:center;
  flex:1 1 0;min-width:0!important;width:100%;min-height:52px;
  gap:2px;padding:5px 4px;box-sizing:border-box;text-align:center;
  white-space:normal!important;line-height:1.22;font-size:12px!important;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-mode-selector .study-review-source-name {
  display:block;overflow-wrap:normal;font-weight:600;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-mode-selector .study-review-source-count {
  display:block;font-size:11px;font-variant-numeric:tabular-nums;opacity:.8;
}
/* The new canonical Mixed / Cards / Questions source selector remains authoritative,
   but standalone Card Review still needs the collection sheet and session filters.
   Keep these controls out of Today and Rounds; do not suppress the prototype. */
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-deck,
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review]:not([data-cc-prototype]) :is(.mode-controls,.cc-collection) {
  display:none!important;
}
html body #bw-study-frame .cc-page[data-cc-prototype] .study-review-controls .cc-sheet-browse {
  display:flex; align-items:center; justify-content:space-between; width:100%; min-height:48px;
  padding:10px 14px; border:1px solid var(--study-line-strong); border-radius:14px;
  background:var(--study-accent-wash); color:var(--study-ink); font:inherit;
  font-size:14px; font-weight:600; cursor:pointer;
}
html body #bw-study-frame .cc-page[data-cc-prototype] .study-review-controls .cc-sheet-browse:focus-visible {
  outline:3px solid var(--study-accent); outline-offset:2px;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-mode-selector button:focus-visible {
  outline:3px solid var(--study-accent);outline-offset:2px;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review] .cc-question-retry-ratings {
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:6px 0 10px;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review] .cc-question-retry-rate {
  min-width:0;min-height:44px;padding:8px 4px;border:1px solid var(--study-border, #999);
  border-radius:8px;background:transparent;color:inherit;font:inherit;font-size:13px;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-study-review] .cc-question-retry-rate:focus-visible {
  outline:3px solid var(--study-accent);outline-offset:2px;
}

/* Word-sized card-review disclosure. Saved preference controls initial state. */
#study-card #cc-card-explanation { margin:12px 0 0; }
#study-card #cc-card-explanation[hidden] { display:none!important; }
#study-card #cc-card-explanation > summary {
  width:max-content;max-width:100%;padding-right:6px;
  color:var(--sc-accent,var(--study-accent));
  font:600 14px/1.4 "Space Grotesk",system-ui,sans-serif;
}
#study-card #cc-card-explanation > summary::after { margin-left:10px; }
#study-card #cc-card-explanation > .explain-text { margin-top:8px; }

/* Compact numeric allowance stays a usable 100px touch target on Decks, too. */
#bw-study-frame .cc-page[data-study-review] .study-review-card-policy select {
  min-width:100px;
}
/* New-card policy controls remain readable in a narrow 390 px Review sheet. */
@media (max-width:430px) {
  #bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-sheet-body .study-review-card-policy {
    flex-wrap:wrap!important; align-items:flex-start!important; padding:10px 12px!important;
  }
  #bw-study-frame#bw-study-frame .cc-page[data-study-review] .study-review-sheet-body .study-review-card-policy select {
    width:100%!important; min-width:0!important; max-width:100%!important; box-sizing:border-box!important;
  }
}

/* Decks keeps its Review card and opens the existing grouped multi-deck
   library in a reachable modal at every viewport width. */
#bw-study-frame .cc-page[data-study-review-place="decks"] .study-review-choose-decks {
  flex:0 0 auto;
  min-height:44px;
  padding:8px 12px;
  border:1px solid var(--study-line-strong);
  border-radius:10px;
  background:var(--study-accent-wash);
  color:var(--study-ink);
  font:600 13px/1.25 var(--study-font-body);
  cursor:pointer;
}
#bw-study-frame .cc-page[data-study-review-place="decks"] .study-review-choose-decks:focus-visible {
  outline:2px solid var(--study-accent);
  outline-offset:2px;
}
@media (max-width:430px) {
 #bw-study-frame .cc-page[data-study-review-place="decks"] .study-review-choose-decks {padding:8px 10px;font-size:12px}
}

/* Full explanations scroll independently; the original content and credits remain intact. */
html body #bw-study-frame .cc-page[data-study-review] #study-card #cc-card-explanation > .explain-text {
  max-height:min(var(--cc-explanation-space,34dvh),22rem);
  overflow:auto; overscroll-behavior:contain; touch-action:pan-y;
  scrollbar-gutter:stable; padding:4px 10px 8px 0;
  -webkit-line-clamp:unset; line-clamp:unset; mask-image:none; -webkit-mask-image:none;
}
html body #bw-study-frame .cc-page[data-study-review] #study-card #cc-card-explanation > .explain-text:focus-visible {
  outline:2px solid var(--study-accent); outline-offset:3px; border-radius:4px;
}
html body #bw-study-frame#bw-study-frame .cc-page[data-cc-prototype] .workspace > .cc-review-inline-actions {
  order:0!important; flex:none; width:100%;
}
html body #bw-study-frame .cc-page[data-study-review] .study-review-sheet-head {
  position:sticky;top:0;z-index:2;background:var(--sheet-bg,var(--study-surface));
}
/* One compact deck browser: search, systems, then secondary session settings. */
html body #bw-study-frame .cc-page #cc-picker-dialog {
  width:min(48rem,calc(100vw - 24px)); max-height:calc(100dvh - 32px);
  padding:0; border:1px solid var(--study-line-strong); border-radius:18px;
  background:var(--study-surface);color:var(--study-ink);overflow:auto;
}
html body #bw-study-frame .cc-page #cc-picker-dialog .cc-picker-head {
  position:sticky;top:0;z-index:3;display:flex;align-items:flex-start;gap:16px;
  padding:18px 20px;background:var(--study-surface);border-bottom:1px solid var(--study-line);
}
html body #bw-study-frame .cc-page #cc-picker-dialog .cc-picker-head h2 {margin:0 0 6px;font-size:1.35rem;}
html body #bw-study-frame .cc-page #cc-picker-dialog .cc-picker-head p {margin:0;color:var(--study-ink-3);font-size:.9rem;line-height:1.45;}
html body #bw-study-frame .cc-page #cc-picker-dialog #cc-close-picker {margin-left:auto;flex:0 0 44px;min-width:44px;min-height:44px;}
html body #bw-study-frame .cc-page #cc-picker-dialog #cc-picker-slot {padding:0 18px 18px;}
html body #bw-study-frame .cc-page #cc-picker-dialog .library-title {display:none;}
html body #bw-study-frame .cc-page #cc-picker-dialog .library-head {padding:16px 0 12px;gap:12px;}
html body #bw-study-frame .cc-page #cc-picker-dialog .cc-library-options {margin:0;border:0;}
html body #bw-study-frame .cc-page #cc-picker-dialog .cc-library-options > summary {min-height:44px;font-size:.9rem;}
html body #bw-study-frame .cc-page #cc-picker-dialog .search,
html body #bw-study-frame .cc-page #cc-picker-dialog #system-filter {width:100%;min-height:44px;box-sizing:border-box;}
html body #bw-study-frame .cc-page #cc-picker-dialog .pick-bar {
  position:sticky;bottom:-18px;z-index:2;display:flex;flex-wrap:wrap;gap:10px;
  padding:14px 0;background:var(--study-surface);border-top:1px solid var(--study-line);
}

/* The shared card's controls move to the rating row; its hidden source link
   must not reserve a second empty controls area above that row. */
html body #bw-study-frame .cc-page[data-cc-prototype] .bw-study-flashcard > .bw-study-controls:not(:has(> :not([hidden]):not(.cc-undo-tools), > .cc-undo-tools > :not([hidden]))) {
  display:none!important;
}
