:root {
  --ink: #1b1622;
  --cream: #fff6dc;
  --title: "Luckiest Guy", "Arial Black", Impact, sans-serif;
  --ui: "Lilita One", "Arial Black", sans-serif;
  --pc: #3b7bff;
  --pd: #1f4bb8;
  --pl: #d6e4ff;
  /* thick cartoon outline for text */
  --outline: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink),
    2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #1b1622;
  color: var(--ink);
  font-family: var(--ui);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#game { position: fixed; inset: 0; width: 100%; height: 100%; display: none; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffbe2e;
}
.screen > * { position: relative; z-index: 1; }

.sunburst {
  position: fixed !important;
  z-index: 0 !important;
  left: 50%; top: 50%;
  width: 260vmax; height: 260vmax;
  margin: -130vmax 0 0 -130vmax;
  background: repeating-conic-gradient(from 0deg, #ffd34a 0deg 9deg, #ffb52a 9deg 18deg);
  animation: spin 70s linear infinite;
}
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 45%, rgba(120, 40, 0, 0.35) 100%);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- buttons */

.btn {
  font-family: var(--title);
  font-size: 26px;
  line-height: 1;
  color: #fff;
  padding: 14px 30px 10px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: linear-gradient(#7fe05d, #2eaa2f);
  box-shadow: 0 6px 0 var(--ink), inset 0 -6px 0 rgba(0, 0, 0, 0.18);
  text-shadow: var(--outline), 0 4px 0 var(--ink);
  letter-spacing: 1px;
  position: relative;
  cursor: pointer;
  transition: transform 0.09s ease-out, box-shadow 0.09s;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  left: 8px; right: 8px; top: 4px;
  height: 42%;
  border-radius: 12px 12px 40px 40px;
  background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1));
  pointer-events: none;
}
.btn:hover { transform: translateY(-2px) scale(1.05) rotate(-1deg); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink), inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.btn.orange { background: linear-gradient(#ffd75e, #ff8f1f); }
.btn.green { background: linear-gradient(#7fe05d, #2eaa2f); }
.btn.blue { background: linear-gradient(#6fb2ff, #2b62e8); }
.btn.red { background: linear-gradient(#ff7a85, #e2283b); }
.btn.grey { background: linear-gradient(#b9b6c6, #7a7590); }
.btn.small { font-size: 17px; padding: 10px 18px 7px; border-radius: 14px; box-shadow: 0 4px 0 var(--ink), inset 0 -4px 0 rgba(0, 0, 0, 0.18); }
.btn.big { font-size: 46px; padding: 18px 58px 12px; border-radius: 24px; animation: pulse 1.1s ease-in-out infinite; }
.btn.big:hover { animation-play-state: paused; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

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

.panel {
  background: var(--cream);
  border: 5px solid var(--ink);
  border-radius: 26px;
  box-shadow: 0 10px 0 var(--ink);
}

.sticker {
  position: absolute;
  font-family: var(--title);
  color: #fff;
  background: #e8323e;
  border: 4px solid var(--ink);
  border-radius: 12px;
  padding: 8px 12px 4px;
  box-shadow: 0 5px 0 var(--ink);
  text-shadow: 2px 2px 0 var(--ink);
  z-index: 3;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- title */

/* The title screen is see-through: a live match plays on the canvas behind it. */
.screen.title { background: transparent; }
.screen.title::after {
  background:
    radial-gradient(ellipse 60% 55% at 50% 42%, rgba(27, 22, 34, 0.42) 0%, rgba(27, 22, 34, 0.18) 60%, rgba(27, 22, 34, 0) 100%),
    linear-gradient(rgba(27, 22, 34, 0.35), rgba(27, 22, 34, 0) 22%, rgba(27, 22, 34, 0) 70%, rgba(27, 22, 34, 0.55));
}
.debug-link { color: inherit; opacity: 0.85; }
.title .footer { color: #fff; text-shadow: 1px 1px 0 var(--ink), -1px 1px 0 var(--ink), 1px -1px 0 var(--ink), -1px -1px 0 var(--ink); }

/* Wide screens: menu in a left column, the live battle on the right. */
@media (min-width: 900px) {
  .screen.title { align-items: flex-start; }
  .title .title-wrap { align-items: flex-start; margin-left: max(24px, 4vw); gap: 14px; }
  .title .logo-box { text-align: left; }
  .title .s1 { right: -112px; top: 18px; }
  .title .logo { align-items: flex-start; }
  .title .logo-sub { font-size: clamp(24px, 2.9vw, 40px); margin-left: 10px; }
  .title .logo-big { font-size: clamp(70px, 9vw, 130px); }
  .title .row { justify-content: flex-start; }
  .title .btn.big { margin-left: 8px; }
  .title .footer { text-align: left; padding-left: max(24px, 4vw); }
  .screen.title::after {
    background:
      linear-gradient(90deg, rgba(27, 22, 34, 0.62) 0%, rgba(27, 22, 34, 0.38) 34%, rgba(27, 22, 34, 0) 58%),
      linear-gradient(rgba(27, 22, 34, 0.2), rgba(27, 22, 34, 0) 18%, rgba(27, 22, 34, 0) 78%, rgba(27, 22, 34, 0.45));
  }
}

.title-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 16px; }
.logo-box { position: relative; text-align: center; }
.logo {
  margin: 0;
  font-family: var(--title);
  font-weight: normal;
  line-height: 0.88;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo .l { display: inline-block; animation: bob 1.8s ease-in-out infinite; animation-delay: calc(var(--i) * -0.13s); }
.logo .sp { display: inline-block; width: 0.3em; }
.logo-sub {
  font-size: clamp(22px, 4.2vw, 46px);
  letter-spacing: 1px;
  margin-top: 6px;
  text-shadow: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink),
    2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 6px 0 var(--ink);
  transform: rotate(-3deg);
}
.logo-big {
  font-size: clamp(64px, 15vw, 168px);
  letter-spacing: 2px;
  text-shadow: 6px 0 0 var(--ink), -6px 0 0 var(--ink), 0 6px 0 var(--ink), 0 -6px 0 var(--ink),
    4px 4px 0 var(--ink), -4px 4px 0 var(--ink), 4px -4px 0 var(--ink), -4px -4px 0 var(--ink),
    0 14px 0 var(--ink), 0 18px 0 rgba(0, 0, 0, 0.25);
  transform: rotate(-3deg);
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-7px) rotate(-2deg); } }
.s1 { right: -34px; top: -18px; transform: rotate(12deg); font-size: 18px; animation: wobble 2.4s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(12deg) scale(1); } 50% { transform: rotate(6deg) scale(1.08); } }

.ribbon {
  display: inline-block;
  margin-top: 14px;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 5px 0 var(--ink);
  padding: 7px 18px 5px;
  font-size: clamp(14px, 2.2vw, 20px);
  transform: rotate(-2deg);
  position: relative;
}
.ribbon::before, .ribbon::after {
  content: "";
  position: absolute;
  top: 6px; bottom: 6px;
  width: 10px;
}
.ribbon::before { left: 6px; background: #2f5bd8; }
.ribbon::after { right: 6px; background: #e8323e; }
.ribbon span { padding: 0 10px; }

.mascots { display: block; cursor: pointer; }

.footer {
  position: absolute !important;
  bottom: 10px; left: 0; right: 0;
  text-align: center;
  font-size: 13px;
  color: #6b3a00;
  padding: 0 16px;
}

/* ---------------------------------------------------------------- select */

.select { justify-content: flex-start; padding: 14px 16px 18px; gap: 12px; overflow-x: hidden; overflow-y: auto; }
.screen::after { position: fixed; }
.sel-top { width: min(1120px, 100%); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sel-spacer { width: 118px; }
.heading {
  margin: 0;
  font-family: var(--title);
  font-weight: normal;
  font-size: clamp(30px, 5vw, 54px);
  color: #fff;
  text-shadow: var(--outline), 0 7px 0 var(--ink);
  transform: rotate(-2deg);
}
.heading .l { display: inline-block; animation: bob 2s ease-in-out infinite; animation-delay: calc(var(--i) * -0.1s); }
.heading .sp { display: inline-block; width: 0.3em; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: -8px; z-index: 2; }
.tab {
  font-family: var(--title);
  font-size: 22px;
  color: #fff;
  background: var(--pc);
  border: 4px solid var(--ink);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  padding: 12px 22px 10px;
  text-shadow: var(--outline);
  cursor: pointer;
  transform: translateY(6px);
  transition: transform 0.1s;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.15);
}
.tab:hover { transform: translateY(2px); }
.tab.on { transform: translateY(0) scale(1.08); box-shadow: none; padding-bottom: 14px; }

.sel-panel {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  padding: 18px;
  border-color: var(--ink);
  background: linear-gradient(var(--pl), var(--cream) 40%);
}

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.card {
  font-family: var(--ui);
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 6px 0 var(--ink);
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transform: rotate(var(--r));
  transition: transform 0.12s;
  position: relative;
  color: var(--ink);
}
.card:hover { transform: rotate(0deg) translateY(-4px) scale(1.03); }
.card.on { background: var(--pc); transform: rotate(0deg) scale(1.05); }
.card.on::after {
  content: "TOI !";
  position: absolute;
  top: -12px; right: -10px;
  font-family: var(--title);
  font-size: 16px;
  color: var(--ink);
  background: #ffd23a;
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 5px 8px 2px;
  transform: rotate(10deg);
  box-shadow: 0 3px 0 var(--ink);
}
.card canvas { display: block; }
.cname { font-family: var(--title); font-size: 19px; line-height: 1.05; margin-top: 2px; text-align: center; }
.ctag { font-size: 14px; line-height: 1.15; color: #6b5b4b; text-align: center; margin-top: 3px; }
.card.on .cname { color: #fff; text-shadow: var(--outline); }
.card.on .ctag { color: #fff; text-shadow: 1px 1px 0 var(--ink), -1px 1px 0 var(--ink), 1px -1px 0 var(--ink), -1px -1px 0 var(--ink); }

.weapons { display: flex; flex-direction: column; gap: 10px; }
.sub { font-family: var(--title); font-size: 26px; color: #fff; text-shadow: var(--outline), 0 4px 0 var(--ink); }
.weapon {
  font-family: var(--ui);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--ink);
  padding: 6px 10px;
  cursor: pointer;
  color: var(--ink);
  transition: transform 0.1s;
}
.weapon:hover { transform: translateX(4px); }
.weapon.on { background: #ffd23a; transform: translateX(8px) rotate(-1deg); }
.wicon { flex: none; background: #efe6cf; border: 3px solid var(--ink); border-radius: 10px; }
.winfo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.winfo b { font-family: var(--title); font-weight: normal; font-size: 19px; line-height: 1; }
.winfo i { font-style: normal; font-size: 13px; color: #6b5b4b; }
.bars { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 12px; margin-top: 3px; }
.bar { display: flex; align-items: center; gap: 5px; font-size: 11px; }
.bar em { font-style: normal; width: 62px; color: #6b5b4b; }
.pips { display: flex; gap: 2px; }
.pips s { width: 7px; height: 9px; border: 1.5px solid var(--ink); border-radius: 2px; background: #fff; text-decoration: none; }
.pips s.on { background: #ff8f1f; }

.streak-panel { width: min(1120px, 100%); padding: 14px 18px 16px; }
.streak-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.streak-count {
  font-family: var(--title); font-size: 18px; color: #fff; background: #8b7b6b;
  border: 3px solid var(--ink); border-radius: 10px; padding: 4px 9px 1px; box-shadow: 0 3px 0 var(--ink);
}
.streak-count.full { background: #2eaa2f; }
.streak-count.nope { animation: nope 0.4s; background: #e2283b; }
@keyframes nope { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px) rotate(-4deg); } 60% { transform: translateX(6px) rotate(4deg); } }
.streak-hint { font-size: 14px; color: #6b5b4b; }
.streaks { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.streak {
  font-family: var(--ui); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  background: #fff; color: var(--ink); border: 4px solid var(--ink); border-radius: 14px;
  box-shadow: 0 5px 0 var(--ink); padding: 7px 8px; cursor: pointer; position: relative; transition: transform 0.1s;
}
.streak:hover { transform: translateY(-3px); }
.streak.on { background: #ffd23a; transform: translateY(-2px) rotate(-1deg); }
.streak.on::after {
  content: "✓"; position: absolute; top: -11px; right: -9px; width: 26px; height: 26px; display: grid; place-items: center;
  font-family: var(--title); font-size: 15px; color: #fff; background: #2eaa2f; border: 3px solid var(--ink); border-radius: 50%;
}
.streak.locked { opacity: 0.55; cursor: not-allowed; }
.slock { position: absolute; inset: auto 6px 6px auto; font-family: var(--title); font-size: 11px; color: #e2283b; }
.sicon { flex: none; width: 48px; height: 48px; }
.sinfo { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.sinfo b { font-family: var(--title); font-weight: normal; font-size: 15px; line-height: 1.05; }
.sinfo em { font-style: normal; font-size: 12px; color: #e8862c; }
.sinfo i { font-style: normal; font-size: 12px; line-height: 1.15; color: #6b5b4b; margin-top: 2px; }

.sel-bottom { width: min(1120px, 100%); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.vs {
  font-size: 18px;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 5px 0 var(--ink);
  padding: 8px 14px 6px;
  transform: rotate(-1deg);
}
.sel-bottom .btn.big { font-size: 38px; padding: 16px 44px 10px; }

/* ---------------------------------------------------------------- end screen */

.end { background: rgba(27, 22, 34, 0.55); }
.end::after { display: none; }
.end-panel {
  padding: 22px 28px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 94vw;
  animation: popin 0.35s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes popin { from { transform: scale(0.5) rotate(-6deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.end-title {
  font-family: var(--title);
  font-size: clamp(48px, 9vw, 86px);
  line-height: 1;
  color: #ffd23a;
  text-shadow: 5px 0 0 var(--ink), -5px 0 0 var(--ink), 0 5px 0 var(--ink), 0 -5px 0 var(--ink),
    4px 4px 0 var(--ink), -4px 4px 0 var(--ink), 4px -4px 0 var(--ink), -4px -4px 0 var(--ink), 0 11px 0 var(--ink);
  transform: rotate(-3deg);
}
.lose .end-title { color: #ff5a5a; }
.tie .end-title { color: #fff; }
.end-score { font-family: var(--title); font-size: 26px; }
.end-score span { text-shadow: 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink); }
.board { border-collapse: collapse; font-size: 17px; min-width: min(420px, 80vw); }
.board th { font-size: 13px; color: #8b7b6b; text-align: left; padding: 2px 10px; }
.board td { padding: 3px 10px; border-top: 2px dashed rgba(27, 22, 34, 0.15); }
.board td + td, .board th + th { text-align: center; }
.board tr.me td { background: #ffd23a; }

/* ---------------------------------------------------------------- your own meme clips */

#ui > .meme-media {
  position: absolute;
  left: 16px;
  top: max(var(--meme-top, 118px), 27vh);
  width: 256px;
  padding: 10px 10px 8px;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 6px 0 var(--ink);
  pointer-events: none;
  transform: rotate(-1.7deg);
  animation: mm-in 0.3s cubic-bezier(0.2, 1.5, 0.4, 1);
  z-index: 3;
}
#ui > .meme-media.out { animation: mm-out 0.3s forwards; }
@keyframes mm-in { from { transform: translateX(-300px) rotate(-1.7deg); } to { transform: translateX(0) rotate(-1.7deg); } }
@keyframes mm-out { to { transform: translateX(-300px) rotate(-1.7deg); } }
.mm-media {
  display: block; width: 100%; height: 150px; object-fit: contain;
  border: 3px solid var(--ink); border-radius: 12px; background: #111;
}
.mm-tag {
  position: absolute; top: -13px; left: 12px; transform: rotate(-4deg);
  font-family: var(--title); font-size: 13px; color: #fff; background: #e8323e;
  border: 3px solid var(--ink); border-radius: 8px; padding: 4px 8px 1px; box-shadow: 0 3px 0 var(--ink);
}
.mm-caption {
  font-family: var(--title); font-size: 21px; line-height: 1.05; text-align: center; color: #ffd23a;
  text-shadow: var(--outline), 0 3px 0 var(--ink); margin-top: 8px;
}
.end-meme {
  display: block; width: min(320px, 70vw); max-height: 190px; object-fit: cover;
  border: 4px solid var(--ink); border-radius: 14px; box-shadow: 0 5px 0 var(--ink); background: #111;
}

/* ---------------------------------------------------------------- splash (click to enter) */

.splash { cursor: pointer; background: #1b1622; }
.splash::after { background: radial-gradient(ellipse at center, rgba(255, 190, 46, 0.25) 0%, rgba(0, 0, 0, 0) 60%); }
.splash-box { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 16px; text-align: center; }
.splash-go {
  background: none; border: 0; cursor: pointer; padding: 6px 14px;
  font-family: var(--title); font-size: clamp(26px, 5vw, 44px); color: #fff;
  text-shadow: var(--outline), 0 5px 0 var(--ink);
  animation: pulse 1.1s ease-in-out infinite;
}
.splash-hint { color: #cfc6dc; font-size: 16px; }
.screen.title { animation: fadein 0.7s ease-out; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- respawn card: your killer's meme */

#ui > .killcard {
  position: absolute;
  left: 50%; top: 50%;
  width: min(440px, calc(100vw - 32px));
  transform: translate(-50%, -42%) rotate(-1deg);
  background: var(--cream);
  border: 5px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 9px 0 var(--ink);
  padding: 12px 14px 14px;
  pointer-events: none;
  animation: kc-in 0.38s cubic-bezier(0.2, 1.5, 0.4, 1);
  z-index: 4;
}
#ui > .killcard.out { animation: kc-out 0.28s forwards; }
@keyframes kc-in { from { transform: translate(-50%, 30%) rotate(4deg) scale(0.6); opacity: 0; } }
@keyframes kc-out { to { transform: translate(-50%, -42%) scale(0.7); opacity: 0; } }
.kc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.kc-face { width: 64px; height: 64px; flex: none; border: 4px solid var(--ink); border-radius: 50%; }
.kc-who { display: flex; flex-direction: column; min-width: 0; }
.kc-by { font-family: var(--title); font-size: 14px; color: #e8323e; }
.kc-who b { font-family: var(--title); font-weight: normal; font-size: 26px; line-height: 1.15; text-shadow: var(--outline); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 4px 6px 5px; margin: -4px -6px -5px; } /* the padding keeps the outline of the letters from being cut */
.kc-info { font-size: 14px; color: #6b5b4b; }
.kc-info em { font-style: normal; color: #e8323e; }
.kc-stage { position: relative; height: 200px; border: 4px solid var(--ink); border-radius: 14px; overflow: hidden; background: #111; }
.kc-canvas, .kc-media { display: block; width: 100%; height: 100%; object-fit: cover; }
.kc-media, .mvp-media { object-fit: contain; } /* show the whole clip, phone videos included */
.kc-caption {
  position: absolute; left: 0; right: 0; bottom: 8px; text-align: center;
  font-family: var(--title); font-size: 26px; color: #ffd23a; text-shadow: var(--outline), 0 3px 0 var(--ink);
}
.kc-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.kc-timer { font-size: 17px; white-space: nowrap; }
.kc-bar { flex: 1; height: 12px; border: 3px solid var(--ink); border-radius: 8px; background: #fff; overflow: hidden; }
.kc-bar i { display: block; height: 100%; width: 0; background: #2eaa2f; }
@media (max-height: 560px) { .kc-stage { height: 130px; } }

/* ---------------------------------------------------------------- end screen: MVP */

.end-wrap { display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 22px 16px 16px; max-height: 100%; overflow-y: auto; }
.end-wrap .end-panel { max-width: min(560px, 94vw); }
.end-panel .btn { font-size: 22px; padding: 12px 22px 8px; }
@media (max-height: 760px) {
  .end-title { font-size: clamp(40px, 7vw, 64px); }
  .end-panel { gap: 8px; padding: 16px 22px 20px; }
  .board td { padding: 2px 10px; }
  .mvp-stage { height: 150px; }
}
.mvp-panel {
  width: min(300px, 92vw); padding: 16px 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  transform: rotate(-2deg); animation: popin 0.45s 0.15s cubic-bezier(0.2, 1.6, 0.4, 1) backwards; position: relative;
}
.mvp-tag {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%) rotate(-4deg);
  font-family: var(--title); font-size: 24px; color: #fff; background: #e8323e;
  border: 4px solid var(--ink); border-radius: 12px; padding: 6px 14px 2px; box-shadow: 0 4px 0 var(--ink);
}
.mvp-name { font-family: var(--title); font-size: 26px; text-shadow: var(--outline); margin-top: 12px; text-align: center; line-height: 1.05; }
.mvp-sub { font-size: 15px; color: #6b5b4b; }
.mvp-stage { position: relative; width: 100%; height: 180px; margin-top: 6px; border: 4px solid var(--ink); border-radius: 14px; overflow: hidden; background: #111; }
.mvp-canvas, .mvp-media { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- select: kill meme picker */

.meme-panel { width: min(1120px, 100%); padding: 14px 18px 16px; }
.premium-pill {
  font: inherit; font-family: var(--title); font-size: 13px; cursor: pointer; color: #fff; background: linear-gradient(#ffd75e, #e8862c);
  border: 3px solid var(--ink); border-radius: 999px; padding: 5px 12px 2px; box-shadow: 0 3px 0 var(--ink); text-shadow: 1px 1px 0 var(--ink);
}
.premium-pill.off { background: linear-gradient(#b9b6c6, #7a7590); }
.memes.locked { opacity: 0.45; filter: grayscale(0.7); }
.kc-tag {
  position: absolute; top: 6px; left: 8px; font-family: var(--title); font-size: 11px; color: #fff; background: rgba(27,22,34,0.75);
  border-radius: 6px; padding: 3px 6px 1px;
}
.memes { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.meme-pick {
  contain: layout paint;
  font: inherit; color: inherit; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: #fff; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink);
  padding: 6px 6px 8px; transition: transform 0.12s; position: relative;
}
.meme-pick:hover { transform: translateY(-3px); }
.meme-pick.on { background: #ffd23a; transform: translateY(-2px) rotate(-1deg); }
.meme-pick.on::after {
  content: "✔"; position: absolute; top: -10px; right: -8px; width: 26px; height: 26px; line-height: 22px;
  background: #2eaa2f; color: #fff; border: 3px solid var(--ink); border-radius: 50%; font-size: 14px;
}
.mp-stage { width: 150px; max-width: 100%; height: 84px; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; background: #2a2433; display: flex; align-items: center; justify-content: center; }
.mp-stage canvas { display: block; }
.mp-clip { font-family: var(--title); color: #ffd23a; font-size: 18px; text-shadow: var(--outline); }
.meme-pick b { font-family: var(--title); font-weight: normal; font-size: 15px; line-height: 1.05; }
.meme-pick i { font-style: normal; font-size: 12px; line-height: 1.15; color: #6b5b4b; }

/* ---------------------------------------------------------------- select: mode + map */

.arena-panel { width: min(1120px, 100%); padding: 14px 18px 16px; display: grid; grid-template-columns: 240px 1fr; gap: 18px; }
.arena-modes { display: flex; flex-direction: column; gap: 10px; }
.arena-maps { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mode {
  font: inherit; color: inherit; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px;
  background: #fff; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); padding: 8px 12px 7px;
  transition: transform 0.12s;
}
.mode:hover { transform: translateX(3px); }
.mode.on { background: #ffd23a; transform: translateX(6px) rotate(-1deg); }
.mode b { font-family: var(--title); font-weight: normal; font-size: 19px; line-height: 1; }
.mode i { font-style: normal; font-size: 13px; color: #6b5b4b; }
.maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.map-pick {
  font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: #fff; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); padding: 6px 6px 7px;
  transition: transform 0.12s; position: relative;
}
.map-pick:hover { transform: translateY(-3px); }
.map-pick.on { background: #ffd23a; transform: translateY(-2px) rotate(-1deg); }
.map-pick.on::after {
  content: "✔"; position: absolute; top: -10px; right: -8px; width: 26px; height: 26px; line-height: 22px; text-align: center;
  background: #2eaa2f; color: #fff; border: 3px solid var(--ink); border-radius: 50%; font-size: 14px;
}
.map-pick canvas { display: block; border-radius: 8px; max-width: 100%; height: auto !important; }
.map-pick b { font-family: var(--title); font-weight: normal; font-size: 14px; line-height: 1.05; text-align: center; }
.map-rand {
  width: 132px; max-width: 100%; height: 88px; display: flex; align-items: center; justify-content: center; border-radius: 8px;
  border: 2px solid var(--ink); background: repeating-linear-gradient(45deg, #ffd34a 0 12px, #ffb52a 12px 24px);
  font-family: var(--title); font-size: 48px; color: #fff; text-shadow: var(--outline);
}
.map-desc { font-size: 14px; color: #6b5b4b; min-height: 1.2em; }
.board i.rank {
  font-style: normal; display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; margin-right: 6px;
  border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px;
}
@media (max-width: 820px) { .arena-panel { grid-template-columns: 1fr; } .arena-modes { flex-direction: row; flex-wrap: wrap; align-items: center; } }

/* ---------------------------------------------------------------- controls screen */

.ctrl-panel { width: min(760px, 100%); padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.ctrl-pad { font-size: 16px; background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 8px 12px 6px; }
.ctrl-table { border-collapse: collapse; width: 100%; font-size: 16px; }
.ctrl-table th { font-size: 13px; color: #8b7b6b; text-align: left; padding: 2px 6px; }
.ctrl-table td { padding: 4px 6px; border-top: 2px dashed rgba(27, 22, 34, 0.12); }
.bind {
  font: inherit; font-family: var(--title); font-size: 15px; color: var(--ink); cursor: pointer; min-width: 120px;
  background: #fff; border: 3px solid var(--ink); border-radius: 10px; box-shadow: 0 3px 0 var(--ink); padding: 6px 10px 3px;
}
.bind:hover { background: #fff3c4; }
.bind.empty { color: #b3a898; }
.bind.listening { background: #ffd23a; animation: pulse 0.6s ease-in-out infinite; }
.fixed { font-family: var(--title); font-size: 13px; color: #8b7b6b; }
.ctrl-hint { font-size: 14px; color: #6b5b4b; }
@media (max-width: 560px) { .bind { min-width: 0; width: 100%; font-size: 13px; } .ctrl-table { font-size: 14px; } }

/* Gamepad focus in menus. */
.pad-focus { outline: 4px solid #fff !important; outline-offset: 3px; box-shadow: 0 0 0 9px rgba(27, 22, 34, 0.85), 0 6px 0 var(--ink) !important; z-index: 5; }

/* ---------------------------------------------------------------- clip section editor */

.mp-stage { position: relative; }
.memes-empty { grid-column: 1 / -1; font-size: 15px; color: #6b5b4b; background: #fff; border: 3px dashed #c9b993; border-radius: 12px; padding: 14px; }
.mp-poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.mp-tag {
  position: absolute; left: 4px; bottom: 4px; font-family: var(--title); font-size: 11px; color: #fff;
  background: #e8323e; border: 2px solid var(--ink); border-radius: 6px; padding: 2px 5px 0;
}
.clip-editor { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 16px; margin-top: 14px; align-items: start; }
.clip-editor[hidden] { display: none; }
.ce-screen { position: relative; border: 4px solid var(--ink); border-radius: 14px; overflow: hidden; background: #111; aspect-ratio: 16 / 9; width: 100%; margin: 0 auto; }
.ce-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #111; }
.ce-missing[hidden] { display: none; }
.ce-missing { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--title); }
.ce-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ce-title { font-family: var(--title); font-size: 22px; line-height: 1; }
.ce-help { font-size: 14px; color: #6b5b4b; }
.ce-scrub { padding: 18px 0 6px; margin-top: -6px; cursor: ew-resize; touch-action: none; user-select: none; -webkit-user-select: none; }
.ce-timeline { position: relative; height: 34px; border: 3px solid var(--ink); border-radius: 8px; background: #2a2433; }
.ce-window { position: absolute; top: 0; bottom: 0; background: #ffd23a; border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); }
.ce-window::before, .ce-window::after { content: ""; position: absolute; top: 7px; bottom: 7px; width: 2px; background: rgba(27,22,34,0.45); }
.ce-window::before { left: 2px; } .ce-window::after { right: 2px; }
.ce-scrub[data-hover=move] { cursor: grab; }
.ce-scrub[data-hover=left], .ce-scrub[data-hover=right], .ce-scrub.resizing { cursor: col-resize; }
.ce-scrub.moving { cursor: grabbing; }
.ce-scrub.moving .ce-window, .ce-scrub.resizing .ce-window { background: #ffe066; }
.ce-head { position: absolute; top: -9px; bottom: -3px; width: 4px; margin-left: -2px; background: #e8323e; pointer-events: none; box-shadow: 0 0 0 1.5px var(--ink); }
.ce-head::before {
  content: ""; position: absolute; top: -4px; left: 50%; width: 16px; height: 16px; margin-left: -8px;
  border-radius: 50%; background: #e8323e; border: 3px solid var(--ink); box-sizing: border-box;
}
.ce-scrub:hover .ce-head::before, .ce-scrub.dragging .ce-head::before { transform: scale(1.3); }
.ce-scrub.dragging { cursor: grabbing; }
.ce-times { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: #6b5b4b; }
.ce-now { color: #e8323e; font-family: var(--title); }
.ce-cutinfo { color: #b07a00; }
.ce-row { display: grid; grid-template-columns: 54px 1fr 52px; align-items: center; gap: 8px; font-size: 15px; }
.ce-row input { width: 100%; accent-color: #e8862c; }
.ce-row b { font-family: var(--title); font-weight: normal; text-align: right; }
.ce-buttons { justify-content: flex-start; }
@media (max-width: 700px) { .clip-editor { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- small screens */

@media (max-width: 820px) {
  .sel-panel { grid-template-columns: 1fr; }
  .sel-spacer { display: none; }
  .tab { font-size: 18px; padding: 10px 14px 8px; }
  .btn.big { font-size: 34px; padding: 14px 36px 10px; }
  .sel-bottom { justify-content: center; }
}
@media (max-width: 560px) {
  .s1 { right: -4px; top: -40px; font-size: 14px; }
  .sel-panel { padding: 10px; gap: 12px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { min-width: 0; }
  .card canvas { width: 100% !important; height: auto !important; max-width: 160px; }
  .sel-top { flex-wrap: wrap; justify-content: center; }
  .heading { font-size: 28px; order: -1; width: 100%; text-align: center; }
  .weapon { gap: 8px; }
  .wicon { width: 72px !important; height: 33px !important; }
}
@media (max-width: 420px) {
  .cards { gap: 10px; }
  .cname { font-size: 16px; }
  .ctag { font-size: 12px; }
  .bars { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- clip download (first visit) */
.clip-loader {
  position: fixed; right: 14px; bottom: 14px; z-index: 50; display: flex; align-items: center; gap: 8px;
  background: rgba(27,22,34,0.82); color: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 6px 10px 4px;
  font-family: var(--title); font-size: 13px; pointer-events: none; transition: opacity 0.6s, transform 0.6s;
}
.clip-loader .cl-bar { width: 90px; height: 8px; border-radius: 4px; background: #4a4256; overflow: hidden; }
.clip-loader .cl-bar i { display: block; height: 100%; width: 0; background: #ffd23a; transition: width 0.25s; }
.clip-loader.done, .clip-loader.in-match { opacity: 0; transform: translateY(12px); }

/* ---------------------------------------------------------------- suggest a clip */
.suggest-btn { margin-left: auto; }
.suggest { position: fixed; inset: 0; z-index: 40; background: rgba(27,22,34,0.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.suggest-card { width: min(460px, 100%); display: flex; flex-direction: column; gap: 10px; }
.suggest-card label { display: flex; flex-direction: column; gap: 4px; font-size: 15px; font-weight: bold; }
.suggest-card input { font: inherit; font-weight: normal; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 10px; background: #fff; }
.suggest-card .row { justify-content: flex-end; margin-top: 4px; }
.suggest-done { font-family: var(--title); color: #2eaa2f; text-align: center; font-size: 18px; }
.suggest-done[hidden] { display: none; }

/* ---------------------------------------------------------------- two clips: death sound / kill clip */
.slot-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.slot-tab {
  font: inherit; color: inherit; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 3px;
  background: #fff; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); padding: 8px 12px;
}
.slot-tab b { font-family: var(--title); font-weight: normal; font-size: 19px; }
.slot-tab i { font-style: normal; font-size: 13px; line-height: 1.2; color: #6b5b4b; }
.slot-tab .slot-pick { font-size: 13px; font-weight: bold; color: #b07a00; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-tab.on { background: #ffd23a; transform: translateY(-2px); }
.slot-tab.on i { color: #4a3b2b; }
.meme-pick.is-death .mp-stage::before, .meme-pick.is-kill .mp-stage::after {
  position: absolute; top: 3px; z-index: 1; font-size: 15px; line-height: 1; background: rgba(27,22,34,0.75); border-radius: 6px; padding: 2px 3px;
}
.meme-pick.is-death .mp-stage::before { content: "💀"; left: 3px; }
.meme-pick.is-kill .mp-stage::after { content: "🔪"; right: 3px; }
@media (max-width: 700px) { .slot-tabs { grid-template-columns: 1fr; } }

/* ================================================================ home: cinematic + live broadcast */
:root { --tv: "Barlow Condensed", "Arial Narrow", sans-serif; --tv-red: #e3262f; --tv-gold: #ffcf3f; }

/* Letterbox bars (they slide in), shared by the loading screen and the title. */
.cine-bar {
  position: absolute !important; left: 0; right: 0; height: clamp(38px, 7.5vh, 66px); background: #000; z-index: 3 !important;
  display: flex; align-items: center; gap: 14px; padding: 0 clamp(14px, 3vw, 40px);
  font-family: var(--tv); color: #f4f1ea; animation: barin 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.cine-bar.top { top: 0; } .cine-bar.bottom { bottom: 0; animation-name: barin2; }
@keyframes barin { from { transform: translateY(-100%); } }
@keyframes barin2 { from { transform: translateY(100%); } }

/* ---------------- loading screen */
.screen.splash { background: #04060b; cursor: default; }
.screen.splash::after { background: radial-gradient(ellipse at center, rgba(0,0,0,0) 35%, rgba(0,0,0,0.65) 100%); }
.screen.splash.ready { cursor: pointer; }
.space-bg { position: absolute !important; inset: 0; width: 100%; height: 100%; z-index: 0 !important; display: block; }
.boot { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(520px, calc(100vw - 32px)); font-family: var(--tv); }
.boot-logo { animation: logoin 1.6s cubic-bezier(0.15, 0.9, 0.2, 1) both; text-align: center; }
.boot-logo .logo-big { font-size: clamp(56px, 11vw, 120px); }
.boot-logo .logo-sub { font-size: clamp(18px, 3.2vw, 32px); }
@keyframes logoin { from { opacity: 0; transform: scale(1.18); filter: blur(6px); } }
.checks { list-style: none; margin: 6px 0 0; padding: 0; width: 100%; font-size: 17px; letter-spacing: 0.04em; text-transform: uppercase; animation: fadein 1s 0.5s both; }
.checks li { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; color: #8d96a6; }
.checks li span { white-space: nowrap; }
.checks li::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted rgba(141,150,166,0.45); transform: translateY(-4px); }
.checks li b { order: 2; font-weight: 600; color: #c8ced8; white-space: nowrap; }
.checks li.busy b { color: var(--tv-gold); }
.checks li.done b::after { content: "  ✓"; color: #6fdc7a; }
.boot-line { width: 100%; height: 3px; background: rgba(255,255,255,0.12); overflow: hidden; animation: fadein 1s 0.5s both; }
.boot-line i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2f5bd8, #ffffff 50%, #e3262f); }
.boot-state { font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; color: #c8ced8; min-height: 1.2em; }
.boot-go {
  font-family: var(--tv); font-weight: 700; font-size: 18px; letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer;
  color: #c8ced8; background: none; border: 1px solid rgba(200,206,216,0.35); padding: 10px 28px 9px; transition: all 0.2s;
}
.boot-go:hover, .boot-go.pad-focus { color: #fff; border-color: #fff; }
.boot-go.ready { font-size: 26px; padding: 12px 54px 10px; color: #0b0d12; background: #f4f1ea; border-color: #f4f1ea; animation: breathe 1.8s ease-in-out infinite; }
.boot-go.ready:hover { background: var(--tv-gold); border-color: var(--tv-gold); }
@keyframes breathe { 50% { box-shadow: 0 0 0 6px rgba(244,241,234,0.12), 0 0 34px rgba(244,241,234,0.25); } }
.boot-hint { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: #5f6878; }

/* ---------------- title: live broadcast */
.screen.title::after {
  background:
    linear-gradient(90deg, rgba(4,6,11,0.82) 0%, rgba(4,6,11,0.55) 30%, rgba(4,6,11,0) 58%),
    radial-gradient(ellipse at 65% 50%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.45) 100%);
}
.tv-live { display: inline-flex; align-items: center; gap: 8px; background: var(--tv-red); color: #fff; font-weight: 800; font-size: 16px; letter-spacing: 0.12em; padding: 4px 10px 3px; }
.tv-live i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: led 1.4s ease-in-out infinite; }
@keyframes led { 50% { opacity: 0.25; } }
.tv-show { font-weight: 600; font-size: 16px; letter-spacing: 0.14em; text-transform: uppercase; color: #aab2c0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-clock { margin-left: auto; font-weight: 700; font-size: 20px; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.tv-flash { background: var(--tv-gold); color: #111; font-weight: 800; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 10px 3px; white-space: nowrap; }
.tv-ticker { flex: 1; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.tv-track { display: inline-block; animation: ticker 70s linear infinite; font-weight: 600; font-size: 18px; letter-spacing: 0.03em; }
.tv-track span { padding: 0 26px; }
.tv-track span::after { content: "◆"; color: var(--tv-red); font-size: 11px; margin-left: 52px; vertical-align: 2px; }
@keyframes ticker { to { transform: translateX(-50%); } }

.screen.title { justify-content: center; }
.tv-menu { align-self: flex-start; margin-left: clamp(18px, 6vw, 96px); display: flex; flex-direction: column; gap: clamp(14px, 3vh, 30px); animation: fadein 0.9s 0.3s both; }
.tv-menu .logo { align-items: flex-start; text-align: left; }
.tv-menu .logo-big { font-size: clamp(58px, 8.5vw, 132px); }
.tv-menu .logo-sub { font-size: clamp(18px, 2.4vw, 34px); margin-left: 6px; }
.tv-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tv-item {
  position: relative; background: none; border: 0; cursor: pointer; text-align: left; padding: 4px 0 4px 0;
  font-family: var(--tv); font-weight: 800; font-size: clamp(30px, 4vw, 46px); line-height: 1; letter-spacing: 0.04em; text-transform: uppercase;
  color: #f4f1ea; text-shadow: 0 2px 10px rgba(0,0,0,0.6); transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.18s;
  display: flex; flex-direction: column;
}
.tv-item em { font-style: normal; font-weight: 500; font-size: 15px; letter-spacing: 0.08em; text-transform: none; color: #8d96a6; margin-top: 3px; opacity: 0; transform: translateY(-4px); transition: all 0.18s; }
.tv-item::before {
  content: ""; position: absolute; left: -22px; top: 8px; width: 6px; height: calc(100% - 16px); opacity: 0;
  background: linear-gradient(#2f5bd8 0 33%, #ffffff 33% 66%, #e3262f 66%); transition: opacity 0.18s;
}
.tv-item:hover, .tv-item.pad-focus { transform: translateX(14px); color: var(--tv-gold); }
.tv-item:hover::before, .tv-item.pad-focus::before { opacity: 1; }
.tv-item:hover em, .tv-item.pad-focus em { opacity: 1; transform: none; }
.tv-item.primary { font-size: clamp(44px, 6vw, 72px); }
.tv-opts { display: flex; gap: 6px; margin-top: 10px; }
.tv-opt {
  font-family: var(--tv); font-weight: 600; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
  color: #aab2c0; background: rgba(0,0,0,0.35); border: 1px solid rgba(170,178,192,0.3); padding: 6px 12px 5px; transition: all 0.15s;
}
.tv-opt:hover, .tv-opt.pad-focus { color: #fff; border-color: #fff; }
.tv-opt[hidden] { display: none; }

/* lower-third caption */
.tv-chyron {
  position: absolute !important; left: clamp(18px, 6vw, 96px); bottom: calc(clamp(38px, 7.5vh, 66px) + 18px); z-index: 2 !important;
  display: flex; align-items: stretch; font-family: var(--tv); text-transform: uppercase; pointer-events: none;
  opacity: 0; transform: translateX(-30px);
}
.tv-chyron.on { animation: chyron 4.2s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes chyron { 0% { opacity: 0; transform: translateX(-30px); } 8%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(-12px); } }
.tv-tag { background: var(--tv-red); color: #fff; font-weight: 800; font-size: 16px; letter-spacing: 0.12em; padding: 7px 12px 6px; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.tv-text { background: #f4f1ea; color: #111; font-weight: 700; font-size: 19px; letter-spacing: 0.03em; padding: 6px 16px 5px; white-space: nowrap; max-width: 70vw; overflow: hidden; text-overflow: ellipsis; }
.title .footer { position: absolute; bottom: calc(clamp(38px, 7.5vh, 66px) + 4px); right: 14px; left: auto; max-width: 46vw; text-align: right; font-family: var(--tv); font-size: 12px; color: rgba(200,206,216,0.55); text-shadow: 0 1px 2px #000; }
@media (max-width: 760px) { .tv-show { display: none; } .title .footer { display: none; } .tv-chyron { left: 14px; } }

/* clip download pill (menus) */
.clip-loader { font-family: var(--tv); font-weight: 700; letter-spacing: 0.08em; background: rgba(0,0,0,0.75); border: 1px solid rgba(255,255,255,0.18); border-radius: 0; }
.clip-loader .cl-bar { background: rgba(255,255,255,0.15); border-radius: 0; height: 3px; }
.clip-loader .cl-bar i { background: linear-gradient(90deg, #2f5bd8, #fff, #e3262f); }

/* a new version is online */
.update-toast {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px;
  font-family: var(--tv); font-size: 17px; letter-spacing: 0.04em; color: #111; background: var(--tv-gold); padding: 8px 10px 8px 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.update-toast button { font-family: var(--tv); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; border: 0; background: #111; color: #fff; padding: 6px 12px 5px; cursor: pointer; }

/* end screen: replay the winner's clip */
.mvp-replay {
  position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; cursor: pointer;
  font-family: var(--title); font-size: 20px; color: #fff; background: rgba(27,22,34,0.72); border: 3px solid #fff; border-radius: 12px; padding: 8px 16px 5px;
}
.mvp-replay:hover { background: #e8323e; }
.mvp-replay[hidden] { display: none; }

/* opening debate (over the title, before the menu shows) */
.debate { position: absolute !important; inset: 0; width: 100%; height: 100%; z-index: 10 !important; display: block; cursor: pointer; }
.screen.title.intro .tv-menu, .screen.title.intro .cine-bar, .screen.title.intro .tv-chyron, .screen.title.intro .footer { display: none; }

/* weapon families (tabs above the weapon list) */
.wclasses { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.wclass {
  font-family: var(--ui); font-size: 13px; cursor: pointer; color: var(--ink); background: #fff;
  border: 3px solid var(--ink); border-radius: 10px; padding: 4px 9px 3px; box-shadow: 0 3px 0 var(--ink);
}
.wclass.on { background: #ffd23a; transform: translateY(-1px); }
.wclass.has::after { content: " ●"; color: #e8323e; }
.weapon[hidden] { display: none; }

/* ---------------------------------------------------------------- your pseudo (select screen) */
.pseudo { display: flex; align-items: center; gap: 8px; font-family: var(--title); color: #fff; font-size: 15px; text-shadow: var(--outline); }
.pseudo input {
  width: 150px; padding: 7px 10px 5px; border: 3px solid var(--ink); border-radius: 10px; background: #fff6dc;
  font-family: var(--title); font-size: 16px; color: var(--ink); box-shadow: 0 4px 0 var(--ink); outline: none;
}
.pseudo input:focus { background: #fff; }

/* ---------------------------------------------------------------- end screen: both teams, everyone */
.team-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin: 8px 0 4px; }
.team-board { border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fffaf0; }
.team-board.mine { box-shadow: 0 0 0 3px #ffd23a; }
.tb-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px 4px; color: #fff; font-family: var(--title); text-shadow: var(--outline); }
.tb-head b { font-size: 17px; }
.tb-head i { font-style: normal; font-size: 12px; background: #ffd23a; color: var(--ink); text-shadow: none; padding: 2px 6px; border-radius: 6px; }
.tb-head span { margin-left: auto; font-size: 24px; }
.team-board .board { margin: 0; width: 100%; font-size: 13px; }
.team-board .board th, .team-board .board td { padding: 3px 6px; }
.next-game { margin: 8px 0 2px; font-size: 14px; color: #6b5b4b; }
.next-game b { color: var(--ink); font-size: 17px; }
@media (max-width: 760px) { .team-boards { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- matchmaking + loading screen */
.screen.match { position: fixed; inset: 0; background: #0d0b12; color: #fff; display: block; padding: 0; overflow: hidden; }
.mm-search { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
  background: radial-gradient(ellipse at center, #22304f 0%, #0d0b12 70%); }
.mm-spin { width: 64px; height: 64px; border-radius: 50%; border: 7px solid rgba(255,255,255,0.15); border-top-color: #ffd23a; animation: mmspin 0.9s linear infinite; margin-bottom: 8px; }
@keyframes mmspin { to { transform: rotate(360deg); } }
.mm-title { font-family: var(--title); font-size: 40px; letter-spacing: 1px; text-shadow: var(--outline), 0 5px 0 var(--ink); }
.mm-mode { font-family: var(--title); font-size: 18px; color: #9fd0ff; }
.mm-count { font-size: 20px; } .mm-count b { color: #ffd23a; font-size: 26px; }
.mm-time { font-size: 14px; color: #aab2c0; } .mm-time b { color: #fff; }
.mm-search .btn { margin-top: 14px; }
.mm-load { position: absolute; inset: 0; }
.mm-map { position: absolute; inset: 0; width: 100%; height: 100%; filter: saturate(1.1); }
.mm-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,6,14,0.92) 0%, rgba(8,6,14,0.55) 45%, rgba(8,6,14,0.2) 70%, rgba(8,6,14,0.75) 100%),
  linear-gradient(0deg, rgba(8,6,14,0.85) 0%, rgba(8,6,14,0) 40%); }
.mm-info { position: absolute; left: 5vw; bottom: 8vh; width: min(560px, 80vw); }
.mm-tag { display: inline-block; font-family: var(--title); font-size: 14px; background: #e8323e; padding: 4px 10px 2px; border-radius: 6px; margin-bottom: 22px; }
.mm-name { font-family: var(--title); font-size: clamp(44px, 7vw, 88px); line-height: 0.95; text-shadow: var(--outline), 0 7px 0 var(--ink); }
.mm-sub { font-family: var(--title); font-size: 19px; color: #ffd23a; margin: 10px 0 14px; text-shadow: 2px 2px 0 var(--ink); }
.mm-tip { font-size: 15px; color: #d7dbe3; margin-bottom: 18px; max-width: 520px; }
.mm-bar { height: 10px; border-radius: 6px; background: rgba(255,255,255,0.15); overflow: hidden; border: 2px solid var(--ink); }
.mm-bar i { display: block; height: 100%; width: 0; background: #ffd23a; transition: width 0.15s linear; }
.mm-status { margin-top: 8px; font-size: 13px; color: #aab2c0; }
.mm-teams { position: absolute; right: 4vw; top: 8vh; display: flex; gap: 14px; }
.mm-team { width: 190px; background: rgba(13,11,18,0.72); border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; }
.mm-th { font-family: var(--title); font-size: 15px; padding: 6px 10px 4px; background: #3d4a40; text-shadow: var(--outline); }
.mm-p { padding: 5px 10px; font-size: 14px; border-top: 1px solid rgba(255,255,255,0.08); }
.mm-p.me { color: #ffd23a; font-weight: 700; }
@media (max-width: 860px) { .mm-teams { display: none; } }
.end-wrap .end-panel:has(.team-boards) { max-width: min(920px, 96vw); }
.team-board .board { min-width: 0; }

.kick-toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 50; background: #e8323e; color: #fff; font-family: var(--title);
  font-size: 18px; padding: 12px 20px 9px; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 0 6px 0 var(--ink); text-shadow: var(--outline); }

/* ---------------------------------------------------------------- select: poses, weapon info */
.weapon-hint { font-size: 13px; color: #6b5b4b; margin: 2px 0 8px; line-height: 1.35; }
.weapon { cursor: default; }
.poses { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.pose-pick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 6px; background: #fffaf0; border: 3px solid var(--ink);
  border-radius: 12px; cursor: pointer; font-family: var(--ui); box-shadow: 0 4px 0 var(--ink); }
.pose-pick canvas { width: 84px; height: 104px; }
.pose-pick b { font-size: 12px; text-align: center; line-height: 1.1; }
.pose-pick i { font-style: normal; font-size: 9px; color: #b0892a; }
.pose-pick.on { background: #ffd23a; }

/* ---------------------------------------------------------------- matchmaking: lobby list, map roulette */
.mm-search { flex-direction: row; gap: 5vw; padding: 0 4vw; }
.mm-left { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 300px; }
.mm-note { min-height: 20px; font-size: 14px; color: #ffd23a; max-width: 320px; }
.mm-mid { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mm-rt { font-family: var(--title); font-size: 16px; color: #9fd0ff; letter-spacing: 2px; }
.mm-roul { width: 320px; border: 4px solid var(--ink); border-radius: 14px; overflow: hidden; background: #1b1622; box-shadow: 0 6px 0 var(--ink); transition: transform 0.2s; }
.mm-roul canvas { display: block; width: 320px; height: 200px; filter: brightness(0.8); }
.mm-roul b { display: block; padding: 8px 10px 6px; font-family: var(--title); font-size: 20px; text-align: center; }
.mm-roul.final { transform: scale(1.08); box-shadow: 0 0 0 4px #ffd23a, 0 6px 0 var(--ink); }
.mm-roul.final canvas { filter: none; } .mm-roul.final b { color: #ffd23a; }
.mm-lobby { width: 210px; align-self: center; background: rgba(13,11,18,0.6); border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; text-align: left; min-height: 260px; }
.mm-p.wait { color: #7b8494; font-style: italic; }
@media (max-width: 900px) { .mm-lobby { display: none; } .mm-search { flex-direction: column; gap: 18px; } .mm-roul, .mm-roul canvas { width: 240px; } .mm-roul canvas { height: 150px; } }

.podium { display: block; margin: 2px auto 0; }

/* ---------------------------------------------------------------- loading screen: clearer, nothing floats over the text */
.boot { position: relative; z-index: 1; gap: 12px; width: min(560px, calc(100vw - 32px)); }
.boot::before { content: ""; position: absolute; inset: -70px -160px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(4,6,11,0.94) 0%, rgba(4,6,11,0.82) 42%, rgba(4,6,11,0) 72%); }
.boot-tag { font-size: clamp(13px, 1.6vw, 17px); letter-spacing: 0.32em; text-transform: uppercase; color: #9fb3ec; margin: -4px 0 8px; text-align: center; animation: fadein 1s 0.4s both; }
.boot-prog { display: flex; align-items: center; gap: 14px; width: 100%; animation: fadein 1s 0.5s both; }
.boot-prog .boot-line { flex: 1; height: 8px; border-radius: 5px; animation: none; }
.boot-line i { border-radius: 5px; box-shadow: 0 0 14px rgba(255,255,255,0.35); }
.boot-pct { font-size: 20px; font-weight: 700; color: var(--tv-gold); min-width: 58px; text-align: right; letter-spacing: 0.04em; }
.boot-state { font-size: 14px; margin-top: -4px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 34px; font-size: 13px; margin: 0; opacity: 0.9; }
.checks li:first-child { grid-column: 1 / -1; }
.checks li { padding: 2px 0; }
.boot-news { width: 100%; display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-left: 3px solid var(--tv-gold); background: rgba(255,255,255,0.05); font-size: 14px; color: #c8ced8; }
.boot-news[hidden] { display: none; }
.boot-news b { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tv-gold); margin-bottom: 2px; }
.boot-news span::before { content: "· "; color: var(--tv-gold); }
.boot-go { margin-top: 6px; }
.screen.splash .cine-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(14px, 3vw, 44px); font-family: var(--tv);
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: #8d96a6; }
.screen.splash .cine-bar.bottom { justify-content: center; }
.boot-air { display: flex; align-items: center; gap: 9px; }
.boot-air i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #8d96a6; }
.boot-tip { color: #c8ced8; letter-spacing: 0.06em; text-transform: none; font-size: 15px; text-align: center; opacity: 0; }
.boot-tip.in { animation: tipin 6s both; }
@keyframes tipin { 0% { opacity: 0; transform: translateY(6px); } 8%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (max-width: 560px) { .boot-air { font-size: 10px; letter-spacing: 0.08em; } .boot-tip { font-size: 12px; } .checks { grid-template-columns: 1fr; } .boot::before { inset: -40px -20px; } }
@media (max-height: 640px) { .boot-news { display: none; } .boot-logo .logo-big { font-size: clamp(40px, 12vh, 80px); } .boot-tag { margin-bottom: 2px; } .boot { gap: 8px; } }

/* ---------------------------------------------------------------- select: the mode (one big button, and the menu with the five cards) */

.mode-now {
  font: inherit; color: inherit; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 3px;
  background: #ffd23a; border: 4px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); padding: 8px 10px 9px; transition: transform 0.12s;
}
.mode-now:hover { transform: translateY(-2px) rotate(-0.6deg); }
.mode-now canvas { border: 3px solid var(--ink); border-radius: 10px; display: block; max-width: 100%; }
.mode-now b { font-family: var(--title); font-weight: normal; font-size: 21px; line-height: 1; margin-top: 4px; }
.mode-now i { font-style: normal; font-size: 13px; color: #6b5b4b; }
.mode-now em { font-style: normal; font-size: 12px; align-self: flex-start; background: var(--ink); color: #fff; border-radius: 8px; padding: 3px 9px; margin-top: 3px; }
.mode-pick { position: fixed; inset: 0; z-index: 30; background: rgba(20, 14, 30, 0.78); display: flex; align-items: center; justify-content: center; padding: 18px; overflow: auto; }
.mode-pick[hidden] { display: none; }
.mode-pick-in { width: min(1040px, 100%); max-height: 100%; overflow: auto; background: #fff6dc; border: 5px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 0 var(--ink); padding: 18px 22px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mode-pick-in h2 { font-family: var(--title); font-weight: normal; font-size: 38px; margin: 0; line-height: 1; }
.mode-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.mode.mode-card { width: 316px; padding: 0 0 10px; gap: 0; overflow: hidden; border-radius: 18px; box-shadow: 0 5px 0 var(--ink); }
.mode.mode-card:hover { transform: translateY(-4px) rotate(-0.8deg); }
.mode.mode-card.on { transform: rotate(-1deg) scale(1.03); background: #ffd23a; }
.mode-card canvas { display: block; width: 100% !important; height: auto !important; aspect-ratio: 300 / 168; border-bottom: 4px solid var(--ink); }
.mode-card span { display: flex; flex-direction: column; gap: 3px; padding: 9px 13px 0; }
.mode-card em { font-style: normal; font-size: 12px; color: #8b5a00; text-transform: uppercase; letter-spacing: 0.04em; }
.mode-card b { font-size: 23px; }
.mode-card i { font-size: 13.5px; line-height: 1.25; }
@media (max-width: 720px) { .mode.mode-card { width: 100%; } .mode-pick-in h2 { font-size: 28px; } }

/* ---------------------------------------------------------------- select: rows that scroll sideways (modes, poses, crosshairs, killstreaks) */

.arena-panel { display: flex; flex-direction: column; gap: 16px; }
.arena-modes, .arena-maps, .arena-cross { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hscroll {
  display: flex !important; flex-wrap: nowrap; gap: 12px; overflow-x: auto; overflow-y: hidden; padding: 14px 12px 14px; margin: 0 -6px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--ink) transparent;
}
.hscroll > * { flex: 0 0 auto; scroll-snap-align: start; }
.hscroll::-webkit-scrollbar { height: 10px; }
.hscroll::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 6px; }
.hscroll::-webkit-scrollbar-track { background: rgba(27, 22, 34, 0.12); border-radius: 6px; }
.mode-row .mode.mode-card { width: 272px; }
.mode-row .mode-card canvas { aspect-ratio: 264 / 148; }
.mode-row .mode.mode-card:hover { transform: translateY(-3px); }
.mode-row .mode.mode-card.on { transform: rotate(-1deg); }
.poses.hscroll > .pose-pick { width: 104px; }
.streaks.hscroll > .streak { width: 232px; }
.cross-pick { font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fffaf0; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); padding: 6px 8px 5px; }
.cross-pick canvas { border-radius: 8px; border: 2px solid var(--ink); display: block; }
.cross-pick b { font-size: 11px; font-weight: normal; }
.cross-pick.on { background: #ffd23a; transform: rotate(-2deg); }
.cross-colors { display: flex; gap: 10px; flex-wrap: wrap; padding: 2px 0 0; }
.cross-col { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); cursor: pointer; padding: 0; }
.cross-col.on { outline: 4px solid #ffd23a; outline-offset: 2px; transform: scale(1.12); }
.vs { display: none !important; }

/* ---------------------------------------------------------------- phones: touch controls, the home-screen guide */

.touch { position: fixed; inset: 0; z-index: 20; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.t-stick { position: absolute; width: 128px; height: 128px; margin: -64px 0 0 -64px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.55); background: rgba(27, 22, 34, 0.28); display: none; pointer-events: none; }
.t-stick.on { display: block; }
.t-stick i { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(255, 255, 255, 0.82); border: 3px solid var(--ink); }
.t-btn {
  position: absolute; width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--ink); background: rgba(255, 246, 220, 0.82); color: var(--ink);
  font: 11px var(--ui); font-weight: 700; letter-spacing: 0.02em; box-shadow: 0 4px 0 rgba(27, 22, 34, 0.8); padding: 0; touch-action: none;
}
.t-btn.down { transform: translateY(3px) scale(0.94); background: #ffd23a; box-shadow: 0 1px 0 rgba(27, 22, 34, 0.8); }
.t-act { right: calc(22px + env(safe-area-inset-right)); bottom: 178px; width: 78px; height: 78px; background: rgba(255, 210, 58, 0.9); font-size: 13px; }
.t-gre { right: calc(112px + env(safe-area-inset-right)); bottom: 196px; }
.t-rel { right: calc(28px + env(safe-area-inset-right)); bottom: 268px; }
.t-swp { right: calc(104px + env(safe-area-inset-right)); bottom: 272px; }
.t-gad { right: calc(186px + env(safe-area-inset-right)); bottom: 214px; }
.t-menu { left: calc(50% + 200px); top: calc(8px + env(safe-area-inset-top)); width: 42px; height: 42px; font-size: 14px; background: rgba(27, 22, 34, 0.6); color: #fff; }
.t-rotate { display: none; position: absolute; left: 50%; top: 96px; transform: translateX(-50%); background: rgba(27, 22, 34, 0.85); color: #ffd23a; font: 14px var(--ui); padding: 8px 14px; border-radius: 12px; white-space: nowrap; pointer-events: none; }
@media (orientation: portrait) { .t-rotate { display: block; } }
@media (max-height: 430px) { .t-act { bottom: 118px; } .t-gre { bottom: 132px; } .t-rel { bottom: 204px; } .t-swp { bottom: 208px; } .t-gad { bottom: 150px; } .t-btn { width: 56px; height: 56px; } .t-act { width: 68px; height: 68px; } }
.install { position: fixed; inset: 0; z-index: 60; background: rgba(20, 14, 30, 0.82); display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; }
.ins-in { width: min(560px, 100%); max-height: 100%; overflow: auto; background: #fff6dc; color: var(--ink); border: 5px solid var(--ink); border-radius: 22px; box-shadow: 0 8px 0 var(--ink); padding: 18px 22px 20px; font-family: var(--ui); }
.ins-tag { display: inline-block; background: var(--ink); color: #ffd23a; border-radius: 8px; padding: 3px 10px; font-size: 12px; letter-spacing: 0.06em; }
.ins-in h2 { font-family: var(--title); font-weight: normal; font-size: 28px; line-height: 1.05; margin: 8px 0 6px; }
.ins-in p { margin: 0 0 10px; font-size: 15px; color: #6b5b4b; }
.ins-in ol { margin: 0 0 14px; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; font-size: 16px; line-height: 1.3; }
.ins-ico { display: inline-flex; vertical-align: -6px; background: #fff; border: 2px solid var(--ink); border-radius: 7px; padding: 1px 3px; color: #1d6fe0; }
.ins-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
