.map-page.study-shell-page {
  --study-navigation-space: var(--top-navigation-height, 84px);
  --study-available-height: calc(100dvh - var(--study-navigation-space));
  height: 100dvh; min-height: 0; padding: 0; overflow: hidden; overscroll-behavior: none;
  background: #010104;
}
.study-shell-page .app-shell { height: 100%; min-height: 0; overflow: clip; background: #010104; }
.study-shell-page .app-shell > .study-shell-workspace {
  position: relative; display: grid; width: 100%; max-width: none;
  height: calc(100dvh - var(--study-navigation-space)); min-height: 0; grid-template-rows: minmax(0, 1fr);
  margin: 0; padding: 0; overflow: clip; isolation: isolate;
}
.study-shell-stars { position: absolute; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.study-star-field, .study-star-hover-field {
  position: absolute; inset: 0;
  background: url("/static/web-v1/maps-stars.03e0cbad.svg") center 22% / max(100%, 1500px) auto repeat;
  transform: scaleX(-1);
}
.study-star-field { opacity: .45; filter: saturate(.4) brightness(1.28); }
.study-star-hover-field {
  opacity: 0; filter: brightness(2.55) saturate(.55) drop-shadow(0 0 3px rgb(186 218 255 / 66%));
  transition: opacity 180ms ease;
  /* The artwork is mirrored; compensate so illumination follows the pointer. */
  -webkit-mask-image: radial-gradient(circle 150px at calc(100% - var(--study-star-x, 50%)) var(--study-star-y, 38%), #000 0%, rgb(0 0 0 / 76%) 38%, transparent 100%);
  mask-image: radial-gradient(circle 150px at calc(100% - var(--study-star-x, 50%)) var(--study-star-y, 38%), #000 0%, rgb(0 0 0 / 76%) 38%, transparent 100%);
}
.study-shell-workspace.has-star-pointer .study-star-hover-field { opacity: .92; }
.study-shell-scene {
  --study-stage-gap: 76px;
  --study-book-top: clamp(105px, 18dvh, 225px);
  --study-book-height-limit: max(70px, calc((var(--study-available-height) * .64 - var(--study-book-top) - var(--study-stage-gap)) / 1.5));
  --study-book-width: min(14vw, 232px, var(--study-book-height-limit));
  --study-stage-height: calc(var(--study-book-top) + var(--study-book-width) * 1.5 + var(--study-stage-gap));
  position: relative; z-index: 1; display: flex; flex-direction: column;
  width: 100vw; height: 100%; min-height: 0;
  padding-top: var(--study-stage-height); overflow: clip;
  cursor: default; touch-action: manipulation; user-select: none;
}
.study-shell-heading {
  position: absolute; z-index: 20; top: clamp(32px, 4.5dvh, 60px); left: 50%;
  width: min(86vw, 1100px); text-align: center; transform: translateX(-50%);
}
.study-shell-heading h1 { width: min(49vw, 780px); margin: 0 auto; line-height: 1; }
.study-shell-heading img { display: block; width: 100%; height: auto; }
.study-shell-heading p {
  margin: clamp(18px, 1.8vw, 26px) 0 0;
  background: linear-gradient(90deg, #80e9e8 26%, #d3dff8 51%, #bf96ed 75%);
  background-clip: text; -webkit-background-clip: text; color: transparent;
  font-size: clamp(9px, .86vw, 13px); font-weight: 500; letter-spacing: .32em;
  line-height: 1.5; text-indent: .32em; text-transform: uppercase;
}
.study-book {
  --study-accent: #a693ff; --study-glow: 150 121 255; --study-progress: 0%;
  position: absolute; z-index: 3; top: var(--study-book-top); left: 50%;
  width: var(--study-book-width); aspect-ratio: 2 / 3; container-type: inline-size;
  transform: translateX(-50%); transform-origin: 50% 60%;
  border: 1px solid rgb(var(--study-glow) / 48%); border-radius: 17px;
  background: #02060d; box-shadow: inset 0 0 25px rgb(var(--study-glow) / 5%);
  will-change: transform, opacity; overflow: hidden;
}
.study-book:not([data-position="0"]) { opacity: 0; }
.study-book[data-subject="arithmetic"] { --study-accent: #e7cc91; --study-glow: 211 183 112; }
.study-book[data-subject="algebra"] { --study-accent: #85d8ff; --study-glow: 75 189 255; }
.study-book[data-subject="trigonometry"] { --study-accent: #c5a2ff; --study-glow: 164 121 255; }
.study-book[data-subject="calculus"] { --study-accent: #afbfff; --study-glow: 146 158 245; }
.study-book[data-subject="linear-algebra"] { --study-accent: #8ee0df; --study-glow: 74 191 209; }
.study-book[data-subject="differential-equations"] { --study-accent: #88cfff; --study-glow: 77 165 239; }
.study-book[data-subject="complex-analysis"] { --study-accent: #d3b0ff; --study-glow: 182 136 242; }
.study-book[data-subject="real-analysis"] { --study-accent: #8bcff0; --study-glow: 80 171 225; }
.study-book[data-subject="abstract-algebra"] { --study-accent: #c3adff; --study-glow: 159 125 230; }
.study-book[data-subject="topology"] { --study-accent: #9adee0; --study-glow: 90 195 199; }
.study-book[data-subject="number-theory"] { --study-accent: #dbd29d; --study-glow: 188 180 105; }
.study-book[data-subject="probability-statistics"] { --study-accent: #90d8ea; --study-glow: 90 184 221; }
.study-book[data-subject="mathematical-physics"] { --study-accent: #9fb6ff; --study-glow: 118 150 244; }
.study-book[aria-current="true"] {
  border-color: var(--study-accent);
  box-shadow: 0 0 0 1px rgb(var(--study-glow) / 24%), 0 0 22px rgb(var(--study-glow) / 24%), 0 0 65px rgb(var(--study-glow) / 9%), inset 0 0 20px rgb(var(--study-glow) / 8%);
}
.study-portal-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.study-portal-copy {
  position: absolute; inset: auto 0 0; padding: 15cqw 8cqw 9cqw; text-align: center;
  background: linear-gradient(transparent, rgb(1 5 12 / 86%) 28%, #02060d 86%); pointer-events: none;
}
.study-portal-title { margin: 0; color: #edf3ff; font-size: 7cqw; font-weight: 450; letter-spacing: .115em; line-height: 1.4; text-transform: uppercase; }
.study-portal-caption { min-height: 3.2em; margin: 3.5cqw 0 6cqw; color: #b2c2da; font-size: 4.15cqw; font-weight: 450; letter-spacing: .15em; line-height: 1.6; text-transform: uppercase; }
.study-portal-progress { display: flex; align-items: center; gap: 5cqw; }
.study-portal-progress-track { height: 2.4cqw; flex: 1; border-radius: 5px; overflow: hidden; background: #232b40; }
.study-portal-progress-track::after { display: block; width: var(--study-progress); height: 100%; border-radius: inherit; background: var(--study-accent); content: ""; }
.study-portal-progress-value { color: #d8e5fa; font-size: 4.5cqw; font-weight: 400; }
.study-book-pick, .study-book-open { position: absolute; z-index: 10; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; cursor: pointer; }
.study-book-open { display: none; }
.study-book[aria-current="true"]:has(.study-book-open) .study-book-pick { display: none; }
.study-book[aria-current="true"] .study-book-open { display: block; }
.study-book:hover:not([aria-current="true"]) { border-color: var(--study-accent); }
.study-shell-ground {
  position: absolute; z-index: 0; top: calc(var(--study-book-top) + var(--study-book-width) * 1.5 - 32px);
  left: 50%; width: min(76vw, 1200px); height: 78px; overflow: visible;
  transform: translateX(-50%); pointer-events: none; opacity: .7;
}
.study-shell-arrow {
  position: absolute; z-index: 30; top: calc(var(--study-book-top) + var(--study-book-width) * .78);
  display: grid; width: clamp(42px, 3.2vw, 52px); aspect-ratio: 1; place-items: center;
  padding: 0; border: 1px solid rgb(172 131 225 / 75%); border-radius: 50%;
  background: rgb(1 1 5 / 82%); color: #f2f0f2; cursor: pointer; transform: translate(-50%, -50%);
}
.study-shell-arrow:hover { border-color: #a5e3ff; color: #b5e9ff; box-shadow: 0 0 22px rgb(104 163 240 / 22%); }
.study-shell-arrow-prev { left: 2.5%; }
.study-shell-arrow-next { left: 97.5%; }
.study-shell-arrow svg { width: 36%; height: 36%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.study-shell-dots {
  position: absolute; z-index: 30; top: calc(var(--study-stage-height) - 26px); left: 50%;
  display: flex; align-items: center; justify-content: center; width: min(calc(100vw - 24px), 390px); height: 44px;
  transform: translate(-50%, -50%);
}
.study-shell-dots button { position: relative; display: grid; flex: 1; min-width: 0; height: 44px; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.study-shell-dots button::before { width: 8px; aspect-ratio: 1; border-radius: 50%; background: #3d4862; content: ""; }
.study-shell-dots button[aria-current="true"]::before { background: #b0edff; box-shadow: 0 0 14px #4ac9ff; transform: scale(1.18); }
.study-shell-arrow:focus-visible, .study-shell-dots button:focus-visible { outline: 2px solid #b0dbff; outline-offset: 4px; }
.study-book-open:focus-visible, .study-book-pick:focus-visible { outline: 2px solid #daf4ff; outline-offset: -5px; }
.study-chapter-panel {
  position: relative; z-index: 20; display: flex; flex-direction: column; flex: 1; width: calc(100% - 24px); min-height: 0;
  margin: 0 12px 14px; padding: 25px clamp(24px, 2.6vw, 60px) 28px;
  border: 1px solid rgb(117 162 210 / 38%); border-radius: 19px; overflow: hidden;
  background: linear-gradient(110deg, rgb(5 12 23 / 96%), rgb(3 8 16 / 94%));
  box-shadow: inset 0 1px 0 rgb(133 184 255 / 9%), 0 0 25px rgb(68 110 171 / 6%);
  user-select: text; isolation: isolate;
}
.study-chapter-panel::before {
  position: absolute; z-index: -1; inset: 0; pointer-events: none; content: "";
  background: url("/static/web-v1/maps-stars.03e0cbad.svg") center / max(100%, 1500px) auto repeat;
  opacity: .2; filter: saturate(.2);
}
.study-chapter-header { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.study-chapter-eyebrow {
  margin: 0; color: #dae3f4; font-family: "Avenir Next", Avenir, sans-serif; font-size: clamp(20px, 1.6vw, 30px);
  font-weight: 400; letter-spacing: .34em; line-height: 1.35; text-transform: uppercase;
}
.study-chapter-subtitle { margin: 5px 0 0; color: #74b9e1; font-size: 10px; font-weight: 600; letter-spacing: .29em; line-height: 1.4; text-transform: uppercase; }
.study-chapter-count { flex-shrink: 0; margin: 0; color: #91a8c4; font-size: 12px; letter-spacing: .035em; }
.study-chapter-list {
  flex: 1; min-height: 0; display: grid; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 9px;
  list-style: none; margin: -5px; padding: 5px; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin;
  scrollbar-color: #58718e transparent;
}
.study-chapter-list:focus-visible { outline: 1px solid #a7ddf5; outline-offset: 2px; border-radius: 6px; }
.study-chapter { min-width: 0; }
.study-chapter-button {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 100%; min-height: 53px; padding: 11px 14px;
  border: 1px solid rgb(104 146 187 / 21%); border-radius: 8px; background: rgb(18 31 48 / 35%);
  color: #d5e1f1; font: inherit; font-size: 13px; line-height: 1.45; text-align: left; text-decoration: none; cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}
.study-chapter-number { flex-shrink: 0; min-width: 19px; color: #8aaecb; font-size: 11px; font-variant-numeric: tabular-nums; }
.study-chapter-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.study-chapter-completion { flex-shrink: 0; padding: 3px 5px; border-radius: 4px; background: rgb(95 185 221 / 12%); color: #9adcf1; font-size: 10px; font-variant-numeric: tabular-nums; }
.study-chapter.is-current .study-chapter-button { border-color: rgb(113 195 226 / 50%); background: rgb(44 91 124 / 21%); }
.study-chapter-button:hover { border-color: rgb(133 206 239 / 64%); background: rgb(45 87 122 / 29%); color: #fff; }
.study-chapter-panel a:focus-visible, .study-chapter-panel button:focus-visible { outline: 2px solid #a7ddf5; outline-offset: 3px; }
.study-chapter-notice { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 150px; }
.study-chapter-notice p { max-width: 48ch; color: #afc0dc; font-size: 14px; line-height: 1.6; }
.study-chapter-retry, .study-chapter-dialog button {
  min-height: 44px; padding: 10px 17px; border: 1px solid rgb(135 200 227 / 60%); border-radius: 7px;
  background: rgb(44 91 124 / 18%); color: #b3e3f5; font: inherit; font-size: 13px; cursor: pointer;
}
.study-chapter-retry:hover, .study-chapter-dialog button:hover { background: rgb(44 91 124 / 35%); }
.study-chapter-dialog {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 30px;
  border: 1px solid rgb(135 200 227 / 45%); border-radius: 18px; background: #091321; color: #d5e1f1;
  box-shadow: 0 20px 100px rgb(0 0 0 / 55%);
}
.study-chapter-dialog::backdrop { background: rgb(0 4 10 / 75%); }
.study-chapter-dialog-number { margin: 0 0 12px; color: #82bad9; font-size: 10px; letter-spacing: .2em; }
.study-chapter-dialog h3 { margin: 0 0 15px; color: #e4edf8; font-size: 25px; font-weight: 500; line-height: 1.3; }
.study-chapter-dialog-description { margin: 0; color: #bdcce1; font-size: 14px; line-height: 1.65; }
.study-chapter-dialog-status { margin: 20px 0 24px; color: #90a6c2; font-size: 12px; line-height: 1.6; }
@media (max-width: 1180px) {
  .study-shell-scene { --study-book-width: min(26vw, 260px, var(--study-book-height-limit)); --study-book-top: clamp(105px, 17dvh, 155px); }
  .study-shell-heading h1 { width: min(68vw, 780px); }
  .study-shell-arrow-prev { left: 4%; } .study-shell-arrow-next { left: 96%; }
  .study-chapter-panel { padding: 24px; }
}
@media (max-width: 720px) {
  .map-page.study-shell-page { --study-navigation-space: 64px; }
  .study-shell-scene {
    --study-stage-gap: 58px; --study-book-top: clamp(94px, 14dvh, 136px);
    --study-book-height-limit: max(70px, calc((var(--study-available-height) * .58 - var(--study-book-top) - var(--study-stage-gap)) / 1.5));
    --study-book-width: min(62vw, 270px, var(--study-book-height-limit));
  }
  .study-shell-heading { top: 31px; width: 90vw; }
  .study-shell-heading h1 { width: 88vw; }
  .study-shell-heading p { max-width: 320px; margin: 17px auto 0; font-size: 8px; letter-spacing: .22em; line-height: 1.7; }
  .study-shell-ground { width: 145vw; height: 60px; top: calc(var(--study-book-top) + var(--study-book-width) * 1.5 - 26px); }
  .study-shell-arrow-prev { left: 8%; } .study-shell-arrow-next { left: 92%; }
  .study-shell-arrow { width: 40px; }
  .study-shell-dots { width: calc(100vw - 40px); }
  .study-shell-dots button::before { width: 6px; }
  .study-chapter-panel { width: calc(100% - 20px); margin: 0 10px 12px; padding: 23px 18px 20px; border-radius: 16px; }
  .study-chapter-header { flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
  .study-chapter-eyebrow { font-size: 19px; letter-spacing: .22em; overflow-wrap: anywhere; }
  .study-chapter-subtitle { font-size: 9px; letter-spacing: .22em; }
  .study-chapter-count { font-size: 11px; }
  .study-chapter-list { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; }
  .study-chapter-button { min-height: 51px; }
  .study-chapter-dialog { padding: 24px; }
}
@media (max-height: 600px) {
  .study-shell-scene {
    --study-book-top: 70px; --study-stage-gap: 44px;
    --study-book-height-limit: max(24px, calc((min(var(--study-available-height) * .64, var(--study-available-height) - 152px) - var(--study-book-top) - var(--study-stage-gap)) / 1.5));
  }
  .study-shell-heading { top: 20px; }
  .study-shell-heading h1 { width: min(60vw, 580px); }
  .study-shell-heading p { display: none; }
  .study-chapter-panel { padding: 12px 18px; }
  .study-chapter-header { gap: 10px; margin-bottom: 12px; }
  .study-chapter-eyebrow { font-size: 16px; letter-spacing: .2em; }
  .study-chapter-subtitle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .study-star-hover-field { transition: none; }
  .study-book { will-change: auto; }
  .study-chapter-button { transition: none; }
}
