/* --- Start Screen Overlay --- */
/* --- Start Screen Overlay (opaque green background) --- */
.start-screen{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  box-sizing: border-box;

  /* Cover the inactive arena completely, including on narrow screens. */
  background: var(--bg);

  z-index: 9999;
  overflow-y: auto;
  padding: 24px 0;
}

/* no extra veil layer */
.start-screen::before{ display:none; }

/* start card: green-tinted glass panel */
.start-card{
  position: relative;
  box-sizing: border-box;
  width: min(980px, calc(100vw - 24px));
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(236, 253, 245, 0.18);
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 100%;
  text-align: center;
  box-shadow: 0 18px 55px rgba(0,0,0,0.35);
}


/* ===== Start screen: High Scores panel (left column) ================= */
.start-layout{
  display: grid;
  grid-template-columns: minmax(480px, 520px) 1fr;
  gap: 18px;
  align-items: start;
}

.start-main{
  min-width: 0;
}

.start-intro{
  display: flex;
  box-sizing: border-box;
  width: 100%;
  margin: 24px auto 0;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid #3b594b;
  border-radius: 16px;
  background:
    linear-gradient(160deg,
      #14382e 0%,
      #112f27 48%,
      #0e261f 100%);
  box-shadow:
    inset 0 1px 0 rgba(236, 253, 245, 0.04),
    0 16px 38px rgba(3, 24, 17, 0.22);
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
}

.start-intro h2 { margin: 0; color: #edf3ef; font-size: clamp(23px, 3vw, 32px); line-height: 1.2; letter-spacing: -.025em; }
.start-intro .intro-kicker { margin: 0; color: #abc7b7; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.start-intro .hint{
  margin: 0;
  max-width: 70ch;
  color: #d6e4dc;
  font-size: 1rem;
  line-height: 1.7;
}

.start-buttons .tutorial-home-button {
  --play-bg: #1a4146;
  --play-bg-hover: #28545a;
  --play-border: #719c9e;
  --play-shadow: rgba(26, 65, 70, .34);
  --play-shadow-hover: rgba(40, 84, 90, .42);
  --play-ring-bright: #e2fbf3;
  --play-ring-color: #9fd6cc;
  --play-focus: #e6c78d;
  display: flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  text-decoration: none;
}

.sound-effects-control{
  display: flex;
  width: 100%;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0 8px;
}

.sound-effects-toggle{
  display: inline-flex;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 4px 7px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 5px;
  color: rgba(226, 232, 240, 0.78);
  background: rgba(15, 23, 42, 0.28);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 650;
  cursor: pointer;
  opacity: 0.78;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.sound-effects-toggle:hover{
  border-color: rgba(186, 230, 253, 0.55);
  color: #e0f2fe;
  background: rgba(30, 64, 175, 0.25);
  opacity: 1;
}

.sound-effects-toggle:focus-visible{
  outline: 2px solid rgba(125, 211, 252, 0.72);
  outline-offset: 2px;
}

.sound-effects-toggle[aria-pressed="false"]{
  border-color: rgba(148, 163, 184, 0.55);
  color: rgba(148, 163, 184, 0.68);
  background: rgba(30, 41, 59, 0.34);
}

.sound-effects-toggle-icon{
  font-size: 0.78rem;
  line-height: 1;
}

/* The desktop mini toggle used to sit over the sidebar; in the shared
   settings row it participates in the same flex layout as the audio toggles. */
.sound-effects-control .mini-grid-toggle{
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
}

.highscores-card{
  min-width: 0;
  text-align: left;
  padding: 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid rgba(250, 204, 21, 0.55);
  background: radial-gradient(circle at top left, rgba(20, 83, 45, 0.75), rgba(2, 6, 23, 0.95));
  box-shadow:
    0 10px 28px rgba(0,0,0,0.55),
    0 0 0 1px rgba(20, 83, 45, 0.25) inset;
}

.highscores-title{
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #facc15;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

.highscores-sub{
  margin-top: 4px;
  font-size: 0.90rem;
  opacity: 0.85;
  color: #dcfce7;
  letter-spacing: 0.06em;
}

.highscores-table-wrap{
  margin-top: 10px;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid rgba(250, 204, 21, 0.22);
  background: rgba(0, 0, 0, 0.30);
}

.highscores-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.highscores-table thead th{
  padding: 8px 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: rgba(250, 204, 21, 0.95);
  background: rgba(20, 83, 45, 0.55);
  border-bottom: 1px solid rgba(250, 204, 21, 0.22);
}

.highscores-table tbody td{
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #e5e7eb;
}

.highscores-table tbody tr:nth-child(2n) td{
  background: rgba(255, 255, 255, 0.03);
}

.highscores-table .hs-num,
.highscores-table .hs-time{
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.highscores-table .hs-player{
  overflow-wrap: anywhere;
  font-weight: 800;
  color: #fef3c7;
  letter-spacing: 0.02em;
}

.hs-loading,
.hs-empty,
.hs-error{
  text-align: center;
  padding: 12px 8px;
  opacity: 0.8;
}

.highscores-help{
  margin-top: 8px;
  font-size: 0.80rem;
  opacity: 0.72;
  color: rgba(220, 252, 231, 0.85);
}

.how-to-play{
  margin-top: 22px;
  padding: 26px;
  text-align: left;
  border: 1px solid rgba(110, 231, 183, 0.32);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(20, 83, 45, 0.72), rgba(2, 6, 23, 0.92));
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(167, 243, 208, 0.06) inset;
}

.how-to-play-heading{
  text-align: center;
}

.how-to-play-kicker{
  display: block;
  color: #86efac;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.how-to-play-heading h2{
  margin: 3px 0 5px;
  color: #facc15;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(250, 204, 21, 0.28);
}

.how-to-play-heading p{
  margin: 0;
  color: #ecfdf5;
  font-size: 1.08rem;
  line-height: 1.6;
}

.how-to-play-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.how-to-step{
  position: relative;
  padding: 52px 18px 20px;
  border: 1px solid rgba(236, 253, 245, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.24);
}

.how-to-step-number{
  position: absolute;
  top: 10px;
  left: 12px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(250, 204, 21, 0.55);
  border-radius: 50%;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.48);
  font-size: 1.05rem;
  font-weight: 900;
}

.how-to-step h3,
.how-to-control-set h3{
  margin: 0 0 10px;
  color: #dcfce7;
  font-size: 1.18rem;
  line-height: 1.4;
}

.how-to-step p{
  margin: 0;
  color: #f3f4f6;
  font-size: 1.05rem;
  line-height: 1.7;
}

.how-to-step strong{
  color: #facc15;
  letter-spacing: 0.08em;
}

.how-to-controls{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.how-to-control-set{
  padding: 18px;
  border: 1px solid rgba(110, 231, 183, 0.18);
  border-radius: 10px;
  background: rgba(6, 78, 59, 0.2);
}

.how-to-control-set dl{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

.how-to-control-set dl div{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-top: 1px solid rgba(236, 253, 245, 0.1);
}

.how-to-control-set dt{
  color: #d1fae5;
  font-size: 1rem;
  font-weight: 700;
}

.how-to-control-set dd{
  margin: 0;
  color: #fef3c7;
  font-family: "Courier New", Consolas, monospace;
  font-size: 1rem;
  font-weight: 800;
  text-align: right;
}

.how-to-control-set kbd{
  display: inline-block;
  min-width: 1.7em;
  padding: 0.18em 0.38em;
  border: 1px solid rgba(250, 204, 21, 0.62);
  border-bottom-width: 3px;
  border-radius: 6px;
  color: #fff7cc;
  background: rgba(69, 26, 3, 0.72);
  font: inherit;
  text-align: center;
}

.powerup-arsenal{
  margin-top: 20px;
  padding: 22px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.58);
}

.powerup-arsenal-heading{
  text-align: center;
}

.powerup-arsenal-kicker{
  display: block;
  color: #fde68a;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.powerup-arsenal-heading h3{
  margin: 5px 0 7px;
  color: #facc15;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.powerup-arsenal-heading p{
  max-width: 70ch;
  margin: 0 auto;
  color: #ecfdf5;
  font-size: 1.04rem;
  line-height: 1.65;
}

.powerup-suites{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.powerup-suite{
  padding: 18px;
  border-radius: 11px;
}

.powerup-suite-offensive{
  border: 1px solid rgba(251, 146, 60, 0.42);
  background: linear-gradient(145deg, rgba(124, 45, 18, 0.42), rgba(30, 10, 4, 0.68));
}

.powerup-suite-defensive{
  border: 1px solid rgba(96, 165, 250, 0.42);
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.32), rgba(3, 18, 45, 0.7));
}

.powerup-suite h4{
  margin: 0;
  color: #fff7cc;
  font-size: 1.2rem;
}

.powerup-suite-lead{
  min-height: 3.2em;
  margin: 7px 0 14px;
  color: #e5e7eb;
  font-size: 1rem;
  line-height: 1.6;
}

.powerup-suite ul{
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.powerup-suite li{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 13px;
  align-items: start;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  color: #f3f4f6;
  font-size: 1rem;
  line-height: 1.55;
}

.powerup-sprite{
  --powerup-icon-size: 54px;
  --powerup-sprite-inset: 1px;
  --powerup-sprite-step: calc(var(--powerup-icon-size) + 2px);
  width: var(--powerup-icon-size);
  height: var(--powerup-icon-size);
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 9px;
  background-image: url("../assets/block_sprites.webp");
  background-repeat: no-repeat;
  image-rendering: auto;
  background-size:
    calc(4 * var(--powerup-sprite-step))
    calc(6 * var(--powerup-sprite-step));
  background-position:
    calc(var(--powerup-sprite-column) * -1 * var(--powerup-sprite-step) - var(--powerup-sprite-inset))
    calc(var(--powerup-sprite-row) * -1 * var(--powerup-sprite-step) - var(--powerup-sprite-inset));
  background-origin: border-box;
  background-clip: border-box;
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.45),
    0 0 10px rgba(255, 255, 255, 0.08);
}

.powerup-sprite[data-variant="off"]{ --powerup-sprite-column: 1; }
.powerup-sprite[data-variant="def"]{ --powerup-sprite-column: 2; }
.powerup-sprite[data-variant="medusa"]{
  --powerup-sprite-column: 3;
  --powerup-sprite-row: 3;
}
.powerup-sprite[data-variant="midas"]{
  --powerup-sprite-column: 3;
  --powerup-sprite-row: 0;
}
.powerup-sprite[data-letter="B"]{ --powerup-sprite-row: 0; }
.powerup-sprite[data-letter="U"]{ --powerup-sprite-row: 1; }
.powerup-sprite[data-letter="R"]{ --powerup-sprite-row: 2; }
.powerup-sprite[data-letter="N"]{ --powerup-sprite-row: 3; }
.powerup-sprite[data-letter="E"]{ --powerup-sprite-row: 4; }
.powerup-sprite[data-letter="r"]{ --powerup-sprite-row: 5; }

.powerup-suite-offensive .powerup-sprite{
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.45),
    0 0 14px rgba(251, 146, 60, 0.28);
}

.powerup-suite-defensive .powerup-sprite{
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.45),
    0 0 14px rgba(96, 165, 250, 0.3);
}

.powerup-suite li strong{
  display: block;
  margin-bottom: 2px;
  color: #fde68a;
  font-size: 1.03rem;
}

.powerup-arsenal-pitch{
  margin: 18px 0 0;
  padding: 13px 15px;
  border-radius: 9px;
  color: #fff7cc;
  background: rgba(250, 204, 21, 0.09);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

.how-to-win{
  margin: 18px 0 0;
  padding-top: 16px;
  text-align: center;
  border-top: 1px solid rgba(250, 204, 21, 0.2);
  color: #ecfdf5;
  font-size: 1.08rem;
  line-height: 1.6;
}

.how-to-win strong{
  color: #facc15;
}

@media (max-width: 860px){
  .start-layout{
    grid-template-columns: minmax(0, 1fr);
  }
  .highscores-card{
    min-width: 0;
    order: 2;
  }

}

@media (max-width: 680px){
  .start-hero{
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 8px 14px;
  }

  .start-title-block{
    text-align: center;
  }

  .game-title-simple{
    white-space: normal;
  }

  .front-banner-wrap{
    display: none;
  }

  .start-layout{
    display: block;
  }

  .start-buttons{
    gap: 8px;
  }

  .start-buttons-row{
    gap: 10px;
  }
}

@media (max-width: 560px){
  .how-to-play{
    padding: 17px 13px;
  }

  .how-to-play-grid,
  .how-to-controls,
  .powerup-suites{
    grid-template-columns: 1fr;
  }

  .powerup-arsenal{
    padding: 17px 13px;
  }

  .powerup-suite-lead{
    min-height: 0;
  }

  .how-to-control-set dl div{
    align-items: flex-start;
    flex-direction: column;
  }

  .how-to-control-set dd{
    text-align: left;
  }
}

.start-card .tag{
  opacity: 0.9;
  margin: 6px 0 16px;
}

/* New layout for start buttons */
.start-buttons{
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  justify-content: flex-start;
}

.start-buttons-row{
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.cpu-wrap{
  display: flex;
  width: 100%;
  padding-top: 12px;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.difficulty-control{
  display: flex;
  container-type: inline-size;
  width: min(360px, 100%);
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 18px;
}

.difficulty-control > .hint{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: #e6c78d;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
}

.cpu-mode-arrow{
  font-size: 22px;
  line-height: 1;
}

.difficulty-buttons{
  --play-bg: #183e33;
  --play-bg-hover: #285544;
  --play-border: #6f9b86;
  --play-shadow: rgba(5, 30, 22, .25);
  --play-shadow-hover: rgba(5, 30, 22, .35);
  --play-ring-bright: #e2fbf3;
  --play-ring-color: #9fd6cc;
  --play-focus: #e6c78d;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

/* Each mode keeps the shared button geometry and selection treatment. */
.start-buttons .difficulty-buttons [data-difficulty="easy"]{
  --play-bg: linear-gradient(145deg, #34c7dd, #189bb9);
  --play-bg-hover: linear-gradient(145deg, #52d5e7, #25aec8);
  --play-border: #76e1ef;
  --play-shadow: #159cb83d;
  --play-shadow-hover: #25c7e066;
  --play-ring-bright: #effeff;
  --play-ring-color: #69deee;
  --play-focus: #b9f6ff;
  color: #062c38;
  text-shadow: none;
}

.start-buttons .difficulty-buttons [data-difficulty="experienced"]{
  --play-bg: linear-gradient(145deg, #b82945, #70182c);
  --play-bg-hover: linear-gradient(145deg, #ce3653, #8c1d36);
  --play-border: #ff7a91;
  --play-shadow: #b829453d;
  --play-shadow-hover: #ed456366;
  --play-ring-bright: #ffe9ed;
  --play-ring-color: #ff8098;
  --play-focus: #ffc2d0;
  color: #fff5f7;
}

.start-buttons .difficulty-buttons [data-difficulty="beastmode"]{
  --play-bg: radial-gradient(ellipse at 85% 0%, #9b4e13 0%, transparent 62%), linear-gradient(145deg, #392419, #18120f);
  --play-bg-hover: radial-gradient(ellipse at 85% 0%, #b96116 0%, transparent 68%), linear-gradient(145deg, #4d2c15, #22140c);
  --play-border: #e59b39;
  --play-shadow: #b959132b;
  --play-shadow-hover: #f58a234d;
  --play-ring-bright: #fff0bf;
  --play-ring-color: #ffae38;
  --play-focus: #fef3c7;
  letter-spacing: .02em;
}

.start-buttons .difficulty-buttons [data-difficulty="insane"]{
  --play-bg: radial-gradient(ellipse at 100% 100%, #70124f 0%, transparent 65%), linear-gradient(135deg, #122d42, #200d35 55%, #270e2d);
  --play-bg-hover: radial-gradient(ellipse at 100% 100%, #941863 0%, transparent 70%), linear-gradient(135deg, #173f50, #2c124c 55%, #390f3a);
  --play-border: #d665ed;
  --play-shadow: #a73bec30;
  --play-shadow-hover: #ed43ba4d;
  --play-ring-bright: #f8e5ff;
  --play-ring-color: #71edff;
  --play-focus: #9ff4ff;
  letter-spacing: .02em;
}

@container (max-width: 345px){
  .difficulty-buttons{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.start-buttons .difficulty-buttons .btn-primary{
  width: 100%;
  min-width: 0;
  padding: 8px 4px;
  font-family: Arial, sans-serif;
  font-size: clamp(11px, 2.6vw, 12px);
  letter-spacing: 0;
  text-transform: none;
}

/* Claws and fractured energy stay behind a steady, high-contrast label. */
.difficulty-label {
  position: relative;
  z-index: 3;
  display: inline-block;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  text-shadow: 0 1px 2px #000, 0 0 6px #000;
}
.start-buttons .difficulty-buttons [data-difficulty="beastmode"] .difficulty-label {
  color: #fff1cd;
  font-size: 11px;
}
.start-buttons .difficulty-buttons [data-difficulty="insane"] .difficulty-label {
  letter-spacing: .09em;
  text-shadow: -1px 0 #56e7ff, 1px 0 #f358d2, 0 2px 3px #080617;
}
.difficulty-claws,
.difficulty-energy {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.difficulty-claws i {
  position: absolute;
  top: -10%;
  right: 9%;
  width: 15%;
  height: 125%;
  background: linear-gradient(90deg, #180d06 18%, #ffbe64 26%, #c96419 43%, #3b1a0b 64%);
  clip-path: polygon(70% 0, 100% 0, 27% 100%, 0 91%);
  opacity: .82;
}
.difficulty-claws i:nth-child(2) { right: 28%; top: -4%; }
.difficulty-claws i:nth-child(3) { right: 47%; top: 2%; }
.difficulty-energy i {
  position: absolute;
  inset: -12% auto -12% 3%;
  width: 25%;
  background: linear-gradient(180deg, #d9fdff, #4de6ff 38%, #786dff 72%, transparent);
  clip-path: polygon(75% 0, 100% 0, 41% 37%, 76% 34%, 9% 100%, 35% 52%, 0 55%);
  opacity: .68;
  animation: difficultySurge 4.6s ease-in-out infinite alternate;
}
.difficulty-energy i:nth-child(2) {
  left: auto;
  right: 3%;
  transform: rotate(180deg);
  background: linear-gradient(180deg, #ffe0fb, #fc5ccd 38%, #b360ff 72%, transparent);
  animation-delay: -2.3s;
}
.start-buttons .difficulty-buttons :is([data-difficulty="beastmode"], [data-difficulty="insane"])::after {
  content: "";
  position: absolute;
  inset: auto 15% 3px;
  height: 2px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #ffb74f, transparent);
  box-shadow: 0 -2px 10px #ff991b66;
  opacity: .65;
  transition: opacity 180ms ease;
}
.start-buttons .difficulty-buttons [data-difficulty="insane"]::after {
  background: linear-gradient(90deg, #53eaff, #ae70ff, #ff55ca);
  box-shadow: 0 -2px 10px #d157f466;
}
.start-buttons .difficulty-buttons :is([data-difficulty="beastmode"], [data-difficulty="insane"]):is(:hover, :focus-visible)::after {
  opacity: 1;
}
@keyframes difficultySurge {
  from { opacity: .4; }
  to { opacity: .85; }
}
#guestStatus { max-width: 360px; margin: 0; text-align: center; }
.start-buttons #startPvpBtn { margin-top: 12px; }

@media (prefers-reduced-motion: reduce){
  .difficulty-energy i{
    animation: none;
    opacity: .65;
  }
}

.btn-primary{
  appearance: none;
  border: 1px solid rgba(26, 0, 129, 0.18);
  background: rgba(177, 35, 35, 0.709);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.709);
  cursor: pointer;
}

.btn-primary:hover{
  background: rgba(255,255,255,0.14);
}

/* The pre-paint classifier keeps the mobile homepage stable during game loading. */
.start-buttons #highScoresToggle {
  --play-bg: #343d25;
  --play-bg-hover: #4a5431;
  --play-border: #9e995e;
  --play-shadow: rgba(33, 40, 20, .34);
  --play-shadow-hover: rgba(52, 61, 37, .42);
  --play-ring-bright: #fff2b0;
  --play-ring-color: #d9c66d;
  --play-focus: #e6c78d;
}
:root[data-runtime="mobile"] :is(.front-banner-wrap, .game-title-simple, .screenshot-play-note) { display: none; }
:root[data-runtime="mobile"] #startPvpBtn { display: none; }
:root[data-runtime="desktop"] #startPvpBtn { display: inline-flex; }
#highScoresToggle[hidden], #highScoresPanel[hidden] { display: none; }
:root[data-runtime="mobile"] .start-hero { grid-template-columns: 1fr; }
:root[data-runtime="mobile"] .start-title-block { align-items: center; }
:root[data-runtime="mobile"] .start-layout { grid-template-columns: 1fr; }

@media (max-width: 560px) {
  :root[data-runtime="mobile"] {
    .start-screen { place-items: start center; padding: 10px 0; }
    .start-card { display: flex; flex-direction: column; align-items: center; gap: 12px; width: calc(100vw - 16px); padding: 12px; }
    .start-hero, .start-title-block { display: contents; }
    .game-title-simple { order: 0; font-size: clamp(26px, 7vw, 34px); justify-content: center; }
    .title-screenshot-wrap { order: 1; width: min(100%, calc(50svh * .75), 255px); margin: 0; }
    .community-playtime { order: 2; }
    .start-layout { order: 3; align-self: stretch; }
    .start-buttons-row { align-items: center; gap: 10px; }
    .cpu-wrap { align-items: center; }
    .screenshot-play-note { order: 4; margin: 0; }
    .start-card > :not(.start-hero):not(.start-layout) { order: 5; }
    .highscores-card { margin-top: 18px; }
  }
}
