/* Collapsible hover-expand sidebar, adapted from the SessionNavBar reference. */
:root {
  --sb-w-closed: 52px;
  --sb-w-open: 240px;
}
#study-sidebar {
  --sb-line: #e6e8ee;
  --sb-ink: #3f4756;
  --sb-muted: #6b7280;
  --sb-hover: #f3f4f6;
  --sb-active-bg: #e8f0fe;
  --sb-active-ink: #1a56db;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sb-w-closed);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--sb-line);
  color: var(--sb-ink);
  transition: width .2s ease-out, box-shadow .2s ease-out, transform .3s ease, visibility .3s ease;
}
.sb-top {
  flex: none;
  display: flex;
  align-items: center;
  height: 54px;
  padding: 8px;
  border-bottom: 1px solid var(--sb-line);
}
.sb-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  scrollbar-width: thin;
}
.sb-bottom {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-top: 1px solid var(--sb-line);
}
.sb-group { display: flex; flex-direction: column; gap: 2px; }
.sb-group-trigger { display: none; }
.sb-quick { display: none; }
.sb-fly { display: contents; }
.sb-fly-head { display: none; }
.sb-sep { flex: none; height: 1px; margin: 6px 8px; background: var(--sb-line); }

.sb-menu { position: relative; }
.sb-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.sb-trigger:hover { background: var(--sb-hover); }
.sb-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #e5e7eb;
  color: #374151;
  font-size: 11px;
  font-weight: 600;
}
.sb-avatar-org { background: #1f2937; color: #fff; }
.sb-avatar-lg { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
.sb-chev { flex: none; width: 14px; height: 14px; margin-left: auto; color: #9ca3af; opacity: 0; transition: opacity .15s; }

.sb-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sb-ink);
  font: inherit;
  font-size: .875rem;
  text-decoration: none;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.sb-item:hover { background: var(--sb-hover); color: #111827; }
.sb-item[aria-current="page"] { background: var(--sb-active-bg); color: var(--sb-active-ink); font-weight: 600; }
.sb-glyph { flex: none; width: 18px; height: 18px; }
.sb-label {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 500;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .18s ease-out, transform .18s ease-out;
}
.sb-grow { flex: 1; }
.sb-badge {
  flex: none;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: none;
}
.sb-badge-warn { background: #fdecea; color: #b42318; }
.sb-badge-blue { background: #e8f0fe; color: #1a56db; }

body.menu-open #study-sidebar .sb-item { justify-content: flex-start; }
body.menu-open #study-sidebar .sb-label { opacity: 1; transform: none; }
body.menu-open #study-sidebar .sb-chev { opacity: 1; }
body.menu-open #study-sidebar .sb-badge { display: inline-block; }

.sb-pop {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: calc(100% + 10px);
  min-width: 216px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--sb-line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
}
body.menu-open #study-sidebar .sb-pop { left: 8px; }
.sb-pop-up { top: auto; bottom: calc(100% + 6px); }
body.menu-open #study-sidebar .sb-pop-up { bottom: calc(100% + 6px); }
.sb-pop a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #374151;
  font-size: .875rem;
  text-decoration: none;
  transition: background .15s;
}
.sb-pop a:hover { background: var(--sb-hover); }
.sb-pop .sb-glyph { width: 16px; height: 16px; }
.sb-pop .sb-sep { margin: 4px 6px; }
.sb-pop-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.sb-pop-id { min-width: 0; }
.sb-pop-id strong { display: block; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-pop-id small { display: block; color: var(--sb-muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Desktop-only extras inside the top account pop (phone/tablet keep the bottom account menu). */
.sb-pop .sb-desktop-only { display: none; }
@media (min-width: 1024px) {
  .sb-pop .sb-desktop-only { display: flex; }
  .sb-pop .sb-sep.sb-desktop-only { display: block; }
}

.sidebar-close { display: none; position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #eef1f5; color: #213855; font-size: 24px; line-height: 1; cursor: pointer; }
.mobile-bar, .menu-shade { display: none; }
body[data-course="landing"] :is(#study-sidebar, .mobile-bar) { display: none; }
body:not([data-course]) :is(#study-sidebar, .mobile-bar) { display: none; }

@media (min-width: 1024px) {
  body[data-course]:not([data-course="landing"]) .shell { padding-left: var(--sb-w-closed); }
}
@media (max-width: 1023px) {
  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    padding: 4px 16px;
    background: rgba(248, 250, 253, .84);
    border-bottom: 1px solid rgba(255, 255, 255, .7);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
  }
  .mobile-bar button, .mobile-bar a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; border: 0; background: transparent; text-decoration: none; color: #213855; }
  .mobile-bar button { font-size: 1rem; }
  #study-sidebar {
    top: 12px;
    bottom: 12px;
    width: min(300px, 82vw);
    padding-top: 52px;
    visibility: hidden;
    transform: translateX(calc(-100% - 16px));
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 20px;
    box-shadow: 0 24px 64px #12223a3d;
    z-index: 100;
  }
  body.menu-open #study-sidebar { visibility: visible; transform: none; }
  body.menu-open .sidebar-close { display: block; }
  body.menu-open .menu-shade:not([hidden]) { position: fixed; inset: 0; display: block; z-index: 90; background: #12223a3d; }
  .menu-open { overflow: hidden; }
  .sb-pop { left: 8px; }
}
body.reduce-motion #study-sidebar,
body.reduce-motion #study-sidebar * { transition-duration: 0s !important; }

.sb-avatar-slot { flex: none; display: inline-flex; }
.sb-avatar-slot:empty::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(140deg, #9aa4b2, #c9d0da); }
#sb-pop-avatar:empty::before { width: 28px; height: 28px; }
.sb-top .sb-menu { flex: 1; min-width: 0; }
.sb-user-menu { display: flex; align-items: center; gap: 2px; }
.sb-user-main { width: auto; flex: 1; min-width: 0; }
.sb-user-main .sb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-chev-btn { display: none; flex: none; width: 26px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #9ca3af; cursor: pointer; place-items: center; }
.sb-chev-btn:hover { background: var(--sb-hover); }
.sb-chev-btn .sb-chev { margin-left: 0; opacity: 1; }
body.sidebar-open .sb-chev-btn,
body.sidebar-pinned .sb-chev-btn,
body.menu-open .sb-chev-btn { display: grid; }

.u-avatar { flex: none; display: block; position: relative; width: 20px; height: 20px; border-radius: 50%; overflow: hidden; background: linear-gradient(140deg, var(--av-a, #2f7d5b), var(--av-b, #7fc9a0)); color: #fff; }
.u-avatar::before { content: ""; position: absolute; inset: 0; z-index: 0; }
.u-avatar > svg { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.u-avatar[data-bg="burst"]::before { background: repeating-conic-gradient(from 9deg, rgba(255, 255, 255, .18) 0 11deg, rgba(255, 255, 255, 0) 11deg 34deg); }
.u-avatar[data-bg="dots"]::before { background: radial-gradient(rgba(255, 255, 255, .24) 1px, transparent 1.4px) 0 0 / 7px 7px; }
.u-avatar[data-bg="rings"]::before { background: radial-gradient(circle at 30% 28%, transparent 28%, rgba(255, 255, 255, .16) 30% 33%, transparent 35% 47%, rgba(255, 255, 255, .12) 49% 52%, transparent 54% 66%, rgba(255, 255, 255, .09) 68% 71%, transparent 73%); }
.u-avatar[data-bg="stripes"]::before { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .14) 0 3px, transparent 3px 8px); }
.u-avatar-lg { width: 28px; height: 28px; }

/* Phone: full-screen frosted menu, site light palette. Tablet/desktop keep the rail/drawer above. */
@media (max-width: 767px) {
  #study-sidebar {
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: calc(8px + env(safe-area-inset-top)) 0 calc(8px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: linear-gradient(168deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .62));
    -webkit-backdrop-filter: blur(0px) saturate(1);
    backdrop-filter: blur(0px) saturate(1);
    box-shadow: none;
    color: #3f4756;
    z-index: 120;
    visibility: hidden;
    opacity: 0;
    transform: scale(.985) translateY(10px);
    transform-origin: 50% 42%;
    transition: opacity .22s ease, transform .3s cubic-bezier(.2, .9, .3, 1), visibility .3s ease, backdrop-filter .3s ease, -webkit-backdrop-filter .3s ease;
  }
  body.menu-open #study-sidebar {
    visibility: visible;
    opacity: 1;
    transform: none;
    -webkit-backdrop-filter: blur(28px) saturate(1.35);
    backdrop-filter: blur(28px) saturate(1.35);
  }
  body.menu-open .menu-shade { display: none !important; }
  #study-sidebar .sidebar-close {
    display: block;
    top: calc(10px + env(safe-area-inset-top));
    right: 14px;
    width: 40px;
    height: 40px;
    background: #eef1f5;
    color: #213855;
    font-size: 26px;
  }
  #study-sidebar .sb-top {
    height: 60px;
    padding: 8px 60px 8px 18px;
    border-bottom: 0;
  }
  #study-sidebar .sb-user-main { min-height: 44px; font-size: 17px; color: #213855; }
  #study-sidebar .sb-user-main .sb-label { opacity: 1; transform: none; font-weight: 600; }
  #study-sidebar .sb-avatar-slot .u-avatar,
  #study-sidebar .sb-avatar-slot:empty::before { width: 32px; height: 32px; }
  #study-sidebar .sb-chev-btn { display: none; }
  #study-sidebar .sb-scroll { padding: 4px 14px 18px; gap: 0; scrollbar-width: none; -ms-overflow-style: none; }
  #study-sidebar .sb-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
  #study-sidebar .sb-group { gap: 2px; padding: 2px 0; }
  #study-sidebar .sb-group::before {
    content: attr(aria-label);
    padding: 18px 12px 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    color: #6b7280;
  }
  #study-sidebar .sb-group:first-child::before { padding-top: 6px; }
  #study-sidebar .sb-sep { margin: 8px 12px; background: rgba(63, 71, 86, .09); }
  #study-sidebar .sb-item {
    justify-content: flex-start;
    min-height: 54px;
    padding: 10px 12px;
    gap: 18px;
    border-radius: 14px;
    font-size: 19px;
    color: #3f4756;
  }
  #study-sidebar .sb-item .sb-label { opacity: 1; transform: none; font-weight: 500; }
  #study-sidebar .sb-item .sb-glyph { width: 25px; height: 25px; }
  #study-sidebar .sb-item:hover { background: rgba(255, 255, 255, .5); color: #111827; }
  #study-sidebar .sb-item[aria-current="page"] { background: rgba(255, 255, 255, .74); color: #1a56db; font-weight: 600; }
  #study-sidebar .sb-badge { display: inline-block; }
  #study-sidebar .sb-bottom {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(63, 71, 86, .09);
  }
  #study-sidebar .sb-bottom .sb-menu { order: 1; flex: 1; min-width: 0; }
  #study-sidebar .sb-bottom .sb-trigger { min-height: 48px; font-size: 16px; color: #213855; border-radius: 14px; }
  #study-sidebar .sb-bottom .sb-trigger .sb-label { opacity: 1; transform: none; }
  #study-sidebar .sb-bottom .sb-chev { display: none; }
  #study-sidebar .sb-bottom > .sb-item {
    order: 2;
    flex: none;
    width: 48px;
    height: 48px;
    min-height: 0;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .6);
  }
  body.menu-open #study-sidebar .sb-bottom > .sb-item,
  body.sidebar-open #study-sidebar .sb-bottom > .sb-item,
  body.sidebar-pinned #study-sidebar .sb-bottom > .sb-item {
    justify-content: center;
  }
  #study-sidebar .sb-bottom > .sb-item .sb-label { display: none; }
  #study-sidebar .sb-bottom > .sb-item .sb-glyph { width: 22px; height: 22px; }
  #study-sidebar .sb-pop {
    left: 10px;
    right: 10px;
    min-width: 0;
    background: rgba(255, 255, 255, .88);
    border-color: rgba(255, 255, 255, .85);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    backdrop-filter: blur(18px) saturate(1.25);
  }
  #study-sidebar .sb-pop-up { bottom: calc(100% + 8px); }
  #study-sidebar .sb-pop a { color: #374151; font-size: 16px; padding: 11px 12px; }
  #study-sidebar .sb-pop a:hover { background: #f3f4f6; }
  #study-sidebar .sb-pop .sb-sep { background: rgba(63, 71, 86, .09); }
  #study-sidebar .sb-pop-id strong { color: #213855; }
  #study-sidebar .sb-pop-id small { color: #6b7280; }
}
@media (max-width: 767px) and (prefers-reduced-transparency: reduce) {
  #study-sidebar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  #study-sidebar .sb-pop { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 767px) {
  /* Cover/login hide the sidebar by default; a right-swipe may still summon it. */
  body[data-course="landing"].menu-open #study-sidebar { display: flex; }
}

/* Desktop (>=1024px): two-level rail. Level 1 = fixed 60px icon rail (one icon per
   group); level 2 = frost flyout beside the rail. Content never shifts. */
@media (min-width: 1024px) {
  :root { --sb-w-closed: 60px; }
  #study-sidebar {
    width: var(--sb-w-closed);
    background: linear-gradient(168deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .62));
    -webkit-backdrop-filter: blur(28px) saturate(1.35);
    backdrop-filter: blur(28px) saturate(1.35);
    border-right: 1px solid rgba(255, 255, 255, .7);
    color: #3f4756;
  }
  body.sidebar-open #study-sidebar,
  body.sidebar-pinned #study-sidebar { width: var(--sb-w-closed); box-shadow: none; }

  #study-sidebar .sb-top { height: 60px; padding: 10px 0; justify-content: center; border-bottom: 1px solid rgba(63, 71, 86, .09); }
  #study-sidebar .sb-user-menu { justify-content: center; }
  #study-sidebar .sb-user-main { flex: none; width: 40px; min-height: 40px; padding: 0; justify-content: center; border-radius: 12px; color: #213855; }
  #study-sidebar .sb-user-main .sb-label { display: none; }
  #study-sidebar .sb-avatar-slot .u-avatar,
  #study-sidebar .sb-avatar-slot:empty::before { width: 28px; height: 28px; }
  #study-sidebar .sb-chev-btn { display: none; }

  #study-sidebar .sb-scroll { padding: 4px 0 14px; gap: 0; overflow: visible; scrollbar-width: none; -ms-overflow-style: none; }
  #study-sidebar .sb-group { position: relative; gap: 0; padding: 2px 0; }
  #study-sidebar .sb-group::before { display: none; }
  /* 图标与浮层之间 10px 的间隙由桥接层覆盖，鼠标穿隙时 :hover 不会断开 */
  #study-sidebar .sb-group::after { content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: 12px; }
  #study-sidebar .sb-sep { margin: 8px 14px; background: rgba(63, 71, 86, .09); }
  #study-sidebar .sb-group-trigger {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #3f4756;
    cursor: pointer;
    transition: background .15s, color .15s;
  }
  #study-sidebar .sb-group-trigger .sb-glyph { width: 20px; height: 20px; }
  #study-sidebar .sb-group-trigger:hover { background: rgba(255, 255, 255, .5); color: #111827; }
  #study-sidebar .sb-group-trigger.sb-active { background: rgba(255, 255, 255, .74); color: #1a56db; }

  #study-sidebar .sb-quick {
    display: grid;
    place-items: center;
    position: relative;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    border-radius: 12px;
    color: #3f4756;
    transition: background .15s, color .15s;
  }
  #study-sidebar .sb-quick[hidden] { display: none; }
  #study-sidebar .sb-quick .sb-glyph { width: 20px; height: 20px; }
  #study-sidebar .sb-quick:hover { background: rgba(255, 255, 255, .5); color: #111827; }
  #study-sidebar .sb-quick[aria-current="page"] { background: rgba(255, 255, 255, .74); color: #1a56db; }
  #study-sidebar .sb-quick .sb-badge { position: absolute; top: 1px; right: 1px; margin: 0; padding: 1px 4px; font-size: .62rem; }
  #study-sidebar .sb-quick::after {
    content: attr(data-tip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 61;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .85);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-size: .75rem;
    color: #3f4756;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s;
  }
  #study-sidebar .sb-quick:hover::after,
  #study-sidebar .sb-quick:focus-visible::after { opacity: 1; }
  #study-sidebar .sb-group[aria-label="个人"] { display: none; }
  #study-sidebar .sb-fly .sb-item[data-sb="courses"],
  #study-sidebar .sb-fly .sb-item[data-view="wrong"],
  #study-sidebar .sb-fly .sb-item[data-view="saved"],
  #study-sidebar .sb-fly .sb-item[data-view="progress"],
  #study-sidebar .sb-fly .sb-item[data-sb="review"],
  #study-sidebar .sb-fly .sb-item[data-sb="profile"] { display: none; }

  #study-sidebar .sb-fly {
    display: none;
    position: absolute;
    z-index: 60;
    top: -6px;
    left: calc(100% + 10px);
    min-width: 216px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: linear-gradient(168deg, #ffffff, #fbfcfe);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
    -webkit-backdrop-filter: blur(28px) saturate(1.35);
    backdrop-filter: blur(28px) saturate(1.35);
    scrollbar-width: none;
    -ms-overflow-style: none;
    transform: translateY(var(--fly-shift, 0px));
  }
  #study-sidebar .sb-fly::-webkit-scrollbar { display: none; width: 0; height: 0; }
  #study-sidebar .sb-group.fly-open .sb-fly { display: flex; }
  #study-sidebar .sb-group:hover .sb-fly,
  #study-sidebar .sb-group.fly-hold .sb-fly,
  #study-sidebar .sb-group:has(:focus-visible) .sb-fly { display: flex; }
  #study-sidebar .sb-fly-head { display: block; padding: 6px 10px 4px; font-size: .75rem; font-weight: 600; letter-spacing: .08em; color: #6b7280; }
  #study-sidebar .sb-fly .sb-item {
    justify-content: flex-start;
    min-height: 40px;
    padding: 9px 12px;
    gap: 12px;
    border-radius: 12px;
    font-size: .9375rem;
    color: #3f4756;
  }
  #study-sidebar .sb-fly .sb-item .sb-glyph { width: 20px; height: 20px; }
  #study-sidebar .sb-fly .sb-item:hover { background: rgba(63, 71, 86, .07); color: #111827; }
  #study-sidebar .sb-fly .sb-item[aria-current="page"] { background: rgba(255, 255, 255, .74); color: #1a56db; font-weight: 600; }
  #study-sidebar .sb-fly .sb-label { display: block; opacity: 1; transform: none; }
  #study-sidebar .sb-fly .sb-badge { display: inline-block; font-size: .7rem; }

  #study-sidebar .sb-bottom { padding: 10px 0; align-items: center; border-top: 1px solid rgba(63, 71, 86, .09); }
  #study-sidebar .sb-bottom .sb-menu { display: none; }
  #study-sidebar .sb-bottom > .sb-item { width: 40px; min-height: 40px; padding: 0; justify-content: center; border-radius: 12px; }
  #study-sidebar .sb-bottom > .sb-item .sb-label { display: none; }
  #study-sidebar .sb-bottom > .sb-item .sb-glyph { width: 20px; height: 20px; }

  #study-sidebar .sb-pop {
    min-width: 236px;
    padding: 8px;
    border-radius: 14px;
    background: linear-gradient(168deg, #ffffff, #fbfcfe);
    border-color: rgba(255, 255, 255, .7);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
    -webkit-backdrop-filter: blur(28px) saturate(1.35);
    backdrop-filter: blur(28px) saturate(1.35);
  }
  #study-sidebar .sb-pop a { padding: 9px 12px; border-radius: 12px; font-size: .9375rem; color: #374151; }
  #study-sidebar .sb-pop a:hover { background: rgba(63, 71, 86, .07); }
  #study-sidebar .sb-pop .sb-glyph { width: 18px; height: 18px; }
  #study-sidebar .sb-pop-head { padding: 8px 10px; }
  #study-sidebar .sb-pop-id strong { font-size: .9375rem; color: #213855; }
  #study-sidebar .sb-pop-id small { font-size: .78rem; color: #6b7280; }
}
@media (min-width: 1024px) and (prefers-reduced-transparency: reduce) {
  #study-sidebar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  #study-sidebar .sb-fly { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  #study-sidebar .sb-pop { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Phone: Frosted-Transition V5 layer rig. The wrapper carries the main page so it
   can scale about the viewport center while window scroll stays native. */
@media (max-width: 767px) {
  .ft-page { display: flex; flex-direction: column; flex: 1; min-width: 0; }
  body.ft-live { touch-action: pan-y; overscroll-behavior-x: none; }
  body.ft-live .ft-page { will-change: transform, filter, opacity; backface-visibility: hidden; }
  body.ft-live #study-sidebar {
    transition: none;
    transform-origin: 50% 50%;
    will-change: transform, filter, opacity;
  }
  body.ft-live .menu-shade {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 110;
    pointer-events: none;
    background: rgba(245, 245, 247, .52);
    opacity: 0;
  }
  body.ft-live #study-sidebar .sb-bottom { transform-origin: 50% 50%; will-change: transform, filter, opacity; }
  body.ft-live:not([data-course]) #study-sidebar,
  body.ft-live[data-course="landing"] #study-sidebar { display: flex; }
}
html[data-theme="dark"] body.ft-live .menu-shade { background: rgba(30, 30, 32, .52); }
