.classroom-page { --pill: #f0f1f2; --pill-line: #dcdde0; --dot: #8046d9; --reel: 54px; max-width: 1180px; }
.classroom-page .header { margin-bottom: 8px; }
.classroom-page .classroom-content { justify-content: flex-start; min-height: 0; }
.classroom-inner { width: min(100%, 560px); margin-inline: auto; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.classroom-inner .intro-block { margin: 4px 0 12px; }
.classroom-inner .intro-block h1 { font-size: 24px; letter-spacing: -.03em; margin: 0 0 2px; }
.classroom-inner .intro-block h1::after { content: ""; display: inline-block; width: .2em; height: .2em; margin-left: .1em; vertical-align: .04em; border-radius: 50%; background: var(--dot); }
.classroom-inner .campus { margin: 0; font-size: 12px; color: var(--text-muted); }

/* ---------- One-row picker ---------- */
.picker { display: flex; align-items: center; height: var(--reel); padding: 0 6px 0 4px; border-radius: 999px; background: var(--pill); }
.picker:focus-within { box-shadow: 0 0 0 2px var(--pill-line); }
.reels { flex: 1; display: grid; grid-template-columns: 1.55fr 1fr 1fr 1fr; height: 100%; min-width: 0; }
.reel-wrap { position: relative; min-width: 0; }
.reel-wrap + .reel-wrap::before { content: ""; position: absolute; left: 0; top: 15px; bottom: 15px; width: 1px; background: var(--pill-line); }
.reel-wrap::after {
  content: ""; position: absolute; right: 7px; top: 50%; width: 7px; height: 14px; margin-top: -7px; pointer-events: none; opacity: .45;
  background: no-repeat center/7px 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 14' fill='none' stroke='%23525252' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 4.5 2.5-2.5L6 4.5M1 9.5 3.5 12 6 9.5'/%3E%3C/svg%3E");
}
.reel {
  height: var(--reel); overflow-y: scroll; overscroll-behavior: contain; scroll-snap-type: y mandatory;
  scrollbar-width: none; touch-action: pan-y; outline: none; cursor: ns-resize;
}
.reel::-webkit-scrollbar { display: none; }
.reel ul { list-style: none; margin: 0; padding: 0; }
.reel li { height: var(--reel); display: flex; align-items: center; justify-content: center; gap: 6px; padding-right: 10px; scroll-snap-align: center; user-select: none; -webkit-user-select: none; }
.reel li b { font-size: 24px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--text-main); }
.reel li small { font-size: 13px; font-weight: 550; color: #52525b; white-space: nowrap; }
.reel:focus-visible li b { text-decoration: underline 2px; text-underline-offset: 5px; }
.type-form { flex: 1; height: 100%; display: flex; }
.type-form input { flex: 1; min-width: 0; border: 0; background: transparent; text-align: center; font: inherit; font-size: 24px; font-weight: 650; letter-spacing: .28em; color: var(--text-main); caret-color: var(--dot); }
.type-form input::placeholder { font-size: 15px; font-weight: 450; letter-spacing: 0; color: #a1a1aa; }
.type-form input:focus { outline: none; }
.type-toggle { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #fff; color: var(--text-main); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); transition: background .15s, transform .15s; }
.type-toggle svg { width: 18px; height: 18px; stroke-width: 1.6; }
.type-toggle:hover { background: #fafafa; }
.type-toggle:active { transform: scale(.95); }
.type-toggle[aria-pressed="true"] { background: var(--btn-black); color: #fff; }

/* ---------- Answer ---------- */
.answer { text-align: center; margin: 10px 0 12px; }
.answer-place { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.answer-note { margin: 3px 0 0; min-height: 18px; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.answer.miss .answer-place { color: #b42318; }

/* ---------- Map cards ---------- */
.maps { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.map-card { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border-light); border-radius: 20px; background: var(--bg); overflow: hidden; }
.map-tag { display: flex; align-items: center; gap: 7px; padding: 10px 14px 0; font-size: 12px; font-weight: 550; color: var(--text-main); }
.map-legend { margin-left: auto; display: flex; gap: 10px; font-size: 11px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.map-legend i { display: inline-block; width: 12px; height: 10px; margin-right: 4px; vertical-align: -1px; border-radius: 3px; }
.map-legend .lg-walk { background: #f3f1f8 radial-gradient(circle, #b9b1cf 0 1px, transparent 1.5px) 0 50%/4px 4px repeat-x; }
.map-legend .lg-void { border: 1px dashed #c4c4ca; background: repeating-linear-gradient(45deg, #e4e4e7 0 2px, #fff 2px 5px); }
.map-legend .lg-lift { width: 10px; border: 1.5px solid var(--btn-black); background: #fff; }
.map-tag b { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--btn-black); color: #fff; font-size: 10px; font-weight: 650; }
.map-frame { padding: 6px 10px 10px; min-height: 0; }
.campus-card .map-frame svg { display: block; width: 100%; height: auto; aspect-ratio: 1004 / 600; }
.floor-card { flex: 1; }
.floor-card .map-frame { flex: 1; display: flex; }
.floor-card .map-frame svg { display: block; width: 100%; height: 100%; min-height: 150px; }
.sources { margin: 10px auto 0; text-align: center; font-size: 10px; line-height: 1.6; color: var(--text-subtle); }
.sources a { color: var(--text-muted); text-underline-offset: 2px; }
.classroom-page .footer { padding-top: 10px; }

/* Phones: the whole answer fits on one screen. */
@media (max-width: 979px) {
  .classroom-page { height: 100dvh; min-height: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .classroom-page .classroom-content { flex: 1; overflow: hidden; }
  .classroom-page .footer-note, .classroom-page .sources { display: none; }
}
@media (max-width: 979px) and (max-height: 600px) {
  .classroom-page { height: auto; min-height: 100dvh; }
  .classroom-page .classroom-content { overflow: visible; }
  .floor-card { min-height: 260px; }
}

/* ---------- SVG: campus ---------- */
#campus-map, #floor-map { fill: none; stroke: none; stroke-width: 0; }
#campus-map text, #floor-map text { stroke: none; text-anchor: middle; dominant-baseline: central; font-family: var(--font-stack); pointer-events: none; }
#campus-map .road { fill: #f4f4f5; }
#campus-map .road-label { font-size: 16px; fill: #a1a1aa; letter-spacing: .3em; }
#campus-map .campus { fill: #fafafa; stroke: #ececee; stroke-width: 2; }
#campus-map .track { fill: none; stroke: #ededef; stroke-width: 12; }
#campus-map .plaza { fill: none; stroke: #e6e6e9; stroke-width: 2; stroke-dasharray: 5 7; }
#campus-map .scenery { fill: #f0f1f2; }
#campus-map .scenery-label { font-size: 19px; fill: #a1a1aa; }
#campus-map .gate { fill: #c4c4c8; }
#campus-map .gate-label { font-size: 17px; fill: #a1a1aa; }
#campus-map .bldg { cursor: pointer; }
#campus-map .bldg rect { fill: #e2e3e6; transition: fill .2s; }
#campus-map .bldg text { font-size: 30px; font-weight: 600; fill: #3f3f46; }
#campus-map .bldg:hover rect { fill: #d6d7db; }
#campus-map .bldg.hit rect { fill: var(--btn-black); }
#campus-map .bldg.hit text { fill: #fff; }

/* ---------- SVG: floor ---------- */
#floor-map .outline { fill: #fff; stroke: #e4e4e7; stroke-width: 3; }
#floor-map .cell rect { fill: #fff; stroke: #e4e4e7; stroke-width: 1.5; transition: fill .2s; }
#floor-map .cell .code { fill: #3f3f46; font-weight: 600; font-variant-numeric: tabular-nums; }
#floor-map .cell .name { fill: #a1a1aa; }
#floor-map .k-c rect { fill: #e4e4e7; stroke: none; }
#floor-map .k-c .code { fill: #18181b; }
#floor-map .k-u rect { fill: #fff; stroke: #e4e4e7; stroke-width: 2; stroke-dasharray: 5 5; }
#floor-map .k-u .name { fill: #c4c4c8; }
/* Corridors, open space, elevators and stairs */
#floor-map .hall { fill: #f3f1f8; }
#floor-map .wall { fill: none; stroke: #d4d4d8; stroke-width: 3; stroke-linejoin: round; }
#floor-map .walk { fill: none; stroke: #c9c3d9; stroke-width: 3; stroke-dasharray: 1 10; stroke-linecap: round; stroke-linejoin: round; }
#floor-map .void rect { fill: #fff; }
#floor-map .void .hatch { fill: url(#void-hatch); stroke: #d4d4d8; stroke-width: 2; stroke-dasharray: 8 6; }
#floor-map .void-line { stroke: #e4e4e7; stroke-width: 5; }
#floor-map .void-title { font-size: 26px; font-weight: 650; fill: #71717a; paint-order: stroke; stroke: #fff; stroke-width: 8px; stroke-linejoin: round; }
#floor-map .void-sub { font-size: 16px; fill: #a1a1aa; paint-order: stroke; stroke: #fff; stroke-width: 6px; stroke-linejoin: round; }
#floor-map .k-lift rect { fill: #fff; stroke: var(--btn-black); stroke-width: 3; }
#floor-map .lift-icon { fill: var(--btn-black); }
#floor-map .lift-name { fill: var(--btn-black); font-weight: 650; }
#floor-map .k-t rect { fill: url(#stair-steps); stroke: #d4d4d8; stroke-width: 1.5; }
#floor-map .stair-line { stroke: #d4d4d8; stroke-width: 2; }
#floor-map .stair-name { fill: #71717a; paint-order: stroke; stroke: #fff; stroke-width: 5px; }
#floor-map .pick { cursor: pointer; }
#floor-map .pick:hover rect { fill: #d4d4d8; }
#floor-map .hit rect { fill: var(--btn-black); stroke: none; }
#floor-map .hit .code { fill: #fff; font-weight: 700; }
#floor-map .hit .name { fill: #d4d4d8; }
#floor-map .none-title { font-size: 28px; font-weight: 650; fill: #3f3f46; }
#floor-map .none-text { font-size: 18px; fill: #a1a1aa; }

/* Location dot: the brand's purple dot, used only to mark the answer. */
.dot-core { fill: var(--dot); stroke: #fff; stroke-width: 4; }
.dot-ring { fill: var(--dot); opacity: .35; transform-box: fill-box; transform-origin: center; animation: dot-ring 2s ease-out infinite; }
@keyframes dot-ring { from { transform: scale(1); opacity: .4; } to { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dot-ring { animation: none; opacity: 0; } .type-toggle { transition: none; } }

/* ---------- Wide screens: one row of controls, maps side by side ---------- */
@media (min-width: 980px) {
  .classroom-page { padding-inline: 48px; }
  .classroom-inner { width: 100%; display: grid; grid-template-columns: auto minmax(340px, 420px) minmax(0, 1fr); grid-template-areas: "intro picker answer" "maps maps maps" "sources sources sources"; column-gap: 28px; align-items: center; align-content: start; padding-top: 18px; }
  .classroom-inner .intro-block { grid-area: intro; text-align: left; margin: 0; }
  .picker { grid-area: picker; }
  .answer { grid-area: answer; text-align: left; margin: 0; }
  .maps { grid-area: maps; flex-direction: row; gap: 14px; margin-top: 22px; align-self: start; }
  .map-card { flex: 1 1 0; min-width: 0; }
  .floor-card .map-frame { flex: none; }
  .floor-card .map-frame svg { height: auto; aspect-ratio: 1004 / 600; }
  .sources { grid-area: sources; }
}
