/* ===================== Unicorn Tower — styles ===================== */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: "Baloo 2", system-ui, "Segoe UI", sans-serif;
  user-select: none;
  -webkit-user-select: none;
  background: #ffe3f4;
}

#game {
  position: fixed;
  inset: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffe3f4, #e3e6ff);
}

/* ----------------------------- HUD ---------------------------------- */

#hud {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(clamp(6px, 1.6vw, 12px) + env(safe-area-inset-top, 0px))
           calc(clamp(12px, 3vw, 20px) + env(safe-area-inset-right, 0px))
           clamp(6px, 1.6vw, 12px)
           calc(clamp(12px, 3vw, 20px) + env(safe-area-inset-left, 0px));
  background: linear-gradient(90deg, #fff0fa, #f1ecff);
  border-bottom: 4px solid #e6b6f0;
  position: relative;
  z-index: 5;
}

.hud-item { min-width: 0; text-align: center; }
.hud-item.stat { margin-left: auto; }

.stat-label {
  font-size: clamp(14px, 3.6vw, 20px);
  font-weight: 700;
  color: #7a3f8f;
  white-space: nowrap;
}

.stat-label b { color: #d63384; display: inline-block; margin-left: 4px; }
#kill-num.bump { animation: bump 0.3s ease; }

@keyframes bump { 50% { transform: scale(1.5); } }

.mini-bar {
  margin: 4px auto 0;
  width: clamp(110px, 30vw, 200px);
  height: 10px;
  border-radius: 99px;
  background: #f3dcf3;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

#kill-fill {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  border-radius: 99px;
  background: linear-gradient(90deg, #ff5f6d, #ffa94d, #ffe066, #69db7c, #4dabf7, #b197fc);
  transition: transform 0.2s ease;
}

#music-btn {
  flex: 0 0 auto;
  font-size: clamp(18px, 4.6vw, 26px);
  line-height: 1;
  width: clamp(38px, 10vw, 50px);
  height: clamp(38px, 10vw, 50px);
  padding: 0;
  background: #fff;
  border: 3px solid #e6b6f0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(140, 60, 160, 0.3);
  touch-action: manipulation;
}

#music-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(140, 60, 160, 0.3); }

.practice-hud { display: none; align-items: center; gap: 8px; }
#hud.practicing .practice-hud { display: flex; }

.practice-badge {
  font-size: clamp(13px, 3vw, 17px);
  font-weight: 800;
  color: #d26a12;
  background: #fff7d6;
  border: 2px solid #ffc46f;
  border-radius: 99px;
  padding: 1px 10px;
  white-space: nowrap;
}

.practice-done {
  font-family: inherit;
  font-size: clamp(13px, 3vw, 17px);
  font-weight: 800;
  color: #7a3f8f;
  background: #fff;
  border: 3px solid #e6b6f0;
  border-radius: 99px;
  padding: 2px 12px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(140, 60, 160, 0.3);
  touch-action: manipulation;
}

/* ----------------------------- The meadow ----------------------------- */

#field {
  flex: 1 1 auto;
  position: relative;
  min-height: 0;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#clock, #bring-now {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  white-space: nowrap;
  z-index: 10;
}

#clock {
  top: 8px;
  font-size: clamp(16px, 4vw, 24px);
  font-weight: 800;
  color: #7a3f8f;
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid #e6b6f0;
  border-radius: 99px;
  padding: 0 16px;
  pointer-events: none;
}

#bring-now {
  top: calc(8px + clamp(34px, 7vw, 44px));
  font-family: inherit;
  font-size: clamp(13px, 3.2vw, 17px);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #c77dff, #9b4dff);
  border: none;
  border-radius: 99px;
  padding: 3px 16px;
  cursor: pointer;
  box-shadow: 0 4px 0 #6f2fc4;
  touch-action: manipulation;
}

#bring-now:active { transform: translate(-50%, 3px); box-shadow: 0 1px 0 #6f2fc4; }
#clock.show, #bring-now.show { display: block; }

#toast {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  max-width: calc(100% - 20px);
  background: #fff;
  color: #b0247a;
  border: 3px solid #ff8fd0;
  border-radius: 99px;
  padding: 4px 18px;
  font-size: clamp(14px, 3.6vw, 19px);
  font-weight: 800;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
}

#toast.show { animation: toast 2.2s ease forwards; }

@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  10%, 82% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

/* ----------------------------- Tower bar ------------------------------ */
/* Always the same height while playing, so the meadow never jumps around. */

#towerbar {
  flex: 0 0 auto;
  display: none;
  height: calc(clamp(92px, 15vh, 118px) + env(safe-area-inset-bottom, 0px));
  padding: 6px
           calc(10px + env(safe-area-inset-right, 0px))
           calc(6px + env(safe-area-inset-bottom, 0px))
           calc(10px + env(safe-area-inset-left, 0px));
  background: #fff;
  border-top: 4px solid var(--uni, #e6b6f0);
  z-index: 5;
}

#towerbar.show { display: flex; flex-direction: column; justify-content: center; }

.bar-hint {
  font-family: inherit;
  font-size: clamp(15px, 3.8vw, 21px);
  font-weight: 800;
  color: #7a3f8f;
  background: none;
  border: 3px dashed var(--uni, #e6b6f0);
  border-radius: 18px;
  padding: 8px 14px;
  margin: auto;
  cursor: pointer;
  animation: hintPulse 1.6s ease-in-out infinite;
}

@keyframes hintPulse { 50% { transform: scale(1.04); } }

/* Closed bar: the horn hint and the 🦸 Heroes button side by side. */
.bar-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin: auto; max-width: 100%; }
.bar-row .bar-hint { margin: 0; min-width: 0; }
.hero-open {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: clamp(15px, 3.8vw, 21px);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #ffcf4d, #f29d1f);
  border: none;
  border-radius: 18px;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 4px 0 #c47a10;
  touch-action: manipulation;
}

/* The 🦸 Heroes bar: one button per hero, lit up when you can pay for it. */
/* Phones: small stacked buttons (emoji, name, cost) so all 5 fit. */
#towerbar.heroes .bar-towers { gap: 4px; }
.hero-btn {
  flex: 1 1 0;
  max-width: 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-family: inherit;
  line-height: 1.05;
  color: #4a3a5a;
  background: #f4f0f6;
  border: 2px solid #ddd2e4;
  border-radius: 12px;
  padding: 1px 2px;
  cursor: pointer;
  opacity: 0.6;
  touch-action: manipulation;
}
.hero-btn > * { flex-shrink: 0; max-width: 100%; }
.hero-btn.can { opacity: 1; background: #fff; border-color: #f2b632; box-shadow: 0 3px 0 rgba(196, 122, 16, 0.35); }
.hero-btn.out { opacity: 1; background: #fff8dc; border-style: dashed; border-color: #f2b632; }
.hero-e { font-size: clamp(20px, 5vw, 28px); line-height: 1.1; }
.hero-text { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.hero-text b { font-size: clamp(10px, 2.6vw, 14px); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-text small { font-size: clamp(10px, 2.6vw, 14px); font-weight: 800; white-space: nowrap; }
.hero-text i { display: none; font-style: normal; font-size: 11px; opacity: 0.8; line-height: 1.1; }
/* Wide screens: emoji beside the name, cost and what the hero does. */
@media (min-width: 760px) {
  #towerbar.heroes .bar-towers { gap: 8px; }
  .hero-btn { flex-direction: row; gap: 6px; padding: 2px 8px; border-width: 3px; text-align: left; }
  .hero-text { align-items: flex-start; }
  .hero-text i { display: block; }
}

/* The 5 resource counters, stacked in the meadow's bottom-left corner. */
#res {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: none;
  flex-direction: column;
  gap: 3px;
  z-index: 4;
  pointer-events: none;
}
#res.show { display: flex; }
.res-chip {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: clamp(14px, 3.4vw, 18px);
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid #e6b6f0;
  border-radius: 99px;
  padding: 0 8px 0 5px;
}
.res-chip b { color: #7a3f8f; min-width: 1.1em; text-align: center; }
/* ✨ sparkles build towers: the gold chip on top. */
.res-chip.sparkles { border-color: #f2c94c; background: #fffbe6; font-size: clamp(16px, 3.8vw, 21px); }
.res-chip.sparkles b { color: #b7791f; }

/* A tower's ✨ price, and towers you can't afford yet. */
.tower-cost { font-size: 0.85em; color: #b7791f; font-weight: 800; }
.tower-btn.picked .tower-cost { color: #fff6c9; }
.tower-btn.poor { opacity: 0.5; filter: grayscale(0.6); }

.bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 0;
}

.bar-title {
  font-size: clamp(13px, 3.2vw, 17px);
  font-weight: 800;
  color: #7a3f8f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-close {
  flex: 0 0 auto;
  font-size: 16px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid #e6b6f0;
  border-radius: 50%;
  background: #fff;
  color: #7a3f8f;
  cursor: pointer;
}

.bar-towers {
  flex: 1 1 auto;
  display: flex;
  gap: 8px;
  min-height: 0;
  margin-top: 4px;
  overflow-x: auto;
  justify-content: center;
}

.tower-btn {
  flex: 0 1 280px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  text-align: left;
  background: #fff;
  border: 3px solid var(--uni, #e6b6f0);
  border-radius: 16px;
  padding: 2px 8px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
  touch-action: manipulation;
}

.tower-btn.picked {
  background: var(--uni, #e6b6f0);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
}

/* Building your own trap: emoji + name + what it does. */
.trap-builder { text-align: center; }
.trap-builder h1 { font-size: clamp(22px, 5.5vw, 34px); }
.tb-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0; }
.tb-chip {
  font-size: clamp(12px, 3vw, 15px);
  font-weight: 800;
  color: #7a3f8f;
  background: #fff0f8;
  border: 2px solid #f5bfe0;
  border-radius: 99px;
  padding: 0 10px;
  white-space: nowrap;
}
.tb-chip.empty { opacity: 0.6; }
.tb-chip.down { background: #eafbe7; border-color: #9be86f; }
.tb-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px auto 0;
  padding: 4px 16px;
  border-radius: 99px;
  background: #fff7fc;
  border: 3px dashed #ff6fb8;
}
.tb-pe { font-size: 34px; line-height: 1; }
.tb-pn { font-size: clamp(16px, 4vw, 22px); font-weight: 800; color: #b0247a; }
.tb-label { margin: 10px 0 4px !important; font-weight: 800 !important; color: #7a3f8f !important; text-align: left; }
.tb-emojis { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tb-emoji {
  font-size: 26px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 3px solid #eee;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  touch-action: manipulation;
}
.tb-emoji.picked { border-color: #ff6fb8; background: #fff0f8; transform: scale(1.1); }
.tb-name {
  width: 100%;
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  padding: 6px 14px;
  border: 3px solid #e6b6f0;
  border-radius: 14px;
  color: #4a3a5a;
}
.tb-name:focus { outline: none; border-color: #ff6fb8; }
.tb-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tb-kind {
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 6px 4px;
  border: 3px solid var(--kc);
  border-radius: 16px;
  background: #fff;
  color: #4a3a5a;
  cursor: pointer;
  touch-action: manipulation;
  line-height: 1.1;
}
.tb-kind b { font-size: 16px; }
.tb-kind small { font-size: 11px; opacity: 0.8; }
.tb-ke { font-size: 28px; line-height: 1.1; }
.tb-kind.picked { background: var(--kc); color: #fff; transform: translateY(-2px); }
.tb-build:disabled { opacity: 0.45; cursor: default; }
@media (max-width: 520px) {
  .tb-kinds { grid-template-columns: repeat(2, 1fr); }
  .tb-emoji { width: 38px; height: 38px; font-size: 22px; }
}

/* The trap screen: the tray of your built traps, and the big hint on the map. */
.tray { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tray-title { font-size: clamp(12px, 3vw, 15px); font-weight: 800; color: #7a3f8f; }
.tray-row { display: flex; gap: 8px; justify-content: center; }
.tray-trap {
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  width: clamp(84px, 22vw, 130px);
  padding: 2px 4px;
  border: 3px solid var(--kc);
  border-radius: 14px;
  background: #fff;
  color: #4a3a5a;
  cursor: pointer;
  line-height: 1.05;
  touch-action: manipulation;
}
.tray-e { font-size: clamp(22px, 6vw, 30px); line-height: 1.1; }
.tray-trap b { font-size: clamp(11px, 2.8vw, 14px); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-trap small { font-size: clamp(10px, 2.4vw, 12px); opacity: 0.85; white-space: nowrap; }
.tray-trap.next { background: var(--kc); color: #fff; animation: trayPulse 1s ease-in-out infinite; }
.tray-trap.down { opacity: 0.55; border-style: dashed; cursor: default; }
@keyframes trayPulse { 50% { transform: translateY(-4px) scale(1.05); } }
.setup-go:not(.ready) { filter: grayscale(0.7); opacity: 0.6; box-shadow: none; }
.setup-go.ready { animation: trayPulse 1s ease-in-out infinite; }

#setup-hint {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  display: none;
  max-width: calc(100% - 20px);
  z-index: 10;
  padding: 6px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 4px solid #ff6fb8;
  box-shadow: 0 6px 0 rgba(176, 36, 122, 0.25);
  font-size: clamp(15px, 4vw, 24px);
  font-weight: 700;
  color: #7a3f8f;
  text-align: center;
  pointer-events: none;
  animation: hintBounce 1.2s ease-in-out infinite;
}
#setup-hint.show { display: block; }
#setup-hint b { color: #d63384; }
#setup-hint small { font-size: 0.7em; font-weight: 700; color: #8a6a9a; }
.hint-e { font-size: 1.5em; vertical-align: middle; }
@keyframes hintBounce { 50% { transform: translate(-50%, 6px); } }

/* The trap screen before the game: your traps, which one goes next, and ▶ Start. */
#towerbar.setup { background: linear-gradient(180deg, #fff, #fff0f8); border-top-color: #ff6fb8; }
.setup-row { display: flex; align-items: center; justify-content: center; gap: 14px; height: 100%; }
.setup-text { min-width: 0; text-align: center; line-height: 1.15; }
.setup-traps { font-size: clamp(20px, 5vw, 28px); letter-spacing: 4px; }
.setup-words { font-size: clamp(13px, 3.4vw, 19px); font-weight: 800; color: #b0247a; }
.setup-text small { font-size: clamp(11px, 2.6vw, 14px); color: #8a7a9a; }
.setup-go {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: clamp(18px, 4.5vw, 24px);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #ff7ac6, #e0459d);
  border: none;
  border-radius: 99px;
  padding: 8px 22px;
  cursor: pointer;
  box-shadow: 0 5px 0 #b02c78;
  touch-action: manipulation;
}
.setup-go:active { transform: translateY(3px); box-shadow: 0 2px 0 #b02c78; }

.tower-emoji { font-size: clamp(26px, 6vw, 36px); line-height: 1; }
.tower-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.tower-text b { font-size: clamp(13px, 3.2vw, 17px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tower-text small {
  font-size: clamp(10px, 2.5vw, 13px);
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* A narrow phone: tower buttons show just the emoji and the name. */
@media (max-width: 520px) {
  .tower-btn { flex-direction: column; justify-content: center; text-align: center; gap: 0; padding: 2px 4px; }
  .tower-text small { display: none; }
  .tower-text b { font-size: 12px; white-space: normal; }
}

/* ------------------------- Effects + overlays ------------------------- */

#fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(90, 40, 110, 0.4);
  backdrop-filter: blur(3px);
  overflow-y: auto;
}

.overlay.show { display: flex; }
.overlay.win { background: rgba(255, 210, 240, 0.4); }
.overlay.lose { background: rgba(40, 40, 80, 0.5); }

.card {
  background: #fff;
  border-radius: 28px;
  border: 6px solid #e6b6f0;
  box-shadow: 0 16px 0 rgba(140, 60, 160, 0.25), 0 24px 40px rgba(0, 0, 0, 0.3);
  padding: clamp(20px, 5vw, 40px);
  max-width: 460px;
  width: 100%;
  margin: auto;
  text-align: center;
  animation: cardIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card.wide { max-width: 760px; }

@keyframes cardIn { from { transform: scale(0.6) translateY(30px); opacity: 0; } }

.card-emoji { font-size: clamp(46px, 12vw, 72px); line-height: 1; margin-bottom: 6px; }

.card h1 {
  margin: 6px 0 4px;
  font-size: clamp(28px, 7vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(90deg, #ff5f9e, #ff9f43, #b04dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.overlay.lose .card h1 { background: none; color: #6a7fd0; }

.card p {
  margin: 8px 0;
  font-size: clamp(15px, 3.6vw, 19px);
  font-weight: 500;
  color: #4a3a5a;
}

.card p.byline {
  margin: 0 0 10px;
  font-size: clamp(15px, 3.6vw, 18px);
  font-weight: 800;
  color: #a85ff0;
}

.card p.small { font-size: clamp(13px, 3vw, 16px); color: #8a7a9a; }

.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 14px; }

.big-btn {
  margin-top: 18px;
  font-family: inherit;
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #ff7ac6, #e0459d);
  border: none;
  border-radius: 99px;
  padding: 12px 32px;
  cursor: pointer;
  box-shadow: 0 6px 0 #b02c78, 0 10px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b02c78, 0 4px 10px rgba(0, 0, 0, 0.25); }

.big-btn.alt-btn {
  color: #b02c78;
  background: linear-gradient(180deg, #fff, #ffeef8);
  box-shadow: 0 6px 0 #f5bfe0, 0 10px 18px rgba(0, 0, 0, 0.18);
}

.lang-btn {
  display: block;
  margin: 18px auto 0;
  font-family: inherit;
  font-size: clamp(13px, 3vw, 16px);
  font-weight: 700;
  color: #b02c78;
  background: #fff;
  border: 2px solid #f5bfe0;
  border-radius: 99px;
  padding: 4px 16px;
  cursor: pointer;
}

/* ----------------------- Pick-a-unicorn cards ------------------------ */

.uni-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.uni-card {
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 4px solid var(--uni);
  border-radius: 22px;
  padding: 12px 8px;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--uni);
  transition: transform 0.1s ease;
  color: #4a3a5a;
}

.uni-card:hover { transform: translateY(-3px); }
.uni-card:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--uni); }

.uni-pic { position: relative; font-size: clamp(48px, 11vw, 72px); line-height: 1; }
.uni-badge { position: absolute; right: -10px; bottom: -4px; font-size: 0.45em; }
.uni-name { font-size: clamp(18px, 4.4vw, 26px); color: var(--uni); margin-top: 4px; }

.uni-card ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  font-size: clamp(12px, 3vw, 15px);
  font-weight: 700;
  line-height: 1.3;
}

/* A phone held upright: the unicorns stack, with their towers beside them. */
@media (max-width: 520px) {
  .uni-row { grid-template-columns: 1fr; gap: 10px; }
  .uni-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    text-align: left;
    padding: 8px 14px;
  }
  .uni-pic { grid-row: 1 / 3; font-size: 48px; align-self: center; }
  .uni-name { margin: 0; }
  .uni-card ul { margin: 0; }
}

/* Short screens (a phone turned sideways): the tower bar gets slimmer. */
@media (max-height: 520px) {
  #towerbar { height: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .tower-text small { display: none; }
}

/* A small phone: the counter keeps just 💀 and the number. */
@media (max-width: 430px) {
  #kill-label .words { display: none; }
  .mini-bar { width: 90px; }
}
