/* =============================================================
   MENUS: idioma, nome, menu principal, bestiário, sala, escolhas
   ============================================================= */

/* ---------- logótipo ---------- */
.logo { text-align: center; }
.logo span {
  display: block; font-family: var(--display); font-size: clamp(40px, 9cqw, 64px); line-height: 0.92;
  background: linear-gradient(180deg, #fff3b0 0%, var(--gold) 45%, #ff8a1a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #8a3a00) drop-shadow(0 6px 0 #3a1600) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
}
.logo small { display: block; margin-top: 8px; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: #e8e2ff; font-weight: 900; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); }
.logo.small span { font-size: 34px; }
.logo.big span { font-size: clamp(44px, 8cqw, 78px); }

/* ---------- ecrãs centrados ---------- */
.center-screen {
  display: grid; place-items: center;
  background: radial-gradient(90% 80% at 50% 30%, rgba(40, 30, 100, 0.55), rgba(6, 8, 20, 0.8));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.card {
  width: min(460px, 100%); box-sizing: border-box; padding: 26px 22px;
  background: linear-gradient(180deg, rgba(34, 40, 84, 0.92), rgba(16, 20, 44, 0.92));
  border: 1px solid var(--line); border-radius: 26px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.card h2 { font-size: 22px; text-align: center; }
.lang-btns { display: grid; gap: 12px; }
.lang-btns .btn { justify-content: flex-start; gap: 14px; }
.flag { width: 34px; height: 24px; border-radius: 5px; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25); }
.flag.pt { background: linear-gradient(90deg, #046a38 0 40%, #da291c 40%); position: relative; }
.flag.pt::after { content: ""; position: absolute; left: 40%; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: #ffe14a; transform: translate(-50%, -50%); box-shadow: 0 0 0 1.5px #fff; }
/* bandeira do Reino Unido (Union Jack), desenhada em SVG */
.flag.en { background: #012169 center / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30' preserveAspectRatio='none'%3E%3CclipPath id='s'%3E%3Cpath d='M0,0 v30 h60 v-30 z'/%3E%3C/clipPath%3E%3CclipPath id='t'%3E%3Cpath d='M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23s)'%3E%3Cpath d='M0,0 v30 h60 v-30 z' fill='%23012169'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' clip-path='url(%23t)' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30,0 v30 M0,15 h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30,0 v30 M0,15 h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/g%3E%3C/svg%3E"); }

/* ---------- menu principal ---------- */
#scr-menu {
  background: linear-gradient(90deg, rgba(6, 8, 22, 0.82) 0%, rgba(6, 8, 22, 0.45) 45%, rgba(6, 8, 22, 0) 70%),
              linear-gradient(0deg, rgba(6, 8, 22, 0.5), transparent 40%);
  overflow: auto;
}
.menu-wrap {
  min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; gap: 18px;
  width: min(460px, 100%);
  padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 22px;
}
.menu-wrap .logo { text-align: left; }
.hello { font-family: var(--display); font-size: 22px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mbtn {
  position: relative; text-align: left; border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 3px;
  background: linear-gradient(180deg, rgba(40, 46, 96, 0.92), rgba(20, 24, 54, 0.92)); border: 1px solid var(--line);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35), 0 14px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); overflow: hidden;
  transition: transform 0.1s;
}
.mbtn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); }
.mbtn b { font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: 0.02em; }
.mbtn small { font-size: 12.5px; color: rgba(255, 255, 255, 0.82); font-weight: 800; }
.mbtn .mi .ic { width: 30px; height: 30px; stroke-width: 2; }
.mbtn.host, .mbtn.join { grid-column: span 3; padding: 18px; }
.mbtn.host { background: linear-gradient(135deg, #ffd04d, #ff8a1a); color: #3a1c00; box-shadow: 0 6px 0 #a05200, 0 18px 40px rgba(255, 140, 30, 0.35); border: 0; }
.mbtn.host small { color: #5a2c00; }
.mbtn.join { background: linear-gradient(135deg, #5aa0ff, #3060e0); box-shadow: 0 6px 0 #1a3a9a, 0 18px 40px rgba(60, 120, 255, 0.3); border: 0; }
.mbtn.host .mi, .mbtn.join .mi { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); opacity: 0.85; }
.mbtn.host .mi .ic, .mbtn.join .mi .ic { width: 48px; height: 48px; }
.mbtn.small { align-items: center; text-align: center; padding: 12px 6px; gap: 6px; }
.mbtn.small b { font-size: 15px; }

/* ---------- barras de cabeçalho ---------- */
.bar {
  display: flex; align-items: center; gap: 12px;
  padding-top: max(12px, env(safe-area-inset-top, 0px)); padding-bottom: 12px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: linear-gradient(180deg, rgba(10, 12, 30, 0.95), rgba(10, 12, 30, 0.7)); border-bottom: 1px solid var(--line);
}
.bar h2 { font-size: 24px; flex: 1; }
.pad { padding: 12px max(16px, env(safe-area-inset-right, 0px)) 4px max(16px, env(safe-area-inset-left, 0px)); }

/* ---------- bestiário ---------- */
#scr-best { background: rgba(8, 10, 24, 0.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow: auto; }
.best-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
}
.best-card {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; text-align: left;
  background: radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--tc) 30%, transparent), rgba(255, 255, 255, 0.04) 60%);
  border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent);
}
.best-card img { width: 72px; height: 72px; flex: none; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)); }
.best-card b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; }
.best-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ficha do monstro: 1/3 o monstro em 3D (setas em baixo para passar aos
   outros), 2/3 a informação em dois separadores (Stats / Habilidades), sem scroll */
.modal.mon-detail { width: min(900px, 100%); height: min(560px, 100%); padding: 10px 14px 12px; display: flex; flex-direction: column; overflow: hidden; }
.mon-detail .mh { margin-bottom: 6px; flex: none; }
.mdt-body { flex: 1; min-height: 0; }
.mdt-grid { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }
.mdt-side { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; border-radius: 18px; overflow: hidden;
  background: radial-gradient(80% 70% at 50% 42%, color-mix(in srgb, var(--tc) 42%, #1a1d40), #10132a 78%);
  border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); }
.mdt-stage { flex: 1; min-height: 0; touch-action: pan-y; }
.mdt-id { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; pointer-events: none; }
.mdt-nav { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 4px 6px 7px; }
.mdt-arrow { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; }
.mdt-arrow .ic { width: 18px; height: 18px; }
.mdt-arrow:active { transform: scale(0.92); background: color-mix(in srgb, var(--tc) 45%, rgba(0, 0, 0, 0.3)); }
.mdt-dots { font-size: 11px; font-weight: 900; color: var(--muted); min-width: 40px; text-align: center; }
.mdt-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.mdt-tabs { flex: none; display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); margin-bottom: 8px; }
.mdt-tabs button { flex: 1; padding: 7px 4px; border-radius: 9px; font-weight: 900; font-size: 13.5px; color: var(--muted); }
.mdt-tabs button[aria-selected="true"] { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: inset 0 -2px 0 var(--tc); }
.mdt-page { flex: 1; min-height: 0; overflow: hidden; }
/* stats: atributos à esquerda; fortes e fracos em lista */
.mdt-statpage { height: 100%; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.mdt-col { min-width: 0; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.mdt-col h4 { font-size: 14px; line-height: 1.2; }
.mdt-col h5 { font-size: 12px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.mdt-stats { display: flex; flex-direction: column; gap: 5px; }
.mdt-stats .st { grid-template-columns: 36px 1fr 18px; gap: 6px; font-size: 11.5px; }
.mdt-stats .st .sb { height: 6px; }
.mdt-desc { margin: 2px 0 0; font-size: 11.5px; line-height: 1.35; color: #cfcbe6; font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.mdt-types { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mdt-types li { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px; border-radius: 99px; background: color-mix(in srgb, var(--tc) 12%, transparent); }
.mdt-types li b { font-size: 13.5px; color: var(--tc); }
.mdt-types li.none { background: none; color: var(--muted); padding-left: 6px; }
.mdt-hint { margin-top: auto; font-size: 10.5px; color: var(--muted); font-weight: 800; }
/* ícone de tipo: o símbolo da cor do tipo dentro de um círculo */
.type-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--tc);
  border: 2px solid var(--tc); background: color-mix(in srgb, var(--tc) 18%, #0d1028); box-shadow: 0 0 8px color-mix(in srgb, var(--tc) 40%, transparent); }
.type-ic .ic { width: 15px; height: 15px; stroke-width: 2.2; }
/* habilidades: 2×2, resumidas */
.mdt-skills { height: 100%; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; }
.mdt-skills .sk { padding: 9px; gap: 9px; min-height: 0; overflow: hidden; }
.mdt-skills .sk .atk-ic { width: 38px; height: 38px; border-radius: 11px; }
.mdt-skills .sk .atk-ic .ic { width: 21px; height: 21px; }
.mdt-skills .sk-txt b { font-size: 14.5px; padding-right: 64px; }
.mdt-skills .sk-txt p { font-size: 12.5px; line-height: 1.33; }
.mdt-skills .am { font-size: 11.5px; }
/* telemóvel deitado (pouca altura): tudo mais apertado */
@container app (orientation: landscape) and (max-height: 560px) {
  .modal.mon-detail { padding: 6px 10px 8px; }
  .mon-detail .mh { margin-bottom: 4px; }
  .mon-detail .mh h3 { font-size: 20px; }
  .mon-detail .mh .icon-btn { width: 32px; height: 32px; }
  .mdt-grid { gap: 9px; }
  .mdt-tabs { margin-bottom: 6px; }
  .mdt-tabs button { padding: 5px 4px; font-size: 12.5px; }
  .mdt-statpage { gap: 7px; }
  .mdt-col { padding: 7px 8px; gap: 4px; }
  .mdt-col h4 { font-size: 12.5px; }
  .mdt-stats { gap: 3px; }
  .mdt-stats .st { font-size: 10.5px; }
  .mdt-col .hpline b { font-size: 17px; }
  .mdt-desc { font-size: 10.5px; line-height: 1.3; -webkit-line-clamp: 6; }
  .mdt-types { gap: 4px; }
  .mdt-types li { padding: 2px 6px 2px 2px; gap: 7px; }
  .mdt-types li b { font-size: 12px; }
  .type-ic { width: 22px; height: 22px; }
  .type-ic .ic { width: 13px; height: 13px; }
  .mdt-skills { gap: 6px; }
  .mdt-skills .sk { padding: 6px 7px; gap: 7px; }
  .mdt-skills .sk .atk-ic { width: 32px; height: 32px; }
  .mdt-skills .sk .atk-ic .ic { width: 18px; height: 18px; }
  .mdt-skills .sk-txt b { font-size: 13px; padding-right: 56px; }
  .mdt-skills .sk-txt p { font-size: 11px; line-height: 1.28; margin-top: 1px; }
  .mdt-skills .am { font-size: 10.5px; }
  .mdt-skills .sk .cdmax { font-size: 9px; }
  .mdt-arrow { width: 28px; height: 28px; }
  .mdt-nav { padding: 2px 6px 5px; }
}
/* telemóvel ao alto: o monstro em cima (1/3) e a informação em baixo (2/3) */
@container app (max-width: 520px) {
  .modal.mon-detail { height: 100%; padding: 8px 10px 10px; }
  .mdt-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
  .mdt-statpage { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; }
  .mdt-statpage .mdt-col:first-child { grid-column: 1 / -1; }
  .mdt-desc { -webkit-line-clamp: 2; }
  .mdt-skills { grid-template-columns: 1fr; grid-template-rows: repeat(4, 1fr); gap: 6px; }
  .mdt-skills .sk { padding: 6px; gap: 7px; }
  .mdt-skills .sk .atk-ic { width: 30px; height: 30px; }
  .mdt-skills .sk .atk-ic .ic { width: 17px; height: 17px; }
  .mdt-skills .sk-txt b { font-size: 13px; padding-right: 56px; }
  .mdt-skills .sk-txt p { font-size: 11px; line-height: 1.28; }
  .mdt-skills .sk .cdmax { font-size: 9px; }
}
.hpline { display: flex; gap: 8px; align-items: baseline; }
.hpline span { color: var(--muted); font-weight: 900; font-size: 12px; }
.hpline b { font-family: var(--display); font-weight: 400; font-size: 22px; color: #7dffb0; }
.matchups { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 900; }
.matchups span { margin-right: 4px; }
.atk-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.atk-list .atk-row { align-items: flex-start; }

/* ---------- sala ----------
   Tudo num só ecrã do telemóvel (sem scroll): equipas lado a lado,
   cada lugar com o nome em cima e os 4 monstros à frente do avatar.
   Tempo e mapa abrem janelas pequenas. */
#scr-lobby { display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(8, 10, 24, 0.86), rgba(8, 10, 24, 0.72)); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
#scr-lobby .bar { padding-top: max(8px, env(safe-area-inset-top, 0px)); padding-bottom: 8px; }
#scr-lobby .bar h2 { font-size: 22px; }
.code-box { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.code-box small { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 900; }
.code-box b { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: 0.12em; color: var(--gold); text-shadow: 0 0 18px rgba(255, 208, 77, 0.45); }
.code-box.off b { color: var(--muted); text-shadow: none; }
.lobby-body {
  flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 10px;
  padding: 10px max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px));
}
.note {
  font-size: 12px; color: #d8d4f0; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); padding: 7px 10px; border-radius: 12px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: none; max-height: calc(2.7em + 14px); box-sizing: border-box;
}
.seats { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.team-col {
  display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 18px; min-width: 0; min-height: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--team) 18%, transparent), transparent);
  border: 1px solid color-mix(in srgb, var(--team) 35%, transparent);
}
.team-col h4 { font-size: 15px; color: var(--team); padding-left: 2px; line-height: 1; flex: none; }
.seat {
  flex: 1; min-height: 0; border-radius: 15px; padding: 7px; box-sizing: border-box;
  background: rgba(12, 14, 34, 0.78); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.seat.mine { border-color: color-mix(in srgb, var(--tc) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--tc) 40%, transparent), 0 0 18px color-mix(in srgb, var(--tc) 25%, transparent); }
.seat.empty { align-items: stretch; justify-content: center; border-style: dashed; gap: 6px; }
.seat .add { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; max-height: 84px; color: var(--muted); font-weight: 900; font-size: 12px; border-radius: 12px; text-align: center; padding: 4px; background: rgba(255, 255, 255, 0.03); }
.seat.empty { position: relative; }
.seat .move-sm { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); width: 34px; height: 26px; border-radius: 9px; display: grid; place-items: center; color: var(--team); background: color-mix(in srgb, var(--team) 14%, transparent); border: 1px solid color-mix(in srgb, var(--team) 40%, transparent); }
.seat .move-sm .ic { width: 17px; height: 17px; stroke-width: 2.2; }
.seat .move-sm:active { transform: translateX(-50%) scale(0.92); }
.seat.empty .add { margin-bottom: 30px; }
.seat.empty .free { margin-bottom: 30px; }
.seat .add:active { background: rgba(255, 255, 255, 0.08); }
.seat .free { color: var(--muted); text-align: center; font-weight: 800; font-size: 13px; }
/* nome em cima */
.seat-name { text-align: center; min-width: 0; line-height: 1.1; flex: none; }
.seat-name b { display: block; font-family: var(--display); font-weight: 400; font-size: 17px; color: var(--tc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-name small { display: block; color: var(--muted); font-size: 10.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.1em; }
/* avatar atrás, monstros à frente */
.seat-stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.seat-ava {
  position: relative; width: min(84px, 58%); aspect-ratio: 1; flex: none; margin-bottom: -18px;
  border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--tc) 55%, #fff), color-mix(in srgb, var(--tc) 40%, #10122a));
  box-shadow: 0 0 0 2px var(--tc), 0 6px 18px rgba(0, 0, 0, 0.4);
}
.seat-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.seat-ava:disabled { cursor: default; }
.seat.mine .seat-ava:not(:disabled)::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25); }
.seat-mons { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; width: 100%; }
.seat-mons .sm {
  aspect-ratio: 1; border-radius: 12px; padding: 0; overflow: hidden; max-height: 76px; justify-self: center; width: 100%;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--mc) 55%, #1a1d40), rgba(10, 12, 30, 0.95));
  border: 1.5px solid color-mix(in srgb, var(--mc) 70%, transparent); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}
.seat-mons .sm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.seat-mons .sm:not(:disabled):active { transform: scale(0.92); }
/* pronto: cruz vermelha / visto verde */
.seat-foot { display: flex; align-items: center; justify-content: center; gap: 6px; flex: none; }
.rd-lbl { font-weight: 900; font-size: 12px; color: var(--muted); }
.rd-tog { display: flex; border-radius: 11px; background: rgba(0, 0, 0, 0.35); padding: 2px; gap: 2px; }
.rd-tog button { width: 34px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: rgba(255, 255, 255, 0.28); }
.rd-tog .ic { width: 17px; height: 17px; stroke-width: 3; }
.rd-tog .rd-x[aria-pressed="true"] { background: linear-gradient(180deg, #ff7a8e, var(--red)); color: #fff; box-shadow: 0 2px 0 #a8203a; }
.rd-tog .rd-v[aria-pressed="true"] { background: linear-gradient(180deg, #6fe597, var(--green)); color: #08301a; box-shadow: 0 2px 0 #1d8a45, 0 0 12px rgba(54, 207, 108, 0.55); }
.rd-tog button:disabled { cursor: default; }
.seat { position: relative; }
.seat-foot .rm { position: absolute; right: 5px; top: 5px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 77, 106, 0.18); color: #ff9aaa; }
.seat-foot .rm .ic { width: 15px; height: 15px; }
/* tempo e mapa */
.lobby-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: none; }
.opt-btn {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; border-radius: 14px; text-align: left; min-width: 0;
  background: linear-gradient(180deg, rgba(40, 46, 96, 0.9), rgba(20, 24, 54, 0.9)); border: 1px solid var(--line);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}
.opt-btn:active:not(.ro) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.opt-btn > .mi .ic { width: 26px; height: 26px; color: var(--gold); }
.ob-txt { flex: 1; min-width: 0; line-height: 1.1; }
.ob-txt small { display: block; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 900; }
.ob-txt b { display: block; font-family: var(--display); font-weight: 400; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-more .ic { width: 18px; height: 18px; color: var(--muted); }
.opt-btn.ro { cursor: default; }
.opt-btn.ro .ob-more { display: none; }
.ob-thumb { width: 34px; height: 34px; flex: none; border-radius: 9px; overflow: hidden; display: grid; place-items: center; }
.ob-thumb img, .mo-thumb img, .map-img img { width: 100%; height: 100%; display: block; object-fit: cover; }
.map-rand { width: 100%; height: 100%; display: grid; place-items: center; position: relative; background: radial-gradient(circle at 50% 35%, #5a4fb0, #1a1d40); color: var(--gold); }
.map-rand .ic { width: 60%; height: 60%; opacity: 0.35; }
.map-rand b { position: absolute; font-family: var(--display); font-weight: 400; font-size: 1.4em; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); }
.lobby-foot {
  display: flex; align-items: center; gap: 12px; justify-content: flex-end; flex: none;
  padding-top: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px));
  background: rgba(10, 12, 30, 0.92); border-top: 1px solid var(--line);
}
.lobby-foot .status { flex: 1; color: var(--muted); font-weight: 800; font-size: 12.5px; line-height: 1.3; }
.lobby-foot .btn.big { padding: 12px 18px; font-size: 17px; }

/* janela do tempo */
.modal.small { width: min(320px, 100%); }
.time-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.time-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 52px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); border: 2px solid transparent; }
.time-opt b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.time-opt small { font-size: 10.5px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.time-opt[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 208, 77, 0.16); }
.time-opt[aria-pressed="true"] b { color: var(--gold); }

/* janela do mapa: lista + pré-visualização ao lado */
.modal.map-pick { width: min(640px, 100%); }
.map-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr); gap: 12px; align-items: start; }
.map-list { display: flex; flex-direction: column; gap: 6px; }
.map-opt { display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 5px; border-radius: 13px; background: rgba(255, 255, 255, 0.06); border: 2px solid transparent; text-align: left; min-width: 0; }
.map-opt b { font-weight: 900; font-size: 13.5px; line-height: 1.15; min-width: 0; }
.mo-thumb { width: 34px; height: 34px; flex: none; border-radius: 8px; overflow: hidden; display: grid; place-items: center; }
.map-opt[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 208, 77, 0.14); }
.map-prev { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; min-width: 0; }
.map-img { width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--line); }
.map-img .map-rand b { font-size: 64px; }

.mp-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.map-prev b { font-family: var(--display); font-weight: 400; font-size: 18px; }
.map-prev small { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.35; }
.map-pick .row-end { margin-top: 12px; }

/* janela "trocar monstro" */
.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.sm-opt {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 8px; border-radius: 14px; text-align: center;
  background: radial-gradient(100% 80% at 50% 30%, color-mix(in srgb, var(--tc) 28%, transparent), rgba(255, 255, 255, 0.04)); border: 2px solid transparent;
}
.sm-opt:active { border-color: var(--gold); transform: scale(0.97); }
.sm-opt img { width: 62px; height: 62px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)); }
.sm-opt b { font-family: var(--display); font-weight: 400; font-size: 15px; }
.sm-opt .type-chip { font-size: 9.5px; padding: 1px 6px 0; }
.sm-opt small { font-size: 10px; color: var(--muted); line-height: 1.2; }

/* telemóvel deitado: os 4 lugares numa fila e tempo/mapa no rodapé */
@container app (orientation: landscape) and (max-height: 560px) {
  #scr-lobby .bar { padding-top: max(4px, env(safe-area-inset-top, 0px)); padding-bottom: 4px; }
  #scr-lobby .bar .icon-btn { width: 36px; height: 36px; }
  #scr-lobby .bar h2 { font-size: 18px; }
  .code-box b { font-size: 22px; }
  .lobby-body { gap: 6px; padding-top: 6px; padding-bottom: 6px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; }
  .note { grid-column: 1 / -1; display: block; white-space: nowrap; text-overflow: ellipsis; padding: 4px 10px; }
  .seats { grid-column: 1; }
  .team-col { padding: 6px; gap: 6px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; }
  .team-col h4 { grid-column: 1 / -1; font-size: 13px; }
  .lobby-opts { grid-column: 2; grid-row: 2; grid-template-columns: 1fr; align-content: start; width: 170px; }
  .seat-name b { font-size: 14px; }
  .seat-stage { min-height: 0; }
  .seat-ava { width: min(52px, 42%); margin-bottom: -12px; }
  .seat-name small { display: none; }
  .seat-mons .sm { max-height: 54px; border-radius: 10px; }
  .rd-tog button { width: 30px; height: 24px; }
  .lobby-foot { padding-top: 5px; }
  .lobby-foot .btn.big { padding: 8px 16px; font-size: 15px; }
}
@container app (orientation: portrait) and (max-height: 640px) {
  .note { display: block; white-space: nowrap; text-overflow: ellipsis; padding-block: 5px; }
  .seat-name small { display: none; }
  .ob-txt b { font-size: 15px; }
  .opt-btn > .mi .ic { width: 22px; height: 22px; }
  .ob-thumb { width: 28px; height: 28px; }
}
@container app (max-width: 640px) {
  .map-body { gap: 8px; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .map-opt { padding: 4px 6px 4px 4px; gap: 6px; }
  .map-opt b { font-size: 12px; }
  .mo-thumb { width: 28px; height: 28px; }
  .map-prev b { font-size: 15px; }
  .map-prev small { font-size: 11px; }
}

/* ---------- escolher avatar ---------- */
.ava-grid { display: grid; grid-template-columns: 210px 1fr; gap: 14px; }
.ava-big { border-radius: 18px; background: radial-gradient(70% 70% at 50% 35%, #3a3a80, #12142e); min-height: 250px; display: flex; }
.ava-stage { flex: 1; }
.ava-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-content: start; }
.ava-card { border-radius: 14px; padding: 6px 4px 8px; background: rgba(255, 255, 255, 0.06); border: 2px solid transparent; display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 900; font-size: 13px; }
.ava-card img { width: 100%; max-width: 86px; aspect-ratio: 1; border-radius: 12px; background: radial-gradient(circle at 50% 30%, #4a4f9a, #1a1d40); }
.ava-card[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 208, 77, 0.12); }

/* ---------- escolher monstros ---------- */
.mons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 60cqh; overflow: auto; padding: 2px; }
.mon-card { position: relative; }
.mon-card .pick {
  width: 100%; border-radius: 16px; padding: 8px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
  background: radial-gradient(100% 80% at 50% 30%, color-mix(in srgb, var(--tc) 28%, transparent), rgba(255, 255, 255, 0.04)); border: 2px solid transparent;
}
.mon-card .pick img { width: 78px; height: 78px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)); }
.mon-card .pick b { font-family: var(--display); font-weight: 400; font-size: 17px; }
.mon-card .pick small { font-size: 11px; color: var(--muted); }
.mon-card[aria-pressed="true"] .pick { border-color: var(--gold); background: radial-gradient(100% 80% at 50% 30%, color-mix(in srgb, var(--tc) 40%, transparent), rgba(255, 208, 77, 0.1)); }
.mon-card .num { position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #3a2200; font-weight: 900; display: grid; place-items: center; font-size: 13px; }
.mon-card .num:empty { display: none; }
.mon-card .info { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.35); }
.mon-card .info .ic { width: 18px; height: 18px; }

/* ---------- definições ---------- */
/* ---------- Definições (2026-11-14): separadores à esquerda (em cima, ao alto) e o painel ---------- */
#ov-settings .set-win { width: min(760px, 100%); max-height: min(580px, 100%); display: flex; flex-direction: column; gap: 12px; }
#ov-settings .mh { margin-bottom: 0; }
.set-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 14px; }
.set-tabs { display: flex; flex-direction: column; gap: 6px; }
.set-tabs button { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; font-weight: 900; font-size: 14.5px; color: var(--muted);
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); text-align: left; transition: background .15s, color .15s; }
.set-tabs button .ic { width: 22px; height: 22px; flex: none; }
.set-tabs button[aria-selected="true"] { color: #3a2200; background: linear-gradient(180deg, #ffe07a, #ffbf2e); border-color: transparent; box-shadow: 0 3px 0 #a86f00; }
.set-tabs button:active { transform: translateY(1px); }
.set-pane { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 14px; padding: 2px 4px 4px 2px; overscroll-behavior: contain; }
.set-card { display: flex; flex-direction: column; gap: 14px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.set-grupo { display: flex; flex-direction: column; gap: 8px; }
.set-grupo h4 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12.5px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.set-grupo h4 .ic { width: 17px; height: 17px; color: var(--gold); }
/* escolhas em botões grandes */
.set-tiles { display: grid; gap: 8px; }
.set-tiles.dois { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.set-tiles.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.set-tiles.quatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.set-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 66px; padding: 10px 6px; border-radius: 16px; min-width: 0;
  background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 255, 255, 0.08); transition: transform .1s, background .15s, border-color .15s; }
.set-tile .ic { width: 26px; height: 26px; color: var(--muted); }
.set-tile b { font-weight: 900; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.set-tile .flag { width: 40px; height: 27px; }
.set-tile[aria-pressed="true"] { background: radial-gradient(120% 130% at 50% 0%, rgba(255, 204, 51, 0.3), rgba(255, 204, 51, 0.06)); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 204, 51, 0.14); }
.set-tile[aria-pressed="true"] .ic { color: var(--gold); }
.set-tile:active { transform: scale(0.97); }
.set-tiles.quatro .set-tile { min-height: 48px; }
/* volume: ícone (tocar tira o som), nome, percentagem e a barra cheia até ao valor */
.set-vol { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 8px; align-items: center; }
.set-vol .vol-ic { grid-row: 1 / 3; grid-column: 1; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 204, 51, 0.16); color: var(--gold); transition: background .15s, color .15s; }
.set-vol .vol-ic .ic { width: 25px; height: 25px; }
.set-vol.mudo .vol-ic { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.set-vol b { grid-row: 1; grid-column: 2; font-weight: 900; font-size: 15px; }
.set-vol .vol-n { grid-row: 1; grid-column: 3; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.set-vol.mudo .vol-n { color: var(--muted); }
.set-vol input { grid-row: 2; grid-column: 2 / 4; }
.set-vol input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; margin: 0; border-radius: 99px; outline: none;
  background: linear-gradient(90deg, #ffbf2e 0, #ffe07a var(--v, 50%), rgba(255, 255, 255, 0.12) var(--v, 50%)); }
.set-vol input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 4px solid #ffbf2e; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
.set-vol input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid #ffbf2e; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
/* interruptor */
.set-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.set-switch > .ic { width: 26px; height: 26px; color: var(--gold); flex: none; }
.set-switch b { flex: 1; min-width: 0; font-weight: 900; font-size: 15px; }
.set-switch input { position: absolute; opacity: 0; pointer-events: none; }
.set-switch i { position: relative; flex: none; width: 54px; height: 31px; border-radius: 99px; background: rgba(255, 255, 255, 0.16); transition: background .2s; }
.set-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 25px; height: 25px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); transition: transform .2s; }
.set-switch input:checked + i { background: #2fcf8e; }
.set-switch input:checked + i::after { transform: translateX(23px); }
/* ficheiros guardados no telemóvel: a barra grande, a percentagem e os botões */
.desc-topo { display: flex; align-items: center; gap: 10px; }
.desc-topo .ic { width: 30px; height: 30px; color: var(--gold); }
.desc-topo b { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1; }
.desc-topo small { margin-left: auto; font-weight: 900; font-size: 13px; color: var(--muted); }
.desc-barra { height: 16px; border-radius: 99px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); overflow: hidden; }
.desc-barra i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ffbf2e, #ffe07a); transition: width .3s; }
.desc-barra.cheia i { background: linear-gradient(90deg, #20b47a, #5ff0b0); }
.desc-barra.a-correr i { background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.25) 0 8px, transparent 8px 16px), linear-gradient(90deg, #ffbf2e, #ffe07a); background-size: 22px 22px, 100% 100%; animation: desc-riscas .8s linear infinite; }
@keyframes desc-riscas { to { background-position: 22px 0, 0 0; } }
.desc-n { font-weight: 800; font-size: 12px; color: var(--muted); margin-top: -6px; }
.desc-acoes { display: flex; gap: 8px; }
.desc-acoes .btn { gap: 8px; }
.desc-acoes .btn.primary { flex: 1; }
.desc-acoes .btn .ic { width: 20px; height: 20px; }
.set-ver { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
/* telemóvel ao alto: os separadores numa fila em cima (ícone por cima do nome) */
@container app (orientation: portrait) {
  .set-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 12px; }
  .set-tabs { flex-direction: row; }
  .set-tabs button { flex: 1; min-width: 0; flex-direction: column; gap: 3px; padding: 8px 2px; font-size: 12px; text-align: center; }
  .set-tiles.quatro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* telemóvel deitado: mais baixo */
@container app (orientation: landscape) and (max-height: 430px) {
  #ov-settings .set-win { gap: 8px; }
  .set-body { grid-template-columns: 140px minmax(0, 1fr); }
  .set-tabs button { padding: 9px 10px; font-size: 13.5px; }
  .set-pane { gap: 10px; }
  .set-card { padding: 11px 12px; gap: 10px; }
  .set-tile { min-height: 54px; padding: 7px 6px; gap: 4px; }
  .set-tile .ic { width: 22px; height: 22px; }
  .set-tiles.quatro .set-tile { min-height: 40px; }
}

@container app (max-width: 640px) {
  .atk-list { grid-template-columns: 1fr; }
  .ava-grid { grid-template-columns: 1fr; }
  .ava-big { min-height: 170px; }
}
@container app (max-height: 500px) {
  .menu-wrap { gap: 10px; }
  .logo.big span { font-size: 44px; }
  .mbtn.host, .mbtn.join { grid-column: span 3; padding: 12px 14px; }
  .menu-wrap { width: min(560px, 100%); }
  .menu-grid { grid-template-columns: repeat(6, 1fr); }
  .mbtn.host, .mbtn.join { grid-column: span 3; }
  .mbtn.small { grid-column: span 2; }
}

/* versão do jogo (para confirmar que o PC e o telemóvel têm a mesma) */
.menu-ver { margin-top: 10px; text-align: center; font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, 0.38); letter-spacing: 0.04em; }

/* =============================================================
   SALA (2026-10-30c): cada lugar ocupa a altura toda — nome, avatar,
   os monstros num quadrado 2×2 grande e o "pronto" em baixo.
   ============================================================= */
.seat { gap: 6px; padding: 8px 7px; }
.seat > .seat-ava { position: relative; margin: 0 auto; width: min(64px, 42%); max-height: none; bottom: auto; transform: none; left: auto; flex: none; }
.seat-stage { flex: 1; min-height: 0; display: grid; place-items: center; }
.seat-mons, .seat-mons.n4 {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px;
  height: 100%; max-height: 100%; aspect-ratio: 1; max-width: 100%; width: auto;
}
.seat-mons.n2 { grid-template-rows: 1fr; aspect-ratio: 2 / 1; height: auto; width: 100%; }
.seat-mons .sm { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: 14px; border-width: 2px; }
.seat-mons .sm img { object-fit: cover; }
.seat-foot { padding-top: 2px; }
.seat.empty .add { max-height: none; flex: 1; margin-bottom: 36px; }
.lobby-foot .status:empty { display: none; }
#scr-lobby .bar .invite { padding: 7px 10px; }
#scr-lobby .bar .invite .ic { width: 17px; height: 17px; }
.lobby-opts { grid-template-columns: repeat(3, 1fr); }
@container app (orientation: portrait) {
  .opt-btn { padding: 6px 6px 6px 8px; gap: 5px; }
  .opt-btn .ob-more { display: none; }
  .ob-txt b { font-size: 14px; }
  .opt-btn > .mi .ic { width: 20px; height: 20px; }
  .ob-thumb { width: 26px; height: 26px; }
  #scr-lobby .bar .invite span { display: none; }
}
@container app (orientation: landscape) and (max-height: 560px) {
  .lobby-body { grid-template-rows: 1fr; }
  .seats { grid-row: 1 / -1; }
  .lobby-opts { grid-row: 1 / -1; grid-template-columns: 1fr; align-content: center; width: 184px; }
  .team-col { grid-template-rows: auto 1fr; }
  .seat { padding: 6px; gap: 4px; }
  .seat > .seat-ava { width: min(46px, 36%); }
  .seat-mons, .seat-mons.n4 { gap: 5px; }
  .seat-name b { font-size: 14px; }
}

/* ---------- janela do tempo: mostrador + barra ---------- */
.modal.time-pick { width: min(340px, 100%); }
.dial { position: relative; width: min(190px, 52cqw, 40cqh); aspect-ratio: 1; margin: 0 auto 6px; }
.dial svg { width: 100%; height: 100%; display: block; }
.dial .track { fill: rgba(0, 0, 0, 0.28); stroke: rgba(255, 255, 255, 0.08); stroke-width: 12; }
.dial .arc { fill: none; stroke: var(--gold); stroke-width: 12; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 90px 90px; transition: stroke-dashoffset 0.25s cubic-bezier(.3, 1.3, .5, 1); filter: drop-shadow(0 0 6px rgba(255, 208, 77, 0.55)); }
.dial circle:not(.track):not(.arc) { fill: rgba(255, 255, 255, 0.25); transition: r 0.2s; }
.dial circle.on { fill: var(--gold); }
.dial circle.off { fill: rgba(255, 255, 255, 0.08); }
.dial-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dial-txt b { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; }
.dial-txt small { font-size: 11px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }
.tslider { padding: 4px 6px 0; }
.tslider input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; margin: 0;
}
.tslider input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--gold) var(--p, 0%), rgba(255, 255, 255, 0.12) var(--p, 0%)); }
.tslider input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--gold) var(--p, 0%), rgba(255, 255, 255, 0.12) var(--p, 0%)); }
.tslider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; margin-top: -9px; background: radial-gradient(circle at 35% 30%, #fff6c8, var(--gold) 60%, var(--gold-2)); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 208, 77, 0.25); }
.tslider input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--gold); }
.tticks { display: flex; justify-content: space-between; margin: 2px -6px 0; }
.tticks button { flex: 1; font-size: 11px; font-weight: 900; color: var(--muted); padding: 4px 0; border-radius: 8px; }
.tticks button.on { color: var(--gold); }
.tticks button:disabled { opacity: 0.3; }
.muted.center { text-align: center; margin-top: 4px; }
.time-pick .row-end { margin-top: 8px; }

/* ---------- janela do modo ---------- */
.modal.mode-pick { width: min(480px, 100%); }
.mode-list { display: flex; flex-direction: column; gap: 8px; }
.mode-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; text-align: left; background: rgba(255, 255, 255, 0.06); border: 2px solid transparent; }
.mode-opt[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 208, 77, 0.12); }
.mode-opt:active { transform: scale(0.98); }
.mo-ic { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; background: linear-gradient(180deg, #6a5ad8, #3b2f9a); }
.mo-ic .ic { width: 24px; height: 24px; color: #fff; }
.mode-opt[data-id="curto"] .mo-ic { background: linear-gradient(180deg, #4fc9ff, #2f7fd6); }
.mode-opt[data-id="caotico"] .mo-ic { background: linear-gradient(180deg, #ff8a5c, #e0344f); }
.mo-txt { flex: 1; min-width: 0; }
.mo-txt b { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; }
.mo-txt b small { font-family: var(--body); font-size: 10px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.mo-txt span { display: block; font-size: 12px; color: #d6d2ee; line-height: 1.35; }
.mo-n { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; flex: none; }
.mo-n i { width: 9px; height: 9px; border-radius: 3px; background: var(--gold); }

/* ---------- janela do mapa: sem scroll; só a lista de mapas faz scroll ---------- */
.overlay#ov-map .modal.map-pick { display: flex; flex-direction: column; max-height: 100%; overflow: hidden; }
.map-pick .map-body { flex: 1; min-height: 0; }
.map-side { display: flex; flex-direction: column; gap: 6px; min-height: 0; max-height: 100%; }
.map-fixed { flex: none; }
.map-fixed .map-opt { width: 100%; }
.map-side .map-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; padding-right: 2px; }
.map-pick .map-body { align-items: stretch; }
.map-prev { justify-content: flex-start; }
.map-prev .btn { align-self: stretch; margin-top: 4px; }
.map-pick .map-img { max-height: 46cqh; width: auto; max-width: 100%; }
@container app (orientation: landscape) and (max-height: 560px) {
  .map-pick .mh { margin-bottom: 6px; }
  .map-pick .map-img { max-height: 52cqh; }
  /* telemóvel deitado: os mapas em 4 colunas, para caberem todos sem scroll
     (a lista faz scroll, mas não se vê a barra: com 10 mapas, em 3 colunas os
     Picos ficavam escondidos). A lista fica com mais largura que a imagem. */
  .map-pick .map-body { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
  .map-side .map-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; align-content: start; }
  .map-side .map-opt { flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 4px 3px; }
  .map-side .map-opt b { font-size: 10px; }
  .map-side .map-fixed .map-opt { flex-direction: row; text-align: left; padding: 4px 6px 4px 4px; }
}
/* se mesmo assim não couberem todos (mais arenas no futuro), vê-se que a lista continua */
.map-side .map-list { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.35) transparent; }

/* ---------- convidar ---------- */
.inv-code { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-code .btn { flex: 1; }
.inv-code b { flex-basis: 100%; font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: 0.18em; color: var(--gold); margin-right: auto; }

/* ---------- entrar ---------- */
.login-card { gap: 12px; }
.login-opts { display: flex; flex-direction: column; gap: 10px; }
.lbtn { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px; font-weight: 900; font-size: 15.5px; text-align: left; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); }
.lbtn b { flex: 1; font-weight: 900; }
.lbtn .ic { width: 22px; height: 22px; }
.lbtn.google { background: #fff; color: #1f1f1f; border: 0; }
.lbtn.google .ic { stroke: #4285f4; }
.lbtn.guest { background: linear-gradient(180deg, #ffe07a, var(--gold) 45%, var(--gold-2)); color: #3a2200; border: 0; box-shadow: 0 4px 0 #b86a00; }
.lbtn:active { transform: translateY(2px); }
.soon { font-size: 9.5px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; background: rgba(120, 110, 220, 0.3); color: #cfc8ff; vertical-align: middle; }
.lbtn.google .soon { background: #ececf4; color: #6a6a80; }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 900; font-size: 12px; text-transform: uppercase; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.field.sm { padding: 11px 13px; font-size: 15px; }

/* ---------- menu: fila de botões pequenos ---------- */
.menu-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.menu-row .mbtn.small { padding: 10px 4px; grid-column: auto; }
.menu-row .mbtn.small b { font-size: 13.5px; }
.menu-row .mbtn .mi .ic { width: 26px; height: 26px; }
@container app (max-height: 500px) { .menu-row .mbtn.small { padding: 8px 4px; gap: 3px; } }

/* ---------- páginas (rank, amigos) ---------- */
.screen.page { display: flex; flex-direction: column; background: rgba(8, 10, 24, 0.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.page-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px)); }
.tabs { display: flex; gap: 6px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); overflow-x: auto; flex: none; }
.tabs button { padding: 8px 14px; border-radius: 12px; font-weight: 900; font-size: 13.5px; color: var(--muted); background: rgba(255, 255, 255, 0.05); white-space: nowrap; }
.tabs button[aria-selected="true"] { color: #3a2200; background: var(--gold); }
.rank-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px; align-items: start; }
@container app (max-width: 640px) { .rank-grid { grid-template-columns: 1fr; } }
.rk-card { padding: 14px; border-radius: 18px; background: linear-gradient(180deg, rgba(40, 46, 96, 0.8), rgba(20, 24, 54, 0.8)); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.rk-card h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.rk-card h3 small { font-family: var(--body); font-size: 12px; font-weight: 900; color: var(--muted); }
.rk-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rk-nums div { text-align: center; padding: 8px 4px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
.rk-nums b { display: block; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; }
.rk-nums small { font-size: 11px; font-weight: 900; color: var(--muted); }
.rk-nums .w b { color: #7dffb0; } .rk-nums .l b { color: #ff8a9a; }
.rk-rate { display: flex; align-items: center; gap: 10px; }
.rk-rate b { font-family: var(--display); font-weight: 400; font-size: 20px; min-width: 52px; text-align: right; }
.wl { flex: 1; height: 10px; border-radius: 99px; background: rgba(255, 77, 106, 0.45); overflow: hidden; }
.wl i { display: block; height: 100%; background: linear-gradient(180deg, #8dffb3, #2fcf6a); }
.rk-table { display: flex; flex-direction: column; gap: 4px; }
.rk-row { display: grid; grid-template-columns: 30px 1fr 60px; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 11px; background: rgba(255, 255, 255, 0.04); font-weight: 900; font-size: 13.5px; }
.rk-row.head { background: none; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding-block: 0; }
.rk-row.pv { opacity: 0.55; }
.rk-row.me { background: rgba(255, 208, 77, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 208, 77, 0.45); }
.rk-row .pos { font-family: var(--display); font-weight: 400; font-size: 17px; text-align: center; }
.rk-row .who { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-row .who img { width: 28px; height: 28px; border-radius: 50%; background: #2a2f66; flex: none; }
.rk-row .pts { text-align: right; font-variant-numeric: tabular-nums; }
.rk-row { grid-template-columns: 30px 1fr minmax(118px, auto); }
.rk-row .pts.liga { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 12.5px; white-space: nowrap; }
.rk-row .pts.liga small { display: block; font-size: 10.5px; color: var(--muted); text-align: left; }
.rk-row .pts.liga svg { flex: none; }
.liga-mine { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); }
.liga-mine svg { flex: none; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4)); }
.liga-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.liga-txt b { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1; }
.liga-txt small { font-size: 11px; font-weight: 900; color: var(--muted); }
.liga-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.liga-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffd04d, #ff9f43); }
.liga-escudo { align-self: flex-start; font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 99px; background: rgba(125, 220, 255, 0.18); color: #9fe6ff; }
.liga-lenda .liga-bar i { background: linear-gradient(90deg, #ffb36b, #e0304a); }
.rk-mons { display: flex; flex-direction: column; gap: 5px; min-height: 0; }
.rk-mrow { display: grid; grid-template-columns: 26px minmax(110px, 1.2fr) minmax(80px, 1fr) 80px 54px; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 13px; background: linear-gradient(90deg, color-mix(in srgb, var(--tc, #888) 18%, transparent), rgba(255, 255, 255, 0.03) 50%); font-weight: 900; font-size: 13px; }
.rk-mrow.head { background: none; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; padding-block: 0; }
.rk-mrow.zero { opacity: 0.5; }
.rk-mrow .pos { font-family: var(--display); font-weight: 400; font-size: 16px; text-align: center; }
.rk-mrow .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rk-mrow .who img { width: 38px; height: 38px; border-radius: 11px; flex: none; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tc) 50%, #1a1d40), #10122a); }
.rk-mrow .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-mrow .used { display: flex; align-items: center; gap: 6px; }
.rk-mrow .used i { display: block; height: 7px; border-radius: 99px; background: var(--tc, var(--gold)); min-width: 3px; }
.rk-mrow .wl2 .w { color: #7dffb0; } .rk-mrow .wl2 .l { color: #ff8a9a; }
.rk-mrow .rate { text-align: right; font-variant-numeric: tabular-nums; }
@container app (max-width: 480px) {
  .rk-mrow { grid-template-columns: 20px minmax(0, 1.4fr) minmax(40px, 0.8fr) 58px 40px; gap: 6px; font-size: 12px; }
  .rk-mrow .who img { width: 30px; height: 30px; }
}
/* amigos */
.lockbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(120, 110, 220, 0.16); border: 1px solid rgba(160, 150, 255, 0.35); font-weight: 800; font-size: 13px; color: #dcd8ff; margin-bottom: 12px; }
.lockbar .ic { width: 22px; height: 22px; flex: none; color: #b8b0ff; }
.lockbar.sm { font-size: 12px; padding: 8px 10px; margin: 6px 0 8px; }
.fr-add { display: flex; gap: 8px; margin-bottom: 8px; }
.fr-msg { margin: 0 0 8px; font-size: 12.5px; font-weight: 800; color: #ff9aaa; }
.fr-msg.ok { color: #7dffb0; }
.fr-h small { font-size: 12px; font-weight: 800; }
.fr-none { margin: 4px 0; }
.lockbar .btn { margin-left: auto; flex: none; }
/* convites por responder (janela "Entrar numa sala") */
.join-pending { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); max-height: 40cqh; overflow: auto; overscroll-behavior: contain; }
.join-pending .fr-h { margin-top: 0; }
.join-pending .fr .icon-btn { width: 30px; height: 30px; }
/* número de convites no botão "Entrar numa sala" */
.mbtn:has(.badge) { overflow: visible; }
#scr-lobby .bar .invite { position: relative; overflow: visible; }
#scr-lobby .bar .invite .badge { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; display: grid; place-items: center;
  background: #ff4d6d; color: #fff; font: 900 10px/1 var(--body, sans-serif); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.mbtn .badge { position: absolute; z-index: 2; top: -7px; left: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center;
  background: #ff4d6d; color: #fff; font: 900 11px/1 var(--body, sans-serif); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }
/* aviso em baixo: um amigo convidou-me */
.invite-pop { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom, 0px)); z-index: 70; width: min(560px, calc(100% - 24px)); transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 18px; transition: transform 0.28s cubic-bezier(.2, .9, .3, 1.2);
  background: linear-gradient(180deg, rgba(48, 56, 120, 0.98), rgba(24, 28, 62, 0.98)); border: 1px solid rgba(255, 208, 77, 0.55); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55); }
.invite-pop.show { transform: translate(-50%, 0); }
.invite-pop .ip-ava { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; background: rgba(0, 0, 0, 0.3); border: 2px solid var(--gold); }
.invite-pop .ip-ava img { width: 100%; height: 100%; object-fit: cover; }
.invite-pop .ip-txt { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.invite-pop .ip-txt b { color: var(--gold); }
.invite-pop .btn { flex: none; }
.fr-add .field { flex: 1; min-width: 0; }
.fr-h { font-size: 15px; color: var(--muted); margin: 6px 0 8px; display: flex; align-items: center; gap: 8px; }
.fr-list { display: flex; flex-direction: column; gap: 6px; }
.fr { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.fr.pv { opacity: 0.6; }
.fr-ava { position: relative; width: 42px; height: 42px; flex: none; }
.fr-ava img { width: 100%; height: 100%; border-radius: 50%; background: #2a2f66; object-fit: cover; }
.fr-ava::after { content: ""; position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #6b6f8c; box-shadow: 0 0 0 2px #1a1e44; }
.fr-ava.st-online::after { background: var(--green); } .fr-ava.st-room::after { background: var(--gold); }
.fr-txt { flex: 1; min-width: 0; }
.fr-txt b { display: block; font-size: 15px; font-weight: 900; }
.fr-txt small { font-size: 11.5px; font-weight: 800; color: var(--muted); }
.fr-txt small.st-online { color: #7dffb0; } .fr-txt small.st-room { color: var(--gold); }
.fr .btn .ic { width: 15px; height: 15px; }
.fr-rm { width: 36px; height: 36px; color: #ff9aaa; }
.fr-list.compact .fr { padding: 6px 8px; }
.fr-list.compact .fr-ava { width: 34px; height: 34px; }

/* telemóvel deitado: mostrador à esquerda, barra e botão à direita */
@container app (orientation: landscape) and (max-height: 560px) {
  .modal.time-pick { width: min(560px, 100%); display: grid; grid-template-columns: auto 1fr; grid-template-areas: "h h" "d s" "d n" "d b"; column-gap: 18px; align-items: center; }
  .time-pick .mh { grid-area: h; margin-bottom: 4px; }
  .time-pick .dial { grid-area: d; width: min(200px, 52cqh); margin: 0; }
  .time-pick .tslider { grid-area: s; align-self: end; }
  .time-pick #time-note { grid-area: n; }
  .time-pick .row-end { grid-area: b; align-self: start; margin-top: 4px; }
}

/* ---------- páginas: só as listas fazem scroll ---------- */
.screen.page .page-body { overflow: hidden; display: flex; flex-direction: column; }
#rank-body > .rank-grid { flex: 1; min-height: 0; }
.rank-grid { align-items: stretch; }
.rk-card { min-height: 0; }
.rk-card.board { overflow: hidden; }
.rk-card.board .rk-table { flex: 1; min-height: 0; }
.rk-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; display: flex; flex-direction: column; gap: 4px; }
#rank-body .rk-mons { flex: 1; min-height: 0; }
#friends-body .fr-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }
@container app (max-width: 640px) {
  #rank-body > .rank-grid { grid-template-rows: auto minmax(0, 1fr); }
  .rk-card:first-child { gap: 6px; padding: 10px 12px; }
  .rk-card:first-child p { display: none; }
}
/* ---------- ecrã Rank (2026-11-18): o avatar no pedestal da liga, a classificação por ligas, as partidas ---------- */
#rank-tabs button { display: inline-flex; align-items: center; gap: 6px; }
#rank-tabs button svg { flex: none; margin: -4px 0; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4)); }
#rank-body > .rank-grid.rk2 { grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.3fr); }
.rk-hero { position: relative; min-height: 0; border-radius: 18px; overflow: hidden; cursor: pointer; border: 1px solid var(--line);
  background: radial-gradient(90% 70% at 50% 36%, color-mix(in srgb, var(--c2) 55%, #1c2152) 0%, rgba(20, 24, 56, 0.95) 64%, #0c0f24 100%); }
.rk-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 18px; }
.rk-hero.liga-campeao::after, .rk-hero.liga-lenda::after, .rk-hero.liga-eclipse::after { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c1) 45%, transparent), inset 0 0 40px color-mix(in srgb, var(--c1) 22%, transparent); }
.rk-hero.liga-eclipse { background: radial-gradient(90% 70% at 50% 36%, #3a2c6e 0%, rgba(18, 16, 44, 0.96) 64%, #08071a 100%); }
.rk-palco { position: absolute; inset: 0; }
.rk-top { position: absolute; top: 8px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.rk-chips { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.rk-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 6px; border-radius: 99px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); font-size: 11.5px; font-weight: 900; white-space: nowrap; }
.rk-chip .ic { width: 15px; height: 15px; }
.rk-chip.fogo { color: #ffc27a; } .rk-chip.escudo { color: #bfe0ff; }
.rk-pos { display: flex; flex-direction: column; align-items: center; padding: 4px 11px 5px; border-radius: 14px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--c1); box-shadow: 0 0 14px color-mix(in srgb, var(--c1) 35%, transparent); }
.rk-pos b { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; color: var(--c1); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5); }
.rk-pos small { font-size: 10.5px; color: var(--muted); font-weight: 900; }
.rk-bot { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; display: flex; align-items: center; gap: 10px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(6, 8, 22, 0.85) 42%); }
.rk-bot > svg { flex: none; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5)); }
.rk-txt { flex: 1; min-width: 0; }
.rk-lnome { font-family: var(--display); font-size: 26px; line-height: 1; letter-spacing: 0.02em; color: var(--c1);
  background: linear-gradient(180deg, #fff 0%, var(--c1) 42%, var(--c2) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.6)); }
.liga-eclipse .rk-lnome { background-image: linear-gradient(180deg, #fff 0%, #fff0c0 50%, #b9a0ff 100%); }
.rk-lsub { font-size: 11.5px; color: var(--muted); font-weight: 800; margin-top: 3px; }
.rk-bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin-top: 7px; position: relative; }
.rk-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--c2), var(--c1)); box-shadow: 0 0 10px var(--c1); overflow: hidden; }
.rk-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent); transform: translateX(-100%); animation: rk-brilho 2.4s infinite; }
@keyframes rk-brilho { to { transform: translateX(200%); } }
@media (prefers-reduced-motion: reduce) { .rk-bar i::after { animation: none; } }
.rk-bartxt { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); font-weight: 900; margin-top: 3px; white-space: nowrap; }
.rk-bartxt b { color: var(--text); }
.rk-nums3 { display: flex; gap: 12px; margin-top: 6px; font-size: 11px; color: var(--muted); font-weight: 900; }
.rk-nums3 b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--text); }
.rk-nums3 .w b { color: #7dffb0; } .rk-nums3 .l b { color: #ff8a9a; }
/* à direita */
.rk-card.rk-side { position: relative; padding: 0; gap: 0; overflow: hidden; }
.rk-subs { flex: none; display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); }
.rk-subs button { flex: 1; padding: 7px; border-radius: 10px; font-weight: 900; font-size: 13px; color: var(--muted); background: none; }
.rk-subs button[aria-selected="true"] { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.rk-pane { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.rk-pane > p.muted { padding: 10px 4px; }
.rk-grp { display: flex; align-items: center; gap: 7px; padding: 10px 4px 4px; border-bottom: 1px solid color-mix(in srgb, var(--c1) 40%, transparent); margin-bottom: 2px; }
.rk-grp:first-child { padding-top: 4px; }
.rk-grp b { font-family: var(--display); font-weight: 400; font-size: 16px; color: var(--c1); }
.rk-grp small { margin-left: auto; font-size: 10.5px; color: var(--muted); font-weight: 800; text-align: right; }
.rk-r { display: grid; grid-template-columns: 26px 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 11px; background: rgba(255, 255, 255, 0.035); font-weight: 900; font-size: 13.5px; text-align: left; width: 100%; }
.rk-r .pos { font-family: var(--display); font-weight: 400; font-size: 16px; color: var(--muted); text-align: center; }
.rk-r .aro img { width: 28px; height: 28px; background: #2a2f66; }
.rk-r .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-r .lg { font-size: 12px; color: var(--c1); white-space: nowrap; text-align: right; }
.rk-r .lg small { color: var(--muted); margin-left: 5px; font-size: 11px; }
.rk-r.me { background: linear-gradient(90deg, rgba(61, 139, 255, 0.32), rgba(61, 139, 255, 0.08)); box-shadow: inset 0 0 0 1px rgba(110, 170, 255, 0.6); }
.rk-r.me .pos { color: var(--text); }
.rk-tu { font-style: normal; font-size: 9.5px; font-weight: 900; padding: 1px 6px; border-radius: 99px; background: var(--blue); color: #fff; margin-left: 5px; vertical-align: 2px; letter-spacing: 0.04em; }
.rk-fixo { position: absolute; left: 8px; right: 8px; bottom: 8px; width: auto; z-index: 2; border: 0; background: linear-gradient(90deg, #2a4a9a, #1a2858) !important; box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(110, 170, 255, 0.7) !important; }
.rk-fixo.cima { top: 52px; bottom: auto; }
.rk-fixo[hidden] { display: none; }
.rk-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 6px; padding: 14px 4px 2px; }
.rk-pod { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.rk-pod > .aro img { width: 40px; height: 40px; }
.rk-pod.p1 > .aro img { width: 50px; height: 50px; }
.rk-pod > .aro { margin: 10px 0 6px; }
.rk-pod b { font-size: 12.5px; font-weight: 900; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pod small { font-size: 10.5px; color: var(--muted); font-weight: 900; }
.rk-pod .blk { width: 100%; margin-top: 3px; border-radius: 10px 10px 4px 4px; display: grid; place-items: center; font-family: var(--display); font-size: 20px; color: #fff6d0; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
  background: linear-gradient(180deg, #3a2f62, #1c1838); border: 1px solid rgba(255, 240, 192, 0.35); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.12); }
.rk-pod.p1 .blk { height: 40px; background: linear-gradient(180deg, #4a3a7a, #221a44); }
.rk-pod.p2 .blk { height: 28px; } .rk-pod.p3 .blk { height: 20px; font-size: 16px; }
.rk-pod.eu .blk { box-shadow: inset 0 0 0 1px rgba(110, 170, 255, 0.8); }
.rk-nums4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding-top: 4px; }
.rk-nums4 span { background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 5px 4px; text-align: center; font-size: 10.5px; color: var(--muted); font-weight: 900; }
.rk-nums4 b { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; color: var(--text); }
.rk-nums4 .w b { color: #7dffb0; } .rk-nums4 .l b { color: #ff8a9a; }
.rk-curva { width: 100%; height: 60px; flex: none; margin: 4px 0; }
.rk-curva polygon { fill: rgba(255, 208, 77, 0.16); } .rk-curva polyline { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linejoin: round; }
.rk-hist { display: flex; flex-direction: column; gap: 4px; }
.rk-m { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border-left: 3px solid; }
.rk-m.v { border-color: #36cf6c; } .rk-m.d { border-color: #ff4d6a; }
.rk-m .r { font-family: var(--display); font-size: 15px; text-align: center; }
.rk-m.v .r { color: #7dffb0; } .rk-m.d .r { color: #ff8a9a; }
.rk-m .op { font-weight: 900; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-m .op small { display: block; color: var(--muted); font-weight: 800; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; }
.rk-m .pl { font-family: var(--display); font-size: 15px; }
.rk-m.v .pl { color: #8ff0b0; } .rk-m.d .pl { color: #ff9aa9; }
.rk-m .pl.col { font-family: var(--body); font-size: 10.5px; font-weight: 900; color: var(--muted); }
.rk-m .ha { font-size: 10.5px; color: var(--muted); font-weight: 800; min-width: 44px; text-align: right; white-space: nowrap; }
/* a janela por cima do ecrã Rank: o perfil de um jogador e "como funciona" */
#rank-ajuda { margin-left: auto; }
#rank-ajuda + #rank-back { margin-left: 6px; }
#scr-rank .win { position: relative; }
.rk-ov { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 14px; background: rgba(6, 8, 22, 0.66); border-radius: inherit; animation: rk-ov-in .18s ease-out; }
@keyframes rk-ov-in { from { opacity: 0; } }
.rk-ovbox { position: relative; width: min(640px, 100%); max-height: 100%; overflow: auto; border-radius: 20px; padding: 14px; background: linear-gradient(180deg, #232a62, #141938); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.rk-ovx { position: absolute; top: 8px; right: 8px; z-index: 2; }
.rk-pf { display: grid; grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.2fr); gap: 14px; align-items: stretch; }
.rk-pfpalco { position: relative; min-height: 250px; border-radius: 16px; cursor: pointer;
  background: radial-gradient(90% 70% at 50% 40%, color-mix(in srgb, var(--c2) 55%, #1c2152) 0%, rgba(20, 24, 56, 0.95) 70%, #0c0f24 100%); }
.rk-pf.liga-eclipse .rk-pfpalco { background: radial-gradient(90% 70% at 50% 40%, #3a2c6e 0%, rgba(18, 16, 44, 0.96) 70%, #08071a 100%); }
.rk-pfinfo { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-right: 30px; }
.rk-pfinfo h3 { font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pfliga { display: flex; align-items: center; gap: 10px; }
.rk-pfliga > span { display: flex; flex-direction: column; min-width: 0; }
.rk-pfliga .rk-lnome { font-size: 22px; font-weight: 400; }
.rk-pfliga small { font-size: 12px; color: var(--muted); font-weight: 800; margin-top: 2px; }
.rk-pfnums { padding-top: 0; }
.rk-pfmons > small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 900; margin-bottom: 5px; }
.rk-pfmons > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rk-pfmons span { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 -3px 0 var(--tc); }
.rk-pfmons img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: rgba(0, 0, 0, 0.25); }
.rk-pfmons b { font-size: 11.5px; font-weight: 900; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-ajt { font-size: 22px; margin: 0 40px 10px 2px; }
.rk-aj { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px; }
.rk-aj-ligas { display: flex; flex-direction: column; gap: 4px; }
.rk-aj-l { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 3px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.rk-aj-l b { font-family: var(--display); font-weight: 400; font-size: 15px; color: var(--c1); }
.rk-aj-l small { font-size: 10.5px; color: var(--muted); font-weight: 800; white-space: nowrap; }
.rk-aj-pts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rk-aj-pts li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 13px; font-weight: 800; line-height: 1.35; }
.rk-aj-pts .ic { width: 20px; height: 20px; color: var(--gold); margin-top: 1px; }
[data-uid] { cursor: pointer; }
@container app (max-width: 640px) {
  .rk-pf, .rk-aj { grid-template-columns: 1fr; }
  .rk-pfpalco { min-height: 200px; }
  .rk-pfinfo { padding-right: 0; }
}
@container app (max-width: 640px) {
  #rank-body > .rank-grid.rk2 { grid-template-columns: 1fr; grid-template-rows: minmax(190px, 30cqh) minmax(0, 1fr); }
}
@container app (max-height: 430px) {
  .rk-lnome { font-size: 22px; }
  .rk-bot { padding: 20px 10px 8px; gap: 8px; }
  .rk-bot > svg { width: 44px; height: auto; }
  .rk-pos b { font-size: 24px; }
}
.ov-scroll { max-height: 60cqh; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }

/* ---------- monstros: lista dos meus à esquerda · o monstro em 3D ao meio · nível e habilidades à direita ---------- */
.best-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 10px; padding: 10px max(14px, env(safe-area-inset-right, 0px)) 12px max(14px, env(safe-area-inset-left, 0px)); }
.best-body > * { min-width: 0; min-height: 0; }
.best-list { overflow: auto; overscroll-behavior: contain; touch-action: pan-y; display: flex; flex-direction: column; gap: 5px; padding-right: 2px; }
.best-row { position: relative; flex: none; display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px; border-radius: 14px; text-align: left;
  background: radial-gradient(120% 160% at 0% 50%, color-mix(in srgb, var(--tc) 24%, transparent), rgba(255, 255, 255, 0.03) 62%); border: 2px solid color-mix(in srgb, var(--tc) 22%, transparent); }
.best-row img { width: 40px; height: 40px; flex: none; border-radius: 11px; object-fit: cover; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tc) 50%, #1a1d40), #10122a); }
.best-row b { flex: 1; min-width: 0; font-family: var(--display); font-weight: 400; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.best-row.in { background: radial-gradient(120% 160% at 0% 50%, color-mix(in srgb, var(--tc) 30%, transparent), rgba(255, 208, 77, 0.06) 62%); }
.best-row.cur { border-color: var(--gold); box-shadow: 0 0 12px rgba(255, 208, 77, 0.3); }
.best-row .num { position: absolute; left: 1px; top: 1px; width: 17px; height: 17px; border-radius: 50%; background: var(--gold); color: #3a2200; font-weight: 900; font-size: 10px; display: grid; place-items: center; }
.best-row .num:empty { display: none; }
.type-ic.sm { width: 22px; height: 22px; border-width: 1.5px; }
.type-ic.sm .ic { width: 13px; height: 13px; }
/* o monstro escolhido, grande */
.best-view { position: relative; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: radial-gradient(80% 70% at 50% 46%, color-mix(in srgb, var(--tc) 42%, #1a1d40), #10132a 80%); border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); }
.bv-stage { flex: 1; min-height: 0; }
.bv-head { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.bv-slot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #3a2200; font-weight: 900; font-size: 13px; }
.bv-name { min-width: 0; display: flex; flex-direction: column; }
.bv-name b { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.05; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.bv-type { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; color: #dcd8f0; }
.bv-type .type-ic.sm { width: 18px; height: 18px; }
.bv-type .type-ic.sm .ic { width: 11px; height: 11px; }
.bv-info { position: absolute; right: 8px; bottom: 8px; z-index: 2; width: 40px; height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; }
.bv-info .ic { width: 22px; height: 22px; }
.bv-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--muted); font-weight: 800; font-size: 13px; margin: 0; }
/* à direita: nível do monstro (barra de XP) e as 4 habilidades */
.best-side { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 18px; overflow: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc, #555a80) 16%, rgba(40, 46, 96, 0.85)), rgba(20, 24, 54, 0.85)); border: 1px solid var(--line); }
.best-side:empty { visibility: hidden; }
.best-side h4 { margin: 2px 0 0; font-size: 13px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.bs-nivel .mae { margin: 0; }
.bs-nivel .mae .xp-barra { height: 9px; }
.bs-nivel .mae small { white-space: normal; }
.bs-habs { display: flex; flex-direction: column; gap: 5px; }
.bs-hab { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bs-hab .atk-ic { width: 32px; height: 32px; border-radius: 10px; flex: none; }
.bs-hab .atk-ic .ic { width: 19px; height: 19px; }
.bs-hab b { min-width: 0; font-weight: 900; font-size: 13px; line-height: 1.15; }
/* lista: nome e, por baixo, a barrinha de XP */
.best-row .br-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.best-row .br-txt b { flex: none; }
.xp-mini { display: block; height: 4px; border-radius: 99px; background: rgba(0, 0, 0, 0.4); overflow: hidden; }
.xp-mini i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffe895, #ffcc33); }
/* Coleção: por mapa, os meus a cores e os outros a preto */
#best-col.page-body { display: block; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; padding-right: 4px; }
.col-total { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; }
.col-total .ic { width: 18px; height: 18px; color: var(--gold); }
.col-secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px 16px; }
.col-sec h4 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 18px; }
.col-sec h4 small { font-family: var(--body, sans-serif); font-size: 12px; font-weight: 900; color: var(--muted); }
.col-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.col-mon { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 8px; border-radius: 16px; min-width: 0; text-align: center; cursor: default;
  background: rgba(255, 255, 255, 0.03); border: 2px solid rgba(255, 255, 255, 0.07); }
.col-mon.tem { cursor: pointer; background: radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--tc) 30%, transparent), rgba(255, 255, 255, 0.03) 70%); border-color: color-mix(in srgb, var(--tc) 45%, transparent); }
.col-mon.tem:active { transform: scale(0.97); }
.col-foto { position: relative; width: 64px; height: 64px; border-radius: 16px; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tc) 40%, #1a1d40), #10122a); }
.col-foto img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.col-mon:not(.tem) .col-foto { background: #0c0e22; }
.col-mon:not(.tem) .col-foto img { filter: brightness(0) drop-shadow(0 0 1px rgba(255, 255, 255, 0.35)); opacity: 0.85; }
.col-mon b { max-width: 100%; font-family: var(--display); font-weight: 400; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-mon:not(.tem) b { color: var(--muted); letter-spacing: 0.1em; }
.col-mon small { font-size: 10.5px; font-weight: 800; color: var(--muted); }
.col-mon .xp-mini { width: 70%; }
/* o forte do mapa (ainda não se pode ter): moldura dourada e uma estrela */
.col-mon.forte { border-color: rgba(255, 204, 51, 0.35); background: radial-gradient(120% 120% at 50% 0%, rgba(255, 204, 51, 0.12), rgba(255, 255, 255, 0.02) 70%); }
.col-estrela { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #1a1f44; border: 2px solid rgba(255, 204, 51, 0.7); color: var(--gold); }
.col-estrela .ic { width: 12px; height: 12px; }
.col-info { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #1a1f44; border: 2px solid var(--tc, #8fa0ff); color: #fff; }
.col-info .ic { width: 12px; height: 12px; }
.col-rever { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px auto 2px; }
.col-intro { display: flex; gap: 8px; }
/* no Mundo: levar o monstro contigo */
.bv-levar, .bv-comigo { position: absolute; left: 8px; bottom: 8px; z-index: 2; width: 40px; height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center; }
.bv-levar { background: linear-gradient(180deg, #4fe2a6, #179a6c); color: #062a1d; border: 0; box-shadow: 0 3px 0 #0c5c41; cursor: pointer; }
.bv-comigo { background: radial-gradient(circle at 50% 35%, #ffe08a, #f0a92a); color: #5a3300; box-shadow: 0 0 0 2px rgba(255, 224, 138, 0.35), 0 0 14px rgba(255, 196, 70, 0.55); }
.bv-levar .ic, .bv-comigo .ic { width: 26px; height: 26px; stroke-width: 1.8; }
.bv-levar, .bv-comigo { width: 44px; height: 44px; }
.bv-info { width: 44px; height: 44px; }
.bv-info .ic { width: 24px; height: 24px; }
/* sala: quantos monstros faltam descobrir (no fim da lista) */
.sm-falta { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 2px; font-size: 12px; font-weight: 800; color: var(--muted); }
.sm-falta .ic { width: 16px; height: 16px; color: #4fe2a6; }
/* telemóvel ao alto: o monstro em cima; em baixo a lista e o nível/habilidades lado a lado */
@container app (orientation: portrait) {
  .best-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1.1fr); }
  .best-view { grid-column: 1 / -1; grid-row: 1; }
  .best-list { grid-row: 2; }
  .best-side { grid-row: 2; }
  .col-secs { grid-template-columns: 1fr; }
}
@container app (orientation: landscape) and (max-height: 560px) {
  .screen.page .bar { padding-top: max(6px, env(safe-area-inset-top, 0px)); padding-bottom: 6px; }
  .screen.page .bar .icon-btn { width: 36px; height: 36px; }
  .screen.page .bar h2 { font-size: 20px; }
  .best-row { padding: 3px 7px 3px 3px; gap: 7px; }
  .best-row img { width: 34px; height: 34px; }
  .best-row b { font-size: 14.5px; }
}

/* ---------- jogo: tipos fortes/fracos na aba Stats ---------- */
.panel.left .ip-stats .matchups { font-size: 10.5px; gap: 3px; margin-top: 2px; }
.panel.left .ip-stats .matchups .type-chip { font-size: 9.5px; padding: 0 6px; }
/* janelas com listas compridas: só a lista faz scroll */
#ov-swapmon .sm-grid, #ov-avatar .ava-list { max-height: min(60cqh, 520px); overflow: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 2px; }


/* =============================================================
   ECRÃ INICIAL (2026-10-30e): título em cima ao centro (também atrás
   da janela de entrada); botões colados às margens, da largura da
   palavra maior, para não taparem o avatar e os monstros.
   ============================================================= */
.menu-title { position: fixed; z-index: 11; left: 50%; top: max(8px, env(safe-area-inset-top, 0px)); transform: translateX(-50%); text-align: center; width: max-content; max-width: 94cqw; pointer-events: none; }
.menu-title .logo span { font-size: clamp(30px, 6cqw, 52px); }
.menu-title .hello { font-size: 15px; margin-top: 2px; }
.menu-title .hello:empty { display: none; }
body:not([data-screen="scr-menu"]):not([data-screen="scr-login"]) .menu-title { display: none; }
#scr-menu { overflow: hidden; pointer-events: none; background: linear-gradient(180deg, rgba(6, 8, 22, 0.4), transparent 20%); }
#scr-menu > * { pointer-events: auto; }
.menu-side { position: absolute; top: 50%; transform: translateY(-50%); display: grid; width: max-content; }
/* listas dos lados: à esquerda Loja/Amigos/Definições/Sair, à direita Rank/Conquistas/Monstros */
.menu-side { left: 0; gap: 5px; }
.menu-side.dir { left: auto; right: 0; }
.mlist { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px max(14px, env(safe-area-inset-left, 0px)); border-radius: 0 14px 14px 0; text-align: left; background: linear-gradient(180deg, rgba(40, 46, 96, 0.92), rgba(20, 24, 54, 0.92)); border: 1px solid var(--line); border-left: 0; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mlist b { font-weight: 900; font-size: 14.5px; white-space: nowrap; }
.mlist .ic { width: 20px; height: 20px; color: var(--gold); }
.mlist:active { transform: translateX(-2px); }
.mlist.out { margin-top: 5px; }
.mlist.out .ic { color: #ff9aaa; }
.menu-side.dir .mlist { flex-direction: row-reverse; text-align: right; border-radius: 14px 0 0 14px; border-left: 1px solid var(--line); border-right: 0; padding: 8px max(14px, env(safe-area-inset-right, 0px)) 8px 14px; }
.menu-side.dir .mlist:active { transform: translateX(2px); }
/* bolinha (Conquistas: há coisas novas) */
.mlist.novo::after { content: ''; position: absolute; top: 4px; left: 6px; width: 10px; height: 10px; border-radius: 50%; background: #ff4d6a; box-shadow: 0 0 0 2px #171a3e, 0 0 10px rgba(255, 77, 106, 0.8); animation: bolinha 1.6s ease-in-out infinite; }
/* em baixo ao centro: Mundo e Sala, os dois grandes (iguais na forma, cores diferentes) */
.menu-play { position: absolute; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom, 0px)); display: flex; gap: 12px; }
.menu-play .mbtn { flex-direction: row; align-items: center; gap: 12px; width: 236px; padding: 12px 16px 12px 14px; border: 0; border-radius: 20px; overflow: visible; }
.menu-play .mbtn > span { display: flex; flex-direction: column; min-width: 0; }
.menu-play .mbtn b { font-size: 25px; line-height: 1; white-space: nowrap; }
.menu-play .mbtn small { font-size: 11.5px; line-height: 1.2; margin-top: 3px; }
.menu-play .mbtn .mi { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.22); }
.menu-play .mbtn .mi .ic { width: 30px; height: 30px; }
.menu-play .mbtn.mundo { background: linear-gradient(135deg, #4fe2a6, #179a6c); color: #062a1d; box-shadow: 0 6px 0 #0c5c41, 0 16px 36px rgba(40, 200, 140, 0.32); }
.menu-play .mbtn.mundo small { color: #0b3a28; }
.menu-play .mbtn.sala { background: linear-gradient(135deg, #ffd04d, #ff8a1a); color: #3a1c00; box-shadow: 0 6px 0 #a05200, 0 16px 36px rgba(255, 140, 30, 0.32); }
.menu-play .mbtn.sala small { color: #5a2c00; }
.menu-play .mbtn:active { transform: translateY(3px); }
@container app (max-height: 430px) {
  .menu-play .mbtn { width: 206px; padding-block: 9px; }
  .menu-play .mbtn b { font-size: 21px; }
  .menu-play .mbtn small { font-size: 10.5px; }
  .menu-play .mbtn .mi { width: 38px; height: 38px; }
  .menu-play .mbtn .mi .ic { width: 25px; height: 25px; }
  .mlist { padding-block: 6px; }
  .mlist b { font-size: 13px; }
  .menu-side { gap: 3px; }
  .menu-title .hello { display: none; }
  .menu-title .logo span { font-size: 30px; }
}
/* telemóvel ao alto: Mundo e Sala em baixo, a toda a largura; as duas listas por cima, coladas às margens */
@container app (orientation: portrait) {
  #scr-menu { background: linear-gradient(180deg, rgba(6, 8, 22, 0.45), transparent 16%, transparent 60%, rgba(6, 8, 22, 0.55)); }
  .menu-play { left: 10px; right: 10px; transform: none; gap: 10px; }
  .menu-play .mbtn { flex: 1; width: auto; min-width: 0; padding: 12px 12px 12px 10px; gap: 9px; }
  .menu-play .mbtn b { font-size: 22px; }
  .menu-play .mbtn .mi { width: 38px; height: 38px; }
  .menu-play .mbtn .mi .ic { width: 25px; height: 25px; }
  .menu-side { top: auto; transform: none; bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 92px); }
}

/* ---------- janelas: todas com o mesmo formato ---------- */
.win {
  box-sizing: border-box; width: min(860px, 100%); max-height: 100%;
  background: linear-gradient(180deg, rgba(34, 40, 84, 0.97), rgba(18, 22, 48, 0.97));
  border: 1px solid var(--line); border-radius: 22px; padding: 14px 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: pop 0.22s ease-out; display: flex; flex-direction: column; overflow: hidden;
}
.win .mh { margin-bottom: 10px; flex: none; }
.win .mh h3 { font-size: 22px; }
.modal.win { width: min(560px, 100%); overflow: auto; }
.win.big { height: 100%; }
.screen.winscreen { display: grid; place-items: center; background: rgba(6, 8, 22, 0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); box-sizing: border-box; }
.winscreen .win.big { max-height: 640px; }
.winscreen .tabs { padding: 0 0 8px; }
.winscreen .page-body { padding: 0; flex: 1; min-height: 0; }
.winscreen .best-body { padding: 0; }
/* entrada: janela à frente do cenário, por baixo do título */
.screen.login-screen { display: grid; place-items: center; padding: calc(max(8px, env(safe-area-inset-top, 0px)) + 78px) 16px 16px; box-sizing: border-box; background: rgba(6, 8, 22, 0.25); }
.login-card { width: min(420px, 100%); gap: 10px; }
.login-card .login-opts, .login-card .login-form { display: flex; flex-direction: column; gap: 10px; }
.login-card .login-form[hidden], .login-card .login-opts[hidden] { display: none; }
@container app (max-height: 430px) {
  .screen.login-screen { padding-top: 56px; padding-bottom: 8px; }
  .login-card { padding: 10px 14px; }
  .login-card .mh { margin-bottom: 4px; }
  .login-card .mh h3 { font-size: 18px; }
  .login-card .lbtn { padding: 9px 12px; font-size: 14px; }
  .login-card .login-opts { gap: 7px; }
  .login-card .login-or { margin: -2px 0; }
  .login-card .login-form .muted { display: none; }
  .login-card .login-form .row-end { margin-top: 2px; }
}
/* conta */
.acc-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; align-items: start; }
.acc-ava { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.acc-stage { height: 200px; border-radius: 18px; background: radial-gradient(70% 70% at 50% 35%, #3a3a80, #12142e); }
.acc-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.acc-lbl { font-weight: 900; font-size: 13px; color: var(--muted); }
.acc-row { display: flex; gap: 8px; }
.acc-row .field { flex: 1; min-width: 0; }
.acc-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
@container app (max-width: 520px) { .acc-body { grid-template-columns: 1fr; } .acc-stage { height: 150px; } }
@container app (max-height: 430px) { .acc-stage { height: 150px; } .acc-body { grid-template-columns: 150px minmax(0, 1fr); } }
.winscreen .page-body { overflow: hidden; display: flex; flex-direction: column; }
/* janela do avatar com o telemóvel deitado: tudo à vista (o "Feito" incluído) */
@container app (orientation: landscape) and (max-height: 560px) {
  #ov-avatar .modal { padding: 10px 14px; }
  #ov-avatar .mh { margin-bottom: 6px; }
  #ov-avatar .ava-grid { grid-template-columns: 150px 1fr; }
  #ov-avatar .ava-big { min-height: 0; height: min(220px, 52cqh); }
  #ov-avatar .ava-list { max-height: min(220px, 52cqh); grid-template-columns: repeat(4, 1fr); }
  #ov-avatar .ava-card img { max-width: 64px; }
  #ov-avatar .row-end { margin-top: 8px; }
}

/* ---------- conta nova: escolher nome e avatar ---------- */
.pname { display: flex; gap: 12px; align-items: center; }
.pname-ava { position: relative; flex: none; width: 92px; height: 92px; border-radius: 18px; padding: 0; overflow: hidden; background: radial-gradient(70% 70% at 50% 35%, #3a3a80, #12142e); border: 1px solid var(--line); }
.pname-stage { position: absolute; inset: 0; }
.pname-ava .ic { position: absolute; right: 5px; bottom: 5px; width: 22px; height: 22px; padding: 3px; border-radius: 99px; background: rgba(0, 0, 0, 0.55); stroke: #fff; }
.pname-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pname-side .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ferr { margin: 0; color: #ff8a7a; font-weight: 800; font-size: 13px; }
.acc-linked { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); font-weight: 800; font-size: 13.5px; overflow: hidden; }
.acc-linked .ic { flex: none; width: 18px; height: 18px; stroke: #8ab4ff; }
.acc-linked span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container app (max-height: 430px) { .pname-ava { width: 72px; height: 72px; } .login-card #login-name-form .muted:not(#pname-who) { display: none; } }

.linkbtn { align-self: flex-start; padding: 2px 0; background: none; border: 0; color: #9fb4ff; font-weight: 800; font-size: 13px; text-decoration: underline; }
.linkbtn[hidden] { display: none; }
/* os meus dados (RGPD) na Conta, e o visto da idade e dos Termos na conta nova */
.acc-dados { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 2px; }
.acc-dados .linkbtn { font-size: 12.5px; }
.linkbtn.perigo { color: #ff8a9b; }
.aceito { display: flex; align-items: flex-start; gap: 8px; font: 700 13px/1.35 var(--body); color: var(--text, #fff); cursor: pointer; }
.aceito[hidden] { display: none; }
.aceito input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--green, #3ad17a); }
.aceito a { color: #9fb4ff; }
@container app (max-height: 430px) { #login-acc-form .linkbtn { margin-top: -4px; } }

/* palavra-passe com o olho sempre à vista (o do browser fica escondido) */
.pwf { position: relative; display: flex; }
.pwf[hidden] { display: none; }
.pwf .field { flex: 1; min-width: 0; padding-right: 44px; }
.pwf input::-ms-reveal, .pwf input::-ms-clear { display: none; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 0; border-radius: 10px; padding: 0; }
.pw-eye .ic { width: 20px; height: 20px; stroke: var(--muted); }
.pw-eye[aria-pressed="true"] .ic { stroke: #fff; }
.acc-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; }
#acc-pass { align-self: flex-start; }
#acc-pass[hidden] { display: none; }
#ov-pass .modal { width: min(380px, calc(100cqw - 32px)); }
@container app (max-height: 430px) { #ov-pass .login-form { gap: 7px; } #ov-pass .modal { padding: 10px 14px; } }

#lobby-note.ranked { color: #ffe07a; }

.rk-elo { display: flex; align-items: baseline; gap: 8px; }
.rk-elo b { font-family: 'Lilita One', sans-serif; font-size: 40px; line-height: 1; color: #ffe07a; }
.rk-elo small { font-weight: 900; color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }

/* ===== Dificuldade dos bots (3 estrelas) ===== */
.ob-stars { display: flex; gap: 1px; flex: none; color: var(--gold); }
.star { display: inline-grid; place-items: center; color: var(--gold); }
.star .ic { width: 13px; height: 13px; stroke-width: 2; }
.star.on .ic path { fill: currentColor; }
.star:not(.on) { color: rgba(255, 255, 255, 0.35); }
.lobby-opts.n4 { grid-template-columns: 1fr 1fr; }
.modal.diff-pick { width: min(420px, 100%); }
.diff-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 4px 0 10px; }
.diff-lbl { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.diff-stars { display: flex; gap: 6px; }
.diff-stars .star.big { width: 64px; height: 64px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); border: 2px solid transparent; }
.diff-stars .star.big[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 208, 77, 0.12); }
.diff-stars .star.big .ic { width: 40px; height: 40px; stroke-width: 1.6; }
.diff-stars .star.big:active { transform: scale(0.94); }
.diff-name { font-family: var(--display); font-weight: 400; font-size: 26px; }
.diff-desc { font-size: 13px; color: #d6d2ee; line-height: 1.4; margin: 0; min-height: 3.6em; }
.diff-note { font-size: 11px; color: var(--muted); margin: 0; }
@container app (orientation: landscape) and (max-height: 560px) {
  .lobby-opts.n4 { grid-template-columns: 1fr; }
  .diff-stars .star.big { width: 52px; height: 52px; }
  .diff-stars .star.big .ic { width: 32px; height: 32px; }
  .diff-desc { min-height: 0; }
}

/* =============================================================
   SALA (2026-10-31): os retratos dos monstros nunca saem do lugar.
   O quadrado 2×2 tira o tamanho do espaço livre (container query na
   .seat-stage), não da imagem — antes, quando a imagem (512 px)
   carregava, o quadrado crescia por cima do "pronto" e dos outros
   lugares (no PC sempre; no telemóvel às vezes, conforme o carregamento).
   ============================================================= */
.seat-stage { container-type: size; width: 100%; }
.seat-mons, .seat-mons.n4 {
  width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); max-width: none; max-height: none; aspect-ratio: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
}
.seat-mons.n2 { width: min(100cqw, 200cqh); height: min(50cqw, 100cqh); grid-template-rows: minmax(0, 1fr); }
.seat-mons .sm { position: relative; min-width: 0; min-height: 0; }
.seat-mons .sm img { position: absolute; inset: 0; width: 100%; height: 100%; }

/* rank: só "Rank Sim/Não" na barra de cima (tocar diz porquê) */
.rank-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 7px; border-radius: 99px; flex: none; cursor: pointer;
  font-size: 11.5px; font-weight: 900; color: var(--muted); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
}
.rank-pill .ic { width: 15px; height: 15px; }
.rank-pill b { font-weight: 900; color: #ff9aaa; }
.rank-pill.on { border-color: color-mix(in srgb, var(--gold) 55%, transparent); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.rank-pill.on .ic, .rank-pill.on b { color: var(--gold); }
#scr-lobby .bar h2 { flex: none; }
#scr-lobby .bar .rank-pill { margin-right: auto; }

/* trocar monstro: painel do lado esquerdo, a sala fica à vista */
.overlay.side-left { place-items: stretch start; padding: 0; background: rgba(6, 8, 20, 0.35); }
.modal.side {
  width: min(330px, 88cqw); height: 100%; max-height: none; display: flex; flex-direction: column; border-radius: 0 20px 20px 0;
  padding: max(10px, env(safe-area-inset-top, 0px)) 10px max(10px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  animation: slideL 0.2s ease-out;
}
.modal.side .mh { margin-bottom: 8px; }
.modal.side .mh h3 { font-size: 19px; }
@keyframes slideL { from { transform: translateX(-30px); opacity: 0; } }
#ov-swapmon .sm-grid { flex: 1; min-height: 0; max-height: none; grid-template-columns: 1fr; gap: 6px; align-content: start; }
#ov-swapmon .sm-row { position: relative; }
#ov-swapmon .sm-row .sm-opt { width: 100%; box-sizing: border-box; }
#ov-swapmon .sm-row .info { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.4); }
#ov-swapmon .sm-row .info .ic { width: 19px; height: 19px; }
#ov-swapmon .sm-opt { flex-direction: row; align-items: center; gap: 10px; padding: 5px 46px 5px 5px; text-align: left; border-radius: 13px;
  background: radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--tc) 30%, transparent), rgba(255, 255, 255, 0.04) 65%); }
#ov-swapmon .sm-opt img { width: 50px; height: 50px; flex: none; border-radius: 11px; object-fit: cover; filter: none; background: rgba(0, 0, 0, 0.25); }
#ov-swapmon .so-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#ov-swapmon .so-row { display: flex; align-items: center; gap: 6px; }
#ov-swapmon .so-row em { font-style: normal; font-size: 10px; font-weight: 900; color: var(--muted); }
#ov-swapmon .sm-opt.team { opacity: 0.8; border-color: rgba(255, 255, 255, 0.12); }
#ov-swapmon .sm-opt.cur { border-color: var(--gold); }
#ov-swapmon .sm-opt.cur em { color: var(--gold); }
@container app (max-height: 430px) {
  #ov-swapmon .sm-opt img { width: 42px; height: 42px; }
  #ov-swapmon .sm-opt small { display: none; }
}
.overlay.side-left { backdrop-filter: none; -webkit-backdrop-filter: none; }
/* de pé a barra é estreita: o rank fica só com o ícone e Sim/Não, e o código mais pequeno */
@container app (orientation: portrait) {
  .rank-pill > span { display: none; }
  .rank-pill { padding: 4px 8px 4px 6px; }
  #scr-lobby .bar { gap: 8px; }
  #scr-lobby .code-box b { font-size: 22px; letter-spacing: 0.12em; }
}
/* telemóveis pequenos deitados: a ficha do monstro não sai pela direita
   e os 9 avatares cabem sem scroll (2 filas de 5) */
.mdt-skills { min-width: 0; }
@container app (orientation: landscape) and (max-height: 560px) {
  .mdt-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mdt-skills .sk { min-width: 0; }
  .mdt-skills .sk-txt { min-width: 0; }
  .mdt-skills .sk-txt b { padding-right: 0; }
}
@container app (max-width: 700px) and (orientation: landscape) and (max-height: 400px) {
  .mdt-grid { grid-template-columns: 170px minmax(0, 1fr); }
  #ov-avatar .ava-list { max-height: none; gap: 6px; grid-template-columns: repeat(5, 1fr); }
  #ov-avatar .ava-card img { width: 52px; height: 52px; }
  #ov-avatar .ava-card { padding: 4px; }
}

/* ===== CONQUISTAS (js/ui/conquistas.js) ===== */
/* só a lista anda (a janela, os separadores e o jogador ficam) */
.ach-title { display: flex; align-items: center; gap: 8px; }
.ach-title .mi { width: 26px; height: 26px; color: var(--gold); filter: drop-shadow(0 0 8px rgba(255, 208, 77, 0.55)); }
.ach-title .mi svg { width: 100%; height: 100%; }
.ach-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.ach-tabs .mi { width: 16px; height: 16px; display: inline-flex; }
.ach-tabs .mi svg { width: 100%; height: 100%; }
#conq-body { display: flex; flex-direction: column; }
#conq-body .note { margin: 12px 16px; }
.ach-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; display: flex; flex-direction: column; gap: 6px; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
.xp-barra { display: block; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.xp-barra i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7dffb0, var(--bc, #4dd2ff)); }
/* o jogador: avatar, nome, nível e a barra de XP à frente */
.ach-player { display: flex; align-items: center; gap: 12px; margin: 2px max(16px, env(safe-area-inset-right, 0px)) 4px max(16px, env(safe-area-inset-left, 0px)); padding: 8px 14px 8px 8px; border-radius: 18px; flex: none;
  background: linear-gradient(100deg, rgba(255, 208, 77, 0.14), rgba(77, 210, 255, 0.08) 60%, rgba(255, 255, 255, 0.03)); border: 1px solid rgba(255, 208, 77, 0.22); }
.ach-player[hidden] { display: none; }
.ach-ava { flex: none; width: 46px; height: 46px; border-radius: 50%; padding: 2px; background: conic-gradient(var(--gold), #ff9d3d, var(--gold)); box-shadow: 0 0 12px rgba(255, 208, 77, 0.35); }
.ach-ava img { width: 100%; height: 100%; border-radius: 50%; background: #2a2f66; object-fit: cover; display: block; }
.ach-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 34%; }
.ach-who b { font-weight: 900; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ach-lv { align-self: flex-start; padding: 1px 8px; border-radius: 99px; font-weight: 900; font-size: 12px; color: #3a2200; background: var(--gold); white-space: nowrap; }
.ach-lvbar { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ach-lvbar .xp-barra { height: 10px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4); }
.ach-lvbar .xp-barra i { box-shadow: 0 0 10px rgba(77, 210, 255, 0.5); }
.ach-lvbar small { align-self: flex-end; font-size: 11px; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }
/* uma conquista por linha */
.ach-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(110px, 180px) 74px; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; flex: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ac) 12%, transparent), rgba(255, 255, 255, 0.04) 40%); box-shadow: inset 3px 0 0 var(--ac); }
.ach-row.zero { background: rgba(255, 255, 255, 0.04); box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.12); }
.ach-row.zero .ach-ic, .ach-row.zero .ach-txt b { opacity: 0.7; }
.ach-row.feito { background: linear-gradient(90deg, rgba(255, 208, 77, 0.16), rgba(255, 208, 77, 0.05)); }
.ach-ic { display: flex; align-items: center; gap: 4px; }
.ach-ic svg { flex: none; }
.ach-row:not(.zero) .ach-med { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--ac) 70%, transparent)); }
.ach-mon { width: 26px; height: 26px; border-radius: 50%; background: #2a2f66; }
.ach-txt { display: flex; flex-direction: column; min-width: 0; }
.ach-txt b { font-weight: 900; font-size: 14.5px; line-height: 1.2; }
.ach-txt small { font-size: 11.5px; font-weight: 700; color: var(--muted); line-height: 1.25; }
.ach-prog { display: flex; flex-direction: column; gap: 3px; }
.ach-prog small { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 10.5px; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ach-pts { display: inline-flex; gap: 3px; }
.ach-pts i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); }
.ach-pts i.on { background: var(--pc); box-shadow: 0 0 4px var(--pc); }
.ach-xp { justify-self: end; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px 3px 5px; border-radius: 99px; font-size: 11px; font-weight: 900; white-space: nowrap; color: var(--pc, #7dffb0); background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 1px var(--pc, #7dffb0); }
.ach-xp .mi { width: 12px; height: 12px; display: inline-flex; }
.ach-xp .mi svg { width: 100%; height: 100%; }
.ach-xp.done { color: #7dffb0; box-shadow: none; background: rgba(125, 255, 176, 0.12); padding: 4px; }
.ach-xp.done .mi { width: 16px; height: 16px; }
@media (max-height: 460px) {
  .ach-player { padding: 4px 12px 4px 4px; gap: 10px; margin-bottom: 2px; }
  .ach-ava { width: 36px; height: 36px; }
  .ach-who { flex-direction: row; align-items: center; gap: 8px; max-width: 45%; }
  .ach-lvbar .xp-barra { height: 8px; }
  .ach-list { padding-top: 6px; }
}
@media (max-width: 560px) {
  .ach-row { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 5px; }
  .ach-prog { grid-column: 2 / 4; grid-row: 2; }
  .ach-tabs button span { display: none; }
  .ach-tabs button[aria-selected="true"] span { display: inline; }
  .ach-who { max-width: 40%; }
}

/* missões diárias */
.mis-topo { display: flex; align-items: center; gap: 10px; padding: 2px 2px 4px; flex-wrap: wrap; flex: none; }
.mis-topo b { font-weight: 900; font-size: 15px; margin-right: auto; }
.mis-topo .mi { width: 14px; height: 14px; display: inline-flex; }
.mis-topo .mi svg { width: 100%; height: 100%; }
.mis-muda, .mis-seq { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 900; color: var(--muted); padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); }
.mis-seq.on { color: #ffb15c; background: rgba(255, 140, 60, 0.14); }
/* o prémio dos 30 dias (avatar exclusivo) */
.mis-premio { border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--ac) 16%, transparent), transparent 70%); }
.mis-ic.mis-premio-foto { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; padding: 0; border: 2px solid var(--ac); }
.mis-ic.mis-premio-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mis-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--pc, var(--muted)); background: color-mix(in srgb, var(--pc, #888) 16%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--pc, #888) 60%, transparent); }
.mis-ic .mi { width: 16px; height: 16px; display: inline-flex; }
.mis-ic .mi svg { width: 100%; height: 100%; }
.mis-row.fechada .mis-ic { color: var(--muted); --pc: #888; }
.mis-troca { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: auto; border-radius: 50%; color: var(--text, #fff); background: rgba(255, 255, 255, 0.1); }
.mis-troca .mi { width: 13px; height: 13px; display: inline-flex; }
.mis-troca .mi svg { width: 100%; height: 100%; }
.mis-pe { margin: 4px 2px 0; font-size: 11px; font-weight: 700; color: var(--muted); flex: none; }

/* moedas e Baú (js/data/loja.js) */
.ach-lvrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ach-coins { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px 1px 4px; border-radius: 99px; font-weight: 900; font-size: 12px; color: #ffcc33; background: rgba(255, 204, 51, 0.12); white-space: nowrap; }
.ach-coins .mi, .xp-moedas .mi { width: 14px; height: 14px; display: inline-flex; }
.ach-coins .mi svg, .xp-moedas .mi svg { width: 100%; height: 100%; }
.bau-rev { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(5, 6, 20, 0.72); backdrop-filter: blur(3px); }
.bau-card .loja-rar { position: static; }
.bau-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 26px; border-radius: 22px; background: linear-gradient(180deg, #2c3270, #171a3e); border: 1px solid color-mix(in srgb, var(--rc, #ffcc33) 55%, transparent); box-shadow: 0 0 40px color-mix(in srgb, var(--rc, #ffcc33) 35%, transparent); animation: bau-in 0.5s cubic-bezier(.2, 1.4, .4, 1); }
.bau-card small { font-weight: 900; color: #ffcc33; letter-spacing: 0.04em; text-transform: uppercase; font-size: 12px; }
.bau-card b { font-family: var(--display); font-weight: 400; font-size: 28px; }
.bau-foto { width: 120px; height: 120px; border-radius: 50%; padding: 3px; background: conic-gradient(var(--gold), #ff9d3d, #c58bff, var(--gold)); box-shadow: 0 0 30px rgba(255, 204, 51, 0.5); }
.bau-foto img { width: 100%; height: 100%; border-radius: 50%; background: #2a2f66; display: block; }
.bau-acoes { display: flex; gap: 10px; margin-top: 4px; }
@keyframes bau-in { from { transform: scale(0.6) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
/* avatares do Baú no escolhedor */
.ava-card { position: relative; }
.ava-card.bloq img { filter: grayscale(0.9) brightness(0.5); }
.ava-card.bloq span { opacity: 0.6; }
.ava-lock { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #ffcc33; display: inline-flex; }
.ava-lock[hidden] { display: none; }
.ava-lock svg { width: 100%; height: 100%; }
@media (max-width: 560px) {
  }

/* ===== LOJA (js/ui/loja.js) ===== */
#loja-body { display: flex; flex-direction: column; position: relative; }
#loja-body .note { margin: 12px 16px; }
.loja-moedas { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 5px; border-radius: 99px; font-weight: 900; font-size: 13px; color: #ffcc33; background: rgba(255, 204, 51, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 204, 51, 0.3); font-variant-numeric: tabular-nums; }
.loja-moedas[hidden] { display: none; }
.loja-moedas + .icon-btn { margin-left: 0; }
.loja-moedas .mi, .loja-buy .mi, .loja-av .preco .mi, .loja-av .ok .mi, .loja-done .mi, .chip-coins .mi { width: 15px; height: 15px; display: inline-flex; }
.loja-moedas .mi svg, .loja-buy .mi svg, .loja-av .mi svg, .loja-done .mi svg, .chip-coins .mi svg, .loja-bau-ic .mi svg, .loja-vazio .mi svg { width: 100%; height: 100%; }
.loja-pag { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; display: flex; flex-direction: column; gap: 10px; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
/* baús: um cartão por baú */
.loja-bau { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; flex: none; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 204, 51, 0.2), transparent 55%), linear-gradient(180deg, rgba(60, 54, 120, 0.55), rgba(26, 28, 66, 0.6)); border: 1px solid rgba(255, 204, 51, 0.3); }
.loja-bau.breve { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); }
.loja-bau.breve .loja-bau-ic { color: #c58bff; box-shadow: none; filter: saturate(0.6); }
.loja-bau-ic { flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; color: #ffcc33; background: rgba(0, 0, 0, 0.28); box-shadow: 0 0 22px rgba(255, 204, 51, 0.35); }
.loja-bau-ic .mi { width: 40px; height: 40px; display: inline-flex; }
.loja-bau:not(.breve) .loja-bau-ic .mi { animation: loja-bob 2.4s ease-in-out infinite; }
@keyframes loja-bob { 50% { transform: translateY(-3px) rotate(-3deg); } }
.loja-bau-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.loja-bau-txt b { font-weight: 900; font-size: 16px; }
.loja-bau-txt small { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.loja-hips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.loja-hip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 2px; border-radius: 99px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, 0.28); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 55%, transparent); }
.loja-hip img { width: 20px; height: 20px; border-radius: 50%; background: #2a2f66; }
.loja-hip b { font-size: 11px; color: var(--rc); }
.loja-falta { color: #ff9d5c !important; }
.loja-buy { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.loja-buy[disabled] { opacity: 0.45; }
.loja-done, .loja-breve { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 900; color: #7dffb0; white-space: nowrap; }
.loja-breve { color: var(--muted); padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); }
/* avatares: grelha; os bloqueados com a cor da raridade */
.loja-avs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; flex: none; }
.loja-av { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px 10px; border-radius: 16px; color: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc, #7dffb0) 14%, rgba(255, 255, 255, 0.04)), rgba(255, 255, 255, 0.03)); border: 1px solid color-mix(in srgb, var(--rc, #ffffff) 22%, transparent); transition: transform 0.12s; }
.loja-av:active { transform: scale(0.96); }
.loja-av img { width: 76px; height: 76px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #4a4f9a, #1a1d40); }
.loja-av.bloq img { filter: grayscale(0.55) brightness(0.7); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rc) 70%, transparent); }
.loja-av.uso { border-color: #7dffb0; box-shadow: 0 0 14px rgba(125, 255, 176, 0.25); }
.loja-av b { font-weight: 900; font-size: 13.5px; }
.loja-av small { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 900; color: var(--muted); }
.loja-av small.ok { color: #7dffb0; }
.loja-av small.preco { color: #ffcc33; }
.loja-rar { position: absolute; top: 6px; left: 6px; padding: 1px 7px; border-radius: 99px; font-size: 9.5px; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; color: #10122a; background: var(--rc); }
/* um avatar em grande, em 3D */
.loja-ver { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(5, 6, 20, 0.72); backdrop-filter: blur(3px); padding: 12px; }
.loja-ver-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 14px; width: min(560px, 100%); max-height: 100%; padding: 14px 18px; border-radius: 22px;
  background: radial-gradient(90% 90% at 25% 40%, color-mix(in srgb, var(--rc, #7dffb0) 30%, transparent), transparent 70%), linear-gradient(180deg, #2c3270, #171a3e); border: 1px solid color-mix(in srgb, var(--rc, #7dffb0) 50%, transparent); box-shadow: 0 0 40px color-mix(in srgb, var(--rc, #7dffb0) 25%, transparent); animation: bau-in 0.35s cubic-bezier(.2, 1.3, .4, 1); }
.loja-ver-x { position: absolute; top: 8px; right: 8px; z-index: 2; }
.loja-ver-stage { height: min(320px, 62cqh); min-height: 180px; }
.loja-ver-info { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.loja-ver-info .loja-rar { position: static; font-size: 11px; padding: 2px 10px; }
.loja-ver-info b { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; }
.loja-ver-info small { font-size: 12px; font-weight: 700; color: var(--muted); }
.loja-ver-info .btn { margin-top: 6px; }
/* a escada do login diário (js/ui/escada.js) */
.esc-card { box-sizing: border-box; position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(640px, 100%); max-height: 100%; overflow: auto; padding: 16px 18px; border-radius: 22px; text-align: center;
  background: radial-gradient(80% 70% at 85% 30%, rgba(255, 90, 74, 0.22), transparent 70%), linear-gradient(180deg, #2c3270, #171a3e); border: 1px solid rgba(255, 204, 51, 0.45); box-shadow: 0 0 40px rgba(255, 204, 51, 0.22); animation: bau-in 0.4s cubic-bezier(.2, 1.3, .4, 1); }
.esc-tit { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; }
.esc-msg { font-size: 13px; font-weight: 800; color: #ffcc33; }
.esc-info { font-size: 11.5px; font-weight: 700; color: var(--muted); max-width: 460px; }
.esc-degraus { display: flex; align-items: flex-end; gap: 5px; width: 100%; height: min(190px, 42cqh); min-height: 130px; padding: 4px 2px 0; }
.esc-deg { position: relative; flex: 1 1 0; min-width: 0; height: var(--h); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 4px 2px 6px; border-radius: 10px 10px 4px 4px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); color: var(--muted); }
.esc-deg .esc-n { position: absolute; top: 3px; left: 0; right: 0; font-size: 10px; font-weight: 900; opacity: 0.7; }
.esc-deg .mi { width: 18px; height: 18px; display: inline-flex; color: #ffcc33; opacity: 0.55; }
.esc-deg small { font-size: 10.5px; font-weight: 900; }
.esc-deg.ganho { border-color: rgba(255, 204, 51, 0.35); }
.esc-deg.feito { background: linear-gradient(180deg, rgba(125, 255, 176, 0.28), rgba(125, 255, 176, 0.1)); border-color: rgba(125, 255, 176, 0.55); color: #fff; }
.esc-deg.feito .mi { opacity: 1; }
.esc-deg.hoje { box-shadow: 0 0 0 2px #7dffb0, 0 0 16px rgba(125, 255, 176, 0.5); animation: esc-pulsa 1.6s ease-in-out infinite; }
.esc-deg.ultimo { flex: 1.9 1 0; height: 100%; background: radial-gradient(90% 60% at 50% 40%, rgba(255, 90, 74, 0.35), rgba(255, 204, 51, 0.08)); border-color: rgba(255, 90, 74, 0.6); overflow: hidden; }
.esc-deg.ultimo::before { content: ''; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 20deg, rgba(255, 220, 120, 0.18) 30deg, transparent 40deg 80deg, rgba(255, 220, 120, 0.18) 90deg, transparent 100deg 140deg, rgba(255, 220, 120, 0.18) 150deg, transparent 160deg); animation: esc-raios 9s linear infinite; pointer-events: none; }
.esc-av { position: relative; display: block; width: 100%; flex: 1 1 auto; min-height: 70px; }
.esc-nome { position: relative; color: #ffcc33; }
.esc-recolher { animation: esc-pulsa 1.4s ease-in-out infinite; }
@keyframes esc-pulsa { 50% { transform: scale(1.05); } }
@keyframes esc-raios { to { transform: rotate(360deg); } }
@media (max-width: 480px) { .esc-card { padding: 14px 10px; } .esc-degraus { gap: 3px; } .esc-deg small { font-size: 9.5px; } .esc-deg .mi { width: 15px; height: 15px; } .esc-deg.ultimo { flex-grow: 2.2; } }
@media (max-height: 460px) { .esc-tit { font-size: 22px; } .esc-card { gap: 5px; padding: 10px 14px; } .esc-degraus { min-height: 110px; } }
.loja-vazio { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 16px; text-align: center; color: var(--muted); }
.loja-vazio .mi { width: 54px; height: 54px; display: inline-flex; color: #c58bff; opacity: 0.8; }
.loja-vazio b { font-weight: 900; font-size: 18px; color: var(--text, #fff); }
.loja-vazio small { font-size: 12.5px; font-weight: 700; max-width: 320px; }
@media (max-width: 560px) {
  .loja-bau { flex-wrap: wrap; }
  .loja-bau .loja-buy { width: 100%; justify-content: center; }
  .loja-ver-card { grid-template-columns: 1fr; justify-items: center; }
  .loja-ver-info { align-items: center; text-align: center; }
  .loja-ver-stage { width: 100%; height: 38cqh; }
}
@media (max-height: 460px) { .loja-bau { padding: 10px 12px; } .loja-bau-ic { width: 50px; height: 50px; } .loja-bau-ic .mi { width: 32px; height: 32px; } }
/* Conta: o cartão do jogador em cima */
.acc-player { margin: 0 0 12px; }
/* moedas no canto do menu, ao pé do nível */
.player-chip small { display: inline-flex; align-items: center; gap: 8px; }
.chip-coins { display: inline-flex; flex-direction: row; align-items: center; gap: 3px; color: #ffcc33; }
.chip-coins[hidden] { display: none; }
.chip-coins .mi { width: 12px; height: 12px; }
.chip-coins em { font-style: normal; font-variant-numeric: tabular-nums; }

/* ===== jogador no canto do menu (avatar, nome, nível): abre a Conta ===== */
.player-chip { position: fixed; z-index: 12; left: max(10px, env(safe-area-inset-left, 0px)); top: max(10px, env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: linear-gradient(180deg, rgba(40, 46, 96, 0.92), rgba(20, 24, 54, 0.92)); border: 1px solid var(--line); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); text-align: left; max-width: 46cqw; }
.player-chip img { width: 36px; height: 36px; border-radius: 50%; background: #2a2f66; flex: none; object-fit: cover; }
.player-chip > span { display: flex; flex-direction: column; min-width: 0; }
.player-chip b { font-weight: 900; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-chip small { font-size: 11px; font-weight: 900; color: var(--gold); white-space: nowrap; }
.player-chip:active { transform: scale(0.97); }
@media (max-aspect-ratio: 1/1) { .player-chip { top: max(62px, calc(env(safe-area-inset-top, 0px) + 54px)); } }

/* ===== aro e emblema da liga (prestígio; MB.LigaUI.aro / retrato) ===== */
.aro { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; padding: 2px; background: rgba(255, 255, 255, 0.14); }
.aro[class*="aro-"] { padding: 3px; background: conic-gradient(from 210deg, var(--a1), var(--a2), var(--a1), var(--a2), var(--a1)); box-shadow: 0 0 10px color-mix(in srgb, var(--a1) 45%, transparent); }
.aro > img { display: block; border-radius: 50%; }
.aro.aro-colocacao { box-shadow: none; }
.aro.aro-mestre, .aro.aro-campeao { box-shadow: 0 0 14px color-mix(in srgb, var(--a1) 60%, transparent); }
.aro.aro-lenda, .aro.aro-eclipse { animation: aro-lenda 2.6s ease-in-out infinite; }
@keyframes aro-lenda { 50% { box-shadow: 0 0 20px color-mix(in srgb, var(--a1) 85%, transparent), 0 0 4px #fff6d0; } }
/* moldura da liga (MB.LigaUI.moldura): coroa em SVG por cima do retrato */
.aro.moldura { padding: 0; background: none; box-shadow: none; overflow: visible; animation: none; }
.aro.moldura > img { position: relative; z-index: 0; }
.moldura-svg { position: absolute; z-index: 1; left: -30%; top: -30%; width: 160%; height: 160%; overflow: visible; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)); }
.moldura-svg.mo-mestre { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 4px rgba(127, 240, 221, 0.45)); }
.moldura-svg.mo-campeao { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 6px rgba(214, 168, 255, 0.6)); }
.moldura-svg.mo-lenda { animation: mo-lenda 2.6s ease-in-out infinite; }
.moldura-svg.mo-eclipse { animation: mo-eclipse 3.4s ease-in-out infinite; }
@keyframes mo-eclipse { 0%, 100% { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 6px rgba(255, 240, 192, 0.55)); } 50% { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 13px rgba(200, 180, 255, 0.95)); } }
@keyframes mo-lenda { 0%, 100% { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 5px rgba(255, 179, 107, 0.6)); } 50% { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 11px rgba(255, 210, 120, 0.95)); } }
/* no canto do menu */
.player-chip { padding-left: 8px; }
.player-chip > .aro img { width: 32px; height: 32px; }
.player-chip > .aro.aro-lenda, .player-chip > .aro.aro-eclipse, .player-chip > .aro.aro-campeao { margin: 0 2px; }
.chip-liga { display: inline-flex; line-height: 0; margin-right: -3px; }
.chip-liga[hidden] { display: none; }
/* cartão do jogador (Conta) */
.ach-ava.com-aro { background: none; box-shadow: none; padding: 0; overflow: visible; }
.ach-ava > .aro { width: 100%; height: 100%; }
.ach-ava > .aro img { width: 100%; height: 100%; object-fit: cover; background: #2a2f66; }
.ach-player:has(.com-aro) { padding-left: 14px; }
.ach-liga { font-size: 11px; font-weight: 900; color: var(--muted); }
/* sala: a moldura no retrato, a borda do cartão na cor da liga e o crachá em baixo ao meio */
.seat-ava > .aro { width: 100%; height: 100%; }
.seat-ava > .aro img { width: 100%; height: 100%; object-fit: cover; }
.seat-ava.com-moldura { overflow: visible; background: none; box-shadow: none; width: min(64px, 46%); }
.seat-ava.com-moldura > .aro img { border-radius: 50%; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--tc) 55%, #fff), color-mix(in srgb, var(--tc) 40%, #10122a)); }
.seat.com-liga, .seat.mine.com-liga { border: 2px solid var(--lc); box-shadow: 0 0 0 1px color-mix(in srgb, var(--lc2) 70%, transparent), 0 0 16px color-mix(in srgb, var(--lc) 30%, transparent), inset 0 0 22px color-mix(in srgb, var(--lc) 12%, transparent); }
.seat.com-liga { padding-bottom: 18px; }
.seat-ava.com-moldura { margin-top: 12px; }
.seat-liga { position: absolute; z-index: 3; left: 50%; bottom: -14px; transform: translateX(-50%); line-height: 0; pointer-events: auto; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.seat-liga .liga-badge { display: block; }
/* classificação */
.rk-row .who .aro { padding: 2px; }
.rk-row .who .aro img { width: 26px; height: 26px; }
/* Loja: emotes */
.loja-hip.em i { font-style: normal; font-size: 14px; width: 20px; text-align: center; }
.loja-bau.emotes .loja-bau-ic { color: #c58bff; box-shadow: 0 0 22px rgba(197, 139, 255, 0.35); }
.loja-bau.emotes { background: radial-gradient(120% 140% at 0% 0%, rgba(197, 139, 255, 0.22), transparent 55%), linear-gradient(180deg, rgba(60, 54, 120, 0.55), rgba(26, 28, 66, 0.6)); border-color: rgba(197, 139, 255, 0.3); }
.loja-av.emo .emo-ic { font-size: 44px; line-height: 76px; height: 76px; }
.loja-av.emo.bloq .emo-ic { filter: grayscale(0.6) brightness(0.8); }
.emo-grande { display: grid; place-items: center; }
.emo-grande > span { font-size: min(130px, 30cqh); line-height: 1; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45)); animation: loja-bob 2.4s ease-in-out infinite; }
.bau-foto.emo-grande > span { font-size: 64px; }
.emo-ensaio { position: relative; }
.emo-ensaio-ic { position: absolute; top: 8px; left: 10px; font-size: 40px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45)); animation: loja-bob 2.4s ease-in-out infinite; pointer-events: none; }

/* Baús: hipóteses por raridade (uma etiqueta por cor) */
.loja-hip.rar { padding: 3px 9px 3px 6px; gap: 6px; }
.loja-hip.rar i { width: 12px; height: 12px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 8px var(--rc); }
.loja-hip.rar b { color: #fff; }
/* emotes: Equipar */
.loja-av small.equipar { color: #10122a; background: #ffd04d; padding: 2px 10px; border-radius: 99px; }
/* a roda para escolher o lugar de um emote */
.emo-roda-pop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(340px, 100%); max-height: 100%; padding: 16px 16px 14px; border-radius: 22px; text-align: center;
  background: linear-gradient(180deg, #2c3270, #171a3e); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); animation: bau-in 0.3s cubic-bezier(.2, 1.3, .4, 1); }
.emo-roda-pop > b { font-weight: 900; font-size: 15px; padding: 0 44px; }
.emo-roda-pop small { font-size: 11.5px; font-weight: 700; }
.emo-roda-circ { position: relative; width: min(230px, 50cqh, 70cqw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 30%, rgba(0, 0, 0, 0.25) 31%, rgba(0, 0, 0, 0.25) 70%, rgba(255, 255, 255, 0.04) 71%); border: 2px solid rgba(255, 255, 255, 0.12); flex: none; }
.emo-roda-meio { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 40px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.emo-lugar { position: absolute; width: 31%; aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: inherit;
  background: linear-gradient(180deg, #3b4290, #232861); border: 2px solid rgba(255, 255, 255, 0.2); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); transform: translate(-50%, -50%); }
.emo-lugar i { font-style: normal; font-size: 24px; line-height: 1; }
.emo-lugar small { font-size: 9px !important; font-weight: 800; color: var(--muted); max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emo-lugar.cima { left: 50%; top: 16%; } .emo-lugar.dir { left: 84%; top: 50%; } .emo-lugar.baixo { left: 50%; top: 84%; } .emo-lugar.esq { left: 16%; top: 50%; }
.emo-lugar:hover, .emo-lugar:focus-visible { border-color: #ffd04d; }
.emo-lugar:active { transform: translate(-50%, -50%) scale(0.93); }
.emo-lugar.este { border-color: #7dffb0; box-shadow: 0 0 14px rgba(125, 255, 176, 0.4); }

/* ======================================================
   SALA (2026-11-07): 1v1 / 2v2 em cima, os 4 modos à direita (um de
   cada vez), tempo e mapa por baixo das equipas e, na equipa sem
   ninguém, "Procurar adversário" (ranked / amigável).
   ============================================================= */
#scr-lobby .bar h2 { flex: none; }
#scr-lobby .bar .rank-pill { margin-right: 0; }
.fmt-tog { margin: 0 auto; display: flex; padding: 3px; gap: 3px; border-radius: 13px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.fmt-tog button { min-width: 54px; padding: 6px 10px; border-radius: 10px; font-family: var(--display); font-size: 16px; color: var(--muted); letter-spacing: 0.04em; }
.fmt-tog button[aria-pressed="true"] { color: #2a1a00; background: linear-gradient(180deg, #ffe48a, var(--gold)); box-shadow: 0 2px 0 #a07a10, 0 0 12px rgba(255, 208, 77, 0.35); }
.fmt-tog button:disabled:not([aria-pressed="true"]) { opacity: 0.45; }
.fmt-tog.ro button { cursor: default; }

.lobby-main { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.team-col { display: flex !important; flex-direction: column; }
.team-seats { flex: 1; min-height: 0; display: grid; gap: 8px; grid-template-rows: repeat(var(--n, 2), minmax(0, 1fr)); }
.team-seats.n1 { --n: 1; }
.team-seats > .seat { min-height: 0; }
.lobby-opts { grid-template-columns: 1fr 1fr; }
.lobby-opts.n3 { grid-template-columns: repeat(3, 1fr); }

/* os 4 modos */
.lobby-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; flex: none; }
.mode-pill {
  display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 14px; text-align: left; min-width: 0;
  background: linear-gradient(180deg, rgba(40, 46, 96, 0.9), rgba(20, 24, 54, 0.9)); border: 1.5px solid var(--line);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); color: #fff;
}
.mode-pill .mp-ic { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); }
.mode-pill .mp-ic .ic { width: 20px; height: 20px; color: var(--muted); }
.mode-pill .mp-txt { min-width: 0; line-height: 1.1; }
.mode-pill b { display: block; font-family: var(--display); font-weight: 400; font-size: 16px; white-space: nowrap; }
.mode-pill small { display: block; font-size: 10px; font-weight: 800; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode-pill[aria-checked="true"] { border-color: var(--gold); background: linear-gradient(180deg, rgba(92, 72, 24, 0.95), rgba(40, 30, 12, 0.95)); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 0 14px rgba(255, 208, 77, 0.3); }
.mode-pill[aria-checked="true"] .mp-ic { background: linear-gradient(180deg, #ffe48a, var(--gold)); }
.mode-pill[aria-checked="true"] .mp-ic .ic { color: #2a1a00; }
.mode-pill:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.lobby-modes.ro .mode-pill { cursor: default; }
.lobby-modes.ro .mode-pill:not([aria-checked="true"]) { opacity: 0.55; }

/* monstro ao calhas (?) e escolha secreta do adversário (Duelo) */
.seat-mons .sm.rnd, .seat-mons .sm.secret { --mc: #7a6ad8; display: grid; place-items: center; }
.seat-mons .sm.secret { --mc: #555a80; }
.sm-q { position: relative; width: 100%; height: 100%; display: grid; place-items: center; color: var(--gold); }
.sm-q .ic { width: 52%; height: 52%; opacity: 0.35; }
.sm-q b { position: absolute; font-family: var(--display); font-weight: 400; font-size: clamp(18px, 4cqh, 34px); color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); }
.seat-mons.n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; aspect-ratio: 1; height: 100%; width: auto; max-width: 100%; }
.sm-opt.rnd { --tc: #7a6ad8; }
.sm-opt.rnd .sm-q { width: 62px; height: 62px; flex: none; border-radius: 14px; background: radial-gradient(circle at 50% 35%, #5a4fb0, #1a1d40); }
.sm-opt.rnd .sm-q b { font-size: 30px; }

/* procurar adversário (na equipa sem ninguém) */
.search-box { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sb-btn {
  position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 12px; min-width: 0; text-align: left;
  background: color-mix(in srgb, var(--team) 16%, rgba(12, 14, 34, 0.85)); border: 1.5px dashed color-mix(in srgb, var(--team) 55%, transparent); color: #fff;
}
.sb-btn .mi .ic { width: 20px; height: 20px; color: var(--team); }
.sb-btn.ranked .mi .ic { color: var(--gold); }
.sb-btn span { min-width: 0; line-height: 1.05; }
.sb-btn small { display: block; font-size: 9.5px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sb-btn b { display: block; font-family: var(--display); font-weight: 400; font-size: 15px; white-space: nowrap; }
.sb-btn em { position: absolute; top: -7px; right: 6px; font-style: normal; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; padding: 1px 6px; border-radius: 6px; background: #3a3f70; color: #cfd2ff; }
.sb-btn:disabled { cursor: default; opacity: 0.7; }
.sb-busca { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: rgba(255, 208, 77, 0.1); border: 1px solid rgba(255, 208, 77, 0.4); }
.sb-busca .ic { width: 18px; height: 18px; color: var(--gold); }
.sb-busca b { font-family: var(--display); font-weight: 400; font-size: 15px; }
.sb-busca .sb-tempo { margin-left: auto; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--gold); }
.sb-busca .sb-outros { font-size: 11.5px; font-weight: 900; color: var(--muted); white-space: nowrap; }
.sb-busca.achado { background: rgba(102, 220, 140, 0.12); border-color: rgba(102, 220, 140, 0.5); }
.sb-busca.achado .ic, .sb-busca.achado .sb-tempo { color: #66dc8c; }

/* telemóvel deitado: os modos numa coluna à direita, tempo/mapa por baixo das equipas */
@container app (orientation: landscape) {
  .lobby-body { display: grid !important; grid-template-columns: minmax(0, 1fr) 154px; grid-template-rows: auto minmax(0, 1fr); }
  .lobby-body > .note { grid-column: 1 / -1; }
  .lobby-main { grid-column: 1; grid-row: 2; }
  .lobby-modes { grid-column: 2; grid-row: 2; grid-template-columns: 1fr; grid-auto-rows: minmax(0, 1fr); align-content: stretch; }
  .seats { grid-row: auto !important; }
  .team-seats { grid-template-rows: minmax(0, 1fr); grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); }
  .lobby-opts { grid-row: auto !important; grid-column: auto !important; width: auto !important; align-content: stretch !important; grid-template-columns: 1fr 1fr !important; }
  .lobby-opts.n3 { grid-template-columns: repeat(3, 1fr) !important; }
  .opt-btn { padding: 5px 8px; }
  .ob-txt b { font-size: 15px; }
  .opt-btn > .mi .ic { width: 22px; height: 22px; }
  .ob-thumb { width: 28px; height: 28px; }
}
@container app (orientation: portrait) {
  .lobby-modes { order: -1; }
  .mode-pill { flex-direction: column; text-align: center; gap: 3px; padding: 6px 4px; }
  .mode-pill small { display: none; }
  .mode-pill b { font-size: 14px; }
  .fmt-tog button { min-width: 40px; padding: 5px 7px; font-size: 14px; }
  .search-box { grid-template-columns: 1fr; }
  #scr-lobby .bar h2 { display: none; }
  .seat-mons.n1 { height: auto; width: 140px; max-width: 100%; max-height: 100%; }
}
/* ---------- avisos do que ganhei (js/ui/eu.js; a bolinha das Conquistas está em .mlist.novo) ---------- */
@keyframes bolinha { 50% { transform: scale(1.25); } }
.premio-pop { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: linear-gradient(180deg, #2c3270, #1a1e48); border: 1px solid rgba(255, 204, 51, 0.45); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 204, 51, 0.25); }
.premio-pop .pp-ic { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #1a1e48; background: radial-gradient(circle at 35% 30%, #fff3b0, var(--gold) 55%, #c4901a); }
.premio-pop .pp-ic .ic { width: 24px; height: 24px; }
.premio-pop .pp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.premio-pop .pp-linha { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; line-height: 1.2; }
.premio-pop .pp-linha .mi { flex: none; display: inline-flex; color: var(--gold); }
.premio-pop .pp-linha .ic { width: 15px; height: 15px; }
.premio-pop .pp-linha > span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.premio-pop small { font-size: 11.5px; font-weight: 800; color: var(--muted); padding-left: 21px; }
/* por cima da barra Rank / Conquistas / Monstros */
.premio-pop { bottom: calc(max(10px, env(safe-area-inset-bottom, 0px)) + 74px); transform: translate(-50%, calc(100% + 120px)); }
.premio-pop.show { transform: translate(-50%, 0); }

/* sala: nível de domador antes do nome e de cada monstro no canto do retrato */
.seat-name .nm { display: flex; align-items: center; justify-content: center; min-width: 0; }
.seat-name .nm b { min-width: 0; }
.seat-name .nv-tag { font-size: 11px; vertical-align: 0; }
.seat-mons .sm { position: relative; overflow: visible; }
.seat-mons .sm img { border-radius: inherit; }
.nv-mon { position: absolute; right: -4px; bottom: -4px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 900; line-height: 1; color: #2a1a00; background: linear-gradient(180deg, #ffe895, #f0b43a); box-shadow: 0 0 0 2px #14183a, 0 2px 4px rgba(0, 0, 0, 0.5); pointer-events: none; }
/* nível de cada monstro (maestria) no ecrã Monstros e na ficha */
.mae { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 6px; min-width: 0; }
.mae .xp-barra { display: block; height: 6px; border-radius: 99px; background: rgba(0, 0, 0, 0.35); overflow: hidden; }
.mae .xp-barra i { --bc: #ffcc33; }
.mae small { font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.best-row b .nv-tag, .bv-name b .nv-tag { font-size: 10px; vertical-align: 0.12em; }
.mdt-name .nv-tag, #mdt-name .nv-tag { font-size: 12px; vertical-align: 0.25em; }
/* Amigos: missões de hoje de cada amigo (tocar mostra quais) */
.fr { cursor: pointer; }
.fr-mis { display: block; }
.fr-mis-res { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.fr-mis-pts { display: inline-flex; gap: 3px; }
.fr-mis-pts i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--pc) 60%, transparent); }
.fr-mis-pts i.on { background: var(--pc); box-shadow: 0 0 6px var(--pc); }
.fr-mis-res small { font-size: 11px; font-weight: 800; color: var(--muted); }
.fr-mis-lista { list-style: none; margin: 6px 0 2px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fr-mis-lista li { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.25; }
.fr-mis-lista li .mi { flex: none; display: inline-flex; margin-top: 1px; }
.fr-mis-lista li .ic { width: 14px; height: 14px; }
.fr-mis-lista li.on { color: #c9ffe0; }
.fr-mis-lista li.on .mi { color: #7dffb0; }
/* ecrã Monstros: nível no canto do retrato (não come o nome) */
.br-img { position: relative; flex: none; display: block; line-height: 0; }
.br-img .nv-mon { right: -5px; bottom: -4px; min-width: 17px; height: 17px; font-size: 10px; }

/* ===== 2026-11-07: sala mais limpa ===== */
/* nível dos monstros: um ponto pequeno no canto, nunca por cima do boneco */
.nv-mon, .br-img .nv-mon { right: -4px; bottom: -4px; min-width: 13px; height: 13px; padding: 0 2px; border-radius: 7px; font-size: 8.5px; box-shadow: 0 0 0 1.5px #14183a, 0 1px 2px rgba(0, 0, 0, 0.5); }
/* lugar livre: o anfitrião tem um botão pequeno "Bot" em baixo; o convidado "Trocar" */
.seat.empty .free { margin: 0 0 34px; align-self: center; color: var(--muted); font-weight: 800; font-size: 12px; opacity: 0.7; }
.seat .seat-acts { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); display: flex; gap: 6px; }
.seat .seat-acts .move-sm { position: static; transform: none; }
.seat .seat-acts .move-sm:active { transform: scale(0.92); }
.seat .add-sm { height: 26px; display: flex; align-items: center; gap: 4px; padding: 0 9px; border-radius: 9px; font-size: 11px; font-weight: 900; color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.seat .add-sm .ic { width: 15px; height: 15px; }
.seat .add-sm:active { transform: scale(0.94); }
.seat .trocar { align-self: center; display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 12px; font-weight: 900; font-size: 14px; color: #fff; background: color-mix(in srgb, var(--team) 30%, rgba(12, 14, 34, 0.85)); border: 1.5px solid color-mix(in srgb, var(--team) 70%, transparent); }
.seat .trocar .ic { width: 18px; height: 18px; color: var(--team); }
.seat .trocar:active { transform: scale(0.95); }
/* procurar adversário: o botão maior da sala (só Ranked) */
.search-box { grid-template-columns: 1fr; }
.sb-btn.ranked { min-height: 62px; padding: 10px 14px; gap: 10px; border-style: solid; border-width: 2px; border-color: color-mix(in srgb, var(--gold) 70%, transparent); background: linear-gradient(180deg, rgba(255, 208, 77, 0.2), rgba(255, 208, 77, 0.06)); }
.sb-btn.ranked .mi .ic { width: 28px; height: 28px; }
.sb-btn.ranked b { font-size: 19px; }
.sb-btn.ranked small { font-size: 11px; color: var(--gold); }
/* tempo, mapa e dificuldade: 3 botões quadrados na linha do Começar partida */
.lobby-foot { display: flex; align-items: center; gap: 8px; }
.lobby-foot .lobby-opts.sq { display: flex; gap: 6px; flex: none; width: auto; grid-column: auto; grid-row: auto; margin: 0; }
.lobby-foot .opt-btn { width: 56px; height: 56px; padding: 4px 3px; flex-direction: column; justify-content: center; align-items: center; gap: 3px; text-align: center; border-radius: 12px; }
.lobby-foot .opt-btn[hidden] { display: none; }
.lobby-foot .opt-btn .ob-more, .lobby-foot .opt-btn .ob-txt small { display: none; }
.lobby-foot .opt-btn .ob-txt { flex: none; width: 100%; }
.lobby-foot .opt-btn .ob-txt b { font-family: inherit; font-weight: 900; font-size: 10px; line-height: 1.1; }
.lobby-foot .opt-btn > .mi .ic { width: 22px; height: 22px; }
.lobby-foot .opt-btn .ob-thumb { width: 30px; height: 22px; border-radius: 6px; }
.lobby-foot .opt-btn .ob-stars { font-size: 10px; line-height: 1; }
.lobby-foot .opt-btn .ob-stars .ic { width: 11px; height: 11px; }
.lobby-foot .status { min-width: 0; }
/* ao alto: o estado numa linha só dele, por cima dos botões */
@media (max-aspect-ratio: 1/1) {
  .lobby-foot { flex-wrap: wrap; }
  .lobby-foot .status:not(:empty) { flex-basis: 100%; order: -1; text-align: center; }
  .lobby-foot .btn.big { flex: 1; }
}
.sb-btn.ranked b { white-space: normal; line-height: 1.05; }
@media (max-aspect-ratio: 1/1) { .sb-btn.ranked b { font-size: 16px; } .sb-btn.ranked { padding: 8px 10px; } }

/* ---------- monstros bloqueados (os novos, por ganhar no Mundo): escuros, com cadeado ---------- */
.best-row.locked img, .sm-opt.locked img, .mon-card.locked .pick img { filter: brightness(0.12) saturate(0) drop-shadow(0 0 1px rgba(255, 255, 255, 0.35)); }
.best-row.locked b, .sm-opt.locked .so-txt, .mon-card.locked .pick b, .mon-card.locked .pick small { opacity: 0.55; }
.best-row.locked, .sm-opt.locked, .mon-card.locked .pick { cursor: not-allowed; }
.best-row .br-img, .sm-opt, .mon-card .pick { position: relative; }
.lock-ic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(10, 12, 30, 0.82); color: #e8ecff; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.25); pointer-events: none; }
.lock-ic svg { width: 14px; height: 14px; }
.sm-opt .lock-ic { left: 36px; }
#ov-swapmon .sm-opt .lock-ic { left: 31px; }
.mon-card .pick .lock-ic { top: 45px; }

/* ===== Sala: o avatar inteiro em cada lugar (2026-11-16) =====
   O avatar é a estrela do lugar: em 3D e animado (js/ui/palco.js), em cima de um
   pedestal com a cor do lugar; a equipa vai por baixo em quadrados pequenos, numa
   linha (ou duas, se não couber); tocar no avatar troca-o (só no meu lugar). */
.seat { gap: 4px; padding: 6px; overflow: hidden; }
.seat-corpo {
  position: relative; flex: 1 1 0; min-height: 70px; width: 100%; padding: 0; border-radius: 13px; overflow: visible;
  background:
    radial-gradient(60% 18% at 50% 92%, color-mix(in srgb, var(--tc) 55%, transparent), transparent 70%),
    radial-gradient(70% 70% at 50% 40%, color-mix(in srgb, var(--tc) 22%, transparent), transparent 75%);
}
.seat-corpo:disabled { cursor: default; }
.seat.mine .seat-corpo:not(:disabled):active { transform: scale(0.98); }
.seat-corpo .palco { position: absolute; inset: 0; }
/* a liga em cima à esquerda; trocar de avatar em baixo à direita (só no meu lugar) */
.seat-corpo .seat-liga { left: 4px; top: 2px; bottom: auto; transform: none; }
.seat-trocar { position: absolute; z-index: 3; right: 3px; bottom: 3px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 12, 30, 0.7); color: #fff; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--tc) 70%, transparent); }
.seat-trocar .ic { width: 14px; height: 14px; }
/* a equipa: quadrados pequenos numa linha */
.seat-equipa { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 34px)); justify-content: center; gap: 4px; }
.seat-equipa.n2 { grid-template-columns: repeat(2, minmax(0, 34px)); }
.seat-equipa.n1 { grid-template-columns: minmax(0, 46px); }
.seat-equipa .sm {
  position: relative; width: 100%; height: auto; aspect-ratio: 1; padding: 0; border-radius: 9px; overflow: visible;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--mc) 55%, #1a1d40), rgba(10, 12, 30, 0.95));
  border: 1.5px solid color-mix(in srgb, var(--mc) 70%, transparent); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
}
.seat-equipa .sm img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 7px; }
.seat-equipa .sm:not(:disabled):active { transform: scale(0.92); }
.seat-equipa .sm.rnd, .seat-equipa .sm.secret { --mc: #7a6ad8; display: grid; place-items: center; }
.seat-equipa .sm.secret { --mc: #555a80; }
.seat-equipa .sm-q b { font-size: 16px; }
/* 1v1: os lugares são largos — quadrados maiores */
.seats.f1 .seat-equipa { grid-template-columns: repeat(4, minmax(0, 44px)); }
.seats.f1 .seat-equipa.n2 { grid-template-columns: repeat(2, minmax(0, 44px)); }
.seats.f1 .seat-equipa.n1 { grid-template-columns: minmax(0, 56px); }
.seats.f1 .seat-equipa .sm { border-radius: 11px; }
.seat .seat-name small { min-height: 0; }

/* emotes e mensagens na sala (os mesmos botões da arena, mais pequenos) */
.dock-slot { position: relative; flex: none; }
.dock-slot .emo-dock { position: relative; left: auto; bottom: auto; z-index: 5; gap: 6px; }
.dock-slot .ed-emo { width: 44px; height: 44px; }
.dock-slot .ed-emo .ed-ic { font-size: 23px; }
.dock-slot .ed-msg { width: 38px; height: 38px; margin-bottom: 0; }
.dock-slot .ed-msg .ic { width: 20px; height: 20px; }
.dock-slot .er-roda { left: 22px; bottom: 22px; }
/* (a altura não pode ser % do dock, que é do tamanho dos botões: a lista ficava com 0 px e só se
   via o título, report 2026-11-19_2335_qqzu) */
.dock-slot .chat-pop { left: 0; bottom: 56px; z-index: 40; width: min(300px, calc(100vw - 24px)); max-height: min(340px, calc(100vh - 120px)); max-height: min(340px, calc(100dvh - 120px)); }

/* o balão por cima do avatar inteiro (emote ou mensagem) */
.palco-balao {
  /* ao lado da cabeça (o avatar é desenhado por cima da página: no meio ficava tapado) */
  position: absolute; z-index: 4; right: 2%; top: 2%; max-width: 70%; transform-origin: 0% 100%;
  padding: 5px 10px; border-radius: 14px; background: #fff; color: #1a1d40; font-weight: 900; font-size: 12px; line-height: 1.15; text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); pointer-events: none; animation: balao 0.25s ease-out;
}
.palco-balao::after { content: ""; position: absolute; left: 10px; bottom: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #fff; }
.palco-balao.e { padding: 4px 8px; border-radius: 50%; }
.palco-balao.e i { font-style: normal; font-size: 28px; line-height: 1; display: block; }
@keyframes balao { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* sala ao alto num telemóvel estreito: a barra não cabe numa linha e o
   código saía do ecrã. Fica em 2 linhas: sair, rank e o código em cima;
   1v1/2v2, convidar e entrar noutra sala por baixo. */
@container app (orientation: portrait) and (max-width: 480px) {
  #scr-lobby .bar { flex-wrap: wrap; row-gap: 6px; column-gap: 8px; }
  #scr-lobby .bar::after { content: ''; order: 1; flex-basis: 100%; height: 0; }
  #scr-lobby .bar .fmt-tog, #scr-lobby .bar .invite { order: 2; }
  #scr-lobby .bar .fmt-tog { margin: 0; }
  #scr-lobby .bar #lobby-invite { margin-left: auto; }
  #scr-lobby .bar .code-box { margin-left: auto; }
}
