/* v1.3.3e the screen's height as the player SEES it: 1dvh where the browser knows it (iPhone Safari keeps its
   address & tool bars, and 100vh there is the height WITHOUT them — the bottom of the game was hidden under them).
   Computers and Android in full screen: dvh = vh, nothing changes. */
/* v1.7.0 the boxes that use CSS zoom also carry their zoom as --zf: a browser without CSS zoom (Firefox before 126) scales them instead (html.no-zoom). 1 unless a rule sets it. */
.hud, .elim-banner, .end-card, .card-wrap, .km-card, .lobby-right-top, .right-col { --zf: 1; }
:root { --vh1: 1vh; --vh100: 100vh; }
@supports (height: 1dvh) { :root { --vh1: 1dvh; --vh100: 100dvh; } }
/* iPhone: a long press on the game never opens the "copy / look up / save image" bubble or the magnifier */
html, body { -webkit-touch-callout: none; }
input, textarea, [contenteditable="true"] { -webkit-touch-callout: default; }
/* =====================================================================
 * Survival.io — styles.css
 * Glassmorphism HUD over a full-screen canvas. Forest-dark palette with
 * a warm amber accent; chunky display type for the game feel.
 * ===================================================================== */
:root {
  --bg: #0e1a14;
  --glass: rgba(16, 28, 22, 0.58);
  --glass-strong: rgba(14, 24, 19, 0.82);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hi: rgba(255, 255, 255, 0.06);
  --text: #f2f5ef;
  --text-dim: #a9b8ad;
  --accent: #f6b73c;
  --accent-deep: #d98c12;
  --ok: #7ddc5f;
  --warn: #f2c14e;
  --danger: #e5484d;
  --radius: 16px;
  --font-display: 'Lilita One', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
}

button { font-family: inherit; color: inherit; }

.hidden { display: none !important; }
.ar { font-family: 'Segoe UI', Tahoma, system-ui, sans-serif; color: var(--text-dim); font-weight: 600; font-size: 0.85em; margin-inline-start: 6px; }

kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom-width: 3px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  text-align: center;
  color: var(--text);
  margin: 0 1px;
}

/* ------------------------------------------------------------- canvas */
#game {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: var(--vh100);
  display: block;
  cursor: crosshair;
  touch-action: none;
}

/* -------------------------------------------------------------- glass */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* ---------------------------------------------------------------- HUD */
.hud { position: fixed; inset: 0; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud .toasts { pointer-events: none; }

.player-card {
  position: absolute;
  top: 16px; left: 16px;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px 8px 8px;
  min-width: 250px;
}
#avatarCanvas {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #4f7d3c, #2a4a22);
  border: 2px solid rgba(255, 255, 255, 0.2);
}
.player-meta { flex: 1; min-width: 0; }
.player-name { font-family: var(--font-display); font-size: 19px; line-height: 1.1; margin-bottom: 6px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-bar {
  position: relative;
  height: 18px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.hp-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(180deg, #8ef06f, #4fb83a);
  transition: width 0.25s ease, background 0.25s;
}
.hp-fill.mid { background: linear-gradient(180deg, #ffd770, #e3a92a); }
.hp-fill.low { background: linear-gradient(180deg, #ff7c7c, #d23339); }
.hp-text {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.resource-bar {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 4px;
  padding: 6px 8px;
}
.res {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px 4px 6px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  min-width: 78px;
}
.res-icon { width: 28px; height: 28px; flex: none; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
.res-count { font-family: var(--font-display); font-size: 20px; font-variant-numeric: tabular-nums; }
.res.bump { animation: bump 0.32s ease; }
@keyframes bump {
  0% { transform: scale(1); background: rgba(0, 0, 0, 0.2); }
  35% { transform: scale(1.12); background: rgba(246, 183, 60, 0.35); }
  100% { transform: scale(1); background: rgba(0, 0, 0, 0.2); }
}
.res.spend { animation: spend 0.4s ease; }
@keyframes spend {
  35% { background: rgba(229, 72, 77, 0.4); transform: scale(0.94); }
}

.minimap-wrap {
  position: absolute;
  top: 16px; right: 16px;
  padding: 8px;
}
#minimap {
  display: block;
  width: 180px; height: 180px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  image-rendering: auto;
}
.minimap-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.fps { font-size: 12px; font-weight: 800; color: var(--text-dim); font-variant-numeric: tabular-nums; padding-left: 4px; }
.sys-buttons { display: flex; gap: 4px; }
.icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.16); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.off { color: var(--danger); }

.quest-panel {
  position: absolute;
  top: 100px; left: 16px;
  width: 270px;
  padding: 12px 14px;
}
.quest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.quest-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  transition: color 0.2s;
}
.quest-list li .check {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: grid; place-items: center;
  font-size: 13px;
}
.quest-list li.active { color: var(--text); }
.quest-list li.active .check { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(246, 183, 60, 0.18); }
.quest-list li.done { color: var(--ok); text-decoration: line-through; text-decoration-color: rgba(125, 220, 95, 0.5); }
.quest-list li.done .check { background: var(--ok); border-color: var(--ok); color: #10200c; }
.quest-progress { display: block; font-size: 12px; color: var(--text-dim); text-decoration: none; margin-top: 2px; }
.quest-progress .bar { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); margin-top: 3px; overflow: hidden; }
.quest-progress .bar i { display: block; height: 100%; background: var(--accent); transition: width 0.25s; }
.quest-final { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(125, 220, 95, 0.15); color: var(--ok); font-size: 13px; font-weight: 800; }

.hotbar-wrap {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.equipped-label {
  font-family: var(--font-display);
  font-size: 17px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  transition: opacity 0.3s;
}
.hotbar { display: flex; gap: 6px; padding: 6px; }
.slot {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}
.slot:hover { background: rgba(255, 255, 255, 0.08); }
.slot.active {
  border-color: var(--accent);
  background: rgba(246, 183, 60, 0.18);
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(246, 183, 60, 0.25);
}
.slot canvas { width: 52px; height: 52px; }
.slot .key {
  position: absolute; top: 2px; left: 6px;
  font-size: 11px; font-weight: 900; color: var(--text-dim);
}
.slot.new { animation: newSlot 0.7s ease; }
@keyframes newSlot {
  0% { transform: scale(0.3); }
  60% { transform: scale(1.15) translateY(-4px); }
  100% { transform: scale(1) translateY(-4px); }
}

.action-buttons {
  position: absolute;
  bottom: 18px; right: 16px;
  display: flex; gap: 8px;
}
.action-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 17px;
  border-radius: 14px;
}
.action-toggle svg { width: 20px; height: 20px; color: var(--accent); }
.action-toggle[aria-expanded="true"] { border-color: var(--accent); background: rgba(246, 183, 60, 0.16); }
.action-toggle.has-craftable { border-color: var(--accent); animation: pulseGlow 1.6s ease-in-out infinite; }
@keyframes pulseGlow {
  0%, 100% { box-shadow: var(--shadow), 0 0 0 0 rgba(246, 183, 60, 0.5); }
  50% { box-shadow: var(--shadow), 0 0 0 8px rgba(246, 183, 60, 0); }
}

.side-panel {
  position: absolute;
  bottom: 76px; right: 16px;
  width: 330px;
  max-height: calc(var(--vh100) - 340px);
  min-height: 160px;
  overflow-y: auto;
  padding: 12px 14px;
}
.craft-list { display: grid; gap: 8px; }
.recipe {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.recipe canvas { width: 52px; height: 52px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.recipe-name { font-weight: 900; font-size: 15px; }
.recipe-desc { font-size: 12px; color: var(--text-dim); margin: 2px 0 4px; }
.recipe-cost { display: flex; gap: 8px; font-size: 13px; font-weight: 800; }
.recipe-cost .lack { color: var(--danger); }
.recipe-cost .have { color: var(--ok); }
.btn-craft {
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  font-family: var(--font-display);
  font-size: 15px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #2a1a02;
  cursor: pointer;
  box-shadow: 0 3px 0 #8a5a08;
  transition: transform 0.08s, filter 0.15s;
}
.btn-craft:hover { filter: brightness(1.08); }
.btn-craft:active { transform: translateY(2px); box-shadow: 0 1px 0 #8a5a08; }
.btn-craft:disabled { background: rgba(255, 255, 255, 0.12); color: var(--text-dim); box-shadow: none; cursor: not-allowed; }
.btn-craft.owned { background: rgba(125, 220, 95, 0.2); color: var(--ok); }

.help-panel {
  position: absolute;
  bottom: 18px; left: 16px;
  width: 300px;
  padding: 12px 14px;
}
.keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.keys li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.toasts {
  position: absolute;
  top: 84px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.toast {
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  font-weight: 800;
  font-size: 14px;
  box-shadow: var(--shadow);
  animation: toastIn 0.25s ease, toastOut 0.35s ease forwards;
  animation-delay: 0s, var(--life, 2.6s);
  white-space: nowrap;
}
.toast.warn { border-color: rgba(242, 193, 78, 0.6); color: #ffe3a3; }
.toast.ok { border-color: rgba(125, 220, 95, 0.6); color: #c9f5b8; }
.toast.error { border-color: rgba(229, 72, 77, 0.6); color: #ffc2c4; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(0.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }

/* ------------------------------------------------------------- overlays */
.overlay {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  padding: 16px;
  background: radial-gradient(ellipse at center, rgba(10, 22, 16, 0.55), rgba(5, 10, 8, 0.85));
  z-index: 20;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } }

.logo {
  font-family: var(--font-display);
  font-size: 54px;
  margin: 0;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 4px 0 #2b4a1f, 0 8px 18px rgba(0, 0, 0, 0.5);
  line-height: 1;
}
.logo span { color: var(--accent); }
.logo.small { font-size: 30px; text-shadow: 0 3px 0 #2b4a1f; }

.title-card {
  width: min(380px, 100%);
  padding: 28px 28px 22px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--glass-strong);
}
.tagline { margin: 0; color: var(--text-dim); font-weight: 800; letter-spacing: 3px; text-transform: uppercase; font-size: 12px; }
#titlePreview { width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle at 45% 40%, #5a8d44, #2a4a22 70%); margin: 8px 0; border: 3px solid rgba(255, 255, 255, 0.12); }
.welcome { margin: 0 0 8px; font-size: 16px; color: var(--text-dim); }
.welcome strong { color: var(--text); }

.btn-primary {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.5px;
  color: #2a1a02;
  background: linear-gradient(180deg, #ffd56b, var(--accent) 45%, var(--accent-deep));
  box-shadow: 0 5px 0 #8a5a08, 0 10px 24px rgba(246, 183, 60, 0.25);
  cursor: pointer;
  transition: transform 0.08s, filter 0.15s, box-shadow 0.08s;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #8a5a08; }
.btn-primary:disabled { filter: grayscale(0.7) brightness(0.7); cursor: not-allowed; }
.btn-ghost {
  background: none; border: none;
  color: var(--text-dim);
  font-weight: 800;
  cursor: pointer;
  padding: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-ghost:hover { color: var(--text); }

/* ---------------------------------------------------------- onboarding */
.ob-card {
  width: min(760px, 100%);
  max-height: calc(var(--vh100) - 32px);
  overflow-y: auto;
  padding: 24px 26px;
  background: var(--glass-strong);
  user-select: text;
}
.ob-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ob-header h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.ob-body { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.ob-preview {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 40%, #5a8d44, #2a4a22 75%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
#obPreview { width: 230px; height: 230px; }
.ob-preview-name {
  font-family: var(--font-display);
  font-size: 22px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
  max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ob-fields { display: flex; flex-direction: column; }
.field-label { font-weight: 900; font-size: 14px; margin: 4px 0 8px; display: block; }
.name-row { display: flex; gap: 8px; }
#obName {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 17px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#obName:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(246, 183, 60, 0.18); }
#obName.invalid { border-color: var(--danger); }
.icon-btn.dice { width: 48px; height: auto; border-radius: 12px; }
.icon-btn.dice svg { width: 22px; height: 22px; }
.field-error { min-height: 18px; font-size: 12px; font-weight: 800; color: var(--danger); margin: 4px 0 8px; }

.rig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.rig-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s, background 0.15s;
}
.rig-card canvas { width: 96px; height: 96px; }
.rig-card:hover { background: rgba(255, 255, 255, 0.06); }
.rig-card[aria-checked="true"] { border-color: var(--accent); background: rgba(246, 183, 60, 0.14); }
.rig-name { font-weight: 900; font-size: 15px; }

.skin-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.swatch {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  position: relative;
  transition: transform 0.12s, border-color 0.15s;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.15);
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-checked="true"] { border-color: var(--accent); transform: scale(1.12); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.15), 0 0 0 4px rgba(246, 183, 60, 0.25); }
.swatch[aria-checked="true"]::after {
  content: '';
  position: absolute;
  right: -4px; bottom: -4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' stroke='%232a1a02' stroke-width='2.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
  border: 2px solid #1a120a;
}

.ob-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.ob-footer .btn-primary { width: auto; min-width: 230px; }
.save-note { font-size: 12px; color: var(--text-dim); font-weight: 700; }

/* --------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .quest-panel { top: auto; bottom: 120px; width: 230px; font-size: 13px; }
  .help-panel { display: none; }
}
@media (max-width: 720px) {
  .ob-body { grid-template-columns: 1fr; }
  .ob-preview { flex-direction: row; justify-content: center; }
  #obPreview { width: 140px; height: 140px; }
  .ob-footer { flex-direction: column-reverse; align-items: stretch; }
  .ob-footer .btn-primary { width: 100%; }
  .resource-bar { top: auto; bottom: 108px; flex-wrap: wrap; justify-content: center; width: calc(100% - 32px); }
  .res { min-width: 64px; padding-right: 8px; }
  .res-count { font-size: 16px; }
  .player-card { min-width: 0; }
  #minimap { width: 120px; height: 120px; }
  .quest-panel { display: none; }
  .craft-panel { width: calc(100% - 32px); }
  .slot { width: 54px; height: 54px; }
  .slot canvas { width: 44px; height: 44px; }
}


/* =====================================================================
 * Stage 2 HUD — eat, armor, rates, army, building context, build menu,
 * placement banner, death screen
 * ===================================================================== */
.player-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.player-name-row .player-name { margin-bottom: 0; }
.armor-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px 1px 4px;
  border-radius: 8px;
  background: rgba(169, 179, 189, 0.2);
  border: 1px solid rgba(169, 179, 189, 0.5);
  font-size: 11px; font-weight: 900; color: #e3e8ec;
}
.armor-badge svg { width: 14px; height: 14px; }
.hp-heal {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: rgba(142, 240, 111, 0.35);
  transition: width 0.2s;
}
.hp-fill { position: relative; }
.eat-btn {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-weight: 900; font-size: 11px;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
}
.eat-btn svg { width: 26px; height: 26px; }
.eat-btn kbd { font-size: 10px; padding: 0 4px; min-width: 16px; }
.eat-btn:hover { background: rgba(255, 255, 255, 0.14); }
.eat-btn:active { transform: scale(0.95); }
.eat-btn.suggest { border-color: var(--ok); background: rgba(125, 220, 95, 0.18); animation: pulseGlow 1.4s ease-in-out infinite; }
.eat-btn:disabled { opacity: 0.45; cursor: not-allowed; animation: none; }

.res { position: relative; cursor: default; }
.res-num { display: flex; flex-direction: column; line-height: 1; }
.res-rate { font-size: 11px; font-weight: 900; min-height: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.res-rate.up { color: var(--ok); }
.res-rate.down { color: #ff8a80; }
.res-tip {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 210px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  font-size: 12px; font-weight: 700;
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 5;
}
.res:hover .res-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.res-tip h4 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 15px; }
.res-tip .row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; color: var(--text-dim); }
.res-tip .row b { color: var(--text); }
.res-tip .row.neg b { color: #ff8a80; }
.res-tip .row.pos b { color: var(--ok); }

.army-panel {
  position: absolute;
  top: 262px; right: 16px;
  width: 196px;
  padding: 10px 12px;
}
.army-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.army-count { font-size: 13px; font-weight: 800; color: var(--text-dim); }
.army-count strong { color: var(--text); font-size: 16px; }
.stance-toggle { display: flex; border-radius: 9px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.15); }
.stance-toggle button {
  border: none; background: rgba(0, 0, 0, 0.25);
  padding: 4px 7px; font-size: 11px; font-weight: 900; cursor: pointer;
}
.stance-toggle button.on { background: var(--accent); color: #2a1a02; }
.army-upkeep { margin-top: 6px; font-size: 12px; color: var(--text-dim); font-weight: 700; }
.starve { margin-top: 8px; }
.starve-text { font-size: 12px; font-weight: 900; color: #ff8a80; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.55; } }
.starve-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin-top: 4px; }
.starve-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f2c14e, #e5484d); }

.building-panel {
  position: absolute;
  bottom: 18px; left: 16px;
  width: 270px;
  padding: 10px 12px 12px;
}
.hud.side-open .army-panel, .hud.side-open .kingdom-panel { display: none; }
.bp-head { display: flex; align-items: center; gap: 10px; }
#bpIcon { width: 48px; height: 48px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); }
.bp-name { font-family: var(--font-display); font-size: 17px; }
.bp-sub { font-size: 12px; color: var(--text-dim); font-weight: 800; }
.bp-hp { position: relative; height: 14px; border-radius: 7px; background: rgba(0, 0, 0, 0.45); overflow: hidden; margin: 8px 0 6px; }
.bp-hp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #8ef06f, #4fb83a); }
.bp-hp i.mid { background: linear-gradient(180deg, #ffd770, #e3a92a); }
.bp-hp i.low { background: linear-gradient(180deg, #ff7c7c, #d23339); }
.bp-hp span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; font-weight: 900; text-shadow: 0 1px 2px #000; }
.bp-info { font-size: 12px; font-weight: 700; color: var(--text-dim); display: grid; gap: 2px; }
.bp-info b { color: var(--text); }
.bp-actions { display: grid; gap: 6px; margin-top: 8px; }
.bp-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px; font-weight: 900; text-align: left;
  cursor: pointer;
}
.bp-btn:hover:not(:disabled) { background: rgba(246, 183, 60, 0.2); border-color: var(--accent); }
.bp-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.bp-btn .cost { font-weight: 800; color: var(--text-dim); font-size: 11px; }
.bp-btn .cost.lack { color: #ff8a80; }

.recipe-group { font-family: var(--font-display); font-size: 14px; color: var(--accent); margin: 6px 0 2px; letter-spacing: 0.4px; }
.recipe .lockline { font-size: 11px; color: #ffb4ae; font-weight: 800; }
.recipe.locked { opacity: 0.72; }

.placing-banner {
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(246, 183, 60, 0.92);
  color: #2a1a02;
  font-weight: 900; font-size: 13px;
  box-shadow: var(--shadow);
}

.overlay.death { background: radial-gradient(ellipse at center, rgba(60, 0, 0, 0.35), rgba(20, 0, 0, 0.8)); z-index: 15; }
.death-card { text-align: center; }
.death-card h2 { font-family: var(--font-display); font-weight: 400; font-size: 54px; margin: 0; color: #ff8a80; text-shadow: 0 4px 0 #3a0a0a, 0 10px 30px rgba(0, 0, 0, 0.6); }
.death-by { font-size: 18px; font-weight: 800; margin: 6px 0 4px; }
.death-lost { font-size: 14px; color: #ffc2c4; font-weight: 700; margin: 0 0 14px; }
.death-timer {
  width: 86px; height: 86px; margin: 0 auto;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.3);
  font-family: var(--font-display); font-size: 40px;
}
.death-hint { color: var(--text-dim); font-weight: 700; }

@media (max-width: 720px) {
  .army-panel { top: 196px; width: 170px; }
  .building-panel { bottom: 200px; left: 16px; width: 230px; }
  .side-panel { width: calc(100% - 32px); max-height: calc(var(--vh1) * 45); }
  .action-buttons { bottom: 84px; }
}


/* =====================================================================
 * Stage 3 HUD — right column, training cards, army composition,
 * kingdoms leaderboard, market window
 * ===================================================================== */
.right-col {
  position: absolute;
  top: 16px; right: 16px;
  display: flex; flex-direction: column; gap: 10px;
  width: 210px;
  pointer-events: none;
}
.right-col > * { pointer-events: auto; }
.right-col .minimap-wrap, .right-col .army-panel { position: static; }
.right-col .army-panel { width: auto; }
.right-col .minimap-wrap { align-self: flex-end; }

.army-comp { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.comp-chip {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 1px 6px 1px 1px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 11px; font-weight: 900;
}
.comp-chip canvas { width: 22px; height: 22px; }

.kingdom-panel { padding: 10px 12px; }
.kingdom-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 280px; overflow-y: auto; }
.kingdom-list li {
  display: grid; grid-template-columns: 16px 10px 1fr auto auto; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; color: var(--text-dim);
  padding: 2px 4px; border-radius: 6px;
}
.kingdom-list li.me { background: rgba(77, 163, 255, 0.18); color: var(--text); }
.k-rank { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.k-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #0d1410; }
.k-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.k-stats { font-size: 10px; letter-spacing: 0.5px; }
.k-score { font-family: var(--font-display); font-weight: 400; color: var(--accent); font-size: 13px; }

.train-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.train-card {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto auto auto;
  column-gap: 6px; align-items: center; text-align: left;
  padding: 5px 6px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer; font-size: 10px; font-weight: 800;
}
.train-card canvas { grid-row: 1 / span 4; width: 34px; height: 34px; }
.train-card:hover:not(:disabled) { border-color: var(--accent); background: rgba(246, 183, 60, 0.18); }
.train-card:disabled { opacity: 0.5; cursor: not-allowed; }
.tc-name { font-size: 12px; font-weight: 900; color: var(--text); }
.tc-strong { color: var(--ok); }
.tc-weak { color: #ff9f94; }
.tc-cost { color: var(--text-dim); }
.tc-cost.lack { color: #ff8a80; }
.building-panel { width: 300px; }

.market-overlay { background: rgba(5, 10, 8, 0.55); z-index: 12; }
.market-card { width: min(640px, 100%); padding: 18px 20px; background: var(--glass-strong); }
.market-head { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: start; margin-bottom: 12px; }
.market-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 26px; }
.market-sub { margin: 4px 0 0; font-size: 12px; color: var(--text-dim); font-weight: 700; }
.market-gold { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); font-family: var(--font-display); font-size: 20px; }
.market-rows { display: grid; gap: 8px; }
.mk-row {
  display: grid; grid-template-columns: 34px 1fr 110px 92px 92px; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.mk-row .res-icon { width: 30px; height: 30px; }
.mk-name { font-weight: 900; font-size: 15px; }
.mk-stock { font-size: 12px; color: var(--text-dim); font-weight: 800; }
.mk-trend { font-size: 11px; font-weight: 900; }
.mk-trend.up { color: #ff9f94; }
.mk-trend.down { color: var(--ok); }
.mk-row canvas.spark { width: 110px; height: 34px; }
.mk-btn {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 4px; border-radius: 10px; border: none; cursor: pointer;
  font-family: var(--font-display); font-size: 15px;
}
.mk-btn small { font-family: var(--font-body); font-size: 11px; font-weight: 800; }
.mk-btn.buy { background: linear-gradient(180deg, #8ef06f, #4fb83a); color: #0f2a08; box-shadow: 0 3px 0 #2f6d22; }
.mk-btn.sell { background: linear-gradient(180deg, #ffd56b, var(--accent-deep)); color: #2a1a02; box-shadow: 0 3px 0 #8a5a08; }
.mk-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.mk-btn:disabled { background: rgba(255, 255, 255, 0.1); color: var(--text-dim); box-shadow: none; cursor: not-allowed; }

@media (max-width: 720px) {
  .right-col { width: 150px; }
  .kingdom-panel { display: none; }
  .mk-row { grid-template-columns: 30px 1fr 80px 80px; }
  .mk-row canvas.spark { display: none; }
}


/* =====================================================================
 * Stage 3.5 polish — UI scale, collapsible objectives, recruit bar,
 * elimination broadcast, defeat/victory, spectating
 * ===================================================================== */
:root { --ui: 0.85; }
.hud { zoom: var(--ui); --zf: var(--ui); }
.elim-banner, .end-card { zoom: var(--ui); --zf: var(--ui); }

.quest-panel { width: 250px; }
.quest-head { align-items: center; }
.quest-toggle {
  width: 24px; height: 24px; display: grid; place-items: center;
  border: none; border-radius: 7px; background: rgba(255, 255, 255, 0.08); cursor: pointer;
  transition: transform 0.2s, background 0.15s;
}
.quest-toggle svg { width: 16px; height: 16px; }
.quest-toggle:hover { background: rgba(255, 255, 255, 0.16); }
.quest-panel.collapsed .quest-toggle { transform: rotate(-90deg); }
.quest-panel.collapsed { padding: 8px 12px; }
.quest-panel.collapsed .panel-title { margin-bottom: 4px; font-size: 15px; }
.quest-panel.collapsed .quest-list li:not(.active) { display: none; }
.quest-panel.collapsed .quest-final { margin-top: 4px; padding: 5px 8px; font-size: 12px; }

.recruit-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 8px; }
.rc-btn {
  position: relative; display: grid; place-items: center;
  height: 44px; padding: 0; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(0, 0, 0, 0.3);
  cursor: pointer; opacity: 0.55; transition: opacity 0.15s, border-color 0.15s, background 0.15s;
}
.rc-btn canvas { width: 30px; height: 30px; }
.rc-btn.ready { opacity: 1; border-color: rgba(125, 220, 95, 0.55); }
.rc-btn.ready:hover { background: rgba(125, 220, 95, 0.18); }
.rc-btn.locked { opacity: 0.35; }
.rc-key { position: absolute; top: 1px; left: 3px; font-size: 9px; font-weight: 900; color: var(--text-dim); }
.rc-q { position: absolute; bottom: 1px; right: 3px; font-size: 9px; font-weight: 900; color: var(--accent); }

.bp-effect { font-size: 11px; font-weight: 800; color: var(--ok); margin: -2px 2px 2px; }

.kingdom-list li.out { opacity: 0.45; }
.kingdom-list li.out .k-name { text-decoration: line-through; }

.elim-banner {
  position: fixed; top: 110px; left: 50%;
  transform: translateX(-50%);
  z-index: 18; pointer-events: none;
  padding: 12px 26px; border-radius: 14px;
  background: rgba(20, 6, 6, 0.86);
  border: 2px solid var(--k, #e5484d);
  box-shadow: 0 0 40px rgba(229, 72, 77, 0.35), var(--shadow);
  font-family: var(--font-display); font-size: 34px; letter-spacing: 2px; color: #fff;
  text-align: center;
}
.elim-banner .eb-name { color: var(--k, #e5484d); }
.elim-banner small { display: block; font-family: var(--font-body); font-size: 13px; letter-spacing: 0; color: var(--text-dim); font-weight: 800; margin-top: 2px; }
.elim-banner.show { animation: elimIn 0.5s cubic-bezier(.2, 1.4, .4, 1), elimOut 0.6s ease 3.9s forwards; }
@keyframes elimIn { from { opacity: 0; transform: translateX(-50%) scale(1.6); } }
@keyframes elimOut { to { opacity: 0; transform: translateX(-50%) translateY(-12px); } }

.end-overlay { z-index: 19; background: radial-gradient(ellipse at center, rgba(40, 0, 0, 0.45), rgba(6, 2, 2, 0.88)); }
.end-overlay.win { background: radial-gradient(ellipse at center, rgba(60, 45, 0, 0.4), rgba(8, 6, 0, 0.88)); }
.end-card { text-align: center; max-width: 520px; }
.end-card h2 { font-family: var(--font-display); font-weight: 400; font-size: 56px; margin: 0 0 8px; color: #ff8a80; text-shadow: 0 4px 0 #3a0a0a, 0 10px 30px rgba(0, 0, 0, 0.6); }
.end-overlay.win .end-card h2 { color: var(--accent); text-shadow: 0 4px 0 #5a3a00, 0 10px 30px rgba(0, 0, 0, 0.6); }
.end-card p { color: var(--text-dim); font-weight: 700; font-size: 16px; margin: 0 0 20px; }
.end-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.end-actions .btn-primary { width: 260px; }

.spectate-bar {
  position: absolute; top: 84px; left: 50%; transform: translateX(-50%);
  padding: 8px 14px; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}

/* Eliminated players spectate — hide controls that belong to a living kingdom */
.hud.is-spectating .quest-panel,
.hud.is-spectating .hotbar-wrap,
.hud.is-spectating .action-buttons,
.hud.is-spectating .army-panel,
.hud.is-spectating .building-panel,
.hud.is-spectating .eat-btn,
.hud.is-spectating .resource-bar { display: none !important; }

/* =====================================================================
 * Stage 5 — main menu, shop, match bar, mode panels, card picker,
 * victory/defeat statistics, badges, coloured costs, hotbar drag & drop
 * ===================================================================== */
.cur-ico { width: 20px; height: 20px; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4)); }
.wallet { display: flex; gap: 8px; justify-content: center; }
.w-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px 4px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.32); border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-display); font-size: 17px;
}
.wallet.big .w-item { font-size: 20px; padding: 6px 14px 6px 10px; }
.wallet.big .cur-ico { width: 24px; height: 24px; }

/* ---------- main menu ---------- */
.menu-card {
  width: min(980px, 100%);
  max-height: calc(var(--vh100) - 32px); overflow-y: auto;
  display: grid; grid-template-columns: 290px 1fr; gap: 24px;
  padding: 24px 26px;
  background: var(--glass-strong);
}
.menu-left { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.menu-side-btns { display: flex; flex-direction: column; align-items: center; gap: 0; margin-top: 4px; }
.menu-side-btns .btn-ghost { padding: 5px 8px; }
.menu-right { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.menu-h { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 18px; letter-spacing: 0.4px; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.mode-card {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 0.25);
  cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.mode-card:hover { border-color: rgba(246, 183, 60, 0.55); transform: translateY(-1px); }
.mode-card[aria-checked="true"] { border-color: var(--accent); background: rgba(246, 183, 60, 0.16); box-shadow: 0 0 0 3px rgba(246, 183, 60, 0.12); }
.mc-ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, 0.07); }
.mc-ico svg { width: 28px; height: 28px; }
.mc-text { display: flex; flex-direction: column; min-width: 0; }
.mc-name { font-family: var(--font-display); font-size: 16px; line-height: 1.15; }
.mc-name em { font-family: var(--font-body); font-style: normal; font-size: 10px; font-weight: 900; color: #2a1a02; background: var(--warn); border-radius: 6px; padding: 1px 5px; vertical-align: 2px; }
.mc-ar { font-family: 'Segoe UI', Tahoma, system-ui, sans-serif; font-size: 12px; color: var(--text-dim); font-weight: 700; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, 0.32); gap: 2px; }
.seg button {
  border: none; background: none; cursor: pointer;
  padding: 7px 12px; border-radius: 9px;
  font-weight: 900; font-size: 13px; color: var(--text-dim);
}
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"] { background: var(--accent); color: #2a1a02; }
.seg button[aria-checked="true"] .ar { color: #5a3a00; }
.seg.disabled { opacity: 0.4; pointer-events: none; }
.menu-summary { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.45; }
.menu-desc { color: var(--text-dim); font-weight: 600; }
.menu-desc.ar { margin: 0; font-size: 12px; }
.btn-primary.big { font-size: 26px; padding: 16px 20px; margin-top: 4px; }
@media (max-width: 760px) {
  .menu-card { grid-template-columns: 1fr; padding: 18px 16px; }
  .menu-left #titlePreview { width: 120px; height: 120px; }
}

/* ---------- shop ---------- */
.shop-overlay { z-index: 25; }
/* v1.0.3 smooth store: no live blur behind the shop (re-blurring the screen every frame made it stutter) */
.shop-overlay .glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(14, 24, 19, 0.96); }
.shop-card { width: min(940px, 100%); max-height: calc(var(--vh100) - 32px); display: flex; flex-direction: column; padding: 18px 20px; background: var(--glass-strong); }
.shop-head { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; margin-bottom: 10px; }
.shop-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 28px; }
.shop-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.shop-tabs button {
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.25); cursor: pointer;
  padding: 8px 14px; border-radius: 10px; font-weight: 900; font-size: 13px; color: var(--text-dim);
}
.shop-tabs button.on { background: var(--accent); border-color: var(--accent); color: #2a1a02; }
.shop-tabs button.on .ar { color: #5a3a00; }
.shop-grid { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; padding: 2px 4px 4px 2px; }
.shop-grid.achievements { grid-template-columns: 1fr; gap: 6px; }
.sh-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, 0.28); border: 2px solid rgba(255, 255, 255, 0.08);
}
.sh-card.owned { border-color: rgba(125, 220, 95, 0.35); }
.sh-card.equipped { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(246, 183, 60, 0.15); }
.sh-card canvas { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 45% 40%, #5a8d44, #2a4a22 70%); }
.sh-perk-ico { width: 120px; height: 120px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 45% 40%, #4a3c6a, #221a33 70%); }
.sh-perk-ico svg { width: 64px; height: 64px; }
.sh-name { font-family: var(--font-display); font-size: 16px; line-height: 1.15; }
.sh-sub { font-size: 12px; color: var(--text-dim); font-weight: 700; }
.sh-price { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-display); font-size: 17px; }
.sh-price svg { width: 18px; height: 18px; }
.sh-price.no { color: #ff8a80; }
.sh-owned { font-size: 12px; font-weight: 900; color: var(--ok); }
.sh-btn {
  margin-top: 2px; min-width: 110px; padding: 7px 12px; border-radius: 10px; cursor: pointer;
  border: none; font-weight: 900; font-size: 13px; color: #2a1a02;
  background: linear-gradient(180deg, #ffd56b, var(--accent));
}
.sh-btn:disabled { filter: grayscale(0.8) brightness(0.65); cursor: not-allowed; }
.sh-btn.on { background: rgba(125, 220, 95, 0.25); color: var(--ok); }
.sh-career { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 6px; }
.sh-career div { display: flex; flex-direction: column; align-items: center; padding: 8px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); }
.sh-career b { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--accent); }
.sh-career span { font-size: 11px; font-weight: 800; color: var(--text-dim); }
.sh-ach { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); opacity: 0.7; }
.sh-ach.done { opacity: 1; background: rgba(125, 220, 95, 0.1); }
.sh-ico svg { width: 34px; height: 34px; }
.sh-ach:not(.done) .sh-ico { filter: grayscale(0.9) brightness(0.8); }
.sh-reward { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-display); font-size: 16px; }
.sh-reward svg { width: 18px; height: 18px; }
.sh-ach.done .sh-reward { color: var(--ok); }

/* ---------- match bar & mode panel ---------- */
.match-bar {
  position: absolute; top: 76px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap;
}
.match-bar.night { border-color: rgba(140, 160, 255, 0.35); box-shadow: var(--shadow), 0 0 18px rgba(80, 100, 220, 0.25); }
.mb-clock { display: inline-flex; align-items: center; gap: 5px; color: var(--text-dim); }
.mb-clock svg { width: 18px; height: 18px; }
.mb-clock b { color: var(--text); font-variant-numeric: tabular-nums; }
.mb-timer { font-family: var(--font-display); font-size: 18px; font-variant-numeric: tabular-nums; color: var(--accent); }
.mb-timer.warn { color: #ff6b6b; animation: pulseTxt 0.8s ease-in-out infinite alternate; }
@keyframes pulseTxt { to { opacity: 0.55; } }
.mb-mode { color: var(--text-dim); font-size: 12px; }
.mode-panel {
  position: absolute; top: 114px; left: 50%; transform: translateX(-50%);
  width: 270px; padding: 8px 12px; font-size: 12px; font-weight: 800;
}
.mp-title { font-family: var(--font-display); font-size: 16px; font-weight: 400; margin-bottom: 4px; }
.mp-title b { color: var(--accent); font-weight: 400; }
.mp-line { color: var(--text); margin: 2px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mp-line.dim { color: var(--text-dim); font-size: 11px; }
.mp-line .bad, .bp-info .bad { color: #ff8a80; }
.mp-bar { height: 7px; border-radius: 6px; background: rgba(0, 0, 0, 0.4); overflow: hidden; margin: 4px 0; flex: 1; }
.mp-bar i { display: block; height: 100%; background: #e5484d; border-radius: 6px; transition: width 0.3s; }
.mp-bar.prep i { background: var(--accent); }
.mp-bar.boss i { background: linear-gradient(90deg, #9be35a, #4f7a2a); }
.mp-bar.xp i { background: linear-gradient(90deg, #62d2ff, #b07cf0); }
.mp-boss span { color: #c6f27a; font-size: 11px; }
.mp-crown, .mp-dm { display: grid; grid-template-columns: 10px 76px 1fr 40px; gap: 6px; align-items: center; margin: 2px 0; }
.mp-dm { grid-template-columns: 14px 10px 1fr auto; padding: 1px 4px; border-radius: 6px; }
.mp-dm.me { background: rgba(77, 163, 255, 0.2); }
.mp-dm .rk { color: var(--text-dim); }
.mp-dm b, .mp-crown b { font-family: var(--font-display); font-weight: 400; color: var(--accent); text-align: right; }
.mp-crown .nm, .mp-dm .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #0d1410; flex: none; }
.mp-cards { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mp-card { position: relative; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: rgba(176, 124, 240, 0.25); }
.mp-card svg { width: 18px; height: 18px; }
.mp-card i { position: absolute; right: -3px; bottom: -3px; font-style: normal; font-size: 9px; background: #1d1a17; border-radius: 6px; padding: 0 3px; }
.spectate-bar { top: 168px; }
.elim-banner { top: 210px; }

/* ---------- badges ---------- */
.notc-badge, .stealth-badge {
  position: absolute; bottom: 132px; left: 50%; transform: translateX(-50%);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 900; white-space: nowrap; pointer-events: none;
}
.notc-badge { background: rgba(120, 10, 14, 0.85); border: 1px solid #ff6b6b; color: #ffd6d2; animation: pulseTxt 1s ease-in-out infinite alternate; }
.stealth-badge { bottom: 168px; background: rgba(20, 60, 24, 0.85); border: 1px solid #7ddc5f; color: #c9f5b8; }

/* ---------- army panel ---------- */
.stance-toggle button[data-stance="guard"] { min-width: 0; }
.army-hint { font-size: 10px; font-weight: 800; color: var(--text-dim); margin-top: 4px; line-height: 1.3; }
.bp-btn .cost .have, .tc-cost .have { color: var(--ok); }
.bp-btn .cost .lack, .tc-cost .lack { color: #ff8a80; }
.bp-btn .cost span + span, .tc-cost span + span { margin-left: 5px; }
.bp-btn .cost.lack { color: inherit; }
.train-grid { max-height: 280px; overflow-y: auto; }

/* ---------- hotbar drag & drop ---------- */
.slot { cursor: grab; }
.slot.dragging { opacity: 0.35; }
.slot.drop { outline: 2px dashed var(--accent); outline-offset: 2px; }

/* ---------- market owners ---------- */
.market-owners { font-size: 12px; font-weight: 700; color: var(--text-dim); margin: -4px 0 10px; line-height: 1.6; }
.market-owners b { color: var(--text); }
.mk-owner-list { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.mk-owner { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.25); color: var(--text); }
.mk-owner.me { background: rgba(77, 163, 255, 0.2); }

/* ---------- card picker ---------- */
.card-overlay { z-index: 22; background: radial-gradient(ellipse at center, rgba(40, 20, 70, 0.55), rgba(5, 4, 12, 0.88)); }
.card-wrap { text-align: center; zoom: var(--ui); --zf: var(--ui); }
.card-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 52px; color: #9be7ff; text-shadow: 0 4px 0 #1a2a4a, 0 10px 30px rgba(0, 0, 0, 0.6); }
.card-sub { margin: 4px 0 18px; color: var(--text-dim); font-weight: 800; }
.card-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.pick-card {
  position: relative; width: 210px; min-height: 270px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px 14px 14px; border-radius: 18px; cursor: pointer;
  border: 2px solid rgba(176, 124, 240, 0.55);
  background: linear-gradient(170deg, rgba(60, 40, 100, 0.95), rgba(22, 16, 40, 0.95));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  animation: dealIn 0.45s cubic-bezier(.2, 1.3, .4, 1) both;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.pick-card:hover { transform: translateY(-8px) rotate(-1deg); border-color: var(--accent); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(246, 183, 60, 0.25); }
@keyframes dealIn { from { opacity: 0; transform: translateY(40px) rotate(6deg) scale(0.9); } }
.pc-key { position: absolute; top: 8px; left: 10px; font-family: var(--font-display); font-size: 18px; color: var(--accent); }
.pc-ico { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.08); margin: 6px 0; }
.pc-ico svg { width: 56px; height: 56px; }
.pc-name { font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
.pc-ar { font-family: 'Segoe UI', Tahoma, system-ui, sans-serif; color: var(--text-dim); font-weight: 700; font-size: 13px; }
.pc-desc { font-size: 14px; font-weight: 800; color: #e6dcff; }
.pc-stack { margin-top: auto; font-size: 11px; font-weight: 900; color: var(--text-dim); }

/* ---------- victory / defeat ---------- */
.end-card { max-width: 760px; width: min(760px, 100%); padding: 22px 26px; background: var(--glass-strong); }
.end-card p { margin-bottom: 14px; }
.end-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; margin-bottom: 16px; }
.end-body h4 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 17px; }
.end-stats, .end-rewards { padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.28); }
.es-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; color: var(--text-dim); padding: 2px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.es-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.er-total { display: flex; gap: 14px; justify-content: center; margin: 4px 0 8px; }
.er-total span { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 30px; }
.er-total svg { width: 30px; height: 30px; }
.er-wallet { margin-top: 8px; font-size: 12px; font-weight: 800; color: var(--text-dim); display: flex; align-items: center; gap: 4px; justify-content: center; }
.er-wallet svg { width: 14px; height: 14px; }
.end-actions-row { display: flex; gap: 6px; justify-content: center; }
@media (max-width: 640px) { .end-body { grid-template-columns: 1fr; } .end-card h2 { font-size: 40px; } }

/* Stage 5 layout tweaks: toasts above the hotbar (clear of the match bar & mode panel) */
.toasts { top: auto; bottom: 206px; flex-direction: column-reverse; }
.menu-left .logo { font-size: 44px; }
.army-row { flex-wrap: wrap; }
.army-row .stance-toggle { flex: 1 1 100%; }
.army-row .stance-toggle button { flex: 1; padding: 5px 4px; }

/* =====================================================================
 * Stage 5.5 — performance, lobby, setup, rooms, loading, pause,
 * settings, about/exit, shop economy, podium, boosts, tower branches
 * ===================================================================== */
:root {
  --iron: #1b231f;
  --plate: #27322c;
  --plate-hi: #34433b;
  --brass: #f6b73c;
  --steel: #c9d1d9;
  --ember: #e5484d;
  --cut: 12px; /* forged-plate corner cut */
}

/* live backdrop blur over the 60 FPS canvas costs a full-screen blur pass per panel every frame */
.hud .glass, html.no-blur .glass, .lobby .glass { backdrop-filter: none; -webkit-backdrop-filter: none; }
.hud .glass { background: rgba(14, 24, 19, 0.82); }
html.no-blur .glass { background: rgba(14, 24, 19, 0.9); }
html.no-vignette .lobby-shade { background: none; }

/* ------------------------------------------------------------ lobby */
.lobby { position: fixed; inset: 0; z-index: 18; pointer-events: none; color: var(--text); }
.lobby > * { pointer-events: auto; }
.lobby-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(270deg, rgba(8, 12, 10, 0.86) 0, rgba(8, 12, 10, 0.55) 300px, rgba(8, 12, 10, 0) 560px),
    linear-gradient(180deg, rgba(8, 12, 10, 0.72) 0, rgba(8, 12, 10, 0) 170px),
    linear-gradient(0deg, rgba(8, 12, 10, 0.7) 0, rgba(8, 12, 10, 0) 120px);
}
.lobby.has-panel .lobby-shade { background-color: rgba(8, 12, 10, 0.35); }
.lobby-top { position: absolute; top: 18px; left: 26px; right: 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; pointer-events: none; }
.lobby-top > * { pointer-events: auto; }
.lobby-brand .logo { font-size: 64px; }
.lobby-brand .tagline { margin-top: 6px; }
.lobby-brand .tagline .ar { letter-spacing: 0; text-transform: none; }
.lobby-right-top { display: flex; gap: 10px; align-items: center; }
.lobby-wallet { padding: 6px 8px; border-radius: 14px; background: rgba(14, 22, 18, 0.84); align-items: center; }
.w-add {
  width: 30px; height: 30px; border-radius: 9px; border: none; cursor: pointer;
  font-family: var(--font-display); font-size: 22px; line-height: 1; color: #2a1a02;
  background: linear-gradient(180deg, #ffd56b, var(--brass));
}
.w-add:hover { filter: brightness(1.08); }
.lobby-profile {
  display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 6px; cursor: pointer;
  border-radius: 16px; background: rgba(14, 22, 18, 0.84); color: var(--text); font: inherit; text-align: left;
}
.lobby-profile:hover { border-color: rgba(246, 183, 60, 0.6); }
.lobby-profile #titlePreview { width: 54px; height: 54px; margin: 0; border-width: 2px; }
.lp-who { display: flex; flex-direction: column; }
.lp-who b { font-family: var(--font-display); font-weight: 400; font-size: 19px; line-height: 1.1; }
.lp-who small { color: var(--text-dim); font-weight: 800; font-size: 11px; }

/* the forged-iron command column (C&C-style menu) */
.lobby-menu {
  position: absolute; right: 26px; top: 50%; transform: translateY(-46%);
  width: 300px; display: flex; flex-direction: column; gap: 8px;
}
.lm-btn {
  position: relative; display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px;
  padding: 10px 16px 10px 12px; min-height: 60px; text-align: left; cursor: pointer; color: var(--text);
  border: none; font: inherit;
  background: linear-gradient(180deg, var(--plate-hi), var(--plate) 55%, var(--iron));
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -2px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.lm-btn::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, #ffe08a, var(--brass), var(--accent-deep));
  transform: scaleY(0); transform-origin: center; transition: transform 0.16s ease;
}
.lm-btn:hover, .lm-btn:focus-visible, .lm-btn.on { transform: translateX(-6px); filter: brightness(1.12); outline: none; }
.lm-btn:hover::before, .lm-btn:focus-visible::before, .lm-btn.on::before { transform: scaleY(1); }
.lm-btn:active { transform: translateX(-6px) scale(0.985); }
.lm-ico { width: 44px; height: 44px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.32); clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.lm-ico svg { width: 28px; height: 28px; }
.lm-text { display: flex; flex-direction: column; min-width: 0; }
.lm-text b { font-family: var(--font-display); font-weight: 400; font-size: 21px; line-height: 1.05; letter-spacing: 0.3px; }
.lm-text small { color: var(--text-dim); font-weight: 800; font-size: 11.5px; margin-top: 2px; }
.lm-text small.ar, .lm-text small .ar { font-family: 'Segoe UI', Tahoma, system-ui, sans-serif; }
.lm-btn.primary { background: linear-gradient(180deg, #ffd56b, var(--brass) 50%, var(--accent-deep)); color: #2a1a02; }
.lm-btn.primary .lm-text small { color: #5a3a00; }
.lm-btn.primary .lm-ico { background: rgba(40, 24, 0, 0.25); }
.lm-btn.danger .lm-text b { color: #ffb4ae; }
.lobby-foot { position: absolute; left: 26px; bottom: 14px; font-size: 12px; font-weight: 800; color: rgba(242, 245, 239, 0.55); pointer-events: none; }

/* setup / rooms panel: slides over the battlefield on the left */
.lobby-panel {
  position: absolute; left: 26px; top: 118px; bottom: 40px; right: 352px; max-width: 1060px;
  display: flex; flex-direction: column; padding: 16px 20px 18px; border-radius: 18px;
  background: rgba(13, 21, 17, 0.9); animation: panelIn 0.22s ease;
}
@keyframes panelIn { from { opacity: 0; transform: translateX(-14px); } }
.lp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.lp-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 30px; }
.lp-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: 20px; overflow-y: auto; padding-right: 4px; }
.lp-col { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.lp-col .menu-h { margin-top: 4px; }
.lp-right .seg { align-self: flex-start; flex-wrap: wrap; }
.lp-right .btn-primary.big { margin-top: auto; }

.map-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.map-card {
  display: flex; flex-direction: column; gap: 4px; padding: 8px; text-align: left; cursor: pointer; color: var(--text); font: inherit;
  border: 2px solid rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 0.28); border-radius: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.map-card canvas { width: 100%; height: auto; aspect-ratio: 200 / 104; border-radius: 9px; display: block; }
.map-card:hover { border-color: rgba(246, 183, 60, 0.55); }
.map-card[aria-checked="true"] { border-color: var(--brass); background: rgba(246, 183, 60, 0.13); box-shadow: 0 0 0 3px rgba(246, 183, 60, 0.12); }
.map-name { font-family: var(--font-display); font-size: 17px; line-height: 1.15; }
.map-desc { font-size: 12px; font-weight: 700; color: var(--text-dim); line-height: 1.35; }

.mode-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mode-card.rich { align-items: flex-start; padding: 11px 12px; }
.mode-card.rich .mc-ico { margin-top: 2px; }
.mc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.mc-tags i { font-style: normal; font-size: 11px; font-weight: 800; color: var(--text-dim); background: rgba(255, 255, 255, 0.07); border-radius: 6px; padding: 2px 6px; }
.mc-more { display: none; margin-top: 7px; font-size: 12.5px; font-weight: 700; color: #dfe7da; line-height: 1.4; }
.mc-more ul { margin: 6px 0 0; padding-left: 16px; }
.mc-more li { margin: 2px 0; }
.mc-more li .ar { display: block; margin: 0; font-size: 11.5px; }
.mode-card.rich[aria-checked="true"] .mc-more { display: block; animation: fadeIn 0.2s ease; }
.mode-card.rich[aria-checked="true"] { grid-column: 1 / -1; }
.team-desc, .diff-desc { font-size: 12px; font-weight: 700; color: var(--text-dim); margin-top: -3px; }
.team-desc .ar { margin: 0; }
.bots-row { display: flex; align-items: center; gap: 12px; }
.bots-row input[type="range"] { flex: 1; accent-color: var(--brass); height: 22px; }
.bots-row b { font-family: var(--font-display); font-weight: 400; font-size: 26px; min-width: 34px; text-align: center; color: var(--brass); }
.seed-row { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.seed-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.seed-row .ar { display: block; margin: 0; }

/* multiplayer foundation */
.mp-banner { font-size: 12.5px; font-weight: 700; line-height: 1.45; padding: 8px 12px; border-radius: 12px; background: rgba(77, 163, 255, 0.12); border: 1px solid rgba(77, 163, 255, 0.35); margin-bottom: 10px; }
.mp-banner .ar { display: block; margin: 2px 0 0; }
.mp-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.mp-tabs button { border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.25); cursor: pointer; padding: 8px 14px; border-radius: 10px; font-weight: 900; font-size: 13px; color: var(--text-dim); }
.mp-tabs button.on { background: var(--brass); border-color: var(--brass); color: #2a1a02; }
.mp-tabs button.on .ar { color: #5a3a00; }
.lp-body.mp-browse { display: flex; flex-direction: column; gap: 10px; }
.mp-join { display: flex; gap: 8px; align-items: center; }
.mp-join input, .room-head input[type="text"], .room-head input:not([type]) {
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 10px; color: var(--text);
  padding: 9px 12px; font: 800 15px var(--font-body); letter-spacing: 2px; text-transform: uppercase; width: 180px;
}
.room-head input:not([type]) { text-transform: none; letter-spacing: 0; width: 220px; }
.room-list { flex: 1; min-height: 120px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); padding: 14px; }
.room-empty { color: var(--text-dim); font-weight: 700; font-size: 13.5px; line-height: 1.5; text-align: center; padding: 22px 10px; }
.room-empty b { color: var(--text); }
.room-empty .ar { display: block; margin: 4px 0 0; }
.lp-body.mp-host { display: flex; flex-direction: column; gap: 10px; }
.room-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-weight: 800; font-size: 13px; color: var(--text-dim); }
.room-head label { display: flex; align-items: center; gap: 8px; }
.room-code b { font-family: var(--font-display); font-weight: 400; font-size: 20px; letter-spacing: 3px; color: var(--brass); margin-left: 6px; }
.room-body { flex: none; overflow: visible; }
.room-slots { border-radius: 14px; background: rgba(0, 0, 0, 0.25); padding: 10px 14px; font-size: 13px; font-weight: 700; }
.room-slots h4 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 17px; }
.room-slots ol { margin: 0; padding-left: 20px; columns: 2; }
.room-slots li { margin: 2px 0; }
.room-slots li.me b { color: var(--brass); }
.team-tag { font-style: normal; font-size: 10.5px; font-weight: 900; border-radius: 5px; padding: 1px 6px; margin-left: 4px; background: rgba(255, 255, 255, 0.12); }
.team-tag.t0 { background: rgba(77, 163, 255, 0.35); } .team-tag.t1 { background: rgba(229, 72, 77, 0.35); } .team-tag.t2 { background: rgba(242, 193, 78, 0.35); }
.team-tag.t3 { background: rgba(125, 220, 95, 0.35); } .team-tag.t4 { background: rgba(176, 124, 240, 0.35); }
.dim { color: var(--text-dim); }

/* ---------------------------------------------------- loading + pre-roll */
.overlay.loading { z-index: 40; background: radial-gradient(ellipse at center, #13231b, #050a08 75%); }
.ld-card { width: min(700px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ld-mode { font-family: var(--font-display); font-size: 20px; color: var(--brass); }
.ld-ad { width: 100%; }
.ad-clip { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.ad-clip canvas, .ad-clip video { width: 100%; height: 100%; display: block; }
.ad-badge { position: absolute; top: 10px; right: 10px; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 900; background: rgba(0, 0, 0, 0.65); color: #ffe08a; }
.ad-close { position: absolute; top: 8px; left: 8px; width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer; background: rgba(0, 0, 0, 0.65); color: #fff; font-weight: 900; }
.ld-status { font-weight: 800; color: var(--text-dim); font-size: 14px; min-height: 20px; }
.ld-bar { width: min(420px, 90%); height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--accent-deep), #ffe08a); transition: width 0.25s ease; }
.ld-tip { font-size: 13px; font-weight: 700; color: #cfd8cb; max-width: 560px; }
.ad-overlay { z-index: 45; background: rgba(0, 0, 0, 0.82); }
.ad-modal-card { width: min(760px, 100%); }

/* -------------------------------------------------------------- pause */
.pause-overlay, .about-overlay { z-index: 30; }
.pause-card { width: min(380px, 100%); padding: 24px 24px 18px; display: flex; flex-direction: column; gap: 10px; text-align: center; background: var(--glass-strong); }
.pause-card h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 34px; }
.pause-sub { margin: 0 0 4px; color: var(--text-dim); font-weight: 800; }
.pause-card .btn-ghost { text-decoration: none; padding: 11px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); color: var(--text); font-size: 16px; }
.pause-card .btn-ghost:hover { background: rgba(255, 255, 255, 0.13); }
.pause-card .btn-ghost.danger { color: #ffb4ae; }
.pause-note { margin: 4px 0 0; font-size: 12px; font-weight: 700; color: var(--text-dim); line-height: 1.45; }
.pause-note .ar { display: block; margin: 2px 0 0; }
.btn-primary.danger-fill { background: linear-gradient(180deg, #ff8589, var(--ember)); box-shadow: 0 5px 0 #8a1d20; color: #2a0505; }

/* ----------------------------------------------------------- settings */
.settings-overlay { z-index: 35; }
.settings-card { width: min(860px, 100%); max-height: calc(var(--vh100) - 32px); display: flex; flex-direction: column; padding: 18px 20px; background: var(--glass-strong); }
.settings-card .shop-head { grid-template-columns: 1fr auto; }
.settings-body { overflow-y: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 12px; }
.st-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--text-dim); }
.st-top p { margin: 0; }
.st-top .btn-ghost { white-space: nowrap; }
.st-group { padding: 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; gap: 6px; }
.st-group h4 { margin: 0 0 2px; font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.st-bind { display: grid; grid-template-columns: 1fr 130px 130px; gap: 8px; align-items: center; padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.st-name { font-size: 13.5px; font-weight: 800; }
.st-name .ar { font-size: 11.5px; }
.st-key {
  height: 32px; border-radius: 9px; cursor: pointer; font: 900 13px var(--font-body); color: var(--text);
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-bottom-width: 3px;
}
.st-key:hover { background: rgba(255, 255, 255, 0.16); }
.st-key.empty { color: var(--text-dim); border-style: dashed; }
.st-key.listening { background: rgba(246, 183, 60, 0.25); border-color: var(--brass); color: #ffe08a; animation: listen 0.9s ease-in-out infinite; }
@keyframes listen { 50% { box-shadow: 0 0 0 4px rgba(246, 183, 60, 0.25); } }
.st-toggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; font-weight: 800; font-size: 14px; cursor: pointer; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.st-toggle input { appearance: none; -webkit-appearance: none; width: 44px; height: 24px; border-radius: 12px; background: rgba(255, 255, 255, 0.18); position: relative; cursor: pointer; transition: background 0.15s; flex: none; }
.st-toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.st-toggle input:checked { background: var(--ok); }
.st-toggle input:checked::after { transform: translateX(20px); }
.st-toggle input:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.st-toggles { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
.st-toggles h4 { grid-column: 1 / -1; }
.st-slider { display: grid; grid-template-columns: 180px 1fr 52px; gap: 12px; align-items: center; font-weight: 800; font-size: 14px; }
.st-slider input { accent-color: var(--brass); }
.st-slider b { font-family: var(--font-display); font-weight: 400; color: var(--brass); text-align: right; }
.st-seg { align-self: flex-start; }
.st-desc { margin: 0; font-size: 13px; font-weight: 700; color: #cfd8cb; line-height: 1.5; }

/* --------------------------------------------------------- about / exit */
.about-card { position: relative; width: min(520px, 100%); padding: 26px 28px; text-align: center; background: var(--glass-strong); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.about-close { position: absolute; top: 12px; right: 12px; }
.about-ver { margin: 0; color: var(--text-dim); font-weight: 800; }
.credits { width: 100%; display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.credit { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.28); }
.credit span { font-size: 12px; font-weight: 900; color: var(--text-dim); letter-spacing: 0.4px; }
.credit b { font-family: var(--font-display); font-weight: 400; font-size: 26px; color: var(--brass); }
.credit small { font-size: 13px; }
.about-tech { margin: 0; font-size: 13px; font-weight: 700; color: var(--text-dim); }
.goodbye { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; background: radial-gradient(ellipse at center, #13231b, #030605 75%); }
.goodbye p { margin: 0; font-weight: 800; color: var(--text-dim); }
.goodbye .ar { display: block; margin: 4px 0 0; }

/* -------------------------------------------------------- shop economy */
.sh-prices { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.sh-or { font-size: 11px; font-weight: 900; color: var(--text-dim); }
.sh-price small { font-family: var(--font-body); font-size: 10.5px; font-weight: 800; color: var(--text-dim); margin-left: 3px; }
.sh-buyrow { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.sh-buyrow .sh-btn { min-width: 0; display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px; }
.sh-buyrow .sh-btn svg { width: 16px; height: 16px; }
.sh-btn.sh-buy-gems { background: linear-gradient(180deg, #a8e9ff, #62d2ff); }
.sh-life { display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; justify-content: center; }
.sh-life svg { width: 14px; height: 14px; }
.sh-note { grid-column: 1 / -1; padding: 10px 14px; border-radius: 12px; background: rgba(77, 163, 255, 0.1); border: 1px solid rgba(77, 163, 255, 0.28); font-size: 12.5px; font-weight: 700; line-height: 1.5; text-align: left; }
.sh-note .ar { display: block; margin: 3px 0 0; }
.sh-card.sh-pack { position: relative; }
.sh-tag { position: absolute; top: 8px; right: 8px; font-size: 10.5px; font-weight: 900; color: #2a1a02; background: var(--warn); border-radius: 6px; padding: 2px 6px; }
.sh-btn.sh-usd { background: linear-gradient(180deg, #b6f5a1, var(--ok)); }
.sh-adcard { border-color: rgba(98, 210, 255, 0.4); }
.shop-flash { margin: -4px 0 10px; padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 800; background: rgba(242, 193, 78, 0.16); border: 1px solid rgba(242, 193, 78, 0.45); color: #ffe3a3; }

/* -------------------------------------------------------- podium (end) */
.end-podium:empty { display: none; }
.end-podium { margin: 0 0 14px; }
.pod-title { font-family: var(--font-display); font-size: 17px; margin-bottom: 8px; }
.pod-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px 0; border-radius: 14px 14px 0 0; background: rgba(0, 0, 0, 0.25); min-width: 0; }
.pod.me { box-shadow: 0 0 0 2px var(--brass) inset; }
.pod-medal { font-size: 34px; line-height: 1; }
.pod-name { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-name .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pod-sub { font-size: 11px; font-weight: 800; color: var(--text-dim); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-score { font-size: 12px; font-weight: 900; }
.pod-prize { font-family: var(--font-display); font-size: 16px; color: var(--brass); }
.pod-step { width: 100%; margin-top: 6px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, rgba(246, 183, 60, 0.4), rgba(246, 183, 60, 0.08)); }
.pod.p1 .pod-step { height: 54px; } .pod.p2 .pod-step { height: 34px; } .pod.p3 .pod-step { height: 20px; }
.end-actions-main { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-primary.alt { background: linear-gradient(180deg, #3c4c43, #27322c); color: var(--text); box-shadow: 0 5px 0 #121915; }
.btn-primary .ar { color: inherit; opacity: 0.75; }

/* --------------------------------------------------- one-life boost bar */
.boost-bar { position: absolute; left: 50%; transform: translateX(-50%); top: 104px; padding: 5px 8px 6px; border-radius: 12px; z-index: 3; }
.bb-title { font-size: 10.5px; font-weight: 900; color: var(--text-dim); text-align: center; margin-bottom: 3px; }
.bb-title .ar { font-size: 10.5px; }
.bb-row { display: flex; gap: 5px; }
.bb-perk { display: flex; flex-direction: row; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 9px; background: rgba(0, 0, 0, 0.3); }
.bb-perk .bb-ico svg { width: 18px; height: 18px; }
.bb-perk.on { background: rgba(125, 220, 95, 0.18); box-shadow: 0 0 0 1px rgba(125, 220, 95, 0.5) inset; }
.bb-ico svg { width: 22px; height: 22px; }
.bb-name { font-size: 10.5px; font-weight: 900; white-space: nowrap; }
.bb-buy { display: flex; gap: 3px; }
.bb-buy button { display: inline-flex; align-items: center; gap: 2px; border: none; border-radius: 7px; padding: 2px 5px; font: 900 11px var(--font-body); cursor: pointer; color: #2a1a02; background: linear-gradient(180deg, #ffd56b, var(--brass)); }
.bb-buy button[data-cur="gems"] { background: linear-gradient(180deg, #a8e9ff, #62d2ff); }
.bb-buy button:disabled { filter: grayscale(0.85) brightness(0.6); cursor: not-allowed; }
.bb-buy svg { width: 12px; height: 12px; }
.bb-active { font-size: 10px; font-weight: 900; color: var(--ok); }

/* ------------------------------------------------ tower specialisation */
.bp-branch-title { font-weight: 900; color: #ffe08a; }
.bp-btn.bp-branch.bp-ballista { border-color: rgba(169, 179, 189, 0.6); }
.bp-btn.bp-branch.bp-fire { border-color: rgba(255, 120, 40, 0.65); }
.help-foot { margin: 8px 0 0; font-size: 11.5px; font-weight: 700; color: var(--text-dim); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .lobby-panel { right: 26px; top: 112px; bottom: 26px; z-index: 2; }
  .lobby.has-panel .lobby-menu { display: none; }
  .lp-body { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .lobby-brand .logo { font-size: 40px; }
  .lobby-top { flex-direction: column; left: 16px; right: 16px; }
  .lobby-menu { right: 16px; left: 16px; width: auto; top: auto; bottom: 34px; transform: none; display: grid; grid-template-columns: 1fr 1fr; }
  .lm-btn { min-height: 52px; }
  .lm-text small { display: none; }
  .lobby-panel { left: 16px; right: 16px; top: 150px; }
  .map-cards { grid-template-columns: 1fr; }
  .st-bind { grid-template-columns: 1fr 96px 96px; }
  .st-toggles { grid-template-columns: 1fr; }
  .st-slider { grid-template-columns: 1fr; }
  .pod-row { gap: 6px; }
  .end-actions-main { grid-template-columns: 1fr; }
  .boost-bar { top: auto; bottom: 150px; }
  .bb-perk { min-width: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .lm-btn, .lm-btn::before, .lobby-panel, .st-key.listening { transition: none; animation: none; }
}
/* setup panel: each column scrolls on its own, so the Play button never leaves the screen */
/* clip (not hidden): the body itself can never be scrolled by focus / scrollIntoView, only its columns */
.lp-body { overflow: hidden; overflow: clip; }
.lp-body > .lp-col { overflow-y: auto; padding-right: 6px; padding-bottom: 2px; }
.lp-right .btn-primary.big { position: sticky; bottom: 0; z-index: 1; }
.lp-body.mp-browse, .lp-body.mp-host { overflow-y: auto; }
.room-body.lp-body { overflow: visible; }
.room-body.lp-body > .lp-col { overflow: visible; }
@media (max-width: 1100px) {
  .lp-body { overflow-y: auto; }
  .lp-body > .lp-col { overflow: visible; }
}
.sh-life { white-space: nowrap; font-size: 11px; }
/* setup panel on laptop screens: two mode columns from 410 px, compact map cards on short screens */
.lp-left .mode-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
@media (max-height: 860px) and (min-width: 1101px) {
  .map-card canvas { aspect-ratio: 200 / 68; }
  .map-card .map-desc { display: none; }
  .mode-card.rich { padding: 9px 11px; }
  .mc-more { margin-top: 5px; font-size: 12px; }
  .mc-more li .ar { display: none; }
}
.kingdom-list li.k-gap { display: block; text-align: center; font-size: 10.5px; padding: 0; color: var(--text-dim); opacity: 0.8; }
/* the right column never runs into the Build / Craft buttons: the kingdoms list gives way and scrolls */
.right-col { max-height: calc((var(--vh100) - 112px) / var(--ui, 1)); }
.right-col .minimap-wrap, .right-col .army-panel { flex: none; }
.right-col .kingdom-panel { min-height: 0; display: flex; flex-direction: column; overflow: hidden; flex: none; }
/* v1.3.3f the kingdoms list always shows at least three kingdoms and scrolls inside itself; when the column is full
   it is the army panel that gives way (it scrolls too) — the list used to shrink to its title */
.right-col .kingdom-panel .kingdom-list { flex: none; min-height: 76px; max-height: 214px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.right-col .army-panel { flex: 0 1 auto; min-height: 118px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }

/* =====================================================================
 * v1.0 — Survival.io v1.0 - Albatta Studio
 * ===================================================================== */

/* ---------- map cards: clean frames, no overlap, warm orange glow + lift ---------- */
.map-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 6px 6px 12px; }
.map-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0;
  padding: 8px 8px 10px; border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.32));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transform: scale(1); transform-origin: center; isolation: isolate; z-index: 0;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.map-card .map-thumb { position: relative; display: block; border-radius: 11px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.5); }
.map-card .map-thumb canvas { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; border-radius: 0; }
.map-check {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #2a1a02;
  background: #ff9f2e; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45), 0 0 10px rgba(255, 150, 40, 0.8);
  opacity: 0; transform: scale(0.6); transition: opacity 0.15s ease, transform 0.15s ease;
}
.map-card .map-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-family: var(--font-display); }
.map-card .map-name b { font-weight: 400; font-size: 17px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-card .map-name .ar { margin: 0; font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-card .map-desc { font-size: 11.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.map-card:hover {
  transform: scale(1.03); z-index: 2; border-color: rgba(255, 152, 46, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 140, 40, 0.18), 0 0 22px rgba(255, 140, 40, 0.38), 0 8px 18px rgba(0, 0, 0, 0.4);
}
.map-card[aria-checked="true"] {
  transform: scale(1.035); z-index: 1; border-color: #ff9a2e;
  background: linear-gradient(180deg, rgba(255, 154, 46, 0.18), rgba(0, 0, 0, 0.32));
  box-shadow: 0 0 0 3px rgba(255, 140, 40, 0.3), 0 0 28px rgba(255, 140, 40, 0.55), 0 8px 20px rgba(0, 0, 0, 0.45);
}
.map-card[aria-checked="true"]:hover { transform: scale(1.05); }
.map-card[aria-checked="true"] .map-check { opacity: 1; transform: scale(1); }
.map-card:focus-visible { outline: 3px solid rgba(255, 170, 70, 0.9); outline-offset: 2px; }
@media (max-height: 860px) and (min-width: 1101px) {
  .map-card .map-thumb canvas { aspect-ratio: 3 / 1; }
  .map-card .map-desc { display: none; }
  .map-card .map-name b { font-size: 16px; }
}
@media (max-width: 720px) { .map-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .map-card .map-name b { font-size: 15px; } }
@media (prefers-reduced-motion: reduce) { .map-card, .map-card:hover, .map-card[aria-checked="true"] { transition: none; transform: none; } }

/* ---------- version labels ---------- */
.lobby-foot { color: rgba(255, 214, 150, 0.7); letter-spacing: 0.2px; }
.ld-ver, .pause-ver, .help-ver { margin: 8px 0 0; font-size: 11px; font-weight: 800; color: rgba(242, 245, 239, 0.5); text-align: center; }
.help-ver { text-align: left; }
.hud-ver { position: fixed; left: 10px; bottom: 4px; z-index: 4; font-size: 10px; font-weight: 800; color: rgba(242, 245, 239, 0.35); pointer-events: none; }
.about-ver { font-family: var(--font-display); font-size: 18px; color: #ffd27a; }
.about-sub { margin: -4px 0 10px; font-size: 12px; font-weight: 800; color: var(--text-dim); }

/* ---------- wallet: rank + coins + gems ---------- */
.w-rank small { font-size: 11px; font-weight: 900; margin-left: 4px; letter-spacing: 0.2px; }
.wallet.big .w-rank small { font-size: 12px; }
.lp-title { color: #ffd27a !important; font-weight: 900 !important; }

/* ---------- account chip + modal + Google button ---------- */
.acc-chip {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--glass-border); color: var(--text); text-align: left; max-width: 210px;
}
.acc-chip:hover { border-color: rgba(246, 183, 60, 0.6); }
.acc-chip.signed { border-color: rgba(125, 220, 95, 0.5); }
.acc-chip img, .acc-g { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.acc-g { display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); font-weight: 900; font-size: 16px; }
.acc-chip.signed .acc-g { background: #fff; color: #4285f4; }
.acc-who { display: flex; flex-direction: column; min-width: 0; }
.acc-who b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-who small { font-size: 10.5px; font-weight: 800; color: var(--text-dim); white-space: nowrap; }
.account-card { position: relative; width: min(520px, 94vw); max-height: calc(var(--vh1) * 90); overflow-y: auto; padding: 22px 24px; border-radius: 20px; background: rgba(13, 21, 17, 0.94); }
.account-card h2 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 400; font-size: 26px; }
.account-card h4 { margin: 16px 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 17px; }
.acc-card { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); }
.acc-card small { display: block; color: var(--text-dim); font-weight: 700; font-size: 12px; }
.acc-card .acc-sync { color: var(--ok); }
.acc-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #fff; color: #4285f4; font-weight: 900; font-size: 22px; flex: none; }
.acc-avatar img { width: 100%; height: 100%; }
.acc-desc { font-size: 13px; font-weight: 700; line-height: 1.5; color: #dfe7da; }
.acc-desc .ar { display: block; margin: 4px 0 0; }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-ghost.danger { color: #ffb4ae; border-color: rgba(229, 72, 77, 0.5); }
.acc-note { min-height: 0; margin: 8px 0 0; font-size: 12.5px; font-weight: 800; line-height: 1.45; }
.acc-note:empty { display: none; }
.acc-note.warn { color: var(--warn); }
.acc-note.error { color: #ffb4ae; }
.acc-note.ok { color: var(--ok); }
.acc-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; font-weight: 700; }
.acc-hist li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 6px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); }
.acc-hist b { color: #62d2ff; }
.acc-hist li.refunded { opacity: 0.6; }
.acc-hist li.refunded b { color: #c9d1d9; text-decoration: line-through; }
.btn-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 18px;
  border-radius: 12px; border: 1px solid #dadce0; background: #fff; color: #1f1f1f; cursor: pointer;
  font: 800 15px var(--font-body); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); transition: transform 0.12s, box-shadow 0.12s;
}
.btn-google svg { width: 22px; height: 22px; flex: none; }
.btn-google:hover:not(:disabled) { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); transform: translateY(-1px); }
.btn-google:disabled { opacity: 0.6; cursor: progress; }

/* ---------- onboarding: Google next to "Continue as Guest" ---------- */
.ob-footer { flex-direction: column; align-items: stretch; gap: 8px; }
.ob-auth { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.ob-auth .btn-primary { min-width: 230px; width: auto; }
.ob-or { font-weight: 900; color: var(--text-dim); font-size: 13px; text-transform: uppercase; }
.ob-footer .save-note { text-align: center; }
.ob-footer .save-note .ar { display: block; margin: 2px 0 0; }
.ob-auth-note { margin: 0; text-align: center; font-size: 12.5px; font-weight: 800; }
.ob-auth-note:empty { display: none; }
.ob-auth-note.warn { color: var(--warn); } .ob-auth-note.error { color: #ffb4ae; } .ob-auth-note.ok { color: var(--ok); }
@media (max-width: 720px) { .ob-auth { flex-direction: column; align-items: stretch; } .ob-auth .btn-primary, .btn-google { width: 100%; } .ob-or { text-align: center; } }

/* ---------- shop v1.0: tiers, upgrades, sections, payments ---------- */
.sh-section { grid-column: 1 / -1; margin: 6px 2px 0; font-family: var(--font-display); font-size: 18px; color: #ffd27a; }
.sh-section small { font-family: var(--font-body); font-size: 12px; font-weight: 800; color: var(--text-dim); margin-left: 6px; }
.sh-tier { display: inline-block; font-size: 10.5px; font-weight: 900; letter-spacing: 0.4px; text-transform: uppercase; border-radius: 6px; padding: 1px 7px; margin: 2px auto 0; }
.sh-tier .ar { font-size: 10px; text-transform: none; color: inherit; opacity: 0.8; margin-inline-start: 3px; }
.sh-tier.common { background: rgba(169, 184, 173, 0.18); color: #cfd8d1; }
.sh-tier.rare { background: rgba(77, 163, 255, 0.22); color: #9fd0ff; }
.sh-tier.epic { background: rgba(176, 124, 240, 0.25); color: #e1c9ff; }
.sh-card.tier-rare { border-color: rgba(77, 163, 255, 0.35); }
.sh-card.tier-epic { border-color: rgba(176, 124, 240, 0.45); box-shadow: inset 0 0 22px rgba(176, 124, 240, 0.12); }
.sh-card.equipped { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(246, 183, 60, 0.15); }
.sh-buyrow { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.sh-buyrow .sh-btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.sh-buyrow .sh-btn svg, .sh-price svg { width: 16px; height: 16px; }
.sh-upgrade .sh-pips { display: flex; gap: 4px; align-items: center; justify-content: center; }
.sh-pips i { width: 16px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); }
.sh-pips i.on { background: linear-gradient(90deg, #ffd56b, var(--accent)); box-shadow: 0 0 6px rgba(246, 183, 60, 0.6); }
.sh-pips b { margin-left: 6px; font-size: 12px; color: var(--text-dim); }
.sh-next { color: #ffe9b8 !important; }
.sh-note.sh-paynote { grid-column: 1 / -1; }
.sh-paynote.test { border-color: rgba(242, 193, 78, 0.55); background: rgba(242, 193, 78, 0.1); }
.sh-paynote.ok { border-color: rgba(125, 220, 95, 0.45); background: rgba(125, 220, 95, 0.08); }
.sh-paynote .sh-signin { margin-left: 8px; padding: 4px 10px; }
.sh-hist { margin-top: 6px; font-size: 11.5px; color: var(--text-dim); }
.sh-career { grid-column: 1 / -1; }
.sh-rankbox { position: relative; overflow: hidden; border: 1px solid var(--rk, #c58b5a); }
.sh-rankbox b { color: var(--rk, #c58b5a) !important; }
.sh-rankbox i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--rk, #c58b5a); }
.sh-titles { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); font-size: 13px; font-weight: 800; }
.sh-tchip { border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); color: var(--text); border-radius: 999px; padding: 3px 11px; cursor: pointer; font: 800 12px var(--font-body); }
.sh-tchip.on { background: var(--accent); color: #2a1a02; border-color: var(--accent); }
.sh-ach.tiered { grid-column: 1 / -1; }
.sh-stars i { font-style: normal; color: rgba(255, 255, 255, 0.2); font-size: 13px; }
.sh-stars i.on { color: #ffd166; text-shadow: 0 0 6px rgba(255, 209, 102, 0.7); }
.sh-bar { position: relative; height: 14px; margin-top: 5px; border-radius: 7px; background: rgba(0, 0, 0, 0.4); overflow: hidden; }
.sh-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb347, #ffd56b); }
.sh-bar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; }
.sh-reward { display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; justify-content: flex-end; font-weight: 900; }
.sh-reward svg { width: 15px; height: 15px; }
.sh-reward small { display: block; width: 100%; text-align: right; font-size: 10.5px; color: #ffd27a; }

/* ---------- card picker families ---------- */
.card-legend { display: flex; gap: 8px; justify-content: center; margin: -10px 0 14px; }
.card-legend i { font-style: normal; font-size: 11px; font-weight: 900; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.f-attack { color: #ff8a8d; } .f-defense { color: #8cc6ff; } .f-magic { color: #d8b8ff; } .f-resource { color: #ffd77a; }
.pick-card.fam-attack { border-color: rgba(229, 72, 77, 0.55); background: linear-gradient(180deg, rgba(229, 72, 77, 0.16), rgba(14, 20, 18, 0.95) 55%); }
.pick-card.fam-defense { border-color: rgba(77, 163, 255, 0.55); background: linear-gradient(180deg, rgba(77, 163, 255, 0.16), rgba(14, 20, 18, 0.95) 55%); }
.pick-card.fam-magic { border-color: rgba(176, 124, 240, 0.6); background: linear-gradient(180deg, rgba(176, 124, 240, 0.18), rgba(14, 20, 18, 0.95) 55%); }
.pick-card.fam-resource { border-color: rgba(244, 197, 66, 0.6); background: linear-gradient(180deg, rgba(244, 197, 66, 0.16), rgba(14, 20, 18, 0.95) 55%); }
.pc-fam { font-size: 10.5px; font-weight: 900; letter-spacing: 0.6px; text-transform: uppercase; }
.pc-once { font-size: 10px; font-weight: 900; color: #fff; background: rgba(255, 255, 255, 0.14); border-radius: 6px; padding: 1px 6px; }

/* ---------- HUD bits ---------- */
.hud-title { display: block; margin: -4px 0 4px; font-size: 11px; font-weight: 900; color: #ffd27a; letter-spacing: 0.3px; }
.er-warn { margin: 6px 0; padding: 6px 10px; border-radius: 10px; background: rgba(229, 72, 77, 0.16); color: #ffb4ae; font-size: 12.5px; font-weight: 800; }
.er-total svg { width: 22px; height: 22px; }
.st-tag { font-style: normal; font-size: 10px; font-weight: 900; border-radius: 5px; padding: 1px 6px; margin-left: 4px; background: rgba(246, 183, 60, 0.22); color: #ffd27a; }
.st-tag.dim { background: rgba(255, 255, 255, 0.08); color: var(--text-dim); }
.bots-sub { margin-top: -2px; }

/* ---------- LAN rooms ---------- */
.room-msg { margin: 0 0 10px; padding: 7px 10px; border-radius: 10px; background: rgba(242, 193, 78, 0.12); color: #ffe39a; font-size: 13px; font-weight: 800; }
.room-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); margin-bottom: 8px; }
.rr-main { display: flex; flex-direction: column; min-width: 0; }
.rr-main b { font-size: 15px; }
.rr-main small { color: var(--text-dim); font-weight: 700; font-size: 12px; }
.rr-setup { color: #cfe3c8 !important; }
.rr-count { font-weight: 900; font-size: 13px; color: var(--brass); white-space: nowrap; }
.room-joined h4 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 20px; }
.room-joined p { margin: 4px 0 8px; font-size: 13px; font-weight: 700; }
.room-slots-list { margin: 0 0 8px; padding-left: 22px; columns: 2; font-size: 13px; font-weight: 700; }
.room-slots-list li.me b, .room-slots li.me b { color: var(--brass); }
.room-slots li.warn { color: var(--warn); list-style: none; }
.room-slots .kick { margin-left: 6px; border: 0; border-radius: 6px; background: rgba(229, 72, 77, 0.3); color: #fff; cursor: pointer; font-size: 11px; padding: 1px 6px; }

/* ---------- touch controls (phones & tablets) ---------- */
.touch-ui { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.touch-ui .tz { position: absolute; bottom: 0; top: 32%; pointer-events: auto; touch-action: none; }
.touch-ui .tz-move { left: 0; width: 44%; }
.touch-ui .tz-aim { right: 0; width: 34%; bottom: 210px; }
.touch-ui .stick { position: absolute; left: 96px; top: calc(100% - 120px); width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.2); opacity: 0.35; transition: opacity 0.15s; }
.touch-ui .stick.live { opacity: 1; }
.touch-ui .stick i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, 0.6); transform: translate(-50%, -50%); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.touch-ui .stick.aim i { background: rgba(229, 72, 77, 0.75); }
.touch-ui .t-btns { position: absolute; right: 14px; bottom: 16px; display: grid; grid-template-columns: repeat(4, 58px); gap: 8px; pointer-events: auto; }
.touch-ui .t-btn {
  width: 58px; height: 58px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); background: rgba(14, 24, 19, 0.66);
  color: #fff; font: 900 12px var(--font-body); touch-action: none; -webkit-tap-highlight-color: transparent; transition: transform 0.08s;
}
.touch-ui .t-btn.big { grid-row: span 2; width: 58px; height: 124px; border-radius: 29px; font-size: 22px; background: rgba(246, 183, 60, 0.78); color: #2a1a02; }
.touch-ui .t-btn.down { transform: scale(0.9); background: rgba(246, 183, 60, 0.92); color: #2a1a02; }
.touch-ui .t-pause { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 46px; height: 46px; pointer-events: auto; }
.touch-ui .t-place { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); display: flex; gap: 12px; pointer-events: auto; }
.touch-ui .t-place .t-btn { width: auto; height: 54px; border-radius: 27px; padding: 0 22px; font-size: 15px; }
.touch-ui .t-place .ok { background: rgba(125, 220, 95, 0.9); color: #10240a; }
.touch-ui .t-place .no { background: rgba(229, 72, 77, 0.85); }
html.touch-play .hotbar-wrap { bottom: 86px; }
html.touch-play .help-panel, html.touch-play .hud-ver { display: none; }
html.touch-play .action-buttons { bottom: 150px; }
@media (max-width: 720px) { .touch-ui .t-btns { grid-template-columns: repeat(4, 50px); } .touch-ui .t-btn { width: 50px; height: 50px; } .touch-ui .t-btn.big { width: 50px; height: 108px; } }

/* gamepad focus ring for every menu button */
button:focus-visible, [role="radio"]:focus-visible { outline: 3px solid rgba(255, 170, 70, 0.95); outline-offset: 2px; }


/* =====================================================================
 * v1.0 — phone layout while the touch controls are on (landscape phones
 * are wider than the 900 px breakpoints but only ~360–430 px tall)
 * ===================================================================== */
.icon-btn.touch-only { display: none; }
html.touch-play .icon-btn.touch-only { display: grid; }
html.touch-play .touch-ui .t-pause { display: none; }   /* the HUD row carries the pause button */
@media (max-height: 640px) {
  html.touch-play .hud { zoom: calc(var(--ui) * 0.74); --zf: calc(var(--ui) * 0.74); }
  html.touch-play .elim-banner, html.touch-play .end-card { zoom: calc(var(--ui) * 0.8); --zf: calc(var(--ui) * 0.8); }
  html.touch-play .kingdom-panel,
  html.touch-play .action-buttons,
  html.touch-play .army-hint,
  html.touch-play .help-panel,
  html.touch-play .quest-panel,
  html.touch-play .equipped-label { display: none !important; }
  html.touch-play #minimap { width: 128px; height: 128px; display: block; margin: 0 auto; }
  html.touch-play .right-col { width: 170px; }
  html.touch-play .hotbar-wrap { bottom: 10px; }
  .touch-ui .t-btns { right: 10px; bottom: 10px; grid-template-columns: repeat(4, 50px); gap: 6px; }
  .touch-ui .t-btn { width: 50px; height: 50px; font-size: 13px; }
  .touch-ui .t-btn.big { width: 50px; height: 106px; border-radius: 25px; }
  .touch-ui .tz-aim { bottom: 124px; top: 40%; width: 30%; }
  .touch-ui .tz-move { top: 40%; width: 40%; }
  .touch-ui .stick { left: 84px; top: calc(100% - 92px); width: 112px; height: 112px; margin: -56px 0 0 -56px; }
  .touch-ui .t-place { bottom: 120px; }
}
@media (max-height: 420px) {
  html.touch-play .hud { zoom: calc(var(--ui) * 0.66); --zf: calc(var(--ui) * 0.66); }
  html.touch-play .match-bar .mb-mode { display: none; }
}

/* v1.0 — short landscape screens (phones ~360–430 px tall, small laptops): a compact lobby that fits */
@media (max-height: 560px) and (min-width: 721px) {
  .lobby-top { top: 8px; left: 14px; right: 12px; gap: 10px; }
  .lobby-brand .logo { font-size: 34px; }
  .lobby-brand .tagline { display: none; }
  .lobby-right-top { gap: 6px; zoom: 0.78; --zf: 0.78; }
  .lobby-profile .lp-who small:not(.lp-title) { display: none; }
  .lobby-menu { top: auto; bottom: 12px; right: 12px; transform: none; width: min(560px, 60vw); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .lm-btn { min-height: 44px; padding: 6px 10px 6px 8px; grid-template-columns: 32px 1fr; gap: 8px; }
  .lm-ico { width: 32px; height: 32px; }
  .lm-ico svg { width: 22px; height: 22px; }
  .lm-text b { font-size: 16px; }
  .lm-text small { display: none; }
  .lobby-foot { bottom: 6px; left: 14px; font-size: 10px; }
  .lobby-panel { top: 58px; bottom: 8px; left: 10px; right: 10px; padding: 10px 12px; z-index: 2; }
  .lobby.has-panel .lobby-menu { display: none; }
  .lp-head h2 { font-size: 22px; }
  .lp-body { grid-template-columns: 1fr; overflow-y: auto; }
  .shop-card, .settings-card { max-height: calc(var(--vh100) - 16px); padding: 10px 12px; }
  .map-cards { grid-template-columns: 1fr 1fr; }
  .map-card canvas, .map-card .map-thumb canvas { aspect-ratio: 4 / 1; }
  .map-card .map-desc { display: none; }
  .mode-card.rich { padding: 8px 10px; }
  .mc-more li .ar { display: none; }
}
/* v1.0 — portrait phones: the wallet / account / character row wraps, menu labels stay whole */
@media (max-width: 720px) {
  .lobby-right-top { flex-wrap: wrap; justify-content: flex-start; row-gap: 8px; }
  .lm-btn { grid-template-columns: 34px 1fr; gap: 8px; padding: 8px 10px 8px 8px; }
  .lm-ico { width: 34px; height: 34px; }
  .lm-ico svg { width: 22px; height: 22px; }
  .lm-text b { font-size: 16px; overflow-wrap: anywhere; }
}

/* v1.0 — first-launch screen on short landscape screens: everything above the fold */
@media (max-height: 560px) and (min-width: 721px) {
  .ob-card { padding: 12px 18px; max-height: calc(var(--vh100) - 12px); }
  .ob-head, .ob-card .logo.small { margin-bottom: 4px; }
  #obPreview { width: 120px; height: 120px; }
  .rig-card { padding: 6px; }
  .rig-card canvas { width: 54px; height: 54px; }
  .ob-body { gap: 12px; grid-template-columns: 200px 1fr; }
  .ob-header { margin-bottom: 8px; }
  .ob-preview { padding: 8px; }
  /* Google / Guest buttons always in reach: they stick to the bottom of the scrolling card */
  .ob-footer { margin-top: 8px; position: sticky; bottom: -12px; z-index: 2; padding: 10px 0 8px;
    background: linear-gradient(180deg, rgba(16, 24, 20, 0) 0, rgba(16, 24, 20, 0.97) 22%); }
}

/* =================================================== v1.1 multiplayer */
/* LAN status + optional server address */
.mp-net { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); }
.mp-net-status { font-size: 12px; font-weight: 700; line-height: 1.45; color: var(--text-dim); }
.mp-net-status b { color: var(--text); }
.mp-net-status b.ok { color: var(--ok); }
.mp-net-status .ar { display: block; margin-top: 2px; }
.mp-net-addr { display: flex; gap: 6px; }
.mp-net-addr input { width: 230px; padding: 7px 10px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(0, 0, 0, 0.3); color: var(--text); font: 800 12.5px var(--font-body); }
.bot-tag { display: inline-block; font-style: normal; font-size: 10px; font-weight: 900; letter-spacing: 0.06em; padding: 1px 6px; border-radius: 6px; background: rgba(229, 72, 77, 0.2); color: #ff9a9a; border: 1px solid rgba(229, 72, 77, 0.4); vertical-align: middle; }

/* Online tab */
.lp-body.mp-online { display: block; overflow-y: auto; }
.on-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.on-card { border-radius: 14px; background: rgba(0, 0, 0, 0.25); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.on-card h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.on-card h3 small { font-family: var(--font-body); font-size: 12px; font-weight: 800; color: var(--text-dim); margin-left: 6px; }
.on-ranked { border: 1px solid rgba(246, 183, 60, 0.45); background: linear-gradient(180deg, rgba(246, 183, 60, 0.12), rgba(0, 0, 0, 0.25)); }
.on-rank { font-weight: 800; font-size: 14px; }
.on-rank b { color: var(--rk, var(--brass)); }
/* v1.0.3 competitive rank bar (Bronze / Silver / Gold) */
.on-rank .rk-bar { position: relative; height: 10px; margin: 6px 0 3px; border-radius: 6px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.12); overflow: hidden; }
.on-rank .rk-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--rk, var(--brass)), #fff3c2); border-radius: 6px; transition: width 0.6s ease; }
.on-rank small { display: block; font-weight: 700; font-size: 11px; color: var(--text-dim); }
.on-rank-sub { font-size: 12px; font-weight: 700; color: var(--text-dim); margin: 2px 0 4px; }
.w-rank { position: relative; }
.w-rank::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 2px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--rk, #c58b5a) var(--rkp, 0%), rgba(255, 255, 255, 0.12) var(--rkp, 0%)); }
.on-rules { margin: 0; padding-left: 18px; font-size: 12.5px; font-weight: 700; line-height: 1.55; color: var(--text); }
.on-ranked .ar { margin: 0; font-size: 12px; color: var(--text-dim); }
.on-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.on-row input { width: 110px; padding: 7px 10px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(0, 0, 0, 0.3); color: var(--text); font: 900 13px var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; }
.on-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.on-wait, .on-gate { border-radius: 14px; background: rgba(0, 0, 0, 0.25); padding: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.on-wait h3, .on-gate h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 21px; }
.on-gate p { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.5; }
.on-count { font-size: 15px; font-weight: 900; }
.on-count b { color: var(--brass); font-size: 20px; }
.on-spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.15); border-top-color: var(--brass); animation: onSpin 0.9s linear infinite; }
@keyframes onSpin { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .on-cols { grid-template-columns: 1fr; } .mp-net { grid-template-columns: 1fr; } .mp-net-addr input { flex: 1; width: auto; } }

/* Early Supporter badge (profile) & title chip */
.lp-badge { display: inline-block; margin: 1px 0 2px; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 900; letter-spacing: 0.02em; color: #2a1a02; background: linear-gradient(90deg, #ffe08a, #f6b73c 55%, #ff9f43); box-shadow: 0 0 10px rgba(246, 183, 60, 0.45); }
.sh-tchip.supporter { background: linear-gradient(90deg, #ffe08a, #f6b73c); color: #2a1a02; border-color: #f6b73c; }

/* shop: guest purchase message (Arabic, right-to-left) */
.sh-paynote.guest { border-color: rgba(246, 183, 60, 0.5); background: rgba(246, 183, 60, 0.1); }
.sh-guest { display: inline-block; font-size: 14px; font-weight: 800; line-height: 1.6; color: #ffe39a; }

/* end screen: practice matches / Rank Points lost */
.er-practice { font-size: 13px; font-weight: 800; line-height: 1.5; padding: 8px 10px; border-radius: 10px; background: rgba(77, 163, 255, 0.12); margin-bottom: 6px; }
.er-practice .ar { display: block; margin-top: 2px; }
.er-total .neg b { color: #ff8a80; }
.on-ranked .btn-primary .ar { color: #4a2f00; opacity: 0.9; }

/* v1.1 built-in benchmark (?bench=low|medium|high) */
.bench-out { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 50; padding: 16px 22px; border-radius: 16px; font-size: 14px; font-weight: 800; line-height: 1.6; text-align: center; max-width: min(92vw, 620px); }
.bench-out .bo-big { font-family: var(--font-display); font-size: 40px; color: var(--brass); }
.bench-out pre { margin: 8px 0 0; max-height: 0; overflow: hidden; font-size: 1px; opacity: 0; }

/* v1.0.3 redeem codes (Shop → Gems) */
.sh-redeem { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(98, 210, 255, 0.12), rgba(176, 124, 240, 0.10)); border: 1px solid rgba(98, 210, 255, 0.35); }
.sh-redeem-txt { flex: 1 1 200px; font-weight: 800; }
.sh-redeem-txt small { display: block; font-weight: 600; color: var(--text-dim); font-size: 12px; }
.sh-redeem-form { display: flex; gap: 8px; flex: 0 1 320px; }
.sh-redeem-form input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(0, 0, 0, 0.35);
  color: #fff; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.sh-redeem-form .sh-btn { width: auto; padding: 9px 16px; }
.sh-redeem-msg { flex-basis: 100%; font-weight: 700; font-size: 13px; min-height: 0; }
.sh-redeem-msg.ok { color: #8ef06f; }
.sh-redeem-msg.bad { color: #ff9a8a; }

/* v1.0.3 bot personalities in the kingdoms list */
.k-persona { font-style: normal; font-size: 0.68em; font-weight: 800; letter-spacing: 0.02em; padding: 0 0.45em; border-radius: 0.6em; margin-left: 0.3em; vertical-align: 0.12em; background: rgba(255,255,255,0.12); color: #e9edf1; }
.k-persona.k-rush { background: rgba(229,72,77,0.28); color: #ffb3b5; }
.k-persona.k-treaty { background: rgba(77,163,255,0.25); color: #bfe0ff; }
.k-persona.k-hill { background: rgba(244,197,66,0.26); color: #ffe39a; }
.k-persona.k-hunter { background: rgba(125,220,95,0.24); color: #c9f5b8; }

/* =====================================================================
 * v1.0.3 Deathmatch clans — Clan button badge, side panel, request cards
 * ===================================================================== */
.action-toggle { position: relative; }
.clan-badge { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff;
  font: 900 11px/19px var(--font-body); font-style: normal; text-align: center; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55); animation: clanPulse 1.4s ease-in-out infinite; }
@keyframes clanPulse { 50% { transform: scale(1.14); } }
.clan-panel { width: 344px; }
.clan-hint { margin: 0 0 8px; font-size: 12px; line-height: 1.4; font-weight: 700; color: var(--text-dim); }
.clan-hint .ar { display: block; }
.clan-form { display: flex; gap: 6px; margin-bottom: 8px; }
.clan-form input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--glass-border); background: rgba(0, 0, 0, 0.35); color: var(--text); font: 800 14px var(--font-body); }
.clan-form input:focus { outline: none; border-color: var(--accent); }
.clan-sub { margin: 10px 0 4px; font-size: 11px; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-dim); }
.clan-sub .ar { text-transform: none; letter-spacing: 0; margin-left: 4px; }
.clan-note, .clan-tip { margin: 6px 0 0; font-size: 12px; line-height: 1.4; font-weight: 700; color: var(--text-dim); }
.clan-card { padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12); border-left: 4px solid var(--cc, var(--accent)); background: rgba(0, 0, 0, 0.25); }
.clan-head, .cl-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.clan-head b, .cl-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 17px var(--font-display); color: var(--cc, var(--text)); }
.clan-flag { flex: none; width: 10px; height: 14px; background: var(--cc, var(--accent)); clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%); }
.clan-count { flex: none; font-size: 12px; font-weight: 900; color: var(--text-dim); }
.clan-total { flex: none; margin-left: auto; font-size: 12px; font-weight: 900; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.clan-members, .clan-rows, .clan-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.clan-members li, .clan-rows li { display: flex; align-items: center; gap: 6px; padding: 3px 5px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); font-size: 13px; font-weight: 800; }
.clan-panel .dot, .clan-alert .dot { display: inline-block; flex: none; width: 10px; height: 10px; margin-right: 4px; border-radius: 50%; vertical-align: -1px; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.6); }
.cm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-lead { font-style: normal; color: var(--accent); }
.cm-pts { flex: none; font-size: 12px; font-weight: 900; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.cm-wait { flex: none; font-size: 12px; font-style: italic; font-weight: 800; color: var(--text-dim); }
.cl-item { padding: 6px 8px; border-radius: 10px; border-left: 4px solid var(--cc, var(--accent)); background: rgba(0, 0, 0, 0.25); }
.cl-mem { margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--text-dim); overflow-wrap: anywhere; }
.clan-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cb { padding: 6px 10px; border: none; border-radius: 9px; cursor: pointer; background: rgba(255, 255, 255, 0.12); color: var(--text); font: 400 14px var(--font-display); transition: filter 0.15s, transform 0.08s; }
.cb:hover { filter: brightness(1.15); }
.cb:active { transform: translateY(1px); }
.cb.ok { background: linear-gradient(180deg, #8ef06f, #4fb83a); color: #0f2a08; }
.cb.no { background: rgba(229, 72, 77, 0.24); color: #ffc2c4; }
.cb.sm { flex: none; padding: 3px 8px; font-size: 12.5px; }
.cb.armed { background: var(--danger); color: #fff; animation: clanArmed 0.8s ease-in-out infinite; }
@keyframes clanArmed { 50% { box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.35); } }
/* request / invite cards: left column, under the (collapsed) objectives, above every other panel */
.clan-alerts { position: absolute; left: 16px; top: 172px; z-index: 6; display: flex; flex-direction: column; gap: 6px; width: 300px; max-width: calc(100% - 32px); }
.clan-alerts:empty { display: none; }
.hud.side-open .clan-alerts, .hud.is-spectating .clan-alerts { display: none; }
.clan-alert { padding: 8px 10px; border-radius: 12px; border-left: 4px solid var(--accent); animation: toastIn 0.25s ease; }
.ca-text { font-size: 13px; line-height: 1.35; font-weight: 800; overflow-wrap: anywhere; }
.ca-text .ar { display: block; font-size: 11px; color: var(--text-dim); }
.ca-btns { display: flex; gap: 6px; margin-top: 6px; }
.ca-btns .cb { flex: 1; }
.k-clan, .mp-clan { font-style: normal; font-weight: 900; font-size: 0.86em; }
.mp-sub { margin-top: 6px; font-size: 11px; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-dim); }
.mp-dm .dim { font-size: 0.85em; color: var(--text-dim); }
@media (max-width: 720px) {
  .clan-alerts { top: auto; bottom: 200px; }
}
.k-clan { margin-right: 2px; }
/* v1.5.9 clan panel: ✓ / ✗ icon buttons, the founding price (online), a waiting button, a nudge on a missing name / gold */
.cb.cb-ico { display: inline-grid; place-items: center; padding: 2px 6px; min-width: 32px; }
.cb.cb-ico .uic { width: 20px; height: 20px; }
.ca-btns .cb.cb-ico { padding: 4px 6px; }
.ca-btns .cb.cb-ico .uic { width: 24px; height: 24px; }
.cb.busy, .cb:disabled { opacity: .6; cursor: wait; filter: grayscale(.4); }
#clanCreateBtn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
#clanCreateBtn .cf-cost { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px 1px 7px; border-radius: 8px; background: rgba(0, 0, 0, .28); font: 400 14px var(--font-display); }
#clanCreateBtn .cf-cost .uic { width: 18px; height: 18px; }
#clanCreateBtn.cf-lack .cf-cost { color: #ff9a9a; }
#clanCreateBtn.cf-short, #clanCreateBtn.cf-lack { filter: saturate(.55) brightness(.92); }
.cf-nudge { animation: cfNudge .42s; }
@keyframes cfNudge { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* v1.0.3 lobby performance hint (graphics acceleration off / Energy Saver at 30 FPS) */
.perf-hint { position: absolute; left: 26px; bottom: 40px; z-index: 5; width: min(440px, calc(100% - 52px)); padding: 12px 14px; border-radius: 14px; border-left: 4px solid var(--warn); font-size: 13px; line-height: 1.45; font-weight: 700; }
.lobby.has-panel .perf-hint { display: none; }
.ph-head b { color: #ffe3a3; }
.ph-head .ar, .ph-steps .ar { display: block; color: var(--text-dim); font-size: 12px; }
.ph-steps { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.ph-url { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.ph-url code { padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.4); color: #bfe0ff; font: 700 12.5px ui-monospace, Consolas, monospace; user-select: all; }
.ph-url small { color: var(--text-dim); font-size: 11px; }
.ph-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.ph-btns .btn-ghost, .ph-copy { padding: 5px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.08); color: var(--text); text-decoration: none; }
@media (max-width: 720px) { .perf-hint { top: 104px; bottom: auto; left: 12px; width: calc(100% - 24px); } }

/* =====================================================================
 * v1.0.4 — packs, Mystery Chests, frames & banners, profile, achievements
 * ===================================================================== */
.shop-tabs button.tab-hot { position: relative; }
.shop-tabs button.tab-hot::after { content: 'NEW'; position: absolute; top: -7px; right: -6px; font-size: 9px; font-weight: 900; letter-spacing: .5px; padding: 1px 5px; border-radius: 6px; background: #e5484d; color: #fff; }
.w-shards b { color: #e1c9ff; }
.sh-spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid rgba(42, 26, 2, 0.35); border-top-color: #2a1a02; animation: shSpin .7s linear infinite; vertical-align: -2px; }
@keyframes shSpin { to { transform: rotate(360deg); } }
.sh-btn.busy { filter: none; opacity: .85; }
.sh-btn.big { padding: 11px 18px; font-size: 15px; min-width: 170px; }
.sh-btn.danger { background: linear-gradient(180deg, #ff7a7e, var(--danger)); color: #fff; }
.sh-chip { border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(0, 0, 0, 0.3); color: var(--text-dim); font-weight: 900; font-size: 12px; padding: 5px 9px; border-radius: 999px; cursor: pointer; }
.sh-chip.on { background: rgba(125, 220, 95, 0.2); border-color: rgba(125, 220, 95, 0.6); color: var(--ok); }
/* rarities */
.sh-tier.r-common { background: rgba(154, 167, 177, 0.2); color: #d2dbe2; }
.sh-tier.r-rare { background: rgba(77, 163, 255, 0.22); color: #9fd0ff; }
.sh-tier.r-epic { background: rgba(176, 124, 240, 0.25); color: #e1c9ff; }
.sh-tier.r-legendary { background: linear-gradient(90deg, rgba(244, 197, 66, 0.35), rgba(255, 140, 66, 0.3)); color: #ffe7a0; }
.sh-tier.pack { background: rgba(229, 72, 77, 0.22); color: #ffb3b5; }
.sh-card.tier-r-rare { border-color: rgba(77, 163, 255, 0.35); }
.sh-card.tier-r-epic { border-color: rgba(176, 124, 240, 0.45); }
.sh-card.tier-r-legendary { border-color: rgba(244, 197, 66, 0.6); box-shadow: inset 0 0 26px rgba(244, 197, 66, 0.16); }
.sh-boxitem:not(.owned) canvas, .sh-boxitem:not(.owned) .sh-frame-pv { filter: saturate(.55) brightness(.75); }
.sh-price.shards { color: #e1c9ff; }
.sh-price.shards.no { color: #b9a3d6; opacity: .7; }
.sh-buy-shards { background: linear-gradient(180deg, #d1aaff, #b07cf0) !important; color: #20102e !important; }
/* packs */
.shop-grid.packs { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.sh-packnote { line-height: 1.55; }
.sh-bundle { --accent: #e5484d; align-items: stretch; text-align: left; border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, rgba(0,0,0,.35)), rgba(0, 0, 0, 0.35) 60%); }
.sh-bundle-art { position: relative; height: 150px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 40% 45%, #6c9a52, #2a4a22 75%); }
.theme-pharaoh .sh-bundle-art, .theme-mongol .sh-bundle-art, .theme-native .sh-bundle-art { background: radial-gradient(circle at 40% 45%, #c9b07a, #6a5a34 78%); }
.theme-viking .sh-bundle-art { background: radial-gradient(circle at 40% 45%, #b9c9cf, #4c5c62 78%); }
.sh-bundle-art .bd-tc { position: absolute; left: 0; top: 0; width: 220px; height: 150px; border-radius: 0; background: none; }
.sh-bundle-art .bd-lord { position: absolute; right: 6px; bottom: 6px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle at 45% 40%, rgba(255,255,255,.18), rgba(0,0,0,.35) 70%); }
.sh-bundle-txt { display: flex; flex-direction: column; gap: 3px; padding: 4px 2px; }
.sh-bundle-txt .sh-name { font-size: 20px; }
.sh-parts { margin: 2px 0 4px; padding-left: 18px; font-size: 12px; font-weight: 800; color: #ffe9b8; display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.sh-bundle .sh-buyrow { justify-content: flex-start; }
.sh-bundle.owned .sh-buyrow .sh-btn { flex: 0 0 auto; }
/* chests */
.shop-grid.chests { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
.sh-chest { grid-column: 1 / -1; display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; padding: 16px; border-radius: 16px; background: linear-gradient(140deg, rgba(176, 124, 240, 0.18), rgba(0, 0, 0, 0.35)); border: 1px solid rgba(176, 124, 240, 0.35); }
.chest-info h3 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 26px; }
.chest-info p { margin: 2px 0; font-size: 13px; font-weight: 700; color: var(--text-dim); }
.chest-odds { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chest-odds li { padding: 4px 10px; border-radius: 8px; font-weight: 800; font-size: 12.5px; background: rgba(0, 0, 0, 0.3); }
.chest-odds li b { font-family: var(--font-display); font-weight: 400; font-size: 16px; margin-right: 3px; }
.chest-odds .r-common b { color: #d2dbe2; } .chest-odds .r-rare b { color: #7fc0ff; } .chest-odds .r-epic b { color: #d1aaff; } .chest-odds .r-legendary b { color: #ffd24a; }
.chest-pity { position: relative; height: 22px; border-radius: 11px; background: rgba(0, 0, 0, 0.35); overflow: hidden; margin: 6px 0 10px; }
.chest-pity i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #b07cf0, #ffd24a); }
.chest-pity span { position: relative; display: block; text-align: center; line-height: 22px; font-size: 11.5px; font-weight: 900; text-shadow: 0 1px 2px #000; }
.chest-art { position: relative; width: 180px; height: 150px; margin: auto; }
.chest-body { position: absolute; left: 20px; right: 20px; bottom: 10px; height: 78px; border-radius: 10px; background: linear-gradient(180deg, #8a5a32, #5b3a1f); border: 4px solid #1d1a17; box-shadow: inset 0 -8px 0 rgba(0,0,0,.25); }
.chest-body::before { content: ''; position: absolute; left: 50%; top: 18px; width: 26px; height: 30px; margin-left: -13px; border-radius: 6px; background: #f4c542; border: 3px solid #1d1a17; }
.chest-body::after { content: ''; position: absolute; left: 0; right: 0; top: 30px; height: 8px; background: #d6a737; border-block: 3px solid #1d1a17; }
.chest-lid { position: absolute; left: 14px; right: 14px; top: 22px; height: 46px; border-radius: 30px 30px 8px 8px; background: linear-gradient(180deg, #a26a3c, #7a4f2a); border: 4px solid #1d1a17; transform-origin: 50% 100%; z-index: 1; }
.chest-glow { position: absolute; inset: 10px; border-radius: 50%; background: radial-gradient(circle, rgba(209, 170, 255, 0.55), transparent 65%); opacity: .5; animation: chestGlow 2.4s ease-in-out infinite alternate; }
@keyframes chestGlow { to { opacity: .95; transform: scale(1.06); } }
.chest-art.shaking { animation: chestShake .12s linear infinite; }
.chest-art.shaking .chest-lid { animation: lidPop .5s ease-in-out infinite alternate; }
@keyframes chestShake { 0% { transform: translateX(-3px) rotate(-2deg); } 50% { transform: translateX(3px) rotate(2deg); } 100% { transform: translateX(-3px) rotate(-1deg); } }
@keyframes lidPop { to { transform: translateY(-6px) rotate(-4deg); } }
.chest-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.chest-reveal { --rc: #f4c542; position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(6, 10, 8, 0.82); border-radius: inherit; animation: crIn .25s ease-out; }
@keyframes crIn { from { opacity: 0; } }
.cr-burst { position: absolute; width: 520px; height: 520px; max-width: 100%; border-radius: 50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 40%, transparent) 0 10deg, transparent 10deg 22deg); animation: crSpin 9s linear infinite, crGrow .6s ease-out; opacity: .7; -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); }
@keyframes crSpin { to { transform: rotate(360deg); } }
@keyframes crGrow { from { transform: scale(.2); } }
.cr-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 26px; border-radius: 18px; background: rgba(14, 24, 19, 0.92); border: 3px solid var(--rc); box-shadow: 0 0 40px color-mix(in srgb, var(--rc) 50%, transparent); animation: crPop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes crPop { from { transform: scale(.4) rotate(-8deg); } }
.cr-rarity { font-family: var(--font-display); font-size: 22px; color: var(--rc); letter-spacing: 1px; text-transform: uppercase; }
.cr-card canvas { width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle at 45% 40%, color-mix(in srgb, var(--rc) 45%, #2a4a22), #1d2a22 72%); }
.cr-name { font-family: var(--font-display); font-size: 22px; }
.cr-sub { font-size: 13px; font-weight: 800; color: var(--text-dim); }
.cr-actions { display: flex; gap: 8px; margin-top: 6px; }
/* name frames */
.name-frame { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 8px; border: 2px solid transparent; }
.frame-oak { border-color: #a26a3c; background: rgba(162, 106, 60, 0.18); }
.frame-silver { border-color: #c9d1d9; background: linear-gradient(90deg, rgba(201, 209, 217, 0.18), rgba(255, 255, 255, 0.05)); box-shadow: 0 0 6px rgba(201, 209, 217, 0.35); }
.frame-gold { border-color: #f4c542; background: linear-gradient(90deg, rgba(244, 197, 66, 0.22), rgba(255, 140, 66, 0.12)); box-shadow: 0 0 10px rgba(244, 197, 66, 0.45); }
.frame-mythic { border: 2px solid transparent; background: linear-gradient(rgba(14, 24, 19, 0.9), rgba(14, 24, 19, 0.9)) padding-box, linear-gradient(90deg, #ff5fa2, #b07cf0, #4da3ff, #3ddc84, #ffd24a, #ff5fa2) border-box; background-size: 100% 100%, 300% 100%; animation: mythicFrame 3s linear infinite; box-shadow: 0 0 14px rgba(255, 95, 162, 0.45); }
@keyframes mythicFrame { to { background-position: 0 0, 300% 0; } }
.sh-frame-pv { width: 120px; height: 120px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 45% 40%, #3a4a6a, #1a2233 70%); }
.sh-frame-pv .name-frame { font-weight: 900; font-size: 13px; }
/* achievements (Bronze → Mythic) */
.ach-head { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); margin-bottom: 4px; }
.ach-badge { --tc: #c58b5a; width: 74px; height: 84px; flex: none; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 22%, 100% 74%, 50% 100%, 0 74%, 0 22%); background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 85%, #fff), color-mix(in srgb, var(--tc) 70%, #000)); }
.ach-badge span { font-family: var(--font-display); font-size: 13px; color: #1d1a17; text-transform: uppercase; }
.ach-head.tier-mythic .ach-badge { animation: mythicBadge 2.6s ease-in-out infinite alternate; }
@keyframes mythicBadge { to { filter: hue-rotate(60deg) brightness(1.15); } }
.ach-head-txt b { font-family: var(--font-display); font-weight: 400; font-size: 26px; color: var(--accent); }
.ach-head-txt small { display: block; font-weight: 800; font-size: 12px; margin-top: 2px; }
.ach-pips { display: flex; gap: 3px; margin: 3px 0 2px; }
.ach-pips i { --tc: #888; width: 22px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); }
.ach-pips i.on { background: var(--tc); box-shadow: 0 0 6px var(--tc); }
.ach-ico { --tc: #5c6670; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tc) 55%, transparent), transparent 70%); }
.ach-tiername { font-family: var(--font-body); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; margin-inline-start: 6px; }
.sh-ach.ach-t6 { background: linear-gradient(90deg, rgba(255, 95, 162, 0.16), rgba(176, 124, 240, 0.12)); opacity: 1; }
.sh-tchip.mythic { border-color: #ff5fa2; color: #ffb3d4; }
.sh-tchip.supporter { border-color: #ffd24a; color: #ffe7a0; }
/* profile & account */
.account-card { max-width: 620px; width: min(620px, 96vw); max-height: calc(var(--vh1) * 92); overflow-y: auto; }
.pf-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.pf-tabs button { border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.25); color: var(--text-dim); font-weight: 900; font-size: 13px; padding: 7px 12px; border-radius: 10px; cursor: pointer; }
.pf-tabs button.on { background: var(--accent); border-color: var(--accent); color: #2a1a02; }
.pf-tabs button.on .ar { color: #5a3a00; }
.pf-head { display: flex; gap: 14px; align-items: center; }
.pf-av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, 0.12); border: 2px solid rgba(255, 255, 255, 0.35); box-sizing: border-box; }
.pf-av img { width: 100%; height: 100%; object-fit: cover; }
.pf-av svg { width: 72%; height: 72%; }
.pf-initial { font-family: var(--font-display); font-size: 1.1em; color: var(--text); background: linear-gradient(160deg, #3a5a46, #1d2a22); }
.acc-chip .pf-av { width: 30px; height: 30px; font-size: 15px; }
.pf-id { min-width: 0; }
.pf-name { font-family: var(--font-display); font-size: 26px; display: inline-flex; align-items: center; gap: 6px; }
.pf-name b { font-weight: 400; }
.pf-star { width: 20px; height: 20px; flex: none; vertical-align: -3px; filter: drop-shadow(0 0 4px rgba(255, 210, 74, 0.7)); }
.acc-who .pf-star { width: 14px; height: 14px; margin-right: 2px; }
.pf-title { color: #ffd27a; font-weight: 900; font-size: 13px; }
.pf-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pf-badges span { padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 900; background: rgba(0, 0, 0, 0.3); }
.pf-rank { --rk: #c58b5a; color: var(--rk); border: 1px solid color-mix(in srgb, var(--rk) 55%, transparent); }
.pf-ach { --tc: #c58b5a; color: var(--tc); border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent); }
.pf-ach.tier-mythic { animation: mythicBadge 2.6s ease-in-out infinite alternate; }
.pf-sup { color: #ffe7a0; border: 1px solid rgba(255, 210, 74, 0.6); display: inline-flex; align-items: center; gap: 4px; }
.pf-sup .pf-star { width: 14px; height: 14px; }
.pf-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 12px 0 4px; }
.pf-stats div { display: flex; flex-direction: column; align-items: center; padding: 7px 4px; border-radius: 10px; background: rgba(0, 0, 0, 0.28); }
.pf-stats b { font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--accent); }
.pf-stats span { font-size: 10.5px; font-weight: 800; color: var(--text-dim); text-align: center; }
.account-card h4 { margin: 14px 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 17px; color: #ffd27a; }
.pf-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pf-row input, .pf-auth input, .pf-inline input { flex: 1 1 160px; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(0, 0, 0, 0.35); color: var(--text); font-weight: 800; font-size: 14px; }
.pf-auth { display: flex; flex-direction: column; gap: 8px; }
.pf-auth input { flex: none; } /* v1.5.5 in a column the 160 px basis made each field 160 px tall */
.pf-inline { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; }
.pf-avatars { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-avpick { padding: 2px; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; }
.pf-avpick.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(246, 183, 60, 0.2); }
.pf-frames { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-links { margin-top: 12px; }
.pf-or { display: flex; align-items: center; gap: 10px; margin: 12px 0 8px; color: var(--text-dim); font-size: 12px; font-weight: 800; }
.pf-or::before, .pf-or::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.15); }
.pf-seg { display: flex; gap: 4px; margin-bottom: 8px; }
.pf-seg button { flex: 1; padding: 8px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.25); color: var(--text-dim); font-weight: 900; cursor: pointer; }
.pf-seg button.on { background: rgba(246, 183, 60, 0.18); border-color: var(--accent); color: var(--accent); }
.linkish { background: none; border: none; color: #9fd0ff; font-weight: 800; font-size: 12.5px; cursor: pointer; padding: 2px 0; text-decoration: underline; }
.pf-methods { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pf-methods li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); font-weight: 800; }
.pf-methods li > span { display: inline-flex; align-items: center; gap: 6px; }
.pf-methods li svg { width: 18px; height: 18px; }
.pf-methods b.ok { color: var(--ok); font-size: 12.5px; }
.pf-danger { margin-top: 16px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(229, 72, 77, 0.4); background: rgba(229, 72, 77, 0.07); }
.pf-danger summary { cursor: pointer; font-weight: 900; color: #ff9da0; }
.pf-danger p { font-size: 12.5px; font-weight: 700; color: var(--text-dim); }
.er-pending { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 10px; font-weight: 800; color: var(--text-dim); }
.er-pending .sh-spin { border-color: rgba(255, 255, 255, 0.25); border-top-color: var(--accent); }
.diff-gems { display: inline-block; margin-top: 3px; color: #9fe8ff; font-weight: 900; }
@media (max-width: 720px) {
  .sh-chest { grid-template-columns: 1fr; }
  .pf-stats { grid-template-columns: repeat(3, 1fr); }
  .shop-grid.packs { grid-template-columns: 1fr; }
  .sh-bundle-art .bd-tc { width: 180px; height: 123px; }
}
.sh-btn svg, .cr-actions svg, .chest-actions svg { width: 16px; height: 16px; vertical-align: -3px; }
.chest-actions .sh-btn, .cr-actions .sh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.ach-bname { font-weight: 900; }
.sh-career { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
/* v1.0.4 HUD layout editor */
.hud-user-hidden { display: none !important; }
html.hud-editing #hud { pointer-events: none; }
html.hud-editing #lobby, html.hud-editing .modal-overlay:not(.hud-editor) { opacity: 0 !important; pointer-events: none !important; }
.hud-editor { position: fixed; inset: 0; z-index: 9000; background: rgba(4, 8, 6, 0.35); }
.he-bar { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 14px; max-width: calc(100vw - 24px); z-index: 2; font-weight: 800; font-size: 13px; }
.he-bar .seg button { padding: 5px 10px; }
.he-sel { min-width: 180px; color: var(--text-dim); }
.he-ctl { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); }
.he-ctl input { width: 110px; accent-color: var(--accent); }
.he-ctl output { min-width: 40px; color: var(--text); }
.he-layer { position: absolute; inset: 0; }
.he-handle { position: absolute; border: 2px dashed rgba(246, 183, 60, 0.85); border-radius: 10px; background: rgba(246, 183, 60, 0.08); cursor: grab; touch-action: none; }
.he-handle span { position: absolute; left: 4px; top: -18px; font-size: 11px; font-weight: 900; color: #ffe7a0; text-shadow: 0 1px 2px #000; white-space: nowrap; pointer-events: none; }
.he-handle.on { border-style: solid; border-color: #7ddc5f; background: rgba(125, 220, 95, 0.14); box-shadow: 0 0 0 3px rgba(125, 220, 95, 0.25); }
.he-handle.hidden-el { border-color: rgba(229, 72, 77, 0.8); background: rgba(229, 72, 77, 0.12); }
.he-handle:active { cursor: grabbing; }
/* v1.0.4 tutorial */
.tut-ask { display: grid; place-items: center; z-index: 9500; background: rgba(4, 8, 6, 0.7); }
.tut-ask-card { max-width: 640px; width: calc(100vw - 32px); padding: 24px; border-radius: 20px; text-align: center; }
.tut-ask-card h2 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 30px; }
.tut-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.tut-choice { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 18px 12px; border-radius: 16px; cursor: pointer; border: 2px solid rgba(255, 255, 255, 0.15); background: rgba(0, 0, 0, 0.3); color: var(--text); }
.tut-choice b { font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.tut-choice small { color: var(--text-dim); font-weight: 700; }
.tut-choice:hover, .tut-choice:focus-visible { border-color: var(--accent); background: rgba(246, 183, 60, 0.12); }
.tut-panel { position: absolute; top: 118px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); padding: 12px 14px 10px; border-radius: 16px; z-index: 30; pointer-events: auto; border: 2px solid rgba(155, 231, 255, 0.45); }
.tut-panel.tut-pop { animation: tutPop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes tutPop { from { transform: translateX(-50%) scale(.92); opacity: .4; } }
.tut-top { display: flex; align-items: center; gap: 10px; }
.tut-top b { font-family: var(--font-display); font-weight: 400; font-size: 19px; flex: 1; }
.tut-step { font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 8px; background: rgba(155, 231, 255, 0.18); color: #9be7ff; }
.tut-skip { background: none; border: none; color: var(--text-dim); font-weight: 800; font-size: 12px; cursor: pointer; text-decoration: underline; }
.tut-en { margin-top: 6px; font-size: 14px; font-weight: 700; line-height: 1.5; }
.tut-ar { margin-top: 4px; font-size: 14px; font-weight: 700; line-height: 1.6; color: #d8e6dc; text-align: right; }
.tut-panel kbd { display: inline-block; min-width: 18px; padding: 0 5px; margin: 0 1px; border-radius: 5px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25); font-size: 12px; font-weight: 900; text-align: center; }
.tut-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; min-height: 30px; }
.tut-prog { font-size: 13px; font-weight: 900; color: var(--accent); }
.tut-bar { height: 4px; border-radius: 2px; margin-top: 8px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.tut-bar i { display: block; height: 100%; background: linear-gradient(90deg, #9be7ff, #7ddc5f); transition: width .4s; }
.tut-marker { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 25; pointer-events: none; }
.tut-marker span { position: absolute; left: -16px; top: -34px; width: 32px; height: 32px; background: #ffd24a; clip-path: polygon(50% 100%, 0 35%, 28% 35%, 28% 0, 72% 0, 72% 35%, 100% 35%); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); animation: tutBob .8s ease-in-out infinite alternate; }
.tut-marker.edge span { transform: rotate(-90deg); left: -16px; top: -16px; animation: none; }
@keyframes tutBob { to { transform: translateY(-8px); } }
.tut-glow { animation: tutGlow 1s ease-in-out infinite alternate !important; }
@keyframes tutGlow { from { box-shadow: 0 0 0 0 rgba(255, 210, 74, 0.0); } to { box-shadow: 0 0 0 5px rgba(255, 210, 74, 0.85), 0 0 22px rgba(255, 210, 74, 0.8); } }
.lm-btn.lm-small { padding-block: 8px; }
.st-row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) { .tut-choices { grid-template-columns: 1fr; } .tut-panel { top: 96px; } }

/* ---------- v1.0.4 Multiplayer & Ranked redesign ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mp-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.mp-tabs button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; border-radius: 12px; min-width: 0; }
.mp-tabs button .mpt-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: rgba(255, 255, 255, 0.07); }
.mp-tabs button .mpt-txt { display: flex; flex-direction: column; min-width: 0; }
.mp-tabs button b { font-size: 14px; color: var(--text); }
.mp-tabs button small { font-size: 11px; font-weight: 700; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-tabs button .ar { font-size: 11px; margin: 0; color: var(--text-dim); }
.mp-tabs button.on b, .mp-tabs button.on small { color: #2a1a02; }
.mp-tabs button.on .mpt-ico { background: rgba(0, 0, 0, 0.15); }
.mp-tabs button[data-mp="online"]:not(.on) { border-color: rgba(246, 183, 60, 0.5); }
.mp-banner { font-size: 12px; padding: 6px 12px; margin-bottom: 8px; }
.mp-banner .ar { display: inline; margin: 0 0 0 6px; }
.on-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.on-card-head h3 .ar { font-family: var(--font-body); font-size: 13px; color: var(--text-dim); margin-left: 6px; }
.on-pill { font-size: 11px; font-weight: 900; padding: 3px 9px; border-radius: 999px; background: rgba(246, 183, 60, 0.18); color: #ffd98a; border: 1px solid rgba(246, 183, 60, 0.4); }
.on-pill.dim { background: rgba(255, 255, 255, 0.06); color: var(--text-dim); border-color: rgba(255, 255, 255, 0.12); }
.on-lead { margin: 0; font-size: 12.5px; font-weight: 700; line-height: 1.45; color: var(--text-dim); }
.on-lead .ar { display: block; }
.on-step { margin: 6px 0 0; font-size: 13px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.on-step i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--brass); color: #2a1a02; }
.on-step .ar { font-size: 12px; color: var(--text-dim); margin: 0; }
.fmt-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.fmt-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 12px; cursor: pointer; text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.3); color: var(--text); font-family: var(--font-body); min-width: 0; transition: transform 0.12s, border-color 0.12s, background 0.12s; }
.fmt-card:hover { transform: translateY(-2px); border-color: rgba(246, 183, 60, 0.6); }
.fmt-card[aria-checked="true"] { border-color: var(--brass); background: linear-gradient(180deg, rgba(246, 183, 60, 0.28), rgba(246, 183, 60, 0.08)); box-shadow: 0 0 0 2px rgba(246, 183, 60, 0.35) inset; }
.fmt-card .fmt-vs { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.1; color: var(--brass); }
.fmt-card .fmt-name { font-size: 12.5px; font-weight: 900; }
.fmt-card .ar { font-size: 10.5px; color: var(--text-dim); margin: 0; }
.fmt-card small { font-size: 10.5px; font-weight: 700; color: var(--text-dim); }
.fmt-card .fmt-live { font-style: normal; font-size: 10px; font-weight: 900; color: #7ddc5f; min-height: 13px; }
.fd { display: flex; align-items: center; gap: 4px; height: 18px; }
.fd i { display: block; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.5); }
.fd-side { display: flex; gap: 2px; flex-wrap: wrap; max-width: 22px; justify-content: center; }
.fd b { font-size: 9px; font-weight: 900; color: var(--text-dim); text-transform: uppercase; }
.fd.ffa { flex-wrap: wrap; width: 34px; justify-content: center; gap: 2px; }
.fmt-map { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.08); }
.fmt-map .fm-mode, .fmt-map .fm-maps { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fmt-map .fm-mode b { font-size: 14px; }
.fmt-map small { font-size: 11px; font-weight: 700; color: var(--text-dim); }
.fmt-map .fm-maps { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
.fmt-map .fm-maps small { flex-basis: 100%; }
.fm-forest, .fm-snow, .rr-chips .c-map { font-style: normal; font-size: 11px; font-weight: 900; padding: 3px 9px 3px 22px; border-radius: 999px; position: relative; }
.fm-forest::before, .fm-snow::before, .rr-chips .c-map::before { content: ''; position: absolute; left: 7px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 3px; }
.fm-forest, .rr-chips .c-forest { background: rgba(125, 220, 95, 0.16); color: #bff0a8; }
.fm-forest::before, .rr-chips .c-forest::before { background: linear-gradient(135deg, #5fae45, #2f6d2a); }
.fm-snow, .rr-chips .c-snow { background: rgba(160, 210, 255, 0.16); color: #d4ecff; }
.fm-snow::before, .rr-chips .c-snow::before { background: linear-gradient(135deg, #ffffff, #9cc7e8); }
.fmt-sum { font-size: 12.5px; font-weight: 700; line-height: 1.5; padding: 8px 10px; border-radius: 10px; background: rgba(246, 183, 60, 0.08); }
.fmt-sum .ar { margin: 0; color: var(--text-dim); }
.fmt-pay b { color: #ffd98a; }
.on-more { font-size: 12.5px; font-weight: 700; }
.on-more summary { cursor: pointer; color: var(--text-dim); font-weight: 900; }
.on-more .on-rules { margin-top: 6px; }
.rr-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rr-chips i { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--text); }
.rr-chips .c-mode { background: rgba(246, 183, 60, 0.18); color: #ffd98a; }
.rr-chips .c-team { background: rgba(77, 163, 255, 0.18); color: #bfe0ff; }
.rr-chips .c-team .ar { margin: 0 0 0 4px; font-size: 10.5px; color: inherit; opacity: 0.8; }
.rr-chips .c-bots { color: var(--text-dim); }
.on-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; }
.on-team { border-radius: 12px; padding: 8px 10px; background: rgba(77, 163, 255, 0.1); border: 1px solid rgba(77, 163, 255, 0.35); min-width: 0; }
.on-team.t1 { background: rgba(229, 72, 77, 0.1); border-color: rgba(229, 72, 77, 0.4); }
.on-team h5 { margin: 0 0 4px; font-size: 13px; font-weight: 900; color: #9fd0ff; }
.on-team.t1 h5 { color: #ffaaa9; }
.on-team .room-slots-list { margin: 0; }
.on-vs { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--brass); }
@media (max-width: 1100px) { .fmt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .mp-tabs { grid-template-columns: 1fr; }
  .mp-tabs button small { white-space: normal; }
  .on-teams { grid-template-columns: 1fr; }
  .on-vs { text-align: center; }
}
.on-ranked #btnFindRanked { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -10px 18px rgba(10, 14, 8, 0.65); }
.on-ranked { gap: 7px; }
.on-ranked .on-rank-sub { margin: 0; }
.on-team .room-slots-list { display: flex; flex-direction: column; gap: 4px; }
.on-team .room-slots-list li { margin: 0; }
.fmt-map { padding: 6px 10px; }
.fmt-map .fm-maps small { flex-basis: auto; }
.on-ranked #btnFindRanked { font-size: 19px; padding: 11px 14px; line-height: 1.2; }
.on-ranked #btnFindRanked .ar { display: inline; font-size: 12px; margin-left: 6px; }
@media (max-width: 700px) {
  .mp-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .mp-tabs button { flex-direction: column; text-align: center; gap: 3px; padding: 7px 4px; }
  .mp-tabs button .mpt-ico { width: 26px; height: 26px; font-size: 14px; }
  .mp-tabs button b { font-size: 12px; }
  .mp-tabs button small { display: none; }
  .mp-banner .ar { display: none; }
  .on-ranked #btnFindRanked .ar { display: none; }
}

/* ---------- v1.0.5 languages ---------- */
/* the old side-by-side Arabic lines: the game now speaks ONE language (Settings → Language) */
.ar, .mc-ar { display: none !important; }
.lang-flag { display: inline-block; vertical-align: -2px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); object-fit: cover; }
.st-langtab { display: inline-flex; margin-right: 6px; }
html.rtl .st-langtab { margin-right: 0; margin-left: 6px; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 8px; }
.lang-btn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; text-align: start;
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.28); color: var(--text); font: 800 14px var(--font-body); }
.lang-btn:hover { border-color: rgba(246, 183, 60, 0.6); }
.lang-btn[aria-checked="true"] { border-color: var(--brass); background: rgba(246, 183, 60, 0.16); }
.lang-btn .lang-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-btn .lang-on { color: var(--brass); font-weight: 900; }
.lang-btn.switching { opacity: 0.6; }

/* ---------- v1.0.5 name tags with frames (kingdoms list, rooms, podium) ---------- */
.name-tag { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; vertical-align: middle; }
.name-tag b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-tag .pf-star { width: 13px; height: 13px; flex: none; }
.name-tag.name-frame { padding: 0 7px; border-radius: 999px; }
#kingdomList .name-tag.name-frame { padding: 0 5px; border-width: 1.5px; }
#kingdomList .k-you { font-style: normal; opacity: 0.7; }
.pod-name .name-tag { font-size: inherit; }
.pod-sub .name-tag { margin: 1px 2px; font-size: 11px; }

/* ===================== v1.0.5 Locker ===================== */
.locker-card { width: min(1180px, 100%); height: min(780px, calc(var(--vh100) - 32px)); }
.locker-card .shop-head { grid-template-columns: auto 1fr auto auto; }
.lk-count { font-weight: 900; color: var(--text-dim); font-size: 13px; }
.lk-headbtns { display: flex; gap: 8px; }
.lk-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 270px 1fr; gap: 16px; }
.lk-side { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.lk-stage { position: relative; border-radius: 16px; background: radial-gradient(circle at 50% 42%, #4f7f3c, #22381c 72%); border: 2px solid rgba(255,255,255,.08); padding: 6px 6px 12px; display: flex; flex-direction: column; align-items: center; }
.lk-stage canvas { width: 220px; height: 220px; }
.lk-plate { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: -4px; }
.lk-plate .name-tag { font-size: 16px; }
.lk-title { color: #ffd27a; font-weight: 900; font-size: 12px; }
.lk-worn { display: grid; grid-template-columns: 1fr; gap: 3px; }
.lk-wrow { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; text-align: start; padding: 5px 9px; border-radius: 9px; border: 1px solid transparent; background: rgba(0,0,0,.22); color: var(--text); cursor: pointer; font: inherit; }
.lk-wrow span { font-size: 11.5px; font-weight: 800; color: var(--text-dim); white-space: nowrap; }
.lk-wrow b { font-size: 12.5px; font-weight: 900; text-align: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lk-wrow:hover, .lk-wrow.on { border-color: rgba(246, 183, 60, .55); background: rgba(246, 183, 60, .1); }
.lk-h { margin: 6px 0 0; font-family: var(--font-display); font-weight: 400; font-size: 18px; color: #ffd27a; }
.lk-loadouts { display: flex; flex-direction: column; gap: 6px; }
.lk-load { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 7px 9px; border-radius: 11px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08); }
.lk-load b { font-size: 13px; font-weight: 900; }
.lk-load small { grid-column: 1; font-size: 11.5px; color: var(--text-dim); font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-load span { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 4px; }
.lk-load.empty b { color: var(--text-dim); }
.lk-load .sh-chip:disabled { opacity: .4; cursor: not-allowed; }
.lk-main { min-height: 0; display: flex; flex-direction: column; }
.lk-tabs button small { font-size: 11px; opacity: .75; margin-inline-start: 2px; }
.lk-tabs button { position: relative; }
.lk-dot { position: absolute; top: -3px; inset-inline-end: -3px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; border: 2px solid #0e1813; }
.lk-grid { flex: 1; min-height: 0; align-content: start; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.lk-card { position: relative; cursor: pointer; transition: transform .12s, border-color .12s; }
.lk-card:hover { transform: translateY(-2px); border-color: rgba(246, 183, 60, .5); }
.lk-card.lk-focus { animation: lkFocus 1.2s ease-out 2; }
@keyframes lkFocus { 0%, 100% { box-shadow: 0 0 0 3px rgba(246, 183, 60, .15); } 50% { box-shadow: 0 0 0 6px rgba(246, 183, 60, .55); } }
.lk-card .sh-btn { min-width: 96px; }
.lk-card.tier-pack { border-color: rgba(198, 40, 40, .35); }
.lk-newtag { position: absolute; top: 8px; inset-inline-start: 8px; padding: 1px 6px; border-radius: 6px; background: #e5484d; color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .5px; }
.lk-play { margin-top: 2px; }
.lk-more { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 200px; cursor: pointer; border-style: dashed; color: var(--text-dim); font: inherit; }
.lk-more:hover { color: var(--text); border-color: rgba(246, 183, 60, .55); }
.lk-more-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; font-weight: 900; background: rgba(255,255,255,.06); }
.lk-more b { font-size: 13px; }
.lk-wheel { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 10px 14px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08); }
.lk-wheel-ring { position: relative; flex: 0 0 148px; height: 148px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.08) 0 30%, rgba(0,0,0,.35) 31% 100%); border: 2px solid rgba(255,255,255,.12); }
.lk-wslot { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; display: grid; place-items: center; font-size: 20px; border-radius: 50%; background: rgba(14,24,19,.9); border: 2px solid rgba(246,183,60,.55); }
.lk-wslot.empty { border-style: dashed; border-color: rgba(255,255,255,.2); }
.lk-wheel-key { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--font-display); font-size: 20px; color: #ffd27a; }
.lk-wheel-txt { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); }
.lk-wheel-txt b { font-family: var(--font-display); font-weight: 400; font-size: 18px; color: var(--text); }
.lk-pack canvas { border-radius: 14px; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 30%, #2a4a22), #1d2a22 75%); }
.lk-titles { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.lk-titles .sh-tchip small { display: block; font-size: 10.5px; opacity: .7; }
.lm-new { position: absolute; top: 8px; inset-inline-end: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; background: #e5484d; color: #fff; font-weight: 900; font-size: 12px; }
#btnLocker { position: relative; }
.sh-lockernote { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sh-btn.sh-locker { background: linear-gradient(180deg, #bfe3ff, #7fb3d5); }
.pf-locker { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pf-locker span { font-size: 12.5px; font-weight: 800; color: var(--text-dim); }
.acc-items li b { font-size: 13px; }
@media (max-width: 860px) {
  .lk-body { grid-template-columns: 1fr; grid-template-rows: max-content max-content; align-content: start; overflow-y: auto; }
  .lk-side { overflow: visible; min-height: max-content; order: 2; }
  /* v1.0.8 one column: every block takes its natural height (they overlapped when squeezed) */
  .lk-main { min-height: auto; }
  .lk-main > * { flex-shrink: 0; }
  .lk-grid { flex: none; overflow: visible; max-height: none; }
  .lk-stage canvas { width: 160px; height: 160px; }
}

/* ===================== v1.0.5 Mystery Chest show ===================== */
.chest-show { position: absolute; inset: 0; z-index: 30; border-radius: inherit; overflow: hidden; cursor: pointer; animation: crIn .2s ease-out; }
.chest-show.cs-out { opacity: 0; transition: opacity .2s; }
.cs-canvas { position: absolute; inset: 0; display: block; }
.cs-hint { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-weight: 900; font-size: 12px; color: rgba(255,255,255,.45); letter-spacing: .5px; }
.cs-card { --rc: #f4c542; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 26px; border-radius: 18px; cursor: default;
  background: rgba(14, 24, 19, 0.93); border: 3px solid var(--rc); box-shadow: 0 0 60px color-mix(in srgb, var(--rc) 55%, transparent); animation: csPop .6s cubic-bezier(.2, 1.5, .4, 1); }
.cs-card canvas { width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle at 45% 40%, color-mix(in srgb, var(--rc) 45%, #2a4a22), #1d2a22 72%); }
.cs-card.r-legendary { box-shadow: 0 0 90px rgba(255, 210, 74, .75), inset 0 0 30px rgba(255, 210, 74, .25); }
.cs-new { color: var(--ok); }
@keyframes csPop { 0% { transform: translate(-50%, -10%) scale(.2) rotate(-25deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1) rotate(0); } }
.shop-grid.killfx { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.sh-card canvas.sh-kfx { width: 230px; height: 150px; border-radius: 14px; background: radial-gradient(ellipse at 50% 60%, #5a8d44, #24401d 75%); }
.lk-killfx .sh-card canvas.sh-kfx, .lk-grid canvas.sh-kfx { width: 100%; max-width: 230px; height: auto; aspect-ratio: 26 / 17; }

/* ===================== v1.0.5 emotes ===================== */
.btn-emote span { font-size: 17px; line-height: 1; }
.emote-wheel { position: fixed; inset: 0; z-index: 40; }
.emote-wheel.hidden { display: none; }
.ew-ring { position: absolute; width: 270px; height: 270px; margin: -135px 0 0 -135px; border-radius: 50%;
  background: radial-gradient(circle, rgba(14,24,19,.55) 0 22%, rgba(14,24,19,.82) 23% 100%); border: 2px solid rgba(255,255,255,.14); box-shadow: 0 10px 40px rgba(0,0,0,.45); animation: ewIn .14s ease-out; }
@keyframes ewIn { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ew-slot { position: absolute; width: 74px; height: 64px; margin: -32px 0 0 -37px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 16px; border: 2px solid transparent; background: rgba(255,255,255,.06); color: var(--text); cursor: pointer; font: inherit; }
.ew-slot:hover, .ew-slot.on { background: rgba(246,183,60,.22); border-color: var(--accent); transform: scale(1.08); }
.ew-glyph { font-size: 26px; line-height: 1; }
.ew-slot small { font-size: 10.5px; font-weight: 900; max-width: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ew-slot i { position: absolute; top: 3px; inset-inline-start: 6px; font-style: normal; font-size: 9px; font-weight: 900; color: var(--text-dim); }
.ew-hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--font-display); font-size: 15px; color: #ffd27a; }

/* v1.0.5 chest: frame rewards */
.cs-card .cr-frame{width:180px;height:180px;display:grid;place-items:center;margin:0 auto;transform:scale(1.35)}

/* =====================================================================
 * v1.0.5 — phone play: menu button, compact Build / Craft menus, tower bubble,
 * full screen button, rotate overlay, iPhone "Add to Home Screen" hint
 * ===================================================================== */
html.touch-play .touch-ui .t-pause { display: grid; place-items: center; top: 8px; left: 162px; right: auto; transform: none; width: 46px; height: 46px; border-radius: 14px; background: rgba(14, 24, 19, 0.78); z-index: 5; }
html.touch-play .touch-ui .t-pause svg { width: 24px; height: 24px; }
.touch-ui .t-full { position: absolute; top: 8px; left: 214px; transform: none; width: 46px; height: 46px; border-radius: 14px; font-size: 20px; pointer-events: auto; }
html.touch-play .side-panel { top: 8px; bottom: 140px; right: 8px; left: auto; width: min(330px, 44vw); max-height: none; min-height: 0; z-index: 30; padding: 8px 10px; }
html.touch-play .side-panel .panel-title { position: sticky; top: -8px; z-index: 2; background: inherit; padding: 4px 0 6px; }
html.touch-play .side-panel .recipe { grid-template-columns: 38px 1fr auto; gap: 6px; padding: 6px; }
html.touch-play .side-panel .recipe canvas, html.touch-play .side-panel .recipe img { width: 38px; height: 38px; }
html.touch-play .side-panel .recipe .r-desc, html.touch-play .side-panel .recipe small { font-size: 11px; line-height: 1.25; }
.t-tower { position: fixed; z-index: 40; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 16px; background: rgba(10, 16, 12, 0.88); border: 1px solid rgba(255, 255, 255, 0.25); pointer-events: auto; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45); }
.t-tower .tt-n { font: 800 14px var(--font-body); color: #fff; padding: 0 4px; white-space: nowrap; }
.t-tower .t-btn { width: 44px; height: 44px; font-size: 22px; }
.t-tower .tt-add { background: rgba(125, 220, 95, 0.85); color: #10240a; }
.t-tower .tt-del { background: rgba(246, 183, 60, 0.85); color: #2a1a02; }
.t-tower .tt-x { width: 36px; height: 36px; font-size: 15px; }
.t-tower .t-btn:disabled { opacity: 0.35; }
.rotate-ov { position: fixed; inset: 0; z-index: 9999; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #0b120e; color: #fff; text-align: center; padding: 24px; }
.rotate-ov.on { display: flex; }
.rotate-ov b { font: 800 22px var(--font-body); }
.rotate-ov span { opacity: 0.7; font-size: 15px; }
.ro-phone { width: 56px; height: 96px; border: 4px solid #fff; border-radius: 12px; position: relative; animation: roTurn 2.2s ease-in-out infinite; }
.ro-phone i { position: absolute; left: 50%; bottom: 6px; width: 12px; height: 4px; margin-left: -6px; border-radius: 2px; background: #fff; }
@keyframes roTurn { 0%, 20% { transform: rotate(0); } 55%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(-90deg); } }
.a2hs { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9000; display: grid; gap: 6px; padding: 14px 16px; border-radius: 16px; }
.a2hs b { font-size: 16px; } .a2hs span { font-size: 14px; opacity: 0.85; } .a2hs button { justify-self: end; }
@media (max-height: 420px) { html.touch-play .side-panel { bottom: 124px; } }
html.touch-play.panel-open .touch-ui .tz-aim { display: none; }
@media (max-width: 760px) { html.touch-play .touch-ui .t-pause { left: 140px; } .touch-ui .t-full { left: 190px; } }
/* the touch buttons already carry Eat / Build / Craft: the card's Eat key and the B / C bar are desktop-only */
html.touch-play .player-card .eat-btn, html.touch-play #buildToggle, html.touch-play #craftToggle { display: none; }

/* v1.0.6 full-screen recommendation (lobby, browsers only) */
.full-hint { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 8500; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-radius: 999px; font-size: 13.5px; max-width: calc(100vw - 24px); box-shadow: 0 6px 22px rgba(0,0,0,0.35); animation: fhIn 0.35s ease-out; }
.full-hint.hidden { display: none; }
.full-hint .fh-ico { font-size: 17px; opacity: 0.9; }
.full-hint .fh-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.full-hint .fh-go { padding: 5px 12px; font-size: 13px; }
.full-hint .fh-x { background: none; border: 0; color: inherit; font-size: 20px; line-height: 1; padding: 0 6px; opacity: 0.7; cursor: pointer; }
.full-hint .fh-x:hover { opacity: 1; }
@keyframes fhIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 520px) { .full-hint .fh-txt { display: none; } }

/* =====================================================================
 * v1.0.6 smaller in-match notices (about 18 % less screen) + kill banners
 * ===================================================================== */
.elim-banner { padding: 9px 20px; font-size: 28px; letter-spacing: 1.6px; border-radius: 12px; }
.elim-banner small { font-size: 11.5px; margin-top: 1px; }
.toast { padding: 6px 13px; font-size: 12.5px; border-radius: 10px; }
.toasts { gap: 5px; }

/* the plate: emblems either side, a moving shine, the skin's own frame & colours */
.elim-banner.kb { display: flex; align-items: center; gap: 12px; padding: 12px 16px 8px; margin-top: 8px;
  background: var(--kb-bg); border: 2px solid var(--kb-edge); box-shadow: 0 0 26px var(--kb-glow), inset 0 0 0 1px rgba(255,255,255,0.08), var(--shadow); }
.elim-banner.kb .kb-body { min-width: 0; }
.elim-banner.kb .eb-name { color: var(--kb-name, var(--k, #e5484d)); }
.elim-banner.kb small { color: var(--kb-sub, rgba(255,255,255,0.78)); }
.elim-banner.kb .kb-by { color: var(--kb-accent); }
.kb .kb-emb { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25), transparent 60%), var(--kb-emb-bg, rgba(0,0,0,0.35));
  border: 1.5px solid var(--kb-edge); box-shadow: 0 0 12px var(--kb-glow); }
.kb .kb-emb svg { width: 21px; height: 21px; fill: var(--kb-accent); filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6)); }
/* decoration layer: clipped to the plate (the name tab sits above it) */
.kb .kb-fx { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.kb .kb-fx::before { content: ''; position: absolute; inset: 0; background: var(--kb-deco, none); opacity: var(--kb-deco-o, 0.55); }
.kb .kb-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px 1px 7px; border-radius: 999px;
  font-family: var(--font-body); font-size: 11.5px; font-weight: 900; letter-spacing: 0.3px; white-space: nowrap; color: var(--kb-tag-fg, #1d1a17);
  background: var(--kb-edge); border: 1.5px solid rgba(0,0,0,0.55); box-shadow: 0 2px 8px rgba(0,0,0,0.45), 0 0 10px var(--kb-glow); z-index: 1; }
.kb .kb-tag svg { width: 12px; height: 12px; fill: currentColor; }
.kb .kb-body, .kb .kb-emb, .kb .kb-pv-txt { position: relative; }
.kb .kb-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.22) 48%, transparent 60%);
  transform: translateX(-120%); animation: kbShine 2.4s ease-in-out 0.35s infinite; }
@keyframes kbShine { 60%, 100% { transform: translateX(120%); } }
.kb.kb-legend .kb-emb, .kb.kb-diamond .kb-emb, .kb.kb-storm .kb-emb { animation: kbPulse 1.6s ease-in-out infinite; }
@keyframes kbPulse { 50% { box-shadow: 0 0 22px var(--kb-glow); transform: scale(1.06); } }

/* skins */
.kb-classic    { --kb-bg: linear-gradient(180deg, #2a1212, #140606); --kb-edge: #e5484d; --kb-glow: rgba(229,72,77,0.35); --kb-accent: #ffb4ae; }
.kb-kingslayer { --kb-bg: linear-gradient(180deg, #2b1030, #120515); --kb-edge: #c48bff; --kb-glow: rgba(176,124,240,0.5); --kb-accent: #ffd166; --kb-name: #f1d4ff; }
.kb-champion   { --kb-bg: linear-gradient(180deg, #13301a, #07140a); --kb-edge: #7ddc5f; --kb-glow: rgba(125,220,95,0.45); --kb-accent: #f4e08a; --kb-name: #d6ffc4; }
.kb-silver     { --kb-bg: linear-gradient(180deg, #3a414a, #171b20); --kb-edge: #dfe6ee; --kb-glow: rgba(201,209,217,0.45); --kb-accent: #ffffff; --kb-name: #eef3f8; }
.kb-gold       { --kb-bg: linear-gradient(180deg, #4a3608, #1b1302); --kb-edge: #f4c542; --kb-glow: rgba(244,197,66,0.55); --kb-accent: #ffe08a; --kb-name: #ffe9a8; }
.kb-diamond    { --kb-bg: linear-gradient(160deg, #0f3550, #061827 55%, #12304a); --kb-edge: #7fd4ff; --kb-glow: rgba(127,212,255,0.6); --kb-accent: #e6f8ff; --kb-name: #bfeaff; }
.kb-legend     { --kb-bg: linear-gradient(120deg, #3b0a2a, #1a0a33 40%, #0a2a3b 75%, #3b0a2a); --kb-edge: #ff5fa2; --kb-glow: rgba(255,95,162,0.6); --kb-accent: #ffe08a; --kb-name: #ffd0e6;
  background-size: 300% 100% !important; animation: elimIn 0.5s cubic-bezier(.2,1.4,.4,1), kbFlow 4s linear infinite, elimOut 0.6s ease 3.9s forwards; }
@keyframes kbFlow { to { background-position: 300% 0; } }
.kb-inferno    { --kb-bg: linear-gradient(180deg, #4a1606, #1a0602); --kb-edge: #ff7b3b; --kb-glow: rgba(255,110,40,0.6); --kb-accent: #ffd166; --kb-name: #ffb38a; }
.kb-frost      { --kb-bg: linear-gradient(180deg, #123a4f, #06141d); --kb-edge: #9be7ff; --kb-glow: rgba(155,231,255,0.5); --kb-accent: #ffffff; --kb-name: #d8f6ff; }
.kb-storm      { --kb-bg: linear-gradient(180deg, #1c1f4a, #08091d); --kb-edge: #8f9bff; --kb-glow: rgba(143,155,255,0.6); --kb-accent: #fff27a; --kb-name: #dfe3ff; }
.kb-royal      { --kb-bg: linear-gradient(180deg, #45102a, #1a0410); --kb-edge: #e8b04a; --kb-glow: rgba(232,176,74,0.45); --kb-accent: #ffe2a6; --kb-name: #ffd7e8; }
.kb-samurai    { --kb-bg: linear-gradient(180deg, #f4efe6, #e3d6c2); --kb-edge: #c62828; --kb-glow: rgba(198,40,40,0.4); --kb-accent: #c62828; --kb-name: #b71c1c; --kb-sub: #5a3a2a; --kb-emb-bg: #fff6ee; color: #2a1a12; }
.kb-viking     { --kb-bg: linear-gradient(180deg, #3a2a1c, #15100a); --kb-edge: #c9a46a; --kb-glow: rgba(143,211,255,0.35); --kb-accent: #bfe9ff; --kb-name: #f2d7a6; }
.kb-pharaoh    { --kb-bg: linear-gradient(180deg, #143a7a, #071a3a); --kb-edge: #f4c542; --kb-glow: rgba(244,197,66,0.5); --kb-accent: #ffd166; --kb-name: #ffe9a8; }
.kb-roman      { --kb-bg: linear-gradient(180deg, #6b1414, #2a0505); --kb-edge: #f4c542; --kb-glow: rgba(244,197,66,0.45); --kb-accent: #ffe08a; --kb-name: #fff1c2; }
.kb-mongol     { --kb-bg: linear-gradient(180deg, #24425f, #0d1a28); --kb-edge: #d6a737; --kb-glow: rgba(214,167,55,0.45); --kb-accent: #f2e2b8; --kb-name: #ffe9a8; }
.kb-native     { --kb-bg: linear-gradient(180deg, #0f4a44, #062320); --kb-edge: #f2a65a; --kb-glow: rgba(43,179,163,0.5); --kb-accent: #ffe1b8; --kb-name: #c9fff7; }
.kb-samurai .kb-shine { background: linear-gradient(105deg, transparent 35%, rgba(198,40,40,0.18) 48%, transparent 60%); }

/* the small preview plate (Locker, shop) */
.kb-plate { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 8px 8px; border-radius: 10px; overflow: hidden;
  background: var(--kb-bg); border: 1.5px solid var(--kb-edge); box-shadow: 0 0 14px var(--kb-glow); }
.kb-plate .kb-emb { width: 24px; height: 24px; } .kb-plate .kb-emb svg { width: 15px; height: 15px; }
.kb-plate .kb-pv-txt { font-family: var(--font-display); font-size: 13px; letter-spacing: 1px; color: var(--kb-name, #fff); white-space: nowrap; }
.kb-plate.kb-legend { background-size: 300% 100%; animation: kbFlow 4s linear infinite; }
.sh-card .kb-plate { margin: 26px 0 22px; }

/* the Legend name frame (rank reward): a gold edge around a flowing crimson → violet → ice glow */
.frame-legend { border: 2px solid #ffe08a; background: linear-gradient(120deg, rgba(255,95,162,0.35), rgba(176,124,240,0.3), rgba(127,212,255,0.3), rgba(255,95,162,0.35)); background-size: 300% 100%; animation: kbFlow 5s linear infinite; box-shadow: 0 0 14px rgba(255,224,138,0.55), 0 0 22px rgba(255,95,162,0.35); }

/* =====================================================================
 * v1.0.6 Ranks screen (the Trophy ladder) + the lobby chip's reward dot
 * ===================================================================== */
#menuRankBox { cursor: pointer; position: relative; }
#menuRankBox:hover { filter: brightness(1.15); }
#menuRankBox.rk-claim::after { content: ''; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: #e5484d; border: 2px solid #1d1a17; animation: kbPulse 1.4s ease-in-out infinite; }
.ranks-card { width: min(980px, 96vw); max-height: calc(var(--vh1) * 92); display: flex; flex-direction: column; }
.ranks-card .rk-sub { font-size: 12.5px; font-weight: 800; color: var(--text-dim); margin-inline-start: 10px; }
.rk-body { display: grid; grid-template-columns: 280px 1fr; grid-template-rows: auto 1fr; gap: 12px; min-height: 0; overflow: hidden; padding: 4px 2px 2px; }
.rk-me { grid-row: 1 / 3; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(0,0,0,0.28); overflow: auto; }
.rk-me-top { display: flex; align-items: center; gap: 12px; }
.rk-me-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rk-me-name { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.5px; }
.rk-me-cups { display: flex; align-items: center; gap: 5px; font-weight: 900; }
.rk-me-cups .cur-ico, .rk-ladder .cur-ico, .rk-me-stats .cur-ico { width: 15px; height: 15px; }
.rk-me-next { font-size: 12.5px; font-weight: 800; color: var(--text-dim); }
.rk-bar { height: 9px; border-radius: 6px; background: rgba(255,255,255,0.1); overflow: hidden; }
.rk-bar i { display: block; height: 100%; border-radius: 6px; box-shadow: 0 0 10px currentColor; }
.rk-guard { font-size: 12.5px; font-weight: 800; padding: 7px 9px; border-radius: 10px; background: rgba(77,163,255,0.14); border: 1px solid rgba(77,163,255,0.4); color: #cfe6ff; }
.rk-claim-btn { width: 100%; font-size: 15px; padding: 10px; animation: kbPulse 1.6s ease-in-out infinite; }
.rk-me-stats { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 800; color: var(--text-dim); }
.rk-me-stats b { color: var(--text); }
.rk-ladder { overflow: auto; display: flex; flex-direction: column; gap: 6px; padding-inline-end: 4px; min-height: 0; }
.rk-row { display: grid; grid-template-columns: 44px 150px 1fr auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.06); opacity: 0.72; }
.rk-row.reached { opacity: 1; }
.rk-row.cur { border-color: var(--accent, #f6b73c); box-shadow: 0 0 0 1px var(--accent, #f6b73c), 0 0 18px rgba(246,183,60,0.25); background: rgba(246,183,60,0.08); opacity: 1; }
.rk-row-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rk-row-name b { font-family: var(--font-display); font-size: 16px; letter-spacing: 0.4px; }
.rk-row-name small { display: flex; align-items: center; gap: 3px; font-weight: 800; color: var(--text-dim); font-size: 12px; }
.rk-row-name em { font-style: normal; font-size: 11px; font-weight: 900; color: var(--accent, #f6b73c); text-transform: uppercase; letter-spacing: 0.5px; }
.rk-row-rw { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.rk-gems { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; font-size: 15px; }
.rk-gems .cur-ico { width: 17px; height: 17px; }
.rk-item .kb-plate { width: 150px; padding: 4px 6px; margin: 0; }
.rk-item .kb-plate .kb-pv-txt { font-size: 11px; }
.rk-item .kb-plate .kb-emb { width: 18px; height: 18px; } .rk-item .kb-plate .kb-emb svg { width: 11px; height: 11px; }
.rk-frame .name-frame { font-size: 12px; font-weight: 900; padding: 1px 8px; }
.rk-st { font-size: 12.5px; font-weight: 900; white-space: nowrap; }
.rk-st.ok { color: #9be38a; } .rk-st.claim { color: #ffd166; } .rk-st.lock { opacity: 0.6; }
.rk-none { color: var(--text-dim); }
.rk-emb { flex: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45)); }
.rk-emb.rk-legend, .rk-emb.rk-diamond { filter: drop-shadow(0 0 6px rgba(255,95,162,0.5)); }
.rk-rules { padding: 10px 12px; border-radius: 14px; background: rgba(0,0,0,0.22); font-size: 12.5px; }
.rk-rules h4 { margin: 0 0 6px; font-size: 14px; }
.rk-table { overflow-x: auto; }
.rk-table table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.rk-table th, .rk-table td { padding: 3px 6px; text-align: center; white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,0.06); }
.rk-table thead th, .rk-table tr:first-child th { font-size: 11px; color: var(--text-dim); font-weight: 900; }
.rk-table td.up { color: #9be38a; font-weight: 900; } .rk-table td.down { color: #ff9b8a; font-weight: 900; }
.rk-table tr.mine { background: rgba(246,183,60,0.12); }
.rk-notes { margin: 8px 0 0; padding-inline-start: 18px; display: grid; gap: 2px; color: var(--text-dim); font-weight: 700; }
.on-ranks { margin-top: 4px; font-size: 12px; padding: 3px 9px; }
@media (max-width: 760px) {
  .rk-body { grid-template-columns: 1fr; grid-template-rows: auto auto auto; overflow: auto; }
  .rk-me { grid-row: auto; }
  .rk-row { grid-template-columns: 38px 1fr auto; }
  .rk-row-rw { grid-column: 2 / 4; }
  .ranks-card .rk-sub { display: none; }
}

/* kill banner decorations (patterns behind the text) */
.kb-inferno  { --kb-deco: radial-gradient(120% 70% at 50% 140%, rgba(255,120,30,0.75), transparent 60%), radial-gradient(40% 60% at 15% 120%, rgba(255,209,102,0.6), transparent 70%), radial-gradient(40% 60% at 85% 120%, rgba(255,90,30,0.6), transparent 70%); --kb-deco-o: 0.9; }
.kb-inferno .kb-fx::before { animation: kbFlicker 0.9s ease-in-out infinite alternate; }
@keyframes kbFlicker { to { opacity: 0.6; transform: translateY(2px) scaleY(1.04); } }
.kb-frost    { --kb-deco: repeating-linear-gradient(115deg, rgba(255,255,255,0.10) 0 2px, transparent 2px 14px), radial-gradient(90% 60% at 50% -20%, rgba(220,245,255,0.55), transparent 65%); --kb-deco-o: 0.9; }
.kb-storm    { --kb-deco: radial-gradient(60% 80% at 50% -30%, rgba(143,155,255,0.6), transparent 70%); }
.kb-storm .kb-fx::after { content: ''; position: absolute; inset: 0; background: rgba(255,250,200,0.0); animation: kbFlash 3.2s steps(1) infinite; }
@keyframes kbFlash { 0%, 46%, 50%, 54%, 100% { background: rgba(255,250,200,0); } 48%, 52% { background: rgba(255,250,200,0.28); } }
.kb-royal    { --kb-deco: repeating-linear-gradient(45deg, rgba(232,176,74,0.12) 0 6px, transparent 6px 12px), repeating-linear-gradient(-45deg, rgba(232,176,74,0.12) 0 6px, transparent 6px 12px); --kb-deco-o: 0.8; }
.kb-gold     { --kb-deco: repeating-linear-gradient(90deg, rgba(255,224,138,0.10) 0 1px, transparent 1px 9px), radial-gradient(80% 90% at 50% 120%, rgba(244,197,66,0.45), transparent 70%); }
.kb-silver   { --kb-deco: repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 7px), linear-gradient(180deg, rgba(255,255,255,0.18), transparent 50%); }
.kb-diamond  { --kb-deco: conic-gradient(from 210deg at 50% 120%, rgba(127,212,255,0.0), rgba(127,212,255,0.45), rgba(230,248,255,0.2), rgba(127,212,255,0.45), rgba(127,212,255,0)); --kb-deco-o: 0.8; }
.kb-legend   { --kb-deco: radial-gradient(60% 120% at 0% 50%, rgba(255,95,162,0.45), transparent 60%), radial-gradient(60% 120% at 100% 50%, rgba(127,212,255,0.45), transparent 60%); --kb-tag-fg: #1d1a17; }
.kb-legend.elim-banner, .kb-plate.kb-legend { border-color: #ffe08a; }
.kb-kingslayer { --kb-deco: radial-gradient(70% 90% at 50% 130%, rgba(196,139,255,0.5), transparent 70%), repeating-linear-gradient(135deg, rgba(255,209,102,0.07) 0 3px, transparent 3px 10px); }
.kb-champion { --kb-deco: radial-gradient(80% 100% at 50% 130%, rgba(125,220,95,0.45), transparent 70%); }
.kb-samurai  { --kb-deco: radial-gradient(circle at 50% 50%, rgba(198,40,40,0.22) 0 26%, transparent 27%), repeating-linear-gradient(0deg, rgba(90,58,42,0.05) 0 2px, transparent 2px 6px); --kb-deco-o: 1; --kb-tag-fg: #fff6ee; }
.kb-viking   { --kb-deco: repeating-linear-gradient(90deg, rgba(201,164,106,0.10) 0 2px, transparent 2px 22px), linear-gradient(180deg, rgba(191,233,255,0.15), transparent 40%); }
.kb-pharaoh  { --kb-deco: repeating-linear-gradient(135deg, rgba(244,197,66,0.16) 0 5px, transparent 5px 10px) bottom / 100% 9px no-repeat, repeating-linear-gradient(45deg, rgba(244,197,66,0.16) 0 5px, transparent 5px 10px) top / 100% 9px no-repeat; --kb-deco-o: 1; }
.kb-roman    { --kb-deco: linear-gradient(90deg, transparent 0 6%, rgba(244,197,66,0.35) 6% 7%, transparent 7% 93%, rgba(244,197,66,0.35) 93% 94%, transparent 94%), radial-gradient(80% 90% at 50% 130%, rgba(244,197,66,0.3), transparent 70%); --kb-deco-o: 1; }
.kb-mongol   { --kb-deco: repeating-linear-gradient(60deg, rgba(214,167,55,0.12) 0 2px, transparent 2px 16px), linear-gradient(180deg, transparent 60%, rgba(214,167,55,0.25)); }
.kb-native   { --kb-deco: repeating-linear-gradient(90deg, rgba(242,166,90,0.20) 0 6px, rgba(43,179,163,0.16) 6px 12px, transparent 12px 24px) bottom / 100% 6px no-repeat, repeating-linear-gradient(90deg, rgba(242,166,90,0.20) 0 6px, rgba(43,179,163,0.16) 6px 12px, transparent 12px 24px) top / 100% 6px no-repeat; --kb-deco-o: 1; }
.kb-classic  { --kb-deco: none; }
.lk-card .kb-plate { padding: 6px 5px; gap: 5px; }
.lk-card .kb-plate .kb-pv-txt { font-size: 10.5px; letter-spacing: 0.3px; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lk-card .kb-plate .kb-emb { width: 19px; height: 19px; } .lk-card .kb-plate .kb-emb svg { width: 11px; height: 11px; }

/* v1.0.6 credits: the studio's contact e-mail */
.credit-mail { color: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; user-select: all; }
.credit-mail:hover { color: var(--accent, #f6b73c); }

/* ---------- v1.0.7 first-load screen (recorded sounds) ---------- */
.boot-loader { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(ellipse at center, #16281e, #050a08 75%); transition: opacity 0.45s ease, visibility 0.45s; }
.boot-loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.bl-card { width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.bl-card .logo { font-size: clamp(38px, 9vw, 64px); }
.bl-bar { width: 100%; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5); }
.bl-bar i { display: block; height: 100%; width: 4%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-deep, #2f6b25), #ffe08a); transition: width 0.25s ease; }
.bl-text { font-weight: 800; color: var(--text-dim, #c9d1c4); font-size: 14px; min-height: 20px; font-variant-numeric: tabular-nums; }
.bl-ver { font-size: 11px; color: rgba(255, 255, 255, 0.35); }

/* v1.0.7 the game's daytime vignette (was a full-screen canvas blit each frame) */
.vignette-layer { position: fixed; inset: 0; pointer-events: none; display: none;
  background: radial-gradient(circle at 50% 50%, rgba(6, 14, 10, 0) 35vmin, rgba(6, 14, 10, 0.42) 75vmax); }
.vignette-layer.on { display: block; }

/* v1.0.7 HUD editor on phones: one slim bar (bottom, or top when the element you edit sits low) */
@media (max-width: 900px), (max-height: 560px) {
  .he-bar { top: auto; bottom: 6px; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 4px 8px; border-radius: 12px;
    font-size: 11px; max-width: calc(100vw - 12px); scrollbar-width: none; justify-content: flex-start; }
  .he-bar::-webkit-scrollbar { display: none; }
  .he-bar.at-top { top: 6px; bottom: auto; }
  .he-bar > b { display: none; }
  .he-bar .seg { flex: none; }
  .he-bar .seg button { padding: 3px 7px; font-size: 11px; white-space: nowrap; }
  .he-bar .btn-ghost, .he-bar .sh-btn { padding: 4px 8px; font-size: 11px; min-height: 0; white-space: nowrap; flex: none; }
  .he-sel { min-width: 0; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
  .he-ctl { gap: 3px; flex: none; }
  .he-ctl input { width: 62px; }
  .he-ctl output { min-width: 30px; }
  .hud-editor { background: rgba(4, 8, 6, 0.2); }
}

/* v1.0.7 computer: the elimination banner's text a little larger again (phones keep the compact size) */
@media (min-width: 901px) and (min-height: 561px) {
  html:not(.touch-play) .elim-banner { font-size: 33px; padding: 10px 24px; }
  html:not(.touch-play) .elim-banner small { font-size: 13.5px; margin-top: 2px; }
  html:not(.touch-play) .kb .kb-tag { font-size: 13px; }
}

/* v1.0.7 the minimap fills its panel and sits in its middle (no empty strip on one side) */
.right-col .minimap-wrap { width: 100%; box-sizing: border-box; }
.right-col #minimap, html.touch-play .right-col #minimap { width: 100%; height: auto; aspect-ratio: 1 / 1; margin: 0 auto; }
.right-col .minimap-wrap { position: relative; }
.right-col .minimap-footer { justify-content: center; }
.right-col .minimap-footer .fps { position: absolute; top: 13px; left: 13px; padding: 1px 6px; border-radius: 6px; font-size: 11px; line-height: 1.4;
  background: rgba(0, 0, 0, 0.5); pointer-events: none; z-index: 1; }
.right-col .minimap-footer .sys-buttons { gap: 3px; flex-wrap: nowrap; }
.right-col .minimap-footer .icon-btn { width: 30px; height: 30px; flex: none; }
html.touch-play .right-col .minimap-footer .sys-buttons { flex-wrap: wrap; justify-content: center; }
html.touch-play .right-col .minimap-footer .icon-btn { width: 28px; height: 28px; }

/* v1.0.7 phones: "set up your controls" invitation in the lobby (once) */
.ctl-prompt { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 8400; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 14px; border-radius: 16px; max-width: min(560px, calc(100vw - 24px)); box-shadow: 0 6px 22px rgba(0,0,0,0.35); animation: fhIn 0.35s ease-out; }
.ctl-prompt.above { bottom: 64px; }
.ctl-prompt.hidden { display: none; }
.ctl-prompt .cp-ico { font-size: 22px; }
.ctl-prompt .cp-txt { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.ctl-prompt .cp-txt small { color: var(--text-dim); font-size: 11.5px; line-height: 1.3; }
.ctl-prompt .cp-go, .ctl-prompt .cp-later { padding: 5px 12px; font-size: 13px; white-space: nowrap; flex: none; }
/* phones (landscape is short): both lobby hints sit in the empty bottom-left corner, never over the menu */
@media (max-height: 560px), (max-width: 700px) {
  .full-hint, .ctl-prompt { left: 10px; transform: none; max-width: min(330px, calc(100vw - 20px)); animation-name: fhInL; }
  .full-hint { bottom: 22px; }
  .ctl-prompt { bottom: 22px; flex-wrap: wrap; gap: 6px 8px; padding: 8px 10px; }
  .ctl-prompt.above { bottom: 70px; }
  .ctl-prompt .cp-txt { flex: 1 1 200px; }
}
@keyframes fhInL { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ctl-prompt .cp-x { background: none; border: 0; color: inherit; font-size: 20px; line-height: 1; padding: 0 6px; opacity: 0.7; cursor: pointer; }
@media (max-height: 560px), (max-width: 700px) { .full-hint, .ctl-prompt { max-width: min(305px, calc(100vw - 20px)); } }
.pf-pid { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-weight: 800; font-size: 13px; flex-wrap: wrap; }
.pf-pid code { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; padding: 4px 8px; border-radius: 8px; background: rgba(0,0,0,0.3); font-size: 12px; user-select: all; }
.pf-pid .sh-btn { padding: 4px 12px; font-size: 12px; }

/* v1.0.8 portals (CrazyGames / Poki): the portal owns accounts and payments */
.portal #btnAccount, .portal #btnMulti { display: none !important; }
.portal .credit-mail { pointer-events: none; color: inherit; text-decoration: none; }
.portal .btn-google, .portal .ob-or, .portal #obSaveNote, .portal #pfGoogle { display: none !important; }
.portal:not(.portal-preview) [data-full], .portal:not(.portal-preview) #fullHint, .portal:not(.portal-preview) .ios-hint { display: none !important; }
/* v1.0.8 mobile: the right stick is now a fixed ATTACK button (the lord faces where he walks) */
.touch-ui .tz-aim .stick.atk-btn { width: 100px; height: 100px; margin: -50px 0 0 -50px; left: calc(100% - 80px); top: calc(100% - 64px); opacity: 0.85; background: radial-gradient(circle at 40% 35%, rgba(240, 90, 80, 0.9), rgba(150, 30, 30, 0.9)); border: 3px solid rgba(255, 255, 255, 0.55); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
.touch-ui .tz-aim .stick.atk-btn.live { opacity: 1; transform: scale(0.93); }
.touch-ui .tz-aim .stick.atk-btn i { display: none; }
.touch-ui .tz-aim .atk-ico { position: absolute; inset: 0; display: grid; place-items: center; font-size: 48px; color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); pointer-events: none; }
@media (max-height: 500px) { .touch-ui .tz-aim .stick.atk-btn { width: 84px; height: 84px; margin: -42px 0 0 -42px; left: calc(100% - 66px); top: calc(100% - 50px); } .touch-ui .tz-aim .atk-ico { font-size: 38px; } }
.he-handle span i { font-style: normal; font-weight: 700; color: #cfe3ff; opacity: .85; }
/* v1.0.8 display banners (own site only — Banners.js): match loading screen + end of match */
.ad-slot { display: none; }
.ad-slot.on { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ad-slot iframe { border: 0; display: block; max-width: 100%; background: transparent; }
.ad-label { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim, #9aa); opacity: .6; }
.ad-load { margin-top: 16px; }
.ad-end { margin-top: 12px; }

/* ===== v1.1 "Battle First" goal chip (Tutorial.js): one icon, a few words, a counter ===== */
.tut-goal { position: absolute; top: 112px; left: 50%; transform: translateX(-50%); z-index: 30; pointer-events: auto;
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  width: min(460px, calc(100vw - 24px)); padding: 8px 10px 12px 8px; border-radius: 16px; border: 2px solid rgba(255, 210, 74, 0.55); overflow: hidden; }
.tut-goal.tut-pop { animation: tgPop .45s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes tgPop { 0% { transform: translateX(-50%) scale(.7); opacity: 0; } 100% { transform: translateX(-50%) scale(1); opacity: 1; } }
.tut-goal.tg-alert { border-color: #ff5a4a; animation: tgPop .45s cubic-bezier(.2, 1.5, .4, 1), tgAlert .7s ease-in-out .45s 4 alternate; }
@keyframes tgAlert { to { box-shadow: 0 0 0 4px rgba(255, 90, 74, 0.45), 0 0 26px rgba(255, 90, 74, 0.6); } }
.tg-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.35); }
.tg-ico svg { width: 34px; height: 34px; }
.tg-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tg-main b { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.1; }
.tut-goal.tg-alert .tg-main b { color: #ff8a7a; }
.tg-main small { font-size: 12px; font-weight: 700; color: var(--text-dim); line-height: 1.35; }
.tg-main kbd { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25); font-size: 11px; font-weight: 900; }
.tg-prog { font-family: var(--font-display); font-size: 20px; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tg-prog.tg-tick { animation: tgTick .3s ease-out; }
@keyframes tgTick { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
.tg-skip { align-self: start; width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer; background: rgba(255, 255, 255, 0.1); color: var(--text-dim); font-size: 12px; font-weight: 900; }
.tg-skip:hover { background: rgba(255, 255, 255, 0.22); color: var(--text); }
.tut-goal .tut-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; margin: 0; border-radius: 0; }
.tut-marker.foe span { background: #ff5a4a; }
@media (max-width: 720px) { .tut-goal { top: 92px; grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 8px; } .tg-ico { width: 38px; height: 38px; } .tg-ico svg { width: 28px; height: 28px; } .tg-main b { font-size: 17px; } .tg-prog { font-size: 17px; } }
html.tut-on #questPanel, html.guide-on #questPanel { display: none !important; }
/* v1.1 less text: the first match needs no building sheet; on phones the sheet keeps only name, health and buttons */
/* v1.3.3 the academy teaches the building panel (upgrades, training) — it stays visible */
html.touch-play #bpInfo, html.touch-play .building-panel .bp-effect, html.touch-play .train-card .tc-strong, html.touch-play .train-card .tc-weak { display: none; }
@media (max-height: 640px) {
  html.touch-play .building-panel { top: 118px; bottom: auto; width: 220px; }
}
.tg-main small b { font: inherit; font-weight: 900; color: var(--text); }
@media (max-height: 640px) { html.touch-play .tut-goal { width: min(380px, calc(100vw - 24px)); } html.touch-play .tg-main b { font-size: 15px; } html.touch-play .tg-main small { font-size: 11px; } }
@media (max-height: 640px) {
  /* phones: the army panel is just the head-count and the recruit buttons (Army / Order buttons do the rest) */
  html.touch-play .army-panel .panel-title, html.touch-play .army-panel .stance-toggle, html.touch-play .army-panel .army-comp, html.touch-play .army-panel .army-upkeep { display: none; }
}
@media (max-height: 640px) {
  /* phones: the ⚔ attack button owns the bottom-right corner (under the thumb); the action buttons sit beside it */
  .touch-ui .tz-aim { top: auto; bottom: 0; right: 0; left: auto; width: 136px; height: 136px; }
  .touch-ui .tz-aim .stick.atk-btn { left: calc(100% - 64px); top: calc(100% - 64px); }
  .touch-ui .t-btns { right: 138px; }
}
@media (max-height: 640px) { html.touch-play .recruit-bar { grid-template-columns: repeat(5, minmax(0, 1fr)); } html.touch-play .right-col { width: 186px; } }

/* ===== v1.1 game feel (Juice.js) ===== */
.jc-fly { position: fixed; width: 26px; height: 26px; z-index: 9000; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55)); will-change: transform; }
.jc-fly svg { width: 26px; height: 26px; }
.res.jc-bump .res-icon, .res.jc-bump .res-count { animation: jcBump .28s ease-out; }
/* v1.5.9 a big gain: bigger icons, and the counter glows as each one lands */
.jc-fly.big { width: 32px; height: 32px; filter: drop-shadow(0 0 6px rgba(255, 220, 120, .85)) drop-shadow(0 2px 3px rgba(0, 0, 0, .55)); }
.jc-fly.big svg { width: 32px; height: 32px; }
.res.jc-glow { animation: jcGlow .5s ease-out; }
@keyframes jcGlow { 0% { box-shadow: 0 0 0 0 rgba(255, 214, 90, 0); } 30% { box-shadow: 0 0 14px 4px rgba(255, 214, 90, .75); } 100% { box-shadow: 0 0 0 0 rgba(255, 214, 90, 0); } }
@keyframes jcBump { 0% { transform: scale(1); } 40% { transform: scale(1.35); filter: brightness(1.6); } 100% { transform: scale(1); } }
.jc-flash { position: fixed; inset: 0; z-index: 8500; pointer-events: none; background: rgba(255, 240, 200, 0.7); animation: jcFlash .7s ease-out forwards; }
@keyframes jcFlash { from { opacity: 1; } to { opacity: 0; } }
.jc-streak { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); z-index: 40; pointer-events: none; white-space: nowrap;
  font-family: var(--font-display); font-size: 46px; color: #ffd24a; -webkit-text-stroke: 2px #2a1a06; text-shadow: 0 4px 0 #2a1a06, 0 8px 22px rgba(0, 0, 0, 0.55);
  animation: jcStreak 1.6s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.jc-streak.big { font-size: min(60px, 7.4vw); color: #ff6a3d; }
@keyframes jcStreak { 0% { transform: translate(-50%, -50%) scale(.3) rotate(-8deg); opacity: 0; } 14% { transform: translate(-50%, -50%) scale(1.15) rotate(2deg); opacity: 1; } 24% { transform: translate(-50%, -50%) scale(1) rotate(0); } 80% { opacity: 1; } 100% { transform: translate(-50%, -62%) scale(1); opacity: 0; } }

/* ===== v1.1 Kingdom Level & daily missions (Missions.js) ===== */
.km-card { position: absolute; left: 28px; top: 128px; width: 340px; padding: 12px 14px; border-radius: 18px; z-index: 3; display: flex; flex-direction: column; gap: 8px; border: 2px solid rgba(255, 210, 74, 0.35); }
.lobby.has-panel .km-card { display: none; }
.km-head { display: flex; align-items: center; gap: 10px; }
.km-badge { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-family: var(--font-display); font-size: 21px; color: #2a1a06;
  background: radial-gradient(circle at 40% 30%, #fff1a8, #ffc62e 60%, #d8901a); border: 3px solid #2a1a06; border-radius: 50% 50% 46% 46%; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); }
.km-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.km-who b { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.05; }
.km-who small { font-size: 11px; font-weight: 800; color: var(--text-dim); }
.km-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin-top: 3px; }
.km-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ffd24a, #ff9b2e); }
.km-streak { display: flex; align-items: center; gap: 2px; font-family: var(--font-display); font-size: 18px; color: #ffb02e; }
.km-streak svg { width: 22px; height: 22px; }
.km-sub { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.km-sub small { text-transform: none; letter-spacing: 0; color: var(--text-dim); font-weight: 700; }
.km-list { display: flex; flex-direction: column; gap: 6px; }
.km-m { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); }
.km-m.done { background: rgba(125, 220, 95, 0.16); }
.km-m.done .km-v { color: #7ddc5f; font-size: 18px; }
.km-ico { width: 30px; height: 30px; display: grid; place-items: center; }
.km-ico svg { width: 26px; height: 26px; }
.km-t { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.km-t b { font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.km-p { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.km-p i { display: block; height: 100%; background: linear-gradient(90deg, #9be7ff, #7ddc5f); }
.km-v { font-family: var(--font-display); font-size: 14px; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* end screen */
.end-kingdom { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.28); }
.km-end { display: flex; flex-direction: column; gap: 8px; }
.km-row { display: flex; align-items: center; gap: 10px; }
.km-barwrap { flex: 1; min-width: 0; }
.km-barwrap small { font-size: 11px; font-weight: 800; color: var(--text-dim); }
.km-end .km-bar { height: 10px; }
.km-end .km-bar i { width: var(--to); animation: kmFill 1.4s cubic-bezier(.3, .7, .2, 1) .4s backwards; }
@keyframes kmFill { from { width: var(--from); } }
.km-gain { font-family: var(--font-display); font-size: 22px; color: #ffd24a; white-space: nowrap; }
.km-up { text-align: center; font-family: var(--font-display); font-size: 24px; color: #ffd24a; animation: tgPop .6s cubic-bezier(.2, 1.5, .4, 1) .8s backwards; }
.km-parts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; font-weight: 700; color: var(--text-dim); }
.km-parts b { color: #ffd24a; }
.km-list.compact .km-m { padding: 4px 8px; }
/* the toast in a match */
.km-toast { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 40; pointer-events: none; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px; border-radius: 14px; background: rgba(20, 28, 18, 0.92); border: 2px solid #7ddc5f; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); animation: kmToast 3.6s ease forwards; }
.km-toast > span:nth-child(2) { display: flex; flex-direction: column; }
.km-toast small { font-size: 11px; font-weight: 900; color: #7ddc5f; text-transform: uppercase; letter-spacing: .06em; }
.km-toast b { font-size: 15px; font-weight: 800; }
.km-toast i { font-style: normal; font-family: var(--font-display); font-size: 18px; color: #ffd24a; }
@keyframes kmToast { 0% { transform: translate(-50%, 30px); opacity: 0; } 8% { transform: translate(-50%, 0); opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
@media (max-height: 560px) and (min-width: 721px) {
  .km-card { top: 64px; left: 12px; width: 290px; padding: 8px 10px; gap: 5px; zoom: 0.82; --zf: 0.82; }
  .km-m { padding: 3px 6px; }
}
@media (max-width: 720px) { .km-card { position: relative; left: auto; top: auto; width: auto; margin: 8px 12px; } }

/* ===== v1.1 Conquest (Conquest.js) ===== */
.cq-btn small { display: block; font-size: 12px; font-weight: 800; opacity: .85; }
.cq-overlay { display: grid; place-items: center; z-index: 9400; background: rgba(4, 8, 6, 0.72); }
.cq-card { width: min(980px, calc(100vw - 24px)); max-height: calc(var(--vh100) - 32px); overflow: auto; padding: 18px 20px 20px; border-radius: 22px; border: 2px solid rgba(255, 210, 74, 0.4); }
.cq-top { display: flex; align-items: center; gap: 14px; }
.cq-top h2 { margin: 0; flex: 1; font-family: var(--font-display); font-weight: 400; font-size: 32px; color: #ffd24a; }
.cq-total { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 22px; }
.cq-total svg { width: 24px; height: 24px; fill: #ffd24a; stroke: #2a1a06; stroke-width: 1.5; }
.cq-x { width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer; background: rgba(255, 255, 255, 0.1); color: var(--text); font-weight: 900; }
.cq-sub { margin: 4px 0 12px; color: var(--text-dim); font-weight: 700; font-size: 13px; }
.cq-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cq-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 10px; border-radius: 16px; cursor: pointer; color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.25)); border: 2px solid rgba(255, 255, 255, 0.14); transition: transform .12s, border-color .12s; }
.cq-stage:hover:not(.locked) { transform: translateY(-3px); border-color: #ffd24a; }
.cq-stage.next { border-color: #ffd24a; box-shadow: 0 0 0 3px rgba(255, 210, 74, 0.25), 0 0 22px rgba(255, 210, 74, 0.35); animation: cqPulse 1.4s ease-in-out infinite alternate; }
@keyframes cqPulse { to { box-shadow: 0 0 0 5px rgba(255, 210, 74, 0.15), 0 0 30px rgba(255, 210, 74, 0.55); } }
.cq-stage.locked { cursor: default; opacity: .45; filter: grayscale(.7); }
.cq-num { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 22px; background: #ffd24a; color: #2a1a06; border: 3px solid #2a1a06; }
.cq-num svg { width: 22px; height: 22px; fill: #2a1a06; stroke: #2a1a06; }
.cq-stage.locked .cq-num { background: #6b7378; }
.cq-name { font-family: var(--font-display); font-size: 15px; text-align: center; line-height: 1.1; min-height: 2.2em; display: grid; place-items: center; }
.cq-meta { font-size: 11px; font-weight: 800; color: var(--text-dim); display: inline-flex; align-items: center; gap: 4px; }
.cq-meta i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cq-stars { display: inline-flex; gap: 2px; }
.cq-stars i { width: 20px; height: 20px; }
.cq-stars svg { width: 100%; height: 100%; fill: rgba(255, 255, 255, 0.15); stroke: rgba(0, 0, 0, 0.5); stroke-width: 1.2; }
.cq-stars i.on svg { fill: #ffd24a; stroke: #2a1a06; filter: drop-shadow(0 0 4px rgba(255, 210, 74, 0.6)); }
.cq-stars.big i { width: 34px; height: 34px; }
.cq-stars.big i.on { animation: cqStar .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.cq-stars.big i:nth-child(2).on { animation-delay: .25s; } .cq-stars.big i:nth-child(3).on { animation-delay: .5s; }
@keyframes cqStar { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0); } }
.end-conquest { margin: 10px 0 4px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 210, 74, 0.08); border: 1px solid rgba(255, 210, 74, 0.3); }
.cq-end-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--font-display); font-size: 20px; color: #ffd24a; }
.cq-end-rows { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: 13px; font-weight: 800; color: var(--text-dim); }
.cq-end-rows .ok { color: #7ddc5f; }
.cq-end-open { margin-top: 6px; font-weight: 900; color: #fff3b0; }
@media (max-width: 860px), (max-height: 560px) { .cq-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cq-card { padding: 12px; } .cq-top h2 { font-size: 24px; } }
@media (max-width: 420px) { .cq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* v1.1 the end card grows (Kingdom Level, Conquest): it scrolls inside the screen and the buttons stay in view */
.end-card { max-height: calc((var(--vh100) - 20px) / var(--ui, 1)); overflow-y: auto; overscroll-behavior: contain; }
.end-card .end-actions { position: sticky; bottom: -1px; z-index: 2; padding: 10px 0 6px; background: linear-gradient(180deg, rgba(16, 23, 18, 0), rgba(16, 23, 18, 0.98) 18%) !important; }
.end-actions-main.h-next { grid-template-columns: repeat(3, auto); justify-content: center; }
.end-actions-main.h-next .btn-primary { width: auto; min-width: 150px; padding-inline: 18px; white-space: nowrap; font-size: 18px; }
html.touch-play .end-card { max-height: calc((var(--vh100) - 12px) / (var(--ui, 1) * 0.8)); }
@media (max-height: 560px) and (min-width: 600px) {
  .cq-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .cq-stage { padding: 6px 4px; gap: 3px; border-radius: 12px; }
  .cq-num { width: 28px; height: 28px; font-size: 15px; border-width: 2px; }
  .cq-num svg { width: 15px; height: 15px; }
  .cq-name { font-size: 12px; min-height: 0; }
  .cq-meta { font-size: 10px; }
  .cq-stars i { width: 14px; height: 14px; }
  .cq-sub { margin: 2px 0 6px; font-size: 11px; }
}

/* v1.1.2 a lighter lobby menu: smaller buttons that fit with the Conquest button */
.lobby-menu { width: 260px; gap: 6px; right: 22px; }
.lm-btn { grid-template-columns: 34px 1fr; gap: 10px; min-height: 46px; padding: 6px 12px 6px 8px; }
.lm-ico { width: 34px; height: 34px; }
.lm-ico svg { width: 22px; height: 22px; }
.lm-text b { font-size: 17px; }
.lm-text small { font-size: 10.5px; margin-top: 1px; }
@media (max-height: 720px) { .lm-btn { min-height: 40px; padding-block: 4px; } .lm-text small { display: none; } .cq-btn small { display: block; } }

/* v1.1.2 Xsolla Pay Station lightbox: always centred and fully on screen (also in right-to-left languages) */
.xpaystation-widget-lightbox { position: fixed !important; inset: 0 !important; direction: ltr !important; z-index: 99990 !important; zoom: 1 !important; }
.xpaystation-widget-lightbox-overlay { position: fixed !important; inset: 0 !important; }
.xpaystation-widget-lightbox-content { position: fixed !important; left: 50% !important; top: 50% !important; right: auto !important; bottom: auto !important; margin: 0 !important;
  transform: translate(-50%, -50%) !important; width: min(740px, calc(100vw - 16px)) !important; height: min(760px, calc(var(--vh100) - 16px)) !important; max-width: none !important; }
.xpaystation-widget-lightbox-content iframe { width: 100% !important; height: 100% !important; }
/* v1.2 Kingdom Level name frames */
.frame-bronze { border-color: #c8854a; background: rgba(200, 133, 74, 0.16); }
.frame-emerald { border-color: #3ddc84; background: linear-gradient(90deg, rgba(61, 220, 132, 0.2), rgba(31, 154, 88, 0.08)); box-shadow: 0 0 10px rgba(61, 220, 132, 0.45); }
.frame-ruby { border-color: #ff4f6a; background: linear-gradient(90deg, rgba(255, 79, 106, 0.2), rgba(176, 24, 47, 0.08)); box-shadow: 0 0 10px rgba(255, 60, 90, 0.45); }
.frame-sapphire { border-color: #4da3ff; background: linear-gradient(90deg, rgba(77, 163, 255, 0.22), rgba(31, 95, 208, 0.08)); box-shadow: 0 0 10px rgba(77, 163, 255, 0.5); }
.frame-obsidian { border-color: #ff8a2a; background: linear-gradient(90deg, rgba(10, 6, 8, 0.85), rgba(60, 20, 6, 0.7)); box-shadow: 0 0 12px rgba(255, 110, 40, 0.6); animation: obsFrame 1.6s ease-in-out infinite alternate; }
@keyframes obsFrame { to { box-shadow: 0 0 18px rgba(255, 150, 60, 0.85); border-color: #ffc070; } }
.frame-imperial { position: relative; border: 2px solid transparent; background: linear-gradient(rgba(40, 18, 52, 0.92), rgba(40, 18, 52, 0.92)) padding-box, linear-gradient(90deg, #b8860b, #ffd24a, #fffbe0, #ffd24a, #b8860b) border-box; background-size: 100% 100%, 250% 100%; animation: mythicFrame 2.4s linear infinite; box-shadow: 0 0 14px rgba(255, 210, 74, 0.6); }
.frame-imperial::before { content: '♛'; position: absolute; left: 50%; top: -0.95em; transform: translateX(-50%); font-size: 0.8em; color: #ffd24a; text-shadow: 0 0 6px rgba(255, 210, 74, 0.9); }
/* v1.2 Kingdom Level rewards (Missions.js) */
.km-next { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 12px; border: 1px solid rgba(255, 210, 74, 0.35); background: rgba(255, 210, 74, 0.08); color: var(--text); cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; text-align: start; }
.km-next:hover { background: rgba(255, 210, 74, 0.16); }
.km-next span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.km-next small { color: #ffd24a; font-weight: 900; }
.km-gi { width: 24px; height: 24px; display: inline-grid; place-items: center; color: var(--c, #ffd24a); flex: none; }
.km-gi svg { width: 22px; height: 22px; filter: drop-shadow(0 0 4px var(--c, #ffd24a)); }
.km-gifts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0; }
.km-gift { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 210, 74, 0.14); border: 1px solid rgba(255, 210, 74, 0.5); font-size: 13px; animation: cqStar .5s cubic-bezier(.2, 1.6, .4, 1) .6s both; }
.km-gift b { color: #ffd24a; }
.km-road-ov { display: grid; place-items: center; z-index: 9400; background: rgba(4, 8, 6, 0.72); }
.km-road { width: min(1000px, calc(100vw - 24px)); max-height: calc(var(--vh100) - 32px); overflow: auto; padding: 16px 18px; border-radius: 22px; border: 2px solid rgba(255, 210, 74, 0.4); }
.km-road-top { display: flex; align-items: center; gap: 12px; }
.km-road-top h2 { margin: 0; flex: 1; font-family: var(--font-display); font-weight: 400; font-size: 30px; color: #ffd24a; }
.km-road-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.km-rw { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 10px; border-radius: 16px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.3)); border: 2px solid rgba(255, 255, 255, 0.12); text-align: center; }
.km-rw canvas { width: 84px; height: 84px; }
.km-rw b { font-family: var(--font-display); font-weight: 400; font-size: 14px; line-height: 1.1; }
.km-rw small { font-size: 11px; font-weight: 800; color: var(--text-dim); }
.km-rw-lv { position: absolute; top: 6px; inset-inline-start: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 900; background: rgba(0, 0, 0, 0.45); color: #ffd24a; }
.km-rw:not(.got):not(.ready) canvas { filter: grayscale(.85) brightness(.55); }
.km-rw:not(.got):not(.ready)::after { content: '🔒'; position: absolute; top: 40px; font-size: 22px; opacity: .85; }
.km-rw.got { border-color: rgba(125, 220, 95, 0.6); } .km-rw.got small { color: #7ddc5f; }
.km-rw.next { border-color: #ffd24a; box-shadow: 0 0 0 3px rgba(255, 210, 74, 0.25), 0 0 20px rgba(255, 210, 74, 0.35); }
.km-rw.tier-legendary { background: linear-gradient(180deg, rgba(255, 210, 74, 0.16), rgba(0, 0, 0, 0.3)); }
.km-rw.tier-epic { background: linear-gradient(180deg, rgba(176, 124, 240, 0.16), rgba(0, 0, 0, 0.3)); }
@media (max-width: 860px), (max-height: 560px) { .km-road-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } .km-rw canvas { width: 56px; height: 56px; } .km-rw b { font-size: 12px; } .km-rw:not(.got):not(.ready)::after { top: 24px; font-size: 16px; } }
@media (max-width: 520px) { .km-road-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* v1.2 starting boons (Boons.js) */
.bn-overlay { position: fixed; inset: 0; z-index: 9300; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(ellipse at center, rgba(6, 10, 8, 0.45), rgba(6, 10, 8, 0.82)); animation: bnIn .25s ease-out; }
.bn-overlay.out { animation: bnOut .38s ease-in forwards; }
@keyframes bnIn { from { opacity: 0; } } @keyframes bnOut { to { opacity: 0; } }
.bn-title { font-family: var(--font-display); font-size: 40px; color: #ffd24a; -webkit-text-stroke: 1.5px #2a1a06; text-shadow: 0 4px 0 #2a1a06, 0 10px 26px rgba(0, 0, 0, 0.6); }
.bn-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; padding: 0 16px; }
.bn-card { position: relative; width: 210px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 14px 18px; border-radius: 22px; cursor: pointer; color: var(--text); font: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 26%, #1a2420), #101814 70%); border: 3px solid color-mix(in srgb, var(--c) 70%, #000); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: bnCard .45s cubic-bezier(.2, 1.5, .4, 1) var(--d) both; transition: transform .15s, box-shadow .15s; }
.bn-card:hover, .bn-card:focus-visible { transform: translateY(-8px) scale(1.04); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 26px color-mix(in srgb, var(--c) 60%, transparent); outline: none; }
.bn-card.on { transform: scale(1.12); box-shadow: 0 0 40px var(--c); }
@keyframes bnCard { from { opacity: 0; transform: translateY(40px) rotate(-4deg) scale(.8); } }
.bn-ico { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 35%, transparent), transparent 70%); }
.bn-ico svg { width: 64px; height: 64px; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.5)); }
.bn-card b { font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.bn-card small { font-size: 13px; font-weight: 800; color: var(--text-dim); text-align: center; }
.bn-key { position: absolute; top: 10px; inset-inline-start: 12px; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-weight: 900; font-size: 13px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.25); }
html.touch-play .bn-key { display: none; }
@media (max-height: 560px) { .bn-title { font-size: 28px; } .bn-card { width: 170px; padding: 12px 10px; gap: 4px; } .bn-ico { width: 56px; height: 56px; } .bn-ico svg { width: 44px; height: 44px; } .bn-card b { font-size: 17px; } .bn-card small { font-size: 11px; } }
.qb-btn .lm-ico { background: rgba(255, 210, 74, 0.2); }
.km-rw-fr { width: 84px; height: 84px; display: grid; place-items: center; }
.km-rw-fr .name-frame { font-weight: 900; font-size: 12px; max-width: 92px; overflow: hidden; white-space: nowrap; }
.km-rw:not(.got):not(.ready) .km-rw-fr { filter: grayscale(.85) brightness(.55); }
@media (max-width: 860px), (max-height: 560px) { .km-rw-fr { width: 56px; height: 56px; } }
/* v1.2 ten landscapes: a compact grid of map cards */
.map-cards { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.map-cards .map-desc { display: none; }
.map-cards .map-card { padding: 6px; }
.map-cards .map-name b { font-size: 13px; }

/* ===== v1.2 Legends of Conquest — the journey, stage scenes, the boss bar ===== */
.cq-journey { width: min(1060px, calc(100vw - 24px)); }
.cq-chapters { display: flex; flex-direction: column; gap: 12px; }
.cq-ch { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 6px 16px; padding: 10px; border-radius: 18px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--a) 30%, rgba(10, 14, 12, 0.9)), rgba(10, 14, 12, 0.7)); border: 2px solid color-mix(in srgb, var(--a) 60%, transparent); }
.cq-ch-art { grid-row: 1 / span 2; width: 220px; height: auto; aspect-ratio: 360 / 150; border-radius: 12px; border: 2px solid rgba(0, 0, 0, 0.5); }
.cq-ch-info { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cq-ch-info small { font-weight: 900; font-size: 12px; color: var(--b); text-transform: uppercase; letter-spacing: 1px; }
.cq-ch-info b { font-family: var(--font-display); font-weight: 400; font-size: 24px; }
.cq-ch-done { font-size: 12px; font-weight: 900; color: #7ddc5f; }
.cq-ch.locked { filter: grayscale(.85) brightness(.6); }
.cq-ch.locked::after { content: ''; position: absolute; inset: 0; border-radius: 18px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 12px, rgba(0, 0, 0, 0.12) 12px 24px); pointer-events: none; }
.cq-path { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.cq-link { width: 34px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.15); }
.cq-link.on { background: linear-gradient(90deg, var(--b), var(--a)); }
.cq-node { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 150px; padding: 8px 6px; border-radius: 14px; cursor: pointer; color: var(--text); font: inherit;
  background: rgba(0, 0, 0, 0.35); border: 2px solid rgba(255, 255, 255, 0.14); transition: transform .12s, border-color .12s; }
.cq-node:hover:not(.locked) { transform: translateY(-3px); border-color: var(--b); }
.cq-node.next { border-color: #ffd24a; box-shadow: 0 0 0 3px rgba(255, 210, 74, 0.25), 0 0 20px rgba(255, 210, 74, 0.35); animation: cqPulse 1.4s ease-in-out infinite alternate; }
.cq-node.locked { cursor: default; opacity: .55; }
.cq-node.boss .cq-num { background: #3a0f12; color: #ff8a7a; border-color: #ff4f3a; }
.cq-node.boss .cq-num svg { fill: #ff8a7a; stroke: none; }
.cq-node .cq-name { font-size: 13px; min-height: 2.2em; }
.cq-node .cq-num { width: 36px; height: 36px; font-size: 18px; }
.cq-node .cq-num svg { width: 20px; height: 20px; }
.cq-node .cq-stars i { width: 15px; height: 15px; }
/* a stage's opening scene */
.cq-stage-ov { background: rgba(4, 6, 6, 0.86); }
.cq-scene { position: relative; width: min(960px, calc(100vw - 24px)); border-radius: 22px; overflow: hidden; border: 3px solid var(--a); box-shadow: 0 0 40px color-mix(in srgb, var(--a) 50%, transparent), 0 20px 60px rgba(0, 0, 0, 0.6); background: #000; }
.cq-scene canvas { display: block; width: 100%; height: auto; aspect-ratio: 960 / 420; }
.cq-scene-text { position: absolute; inset: auto 0 0 0; padding: 60px 22px 16px; background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.82) 45%); }
.cq-scene-text small { font-weight: 900; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--b); }
.cq-scene-text h2 { margin: 2px 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 40px; color: #fff; text-shadow: 0 3px 0 #000; animation: cqRise .6s ease-out both; }
.cq-scene-text p { margin: 0 0 8px; font-weight: 800; font-size: 15px; color: #f2efe6; max-width: 62ch; animation: cqRise .6s ease-out .15s both; }
@keyframes cqRise { from { opacity: 0; transform: translateY(14px); } }
.cq-scene-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 800; color: var(--text-dim); margin-bottom: 10px; }
.cq-scene-meta .boss { color: #ff8a7a; }
.cq-scene-actions { display: flex; align-items: center; gap: 14px; }
.cq-scene-actions .cq-stars { flex: 1; justify-content: center; }
.cq-back { border: none; background: rgba(255, 255, 255, 0.12); color: var(--text); font: inherit; font-weight: 800; padding: 10px 16px; border-radius: 12px; cursor: pointer; }
.cq-fight { min-width: 180px; font-size: 22px !important; }
/* the boss bar */
.cq-boss { position: absolute; top: 158px; left: 50%; transform: translateX(-50%); z-index: 31; width: min(520px, calc(100vw - 24px)); display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 2px 10px; padding: 8px 12px; border-radius: 14px; background: rgba(20, 6, 8, 0.85); border: 2px solid #ff4f3a; box-shadow: 0 0 20px rgba(255, 60, 40, 0.45); pointer-events: none; animation: tgPop .45s cubic-bezier(.2, 1.5, .4, 1); }
.cq-boss-ico { grid-row: 1 / span 2; width: 30px; height: 30px; } .cq-boss-ico svg { width: 30px; height: 30px; fill: #ff8a7a; }
.cq-boss b { font-family: var(--font-display); font-weight: 400; font-size: 18px; color: #ff8a7a; }
.cq-boss-bar { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.cq-boss-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff2a2a, #ff8a3d); transition: width .25s; }
.cq-boss.down { opacity: .55; } .cq-boss.dead { animation: bnOut .8s ease-in 1.2s forwards; }
@media (max-width: 860px), (max-height: 560px) {
  .cq-ch { grid-template-columns: 130px minmax(0, 1fr); padding: 6px; gap: 4px 10px; } .cq-ch-art { width: 130px; } .cq-ch-info b { font-size: 18px; }
  .cq-node { width: 112px; padding: 5px 4px; } .cq-node .cq-name { font-size: 11px; } .cq-link { width: 14px; }
  .cq-scene-text { padding: 30px 14px 10px; } .cq-scene-text h2 { font-size: 26px; } .cq-scene-text p { font-size: 12px; } .cq-boss { top: 120px; }
}
.cq-scene-text { position: relative; inset: auto; padding: 14px 22px 16px; margin-top: -40px; background: linear-gradient(180deg, rgba(0, 0, 0, 0), #0c0f0d 40px); }
.cq-fight { width: auto !important; flex: none; padding-inline: 34px !important; }
.cq-scene canvas { max-height: calc(var(--vh1) * 52); object-fit: cover; }
@media (max-height: 560px) { .cq-scene-text { margin-top: -30px; padding: 8px 14px 10px; } }
/* v1.2 world events (Events.js) */
.ev-marker span { background: #ffd24a; filter: drop-shadow(0 0 6px rgba(255, 210, 74, 0.9)); }

html.ev-blood .hud::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1; box-shadow: inset 0 0 160px rgba(200, 20, 20, 0.55); animation: evPulse 1.6s ease-in-out infinite alternate; }
@keyframes evPulse { to { box-shadow: inset 0 0 220px rgba(230, 30, 30, 0.7); } }
/* v1.2 the daily chest */
.km-chest { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border-radius: 12px; cursor: pointer; font: inherit; color: var(--text); text-align: start;
  border: 2px solid #ffd24a; background: linear-gradient(90deg, rgba(255, 210, 74, 0.25), rgba(255, 140, 40, 0.12)); animation: cqPulse 1.2s ease-in-out infinite alternate; }
.km-chest b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 16px; color: #ffd24a; } .km-chest small { font-size: 11px; font-weight: 800; color: var(--text-dim); }
.km-chest-ico { width: 30px; height: 26px; border-radius: 6px; background: linear-gradient(#c98a3a 0 40%, #8a5a2a 40%); border: 2px solid #2a1a06; position: relative; flex: none; }
.km-chest-ico::after { content: ''; position: absolute; left: 11px; top: 7px; width: 6px; height: 7px; border-radius: 2px; background: #ffd24a; border: 1px solid #2a1a06; }
.km-chest-ov { display: grid; place-items: center; z-index: 9500; background: rgba(4, 6, 6, 0.78); }
.km-chest-big { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.km-chest-box { position: relative; width: 160px; height: 130px; animation: kmShake .6s ease-in-out; }
.km-chest-box .body { position: absolute; left: 0; right: 0; bottom: 0; height: 80px; border-radius: 12px; background: linear-gradient(#a8692e, #7a4a1e); border: 4px solid #2a1a06; }
.km-chest-box .lid { position: absolute; left: -4px; right: -4px; top: 18px; height: 46px; border-radius: 30px 30px 8px 8px; background: linear-gradient(#d49a4a, #a8692e); border: 4px solid #2a1a06; transform-origin: 10% 100%; transition: transform .5s cubic-bezier(.2, 1.6, .4, 1); z-index: 2; }
.km-chest-box .glow { position: absolute; left: 50%; top: 40px; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 0 rgba(255, 220, 120, 0); transition: box-shadow .6s; }
.km-chest-ov.open .lid { transform: rotate(-35deg) translate(-10px, -24px); }
.km-chest-ov.open .glow { box-shadow: 0 0 90px 60px rgba(255, 220, 120, 0.75); }
.km-chest-xp { font-family: var(--font-display); font-weight: 400; font-size: 46px; color: #ffd24a; -webkit-text-stroke: 1.5px #2a1a06; opacity: 0; transform: scale(.5); transition: all .45s cubic-bezier(.2, 1.6, .4, 1) .1s; }
.km-chest-ov.open .km-chest-xp { opacity: 1; transform: scale(1); }
.km-chest-big small { font-weight: 800; color: var(--text-dim); }
@keyframes kmShake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(3deg); } }

/* ===== v1.3 premium shop: rarity cards that feel worth it ===== */
.sh-card { position: relative; overflow: clip; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.sh-card:hover { transform: translateY(-3px); }
.sh-card.tier-common, .sh-card.tier-r-common { background: linear-gradient(180deg, rgba(150, 170, 185, 0.10), rgba(0, 0, 0, 0.32) 60%); }
.sh-card.tier-rare, .sh-card.tier-r-rare { background: linear-gradient(180deg, rgba(77, 163, 255, 0.20), rgba(0, 0, 0, 0.34) 62%); border-color: rgba(77, 163, 255, 0.5); }
.sh-card.tier-epic, .sh-card.tier-r-epic { background: linear-gradient(180deg, rgba(176, 124, 240, 0.26), rgba(20, 8, 40, 0.45) 64%); border-color: rgba(190, 140, 255, 0.6); box-shadow: inset 0 0 26px rgba(176, 124, 240, 0.16), 0 0 18px rgba(176, 124, 240, 0.12); }
.sh-card.tier-r-legendary { background: linear-gradient(180deg, rgba(255, 196, 66, 0.30), rgba(60, 30, 0, 0.5) 66%); border-color: transparent; box-shadow: inset 0 0 30px rgba(255, 196, 66, 0.2), 0 0 22px rgba(255, 170, 40, 0.22); }
.sh-card.tier-r-legendary::before { content: ''; position: absolute; inset: -50%; z-index: -1; background: conic-gradient(from 0deg, #ffd86b, #ff9a3c, #fff2b8, #ffb347, #ffd86b); animation: shSpin 4s linear infinite; }
.sh-card.tier-r-legendary::after { content: ''; position: absolute; inset: 2px; z-index: -1; border-radius: 12px; background: linear-gradient(180deg, #4a3210, #1c1206 70%); }
.sh-card.tier-r-legendary, .sh-card.tier-epic, .sh-card.tier-r-epic { isolation: isolate; }
.sh-card.tier-epic > *, .sh-card.tier-r-epic > *, .sh-card.tier-r-legendary > * { position: relative; }
.sh-card.tier-epic .sh-shine, .sh-card.tier-r-epic .sh-shine, .sh-card.tier-r-legendary .sh-shine { position: absolute; inset: 0; pointer-events: none; }
.sh-card.tier-r-legendary .sh-name { color: #ffe7a0; text-shadow: 0 0 12px rgba(255, 196, 66, 0.55); }
.sh-card.tier-epic .sh-name, .sh-card.tier-r-epic .sh-name { color: #ecdcff; text-shadow: 0 0 10px rgba(176, 124, 240, 0.5); }
.sh-card.tier-common canvas, .sh-card.tier-r-common canvas { background: radial-gradient(circle at 50% 42%, #4a5a68, #1f2830 72%); }
.sh-card.tier-rare canvas, .sh-card.tier-r-rare canvas { background: radial-gradient(circle at 50% 42%, #2f6fb8, #11243f 72%); box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.45); }
.sh-card.tier-epic canvas, .sh-card.tier-r-epic canvas { background: radial-gradient(circle at 50% 42%, #7a4ac2, #24123f 72%); box-shadow: 0 0 0 2px rgba(190, 140, 255, 0.6), 0 0 18px rgba(176, 124, 240, 0.35); }
.sh-card.tier-r-legendary canvas { background: radial-gradient(circle at 50% 42%, #c98a24, #3d2406 72%); box-shadow: 0 0 0 2px rgba(255, 210, 90, 0.85), 0 0 24px rgba(255, 180, 60, 0.5); }
.sh-card canvas.sh-kfx { box-shadow: none; }
.sh-card.tier-epic::after, .sh-card.tier-r-epic::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.10), transparent); animation: shSweep 3.6s ease-in-out infinite; }
.sh-card.tier-r-legendary .sh-tier { box-shadow: 0 0 10px rgba(255, 196, 66, 0.45); }
@keyframes shSpin { to { transform: rotate(360deg); } }
@keyframes shSweep { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.sh-allowned { display: flex; align-items: center; justify-content: space-between; gap: 12px; grid-column: 1 / -1; }
@media (prefers-reduced-motion: reduce) { .sh-card.tier-r-legendary::before, .sh-card.tier-epic::after, .sh-card.tier-r-epic::after { animation: none; } }
.chest-art .chest-cv { width: 200px; height: 166px; display: block; margin: -8px auto 0; }

/* ===== v1.3 the online arrival cinematic ===== */
.arrival { position: fixed; inset: 0; z-index: 9000; background: #000; display: flex; align-items: center; justify-content: center; cursor: pointer; animation: arrIn 0.35s ease-out both; }
.arrival canvas { width: 100%; height: 100%; object-fit: cover; }
.arrival.out { animation: arrOut 0.45s ease-in forwards; }
.arrival-text { position: absolute; left: 0; right: 0; bottom: 9%; text-align: center; color: #fff; padding: 0 16px; pointer-events: none; }
.arrival-text small { display: block; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: #ffd27a; font-size: 13px; text-shadow: 0 2px 6px rgba(0,0,0,0.8); animation: arrUp 0.5s 0.15s ease-out both; }
.arrival-text h2 { font-family: var(--font-display, 'Lilita One', sans-serif); font-weight: 400; font-size: clamp(26px, 4.6vw, 54px); margin: 6px 0 12px; text-shadow: 0 4px 0 rgba(0,0,0,0.5), 0 0 24px rgba(0,0,0,0.6); animation: arrSlam 0.55s 0.3s cubic-bezier(.2,1.6,.4,1) both; }
.arrival-kings { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; max-width: 900px; margin: 0 auto; }
.arrival-kings span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(10,14,12,0.72); border: 2px solid var(--c); font-weight: 900; font-size: 14px; animation: arrUp 0.4s ease-out both; }
.arrival-kings i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.arrival-text em { display: block; margin-top: 12px; font-style: normal; font-size: 12px; opacity: 0.6; }
@keyframes arrIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes arrOut { to { opacity: 0; transform: scale(1.06); } }
@keyframes arrUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes arrSlam { from { opacity: 0; transform: scale(1.8); } to { opacity: 1; transform: none; } }

/* ===== v1.3 story cinematics ===== */
.cinema { position: fixed; inset: 0; z-index: 9500; background: #000; overflow: hidden; animation: arrIn 0.4s ease-out both; user-select: none; }
.cinema canvas { position: absolute; left: 0; right: 0; top: 13%; height: 68%; width: 100%; object-fit: cover; }
.cinema canvas.cn-b { pointer-events: none; }
.cn-bar { position: absolute; left: 0; right: 0; height: 13%; background: #000; z-index: 2; }
.cn-bar.top { top: 0; }
.cn-bar.bot { bottom: 0; height: 19%; display: flex; align-items: center; justify-content: center; padding: 0 6%; }
.cn-text { margin: 0; color: #f6efe0; font-size: clamp(15px, 2.1vw, 24px); line-height: 1.45; text-align: center; max-width: 980px; font-weight: 700; text-shadow: 0 2px 8px rgba(0,0,0,0.8); min-height: 2.9em; }
.cn-title { position: absolute; top: 18%; left: 0; right: 0; text-align: center; z-index: 3; pointer-events: none; animation: cnTitle 4.6s ease-in-out forwards; }
.cn-title small { display: block; color: #ffd27a; font-weight: 900; letter-spacing: 3px; text-transform: uppercase; font-size: 13px; text-shadow: 0 2px 6px #000; }
.cn-title h2 { margin: 6px 0 0; color: #fff; font-family: var(--font-display, 'Lilita One', sans-serif); font-weight: 400; font-size: clamp(30px, 5.4vw, 66px); text-shadow: 0 4px 0 rgba(0,0,0,0.55), 0 0 30px rgba(0,0,0,0.7); }
@keyframes cnTitle { 0% { opacity: 0; transform: scale(1.15); } 12%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-14px); } }
.cn-skip { position: absolute; top: 3.2%; right: 18px; z-index: 4; background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; padding: 6px 14px; font-weight: 900; cursor: pointer; }
.cn-skip:hover { background: rgba(255,255,255,0.22); }
.cn-dots { position: absolute; top: 4.4%; left: 18px; z-index: 4; display: flex; gap: 6px; }
.cn-dots i { width: 22px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.25); }
.cn-dots i.on { background: #ffd27a; }
.cn-reward { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: radial-gradient(circle, rgba(40,30,10,0.75), rgba(0,0,0,0.9)); color: #fff; animation: arrIn 0.4s ease-out both; }
.cn-reward .cn-gem svg { width: 120px; height: 120px; filter: drop-shadow(0 0 24px rgba(127,216,255,0.8)); animation: cnGem 1.4s ease-in-out infinite alternate; }
.cn-reward b { font-family: var(--font-display, 'Lilita One', sans-serif); font-weight: 400; font-size: 64px; color: #7fd8ff; text-shadow: 0 4px 0 rgba(0,0,0,0.5); animation: arrSlam 0.6s cubic-bezier(.2,1.6,.4,1) both; }
.cn-reward span { font-weight: 900; font-size: 18px; color: #ffe08a; }
.cn-reward button { margin-top: 10px; min-width: 180px; }
@keyframes cnGem { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-10px) rotate(6deg); } }
.cq-ch-story { margin-inline-start: auto; background: rgba(0,0,0,0.35); color: #ffe08a; border: 1px solid rgba(255,224,138,0.4); border-radius: 999px; padding: 3px 10px; font-weight: 900; font-size: 12px; cursor: pointer; }

/* ===== v1.3 Royal Pass ===== */
.frame-season { border: 2px solid transparent; background: linear-gradient(rgba(30, 14, 56, 0.9), rgba(30, 14, 56, 0.9)) padding-box, linear-gradient(90deg, #6a3fd0, #d9b8ff, #6a3fd0) border-box; background-size: 100% 100%, 220% 100%; animation: mythicFrame 3s linear infinite; box-shadow: 0 0 12px rgba(176, 124, 240, 0.6); }
.frame-royal { position: relative; border: 2px solid transparent; background: linear-gradient(rgba(40, 14, 60, 0.92), rgba(40, 14, 60, 0.92)) padding-box, linear-gradient(90deg, #8a2be2, #ffd24a, #fff3c2, #ffd24a, #8a2be2) border-box; background-size: 100% 100%, 260% 100%; animation: mythicFrame 2.2s linear infinite; box-shadow: 0 0 16px rgba(255, 210, 74, 0.6); }
.frame-royal::before { content: '♛'; position: absolute; left: 50%; top: -0.95em; transform: translateX(-50%); font-size: 0.8em; color: #ffd24a; text-shadow: 0 0 6px rgba(176, 124, 240, 0.9); }
.ps-btn { position: relative; background: linear-gradient(90deg, rgba(106, 63, 208, 0.55), rgba(40, 20, 70, 0.6)) !important; border-color: rgba(217, 184, 255, 0.5) !important; }
.ps-btn.elite { background: linear-gradient(90deg, rgba(184, 134, 11, 0.6), rgba(106, 63, 208, 0.55)) !important; border-color: rgba(255, 210, 74, 0.7) !important; }
.ps-btn .ps-crown { width: 22px; height: 22px; }
.ps-btn-bar { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.ps-btn-bar i { display: block; height: 100%; background: linear-gradient(90deg, #b07cf0, #ffd24a); }
.ps-btn.has-claim::after { content: '!'; position: absolute; top: 6px; right: 10px; width: 18px; height: 18px; border-radius: 50%; background: #e5484d; color: #fff; font-weight: 900; font-size: 12px; display: grid; place-items: center; animation: cnGem 0.9s ease-in-out infinite alternate; }
.ps-overlay { z-index: 900; }
.ps-card { width: min(1120px, 96vw); max-height: calc(var(--vh1) * 94); display: flex; flex-direction: column; gap: 10px; padding: 16px; overflow: hidden; background: linear-gradient(180deg, rgba(40, 20, 70, 0.96), rgba(16, 10, 30, 0.97)); border: 1px solid rgba(217, 184, 255, 0.35); }
.ps-top { display: flex; align-items: center; gap: 14px; }
.ps-top > .ps-crown { width: 48px; height: 48px; filter: drop-shadow(0 0 10px rgba(255, 210, 74, 0.6)); }
.ps-title h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 30px; color: #ffe08a; }
.ps-title small { color: #d9c9ff; font-weight: 800; }
.ps-level { margin-inline-start: auto; text-align: center; min-width: 64px; }
.ps-level b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 38px; line-height: 1; color: #fff; text-shadow: 0 0 12px rgba(176, 124, 240, 0.8); }
.ps-level span { font-size: 11px; font-weight: 900; text-transform: uppercase; color: #d9c9ff; }
.ps-xp { width: min(260px, 30vw); }
.ps-xp i { display: block; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.ps-xp i b { display: block; height: 100%; background: linear-gradient(90deg, #b07cf0, #ffd24a); box-shadow: 0 0 10px rgba(255, 210, 74, 0.6); }
.ps-xp small { color: #cbbcef; font-weight: 800; font-size: 11px; }
.ps-x { position: static; }
.ps-elite { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 210, 74, 0.18), rgba(176, 124, 240, 0.16)); border: 1px solid rgba(255, 210, 74, 0.45); }
.ps-elite b { display: block; color: #ffe08a; font-size: 17px; }
.ps-elite span { color: #eadfff; font-size: 13px; font-weight: 700; }
.ps-elite.on { color: #ffe08a; font-weight: 900; justify-content: center; }
.ps-buy .ps-gem { width: 16px; height: 16px; vertical-align: -3px; margin: 0 2px; }
.ps-rows { display: flex; gap: 6px; font-weight: 900; font-size: 12px; }
.ps-rl { padding: 2px 10px; border-radius: 999px; }
.ps-rl.f { background: rgba(255, 255, 255, 0.12); color: #e8edf2; }
.ps-rl.e { background: rgba(255, 210, 74, 0.2); color: #ffe08a; }
.ps-track { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; scroll-behavior: smooth; }
.ps-col { flex: 0 0 92px; display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
.ps-lvl { text-align: center; font-family: var(--font-display); font-weight: 400; font-size: 18px; color: #bfb0e6; }
.ps-col.done .ps-lvl { color: #ffe08a; }
.ps-col.next .ps-lvl { color: #fff; text-shadow: 0 0 10px #b07cf0; }
.ps-cell { position: relative; height: 104px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: rgba(0, 0, 0, 0.3); border: 2px solid rgba(255, 255, 255, 0.08); }
.ps-cell.e { background: linear-gradient(180deg, rgba(255, 210, 74, 0.12), rgba(60, 30, 90, 0.4)); border-color: rgba(255, 210, 74, 0.25); }
.ps-cell.reached:not(.got):not(.lockedE):not(.empty) { border-color: #ffd24a; box-shadow: 0 0 14px rgba(255, 210, 74, 0.45); animation: psPulse 1.4s ease-in-out infinite alternate; }
.ps-cell.got { opacity: 0.55; }
.ps-cell.lockedE { filter: saturate(0.6); }
.ps-cell.refund { background: linear-gradient(180deg, rgba(127, 216, 255, 0.22), rgba(40, 20, 70, 0.4)); }
.ps-cell canvas.ps-it { width: 70px; height: 70px; border-radius: 50%; }
.ps-gems, .ps-shards { font-weight: 900; font-size: 15px; }
.ps-gems { color: #7fd8ff; }
.ps-gems .ps-gem { width: 18px; height: 18px; vertical-align: -4px; }
.ps-shards { color: #d9b8ff; }
.ps-tick { position: absolute; top: 4px; right: 6px; color: #7ddc5f; font-style: normal; font-weight: 900; }
.ps-lock { position: absolute; bottom: 4px; right: 6px; font-style: normal; font-size: 12px; }
.ps-foot { display: grid; grid-template-columns: 1fr 1fr 220px; gap: 12px; }
.ps-ms h4 { margin: 0 0 6px; color: #ffe08a; font-size: 14px; }
.ps-m { display: grid; grid-template-columns: 1fr 70px 46px 52px; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.25); margin-bottom: 4px; font-size: 13px; font-weight: 700; }
.ps-m i { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; display: block; }
.ps-m i b { display: block; height: 100%; background: #b07cf0; }
.ps-m em { font-style: normal; text-align: end; color: #cbbcef; }
.ps-m small { color: #ffe08a; font-weight: 900; text-align: end; }
.ps-m.done { opacity: 0.6; }
.ps-m.done i b { background: #7ddc5f; }
.ps-side p { font-size: 12px; color: #cbbcef; margin: 8px 0 0; }
.ps-side .ps-msg { color: #ffe08a; font-weight: 800; }
.ps-claim { width: 100%; }
@keyframes psPulse { from { box-shadow: 0 0 6px rgba(255, 210, 74, 0.3); } to { box-shadow: 0 0 18px rgba(255, 210, 74, 0.7); } }
@media (max-width: 760px) { .ps-foot { grid-template-columns: 1fr; } .ps-xp { display: none; } .ps-col { flex-basis: 78px; } .ps-cell { height: 90px; } }
.ps-toast { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 9600; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; background: linear-gradient(90deg, rgba(106, 63, 208, 0.95), rgba(40, 20, 70, 0.95)); border: 1px solid rgba(255, 210, 74, 0.6); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); animation: arrUp 0.4s ease-out both; }
.ps-toast .ps-crown { width: 30px; height: 30px; }
.ps-toast b { display: block; color: #ffe08a; }
.ps-toast span { font-weight: 800; font-size: 14px; }
.ps-toast.out { opacity: 0; transition: opacity 0.5s; }
.ps-show { position: fixed; inset: 0; z-index: 9700; cursor: pointer; animation: arrIn 0.3s ease-out both; }
.ps-show canvas { width: 100%; height: 100%; display: block; }
.ps-show.out { animation: arrOut 0.42s ease-in forwards; }
.ps-show-txt { position: absolute; left: 0; right: 0; top: 52%; text-align: center; color: #fff; pointer-events: none; opacity: 0; }
.ps-show.lit .ps-show-txt { animation: arrUp 0.5s 0.1s ease-out both; }
.ps-show-txt small { color: #d9b8ff; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
.ps-show-txt h2 { margin: 4px 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 5.2vw, 64px); color: #ffe08a; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.6), 0 0 28px rgba(255, 210, 74, 0.6); }
.ps-show.lit .ps-show-txt h2 { animation: arrSlam 0.6s 0.1s cubic-bezier(.2,1.6,.4,1) both; }
.ps-show-txt span { font-size: 12px; opacity: 0.6; }

.ps-overlay .ps-card.glass { background: linear-gradient(180deg, rgba(40, 20, 70, 0.985), rgba(16, 10, 30, 0.99)); backdrop-filter: none; }
.ps-cell .ps-fr { font-size: 10px; padding: 3px 6px; max-width: 84px; white-space: nowrap; overflow: hidden; }
.ps-cell .ps-fr b { font-size: 10px; }
.ps-in { position: absolute; bottom: 3px; left: 4px; right: 4px; font-size: 9.5px; font-weight: 800; line-height: 1.1; color: #f3eaff; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-cell canvas.ps-it { margin-top: -10px; }

/* ------------------------------------------------ v1.3 the map editor */
.me-btn .lm-ico svg { width: 26px; height: 26px; }
.me-overlay { position: fixed; inset: 0; z-index: 880; display: flex; flex-direction: column; background: #0b1611; color: var(--text); font-family: var(--font-body); }
.me-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); background: linear-gradient(180deg, #1d3326, #13251b); border-bottom: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); flex-wrap: wrap; }
.me-logo svg { width: 28px; height: 28px; display: block; }
.me-name { font-family: var(--font-display); font-size: 18px; letter-spacing: 0.4px; color: var(--text); background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px; padding: 6px 10px; width: min(240px, 40vw); user-select: text; -webkit-user-select: text; }
.me-name:focus { outline: 2px solid var(--accent); }
.me-biome { background: rgba(0, 0, 0, 0.3); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px; padding: 7px 8px; font: 800 13px var(--font-body); }
.me-size { font-size: 12px; font-weight: 800; color: var(--text-dim); }
.me-sp { flex: 1; }
.me-b, .me-ib { font: 800 14px var(--font-body); color: var(--text); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px; padding: 7px 12px; cursor: pointer; transition: filter 0.12s, transform 0.08s, background 0.12s; }
.me-b:hover, .me-ib:hover { background: rgba(255, 255, 255, 0.16); }
.me-b:active, .me-ib:active { transform: translateY(1px); }
.me-b:disabled { opacity: 0.45; cursor: not-allowed; }
.me-ib { font-size: 20px; line-height: 1; padding: 6px 11px; }
.me-play { color: #2a1a02; border: none; background: linear-gradient(180deg, #ffd56b, var(--accent) 50%, var(--accent-deep)); box-shadow: 0 3px 0 #8a5a08; font-family: var(--font-display); font-size: 16px; letter-spacing: 0.4px; }
.me-play:hover { filter: brightness(1.07); background: linear-gradient(180deg, #ffd56b, var(--accent) 50%, var(--accent-deep)); }
.me-main { flex: 1; display: flex; min-height: 0; }
.me-tools { width: 236px; flex: none; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(180deg, #142a1e, #0f1f16); border-right: 1px solid rgba(255, 255, 255, 0.08); }
.me-sec h4 { margin: 0 0 6px; font: 400 13px var(--font-display); letter-spacing: 0.8px; text-transform: uppercase; color: #d9c79a; display: flex; justify-content: space-between; }
.me-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.me-tool { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 5px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 0.22); color: var(--text); cursor: pointer; font: 800 10.5px var(--font-body); line-height: 1.1; text-align: center; transition: background 0.12s, border-color 0.12s, transform 0.1s; }
.me-tool:hover { background: rgba(255, 255, 255, 0.08); }
.me-tool.on { border-color: var(--accent); background: rgba(246, 183, 60, 0.18); box-shadow: inset 0 0 0 1px rgba(246, 183, 60, 0.5); transform: translateY(-1px); }
.me-tool svg { width: 26px; height: 26px; display: block; }
.me-sw { display: block; width: 26px; height: 26px; border-radius: 7px; border: 2px solid rgba(0, 0, 0, 0.55); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25); }
.me-sw5 { background-image: repeating-linear-gradient(90deg, transparent 0 5px, rgba(58, 36, 20, 0.7) 5px 7px) !important; }
.me-sw3 { background-image: radial-gradient(circle at 30% 40%, rgba(30, 50, 30, 0.8) 0 3px, transparent 4px), radial-gradient(circle at 70% 70%, rgba(30, 50, 30, 0.8) 0 3px, transparent 4px) !important; }
.me-chk { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); cursor: pointer; }
.me-chk input { accent-color: var(--accent); width: 16px; height: 16px; }
.me-brush { width: 100%; accent-color: var(--accent); }
.me-seg { display: flex; gap: 4px; flex-wrap: wrap; }
.me-seg button { flex: 1; min-width: 32px; padding: 6px 4px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(0, 0, 0, 0.22); color: var(--text); font: 800 14px var(--font-body); cursor: pointer; }
.me-seg button.on { border-color: var(--accent); background: rgba(246, 183, 60, 0.2); color: #ffe7a8; }
.me-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.me-stage { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.me-cv { position: absolute; inset: 0; touch-action: none; cursor: crosshair; display: block; }
.me-stats { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.me-stats span { display: flex; align-items: center; gap: 4px; padding: 3px 8px 3px 4px; border-radius: 999px; background: rgba(8, 16, 12, 0.72); border: 1px solid rgba(255, 255, 255, 0.1); font: 800 12px var(--font-body); font-variant-numeric: tabular-nums; }
.me-stats svg { width: 18px; height: 18px; }
.me-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 5px 12px; border-radius: 999px; background: rgba(8, 16, 12, 0.72); font-size: 12.5px; font-weight: 700; color: var(--text-dim); pointer-events: none; white-space: nowrap; max-width: 94%; overflow: hidden; text-overflow: ellipsis; }
.me-toast { position: absolute; left: 50%; top: 52px; transform: translate(-50%, -10px); opacity: 0; padding: 8px 16px; border-radius: 12px; background: rgba(30, 60, 40, 0.95); border: 1px solid rgba(125, 220, 95, 0.5); font-weight: 800; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.me-toast.show { opacity: 1; transform: translate(-50%, 0); }
.me-toast.bad { background: rgba(80, 24, 28, 0.95); border-color: rgba(229, 72, 77, 0.6); }
.me-modal { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.55); padding: 16px; }
.me-dlg { position: relative; width: min(440px, 100%); max-height: 92%; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(180deg, rgba(28, 48, 36, 0.98), rgba(14, 26, 19, 0.99)); backdrop-filter: none; }
.me-dlg.me-wide { width: min(720px, 100%); }
.me-dlg h3 { margin: 0; font: 400 22px var(--font-display); letter-spacing: 0.5px; padding-right: 30px; }
.me-dlg h3 small { font: 800 12px var(--font-body); color: var(--text-dim); }
.me-x { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.1); color: var(--text); font-size: 15px; cursor: pointer; }
.me-f { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 13px; color: var(--text-dim); }
.me-f input[type=range] { accent-color: var(--accent); }
.me-lands { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.me-land { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(0, 0, 0, 0.25); color: var(--text); cursor: pointer; transition: transform 0.1s, border-color 0.12s; }
.me-land:hover { transform: translateY(-2px); border-color: var(--accent); }
.me-land canvas { width: 96px; height: 64px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, 0.5); }
.me-land b { font-size: 12.5px; }
.me-land small { font-size: 11px; color: var(--text-dim); }
.me-list { display: flex; flex-direction: column; gap: 6px; }
.me-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.08); }
.me-item.cur { border-color: rgba(246, 183, 60, 0.6); }
.me-th canvas { display: block; border-radius: 8px; border: 1px solid rgba(0, 0, 0, 0.5); }
.me-it { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-it b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-it small { color: var(--text-dim); font-size: 12px; }
.me-del.sure { background: rgba(229, 72, 77, 0.35); border-color: var(--danger); font-size: 12px; }
.me-empty { color: var(--text-dim); text-align: center; }
.me-share { display: flex; gap: 12px; align-items: center; }
.me-share p { margin: 4px 0 0; font-size: 13px; color: var(--text-dim); }
.me-code { width: 100%; resize: vertical; font: 12px/1.35 ui-monospace, Menlo, Consolas, monospace; color: #d8f0dc; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px; padding: 8px; word-break: break-all; user-select: text; -webkit-user-select: text; }
.me-warn { margin: 0; padding: 8px 12px; list-style: none; border-radius: 10px; background: rgba(242, 193, 78, 0.1); border: 1px solid rgba(242, 193, 78, 0.35); font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 3px; }
.me-warn li.hard { color: #ff9b9e; }
.me-ok { margin: 0; color: var(--ok); font-weight: 800; }
.me-go { width: 100%; padding: 12px; font-size: 20px; }
[dir=rtl] .me-tools { border-right: none; border-left: 1px solid rgba(255, 255, 255, 0.08); }
@media (max-height: 540px) and (orientation: landscape) {
  .me-top { gap: 6px; padding: 5px 8px; }
  .me-logo, .me-size { display: none; }
  .me-name { width: 30vw; font-size: 15px; padding: 4px 8px; }
  .me-b { padding: 5px 9px; font-size: 13px; }
  .me-tools { width: 172px; padding: 6px; gap: 7px; }
  .me-sec h4 { font-size: 10.5px; margin-bottom: 3px; }
  .me-tool { padding: 4px 2px; }
  .me-tool span { display: none; }
  .me-tool svg, .me-sw { width: 22px; height: 22px; }
  .me-chk { margin-top: 3px; font-size: 11px; }
  .me-seg button { padding: 4px 2px; font-size: 12px; min-width: 24px; }
  .me-hint { display: none; }
  .me-stats span { font-size: 11px; padding: 2px 6px 2px 3px; }
  .me-stats svg { width: 15px; height: 15px; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .me-top { gap: 6px; padding: 6px 8px; }
  .me-logo, .me-size { display: none; }
  .me-name { width: 34vw; font-size: 15px; padding: 5px 8px; }
  .me-b { padding: 6px 9px; font-size: 13px; }
  .me-main { flex-direction: column-reverse; }
  .me-tools { width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: 10px; padding: 6px 8px; padding-bottom: max(6px, env(safe-area-inset-bottom)); border-right: none; border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .me-sec { flex: none; }
  .me-sec h4 { font-size: 11px; margin-bottom: 4px; }
  .me-grid { display: flex; gap: 4px; }
  .me-tool { width: 46px; padding: 5px 2px; }
  .me-tool span { display: none; }
  .me-chk { margin-top: 3px; font-size: 11px; }
  .me-brush { width: 110px; }
  .me-hint { display: none; }
}
.overlay.me-overlay { display: flex; place-items: initial; padding: 0; background: #0b1611; z-index: 880; animation: fadeIn 0.2s ease; }
.cn-reward.cn-reward-solo { position: fixed; z-index: 1300; }
/* v1.3 one Play button → Singleplayer / Multiplayer chooser */
.pm-btn .lm-ico svg { width: 26px; height: 26px; }
.pm-btn { min-height: 58px !important; }
.pm-btn .lm-text b { font-size: 22px !important; letter-spacing: 0.6px; }
.pm-ov { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 10, 7, 0.62); animation: fadeIn 0.18s ease; }
.pm-ov.hidden { display: none; }
.pm-card { position: relative; width: min(820px, 100%); max-height: calc(var(--vh100) - 32px); overflow-y: auto; display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; padding: 20px; background: linear-gradient(180deg, rgba(24, 40, 30, 0.97), rgba(12, 22, 16, 0.98)); backdrop-filter: none; }
.pm-col h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font: 400 22px var(--font-display); letter-spacing: 0.5px; }
.pm-col h3 span svg { width: 26px; height: 26px; display: block; }
.pm-list { display: flex; flex-direction: column; gap: 7px; }
.pm-list .lm-btn { width: 100%; }
.pm-note { margin: 10px 2px 0; font-size: 12.5px; color: var(--text-dim); font-weight: 700; }
.pm-x { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.1); color: var(--text); font-size: 15px; cursor: pointer; }
[dir=rtl] .pm-x { right: auto; left: 10px; }
@media (max-width: 720px), (max-height: 540px) {
  .pm-card { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
  .pm-col h3 { font-size: 17px; margin-bottom: 6px; }
  .pm-list { gap: 5px; }
  .pm-note { display: none; }
}
/* v1.3 live ops banner + admin panel */
.live-news { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 6; display: flex; flex-direction: column; gap: 4px; align-items: center; max-width: min(640px, 70vw); pointer-events: none; }
.live-news span { padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 13.5px; box-shadow: 0 4px 14px rgba(0,0,0,0.35); text-align: center; }
.ln-gold { background: linear-gradient(180deg, #ffd56b, #e0a12a); color: #2a1a02; }
.ln-red { background: #b3262b; color: #fff; }
.ln-blue { background: #2563c9; color: #fff; }
.ln-green { background: #2f8a3a; color: #fff; }
.adm-btn .lm-ico svg { width: 24px; height: 24px; }
.adm-overlay { z-index: 950; }
.adm-card { width: min(960px, 96vw); max-height: calc(var(--vh1) * 92); display: flex; flex-direction: column; gap: 10px; padding: 16px; background: linear-gradient(180deg, rgba(36, 18, 20, 0.98), rgba(16, 10, 12, 0.99)); backdrop-filter: none; }
.adm-card header { display: flex; align-items: center; gap: 10px; }
.adm-card header h2 { margin: 0; font: 400 24px var(--font-display); }
.adm-ico svg { width: 28px; height: 28px; display: block; }
.adm-who { color: var(--text-dim); font-weight: 700; flex: 1; }
.adm-x { width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,0.1); color: var(--text); cursor: pointer; }
.adm-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-tabs button { padding: 7px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.25); color: var(--text); font-weight: 800; cursor: pointer; }
.adm-tabs button.on { border-color: #e5484d; background: rgba(229,72,77,0.22); }
.adm-body { overflow-y: auto; min-height: 200px; user-select: text; -webkit-user-select: text; }
.adm-body h4 { margin: 14px 0 6px; font: 400 15px var(--font-display); letter-spacing: 0.6px; color: #ffc2c4; text-transform: uppercase; }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.adm-tile { padding: 12px; border-radius: 12px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; }
.adm-tile b { font: 400 30px var(--font-display); font-variant-numeric: tabular-nums; }
.adm-tile span { color: var(--text-dim); font-size: 12.5px; font-weight: 700; }
.adm-tab { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-tab td, .adm-tab th { padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.07); text-align: left; vertical-align: top; word-break: break-word; }
.adm-tab td:first-child { color: var(--text-dim); font-weight: 700; white-space: nowrap; }
.adm-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.adm-col { display: flex; flex-direction: column; gap: 6px; }
.adm-body input, .adm-body select, .adm-body textarea { background: rgba(0,0,0,0.35); color: var(--text); border: 1px solid rgba(255,255,255,0.16); border-radius: 9px; padding: 7px 9px; font: 700 13px var(--font-body); min-width: 0; }
.adm-row input { flex: 1 1 140px; }
.adm-dim { color: var(--text-dim); font-size: 12.5px; }
.adm-err { color: #ff9b9e; font-weight: 800; }
.adm-msg { font-weight: 800; color: #ffd56b; min-height: 1em; }
/* v1.4 players list, a player's page, wallet history */
.adm-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.adm-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.25); color: var(--text); font-weight: 800; font-size: 12.5px; cursor: pointer; }
.adm-chip.on { border-color: #e5484d; background: rgba(229,72,77,0.22); }
.adm-count { margin-left: auto; font-weight: 800; }
.adm-players tbody tr { cursor: pointer; }
.adm-players tbody tr:hover td { background: rgba(255,255,255,0.05); }
.adm-tab thead th { color: var(--text-dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.5px; position: sticky; top: 0; background: rgba(28,14,16,0.98); }
.adm-players td:first-child, .adm-hist td:first-child { color: var(--text); }
.adm-nm { display: block; font-weight: 900; }
.adm-uid { font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
.adm-num { text-align: right !important; font-variant-numeric: tabular-nums; font-weight: 800; }
.adm-pos { color: #8ff0a8; }
.adm-neg { color: #ff9b9e; }
.adm-pv { display: inline-block; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,0.1); font-size: 11px; font-weight: 900; color: var(--text-dim); }
.adm-pv.g { background: #fff; color: #4285f4; }
.adm-st { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 900; background: rgba(255,255,255,0.1); color: var(--text-dim); white-space: nowrap; }
.adm-st.ok { background: rgba(40,140,70,0.28); color: #8ff0a8; }
.adm-st.warn { background: rgba(200,140,20,0.3); color: #ffd56b; white-space: normal; }
.adm-st.bad { background: rgba(200,40,46,0.32); color: #ffb1b3; }
.adm-back { margin-bottom: 8px; }
.adm-pl-head h3 { margin: 0 0 4px; font: 400 26px var(--font-display); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.adm-pl-head p { margin: 2px 0; }
.adm-code { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; background: rgba(0,0,0,0.35); padding: 1px 5px; border-radius: 5px; user-select: all; -webkit-user-select: all; }
.adm-pl-head + .adm-tiles { margin-top: 10px; }
.adm-flag { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(200,140,20,0.18); border: 1px solid rgba(255,200,80,0.45); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.adm-flag.bad { background: rgba(200,40,46,0.18); border-color: rgba(229,72,77,0.5); }
.adm-flag .me-b { margin-left: auto; }
.adm-acts { display: flex; flex-direction: column; gap: 8px; }
.adm-flagrow td { background: rgba(200,140,20,0.12); }
.adm-hist .me-b { padding: 4px 10px; font-size: 12px; }
.adm-more { display: flex; justify-content: center; padding: 10px; }
.adm-more:empty { display: none; }

/* =====================================================================
 * v1.3.2 mobile — phones & tablets only (html.dev-touch, Device.js).
 * Nothing below can reach a computer.
 * ===================================================================== */
/* move stick: compact, floating; the zone never eats touches (Controls.bindMove) */
html.dev-touch .touch-ui .tz-move { left: 0; top: 0; right: 0; bottom: 0; width: auto; pointer-events: none; }
html.dev-touch .touch-ui .tz-move .stick { position: fixed; width: calc(var(--sr, 40px) * 2); height: calc(var(--sr, 40px) * 2); margin: calc(var(--sr, 40px) * -1) 0 0 calc(var(--sr, 40px) * -1);
  border: 2px solid rgba(255, 255, 255, 0.3); background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.3)); opacity: 0.38; transition: opacity 0.12s; pointer-events: none; }
html.dev-touch .touch-ui .tz-move .stick.live { opacity: 0.95; transition: none; }
html.dev-touch .touch-ui .tz-move .stick i { width: calc(var(--sr, 40px) * 0.92); height: calc(var(--sr, 40px) * 0.92); background: rgba(255, 255, 255, 0.72); }
/* attack button: placed by Mobile.layoutControls */
html.dev-touch .touch-ui .tz-aim { position: fixed; right: auto; bottom: auto; top: auto; width: 80px; height: 80px; }
html.dev-touch .touch-ui .tz-aim .stick.atk-btn { left: 0; top: 0; width: 100%; height: 100%; margin: 0; opacity: 0.9; }
html.dev-touch .touch-ui .tz-aim .stick.atk-btn.has-target { box-shadow: 0 0 0 3px rgba(255, 214, 110, 0.75), 0 4px 14px rgba(0, 0, 0, 0.45); }
html.dev-touch .touch-ui .tz-aim .atk-ico { font-size: 0; }
html.dev-touch .touch-ui .tz-aim .atk-ico svg { width: 46%; height: 46%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45)); }
/* the action buttons: two arcs around ⚔ */
html.dev-touch .touch-ui .t-btns { position: static; display: block; right: auto; bottom: auto; }
html.dev-touch .touch-ui .t-btns .t-btn { position: fixed; padding: 0; width: 46px; height: 46px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  background: rgba(14, 24, 19, 0.6); border: 1.5px solid rgba(255, 255, 255, 0.26); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); grid-row: auto; font-size: 0; line-height: 1; }
html.dev-touch .touch-ui .t-btns .t-btn svg { width: 44%; height: 44%; flex: none; }
html.dev-touch .touch-ui .t-btns .t-btn .tb-l { font: 800 calc(8.5px * var(--tk, 1)) / 1 "Nunito", system-ui, sans-serif; letter-spacing: 0.2px; margin-top: 1px; opacity: 0.92; max-width: 92%; overflow: hidden; white-space: nowrap; text-overflow: clip; }
html.dev-touch .touch-ui .t-btns .t-btn.big { background: rgba(246, 183, 60, 0.8); color: #2a1a02; border-color: rgba(255, 240, 200, 0.6); }
html.dev-touch .touch-ui .t-btns .t-btn.down { transform: scale(0.9); background: rgba(246, 183, 60, 0.92); color: #2a1a02; }
html.dev-touch .touch-ui .t-place { bottom: calc(var(--mob-ctl-h, 150px) * 0.5); }
/* a menu is open: the arcs step aside (only Build / Craft stay to close it) */
html.dev-touch.panel-open .touch-ui .t-btns .t-btn:not([data-act="build"]):not([data-act="craft"]) { display: none; }
/* Build / Craft: a sheet of cards between the stick and the buttons — the whole card is the button */
html.dev-touch.touch-play .side-panel { position: fixed; min-height: 0; padding: 8px 10px; z-index: 31; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
html.dev-touch.touch-play .side-panel .craft-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
html.dev-touch.touch-play .side-panel .recipe { grid-template-columns: 40px minmax(0, 1fr); gap: 7px; padding: 6px 7px; cursor: pointer; align-items: center; }
html.dev-touch.touch-play .side-panel .recipe:active { transform: scale(0.97); background: rgba(246, 183, 60, 0.18); }
html.dev-touch.touch-play .side-panel .recipe canvas, html.dev-touch.touch-play .side-panel .recipe img { width: 40px; height: 40px; }
html.dev-touch.touch-play .side-panel .recipe .recipe-desc { display: none; }
html.dev-touch.touch-play .side-panel .recipe .recipe-name { font-size: 13px; line-height: 1.15; }
html.dev-touch.touch-play .side-panel .recipe .recipe-cost { font-size: 11.5px; }
html.dev-touch.touch-play .side-panel .recipe .btn-craft { display: none; }
html.dev-touch.touch-play .side-panel .recipe-group { grid-column: 1 / -1; }
/* desktop-only help never shows on a phone / tablet */
html.dev-touch .help-panel, html.dev-touch .hud-ver, html.dev-touch .kb-only, html.dev-touch .pm-keys, html.dev-touch .ctl-prompt { display: none !important; }
/* menus & pop-ups fit the screen: scroll inside, never off screen */
html.dev-touch .overlay > .glass, html.dev-touch .overlay > .card-wrap, html.dev-touch .pause-card { max-height: calc(100dvh - 12px); overflow-y: auto; overscroll-behavior: contain; }
/* v1.3.2 demolish button (every device) */
.bp-btn.bp-demolish { background: rgba(120, 40, 36, 0.35); border-color: rgba(229, 72, 77, 0.35); color: #ffc9c4; }
.bp-btn.bp-demolish.armed { background: rgba(229, 72, 77, 0.85); color: #fff; animation: dmPulse 0.6s ease-in-out infinite alternate; }
.bp-btn.bp-demolish .dm-back { opacity: 0.85; }
@keyframes dmPulse { from { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.6); } to { box-shadow: 0 0 0 6px rgba(229, 72, 77, 0); } }
/* ---- v1.3.2 mobile lobby (landscape only): brand + wallet on top, level card left, a 2-column menu right ---- */
html.dev-touch .lobby-top { top: calc(6px + env(safe-area-inset-top, 0px)); left: calc(12px + env(safe-area-inset-left, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); gap: 10px; flex-wrap: nowrap; }
html.dev-touch .lobby-brand .logo { font-size: 30px; }
html.dev-touch .lobby-brand .tagline { display: none; }
html.dev-touch .lobby-right-top { zoom: 0.72; --zf: 0.72; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }
html.dev-touch .lobby-profile .lp-who small:not(.lp-title) { display: none; }
html.dev-touch .km-card { position: absolute; left: calc(12px + env(safe-area-inset-left, 0px)); top: 52px; width: 300px; margin: 0; zoom: 0.74; --zf: 0.74; padding: 8px 10px; gap: 5px;
  max-height: calc((100dvh - 112px) / 0.74); overflow-y: auto; overscroll-behavior: contain; }
html.dev-touch .lobby-menu { position: absolute; top: auto; left: auto; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); transform: none;
  width: min(400px, 50vw); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
html.dev-touch .lm-btn { min-height: 42px; padding: 5px 8px 5px 6px; grid-template-columns: 28px minmax(0, 1fr); gap: 7px; }
html.dev-touch .lm-ico { width: 28px; height: 28px; }
html.dev-touch .lm-ico svg { width: 18px; height: 18px; }
html.dev-touch .lm-text { min-width: 0; }
html.dev-touch .lm-text b { font-size: 14.5px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
html.dev-touch .lm-text small { display: none; }
html.dev-touch .lobby-foot { bottom: 4px; font-size: 9.5px; opacity: 0.6; }
html.dev-touch .full-hint { left: calc(12px + env(safe-area-inset-left, 0px)); right: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); transform: none; zoom: 0.8; --zf: 0.8; max-width: 44vw; }
html.dev-touch .lobby-panel { top: 50px; bottom: 8px; left: calc(10px + env(safe-area-inset-left, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); padding: 10px 12px; }
html.dev-touch .play-chooser .glass, html.dev-touch #playChooser > * { max-height: calc(100dvh - 16px); overflow-y: auto; }
html.dev-tablet .lobby-brand .logo { font-size: 40px; }
html.dev-tablet .lobby-right-top { zoom: 0.9; --zf: 0.9; }
html.dev-tablet .km-card { top: 76px; zoom: 0.92; --zf: 0.92; max-height: calc((100dvh - 150px) / 0.92); }
html.dev-tablet .lobby-menu { width: min(470px, 44vw); gap: 8px; }
html.dev-tablet .lm-btn { min-height: 54px; grid-template-columns: 34px minmax(0, 1fr); }
html.dev-tablet .lm-ico { width: 34px; height: 34px; }
html.dev-tablet .lm-text b { font-size: 17px; }
html.dev-tablet .lm-text small { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ---- v1.3.2 mobile match HUD: resources always on top, nothing under the thumbs ---- */
html.dev-touch .resource-bar { top: 16px; bottom: auto; width: auto; flex-wrap: nowrap; }
html.dev-phone { --hz: 0.8; }
html.dev-tablet { --hz: 0.96; }
html.dev-touch.touch-play .hud { zoom: calc(var(--ui) * var(--hz, 0.8)); --zf: calc(var(--ui) * var(--hz, 0.8)); }
html.dev-phone.touch-play .army-panel { display: none !important; }
html.dev-touch.touch-play .right-col { max-height: calc((100dvh - var(--mob-ctl-h, 200px) - 6px) / (var(--ui, 0.85) * var(--hz, 0.8) * var(--rz, 1))); overflow: hidden; zoom: var(--rz, 1); --zf: var(--rz, 1); }
/* v1.3.3d like the computer: the side column never scrolls — the map and its buttons stay whole, the kingdom list gives way */
html.dev-touch.touch-play .right-col > * { flex: none; }
html.dev-touch.touch-play .right-col > .kingdom-panel { flex: none; min-height: 0; overflow: hidden; }
html.dev-touch.touch-play .right-col .kingdom-list { min-height: 76px; max-height: 160px; overflow-y: auto; }
html.dev-touch.touch-play .building-panel { font-size: 13px; }
html.dev-touch.touch-play .building-panel .bp-btn { min-height: 40px; }
html.dev-touch.touch-play .building-panel .bp-btn span { font-size: 12.5px; }
html.dev-touch .card-overlay kbd, html.dev-touch .card-wrap kbd, html.dev-touch .card-hint kbd { display: none; }
html.dev-touch.touch-play .building-panel { width: 250px; left: 16px; bottom: auto; overflow-y: auto; overscroll-behavior: contain; }
html.dev-touch .hud-editor.he-touch .he-prof { display: none; }
html.dev-touch .hud-editor.he-touch .he-handle span { font-size: 10px; }
@media (max-width: 760px) { html.dev-touch .km-card { top: 58px; } html.dev-touch .lobby-right-top { zoom: 0.66; --zf: 0.66; } }
html.dev-tablet { --hz: 1.08; }
/* v1.3.3 no pinch / double-tap zoom: the page never zooms, lists still scroll with one finger */
html, body { touch-action: pan-x pan-y; -ms-touch-action: pan-x pan-y; overscroll-behavior: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.dev-touch, html.dev-touch body { touch-action: manipulation; }
html.dev-touch button, html.dev-touch .lm-btn, html.dev-touch [role="button"] { touch-action: manipulation; }
/* v1.3.3 costs as icons + numbers */
.ci { display: inline-flex; align-items: center; gap: 2px; margin-right: 7px; white-space: nowrap; }
.ci .ci-svg { width: 1.25em; height: 1.25em; flex: none; }
.ci b { font-weight: 900; }
.bp-ico { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; margin-right: 6px; font-style: normal; font-size: 12px; vertical-align: -4px; color: #fff; }
.bp-ico.up { background: #2fbf4a; box-shadow: 0 0 0 2px rgba(47, 191, 74, 0.3); }
.bp-ico.dm { background: #d9483f; }
/* =====================================================================
 * v1.3.3 Kingdom Academy — the visual tutorial
 * ===================================================================== */
html.tut-on .tut-hide { display: none !important; }
.tut-new { animation: tutNew 0.6s ease-out 4 alternate !important; }
.tut-new.tut-rel { position: relative; }
.tut-new::after { content: 'NEW'; position: absolute; top: -9px; right: -6px; padding: 1px 5px; border-radius: 6px; background: #ff5a4a; color: #fff; font: 900 10px var(--font-body, sans-serif); letter-spacing: 0.5px; pointer-events: none; z-index: 3; }
@keyframes tutNew { from { box-shadow: 0 0 0 0 rgba(255, 210, 74, 0.9); filter: brightness(1); } to { box-shadow: 0 0 0 10px rgba(255, 210, 74, 0); filter: brightness(1.35); } }
#tutEn, .tut-goal .tg-en { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 3px; }
.pg { display: inline-flex; align-items: center; justify-content: center; height: 26px; min-width: 26px; border-radius: 7px; font: 900 13px var(--font-body, sans-serif); color: #1d1a17; }
.pg-key { padding: 0 7px; background: linear-gradient(#fff, #d8d2c4); border: 1.5px solid #1d1a17; border-bottom-width: 3px; }
.pg-keys { gap: 2px; }
.pg-keys i { font-style: normal; width: 18px; height: 20px; display: grid; place-items: center; font-size: 10px; background: linear-gradient(#fff, #d8d2c4); border: 1.5px solid #1d1a17; border-bottom-width: 2.5px; border-radius: 4px; }
.pg-mouse { width: 20px; height: 28px; border: 2px solid #fff; border-radius: 10px; position: relative; background: rgba(0, 0, 0, 0.3); }
.pg-mouse i { position: absolute; top: 0; width: 50%; height: 45%; background: #ffd24a; border-radius: 8px 0 0 0; left: 0; animation: pgClick 0.9s steps(2) infinite; }
.pg-mouse.R i { left: auto; right: 0; border-radius: 0 8px 0 0; }
@keyframes pgClick { 50% { background: rgba(255, 210, 74, 0.25); } }
.pg-stick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, 0.3); position: relative; }
.pg-stick i { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #fff; left: 6px; top: 6px; animation: pgStick 1.4s ease-in-out infinite; }
@keyframes pgStick { 25% { transform: translate(5px, -4px); } 75% { transform: translate(-5px, 4px); } }
.pg-btn { min-width: 28px; height: 28px; padding: 0 6px; border-radius: 50%; background: rgba(14, 24, 19, 0.85); border: 1.5px solid rgba(255, 255, 255, 0.5); color: #fff; font-size: 14px; }
.pg-btn.atk { background: radial-gradient(circle at 40% 35%, #f05a50, #96201e); }
.pg-btn.ok { background: #7ddc5f; color: #10240a; border-radius: 14px; }
.pg-tap, .pg-hold { font-size: 18px; min-width: 20px; }
.pg-hold { font-size: 14px; color: #ffd24a; }
.pg-ico svg, .pg-res svg { width: 26px; height: 26px; }
.pg-to { color: #ffd24a; font: 900 20px var(--font-body, sans-serif); line-height: 1; }
.tg-step { font: 800 11px var(--font-body, sans-serif); opacity: 0.7; align-self: start; }
/* the pointing hand */
.tut-hand { position: fixed; z-index: 9400; pointer-events: none; }
.tut-hand.hidden { display: none; }
.tut-hand .th-ring { position: absolute; inset: -6px; border-radius: 14px; border: 3px solid #ffd24a; box-shadow: 0 0 0 4px rgba(255, 210, 74, 0.25), 0 0 18px rgba(255, 210, 74, 0.7); animation: thRing 1s ease-in-out infinite alternate; }
.tut-hand .th-finger { position: absolute; left: 50%; top: 100%; font-size: 34px; line-height: 1; transform: translate(-30%, 4px); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.6)); animation: thTap 0.9s ease-in-out infinite; }
.tut-hand.up .th-finger { top: auto; bottom: 100%; transform: translate(-30%, -4px) rotate(180deg); animation: thTapUp 0.9s ease-in-out infinite; }
@keyframes thRing { from { opacity: 0.55; } to { opacity: 1; } }
@keyframes thTap { 50% { transform: translate(-30%, -6px) scale(0.92); } }
@keyframes thTapUp { 50% { transform: translate(-30%, 6px) rotate(180deg) scale(0.92); } }
/* step banner */
.tut-banner { position: fixed; left: 50%; top: 34%; transform: translate(-50%, -50%) scale(0.6); z-index: 9300; pointer-events: none; opacity: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tut-banner .tb-ico svg { width: 84px; height: 84px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6)); }
.tut-banner b { font: 400 34px/1 var(--font-display, sans-serif); color: #fff; text-shadow: 0 3px 0 #2b4a1f, 0 6px 14px rgba(0, 0, 0, 0.7); text-align: center; padding: 0 12px; }
.tut-banner.on { animation: tbIn 1.9s ease-out forwards; }
@keyframes tbIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); } 14% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 22% { transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%) scale(0.9); } }
/* picture card */
.tut-card-ov { position: fixed; inset: 0; z-index: 9450; display: grid; place-items: center; background: rgba(4, 8, 6, 0.55); padding: 12px; }
.tut-card { width: min(560px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 16px 18px; border-radius: 18px; display: flex; flex-direction: column; gap: 10px; animation: tgPop 0.45s cubic-bezier(.2, 1.5, .4, 1); }
.tc-pics { display: flex; flex-direction: column; gap: 8px; }
.tc-row { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); }
.tc-row.bad { background: rgba(160, 40, 30, 0.3); }
.tc-row svg { width: 34px; height: 34px; }
.tc-big { display: inline-flex; align-items: center; gap: 2px; }
.tc-big b { font: 900 18px var(--font-body, sans-serif); color: #ff8a7a; margin-right: 6px; }
.tc-big.run { animation: tcRun 1.2s ease-in-out infinite; }
@keyframes tcRun { 50% { transform: translateX(14px); opacity: 0.5; } }
.tc-arrow { font: 900 22px var(--font-body, sans-serif); color: #ffd24a; }
.tc-small { font: 800 13px var(--font-body, sans-serif); opacity: 0.85; }
.tc-xp { width: 90px; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.tc-xp i { display: block; height: 100%; width: 30%; background: linear-gradient(90deg, #ffd24a, #ff9a3a); animation: tcXp 1.8s ease-in-out infinite; }
@keyframes tcXp { to { width: 100%; } }
.tc-lines { margin: 0; padding-left: 20px; font: 800 14px/1.45 var(--font-body, sans-serif); }
.tc-go { align-self: center; min-width: 180px; }
@media (max-height: 440px) { .tc-row svg { width: 26px; height: 26px; } .tc-row { padding: 4px 8px; } .tut-banner .tb-ico svg { width: 60px; height: 60px; } .tut-banner b { font-size: 26px; } .tc-lines { font-size: 12.5px; } }
/* v1.3.3 a bigger, clearer goal chip */
.tut-goal { min-width: min(380px, calc(100vw - 24px)); padding: 10px 14px 12px; }
.tut-goal .tg-main b { font-size: 21px; }
.tut-goal .tg-ico svg { width: 36px; height: 36px; }
.tut-goal .tg-prog { font-size: 21px; }
.pg { height: 30px; min-width: 30px; font-size: 14px; }
.pg-ico svg, .pg-res svg { width: 30px; height: 30px; }
html.dev-phone .tut-goal { min-width: min(330px, calc(100vw - 24px)); }
html.dev-phone .pg { height: 24px; min-width: 24px; }
html.dev-phone .pg-ico svg, html.dev-phone .pg-res svg { width: 24px; height: 24px; }
/* v1.3.3 the level counter: a slim header strip under the clock */
.mode-panel { width: auto; min-width: 230px; padding: 5px 10px; background: rgba(12, 20, 16, 0.62); }
.mp-lv { display: flex; align-items: center; gap: 8px; }
.mp-star { display: inline-flex; align-items: center; gap: 3px; color: #ffd24a; font: 900 15px var(--font-body); }
.mp-star b { color: #fff; font-size: 16px; }
.mp-lv .mp-bar { flex: 1; min-width: 90px; margin: 0; height: 8px; }
.mp-xp { font: 800 11px var(--font-body); opacity: 0.8; white-space: nowrap; }
.mode-panel .mp-cards { margin-top: 4px; justify-content: center; }
/* v1.3.3 Deathmatch: score + boosts live in the right column */
.hud.mode-dm .right-col .mode-panel, .hud.mode-dm .right-col .boost-bar { position: static; transform: none; left: auto; top: auto; width: auto; min-width: 0; margin: 0; }
.hud.mode-dm .right-col .boost-bar .bb-row { flex-wrap: wrap; justify-content: center; }
.hud.mode-dm .right-col .boost-bar .bb-perk .bb-name, .hud.mode-dm .right-col .boost-bar .bb-title .ar { display: none; }
.hud.mode-dm .right-col .mp-dmt { font-size: 13px; }
.hud.mode-dm .right-col .mp-dm { font-size: 11.5px; }
.hud.mode-dm #kingdomPanel { display: none !important; }
html.dev-phone .hud.mode-dm .right-col .boost-bar .bb-title { display: none; }
html.dev-phone .hud.mode-dm #minimap { width: 96px !important; height: 96px !important; }
html.dev-phone .hud.mode-dm .right-col .mp-dm { font-size: 11px; }
/* v1.3.3 the tutorial chip never blocks a click on the world under it (only its ✕ is a button) */
.tut-goal { pointer-events: none; }
.tut-goal .tg-skip { pointer-events: auto; }
.tg-step { direction: ltr; unicode-bidi: isolate; }
.pg-mw { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.pg-mw .pg-mouse { width: 24px; height: 32px; border-radius: 12px; }
.pg-mw .pg-mouse i { background: #ff5a4a; }
.pg-lbl { font: 900 9px/1 var(--font-body, sans-serif); letter-spacing: 0.5px; color: #ffd24a; }
/* v1.3.3b clearer pictograms */
.pg-mouse-svg { display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)); }
.pg-mouse-svg .mb-on { animation: mbBlink 0.8s steps(2) infinite; }
@keyframes mbBlink { 50% { fill: #ffb0a6; } }
.pg-btn.tb { width: 32px; height: 32px; padding: 0; border-radius: 50%; }
.pg-btn.tb svg { width: 60%; height: 60%; }
.pg-cost { display: inline-flex; gap: 6px; margin-left: 6px; padding: 2px 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.35); }
.pg-c { display: inline-flex; align-items: center; gap: 2px; font: 900 14px var(--font-body, sans-serif); color: #fff; }
.pg-c svg { width: 22px; height: 22px; }
.pg-c.lack b { color: #ff8a7a; }
/* phones: a compact goal chip (icon · short title · pictures), the banner smaller */
html.dev-phone .tut-goal { min-width: 0; width: auto; max-width: min(430px, calc(100vw - 260px)); padding: 5px 9px 7px; gap: 6px; grid-template-columns: 30px minmax(0, 1fr) auto auto; }
html.dev-phone .tut-goal .tg-ico, html.dev-phone .tut-goal .tg-ico svg { width: 28px; height: 28px; }
html.dev-phone .tut-goal .tg-main b { font-size: 14px; line-height: 1.1; }
html.dev-phone .tut-goal .tg-prog { font-size: 14px; }
html.dev-phone .tut-goal .tg-step { display: none; }
html.dev-phone #tutEn, html.dev-phone .tut-goal .tg-en { gap: 3px; margin-top: 2px; }
html.dev-phone .pg { height: 22px; min-width: 22px; font-size: 11px; }
html.dev-phone .pg-btn.tb { width: 26px; height: 26px; }
html.dev-phone .pg-ico svg, html.dev-phone .pg-res svg, html.dev-phone .pg-c svg { width: 20px; height: 20px; }
html.dev-phone .pg-c { font-size: 12px; }
html.dev-phone .pg-to { font-size: 15px; }
html.dev-phone .tut-banner .tb-ico svg { width: 52px; height: 52px; }
html.dev-phone .tut-banner b { font-size: 22px; }
html.dev-phone .tut-card { width: min(470px, 100%); padding: 10px 12px; gap: 6px; }
html.dev-phone .tc-row { padding: 4px 8px; }
html.dev-phone .tc-row svg { width: 24px; height: 24px; }
html.dev-phone .tc-lines { font-size: 12px; }
html.dev-phone .tc-go { min-height: 36px; font-size: 16px; }
/* v1.3.3b the academy keeps the screen quiet: only warnings / errors pop up as toasts */
html.tut-on .toasts .toast:not(.error):not(.warn) { display: none; }
html.dev-phone .tut-goal { min-width: min(300px, calc(100vw - 280px)); }
html.dev-phone .tut-goal .tg-main b { white-space: normal; }
/* v1.3.3b the academy shows the building panel short: name, health and the buttons */
html.tut-on #bpInfo, html.tut-on .building-panel .bp-effect, html.tut-on .train-card .tc-strong, html.tut-on .train-card .tc-weak { display: none; }
html.dev-desktop .pg-mouse-svg { width: 34px; height: 48px; }

/* v1.3.3d phones: the academy pictures a size smaller */
html.dev-phone .tut-goal { max-width: min(360px, calc(100vw - 280px)); padding: 4px 8px 5px; gap: 5px; grid-template-columns: 24px minmax(0, 1fr) auto auto; }
html.dev-phone .tut-goal .tg-ico, html.dev-phone .tut-goal .tg-ico svg { width: 22px; height: 22px; }
html.dev-phone .tut-goal .tg-main b, html.dev-phone .tut-goal .tg-prog { font-size: 12px; }
html.dev-phone .pg { height: 18px; min-width: 18px; font-size: 10px; border-radius: 5px; }
html.dev-phone .pg-btn.tb { width: 21px; height: 21px; }
html.dev-phone .pg-ico svg, html.dev-phone .pg-res svg, html.dev-phone .pg-c svg { width: 16px; height: 16px; }
html.dev-phone .pg-c { font-size: 11px; }
html.dev-phone .pg-cost { gap: 4px; margin-left: 4px; padding: 1px 6px; }
html.dev-phone .pg-to { font-size: 12px; }
html.dev-phone .tut-hand .th-finger { font-size: 26px; }
html.dev-phone .tut-banner .tb-ico svg { width: 42px; height: 42px; }
html.dev-phone .tut-banner b { font-size: 18px; }
html.dev-phone .tut-card { width: min(400px, 100%); padding: 8px 10px; gap: 5px; }
html.dev-phone .tc-row svg { width: 20px; height: 20px; }
html.dev-phone .tc-lines { font-size: 11px; }
html.dev-phone .tc-go { min-height: 32px; font-size: 14px; }
/* v1.3.3d phones: the round ☰ button already pauses, and the keyboard help is for computers — the map buttons fit one row */
html.dev-phone.touch-play .right-col #btnPauseTouch, html.dev-phone.touch-play .right-col #btnHelp { display: none; }
/* v1.3.3d touch: the minimap sits at the top of its column (a leftover "top: 16px" pushed it 16 px past the column's end) */
html.dev-touch.touch-play .right-col .minimap-wrap { top: 0; right: auto; }
/* v1.3.3f phones & tablets: the building panel keeps its normal size and scrolls smoothly when long (one scroll: the panel's) */
html.dev-touch.touch-play .building-panel .train-grid { max-height: none; overflow: visible; }
/* phones: Demolish is a small button in the panel's top-right corner (its words show once armed) */
html.dev-phone.touch-play .building-panel .bp-btn.bp-demolish { position: absolute; top: 5px; right: 8px; min-height: 26px; padding: 2px 9px; z-index: 2; }
html.dev-phone.touch-play .building-panel .bp-btn.bp-demolish > span:first-child { font-size: 0; display: inline-flex; align-items: center; }
html.dev-phone.touch-play .building-panel .bp-btn.bp-demolish.armed > span:first-child { font-size: 10px; gap: 4px; }
html.dev-phone.touch-play .building-panel .bp-btn.bp-demolish .cost { display: none; }
html.dev-phone.touch-play .building-panel .bp-head { padding-right: 46px; }   /* the name never runs under the corner button */
/* v1.3.3e the academy keeps the screen quiet: the building panel only in the lessons that use it */
html.tut-on.tut-bp-off #buildingPanel { display: none !important; }
/* v1.3.3e iPhone: the "Add to Home Screen" guide (Safari has no full screen for web pages) — fits a phone held sideways */
.ios-gate { position: fixed; inset: 0; z-index: 9800; display: grid; place-items: center; padding: max(10px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); background: rgba(6, 12, 9, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: arrIn 0.25s ease-out both; }
.ios-gate .ig-card { width: min(560px, 100%); max-height: calc(var(--vh100) - 20px); overflow: auto; display: grid; gap: 10px; justify-items: center; text-align: center; padding: 16px 18px; border-radius: 20px; border: 2px solid rgba(246, 183, 60, 0.55); }
.ios-gate .ig-title { font: 400 22px/1.1 var(--font-display, sans-serif); color: #ffd56b; }
.ios-gate .ig-sub { font-size: 13px; line-height: 1.35; opacity: 0.88; max-width: 46ch; }
.ios-gate .ig-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; counter-reset: ig; }
.ios-gate .ig-steps li { counter-increment: ig; position: relative; display: grid; justify-items: center; gap: 6px; padding: 10px 6px 8px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); font: 800 12.5px/1.2 var(--font-body, sans-serif); }
.ios-gate .ig-steps li::before { content: counter(ig); position: absolute; top: 6px; inset-inline-start: 8px; width: 18px; height: 18px; border-radius: 50%; background: #f6b73c; color: #1d1a17; font: 900 11px/18px var(--font-body, sans-serif); }
.ios-gate .ig-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); color: #4da3ff; }
.ios-gate .ig-ico svg { width: 28px; height: 28px; }
.ios-gate .ig-app { background: none; }
.ios-gate .ig-app svg { width: 44px; height: 44px; }
.ios-gate .ig-ok { min-width: 160px; min-height: 42px; }
@media (max-height: 360px) { .ios-gate .ig-card { gap: 6px; padding: 10px 14px; } .ios-gate .ig-title { font-size: 18px; } .ios-gate .ig-sub { font-size: 12px; } .ios-gate .ig-ico { width: 36px; height: 36px; } .ios-gate .ig-ico svg { width: 22px; height: 22px; } .ios-gate .ig-app svg { width: 36px; height: 36px; } .ios-gate .ig-ok { min-height: 36px; } }
.portal .ios-gate { display: none !important; }
.cq-scene-meta .easier { color: #8ef06f; }
/* v1.3.3f the card choice: one row of cards that always fits the screen, no scrolling, nothing over it
   (phones & tablets get a compact card; Cards.fit() then scales the whole choice to the screen when needed) */
body.h-card .hud .toasts, body.h-card .km-toast { visibility: hidden; }
html.dev-touch .overlay > .card-wrap { max-height: none; overflow: visible; }
html.dev-phone .card-title { font-size: 34px; }
html.dev-phone .card-sub { margin: 2px 0 6px; font-size: 13px; }
html.dev-phone .card-legend { margin: 0 0 8px; }
html.dev-touch .card-row { flex-wrap: nowrap; gap: 10px; }
html.dev-phone .pick-card { width: 172px; min-height: 0; padding: 12px 10px 10px; gap: 4px; border-radius: 16px; }
html.dev-phone .pick-card .pc-ico { width: 62px; height: 62px; margin: 2px 0; }
html.dev-phone .pick-card .pc-ico svg { width: 40px; height: 40px; }
html.dev-phone .pick-card .pc-name { font-size: 18px; }
html.dev-phone .pick-card .pc-desc { font-size: 12.5px; line-height: 1.25; }
/* v1.3.3g the Royal Pass toast sits in the middle (its fade-in animation used to cancel the centring transform) */
.ps-toast { left: 0; right: 0; margin-inline: auto; width: max-content; max-width: calc(100vw - 24px); transform: none; }
/* v1.3.3g the end of a match fits the screen whole — a computer, a tablet, every phone (iPhone and Android), either way
   round: no scrollbar, the buttons right under the content (never floating over it). Endgame.fit() (main.js) lays a
   short screen out in three columns (.ec-wide / .ec-tight) and shrinks what is still too big (SIO.fitBox). */
.end-card, html.touch-play .end-card, html.dev-touch #endOverlay > .end-card { max-height: none; overflow: visible; }
html.touch-play .end-card { zoom: var(--ui); --zf: var(--ui); }
.end-card .end-actions { position: static; padding: 2px 0 0; background: none !important; }
.end-card.glass { background: linear-gradient(180deg, rgba(20, 30, 23, 0.96), rgba(11, 17, 13, 0.97)); }
body.h-end #hud, body.h-end #touchUI, body.h-end .km-toast { visibility: hidden; }
body.h-end .ps-toast { top: calc(8px + env(safe-area-inset-top, 0px)); left: auto; right: calc(8px + env(safe-area-inset-right, 0px)); margin: 0; zoom: 0.8; --zf: 0.8; }
/* three columns (Endgame.layout moves the boxes in): Top 3 and the story stage · the statistics · the rewards and the Kingdom Level */
.end-card.ec-wide { width: min(1180px, 100%); max-width: none; }
.end-card.ec-wide > h2 { margin: 0; }
.end-card.ec-wide > p { margin: 0 0 10px; }
.end-card.ec-wide .end-body { display: none; }
.ec-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; text-align: left; margin-bottom: 10px; }
.ec-col.ec-empty { display: none; }
.end-stats:empty, .end-podium:empty { display: none; }
.ec-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ec-col > .end-stats { flex: 1; }
.ec-col h4 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 17px; }
.ec-col > .end-podium { margin: 0; text-align: center; }
.ec-col > .end-conquest, .ec-col > .end-kingdom { margin: 0; }
.end-card.ec-wide .end-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; }
.end-card.ec-wide .end-actions-main { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.end-card.ec-wide .end-actions .btn-primary { width: auto; min-width: 200px; padding-inline: 22px; white-space: nowrap; }
.end-card.ec-wide .end-actions-row.h-hidonly { display: none; }
.end-card.ec-wide .pod-row { gap: 6px; }
.end-card.ec-wide .pod { padding: 8px 4px 0; }
.end-card.ec-wide .cq-end-head { font-size: 17px; flex-wrap: wrap; }
.end-card.ec-wide .cq-end-rows { flex-direction: column; gap: 2px; }
/* a short screen (a phone, a small window): the same card, compact */
.end-card.ec-tight { padding: 10px 14px; }
.end-card.ec-tight .ec-cols { gap: 10px; margin-bottom: 8px; }
.end-card.ec-tight .ec-col { gap: 8px; }
.end-card.ec-tight > p { margin-bottom: 6px; }
.end-card.ec-tight > h2 { font-size: 40px; line-height: 1; }
.end-card.ec-tight > p { font-size: 13px; line-height: 1.25; }
.end-card.ec-tight .pod-title { font-size: 15px; margin-bottom: 4px; }
.end-card.ec-tight .ec-col h4 { font-size: 15px; margin-bottom: 3px; }
.end-card.ec-tight .end-stats, .end-card.ec-tight .end-rewards, .end-card.ec-tight .end-kingdom { padding: 7px 10px; border-radius: 12px; }
.end-card.ec-tight .es-row { font-size: 12px; padding: 1px 0; }
.end-card.ec-tight .pod-medal { font-size: 26px; }
.end-card.ec-tight .pod-name { font-size: 14px; }
.end-card.ec-tight .pod-sub { font-size: 10px; }
.end-card.ec-tight .pod-score { font-size: 11px; }
.end-card.ec-tight .pod.p1 .pod-step { height: 30px; } .end-card.ec-tight .pod.p2 .pod-step { height: 18px; } .end-card.ec-tight .pod.p3 .pod-step { height: 9px; }
.end-card.ec-tight .pod-step { margin-top: 4px; }
.end-card.ec-tight .er-total { margin: 2px 0 4px; }
.end-card.ec-tight .er-total span { font-size: 24px; }
.end-card.ec-tight .er-total svg { width: 24px; height: 24px; }
.end-card.ec-tight .er-practice, .end-card.ec-tight .er-warn { font-size: 11.5px; padding: 6px 8px; }
.end-card.ec-tight .er-wallet { margin-top: 4px; font-size: 11px; }
.end-card.ec-tight .end-conquest { padding: 7px 10px; }
.end-card.ec-tight .cq-end-head { font-size: 15px; }
.end-card.ec-tight .cq-end-rows { font-size: 11.5px; margin-top: 4px; }
.end-card.ec-tight .cq-end-open { font-size: 12px; margin-top: 4px; }
.end-card.ec-tight .km-end { gap: 5px; }
.end-card.ec-tight .km-up { font-size: 18px; }
.end-card.ec-tight .km-gain { font-size: 18px; }
.end-card.ec-tight .km-parts { font-size: 11px; gap: 2px 8px; }
.end-card.ec-tight .km-end .km-list { display: none; }   /* the daily missions are in the menu */
.end-card.ec-tight .end-actions .btn-primary { font-size: 18px; padding: 8px 20px; min-width: 170px; }
.end-card.ec-tight .end-actions .btn-ghost { padding: 7px 14px; }
.end-card.ec-tight .pod-title { display: none; }
.end-card.ec-tight .pod-medal { font-size: 22px; }
.end-card.ec-tight .pod-name { font-size: 13px; }
.end-card.ec-tight .cq-end-head { font-size: 14px; line-height: 1.15; }
.end-card.ec-tight .cq-stars.big svg, .end-card.ec-tight .cq-stars.big i { width: 20px; height: 20px; }
.end-card.ec-tight .cq-end-rows { flex-direction: row; flex-wrap: wrap; gap: 1px 10px; }
.end-card.ec-tight .km-badge { width: 32px; height: 32px; font-size: 16px; }
.end-card.ec-tight .km-row { gap: 8px; }
.end-card.ec-tight .km-gifts { gap: 4px; }
.end-card.ec-tight .km-gift { padding: 3px 10px; font-size: 11.5px; }
.end-card.ec-tight .end-actions .btn-primary, .end-card.ec-tight .end-actions .btn-ghost { min-height: 44px; }
#endOverlay { padding: max(6px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
/* v1.3.3g the Royal Pass fits the screen whole on every screen (Pass.fit + SIO.fitBox): nothing is squeezed away any
   more (the level track used to be crushed to nothing on a short screen); a phone gets the compact card below, where
   the Free / Elite labels sit beside the levels and only the levels scroll (sideways) */
.ps-card { max-height: none; }
.ps-card > * { flex-shrink: 0; }
.ps-tw { display: contents; }
#psOverlay.h-pstight { padding: max(6px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.ps-card.ps-tight { width: 100%; max-width: 1120px; padding: 8px 12px 10px; gap: 6px; border-radius: 16px; }
.ps-tight .ps-top { gap: 10px; }
.ps-tight .ps-top > .ps-crown { width: 30px; height: 30px; }
.ps-tight .ps-title { min-width: 0; }
.ps-tight .ps-title h2 { font-size: 21px; line-height: 1.05; }
.ps-tight .ps-title small { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-tight .ps-level { min-width: 44px; }
.ps-tight .ps-level b { font-size: 24px; }
.ps-tight .ps-level span { font-size: 9px; }
.ps-tight .ps-xp { display: block; flex: none; width: min(200px, 24vw); }
.ps-tight .ps-xp i { height: 8px; }
.ps-tight .ps-xp small { font-size: 10px; white-space: nowrap; }
.ps-tight .ps-x { flex: none; width: 34px; height: 34px; }
.ps-tight .ps-elite { padding: 5px 6px 5px 12px; gap: 10px; border-radius: 10px; }
.ps-tight .ps-elite > div { min-width: 0; }
.ps-tight .ps-elite b { display: inline; font-size: 14px; margin-inline-end: 8px; }
.ps-tight .ps-elite span { font-size: 11px; line-height: 1.25; }
.ps-tight .ps-elite .ps-buy { flex: none; width: auto; padding: 7px 16px; font-size: 16px; }
.ps-tight .ps-elite.on { padding: 6px 10px; font-size: 12px; }
.ps-tight .ps-tw { display: flex; gap: 6px; align-items: flex-start; min-width: 0; }
.ps-tight .ps-rows { flex: none; flex-direction: column; gap: 4px; padding-top: 18px; width: 54px; }
.ps-tight .ps-rl { height: 58px; display: grid; place-items: center; text-align: center; border-radius: 10px; padding: 2px 4px; font-size: 11px; line-height: 1.15; overflow-wrap: anywhere; }
.ps-tight .ps-track { flex: 1; min-width: 0; gap: 5px; padding: 0 2px 6px; }
.ps-tight .ps-col { flex-basis: 70px; gap: 4px; }
.ps-tight .ps-lvl { font-size: 13px; line-height: 14px; }
.ps-tight .ps-cell { height: 58px; border-radius: 10px; }
.ps-tight .ps-cell canvas.ps-it { width: 42px; height: 42px; margin-top: -8px; }
.ps-tight .ps-gems, .ps-tight .ps-shards { font-size: 12px; }
.ps-tight .ps-gems .ps-gem { width: 14px; height: 14px; vertical-align: -3px; }
.ps-tight .ps-in { font-size: 8.5px; bottom: 2px; }
.ps-tight .ps-cell .ps-fr { font-size: 9px; max-width: 64px; }
.ps-tight .ps-tick { top: 2px; right: 4px; font-size: 11px; }
.ps-tight .ps-lock { bottom: 2px; right: 4px; font-size: 10px; }
.ps-tight .ps-foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 150px; gap: 8px; }
.ps-tight .ps-ms { min-width: 0; }
.ps-tight .ps-ms h4 { font-size: 12px; margin-bottom: 3px; }
.ps-tight .ps-m { grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; padding: 3px 7px; margin-bottom: 3px; font-size: 11px; line-height: 1.2; }
.ps-tight .ps-m i { display: none; }
.ps-tight .ps-side p { font-size: 10px; margin-top: 4px; line-height: 1.3; }
.ps-tight .ps-claim { font-size: 16px; padding: 8px 10px; }
html.dev-touch #psOverlay > .ps-card { max-height: none; overflow: hidden; }
.ps-lock { top: 4px; bottom: auto; }   /* the lock no longer sits on the reward's name */
.ps-tight .ps-lock { top: 2px; bottom: auto; }
/* v1.3.3g Multiplayer on a phone: the tabs stay at the top (with ✕), everything under them scrolls as one page —
   the banner, the LAN address and the room settings used to leave a slit of 40px for the content */
html.dev-phone #panelMulti { display: block; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-top: 0; }
html.dev-phone #panelMulti > .lp-head { position: sticky; top: 0; z-index: 5; height: 0; margin: 0; display: flex; align-items: flex-start; justify-content: flex-end; overflow: visible; pointer-events: none; }
html.dev-phone #panelMulti > .lp-head h2 { display: none; }
html.dev-phone #panelMulti > .lp-head .lp-close { pointer-events: auto; margin-top: 8px; width: 36px; height: 36px; }
html.dev-phone #panelMulti > .mp-tabs { position: sticky; top: 0; z-index: 4; margin: 0 -12px 8px; padding: 8px 56px 8px 12px; background: #0d1511; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
html.dev-phone #panelMulti > .mp-tabs button { flex-direction: row; text-align: start; gap: 6px; padding: 6px 8px; }
html.dev-phone #panelMulti > .mp-tabs button .mpt-ico { width: 24px; height: 24px; font-size: 13px; }
html.dev-phone #panelMulti > .mp-tabs button b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.dev-phone #panelMulti > .mp-tabs button small { display: none; }
html.dev-phone #panelMulti > .mp-banner { font-size: 11.5px; padding: 6px 10px; }
html.dev-phone #panelMulti > .lp-body { overflow: visible; min-height: 0; height: auto; padding-bottom: 8px; }
html.dev-phone #panelMulti > .lp-body.hidden { display: none; }
/* v1.3.3g phones & tablets draw no blur behind the menus: the cards are near-solid so nothing behind them shows through */
html.dev-touch .overlay > .glass, html.dev-touch .lobby-panel { background-color: rgba(13, 22, 17, 0.97); }
@media (orientation: portrait) { .ps-tight .ps-foot { grid-template-columns: minmax(0, 1fr); } .ps-tight .ps-xp { display: none; } .ps-tight .ps-elite { flex-wrap: wrap; justify-content: center; } }
/* v1.3.3g "Kingdom Level N!" pops in place (it borrowed the toast's keyframes, whose translateX(-50%) slid it half its width aside) */
@keyframes kmUpPop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: none; opacity: 1; } }
.km-up { animation-name: kmUpPop; }
/* v1.3.3g phones & tablets: while a pop-up is open in a match (pause, cards, market, settings, death, end …) the touch
   controls step aside and the HUD used to fall back to the computer layout behind it — now it steps aside too */
html.dev-touch body.h-ovl #hud { visibility: hidden; }
/* v1.3.3g phones & tablets: one recruit card per row in the building panel (normal width, normal scroll) — the two narrow
   columns grew wider than the panel and the second card of every row was cut off */
html.dev-touch .building-panel .train-grid { grid-template-columns: minmax(0, 1fr); }
html.dev-touch .building-panel .train-card { min-width: 0; grid-template-columns: 34px minmax(0, 1fr); }
html.dev-touch .building-panel .tc-name, html.dev-touch .building-panel .tc-cost { min-width: 0; overflow-wrap: anywhere; }
/* v1.3.3h phone building panel: beside the stacked menu buttons (Mobile.layoutControls), a slim head, comfortable rows */
html.dev-phone.touch-play .building-panel { padding: 8px 10px 10px; }
html.dev-phone.touch-play .building-panel #bpIcon { width: 34px; height: 34px; border-radius: 8px; }
html.dev-phone.touch-play .building-panel .bp-head { gap: 8px; }
html.dev-phone.touch-play .building-panel .bp-name { font-size: 16px; line-height: 1.1; }
html.dev-phone.touch-play .building-panel .bp-sub { font-size: 11px; line-height: 1.2; }
html.dev-phone.touch-play .building-panel .bp-hp { height: 12px; margin: 6px 0 4px; }
html.dev-phone.touch-play .building-panel .bp-actions { margin-top: 6px; gap: 6px; }
html.dev-phone.touch-play .building-panel .bp-btn { min-height: 38px; }
html.dev-phone.touch-play .building-panel .train-card { padding: 6px 8px; }
/* the action buttons: the label on one line, its cost / what it needs under it (full width, never 2 + 2 lines side by side) */
html.dev-phone.touch-play .building-panel .bp-btn:not(.bp-demolish) { flex-direction: column; align-items: stretch; justify-content: center; gap: 1px; padding: 5px 9px; }
html.dev-phone.touch-play .building-panel .bp-btn:not(.bp-demolish) > span:first-child { font-size: 12.5px; line-height: 1.2; }
html.dev-phone.touch-play .building-panel .bp-btn:not(.bp-demolish) .cost { font-size: 11px; line-height: 1.2; }
/* a recruit in one row: picture · name · cost (the cost goes under the name only when the name is long) */
html.dev-phone.touch-play .building-panel .train-card { display: flex; flex-wrap: wrap; align-items: center; column-gap: 7px; row-gap: 0; padding: 4px 8px; min-height: 38px; }
html.dev-phone.touch-play .building-panel .train-card canvas { width: 28px; height: 28px; flex: none; }
html.dev-phone.touch-play .building-panel .train-card .tc-name { flex: 1 1 60px; font-size: 12.5px; line-height: 1.15; }
html.dev-phone.touch-play .building-panel .train-card .tc-cost { flex: 0 1 auto; margin-inline-start: auto; font-size: 11px; line-height: 1.2; text-align: end; }
html.dev-phone.touch-play .building-panel .train-card { column-gap: 5px; padding: 4px 7px; }
html.dev-phone.touch-play .building-panel .train-card .tc-name { flex: 1 1 0; min-width: 52px; font-size: 12px; overflow-wrap: break-word; }
html.dev-phone.touch-play .building-panel .train-card .tc-cost .ci { margin-right: 4px; gap: 1px; }
html.dev-phone.touch-play .building-panel .train-card .tc-cost .ci:last-child { margin-right: 0; }
html.dev-phone.touch-play .building-panel .train-card .tc-cost span + span { margin-left: 0; }
html.dev-phone .hud .toasts .toast { max-width: 100%; box-sizing: border-box; text-align: center; white-space: normal; overflow-wrap: break-word; }
html.dev-phone.touch-play .building-panel { padding: 7px 9px 8px; }
html.dev-phone.touch-play .building-panel #bpIcon { width: 30px; height: 30px; }
html.dev-phone.touch-play .building-panel .bp-hp { height: 11px; margin: 5px 0 3px; }
html.dev-phone.touch-play .building-panel .bp-actions { margin-top: 5px; gap: 5px; }
html.dev-phone.touch-play .building-panel .train-grid { gap: 5px; }
html.dev-phone.touch-play .building-panel .bp-btn:not(.bp-demolish) { padding: 4px 9px; min-height: 36px; }
html.dev-phone.touch-play .building-panel .train-card { min-height: 36px; }
/* v1.3.3h phones & tablets: the logo and the wallet / account row share one line at every width (the narrow-screen
   column layout put the wallet under the logo, under the Kingdom card); the Kingdom card is placed by Mobile.layoutLobby */
html.dev-touch .lobby-top { flex-direction: row; }
html.dev-touch .lobby-brand { flex: none; }
html.dev-touch .lobby-right-top { min-width: 0; }
body.h-fullhint #lobby .lobby-foot { visibility: hidden; }   /* the version line never shows under the full-screen hint */
/* v1.3.3h Multiplayer on a phone: nothing floats — the tabs and ✕ are the top of the page and scroll away with it,
   the Start / Find buttons sit in their place at the end of the settings (they used to stick over the content) */
html.dev-phone #panelMulti { position: absolute; }
html.dev-phone #panelMulti > .lp-head { position: absolute; top: 8px; right: 10px; height: auto; z-index: 2; }
html.dev-phone #panelMulti > .lp-head .lp-close { margin-top: 0; }
html.dev-phone #panelMulti > .mp-tabs { position: static; margin: 0 0 8px; padding: 8px 46px 0 0; background: none; }
html.dev-phone #panelMulti .lp-right .btn-primary.big, html.dev-phone #panelMulti .on-ranked #btnFindRanked { position: static; box-shadow: none; }
/* v1.3.3h Cards & Levels: the level line sits in the player card, under the health — slim, out of the way */
.pc-lv { margin-top: 5px; min-width: 0; }
.pc-lv .mp-lv { gap: 6px; }
.pc-lv .mp-star { font-size: 12px; gap: 2px; }
.pc-lv .mp-star b { font-size: 13px; }
.pc-lv .mp-lv .mp-bar { min-width: 60px; height: 6px; }
.pc-lv .mp-xp { font-size: 10px; }
.pc-lv .mp-cards { margin-top: 4px; justify-content: flex-start; gap: 3px; }
.pc-lv .mp-card { width: 18px; height: 18px; border-radius: 5px; }
.pc-lv .mp-card svg { width: 13px; height: 13px; }
.pc-lv .mp-card i { font-size: 8px; right: -3px; bottom: -3px; }
html.dev-phone .pc-lv .mp-cards { display: none; }   /* a phone: the level line only (the cards picked show when chosen) */
/* the cards picked: small icons just to the right of the player card (nothing under it moves) */
.player-card { position: absolute; }
.pc-lv .mp-cards { position: absolute; left: calc(100% + 8px); top: 6px; margin: 0; width: max-content; max-width: 170px; flex-wrap: wrap; padding: 4px; border-radius: 9px; background: rgba(12, 20, 16, 0.55); }
.pc-lv .mp-cards:empty { display: none; }
/* v1.3.3h a tablet: the "No Town Center" / stealth badges stand above the weapon bar (they ran behind it) */
@media (min-height: 641px) { html.touch-play .notc-badge { bottom: 200px; } html.touch-play .stealth-badge { bottom: 236px; } }
@media (min-height: 641px) { html.touch-play body.h-notc .hud .toasts, html.touch-play body.h-stealth .hud .toasts { bottom: 276px; } }
/* v1.3.3i the chapter reward: a card of its own size (the Collect button used to stretch across the whole screen) */
.cn-reward.cn-reward-solo { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; padding: max(10px, env(safe-area-inset-top, 0px)) 12px max(10px, env(safe-area-inset-bottom, 0px)); background: radial-gradient(circle at 50% 45%, rgba(40, 30, 10, 0.7), rgba(0, 0, 0, 0.82)); animation: fadeIn .25s ease; }
.cn-reward.cn-reward-solo.out { opacity: 0; transition: opacity .25s ease; }
.cr-card { width: min(380px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 20px 18px; border-radius: 22px; text-align: center;
  background: linear-gradient(180deg, rgba(44, 34, 14, 0.98), rgba(20, 16, 8, 0.98)); border: 2px solid rgba(255, 210, 74, 0.55); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 210, 74, 0.18); animation: arrUp .35s ease-out both; }
.cr-head { font-weight: 900; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: #ffe08a; }
.cr-gems { display: flex; align-items: center; gap: 10px; }
.cn-reward-solo .cr-gems .cn-gem svg { width: 64px; height: 64px; filter: drop-shadow(0 0 16px rgba(127, 216, 255, 0.75)); animation: cnGem 1.4s ease-in-out infinite alternate; }
.cn-reward-solo .cr-gems b { font-family: var(--font-display, 'Lilita One', sans-serif); font-weight: 400; font-size: 52px; line-height: 1; color: #7fd8ff; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5); animation: arrSlam 0.6s cubic-bezier(.2, 1.6, .4, 1) both; }
.cn-reward-solo .cr-sub { font-weight: 900; font-size: 15px; color: #ffe08a; }
.cr-roads { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.cr-road { padding: 3px 10px; border-radius: 999px; background: rgba(255, 210, 74, 0.16); border: 1px solid rgba(255, 210, 74, 0.5); color: #ffe08a; font-weight: 900; font-size: 13px; }
.cr-items { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, 0.28); }
.cr-items > small { font-weight: 900; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #cbbcef; }
.cr-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cr-item .name-tag { font-size: 16px; font-weight: 900; }
.cr-item small { font-size: 12px; font-weight: 800; color: #e8edf2; }
.cn-reward-solo .cr-ok { width: auto; min-width: 160px; max-width: 100%; margin-top: 4px; padding: 10px 28px; font-size: 20px; }
.cr-fly { position: fixed; z-index: 1400; width: 28px; height: 28px; pointer-events: none; }
.cr-fly svg { width: 100%; height: 100%; filter: drop-shadow(0 0 8px rgba(127, 216, 255, 0.9)); }
.cr-hit { animation: crHit .45s ease; }
@keyframes crHit { 40% { transform: scale(1.18); filter: brightness(1.5); } }
.cn-reward-solo .cr-item .name-tag, .cn-reward-solo .cr-item .name-tag b { font-family: var(--font-body, sans-serif); font-size: 16px; font-weight: 900; line-height: 1.3; color: #fff; text-shadow: none; animation: none; }
.cn-reward-solo .cr-road { font-size: 13px; }
/* v1.3.3i name frames earned in play (Kingdom Level · story chapters · Royal Pass): metal plates with a numeral /
   season badge — a family of their own, never the shop's glowing frames */
.frame-bronze { border: 2px solid transparent; background: linear-gradient(rgba(52, 28, 12, 0.88), rgba(40, 22, 10, 0.88)) padding-box, linear-gradient(135deg, #ffd2a1, #a8642e 38%, #e8a76a 58%, #6e3a14) border-box; box-shadow: inset 0 1px 0 rgba(255, 214, 170, 0.28), 0 1px 3px rgba(0, 0, 0, 0.45); }
.frame-bronze b { color: #ffe2c4; }
.frame-legion, .frame-longship, .frame-pharaoh, .frame-steppe, .frame-shogun, .frame-legends, .frame-conqueror,
.frame-season, .frame-royal, .frame-sovereign { position: relative; padding-right: 1.75em !important; border-width: 2px; border-style: solid; }
.frame-legion::after, .frame-longship::after, .frame-pharaoh::after, .frame-steppe::after, .frame-shogun::after, .frame-legends::after, .frame-conqueror::after,
.frame-season::after, .frame-royal::after, .frame-sovereign::after {
  position: absolute; right: -0.35em; top: 50%; transform: translateY(-50%); box-sizing: border-box; min-width: 1.9em; height: 1.9em; padding: 0 0.32em; border-radius: 999px;
  display: grid; place-items: center; font: 900 0.62em/1 var(--font-body, sans-serif); letter-spacing: 0.02em; border: 1.5px solid rgba(20, 12, 4, 0.85); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.frame-legion { border-color: #e0b04a; background: linear-gradient(180deg, rgba(150, 26, 26, 0.7), rgba(70, 10, 10, 0.75)); box-shadow: inset 0 0 0 1px rgba(255, 220, 140, 0.25); }
.frame-legion::after { content: 'I'; background: linear-gradient(180deg, #ffe08a, #c99a2e); color: #5a0e0e; }
.frame-longship { border-color: #a9bccd; background: linear-gradient(180deg, rgba(110, 72, 36, 0.72), rgba(60, 38, 18, 0.78)); box-shadow: inset 0 0 0 1px rgba(30, 20, 10, 0.6); }
.frame-longship::after { content: 'II'; background: linear-gradient(180deg, #e4ecf3, #8fa3b6); color: #1f2c38; }
.frame-pharaoh { border-color: #e8b84a; background: linear-gradient(180deg, rgba(26, 62, 138, 0.75), rgba(14, 34, 80, 0.8)); box-shadow: inset 0 0 0 1px rgba(232, 184, 74, 0.35); }
.frame-pharaoh::after { content: 'III'; background: linear-gradient(180deg, #ffe08a, #d4951c); color: #13306e; }
.frame-steppe { border-color: #e8c66a; background: linear-gradient(180deg, rgba(40, 110, 66, 0.72), rgba(18, 60, 34, 0.8)); box-shadow: inset 0 0 0 1px rgba(232, 198, 106, 0.3); }
.frame-steppe::after { content: 'IV'; background: linear-gradient(180deg, #f3dc94, #b8913a); color: #173a22; }
.frame-shogun { border-color: #d63a3a; background: linear-gradient(180deg, rgba(24, 14, 14, 0.85), rgba(8, 4, 4, 0.9)); box-shadow: inset 0 0 0 1px rgba(242, 239, 230, 0.35); }
.frame-shogun::after { content: 'V'; background: linear-gradient(180deg, #e14848, #9c1c1c); color: #fff; }
.frame-legends { border-color: #ffd24a; background: linear-gradient(180deg, rgba(92, 52, 170, 0.75), rgba(44, 22, 90, 0.82)); box-shadow: inset 0 0 0 1px rgba(255, 210, 74, 0.3), 0 0 8px rgba(123, 79, 208, 0.45); }
.frame-legends::after { content: 'VI'; background: linear-gradient(180deg, #ffe08a, #b07cf0); color: #2a1450; }
.frame-conqueror { border-color: transparent; background: linear-gradient(rgba(70, 14, 14, 0.9), rgba(36, 8, 8, 0.92)) padding-box, linear-gradient(90deg, #8a5a10, #ffd24a, #fff6d0, #ffd24a, #c0392b, #ffd24a, #8a5a10) border-box; background-size: 100% 100%, 300% 100%; animation: mythicFrame 3.4s linear infinite; box-shadow: 0 0 12px rgba(255, 200, 70, 0.5); }
.frame-conqueror::after { content: '★'; font-size: 0.7em; background: radial-gradient(circle at 40% 35%, #fff6d0, #ffd24a 55%, #b8860b); color: #7a1414; box-shadow: 0 0 8px rgba(255, 210, 74, 0.85); }
/* the Royal Pass, season 1: S1 on every frame (free · Elite · Elite's crowning one) */
.frame-season { border-color: #b07cf0; background: linear-gradient(180deg, rgba(48, 22, 90, 0.85), rgba(26, 12, 52, 0.88)); box-shadow: inset 0 0 0 1px rgba(217, 184, 255, 0.25); animation: none; }
.frame-season::after { content: 'S1'; background: linear-gradient(180deg, #d9b8ff, #7b4fd0); color: #fff; }
.frame-royal { border-color: #ffd24a; background: linear-gradient(180deg, rgba(64, 22, 96, 0.9), rgba(34, 12, 56, 0.92)); background-size: auto; box-shadow: inset 0 0 0 1px rgba(176, 124, 240, 0.5), 0 0 8px rgba(255, 210, 74, 0.35); animation: none; }
.frame-royal::after { content: 'S1'; background: linear-gradient(180deg, #ffe08a, #d4951c); color: #3a1460; }
.frame-sovereign { position: relative; border-color: transparent; background: linear-gradient(rgba(40, 14, 60, 0.92), rgba(40, 14, 60, 0.92)) padding-box, linear-gradient(90deg, #8a2be2, #ffd24a, #fff3c2, #ffd24a, #8a2be2) border-box; background-size: 100% 100%, 260% 100%; animation: mythicFrame 2.2s linear infinite; box-shadow: 0 0 16px rgba(255, 210, 74, 0.6); }
.frame-sovereign::before { content: '♛'; position: absolute; left: 50%; top: -0.95em; transform: translateX(-50%); font-size: 0.8em; color: #ffd24a; text-shadow: 0 0 6px rgba(176, 124, 240, 0.9); }
.frame-sovereign::after { content: 'S1'; background: radial-gradient(circle at 40% 35%, #fff3c2, #ffd24a 55%, #8a2be2); color: #2a0e45; box-shadow: 0 0 8px rgba(255, 210, 74, 0.85); }
.frame-legion b, .frame-longship b, .frame-pharaoh b, .frame-steppe b, .frame-shogun b, .frame-legends b, .frame-conqueror b, .frame-season b, .frame-royal b, .frame-sovereign b { color: #fff; }
@media (prefers-reduced-motion: reduce) { .frame-conqueror, .frame-sovereign { animation: none; } }
/* v1.3.3i Legends of Conquest: the rewards in sight (each chapter's Gems + frame, the star road with its chests) and a
   light journey (a solid card — the frosted glass over a scrolling list was slow to repaint) */
.cq-card.glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: linear-gradient(180deg, rgba(22, 30, 24, 0.985), rgba(12, 18, 14, 0.99)); }
.cq-ch { grid-template-rows: auto auto 1fr; contain: layout paint; }
.cq-ch-art { grid-row: 1 / span 3; }
.cq-prize { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; font-size: 12px; font-weight: 900; }
.cq-prize-l { color: #ffe08a; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.cq-prize-g { display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px 2px 6px; border-radius: 999px; background: rgba(127, 216, 255, 0.14); border: 1px solid rgba(127, 216, 255, 0.45); color: #bfeaff; }
.cq-prize-g svg { width: 15px; height: 15px; }
.cq-prize-g b { font-size: 13px; }
.cq-prize-f { display: inline-flex; align-items: center; gap: 5px; color: #e8edf2; min-width: 0; }
.cq-prize-f .name-tag { font-size: 12px; max-width: 150px; }
.cq-prize-f .name-tag b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-prize.got { opacity: 0.6; }
.cq-prize-ok { color: #7ddc5f; font-size: 14px; }
.cq-ch.locked .cq-prize { opacity: 0.85; }
.cq-road { position: relative; margin: 2px 22px 30px; height: 40px; }
.cq-road-bar { position: absolute; left: 0; right: 0; top: 15px; height: 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 210, 74, 0.25); overflow: hidden; }
.cq-road-bar i { display: block; height: 100%; background: linear-gradient(90deg, #d4951c, #ffd24a); box-shadow: 0 0 10px rgba(255, 210, 74, 0.6); }
.cq-chest { position: absolute; top: 0; transform: translateX(-50%); width: 40px; height: 40px; padding: 4px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.18); background: rgba(20, 26, 22, 0.95); cursor: default; display: grid; place-items: center; }
.cq-chest svg { width: 26px; height: 26px; }
.cq-chest:not(.got):not(.ready) svg { filter: grayscale(0.8) brightness(0.7); }
.cq-chest.ready { cursor: pointer; border-color: #ffd24a; box-shadow: 0 0 14px rgba(255, 210, 74, 0.7); animation: cqChest 0.9s ease-in-out infinite alternate; }
.cq-chest.got { border-color: rgba(125, 220, 95, 0.6); }
.cq-chest-ok { color: #7ddc5f; font-weight: 900; font-size: 18px; }
@keyframes cqChest { to { transform: translateX(-50%) translateY(-3px) scale(1.06); } }
.cq-chest small { position: absolute; top: 42px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; white-space: nowrap; font-size: 10.5px; font-weight: 900; color: #cfd8d2; line-height: 1.15; pointer-events: none; }
.cq-chest small b { display: inline-flex; align-items: center; gap: 1px; color: #ffe08a; }
.cq-chest small b svg { width: 10px; height: 10px; fill: #ffd24a; }
.cq-chest small span { display: inline-flex; align-items: center; gap: 2px; color: #bfeaff; }
.cq-chest small span svg { width: 10px; height: 10px; }
.cq-chest .cq-mini-frame { font-size: 9px; padding: 0 1.6em 0 4px !important; }
.cq-chest:last-of-type small { left: auto; right: -6px; transform: none; align-items: flex-end; }
@media (prefers-reduced-motion: reduce) { .cq-chest.ready { animation: none; } }
@media (max-width: 860px), (max-height: 560px) { .cq-road { margin: 0 20px 26px; } .cq-prize-f .name-tag { max-width: 110px; } }
.sh-card > .lk-newtag { position: absolute; z-index: 2; }   /* v1.3.3i the NEW tag stays in the corner on epic cards too */
/* a locked chapter in grey without a CSS filter (its picture is painted grey once); chapters off the screen skip rendering */
.cq-ch.locked { filter: none; --a: #4a4f4c !important; --b: #8d948f !important; }
.cq-ch.locked > :not(.cq-ch-art) { opacity: 0.62; }
.cq-ch { content-visibility: auto; contain-intrinsic-size: auto 210px; }
/* v1.3.3i Pass cells: a frame shows whole (its S1 badge too); two items side by side */
.ps-its { display: flex; align-items: center; justify-content: center; gap: 2px; max-width: 100%; }
.ps-its:empty { display: none; }
.ps-its.two { flex-direction: column; gap: 0; }
.ps-its.two canvas.ps-it { width: 52px; height: 52px; margin-top: -14px; }
.ps-cell .ps-fr { overflow: visible; max-width: none; font-size: 10px; padding: 1px 1.7em 1px 6px !important; margin-top: -10px; }
.ps-cell .ps-fr b { display: block; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.ps-its.two .ps-fr { margin-top: -4px; font-size: 9px; }
.ps-tight .ps-its.two canvas.ps-it { width: 34px; height: 34px; margin-top: -10px; }
.ps-tight .ps-cell .ps-fr { margin-top: -8px; }
.ps-tight .ps-cell .ps-fr b { max-width: 40px; font-size: 9px; }
.cn-reward-solo .cr-gems b, .cq-prize-g b, .cq-chest small > b, .cq-chest small > span { direction: ltr; unicode-bidi: isolate; }
/* the star road follows the reading direction (Arabic, Persian, Urdu: right to left) */
.cq-chest { transform: none; margin-inline-start: -20px; }
@keyframes cqChest { to { transform: translateY(-3px) scale(1.06); } }
.cq-chest small { left: auto; right: auto; inset-inline-start: 50%; transform: translateX(-50%); }
html[dir="rtl"] .cq-chest small { transform: translateX(50%); }
.cq-chest:last-of-type small { left: auto; right: auto; inset-inline-start: auto; inset-inline-end: -6px; transform: none; }
html[dir="rtl"] .cq-chest:last-of-type small { transform: none; }

/* v1.3.4 admin Stats tab */
.st-bar { margin-bottom: 8px; }
.st-r { padding: 6px 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.25); color: var(--text); font-weight: 800; cursor: pointer; }
.st-r.on { border-color: #e5484d; background: rgba(229,72,77,0.22); }
.adm-tile i { font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--text-dim); margin-top: 2px; }
.adm-tile.st-good { border-color: rgba(70, 200, 110, 0.55); background: rgba(40, 120, 60, 0.22); }
.adm-tile.st-good b { color: #8ff0a8; }
.adm-tile.st-mid { border-color: rgba(255, 200, 80, 0.5); background: rgba(140, 100, 20, 0.2); }
.adm-tile.st-mid b { color: #ffd56b; }
.adm-tile.st-bad { border-color: rgba(229, 72, 77, 0.55); background: rgba(140, 30, 34, 0.22); }
.adm-tile.st-bad b { color: #ff9b9e; }
.st-scroll { overflow-x: auto; }
.st-days { min-width: 620px; font-variant-numeric: tabular-nums; }
.st-days td, .st-days th { text-align: right; white-space: nowrap; }
.st-days td:first-child, .st-days th:first-child { text-align: left; }
.st-days small { color: var(--text-dim); margin-left: 2px; }
.st-bars { display: flex; flex-direction: column; gap: 5px; }
.st-b { display: grid; grid-template-columns: minmax(110px, 190px) 1fr minmax(64px, auto); align-items: center; gap: 8px; font-size: 13px; }
.st-b em { font-style: normal; font-weight: 700; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-b span { height: 14px; border-radius: 7px; background: rgba(255,255,255,0.07); overflow: hidden; }
.st-b span i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, #e5484d, #ffb347); }
.st-b b { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.st-b b small { color: var(--text-dim); font-weight: 700; margin-left: 3px; }

/* v1.4.1 the Guide (a beginner's first real matches): the Academy's goal chip, plus a green ✓ flash per step */
.gd-goal.gd-ok::after { content: '✓'; position: absolute; inset-inline-end: -10px; top: -12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: #2fbf4a; color: #fff; font: 900 18px/1 var(--font-body, sans-serif); border: 2px solid #0d2a12; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4); animation: gdOk 0.9s ease-out both; pointer-events: none; }
@keyframes gdOk { 0% { transform: scale(0.2); opacity: 0; } 25% { transform: scale(1.25); opacity: 1; } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
/* v1.4.2 the Guide's coach (after the chain): no step counter, it hides when there is nothing to do */
.gd-goal.gd-coach .tg-step, .gd-goal.gd-coach .tut-bar { display: none; }
.gd-goal.gd-idle { opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.k-pow { display: none; } /* (v1.4.2 the new UI's power bar) */

/* v1.4.3 wins toward the Victory Chest (3 wins = a chest) and the first-victory celebration */
.km-wins { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 2px; }
.km-win { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, 0.35); border: 2px solid rgba(0, 0, 0, 0.5); filter: grayscale(1) brightness(.6); }
.km-win svg { width: 20px; height: 20px; }
.km-win.on { filter: none; background: rgba(255, 210, 74, 0.18); border-color: #ffd24a; }
.km-win.new { animation: kmWinNew .7s cubic-bezier(.2, 1.6, .4, 1) 1.1s backwards; }
@keyframes kmWinNew { from { transform: scale(2.2); opacity: 0; } to { transform: none; opacity: 1; } }
.km-wto { font-weight: 900; color: var(--text-dim); }
.km-vchest { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 3px solid #1d1a17; background: rgba(0, 0, 0, 0.35); filter: grayscale(1) brightness(.65); cursor: default; padding: 0; }
.km-vchest .uic { width: 32px; height: 32px; }
.km-vchest b { position: absolute; right: -6px; top: -8px; font-size: 12px; background: #e5484d; color: #fff; border-radius: 99px; padding: 0 5px; }
.km-vchest.ready { filter: none; cursor: pointer; background: radial-gradient(circle, rgba(255, 220, 120, 0.55), rgba(255, 160, 40, 0.25)); box-shadow: 0 0 18px rgba(255, 210, 74, 0.8); animation: kmVReady 1s ease-in-out infinite; }
@keyframes kmVReady { 0%, 100% { transform: scale(1) rotate(0); } 25% { transform: scale(1.1) rotate(-6deg); } 75% { transform: scale(1.1) rotate(6deg); } }
.km-first .km-chest-big { z-index: 2; position: relative; gap: 6px; }
.km-first .km-chest-box { margin-top: 44px; }
.km-first-crown { width: 120px; height: 120px; animation: kmCrown 1s cubic-bezier(.2, 1.5, .4, 1) both; filter: drop-shadow(0 0 30px rgba(255, 210, 74, 0.9)); }
.km-first-crown svg { width: 100%; height: 100%; }
@keyframes kmCrown { from { transform: translateY(-120px) scale(.3) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.km-first-t { font-family: var(--font-display); font-weight: 400; font-size: 58px; line-height: 1; color: #ffd24a; -webkit-text-stroke: 2px #2a1a06; text-shadow: 0 6px 0 #2a1a06; animation: kmFirstT .7s cubic-bezier(.2, 1.6, .4, 1) .35s both; text-align: center; }
@keyframes kmFirstT { from { transform: scale(2.4); opacity: 0; } to { transform: none; opacity: 1; } }
.km-first { overflow: hidden; }
.km-first::before { content: ''; position: absolute; inset: -50%; background: repeating-conic-gradient(from 0deg, rgba(255, 210, 74, 0.09) 0 10deg, transparent 10deg 20deg); animation: kmRays 12s linear infinite; pointer-events: none; }
@keyframes kmRays { to { transform: rotate(360deg); } }
.km-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.km-confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: kmConf 2.6s linear infinite; }
.km-confetti i:nth-child(4n) { background: #ffd24a; } .km-confetti i:nth-child(4n+1) { background: #4da3ff; } .km-confetti i:nth-child(4n+2) { background: #7ee05a; } .km-confetti i:nth-child(4n+3) { background: #ff6b6b; }
.km-confetti i:nth-child(1) { left: 3%; animation-delay: 0s; } .km-confetti i:nth-child(2) { left: 7%; animation-delay: 1.1s; } .km-confetti i:nth-child(3) { left: 11%; animation-delay: .4s; } .km-confetti i:nth-child(4) { left: 15%; animation-delay: 1.7s; }
.km-confetti i:nth-child(5) { left: 19%; animation-delay: .8s; } .km-confetti i:nth-child(6) { left: 23%; animation-delay: 2.1s; } .km-confetti i:nth-child(7) { left: 27%; animation-delay: .2s; } .km-confetti i:nth-child(8) { left: 31%; animation-delay: 1.4s; }
.km-confetti i:nth-child(9) { left: 35%; animation-delay: .6s; } .km-confetti i:nth-child(10) { left: 39%; animation-delay: 1.9s; } .km-confetti i:nth-child(11) { left: 43%; animation-delay: 1s; } .km-confetti i:nth-child(12) { left: 47%; animation-delay: .3s; }
.km-confetti i:nth-child(13) { left: 51%; animation-delay: 1.6s; } .km-confetti i:nth-child(14) { left: 55%; animation-delay: .7s; } .km-confetti i:nth-child(15) { left: 59%; animation-delay: 2.3s; } .km-confetti i:nth-child(16) { left: 63%; animation-delay: .1s; }
.km-confetti i:nth-child(17) { left: 67%; animation-delay: 1.3s; } .km-confetti i:nth-child(18) { left: 71%; animation-delay: .5s; } .km-confetti i:nth-child(19) { left: 75%; animation-delay: 1.8s; } .km-confetti i:nth-child(20) { left: 79%; animation-delay: .9s; }
.km-confetti i:nth-child(21) { left: 83%; animation-delay: 2s; } .km-confetti i:nth-child(22) { left: 87%; animation-delay: .35s; } .km-confetti i:nth-child(23) { left: 91%; animation-delay: 1.2s; } .km-confetti i:nth-child(24) { left: 95%; animation-delay: .75s; }
@keyframes kmConf { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(110vh) rotate(720deg); opacity: .7; } }

@media (max-height: 560px) {
  .km-first .km-chest-big { gap: 2px; }
  .km-first-crown { width: 54px; height: 54px; }
  .km-first-t { font-size: 34px; -webkit-text-stroke-width: 1.5px; text-shadow: 0 4px 0 #2a1a06; }
  .km-first .km-chest-box { margin: 18px 0 -22px; transform: scale(.62); }
  .km-chest-ov .km-chest-xp { font-size: 32px; }
  .km-chest-ov .btn-primary { padding: 8px 40px; }
}
.km-first.open .lid { transform: rotate(-24deg) translate(-8px, -8px); }

/* =====================================================================
 * v1.5.2 RewardFx — the reward moment (RewardFx.js)
 * ===================================================================== */
#rfxLayer { position: fixed; inset: 0; z-index: 9800; pointer-events: none; overflow: hidden; }
.rfx-fly { position: absolute; left: 0; top: 0; display: grid; place-items: center; pointer-events: none; will-change: transform, opacity; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.45)); }
.rfx-fly > svg, .rfx-fly .uic { width: 100%; height: 100%; }
.rfx-fly.gem::after { content: ''; position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(circle, rgba(140, 230, 255, 0.55), rgba(140, 230, 255, 0) 65%); z-index: -1; }
.rfx-fly.xp::after { content: ''; position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(circle, rgba(160, 250, 255, 0.5), rgba(160, 250, 255, 0) 65%); z-index: -1; }
.rfx-fly.item { background: linear-gradient(180deg, #ffe36a, #f0a51e); border: 3px solid #1d1a17; border-radius: 10px; padding: 3px; }
.rfx-ring { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 4px solid rgba(140, 230, 255, 0.9); animation: rfxRing 0.6s ease-out forwards; }
.rfx-ring.small { border-width: 3px; animation-duration: 0.45s; }
.rfx-ring.xp { border-color: rgba(150, 250, 255, 0.9); }
.rfx-ring.lvl { border-color: #ffd84a; border-width: 6px; animation-duration: 0.8s; }
.rfx-ring.tier-rare { border-color: #4da3ff; } .rfx-ring.tier-epic { border-color: #b07cf0; border-width: 6px; } .rfx-ring.tier-legendary { border-color: #ffd24a; border-width: 8px; animation-duration: 0.9s; }
@keyframes rfxRing { from { transform: scale(0.4); opacity: 1; } to { transform: scale(7); opacity: 0; } }
.rfx-bump { animation: rfxBump 0.22s ease-out; }
@keyframes rfxBump { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
.rfx-float { position: absolute; transform: translate(-50%, -50%); font: 400 30px var(--font-display); color: #ffe36a; -webkit-text-stroke: 5px #1d1a17; paint-order: stroke fill; white-space: nowrap; animation: rfxFloat 1.3s ease-out forwards; }
@keyframes rfxFloat { 0% { opacity: 0; transform: translate(-50%, -20%) scale(0.6); } 18% { opacity: 1; transform: translate(-50%, -80%) scale(1.15); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
.rfx-lvup { animation: rfxLv 0.6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes rfxLv { 0% { transform: scale(1); } 35% { transform: scale(1.7); filter: brightness(1.5); } 100% { transform: scale(1); } }

/* the small wallet that slides in when none is on the screen */
.rfx-wallet { position: fixed; top: max(14px, env(safe-area-inset-top, 0px)); right: 14px; z-index: 9750; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px 0 10px;
  border: 3px solid #1d1a17; border-radius: 18px; background: linear-gradient(180deg, #343a4a, #232836); box-shadow: 0 5px 0 #1d1a17; color: #fff8e6;
  font: 400 26px var(--font-display); text-shadow: 0 2px 0 #000; pointer-events: none; transform: translateY(-140%); transition: transform .28s cubic-bezier(.2, 1.4, .4, 1); }
.rfx-wallet.on { transform: none; }
.rfx-wallet .uic { width: 34px; height: 34px; }

/* the "You got" screen */
.rfx-ov { position: fixed; inset: 0; z-index: 9700; display: grid; place-items: center; padding: 16px; overflow: hidden; cursor: pointer;
  background: radial-gradient(ellipse at 50% 45%, rgba(40, 46, 70, 0.92), rgba(6, 8, 14, 0.96) 70%); opacity: 0; transition: opacity .25s ease; --tc: 255, 216, 74; }
.rfx-ov.tier-common { --tc: 200, 214, 226; } .rfx-ov.tier-rare { --tc: 77, 163, 255; } .rfx-ov.tier-epic { --tc: 176, 124, 240; } .rfx-ov.tier-legendary { --tc: 255, 210, 74; }
.rfx-ov.on { opacity: 1; }
.rfx-ov.out { opacity: 0; transition-duration: .22s; }
.rfx-rays { position: absolute; left: 50%; top: 46%; width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax; pointer-events: none; opacity: .55;
  background: repeating-conic-gradient(from 0deg, rgba(var(--tc), 0.22) 0deg 7deg, rgba(var(--tc), 0) 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .6) 25%, transparent 55%); mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .6) 25%, transparent 55%);
  animation: rfxSpin 24s linear infinite; }
@keyframes rfxSpin { to { transform: rotate(360deg); } }
.rfx-sparks { position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image: radial-gradient(2px 2px at 20% 30%, #fff, transparent), radial-gradient(2px 2px at 70% 20%, #fff, transparent), radial-gradient(3px 3px at 82% 64%, rgba(var(--tc), 1), transparent), radial-gradient(2px 2px at 33% 76%, #fff, transparent), radial-gradient(3px 3px at 12% 58%, rgba(var(--tc), 1), transparent), radial-gradient(2px 2px at 58% 84%, #fff, transparent);
  animation: rfxTw 2.4s ease-in-out infinite alternate; }
@keyframes rfxTw { from { opacity: .35; } to { opacity: .9; } }
.rfx-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: min(1100px, 100%); text-align: center; }
.rfx-title { margin: 0; font: 400 clamp(40px, 6.4vh, 64px) var(--font-display); color: #fff8e6; letter-spacing: .02em; -webkit-text-stroke: 8px #1d1a17; paint-order: stroke fill;
  text-shadow: 0 6px 0 #1d1a17, 0 0 40px rgba(var(--tc), 0.55); transform: translateY(-40px) scale(.6); opacity: 0; transition: transform .45s cubic-bezier(.2, 1.6, .4, 1), opacity .2s; }
.rfx-ov.on .rfx-title { transform: none; opacity: 1; }
.rfx-sub { margin: -6px 0 0; font: 800 18px Nunito, system-ui, sans-serif; color: #dfe6ef; text-shadow: 0 2px 0 #000; }
.rfx-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; padding: 6px 4px; }
.rfx-card { position: relative; width: 158px; min-height: 206px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 12px 10px 12px; overflow: hidden;
  border: 4px solid #1d1a17; border-radius: 20px; background: linear-gradient(180deg, rgba(var(--c), 0.42), rgba(18, 22, 32, 0.96) 62%); box-shadow: 0 6px 0 #1d1a17, inset 0 0 0 2px rgba(var(--c), 0.65);
  --c: 200, 214, 226; opacity: 0; transform: translateY(26px) scale(.35) rotate(-6deg); }
.rfx-card.tier-rare { --c: 77, 163, 255; } .rfx-card.tier-epic { --c: 176, 124, 240; } .rfx-card.tier-legendary { --c: 255, 210, 74; }
.rfx-card.in { opacity: 1; transform: none; transition: transform .5s cubic-bezier(.2, 1.7, .4, 1), opacity .15s; }
.rfx-card.in.fast { transition-duration: .2s; }
.rfx-cards.one .rfx-card { width: 220px; min-height: 270px; }
.rfx-glow { position: absolute; left: 50%; top: 40%; width: 180px; height: 180px; margin: -90px 0 0 -90px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--c), 0.55), rgba(var(--c), 0) 68%); pointer-events: none; }
.rfx-card.tier-legendary .rfx-glow, .rfx-card.tier-epic .rfx-glow { animation: rfxPulse 1.6s ease-in-out infinite; }
@keyframes rfxPulse { 50% { transform: scale(1.18); opacity: .75; } }
.rfx-art { position: relative; width: 112px; height: 112px; display: grid; place-items: center; }
.rfx-cards.one .rfx-art { width: 160px; height: 160px; }
.rfx-art canvas { width: 100%; height: 100%; }
.rfx-art .uic, .rfx-art > svg { width: 78%; height: 78%; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35)); }
.rfx-frame { font-size: 15px; }
.rfx-name { position: relative; font: 400 22px var(--font-display); color: #fff8e6; -webkit-text-stroke: 5px #1d1a17; paint-order: stroke fill; line-height: 1.05; max-width: 100%; overflow-wrap: anywhere; }
.rfx-card.k-gems .rfx-name, .rfx-card.k-shards .rfx-name, .rfx-card.k-xp .rfx-name { font-size: 34px; }
.rfx-tier { position: relative; font: 900 13px Nunito, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--c)); text-shadow: 0 1px 0 #000; }
.rfx-new { position: absolute; top: 8px; right: -26px; transform: rotate(35deg); width: 96px; padding: 2px 0; background: linear-gradient(180deg, #ff7564, #d43a2e); border-top: 2px solid #1d1a17; border-bottom: 2px solid #1d1a17;
  font: 400 13px var(--font-display); color: #fff; font-style: normal; letter-spacing: .06em; }
.rfx-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-120%); }
.rfx-card.in .rfx-shine { animation: rfxShine .9s .25s ease-out; }
@keyframes rfxShine { to { transform: translateX(120%); } }
.rfx-btns { display: flex; gap: 14px; justify-content: center; opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; pointer-events: none; }
.rfx-ov.ready .rfx-btns { opacity: 1; transform: none; pointer-events: auto; }
.rfx-btn { min-width: 190px; padding: 10px 30px; border: 4px solid #1d1a17; border-radius: 18px; cursor: pointer; font: 400 28px var(--font-display); color: #4a2a00;
  background: linear-gradient(180deg, #ffd84a, #f39a1b); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #1d1a17; text-shadow: none; }
.rfx-btn:hover { filter: brightness(1.08); } .rfx-btn:active { transform: translateY(3px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 3px 0 #1d1a17; }
.rfx-btn.rfx-eq { color: #fff; text-shadow: 0 2px 0 #1d1a17; background: linear-gradient(180deg, #8ee04f, #3fa92a); }
.rfx-hint { font: 800 14px Nunito, system-ui, sans-serif; color: rgba(255, 255, 255, .55); transition: opacity .2s; }
.rfx-ov.ready .rfx-hint { opacity: 0; }
@media (max-height: 560px) { .rfx-card { width: 128px; min-height: 168px; } .rfx-art { width: 84px; height: 84px; } .rfx-cards.one .rfx-card { width: 180px; min-height: 220px; } .rfx-cards.one .rfx-art { width: 120px; height: 120px; } .rfx-btn { font-size: 22px; min-width: 150px; } }

/* a shop card that was just bought */
.sh-card.rfx-bought { position: relative; }
.sh-card.rfx-bought > *:not(.rfx-stamp) { filter: saturate(.5) brightness(.75); transition: filter .3s; }
.rfx-stamp { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; }
.rfx-stamp span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border: 4px solid #1d1a17; border-radius: 14px; background: linear-gradient(180deg, #8ee04f, #3fa92a);
  font: 400 24px var(--font-display); color: #fff; text-shadow: 0 2px 0 #1d1a17; box-shadow: 0 5px 0 #1d1a17; transform: rotate(-10deg); animation: rfxStamp .42s cubic-bezier(.2, 1.4, .4, 1) both; }
.rfx-stamp svg { width: 24px; height: 24px; color: #fff; filter: drop-shadow(0 2px 0 #1d1a17); }
@keyframes rfxStamp { 0% { transform: rotate(-10deg) scale(2.6); opacity: 0; } 60% { transform: rotate(-10deg) scale(.92); opacity: 1; } 100% { transform: rotate(-10deg) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rfx-rays, .rfx-sparks, .rfx-glow { animation: none !important; } }

/* v1.5.7 a lost battle: how close it was (the player's score against the winner's) */
.end-close { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px auto 8px; max-width: 420px; width: 100%; }
.end-close > b { font-family: var(--font-display, inherit); font-weight: 400; font-size: 20px; color: #ffd24a; text-shadow: 0 2px 0 #1d1a17; white-space: nowrap; }
.end-close .ec-bar { position: relative; flex: 1; min-width: 80px; height: 14px; border: 3px solid #1d1a17; border-radius: 99px; background: #11141b; overflow: hidden; }
.end-close .ec-bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(180deg, #ffe36a, #f0a51e); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4); animation: ecFill 1.1s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
.end-close .ec-goal .uic, .end-close .ec-goal svg { width: 26px; height: 26px; display: block; }
.end-close small { font-weight: 900; font-size: 13px; color: #fff; min-width: 34px; }
.end-close.hidden { display: none; }
@keyframes ecFill { from { transform: scaleX(0); } to { transform: none; } }
[dir="rtl"] .end-close .ec-bar > i { transform-origin: right; }
/* v1.5.7 a run of victories: a flame and its length */
.km-fire { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 2px 10px 2px 6px; border-radius: 99px; background: linear-gradient(180deg, #ff8a3c, #d6451b); border: 2px solid #1d1a17; animation: kmFire 1.2s ease-in-out infinite; }
.km-fire .uic, .km-fire svg { width: 22px; height: 22px; }
.km-fire b { font-family: var(--font-display, inherit); font-weight: 400; font-size: 18px; color: #fff; text-shadow: 0 1px 0 #1d1a17; }
@keyframes kmFire { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.km-toast.km-pt small { color: #ffd24a; }
@media (prefers-reduced-motion: reduce) { .km-fire, .end-close .ec-bar > i { animation: none; } }

/* ===== v1.5.9 io Deathmatch HUD: one score list (tap the title for the full ranking) · the kill feed ===== */
.mp-tog { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; margin: 0 0 3px; border: 0; background: none; color: inherit; cursor: pointer; text-align: start; pointer-events: auto; }
.mp-tog .uic { width: 20px; height: 20px; flex: none; }
.mp-tog span { flex: 1; min-width: 0; }
.mp-tog .mp-chev { font-style: normal; font-size: 14px; opacity: .75; }
.mp-tog:hover .mp-chev { opacity: 1; }
.mp-dm .rk .uic { width: 15px; height: 15px; display: block; }
.mp-dm.lead b { color: #ffd24a; }
.mp-dm.mp-cl { margin-top: 3px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 3px; }
.mp-cf { display: block; width: 9px; height: 12px; background: var(--cc, #f2c14e); clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%); }
.kill-feed { position: absolute; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; pointer-events: none !important; max-width: 340px; }
.kf-row { display: flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 9px; background: rgba(12, 14, 18, .42); font: 800 13px var(--font-body); color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; animation: kfIn .25s ease-out; transition: opacity .45s, transform .45s; }
.kf-row.mine { background: rgba(255, 196, 64, .28); }
.kf-row.out { opacity: 0; transform: translateX(14px); }
.kf-n { display: inline-flex; align-items: center; gap: 4px; max-width: 128px; overflow: hidden; text-overflow: ellipsis; }
.kf-n.me { color: #ffe066; }
.kf-n .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .6); }
.kf-ic .uic, .kf-b .uic { width: 16px; height: 16px; display: block; }
@keyframes kfIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
html.touch-play .kill-feed { max-width: 240px; }
html.touch-play .kf-row { font-size: 11px; padding: 1px 6px; }

/* v1.7.0 no CSS zoom (Firefox before 126, e.g. Firefox 115 on Windows 7/8): the same boxes are scaled instead, so the
   HUD, the end card and the card choice keep their size and fit the window (their buttons stay on screen) */
html.no-zoom .hud { scale: var(--zf, 1); transform-origin: 0 0; right: auto; bottom: auto; width: calc(100vw / (var(--zf, 1))); height: calc(100vh / (var(--zf, 1))); }
html.no-zoom .elim-banner { scale: var(--zf, 1); transform-origin: 50% 0; }
html.no-zoom .end-card, html.no-zoom .card-wrap, html.no-zoom [style*="--zf"] { scale: var(--zf, 1); }
html.no-zoom .km-card, html.no-zoom.ui-new.ui-compact:not(.no-compact).touch-play .tut-goal .tg-main small { scale: var(--zf, 1); transform-origin: 0 0; }
html.no-zoom .lobby-right-top, html.no-zoom .right-col { scale: var(--zf, 1); transform-origin: 100% 0; }

/* v1.7.0 the win streak: flames toward 3 wins (40 Gems), then toward 5 (100 Gems) — end screen + above the lobby chest */
.km-gs { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 4px 0 2px; }
.km-gsp { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, 0.35); border: 2px solid rgba(0, 0, 0, 0.55); filter: grayscale(1) brightness(.55); }
.km-gsp .uic { width: 18px; height: 18px; }
.km-gsp.on { filter: none; background: radial-gradient(circle at 50% 60%, rgba(255, 150, 40, 0.45), rgba(255, 90, 30, 0.12)); border-color: #ff9a3c; box-shadow: 0 0 10px rgba(255, 130, 40, 0.55); }
.km-gsp.new { animation: kmWinNew .7s cubic-bezier(.2, 1.6, .4, 1) 1.1s backwards; }
.km-gsg { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: 4px; padding: 2px 9px 2px 5px; border-radius: 999px; background: linear-gradient(180deg, #1b4a6b, #0f2c44); border: 2px solid #1d1a17; color: #bff0ff; font: 900 15px/1 var(--font-head, 'Lilita One', sans-serif); letter-spacing: .02em; }
.km-gsg .uic { width: 20px; height: 20px; }
.km-gs.paid .km-gsg { background: linear-gradient(180deg, #4fd2ff, #1f8fd0); color: #fff; animation: kmGsPaid 1s ease-in-out 1.3s 3 alternate; box-shadow: 0 0 16px rgba(79, 210, 255, 0.8); }
.km-gs.lost .km-gsp { animation: kmGsLost .5s ease-in-out .9s 1; }
.km-gs.done { gap: 6px; color: #cfe3ff; font: 800 13px/1 var(--font-body, sans-serif); opacity: .8; }
.km-gs.done .uic { width: 18px; height: 18px; }
@keyframes kmGsPaid { to { transform: scale(1.15); } }
@keyframes kmGsLost { 30% { translate: -4px 0; } 70% { translate: 4px 0; } }

/* FRAMES17-BEGIN — generated by tools170/frames.py (do not edit by hand) */
/* v1.7.0 every name frame has its own shape: end caps drawn for it (leaves, shields, spearheads, wings, gems, crystals, keys,
   candy canes, holly…) and a crest on the top ones — not just another colour. One ::before carries them; the name stays clear. */
@keyframes frShine { 0%, 55% { background-position: 120% 0, 0 0, 0 0; } 100% { background-position: -120% 0, 0 0, 0 0; } }
@keyframes frBlink { 50% { filter: brightness(1.25) saturate(1.2); } }
.name-frame.frame-oak { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid #c08a52; background: repeating-linear-gradient(90deg, rgba(0,0,0,0.13) 0 2px, transparent 2px 9px), linear-gradient(180deg, #8a5a2e, #5a3418); box-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.name-frame.frame-oak::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='l' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%239bd15a'/%3E%3Cstop offset='1' stop-color='%234f8a2a'/%3E%3C/linearGradient%3E%3ClinearGradient id='a' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23c98a4a'/%3E%3Cstop offset='1' stop-color='%237a4a1e'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M22 20 C14 10 6 9 2 12 C5 14 7 17 9 20 C7 23 5 26 2 28 C6 31 14 30 22 20Z' fill='url(%23l)' stroke='%231d1a17' stroke-width='1.6'/%3E%3Cpath d='M22 20 L6 20' stroke='%231d1a17' stroke-width='1' opacity='.6'/%3E%3Cellipse cx='9' cy='9' rx='3.6' ry='4.4' fill='url(%23a)' stroke='%231d1a17' stroke-width='1.4'/%3E%3Cpath d='M5.2 7.4 Q9 3.6 12.8 7.4Z' fill='%235a3418' stroke='%231d1a17' stroke-width='1.2'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='l' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%239bd15a'/%3E%3Cstop offset='1' stop-color='%234f8a2a'/%3E%3C/linearGradient%3E%3ClinearGradient id='a' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23c98a4a'/%3E%3Cstop offset='1' stop-color='%237a4a1e'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M22 20 C14 10 6 9 2 12 C5 14 7 17 9 20 C7 23 5 26 2 28 C6 31 14 30 22 20Z' fill='url(%23l)' stroke='%231d1a17' stroke-width='1.6'/%3E%3Cpath d='M22 20 L6 20' stroke='%231d1a17' stroke-width='1' opacity='.6'/%3E%3Cellipse cx='9' cy='9' rx='3.6' ry='4.4' fill='url(%23a)' stroke='%231d1a17' stroke-width='1.4'/%3E%3Cpath d='M5.2 7.4 Q9 3.6 12.8 7.4Z' fill='%235a3418' stroke='%231d1a17' stroke-width='1.2'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-oak b { position: relative; z-index: 2; color: #fff1dc; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-bronze { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid transparent; background: linear-gradient(180deg, #5a3416, #33190a) padding-box, linear-gradient(135deg, #ffd2a1, #a8642e 38%, #e8a76a 58%, #6e3a14) border-box; box-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.name-frame.frame-bronze::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='b' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffd2a1'/%3E%3Cstop offset='.5' stop-color='%23c8854a'/%3E%3Cstop offset='1' stop-color='%236e3a14'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='20' r='9.5' fill='url(%23b)' stroke='%231d1a17' stroke-width='1.8'/%3E%3Ccircle cx='12' cy='20' r='6' fill='none' stroke='%236e3a14' stroke-width='1.2'/%3E%3Ccircle cx='12' cy='20' r='2.6' fill='%23ffe2c4' stroke='%231d1a17' stroke-width='1.1'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='b' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffd2a1'/%3E%3Cstop offset='.5' stop-color='%23c8854a'/%3E%3Cstop offset='1' stop-color='%236e3a14'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Ccircle cx='12' cy='20' r='9.5' fill='url(%23b)' stroke='%231d1a17' stroke-width='1.8'/%3E%3Ccircle cx='12' cy='20' r='6' fill='none' stroke='%236e3a14' stroke-width='1.2'/%3E%3Ccircle cx='12' cy='20' r='2.6' fill='%23ffe2c4' stroke='%231d1a17' stroke-width='1.1'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-bronze b { position: relative; z-index: 2; color: #ffe2c4; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-silver { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid transparent; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%) 0 0 / 300% 100% padding-box, linear-gradient(180deg, #4a5462, #262c36) padding-box, linear-gradient(180deg, #ffffff, #9aa6b4 50%, #e6ebf0) border-box; animation: frShine 3.2s ease-in-out infinite; box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 0 10px rgba(201,209,217,0.4); }
.name-frame.frame-silver::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.45' stop-color='%23c9d1d9'/%3E%3Cstop offset='1' stop-color='%236b7785'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M23 14 L10 14 L1 20 L10 26 L23 26Z' fill='url(%23s)' stroke='%231d1a17' stroke-width='1.7' stroke-linejoin='round'/%3E%3Cpath d='M10 14 L10 26' stroke='%231d1a17' stroke-width='1.2' opacity='.5'/%3E%3Ccircle cx='16.5' cy='20' r='2.4' fill='%23eef2f6' stroke='%231d1a17' stroke-width='1.1'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.45' stop-color='%23c9d1d9'/%3E%3Cstop offset='1' stop-color='%236b7785'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M23 14 L10 14 L1 20 L10 26 L23 26Z' fill='url(%23s)' stroke='%231d1a17' stroke-width='1.7' stroke-linejoin='round'/%3E%3Cpath d='M10 14 L10 26' stroke='%231d1a17' stroke-width='1.2' opacity='.5'/%3E%3Ccircle cx='16.5' cy='20' r='2.4' fill='%23eef2f6' stroke='%231d1a17' stroke-width='1.1'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-silver b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-gold { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid transparent; background: linear-gradient(105deg, transparent 40%, rgba(255,243,194,0.4) 50%, transparent 60%) 0 0 / 300% 100% padding-box, linear-gradient(180deg, #7a1a2a, #3e0a16) padding-box, linear-gradient(180deg, #fff3c2, #ffd24a 45%, #a8700c) border-box; animation: frShine 2.6s ease-in-out infinite; box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 0 10px rgba(255,210,74,0.5); }
.name-frame.frame-gold::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cdefs%3E%3C/defs%3E%3Cpath d='M10 2 L17 9 L10 16 L3 9Z' fill='%23ff4f6a' stroke='%231d1a17' stroke-width='1.6'/%3E%3Cpath d='M10 2 L10 16 M3 9 L17 9' stroke='%23ffe3e8' stroke-width='.8' opacity='.6'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='.4' stop-color='%23ffd24a'/%3E%3Cstop offset='1' stop-color='%23a8700c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M23 13 C15 6 6 6 2 11 C6 11 8 13 9 15 C5 15 3 17 2 20 C5 19 8 20 10 22 C6 23 4 26 4 29 C9 26 15 27 23 27Z' fill='url(%23g)' stroke='%231d1a17' stroke-width='1.7' stroke-linejoin='round'/%3E%3Cpath d='M21 16 C16 13 12 13 9 15 M21 21 C17 19 13 19 10 22' fill='none' stroke='%23a8700c' stroke-width='1.1'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='.4' stop-color='%23ffd24a'/%3E%3Cstop offset='1' stop-color='%23a8700c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M23 13 C15 6 6 6 2 11 C6 11 8 13 9 15 C5 15 3 17 2 20 C5 19 8 20 10 22 C6 23 4 26 4 29 C9 26 15 27 23 27Z' fill='url(%23g)' stroke='%231d1a17' stroke-width='1.7' stroke-linejoin='round'/%3E%3Cpath d='M21 16 C16 13 12 13 9 15 M21 21 C17 19 13 19 10 22' fill='none' stroke='%23a8700c' stroke-width='1.1'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-gold b { position: relative; z-index: 2; color: #fff3c2; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-emerald { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid transparent; background: linear-gradient(180deg, #145a34, #072a18) padding-box, linear-gradient(180deg, #a8ffcf, #3ddc84 50%, #0f6e3a) border-box; box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 0 10px rgba(61,220,132,0.5); }
.name-frame.frame-emerald::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='e' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23a8ffcf'/%3E%3Cstop offset='.5' stop-color='%233ddc84'/%3E%3Cstop offset='1' stop-color='%230f6e3a'/%3E%3C/linearGradient%3E%3ClinearGradient id='v' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%237fe08a'/%3E%3Cstop offset='1' stop-color='%232f7a3a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M22 22 C16 30 8 33 3 30 C7 27 10 24 13 22Z' fill='url(%23v)' stroke='%231d1a17' stroke-width='1.4'/%3E%3Cpath d='M11 9 L18 16 L11 23 L4 16Z' fill='url(%23e)' stroke='%231d1a17' stroke-width='1.7' stroke-linejoin='round'/%3E%3Cpath d='M11 9 L11 23 M4 16 L18 16' stroke='%23e9fff3' stroke-width='.8' opacity='.7'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='e' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23a8ffcf'/%3E%3Cstop offset='.5' stop-color='%233ddc84'/%3E%3Cstop offset='1' stop-color='%230f6e3a'/%3E%3C/linearGradient%3E%3ClinearGradient id='v' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%237fe08a'/%3E%3Cstop offset='1' stop-color='%232f7a3a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M22 22 C16 30 8 33 3 30 C7 27 10 24 13 22Z' fill='url(%23v)' stroke='%231d1a17' stroke-width='1.4'/%3E%3Cpath d='M11 9 L18 16 L11 23 L4 16Z' fill='url(%23e)' stroke='%231d1a17' stroke-width='1.7' stroke-linejoin='round'/%3E%3Cpath d='M11 9 L11 23 M4 16 L18 16' stroke='%23e9fff3' stroke-width='.8' opacity='.7'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-emerald b { position: relative; z-index: 2; color: #eafff2; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-ruby { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid transparent; background: linear-gradient(180deg, #6a0a1e, #30040c) padding-box, linear-gradient(180deg, #ffe08a, #ffd24a 50%, #b8860b) border-box; box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 0 10px rgba(255,60,90,0.55); }
.name-frame.frame-ruby::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='r' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffd0d8'/%3E%3Cstop offset='.45' stop-color='%23ff4f6a'/%3E%3Cstop offset='1' stop-color='%237a0a1e'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M23 16 L17 16 L17 24 L23 24Z' fill='%23ffd24a' stroke='%231d1a17' stroke-width='1.3'/%3E%3Cpath d='M10 10 L17 15 L17 25 L10 30 L3 25 L3 15Z' fill='url(%23r)' stroke='%231d1a17' stroke-width='1.7' stroke-linejoin='round'/%3E%3Cpath d='M10 10 L10 30 M3 15 L17 25 M17 15 L3 25' stroke='%23ffe3e8' stroke-width='.7' opacity='.55'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='r' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffd0d8'/%3E%3Cstop offset='.45' stop-color='%23ff4f6a'/%3E%3Cstop offset='1' stop-color='%237a0a1e'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M23 16 L17 16 L17 24 L23 24Z' fill='%23ffd24a' stroke='%231d1a17' stroke-width='1.3'/%3E%3Cpath d='M10 10 L17 15 L17 25 L10 30 L3 25 L3 15Z' fill='url(%23r)' stroke='%231d1a17' stroke-width='1.7' stroke-linejoin='round'/%3E%3Cpath d='M10 10 L10 30 M3 15 L17 25 M17 15 L3 25' stroke='%23ffe3e8' stroke-width='.7' opacity='.55'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-ruby b { position: relative; z-index: 2; color: #ffe3e8; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-sapphire { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid transparent; background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.25) 0 1px, transparent 2px) 0 0 / 14px 10px padding-box, linear-gradient(180deg, #1a4a9a, #0a1f4a) padding-box, linear-gradient(180deg, #ffffff, #7fc0ff 50%, #1f5fd0) border-box; box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 0 10px rgba(77,163,255,0.55); }
.name-frame.frame-sapphire::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='i' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.4' stop-color='%239fd2ff'/%3E%3Cstop offset='1' stop-color='%231f5fd0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M23 17 L6 12 L1 20 L6 28 L23 23Z' fill='url(%23i)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M14 15 L9 4 L17 13Z M14 25 L9 36 L17 27Z' fill='url(%23i)' stroke='%231d1a17' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M3 20 L20 20' stroke='%23fff' stroke-width='.9' opacity='.7'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='i' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.4' stop-color='%239fd2ff'/%3E%3Cstop offset='1' stop-color='%231f5fd0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M23 17 L6 12 L1 20 L6 28 L23 23Z' fill='url(%23i)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M14 15 L9 4 L17 13Z M14 25 L9 36 L17 27Z' fill='url(%23i)' stroke='%231d1a17' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M3 20 L20 20' stroke='%23fff' stroke-width='.9' opacity='.7'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-sapphire b { position: relative; z-index: 2; color: #eaf5ff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-obsidian { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid #ff8a2a; background: linear-gradient(115deg, transparent 30%, rgba(255,110,40,0.35) 31%, transparent 33%, transparent 64%, rgba(255,110,40,0.3) 65%, transparent 67%), linear-gradient(180deg, #2a1a16, #0a0606); animation: obsFrame 1.6s ease-in-out infinite alternate; box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 0 10px rgba(255,110,40,0.6); }
.name-frame.frame-obsidian::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='o' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%234a3a3a'/%3E%3Cstop offset='1' stop-color='%230a0606'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M23 13 L13 7 L14 13 L4 9 L8 16 L0 20 L8 24 L4 31 L14 27 L13 33 L23 27Z' fill='url(%23o)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M20 20 L12 18 L7 20 M15 14 L11 18 M15 26 L12 22' fill='none' stroke='%23ff8a2a' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='o' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%234a3a3a'/%3E%3Cstop offset='1' stop-color='%230a0606'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M23 13 L13 7 L14 13 L4 9 L8 16 L0 20 L8 24 L4 31 L14 27 L13 33 L23 27Z' fill='url(%23o)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M20 20 L12 18 L7 20 M15 14 L11 18 M15 26 L12 22' fill='none' stroke='%23ff8a2a' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-obsidian b { position: relative; z-index: 2; color: #ffd9b8; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-mythic { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap;  }
.name-frame.frame-mythic::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cdefs%3E%3C/defs%3E%3Cpath d='M10 1 L12 7 L18 9 L12 11 L10 17 L8 11 L2 9 L8 7Z' fill='%23ff9fd0' stroke='%231d1a17' stroke-width='1.3'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3C/defs%3E%3Cpath d='M10 8 L12 15 L19 17 L12 19 L10 26 L8 19 L1 17 L8 15Z' fill='%23fff6d0' stroke='%231d1a17' stroke-width='1.3' stroke-linejoin='round'/%3E%3Cpath d='M18 25 L19 28.5 L22.5 29.5 L19 30.5 L18 34 L17 30.5 L13.5 29.5 L17 28.5Z' fill='%23b07cf0' stroke='%231d1a17' stroke-width='1'/%3E%3Cpath d='M19 4 L19.8 6.6 L22.4 7.4 L19.8 8.2 L19 10.8 L18.2 8.2 L15.6 7.4 L18.2 6.6Z' fill='%237fd4ff'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M10 8 L12 15 L19 17 L12 19 L10 26 L8 19 L1 17 L8 15Z' fill='%23fff6d0' stroke='%231d1a17' stroke-width='1.3' stroke-linejoin='round'/%3E%3Cpath d='M18 25 L19 28.5 L22.5 29.5 L19 30.5 L18 34 L17 30.5 L13.5 29.5 L17 28.5Z' fill='%23b07cf0' stroke='%231d1a17' stroke-width='1'/%3E%3Cpath d='M19 4 L19.8 6.6 L22.4 7.4 L19.8 8.2 L19 10.8 L18.2 8.2 L15.6 7.4 L18.2 6.6Z' fill='%237fd4ff'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-mythic b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-legend { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid transparent; background: linear-gradient(120deg, #6a1a4a, #3a1a6a, #1a3a6a, #6a1a4a) 0 0 / 300% 100% padding-box, linear-gradient(90deg, #fff6d0, #ffd24a, #fffbe0, #ffd24a, #fff6d0) border-box; animation: kbFlow 5s linear infinite; box-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.name-frame.frame-legend::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 19'%3E%3Cdefs%3E%3C/defs%3E%3Cpath d='M10 1 L12.6 7 L19 7.4 L14 11.4 L15.8 17.6 L10 14 L4.2 17.6 L6 11.4 L1 7.4 L7.4 7Z' fill='%23fff6d0' stroke='%231d1a17' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='w' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.6' stop-color='%23ffe08a'/%3E%3Cstop offset='1' stop-color='%23d49a2a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M23 14 C14 6 5 5 0 7 C4 9 6 11 7 13 C3 13 1 15 0 17 C4 17 6 18 8 20 C4 21 2 23 1 26 C5 25 8 26 10 27 C7 29 6 31 6 33 C12 30 17 29 23 27Z' fill='url(%23w)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M22 18 L8 13 M22 21 L8 20 M22 24 L10 27' stroke='%23d49a2a' stroke-width='1' opacity='.8'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='w' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.6' stop-color='%23ffe08a'/%3E%3Cstop offset='1' stop-color='%23d49a2a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M23 14 C14 6 5 5 0 7 C4 9 6 11 7 13 C3 13 1 15 0 17 C4 17 6 18 8 20 C4 21 2 23 1 26 C5 25 8 26 10 27 C7 29 6 31 6 33 C12 30 17 29 23 27Z' fill='url(%23w)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M22 18 L8 13 M22 21 L8 20 M22 24 L10 27' stroke='%23d49a2a' stroke-width='1' opacity='.8'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-legend b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-imperial { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap;  }
.name-frame.frame-imperial::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cdefs%3E%3ClinearGradient id='c' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='.5' stop-color='%23ffd24a'/%3E%3Cstop offset='1' stop-color='%23a8700c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M2 16 L1 5 L7 10 L12 2 L17 10 L23 5 L22 16Z' fill='url(%23c)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='11' r='2' fill='%23ff4f6a' stroke='%231d1a17' stroke-width='1'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='p' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='1' stop-color='%23c99a2e'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M23 30 C14 30 7 25 4 14' fill='none' stroke='%23c99a2e' stroke-width='1.8'/%3E%3Cellipse cx='6' cy='12' rx='3.4' ry='1.8' transform='rotate(-70 6 12)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cellipse cx='8.5' cy='19' rx='3.4' ry='1.8' transform='rotate(-40 8.5 19)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cellipse cx='12.5' cy='24.5' rx='3.4' ry='1.8' transform='rotate(-20 12.5 24.5)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cellipse cx='18' cy='28' rx='3.4' ry='1.8' transform='rotate(0 18 28)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cellipse cx='3' cy='19' rx='3.4' ry='1.8' transform='rotate(-110 3 19)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cellipse cx='6' cy='25' rx='3.4' ry='1.8' transform='rotate(-80 6 25)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cellipse cx='11' cy='30' rx='3.4' ry='1.8' transform='rotate(-40 11 30)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='p' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='1' stop-color='%23c99a2e'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M23 30 C14 30 7 25 4 14' fill='none' stroke='%23c99a2e' stroke-width='1.8'/%3E%3Cellipse cx='6' cy='12' rx='3.4' ry='1.8' transform='rotate(-70 6 12)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cellipse cx='8.5' cy='19' rx='3.4' ry='1.8' transform='rotate(-40 8.5 19)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cellipse cx='12.5' cy='24.5' rx='3.4' ry='1.8' transform='rotate(-20 12.5 24.5)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cellipse cx='18' cy='28' rx='3.4' ry='1.8' transform='rotate(0 18 28)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cellipse cx='3' cy='19' rx='3.4' ry='1.8' transform='rotate(-110 3 19)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cellipse cx='6' cy='25' rx='3.4' ry='1.8' transform='rotate(-80 6 25)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cellipse cx='11' cy='30' rx='3.4' ry='1.8' transform='rotate(-40 11 30)' fill='url(%23p)' stroke='%231d1a17' stroke-width='1.1'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-imperial b { position: relative; z-index: 2; color: #fff3c2; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-keyholder { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid transparent; background: linear-gradient(180deg, #1f5a64, #0c2a30) padding-box, linear-gradient(180deg, #fff3c2, #ffd24a 45%, #b8860b) border-box; box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 0 10px rgba(255,210,74,0.45); }
.name-frame.frame-keyholder::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 17'%3E%3Cdefs%3E%3C/defs%3E%3Cpath d='M3 15 L3 7 L10 2 L17 7 L17 15Z' fill='%237a4a1e' stroke='%231d1a17' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M3 9 H17' stroke='%231d1a17' stroke-width='1.2'/%3E%3Crect x='8' y='8' width='4' height='5' rx='1' fill='%23ffd24a' stroke='%231d1a17' stroke-width='1'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='k' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='.5' stop-color='%23ffd24a'/%3E%3Cstop offset='1' stop-color='%23b8860b'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='8' cy='20' r='6.2' fill='url(%23k)' stroke='%231d1a17' stroke-width='1.7'/%3E%3Ccircle cx='8' cy='20' r='2.6' fill='%231f4a52' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cpath d='M14 18 H23 V22 H14Z' fill='url(%23k)' stroke='%231d1a17' stroke-width='1.4'/%3E%3Cpath d='M17 22 V26 H19 V22 M20.5 22 V25' fill='none' stroke='%231d1a17' stroke-width='1.4'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='k' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='.5' stop-color='%23ffd24a'/%3E%3Cstop offset='1' stop-color='%23b8860b'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Ccircle cx='8' cy='20' r='6.2' fill='url(%23k)' stroke='%231d1a17' stroke-width='1.7'/%3E%3Ccircle cx='8' cy='20' r='2.6' fill='%231f4a52' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cpath d='M14 18 H23 V22 H14Z' fill='url(%23k)' stroke='%231d1a17' stroke-width='1.4'/%3E%3Cpath d='M17 22 V26 H19 V22 M20.5 22 V25' fill='none' stroke='%231d1a17' stroke-width='1.4'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-keyholder b { position: relative; z-index: 2; color: #fff3c2; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-candycane { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid transparent; background: linear-gradient(180deg, #8a0f1e, #4a0610) padding-box, repeating-linear-gradient(135deg, #ffffff 0 5px, #e5263c 5px 10px) border-box; box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 0 10px rgba(255,80,100,0.45); }
.name-frame.frame-candycane::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 16'%3E%3Cdefs%3E%3C/defs%3E%3Cpath d='M3 10 C6 5 9 5 10 9 C11 5 14 5 17 10 C14 12 11 12 10 10 C9 12 6 12 3 10Z' fill='%23e5263c' stroke='%231d1a17' stroke-width='1.4' stroke-linejoin='round'/%3E%3Ccircle cx='10' cy='10' r='2.4' fill='%23ffd24a' stroke='%231d1a17' stroke-width='1.1'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3CclipPath id='c'%3E%3Cpath d='M21 22 L9 22 C3 22 2 16 2 13 C2 8 6 5 10 5 C14 5 17 8 17 12 L13 12 C13 10 12 9 10 9 C8 9 6 10 6 13 C6 16 8 18 10 18 L21 18Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23c)'%3E%3Crect x='0' y='0' width='24' height='40' fill='%23fff'/%3E%3Cpath d='M2 -2 L6 -2 L-8 30 L-12 30Z' fill='%23e5263c'/%3E%3Cpath d='M9 -2 L13 -2 L-1 30 L-5 30Z' fill='%23e5263c'/%3E%3Cpath d='M16 -2 L20 -2 L6 30 L2 30Z' fill='%23e5263c'/%3E%3Cpath d='M23 -2 L27 -2 L13 30 L9 30Z' fill='%23e5263c'/%3E%3Cpath d='M30 -2 L34 -2 L20 30 L16 30Z' fill='%23e5263c'/%3E%3Cpath d='M37 -2 L41 -2 L27 30 L23 30Z' fill='%23e5263c'/%3E%3C/g%3E%3Cpath d='M21 22 L9 22 C3 22 2 16 2 13 C2 8 6 5 10 5 C14 5 17 8 17 12 L13 12 C13 10 12 9 10 9 C8 9 6 10 6 13 C6 16 8 18 10 18 L21 18Z' fill='none' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M8 27 C12 24 18 25 22 28 C18 30 12 31 8 27Z' fill='%232f9e4a' stroke='%231d1a17' stroke-width='1.3'/%3E%3Ccircle cx='7' cy='30' r='2.3' fill='%23e5263c' stroke='%231d1a17' stroke-width='1'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3CclipPath id='c'%3E%3Cpath d='M21 22 L9 22 C3 22 2 16 2 13 C2 8 6 5 10 5 C14 5 17 8 17 12 L13 12 C13 10 12 9 10 9 C8 9 6 10 6 13 C6 16 8 18 10 18 L21 18Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cg clip-path='url(%23c)'%3E%3Crect x='0' y='0' width='24' height='40' fill='%23fff'/%3E%3Cpath d='M2 -2 L6 -2 L-8 30 L-12 30Z' fill='%23e5263c'/%3E%3Cpath d='M9 -2 L13 -2 L-1 30 L-5 30Z' fill='%23e5263c'/%3E%3Cpath d='M16 -2 L20 -2 L6 30 L2 30Z' fill='%23e5263c'/%3E%3Cpath d='M23 -2 L27 -2 L13 30 L9 30Z' fill='%23e5263c'/%3E%3Cpath d='M30 -2 L34 -2 L20 30 L16 30Z' fill='%23e5263c'/%3E%3Cpath d='M37 -2 L41 -2 L27 30 L23 30Z' fill='%23e5263c'/%3E%3C/g%3E%3Cpath d='M21 22 L9 22 C3 22 2 16 2 13 C2 8 6 5 10 5 C14 5 17 8 17 12 L13 12 C13 10 12 9 10 9 C8 9 6 10 6 13 C6 16 8 18 10 18 L21 18Z' fill='none' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M8 27 C12 24 18 25 22 28 C18 30 12 31 8 27Z' fill='%232f9e4a' stroke='%231d1a17' stroke-width='1.3'/%3E%3Ccircle cx='7' cy='30' r='2.3' fill='%23e5263c' stroke='%231d1a17' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-candycane b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-lights { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid #2f9e4a; background: radial-gradient(circle, #ff4f4f 0 2.2px, transparent 2.6px) 2px -3px / 22px 8px repeat-x, radial-gradient(circle, #ffd24a 0 2.2px, transparent 2.6px) 9px -3px / 22px 8px repeat-x, radial-gradient(circle, #4fc3ff 0 2.2px, transparent 2.6px) 16px -3px / 22px 8px repeat-x, linear-gradient(180deg, #14502a, #082814); animation: frBlink 1.4s steps(2) infinite; box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 0 10px rgba(255,210,74,0.45); }
.name-frame.frame-lights::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 17'%3E%3Cdefs%3E%3C/defs%3E%3Cpath d='M10 1 L12.2 6.4 L18 6.8 L13.6 10.4 L15 16 L10 12.9 L5 16 L6.4 10.4 L2 6.8 L7.8 6.4Z' fill='%23ffd24a' stroke='%231d1a17' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='h' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%236fd16a'/%3E%3Cstop offset='1' stop-color='%231f6b2c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M22 20 C17 12 10 10 4 12 C7 14 7 16 6 18 C8 18 9 19 9 21 C11 20 13 21 13 23 C16 21 19 21 22 20Z' fill='url(%23h)' stroke='%231d1a17' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M22 21 C18 28 11 31 5 30 C8 28 8 26 7 24 C9 24 10 23 10 21 C12 22 14 21 14 19' fill='url(%23h)' stroke='%231d1a17' stroke-width='1.5' stroke-linejoin='round'/%3E%3Ccircle cx='17' cy='21' r='2.8' fill='%23e5263c' stroke='%231d1a17' stroke-width='1.1'/%3E%3Ccircle cx='20.5' cy='17.5' r='2.4' fill='%23e5263c' stroke='%231d1a17' stroke-width='1.1'/%3E%3Ccircle cx='20' cy='24.5' r='2.4' fill='%23e5263c' stroke='%231d1a17' stroke-width='1.1'/%3E%3Ccircle cx='16.2' cy='20.2' r='.8' fill='%23fff'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='h' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%236fd16a'/%3E%3Cstop offset='1' stop-color='%231f6b2c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M22 20 C17 12 10 10 4 12 C7 14 7 16 6 18 C8 18 9 19 9 21 C11 20 13 21 13 23 C16 21 19 21 22 20Z' fill='url(%23h)' stroke='%231d1a17' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M22 21 C18 28 11 31 5 30 C8 28 8 26 7 24 C9 24 10 23 10 21 C12 22 14 21 14 19' fill='url(%23h)' stroke='%231d1a17' stroke-width='1.5' stroke-linejoin='round'/%3E%3Ccircle cx='17' cy='21' r='2.8' fill='%23e5263c' stroke='%231d1a17' stroke-width='1.1'/%3E%3Ccircle cx='20.5' cy='17.5' r='2.4' fill='%23e5263c' stroke='%231d1a17' stroke-width='1.1'/%3E%3Ccircle cx='20' cy='24.5' r='2.4' fill='%23e5263c' stroke='%231d1a17' stroke-width='1.1'/%3E%3Ccircle cx='16.2' cy='20.2' r='.8' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-lights b { position: relative; z-index: 2; color: #fff6d0; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-frost { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid #e9f6ff; background: radial-gradient(ellipse at 50% -40%, #ffffff 0 38%, transparent 40%) 0 0 / 18px 9px repeat-x, linear-gradient(180deg, #3a7ab8, #163a66); box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 0 10px rgba(160,220,255,0.6); }
.name-frame.frame-frost::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cdefs%3E%3C/defs%3E%3Cg stroke='%231d1a17' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M10 2 V16 M3 6 L17 12 M3 12 L17 6'/%3E%3C/g%3E%3Cg stroke='%23e9f6ff' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M10 2 V16 M3 6 L17 12 M3 12 L17 6'/%3E%3C/g%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='f' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%23cfe9ff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M23 12 C19 6 11 6 7 10 C3 9 0 13 2 17 C0 20 2 24 6 24 C8 27 13 28 16 26 C19 28 23 26 23 24Z' fill='url(%23f)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M8 24 L9 32 L11 25 M13 26 L14.5 35 L16 26 M18 26 L19 31 L20 25' fill='%23e9f6ff' stroke='%231d1a17' stroke-width='1.2' stroke-linejoin='round'/%3E%3Ccircle cx='9' cy='14' r='1.2' fill='%239fd2ff'/%3E%3Ccircle cx='15' cy='11' r='.9' fill='%239fd2ff'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='f' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%23cfe9ff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M23 12 C19 6 11 6 7 10 C3 9 0 13 2 17 C0 20 2 24 6 24 C8 27 13 28 16 26 C19 28 23 26 23 24Z' fill='url(%23f)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M8 24 L9 32 L11 25 M13 26 L14.5 35 L16 26 M18 26 L19 31 L20 25' fill='%23e9f6ff' stroke='%231d1a17' stroke-width='1.2' stroke-linejoin='round'/%3E%3Ccircle cx='9' cy='14' r='1.2' fill='%239fd2ff'/%3E%3Ccircle cx='15' cy='11' r='.9' fill='%239fd2ff'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-frost b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-legion { position: relative; isolation: isolate; padding-left: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap;  }
.name-frame.frame-legion::before { content: '' !important; position: absolute; left: -0.78em; right: 0.6em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='lr' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23e8483a'/%3E%3Cstop offset='1' stop-color='%237a0f0f'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M6 8 H20 Q23 20 20 32 H6 Q3 20 6 8Z' fill='url(%23lr)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M8 11 H18 M8 29 H18' stroke='%23ffd24a' stroke-width='1.6'/%3E%3Ccircle cx='13' cy='20' r='3.4' fill='%23ffd24a' stroke='%231d1a17' stroke-width='1.2'/%3E%3Cpath d='M13 12 V16 M13 24 V28' stroke='%23ffd24a' stroke-width='1.4'/%3E%3C/svg%3E") left center / auto 100% no-repeat; }
.name-frame.frame-legion b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-longship { position: relative; isolation: isolate; padding-left: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap;  }
.name-frame.frame-longship::before { content: '' !important; position: absolute; left: -0.78em; right: 0.6em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='ls' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23b07a45'/%3E%3Cstop offset='1' stop-color='%235a3418'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M23 26 C17 27 10 25 7 20 C5 17 6 12 9 10 C10 7 13 7 14 9 C16 8 18 10 16 12 C13 12 12 14 13 17 C15 20 19 21 23 21Z' fill='url(%23ls)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Ccircle cx='11.5' cy='11.5' r='1.3' fill='%23ffd24a' stroke='%231d1a17' stroke-width='.7'/%3E%3Cpath d='M8 9 L5 6 M10 8 L9 4' stroke='%231d1a17' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M15 24 L22 24' stroke='%23e4ecf3' stroke-width='1.3'/%3E%3C/svg%3E") left center / auto 100% no-repeat; }
.name-frame.frame-longship b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-pharaoh { position: relative; isolation: isolate; padding-left: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap;  }
.name-frame.frame-pharaoh::before { content: '' !important; position: absolute; left: -0.78em; right: 0.6em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='ph' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%237fb0ff'/%3E%3Cstop offset='1' stop-color='%231f4aa0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M22 22 C16 22 12 20 9 15 C13 15 16 17 18 20 C17 14 17 10 20 6 C22 10 22 15 22 22Z' fill='url(%23ph)' stroke='%231d1a17' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M22 22 C15 24 9 23 4 19 C9 18 14 19 18 21' fill='%23ffd24a' stroke='%231d1a17' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M22 24 C17 28 12 30 6 30 C10 27 15 25 22 24Z' fill='url(%23ph)' stroke='%231d1a17' stroke-width='1.4'/%3E%3C/svg%3E") left center / auto 100% no-repeat; }
.name-frame.frame-pharaoh b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-steppe { position: relative; isolation: isolate; padding-left: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap;  }
.name-frame.frame-steppe::before { content: '' !important; position: absolute; left: -0.78em; right: 0.6em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3C/defs%3E%3Cpath d='M14 4 C2 12 2 28 14 36' fill='none' stroke='%231d1a17' stroke-width='4.2' stroke-linecap='round'/%3E%3Cpath d='M14 4 C2 12 2 28 14 36' fill='none' stroke='%23b8913a' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M14 4 L14 36' stroke='%23f3dc94' stroke-width='1'/%3E%3Cpath d='M23 20 H4' stroke='%231d1a17' stroke-width='3'/%3E%3Cpath d='M23 20 H4' stroke='%238a5a2e' stroke-width='1.5'/%3E%3Cpath d='M4 20 L8 17 L8 23Z' fill='%23cfd6dc' stroke='%231d1a17' stroke-width='1.1'/%3E%3Cpath d='M21 20 L23 17 M21 20 L23 23' stroke='%23e5484d' stroke-width='1.6'/%3E%3C/svg%3E") left center / auto 100% no-repeat; }
.name-frame.frame-steppe b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-shogun { position: relative; isolation: isolate; padding-left: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap;  }
.name-frame.frame-shogun::before { content: '' !important; position: absolute; left: -0.78em; right: 0.6em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3C/defs%3E%3Cg stroke='%231d1a17' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M21 20 L11.11138747911398 33.82806358141936 L8.332035160137202 31.336783795062864Z' fill='%23d63a3a'/%3E%3Cpath d='M21 20 L8.107848108161361 31.081174107366124 L6.000341403627935 28.000640098909685Z' fill='%231a1414'/%3E%3Cpath d='M21 20 L5.843339100679408 27.69906685144416 L4.528488830919038 24.20586730732689Z' fill='%23d63a3a'/%3E%3Cpath d='M21 20 L4.447671284908626 23.875617900098202 L4.000849992916692 20.169997166680833Z' fill='%231a1414'/%3E%3Cpath d='M21 20 L4.000849992916692 19.830002833319167 L4.447671284908626 16.124382099901798Z' fill='%23d63a3a'/%3E%3Cpath d='M21 20 L4.528488830919038 15.79413269267311 L5.843339100679408 12.300933148555838Z' fill='%231a1414'/%3E%3Cpath d='M21 20 L6.000341403627935 11.999359901090314 L8.107848108161361 8.918825892633878Z' fill='%23d63a3a'/%3E%3Cpath d='M21 20 L8.332035160137202 8.663216204937136 L11.11138747911398 6.171936418580646Z' fill='%231a1414'/%3E%3C/g%3E%3Ccircle cx='21' cy='20' r='2.2' fill='%23ffd24a' stroke='%231d1a17' stroke-width='1'/%3E%3C/svg%3E") left center / auto 100% no-repeat; }
.name-frame.frame-shogun b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-legends { position: relative; isolation: isolate; padding-left: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap;  }
.name-frame.frame-legends::before { content: '' !important; position: absolute; left: -0.78em; right: 0.6em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='lg' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23d9b8ff'/%3E%3Cstop offset='1' stop-color='%235a2fa0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M23 14 C17 6 9 5 2 9 C6 11 7 13 6 15 C3 16 1 19 2 22 C5 21 8 22 9 24 C7 27 7 30 9 32 C13 28 18 27 23 26Z' fill='url(%23lg)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M22 16 L6 10 M22 20 L4 17 M22 23 L8 25' stroke='%233a1a6a' stroke-width='1.1'/%3E%3Ccircle cx='20' cy='20' r='1.5' fill='%23ffd24a'/%3E%3C/svg%3E") left center / auto 100% no-repeat; }
.name-frame.frame-legends b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-conqueror { position: relative; isolation: isolate; padding-left: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap;  }
.name-frame.frame-conqueror::before { content: '' !important; position: absolute; left: -0.78em; right: 0.6em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cdefs%3E%3ClinearGradient id='c' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='.5' stop-color='%23ffd24a'/%3E%3Cstop offset='1' stop-color='%23a8700c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M2 16 L1 5 L7 10 L12 2 L17 10 L23 5 L22 16Z' fill='url(%23c)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='11' r='2' fill='%23ff4f6a' stroke='%231d1a17' stroke-width='1'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3C/defs%3E%3Cg stroke='%231d1a17' stroke-width='1.4' stroke-linejoin='round'%3E%3Cpath d='M3 8 L5 6 L21 22 L19 24Z' fill='%23e9eef3'/%3E%3Cpath d='M3 32 L5 34 L21 18 L19 16Z' fill='%23e9eef3'/%3E%3Cpath d='M15 20 L19 26 L21 24Z M15 20 L19 14 L21 16Z' fill='%23ffd24a'/%3E%3C/g%3E%3Ccircle cx='19' cy='20' r='2.4' fill='%23e5484d' stroke='%231d1a17' stroke-width='1'/%3E%3C/svg%3E") left center / auto 100% no-repeat; }
.name-frame.frame-conqueror b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-season { position: relative; isolation: isolate; padding-left: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap;  }
.name-frame.frame-season::before { content: '' !important; position: absolute; left: -0.78em; right: 0.6em; top: -0.42em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='ss' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23d9b8ff'/%3E%3Cstop offset='1' stop-color='%235a2fa0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M12 6 L21 9 V19 C21 26 17 31 12 34 C7 31 3 26 3 19 V9Z' fill='url(%23ss)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M12 11 V29 M7 17 H17' stroke='%23f2e8ff' stroke-width='1.6' opacity='.8'/%3E%3C/svg%3E") left center / auto 100% no-repeat; }
.name-frame.frame-season b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-royal { position: relative; isolation: isolate; padding-left: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap;  }
.name-frame.frame-royal::before { content: '' !important; position: absolute; left: -0.78em; right: 0.6em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cdefs%3E%3C/defs%3E%3Cpath d='M2 16 L1 5 L7 10 L12 2 L17 10 L23 5 L22 16Z' fill='%23ffd24a' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='11' r='2' fill='%238a2be2' stroke='%231d1a17' stroke-width='1'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='ry' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='.5' stop-color='%23ffd24a'/%3E%3Cstop offset='1' stop-color='%238a5a10'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M23 14 C16 7 8 7 3 11 C7 12 8 14 8 16 C5 17 3 19 3 22 C6 21 9 22 10 24 C8 26 7 29 8 31 C13 28 18 27 23 26Z' fill='url(%23ry)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M22 17 L8 12 M22 21 L6 19 M22 24 L10 27' stroke='%238a2be2' stroke-width='1.1'/%3E%3C/svg%3E") left center / auto 100% no-repeat; }
.name-frame.frame-royal b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-sovereign { position: relative; isolation: isolate; padding-left: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap;  }
.name-frame.frame-sovereign::before { content: '' !important; position: absolute; left: -0.78em; right: 0.6em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cdefs%3E%3ClinearGradient id='c' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='.5' stop-color='%23ffd24a'/%3E%3Cstop offset='1' stop-color='%23a8700c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M2 16 L1 4 L7 9 L12 1 L17 9 L23 4 L22 16Z' fill='url(%23c)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='11' r='2.3' fill='%23b07cf0' stroke='%231d1a17' stroke-width='1'/%3E%3Ccircle cx='6' cy='13' r='1.2' fill='%23fff'/%3E%3Ccircle cx='18' cy='13' r='1.2' fill='%23fff'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='sv' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='.5' stop-color='%23ffd24a'/%3E%3Cstop offset='1' stop-color='%238a5a10'/%3E%3C/linearGradient%3E%3ClinearGradient id='sp' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23d9b8ff'/%3E%3Cstop offset='1' stop-color='%236a2bc2'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M23 12 C15 4 6 4 1 8 C5 10 6 12 6 14 C2 15 0 18 1 21 C4 20 7 21 8 23 C5 25 4 28 5 31 C11 27 17 27 23 27Z' fill='url(%23sp)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M23 15 C17 11 12 11 8 13 C11 15 12 17 11 19 C14 19 17 20 18 22 C20 22 22 22 23 23Z' fill='url(%23sv)' stroke='%231d1a17' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") left center / auto 100% no-repeat; }
.name-frame.frame-sovereign b { position: relative; z-index: 2; color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-wreath { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid #2f9e4a; background: linear-gradient(180deg, #1f6b2c, #0b3a16); box-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.name-frame.frame-wreath::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 16'%3E%3Cdefs%3E%3C/defs%3E%3Cpath d='M10 9 C5 2 0 4 1 9 C2 13 7 12 10 9 C13 12 18 13 19 9 C20 4 15 2 10 9Z' fill='%23e5263c' stroke='%231d1a17' stroke-width='1.4' stroke-linejoin='round'/%3E%3Ccircle cx='10' cy='9' r='2.4' fill='%23ffd24a' stroke='%231d1a17' stroke-width='1'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='wr' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%234fb35a'/%3E%3Cstop offset='1' stop-color='%231f6b2c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='20' r='9.5' fill='none' stroke='%231d1a17' stroke-width='7'/%3E%3Ccircle cx='12' cy='20' r='9.5' fill='none' stroke='url(%23wr)' stroke-width='4.6'/%3E%3Ccircle cx='21.075696646693256' cy='22.807441963282727' r='1.6' fill='%23e5263c' stroke='%231d1a17' stroke-width='.8'/%3E%3Ccircle cx='12.672003415843177' cy='29.47620237273852' r='1.6' fill='%23e5263c' stroke='%231d1a17' stroke-width='.8'/%3E%3Ccircle cx='3.0488877636477483' cy='23.1823874264811' r='1.6' fill='%23e5263c' stroke='%231d1a17' stroke-width='.8'/%3E%3Ccircle cx='6.539172507933943' cy='12.226367444888103' r='1.6' fill='%23e5263c' stroke='%231d1a17' stroke-width='.8'/%3E%3Ccircle cx='17.266556193702026' cy='12.093459298872938' r='1.6' fill='%23e5263c' stroke='%231d1a17' stroke-width='.8'/%3E%3Cpath d='M8 30 L5 37 L9 35 L12 38 L12 31Z M16 30 L19 37 L15 35 L12 38 L12 31Z' fill='%23e5263c' stroke='%231d1a17' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='wr' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%234fb35a'/%3E%3Cstop offset='1' stop-color='%231f6b2c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Ccircle cx='12' cy='20' r='9.5' fill='none' stroke='%231d1a17' stroke-width='7'/%3E%3Ccircle cx='12' cy='20' r='9.5' fill='none' stroke='url(%23wr)' stroke-width='4.6'/%3E%3Ccircle cx='21.075696646693256' cy='22.807441963282727' r='1.6' fill='%23e5263c' stroke='%231d1a17' stroke-width='.8'/%3E%3Ccircle cx='12.672003415843177' cy='29.47620237273852' r='1.6' fill='%23e5263c' stroke='%231d1a17' stroke-width='.8'/%3E%3Ccircle cx='3.0488877636477483' cy='23.1823874264811' r='1.6' fill='%23e5263c' stroke='%231d1a17' stroke-width='.8'/%3E%3Ccircle cx='6.539172507933943' cy='12.226367444888103' r='1.6' fill='%23e5263c' stroke='%231d1a17' stroke-width='.8'/%3E%3Ccircle cx='17.266556193702026' cy='12.093459298872938' r='1.6' fill='%23e5263c' stroke='%231d1a17' stroke-width='.8'/%3E%3Cpath d='M8 30 L5 37 L9 35 L12 38 L12 31Z M16 30 L19 37 L15 35 L12 38 L12 31Z' fill='%23e5263c' stroke='%231d1a17' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-wreath b { position: relative; z-index: 2; color: #eafff0; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-ornament { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid transparent; background: linear-gradient(105deg, transparent 40%, rgba(255,243,194,0.4) 50%, transparent 60%) 0 0 / 300% 100% padding-box, linear-gradient(180deg, #8a0f1e, #3e0610) padding-box, linear-gradient(180deg, #fff3c2, #ffd24a 45%, #b8780c) border-box; animation: frShine 2.8s ease-in-out infinite; box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 0 10px rgba(255,210,74,0.5); }
.name-frame.frame-ornament::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 16'%3E%3Cdefs%3E%3C/defs%3E%3Cpath d='M10 9 C5 2 0 4 1 9 C2 13 7 12 10 9 C13 12 18 13 19 9 C20 4 15 2 10 9Z' fill='%23ffd24a' stroke='%231d1a17' stroke-width='1.4' stroke-linejoin='round'/%3E%3Ccircle cx='10' cy='9' r='2.4' fill='%23e5263c' stroke='%231d1a17' stroke-width='1'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='or' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ff8a9a'/%3E%3Cstop offset='.5' stop-color='%23e5263c'/%3E%3Cstop offset='1' stop-color='%237a0a1e'/%3E%3C/linearGradient%3E%3ClinearGradient id='og' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='1' stop-color='%23d4951c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M22 8 L14 8 L14 14' fill='none' stroke='%23ffd24a' stroke-width='1.4'/%3E%3Crect x='11' y='13' width='6' height='4' rx='1' fill='url(%23og)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Ccircle cx='14' cy='25' r='8.5' fill='url(%23or)' stroke='%231d1a17' stroke-width='1.6'/%3E%3Cpath d='M6 24 Q14 28 22 24' fill='none' stroke='%23ffd24a' stroke-width='1.4'/%3E%3Ccircle cx='11' cy='21' r='2' fill='%23fff' opacity='.7'/%3E%3Cpath d='M22 8 L5 8 L5 26' fill='none' stroke='%23ffd24a' stroke-width='1.2'/%3E%3Ccircle cx='5' cy='31' r='4.5' fill='%233a7bd5' stroke='%231d1a17' stroke-width='1.3'/%3E%3Ccircle cx='3.6' cy='29.6' r='1.1' fill='%23fff' opacity='.7'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='or' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ff8a9a'/%3E%3Cstop offset='.5' stop-color='%23e5263c'/%3E%3Cstop offset='1' stop-color='%237a0a1e'/%3E%3C/linearGradient%3E%3ClinearGradient id='og' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3c2'/%3E%3Cstop offset='1' stop-color='%23d4951c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cpath d='M22 8 L14 8 L14 14' fill='none' stroke='%23ffd24a' stroke-width='1.4'/%3E%3Crect x='11' y='13' width='6' height='4' rx='1' fill='url(%23og)' stroke='%231d1a17' stroke-width='1.1'/%3E%3Ccircle cx='14' cy='25' r='8.5' fill='url(%23or)' stroke='%231d1a17' stroke-width='1.6'/%3E%3Cpath d='M6 24 Q14 28 22 24' fill='none' stroke='%23ffd24a' stroke-width='1.4'/%3E%3Ccircle cx='11' cy='21' r='2' fill='%23fff' opacity='.7'/%3E%3Cpath d='M22 8 L5 8 L5 26' fill='none' stroke='%23ffd24a' stroke-width='1.2'/%3E%3Ccircle cx='5' cy='31' r='4.5' fill='%233a7bd5' stroke='%231d1a17' stroke-width='1.3'/%3E%3Ccircle cx='3.6' cy='29.6' r='1.1' fill='%23fff' opacity='.7'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-ornament b { position: relative; z-index: 2; color: #fff3c2; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.name-frame.frame-idea { position: relative; isolation: isolate; padding-left: 1.05em !important; padding-right: 1.05em !important; border-radius: 999px; overflow: visible; white-space: nowrap; border: 2px solid transparent; background: linear-gradient(180deg, #2a3570, #141a3c) padding-box, linear-gradient(180deg, #fff6c8, #ffd24a 45%, #e0901c) border-box; box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 0 10px rgba(255,210,74,0.55); }
.name-frame.frame-idea::before { content: '' !important; position: absolute; left: -0.78em; right: -0.78em; top: -0.95em; bottom: -0.42em; transform: none; font-size: inherit; text-shadow: none; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 17'%3E%3Cdefs%3E%3C/defs%3E%3Cg stroke='%23ffe27a' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M10 0.6 V2.4 M3 3.6 L4.4 5 M17 3.6 L15.6 5'/%3E%3C/g%3E%3Cpath d='M10 3.4 Q15 3.4 15 8.4 Q15 10.6 13.2 12 L13.2 13.6 H6.8 L6.8 12 Q5 10.6 5 8.4 Q5 3.4 10 3.4Z' fill='%23ffd24a' stroke='%231d1a17' stroke-width='1.4' stroke-linejoin='round'/%3E%3Crect x='7.2' y='13.4' width='5.6' height='2.4' rx='.8' fill='%239aa6b4' stroke='%231d1a17' stroke-width='1'/%3E%3C/svg%3E") center top / auto 0.95em no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='ib' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff6c8'/%3E%3Cstop offset='.55' stop-color='%23ffd24a'/%3E%3Cstop offset='1' stop-color='%23e0901c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='%23ffe27a' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M12 4 V7 M3.5 8 L5.6 10.1 M20.5 8 L18.4 10.1 M1 17 H3.6'/%3E%3C/g%3E%3Cpath d='M12 9 Q19 9 19 16.5 Q19 20 16.2 22.4 Q15 23.5 15 25.5 H9 Q9 23.5 7.8 22.4 Q5 20 5 16.5 Q5 9 12 9Z' fill='url(%23ib)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M8.6 14.6 Q9.4 11.6 12 11.4' fill='none' stroke='%23ffffff' stroke-width='1.3' stroke-linecap='round' opacity='.8'/%3E%3Cpath d='M9.6 21 Q12 17.5 14.4 21' fill='none' stroke='%23b8700f' stroke-width='1.2' stroke-linecap='round'/%3E%3Crect x='8.6' y='25.5' width='6.8' height='3.4' rx='1' fill='%23aab4c0' stroke='%231d1a17' stroke-width='1.3'/%3E%3Cpath d='M9.4 28.9 H14.6 Q14.6 32 12 32 Q9.4 32 9.4 28.9Z' fill='%236b7785' stroke='%231d1a17' stroke-width='1.3'/%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 40'%3E%3Cdefs%3E%3ClinearGradient id='ib' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff6c8'/%3E%3Cstop offset='.55' stop-color='%23ffd24a'/%3E%3Cstop offset='1' stop-color='%23e0901c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cg stroke='%23ffe27a' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M12 4 V7 M3.5 8 L5.6 10.1 M20.5 8 L18.4 10.1 M1 17 H3.6'/%3E%3C/g%3E%3Cpath d='M12 9 Q19 9 19 16.5 Q19 20 16.2 22.4 Q15 23.5 15 25.5 H9 Q9 23.5 7.8 22.4 Q5 20 5 16.5 Q5 9 12 9Z' fill='url(%23ib)' stroke='%231d1a17' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M8.6 14.6 Q9.4 11.6 12 11.4' fill='none' stroke='%23ffffff' stroke-width='1.3' stroke-linecap='round' opacity='.8'/%3E%3Cpath d='M9.6 21 Q12 17.5 14.4 21' fill='none' stroke='%23b8700f' stroke-width='1.2' stroke-linecap='round'/%3E%3Crect x='8.6' y='25.5' width='6.8' height='3.4' rx='1' fill='%23aab4c0' stroke='%231d1a17' stroke-width='1.3'/%3E%3Cpath d='M9.4 28.9 H14.6 Q14.6 32 12 32 Q9.4 32 9.4 28.9Z' fill='%236b7785' stroke='%231d1a17' stroke-width='1.3'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat; }
.name-frame.frame-idea b { position: relative; z-index: 2; color: #fff3c2; text-shadow: 0 1px 0 rgba(0,0,0,0.7), 0 0 4px rgba(0,0,0,0.45); }
.sh-frame-pv .name-frame { margin: 0 0.9em; max-width: calc(100% + 26px); font-size: 12.5px; }
.sh-frame-pv .name-frame b { display: block; max-width: 7.6em; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .name-frame.frame-silver, .name-frame.frame-gold, .name-frame.frame-legend, .name-frame.frame-lights { animation: none; } }
/* FRAMES17-END */

/* v1.7.0 the Christmas Pass: red velvet and pine green, gold edges, snow falling over it */
.ps-xmas .ps-card { background: linear-gradient(180deg, #8f1420 0%, #5a0c16 38%, #0f3a1e 100%) !important; border-color: #ffd24a !important; box-shadow: 0 0 0 3px #1d1a17, 0 0 40px rgba(255, 80, 90, 0.35) !important; position: relative; overflow: hidden; }
.ps-xmas .ps-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.9) 0 1.4px, transparent 2px), radial-gradient(circle, rgba(255,255,255,0.6) 0 2px, transparent 2.6px);
  background-size: 90px 90px, 160px 160px; animation: xmSnow 12s linear infinite; opacity: .6; }
.ps-xmas .ps-card > * { position: relative; z-index: 1; }
.ps-xmas .ps-title h2 { color: #fff; text-shadow: 0 2px 0 #1d1a17, 0 0 14px rgba(255, 210, 74, 0.6); }
.ps-xmas .ps-xic .uic { width: 54px; height: 54px; filter: drop-shadow(0 0 8px rgba(255, 210, 74, 0.7)); }
.ps-xmas .ps-elite { background: linear-gradient(90deg, rgba(255,210,74,0.22), rgba(255,210,74,0.06)) !important; border-color: #ffd24a !important; }
.ps-xmas .ps-rl.e { background: linear-gradient(180deg, #ffd24a, #d4951c) !important; color: #5a0e0e !important; }
.ps-xmas .ps-rl.f { background: linear-gradient(180deg, #2f9e4a, #1f6b2c) !important; color: #fff !important; }
.ps-xmas .ps-cell.e { background: linear-gradient(180deg, rgba(255,210,74,0.16), rgba(120,10,24,0.35)) !important; }
.ps-xmas .ps-cell.f { background: linear-gradient(180deg, rgba(47,158,74,0.2), rgba(10,40,20,0.4)) !important; }
.ps-xmas .ps-col[data-l="50"] .ps-cell { box-shadow: 0 0 0 3px #ffd24a, 0 0 22px rgba(255, 210, 74, 0.75) !important; }

/* v1.7.0 the players' ideas board (Settings → Ideas) */
.ideas { display: flex; flex-direction: column; gap: 10px; color: #fff8e6; }
.id-hero { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: linear-gradient(135deg, #2a3570, #1a1f45); border: 2px solid #1d1a17; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12), 0 0 0 2px rgba(255, 210, 74, .35); }
.id-hic { flex: none; width: 52px; height: 52px; filter: drop-shadow(0 0 10px rgba(255, 210, 74, .55)); animation: idGlow 2.6s ease-in-out infinite; }
.id-hic .uic, .id-hic svg { width: 100%; height: 100%; }
@keyframes idGlow { 50% { filter: drop-shadow(0 0 18px rgba(255, 210, 74, .9)); } }
.id-hero b { display: block; font-family: var(--font-display, 'Lilita One', sans-serif); font-weight: 400; font-size: 22px; color: #ffd24a; text-shadow: 0 2px 0 #1d1a17; }
.id-hero span { display: block; font-size: 13.5px; line-height: 1.35; color: #e7e3ff; }
.id-new { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .28); }
.id-new textarea { width: 100%; box-sizing: border-box; resize: none; min-height: 46px; height: 46px; padding: 9px 11px; border-radius: 10px; border: 2px solid #1d1a17; background: #fff8e6; color: #1d1a17; font: 700 15px/1.35 var(--font-body, 'Nunito', sans-serif); }
.id-new textarea:focus { outline: none; box-shadow: 0 0 0 3px rgba(255, 210, 74, .7); }
.id-row { display: flex; align-items: center; gap: 10px; }
.id-note { flex: 1; min-width: 0; font-size: 12px; color: #c9c2b0; line-height: 1.3; }
.id-count { font-size: 12px; color: #c9c2b0; font-variant-numeric: tabular-nums; }
.id-send { flex: none; width: auto !important; min-width: 0 !important; margin: 0 !important; display: inline-flex; align-items: center; gap: 6px; padding: 6px 18px !important; font-size: 17px !important; }
.id-send .uic, .id-send svg { width: 22px; height: 22px; }
.id-msg { min-height: 1em; font-size: 13px; font-weight: 800; }
.id-msg.bad { color: #ff8f80; } .id-msg.ok { color: #8ee04f; }
.id-off { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .28); font-size: 13.5px; color: #c9c2b0; }
.id-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.id-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 2px solid #1d1a17; background: #2f3648; color: #fff8e6; font: 800 14px var(--font-body, 'Nunito', sans-serif); cursor: pointer; box-shadow: 0 3px 0 #1d1a17; }
.id-tabs button .uic, .id-tabs button svg { width: 22px; height: 22px; }
.id-tabs button.on { background: linear-gradient(180deg, #ffd84a, #f39a1b); color: #1d1a17; }
.id-list { display: flex; flex-direction: column; gap: 8px; }
.id-empty { display: flex; align-items: center; gap: 10px; margin: 6px 0; padding: 14px; border-radius: 14px; background: rgba(0, 0, 0, .2); color: #c9c2b0; font-size: 14px; }
.id-empty .uic, .id-empty svg { width: 34px; height: 34px; flex: none; opacity: .85; }
.id-card { padding: 10px 12px; border-radius: 14px; background: linear-gradient(180deg, #3a4258, #2a3042); border: 2px solid #1d1a17; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1), 0 3px 0 #1d1a17; }
.id-card.st-plan { background: linear-gradient(180deg, #4a3d1a, #2e2614); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12), 0 3px 0 #1d1a17, 0 0 0 2px rgba(255, 210, 74, .55); }
.id-card.st-done { background: linear-gradient(180deg, #1f4a2a, #15301c); }
.id-card.st-pend, .id-card.st-rej { opacity: .85; }
.id-card p { margin: 0 0 8px; font-size: 15px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.id-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.id-st { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 4px; border-radius: 999px; font-size: 12px; font-weight: 900; background: rgba(0, 0, 0, .35); }
.id-st .uic, .id-st svg { width: 18px; height: 18px; }
.id-st.st-plan { background: #ffd24a; color: #1d1a17; }
.id-st.st-done { background: #8ee04f; color: #1d1a17; }
.id-st.st-pend { color: #c9c2b0; }
.id-st.st-rej { color: #ff8f80; }
.id-lang { font-style: normal; font-size: 11px; font-weight: 900; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); color: #c9c2b0; }
.id-paid { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 900; color: #8ff0ff; }
.id-paid .uic, .id-paid svg { width: 18px; height: 18px; }
.id-like { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; border: 2px solid #1d1a17; background: #fff8e6; color: #1d1a17; font: 900 15px var(--font-body, 'Nunito', sans-serif); cursor: pointer; box-shadow: 0 3px 0 #1d1a17; font-variant-numeric: tabular-nums; }
.id-like .uic, .id-like svg { width: 24px; height: 24px; filter: grayscale(1) brightness(1.15); transition: filter .15s; }
.id-like.on { background: linear-gradient(180deg, #8fc0ff, #4f8fe8); color: #fff; }
.id-like.on .uic, .id-like.on svg { filter: none; }
.id-like:disabled { cursor: default; opacity: .75; }
.id-like.pop { animation: idPop .35s ease-out; }
@keyframes idPop { 40% { transform: scale(1.18) rotate(-6deg); } }
@media (max-height: 560px), (max-width: 560px) {
  .id-hero { padding: 7px 10px; } .id-hic { width: 38px; height: 38px; } .id-hero b { font-size: 18px; } .id-hero span { font-size: 12px; }
  .id-new textarea { min-height: 40px; font-size: 14px; } .id-note { display: none; }
  .id-tabs { gap: 4px; } .id-tabs button { padding: 4px 9px 4px 5px; font-size: 12px; } .id-tabs button .uic, .id-tabs button svg { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) { .id-hic, .id-like.pop { animation: none; } }
.adm-ifilter { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.adm-ifilter .me-b.on { background: #ffd24a; color: #1d1a17; }
.adm-ideatab .adm-itext { max-width: 360px; white-space: normal; overflow-wrap: anywhere; font-weight: 700; }
.adm-ideatab .adm-iact { display: flex; flex-wrap: wrap; gap: 4px; min-width: 180px; }
.id-row .id-count { margin-left: auto; }

/* v1.7.1 Christmas (html.xmas, set in <head> by Device.js): the loading screens' SURVIVAL.io wears a snow cap, a sprig of
   holly (not on Playgama: its Winter Festival has no Christmas symbols — the logo keeps "KINGDOMS" there) and a string of
   blinking lights under it; snow falls behind */
html.xmas #bootLoader .logo, html.xmas #loadingScreen .logo { position: relative; display: inline-block; padding: 0.12em 0.3em 0.34em; }
html.xmas #bootLoader .logo::before, html.xmas #loadingScreen .logo::before { content: ''; position: absolute; left: 50%; top: -0.08em; width: 5.4em; height: 0.42em; transform: translateX(-52%); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 560 42'%3E%3Cpath d='M8 30 C30 8 60 14 80 22 C100 6 140 10 160 24 C190 8 220 12 240 22 C262 6 300 10 320 24 C350 8 380 14 400 22 C430 6 470 10 490 24 C512 10 540 14 552 30 C540 38 520 34 500 38 C470 34 440 40 410 36 C380 40 340 34 310 38 C280 34 250 40 220 36 C190 40 150 34 120 38 C90 34 60 40 30 36 Z' fill='%23ffffff' stroke='%231d1a17' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
html.xmas:not(.pg) #bootLoader .logo::after, html.xmas:not(.pg) #loadingScreen .logo::after { content: ''; position: absolute; left: auto; right: -0.1em; top: -0.28em; width: 0.95em; height: 0.64em; pointer-events: none; display: block; margin: 0; letter-spacing: 0; text-indent: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Cpath d='M30 22 C22 8 8 6 2 14 C8 16 10 20 8 24 C16 22 24 24 30 22Z M30 22 C38 8 52 6 58 14 C52 16 50 20 52 24 C44 22 36 24 30 22Z' fill='%232f9e4a' stroke='%231d1a17' stroke-width='3' stroke-linejoin='round'/%3E%3Ccircle cx='25' cy='26' r='6' fill='%23e5263c' stroke='%231d1a17' stroke-width='2.5'/%3E%3Ccircle cx='35' cy='26' r='6' fill='%23e5263c' stroke='%231d1a17' stroke-width='2.5'/%3E%3Ccircle cx='30' cy='32' r='6' fill='%23e5263c' stroke='%231d1a17' stroke-width='2.5'/%3E%3C/svg%3E") center / contain no-repeat; }
html.xmas #bootLoader .logo span, html.xmas #loadingScreen .logo span { position: relative; }
html.xmas #bootLoader .bl-card, html.xmas #loadingScreen .loading-card, html.xmas #loadingScreen > div:first-child { position: relative; }
html.xmas #bootLoader .logo, html.xmas #loadingScreen .logo { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24'%3E%3Cpath d='M0 6 Q50 22 100 6 T200 6 T300 6 T400 6' fill='none' stroke='%231d1a17' stroke-width='2'/%3E%3Cg stroke='%231d1a17' stroke-width='1.5'%3E%3Ccircle cx='25' cy='13' r='5' fill='%23ff4f4f'/%3E%3Ccircle cx='75' cy='13' r='5' fill='%23ffd24a'/%3E%3Ccircle cx='125' cy='13' r='5' fill='%234fc3ff'/%3E%3Ccircle cx='175' cy='13' r='5' fill='%237dff7a'/%3E%3Ccircle cx='225' cy='13' r='5' fill='%23ff8fd0'/%3E%3Ccircle cx='275' cy='13' r='5' fill='%23ff4f4f'/%3E%3Ccircle cx='325' cy='13' r='5' fill='%23ffd24a'/%3E%3Ccircle cx='375' cy='13' r='5' fill='%234fc3ff'/%3E%3C/g%3E%3C/svg%3E") center bottom / 100% 0.36em no-repeat; animation: xmLogoGlow 1.6s steps(2) infinite; }
@keyframes xmLogoGlow { 50% { filter: brightness(1.12) drop-shadow(0 0 6px rgba(255, 220, 120, 0.55)); } }
html.xmas #bootLoader, html.xmas #loadingScreen { background-image: radial-gradient(circle at 23% 31%, rgba(255,255,255,0.9) 0 1.5px, transparent 2.1px), radial-gradient(circle at 71% 64%, rgba(255,255,255,0.75) 0 2.2px, transparent 2.8px), radial-gradient(circle at 46% 12%, rgba(255,255,255,0.6) 0 1.2px, transparent 1.8px), radial-gradient(circle at 88% 22%, rgba(255,255,255,0.8) 0 1.8px, transparent 2.4px), radial-gradient(ellipse at center, #13231b, #050a08 75%);
  background-size: 137px 151px, 233px 197px, 89px 103px, 171px 263px, 100% 100%; background-position: 0 0, 40px 70px, 13px 29px, 90px 10px, 0 0; animation: xmLoadSnow 16s linear infinite; }
@keyframes xmLoadSnow { to { background-position: 25px 151px, 10px 267px, 33px 132px, 60px 273px, 0 0; } }
@media (prefers-reduced-motion: reduce) { html.xmas #bootLoader, html.xmas #loadingScreen, html.xmas #bootLoader .logo, html.xmas #loadingScreen .logo { animation: none; } }

