:root {
  --burgundy: #6b0e55;
  --burgundy-deep: #1a0515;
  --ink: #0d030a;
  --orchid: #9c3f84;
  --gold: #e9c46a;
  --gold-soft: #f3dfa2;
  --cream: #fff7f2;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
  font-family: Manrope, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button, input { font-family: inherit; }

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: radial-gradient(1100px 760px at 50% 62%, #3a0b31 0%, #1a0515 48%, #0d030a 100%);
}

.campus, .scrim, .cone, .floor-glow, .mesh, .sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.campus {
  background: url("/wall/bg/campus.jpg") center 40% / cover no-repeat;
  transform: scale(1.04);
  filter: saturate(.88) brightness(.62);
}

.scrim {
  background:
    linear-gradient(90deg, rgba(18,4,14,.94) 0%, rgba(26,5,21,.72) 30%, rgba(42,8,34,.38) 50%, rgba(26,5,21,.72) 70%, rgba(18,4,14,.94) 100%),
    linear-gradient(180deg, rgba(13,3,10,.55) 0%, rgba(13,3,10,0) 30%, rgba(13,3,10,.2) 70%, rgba(13,3,10,.92) 100%);
}

.cone {
  left: 50%;
  top: -16vh;
  width: 52vw;
  height: 120vh;
  transform: translateX(-50%);
  background: conic-gradient(from 180deg at 50% 0%, transparent 0deg, transparent 150deg, rgba(243,223,162,.08) 168deg, rgba(243,223,162,.2) 180deg, rgba(243,223,162,.08) 192deg, transparent 210deg, transparent 360deg);
}

.floor-glow {
  left: 50%;
  top: auto;
  bottom: 7vh;
  width: 44vw;
  height: 12vh;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(233,196,106,.32), rgba(107,14,85,.25) 55%, transparent);
}

.mesh {
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(900px 600px at 50% 55%, #000 0%, transparent 75%);
  mask-image: radial-gradient(900px 600px at 50% 55%, #000 0%, transparent 75%);
}

.spark {
  position: absolute;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 12px var(--gold);
  animation: drift linear infinite;
}

.topbar {
  position: absolute;
  z-index: 6;
  left: max(4vw, env(safe-area-inset-left));
  right: max(4vw, env(safe-area-inset-right));
  top: max(3.6vh, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.brand-lockup { display: flex; align-items: center; gap: 1.1rem; min-width: 0; }

.brand-mark {
  width: 3.1rem;
  height: 3.1rem;
  flex: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, var(--gold-soft), var(--gold) 42%, transparent 43%),
    linear-gradient(145deg, var(--orchid), var(--burgundy));
  box-shadow: 0 0 0 1px rgba(243,223,162,.35);
}

.brand-text { min-width: 0; }
.brand-text strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 2vw, 2.35rem);
  line-height: 1;
  letter-spacing: .2px;
}
.brand-text span {
  display: block;
  margin-top: .35rem;
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
}
.brand-text .year-mini { display: none; }

.pills {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(243,223,162,.18);
}
.pills span {
  padding: .55rem 1.15rem;
  border-radius: 999px;
  font-size: .92rem;
  color: rgba(255,247,242,.72);
  white-space: nowrap;
}
.pills .on {
  font-weight: 700;
  color: #1a0515;
  background: linear-gradient(120deg, #F3DFA2, #D9B45A);
}

.year-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem 1.05rem;
  border-radius: 999px;
  background: rgba(107,14,85,.55);
  border: 1px solid rgba(243,223,162,.3);
  color: var(--gold-soft);
  letter-spacing: .14em;
  font-size: .92rem;
  white-space: nowrap;
}
.live {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-soft);
  animation: livedot 1.4s ease-in-out infinite;
}

.rank-ghost {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 1vh;
  transform: translateX(-50%);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(8rem, 28vw, 28rem);
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 2px rgba(233,196,106,.28);
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
}

.board {
  position: absolute;
  z-index: 3;
  left: max(4vw, env(safe-area-inset-left));
  right: max(4vw, env(safe-area-inset-right));
  top: 14vh;
  bottom: 16vh;
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) minmax(260px, .9fr) minmax(240px, 1fr);
  gap: 1.4vw;
  align-items: center;
}

.col-left { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.chip, .place {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: .78rem;
}
.chip {
  border: 1px solid rgba(233,196,106,.55);
  background: rgba(233,196,106,.08);
  color: var(--gold-soft);
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.place { background: linear-gradient(120deg, #F3DFA2, #D9B45A); color: #1a0515; letter-spacing: .04em; }

.person-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 4.6vw, 5.6rem);
  line-height: .92;
  letter-spacing: -.02em;
  text-shadow: 0 6px 40px rgba(0,0,0,.55);
}
.person-name em { font-style: normal; color: var(--gold-soft); }

.person-meta {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: clamp(1rem, 1.2vw, 1.35rem);
  color: rgba(255,247,242,.86);
}
.person-meta i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

.gpa-row { display: flex; align-items: flex-end; gap: .8rem; margin-top: .4rem; }
.gpa-num {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(4.2rem, 7.2vw, 8.4rem);
  line-height: .8;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #FFF3CF 0%, #E9C46A 55%, #B8892E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gpa-label { display: flex; flex-direction: column; gap: .3rem; padding-bottom: .7rem; }
.gpa-label b { font-size: .78rem; letter-spacing: .22em; color: var(--gold); }
.gpa-label span { font-size: .9rem; color: rgba(255,247,242,.75); font-weight: 500; }

.portrait { height: min(74vh, 820px); min-height: 0; }
.arch {
  height: 100%;
  border-radius: 280px 280px 34px 34px;
  padding: 3px;
  background: linear-gradient(170deg, #FFF3CF, #E9C46A 35%, #8E2A78 75%, #E9C46A);
  box-shadow: 0 0 50px rgba(233,196,106,.22);
}
.arch-in {
  position: relative;
  height: 100%;
  border-radius: 277px 277px 31px 31px;
  overflow: hidden;
  background: linear-gradient(180deg, #4a1240, #1a0515);
}
.arch-in img, .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
/* Цельное фото. Арка — обычная рамка, без вырезанного фона. */
.arch-in img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 5rem;
  color: var(--gold-soft);
}
.ph[hidden], img[hidden] { display: none; }
.arch-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 28%;
  background: linear-gradient(180deg, rgba(26,5,21,0), rgba(26,5,21,.88));
}
.sweep {
  position: absolute;
  top: 0; bottom: 0;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,240,200,.22), transparent);
  transform: translateX(-130%);
}
.arch-badge {
  position: absolute;
  left: 0; right: 0; bottom: 1.1rem;
  display: flex;
  justify-content: center;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--gold-soft);
}
.arch-badge span, .arch-badge {
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

.col-right {
  align-self: center;
  max-height: 58vh;
  overflow: auto;
  padding: 1.5rem 1.6rem;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(107,14,85,.55), rgba(26,5,21,.78));
  border: 1px solid rgba(243,223,162,.22);
  box-shadow: 0 30px 80px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.ledger-head, .grade {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
}
.ledger-head {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .22em;
  color: var(--gold);
}
.ledger-head span:last-child { letter-spacing: .08em; color: rgba(255,247,242,.7); font-weight: 600; }
.ledger { display: flex; flex-direction: column; gap: 1rem; }
.grade { flex-direction: column; align-items: stretch; gap: .45rem; }
.grade .row { display: flex; justify-content: space-between; gap: .8rem; align-items: baseline; }
.grade .row span { font-size: .98rem; line-height: 1.3; }
.grade .row b {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}
.bar {
  height: 6px;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #9C3F84, #E9C46A);
  transform-origin: left;
}

.foot {
  position: absolute;
  z-index: 4;
  left: max(4vw, env(safe-area-inset-left));
  right: max(4vw, env(safe-area-inset-right));
  bottom: max(1.6vh, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.invite { display: flex; align-items: center; gap: .8rem; max-width: 34rem; }
.invite b { display: block; font-size: 1rem; }
.invite span { display: block; margin-top: .15rem; font-size: .85rem; color: rgba(255,247,242,.75); }
.qr {
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 10px;
  background: var(--cream);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px;
}
.qr i { border-radius: 1px; background: transparent; }
.qr i.on { background: #2a0722; }

.rail {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: .4rem;
}
.rail button {
  position: relative;
  min-height: 52px;
  padding: .35rem .2rem .5rem;
  border-radius: 14px;
  border: 1px solid rgba(243,223,162,.16);
  background: rgba(255,255,255,.03);
  color: rgba(255,247,242,.72);
  cursor: pointer;
  overflow: hidden;
}
.rail button.on {
  border-color: rgba(243,223,162,.9);
  background: rgba(233,196,106,.18);
  color: #fff3cf;
}
.rail button:hover { border-color: rgba(243,223,162,.6); color: #fff; }
.rail b { display: block; font-size: .72rem; letter-spacing: .08em; }
.rail span {
  display: block;
  font-size: .68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rail i {
  position: absolute;
  left: 0; bottom: 0;
  height: 3px;
  width: 0;
  background: var(--gold);
}

.emi-dock {
  position: absolute;
  z-index: 7;
  right: max(2.4vw, env(safe-area-inset-right));
  bottom: 11vh;
  width: min(720px, 40vw);
  height: 250px;
  pointer-events: none;
}
.bubble {
  position: absolute;
  right: 200px;
  top: 18px;
  max-width: 28rem;
  padding: 1rem 1.15rem;
  border-radius: 22px 22px 6px 22px;
  background: var(--cream);
  color: #2a0722;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.bubble b { display: block; font-size: .68rem; letter-spacing: .2em; color: #8e2a78; margin-bottom: .3rem; }
.bubble p { font-size: 1rem; line-height: 1.35; font-weight: 650; }
.emi-btn {
  pointer-events: auto;
  position: absolute;
  right: 0; bottom: 0;
  width: 180px;
  height: 202px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.emi-btn svg { width: 100%; height: 100%; display: block; }
.emi-float { animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; width: 100%; height: 100%; }
.emi-jump { width: 100%; height: 100%; transform-origin: 50% 100%; }
.emi-jump.hop { animation: squish .75s var(--ease) both; }
.emi-bead { animation: bead 1.2s ease-in-out infinite; }
.emi-ring, .emi-halo { transform-box: fill-box; transform-origin: center; animation: ring 1.6s ease-in-out infinite; }
.emi-eyes { animation: blink 4.6s infinite; transform-box: fill-box; transform-origin: center; }
.emi-arm { animation: wave 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 85% 20%; }
#emi-eyes { transition: transform .2s linear; }

.game {
  position: absolute;
  z-index: 8;
  right: 16vw;
  bottom: 14vh;
  width: min(640px, 46vw);
  padding: 1.6rem 1.7rem 1.4rem;
  border-radius: 30px;
  background: linear-gradient(165deg, #FFF7F2, #F6E7DA);
  color: #2a0722;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.game[hidden] { display: none; }
.game-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.game-head span { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .2em; color: #8e2a78; }
.game-head strong {
  display: block;
  margin-top: .2rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.4rem;
  line-height: 1;
}
.game-head button {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(42,7,34,.2);
  background: transparent;
  color: #2a0722;
  font-size: 1.4rem;
  cursor: pointer;
}
.game label { font-size: 1rem; color: #5a2a4d; }
.game-score { display: flex; align-items: baseline; gap: .7rem; }
.game-score b {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 4.2rem;
  line-height: .9;
  color: var(--burgundy);
  font-variant-numeric: tabular-nums;
}
.game-score span { font-size: .8rem; font-weight: 800; letter-spacing: .16em; color: #8e2a78; }
.game input[type="range"] { width: 100%; accent-color: var(--gold); height: 28px; cursor: pointer; }
.meter { position: relative; height: 52px; }
.meter-track { position: absolute; left: 0; right: 0; top: 8px; height: 12px; border-radius: 12px; background: #ead8cc; overflow: hidden; }
.meter-track i { display: block; height: 100%; background: linear-gradient(90deg, #9C3F84, #E9C46A); }
.tick { position: absolute; top: 2px; width: 3px; height: 26px; }
.tick.cut { background: var(--burgundy); }
.tick.best { background: #B8892E; }
.tick-label { position: absolute; top: 32px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.tick-label.cut { color: var(--burgundy); transform: translateX(-100%); padding-right: 6px; }
.tick-label.best { color: #8a6420; padding-left: 6px; }
.verdict {
  display: flex;
  align-items: center;
  padding: .9rem 1rem;
  border-radius: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.show-a .col-left, .show-b .col-left { animation: slideL .8s var(--ease) both; }
.show-a .col-right, .show-b .col-right { animation: slideR .8s .2s var(--ease) both; }
.show-a .portrait, .show-b .portrait { animation: rise 1s var(--ease) both; }
.show-a .rank-ghost, .show-b .rank-ghost { animation: rankIn 1.1s var(--ease) both; }
.show-a .sweep, .show-b .sweep { animation: sweep 1.3s .25s ease-out both; }
.show-a .bar i, .show-b .bar i { animation: bar .9s .35s var(--ease) both; }
.show-a .arch, .show-b .arch { animation: framein 1.4s ease-out both; }

@keyframes rise { from { opacity: 0; transform: translateY(36px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes slideL { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes slideR { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes rankIn { from { opacity: 0; transform: translateX(-50%) scale(1.12); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes sweep { from { transform: translateX(-130%); } to { transform: translateX(240%); } }
@keyframes bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes framein {
  0% { box-shadow: 0 0 0 rgba(233,196,106,0); }
  60% { box-shadow: 0 0 70px rgba(233,196,106,.4); }
  100% { box-shadow: 0 0 46px rgba(233,196,106,.22); }
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes squish {
  0% { transform: translateY(0) scale(1,1); }
  25% { transform: translateY(6px) scale(1.12,.86); }
  55% { transform: translateY(-36px) scale(.9,1.12); }
  100% { transform: none; }
}
@keyframes ring { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes blink { 0%,92%,100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes wave { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-18deg); } }
@keyframes drift { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-28vh); opacity: 0; } }
@keyframes livedot { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes bead { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

.studio {
  position: absolute;
  z-index: 20;
  top: 10vh;
  right: 2vw;
  width: min(320px, 92vw);
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(26,6,22,.9);
  border: 1px solid rgba(221,183,75,.25);
  display: none;
}
.studio.on { display: block; }
.studio h3 { font-family: "Cormorant Garamond", Georgia, serif; margin-bottom: .6rem; }
.studio label { display: flex; justify-content: space-between; gap: .6rem; margin: .35rem 0; font-size: .82rem; }
.studio input { width: 5.5rem; }
.studio button { margin-top: .6rem; padding: .45rem .8rem; border: 0; border-radius: 999px; background: var(--gold); color: #1a0515; font-weight: 700; cursor: pointer; }

/* Ноутбук, окно не на весь экран: тот же один кадр, только плотнее. */
@media (min-width: 761px) and (min-height: 501px) and (max-height: 760px) {
  .board { top: 11vh; bottom: 12vh; }
  .portrait { height: 100%; }
  .person-name { font-size: clamp(1.7rem, 3.4vw, 3rem); }
  .gpa-num { font-size: clamp(2.6rem, 5vw, 4.2rem); }
  .col-right { max-height: none; padding: .7rem .85rem; gap: .4rem; }
  .grade:nth-child(n+4) { display: none; }
  .emi-dock { height: 128px; bottom: 11vh; width: min(420px, 32vw); }
  .emi-btn { width: 108px; height: 122px; }
  .bubble { max-width: 15rem; right: 116px; top: 0; padding: .5rem .65rem; }
  .bubble p { font-size: .8rem; }
  .brand-text span { display: none; }
}

/* Телефон и низкое окно: тоже один экран. Листается только лента имён. */
@media (max-width: 760px), (max-height: 500px) {
  .stage { overflow: hidden; }
  .cone { opacity: .35; }
  .topbar {
    top: max(.35rem, env(safe-area-inset-top));
    left: .55rem;
    right: .55rem;
    gap: .35rem;
    flex-wrap: wrap;
  }
  .brand-mark { width: 1.7rem; height: 1.7rem; }
  .brand-text { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem .4rem; }
  .brand-text strong { display: inline; font-size: 1.05rem; }
  #brand-sub, .year-pill { display: none; }
  .brand-text .year-mini {
    display: inline-block;
    margin: 0;
    padding: .08rem .42rem;
    border-radius: 999px;
    background: #e9c46a;
    color: #1a0515;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: none;
  }
  .pills { order: 3; width: 100%; overflow: auto; padding: .15rem; }
  .pills span { padding: .28rem .55rem; font-size: .68rem; }
  .rank-ghost, .invite { display: none; }
  .board {
    position: absolute;
    left: .5rem;
    right: .5rem;
    top: 4.8rem;
    bottom: 4.5rem;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: .35rem .5rem;
    align-items: stretch;
  }
  .portrait {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 100%;
    height: 100%;
    margin: 0;
    order: 0;
  }
  .arch-badge { bottom: .55rem; }
  .col-left { grid-column: 2; grid-row: 1; gap: .28rem; align-self: end; min-width: 0; }
  .chips { gap: .3rem; }
  .chip, .place { padding: .28rem .45rem; font-size: .58rem; letter-spacing: .06em; }
  .person-name { font-size: 1.35rem; }
  .person-meta { font-size: .78rem; }
  .gpa-row { gap: .35rem; margin: 0; flex-wrap: wrap; }
  .gpa-num { font-size: 2.15rem; }
  .gpa-label { padding: 0; }
  .gpa-label b { letter-spacing: .06em; font-size: .58rem; }
  .gpa-label span { display: none; }
  .col-right {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    max-height: none;
    overflow: hidden;
    width: auto;
    min-width: 0;
    padding: .55rem .6rem;
    border-radius: 16px;
    gap: .35rem;
  }
  .ledger { gap: .32rem; min-width: 0; }
  .grade:nth-child(n+4) { display: none; }
  .grade .row { gap: .35rem; min-width: 0; }
  .grade .row span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .72rem;
  }
  .grade .row b { flex: none; font-size: 1rem; }
  .ledger-head { font-size: .62rem; letter-spacing: .1em; }
  .ledger-head span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .foot {
    position: absolute;
    left: .4rem;
    right: .4rem;
    bottom: max(.25rem, env(safe-area-inset-bottom));
    margin: 0;
    gap: .25rem;
  }
  .rail { display: flex; overflow-x: auto; }
  .rail button { flex: 0 0 3.7rem; min-height: 42px; }
  .emi-dock {
    left: auto;
    right: .15rem;
    bottom: 4.15rem;
    width: 68px;
    height: 76px;
  }
  .bubble { display: none; }
  .emi-btn { width: 64px; height: 74px; }
  .game {
    position: absolute;
    left: .5rem;
    right: .5rem;
    bottom: 4.6rem;
    width: auto;
    max-height: 62dvh;
    overflow: auto;
    padding: 1rem;
  }
  .game-head strong { font-size: 1.7rem; }
  .game-score b { font-size: 2.6rem; }
}

@media (max-height: 500px) {
  .pills { display: none; }
  .board { top: 3.3rem; bottom: 3.6rem; }
  .person-name { font-size: 1.15rem; }
  .gpa-num { font-size: 1.7rem; }
  .emi-dock { width: 52px; height: 58px; bottom: 3.35rem; }
  .emi-btn { width: 48px; height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .spark, .live, .emi-float, .emi-bead, .emi-ring, .emi-halo, .emi-eyes, .emi-arm,
  .show-a .col-left, .show-b .col-left, .show-a .col-right, .show-b .col-right,
  .show-a .portrait, .show-b .portrait, .show-a .sweep, .show-b .sweep,
  .show-a .bar i, .show-b .bar i, .show-a .arch, .show-b .arch,
  .show-a .rank-ghost, .show-b .rank-ghost { animation: none; }
}

html.lite .spark { display: none; }
html.lite .cone,
html.lite .campus { filter: none; }
html.lite .emi-float,
html.lite .emi-bead,
html.lite .emi-ring,
html.lite .emi-halo,
html.lite .emi-eyes,
html.lite .emi-arm { animation: none; }
html.lite .show-a .col-left,
html.lite .show-b .col-left,
html.lite .show-a .col-right,
html.lite .show-b .col-right,
html.lite .show-a .portrait,
html.lite .show-b .portrait,
html.lite .show-a .sweep,
html.lite .show-b .sweep,
html.lite .show-a .bar i,
html.lite .show-b .bar i,
html.lite .show-a .arch,
html.lite .show-b .arch { animation: none; }

@property --rim {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
#gpu {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
}
html.gpu #gpu { display: block; }
html.gpu .sparks { display: none; }
html.gpu .arch {
  position: relative;
  transform: perspective(1200px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .55s cubic-bezier(.2, .8, .2, 1);
}
html.gpu .arch::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(from var(--rim), #fff3cf, #e9c46a 22%, #d7a0ea 48%, #e9c46a 74%, #fff3cf);
  animation: rimturn 8s linear infinite;
  pointer-events: none;
}
html.gpu .arch-in { position: relative; z-index: 1; }
@keyframes rimturn { to { --rim: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  html.gpu .arch::before { animation: none; }
}
