/* =========================================================
   Mass Bunk: New Term Loading
   Mobile layout is the base. Desktop (>=1024px) is a separate
   composition, tuned again at 1280 and 1600.
   ========================================================= */

:root {
  --board: #17301f;
  --board-2: #1f3d29;
  --board-deep: #0f2016;
  --chalk: #f4f0e3;
  --chalk-dim: rgba(244, 240, 227, .62);
  --paper: #fbf6ea;
  --paper-2: #f3ead4;
  --ink: #1d1b17;
  --ink-2: #4a463d;
  --line: #a9c6e4;
  --margin: #e5776c;
  --yellow: #f7c63c;
  --red: #e0473a;
  --blue: #3c6fd8;
  --pink: #f4a3b8;
  --mint: #b9e4c4;
  --brick: #9b4b33;
  --wood: #8a5a33;
  --wood-2: #6b4224;

  --font: "Outfit", system-ui, sans-serif;
  --r: 18px;
  --gutter: 16px;
  --dock-h: 72px;
  --nav-h: 56px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; overflow-x: clip; }
main, footer, section { overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Type ---------- */
.eyebrow {
  margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow--light { color: var(--yellow); }
.h2 { margin: 0 0 16px; font-size: clamp(36px, 10vw, 52px); line-height: .98; font-weight: 800; letter-spacing: -.035em; }
.h2--light { color: var(--chalk); }
.h3 { margin: 0 0 16px; font-size: 26px; line-height: 1.1; font-weight: 750; letter-spacing: -.02em; }
.lead { margin: 0; font-size: 18px; color: var(--ink-2); max-width: 52ch; font-weight: 350; }
.lead--light { color: var(--chalk-dim); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 650; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s;
}
.btn:active { transform: scale(.97); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 #b88d14; }
.btn--yellow:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #b88d14; }
.btn--chalk { background: var(--chalk); color: var(--board); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- Nav (mobile: brand only) ---------- */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter); padding-top: env(safe-area-inset-top);
  color: var(--chalk); transition: background .35s, color .35s, box-shadow .35s;
}
.topnav.is-solid { background: rgba(251, 246, 234, .9); color: var(--ink); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.02em; font-size: 19px; }
.brand__mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--yellow); color: var(--ink); font-size: 14px; font-weight: 900; transform: rotate(-6deg);
}
.topnav__links, .topnav .btn { display: none; }

/* ---------- Mobile dock ---------- */
.dock {
  position: fixed; z-index: 70; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
  height: 62px; padding: 6px; border-radius: 20px;
  display: grid; grid-template-columns: 56px 1fr 56px; gap: 6px; align-items: stretch;
  background: rgba(20, 38, 27, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,.3), inset 0 0 0 1px rgba(255,255,255,.08);
  transform: translateY(0); transition: transform .4s var(--ease);
}
.dock.is-hidden { transform: translateY(140%); }
.dock__item { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--chalk); text-decoration: none; font-size: 11px; font-weight: 500; border-radius: 14px; }
.dock__item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dock__cta { display: grid; place-items: center; text-align: center; border-radius: 14px; background: var(--yellow); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; line-height: 1.15; padding: 0 10px; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; background: var(--board-deep); }
.hero__pin { position: relative; height: 100svh; min-height: 560px; padding: calc(var(--nav-h) + 8px) 10px calc(var(--dock-h) + 14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.board {
  position: relative; flex: 1; display: flex; flex-direction: column;
  border-radius: 14px; padding: 10px;
  background: linear-gradient(135deg, var(--wood) 0%, var(--wood-2) 100%);
  box-shadow: 0 30px 60px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.08);
}
.board__surface {
  position: relative; flex: 1; overflow: hidden; border-radius: 6px;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255,255,255,.07), transparent 60%),
    radial-gradient(80% 60% at 80% 90%, rgba(255,255,255,.05), transparent 60%),
    linear-gradient(180deg, var(--board-2), var(--board));
  box-shadow: inset 0 0 80px rgba(0,0,0,.55);
  color: var(--chalk);
  padding: 22px 20px;
}
/* old chalk smudges */
.board__surface::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(40% 12% at 20% 70%, rgba(255,255,255,.06), transparent 70%),
    radial-gradient(30% 10% at 75% 30%, rgba(255,255,255,.05), transparent 70%),
    radial-gradient(50% 8% at 50% 88%, rgba(255,255,255,.04), transparent 70%);
}
.board__meta { position: relative; z-index: 3; display: flex; justify-content: space-between; font-size: 13px; color: var(--chalk-dim); border-bottom: 1px dashed rgba(244,240,227,.25); padding-bottom: 10px; }
.board__meta b { font-weight: 500; color: var(--chalk); }
.board__layer { position: absolute; left: 20px; right: 20px; top: 50%; transform: translateY(-55%); }
.board__layer--new { clip-path: inset(0 100% 0 0); }
.chalk-kicker { margin: 0 0 14px; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--pink); }
.chalk-kicker--yellow { color: var(--yellow); }
.chalk-title {
  margin: 0; font-size: clamp(56px, 17vw, 88px); line-height: .9; font-weight: 800; letter-spacing: -.04em;
  text-shadow: 0 0 1px rgba(255,255,255,.6), 0 0 18px rgba(255,255,255,.08);
  filter: url(#chalk);
}
.chalk-title span { color: var(--yellow); }
.board__layer--old .chalk-title span { color: var(--chalk); opacity: .9; }
.underline-scribble { position: relative; display: inline-block; }
.underline-scribble::after {
  content: ""; position: absolute; left: -2%; right: -4%; bottom: -6px; height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'><path d='M3 14 C 60 4, 120 18, 180 8 S 270 6, 297 12' fill='none' stroke='%23f4a3b8' stroke-width='4' stroke-linecap='round'/></svg>") no-repeat center/100% 100%;
}
.chalk-sub { margin: 18px 0 0; font-size: 19px; font-weight: 350; color: var(--chalk-dim); max-width: 26ch; }

.duster {
  position: absolute; z-index: 4; top: 50%; left: 0; width: 110px; height: 260px;
  transform: translate(-140%, -50%) rotate(-8deg);
  border-radius: 14px; background: linear-gradient(90deg, #6e4a2b, #a77748 50%, #6e4a2b);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.duster__felt { position: absolute; right: -10px; top: 6px; bottom: 6px; width: 22px; border-radius: 6px; background: repeating-linear-gradient(0deg, #3b3b3b 0 3px, #4a4a4a 3px 6px); }
.chalk-dust { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.chalk-dust i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: rgba(244,240,227,.7); }

.board__hint {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 16px; margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--chalk-dim);
}
.board__hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; animation: bob 1.6s var(--ease) infinite; }
.hint-desktop { display: none; }
@keyframes bob { 50% { transform: translateY(4px); } }

.board__ledge { height: 16px; margin: 8px -10px -10px; border-radius: 0 0 14px 14px; background: linear-gradient(#7a4f2c, #573519); display: flex; gap: 10px; align-items: center; padding-left: 26px; }
.chalk-stick { width: 34px; height: 7px; border-radius: 4px; background: var(--chalk); box-shadow: 0 2px 3px rgba(0,0,0,.3); }
.chalk-stick--y { background: var(--yellow); width: 26px; }
.chalk-stick--p { background: var(--pink); width: 20px; }

.collage { display: none; }

/* =========================================================
   TICKER
   ========================================================= */
.ticker { overflow: hidden; background: var(--yellow); border-block: 2px solid var(--ink); padding: 14px 0; }
.ticker__track { display: flex; width: max-content; gap: 22px; align-items: center; animation: tick 30s linear infinite; font-weight: 800; font-size: 22px; letter-spacing: -.01em; text-transform: uppercase; }
.ticker__track i { font-style: normal; color: var(--red); font-size: 16px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* =========================================================
   CIRCULAR
   ========================================================= */
.circular { padding: 80px 0 72px; background:
  linear-gradient(var(--paper), var(--paper)) padding-box; position: relative; }
.circular__grid { display: grid; gap: 40px; }
.notice {
  position: relative; background: #fffdf6; padding: 32px 22px 26px; border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 24px 50px -20px rgba(60,40,10,.35);
  transform: rotate(-1deg);
  background-image: repeating-linear-gradient(transparent 0 31px, rgba(169,198,228,.55) 31px 32px);
  background-position: 0 14px;
}
.notice::before { content: ""; position: absolute; top: 0; bottom: 0; left: 18px; width: 2px; background: rgba(229,119,108,.55); }
.notice > * { position: relative; padding-left: 14px; }
.pin { position: absolute !important; top: -12px; left: 50%; width: 26px; height: 26px; padding: 0 !important; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8d80, var(--red) 60%, #8d1f15); box-shadow: 0 6px 8px rgba(0,0,0,.25); transform: translateX(-50%); }
.notice__school { margin: 0; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.notice__addr { margin: 0 0 16px; font-size: 13px; color: var(--ink-2); }
.notice__title { margin: 0 0 12px; font-size: 20px; font-weight: 700; line-height: 1.25; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.notice p, .notice li { font-size: 16px; line-height: 32px; margin: 0; }
.notice mark { background: linear-gradient(100deg, transparent 2%, rgba(247,198,60,.75) 4%, rgba(247,198,60,.75) 96%, transparent 98%); padding: 0 4px; }
.notice__list { margin: 8px 0 0; padding-left: 34px !important; }
.notice__sign { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.sign { font-size: 26px; font-weight: 300; font-style: italic; color: var(--blue); transform: rotate(-4deg); }
.stamp {
  display: grid; place-items: center; text-align: center; width: 84px; height: 84px; flex: 0 0 auto; border-radius: 50%;
  border: 3px double var(--red); color: var(--red); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; line-height: 1.1;
  transform: rotate(12deg); opacity: .85;
}
.stamp small { font-size: 22px; letter-spacing: 0; }

/* Term timeline (mobile: vertical) */
.term { list-style: none; margin: 64px 0 0; padding: 0 0 0 28px; position: relative; display: grid; gap: 28px; }
.term::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: repeating-linear-gradient(var(--ink) 0 6px, transparent 6px 12px); opacity: .3; }
.term::after { content: ""; position: absolute; left: 8px; top: 6px; width: 2px; height: var(--term-progress, 0%); background: var(--red); }
.term__item { position: relative; }
.term__dot { position: absolute; left: -26px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.term__item.is-done .term__dot { background: var(--ink); }
.term__item.is-now .term__dot { background: var(--yellow); border-color: var(--ink); box-shadow: 0 0 0 6px rgba(247,198,60,.35); animation: ping 1.8s infinite; }
@keyframes ping { 50% { box-shadow: 0 0 0 12px rgba(247,198,60,0); } }
.term__label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.term h3 { margin: 2px 0 6px; font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.term p:not(.term__label) { margin: 0; color: var(--ink-2); font-size: 15px; }

/* =========================================================
   MEMORIES
   ========================================================= */
.memories { background: var(--board-deep); color: var(--chalk); padding: 72px 0 64px; overflow: hidden; }
.memories__head { margin-bottom: 28px; }
.memories__swipe { margin: 0; font-size: 14px; color: var(--chalk-dim); }
.memories__rail {
  display: flex; gap: 14px; padding: 8px var(--gutter) 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.memories__rail::-webkit-scrollbar { display: none; }
.mem {
  position: relative; flex: 0 0 78vw; margin: 0; scroll-snap-align: center;
  background: var(--chalk); padding: 10px 10px 54px; border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
  transform: rotate(var(--rot, -1.5deg));
}
.mem:nth-child(even) { --rot: 1.5deg; }
.mem img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; filter: saturate(1.05) contrast(1.02); }
.mem--wide img { aspect-ratio: 4 / 5; }
.mem figcaption { position: absolute; left: 14px; right: 14px; bottom: 12px; color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.2; }
.mem figcaption b { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); font-weight: 700; }
.mem--quote { background: var(--yellow); padding: 28px 22px; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: auto; }
.mem--quote blockquote { margin: 0; color: var(--ink); font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; }
.mem--quote figcaption { position: static; margin-top: 18px; font-size: 14px; }

/* =========================================================
   SYLLABUS
   ========================================================= */
.syllabus { padding: 80px 0 72px; background: var(--paper-2); }
.syllabus__head { margin-bottom: 28px; }
.timetable { display: block; }
.timetable__side { position: sticky; top: var(--nav-h); z-index: 20; margin: 0 calc(var(--gutter) * -1); background: var(--paper-2); padding: 10px 0; }
.periods { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--gutter); scrollbar-width: none; }
.periods::-webkit-scrollbar { display: none; }
.period {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 0; text-align: left;
  border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 14px; padding: 8px 14px; cursor: pointer;
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.period small { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.period strong { font-size: 16px; font-weight: 700; }
.period .count { display: none; }
.period[aria-selected="true"] { background: var(--ink); color: var(--yellow); }
.timetable__note { display: none; }

.notebook {
  position: relative; margin-top: 14px; background: #fffdf6; border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 24px 50px -24px rgba(60,40,10,.4);
  min-height: 300px;
}
.notebook::before { content: ""; position: absolute; top: 0; bottom: 0; left: 40px; width: 2px; background: rgba(229,119,108,.6); }
.notebook__holes { display: none; }
.notebook__pages { position: relative; padding: 22px 16px 26px 54px; }
.page { display: none; }
.page.is-active { display: block; }
.page__title { margin: 0; height: 48px; display: flex; align-items: baseline; gap: 10px; font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.page__title small { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.page__note { margin: 0 0 0; height: 40px; line-height: 40px; color: var(--blue); font-style: italic; font-weight: 400; font-size: 15px; }
.group { break-inside: avoid; }
.group__name { margin: 0; padding-top: 22px; height: 52px; line-height: 30px; border-bottom: 2px solid var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: baseline; gap: 8px; height: 44px; line-height: 44px; font-size: 16px; border-bottom: 1px solid rgba(169,198,228,.7); }
.item__name { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 450; }
.item__dots { flex: 1; min-width: 12px; border-bottom: 2px dotted rgba(29,27,23,.25); transform: translateY(-6px); }
.item__price { font-weight: 700; font-variant-numeric: tabular-nums; }
.tag-spicy { flex: 0 0 auto; font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--paper); background: var(--red); border-radius: 4px; padding: 0 5px; line-height: 16px; transform: translateY(-2px); }

.toppers { margin-top: 64px; }
.toppers__grid { display: grid; grid-auto-flow: column; grid-auto-columns: 72vw; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 16px; scrollbar-width: none; }
.toppers__grid::-webkit-scrollbar { display: none; }
.topper { position: relative; scroll-snap-align: start; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r); padding: 10px 10px 18px; }
.topper__img { overflow: hidden; border-radius: 12px; }
.topper__img img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .8s var(--ease); }
.topper:hover .topper__img img { transform: scale(1.06); }
.topper h4 { margin: 14px 6px 4px; font-size: 19px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; }
.topper p { margin: 0 6px; font-size: 14px; color: var(--ink-2); }
.topper .price { margin-top: 10px; font-weight: 800; color: var(--ink); font-size: 16px; }
.badge { position: absolute; top: 20px; left: 20px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; transform: rotate(-6deg); }
.badge--y { background: var(--yellow); color: var(--ink); }
.badge--b { background: var(--blue); }
.badge--p { background: var(--pink); color: var(--ink); }

/* =========================================================
   REPORT CARD
   ========================================================= */
.report { padding: 80px 0; background: var(--paper); }
.report__grid { display: grid; gap: 56px; }
.reportcard { position: relative; background: #fff; border: 2px solid var(--ink); border-radius: 6px; padding: 22px; box-shadow: 8px 8px 0 var(--ink); }
.reportcard__head { text-align: center; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 8px; }
.reportcard__head p { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.reportcard__head h2 { margin: 4px 0 0; font-size: 34px; font-weight: 850; letter-spacing: -.03em; }
.reportcard__head .reportcard__sub { color: var(--ink-2); letter-spacing: .06em; text-transform: none; font-weight: 500; font-size: 14px; }
.reportcard__table { width: 100%; border-collapse: collapse; }
.reportcard__table th { text-align: left; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,.15); }
.reportcard__table th:last-child, .reportcard__table td:last-child { text-align: right; }
.reportcard__table td { padding: 14px 0; border-bottom: 1px dashed rgba(0,0,0,.18); font-size: 15px; }
.grade { font-size: 30px; font-weight: 850; color: var(--red); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.grade--sm { font-size: 22px; color: var(--ink); }
.reportcard__remark { margin: 16px 0 0; font-size: 15px; color: var(--ink-2); }
.reportcard__remark b { color: var(--ink); }
.reportcard__stamp { position: absolute; right: 8px; top: 64px; font-size: 16px !important; background: #fff; padding: 6px 14px; border: 3px solid #2f8a4b; color: #2f8a4b; font-weight: 900; font-size: 22px; letter-spacing: .1em; text-transform: uppercase; border-radius: 8px; transform: rotate(-14deg); opacity: .8; }

.remarks__wall { display: grid; gap: 18px; margin-top: 12px; }
.sticky { margin: 0; padding: 22px 20px 18px; border-radius: 2px; box-shadow: 0 14px 28px -12px rgba(0,0,0,.35); transform: rotate(var(--rot, -1deg)); position: relative; }
.sticky::before { content: ""; position: absolute; top: -10px; left: 50%; width: 80px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: rgba(255,255,255,.55); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.sticky:nth-child(even) { --rot: 1.2deg; }
.sticky p { margin: 0 0 12px; font-size: 17px; line-height: 1.4; font-weight: 450; }
.sticky cite { font-style: normal; font-size: 13px; font-weight: 700; color: rgba(0,0,0,.6); }
.sticky--y { background: #fde68a; }
.sticky--p { background: #fbcfe0; }
.sticky--b { background: #c7dcfb; }
.sticky--g { background: #c9efd4; }

/* =========================================================
   ATTENDANCE
   ========================================================= */
.attendance { background: var(--board); padding: 80px 0; position: relative; overflow: hidden; }
.attendance::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 50% at 20% 10%, rgba(255,255,255,.08), transparent 60%); pointer-events: none; }
.attendance__grid { position: relative; display: grid; gap: 36px; }
.register { position: relative; background: #fffdf6; border-radius: 8px; padding: 22px 18px; box-shadow: 0 30px 60px rgba(0,0,0,.4); display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.field small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.field input, .field select {
  width: 100%; min-height: 52px; border: 0; border-bottom: 2px solid var(--ink); background: transparent; padding: 8px 2px;
  font-size: 18px; color: var(--ink); border-radius: 0; appearance: none; -webkit-appearance: none;
}
.field select { background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6' fill='none' stroke='%231d1b17' stroke-width='2'/></svg>") no-repeat right 4px center/18px; padding-right: 28px; }
.field input:focus, .field select:focus { outline: none; border-bottom-color: var(--blue); }
.field input.is-error { border-bottom-color: var(--red); }
.register__fine { margin: 0; font-size: 12px; color: var(--ink-2); text-align: center; }

/* =========================================================
   VISIT
   ========================================================= */
.visit { padding: 72px 0; background: var(--paper-2); }
.visit__grid { display: grid; gap: 18px; }
.visit__card { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r); padding: 24px 20px; }
.visit__status { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 6px 12px; border-radius: 999px; background: rgba(224,71,58,.1); color: var(--red); font-weight: 650; font-size: 14px; }
.dot-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: ping-red 1.6s infinite; }
@keyframes ping-red { 0% { box-shadow: 0 0 0 0 rgba(224,71,58,.6); } 100% { box-shadow: 0 0 0 10px rgba(224,71,58,0); } }
.visit__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.visit__actions .btn { flex: 1 1 auto; }
.facts { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--paper-2); border: 1px solid rgba(0,0,0,.12); }
.visit__map { border-radius: var(--r); overflow: hidden; border: 2px solid var(--ink); min-height: 280px; background: var(--paper); }
.visit__map iframe { width: 100%; height: 100%; min-height: 280px; border: 0; display: block; filter: grayscale(.3) contrast(1.05); }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: var(--paper); padding: 56px 0 40px; overflow: hidden; }
.foot__inner { display: grid; gap: 20px; }
.foot__big { margin: 0; font-size: 26vw; line-height: .8; font-weight: 900; letter-spacing: -.06em; color: var(--yellow); }
.foot__meta p { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.foot__meta .foot__small { font-size: 13px; font-weight: 400; color: rgba(251,246,234,.55); max-width: 60ch; }

/* ---------- Reveal defaults (only hidden once JS runs) ---------- */
.js .reveal, .js .reveal-card { opacity: 0; transform: translateY(28px); }
.js .split .w { display: inline-block; overflow: hidden; vertical-align: top; }
.js .split .w > span { display: inline-block; transform: translateY(105%); }

/* =========================================================
   DESKTOP (>=1024px): its own composition, not a stretched phone
   ========================================================= */
@media (min-width: 1024px) {
  :root { --gutter: 40px; --nav-h: 76px; }
  body { padding-bottom: 0; }
  html { scroll-padding-top: 96px; }
  .dock { display: none; }

  .topnav { height: var(--nav-h); padding: 0 var(--gutter); }
  .topnav__links { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
  .topnav.is-solid .topnav__links { background: rgba(0,0,0,.04); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
  .topnav__links a { text-decoration: none; padding: 8px 16px; border-radius: 999px; font-size: 15px; font-weight: 500; transition: background .2s, color .2s; }
  .topnav__links a:hover, .topnav__links a.is-current { background: var(--yellow); color: var(--ink); }
  .topnav .btn { display: inline-flex; }
  .topnav.is-solid .btn--chalk { background: var(--ink); color: var(--paper); }

  .h2 { font-size: clamp(52px, 5.2vw, 84px); }
  .lead { font-size: 20px; }
  .eyebrow { font-size: 14px; }

  /* Hero: blackboard + polaroid collage */
  .hero__pin {
    height: 100vh; min-height: 680px; padding: calc(var(--nav-h) + 10px) var(--gutter) 36px;
    display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 48px; align-items: stretch;
  }
  .board { padding: 16px; border-radius: 18px; }
  .board__surface { padding: 34px 48px; }
  .board__layer { left: 56px; right: 56px; }
  .chalk-title { font-size: clamp(88px, 9vw, 168px); }
  .chalk-sub { font-size: 24px; max-width: 32ch; }
  .chalk-kicker { font-size: 15px; }
  .duster { width: 150px; height: 340px; }
  .board__ledge { height: 22px; margin: 12px -16px -16px; border-radius: 0 0 18px 18px; }
  .hint-mobile { display: none; }
  .hint-desktop { display: inline; }

  .collage { display: block; position: relative; }
  .polaroid { position: absolute; margin: 0; background: #fff; padding: 12px 12px 48px; box-shadow: 0 30px 60px rgba(0,0,0,.5); width: 76%; }
  .polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; }
  .polaroid figcaption { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: var(--ink); font-weight: 500; font-size: 15px; }
  .polaroid--a { top: 2%; right: 4%; transform: rotate(5deg); }
  .polaroid--b { top: 30%; left: 0; transform: rotate(-6deg); z-index: 2; }
  .polaroid--c { bottom: 0; right: 0; transform: rotate(3deg); width: 58%; z-index: 3; }
  .polaroid::before { content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 26px; transform: translateX(-50%) rotate(-4deg); background: rgba(247,198,60,.75); }

  .ticker { padding: 20px 0; }
  .ticker__track { font-size: 34px; gap: 34px; }

  /* Circular: two columns, notice on the right */
  .circular { padding: 140px 0 120px; }
  .circular__grid { grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
  .notice { padding: 48px 44px 36px; transform: rotate(1.5deg); }
  .notice::before { left: 34px; }
  .notice > * { padding-left: 24px; }
  .notice p, .notice li { font-size: 18px; }
  .notice__title { font-size: 24px; }

  /* Term timeline: horizontal */
  .term { grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 40px 0 0; margin-top: 120px; }
  .term::before { left: 0; right: 0; top: 7px; bottom: auto; width: auto; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 16px); }
  .term::after { left: 0; top: 7px; height: 2px; width: var(--term-progress, 0%); }
  .term__dot { left: 0; top: -40px; }
  .term h3 { font-size: 26px; }

  /* Memories: pinned horizontal scroll driven by vertical scroll */
  .memories { padding: 0; }
  .memories__pin { height: 100vh; display: flex; flex-direction: column; justify-content: center; }
  .memories__head { margin-bottom: 32px; }
  .memories__head .h2 { margin: 0; }
  .memories__swipe { display: none; }
  .memories__rail { overflow: visible; scroll-snap-type: none; padding: 20px var(--gutter); gap: 36px; align-items: center; width: max-content; will-change: transform; }
  .mem { flex: 0 0 auto; width: 26vw; max-width: 420px; padding: 14px 14px 64px; }
  .mem img { aspect-ratio: 4 / 5; }
  .mem--tall { width: 24vw; }
  .mem--tall img { aspect-ratio: 3 / 4.4; }
  .mem--wide { width: 40vw; max-width: 640px; }
  .mem--wide img { aspect-ratio: 16 / 10; }
  .mem--quote { width: 30vw; min-height: 52vh; padding: 40px 36px; }
  .mem--quote blockquote { font-size: clamp(28px, 2.4vw, 40px); }
  .mem figcaption { font-size: 17px; left: 18px; bottom: 16px; }

  /* Syllabus: timetable sidebar + two-column notebook */
  .syllabus { padding: 140px 0 120px; }
  .syllabus__head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: end; margin-bottom: 56px; }
  .syllabus__head .eyebrow { grid-column: 1 / -1; margin-bottom: -40px; }
  .timetable { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
  .timetable__side { position: sticky; top: calc(var(--nav-h) + 24px); margin: 0; padding: 0; background: none; }
  .periods { flex-direction: column; overflow: visible; padding: 0; gap: 10px; }
  .period { width: 100%; padding: 16px 20px; border-radius: 16px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; }
  .period small { grid-column: 1; }
  .period strong { grid-column: 1; font-size: 22px; }
  .period .count { display: grid; place-items: center; grid-column: 2; grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 50%; background: var(--paper-2); color: var(--ink); font-weight: 700; font-size: 14px; }
  .period:hover { transform: translateX(6px); }
  .period[aria-selected="true"] { transform: translateX(10px); box-shadow: -6px 6px 0 var(--yellow); }
  .period[aria-selected="true"] .count { background: var(--yellow); }
  .timetable__note { display: block; margin-top: 28px; padding: 20px; border-radius: 16px; border: 2px dashed rgba(0,0,0,.25); }
  .timetable__note p:last-child { margin: 0; color: var(--ink-2); }

  .notebook { margin: 0; border-radius: 10px; }
  .notebook::before { left: 92px; }
  .notebook__holes { display: block; position: absolute; left: 26px; top: 40px; bottom: 40px; width: 22px; background: radial-gradient(circle at 50% 50%, var(--paper-2) 9px, transparent 10px) 0 0/22px 64px repeat-y; }
  .notebook__pages { padding: 40px 48px 48px 120px; }
  .page__title { height: 52px; font-size: 40px; }
  .page__note { font-size: 17px; }
  .page__groups { column-count: 2; column-gap: 56px; }
  .item { font-size: 17px; }

  .toppers { margin-top: 120px; }
  .toppers .h3 { font-size: 40px; }
  .toppers__grid { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; gap: 24px; }
  .topper { padding: 14px 14px 22px; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
  .topper:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 8px 12px 0 var(--ink); }
  .topper h4 { font-size: 22px; }

  /* Report card + sticky wall side by side */
  .report { padding: 140px 0; }
  .report__grid { grid-template-columns: 420px minmax(0, 1fr); gap: 80px; align-items: start; }
  .reportcard__stamp { right: -18px; top: 22px; font-size: 22px !important; }
  .reportcard { position: sticky; top: calc(var(--nav-h) + 30px); padding: 32px; box-shadow: 12px 12px 0 var(--ink); }
  .remarks__wall { grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 32px; }
  .sticky:nth-child(3n+2) { margin-top: 40px; }
  .sticky p { font-size: 19px; }

  /* Attendance: copy left, register right */
  .attendance { padding: 140px 0; }
  .attendance__grid { grid-template-columns: 1fr 480px; gap: 80px; align-items: center; }
  .attendance .h2 { font-size: clamp(60px, 6.4vw, 104px); }
  .register { padding: 36px 32px; transform: rotate(-1.5deg); }

  .visit { padding: 120px 0; }
  .visit__grid { grid-template-columns: 1fr 1.3fr; gap: 28px; align-items: stretch; }
  .visit__card { padding: 40px; }
  .visit__card .h3 { font-size: 34px; }
  .visit__actions .btn { flex: 0 0 auto; }
  .visit__map, .visit__map iframe { min-height: 440px; }

  .foot { padding: 100px 0 48px; }
  .foot__inner { grid-template-columns: 1fr auto; align-items: end; }
  .foot__big { font-size: clamp(160px, 18vw, 320px); }
  .foot__meta { text-align: right; max-width: 380px; }
}

@media (min-width: 1280px) {
  :root { --gutter: 56px; }
  .hero__pin { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 64px; }
  .timetable { grid-template-columns: 340px minmax(0, 1fr); gap: 56px; }
  .remarks__wall { grid-template-columns: repeat(3, 1fr); }
  .sticky:nth-child(3n+2) { margin-top: 56px; }
  .report__grid { grid-template-columns: 440px minmax(0, 1fr); }
}

@media (min-width: 1600px) {
  :root { --gutter: 72px; }
  .wrap { max-width: 1600px; }
  .board__surface { padding: 44px 72px; }
  .board__layer { left: 80px; right: 80px; }
  .page__groups { column-count: 3; }
  .lead { font-size: 22px; }
}

/* Short desktop windows: keep the hero from cramping */
@media (min-width: 1024px) and (max-height: 760px) {
  .chalk-title { font-size: clamp(72px, 7.5vw, 120px); }
  .chalk-sub { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .board__layer--new { clip-path: none; }
  .board__layer--old { display: none; }
}
