.playground .bullet-cosmetic-pixel .bullet-sprite::after { display: block; width: 14%; height: 14%; left: 50%; top: 66%; border-radius: 2px; box-shadow: 0 8px 0 rgba(67, 255, 155, .7), 8px 15px 0 rgba(72, 224, 255, .5), -8px 14px 0 rgba(255, 213, 106, .52); background: rgba(255,255,255,.86); }
.playground .bullet-cosmetic-void .bullet-sprite::before { background: #13051f; box-shadow: inset 0 0 10px #7b5cff, 0 0 18px #bb63ff, 0 0 30px rgba(33, 0, 58, .9); }
.playground .bullet-cosmetic-void .bullet-sprite::after { display: block; height: 48%; background: radial-gradient(circle at 50% 16%, rgba(224, 198, 255, .88), rgba(112, 50, 202, .7) 42%, rgba(18, 5, 31, 0) 76%); }
.playground .bullet-cosmetic-frost .bullet-sprite::before { width: 30%; height: 44%; border-radius: 4px 999px 999px 4px; background: #ebfbff; box-shadow: inset 0 0 8px #7bdfff, 0 0 17px #9fe8ff, 0 0 28px rgba(210, 250, 255, .72); transform: translate(-50%, -50%) rotate(45deg); }
.playground .bullet-cosmetic-frost .bullet-sprite::after { display: block; height: 46%; background: radial-gradient(circle at 50% 15%, rgba(244, 253, 255, .95), rgba(129, 222, 255, .66) 34%, rgba(235, 251, 255, 0) 74%); box-shadow: 0 11px 0 rgba(235, 251, 255, .52), 7px 22px 0 rgba(129, 222, 255, .42), -8px 20px 0 rgba(255,255,255,.5); }
.playground .bullet-cosmetic-toxic .bullet-sprite::before { width: 36%; height: 36%; background: #bfff47; box-shadow: inset 0 0 9px #1d5f18, 0 0 18px #99ff3f, 0 0 30px rgba(41, 255, 117, .6); }
.playground .bullet-cosmetic-toxic .bullet-sprite::after { display: block; width: 22%; height: 52%; background: radial-gradient(circle at 50% 20%, rgba(231, 255, 114, .9), rgba(65, 232, 65, .66) 38%, rgba(52, 255, 114, 0) 76%); box-shadow: 0 12px 0 rgba(172, 255, 61, .42), 8px 22px 0 rgba(70, 255, 128, .34), -7px 24px 0 rgba(166, 255, 53, .28); }
.playground .cosmetic-impact {
  position: absolute;
  width: 50px;
  height: 50px;
  margin-left: -25px;
  margin-top: -25px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 8;
  animation: cosmetic-impact 520ms ease-out forwards;
}
.playground .cosmetic-impact-plasma { border: 2px solid rgba(72, 224, 255, .88); box-shadow: 0 0 28px rgba(123, 92, 255, .55); }
.playground .cosmetic-impact-ember { border: 2px solid rgba(255, 122, 50, .88); box-shadow: 0 0 28px rgba(255, 61, 46, .5); }
.playground .cosmetic-impact-pixel { border-radius: 4px; border: 2px solid rgba(72, 224, 255, .82); box-shadow: 10px 0 0 rgba(67,255,155,.5), -10px 0 0 rgba(255,213,106,.5); }
.playground .cosmetic-impact-void { border: 2px solid rgba(190, 99, 255, .9); box-shadow: inset 0 0 26px rgba(19,5,31,.9), 0 0 34px rgba(123,92,255,.54); }
.playground .cosmetic-impact-frost { border: 2px solid rgba(200, 248, 255, .94); box-shadow: 0 0 26px rgba(117, 223, 255, .62), inset 0 0 20px rgba(235, 251, 255, .55); }
.playground .cosmetic-impact-toxic { border: 2px solid rgba(172, 255, 61, .92); box-shadow: 0 0 26px rgba(66, 255, 117, .54), inset 0 0 24px rgba(29, 95, 24, .72); }
.playground .spawn-cosmetic {
  --spawn-effect-image: url(/static/images/spawn-effects/drop-earthall1.png);
  --spawn-effect-size: 172px;
  --spawn-effect-duration: 960ms;
  --spawn-effect-start-scale: 0.58;
  --spawn-effect-end-scale: 1.34;
  --spawn-effect-peak-opacity: 0.92;
}
.playground .spawn-cosmetic::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--spawn-effect-size);
  height: var(--spawn-effect-size);
  z-index: 3;
  background: var(--spawn-effect-image) center / contain no-repeat;
  border-radius: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: spawn-effect var(--spawn-effect-duration) ease-out forwards;
}
.playground .spawn-cosmetic-drop {
  --spawn-effect-image: url(/static/images/spawn-effects/drop-earthall1.png);
  --spawn-effect-size: 176px;
  --spawn-effect-duration: 980ms;
  --spawn-effect-start-scale: 0.42;
  --spawn-effect-end-scale: 1.18;
}
.playground .spawn-cosmetic-drop .player-body { animation: spawn-drop-tank 920ms cubic-bezier(0.2, 0.78, 0.22, 1) both; }
.playground .spawn-cosmetic-warp {
  --spawn-effect-image: url(/static/images/spawn-effects/warp-revive1.png);
  --spawn-effect-size: 164px;
  --spawn-effect-duration: 1040ms;
  --spawn-effect-start-scale: 0.64;
  --spawn-effect-end-scale: 1.18;
  --spawn-effect-peak-opacity: 0.86;
}
.playground .spawn-cosmetic-warp .player-body { animation: spawn-warp-tank 1040ms linear both; }
.playground .spawn-cosmetic-gold {
  --spawn-effect-image: url(/static/images/spawn-effects/gold-lightpillar2.png);
  --spawn-effect-size: 186px;
  --spawn-effect-duration: 1050ms;
  --spawn-effect-start-scale: 0.5;
  --spawn-effect-end-scale: 1.08;
  --spawn-effect-peak-opacity: 0.98;
}
.playground .spawn-cosmetic-gold .player-body { animation: spawn-gold-tank 980ms ease-out both; }
.playground .spawn-cosmetic-thunder {
  --spawn-effect-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,.95) 0 7%, rgba(116,226,255,.82) 8% 14%, transparent 15%), conic-gradient(from 25deg, transparent 0 12%, rgba(134,234,255,.95) 13% 16%, transparent 17% 36%, rgba(255,255,255,.86) 37% 39%, transparent 40% 100%);
  --spawn-effect-size: 178px;
  --spawn-effect-duration: 900ms;
  --spawn-effect-start-scale: 0.42;
  --spawn-effect-end-scale: 1.2;
  --spawn-effect-peak-opacity: 1;
}
.playground .spawn-cosmetic-thunder .player-body { animation: spawn-gold-tank 900ms ease-out both; }
.playground .spawn-cosmetic-fog {
  --spawn-effect-image: radial-gradient(ellipse at 50% 58%, rgba(232,239,224,.72), rgba(170,186,176,.42) 43%, transparent 72%);
  --spawn-effect-size: 210px;
  --spawn-effect-duration: 1180ms;
  --spawn-effect-start-scale: 0.72;
  --spawn-effect-end-scale: 1.42;
  --spawn-effect-peak-opacity: 0.78;
}
.playground .spawn-cosmetic-fog .player-body { animation: spawn-fog-tank 1080ms ease-out both; }
.playground .spawn-cosmetic-earth {
  --spawn-effect-image: radial-gradient(circle at 50% 50%, rgba(255,225,132,.7) 0 8%, rgba(143,92,47,.58) 9% 18%, transparent 19%), conic-gradient(from 8deg, rgba(122,77,42,.82), transparent 10% 18%, rgba(214,151,70,.76) 19% 24%, transparent 25% 42%, rgba(92,61,42,.7) 43% 49%, transparent 50% 100%);
  --spawn-effect-size: 184px;
  --spawn-effect-duration: 980ms;
  --spawn-effect-start-scale: 0.5;
  --spawn-effect-end-scale: 1.3;
  --spawn-effect-peak-opacity: 0.88;
}
.playground .spawn-cosmetic-earth .player-body { animation: spawn-drop-tank 920ms cubic-bezier(0.2, 0.78, 0.22, 1) both; }
.playground .spawn-cosmetic-shadow_rift {
  --spawn-effect-image: radial-gradient(ellipse at 50% 58%, rgba(21,5,32,.95) 0 18%, rgba(142,70,216,.72) 19% 32%, transparent 54%), conic-gradient(from 90deg, transparent, rgba(24,5,40,.9), transparent, rgba(119,59,194,.7), transparent);
  --spawn-effect-size: 188px;
  --spawn-effect-duration: 1080ms;
  --spawn-effect-start-scale: 0.38;
  --spawn-effect-end-scale: 1.16;
  --spawn-effect-peak-opacity: 0.92;
}
.playground .spawn-cosmetic-shadow_rift .player-body { animation: spawn-warp-tank 1040ms linear both; }
.playground .spawn-cosmetic-power_core {
  --spawn-effect-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,.88) 0 8%, rgba(65,255,164,.75) 9% 14%, transparent 15% 23%, rgba(0,212,255,.62) 24% 30%, transparent 31%), conic-gradient(from 0deg, transparent 0 8%, rgba(65,255,164,.86) 9% 12%, transparent 13% 34%, rgba(0,212,255,.86) 35% 38%, transparent 39% 100%);
  --spawn-effect-size: 176px;
  --spawn-effect-duration: 1040ms;
  --spawn-effect-start-scale: 0.5;
  --spawn-effect-end-scale: 1.18;
  --spawn-effect-peak-opacity: 0.95;
}
.playground .spawn-cosmetic-power_core .player-body { animation: spawn-gold-tank 960ms ease-out both; }
.playground .crash { z-index: 4; background-image: url(/static/images/crash1.png); opacity: 0; }
.playground .crash.play { animation: crash 1s linear forwards; }
.playground .crashed { animation: crashed 1s linear forwards; }
.playground .skill-layer { position: absolute; inset: 0; pointer-events: none; z-index: 7; }
.playground .skill-cue {
  position: absolute;
  max-width: 260px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid rgba(21, 18, 15, 0.38);
  background: rgba(255, 248, 234, 0.46);
  color: #241e19;
  font-family: var(--paper-font-mono);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 248, 234, 0.7);
  box-shadow: 0 8px 18px rgba(21, 18, 15, 0.08);
  backdrop-filter: blur(1.5px);
  transform: translate(-50%, 0);
  animation: skill-cue-rise 1800ms ease-out forwards;
}
.playground .skill-cue-player1 {
  border-color: rgba(139, 39, 31, 0.48);
  background: rgba(255, 241, 220, 0.52);
  color: #772018;
}
.playground .skill-cue-player2 {
  border-color: rgba(39, 80, 108, 0.48);
  background: rgba(232, 246, 255, 0.48);
  color: #214f69;
}
.playground .skill-cue.is-failed {
  opacity: 0.8;
  border-style: dashed;
  color: #6f665a;
}
.playground .skill-cue-icon {
  font-size: 16px;
  line-height: 1;
}
.playground .skill-cue-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playground .skill-burst {
  position: absolute;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 700;
  animation: skill-burst 900ms ease-out forwards;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.16);
}
.playground .skill-burst-shield { background: rgba(116, 217, 255, 0.22); color: #bff3ff; }
.playground .skill-burst-freeze { background: rgba(177, 235, 255, 0.22); color: #d6f6ff; }
.playground .skill-burst-stun { background: rgba(255, 205, 87, 0.2); color: #ffe6a3; }
.playground .skill-burst-overload { background: rgba(255, 126, 126, 0.2); color: #ffd3d3; }
.playground .skill-burst-cloak { background: rgba(205, 190, 255, 0.22); color: #f0eaff; }
.playground .skill-burst-poison {
  width: 62px;
  height: 62px;
  margin-left: -31px;
  margin-top: -31px;
  background: rgba(181, 108, 255, 0.24);
  color: #f0ddff;
  font-size: 31px;
  box-shadow: 0 0 0 2px rgba(181, 108, 255, 0.48), 0 0 34px rgba(181, 108, 255, 0.42);
  animation: poison-skill-burst var(--skill-burst-duration, 2400ms) ease-in-out forwards;
}
.playground .skill-burst-teleport { background: rgba(255, 154, 240, 0.22); color: #ffe3fb; }
.playground .skill-burst-boost { background: rgba(255, 228, 110, 0.24); color: #fff1b4; }
.playground .player.is-skill-shield .skill-aura,
.playground .player.is-skill-freeze .skill-aura,
.playground .player.is-skill-stun .skill-aura,
.playground .player.is-skill-overload .skill-aura,
.playground .player.is-skill-cloak .skill-aura,
.playground .player.is-skill-poison .skill-aura,
.playground .player.is-skill-boost .skill-aura { opacity: 1; }
.playground .player.is-skill-shield .skill-aura { box-shadow: 0 0 0 2px rgba(116, 217, 255, 0.7), 0 0 24px rgba(116, 217, 255, 0.52); animation: pulse-skill 1.1s ease-in-out infinite; }
.playground .player.is-skill-freeze .skill-aura { box-shadow: 0 0 0 2px rgba(177, 235, 255, 0.78), 0 0 26px rgba(177, 235, 255, 0.48); animation: pulse-skill 1.2s ease-in-out infinite; }
.playground .player.is-skill-stun .skill-aura { box-shadow: 0 0 0 2px rgba(255, 205, 87, 0.78), 0 0 26px rgba(255, 205, 87, 0.48); animation: pulse-skill 0.8s ease-in-out infinite; }
.playground .player.is-skill-overload .skill-aura { box-shadow: 0 0 0 2px rgba(255, 126, 126, 0.78), 0 0 26px rgba(255, 126, 126, 0.48); animation: pulse-skill 0.7s ease-in-out infinite; }
.playground .player.is-skill-cloak { opacity: 0.55; filter: saturate(0.8) brightness(1.08); }
.playground .player.is-skill-cloak .skill-aura { box-shadow: 0 0 0 2px rgba(205, 190, 255, 0.62), 0 0 20px rgba(205, 190, 255, 0.32); animation: pulse-skill 1.5s ease-in-out infinite; }
.playground .player.is-skill-poison .skill-aura { box-shadow: 0 0 0 2px rgba(181, 108, 255, 0.76), 0 0 28px rgba(181, 108, 255, 0.48); animation: pulse-skill 1s ease-in-out infinite; }
.playground .player.is-skill-boost .skill-aura { box-shadow: 0 0 0 2px rgba(255, 228, 110, 0.75), 0 0 24px rgba(255, 228, 110, 0.46); animation: pulse-skill 0.55s ease-in-out infinite; }
.playground .status { position: absolute; left: 0; bottom: 0; width: 100%; height: 50px; padding-top: 10px; background: #f1f1f1; }
.playground .player-bar { height: 40px; }
.playground .player-bar.is-skill-cue { animation: skill-bar-cue 900ms ease-out; }
.playground .player1-bar { float: left; background-position: left center; background-repeat: no-repeat; background-size: 40px 40px; padding-left: 50px; }
.playground .player2-bar { float: right; background-position: right center; background-repeat: no-repeat; background-size: 40px 40px; padding-right: 50px; }
.playground .player-bar .star-count { color: #ebb12b; width: 40px; line-height: 38px; height: 40px; text-align: center; background: var(--asset-star-small) left center no-repeat; background-size: 40px 40px; }
.playground .player1-bar .star-count,
.playground .player1-bar .name { float: left; }
.playground .player2-bar .star-count,
.playground .player2-bar .name { float: right; }
.playground .player1-bar .name { margin-left: 10px; line-height: 45px; color: #222; }
.playground .player2-bar .name { margin-right: 10px; line-height: 45px; color: #222; }
.playground .skill-feed {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: min(46%, 320px);
  min-height: 34px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 2;
}
.playground .skill-feed-card {
  max-width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 2px solid rgba(21, 18, 15, 0.76);
  background: #fff8ea;
  color: #241e19;
  font-family: var(--paper-font-mono);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  box-shadow: 2px 2px 0 rgba(21, 18, 15, 0.36);
  animation: skill-feed-in 1450ms ease-out forwards;
}
.playground .skill-feed-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playground .skill-feed-player1 {
  border-color: #8b271f;
  color: #772018;
}
.playground .skill-feed-player2 {
  border-color: #27506c;
  color: #214f69;
}
.playground .skill-feed-card.is-failed {
  border-style: dashed;
  color: #6f665a;
}
.playground .frames { position: absolute; left: 0; top: 10px; width: 100%; height: 40px; line-height: 40px; text-align: center; font-weight: 700; color: #222; }
.battle-sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid rgba(34, 34, 34, 0.72);
  border-radius: 0;
  background: #fff8ea;
  color: #222;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(21, 18, 15, 0.2);
}
.battle-sound-toggle-icon,
.battle-sound-toggle svg {
  display: block;
  width: 18px;
  height: 18px;
}
.battle-sound-toggle[aria-pressed="false"] {
  border-style: dashed;
  background: #e2ded0;
  color: #6f665a;
}
.battle-sound-toggle.is-status-action {
  position: absolute;
  left: 50%;
  top: 33px;
  transform: translateX(-50%);
}
.battle-sound-toggle.is-console-action {
  flex: 0 0 auto;
}
.battle-sound-toggle.is-console-floating {
  position: absolute;
  right: 14px;
  top: 14px;
}
.console-card.has-battle-sound-toggle .logs {
  padding-top: 30px;
}
.playground .window { position: absolute; inset: 0 0 60px 0; background: rgba(0, 0, 0, 0.76); z-index: 50; }
.playground .modal { position: absolute; left: 50%; top: 50%; width: 360px; height: 360px; transform: translate(-50%, -50%); background: #1ea7e1; border: 2px solid #1989b8; border-radius: 0; box-shadow: inset 1px 1px 1px 1px #35baf3; text-align: center; z-index: 60; }
.playground .modal .title { color: #e2f9ff; line-height: 40px; font-size: 18px; font-weight: bold; }
.playground .modal .content { position: absolute; inset: 40px 0 0 0; background: #eee; border: 2px solid #aca5a2; border-radius: 0; box-shadow: inset 1px 1px 1px 1px #fff; color: #222; }
.playground .modal .section-title { margin: 20px 0 2px; font-weight: bold; }
.playground .winner-img { margin: 0 auto; width: 50px; height: 50px; background-size: 100% 100%; }

.log-player-0::before { content: "P1 "; color: #7ad67a; }
.log-player-1::before { content: "P2 "; color: #8cc7ff; }

@media (prefers-reduced-motion: reduce) {
  .hero-copy h1,
  .battle-demo-star,
  .battle-demo-tank-player,
  .battle-demo-tank-enemy,
  .battle-demo-bullet,
  .battle-demo-loading-grid,
  .battle-demo-loading-core,
  .battle-demo-loading-scan,
  .landing-mini-tank-a,
  .landing-mini-tank-b {
    animation: none;
  }
}

@media (max-width: 1100px) {
  .site-header,
  .hero-panel,
  .history-layout,
  .arena-layout,
  .tank-modal-body,
  .tank-detail-layout {
    grid-template-columns: 1fr;
  }

  .history-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-hero-copy-shell {
    grid-template-columns: 1fr;
  }

  .detail-hero-art {
    justify-self: start;
    width: 108px;
    height: 108px;
  }

  .settings-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .settings-hero-edit {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }

  .site-header {
    grid-template-areas:
      "brand actions"
      "tabs tabs";
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: start;
  }

  .playground-shell {
    height: min(56vh, 560px);
    min-height: 400px;
  }

  #playgroundMount {
    height: 100%;
  }

  .top-tabs {
    justify-content: start;
    overflow: auto;
  }

  .hero-stats,
  .summary-grid,
  .detail-stat-grid,
  .feature-grid,
  .landing-journey-grid,
  .landing-ai-share,
  .landing-battlefield,
  .landing-showcase,
  .landing-final-cta,
  .arena-selected,
  .settings-grid {
    grid-template-columns: 1fr 1fr;
  }

  .landing-battlefield,
  .landing-ai-share,
  .landing-showcase {
    grid-template-columns: 1fr;
  }

  .landing-final-cta {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .landing-final-actions {
    justify-content: flex-start;
  }

  .landing-footer {
    align-items: flex-start;
    flex-direction: row;
    gap: 12px !important;
  }

  .landing-footer-links {
    align-items: flex-end;
    justify-content: flex-end;
    width: auto;
    gap: 8px !important;
  }

  .landing-footer-main,
  .landing-footer-secondary {
    justify-content: flex-end;
    gap: 8px !important;
  }

  .landing-footer-brand {
    min-width: 128px;
  }

  .landing-footer-brand strong {
    font-size: 16px !important;
  }

  .landing-footer-brand span,
  .landing-footer-links a {
    font-size: 11px !important;
  }

  .landing-footer-links a.landing-footer-primary-link {
    min-height: 26px !important;
    padding: 0 9px !important;
  }

  .landing-footer-links a.landing-footer-discord {
    width: 26px;
    min-width: 26px;
    min-height: 26px !important;
  }

  .history-list-panel {
    max-height: none;
    overflow: visible;
  }

  .history-replay-panel .playground-shell {
    height: auto;
    min-height: 0;
  }

  .share-card {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .share-card-art {
    min-height: 280px;
    order: -1;
  }

  .share-battles-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .share-battle-item {
    grid-template-columns: 42px 50px minmax(0, 1fr);
  }

  .share-battle-result {
    width: 42px;
    height: 42px;
  }

  .share-battle-opponent-art {
    width: 50px;
    height: 50px;
  }

  .share-battle-opponent-art img {
    width: 42px;
    height: 42px;
  }

  .share-battle-link {
    grid-column: 2 / -1;
    justify-content: flex-start;
    width: max-content;
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .invite-creator-card {
    grid-template-columns: 1fr;
  }

  .invite-creator-cta {
    width: 100%;
    justify-content: center;
  }

  .page-shell {
    padding: 14px;
  }

  .hero-panel {
    padding: 22px;
  }

  .hero-copy h1 {
    font-size: clamp(28px, 9vw, 36px);
    line-height: 1.02;
    letter-spacing: 0.02em;
  }

  .site-header {
    grid-template-areas:
      "brand"
      "actions"
      "tabs";
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .header-actions,
  .hero-actions,
  .tank-card-actions,
  .tank-row-actions,
  .control-row,
  .editor-actions,
  .arena-console-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats,
  .summary-grid,
  .detail-stat-grid,
  .feature-grid,
  .landing-journey-grid,
  .landing-tile-grid,
  .landing-showcase,
  .arena-selected,
  .tank-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .landing-battlefield,
  .landing-ai-share,
  .landing-final-cta {
    padding: 20px;
  }

  .ai-share-row {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .ai-share-track {
    grid-column: 1 / -1;
    order: 3;
  }

  .landing-final-actions,
  .landing-final-actions .primary-button,
  .landing-final-actions .ghost-button,
  .landing-inline-link {
    width: 100%;
  }

  .landing-code {
    font-size: 12px;
    padding: 14px;
  }

  .tank-row {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-back-button {
    position: static;
  }

  .leaderboard-row {
    grid-template-columns: 1fr;
  }

  .leaderboard-actions {
    justify-content: stretch;
  }

  .leaderboard-actions .primary-button {
    width: 100%;
  }

  .settings-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .history-layout {
    display: flex;
    flex-direction: column;
  }

  .history-replay-panel {
    order: -1;
    padding: 14px;
  }

  .history-replay-panel .playground-shell,
  .playground-shell {
    width: calc(100vw - 28px);
    margin-left: calc(50% - 50vw + 14px);
    margin-right: calc(50% - 50vw + 14px);
    padding: 8px;
  }

  .playground-shell {
    height: auto;
    min-height: 0;
  }

  #playgroundMount,
  .history-replay-panel #historyPlaygroundMount {
    height: auto;
  }

  .arena-stage-full.is-battle-active .playground-shell {
    order: 0;
  }

  .arena-stage-full.is-battle-active .arena-replay-details {
    order: -1;
  }

  .arena-stage-full.is-battle-active .arena-console-card {
    order: 1;
  }

  .settings-avatar {
    width: 64px;
    height: 64px;
  }

  .share-stat-grid {
    grid-template-columns: 1fr;
  }

  .share-card-copy h1 {
    font-size: 30px;
  }

  .match-row {
    grid-template-columns: 1fr;
  }

  .history-hero-standalone,
  .history-hero-replay {
    padding: 14px;
  }

  .history-hero-standalone h1,
  .history-hero-replay h1 {
    font-size: 26px;
  }

  .history-match-link {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .history-match-titleline {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .history-layout.history-layout-replay,
  .history-replay-sidebar {
    grid-template-columns: 1fr;
  }

  .history-replay-hero-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-replay-showcase {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
  }

  .history-replay-versus {
    justify-self: center;
  }

  .history-replay-participant-card {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    align-items: center;
  }

  .history-replay-art {
    width: 44px;
  }

  .history-replay-art-wrap {
    width: 44px;
  }

  .history-replay-name {
    font-size: 10px;
  }

  .history-replay-stage {
    min-height: 0;
    max-height: min(62vh, 520px);
  }

  .history-replay-console-card {
    min-height: 320px;
  }

  .match-result-stats-grid {
    grid-template-columns: 1fr;
  }

  .match-result-badge {
    justify-self: start;
  }

  .account-menu {
    left: 0;
    right: auto;
    min-width: min(260px, calc(100vw - 28px));
  }

  .header-actions {
    justify-self: stretch;
  }
}

/* Paper design system override
   This layer intentionally sits at the end of the stylesheet so the full app,
   standalone pages, and JS-rendered views share the same quiet paper UI. */
:root {
  --background: #faf9f5;
  --foreground: #111111;
  --card: #fffef9;
  --muted: #f3eee6;
  --muted-foreground: #66615a;
  --accent: #111111;
  --accent-secondary: #4f6f52;
  --accent-tertiary: #3c3934;
  --border: #111111;
  --input: #fffef9;
  --destructive: #9b3a32;
  --paper-bg: #faf9f5;
  --paper-surface: #fffef9;
  --paper-muted: #f3eee6;
  --paper-hover: #ebe3d7;
  --paper-border-subtle: #ddd8cf;
  --paper-text-soft: #3c3934;
  --paper-shadow: 4px 4px 0 #111111;
  --paper-shadow-sm: 3px 3px 0 #111111;
  --paper-shadow-hover: 5px 5px 0 #111111;
  --paper-font-heading: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --paper-font-body: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --paper-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --shadow-neon: var(--paper-shadow);
  --shadow-neon-sm: var(--paper-shadow-sm);
  --shadow-neon-lg: var(--paper-shadow);
  --shadow-magenta: var(--paper-shadow-sm);
  --shadow-cyan: var(--paper-shadow-sm);
}

html,
body {
  background-color: var(--paper-bg);
}

body {
  color: var(--foreground);
  font-family: var(--paper-font-body);
  background-image: radial-gradient(#ded9cf 0.7px, transparent 0.7px);
  background-size: 18px 18px;
}

body::before,
body::after,
.site-header::before,
.hero-panel::before,
.feature-card::before,
.summary-card::before,
.control-card::before,
.console-card::before,
.playground-shell::before,
.leaderboard-table::before,
.recent-board::before,
.tank-card::before,
.modal-window::before,
.detail-panel::before,
.share-card::before,
.share-battles-card::before,
.super-create-panel::before {
  display: none !important;
}

.page-shell {
  max-width: 1180px;
  padding: 0 28px;
}

.site-header,
.history-page-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 54px;
  margin: 0 -28px 36px;
  padding: 0 28px;
  border: 0;
  border-bottom: 2px solid var(--border);
  border-radius: 0;
  clip-path: none;
  background: var(--paper-surface);
  box-shadow: none;
}

.brand-lockup {
  gap: 10px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: var(--foreground);
  overflow: hidden;
}

.brand-mark-image {
  width: 21px;
  height: 21px;
  filter: grayscale(1) contrast(1.1) brightness(1.6);
}

.brand-title,
.hero-copy h1,
.app-hero h2,
.section-head h3,
.modal-head h3,
.feature-card h3,
.hero-card h3,
.tank-meta h4,
.legal-card h1,
.legal-card h2,
.share-card-copy h1,
.share-note-card h2,
.history-hero h1,
.history-hero h2,
.history-replay-summary-value,
.history-replay-detail-card h2,
.arena-preview-tank strong,
.super-share-hero h1,
.super-live-feature h2,
.super-live-tank strong,
.settings-panel h4,
.detail-title,
.detail-panel h3 {
  color: var(--foreground);
  font-family: var(--paper-font-heading);
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
}

.brand-title {
  font-size: 19px;
  line-height: 1.1;
}

.brand-subtitle {
  color: var(--muted-foreground);
  font-family: var(--paper-font-body);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.top-tabs {
  justify-self: center;
  gap: 4px;
  padding: 4px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: var(--paper-surface);
}

.top-tab,
.super-list-tab,
.detail-workspace-tab {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--muted-foreground);
  font-family: var(--paper-font-body);
  letter-spacing: 0;
  text-transform: none;
}

.top-tab:hover,
.top-tab.is-active,
.super-list-tab:hover,
.super-list-tab.is-active,
.detail-workspace-tab:hover,
.detail-workspace-tab.is-active {
  border-color: var(--border);
  background: var(--foreground);
  color: #ffffff;
  box-shadow: none;
}

.header-actions {
  gap: 10px;
}

.ghost-button,
.primary-button,
.notification-button,
.account-menu-item,
.arena-chip,
.arena-result,
.super-date-quick button,
.super-allowed-chip,
.wallet-provider-button,
button {
  border-radius: 2px;
  font-family: var(--paper-font-body);
  letter-spacing: 0;
  text-transform: none;
}

.ghost-button,
.primary-button,
.notification-button {
  min-height: 36px;
  padding: 8px 14px;
  clip-path: none;
  border: 1.5px solid var(--border);
  background: var(--paper-surface);
  color: var(--foreground);
  box-shadow: var(--paper-shadow-sm);
}

.primary-button {
  background: var(--foreground);
  color: #ffffff;
}
