/* Material hierarchy: graphite surfaces, machined edges, luminous accents. */
.mallets {
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
}
.playing #arena.laser-loadout:after {
  content: '指で移動 / 二本指タップでレーザー';
}
body {
  background: #080c12;
  color: #e9eff7;
  background-image: radial-gradient(ellipse at 75% 0, #20334655, transparent 55%);
}
header {
  border-bottom: 1px solid #9bbbd51d;
  background: #0a1019cc;
}
.hero {
  border-bottom: 1px solid #819eb524;
  isolation: isolate;
}
.hero h1 {
  letter-spacing: -0.055em;
  text-shadow: 0 3px 30px #0008;
}
.hero h1 em {
  color: #c7ff59;
}
.hero-art {
  background: radial-gradient(ellipse, #31455944, transparent 70%);
  overflow: hidden;
}
#hero-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.hero-tags span {
  border-color: #87a3bc36;
  background: #101a26;
  color: #a8b7c9;
}
.mode-cards button,
.play-panel,
.mallet,
.stage,
.waiting-card,
.stage-result {
  background: linear-gradient(145deg, #1c2733, #101720 65%);
  border: 1px solid #88a2bc35;
  box-shadow:
    inset 0 1px #d7e9ff0b,
    0 10px 24px #0003;
}
.mode-cards button {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 28px;
  text-align: left;
}
.mode-cards button:after {
  content: '';
  position: absolute;
  right: -40px;
  top: -45px;
  width: 180px;
  height: 180px;
  border: 1px solid #baff2920;
  border-radius: 50%;
  box-shadow:
    0 0 0 24px #baff2905,
    0 0 0 48px #baff2903;
  pointer-events: none;
}
.mode-cards button b {
  color: #d8f7b2;
  letter-spacing: 0.08em;
}
.mode-cards button small {
  color: #94a6b9;
  line-height: 1.7;
}
.mallet,
.stage {
  border-radius: 10px;
  overflow: hidden;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s;
}
.mallet.selected,
.stage.selected {
  border-color: #c2ff5b;
  background: linear-gradient(145deg, #293928, #111c20);
  box-shadow:
    inset 0 0 0 1px #baff2933,
    0 6px 24px #0004;
}
.mallet-preview {
  filter: drop-shadow(0 12px 8px #0008);
}
.stage-art {
  height: 140px !important;
  background: #080d14 !important;
  border-bottom: 1px solid #a4b9c329;
}
.stage-art:before,
.stage-art:after {
  display: none !important;
}
.stage-art canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.stage strong {
  letter-spacing: 0.07em;
}
.stage small {
  color: #a5b3c3;
  line-height: 1.5;
}
.primary {
  background: linear-gradient(135deg, #d1ff76, #a5e940);
  color: #111b08;
  border: 1px solid #d6ffa0;
  box-shadow:
    inset 0 1px #fff8,
    0 5px 25px #97dc3519;
  border-radius: 7px;
}
select,
input {
  background: #0b121c;
  color: #e3edf9;
  border-color: #60748a66;
  border-radius: 6px;
}
.icon {
  border-color: #8da6bf36;
  background: #0c1420bf;
  backdrop-filter: blur(12px);
  border-radius: 6px;
}
.playing .score {
  filter: drop-shadow(0 3px 8px #000);
  text-shadow: 0 2px 3px #000;
}
.playing .score,
.playing .score > span,
.playing .score-center {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  pointer-events: none;
}
.playing .score-center {
  padding: 3px 8px;
  text-shadow:
    0 1px 3px #000,
    0 0 7px #000;
}
.playing .special {
  border-radius: 10px;
  background: #0d1725d9;
  box-shadow:
    inset 0 1px #c9e3ff1c,
    0 5px 20px #0007;
}
.phone-panel {
  background: #101722;
  border: 1px solid #8da6bf26;
  border-radius: 8px;
}
@media (max-width: 600px) {
  .hero-art {
    min-height: 200px;
  }
  .stage-art {
    height: 115px !important;
  }
  .mode-cards button {
    padding: 22px;
  }
  .hero-tags span {
    font-size: 9px;
  }
}

/* Front end: a game title screen, with a compact equipment menu. */
.playing .cutin {
  height: 100px;
  width: min(88vw, 510px);
  isolation: isolate;
  pointer-events: none;
  --cutin-direction: -1;
}
.playing .cutin canvas {
  position: absolute;
  left: -18px;
  top: -25px;
  width: 140px;
  height: 140px;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0.85;
  filter: drop-shadow(0 0 12px var(--skill-color));
  z-index: -1;
}
.playing .cutin strong {
  padding-left: 74px;
  font-size: clamp(25px, 7.7vw, 43px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
  opacity: 1;
  text-shadow:
    2px 2px 0 #101810,
    0 0 18px var(--skill-color);
}
.playing .cutin:before {
  height: 85px;
  border-top: 2px solid var(--skill-color);
  border-bottom: 1px solid var(--skill-color);
  background: linear-gradient(
    100deg,
    transparent,
    color-mix(in srgb, var(--skill-color), transparent 73%),
    #080e1833,
    transparent
  );
}
.playing .cutin.opponent {
  --cutin-direction: 1;
}
.playing .cutin.opponent canvas {
  left: auto;
  right: -18px;
}
.playing .cutin.opponent strong {
  padding-left: 0;
  padding-right: 74px;
}
.playing .cutin.active {
  animation: skill-slam 2.8s both;
}
@keyframes skill-slam {
  0% {
    opacity: 0;
    transform: translateX(calc(var(--cutin-direction) * 100px)) scale(1.12);
  }
  9% {
    opacity: 1;
    transform: translateX(6px) scale(1.02);
  }
  16%,
  78% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(calc(var(--cutin-direction) * -20px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .playing .cutin.active {
    animation: calm-cue 2.8s both !important;
  }
}
.mallet-modal-open {
  overflow: hidden;
}
.mallet-dialog {
  padding: 0;
  width: min(440px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid #65745c;
  border-top: 3px solid var(--mallet-color);
  border-radius: 3px;
  background: #121714;
  color: #eef1e9;
  box-shadow: 0 25px 90px #000c;
}
.mallet-dialog::backdrop {
  background: #030705d9;
  backdrop-filter: blur(7px);
}
.dialog-close {
  position: absolute;
  right: 9px;
  top: 7px;
  z-index: 1;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #c1cabc;
  font-size: 28px;
}
.mallet-showcase {
  height: 190px;
  background: radial-gradient(ellipse at 50% 90%, #39473255, transparent 65%);
  border-bottom: 1px solid #ffffff0e;
}
.mallet-showcase canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: none;
  box-shadow: none;
  border: 0;
  touch-action: auto;
}
.mallet-dialog-copy {
  padding: 19px 25px 24px;
}
.mallet-jp {
  font-size: 11px;
  color: #9ba694;
  margin: 0 0 3px;
}
.mallet-dialog h2 {
  font:
    italic 800 40px/1.1 'Russo One',
    Impact,
    sans-serif;
  margin: 0 0 18px;
  letter-spacing: 1px;
}
.mallet-ratings {
  display: flex;
  gap: 18px;
  margin: 0 0 22px;
}
.mallet-ratings > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 10px;
  color: #9eab95;
}
.rating-blocks {
  display: flex;
  gap: 3px;
}
.rating-blocks i {
  width: 13px;
  height: 5px;
  background: #344030;
}
.rating-blocks .filled {
  background: var(--mallet-color);
}
.mallet-dialog h3 {
  font:
    700 19px 'Russo One',
    sans-serif;
  color: var(--mallet-color);
  letter-spacing: 1px;
  margin: 0 0 9px;
}
.mallet-description {
  font-size: 13px;
  line-height: 1.9;
  margin: 0;
  color: #d2dacb;
}
.charge-note {
  font-size: 10px;
  line-height: 1.7;
  color: #8d9a84;
  margin: 13px 0 20px;
}
.dialog-select {
  width: 100%;
  background: var(--mallet-color) !important;
  color: #101810 !important;
}
.dialog-error {
  font-size: 12px;
  color: #ffa388;
  line-height: 1.6;
}
#mallet-info,
.choice-detail {
  display: none;
}
.rule-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.rule-options button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 5px;
  padding: 18px;
  border: 1px solid #35422f;
  border-radius: 2px;
  background: #141a12;
  color: #dce4d5;
  min-height: 122px;
}
.rule-symbol {
  font: italic 700 32px/1 monospace;
  color: #839570;
  margin-bottom: 9px;
}
.rule-options strong {
  font-size: 15px;
}
.rule-options small {
  font-size: 10px;
  color: #86967a;
}
.rule-options button[aria-pressed='true'] {
  border-color: #b7dc79;
  box-shadow: inset 0 -3px #b7dc79;
  background: #202b18;
}
.rule-options button[aria-pressed='true'] .rule-symbol {
  color: #c0e787;
}
.time-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 22px 0 10px;
}
.time-picker > span {
  font-size: 12px;
  color: #a4b296;
}
.time-picker > div {
  display: flex;
  gap: 6px;
}
.time-picker button {
  min-width: 66px;
  min-height: 52px;
  border: 0;
  border-bottom: 2px solid #3d4a35;
  background: #141a12;
  color: #829471;
  border-radius: 0;
}
.time-picker b {
  font:
    700 23px 'Russo One',
    sans-serif;
}
.time-picker button span {
  font-size: 10px;
  margin-left: 3px;
}
.time-picker button[aria-pressed='true'] {
  color: #daf1b8;
  border-color: #b7dc79;
  background: #29371e;
}
.rule-points {
  font-size: 11px;
  color: #829276;
  line-height: 1.7;
  margin: 16px 0 24px;
}
@media (max-height: 720px) {
  .mallet-showcase {
    height: 140px;
  }
  .mallet-dialog-copy {
    padding: 14px 22px 18px;
  }
  .mallet-dialog h2 {
    font-size: 33px;
    margin-bottom: 12px;
  }
  .mallet-ratings {
    margin-bottom: 16px;
  }
  .charge-note {
    margin: 10px 0 13px;
  }
}
body:not(.playing) {
  background: #0d1012;
  color: #e7e8e2;
  background-image: none;
}
body:not(.playing) header {
  height: 66px;
  padding: 0 5vw;
  background: transparent;
  border-bottom: 1px solid #ffffff12;
  gap: 14px;
}
header .logo {
  font-size: 27px;
  letter-spacing: -1px;
}
header .header-label {
  font: 10px monospace;
  color: #727975;
  letter-spacing: 2px;
}
header #sound {
  margin-left: auto;
  min-width: 65px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: #b5bdb6;
  font-size: 12px;
}
#lobby {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  column-gap: 55px;
  padding: 0 32px;
}
#lobby .hero {
  display: block;
  position: relative;
  height: 560px;
  min-height: 0;
  border: 0;
  overflow: hidden;
}
.title-lockup {
  position: absolute;
  left: 26px;
  top: 38px;
  z-index: 1;
  pointer-events: none;
}
.title-lockup p {
  margin: 0;
  font: 11px monospace;
  letter-spacing: 7px;
  color: #99a395;
}
.title-lockup h1 {
  font:
    italic 900 92px/0.95 'Arial Black',
    Impact,
    sans-serif;
  letter-spacing: -8px;
  margin: 8px 0;
  color: #e7e8e2;
  text-shadow: none;
}
.title-lockup h1 span {
  color: #c1ed59;
}
#lobby .hero-art {
  position: absolute;
  inset: 105px -60px 18px -55px;
  min-height: 0;
  background: none;
  transform: none;
  opacity: 1;
  display: block;
}
#hero-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.title-hint {
  position: absolute;
  left: 26px;
  bottom: 14px;
  margin: 0;
  font-size: 11px !important;
  color: #859084 !important;
  letter-spacing: 1px;
}
#mode-select {
  align-self: center;
  padding: 0;
}
#mode-select .section-title {
  margin: 0 0 16px;
  border: 0;
}
#mode-select .section-title h2 {
  font: 500 12px sans-serif;
  color: #859084;
  letter-spacing: 2px;
}
.mode-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid #465043;
}
.mode-cards button {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 8px;
  min-height: 91px;
  padding: 18px 6px;
  background: none;
  border: 0;
  border-bottom: 1px solid #465043;
  border-radius: 0;
  box-shadow: none;
  color: #eeefe8;
  overflow: visible;
}
.mode-cards button:after {
  display: none;
}
.mode-cards button small {
  font: 11px monospace;
  color: #798573;
}
.mode-cards button span {
  font-size: 23px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.6px;
}
.mode-cards button b {
  font: 24px sans-serif;
  color: #a5b490;
  letter-spacing: 0;
}
.mode-cards button:hover,
.mode-cards button:focus-visible {
  background: #c1ed590a;
}
.mode-cards button:hover b {
  color: #c1ed59;
  transform: translateX(3px);
}
.menu-note {
  font-size: 11px;
  color: #7f8a7b;
  line-height: 1.8;
  margin-top: 20px;
}
.lobby-settings {
  grid-column: 1/-1;
  border-top: 1px solid #ffffff18;
  padding: 18px 0;
  color: #94a18e;
  font-size: 12px;
}
.lobby-settings > summary {
  cursor: pointer;
  list-style: none;
}
.lobby-settings > summary:before {
  content: '＋';
  margin-right: 10px;
}
.lobby-settings[open] > summary:before {
  content: '−';
}
.lobby-settings .phone-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 15px 0;
  margin: 8px 0;
  box-shadow: none;
}
#lobby footer {
  grid-column: 1/-1;
  border-top: 1px solid #ffffff0b;
  font: 9px monospace;
  color: #4f594d;
  letter-spacing: 2px;
  padding: 18px 0;
}
#lobby:has(#cpu-setup:not([hidden])) {
  display: block;
  padding-top: 28px;
}
#lobby:has(#cpu-setup:not([hidden])) > .hero,
#lobby:has(#cpu-setup:not([hidden])) > .lobby-settings {
  display: none;
}
.section-title h2 {
  font: 600 18px sans-serif;
  letter-spacing: 0;
}
.section-title > span {
  font: 11px sans-serif;
  color: #788571;
  letter-spacing: 0;
}
.mallet,
.stage,
.play-panel,
.waiting-card,
.stage-result {
  background: #131816;
  border: 1px solid #2d372c;
  border-radius: 2px;
  box-shadow: none;
}
.mallet {
  position: relative;
  padding: 12px 7px 10px;
  text-align: center;
  border-color: transparent;
  border-bottom-color: #394434;
}
.mallet strong {
  font-size: 18px;
  letter-spacing: 0.5px;
}
.mallet small {
  font-size: 10px;
  color: #84907d;
}
.mallet .check {
  font: 9px sans-serif;
  letter-spacing: 0;
  right: 7px;
  top: 7px;
  color: #c1ed59;
}
.mallet.selected,
.stage.selected {
  background: #1c2618;
  border-color: #9dbb66;
  box-shadow: inset 0 -2px #bddf7c;
}
.mallet-preview {
  height: 105px;
  filter: none;
}
.mallet-info {
  border: 0;
  border-left: 2px solid #798d5c;
  background: transparent;
  padding: 14px 17px;
  margin-top: 20px;
  line-height: 1.9;
  color: #aab5a2;
}
.mallet-info > strong {
  font-size: 15px;
  color: #d7e6c8;
}
.stat-line {
  color: #7f8f72;
  font: 11px sans-serif;
  margin-top: 12px;
}
.stage {
  padding: 0 0 13px;
  text-align: left;
}
.stage strong,
.stage small {
  display: block;
  padding: 0 12px;
}
.stage strong {
  font-size: 17px;
  margin-top: 12px;
}
.stage small {
  font-size: 10px;
  margin-top: 6px;
}
.stage-art {
  height: 130px !important;
  border: 0;
}
.stage-art canvas {
  filter: saturate(0.8);
}
.primary {
  background: #b7dc79;
  border: 0;
  border-radius: 2px;
  box-shadow: none;
  color: #182211;
  font-weight: 700;
  min-height: 50px;
  letter-spacing: 0.3px;
}
.primary:hover {
  background: #c9eb94;
}
.play-panel {
  padding: 20px;
  background: transparent;
  border: 0;
  border-top: 2px solid #8b9f70;
  align-self: start;
  position: sticky;
  top: 25px;
}
.match-caption {
  font-size: 12px;
  color: #909d85;
}
.play-panel .secondary {
  border: 0;
  background: none;
  color: #919f85;
}
select,
input {
  background: #161c16;
  border: 1px solid #374332;
  border-radius: 2px;
  color: #dfe6d8;
}
.online-setup {
  max-width: 850px;
}
.online-setup h1 {
  font-size: 30px;
}
.wizard-steps {
  gap: 0;
}
.wizard-steps li {
  letter-spacing: 0;
}
.player-slots {
  background: none;
  border: 0;
  border-bottom: 1px solid #394532;
  padding: 12px 0;
}
.online-setup .mallets {
  grid-template-columns: repeat(4, 1fr);
}
.online-setup .mallet-preview {
  height: 110px;
}
@media (max-width: 600px) {
  body:not(.playing) header {
    height: 52px;
    padding: 0 22px;
  }
  header .header-label {
    display: none;
  }
  #lobby {
    display: block;
    padding: 0 22px;
  }
  #lobby .hero {
    height: 325px;
  }
  .title-lockup {
    left: 8px;
    top: 22px;
  }
  .title-lockup h1 {
    font-size: 76px;
    letter-spacing: -6px;
  }
  .title-lockup p {
    font-size: 9px;
    letter-spacing: 5px;
  }
  #lobby .hero-art {
    inset: 64px -65px -5px -30px;
  }
  .title-hint {
    bottom: 2px;
    left: 8px;
    font-size: 10px !important;
  }
  #mode-select {
    padding: 22px 0 28px;
  }
  .mode-cards button {
    min-height: 76px;
  }
  .mode-cards button span {
    font-size: 21px;
  }
  .menu-note {
    font-size: 10px;
    margin: 14px 0 0;
  }
  .lobby-settings {
    padding: 17px 0;
  }
  #lobby footer {
    padding: 13px 0;
  }
  #lobby:has(#cpu-setup:not([hidden])) {
    padding: 22px 16px 0;
  }
  .mallets,
  .online-setup .mallets {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }
  .mallet-preview,
  .online-setup .mallet-preview {
    height: 85px;
  }
  .mallet strong {
    font-size: 16px;
  }
  .mallet small {
    font-size: 9px;
  }
  .mallet-info {
    display: block;
    font-size: 11px;
  }
  .mallet-info > strong {
    display: block;
    margin-bottom: 6px;
  }
  .stat-line {
    font-size: 10px;
  }
  .play-panel {
    position: sticky;
    bottom: 0;
    top: auto;
    background: #0d1012f5;
    padding: 12px 0 8px;
    border-top: 1px solid #526144;
    z-index: 4;
  }
  .match-caption {
    display: none;
  }
  .play-panel .primary {
    margin: 0;
  }
  .play-panel .secondary {
    margin-top: 5px;
    min-height: 36px;
  }
  .stage-art {
    height: 110px !important;
  }
  .section-title h2 {
    font-size: 17px;
  }
}
.playing .goal-burst {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: linear-gradient(125deg, #ff477d25, #ffcf4325, #9eff4825, #34efff25, #9b60ff25);
  box-shadow: inset 0 0 90px #adceff55;
  overflow: hidden;
}
.playing .goal-burst span {
  font-size: clamp(100px, 29vw, 240px);
  line-height: 1;
  letter-spacing: -0.055em;
  color: #fff;
  text-shadow:
    0 0 8px #fff,
    4px 5px 0 #ff45a1,
    -4px -3px 0 #42efff,
    0 0 45px var(--goal-color);
  transform: rotate(-9deg);
  z-index: 1;
}
.playing .goal-burst:after {
  content: attr(data-caption);
  position: absolute;
  top: calc(50% + 70px);
  left: 0;
  right: 0;
  text-align: center;
  font:
    900 24px 'Russo One',
    sans-serif;
  letter-spacing: 7px;
  color: white;
  text-shadow: 0 2px 8px #000;
}
.playing .goal-burst:before {
  content: '';
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(from 12deg, #ffffff12 0deg 2deg, transparent 2deg 15deg);
  mask-image: radial-gradient(transparent 8%, #000 55%);
  transform: rotate(12deg);
}
.playing .goal-burst.active {
  animation: rainbow-goal 1.6s both;
}
@keyframes rainbow-goal {
  0% {
    opacity: 0;
    transform: scale(1.16);
  }
  10%,
  65% {
    opacity: 1;
    transform: scale(1);
  }
  20% {
    transform: translate(-7px, 5px);
  }
  28% {
    transform: translate(6px, -4px);
  }
  36% {
    transform: translate(-4px, 2px);
  }
  100% {
    opacity: 0;
    transform: scale(1.04);
  }
}
@media (prefers-reduced-motion: reduce) {
  .playing .goal-burst.active {
    animation: calm-cue 1.6s both !important;
  }
}
.playing #arena.final-stretch .board-wrap {
  box-shadow:
    inset 0 0 35px #ff694566,
    0 0 22px #ff9c5544;
}
.playing #arena.final-stretch #match-clock {
  color: #ffd479;
  text-shadow: 0 0 16px #ff652f;
}
.playing .stage-hud,
.playing .controls p {
  display: none !important;
}
.playing #arena:after,
.playing #arena.laser-loadout:after {
  content: none !important;
  display: none !important;
}
.playing .goal-burst[data-style='volt']:before {
  inset: 0;
  background: linear-gradient(90deg, #caff52, #fff);
  mask-image: none;
  clip-path: polygon(62% 0, 41% 40%, 58% 40%, 30% 100%, 47% 51%, 31% 51%);
  opacity: 0.55;
}
.playing .goal-burst[data-style='frost'] {
  background: repeating-conic-gradient(
    from 20deg at 50% 50%,
    #c9ffff55 0deg 3deg,
    #439aff18 3deg 30deg
  );
  box-shadow: inset 0 0 120px #a1f5ffaa;
}
.playing .goal-burst[data-style='ghost']:before {
  background: radial-gradient(
    ellipse,
    transparent 25%,
    #c594ff88 29%,
    transparent 34%,
    #b38bff77 44%,
    transparent 49%
  );
  mask-image: none;
}
.playing .goal-burst[data-style='forge'] {
  background: radial-gradient(
    ellipse at 50% 80%,
    #fff59855,
    #ff4b2755 35%,
    #9e140d22 65%,
    transparent
  );
  box-shadow: inset 0 0 110px #ff531d99;
}
.playing .goal-burst[data-style='beast']:before {
  inset: 0;
  background: repeating-linear-gradient(
    115deg,
    transparent 0 18%,
    #ffb96888 19% 21%,
    transparent 22% 30%
  );
  mask-image: none;
}
.playing .goal-burst[data-style='viper']:before {
  background: repeating-radial-gradient(
    ellipse at 20% 50%,
    transparent 0 35px,
    #ff62bf55 38px 42px,
    transparent 45px 70px
  );
  mask-image: none;
}
.playing .goal-burst[data-style='titan']:before {
  background: repeating-radial-gradient(
    circle,
    transparent 0 50px,
    #ffaf6b77 53px 58px,
    transparent 61px 100px
  );
  mask-image: none;
}
.playing .goal-burst[data-style='bastion']:before {
  background: repeating-conic-gradient(#7ebcff66 0deg 3deg, transparent 3deg 60deg);
  mask-image: radial-gradient(transparent 15%, #000 40%);
}
.cpu-mallets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 25px;
}
.cpu-mallets button {
  padding: 12px;
  background: #171e22;
  border: 1px solid #47535b;
  color: #ddd;
}
.cpu-mallets button[aria-pressed='true'] {
  border-color: #baff29;
  color: #baff29;
  background: #26351c;
}
.playing .cutin {
  height: 72px;
  width: min(86vw, 470px);
}
.playing .cutin strong,
.playing .cutin.opponent strong {
  padding: 0 12px;
  font-size: clamp(25px, 7vw, 42px);
  letter-spacing: 1px;
}
.playing .cutin:before {
  height: 64px;
  border-block: 1px solid var(--skill-color);
  background: linear-gradient(
    100deg,
    transparent,
    color-mix(in srgb, var(--skill-color), transparent 88%),
    transparent
  );
  box-shadow: 0 8px 22px -15px var(--skill-color);
}
.playing .cutin:after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(
    125deg,
    transparent 0 24px,
    color-mix(in srgb, var(--skill-color), transparent 55%) 25px 27px,
    transparent 28px 50px
  );
  clip-path: polygon(0 65%, 100% 0, 85% 35%, 0 100%);
  opacity: 0.65;
}
.playing .cutin[data-mallet='volt']:after {
  clip-path: polygon(0 70%, 45% 30%, 35% 60%, 100% 10%, 52% 80%, 65% 40%, 0 100%);
  background: var(--skill-color);
}
.playing .cutin[data-mallet='ghost']:after {
  clip-path: none;
  background: repeating-linear-gradient(0deg, transparent 0 6px, #bf8eff55 7px 8px);
}
.playing .cutin[data-mallet='frost']:after,
.playing .cutin[data-mallet='mirror']:after {
  clip-path: none;
  background: repeating-conic-gradient(
    from 30deg at 80% 50%,
    transparent 0deg 55deg,
    #b9fff955 58deg 60deg
  );
}
.playing .cutin[data-mallet='forge']:after {
  clip-path: none;
  background: linear-gradient(0deg, #ff693866, transparent 70%);
}
.playing .cutin[data-mallet='beast']:after {
  clip-path: polygon(
    20% 0,
    27% 0,
    40% 100%,
    33% 100%,
    20% 0,
    45% 0,
    52% 0,
    65% 100%,
    58% 100%,
    45% 0,
    70% 0,
    77% 0,
    90% 100%,
    83% 100%
  );
  background: #ffbc65;
}

/* Disable pinch and double-tap gestures across the complete match surface. */
.playing #arena,
.playing #arena * {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.cutin[data-mallet='dragon']:before {
  background: repeating-conic-gradient(from 20deg, #ff692b88 0deg 8deg, transparent 8deg 25deg);
}

.rule-adjust {
  padding: 18px 0;
  border-bottom: 1px solid #52604a;
}
.rule-adjust[hidden] {
  display: none;
}
.rule-adjust label {
  display: block;
  margin-bottom: 12px;
}
.rule-adjust label small {
  color: #99a290;
  margin-left: 10px;
}
.rule-adjust input {
  width: 120px;
  font-size: 32px;
  font-weight: 700;
  color: #eaffcc;
  background: #111910;
  border: 0;
  border-bottom: 2px solid #bddf7c;
  padding: 8px;
}
.rule-adjust span {
  margin-left: 10px;
}
.rule-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.rule-presets button {
  background: #202a1b;
  color: #d7e9c7;
  border: 1px solid #52604a;
  padding: 8px 14px;
}

.cpu-difficulty {
  margin: 16px 0 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cpu-difficulty p {
  width: 100%;
  margin: 0 0 6px;
  color: #c3cfba;
}
.cpu-difficulty button {
  padding: 10px 17px;
  background: #151e12;
  color: #a5b79b;
  border: 1px solid #3b4c31;
}
.cpu-difficulty button[aria-pressed='true'] {
  color: #efffdc;
  border-color: #baff29;
  background: #2d3c20;
}
/* Match victory: a single impact followed by continuous gold and rainbow light. */
#victory-fx {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  display: none;
  z-index: 0;
}
.overlay.victory {
  position: fixed;
  inset: 0;
  border-radius: 0;
  background: radial-gradient(ellipse, #604011bb, #130c24ef 70%);
  isolation: isolate;
  overflow: hidden;
  z-index: 30;
  animation: win-impact 0.65s ease-out;
}
.overlay.victory:before {
  content: '';
  position: absolute;
  width: 180vmax;
  height: 180vmax;
  left: calc(50% - 90vmax);
  top: calc(50% - 90vmax);
  z-index: -1;
  background: repeating-conic-gradient(from 0deg, #ffc85722 0deg 9deg, transparent 9deg 21deg);
  animation: win-rays 28s linear infinite;
}
.overlay.victory #victory-fx {
  display: block;
}
.overlay.victory h2 {
  position: relative;
  font-size: clamp(64px, 15vw, 180px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, #fff6cb, #ffbd3f, #ff9ccd, #abf9ff, #fff6cb);
  background-size: 250% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 5px 0 #61351f) drop-shadow(0 0 24px #ffd35f);
  animation: win-color 5s linear infinite;
}
.overlay.victory p,
.overlay.victory button {
  position: relative;
  z-index: 1;
}
.overlay.victory p {
  color: #fff6d8;
  font-size: 16px;
  max-width: 560px;
  text-shadow: 0 2px 4px #000;
}
.overlay.victory button {
  width: min(80vw, 420px);
  text-align: center;
  background: linear-gradient(120deg, #ffe5a2, #ffc452);
  color: #382216;
  border: 1px solid #fff1c3;
  box-shadow: 0 0 35px #ffc95677;
}
@keyframes win-rays {
  to {
    transform: rotate(360deg);
  }
}
@keyframes win-color {
  to {
    background-position: 250% 0;
  }
}
@keyframes win-impact {
  0% {
    transform: scale(1.08) translateX(-12px);
  }
  25% {
    transform: scale(1.03) translateX(10px);
  }
  50% {
    transform: translateX(-6px);
  }
  100% {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .overlay.victory,
  .overlay.victory:before,
  .overlay.victory h2 {
    animation: none;
  }
}

.pc-skill-key {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .playing .special {
    min-width: 148px;
    padding: 12px 16px;
  }
  .pc-skill-key {
    display: block;
    font: 600 10px/1.5 sans-serif;
    letter-spacing: 0.03em;
    color: #e0e9f4;
    margin-bottom: 5px;
  }
  .playing .special.ready .pc-skill-key {
    color: #ffffff;
    text-shadow: 0 0 8px #c4ff91;
  }
}
