/* Azeroth Tactics. The layout follows Teamfight Tactics: the arena fills the
   screen and everything else floats over it. The dress is Warcraft's: dark
   stone and leather, gold trim, red buttons, item-quality colours for cost. */
@font-face { font-family: "Cinzel"; src: url("fonts/cinzel.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Marcellus"; src: url("fonts/marcellus.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #07060a;
  --panel: #14100cf0;
  --panel2: #221a12;
  --line: #5c4a26;
  --trim: #c8a04a;      /* gold border */
  --text: #f0e6d2;
  --dim: #a89878;
  --gold: #ffd100;      /* Warcraft's yellow text */
  /* cost uses item quality: common, uncommon, rare, epic, legendary */
  --c1: #b8b8b8;
  --c2: #1eff00;
  --c3: #3d9bff;
  --c4: #b55cff;
  --c5: #ff8000;
  --ally: #4fb3ff;
  --foe: #ff5a4f;
  --title: "Cinzel", "Trajan Pro", Georgia, serif;
  --ui: "Marcellus", Georgia, "Times New Roman", serif;
  --small: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  background: radial-gradient(ellipse at 50% 20%, #2a1c12 0%, #0f0a08 55%, var(--bg) 100%);
  color: var(--text);
  font: 14px/1.35 var(--ui);
  user-select: none;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
/* Sprites come in any shape (square icons, wide portraits): crop, never stretch. */
img { display: block; object-fit: cover; object-position: center; }

/* Stone-and-gold frame shared by every panel. */
.frame, #traits, #meter, #players, #items, #chat, #shopbar, .card, #ptop, #ptraits, #pmain, #top .plate {
  background: linear-gradient(180deg, #1c150fee 0%, #0e0a07f2 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px #000, inset 0 1px 0 1px #ffffff0d, 0 0 0 1px #000, 0 8px 22px #000a;
}

/* Warcraft's red button. */
button {
  font: 600 13px/1 var(--title); letter-spacing: .4px; color: var(--gold); cursor: pointer;
  background: linear-gradient(180deg, #8f1d12 0%, #6a120a 55%, #4a0a05 100%);
  border: 1px solid var(--trim); border-radius: 5px; padding: 9px 16px;
  box-shadow: inset 0 1px 0 #ffffff33, inset 0 -2px 4px #0008, 0 0 0 1px #000;
  text-shadow: 0 1px 2px #000;
}
button:hover:not(:disabled) { filter: brightness(1.25); color: #fff2a8; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { filter: grayscale(.8) brightness(.6); cursor: default; }
button.primary { font-size: 15px; padding: 11px 18px; }
input, select {
  font: 15px var(--ui); color: var(--text); background: #0a0806; border: 1px solid var(--line);
  border-radius: 4px; padding: 9px 11px; box-shadow: inset 0 2px 6px #000;
}
input:focus, select:focus { outline: none; border-color: var(--trim); }
h1 {
  font: 900 44px/1 var(--title); letter-spacing: 3px; margin: 0 0 6px;
  background: linear-gradient(180deg, #fff3b0 0%, #ffd100 45%, #b07a12 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 14px #ff9a0040);
}
kbd { font: 10px var(--small); color: var(--dim); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; background: #0008; }
.side-title { font: 600 11px var(--title); color: var(--trim); text-transform: uppercase; letter-spacing: 1.5px; margin: 2px 4px 8px; }
.hint { color: var(--dim); font: 11px/1.4 var(--small); }

/* ---------- menu & lobby ---------- */
.center { height: 100%; display: flex; overflow-y: auto; padding: 8px; }
.card { padding: 34px 38px 24px; width: 460px; max-width: 100%; margin: auto; text-align: center; border-color: var(--trim); }
.card .legal { margin-top: 22px; padding-top: 12px; border-top: 1px solid #3a2e18; color: #8a7c62; font: 10.5px/1.45 var(--small); }
.card p { color: var(--dim); margin: 0 0 22px; font-size: 16px; }
.card .row { display: flex; gap: 8px; margin-top: 10px; }
.card .row > * { flex: 1; min-width: 0; }
.card .sep { font: 600 11px var(--title); color: var(--trim); margin: 18px 0 6px; text-transform: uppercase; letter-spacing: 2px; }
.code { font: 900 38px/1 var(--title); color: var(--gold); letter-spacing: 10px; margin: 8px 0 4px; user-select: text; text-shadow: 0 2px 0 #000; }
.seats { list-style: none; padding: 0; margin: 16px 0; text-align: left; }
.seats li { padding: 8px 10px; border-bottom: 1px solid #3a2e18; display: flex; justify-content: space-between; }
.seats li span { color: var(--dim); font-size: 12px; }

/* ---------- game: full-screen arena with the interface over it ---------- */
#game { position: relative; height: 100%; overflow: hidden; }
#game > * { position: absolute; }
#stage { inset: 0; }

/* top centre: stage, rounds, timer */
#top { top: 8px; left: 50%; translate: -50% 0; width: 500px; text-align: center; pointer-events: none; }
#top > * { pointer-events: auto; }
#top .plate { display: flex; align-items: center; gap: 12px; padding: 6px 14px; border-color: var(--trim); border-radius: 6px 6px 0 0; }
#top .stageno { font: 900 22px/1 var(--title); color: var(--gold); text-shadow: 0 2px 0 #000; min-width: 54px; }
#top .pips { display: flex; gap: 5px; flex: 1; justify-content: center; }
.pip { width: 28px; height: 28px; display: grid; place-items: center; font-size: 13px; background: #0a0806; border: 2px solid #3a2e18; rotate: 45deg; opacity: .6; }
.pip > i { rotate: -45deg; font-style: normal; }
.pip.won { border-color: #1eff00; opacity: 1; }
.pip.lost { border-color: #ff3b2f; opacity: 1; }
.pip.cur { border-color: var(--gold); opacity: 1; box-shadow: 0 0 10px var(--gold); }
#top .time { font: 900 22px/1 var(--title); color: #fff; width: 44px; height: 44px; margin: -6px 0; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(#3a0d08, #160503); border: 2px solid var(--trim); box-shadow: 0 0 0 1px #000; }
#top .bar { height: 6px; background: #000; border: 1px solid var(--line); border-top: 0; overflow: hidden; }
#top .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b07a12, var(--gold)); }
#top .phase { display: inline-block; margin-top: 5px; padding: 3px 14px; font: 600 13px var(--title); letter-spacing: .5px; color: var(--text); background: #000b; border: 1px solid var(--line); border-radius: 12px; text-shadow: 0 1px 2px #000; }
#top .phase.pvp { border-color: #a0362c; }
#top .phase.pve { border-color: #8a6a2a; }
#top .phase.carousel { border-color: #3d7ac0; }
#top .room { color: var(--dim); font: 11px var(--small); margin-left: 8px; }
#banner { top: 96px; left: 0; right: 0; text-align: center; font-size: 15px; color: var(--text); text-shadow: 0 1px 3px #000, 0 0 8px #000; pointer-events: none; z-index: 5; }

/* left: synergies and damage */
#left { left: 10px; top: 10px; bottom: 244px; width: 232px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
#traits, #meter { padding: 8px; overflow-y: auto; pointer-events: auto; }
#traits { flex: 0 1 auto; min-height: 0; }
#meter { flex: none; max-height: 42%; }
#meter:empty { display: none; }
.trait { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; color: var(--dim); font-size: 14px; }
.trait .ic { width: 28px; height: 28px; filter: grayscale(1) brightness(.6); flex: none; border-radius: 50%; }
.trait.on { color: var(--text); background: linear-gradient(90deg, #ffffff12, transparent); }
.trait.on .ic { filter: none; }
.trait .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trait .bp { display: flex; gap: 3px; font: 11px var(--small); }
.trait .bp i { font-style: normal; width: 15px; text-align: center; border-radius: 2px; background: #0008; color: #7a6c52; }
.trait .n { width: 18px; text-align: right; font: 700 15px var(--title); color: var(--dim); }
/* An active synergy is coloured by the breakpoint reached: bronze, silver, gold, prismatic. */
.trait.t1 { --tier: #cd7f32; --tier-ink: #1a0f04; }
.trait.t2 { --tier: #d0d6de; --tier-ink: #14181e; }
.trait.t3 { --tier: #ffd100; --tier-ink: #1c1503; }
.trait.t4 { --tier: #b9f2ff; --tier-ink: #06202a; }
.trait.on { box-shadow: inset 3px 0 0 var(--tier); }
.trait.on .ic { outline: 2px solid var(--tier); outline-offset: 1px; }
.trait.on .n { color: var(--tier); }
.trait.on .bp i.hit { background: var(--tier); color: var(--tier-ink); font-weight: 700; }
.trait.t4 { box-shadow: inset 3px 0 0 #ff9de2; background: linear-gradient(90deg, #5a2a6a66, #1f4a5a55 60%, transparent); }
.trait.t4 .bp i.hit { background: linear-gradient(120deg, #ff9de2, #b9f2ff 50%, #fff2a8); }

.trait.pinned { background: #ffd10026; outline: 2px solid var(--gold); outline-offset: -2px; color: #fff; }
.trait.pinned .nm { color: var(--gold); }
.dm { display: grid; grid-template-columns: 24px 1fr auto; gap: 6px; align-items: center; margin-bottom: 4px; }
.dm img { width: 24px; height: 24px; border-radius: 4px; border: 1px solid #000; }
.dm .track { position: relative; height: 18px; background: #0008; border: 1px solid #000; overflow: hidden; }
.dm .track i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #d9742a, #8a3a1a); }
.dm .track span { position: relative; padding-left: 5px; font: 11px/16px var(--small); white-space: nowrap; text-shadow: 0 1px 1px #000; }
.dm b { font: 700 12px var(--small); min-width: 36px; text-align: right; }

/* right: players */
#players { right: 10px; top: 10px; width: 216px; padding: 8px; max-height: calc(100% - 20px); overflow-y: auto; }
.pl { display: grid; grid-template-columns: 1fr 34px; gap: 2px 8px; align-items: center; padding: 5px 6px 5px 8px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; margin-bottom: 3px; background: #0006; }
.pl:hover { background: #ffffff10; }
.pl.view { border-color: var(--trim); background: #ffd10014; }
.pl.opp { border-color: var(--foe); }
.pl.me .name { color: var(--gold); }
.pl.dead { opacity: .4; }
.pl .name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.pl .hpn { grid-row: 1 / 3; grid-column: 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font: 700 13px var(--title); background: radial-gradient(#14300f, #071204); border: 2px solid #2f8f1f; text-shadow: 0 1px 2px #000; }
.pl.dead .hpn { background: #1a1a1a; border-color: #555; font-size: 11px; }
.pl .hpbar { grid-column: 1; height: 6px; background: #000; border: 1px solid #000; overflow: hidden; }
.pl .hpbar i { display: block; height: 100%; background: linear-gradient(180deg, #4fe04f, #1f8f1f); }
.pl .meta { grid-column: 1 / 3; color: var(--dim); font: 11px var(--small); display: flex; gap: 8px; white-space: nowrap; overflow: hidden; }
.pl .meta .vs { overflow: hidden; text-overflow: ellipsis; color: #e0a8a0; }

/* bottom left: the bag of items */
#items { left: 10px; bottom: 10px; width: 232px; height: 224px; padding: 8px; overflow-y: auto; }
#items .list { display: grid; grid-template-columns: repeat(5, 38px); gap: 5px; margin-bottom: 6px; min-height: 38px; }
.item { position: relative; width: 38px; height: 38px; cursor: grab; border: 1px solid #000; outline: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #0008; }
.item:hover { outline-color: var(--gold); }
.item img { width: 100%; height: 100%; pointer-events: none; }
.item.sel { outline: 2px solid var(--gold); box-shadow: 0 0 10px 2px var(--gold); }

/* bottom centre: bench, purse, shop */
#hud { left: 50%; bottom: 8px; translate: -50% 0; width: 920px; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
#hud > * { pointer-events: auto; }
#bench { display: flex; gap: 6px; }
.slot { width: 58px; height: 58px; position: relative; flex: none; background: #0009; border: 1px solid #000; outline: 1px solid var(--line); border-radius: 5px; box-shadow: inset 0 2px 8px #000; }
.slot.over { outline: 2px solid var(--gold); }
.slot .token { left: 50%; top: 50%; transition: none; }

#purse { display: flex; align-items: center; gap: 10px; height: 30px; margin-bottom: -4px; font: 12px var(--small); color: var(--dim); }
#purse .gold { font: 900 20px/1 var(--title); color: var(--gold); padding: 5px 20px 4px; background: linear-gradient(180deg, #2a1f10, #0e0a06); border: 1px solid var(--trim); border-bottom: 0; border-radius: 8px 8px 0 0; text-shadow: 0 2px 0 #000; box-shadow: 0 0 0 1px #000; }
.chip { padding: 3px 9px; border-radius: 11px; background: #000c; border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.chip.inc { color: #7be38a; font-weight: 700; }
.chip.stash { color: var(--gold); }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #000; border: 1px solid var(--line); }
.dots i.on { background: var(--gold); border-color: #fff2a8; box-shadow: 0 0 4px var(--gold); }
#purse .odds { display: flex; gap: 6px; align-items: center; }
.odd { font-weight: 700; }
.odd.c1 { color: var(--c1); } .odd.c2 { color: var(--c2); } .odd.c3 { color: var(--c3); } .odd.c4 { color: var(--c4); } .odd.c5 { color: var(--c5); }
#purse .lock { padding: 4px 9px; font-size: 13px; }

#shopbar { display: grid; grid-template-columns: 150px 1fr; gap: 8px; width: 100%; height: 134px; padding: 8px; border-color: var(--trim); }
#econ { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
#econ .lvl { display: flex; justify-content: space-between; align-items: baseline; font: 700 15px var(--title); color: var(--text); white-space: nowrap; overflow: hidden; }
#econ .lvl span { font: 11px var(--small); color: var(--dim); }
#econ .xpbar { height: 7px; background: #000; border: 1px solid var(--line); overflow: hidden; flex: none; }
#econ .xpbar i { display: block; height: 100%; background: linear-gradient(180deg, #7fb8ff, #2f6fd6); }
#econ .act { flex: 1; display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 2px; padding: 4px 10px; text-align: left; font-size: 13px; }
#econ .act span { font: 700 12px var(--small); color: #fff; }
#econ .act kbd { grid-column: 2; grid-row: 1 / 3; }
#econ .act.xp { background: linear-gradient(180deg, #1d4f8f, #123a6a 55%, #0a2545); }
#econ .note { margin: auto 0; color: var(--dim); font: 12px/1.4 var(--small); }
#shop { display: flex; gap: 6px; min-width: 0; position: relative; }
#shop[data-sell]::after { content: attr(data-sell); position: absolute; inset: 0; display: grid; place-items: center; text-align: center; background: #3a0d08e6; border: 2px dashed #a0362c; border-radius: 4px; font: 700 20px var(--title); color: #ffb0a8; z-index: 5; }
#shop[data-sell].over::after, #shop.sell::after { background: #6a140cf2; border-style: solid; border-color: var(--foe); color: #fff; box-shadow: 0 0 18px #ff5a4f88; }
/* A shop card: the art fills it, synergies sit on the art, name and price on a bar below. */
.shopcard { flex: 1; min-width: 0; position: relative; cursor: pointer; overflow: hidden; border: 2px solid var(--c1); border-radius: 4px; background: #000; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #000; }
.shopcard.c2 { border-color: var(--c2); } .shopcard.c3 { border-color: var(--c3); } .shopcard.c4 { border-color: var(--c4); } .shopcard.c5 { border-color: var(--c5); }
.shopcard .art { position: absolute; inset: 0 0 26px 0; }
.shopcard .art img { width: 100%; height: 100%; object-position: center 30%; }
.shopcard .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #000d 0%, #0007 45%, transparent 75%), linear-gradient(0deg, #000a, transparent 40%); }
.shopcard .traits { position: absolute; left: 6px; top: 5px; display: flex; flex-direction: column; gap: 2px; }
.shopcard .tr { display: flex; align-items: center; gap: 5px; font: 12px/18px var(--ui); color: #d8ceb8; white-space: nowrap; text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.shopcard .tr img { width: 16px; height: 16px; border-radius: 50%; flex: none; filter: grayscale(.7) brightness(.85); }
.shopcard .tr.have { color: var(--gold); }
.shopcard .tr.have img { filter: none; outline: 1px solid var(--gold); }
.shopcard .foot { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 7px; background: linear-gradient(180deg, #2a2118, #120d08); border-top: 1px solid #000; }
.shopcard .nm { font: 14px var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.shopcard.c1 .nm { color: #fff; } .shopcard.c2 .nm { color: var(--c2); } .shopcard.c3 .nm { color: var(--c3); } .shopcard.c4 .nm { color: var(--c4); } .shopcard.c5 .nm { color: var(--c5); }
.shopcard .cost { font: 700 14px var(--title); color: var(--gold); white-space: nowrap; }
.shopcard em { position: absolute; right: 5px; top: 5px; font: 700 10px var(--small); font-style: normal; color: #7be38a; background: #000c; padding: 1px 5px; border-radius: 3px; }
.shopcard.planned::before { content: "★"; position: absolute; right: 6px; bottom: 30px; z-index: 2; font-size: 15px; color: var(--gold); text-shadow: 0 0 6px #000, 0 1px 2px #000; }
.shopcard:hover { filter: brightness(1.25); box-shadow: 0 0 0 1px #000, 0 0 12px #ffd10066; }
.shopcard.empty { visibility: hidden; }
.shopcard.poor { filter: grayscale(.6) brightness(.6); }
.shopcard.hl { box-shadow: 0 0 0 2px #fff, 0 0 14px 4px var(--gold); }
#shop .hint { margin: auto; font-size: 13px; }

/* ---------- result text over the arena ---------- */
#result { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 20; text-align: center; padding-bottom: 12%;
  font: 900 64px var(--title); letter-spacing: 8px; text-shadow: 0 4px 0 #000, 0 0 30px #000; opacity: 0; transition: opacity .3s; }
#result.show { opacity: 1; }
#result.small { font-size: 34px; letter-spacing: 3px; }
#result.win { color: var(--gold); }
#result.loss { color: var(--foe); }
#result.overtime { color: #ff9a2e; font-size: 48px; padding-bottom: 30%; }
#result small { display: block; margin-top: 6px; font: 700 26px var(--title); letter-spacing: 2px; color: #ff7a6e; }
#result.small small { font-size: 18px; }
.hploss { margin-left: 6px; font: 700 13px var(--small); color: #ff5a4f; }
.pl .hpn.hurt { border-color: #ff5a4f; background: radial-gradient(#4a0f0a, #1a0503); color: #ffb0a8; }

/* ---------- hero icons on the bench: square, like an action button ---------- */
.token { position: absolute; width: 50px; height: 50px; margin: -25px 0 0 -25px; z-index: 2; }
.token .face { width: 100%; height: 100%; border-radius: 4px; pointer-events: none; background: #000; border: 2px solid var(--c1); box-shadow: 0 0 0 1px #000, 0 2px 6px #000c; }
.token[draggable=true] { cursor: grab; }
.c1 .face { border-color: var(--c1); } .c2 .face { border-color: var(--c2); } .c3 .face { border-color: var(--c3); }
.c4 .face { border-color: var(--c4); } .c5 .face { border-color: var(--c5); } .c0 .face { border-color: #7a4a3a; }
.mem.c1 img { border-color: var(--c1); } .mem.c2 img { border-color: var(--c2); } .mem.c3 img { border-color: var(--c3); }
.mem.c4 img { border-color: var(--c4); } .mem.c5 img { border-color: var(--c5); }
.token .stars { position: absolute; left: 0; right: 0; bottom: -7px; text-align: center; font-size: 12px; color: var(--gold); text-shadow: 0 1px 2px #000, 0 0 3px #000; letter-spacing: -1px; pointer-events: none; }
.token .stars.s2 { color: #dbe8ff; }
.token .stars.s3 { color: var(--gold); font-size: 14px; }
.token .its { position: absolute; right: -6px; top: -3px; display: flex; flex-direction: column; gap: 1px; pointer-events: none; }
.token .its img { width: 15px; height: 15px; border: 1px solid #000; border-radius: 2px; }
.token.sel .face { box-shadow: 0 0 0 2px var(--gold), 0 0 14px 4px var(--gold); }
.token.hl .face { box-shadow: 0 0 0 2px #fff, 0 0 12px 4px var(--gold); }

/* ---------- numbers floating over the fight ---------- */
.float { position: absolute; z-index: 10; pointer-events: none; font: 700 15px var(--title); text-shadow: 0 1px 0 #000, 0 0 4px #000; animation: rise .8s ease-out forwards; white-space: nowrap; transform: translate(-50%, -50%); }
.float.phys { color: #fff; }
.float.magic { color: #c9a0ff; }
.float.crit { font-size: 22px; color: #ffe14d; }
.float.heal { color: #4fe04f; }
.float.cast { color: var(--gold); font: 400 13px var(--ui); animation-duration: 1.2s; }
@keyframes rise { to { margin-top: -38px; opacity: 0; } }
.float.loot { display: flex; align-items: center; gap: 4px; color: var(--gold); font-size: 15px; animation: loot 1.6s ease-out forwards; }
.float.loot img { width: 28px; height: 28px; border: 1px solid #000; border-radius: 3px; }
@keyframes loot { 15% { margin-top: -30px; scale: 1.25; } 70% { margin-top: -38px; opacity: 1; } 100% { margin-top: -60px; opacity: 0; } }

/* ---------- tooltip, in the game's own style ---------- */
#tip { position: fixed; z-index: 100; width: max-content; max-width: 430px; padding: 10px 12px; pointer-events: none; font: 13px/1.4 var(--small); color: #fff;
  background: #080714f2; border: 1px solid #9a9a9a; border-radius: 6px; box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #000, 0 8px 22px #000c; }
#tip h4 { margin: 0 0 2px; color: var(--gold); font: 400 16px var(--ui); display: flex; align-items: center; gap: 7px; }
#tip h4 img { width: 30px; height: 30px; border: 1px solid #000; border-radius: 4px; }
#tip .sub { color: var(--dim); font-size: 12px; margin-bottom: 6px; }
#tip .tts { display: flex; gap: 10px; margin-bottom: 6px; }
#tip .tt { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--dim); }
#tip .tt img { width: 16px; height: 16px; border-radius: 50%; }
#tip .rec { display: flex; align-items: center; gap: 6px; font-size: 11.5px; margin-top: 5px; line-height: 1.25; }
#tip .rec img { width: 26px; height: 26px; flex: none; align-self: flex-start; border: 1px solid #000; border-radius: 3px; }
#tip .rec b, #tip .ab b { color: var(--gold); font-weight: 600; }
#tip .members { display: grid; grid-template-columns: auto auto; gap: 4px 16px; margin-top: 8px; }
#tip .mem { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .5; white-space: nowrap; }
#tip .mem.in { opacity: 1; color: var(--gold); }
#tip .mem img { width: 24px; height: 24px; border-radius: 4px; border: 2px solid; flex: none; }
#tip .mem span { margin-right: 6px; }
#tip .mem b { margin-left: auto; font-weight: 400; font-size: 11px; color: var(--dim); }
/* unit card */
#tip .tt-head { display: flex; align-items: center; gap: 10px; margin: -10px -12px 8px; padding: 9px 12px; border-radius: 5px 5px 0 0; border-bottom: 2px solid var(--line); background: linear-gradient(90deg, #2a1f14, #0c0a10); }
#tip .tt-head.c1 { border-color: var(--c1); } #tip .tt-head.c2 { border-color: var(--c2); } #tip .tt-head.c3 { border-color: var(--c3); }
#tip .tt-head.c4 { border-color: var(--c4); } #tip .tt-head.c5 { border-color: var(--c5); }
#tip .tt-face { width: 48px; height: 48px; border-radius: 4px; flex: none; border: 1px solid #000; }
#tip .tt-name { flex: 1; min-width: 0; }
#tip .tt-name > b { font: 400 17px var(--ui); color: #fff; }
#tip .tt-head.c2 .tt-name > b { color: var(--c2); } #tip .tt-head.c3 .tt-name > b { color: var(--c3); }
#tip .tt-head.c4 .tt-name > b { color: var(--c4); } #tip .tt-head.c5 .tt-name > b { color: var(--c5); }
#tip .tt-name .stars { margin-left: 6px; color: var(--gold); font-size: 13px; letter-spacing: -1px; }
#tip .tt-name .tts { margin: 3px 0 0; gap: 8px; flex-wrap: wrap; }
#tip .tt-cost { font: 700 15px var(--title); color: var(--gold); white-space: nowrap; align-self: flex-start; }
#tip .tt-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 8px; }
#tip .st { display: grid; grid-template-columns: 18px 1fr; align-items: center; column-gap: 4px; background: #ffffff0a; border: 1px solid #3a3320; border-radius: 4px; padding: 4px 6px; }
#tip .st .si { grid-row: 1 / 3; font-size: 14px; text-align: center; }
#tip .st .sl { font-size: 9.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .3px; line-height: 1.1; white-space: nowrap; }
#tip .st b { font-size: 14px; line-height: 1.15; font-variant-numeric: tabular-nums; }
#tip .st.up b { color: #1eff00; }
#tip .tt-ab { background: #ffd1000a; border: 1px solid #4a3d1c; border-radius: 4px; padding: 7px 9px; font-size: 12.5px; line-height: 1.4; }
#tip .tt-abh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
#tip .tt-abh b { color: var(--gold); font: 400 15px var(--ui); }
#tip .tt-abh .mana { color: #6fb0ff; font-size: 12px; font-weight: 600; }
#tip .lv { color: var(--dim); white-space: nowrap; }
#tip .lv b { color: #1eff00; }
#tip .lv i { font-style: normal; opacity: .5; padding: 0 1px; }
#tip .tt-note { margin-top: 5px; color: var(--dim); font-size: 11px; }
#tip .tt-foot { margin-top: 7px; color: var(--dim); font-size: 11px; }

#toast { position: fixed; left: 50%; top: 110px; translate: -50% 0; z-index: 200; padding: 10px 20px; font: 15px var(--ui); color: #ff4a3a; background: #000d; border: 1px solid #a0362c; border-radius: 4px; text-shadow: 0 1px 2px #000; }
#over { position: fixed; inset: 0; z-index: 50; background: #000c; display: grid; place-items: center; }
#over ol { text-align: left; padding-left: 26px; margin: 14px 0 22px; font-size: 16px; }
#over li { padding: 4px 0; }
#over li.me { color: var(--gold); }

/* ---------- team builder ---------- */
#planner { height: 100%; display: grid; grid-template-columns: 250px 1fr; grid-template-rows: 50px minmax(0, 1fr); gap: 8px; padding: 8px; }
#ptop { grid-column: 1 / 3; display: flex; align-items: center; gap: 20px; padding: 0 14px; border-color: var(--trim); }
#ptop .title { font: 900 20px var(--title); color: var(--gold); letter-spacing: 1.5px; text-shadow: 0 2px 0 #000; }
#ptop .grow { flex: 1; }
#ptop button { padding: 7px 16px; }
#ptraits, #pmain { padding: 10px; overflow-y: auto; }
#pteam { display: flex; gap: 8px; padding: 10px; margin-bottom: 12px; background: #0008; border: 1px solid var(--line); border-radius: 5px; min-height: 104px; box-shadow: inset 0 2px 10px #000; }
#pfilter { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 12px; }
#pfilter .pkind { margin: 0 2px 0 10px; font: 600 10px var(--title); letter-spacing: 1px; text-transform: uppercase; color: var(--trim); }
#pfilter button.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 5px; font: 12px var(--ui); letter-spacing: 0; color: var(--dim); background: #000a; border: 1px solid var(--line); border-radius: 12px; box-shadow: none; text-shadow: none; cursor: pointer; }
#pfilter button.chip:first-child { padding-left: 10px; }
#pfilter button.chip img { width: 16px; height: 16px; border-radius: 50%; filter: grayscale(.8) brightness(.8); }
#pfilter button.chip.has { color: var(--text); }
#pfilter button.chip.has img { filter: none; }
#pfilter button.chip b { font: 700 11px var(--small); color: var(--gold); }
#pfilter button.chip:hover { filter: none; border-color: var(--trim); color: #fff; }
#pfilter button.chip.on { color: #1a1204; background: var(--gold); border-color: #fff2a8; }
#pfilter button.chip.on img { filter: none; }
#pfilter button.chip.on b { color: #1a1204; }
/* the cost label keeps its own column, so heroes that wrap line up under the heroes above */
.prow { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; margin-bottom: 10px; }
.pheroes { display: flex; flex-wrap: wrap; gap: 8px; }
.pcost { font: 700 15px var(--title); padding-top: 22px; white-space: nowrap; }
.pcost.c1 { color: var(--c1); } .pcost.c2 { color: var(--c2); } .pcost.c3 { color: var(--c3); } .pcost.c4 { color: var(--c4); } .pcost.c5 { color: var(--c5); }
.ph { width: 78px; cursor: pointer; text-align: center; opacity: .6; transition: opacity .12s, transform .12s; }
.ph img { width: 62px; height: 62px; margin: 0 auto; border-radius: 4px; border: 2px solid var(--c1); box-shadow: 0 0 0 1px #000; }
.ph.c2 img { border-color: var(--c2); } .ph.c3 img { border-color: var(--c3); } .ph.c4 img { border-color: var(--c4); } .ph.c5 img { border-color: var(--c5); }
.ph span { margin-top: 3px; font-size: 12px; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ph:hover { opacity: 1; transform: translateY(-2px); }
.ph.in { opacity: 1; }
.ph.in img { box-shadow: 0 0 0 2px var(--gold), 0 0 12px 2px #ffd10066; }
.ph.hl { opacity: 1; }
.ph.hl img { box-shadow: 0 0 0 2px #fff, 0 0 12px 4px var(--gold); }
.ph.empty { height: 82px; border: 1px dashed var(--line); border-radius: 4px; cursor: default; opacity: .5; }

/* ---------- chat ---------- */
#chat { right: 10px; bottom: 10px; width: 216px; height: 224px; padding: 8px; display: none; flex-direction: column; gap: 6px; }
#game.social #chat { display: flex; }
#chat .side-title { display: flex; justify-content: space-between; margin-bottom: 0; }
#chat .side-title .link { display: none; }
#chatlog { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 6px; background: #0008; border: 1px solid #2a2114; border-radius: 4px; font: 12.5px/1.4 var(--small); user-select: text; overflow-wrap: anywhere; }
.cm { margin-bottom: 3px; color: #e6dcc6; }
.cm b { margin-right: 6px; font-weight: 600; color: #8fc8ff; }
.cm.me b { color: var(--gold); }
#chatin { width: 100%; padding: 6px 8px; font: 13px var(--small); }
#chatbtn { display: none; }
#chatbtn i { font-style: normal; margin-left: 5px; padding: 0 5px; border-radius: 8px; background: #1eff00; color: #000; font: 700 10px var(--small); }
#players { max-height: calc(100% - 20px); }
#game.social #players { max-height: calc(100% - 254px); }
.lobbychat { margin-top: 14px; padding-top: 12px; border-top: 1px solid #3a2e18; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.lobbychat #chatlog { height: 110px; flex: none; }

/* A component held over another in the bag: a ring fills while they fuse. */
@property --fuse { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.item.fusing { outline: 2px solid var(--gold); box-shadow: 0 0 12px 3px #ffd10088; }
.item.fusing::after { content: ""; position: absolute; inset: 0; border-radius: 3px;
  background: radial-gradient(circle, #000a 0 38%, transparent 40%), conic-gradient(var(--gold) var(--fuse), #000b 0);
  animation: fuse var(--fuse-ms, 1.5s) linear forwards; }
@keyframes fuse { to { --fuse: 360deg; } }

/* dragging with a finger */
.item, .token[draggable=true] { touch-action: none; }
.lifted { opacity: .35; }

/* ---------- accounts: sign-in strip, rank badge, profile ---------- */
.acct { margin: 0 0 16px; padding: 14px 16px 12px; text-align: center; background: #0007; border: 1px solid #3a2e18; border-radius: 6px; }
.acct #gbtn { display: flex; justify-content: center; min-height: 44px; }
.acct .hint { margin-top: 8px; }
.acct.in { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; text-align: left; border-left: 3px solid var(--rk, var(--line)); }
.acct .who b { display: block; font: 400 19px var(--ui); color: var(--text); }
.acct .who span { font: 11px var(--small); color: var(--dim); }
.acct .links { grid-column: 1 / 3; display: flex; justify-content: space-between; margin-top: 6px; padding-top: 8px; border-top: 1px solid #2a2114; }
/* Lobby: whether this match will count, said loudly. */
.rated { margin: 0 0 14px; padding: 10px 14px; border-radius: 6px; font: 13px/1.4 var(--small); text-align: left; border: 1px solid; }
.rated b { display: block; margin-bottom: 2px; font: 700 15px var(--title); letter-spacing: .5px; text-transform: uppercase; }
.rated.off { color: #ffd9a0; background: #5a2a0a88; border-color: #ff9a2e; box-shadow: 0 0 14px #ff9a2e44; }
.rated.off b { color: #ffb347; }
.rated.on { color: #c9f5c9; background: #0f3a1488; border-color: #2fbf4a; }
.rated.on b { color: #5fe37a; }
html.phone .rated { margin-bottom: 8px; padding: 6px 10px; font-size: 11px; }
html.phone .rated b { font-size: 12px; }
/* A quiet text button, for things that should not shout like the red ones. */
button.link { padding: 2px 0; background: none; border: 0; box-shadow: none; font: 12px var(--small); letter-spacing: 0; color: var(--trim); text-shadow: none; }
button.link:hover:not(:disabled) { filter: none; color: var(--gold); text-decoration: underline; }
.rank { display: inline-block; padding: 3px 10px; border-radius: 12px; font: 700 12px var(--title); letter-spacing: .5px; color: #1a1204; background: var(--rk, #8a8a8a); box-shadow: inset 0 1px 0 #ffffff66, 0 0 0 1px #000; }
.rk-Iron { --rk: #8a8f96; } .rk-Bronze { --rk: #cd7f32; } .rk-Silver { --rk: #d0d6de; } .rk-Gold { --rk: #ffd100; }
.rk-Platinum { --rk: #7fe0d0; } .rk-Diamond { --rk: #8fc8ff; } .rk-Master { --rk: #c98bff; } .rk-Grandmaster { --rk: #ff7a5c; }
.card.wide { width: 560px; }
.pf-rank .rank { font-size: 16px; padding: 5px 16px; }
.pf-bar { height: 8px; margin: 12px 0 4px; background: #000; border: 1px solid var(--line); overflow: hidden; }
.pf-bar i { display: block; height: 100%; background: linear-gradient(90deg, #b07a12, var(--gold)); }
.pf-stats { display: flex; justify-content: center; gap: 34px; margin: 14px 0 4px; color: var(--dim); font-size: 13px; }
.pf-stats b { display: block; font: 700 22px var(--title); color: var(--text); }
.pf-list { max-height: 250px; overflow-y: auto; margin-bottom: 14px; text-align: left; border: 1px solid #3a2e18; background: #0006; }
.pf-row { display: grid; grid-template-columns: 90px 1fr 70px 50px; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid #2a2114; font-size: 14px; }
.pl-place { font: 700 16px var(--title); }
.pl-place small { font: 11px var(--small); color: var(--dim); }
.pl-place.p1 { color: var(--gold); }
.pf-when { color: var(--dim); font: 12px var(--small); }
.pf-delta { font: 700 13px var(--small); color: var(--dim); text-align: right; }
.pf-delta.up { color: #1eff00; } .pf-delta.down { color: #ff5a4f; }
.pf-after { text-align: right; font: 700 14px var(--title); }
#over li .pf-delta { float: right; margin-left: 24px; }
html.phone .acct { margin-bottom: 8px; padding: 8px 12px 6px; }
html.phone .acct .links { margin-top: 3px; padding-top: 4px; }
html.phone .pf-list { max-height: 120px; }
html.phone .pf-stats { margin: 8px 0 2px; }
html.phone .pf-stats b { font-size: 16px; }

/* ---------- phones: the same screen, packed for a small one held sideways ---------- */
#rotate { display: none; position: fixed; inset: 0; z-index: 300; place-content: center; text-align: center; gap: 10px; padding: 30px; background: #0a0705f5; color: var(--gold); font: 700 20px var(--title); }
#rotate div { font-size: 54px; line-height: 1; }
html.phone.upright.play #rotate { display: grid; }

html.phone .card { padding: 14px 24px 12px; }
html.phone h1 { font-size: 30px; }
html.phone .card p { margin-bottom: 10px; font-size: 14px; }
html.phone .card .sep { margin: 10px 0 4px; }
html.phone .card .legal { margin-top: 12px; padding-top: 8px; }
html.phone .code { font-size: 28px; }
html.phone .seats { margin: 8px 0; }
html.phone .seats li { padding: 4px 8px; }
html.phone kbd { display: none; }
html.phone .side-title { font-size: 8px; letter-spacing: .5px; margin: 0 2px 3px; }

html.phone #top { top: 2px; width: 290px; }
html.phone #top .plate { padding: 2px 8px; gap: 6px; }
html.phone #top .stageno { font-size: 15px; min-width: 34px; }
html.phone #top .pips { gap: 6px; }
html.phone .pip { width: 15px; height: 15px; font-size: 8px; border-width: 1px; }
html.phone #top .time { width: 28px; height: 28px; font-size: 14px; margin: -2px 0; border-width: 1px; }
html.phone #top .bar { height: 3px; }
html.phone #top .phase { font-size: 10px; padding: 1px 8px; margin-top: 2px; }
html.phone #banner { top: 54px; font-size: 11px; }

html.phone #left { left: 4px; top: 4px; bottom: 88px; width: 140px; }
html.phone #meter { display: none; }
html.phone #traits { padding: 4px; }
html.phone #traits .hint { font-size: 9px; }
/* rows tall enough for a finger */
html.phone .trait { gap: 6px; padding: 5px 4px; margin-bottom: 2px; font-size: 12px; }
html.phone .trait .ic { width: 22px; height: 22px; }
html.phone .trait .bp { display: none; }
html.phone .trait .n { font-size: 12px; width: 14px; }

html.phone #players { right: 4px; top: 4px; width: 128px; padding: 4px; }
html.phone .pl { grid-template-columns: 1fr 24px; gap: 1px 5px; padding: 2px 3px 2px 5px; margin-bottom: 2px; }
html.phone .pl .name { font-size: 11px; }
html.phone .pl .hpn { width: 24px; height: 24px; font-size: 10px; border-width: 1px; }
html.phone .pl .hpbar { height: 3px; }
html.phone .pl .meta { display: none; }

html.phone #items { left: 4px; bottom: 4px; width: 140px; height: 80px; padding: 4px; }
html.phone #items .list { grid-template-columns: repeat(4, 28px); gap: 3px; margin: 0; min-height: 0; }
html.phone .item { width: 28px; height: 28px; }
html.phone #items .hint { display: none; }

html.phone #hud { bottom: 3px; left: calc(50% + 6px); width: calc(100% - 296px); gap: 3px; }
html.phone #bench { gap: 3px; }
html.phone .slot { width: 40px; height: 40px; }
html.phone .token { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
html.phone .token .stars { font-size: 9px; bottom: -5px; }
html.phone .token .stars.s3 { font-size: 10px; }
html.phone .token .its img { width: 11px; height: 11px; }
html.phone #purse { height: 22px; gap: 6px; font-size: 10px; margin-bottom: -3px; }
html.phone #purse .gold { font-size: 14px; padding: 3px 12px 2px; }
html.phone #purse .odds { gap: 4px; }
html.phone .chip { padding: 1px 6px; }
html.phone .dots i { width: 6px; height: 6px; }
html.phone #purse .lock { padding: 2px 7px; font-size: 11px; }
html.phone #shopbar { grid-template-columns: 92px 1fr; gap: 4px; height: 76px; padding: 4px; }
html.phone #econ { gap: 2px; }
html.phone #econ .lvl { font-size: 10px; }
html.phone #econ .lvl span { font-size: 8px; }
html.phone #econ .xpbar { height: 4px; }
html.phone #econ .act { padding: 1px 6px; font-size: 9px; row-gap: 0; }
html.phone #econ .act span { font-size: 9px; }
html.phone #econ .note { font-size: 9px; }
html.phone #shop { gap: 3px; }
html.phone #shop[data-sell]::after { font-size: 13px; }
html.phone .shopcard .art { inset: 0 0 18px 0; }
html.phone .shopcard .traits { left: 3px; top: 2px; gap: 0; }
html.phone .shopcard .tr { font-size: 9px; line-height: 13px; gap: 3px; }
html.phone .shopcard .tr img { width: 11px; height: 11px; }
html.phone .shopcard .foot { height: 18px; padding: 0 4px; gap: 3px; }
html.phone .shopcard .nm, html.phone .shopcard .cost { font-size: 10px; }
html.phone .shopcard em { font-size: 8px; right: 2px; top: 2px; padding: 0 3px; }
html.phone .shopcard.planned::before { bottom: 20px; font-size: 11px; }

html.phone #result { font-size: 34px; letter-spacing: 4px; }
html.phone #result.small { font-size: 18px; }
html.phone #toast { top: 60px; font-size: 12px; padding: 6px 12px; }
html.phone #tip { max-width: 330px; font-size: 11px; padding: 6px 8px; }
html.phone #tip h4 { font-size: 13px; }
html.phone #tip h4 img { width: 22px; height: 22px; }
html.phone #tip .rec { font-size: 10px; margin-top: 3px; }
html.phone #tip .rec img { width: 18px; height: 18px; }
html.phone #tip .tt-name > b { font-size: 14px; }
html.phone #tip .st .sl { font-size: 8px; }
html.phone #tip .st b { font-size: 12px; }
html.phone #tip .members { gap: 2px 10px; margin-top: 5px; }
html.phone #tip .mem { font-size: 10.5px; }
html.phone #tip .mem img { width: 18px; height: 18px; }
html.phone #tip .tt-head { margin: -8px -10px 6px; padding: 6px 10px; }
html.phone #tip .tt-face { width: 36px; height: 36px; }
html.phone #tip .tt-stats { gap: 3px; margin-bottom: 5px; }
html.phone #tip .st { padding: 2px 5px; }
html.phone #tip .tt-ab { padding: 5px 7px; font-size: 11.5px; }
html.phone #tip .tt-note { display: none; }
html.phone .u3d { width: 44px; }
html.phone .u3d .hp { height: 6px; }
html.phone .u3d .stars { font-size: 9px; }
html.phone .u3d .its img { width: 11px; height: 11px; }
html.phone .u3d .row { min-height: 10px; }

html.phone #planner { grid-template-columns: 150px 1fr; grid-template-rows: 34px minmax(0, 1fr); gap: 4px; padding: 4px; }
html.phone #ptop { gap: 10px; padding: 0 8px; font-size: 11px; }
html.phone #ptop .title { font-size: 13px; }
html.phone #ptop button { padding: 5px 10px; font-size: 11px; }
html.phone #ptraits, html.phone #pmain { padding: 5px; }
html.phone #pteam { gap: 4px; padding: 5px; min-height: 0; margin-bottom: 6px; }
html.phone .prow { grid-template-columns: 34px minmax(0, 1fr); margin-bottom: 8px; }
html.phone .pheroes { gap: 6px 4px; }
html.phone .pcost { font-size: 11px; padding-top: 14px; }
html.phone .ph { width: 56px; }
html.phone .ph img { width: 44px; height: 44px; }
html.phone .ph span { font-size: 9.5px; height: 22px; }
html.phone .ph.empty { height: 60px; }

/* phones: the chat is a window behind a button */
html.phone #game.social #chatbtn { display: block; position: absolute; top: 3px; left: calc(50% + 152px); padding: 5px 9px; font-size: 10px; z-index: 6; }
html.phone #game.social #chat { display: none; }
html.phone #game.social.chat-open #chat { display: flex; left: 50%; right: auto; translate: -50% 0; top: 4px; bottom: auto; width: 440px; height: 190px; z-index: 60; border-color: var(--trim); box-shadow: 0 0 0 1px #000, 0 10px 40px #000; }
html.phone #chat .side-title .link { display: inline; font-size: 11px; }
html.phone #chatlog { font-size: 11.5px; }
html.phone #chatin { font-size: 16px; padding: 5px 8px; } /* 16px keeps iPhones from zooming in on focus */
html.phone #game.social #players { max-height: calc(100% - 8px); }
html.phone .lobbychat { margin-top: 8px; padding-top: 8px; }
html.phone .lobbychat #chatlog { height: 60px; }

/* phones: a way back to full screen after leaving it */
#fullbtn { position: fixed; left: 50%; bottom: 6px; translate: -50% 0; z-index: 250; padding: 7px 14px; font-size: 12px; opacity: .92; }
/* in a match: left of the stage plate, mirroring the chat button on its right */
html.phone.play:not(.upright) #fullbtn { left: auto; right: calc(50% + 152px * var(--zoom, 1)); bottom: auto; top: calc(3px * var(--zoom, 1)); translate: 0 0; padding: 5px 8px; font-size: 10px; }
html.phone #result.overtime { font-size: 26px; }
html.phone #result small { font-size: 15px; }
html.phone .hploss { font-size: 10px; margin-left: 4px; }
html.phone #pfilter { gap: 3px; margin-bottom: 6px; }
html.phone #pfilter button.chip { font-size: 10px; padding: 3px 7px 3px 4px; }
html.phone #pfilter button.chip img { width: 13px; height: 13px; }
html.phone #pfilter .pkind { font-size: 8px; margin-left: 6px; }

/* performance readout (F9 or ?perf) */
#perf { position: fixed; left: 50%; bottom: 2px; translate: -50% 0; z-index: 400; padding: 3px 9px; pointer-events: none; text-align: center;
  font: 11px/1.35 ui-monospace, Consolas, monospace; color: #d8ffd8; background: #000c; border: 1px solid #1f8f1f; border-radius: 4px; white-space: nowrap; }
#perf b { font-size: 13px; }
#perf.mid { color: #ffe9a8; border-color: #c8a04a; }
#perf.bad { color: #ffb0a8; border-color: #ff5a4f; }
html.phone #perf { font-size: 8px; padding: 1px 5px; }
html.phone #perf b { font-size: 10px; }

/* ---------- home: one card per way to play ---------- */
.card.home { width: 860px; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0 12px; }
.mode { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 12px; text-align: left; background: linear-gradient(180deg, #241a10, #120d08); border: 1px solid var(--line); border-radius: 6px; box-shadow: inset 0 1px 0 #ffffff0d; }
.mode:hover { border-color: var(--trim); }
.mode h3 { margin: 0; font: 700 18px var(--title); letter-spacing: 1px; color: var(--gold); }
.mode .what { flex: 1; min-height: 34px; color: var(--dim); font: 12px/1.4 var(--small); }
.mode .row { margin: 0; }
.mode .row input { min-width: 0; }
.mode button.primary { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; padding: 9px 10px; }
.mode.ranked { border-color: #6a5320; background: linear-gradient(180deg, #2c2110, #150f07); }
.mode .rank { font-size: 10px; padding: 2px 7px; }
.acct .ladders { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; font: 11px var(--small); color: var(--dim); }
.pf-ladders { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.qcount { font: 16px var(--ui); color: var(--dim); }
.qcount b { font: 900 46px var(--title); color: var(--gold); margin-right: 6px; }
.qdots { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.qdots i { width: 16px; height: 16px; border-radius: 50%; background: #000; border: 2px solid var(--line); }
.qdots i.on { background: var(--gold); border-color: #fff2a8; box-shadow: 0 0 8px var(--gold); }
.qdots i:not(.on):first-of-type, .qdots i.on + i:not(.on) { animation: qpulse 1.2s ease-in-out infinite; }
@keyframes qpulse { 50% { border-color: var(--gold); } }
html.phone .card.home { width: 860px; }
html.phone.upright .card.home { width: 460px; }
html.phone .modes { gap: 8px; margin: 8px 0; }
html.phone .mode { padding: 8px 10px; gap: 5px; }
html.phone .mode h3 { font-size: 14px; }
html.phone .mode .what { min-height: 0; font-size: 10.5px; }

/* ---------- home: profile, ways to play, news ---------- */
.home { display: grid; grid-template-columns: 280px minmax(0, 1fr) 300px; gap: 12px; width: 1280px; max-width: 100%; margin: auto; align-items: start; }
.home.solo { grid-template-columns: minmax(0, 1fr) 300px; width: 980px; }
.hpanel { padding: 18px; background: linear-gradient(180deg, #1c150fee 0%, #0e0a07f2 100%); border: 1px solid var(--line); border-radius: 6px; box-shadow: inset 0 0 0 1px #000, inset 0 1px 0 1px #ffffff0d, 0 0 0 1px #000, 0 8px 22px #000a; }
.home main.hpanel { border-color: var(--trim); text-align: center; padding: 26px 26px 18px; }
.home main p { color: var(--dim); margin: 0 0 16px; font-size: 16px; }
.home .modes { grid-template-columns: 1fr 1fr; }
.home .row { display: flex; gap: 8px; margin-top: 8px; }
.home .row > * { flex: 1; min-width: 0; }
.home .legal { margin-top: 16px; padding-top: 10px; border-top: 1px solid #3a2e18; color: #8a7c62; font: 10.5px/1.45 var(--small); }
.hpanel #gbtn { display: flex; justify-content: center; min-height: 44px; margin-bottom: 8px; }
.hpanel .me { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hpanel .me b { display: block; font-size: 20px; }
.hpanel .me span { font: 11px var(--small); color: var(--dim); }
img.av { display: inline-block; width: 18px; height: 18px; margin-right: 5px; vertical-align: -3px; border-radius: 3px; border: 1px solid #000; outline: 1px solid var(--line); }
img.av.big { width: 56px; height: 56px; margin: 0; border-radius: 6px; outline-color: var(--trim); }
img.av.huge { width: 96px; height: 96px; margin: 0; border-radius: 8px; outline: 2px solid var(--trim); }
.crests { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.crest { position: relative; padding: 9px 8px 8px; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--rk) 26%, #120d08), #0c0906 75%); border: 1px solid color-mix(in srgb, var(--rk) 60%, #000); border-top: 3px solid var(--rk); border-radius: 4px 4px 10px 10px; }
.crest small { display: block; font: 10px var(--small); color: var(--dim); text-transform: uppercase; letter-spacing: .6px; }
.crest b { display: block; margin: 2px 0 0; font: 700 17px var(--title); color: var(--rk); text-shadow: 0 1px 2px #000; }
.crest span { font: 700 13px var(--small); color: var(--text); }
.crest .bar, .passbar .bar { height: 5px; margin-top: 6px; background: #000; border: 1px solid #000; outline: 1px solid #3a2e18; overflow: hidden; }
.crest .bar i { display: block; height: 100%; background: var(--rk); }
.passbar { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; margin: 12px 0 4px; font: 11px var(--small); color: var(--dim); }
.passbar span:first-child { color: var(--text); }
.passbar .bar { grid-column: 1 / 3; }
.passbar .bar i { display: block; height: 100%; background: linear-gradient(90deg, #2f6fd6, #7fb8ff); }
.news { max-height: 82vh; overflow-y: auto; }
.note b { display: block; font: 15px var(--ui); color: var(--gold); }
.note small { font: 10px var(--small); color: var(--dim); }
.note ul { margin: 6px 0 12px; padding-left: 16px; font: 12px/1.45 var(--small); color: #d8ceb8; }
.note li { margin-bottom: 3px; }
.news .side-title { margin-top: 14px; }
.news .side-title:first-child { margin-top: 2px; }
.toprow { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 13px; }
.toprow i { width: 14px; font: 700 11px var(--small); font-style: normal; color: var(--dim); }
.toprow span:not(.rank) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toprow .rank { font-size: 9px; padding: 2px 6px; }
.seats li .who { color: var(--text); font-size: 14px; }

/* the guide */
.guide h1 { font-size: 30px; margin: 4px 0 14px; }
.gbody { min-height: 200px; text-align: left; font: 15px/1.6 var(--small); color: #e6dcc6; }
.gbody b { color: var(--gold); font-weight: 600; }
.gbody ul { margin: 6px 0; padding-left: 20px; }
.guide .qdots { margin: 14px 0 6px; }
.guide .qdots i { width: 9px; height: 9px; animation: none !important; }

/* profile page */
.card.profile { width: 920px; text-align: left; }
.pf-head { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.pf-head h1 { font-size: 30px; margin: 0 0 2px; }
.pf-head .rename { max-width: 380px; }
.pf-head .rename input { padding: 6px 9px; font-size: 14px; }
.pf-head .rename button { flex: none; padding: 7px 12px; font-size: 12px; }
.profile .sep { text-align: left; }
.icons { display: grid; grid-template-columns: repeat(auto-fill, 46px); gap: 6px; max-height: 162px; overflow-y: auto; padding: 4px; background: #0006; border: 1px solid #3a2e18; }
.icons .ic { position: relative; width: 46px; height: 46px; border-radius: 4px; overflow: hidden; border: 1px solid #000; outline: 1px solid var(--line); cursor: pointer; }
.icons .ic img { width: 100%; height: 100%; }
.icons .ic:hover { outline-color: var(--gold); }
.icons .ic.on { outline: 2px solid var(--gold); box-shadow: 0 0 10px var(--gold); }
.icons .ic.locked { cursor: default; }
.icons .ic.locked img { filter: grayscale(1) brightness(.35); }
.icons .ic.locked small { position: absolute; inset: 0; display: grid; place-items: center; font: 700 13px var(--title); color: var(--dim); }
.card.profile .pf-row { grid-template-columns: 78px 150px 1fr 50px 60px; }
.pf-when b { display: block; color: var(--text); font-weight: 600; }
.pf-board { display: flex; gap: 2px; flex-wrap: wrap; }
.pf-board span { position: relative; width: 24px; height: 24px; border-radius: 3px; overflow: hidden; border: 1px solid #000; outline: 1px solid var(--line); }
.pf-board span.s2 { outline-color: #dbe8ff; } .pf-board span.s3 { outline-color: var(--gold); }
.pf-board img { width: 100%; height: 100%; }
.pf-xp { text-align: right; font: 11px var(--small); color: #7fb8ff; }
.earned { margin: 0 0 14px; font: 13px var(--small); color: #7fb8ff; }
.earned .unlock { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; color: var(--gold); }
.earned .unlock img { width: 32px; height: 32px; border-radius: 4px; outline: 1px solid var(--gold); }

html.phone .home { gap: 6px; width: 1000px; grid-template-columns: 210px minmax(0, 1fr) 220px; }
html.phone .hpanel, html.phone .home main.hpanel { padding: 10px; }
html.phone.upright .home, html.phone.upright .home.solo { grid-template-columns: 1fr; width: 460px; }
html.phone .home h1 { font-size: 24px; }
html.phone .home main p { margin-bottom: 8px; font-size: 13px; }
html.phone .card.profile, html.phone .card.guide { width: 860px; padding: 12px 16px; }
html.phone .gbody { min-height: 110px; font-size: 12.5px; }
html.phone .guide h1 { font-size: 20px; margin-bottom: 6px; }
html.phone .icons { max-height: 100px; }
html.phone img.av.huge { width: 60px; height: 60px; }
html.phone .pf-head h1 { font-size: 20px; }

/* ---------- sound and reactions ---------- */
#top .tbtn { margin: 4px 2px 0; padding: 2px 7px; font-size: 13px; line-height: 1.3; background: #000b; border: 1px solid var(--line); border-radius: 10px; box-shadow: none; }
#emotes { position: absolute; left: 50%; top: 100%; translate: -50% 4px; display: flex; gap: 4px; padding: 6px; background: #14100cf5; border: 1px solid var(--trim); border-radius: 8px; box-shadow: 0 8px 22px #000; z-index: 30; }
#emotes button { padding: 4px 7px; font: 20px/1 var(--small); background: #0008; border: 1px solid var(--line); box-shadow: none; }
#emotes button:hover { border-color: var(--gold); }
.pl { position: relative; }
.pl .emo { position: absolute; right: calc(100% + 6px); top: 50%; translate: 0 -50%; min-width: 40px; padding: 4px 8px; text-align: center; font: 700 22px/1 var(--small); color: var(--gold); background: #14100cf5; border: 1px solid var(--trim); border-radius: 14px 14px 2px 14px; box-shadow: 0 4px 14px #000; animation: emo .3s ease-out; z-index: 7; }
@keyframes emo { from { scale: .3; opacity: 0; } }
.sndbtn { display: block; margin: 12px auto 0; }
/* ---------- friends ---------- */
#friends { margin-top: 14px; padding-top: 12px; border-top: 1px solid #3a2e18; }
.frow { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 13px; }
.frow i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #444; }
.frow.on i { background: #1eff00; box-shadow: 0 0 6px #1eff00; }
.frow span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow small { display: block; font: 10px var(--small); color: var(--dim); }
.frow:not(.on):not(.req) span { color: var(--dim); }
.frow button:not(.link) { flex: none; padding: 4px 9px; font-size: 11px; }
.frow.req { background: #ffd10010; margin: 0 -6px; padding: 4px 6px; border-radius: 4px; }
.home .row.fadd input { padding: 6px 8px; font-size: 13px; }
.home .row.fadd button { flex: none; padding: 6px 12px; font-size: 12px; }
.mycode { font: 700 14px ui-monospace, Consolas, monospace; letter-spacing: 2px; color: var(--gold); user-select: all; }
a.bnet { display: block; margin: 0 auto 8px; padding: 10px; width: 280px; max-width: 100%; text-align: center; text-decoration: none; font: 600 14px var(--small); color: #fff; background: linear-gradient(180deg, #1a8fe0, #0c5fa8); border: 1px solid #000; border-radius: 4px; }
a.bnet:hover { filter: brightness(1.15); }
html.phone #top .tbtn { font-size: 9px; padding: 1px 5px; margin-top: 2px; }
html.phone #emotes button { font-size: 15px; padding: 3px 5px; }
html.phone .pl .emo { font-size: 14px; min-width: 26px; padding: 2px 5px; }

/* ---------- the launcher: top bar, section, friends column ---------- */
.client { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 290px; grid-template-rows: 74px minmax(0, 1fr); background: radial-gradient(ellipse at 30% 0%, #3a2414 0%, #150d09 45%, #07060a 100%); }
.client.solo { grid-template-columns: minmax(0, 1fr); }
.cbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; padding: 0 18px 0 14px; background: linear-gradient(180deg, #241a10, #0e0a07); border-bottom: 1px solid var(--trim); box-shadow: 0 4px 18px #000a; z-index: 2; }
.cbar .grow { flex: 1; }
.playbtn { height: 50px; min-width: 190px; margin-right: 18px; font: 900 22px var(--title); letter-spacing: 4px; text-transform: uppercase; color: #fff7d0; border-radius: 26px; border: 2px solid var(--gold);
  background: linear-gradient(180deg, #2b7fd0 0%, #124a8a 55%, #0a2d5a 100%); box-shadow: inset 0 2px 0 #ffffff55, inset 0 -3px 8px #0009, 0 0 0 2px #000, 0 0 18px #2b7fd088; }
.playbtn:hover:not(:disabled) { filter: brightness(1.2); box-shadow: inset 0 2px 0 #ffffff55, inset 0 -3px 8px #0009, 0 0 0 2px #000, 0 0 26px #5fb0ff; }
.playbtn.on { background: linear-gradient(180deg, #d0a02b 0%, #8a5f12 55%, #5a3a0a 100%); box-shadow: inset 0 2px 0 #ffffff55, 0 0 0 2px #000, 0 0 18px #ffd10088; }
.cbar nav { display: flex; height: 100%; }
button.tab { height: 100%; padding: 0 18px; background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; box-shadow: none; font: 600 14px var(--title); letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); }
button.tab:hover:not(:disabled) { filter: none; color: #fff; background: linear-gradient(0deg, #ffd1001a, transparent 70%); }
button.tab.on { color: var(--gold); border-bottom-color: var(--gold); background: linear-gradient(0deg, #ffd10026, transparent 70%); }
button.tab.snd { padding: 0 12px; font-size: 18px; }
.cme { display: flex; align-items: center; gap: 10px; height: 100%; padding: 0 6px 0 14px; border-left: 1px solid #3a2e18; cursor: pointer; }
.cme:hover b { color: var(--gold); }
.cme b { display: block; font-size: 17px; }
.cme span { font: 11px var(--small); color: var(--dim); }
.cme img.av.big { width: 46px; height: 46px; border-radius: 50%; outline: 2px solid var(--trim); }
.cmain { overflow-y: auto; padding: 22px 28px 16px; }
.cside { overflow-y: auto; padding: 16px; background: #0b0806e6; border-left: 1px solid var(--line); }
.cside #friends { margin-top: 14px; }
.cside #gbtn { display: flex; justify-content: center; min-height: 44px; margin-bottom: 8px; }
.cside .row { display: flex; gap: 6px; margin-top: 8px; }
.cside .row > input { flex: 1; min-width: 0; padding: 6px 8px; font-size: 13px; }
.cside .row > button { flex: none; padding: 6px 12px; font-size: 12px; }
.cside .out { display: block; margin: 18px auto 0; }
.cmain .legal { margin-top: 20px; padding-top: 10px; border-top: 1px solid #3a2e18; color: #8a7c62; font: 10.5px/1.45 var(--small); text-align: center; }
.hero { padding: 46px 40px 40px; margin-bottom: 16px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: radial-gradient(ellipse at 50% 120%, #7a2a1055 0%, transparent 60%), linear-gradient(180deg, #2a1c10cc, #0e0a07cc); box-shadow: inset 0 0 0 1px #000, 0 8px 22px #000a; }
.hero h1 { font-size: 58px; margin-bottom: 8px; }
.hero p { margin: 0 0 22px; font-size: 18px; color: var(--dim); }
.hero button { margin: 0 6px; min-width: 170px; }
.hcols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.client.solo .hcols { grid-template-columns: 1fr; }
.hbox { padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: #120d09cc; box-shadow: inset 0 0 0 1px #000; }
.hbox.news { max-height: none; }
.hbox .lead + .lead { margin-top: 16px; }
/* the Play window */
.playwin { max-width: 1040px; margin: 0 auto; text-align: center; }
.ptitle { margin: 6px 0 18px; font: 700 22px var(--title); letter-spacing: 3px; text-transform: uppercase; color: var(--gold); text-shadow: 0 2px 0 #000; }
.pmodes { display: flex; justify-content: center; gap: 18px; }
.pmode { position: relative; flex: 1; max-width: 320px; padding-bottom: 14px; cursor: pointer; overflow: hidden; border: 2px solid var(--line); border-radius: 8px; background: #0e0a07; box-shadow: 0 0 0 1px #000, 0 8px 22px #000a; opacity: .72; transition: opacity .15s, transform .15s; }
.pmode:hover { opacity: 1; transform: translateY(-3px); }
.pmode.on { opacity: 1; border-color: var(--gold); box-shadow: 0 0 0 1px #000, 0 0 26px #ffd10066; }
.pmode .art { height: 210px; overflow: hidden; }
.pmode .art img { width: 100%; height: 100%; object-position: center 25%; }
.pmode .art::after { content: ""; position: absolute; left: 0; right: 0; top: 110px; height: 100px; background: linear-gradient(0deg, #0e0a07, transparent); }
.pmode h3 { position: relative; margin: -18px 0 2px; font: 900 22px var(--title); letter-spacing: 2px; text-transform: uppercase; color: var(--text); text-shadow: 0 2px 0 #000; }
.pmode.on h3 { color: var(--gold); }
.pmode p { margin: 0; font: 12px var(--small); color: var(--dim); }
.pwhat { max-width: 640px; margin: 18px auto 14px; font: 14px/1.5 var(--small); color: #d8ceb8; }
.popts { display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 52px; }
.popts .go { min-width: 170px; padding: 13px 22px; font-size: 16px; }
.popts .go.two { display: inline-flex; align-items: center; gap: 10px; }
.popts select, .popts input { padding: 11px 12px; }
.popts input { width: 110px; text-align: center; letter-spacing: 3px; }
.popts .or { color: var(--dim); font: 12px var(--small); margin: 0 6px; }

html.phone .client { grid-template-columns: minmax(0, 1fr) 210px; grid-template-rows: 44px minmax(0, 1fr); }
html.phone .cbar { padding: 0 8px; gap: 2px; }
html.phone .playbtn { height: 32px; min-width: 100px; margin-right: 6px; font-size: 14px; letter-spacing: 2px; }
html.phone button.tab { padding: 0 9px; font-size: 10px; letter-spacing: .5px; }
html.phone .cme span { display: none; }
html.phone .cme b { font-size: 12px; }
html.phone .cme img.av.big { width: 28px; height: 28px; }
html.phone .cmain { padding: 8px 10px; }
html.phone .cside { padding: 8px; }
html.phone .hero { padding: 14px; margin-bottom: 8px; }
html.phone .hero h1 { font-size: 26px; }
html.phone .hero p { font-size: 12px; margin-bottom: 10px; }
html.phone .hcols { gap: 8px; }
html.phone .hbox { padding: 8px 10px; }
html.phone .ptitle { font-size: 13px; margin: 0 0 6px; }
html.phone .pmodes { gap: 8px; }
html.phone .pmode { padding-bottom: 6px; }
html.phone .pmode .art { height: 84px; }
html.phone .pmode .art::after { top: 30px; height: 60px; }
html.phone .pmode h3 { font-size: 13px; margin-top: -12px; }
html.phone .pmode p { font-size: 9.5px; }
html.phone .pwhat { margin: 6px auto; font-size: 10.5px; }
html.phone .popts .go { min-width: 100px; padding: 8px 12px; font-size: 12px; }
html.phone .popts select, html.phone .popts input { padding: 6px 8px; font-size: 16px; }
html.phone.upright .client { grid-template-columns: 1fr; grid-template-rows: 44px auto auto; height: auto; min-height: 100%; }
html.phone.upright .cbar nav .tab:not(.on) { display: none; }
html.phone.upright .pmodes { flex-direction: column; align-items: center; }
html.phone.upright .pmode { width: 100%; max-width: none; flex: none; }
html.phone.upright .popts { flex-wrap: wrap; }
html.phone.upright .hcols { grid-template-columns: 1fr; }
html.phone.upright .cside { border-left: 0; border-top: 1px solid var(--line); }
html.phone.upright #app { overflow-y: auto; }

/* an arena's backdrop picture, dimmed so the board and the interface stay readable */
#stage.pictured { background: #07060a center / cover no-repeat; }
#stage.pictured::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, #0000 20%, #000b 85%), linear-gradient(180deg, #0006, #0002 30%, #0008); pointer-events: none; }

/* the logo */
img.logo { display: block; width: 520px; max-width: 90%; height: auto; margin: -18px auto 4px; object-fit: contain; filter: drop-shadow(0 6px 18px #000c); }
img.logo.small { width: 300px; margin: -14px auto 6px; }
.hero { padding-top: 30px; }
html.phone img.logo { width: 230px; margin: -6px auto 0; }
html.phone img.logo.small { width: 170px; }

/* ---------- sections inside the frame ---------- */
.cmain .center { display: block; height: auto; padding: 0; overflow: visible; }
.cmain .card { width: auto; max-width: 1000px; margin: 0 auto; }
.cmain .card.room { max-width: 560px; }
.cmain .card.room .ptitle { margin-top: 0; }
.cmain.sec-planner { padding: 10px; overflow: hidden; }
.cmain #planner { height: 100%; padding: 0; }
.cmain #ptop .title { display: none; }
/* the friends column: search box on top, sign out at the foot */
.cside { display: flex; flex-direction: column; }
.cside #friends { flex: 1; }
.cside .out { margin: 14px auto 0; padding-top: 10px; width: 100%; border-top: 1px solid #3a2e18; }
.qbox { margin-bottom: 14px; padding: 10px 12px 8px; text-align: center; border: 1px solid var(--gold); border-radius: 6px; background: linear-gradient(180deg, #2c2110, #150f07); box-shadow: 0 0 14px #ffd10033; }
.qbox .side-title { margin: 0 0 4px; }
.qbox b { display: block; font: 700 15px var(--title); color: var(--text); }
.qbox #qtime { display: block; font: 900 26px var(--title); color: var(--gold); }
.qbox .qdots { margin: 4px 0 6px; gap: 5px; flex-wrap: wrap; }
.qbox .qdots i { width: 11px; height: 11px; }
.qbox small { display: block; margin-bottom: 4px; font: 11px/1.35 var(--small); color: var(--dim); }
.popts .go.searching { filter: saturate(.5); border-color: var(--gold); box-shadow: 0 0 14px #ffd10066; cursor: default; }
html.phone .cmain .card { padding: 10px 14px; }
html.phone .qbox #qtime { font-size: 16px; }

/* stage plate: picture markers, no line of text underneath */
#top .phase[hidden] { display: none; }
.pip { overflow: hidden; opacity: .5; }
.pip > i { display: block; width: 100%; height: 100%; scale: 1.25; }
.pip > i img { width: 100%; height: 100%; object-fit: contain; }
.pip.cur, .pip.won, .pip.lost { opacity: 1; }
.pip.lost > i img { filter: grayscale(.6); }

/* quiet but unmistakable buttons in the friends column */
.cside button.out { display: block; width: 100%; margin: 14px 0 0; padding: 9px 12px; font: 600 12px var(--title); letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim);
  background: linear-gradient(180deg, #241c14, #120d09); border: 1px solid var(--line); border-radius: 5px; box-shadow: inset 0 1px 0 #ffffff14, 0 0 0 1px #000; }
.cside button.out:hover { filter: none; color: #ffb0a8; border-color: #a0362c; background: linear-gradient(180deg, #3a1410, #1c0906); }
.qbox button.cancel { display: block; width: 100%; margin-top: 8px; padding: 8px 10px; font: 700 13px var(--title); letter-spacing: 1px; text-transform: uppercase; color: #fff;
  background: linear-gradient(180deg, #a02418, #6a120a 60%, #4a0a05); border: 1px solid #ff7a6e; border-radius: 5px; box-shadow: inset 0 1px 0 #ffffff33, 0 0 0 1px #000; }
.qbox button.cancel:hover { filter: brightness(1.25); }
html.phone .cside button.out, html.phone .qbox button.cancel { padding: 5px 8px; font-size: 10px; }

/* a guest's sign-in: one button that opens the choices */
.cside button.signin { display: block; width: 100%; margin: 16px 0 8px; padding: 11px; font-size: 15px; background: linear-gradient(180deg, #2b7fd0 0%, #124a8a 55%, #0a2d5a 100%); color: #fff7d0; }
.signbox { margin-top: 16px; padding: 10px 10px 4px; border: 1px solid var(--trim); border-radius: 6px; background: #0008; }
.signbox .side-title { display: flex; justify-content: space-between; align-items: center; margin: 0 2px 10px; }
.signbox a.bnet { width: 100%; }
.signbox #gbtn { margin-bottom: 8px; }

/* ---------- the end of a match ---------- */
#over { background: #000d; padding: 16px; overflow-y: auto; }
.endcard { width: 980px; max-width: 100%; margin: auto; padding: 0 0 18px; background: linear-gradient(180deg, #1c150ff5, #0e0a07fa); border: 1px solid var(--trim); border-radius: 8px; box-shadow: 0 0 0 1px #000, 0 20px 60px #000; overflow: hidden; }
.endhead { padding: 22px 20px 14px; text-align: center; background: radial-gradient(ellipse at 50% 0%, #5a1a1055, transparent 70%); border-bottom: 1px solid #3a2e18; }
.endhead.won { background: radial-gradient(ellipse at 50% 0%, #ffd10040, transparent 70%); }
.endhead h1 { font-size: 46px; margin: 0 0 4px; }
.endhead:not(.won) h1 { background: linear-gradient(180deg, #f0e6d2, #a89878); -webkit-background-clip: text; background-clip: text; }
.endhead p { margin: 0; color: var(--dim); font: 13px var(--small); }
.endrows { padding: 8px 14px; }
.endrow { display: grid; grid-template-columns: 46px 190px 150px 1fr 50px; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid #2a2114; }
.endrow.me { background: linear-gradient(90deg, #ffd1001f, transparent); border-radius: 4px; }
.endrow.me .who { color: var(--gold); }
.endrow .who { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.endrow .who small { display: block; font: 10px var(--small); color: var(--dim); }
.endrow .syn { display: flex; gap: 6px; font: 700 12px var(--small); }
.endrow .syn span { display: inline-flex; align-items: center; gap: 3px; color: #cd7f32; }
.endrow .syn .t2 { color: #d0d6de; } .endrow .syn .t3 { color: #ffd100; } .endrow .syn .t4 { color: #b9f2ff; }
.endrow .syn img { width: 20px; height: 20px; border-radius: 50%; }
.endrow .pf-board span { width: 30px; height: 30px; }
.endearn { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 12px 14px 0; }
.endearn > div { min-width: 150px; padding: 8px 14px; text-align: center; background: #0008; border: 1px solid var(--line); border-radius: 6px; }
.endearn small { display: block; font: 10px var(--small); color: var(--dim); text-transform: uppercase; letter-spacing: .6px; }
.endearn b { font: 700 17px var(--title); color: #7fb8ff; }
.endearn b.up { color: #1eff00; } .endearn b.down { color: #ff5a4f; }
.endearn .unlock { display: flex; align-items: center; gap: 10px; text-align: left; border-color: var(--gold); box-shadow: 0 0 12px #ffd10044; }
.endearn .unlock img { width: 38px; height: 38px; border-radius: 4px; }
.endearn .unlock b { color: var(--gold); font-size: 14px; }
.endbtns { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.endbtns button { min-width: 200px; padding: 12px 18px; }
html.phone .endcard { width: 860px; }
html.phone .endhead { padding: 8px 12px 6px; }
html.phone .endhead h1 { font-size: 22px; }
html.phone .endrow { grid-template-columns: 34px 130px 110px 1fr 40px; padding: 2px 6px; gap: 6px; }
html.phone .endrow .who { font-size: 11px; }
html.phone .endrow .pf-board span { width: 20px; height: 20px; }
html.phone .endbtns { margin-top: 8px; }
html.phone .endbtns button { padding: 7px 12px; min-width: 130px; }

/* a room going into ranked as a party */
.partyq { margin: 0 0 12px; padding: 10px 12px; text-align: left; border: 1px solid #6a5320; border-radius: 6px; background: linear-gradient(180deg, #2c2110, #150f07); }
.partyq b { display: block; font: 700 14px var(--title); color: var(--gold); letter-spacing: .5px; }
.partyq span { display: block; margin-top: 2px; font: 12px/1.4 var(--small); color: var(--dim); }
.partyq .row { margin-top: 8px; }

/* ---------- parties and invitations ---------- */
.invite { margin-bottom: 12px; padding: 10px 12px; border: 1px solid #1eff00; border-radius: 6px; background: linear-gradient(180deg, #12301a, #0a160c); box-shadow: 0 0 14px #1eff0033; font-size: 13px; animation: emo .3s ease-out; }
.invite b { color: #fff; }
.invite .row { margin-top: 8px; }
.invite .row button { flex: 1; padding: 7px 8px; font-size: 12px; }
.pbox { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--trim); border-radius: 6px; background: #0008; }
.pbox .side-title { margin: 0 0 6px; }
.pbox button.out { margin-top: 8px; padding: 6px 10px; font-size: 11px; }
.pstrip { width: 100%; max-width: 720px; margin: 0 auto 12px; padding: 10px 14px; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: #0007; }
.pmembers, .pinv { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pinv { margin-top: 8px; padding-top: 8px; border-top: 1px solid #2a2114; }
.pinv > span { font: 12px var(--small); color: var(--dim); margin-right: 4px; }
.pinv button { display: inline-flex; align-items: center; padding: 4px 10px 4px 5px; font: 13px var(--ui); letter-spacing: 0; color: var(--text); background: #1a2a1a; border: 1px solid #2f8f1f; border-radius: 14px; box-shadow: none; }
.pinv button:hover { filter: none; border-color: #1eff00; color: #fff; }
.chip2 { display: inline-flex; align-items: center; padding: 4px 11px 4px 5px; font-size: 14px; background: #221a12; border: 1px solid var(--line); border-radius: 14px; }
.chip2.lead { border-color: var(--gold); color: var(--gold); }
.chip2.wait { padding-left: 11px; color: var(--dim); border-style: dashed; }
.popts { flex-direction: column; }
.pgo { display: flex; justify-content: center; align-items: center; gap: 10px; }
.popts > select, .popts > .go { align-self: center; }
.popts:has(> #botsel) { flex-direction: row; }

/* stage plate flush with the top edge; sound and reactions beside the player list */
#top { top: 0; }
#top .plate { border-top: 0; border-radius: 0 0 8px 8px; padding: 4px 14px 5px; }
#top .bar { border-radius: 0 0 4px 4px; margin: 0 8px; }
#banner { top: 62px; }
#tools { right: 236px; top: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 6; }
#tools .tbtn { width: 34px; height: 34px; padding: 0; font-size: 16px; line-height: 1; background: #14100cf0; border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 0 0 1px #000, 0 4px 10px #000a; }
#tools .tbtn:hover { border-color: var(--gold); }
#tools #emotes { left: auto; right: calc(100% + 8px); top: 40px; translate: 0 0; }
.pl .emo { z-index: 8; }
html.phone #top { top: 0; }
html.phone #top .plate { padding: 1px 8px 2px; }
html.phone #banner { top: 38px; }
html.phone #tools { right: 136px; top: 4px; gap: 3px; }
html.phone #tools .tbtn { width: 22px; height: 22px; font-size: 10px; }
html.phone #tools #emotes { top: 24px; }
html.phone #game.social #chatbtn { top: 1px; }
html.phone.play:not(.upright) #fullbtn { top: calc(1px * var(--zoom, 1)); }

/* hero card: synergies your team already has */
#tip .tt img { filter: grayscale(.7) brightness(.85); }
#tip .tt.have { color: var(--gold); }
#tip .tt.have img { filter: none; outline: 1px solid var(--gold); }
#tip h4 img, #tip .rec img, #tip .mem img { filter: none; }

/* synergy card: each hero framed in the colour of its cost */
#tip .mem.c1 img { border-color: var(--c1); } #tip .mem.c2 img { border-color: var(--c2); } #tip .mem.c3 img { border-color: var(--c3); }
#tip .mem.c4 img { border-color: var(--c4); } #tip .mem.c5 img { border-color: var(--c5); }
#tip .mem b { color: inherit; opacity: .8; }

/* a reaction sits inside the player's own row: the list clips anything drawn outside it */
.pl .emo { right: 46px; top: 50%; translate: 0 -50%; min-width: 0; padding: 3px 9px; font-size: 20px; border-radius: 14px; z-index: 3; box-shadow: 0 0 0 1px #000, 0 0 12px #ffd10066; }
html.phone .pl .emo { right: 30px; font-size: 13px; padding: 1px 5px; }

#result small.gain { color: var(--gold); }

/* a bigger chat on a desktop: taller, wider, larger type */
#chat { width: 250px; height: 340px; }
#chatlog { font-size: 14px; padding: 6px 8px; }
#chatin { font-size: 14px; padding: 8px 10px; }
.cm { margin-bottom: 5px; }
#game.social #players { max-height: calc(100% - 370px); }
html.phone #game.social.chat-open #chat { width: 440px; height: 190px; }
html.phone #chatlog { font-size: 11.5px; padding: 4px 6px; }
html.phone #game.social #players { max-height: calc(100% - 8px); }
/* friends and leaderboard rows open a profile; a friend's rank sits under the name */
.open { cursor: pointer; }
.open:hover { color: var(--gold); }
.frow small em { font-style: normal; font-weight: 700; color: var(--rk, var(--dim)); }
.toprow.open:hover span { color: var(--gold); }

/* tier lists */
#tiers { padding: 18px 22px 30px; overflow-y: auto; height: 100%; }
#tiers .thd { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
#tiers .thd h1 { margin: 0; font-size: 26px; }
#tiers .tabs { display: flex; gap: 6px; }
#tiers .chip { padding: 6px 14px; border: 1px solid #4a3a20; border-radius: 16px; background: #0006; color: var(--dim); font: 600 13px var(--small); cursor: pointer; }
#tiers .chip.on { color: #1a1206; background: var(--gold); border-color: var(--gold); }
#tiers > .hint { display: block; margin: 0 0 12px; max-width: 900px; }
.tier { flex: none; width: 44px; display: grid; place-items: center; font: 700 24px var(--title); border-radius: 6px; color: #17110a; }
.tier.tS { background: #ff7f7f; } .tier.tA { background: #ffbf7f; } .tier.tB { background: #ffdf7f; } .tier.tC { background: #bfff7f; } .tier.tD { background: #7fbfff; }
.trow { display: flex; gap: 8px; margin-bottom: 6px; min-height: 60px; }
.trow.thead { min-height: 0; margin-bottom: 4px; } .trow.thead b { width: 44px; flex: none; }
.tcells { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.tcell { min-width: 0; background: #0005; border: 1px solid #2a2114; border-radius: 6px; padding: 5px; display: flex; flex-direction: column; gap: 3px; }
.thead .tcell { background: none; border: 0; padding: 0 5px; }
.thero { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.thero img { width: 30px; height: 30px; border-radius: 3px; border: 2px solid var(--c1); }
.thero.c2 img { border-color: var(--c2); } .thero.c3 img { border-color: var(--c3); } .thero.c4 img { border-color: var(--c4); } .thero.c5 img { border-color: var(--c5); }
.thero span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.thero em { font-style: normal; color: var(--dim); font-size: 11.5px; }
.tcomp { display: flex; align-items: stretch; gap: 12px; margin-bottom: 7px; padding: 7px; background: #0005; border: 1px solid #2a2114; border-radius: 6px; }
.tinfo { width: 250px; flex: none; }
.tinfo h3 { margin: 0 0 5px; font: 700 16px var(--title); color: var(--gold); }
.tinfo h3 em { font: 400 12px var(--small); color: var(--dim); margin-left: 8px; }
.tchips { display: flex; flex-wrap: wrap; gap: 4px; }
.tchip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px 1px 2px; border-radius: 10px; background: #2a2114; font-size: 11.5px; }
.tchip img { width: 16px; height: 16px; border-radius: 50%; }
.tfaces { flex: 1; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.tface { position: relative; display: block; }
.tface img { display: block; width: 44px; height: 44px; border-radius: 4px; border: 2px solid var(--c1); }
.tface.c2 img { border-color: var(--c2); } .tface.c3 img { border-color: var(--c3); } .tface.c4 img { border-color: var(--c4); } .tface.c5 img { border-color: var(--c5); }
.tface i { position: absolute; left: 0; right: 0; bottom: -2px; text-align: center; font: 700 9px var(--small); color: var(--gold); text-shadow: 0 0 2px #000, 0 0 2px #000; font-style: normal; }
.tcomp > button { align-self: center; }
html.phone #tiers { padding: 8px 10px 16px; }
html.phone #tiers .thd h1 { font-size: 16px; }
html.phone #tiers .chip { padding: 3px 9px; font-size: 10.5px; }
html.phone .tier { width: 26px; font-size: 15px; } html.phone .trow.thead b { width: 26px; }
html.phone .thero { font-size: 9.5px; gap: 4px; } html.phone .thero img { width: 20px; height: 20px; border-width: 1px; } html.phone .thero em { font-size: 9px; }
html.phone .tinfo { width: 150px; } html.phone .tinfo h3 { font-size: 12px; } html.phone .tinfo h3 em { display: block; margin: 0; font-size: 9.5px; }
html.phone .tface img { width: 28px; height: 28px; border-width: 1px; } html.phone .tchip { font-size: 9.5px; } html.phone .tchip img { width: 12px; height: 12px; }

/* the carousel is played on the floor: the shop, purse and bench step aside */
#game.carousel #hud { display: none; }
