/* ทำเนียบศิษย์เก่าคืนสู่เหย้า — gala look: gold foil on deep night, department colours for lanes and chips. */
.alumni-page {
  --foil: linear-gradient(100deg, #fff1b8 0%, #f2c95c 28%, #b98a2c 52%, #f7dc8c 72%, #c99632 100%);
  --foil-text: linear-gradient(100deg, #fff4c4 0%, #f3cd66 35%, #d6a23c 60%, #fbe39a 100%);
  --brass: linear-gradient(180deg, #f9e7a8 0%, #e2b85a 55%, #b98b31 100%);
  --gold-line: rgba(242, 201, 92, .45);
}
html[data-theme="light"] .alumni-page { --foil-text: linear-gradient(100deg, #8a5a0c 0%, #c08a24 40%, #7a4c06 75%, #b07a1a 100%); --gold-line: rgba(160, 110, 20, .4); }
.alumni-page .wall-hero { --foil-text: linear-gradient(100deg, #fff4c4 0%, #f3cd66 35%, #d6a23c 60%, #fbe39a 100%); }

.wall-gold { background: var(--foil-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dept-chip { display: inline-flex; align-items: center; padding: .05rem .5rem; border-radius: 6px; font-family: var(--font-head); font-weight: 700; font-size: .78em; letter-spacing: .04em; line-height: 1.5; color: var(--heading); border: 1.5px solid var(--dept); background: color-mix(in srgb, var(--dept) 22%, transparent); vertical-align: .1em; }

/* ---------------------------------------------------------------- hero */
.wall-hero { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: 5.5rem 0 4.5rem; background: radial-gradient(900px 420px at 50% -10%, rgba(242, 201, 92, .28), transparent 70%), radial-gradient(700px 500px at 0% 100%, rgba(170, 84, 238, .22), transparent 70%), radial-gradient(700px 500px at 100% 100%, rgba(247, 60, 155, .18), transparent 70%), #0b0714; border-bottom: 1px solid var(--gold-line); }
.wall-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; background-image: linear-gradient(rgba(242, 201, 92, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(242, 201, 92, .07) 1px, transparent 1px); background-size: 46px 46px; mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%); }
.wall-hero-glow { position: absolute; z-index: -1; left: 50%; top: 38%; width: 720px; height: 720px; margin: -360px 0 0 -360px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, rgba(242, 201, 92, .16), transparent 30%, rgba(242, 201, 92, .12), transparent 60%, rgba(242, 201, 92, .16), transparent); filter: blur(10px); }
.motion-on .wall-hero-glow { animation: wall-spin 40s linear infinite; }
@keyframes wall-spin { to { transform: rotate(360deg); } }
/* faculty 31st-anniversary logo: navy artwork, so it sits on a white badge with a gold ring */
.wall-anniv { width: fit-content; margin: 0 auto 1.4rem; padding: 10px 12px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px rgba(242, 201, 92, .6), 0 0 0 5px rgba(242, 201, 92, .12), 0 14px 34px rgba(0, 0, 0, .5), 0 0 46px rgba(242, 201, 92, .2); }
.wall-anniv img { display: block; height: 108px; width: auto; }
.wall-eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 500; font-size: .82rem; letter-spacing: .28em; color: #f2c95c; margin-bottom: 1.1rem; }
.wall-eyebrow sup { font-size: .6em; letter-spacing: 0; }
.wall-title { font-weight: 800; font-size: clamp(2.5rem, 7vw, 5rem); line-height: 1.12; margin: 0 0 1rem; background: var(--foil-text); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 24px rgba(242, 201, 92, .25)); }
.wall-title span { display: block; font-size: .62em; letter-spacing: .12em; }
.wall-lead { max-width: 44rem; margin: 0 auto 2.4rem; color: var(--text-soft); font-size: 1.05rem; }
.wall-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; max-width: 980px; margin: 0 auto; }
.wall-stat { padding: 1.3rem .8rem 1.1rem; border-radius: 18px; border: 1px solid var(--gold-line); background: linear-gradient(180deg, rgba(242, 201, 92, .1), rgba(255, 255, 255, .02)); box-shadow: inset 0 1px 0 rgba(255, 244, 196, .15); }
.wall-stat b { display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.05; background: var(--foil-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.wall-stat span { display: block; margin-top: .35rem; font-size: .88rem; color: var(--muted); }
.wall-hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
@media (max-width: 767.98px) {
  .wall-hero { padding: 3.6rem 0 3rem; }
  .wall-eyebrow { font-size: .68rem; letter-spacing: .16em; }
  .wall-anniv { margin-bottom: 1.1rem; padding: 8px 10px; border-radius: 13px; }
  .wall-anniv img { height: 84px; }
  .wall-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .wall-hero-cta .btn { flex: 1 1 100%; }
}

/* ---------------------------------------------------------------- department race */
.race-tabs { display: flex; justify-content: center; gap: .5rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.race-tabs button { font-family: var(--font-head); font-size: .98rem; padding: .55rem 1.3rem; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--tint); color: var(--text-soft); }
.race-tabs button:hover { border-color: var(--gold); color: var(--heading); }
.race-tabs button.active { background: var(--brass); border-color: transparent; color: #2b1a02; font-weight: 600; box-shadow: 0 6px 20px rgba(201, 150, 50, .3); }
.race-board { max-width: 1020px; margin: 0 auto; padding: 1.6rem 1.8rem; border-radius: 24px; border: 1px solid var(--gold-line); background: radial-gradient(600px 200px at 0% 0%, rgba(242, 201, 92, .08), transparent 70%), var(--panel); box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.race { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.05rem; }
.race-lane { display: grid; grid-template-columns: 3rem 11.5rem minmax(0, 1fr) 7.5rem; align-items: center; gap: 1rem; }
.lane-rank { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--muted); text-align: center; }
.race-lane.is-leader .lane-rank { color: var(--gold); }
.lane-name b { display: block; font-family: var(--font-head); font-size: 1.15rem; line-height: 1.1; color: var(--heading); }
.lane-name b::before { content: ""; display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--dept); margin-right: .45rem; box-shadow: 0 0 10px var(--dept); }
.lane-name span { font-size: .82rem; color: var(--muted); }
.lane-track { position: relative; height: 22px; border-radius: 999px; background: repeating-linear-gradient(90deg, var(--tint) 0 22px, transparent 22px 44px), var(--tint); border: 1px solid var(--line); }
.lane-fill { position: absolute; inset: 0 auto 0 0; width: var(--pct); min-width: 22px; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--dept) 45%, transparent), var(--dept)); box-shadow: 0 0 18px color-mix(in srgb, var(--dept) 55%, transparent); transition: width 1.4s cubic-bezier(.2, .8, .2, 1); }
.lane-runner { position: absolute; top: 50%; left: var(--pct); transform: translate(-60%, -58%); display: flex; flex-direction: column; align-items: center; font-size: 1.45rem; line-height: 1; color: var(--heading); text-shadow: 0 2px 8px rgba(0, 0, 0, .45); transition: left 1.4s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.lane-runner .crown { font-size: .9rem; color: #f2c95c; margin-bottom: -.1rem; }
.race-lane.is-empty { opacity: .5; }
.race-lane.is-empty .lane-fill { min-width: 0; box-shadow: none; }
.race.pre .lane-fill { width: 0; }
.race.pre .lane-runner { left: 0; }
.motion-on .race:not(.pre) .is-leader .lane-runner .bi-person-walking { animation: wall-stride .5s ease-in-out infinite alternate; }
@keyframes wall-stride { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-3px) rotate(4deg); } }
.lane-count { text-align: right; line-height: 1; }
.lane-count b { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--heading); font-variant-numeric: tabular-nums; }
.lane-count span { font-size: .8rem; color: var(--muted); }
.lane-count small { display: block; margin-top: .3rem; font-size: .72rem; line-height: 1.35; color: var(--muted); }
#raceAll .race-lane { grid-template-columns: 3rem 11.5rem minmax(0, 1fr) 10rem; }
.race-lane.is-leader .lane-count b { background: var(--foil-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.race-note { margin: 1.2rem 0 0; font-size: .85rem; color: var(--muted); text-align: center; }
@media (max-width: 767.98px) {
  .race-board { padding: 1.1rem 1rem; }
  .race { gap: 1.15rem; }
  .race-lane { grid-template-columns: 2rem minmax(0, 1fr) auto; grid-template-areas: "rank name count" "track track track"; row-gap: .45rem; column-gap: .6rem; }
  .lane-rank { grid-area: rank; font-size: 1.05rem; }
  .lane-name { grid-area: name; }
  .lane-track { grid-area: track; }
  .lane-count { grid-area: count; }
  #raceAll .race-lane { grid-template-columns: 2rem minmax(0, 1fr) auto; }
  .lane-count small { max-width: 11rem; margin-left: auto; }
}

/* ---------------------------------------------------------------- podium */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 1rem; max-width: 860px; margin: 0 auto; }
.podium-step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.podium-card { position: relative; text-align: center; padding: 2.2rem .8rem 1.1rem; margin-bottom: -1px; border-radius: 18px 18px 0 0; border: 1px solid var(--gold-line); border-bottom: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--dept) 16%, transparent), transparent), var(--panel); }
.medal { position: absolute; top: -1.6rem; left: 50%; transform: translateX(-50%); width: 3.2rem; height: 3.2rem; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: #2b1a02; box-shadow: 0 6px 18px rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .55); }
.medal-gold { background: radial-gradient(circle at 35% 30%, #fff6c9, #f2c95c 45%, #b98a2c); }
.medal-silver { background: radial-gradient(circle at 35% 30%, #ffffff, #cfd6e2 45%, #8c96a8); }
.medal-bronze { background: radial-gradient(circle at 35% 30%, #ffe0c4, #d38b52 45%, #8e5126); }
.podium-year { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.25rem, 2.6vw, 1.75rem); color: var(--heading); line-height: 1.2; }
.podium-dept { margin: .3rem 0 .5rem; font-size: .9rem; color: var(--text-soft); }
.podium-count { font-size: .9rem; color: var(--muted); }
.podium-count b { font-family: var(--font-head); font-weight: 800; font-size: 2rem; background: var(--foil-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.podium-base { display: grid; place-items: center; border-radius: 0 0 6px 6px; font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; color: rgba(43, 26, 2, .55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.place-1 .podium-base { height: 140px; background: var(--brass); }
.place-2 .podium-base { height: 100px; background: linear-gradient(180deg, #f4f6fa, #c3cad6 55%, #8f98a9); }
.place-3 .podium-base { height: 72px; background: linear-gradient(180deg, #f7d3b0, #cf8a51 55%, #925428); }
.place-1 .podium-card { box-shadow: 0 -10px 40px rgba(242, 201, 92, .22); }
.motion-on .place-1 .medal { animation: wall-shine 3s ease-in-out infinite; }
@keyframes wall-shine { 0%, 100% { box-shadow: 0 6px 18px rgba(0, 0, 0, .3), 0 0 0 0 rgba(242, 201, 92, .55); } 50% { box-shadow: 0 6px 18px rgba(0, 0, 0, .3), 0 0 0 12px rgba(242, 201, 92, 0); } }
.cohort-ranks { list-style: none; max-width: 860px; margin: 1.6rem auto 0; padding: 0; display: grid; gap: .5rem; }
.cohort-ranks li { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--dept); }
.cohort-ranks .r { font-family: var(--font-head); font-weight: 700; color: var(--muted); width: 2.4rem; }
.cohort-ranks .who { flex: 1; min-width: 0; color: var(--text-soft); }
.cohort-ranks b { font-family: var(--font-head); color: var(--heading); white-space: nowrap; }
@media (max-width: 575.98px) {
  .podium { gap: .45rem; }
  .podium-card { padding: 2rem .35rem .8rem; }
  .podium-dept { font-size: .75rem; }
  .podium-count b { font-size: 1.5rem; }
  .place-1 .podium-base { height: 96px; } .place-2 .podium-base { height: 70px; } .place-3 .podium-base { height: 50px; }
  .podium-base { font-size: 1.8rem; }
}

/* ---------------------------------------------------------------- awards */
.awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; max-width: 1020px; margin: 3rem auto 0; }
.award-card { position: relative; text-align: center; padding: 1.6rem 1.2rem 1.3rem; border-radius: 18px; background: var(--panel); border: 1px solid var(--gold-line); border-top: 4px solid var(--dept); }
.award-card > i { display: inline-grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; font-size: 1.5rem; color: #2b1a02; background: var(--brass); box-shadow: 0 8px 20px rgba(201, 150, 50, .3); }
.award-card h3 { margin: .8rem 0 .5rem; font-size: 1rem; font-weight: 600; color: var(--muted); }
.award-who { color: var(--text-soft); font-size: .92rem; }
.award-value { margin: .3rem 0 .2rem; font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; color: var(--heading); }
.award-card p { margin: 0; font-size: .85rem; color: var(--muted); }

/* ---------------------------------------------------------------- the wall */
.wall-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; padding: 1rem; margin-bottom: 2rem; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); position: sticky; top: calc(var(--nav-h) + 8px); z-index: 5; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.dept-filter { display: flex; flex-wrap: wrap; gap: .4rem; flex: 1 1 auto; }
.dept-filter button { font-family: var(--font-head); font-weight: 600; font-size: .9rem; padding: .38rem .9rem; border-radius: 999px; border: 1.5px solid var(--dept, var(--line-strong)); background: transparent; color: var(--text-soft); }
.dept-filter button:hover { color: var(--heading); background: color-mix(in srgb, var(--dept, #f2c95c) 14%, transparent); }
.dept-filter button.active { color: var(--heading); background: color-mix(in srgb, var(--dept, #f2c95c) 30%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--dept, #f2c95c) 35%, transparent); }
.dept-filter button[data-dept=""].active { background: var(--brass); color: #2b1a02; border-color: transparent; }
.wall-filter .form-select { width: auto; min-width: 9rem; }
.wall-filter .form-control { width: auto; flex: 0 1 15rem; min-width: 0; }
.dept-group { margin-bottom: 2.6rem; }
.dept-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem; padding: 0 0 .7rem; margin-bottom: 1.1rem; border-bottom: 2px solid var(--dept); }
.dept-head h3 { margin: 0; font-size: 1.35rem; font-weight: 700; color: var(--heading); }
.dept-head span { color: var(--muted); font-size: .9rem; }
.cohort-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.cohort-card { display: flex; flex-direction: column; padding: 1.1rem 1.1rem .9rem; border-radius: 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--dept) 10%, transparent), transparent 40%), var(--panel); border: 1px solid var(--gold-line); }
.cohort-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.cohort-card > header small { display: block; font-size: .72rem; letter-spacing: .1em; color: var(--muted); }
.cohort-card > header b { font-family: var(--font-head); font-weight: 800; font-size: 1.9rem; line-height: 1; background: var(--foil-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cohort-count { font-family: var(--font-head); font-size: .85rem; padding: .15rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--dept) 22%, transparent); color: var(--heading); white-space: nowrap; }
.nameplates { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.nameplates li { padding: .22rem .7rem; border-radius: 6px; background: var(--brass); color: #2e1d03; font-family: var(--font-head); font-weight: 500; font-size: .9rem; line-height: 1.5; border: 1px solid rgba(90, 60, 10, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 2px 6px rgba(0, 0, 0, .18); }
.nameplates li.is-match { outline: 2px solid var(--pink); outline-offset: 2px; }
.cohort-more { margin: 0 0 .6rem; font-size: .88rem; color: var(--muted); }
.cohort-share { display: flex; align-items: center; gap: .35rem; margin-top: auto; padding-top: .7rem; border-top: 1px dashed var(--line-strong); }
.cohort-share span { flex: 1; font-size: .8rem; color: var(--muted); }
.share-btn { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--tint); color: var(--text-soft); font-size: 1rem; padding: 0; }
.share-btn:hover { color: var(--heading); border-color: var(--gold); text-decoration: none; }
.share-btn.done { color: var(--ok); border-color: var(--ok); }
.wall-empty { max-width: 560px; margin: 0 auto; text-align: center; padding: 2.4rem 1.4rem; border-radius: 18px; border: 1px dashed var(--gold-line); background: var(--tint); }
.wall-empty > i { font-size: 2.6rem; color: var(--gold); }
.wall-empty p { margin: .6rem 0 0; color: var(--muted); }
.wall-empty strong { color: var(--heading); font-weight: 600; }
@media (max-width: 767.98px) {
  .wall-filter { position: static; }
  .wall-filter .form-select, .wall-filter .form-control { flex: 1 1 45%; }
}

/* light theme touches */
html[data-theme="light"] .race-board, html[data-theme="light"] .wall-filter { box-shadow: 0 14px 40px rgba(74, 40, 110, .1); }
html[data-theme="light"] .lane-runner { text-shadow: 0 2px 6px rgba(255, 255, 255, .8); }

/* ---------------------------------------------------------------- big-screen mode (?screen=1) */
.screen-mode .site-nav, .screen-mode .site-footer, .screen-mode .skip-link { display: none !important; }
.screen-mode main { padding-top: 0 !important; }
.screen-mode .wall-hero { padding: 2.6rem 0 2.4rem; }
.screen-mode .wall-lead { display: none; }
.screen-mode .race-board { max-width: 1500px; }
.screen-mode .race-lane, .screen-mode #raceAll .race-lane { grid-template-columns: 4rem 15rem minmax(0, 1fr) 13rem; }
.screen-mode .lane-name b { font-size: 1.6rem; }
.screen-mode .lane-count b { font-size: 2.4rem; }
.screen-mode .lane-track { height: 32px; }
.screen-mode .lane-runner { font-size: 2rem; }
.screen-foot { text-align: center; color: var(--muted); padding: 1rem 0 2rem; margin: 0; }

/* ---------------------------------------------------------------- 3D flower: ดอกแก้วเจ้าจอมแห่งการคืนสู่เหย้า (alumni-bloom.js)
   Always a night scene, whatever the page theme (.dark-island keeps the dark tokens). */
.bloom-sec { position: relative; padding: 4.5rem 0 2.6rem; background: radial-gradient(1000px 420px at 50% 0%, rgba(124, 58, 237, .22), transparent 70%), #07040f; border-bottom: 1px solid var(--gold-line); }
.bloom-sec .section-head { margin-bottom: 1.6rem; }
.bloom-sec .section-head p { color: var(--text-soft); }
.bloom-stage { position: relative; height: min(78vh, 760px); min-height: 460px; overflow: hidden; background: #07040f; isolation: isolate; }
.bloom-stage canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease; }
.bloom-stage.is-ready canvas { opacity: 1; }
.bloom-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }

.bloom-label { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem .3rem .55rem; border-radius: 999px; border: 1.5px solid var(--dept); background: color-mix(in srgb, var(--dept) 24%, rgba(8, 5, 16, .78)); color: #fff; font-family: var(--font-head); line-height: 1.1; white-space: nowrap; box-shadow: 0 0 22px color-mix(in srgb, var(--dept) 50%, transparent); pointer-events: auto; cursor: pointer; opacity: 0; transition: opacity .8s ease, box-shadow .3s ease, background .3s ease; will-change: transform; }
.bloom-label.show { opacity: 1; }
.bloom-label b { font-size: 1rem; letter-spacing: .04em; }
.bloom-label span { font-weight: 600; font-size: .95rem; color: rgba(255, 255, 255, .85); font-variant-numeric: tabular-nums; }
.bloom-label i { color: #f2c95c; font-size: .9rem; }
.bloom-label:hover, .bloom-label.is-focus { background: color-mix(in srgb, var(--dept) 55%, rgba(8, 5, 16, .7)); box-shadow: 0 0 34px var(--dept); }

.bloom-tag { position: absolute; left: 0; top: 0; padding: .25rem .6rem; border-radius: 8px; border-left: 3px solid var(--dept); background: rgba(8, 5, 16, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); color: #fff; line-height: 1.2; white-space: nowrap; pointer-events: none; animation: bloom-tag 3.6s ease forwards; will-change: transform; }
.bloom-tag b { display: block; font-family: var(--font-head); font-weight: 600; font-size: .92rem; }
.bloom-tag small { display: block; font-size: .72rem; color: color-mix(in srgb, var(--dept) 45%, #fff); }
@keyframes bloom-tag { 0% { opacity: 0; margin-top: 8px; } 15% { opacity: 1; margin-top: 0; } 78% { opacity: 1; } 100% { opacity: 0; margin-top: -10px; } }

.bloom-hud { position: absolute; z-index: 3; left: 20px; top: 18px; display: flex; align-items: baseline; gap: .5rem; pointer-events: none; }
.bloom-hud b { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; background: var(--foil-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.bloom-hud span { font-size: .9rem; color: var(--text-soft); }
.bloom-demo { position: absolute; z-index: 3; left: 20px; top: 66px; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; color: #ffe0a6; background: rgba(255, 176, 32, .14); border: 1px solid rgba(255, 176, 32, .45); }
.bloom-expand { position: absolute; z-index: 4; right: 16px; top: 16px; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--gold-line); background: rgba(8, 5, 16, .6); color: var(--heading); font-family: var(--font-head); font-size: .88rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bloom-expand:hover { border-color: #f2c95c; color: #f2c95c; }
.bloom-hint { position: absolute; z-index: 3; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); margin: 0; padding: .35rem .9rem; border-radius: 999px; background: rgba(8, 5, 16, .62); color: var(--text-soft); font-size: .82rem; text-align: center; pointer-events: none; transition: opacity .6s ease; }
.bloom-hint:empty, .bloom-hint.gone { opacity: 0; }
.bloom-loading { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; align-content: center; gap: .5rem; color: #f2c95c; font-family: var(--font-head); transition: opacity .6s ease; }
.bloom-loading.done { opacity: 0; pointer-events: none; }
.bloom-fallback { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; padding: 1.5rem; color: var(--text-soft); }
.bloom-fallback i { font-size: 3rem; color: #f2c95c; }
.bloom-stage.is-fallback { height: auto; min-height: 260px; }

/* info card for the picked department */
.bloom-info { position: absolute; z-index: 4; left: 18px; bottom: 18px; width: min(350px, calc(100% - 36px)); padding: 1rem 1.1rem 1.1rem; border-radius: 18px; border: 1.5px solid var(--dept); background: linear-gradient(160deg, color-mix(in srgb, var(--dept) 26%, transparent), transparent 70%), rgba(10, 6, 20, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 0 40px color-mix(in srgb, var(--dept) 30%, transparent); color: var(--text); }
.bloom-info-head { display: flex; align-items: flex-start; gap: .55rem; }
.bloom-info-head h3 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--heading); line-height: 1.35; }
.bloom-info-head .dept-chip { flex: none; margin-top: .15rem; }
.bloom-info-close { flex: none; width: 30px; height: 30px; margin: -.3rem -.4rem 0 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.bloom-info-close:hover { background: rgba(255, 255, 255, .08); color: var(--heading); }
.bloom-info-num { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .55rem; margin: .55rem 0 .2rem; }
.bloom-info-num b { font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; line-height: 1; color: color-mix(in srgb, var(--dept) 55%, #fff); font-variant-numeric: tabular-nums; }
.bloom-info-num span { color: var(--text-soft); }
.bloom-info-num em { font-style: normal; font-family: var(--font-head); font-size: .8rem; padding: .1rem .55rem; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--text-soft); }
.bloom-info-num em.is-first { background: var(--brass); color: #2b1a02; font-weight: 600; }
.bloom-info-empty { margin: .4rem 0 0; color: var(--text-soft); font-size: .92rem; }
.bloom-info-sub { margin: .7rem 0 .25rem; font-family: var(--font-head); font-size: .78rem; letter-spacing: .08em; color: #f2c95c; }
.bloom-info-cohorts { list-style: none; margin: 0; padding: 0; }
.bloom-info-cohorts li { display: flex; justify-content: space-between; gap: 1rem; padding: .28rem 0; border-top: 1px dashed var(--line); font-size: .92rem; }
.bloom-info-cohorts b { font-family: var(--font-head); color: var(--heading); }
.bloom-info-go { margin-top: .85rem; width: 100%; }

/* department buttons under the stage */
.bloom-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-top: 1.3rem; }
.bloom-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--dept) 60%, transparent); background: color-mix(in srgb, var(--dept) 12%, transparent); color: var(--text-soft); font-size: .9rem; transition: background .2s ease, box-shadow .2s ease; }
.bloom-chip .dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--dept); box-shadow: 0 0 10px var(--dept); }
.bloom-chip b { font-family: var(--font-head); color: var(--heading); letter-spacing: .04em; }
.bloom-chip .n { font-family: var(--font-head); font-weight: 600; color: var(--heading); font-variant-numeric: tabular-nums; }
.bloom-chip:hover, .bloom-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--dept) 32%, transparent); box-shadow: 0 0 20px color-mix(in srgb, var(--dept) 45%, transparent); }

/* full screen (works on iPhone too, where element fullscreen is not available) */
.bloom-sec.is-expanded .bloom-stage { position: fixed; inset: 0; z-index: 1090; height: 100vh; height: 100dvh; min-height: 0; }
body.bloom-lock { overflow: hidden; }

@media (max-width: 767.98px) {
  .bloom-sec { padding-top: 3.2rem; }
  .bloom-stage { height: min(118vw, 620px); min-height: 400px; }
  .bloom-hud { left: 14px; top: 14px; flex-direction: column; gap: .1rem; }
  .bloom-hud span { font-size: .78rem; }
  .bloom-demo { left: 14px; top: 74px; }
  .bloom-expand { right: 12px; top: 12px; }
  .bloom-label { padding: .2rem .55rem .2rem .45rem; gap: .3rem; }
  .bloom-label b { font-size: .85rem; }
  .bloom-label span { font-size: .8rem; }
  .bloom-tag b { font-size: .8rem; }
  .bloom-info { left: 10px; right: 10px; bottom: 10px; width: auto; padding: .75rem .85rem .8rem; border-radius: 14px; }
  .bloom-info-head h3 { font-size: .95rem; }
  .bloom-info-num { margin: .35rem 0 0; }
  .bloom-info-num b { font-size: 1.7rem; }
  .bloom-info-sub { margin: .45rem 0 .3rem; }
  .bloom-info-cohorts { display: flex; flex-wrap: wrap; gap: .3rem; }
  .bloom-info-cohorts li { gap: .35rem; padding: .12rem .55rem; border: 1px solid var(--line); border-radius: 999px; font-size: .76rem; }
  .bloom-info-go { margin-top: .6rem; padding-top: .3rem; padding-bottom: .3rem; }
  .bloom-chip { padding: .38rem .7rem; font-size: .82rem; }
  .bloom-chip .nm { display: none; }
}
.screen-mode .bloom-sec { padding-top: 2rem; }
.screen-mode .bloom-stage { height: 74vh; }
.screen-mode .bloom-expand { display: none; }
.screen-mode .bloom-label b { font-size: 1.5rem; }
.screen-mode .bloom-label span { font-size: 1.35rem; }
.screen-mode .bloom-tag b { font-size: 1.2rem; }
.screen-mode .bloom-info { width: 420px; }
