:root {
  --navy-deep: #111830;
  --navy-card: #192347;
  --navy-light: #263569;
  --border-player: #4c73c4;
  --border-enemy: #c43f5e;
  --border-dark: #0a0d1a;
  --gold: #ffbe2e;
  --orange: #ff7a1f;
  --cream: #f5eedc;
  --text: #f5f8ff;
  --muted: #9eb0dc;
  --hp-green: #42db54;
  --hp-yellow: #ffd13b;
  --hp-red: #ff4747;
  --font-pixel: "Press Start 2P", "Silkscreen", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #241b14;
  color: var(--text);
  font-family: var(--font-pixel);
}

#app { width: 100vw; height: 100vh; position: relative; }

.screen { position: absolute; inset: 0; display: none; }
.screen.active { display: flex; align-items: center; justify-content: center; }
.hidden { display: none !important; }

/* ==================== MENU / 4-PLAYER LOBBY ==================== */
#menu-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  filter: brightness(0.54) saturate(1.06);
}

.menu-overlay {
  position: relative;
  z-index: 2;
  width: min(1200px, 97vw);
  height: 96vh;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(18, 25, 50, 0.94);
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 3px var(--border-dark), 0 5px 0 rgba(0, 0, 0, 0.45);
  padding: 7px 14px;
  flex-shrink: 0;
}

.badge-mini {
  display: inline-block;
  background: var(--orange);
  color: #140b03;
  font-size: 7.5px;
  padding: 4px 7px;
  margin-bottom: 5px;
}

.game-title {
  font-size: clamp(16px, 2.2vw, 23px);
  color: #fff2b2;
  text-shadow: 3px 3px 0 #120d1f;
  letter-spacing: 1px;
}

.game-subtitle {
  margin-top: 5px;
  font-size: 7.5px;
  color: var(--muted);
  line-height: 1.5;
}

.select-grid {
  display: grid;
  grid-template-columns: 1.08fr 1.12fr;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.left-panel,
.inspector-panel {
  overflow-y: auto;
  min-height: 0;
}

.pixel-panel {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.025) 0px,
      rgba(255, 255, 255, 0.025) 2px,
      transparent 2px,
      transparent 4px
    ),
    rgba(22, 31, 61, 0.95);
  border: 3px solid #6379b5;
  box-shadow: 0 0 0 3px var(--border-dark), 0 8px 0 rgba(0, 0, 0, 0.4);
  padding: 13px;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
  border-bottom: 2px solid #2e3e73;
  padding-bottom: 7px;
}

.panel-title { font-size: 10px; color: var(--gold); }
.panel-hint { font-size: 7px; color: var(--muted); }

.slot-inline {
  background: var(--gold);
  color: #140c03;
  padding: 2px 6px;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.roster-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: #141c38;
  border: 2px solid #35477d;
  padding: 4px 2px;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.08s ease;
  text-align: center;
  color: var(--text);
  font-family: var(--font-pixel);
}

.roster-card:hover { border-color: #9bb3f0; transform: translateY(-2px); }
.roster-card.selected {
  background: #233266;
  border-color: var(--gold);
  box-shadow: inset 0 0 0 2px rgba(255, 190, 46, 0.35);
}

.roster-card img {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  border: 2px solid #0d1224;
  background: #1d2645;
  flex-shrink: 0;
}

.roster-card-name {
  font-size: 5.5px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.type-row { display: flex; flex-wrap: wrap; gap: 4px; }
.type-badge {
  font-size: 6.5px;
  padding: 3px 5px;
  border: 1px solid;
  box-shadow: 0 0 0 1px #090c17;
  line-height: 1;
}
.type-row.compact .type-badge { font-size: 6px; padding: 2px 4px; }

.match-options {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 2px solid #2e3e73;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.option-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.option-label { display: block; font-size: 7px; color: var(--muted); margin-bottom: 5px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 5px; }

.pill-btn {
  font-family: var(--font-pixel);
  font-size: 7px;
  padding: 6px 7px;
  background: #131b36;
  color: #c8d6f5;
  border: 2px solid #3c4f8a;
  cursor: pointer;
}
.pill-btn:hover { border-color: #9cb4f5; }
.pill-btn.active { background: var(--orange); color: #140b03; border-color: #ffd394; }
.pill-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* 4-Player Slots Strip */
.slots-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.slot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #111830;
  border: 2px solid #35477d;
  padding: 6px 4px;
  cursor: pointer;
  position: relative;
}

.slot-card.active-edit {
  border-color: var(--gold);
  background: #1e2d5c;
  box-shadow: inset 0 0 0 2px rgba(255, 190, 46, 0.35);
}

.slot-card.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.slot-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 7px;
}

.slot-tag { font-weight: bold; }
.slot-team { font-size: 6px; padding: 2px 3px; background: #263569; color: #9fd8ff; }
.slot-team.b { background: #6e223a; color: #ffb3c4; }

.slot-card img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  border: 2px solid #090c17;
}

.slot-char-name { font-size: 7px; color: #ffffff; }

.slot-ctrl-btn {
  font-family: var(--font-pixel);
  font-size: 6px;
  padding: 3px 5px;
  background: #22305c;
  color: #dce6ff;
  border: 1px solid #5972b3;
  cursor: pointer;
}
.slot-ctrl-btn.human {
  background: #2eb868;
  color: #072112;
  border-color: #89f5b0;
}

/* Inspector */
.inspector-top { display: flex; gap: 11px; margin-bottom: 8px; }
.inspector-preview-col { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; }

.inspector-preview-box {
  width: 102px;
  height: 102px;
  flex-shrink: 0;
  background: radial-gradient(circle at 50% 62%, #334f8f, #131b33);
  border: 3px solid #6379b5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-mode-btn {
  width: 102px;
  font-family: var(--font-pixel);
  font-size: 6px;
  padding: 5px 4px;
  background: #2b1d4d;
  color: #ffe27a;
  border: 2px solid #9c6bff;
  cursor: pointer;
}
.preview-mode-btn.active {
  background: #ff961f;
  color: #170a02;
  border-color: #fff0a8;
}

#inspector-sprite-canvas { width: 94px; height: 94px; image-rendering: pixelated; }

.inspector-meta { flex: 1; min-width: 0; }
.inspector-name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
#insp-name { font-size: 14px; color: #fff2b2; }
.inspector-role { margin-top: 4px; font-size: 7px; color: #79d8ff; }
.inspector-desc { margin-top: 5px; font-family: "Silkscreen", monospace; font-size: 11px; color: #d6e2ff; line-height: 1.3; }
.inspector-stats { display: flex; gap: 7px; margin-top: 7px; }
.stat-chip { background: #10172e; border: 2px solid #35477d; padding: 4px 6px; font-size: 7px; color: var(--muted); }
.stat-chip strong { color: #ffffff; }

.abilities-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8px;
  color: var(--gold);
  margin-bottom: 6px;
  padding-top: 7px;
  border-top: 2px solid #2e3e73;
}
.keys-hint { font-size: 6.5px; color: var(--muted); }

.inspector-abilities { display: flex; flex-direction: column; gap: 5px; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.pixel-btn.online-cta {
  background: #207d4f;
  border-color: #7cffb5;
  color: #ffffff;
}

.online-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(16, 44, 34, 0.95);
  border: 2px solid #5cff9d;
  box-shadow: 0 0 0 2px #0a0d1a;
  padding: 7px 12px;
  font-size: 8px;
}
.online-banner-left { display: flex; align-items: center; gap: 8px; color: #c7ffe0; }
.online-banner-actions { display: flex; gap: 6px; }
.online-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #4eff8a; box-shadow: 0 0 8px #4eff8a;
  display: inline-block;
}
.ping-pill {
  background: #0d162e;
  border: 1px solid #5ce1ff;
  color: #7ef2ff;
  font-size: 6.5px;
  padding: 3px 6px;
}

.online-box { gap: 12px; }
.online-divider { font-size: 7px; color: var(--muted); }
.online-join-row { display: flex; gap: 8px; }
.pixel-input {
  flex: 1;
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 9px 10px;
  background: #0d1429;
  color: #fff2b2;
  border: 3px solid #4c64a8;
  text-transform: uppercase;
  outline: none;
}
.pixel-input:focus { border-color: var(--gold); }
.online-status {
  font-family: "Silkscreen", monospace;
  font-size: 11px;
  padding: 8px 10px;
  background: #101833;
  border: 2px solid #5972b3;
  color: #9fd8ff;
}
.online-status.error { border-color: #ff5c7a; color: #ff9cb0; }
.online-status.ready { border-color: #5cff9d; color: #89ffb5; }

.insp-ab-row {
  display: grid;
  grid-template-columns: 30px 42px 1fr;
  gap: 7px;
  align-items: center;
  background: #111830;
  border: 2px solid #2d3d70;
  border-left-width: 5px;
  padding: 5px 7px;
}
.insp-ab-thumb {
  width: 42px;
  height: 42px;
  border: 2px solid #090c17;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
}
.insp-ab-key {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream); color: #14192b;
  border: 2px solid #0c101f; font-size: 10px;
}
.insp-ab-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
.insp-ab-name { font-size: 8px; color: #ffffff; }
.insp-ab-meta { display: flex; align-items: center; gap: 5px; font-size: 6.5px; }
.cat-pill { padding: 2px 5px; color: #0d101c; font-weight: bold; }
.cd-pill { color: #9cb4f5; }
.insp-ab-desc { font-family: "Silkscreen", monospace; font-size: 10px; color: #c2d1f5; line-height: 1.24; }

.menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(16, 22, 43, 0.94);
  border: 3px solid #6379b5;
  box-shadow: 0 0 0 3px var(--border-dark);
  padding: 9px 15px;
}

.controls-strip { display: flex; flex-wrap: wrap; gap: 10px; font-size: 7.5px; color: #d6e2ff; }
.controls-strip kbd {
  display: inline-block;
  background: var(--cream);
  color: #14192b;
  padding: 2px 5px;
  border: 2px solid #090c17;
  margin-right: 3px;
  font-family: var(--font-pixel);
  font-size: 7px;
}
.p2-hint { color: #89f5b0; }

.pixel-btn {
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 10px 15px;
  background: #273669;
  color: #ffffff;
  border: 3px solid #7c94d4;
  box-shadow: 0 0 0 2px #090d1a, 0 4px 0 #090d1a;
  cursor: pointer;
}
.pixel-btn:hover { filter: brightness(1.12); }
.pixel-btn:active { transform: translateY(2px); }
.pixel-btn.small { font-size: 8px; padding: 7px 10px; }
.pixel-btn.primary-cta { background: var(--orange); color: #170a02; border-color: #ffe09e; font-size: 11.5px; padding: 11px 20px; }
.pixel-btn.danger { background: #a8283b; border-color: #ff8598; }

/* ==================== FULL-BLEED BATTLE SCREEN ==================== */
#battle-screen { background: #241b14; }
.battle-stage { position: relative; width: 100vw; height: 100vh; overflow: hidden; }
#game-canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; cursor: none; }

/* Dynamic 2P–4P Top HUD */
.hud-top {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 5;
}

.hud-column {
  width: 286px;
  max-width: 34vw;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fighter-hud { display: flex; flex-direction: column; gap: 5px; }
.fighter-hud.ko { opacity: 0.5; filter: grayscale(0.8); }

.hud-card {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(23, 32, 66, 0.96);
  border: 3px solid var(--border-player);
  box-shadow: 0 0 0 2px #0a0d1a, 0 4px 0 rgba(0, 0, 0, 0.45);
  padding: 5px 7px;
}
.hud-card.enemy { border-color: var(--border-enemy); }
.hud-card.compact { padding: 4px 6px; }

.portrait-frame {
  width: 50px; height: 50px;
  border: 2px solid #090d1a;
  background: #182140;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.hud-card.compact .portrait-frame { width: 38px; height: 38px; }
.portrait-frame img { width: 100%; height: 100%; image-rendering: pixelated; }

.slot-corner {
  position: absolute;
  bottom: 0;
  left: 0;
  background: rgba(10, 14, 28, 0.9);
  font-size: 6px;
  padding: 2px 3px;
}

.hud-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hud-name-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.hud-name { font-size: 9.5px; color: #ffffff; text-shadow: 2px 2px 0 #090c17; }
.hud-card.compact .hud-name { font-size: 8px; }

.hp-segments {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 2px;
  height: 11px;
  background: #0b0f1e;
  border: 2px solid #060912;
  padding: 2px;
}
.hud-card.compact .hp-segments { height: 9px; }

.hp-seg { background: #212a47; height: 100%; }
.hp-seg.filled.green { background: var(--hp-green); }
.hp-seg.filled.yellow { background: var(--hp-yellow); }
.hp-seg.filled.red { background: var(--hp-red); }

.hp-sub-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.hp-num { font-size: 7.5px; color: #e4ecff; }
.shield-num { font-size: 6.5px; color: #63ffd1; }

.round-pips { display: flex; gap: 3px; }
.round-pip { width: 9px; height: 9px; background: #121830; border: 2px solid #59699b; }
.round-pip.won { background: var(--gold); border-color: #fff2b2; }

/* Chakra Awakening Gauge inside Fighter HUD */
.chakra-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}
.chakra-track {
  flex: 1;
  height: 7px;
  background: #0a0f1f;
  border: 1px solid #2e3e73;
  overflow: hidden;
}
.chakra-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2b8eff, #63e6ff);
  transition: width 0.08s linear;
}
.chakra-fill.ready {
  background: linear-gradient(90deg, #ff8a1f, #ffe85c);
  animation: pulseGlow 0.65s infinite alternate;
}
.chakra-fill.active {
  background: linear-gradient(90deg, #ff3864, #ffd84d);
}
.chakra-label {
  font-size: 6px;
  color: #8fd8ff;
  white-space: nowrap;
}
.chakra-label.ready { color: #ffe44d; }
.hud-card.awakened {
  border-color: #ffbe2e !important;
  box-shadow: 0 0 0 2px #0a0d1a, 0 0 14px rgba(255, 190, 46, 0.7);
}

@keyframes pulseGlow {
  from { filter: brightness(0.95); }
  to { filter: brightness(1.35); }
}

.skill-slot.awakening-slot {
  flex: 1.08;
  border-color: #ffe066;
}
.skill-slot.awakening-slot.ready {
  animation: pulseGlow 0.55s infinite alternate;
  box-shadow: 0 0 12px rgba(255, 210, 60, 0.85), inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
.skill-slot.awakening-slot.locked {
  filter: saturate(0.65) brightness(0.83);
}

.enemy-callout {
  width: 100%;
  text-align: center;
  background: rgba(24, 18, 44, 0.95);
  border: 2px solid var(--border-enemy);
  box-shadow: 0 0 0 2px #0a0d1a;
  padding: 4px 7px;
  font-size: 7.5px;
  color: #ffe380;
}

.status-strip { display: flex; flex-wrap: wrap; gap: 3px; }
.status-strip.right { justify-content: flex-end; }
.status-pill { font-size: 6px; padding: 2px 4px; border: 2px solid #0a0d1a; color: #0b0e1a; font-weight: bold; }
.status-pill.buff { background: #5cff9d; }
.status-pill.sharingan { background: #ff3859; color: #ffffff; }
.status-pill.debuff { background: #ff789a; color: #1f0610; }
.status-pill.genjutsu { background: #c45eff; color: #ffffff; }
.status-pill.slow { background: #6be6ff; }

/* Center Timer */
.hud-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.timer-box {
  background: rgba(23, 32, 66, 0.96);
  border: 3px solid #5972b3;
  box-shadow: 0 0 0 2px #0a0d1a;
  padding: 6px 14px;
  text-align: center;
}
.timer-val { font-size: 11px; color: #ffffff; }
.round-val { margin-top: 4px; font-size: 7px; color: #c5d4ff; }

.hud-mini-controls { display: flex; gap: 4px; pointer-events: auto; }
.mini-hud-btn {
  font-family: var(--font-pixel);
  font-size: 6.5px;
  padding: 4px 7px;
  background: rgba(20, 28, 56, 0.94);
  color: #cfd9f5;
  border: 2px solid #4c6099;
  cursor: pointer;
}
.mini-hud-btn:hover { border-color: var(--gold); color: #ffffff; }

/* Bottom Skill Bar */
.hud-bottom {
  position: absolute;
  bottom: 8px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 5;
}

.skill-tooltip {
  max-width: 600px;
  background: rgba(15, 21, 43, 0.96);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 2px #080b14;
  padding: 7px 12px;
  font-family: "Silkscreen", monospace;
  font-size: 11px;
  color: #f0f5ff;
  text-align: center;
}

.skill-bar {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  width: min(960px, 97vw);
  pointer-events: auto;
}

.skill-slot {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 58px;
  background-color: #151f36;
  background-size: auto 37px;
  background-position: center 2px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  border: 3px solid #0d111f;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.28), inset 0 -3px 0 rgba(0, 0, 0, 0.45), 0 3px 0 rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4px 5px 8px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.06s ease;
}
.skill-slot:hover { transform: translateY(-2px); }
.skill-slot.utility { flex: 0.85; }
.skill-slot.on-cd { filter: saturate(0.65) brightness(0.86); }
.skill-slot.no-chakra { filter: saturate(0.65) brightness(0.83); border-color: #2c4a7a; }
.skill-cost-badge {
  position: absolute; top: 0; right: 16px;
  background: rgba(8, 22, 46, 0.92);
  color: #63e6ff;
  border-left: 1px solid #2b8eff;
  border-bottom: 1px solid #2b8eff;
  font-size: 6px; padding: 2px 4px;
  white-space: nowrap;
  z-index: 3;
}
.skill-slot.no-chakra .skill-cost-badge { color: #ff6b85; border-color: #ff4d6d; }

/* Wide Live Jutsu Chakra Bar right above Bottom Skill Bar */
.player-chakra-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(12, 18, 36, 0.92);
  border: 2px solid #2b8eff;
  box-shadow: 0 2px 0 #090d1a, inset 0 1px 0 rgba(120, 230, 255, 0.35);
  padding: 4px 10px;
  margin-bottom: 4px;
}
.player-chakra-title {
  font-size: 7.5px;
  color: #7eeeff;
  text-shadow: 1px 1px 0 #091022;
  white-space: nowrap;
}
.player-chakra-track {
  position: relative;
  flex: 1;
  height: 11px;
  background: #080d1d;
  border: 2px solid #243b6b;
  overflow: hidden;
}
.player-chakra-fill {
  height: 100%;
  width: 62%;
  background: linear-gradient(90deg, #1b78f2, #38c9ff 65%, #9bf8ff);
  box-shadow: 0 0 10px rgba(72, 224, 255, 0.65);
  transition: width 0.05s linear;
}
.chakra-tick {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: rgba(8, 12, 26, 0.78);
  pointer-events: none;
}
.player-chakra-text {
  font-size: 8px;
  color: #ffffff;
  min-width: 62px;
  text-align: right;
  text-shadow: 1px 1px 0 #091022;
}
.player-chakra-hint {
  font-size: 6px;
  color: #8ab8e6;
  white-space: nowrap;
}
.mp-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.mp-track {
  flex: 1;
  height: 6px;
  background: #080e1f;
  border: 1px solid #245799;
  overflow: hidden;
}
.mp-fill {
  height: 100%;
  width: 62%;
  background: linear-gradient(90deg, #1e82ff, #63f0ff);
  transition: width 0.06s linear;
}
.mp-label {
  font-size: 6px;
  color: #63e6ff;
  white-space: nowrap;
}

.skill-key-badge {
  position: absolute; top: 0; left: 0;
  background: var(--cream); color: #131829;
  font-size: 7px; padding: 3px 5px;
  border-right: 2px solid #0d111f; border-bottom: 2px solid #0d111f;
  z-index: 3;
}
.skill-ready-dot {
  position: absolute; top: 4px; right: 5px;
  width: 6px; height: 6px;
  background: #6eff89; border: 1px solid #0d111f; z-index: 3;
}
.skill-slot.on-cd .skill-ready-dot { background: #444f70; }

.skill-name {
  position: relative; z-index: 3;
  font-size: 7.5px; color: #ffffff;
  text-shadow: 2px 2px 0 #0d111f;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}

.skill-cd-overlay {
  position: absolute; right: 2px; bottom: 15px;
  background: #11182c;
  padding: 2px 3px;
  font-size: 8px; color: #ffe466; z-index: 4;
  white-space: nowrap;
}

.skill-cd-bar { position: absolute; left: 0; bottom: 0; height: 4px; background: #ffe066; z-index: 5; }

/* Modals */
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 12, 26, 0.78);
  display: flex; align-items: center; justify-content: center; z-index: 20;
}
.modal-box { width: min(490px, 92%); text-align: center; display: flex; flex-direction: column; gap: 13px; padding: 22px; }
.modal-title { font-size: 18px; color: #fff0a8; text-shadow: 3px 3px 0 #0d101f; }
.modal-sub { font-family: "Silkscreen", monospace; font-size: 11px; color: #cddaff; line-height: 1.45; }
.result-badge { align-self: center; background: var(--gold); color: #170e02; font-size: 9px; padding: 5px 10px; }
.result-badge.loss { background: #d9384e; color: #ffffff; }
.result-score { font-size: 10px; color: #82e3ff; }
.result-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.r-stat { background: #10172e; border: 2px solid #35477d; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.r-stat span { font-size: 6.5px; color: var(--muted); }
.r-stat strong { font-size: 12px; color: #ffffff; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 900px) {
  .select-grid { grid-template-columns: 1fr; overflow-y: auto; }
  .skill-name { font-size: 6.5px; }
}

@media (max-width: 600px) {
  .skill-cost-badge { right: 9px; padding: 2px 1px; }
  .skill-cost-unit { display: none; }
  .skill-key-badge { padding: 2px 2px; }
  .skill-slot.utility .skill-key-badge { font-size: 6px; }
  .skill-ready-dot { right: 1px; }
  .skill-cd-overlay { font-size: 7px; bottom: 13px; }
}


/* Online Room Ready Check, Host Kick & Copy Code */
.pixel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.45);
}
.ready-cta {
  background: #e6a020;
  border-color: #ffe480;
  color: #1a1204;
}
.ready-cta.is-ready {
  background: #22b866;
  border-color: #8affb8;
  color: #062112;
  box-shadow: 0 0 10px rgba(46, 230, 120, 0.55);
}
.slot-ready-badge {
  font-size: 6px;
  padding: 2px 4px;
  border: 1px solid #ffd452;
  background: rgba(54, 38, 10, 0.9);
  color: #ffe47a;
  margin-top: 2px;
  text-align: center;
}
.slot-ready-badge.ready {
  border-color: #63ff9f;
  background: rgba(14, 58, 32, 0.92);
  color: #85ffb5;
}
.slot-kick-btn {
  margin-top: 3px;
  width: 100%;
  font-family: inherit;
  font-size: 6px;
  padding: 2px 4px;
  background: #9c1a2e;
  border: 1px solid #ff5c78;
  color: #ffffff;
  cursor: pointer;
}
.slot-kick-btn:hover { background: #c9243d; }

/* ==================== REORGANIZED DASHBOARD: HOME & ONLINE HUB ==================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.mode-context-badge {
  font-size: 7.5px;
  padding: 6px 9px;
  background: #233266;
  border: 2px solid var(--gold);
  color: #ffe88f;
  white-space: nowrap;
}
.mode-context-badge.online {
  background: #0d3a32;
  border-color: #5cff9d;
  color: #89ffb5;
}

.home-view,
.online-hub-view,
.lobby-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.lobby-view {
  overflow: hidden;
}

.home-prompt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(16, 22, 43, 0.94);
  border: 3px solid #4c64a8;
  box-shadow: 0 0 0 3px var(--border-dark);
  padding: 12px 18px;
}
.home-prompt-title {
  font-size: clamp(11px, 1.4vw, 15px);
  color: #fff2b2;
  text-shadow: 2px 2px 0 #0b0e1c;
}
.home-prompt-sub {
  font-size: 8px;
  color: #8fd2ff;
}

.home-choice-grid,
.online-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.mode-card,
.online-hub-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 22px 20px;
  min-height: 295px;
  transition: transform 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease;
}
.mode-card {
  cursor: pointer;
}
.mode-card.bots-card {
  border-color: #e69d38;
  background:
    linear-gradient(160deg, rgba(46, 33, 18, 0.45), rgba(20, 29, 58, 0.96) 55%);
}
.mode-card.bots-card:hover,
.mode-card.bots-card:focus-visible {
  transform: translateY(-3px);
  border-color: #ffe08a;
  box-shadow: 0 0 0 3px var(--border-dark), 0 10px 0 rgba(0, 0, 0, 0.48), 0 0 22px rgba(255, 165, 40, 0.25);
  outline: none;
}
.mode-card.online-card {
  border-color: #2fd68a;
  background:
    linear-gradient(160deg, rgba(12, 54, 46, 0.55), rgba(18, 30, 58, 0.96) 55%);
}
.mode-card.online-card:hover,
.mode-card.online-card:focus-visible {
  transform: translateY(-3px);
  border-color: #85ffc5;
  box-shadow: 0 0 0 3px var(--border-dark), 0 10px 0 rgba(0, 0, 0, 0.48), 0 0 22px rgba(52, 235, 150, 0.28);
  outline: none;
}

.mode-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mode-icon-box {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #5972b3;
  background: #10172e;
  box-shadow: 0 0 0 2px #090d1a;
}
.mode-icon-box.bots-icon { border-color: #ffb84d; background: #261b0e; }
.mode-icon-box.online-icon { border-color: #46eba0; background: #0c2924; }

.mode-card-tag {
  align-self: flex-start;
  font-size: 7px;
  padding: 5px 8px;
  border: 2px solid;
}
.bots-tag {
  background: rgba(255, 146, 36, 0.18);
  border-color: #ffb347;
  color: #ffe09e;
}
.online-tag {
  background: rgba(34, 214, 132, 0.18);
  border-color: #5cffb0;
  color: #9effcf;
}

.mode-card-title {
  font-size: clamp(14px, 1.8vw, 19px);
  color: #ffffff;
  text-shadow: 3px 3px 0 #0a0d1a;
  letter-spacing: 0.5px;
}
.mode-card-desc {
  font-family: "Silkscreen", monospace;
  font-size: 12px;
  color: #d4e1ff;
  line-height: 1.5;
  flex: 1;
}
.mode-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mode-card-chips span {
  font-size: 6.5px;
  padding: 5px 7px;
  background: #10172e;
  border: 2px solid #4a5e96;
  color: #ffe28f;
}
.mode-card-chips.online-chips span {
  border-color: #2f7d64;
  color: #8cffc7;
}
.mode-card-cta {
  width: 100%;
  margin-top: 4px;
  padding: 13px 16px;
  font-size: 10.5px;
}

.online-hub-card {
  min-height: 162px;
  padding: 15px 18px;
  gap: 10px;
}
.online-hub-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.online-hub-card .mode-card-title {
  font-size: clamp(12px, 1.35vw, 15px);
}
.online-hub-card .mode-card-desc {
  font-size: 11px;
  line-height: 1.4;
}
.online-hub-card.create-card {
  border-color: #ff9c38;
}
.online-hub-card.join-card {
  border-color: #46eba0;
}
.hub-join-row {
  margin-top: 2px;
}
.hub-code-input {
  font-size: 11px;
  padding: 10px 11px;
  letter-spacing: 1px;
}
.online-hub-footer {
  display: flex;
  justify-content: flex-start;
}

/* Live Open Rooms Browser Panel */
.open-rooms-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-color: #3da8ff;
  background: rgba(16, 24, 48, 0.96);
}
.open-rooms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 2px solid #2b3d73;
  padding-bottom: 8px;
  flex-wrap: wrap;
}
.open-rooms-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.open-rooms-title {
  font-size: 10.5px;
  color: #8ee7ff;
  text-shadow: 2px 2px 0 #090d1a;
}
.open-rooms-count {
  font-size: 7px;
  padding: 4px 7px;
  background: #102b3d;
  border: 1px solid #4cc9ff;
  color: #9bf2ff;
}
.open-rooms-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 195px;
  overflow-y: auto;
  padding-right: 2px;
}
.open-rooms-empty {
  font-family: "Silkscreen", monospace;
  font-size: 11px;
  color: #a4b7e3;
  text-align: center;
  padding: 20px 12px;
  background: rgba(10, 15, 32, 0.65);
  border: 2px dashed #324478;
}
.open-room-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #101833;
  border: 2px solid #3c5394;
  transition: border-color 0.1s ease, background 0.1s ease;
}
.open-room-row:hover {
  border-color: #6dffb3;
  background: #162247;
}
.open-room-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1;
}
.open-room-code {
  font-size: 10px;
  color: #fff2b2;
  background: #233266;
  border: 2px solid var(--gold);
  padding: 6px 9px;
  white-space: nowrap;
}
.open-room-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.open-room-meta-top {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.open-room-host {
  font-size: 8px;
  color: #ffffff;
}
.open-room-status {
  font-size: 6.5px;
  padding: 3px 6px;
  border: 1px solid #5cff9d;
  background: rgba(16, 68, 42, 0.9);
  color: #8cffbc;
}
.open-room-status.busy {
  border-color: #ff9c47;
  background: rgba(74, 42, 12, 0.9);
  color: #ffd08f;
}
.open-room-status.full {
  border-color: #ff5c78;
  background: rgba(74, 16, 28, 0.9);
  color: #ff9eb0;
}
.open-room-sub {
  font-family: "Silkscreen", monospace;
  font-size: 10.5px;
  color: #9fb8eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.open-room-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.open-room-players {
  font-size: 8.5px;
  color: #8effbd;
  background: #0d2a24;
  border: 2px solid #2d8768;
  padding: 5px 8px;
  white-space: nowrap;
}
.open-room-players.full {
  color: #ff9eb0;
  background: #36121c;
  border-color: #a63249;
}

/* Language Toggle Button (ES / EN) */
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: #1a2854;
  border-color: #79a7ff;
  color: #9cb4e6;
  white-space: nowrap;
}
.lang-btn:hover {
  border-color: var(--gold);
}
.lang-btn .lang-opt.active {
  color: #ffe26b;
  text-shadow: 0 0 6px rgba(255, 226, 107, 0.55);
}
.lang-btn .lang-sep {
  color: #556ca3;
}

/* Header Account & Rankings Buttons */
.rank-btn {
  background: #3d2809;
  border-color: var(--gold);
  color: #ffe88f;
  white-space: nowrap;
}
.account-btn {
  background: #1d2b57;
  border-color: #6bc4ff;
  color: #d6f1ff;
  white-space: nowrap;
}
.account-btn.logged-in {
  background: #113b2f;
  border-color: #5cff9d;
  color: #9effc9;
}

/* Home Profile / Level Progress Strip */
.profile-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(15, 22, 46, 0.95);
  border: 2px solid #4e6cc4;
  box-shadow: 0 0 0 2px var(--border-dark);
  padding: 8px 14px;
}
.profile-strip-left,
.profile-strip-right {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.profile-name-badge {
  font-size: 8.5px;
  color: #fff2b2;
  background: #233266;
  border: 2px solid var(--gold);
  padding: 4px 8px;
}
.profile-level-pill {
  font-size: 8px;
  color: #0b1912;
  background: #5cff9d;
  border: 2px solid #b5ffd2;
  padding: 4px 7px;
}
.profile-xp-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}
.profile-xp-track {
  width: 118px;
  height: 10px;
  background: #0a1024;
  border: 2px solid #355499;
  overflow: hidden;
}
.profile-xp-track.big {
  width: 100%;
  height: 14px;
}
.profile-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #27a8ff, #63ffbe);
  transition: width 0.25s ease;
}
.profile-xp-text {
  font-size: 7px;
  color: #8ee7ff;
  white-space: nowrap;
}
.profile-stat-pill {
  font-size: 7px;
  color: #c2d4ff;
  background: #10172e;
  border: 1px solid #3c5394;
  padding: 4px 7px;
  white-space: nowrap;
}
.profile-stat-pill strong { color: #ffe878; }
.profile-cta {
  font-size: 6.5px !important;
  padding: 5px 8px !important;
}

/* Locked Roster Shinobi Cards — Clean Pixel-Art Padlock Overlay */
.roster-card {
  position: relative;
}
.roster-portrait-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.roster-portrait-wrap img {
  display: block;
  width: 34px;
  height: 34px;
}
.roster-card.locked {
  background: #101529;
  border-color: #2f3b61;
}
.roster-card.locked img {
  filter: grayscale(0.85) brightness(0.42) contrast(1.1);
}
.roster-card.locked .roster-card-name {
  color: #8b99bd;
}
.roster-card.locked:hover {
  border-color: #ffbe2e;
  background: #1a213d;
}
.roster-card.locked:hover .roster-card-name {
  color: #ffe89e;
}
.roster-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(10, 14, 28, 0.35), rgba(8, 11, 22, 0.65));
  pointer-events: none;
}
.roster-lock-svg {
  filter: drop-shadow(0 1px 0 #090c17) drop-shadow(0 0 4px rgba(255, 200, 60, 0.45));
}

/* Online Empty Slots & Optional Bot Controls */
.slot-card.empty-slot {
  border-style: dashed;
  border-color: #3f6a99;
  background: rgba(13, 22, 46, 0.85);
  justify-content: space-between;
  min-height: 104px;
}
.slot-empty-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #4c6fa8;
  color: #6ea8e6;
  font-size: 13px;
  background: rgba(10, 16, 34, 0.7);
}
.slot-empty-text {
  font-size: 5.5px;
  color: #8eb4e6;
  text-align: center;
  line-height: 1.35;
}
.slot-add-bot-btn {
  width: 100%;
  font-family: var(--font-pixel);
  font-size: 5.5px;
  padding: 4px 3px;
  background: #176944;
  border: 1px solid #5cffb0;
  color: #d8ffec;
  cursor: pointer;
}
.slot-add-bot-btn:hover { background: #1e8757; }
.slot-remove-bot-btn {
  margin-top: 2px;
  width: 100%;
  font-family: var(--font-pixel);
  font-size: 5.5px;
  padding: 2px 3px;
  background: #5c2734;
  border: 1px solid #ff7d95;
  color: #ffdce3;
  cursor: pointer;
}
.slot-remove-bot-btn:hover { background: #853347; }
.slot-player-name {
  font-size: 5.5px;
  color: #8effbd;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Online Lobby Live Chat */
.lobby-chat-panel {
  display: grid;
  grid-template-columns: auto 1fr 290px;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  border-color: #3da8ff;
  background: rgba(14, 21, 43, 0.96);
}
.lobby-chat-head {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.lobby-chat-title {
  font-size: 8px;
  color: #8ee7ff;
}
.lobby-chat-messages {
  height: 54px;
  overflow-y: auto;
  background: #0a1024;
  border: 2px solid #2a3e73;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: "Silkscreen", monospace;
  font-size: 10.5px;
  line-height: 1.3;
}
.chat-line { color: #e2ecff; word-break: break-word; }
.chat-line.system { color: #ffd970; font-style: italic; }
.chat-sender { font-weight: bold; margin-right: 5px; }
.lobby-chat-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.lobby-chat-input {
  font-family: "Silkscreen", monospace;
  font-size: 11px;
  padding: 7px 8px;
  text-transform: none;
}

/* Account, Rankings, Locked & Reward Modals */
.account-modal-box { width: min(460px, 94%); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.auth-form { display: flex; flex-direction: column; gap: 9px; }
.auth-form .pixel-input { text-transform: none; font-family: "Silkscreen", monospace; font-size: 12px; }
.profile-card-big {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #101833;
  border: 2px solid #4863ab;
  padding: 14px;
  margin-bottom: 6px;
}
.acct-prof-name { font-size: 15px; color: #fff2b2; }
.acct-prof-lvl { font-size: 8.5px; color: #63ffbe; }

.rankings-modal-box { width: min(600px, 95%); }
.rankings-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.rankings-table-wrap {
  max-height: 330px;
  overflow-y: auto;
  background: #0c1329;
  border: 2px solid #354d8a;
}
.rankings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8px;
}
.rankings-table th {
  position: sticky;
  top: 0;
  background: #19254a;
  color: #ffe280;
  padding: 8px 7px;
  border-bottom: 2px solid #435ea3;
  text-align: left;
}
.rankings-table td {
  padding: 8px 7px;
  border-bottom: 1px solid #223059;
  color: #dce7ff;
  text-align: left;
}
.rankings-table tr.me-row {
  background: rgba(255, 190, 46, 0.16);
}
.rankings-table tr.me-row td { color: #fff2a8; }
.rank-medal { font-weight: bold; }
.rank-1 { color: #ffd93b !important; }
.rank-2 { color: #d4e2f7 !important; }
.rank-3 { color: #f5a05b !important; }

.result-xp-banner {
  background: rgba(16, 48, 42, 0.95);
  border: 2px solid #5cff9d;
  color: #9effc9;
  font-size: 8.5px;
  padding: 7px 10px;
}

.locked-modal-box { width: min(460px, 94%); border-color: #ffbe2e; }
.locked-badge-pill { background: #b83344; color: #fff; }
.locked-preview-stage {
  align-self: center;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 190, 46, 0.2), #0d1326 72%);
  border: 3px solid #6b5324;
}
#locked-char-canvas { width: 112px; height: 112px; image-rendering: pixelated; }
.locked-progress-box {
  background: #10172e;
  border: 2px solid #3c5496;
  padding: 8px 10px;
  font-family: "Silkscreen", monospace;
  font-size: 11px;
  color: #9ae8ff;
}

/* Celebratory Animated Level-Up Reward Unlock Card */
.reward-modal-box {
  width: min(490px, 94%);
  border: 4px solid #ffe047;
  background: radial-gradient(circle at 50% 30%, rgba(74, 52, 16, 0.96), rgba(18, 22, 46, 0.98) 72%);
  box-shadow: 0 0 0 4px #0a0d1a, 0 0 36px rgba(255, 206, 60, 0.55);
  animation: rewardPopIn 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes rewardPopIn {
  from { transform: scale(0.84); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.reward-badge-glow {
  background: linear-gradient(90deg, #ff961f, #ffe047, #ff961f);
  color: #1a0c02;
  box-shadow: 0 0 14px rgba(255, 215, 70, 0.7);
}
.reward-subtitle {
  font-size: 9px;
  color: #7dffbe;
  letter-spacing: 0.6px;
}
.reward-sprite-stage {
  align-self: center;
  width: 154px;
  height: 154px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 216, 86, 0.38), rgba(20, 30, 62, 0.92) 70%);
  border: 3px solid #ffe066;
  box-shadow: 0 0 22px rgba(255, 206, 66, 0.45);
}
#unlock-reward-canvas { width: 144px; height: 144px; image-rendering: pixelated; }
.reward-char-title { color: #ffe875; font-size: 20px; }
.reward-actions-row {
  flex-direction: row !important;
  justify-content: center;
  gap: 10px;
}
.reward-actions-row .pixel-btn { flex: 1; }

@media (max-width: 960px) {
  .lobby-chat-panel {
    grid-template-columns: 1fr;
  }
}

/* Google AdSense Non-Intrusive Display Slots, Widescreen Side Rails & Rewarded Ad Unlock Box */
.ad-side-rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 168px;
  height: 608px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 16, 34, 0.86);
  border: 2px solid #2b3d70;
  padding: 4px;
}
.ad-side-rail.left { left: 10px; }
.ad-side-rail.right { right: 10px; }
@media (max-width: 1519px) {
  .ad-side-rail { display: none !important; }
}

.ad-banner-slot {
  width: 100%;
  min-height: 92px;
  max-height: 104px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 16, 34, 0.86);
  border: 2px solid #2b3d70;
  padding: 4px;
}
.ad-banner-slot.compact {
  min-height: 50px;
  max-height: 64px;
  margin-top: 4px;
}
.ad-unlock-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(12, 34, 34, 0.92);
  border: 2px solid #35d48a;
  padding: 11px 12px;
}
.ad-unlock-head {
  font-size: 8.5px;
  color: #8affc1;
}
.ad-unlock-rule {
  font-family: "Silkscreen", monospace;
  font-size: 10.5px;
  color: #d6f5e8;
  line-height: 1.35;
}
.ad-progress-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ad-dot {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  background: #0d1a26;
  border: 2px solid #3c6978;
  color: #7ea8b8;
}
.ad-dot.filled {
  background: #27b86e;
  border-color: #9effcc;
  color: #052113;
  box-shadow: 0 0 8px rgba(70, 235, 150, 0.55);
}
.ad-dot-line {
  width: 34px;
  height: 3px;
  background: #2a4d5c;
}
.ad-watch-btn {
  width: 100%;
  font-size: 9px;
  padding: 10px 12px;
}

.home-quick-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(14, 20, 40, 0.92);
  border: 2px solid #3c4f8a;
  padding: 10px 14px;
  font-size: 7.5px;
  color: #cddaff;
}
.home-quick-strip kbd {
  display: inline-block;
  background: var(--cream);
  color: #14192b;
  padding: 2px 5px;
  border: 2px solid #090c17;
  margin-right: 4px;
  font-family: var(--font-pixel);
  font-size: 7px;
}

@media (max-width: 820px) {
  .home-choice-grid,
  .online-hub-grid {
    grid-template-columns: 1fr;
  }
  .mode-card,
  .online-hub-card {
    min-height: auto;
    padding: 16px;
  }
}
