:root {
  --pink: #d45d8c;
  --pink-dark: #b03f6c;
  --pink-soft: #fde8f0;
  --ink: #1f2433;
  --ink-soft: #5a6072;
  --line: #ecdfe5;
  --bg: #fff7fa;
  --card: #ffffff;
  --yellow: #f8e29a;
  --blue: #d5e0fb;
  --rose: #f6c6dc;
  --mint: #d9f0e2;
  --navy: #1b2a5a;
  --radius: 28px;
  --shadow: 0 18px 40px -18px rgba(120, 40, 80, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Kanit", system-ui, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--pink-dark); }
h1, h2, h3, h4 { font-weight: 600; margin: 0; line-height: 1.2; }
p { line-height: 1.75; }

/* ---------- background molecules ---------- */
.bg-molecules {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(212, 93, 140, .10) 0 120px, transparent 121px),
    radial-gradient(circle at 88% 8%, rgba(248, 226, 154, .45) 0 160px, transparent 161px),
    radial-gradient(circle at 92% 72%, rgba(213, 224, 251, .6) 0 180px, transparent 181px),
    radial-gradient(circle at 5% 85%, rgba(217, 240, 226, .7) 0 150px, transparent 151px),
    var(--bg);
}

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1200px; margin: 0 auto; padding: 20px 20px 0;
}
.wordmark { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
/* logo is a JPEG on white — multiply lets the page background show through */
.logo { height: 104px; width: auto; margin: -14px 0 -14px -10px; mix-blend-mode: multiply; }
@media (max-width: 600px) { .logo { height: 76px; margin: -10px 0 -10px -8px; } }
.topbar-dept { text-align: right; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* ---------- hero ---------- */
.hero {
  max-width: 1200px; margin: 0 auto; padding: 32px 20px 24px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--pink); color: #fff; font-weight: 500; font-size: 14px;
  padding: 6px 16px; border-radius: 999px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.hero h1 {
  font-size: clamp(38px, 6vw, 68px); font-weight: 700; margin: 18px 0 6px; letter-spacing: -.01em;
}
.hero h1 .accent { color: var(--pink); display: block; }
.hero-th { font-size: clamp(18px, 2.4vw, 22px); font-weight: 400; color: var(--ink-soft); margin: 0 0 18px; }
.hero-lead { color: var(--ink-soft); margin: 0 0 26px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 13px 24px; border-radius: 999px; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 10px 22px -10px var(--pink); }
.btn-primary:hover { background: var(--pink-dark); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--pink); color: var(--pink-dark); }

.slideshow {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3; box-shadow: var(--shadow); background: #eee;
}
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease;
}
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.slide.active { opacity: 1; }
.slide.active img { animation: kenburns 7s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.12) translate(1%, 1%); } to { transform: scale(1.0) translate(0, 0); } }
.slide-caption {
  position: absolute; left: 16px; bottom: 16px; right: 16px;
  color: #fff; font-weight: 500; font-size: 15px; text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.slide-dots { position: absolute; right: 16px; top: 16px; display: flex; gap: 6px; }
.slide-dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; cursor: pointer;
  background: rgba(255,255,255,.55); transition: width .3s;
}
.slide-dots button.active { width: 26px; background: #fff; }

/* ---------- facts ---------- */
.facts {
  max-width: 1200px; margin: 8px auto 0; padding: 0 20px;
}
.facts-inner {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(6, 1fr); padding: 22px 10px;
}
.fact { text-align: center; padding: 6px 8px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact-num { font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; color: var(--navy); line-height: 1.1; }
.fact-label { font-size: 13px; color: var(--ink-soft); }

/* ---------- explore cards ---------- */
.explore { max-width: 1000px; margin: 0 auto; padding: 56px 20px 40px; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 36px); }
.section-head p { color: var(--ink-soft); margin: 6px 0 0; }
.cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}
.card {
  position: relative; border: 0; cursor: pointer; text-align: left; font: inherit; color: inherit;
  border-radius: var(--radius); padding: 22px; min-height: 280px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.9,.3,1.3), box-shadow .25s;
  animation: cardIn .7s backwards;
}
.card:nth-child(2) { animation-delay: .08s; }
.card:nth-child(3) { animation-delay: .16s; }
.card:nth-child(4) { animation-delay: .24s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.card:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: 0 28px 50px -20px rgba(120,40,80,.45); }
.card:active { transform: scale(.98); }
.card:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }
.card-yellow { background: var(--yellow); }
.card-blue { background: var(--blue); }
.card-rose { background: var(--rose); }
.card-mint { background: var(--mint); }
.card-art { flex: 1; display: grid; place-items: center; padding: 6px 0 10px; }
.card-art svg { width: min(240px, 80%); height: auto; overflow: visible; }
.card-tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,255,255,.7); padding: 4px 10px; border-radius: 99px; margin-bottom: 8px;
}
.card h3 { font-size: 22px; }
.card p { margin: 4px 0 0; font-size: 14px; color: #4b4f5c; line-height: 1.5; }
.card-go {
  position: absolute; right: 18px; bottom: 18px; width: 42px; height: 42px; border-radius: 50%;
  background: #fff; display: grid; place-items: center; font-size: 20px; transition: transform .2s;
}
.card:hover .card-go { transform: translateX(4px); }

/* card art animations */
.bubble { animation: rise 2.6s ease-in infinite; }
.bubble.b2 { animation-delay: .8s; } .bubble.b3 { animation-delay: 1.6s; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }
.eyes { animation: look 4s ease-in-out infinite; transform-origin: center; }
@keyframes look { 0%, 40%, 100% { transform: translateX(0); } 50%, 80% { transform: translateX(-6px); } }
.flash { animation: flash 3s infinite; }
@keyframes flash { 0%, 88%, 100% { opacity: 0; } 92% { opacity: .9; } }
.game-title { font-family: "Press Start 2P", monospace; }
.sparkle { animation: twinkle 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sparkle.s2 { animation-delay: .9s; }
@keyframes twinkle { 50% { transform: scale(.4); opacity: .4; } }
.cursor-bob { animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-4px, -4px); } }
.orbit { transform-box: view-box; transform-origin: 120px 100px; animation: spin 6s linear infinite; }
.orbit.o2 { animation-duration: 9s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.nucleus-pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }

/* ---------- footer ---------- */
.footer {
  max-width: 1200px; margin: 20px auto 0; padding: 30px 20px 40px; text-align: center;
  color: var(--ink-soft); font-size: 14px;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-bottom: 10px; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; display: none;
  align-items: center; justify-content: center; padding: 24px;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(31, 20, 40, .55); backdrop-filter: blur(4px);
  animation: fadeIn .25s;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal-panel {
  position: relative; width: min(980px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  background: #fff; border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5);
  animation: popIn .38s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes popIn { from { opacity: 0; transform: scale(.85) translateY(30px); } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; flex-shrink: 0;
}
.modal-head h2 { font-size: 22px; }
.modal-head .sub { font-size: 13px; color: var(--ink-soft); }
.modal-close {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; flex-shrink: 0;
  background: rgba(255,255,255,.85); font-size: 22px; line-height: 1; color: var(--ink);
}
.modal-close:hover { background: #fff; transform: rotate(90deg); transition: transform .2s; }
.modal-body { overflow-y: auto; padding: 0 22px 26px; -webkit-overflow-scrolling: touch; }
.modal-yellow .modal-head { background: var(--yellow); }
.modal-blue .modal-head { background: var(--blue); }
.modal-rose .modal-head { background: var(--rose); }
.modal-mint .modal-head { background: var(--mint); }

/* tabs */
.tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 14px 22px; margin: 0 -22px 6px;
  position: sticky; top: 0; background: #fff; z-index: 2; border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 500;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--ink-soft);
}
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab-panel { display: none; animation: fadeIn .3s; }
.tab-panel.active { display: block; }

/* info content */
.info h3 { font-size: 20px; margin: 22px 0 10px; }
.info h4 { font-size: 16px; margin: 16px 0 6px; }
.info p { margin: 8px 0; color: #3d4252; }
.quote {
  background: var(--pink-soft); border-left: 5px solid var(--pink); border-radius: 14px;
  padding: 16px 20px; font-size: 17px; font-weight: 400; color: var(--pink-dark); margin: 12px 0;
}
.goal-grid, .prog-grid, .round-grid, .career-grid {
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.goal {
  background: #fafafc; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px;
  display: flex; gap: 12px; align-items: flex-start; font-size: 15px;
}
.goal b { background: var(--pink); color: #fff; min-width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; }
.prog {
  border-radius: 20px; padding: 18px; border: 1px solid var(--line); background: #fff;
}
.prog .cr { font-size: 38px; font-weight: 700; color: var(--navy); line-height: 1; }
.prog .cr small { font-size: 14px; font-weight: 400; color: var(--ink-soft); }
.prog h4 { margin: 8px 0 4px; }
.prog p { font-size: 14px; margin: 0; }
.prog.hl { background: linear-gradient(135deg, #fff6d6, #fde8f0); border-color: #f2d48a; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip { background: #f3f4f8; border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.chip.pink { background: var(--pink-soft); color: var(--pink-dark); }
.note { font-size: 13px; color: #c0392b; }
.bar-stack { display: flex; height: 34px; border-radius: 12px; overflow: hidden; margin: 10px 0 6px; font-size: 13px; font-weight: 500; }
.bar-stack div { display: grid; place-items: center; color: #fff; white-space: nowrap; padding: 0 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-soft); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

table.plan { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plan th, table.plan td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.plan th { background: #faf3f6; font-weight: 600; }
table.plan td:last-child, table.plan th:last-child { text-align: right; white-space: nowrap; }
table.plan td.code { color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.plan tr.honor td { color: #d35400; font-style: italic; }
table.plan tr.total td { font-weight: 600; border-bottom: 0; }
.year-switch { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.year-switch button {
  border: 0; font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 14px; cursor: pointer;
  background: #f3f4f8; color: var(--ink-soft);
}
.year-switch button.active { background: var(--pink); color: #fff; }
.sem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sem { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.sem-title { padding: 10px 12px; font-weight: 600; background: var(--pink-soft); display: flex; justify-content: space-between; }

.round {
  border-radius: 20px; padding: 18px; color: #fff; position: relative; overflow: hidden;
}
.round .seats { font-size: 40px; font-weight: 700; line-height: 1; }
.round .seats small { font-size: 15px; font-weight: 400; }
.round h4 { margin: 6px 0; font-size: 18px; }
.round ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.r1 { background: #f0a500; } .r2 { background: #e8684a; } .r3 { background: #2ea3a7; } .r4 { background: #24689b; }
.alert {
  display: flex; gap: 12px; align-items: center; background: #fff4d6; border: 1px solid #f3d27a;
  border-radius: 16px; padding: 12px 16px; margin: 14px 0; font-size: 15px;
}
.alert b { color: #a86b00; }
.timeline { list-style: none; padding: 0; margin: 10px 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 30px; }
.timeline li::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: -8px; width: 2px; background: var(--line);
}
.timeline li:last-child::before { display: none; }
.timeline li::after {
  content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 4px solid var(--pink);
}
.timeline b { display: block; }
.timeline span { font-size: 14px; color: var(--ink-soft); }

.career-col { border-radius: 20px; padding: 16px 18px; background: #f7f8fc; }
.career-col h4 { margin: 0 0 8px; }
.career-col ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.8; }

.links-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- survey modal ---------- */
.survey { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; padding-top: 22px; }
.qr-frame {
  border: 4px solid var(--pink); border-radius: 26px; padding: 18px; background: #fff;
  box-shadow: 0 16px 40px -18px var(--pink);
}
.qr-frame img { width: 100%; aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; }
.survey h3 { font-size: 28px; }
.survey h3 span { color: var(--pink); }
.survey-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.survey-list { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.survey-list li { display: flex; gap: 12px; align-items: flex-start; }
.survey-list b {
  min-width: 28px; height: 28px; border-radius: 50%; background: var(--pink); color: #fff;
  display: grid; place-items: center; font-size: 14px;
}
.survey-list small { display: block; color: var(--ink-soft); font-size: 13px; }

/* ---------- quiz ---------- */
.quiz { max-width: 640px; margin: 0 auto; padding-top: 22px; text-align: center; }
.quiz-start h3 { font-size: 26px; margin: 10px 0; }
.quiz-progress { height: 10px; background: #f3e6ec; border-radius: 99px; overflow: hidden; margin: 6px 0 18px; }
.quiz-progress div { height: 100%; background: var(--pink); width: 0; transition: width .4s; }
.quiz-top { display: flex; justify-content: space-between; font-weight: 500; color: var(--ink-soft); font-size: 14px; }
.quiz-q { font-size: 21px; font-weight: 500; margin: 6px 0 18px; min-height: 2.6em; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt {
  font: inherit; font-size: 17px; text-align: left; padding: 15px 18px; border-radius: 16px; cursor: pointer;
  border: 2px solid var(--line); background: #fff; transition: transform .1s, border-color .15s, background .15s;
  display: flex; gap: 12px; align-items: center;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--pink); }
.quiz-opt:active:not(:disabled) { transform: scale(.98); }
.quiz-opt .k {
  min-width: 30px; height: 30px; border-radius: 9px; background: #f3f4f8; display: grid; place-items: center; font-weight: 600;
}
.quiz-opt.correct { background: #e3f7ea; border-color: #2ecc71; }
.quiz-opt.correct .k { background: #2ecc71; color: #fff; }
.quiz-opt.wrong { background: #fdeaea; border-color: #e74c3c; animation: shake .35s; }
.quiz-opt.wrong .k { background: #e74c3c; color: #fff; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.quiz-explain { margin-top: 14px; padding: 12px 16px; background: #f7f8fc; border-radius: 14px; text-align: left; font-size: 15px; display: none; }
.quiz-explain.show { display: block; animation: fadeIn .3s; }
.quiz-next { margin-top: 16px; display: none; }
.quiz-next.show { display: inline-flex; }
.quiz-result .score { font-size: 72px; font-weight: 700; color: var(--pink); line-height: 1; margin: 12px 0 4px; }
.quiz-result .rank { font-size: 22px; font-weight: 600; }
.streak { color: #e67e22; font-weight: 600; }
.confetti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 100; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- atom game ---------- */
.modal-game .modal-panel { width: min(1100px, 100%); height: calc(100dvh - 48px); max-height: none; }
.modal-game .modal-body { padding: 0; flex: 1; display: flex; overflow: hidden; }
.game-wrap { position: relative; flex: 1; background: radial-gradient(circle at 50% 40%, #213063, #0f1733 70%); overflow: hidden; }
#atomCanvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.hud { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; }
.el-card {
  background: rgba(255,255,255,.95); border-radius: 16px; padding: 8px 12px; min-width: 112px;
  display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: center;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); transition: transform .2s;
}
.el-card.bump { animation: bump .45s; }
@keyframes bump { 40% { transform: scale(1.18); } }
.el-z { font-size: 12px; color: var(--ink-soft); grid-column: 1 / -1; }
.el-sym { font-size: 38px; font-weight: 700; line-height: 1; color: var(--navy); }
.el-name { font-size: 14px; font-weight: 500; line-height: 1.2; }
.el-iso { font-size: 12px; color: var(--ink-soft); }
.hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hud-box {
  background: rgba(255,255,255,.14); color: #fff; border-radius: 12px; padding: 6px 12px;
  font-weight: 500; font-size: 15px; backdrop-filter: blur(4px);
}
.hud-box.warn { background: #e74c3c; animation: blink .6s infinite; }
.stab { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(320px, 70%); pointer-events: none; text-align: center; color: #fff; font-size: 13px; }
.stab-bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; margin-top: 4px; }
.stab-bar div { height: 100%; width: 0; background: linear-gradient(90deg, #f1c40f, #e74c3c); transition: width .1s; }
.game-toast {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%);
  color: #fff; font-weight: 600; font-size: 22px; text-align: center; pointer-events: none;
  text-shadow: 0 3px 12px rgba(0,0,0,.6); opacity: 0;
}
.game-toast.show { animation: toast 1.4s ease-out; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.8); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%); } }
.game-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 20px;
  background: rgba(10, 15, 40, .72); color: #fff; text-align: center;
}
.game-overlay[hidden] { display: none; }
.game-overlay .box { max-width: 460px; }
.game-overlay h3 { font-size: 30px; margin-bottom: 8px; }
.game-overlay p { color: #d6dcf0; margin: 6px 0; }
.legend-row { display: flex; justify-content: center; gap: 18px; margin: 16px 0; flex-wrap: wrap; font-size: 15px; }
.legend-row span { display: inline-flex; align-items: center; gap: 8px; }
.ball { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; }
.ball.p { background: #ef4b5f; } .ball.n { background: #9aa3b5; } .ball.g { background: #b46cff; box-shadow: 0 0 10px #b46cff; }
.big-el { font-size: 84px; font-weight: 700; line-height: 1; margin: 10px 0; color: #ffd36b; }

/* ---------- scholarships ---------- */
.sch-hero {
  display: flex; gap: 16px; align-items: center; margin-top: 18px; padding: 18px 20px; border-radius: 22px;
  background: linear-gradient(120deg, #fff3c4, #fde8f0 60%, #e7defa);
}
.sch-hero-emoji { font-size: 44px; }
.cover-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-soft); margin: 12px 2px 0; }
.sch-feature { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sch-span { grid-column: 1 / -1; }
.sch-card { border-radius: 22px; overflow: hidden; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.sch-band { display: flex; gap: 12px; align-items: center; padding: 14px 16px; color: #fff; }
.sch-band h4 { margin: 0; font-size: 18px; }
.sch-band small { opacity: .9; font-size: 12px; line-height: 1.4; display: block; }
.sch-icon { font-size: 30px; width: 50px; height: 50px; border-radius: 16px; background: rgba(255,255,255,.25); display: grid; place-items: center; flex-shrink: 0; }
.sch-gold .sch-band { background: linear-gradient(120deg, #e8a20c, #f3c64a); }
.sch-pink .sch-band { background: linear-gradient(120deg, #c9467a, #e57aa5); }
.sch-blue .sch-band { background: linear-gradient(120deg, #2f6fd6, #5d9bf0); }
.sch-navy .sch-band { background: linear-gradient(120deg, #1b2a5a, #3a4f8f); }
.sch-body { padding: 14px 16px 16px; flex: 1; }
.sch-big { font-size: 34px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.sch-big small { font-size: 15px; font-weight: 500; color: var(--ink-soft); }
.sch-big span { display: block; font-size: 13px; font-weight: 400; color: var(--ink-soft); }
.sch-gold .sch-big { color: #b07800; }
.sch-pink .sch-big { color: var(--pink-dark); }
.sch-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.sch-tiles div { background: #fff8e6; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; }
.sch-tiles b { font-size: 22px; }
.sch-tiles strong { font-size: 18px; color: #7a5400; }
.sch-tiles span { font-size: 12px; color: var(--ink-soft); line-height: 1.35; }
.sch-req { margin: 10px 0 0; padding: 0; list-style: none; font-size: 14px; }
.sch-req li { padding: 4px 0 4px 24px; position: relative; }
.sch-req li::before { content: "✓"; position: absolute; left: 4px; color: var(--pink); font-weight: 700; }
.sch-covers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sch-covers span { background: #f1f6ff; color: #29457a; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 500; }
.sch-note { font-size: 13px; color: var(--ink-soft); margin: 10px 0 0; }
.sch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sch-mini { border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; background: #fff; }
.sch-mini h4 { margin: 0; font-size: 15px; }
.sch-mini > small { display: block; color: var(--ink-soft); font-size: 12px; margin-top: 4px; }
.sch-mini-hl { background: linear-gradient(160deg, #f3fbf6, #fff); }
.sch-count { font-size: 30px; font-weight: 700; color: #1a9e5c; margin: 4px 0; }
.sch-count small { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.rank-row { display: flex; flex-direction: column; font-size: 13px; margin: 6px 0; }
.rank-row span { font-weight: 600; }
.r12 { color: #b07800; } .r34 { color: #7f889c; }
.sch-contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sch-contacts div { background: #f7f8fc; border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.sch-contacts b { font-size: 16px; }
.sch-contacts a { font-weight: 500; text-decoration: none; }
@media (max-width: 700px) {
  .sch-feature { grid-template-columns: 1fr; }
  .sch-tiles { grid-template-columns: repeat(2, 1fr); }
  .sch-contacts { grid-template-columns: 1fr; }
}

/* ---------- 5th card (wide) ---------- */
.card-lilac { background: #e7defa; }
.modal-lilac .modal-head { background: #e7defa; }
.card-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 20px; min-height: 200px; }
.card-wide .card-art { flex: 0 0 46%; }
.card-wide .card-art svg { width: 100%; max-width: 320px; }
.card-wide > div:nth-child(2) { flex: 1; padding-right: 40px; }
.fall { animation: drop 2.4s ease-in infinite; }
.fall.f2 { animation-delay: .8s; } .fall.f3 { animation-delay: 1.6s; }
@keyframes drop { 0% { transform: translateY(-30px); opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(50px); opacity: 0; } }

/* ---------- pH Rush ---------- */
.ph-wrap {
  position: relative; flex: 1; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, #f7f3ff 0%, #fff 70%); user-select: none; -webkit-user-select: none;
}
.ph-hud { display: flex; justify-content: center; gap: 8px; padding: 10px 12px 0; flex-wrap: wrap; }
.hud-pill { background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 600; box-shadow: 0 4px 12px -6px rgba(0,0,0,.25); }
.hud-pill.combo { color: #e67e22; }
.ph-area { position: relative; flex: 1; touch-action: none; min-height: 220px; }
.ph-item {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  background: #fff; border: 3px solid #d9cdf5; border-radius: 22px; padding: 10px 18px;
  display: flex; flex-direction: column; align-items: center; min-width: 150px; max-width: 80%;
  box-shadow: 0 14px 30px -14px rgba(60, 30, 120, .45); text-align: center;
}
.ph-item.into, .ph-item.wrong { transition: transform .55s cubic-bezier(.5, -0.2, .7, 1), background .2s, opacity .55s; opacity: .2; color: #fff; }
.ph-item.gone { display: none; }
.ph-emoji { font-size: 46px; line-height: 1.1; }
.ph-name { font-weight: 600; font-size: 16px; }
.ph-feedback {
  position: absolute; left: 12px; right: 12px; top: 30%; text-align: center; pointer-events: none;
  background: rgba(255,255,255,.96); border-radius: 18px; padding: 12px 16px; box-shadow: 0 12px 30px -14px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; font-size: 16px;
}
.ph-feedback.show { opacity: 1; transform: none; }
.ph-feedback small { display: block; color: var(--ink-soft); margin-top: 4px; font-size: 14px; }
.ph-feedback .good { color: #1e9e57; font-size: 20px; }
.ph-feedback .bad { color: #e74c3c; font-size: 20px; }
.ph-scale { padding: 4px 16px 0; }
.ph-strip { position: relative; height: 14px; border-radius: 99px; }
.ph-marker {
  position: absolute; top: 50%; width: 26px; height: 26px; border-radius: 50%; border: 4px solid #fff;
  transform: translate(-50%, -50%) scale(0); box-shadow: 0 2px 8px rgba(0,0,0,.4); transition: left .4s, transform .3s;
}
.ph-marker.show { transform: translate(-50%, -50%) scale(1); }
.ph-ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); padding: 2px 2px 0; }
.ph-bins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 8px 12px 14px; }
.ph-bin {
  border: 0; border-radius: 20px 20px 26px 26px; padding: 16px 6px; font: inherit; cursor: pointer; color: #fff;
  display: flex; flex-direction: column; align-items: center; transition: transform .12s;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.15);
}
.ph-bin b { font-size: 22px; font-weight: 700; }
.ph-bin small { font-size: 13px; opacity: .9; }
.ph-bin:active { transform: scale(.95); }
.ph-bin.acid { background: linear-gradient(160deg, #f26724, #e0303b); }
.ph-bin.neutral { background: linear-gradient(160deg, #4db848, #1a9e5c); }
.ph-bin.base { background: linear-gradient(160deg, #4690cd, #5a3fa0); }
.ph-bin.pop { animation: bump .45s; }
.ph-bin.shake { animation: shake .35s 2; }
.ph-bin.hint { outline: 4px solid #ffd36b; outline-offset: 3px; }
.ph-overlay { z-index: 5; }
.ph-rules { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.ph-rules span { padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; color: #fff; }
.r-acid { background: #e0303b; } .r-neutral { background: #1a9e5c; } .r-base { background: #4b5fc0; }
.ph-final { font-size: 64px; font-weight: 700; color: #ffd36b; line-height: 1; margin: 8px 0; }

/* ---------- leaderboard ---------- */
.lb-wrap { margin: 14px auto; max-width: 420px; }
table.lb { width: 100%; border-collapse: collapse; font-size: 15px; text-align: left; }
table.lb th { font-size: 12px; font-weight: 500; opacity: .7; padding: 4px 10px; }
table.lb td { padding: 8px 10px; border-top: 1px solid rgba(128, 128, 150, .2); }
table.lb td:first-child { width: 44px; text-align: center; font-weight: 600; }
table.lb .lb-name { font-weight: 500; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.lb tr.me td { background: rgba(212, 93, 140, .22); }
table.lb tr.me td:first-child { border-radius: 10px 0 0 10px; }
table.lb tr.me td:last-child { border-radius: 0 10px 10px 0; }
table.lb small { opacity: .7; }
.lb-empty { opacity: .75; padding: 16px 0; }
.lb-qualify { font-weight: 600; color: var(--pink); }
.game-overlay .lb-qualify { color: #ffd36b; }
.name-form { display: flex; gap: 8px; justify-content: center; margin: 8px auto; max-width: 360px; }
.name-form input {
  flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 11px 16px; border-radius: 999px;
  border: 2px solid var(--line); outline: none; color: var(--ink); background: #fff;
}
.name-form input:focus { border-color: var(--pink); }
.lb-clear {
  display: block; margin: 18px auto 0; background: none; border: 0; font: inherit; font-size: 12px;
  color: inherit; opacity: .45; text-decoration: underline; cursor: pointer;
}
.game-overlay { overflow-y: auto; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 22px; }
  .hero-visual { order: -1; }
  .slideshow { aspect-ratio: 16 / 10; }
  .facts-inner { grid-template-columns: repeat(3, 1fr); row-gap: 16px; }
  .fact:nth-child(3) { border-right: 0; }
  .survey { grid-template-columns: 1fr; }
  .qr-frame { max-width: 320px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .topbar-dept { display: none; }
  .cards { gap: 14px; }
  .card { min-height: 220px; padding: 16px; border-radius: 22px; }
  .card h3 { font-size: 18px; }
  .card p { display: none; }
  .card-go { width: 34px; height: 34px; right: 12px; bottom: 12px; font-size: 16px; }
  .card-tag { font-size: 10px; }
  .modal { padding: 0; }
  .modal-panel { border-radius: 0; width: 100%; height: 100%; max-height: none; }
  .modal-game .modal-panel { height: 100%; }
  .modal-body { padding: 0 16px 24px; }
  .tabs { margin: 0 -16px 6px; padding: 12px 16px; }
  .sem-grid { grid-template-columns: 1fr; }
  .el-sym { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
