/* Drum War - two-ink screen-printed fight poster */

:root{
  --paper:#F0E7D5;
  --paper-hi:#F7F1E3;
  --red:#E2452B;
  --red-deep:#A32A1C;
  --blue:#1E3A8A;
  --blue-deep:#14275F;
  --plum:#2A1A30;
  --grain:0.58cqw;
  --seam:50%;
  --seam-half:9%;
}

*{box-sizing:border-box;}

html,body{
  margin:0;
  height:100%;
  overflow:hidden;
  background:#221625;
  color:var(--plum);
  font-family:"Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  -webkit-tap-highlight-color:transparent;
}

body{
  display:flex;
  align-items:center;
  justify-content:center;
  background-color:#221625;
  background-image:radial-gradient(circle, rgba(247,241,227,.055) 0.7px, transparent 0.9px);
  background-size:7px 7px;
}

button{font-family:inherit;}

.svg-defs{position:absolute;width:0;height:0;overflow:hidden;}

#stage{
  position:relative;
  width:100vw;
  height:100vh;
  overflow:hidden;
  container-type:size;
  background:var(--paper);
  isolation:isolate;
  --seam:50%;
  --seam-half:12vh;
}

#stage.jolt{animation:stageJolt .12s steps(2) 1;}

@keyframes stageJolt{
  0%{transform:translate(0,0);}
  50%{transform:translate(0.28cqw,-0.18cqw);}
  100%{transform:translate(0,0);}
}

.paper{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:0;
  pointer-events:none;
  opacity:.7;
}

/* ---------- halftone ink halves ---------- */

.wash{
  position:absolute;
  top:0;
  bottom:0;
  z-index:1;
  pointer-events:none;
  mix-blend-mode:multiply;
  background-size:var(--grain) var(--grain);
  background-position:0 0;
}
.wash.red{
  left:0;
  width:calc(var(--seam) + 1.8%);
  background-color:rgba(226,69,43,.055);
  background-image:radial-gradient(circle at 50% 50%, rgba(226,69,43,.46) 21%, transparent 26%), radial-gradient(circle at 50% 50%, rgba(226,69,43,.46) 21%, transparent 26%);
  background-position:0 0, calc(var(--grain) / 2) calc(var(--grain) / 2);
}
.wash.blue{
  left:calc(var(--seam) - 1.8%);
  right:0;
  background-color:rgba(30,58,138,.085);
  background-image:radial-gradient(circle at 50% 50%, rgba(30,58,138,.62) 29%, transparent 33%);
}

/* ---------- crowd ---------- */

.crowd-band{
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  height:27vh;
  overflow:hidden;
  z-index:2;
  pointer-events:none;
  mix-blend-mode:multiply;
  -webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 28%);
  mask-image:linear-gradient(to bottom, transparent 0, #000 28%);
}
.crowd-band img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 0%;
  transform-origin:50% 100%;
  animation:crowdJitter 1.35s steps(4,end) infinite;
}
#stage.crowd-hit .crowd-band img{animation:crowdPunch .22s steps(2) 1, crowdJitter 1.35s steps(4,end) infinite;}
@keyframes crowdJitter{
  0%,100%{transform:translateX(0);}
  20%{transform:translateX(-0.22cqw);}
  45%{transform:translateX(0.18cqw);}
  70%{transform:translateX(-0.1cqw);}
}
@keyframes crowdPunch{
  0%{scale:1 1;}
  50%{scale:1.015 .975;}
  100%{scale:1 1;}
}

/* ---------- torn seam ---------- */

.seam{
  position:absolute;
  top:-1.2vh;
  height:102.4vh;
  width:24vh;
  z-index:3;
  left:calc(var(--seam) - var(--seam-half));
  pointer-events:none;
  will-change:left;
  overflow:hidden;
}
.seam img{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  object-fit:fill;
}

/* ---------- fighters behind drums ---------- */

.fighters{position:absolute;inset:0;z-index:4;pointer-events:none;}
.fighter{
  position:absolute;
  bottom:11vh;
  height:70vh;
  width:auto;
  transform:translateX(-50%);
}
.fighter.f1{left:24%;}
.fighter.f2{left:76%;}
.fighter img{
  display:block;
  height:100%;
  width:auto;
  position:relative;
  z-index:1;
}
.fighter.leap{animation:fighterLeap .24s steps(2) 1;}
@keyframes fighterLeap{
  0%{translate:0 0;}
  45%{translate:0 -1.8vh;}
  100%{translate:0 0;}
}

/* ---------- drums ---------- */

.drums{position:absolute;inset:0;z-index:5;pointer-events:none;}
.drum{
  position:absolute;
  top:57.6vh;
  width:40vh;
  transform:translateX(-50%);
  transform-origin:50% 58%;
}
.drum.d1{left:24%;}
.drum.d2{left:76%;}
.drum img{display:block;width:100%;height:auto;}
.drum.hit{animation:drumHit .16s steps(2) 1;}
.drum.hurt{animation:drumHurt .2s steps(3) 1;}
.drum.cheer{animation:drumCheer .22s steps(2) 1;}
@keyframes drumHit{
  0%{transform:translateX(-50%) scale(1) rotate(0deg);}
  50%{transform:translateX(-50%) scale(1.035) rotate(-0.8deg);}
  100%{transform:translateX(-50%) scale(1) rotate(0deg);}
}
@keyframes drumHurt{
  0%{transform:translateX(-50%) rotate(0deg);}
  35%{transform:translateX(-50%) rotate(2.2deg) translateY(.7vh);}
  100%{transform:translateX(-50%) rotate(0deg);}
}
@keyframes drumCheer{
  0%{transform:translateX(-50%) translateY(0);}
  50%{transform:translateX(-50%) translateY(-1.8vh) rotate(1deg);}
  100%{transform:translateX(-50%) translateY(0);}
}

/* ---------- falling notes ---------- */

.notes{position:absolute;inset:0;z-index:6;pointer-events:none;}
.note{
  position:absolute;
  height:9.4cqh;
  transform:translate(-50%,-100%);
  will-change:top;
  display:none;
}
.note img{display:block;height:100%;width:auto;}
.note.double{height:9.9cqh;}

/* ---------- hit marks, rings, smudges ---------- */

.fx{position:absolute;inset:0;z-index:7;pointer-events:none;}
.fx-item{
  position:absolute;
  height:11cqh;
  width:auto;
  transform:translate(-50%,-50%);
  animation:burst .27s steps(3,end) forwards;
  transform-origin:50% 50%;
}
.fx-item.blue{filter:hue-rotate(205deg) saturate(1.55) brightness(.82);}
.fx-item.ringout{animation:ringOut .48s steps(4,end) forwards;}
.fx-item.smudge{animation:smudge .72s steps(3,end) forwards;}
@keyframes burst{
  0%{opacity:1;scale:.82;}
  55%{opacity:1;scale:1.03;}
  100%{opacity:0;scale:1.16;}
}
@keyframes ringOut{
  0%{opacity:.85;scale:.72;}
  55%{opacity:.7;scale:1;}
  100%{opacity:0;scale:1.24;}
}
@keyframes smudge{
  0%{opacity:1;scale:.9;rotate:-2deg;}
  25%{opacity:1;scale:1;rotate:1deg;}
  100%{opacity:0;scale:1.06;rotate:0deg;}
}

.judge{
  position:absolute;
  z-index:9;
  transform:translate(-50%,-50%);
  font-weight:900;
  font-size:2.25cqw;
  line-height:1;
  letter-spacing:.035em;
  white-space:nowrap;
  text-shadow:0 .16cqw 0 var(--paper-hi), 0 -.06cqw 0 rgba(42,26,48,.25);
  animation:judgeUp .52s steps(4,end) forwards;
  pointer-events:none;
}
.judge.red{color:var(--red-deep);}
.judge.blue{color:var(--blue);}
.judge.plum{color:var(--plum);}
@keyframes judgeUp{
  0%{opacity:1;translate:0 0;scale:1.22;}
  18%{opacity:1;scale:1;}
  100%{opacity:0;translate:0 -2.2cqh;scale:1;}
}

/* ---------- title ---------- */

.title{
  position:absolute;
  top:1.5vh;
  left:50%;
  transform:translateX(-50%);
  z-index:9;
  text-align:center;
  line-height:.79;
  pointer-events:none;
  color:var(--red);
  font-family:"Ultra", Georgia, serif;
  font-weight:400;
  letter-spacing:.005em;
}
.title .word{display:block;}
.title .t-red{
  font-size:12.2vh;
  color:var(--red);
  text-shadow:.38vh .24vh 0 var(--blue);
}
.title .t-blue{
  font-size:12.8vh;
  color:var(--blue);
  letter-spacing:.14em;
  text-indent:.14em;
  text-shadow:-.34vh .22vh 0 var(--red);
}

/* ---------- player plates ---------- */

.plate{
  position:absolute;
  top:1.6vh;
  width:21.2%;
  height:18.2vh;
  z-index:10;
  padding:1.15vh 1.5vh 0.85vh;
  background-color:rgba(251,247,237,.985);
  background-image:radial-gradient(circle, rgba(42,26,48,.14) .55px, transparent .75px);
  background-size:.55vh .55vh;
  border:.16vh solid var(--plum);
  clip-path:polygon(0.5% 0.9%,8% 0.2%,17% 0.8%,27% 0.1%,38% 0.7%,49% 0.2%,61% 0.9%,72% 0.2%,83% 0.8%,92% 0.1%,99.5% 0.7%,99.1% 12%,99.6% 24%,99.2% 37%,99.7% 50%,99.2% 63%,99.6% 76%,99.1% 88%,99.5% 99.3%,90% 99.7%,79% 99.2%,67% 99.8%,55% 99.2%,43% 99.7%,31% 99.1%,19% 99.7%,8% 99.2%,0.6% 99.6%,0.9% 87%,0.4% 74%,0.8% 61%,0.3% 48%,0.8% 35%,0.4% 22%);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.plate::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:1.2vh;
  background:var(--ink);
}
.plate.p1{left:2.2%;--ink:var(--red);}
.plate.p2{right:2.2%;--ink:var(--blue);text-align:right;}
.plate-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5vh;
  padding-top:.32vh;
}
.plate.p2 .plate-head{flex-direction:row-reverse;}
.pname{
  font-weight:800;
  font-size:1.55vh;
  letter-spacing:.16em;
  color:var(--plum);
  white-space:nowrap;
}
.pips{display:flex;gap:.35vh;}
.pips i{
  display:block;
  width:1.1vh;
  height:1.1vh;
  border:.16vh solid var(--plum);
  border-radius:50%;
  background:transparent;
}
.pips i.on{background:var(--ink);border-color:var(--ink);}
.score{
  font-weight:900;
  font-size:7.1vh;
  line-height:.94;
  letter-spacing:-.015em;
  color:var(--plum);
  margin-top:.1vh;
  font-variant-numeric:tabular-nums;
  transform-origin:left center;
}
.plate.p2 .score{transform-origin:right center;}
.score.bump{animation:scoreBump .18s steps(2) 1;}
@keyframes scoreBump{
  0%{scale:1;}
  50%{scale:1.065;}
  100%{scale:1;}
}
.inkline{
  display:flex;
  align-items:baseline;
  gap:.42vh;
  font-weight:700;
  font-size:1.3vh;
  letter-spacing:.16em;
  color:var(--plum);
  margin-top:.02vh;
}
.plate.p2 .inkline{justify-content:flex-end;}
.inkline b{font-weight:900;color:var(--plum);letter-spacing:.04em;}
.keys{
  display:flex;
  align-items:center;
  gap:.32vh;
  margin-top:auto;
}
.plate.p2 .keys{justify-content:flex-end;}
.cap{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:2.6vh;
  height:2.4vh;
  padding:0 .35vh;
  border:.16vh solid var(--plum);
  background:rgba(240,231,213,.9);
  font-weight:800;
  font-size:1.5vh;
  line-height:1;
  color:var(--plum);
}
.cap.lg{
  min-width:4.1cqw;
  height:4.1cqw;
  font-size:2.4cqw;
  border-width:.22cqw;
}
.keynote{
  margin-left:.25vh;
  font-weight:600;
  font-size:.9vh;
  letter-spacing:.1em;
  opacity:.85;
  white-space:nowrap;
}
.plate.p2 .keynote{margin-left:0;margin-right:.25vh;}
.plate-mark{
  position:absolute;
  top:4.4vh;
  right:1.2vh;
  width:5.6vh;
  height:auto;
  opacity:.92;
  pointer-events:none;
}
.plate.p2 .plate-mark{right:auto;left:1.2vh;}

/* ---------- round strip ---------- */

.round-strip{
  position:absolute;
  top:22.5vh;
  left:50%;
  transform:translateX(-50%);
  z-index:10;
  display:flex;
  align-items:center;
  gap:1.1vh;
  height:3.4vh;
  padding:0 1.4vh;
  background:rgba(247,241,227,.92);
  border-top:.16vh solid var(--plum);
  border-bottom:.16vh solid var(--plum);
  font-weight:800;
  font-size:1.7vh;
  letter-spacing:.18em;
  color:var(--plum);
  white-space:nowrap;
  pointer-events:none;
}
.round-strip .dot{opacity:.55;}
.round-strip .strip-end{font-weight:600;letter-spacing:.13em;opacity:.82;}

/* ---------- the flood ---------- */

.flood{
  position:absolute;
  inset:-0.5%;
  z-index:8;
  opacity:0;
  pointer-events:none;
  mix-blend-mode:multiply;
  background-color:var(--flood, var(--red));
  background-image:radial-gradient(circle at 50% 50%, var(--flood, var(--red)) 29%, transparent 34%);
  background-size:.62cqw .62cqw;
  clip-path:inset(0 100% 0 0);
}
.flood.show{opacity:.58;}

/* ---------- stamps ---------- */

.stamp-layer{position:absolute;inset:0;z-index:11;pointer-events:none;overflow:hidden;}
.stamp{
  position:absolute;
  left:50%;
  top:43%;
  width:22%;
  transform:translate(-50%,-50%) rotate(var(--tilt,0deg));
  color:var(--stamp-ink,var(--plum));
  animation:stampHit .2s steps(3,end) 1 both;
}
.stamp .ring{display:block;width:100%;height:auto;overflow:visible;}
.stamp .word{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:"Ultra", Georgia, serif;
  font-size:var(--word-size,6cqw);
  line-height:.8;
  letter-spacing:-.01em;
  text-align:center;
  padding-top:.3cqw;
  color:var(--stamp-ink,var(--plum));
  text-shadow:.18cqw .1cqw 0 var(--stamp-shadow, transparent);
}
@keyframes stampHit{
  0%{opacity:0;scale:1.55;}
  45%{opacity:1;scale:.96;}
  70%{opacity:1;scale:1;}
  100%{opacity:1;scale:1;}
}
.stamp.hold{animation:stampHit .2s steps(3,end) 1 both;}
.stamp.out{animation:stampOut .12s steps(2,end) 1 both;}
@keyframes stampOut{
  0%{opacity:1;scale:1;}
  100%{opacity:0;scale:1.06;}
}

/* ---------- touch pads ---------- */

.pad{
  position:absolute;
  bottom:1.6%;
  width:8.4%;
  height:10.2%;
  transform:translateX(-50%);
  pointer-events:auto;
  display:none;
  z-index:11;
  align-items:center;
  justify-content:center;
  background:rgba(247,241,227,.42);
  border:.2cqw solid var(--ink);
  color:var(--plum);
  font-weight:900;
  font-size:2.35cqw;
  line-height:1;
  padding:0;
  clip-path:polygon(6% 0,95% 3%,100% 88%,91% 100%,4% 97%,0 12%);
  touch-action:none;
}
.pad.p1{--ink:var(--red);}
.pad.p2{--ink:var(--blue);}
.pad.p1.l0{left:19%;}
.pad.p1.l1{left:29%;}
.pad.p2.l0{left:71%;}
.pad.p2.l1{left:81%;}
.pad:active,.pad.down{background:var(--ink);color:var(--paper-hi);}
body.play-mode .pad{background:rgba(247,241,227,.58);}

/* ---------- tools ---------- */

.tools{
  position:absolute;
  left:50%;
  bottom:1.5%;
  transform:translateX(-50%);
  z-index:11;
  display:flex;
  gap:.55cqw;
  align-items:center;
}
.tool{
  height:2.55cqw;
  min-width:2.55cqw;
  padding:0 .6cqw;
  border:.14cqw solid var(--plum);
  background:rgba(247,241,227,.8);
  color:var(--plum);
  font-weight:800;
  font-size:.92cqw;
  letter-spacing:.12em;
  line-height:1;
  cursor:pointer;
  clip-path:polygon(3% 0,97% 2%,100% 94%,95% 100%,2% 97%,0 8%);
}
.tool:hover{background:var(--paper-hi);}
.tool.sound{font-size:.82cqw;}

/* ---------- overlays ---------- */

.overlay{
  position:absolute;
  inset:0;
  z-index:12;
  display:flex;
  align-items:center;
  justify-content:center;
}
.overlay[hidden]{display:none;}

.title-screen{
  display:block;
  padding-top:0;
}
.start-banner{
  position:absolute;
  left:50%;
  top:28%;
  transform:translateX(-50%);
  width:38%;
  text-align:center;
  padding:1.25cqw 2.2cqw 1.5cqw;
  background:rgba(247,241,227,.94);
  border-top:.3cqw solid var(--plum);
  border-bottom:.3cqw solid var(--plum);
  background-image:radial-gradient(circle, rgba(42,26,48,.12) .6px, transparent .8px);
  background-size:.6cqw .6cqw;
  clip-path:polygon(0.4% 0,10% 0.5%,22% 0.1%,35% 0.4%,50% 0,64% 0.5%,77% 0.1%,90% 0.4%,99.6% 0,100% 14%,99.5% 31%,100% 48%,99.6% 66%,100% 84%,99.5% 100%,88% 99.6%,75% 100%,62% 99.6%,49% 100%,36% 99.5%,23% 100%,11% 99.6%,0.5% 100%,0 83%,0.5% 65%,0 47%,0.4% 29%,0 13%);
}
.kicker{
  margin:0 0 .55cqw;
  font-weight:700;
  font-size:.98cqw;
  letter-spacing:.3em;
  color:var(--plum);
  opacity:.84;
}
.start-btn{
  display:block;
  width:100%;
  padding:.8cqw 1cqw .85cqw;
  border:0;
  background:var(--plum);
  color:var(--paper-hi);
  font-family:"Ultra", Georgia, serif;
  font-size:2.25cqw;
  line-height:1;
  letter-spacing:.015em;
  white-space:nowrap;
  cursor:pointer;
  clip-path:polygon(1% 4%,99% 0,100% 90%,96% 100%,2% 96%,0 18%);
  animation:hardBlink 1.15s steps(1,end) infinite;
}
@keyframes hardBlink{
  0%,55%{opacity:1;}
  56%,100%{opacity:.62;}
}
.start-btn:hover{background:var(--red-deep);}
.vs-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:1.3cqw;
  margin:.95cqw 0 .6cqw;
}
.vs-side{display:flex;align-items:center;gap:.4cqw;}
.vs-side.red .who{color:var(--plum);}
.vs-side.blue .who{color:var(--plum);}
.who{font-weight:800;font-size:1.12cqw;letter-spacing:.18em;}
.vs{font-family:"Ultra",Georgia,serif;font-size:1.75cqw;color:var(--plum);opacity:.75;}
.sub{
  margin:0;
  font-weight:600;
  font-size:1.02cqw;
  line-height:1.3;
  letter-spacing:.06em;
  color:var(--plum);
}

.help-screen{
  background:rgba(42,26,48,.5);
  cursor:default;
}
.help-card{
  width:60%;
  max-height:88%;
  overflow:auto;
  padding:2cqw 2.6cqw 1.8cqw;
  text-align:center;
  background:var(--paper-hi);
  border-top:.32cqw solid var(--plum);
  border-bottom:.32cqw solid var(--plum);
  background-image:radial-gradient(circle, rgba(42,26,48,.12) .6px, transparent .8px);
  background-size:.6cqw .6cqw;
  clip-path:polygon(0.5% 0,9% 0.4%,20% 0,33% 0.4%,47% 0,60% 0.4%,74% 0.1%,88% 0.4%,99.5% 0,100% 12%,99.5% 28%,100% 44%,99.4% 61%,100% 78%,99.5% 100%,89% 99.6%,76% 100%,62% 99.5%,48% 100%,35% 99.6%,21% 100%,8% 99.6%,0.4% 100%,0 82%,0.5% 65%,0 48%,0.4% 30%,0 14%);
}
.help-card h2{
  margin:.22cqw 0 .9cqw;
  font-family:"Ultra", Georgia, serif;
  font-size:3.2cqw;
  line-height:1;
  color:var(--plum);
}
.help-cols{display:flex;gap:2cqw;text-align:left;}
.help-col{flex:1;border-top:.2cqw solid var(--ink);padding-top:.55cqw;}
.help-col.red{--ink:var(--red);}
.help-col.blue{--ink:var(--blue);}
.help-col h3{
  margin:0 0 .35cqw;
  font-weight:900;
  font-size:1.35cqw;
  letter-spacing:.16em;
  color:var(--plum);
}
.help-col h3 span{color:var(--ink);margin-left:.4cqw;}
.help-col p{
  margin:0;
  font-weight:600;
  font-size:1.02cqw;
  line-height:1.25;
}
.help-list{
  margin:1.1cqw 0 1.2cqw;
  padding:0;
  list-style:none;
  text-align:left;
  columns:2;
  column-gap:2cqw;
}
.help-list li{
  break-inside:avoid;
  margin:0 0 .55cqw;
  padding-left:1.05cqw;
  position:relative;
  font-weight:500;
  font-size:.96cqw;
  line-height:1.24;
}
.help-list li::before{
  content:"";
  position:absolute;
  left:0;
  top:.42cqw;
  width:.42cqw;
  height:.42cqw;
  background:var(--plum);
}
.help-list b{font-weight:800;}
.close-btn,.rematch-btn{
  padding:.6cqw 1.6cqw;
  border:0;
  background:var(--plum);
  color:var(--paper-hi);
  font-weight:900;
  font-size:1.15cqw;
  letter-spacing:.16em;
  cursor:pointer;
  clip-path:polygon(2% 0,98% 4%,100% 92%,96% 100%,1% 96%,0 12%);
}
.close-btn:hover,.rematch-btn:hover{background:var(--red-deep);}

.end-screen{
  align-items:flex-end;
  padding-bottom:3%;
  pointer-events:none;
}
.end-card{
  width:56%;
  text-align:center;
  padding:1.1cqw 2cqw 1.4cqw;
  background:rgba(247,241,227,.94);
  border-top:.3cqw solid var(--plum);
  border-bottom:.3cqw solid var(--plum);
  background-image:radial-gradient(circle, rgba(42,26,48,.12) .6px, transparent .8px);
  background-size:.6cqw .6cqw;
  clip-path:polygon(0.6% 0,10% 0.5%,22% 0.1%,36% 0.4%,50% 0,65% 0.5%,79% 0.1%,91% 0.4%,99.4% 0,100% 15%,99.5% 33%,100% 52%,99.5% 72%,100% 100%,87% 99.6%,74% 100%,61% 99.5%,47% 100%,34% 99.6%,20% 100%,7% 99.6%,0.5% 100%,0 78%,0.5% 57%,0 36%,0.4% 17%);
  pointer-events:auto;
}
.end-card h2{
  margin:.2cqw 0 .5cqw;
  font-family:"Ultra", Georgia, serif;
  font-size:3.5cqw;
  line-height:1;
  color:var(--plum);
}
.end-score{
  margin:0;
  font-weight:900;
  font-size:2.15cqw;
  letter-spacing:.08em;
  color:var(--plum);
}
.end-rounds{
  margin:.15cqw 0 .9cqw;
  font-weight:700;
  font-size:1.02cqw;
  letter-spacing:.22em;
  color:var(--plum);
  opacity:.8;
}

body.play-mode .title-screen{display:none;}

/* ---------- portrait: tall sheet, still playable ---------- */

@media (orientation:portrait){
  #stage{
    width:100vw;
    height:100vh;
    aspect-ratio:auto;
    --grain:1.4cqw;
    --seam-half:14%;
  }
  .paper{object-fit:cover;}
  .crowd-band{height:19%;}
  .crowd-band img{object-position:50% 0%;}
  .seam{width:28%;left:calc(var(--seam) - var(--seam-half));}
  .wash.red{width:calc(var(--seam) + 2.5%);}
  .wash.blue{left:calc(var(--seam) - 2.5%);}
  .title{top:13.5%;}
  .title .t-red{font-size:13.5cqw;}
  .title .t-blue{font-size:14.2cqw;}
  .plate{
    top:2.2%;
    width:45%;
    height:9.6%;
    padding:1.05vw 1.4vw .8vw;
  }
  .plate.p1{left:2%;}
  .plate.p2{right:2%;}
  .plate-mark{width:4vw;top:2.6vw;right:1.2vw;}
  .plate.p2 .plate-mark{right:auto;left:1.2vw;}
  .plate::before{height:1.8vw;}
  .pname{font-size:2.25vw;}
  .score{font-size:8.2vw;margin-top:.1vw;}
  .inkline{font-size:1.9vw;margin-top:.1vw;}
  .keys{margin-top:.15vw;}
  .cap{min-width:3.8vw;height:3.5vw;font-size:2.4vw;border-width:.3vw;}
  .keynote{font-size:1.45vw;}
  .pips i{width:1.5vw;height:1.5vw;border-width:.25vw;}
  .round-strip{top:24.2%;height:2.8%;font-size:2.1vw;gap:1.8vw;padding:0 2vw;border-width:.3vw;}
  .notes{z-index:6;}
  .note{height:5.6cqh;}
  .note.double{height:6.0cqh;}
  .fighter{height:44%;bottom:17%;}
  .fighter.f1{left:24%;}
  .fighter.f2{left:76%;}
  .drum{top:64%;width:50vw;}
  .drum.d1{left:24%;}
  .drum.d2{left:76%;}
  .fx-item{height:7cqh;}
  .judge{font-size:6vw;}
  .tool{height:5vw;min-width:5vw;font-size:2vw;padding:0 1.5vw;border-width:.3vw;}
  .tool.sound{font-size:1.7vw;}
  .tools{bottom:1.2%;gap:1.5vw;}
  .pad{
    width:18vw;
    height:9%;
    font-size:6vw;
    border-width:.7vw;
  }
  .pad.p1.l0{left:12%;}
  .pad.p1.l1{left:30%;}
  .pad.p2.l0{left:70%;}
  .pad.p2.l1{left:88%;}
  .title-screen{padding-top:0;}
  .start-banner{width:88%;top:29%;padding:3vw 4vw 3.5vw;}
  .kicker{font-size:2.2vw;margin-bottom:1.6vw;}
  .start-btn{font-size:5.6vw;padding:2.2vw 2vw 2.5vw;}
  .vs-row{gap:3vw;margin:2.6vw 0 1.6vw;}
  .who{font-size:2.6vw;}
  .vs{font-size:4vw;}
  .sub{font-size:2.4vw;}
  .cap.lg{min-width:9vw;height:9vw;font-size:5vw;border-width:.6vw;}
  .help-card{width:94%;padding:5vw 5.5vw 4.5vw;max-height:88%;}
  .help-card h2{font-size:7vw;}
  .kicker{font-size:2.2vw;}
  .help-cols{gap:4vw;}
  .help-col h3{font-size:3vw;}
  .help-col p{font-size:2.5vw;}
  .help-list{columns:1;margin:3vw 0;column-gap:0;}
  .help-list li{font-size:2.5vw;padding-left:2.6vw;margin-bottom:1.8vw;}
  .help-list li::before{width:1.2vw;height:1.2vw;top:1vw;}
  .close-btn,.rematch-btn{font-size:2.7vw;padding:2vw 4vw;}
  .end-card{width:92%;padding:3vw 4vw 4vw;}
  .end-card h2{font-size:7.2vw;}
  .end-score{font-size:5vw;}
  .end-rounds{font-size:2.4vw;}
  .round-result{min-width:70%;top:52%;padding:3vw 4vw 3.2vw;}
  .round-result b{font-size:7vw;}
  .round-result span{font-size:2.8vw;margin-top:1vw;}
  .stamp{top:46%;}
}

@media (max-width:760px) and (orientation:landscape){
  .tool{height:3.2cqw;min-width:3.2cqw;font-size:1.2cqw;}
  .tool.sound{font-size:1.05cqw;}
}

@media (prefers-reduced-motion: reduce){
  .crowd-band img,.start-btn{animation:none !important;}
}

/* ---------- round result slip ---------- */

.round-result{
  position:absolute;
  left:50%;
  top:57%;
  transform:translate(-50%,-50%) rotate(-1.2deg);
  z-index:11;
  min-width:30%;
  padding:1.1cqw 2.2cqw 1.2cqw;
  text-align:center;
  background:rgba(247,241,227,.96);
  border-top:.28cqw solid var(--rc);
  border-bottom:.28cqw solid var(--rc);
  background-image:radial-gradient(circle, rgba(42,26,48,.13) .6px, transparent .8px);
  background-size:.6cqw .6cqw;
  clip-path:polygon(0.5% 0,12% 0.5%,27% 0.1%,42% 0.5%,58% 0,73% 0.5%,88% 0.1%,99.5% 0,100% 18%,99.5% 44%,100% 72%,99.5% 100%,85% 99.6%,68% 100%,51% 99.5%,34% 100%,17% 99.6%,0.5% 100%,0 70%,0.5% 42%,0 16%);
  animation:slipIn .2s steps(3,end) 1 both;
}
.round-result.red{--rc:var(--red);}
.round-result.blue{--rc:var(--blue);}
.round-result.plum{--rc:var(--plum);}
.round-result b{
  display:block;
  font-family:"Ultra",Georgia,serif;
  font-size:3.4cqw;
  line-height:.95;
  color:var(--rc);
  text-shadow:.16cqw .1cqw 0 rgba(42,26,48,.15);
}
.round-result span{
  display:block;
  margin-top:.42cqw;
  font-weight:800;
  font-size:1.08cqw;
  letter-spacing:.24em;
  color:var(--plum);
}
@keyframes slipIn{
  0%{opacity:0;scale:1.3;}
  50%{opacity:1;scale:.97;}
  100%{opacity:1;scale:1;}
}

.stamp.chatter .word{
  text-shadow:.22cqw .12cqw 0 var(--red), -.2cqw -.08cqw 0 var(--blue);
}

.title-screen{pointer-events:none;}
.start-banner{pointer-events:auto;}
.tap-only{display:none;}
@media (pointer:coarse){
  .kb-only{display:none;}
  .tap-only{display:inline;}
  body.play-mode .pad{display:flex;}
}

/* ---------- short screens: keep the controls and help readable ---------- */

@media (orientation:landscape) and (max-height:560px){
  .keynote{display:none;}
  .round-strip{top:23.4vh;height:3.8vh;font-size:1.55cqw;gap:1.2cqw;padding:0 1.4cqw;border-width:.2cqw;}
  .tool{height:3.4cqw;min-width:3.4cqw;font-size:1.2cqw;padding:0 .8cqw;border-width:.18cqw;}
  .tool.sound{font-size:1.05cqw;}
  .pad{width:9.2%;height:13%;font-size:3.2cqw;border-width:.28cqw;}
  .help-card{width:88%;padding:2.4cqw 3cqw 2cqw;}
  .help-card h2{font-size:5.2cqw;}
  .help-cols{gap:2.5cqw;}
  .help-col h3{font-size:2.1cqw;}
  .help-col p{font-size:1.6cqw;line-height:1.2;}
  .help-list{margin:1.6cqw 0;column-gap:2.5cqw;}
  .help-list li{font-size:1.55cqw;line-height:1.2;padding-left:1.8cqw;margin-bottom:.9cqw;}
  .help-list li::before{width:.7cqw;height:.7cqw;top:.6cqw;}
  .close-btn,.rematch-btn{font-size:2cqw;padding:1.1cqw 2.4cqw;}
  .round-result{min-width:38%;padding:1.6cqw 2.6cqw;}
  .round-result b{font-size:4.6cqw;}
  .round-result span{font-size:1.5cqw;}
}
