@media (max-width:760px) {
 .faculty-section { min-height:0; padding:32px 0 38px; }
 .faculty-heading { transform:none; gap:12px; margin:0 16px 24px; }
 .faculty-heading h2 { font-size:25px; letter-spacing:3px; }
 .faculty-heading span { flex:1; width:auto; }
 .faculty-stage { position:relative; top:0; width:100%; max-width:none; height:465px; margin:0; padding:0 14vw; box-sizing:border-box; display:flex; gap:0; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scrollbar-width:none; touch-action:pan-x pan-y; }
 .faculty-stage::-webkit-scrollbar { display:none; }
 .faculty-stage .faculty-member { position:relative; top:auto; left:auto; flex:0 0 72vw; width:72vw; height:455px; transform:none !important; opacity:1 !important; z-index:auto !important; scroll-snap-align:center; scroll-snap-stop:always; display:flex; align-items:flex-start; padding-bottom:45px; box-sizing:border-box; }
 .faculty-stage .faculty-person img { height:100%; object-fit:contain; object-position:center bottom; }
 .faculty-stage .professor-click-area { inset:0; width:100%; height:100%; transform:none; }
 .faculty-name { position:absolute; bottom:0; left:0; width:100%; margin:0; color:#e8c77b; font-size:20px; font-weight:normal; text-align:center; }
 .faculty-book-modal { background:#020812d9; padding:16px; box-sizing:border-box; }
 .faculty-book-window { width:100%; max-height:calc(100dvh - 32px); overflow-y:auto; padding:48px 22px 28px; box-sizing:border-box; background:linear-gradient(110deg,#dfc996,#f3e5c3 45%,#e8d6ac); border:1px solid #b98a42; border-radius:8px; color:#392719; }
 .faculty-book-image { display:none; }
 .book-professor-photo { position:relative; inset:auto; width:100%; height:230px; margin:0 auto 16px; }
 .book-professor-photo img, .book-professor-photo img[src] { width:100%; height:100%; max-width:100%; transform:none; object-fit:contain; object-position:center bottom; }
 .book-professor-name { position:relative; inset:auto; width:auto; font-size:24px; text-align:center; margin:0 0 24px; }
 .book-professor-data { position:relative; inset:auto; font-size:15px; }
 .book-professor-data .book-data { position:relative; inset:auto; width:auto; line-height:1.6; margin:8px 0; }
 .book-data::before { font-weight:bold; }
 .book-data.birth::before { content:'Birth: '; }
 .book-data.gender::before { content:'Gender: '; }
 .book-data.species::before { content:'Species: '; }
 .book-data.interests::before { content:'Interests: '; }
 .book-data.beasts::before { content:'Beasts: '; }
 .book-biography,.book-additional { position:relative; inset:auto; width:auto; height:auto; overflow:visible; font-size:16px; line-height:1.7; margin-top:24px; }
 .book-close { position:absolute; top:10px; right:10px; width:36px; height:36px; background:#392719; color:#f3e5c3; border-radius:50%; font-size:24px; }
 .book-close::after { content:'×'; }
}
@media (min-width:761px) { .faculty-name { display:none; } }

/* Circular professor carousel with neighbouring silhouettes. */
@media (max-width:760px) {
 .faculty-stage { display:block; padding:0; overflow:hidden; touch-action:pan-y; scroll-snap-type:none; }
 .faculty-stage .faculty-member {
  position:absolute; top:0; left:50%; width:66vw; height:455px;
  transform:translateX(calc(-50% + var(--faculty-offset,0px))) scale(var(--faculty-scale,1)) !important;
  transform-origin:center 70%;
  opacity:0 !important; visibility:hidden; pointer-events:none;
  z-index:1 !important;
  transition:transform .4s ease,opacity .4s ease,filter .4s ease;
 }
 .faculty-stage .faculty-member.faculty-neighbour { visibility:visible; opacity:.42 !important; filter:brightness(.55); pointer-events:auto; z-index:2 !important; }
 .faculty-stage .faculty-member.faculty-current { visibility:visible; opacity:1 !important; filter:none; pointer-events:auto; z-index:3 !important; }
 .faculty-neighbour .faculty-name { visibility:hidden; }
 .faculty-stage .faculty-member:not(.faculty-current):not(.faculty-neighbour) { transition:none; }
}
@media (prefers-reduced-motion:reduce) { .faculty-stage .faculty-member { transition:none; } }

@media (max-width:760px) {
 html { scrollbar-width:none; overflow-x:clip; }
 html::-webkit-scrollbar { display:none; }
 body { width:100%; margin:0; overflow-x:clip; }
 .elderwoods-page { width:100%; box-sizing:border-box; }
 .faculty-section,.faculty-stage { width:100%; box-sizing:border-box; }
}

@media (max-width:760px) {
 .faculty-name { display:none; }
}

/* A rolled parchment sheet frames the mobile professor profile. */
.faculty-scroll-shell { display:contents; }
@media (max-width:760px) {
 .faculty-book-modal { padding:32px 22px; }
 .faculty-scroll-shell {
  display:block;
  position:relative;
  width:100%;
  max-width:480px;
  filter:drop-shadow(0 12px 20px rgba(0,0,0,.5));
 }
 .faculty-book-window {
  max-height:calc(100dvh - 64px);
  padding:52px 23px 42px;
  border:0;
  border-left:1px solid #a77d4380;
  border-right:1px solid #a77d4380;
  border-radius:3px;
  background:
   radial-gradient(ellipse at 0% 40%,#9c6d2930,transparent 45%),
   radial-gradient(ellipse at 100% 80%,#9c6d2929,transparent 45%),
   repeating-linear-gradient(4deg,#76521d04 0px,#76521d04 1px,transparent 1px,transparent 4px),
   linear-gradient(90deg,#cdb079 0%,#e5cd98 4%,#f0dfb8 16%,#f4e5c2 50%,#ead4a5 85%,#d4b57b 97%,#b9955c 100%);
  box-shadow:inset 0 14px 16px -12px #66431dd9,inset 0 -14px 16px -12px #66431da6;
  scrollbar-width:thin;
  scrollbar-color:#a6834b #e5cd9866;
  overscroll-behavior:contain;
 }
 .faculty-scroll-shell::before,.faculty-scroll-shell::after {
  content:'';
  position:absolute;
  left:-8px;
  right:-8px;
  height:27px;
  border:1px solid #a47b44;
  border-radius:45% 8px 8px 45% / 5px 13px 13px 5px;
  z-index:2;
  pointer-events:none;
  background:linear-gradient(180deg,#96703e 0%,#d2b17a 12%,#f9ebc8 34%,#efdbab 52%,#c4a16a 82%,#8b622f 100%);
  box-shadow:0 5px 8px #4b2c1959,inset 3px 0 4px #6b431f55,inset -4px 0 3px #6b431f44;
 }
 .faculty-scroll-shell::before { top:-10px; }
 .faculty-scroll-shell::after {
  bottom:-10px;
  background:linear-gradient(180deg,#8b622f 0%,#c4a16a 18%,#efdbab 48%,#f9ebc8 66%,#d2b17a 88%,#96703e 100%);
  box-shadow:0 5px 8px #0005,inset 3px 0 4px #6b431f55,inset -4px 0 3px #6b431f44;
 }
 .book-close { top:24px; right:10px; z-index:3; width:34px; height:34px; background:#644722; color:#f7e5ba; box-shadow:0 1px 3px #53351f44; }
 .book-professor-name { padding-bottom:18px; margin-bottom:20px; border-bottom:1px solid #9c753b66; }
}

/* Illustrated aged scroll, with live readable content inside the sheet. */
@media (max-width:760px) {
 .faculty-book-modal { padding:16px 10px; }
 .faculty-scroll-shell {
  padding:14% 0 13%;
  box-sizing:border-box;
  background:url('images/backgrounds/profile-scroll.png') center / 100% 100% no-repeat;
  clip-path:polygon(3% 4%,14% 4.5%,50% 5%,94% 3.5%,98% 5%,99% 12%,95% 14%,95% 21%,92% 24%,96% 28%,94% 35%,96% 42%,93% 48%,96% 54%,94% 62%,96% 70%,94% 78%,95% 85%,98% 87%,99% 95%,94% 96%,50% 95%,6% 96%,1% 94%,2% 87%,6% 85%,5% 80%,6% 74%,4% 68%,6% 62%,4% 56%,6% 49%,4% 43%,6% 36%,4% 30%,6% 24%,5% 16%,2% 13%,1% 7%);
 }
 .faculty-scroll-shell::before,.faculty-scroll-shell::after { display:none; }
 .faculty-book-window {
  max-height:calc(100dvh - 150px);
  padding:10px 12% 24px;
  background:none;
  border:0;
  border-radius:0;
  box-shadow:none;
  scrollbar-width:none;
 }
 .faculty-book-window::-webkit-scrollbar { display:none; }
 .book-close { top:0; right:10%; background:#533216; color:#fae8bf; }
 .book-professor-photo { margin-top:28px; }
}

/* Keep the scrolling contents strictly between the parchment rolls. */
@media (max-width:760px) {
 .faculty-scroll-shell {
  height:calc(100dvh - 32px);
  max-height:820px;
  padding:0;
 }
 .faculty-book-window {
  position:absolute;
  top:15%;
  bottom:15%;
  left:0;
  width:100%;
  height:auto;
  max-height:none;
  padding:12px 12% 24px;
  overflow-y:auto;
 }
 .book-professor-photo { margin-top:10px; }
 .book-close { position:sticky; top:0; display:block; margin:0 -12px -34px auto; right:auto; z-index:4; }
}

@media (max-width:760px) {
 .faculty-scroll-shell > .book-close {
  position:absolute;
  top:7%;
  right:10%;
  bottom:auto;
  left:auto;
  display:block;
  margin:0;
  z-index:4;
 }
}

/* Mobile film viewer: small reels and a touch-controlled strip. */
@media (max-width:760px) {
 .places-section { min-height:0; padding:18px 0 48px; }
 .places-heading { gap:10px; margin:0 14px 14px; }
 .places-heading span { width:auto; flex:1; }
 .places-heading h2 { max-width:270px; font-size:23px; line-height:1.35; letter-spacing:2px; }
 .places-subtitle { padding:0 28px; font-size:14px; line-height:1.6; letter-spacing:.5px; margin:0 0 24px; }
 .places-section > .places-film-machine { display:block; width:100%; margin:0; transform:none; }
 .places-film-machine .places-film-machine { display:flex; width:100%; margin:0; transform:none; }
 .film-reel { width:48px; height:230px; pointer-events:none; }
 .film-strip-shell { min-width:0; height:205px; margin:0 -8px; transform:none; }
 .film-strip-placeholder { height:185px; justify-content:flex-start; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scrollbar-width:none; touch-action:pan-x pan-y; border-width:8px; border-left:0; border-right:0; }
 .film-strip-placeholder::-webkit-scrollbar { display:none; }
 .film-frames { position:relative; top:auto; bottom:auto; left:auto; width:max-content; height:137px; flex:0 0 auto; animation:none; transform:none; }
 .film-frame { flex:0 0 min(235px,60vw); width:min(235px,60vw); scroll-snap-align:start; scroll-snap-stop:always; }
 .film-frame:nth-child(n+5) { display:none; }
 .film-frame:focus-visible { outline:2px solid #e8c77b; outline-offset:-3px; }
 .film-strip-placeholder::before,.film-strip-placeholder::after { pointer-events:none; z-index:2; }
}

.film-mobile-clone { display:none; }
@media (max-width:760px) {
 .faculty-section { padding-bottom:4px; }
 .faculty-stage { height:410px; }
 .places-section { padding-top:0; }
 .film-reel { width:70px; height:201px; overflow:hidden; }
 .film-reel .reel-body { width:100%; height:114%; object-fit:fill; transform:translateY(-4%); }
 .film-strip-shell { height:201px; }
 .film-frame { flex-basis:min(205px,53vw); width:min(205px,53vw); }
 .film-frame:nth-child(n+5),.film-mobile-clone { display:block; }
 .film-strip-placeholder { overflow-anchor:none; }
}

/* Full-width mobile filmstrip without reels. */
@media (max-width:760px) {
 .places-section { padding-top:24px; }
 .film-reel { display:none; }
 .film-strip-shell { width:100%; flex:1 1 100%; margin:0; }
 .film-strip-placeholder { width:100%; box-sizing:border-box; }
 .film-frame { flex-basis:min(235px,60vw); width:min(235px,60vw); }
}

/* Classic film borders and gold sprocket holes, fixed around the moving frames. */
@media (max-width:760px) {
 .film-strip-shell { position:relative; height:201px; }
 .film-strip-placeholder {
  height:201px;
  border-top:11px solid #17120d;
  border-bottom:11px solid #17120d;
  background:#05080d;
  align-items:center;
 }
 .film-frames { height:137px; }
 .film-strip-placeholder::before,.film-strip-placeholder::after { display:none; }
 .film-strip-shell::before,.film-strip-shell::after {
  content:'';
  position:absolute;
  left:0;
  right:0;
  height:12px;
  z-index:5;
  pointer-events:none;
  background:repeating-linear-gradient(to right,transparent 0px,transparent 8px,#c99539 8px,#c99539 18px,transparent 18px,transparent 26px);
 }
 .film-strip-shell::before { top:17px; }
 .film-strip-shell::after { bottom:17px; }
}

/* Vertical cinema card for place details on phones. */
.place-modal-content { display:contents; }
@media (max-width:760px) {
 .place-modal { padding:20px 14px; box-sizing:border-box; background:#02070ee6; }
 .place-modal-window {
  width:100%; max-width:480px; box-sizing:border-box;
  padding:34px 0;
  background:linear-gradient(120deg,#1d1a13,#080d13 50%,#17170f);
  border:1px solid #9b7539;
  border-radius:8px;
  box-shadow:0 12px 45px #0009,inset 0 0 0 4px #05080d;
 }
 .place-modal-frame { display:none; }
 .place-modal-window::before,.place-modal-window::after {
  content:'';position:absolute;left:12px;right:12px;height:11px;
  background:repeating-linear-gradient(to right,#bd9045 0px,#bd9045 9px,transparent 9px,transparent 23px);
  pointer-events:none;
 }
 .place-modal-window::before { top:12px; right:55px; }
 .place-modal-window::after { bottom:12px; }
 .place-modal-content { display:block; max-height:calc(100dvh - 110px); overflow-y:auto; padding:10px 18px 20px; box-sizing:border-box; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#9b7539 #080d13; }
 .place-modal-photo { position:relative; inset:auto; width:100%; height:auto; padding:3px; border:1px solid #9b7539; border-radius:4px; }
 .place-modal-photo img { width:100%; height:auto; max-height:340px; object-fit:contain; border-radius:2px; }
 .place-modal-name { position:relative; inset:auto; width:auto; margin:24px 0 20px; font-size:25px; line-height:1.3; letter-spacing:2px; overflow-wrap:anywhere; }
 .place-modal-description { position:relative; inset:auto; width:auto; height:auto; overflow:visible; font-size:16px; line-height:1.7; }
 .place-modal-description .place-legends { display:block; }
 .place-modal-description .place-legend { margin:0 0 24px; }
 .place-modal-description h4 { margin:0 0 10px; font-size:15px; line-height:1.5; color:#d8b26e; }
 .place-modal-description p { margin:0; font-size:16px; line-height:1.7; }
 .place-modal-close { position:absolute; top:4px; right:6px; width:34px; height:30px; border:1px solid #9b753966; border-radius:50%; background:#080d13; color:#e8c77b; font-size:24px; }
 .place-modal-close::after { content:'×'; }
}

@media (max-width:760px) {
 .place-modal-photo img { display:block; width:100%; height:auto; max-height:none; object-fit:contain; }
}

/* Notice board overview and a readable individual note. */
@media (max-width:760px) {
 .notice-board-section { transform:none; padding:20px 0 32px; box-sizing:border-box; }
 .notice-board-heading { gap:12px; margin:0 16px 14px; }
 .notice-board-heading span { width:auto; flex:1; }
 .notice-board-heading h2 { font-size:25px; letter-spacing:2px; }
 .notice-board-subtitle { padding:0 26px; font-size:14px; line-height:1.6; letter-spacing:.5px; margin:0 0 24px; }
 .notice-board-wrap { width:100%; }
 .board-task { cursor:pointer; }
 .board-task:hover { transform:rotate(var(--note-angle,0deg)); z-index:5; }
 .board-task:focus-visible { outline:2px solid #f0d59b; outline-offset:3px; }
 .student-guide-section { padding-top:32px; }
}
.notice-note-dialog { border:0; padding:0; background:transparent; width:calc(100vw - 28px); max-width:480px; max-height:calc(100dvh - 32px); overflow:visible; }
.notice-note-dialog::backdrop { background:#02070ee8; }
.notice-note-body { max-height:calc(100dvh - 32px); overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#b98a42 transparent; }
.notice-note-body img { display:block; width:100%; height:auto; filter:drop-shadow(0 8px 15px #0006); }
.notice-note-close { position:absolute; right:3px; top:3px; width:38px; height:38px; border:1px solid #bc9456; border-radius:50%; background:#392719; color:#f3dfb4; font-size:25px; z-index:2; cursor:pointer; }

/* A single readable Student Guide leaf, independent of the desktop spreads. */
.mobile-student-guide { display:none; }
@media (max-width:760px) {
 .student-guide-section { padding:32px 0 48px; }
 .student-guide-heading { margin:0 16px 24px; gap:12px; }
 .student-guide-heading span { width:auto; flex:1; }
 .student-guide-heading h2 { font-size:25px; letter-spacing:2px; }
 .student-guide-book { display:none; }
 .mobile-student-guide { display:block; margin:0 16px; }
 .mobile-guide-paper {
  position:relative; max-height: min(660px,75dvh); overflow-y:auto; box-sizing:border-box;
  padding:30px 24px; border:4px double #96713e; border-radius:5px 13px 13px 5px;
  background:radial-gradient(ellipse at top left,#a97d3633,transparent 50%),linear-gradient(90deg,#c6a570,#efdcad 7%,#f3e4c0 50%,#e7cc98 95%,#c6a570);
  box-shadow:inset 5px 0 10px #69461833,5px 5px 0 #a9875266,0 10px 25px #0006;
  color:#4a2d18; font-size:16px; line-height:1.6; text-align:left;
  overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#96713e transparent;
 }
 .mobile-guide-paper > div { height:auto; min-height:0; transform:none; }
 .mobile-guide-paper h3 { font-size:21px; line-height:1.4; letter-spacing:1px; }
 .mobile-guide-paper h4 { font-size:17px; line-height:1.5; }
 .mobile-guide-paper p { font-size:16px; line-height:1.65; }
 .mobile-guide-paper small { font-size:14px; line-height:1.5; letter-spacing:.3px; }
 .mobile-guide-paper .schedule-day { margin:24px 0; }
 .mobile-guide-paper .schedule-class { grid-template-columns:1fr; gap:2px; margin:0 0 17px; line-height:1.5; }
 .mobile-guide-paper .schedule-class span { grid-row:auto; font-size:14px; }
 .mobile-guide-paper .schedule-class strong { font-size:16px; }
 .mobile-guide-paper .schedule-break,.mobile-guide-paper .schedule-end,.mobile-guide-paper .schedule-optional { font-size:14px; line-height:1.5; padding:8px 0; }
 .mobile-guide-paper .catalog-columns { grid-template-columns:1fr; gap:12px; }
 .mobile-guide-paper .catalog-category { margin-bottom:24px; }
 .mobile-guide-paper .catalog-item { font-size:15px; line-height:1.6; margin-bottom:9px; }
 .mobile-guide-paper .catalog-item b { font-size:15px; }
 .mobile-guide-paper .catalog-note,.mobile-guide-paper .beast-market-note { font-size:14px; line-height:1.6; }
 .mobile-guide-paper .beast-market-labels,.mobile-guide-paper .beast-market-item { grid-template-columns:minmax(0,1fr) 60px 60px; gap:6px; font-size:13px; line-height:1.5; }
 .mobile-guide-paper .beast-market-item { padding:12px 0; }
 .mobile-guide-paper .beast-market-item b { font-size:13px; }
 .mobile-guide-paper .rule-item { padding:14px 0; }
 .mobile-guide-paper .rule-item b { font-size:15px; }
 .mobile-guide-controls { display:flex; align-items:center; justify-content:center; gap:26px; padding-top:23px; color:#e8c77b; font-size:15px; }
 .mobile-guide-controls button { width:46px; height:46px; border:1px solid #b78332; border-radius:50%; background:radial-gradient(circle at 35% 30%,#5a4023,#17120d); color:#e8c77b; font:30px Georgia,serif; cursor:pointer; }
 .mobile-guide-controls button:disabled { opacity:.3; cursor:default; }
}



/* A shorter, gently weathered guide leaf with internal scrolling. */
@media (max-width:760px) {
 .mobile-guide-paper {
  max-height:min(420px,52dvh);
  padding:26px 24px;
  border:1px solid #98713e;
  border-radius:3px 7px 5px 3px;
  background:
   radial-gradient(ellipse at 8% 18%,#8c571c22 0%,transparent 24%),
   radial-gradient(ellipse at 92% 72%,#8c571c26 0%,transparent 30%),
   radial-gradient(ellipse at 40% 95%,#b37c3020 0%,transparent 24%),
   repeating-linear-gradient(6deg,#6c451006 0px,#6c451006 1px,transparent 1px,transparent 4px),
   repeating-linear-gradient(96deg,#fff6d809 0px,#fff6d809 1px,transparent 1px,transparent 7px),
   linear-gradient(90deg,#c2a16b,#e6cf9e 3%,#f0dfb8 14%,#eddab0 75%,#dfc38e 97%,#bb955f);
  box-shadow:inset 2px 0 6px #70431c22,inset 0 2px 5px #70431c22,2px 3px 0 #a9875255,0 8px 20px #0005;
 }
}

/* Compact parchment scroll for the mobile Student Guide. */
@media (max-width:760px) {
 .mobile-student-guide { margin:0 10px; }
 .mobile-guide-scroll {
  position:relative;
  height:min(480px,60dvh);
  background:url('images/backgrounds/profile-scroll.png') center / 100% 100% no-repeat;
  clip-path:polygon(3% 4%,14% 4.5%,50% 5%,94% 3.5%,98% 5%,99% 12%,95% 14%,95% 21%,92% 24%,96% 28%,94% 35%,96% 42%,93% 48%,96% 54%,94% 62%,96% 70%,94% 78%,95% 85%,98% 87%,99% 95%,94% 96%,50% 95%,6% 96%,1% 94%,2% 87%,6% 85%,5% 80%,6% 74%,4% 68%,6% 62%,4% 56%,6% 49%,4% 43%,6% 36%,4% 30%,6% 24%,5% 16%,2% 13%,1% 7%);
 }
 .mobile-guide-scroll .mobile-guide-paper {
  position:absolute;
  top:15%; bottom:15%; left:0;
  width:100%; height:auto; min-height:0; max-height:none;
  padding:12px 12% 24px;
  background:none; border:0; border-radius:0; box-shadow:none;
  overflow-y:auto;
  scrollbar-width:none;
 }
 .mobile-guide-scroll .mobile-guide-paper::-webkit-scrollbar { display:none; }
 .mobile-guide-controls { padding-top:12px; }
}

@media (max-width:760px) {
 .mobile-guide-paper .beast-market-labels,
 .mobile-guide-paper .beast-market-item {
  grid-template-columns:minmax(0,1fr) 68px 68px;
  gap:10px;
 }
 .mobile-guide-paper .beast-market-labels {
  align-items:end;
  font-size:11px;
  letter-spacing:0;
  line-height:1.6;
  padding-bottom:10px;
 }
 .mobile-guide-paper .beast-market-labels span:nth-child(2),
 .mobile-guide-paper .beast-market-labels span:nth-child(3) { text-align:center; }
 .mobile-guide-paper .beast-market-item b { text-align:center; }
}
