:root {
  --gold: #e8a33d;
  --gold-hi: #ffe3a0;
  --gold-deep: #8a5210;
  --red: #c4161c;
  --red-hi: #ff4a2a;
  --blue: #3d7fff;
  --ink: #070609;
  --barw: 300px;
  --barh: 49px;
  --port: 62px;
  --timer: 90px;
  --hudpad: 10px;
  --gap: 16px;
  --combo-w: 160px;
  --combo-h: 54px;
  --banner-w: 360px;
  --ko-w: 180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050307;
  color: #f3ead8;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #050307;
}

#game {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
}
#game canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}
#game { filter: brightness(1.08) contrast(1.05) saturate(1.06); }

#grain { display: none; }

#game { transition: filter .1s linear; }
#game.impact { filter: saturate(.82) brightness(1.12) contrast(1.01); }

#vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 24%),
    radial-gradient(ellipse at 50% 47%, rgba(0,0,0,0) 50%, rgba(0,0,0,.52) 100%),
    radial-gradient(ellipse at 50% 104%, rgba(190,18,20,.16) 0%, rgba(0,0,0,0) 58%);
}

#flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background: radial-gradient(circle at 50% 52%, rgba(255,247,220,.95) 0%, rgba(255,164,52,.4) 34%, rgba(255,90,20,0) 68%);
}
#flash.block {
  background: radial-gradient(circle at 50% 52%, rgba(224,242,255,.95) 0%, rgba(90,160,255,.4) 34%, rgba(30,80,255,0) 68%);
}
#flash.breaker {
  background: radial-gradient(circle at 50% 52%, rgba(255,232,196,.95) 0%, rgba(255,70,40,.46) 36%, rgba(190,10,20,0) 70%);
}
#flash.go { animation: flashGo .2s ease-out forwards; }
@keyframes flashGo {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------------- HUD ---------------- */

#hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

#hud .side {
  position: absolute;
  top: var(--hudpad);
  display: flex;
  flex-direction: column;
}
#hud .side.left { left: var(--hudpad); align-items: flex-start; transform: rotate(-.9deg); }
#hud .side.right { right: var(--hudpad); align-items: flex-end; transform: rotate(.9deg); }

.bar {
  position: relative;
  width: var(--barw);
  height: var(--barh);
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.8));
}
.barart {
  position: absolute;
  inset: 0;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
#barLeft .barart { background-image: url(assets/hud_kit_01_health_bezel_left.webp); }
#barRight .barart { background-image: url(assets/hud_kit_02_health_bezel_right.webp); }

.barcover {
  position: absolute;
  top: 22%;
  height: 61%;
  background: #5c0810;
  z-index: 2;
  transition: background-color .45s linear;
}
#coverLeft {
  left: 19%;
  width: 0;
  border-right: 0;
}
#coverRight {
  left: 9.5%;
  width: 0;
}
.baredge {
  position: absolute;
  top: 21%;
  height: 63%;
  width: 3px;
  margin-left: -1.5px;
  background: #fff3cd;
  box-shadow: 0 0 8px 2px rgba(255,170,60,.95), 0 0 16px 5px rgba(255,80,20,.5);
  opacity: 0;
  z-index: 3;
}

.portrait {
  position: relative;
  width: var(--port);
  aspect-ratio: 461 / 476;
  margin-top: 6px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.8));
}
.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pname {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 0 1px;
  text-align: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: calc(var(--port) * .2);
  letter-spacing: .16em;
  color: #ffe6ab;
  text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.9);
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.72));
}
.pips {
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}
.pips i {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: #241419;
  border: 1px solid #6d5220;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6);
}
.pips i.won {
  background: linear-gradient(180deg, #ffe9a8, #e8a33d 55%, #9a5f10);
  border-color: #ffe9a8;
  box-shadow: 0 0 7px rgba(255,190,70,.8);
}

.timer {
  position: absolute;
  left: 50%;
  top: calc(var(--hudpad) - var(--timer) * .06);
  width: var(--timer);
  height: calc(var(--timer) * 294 / 290);
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.85));
}
.timer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#timerNum {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 1%;
  font-family: 'Share Tech Mono', monospace;
  font-size: calc(var(--timer) * .33);
  line-height: 1;
  color: #ffeab0;
  text-shadow: 0 0 8px rgba(255,140,40,.65), 0 2px 0 #000, 0 0 2px #000;
}
#timerNum.low { color: #ff7a5c; text-shadow: 0 0 12px rgba(255,60,30,.9), 0 2px 0 #000; }

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

#plates {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
}

#comboPlate {
  position: absolute;
  left: 50%;
  top: 40%;
  width: var(--combo-w);
  height: var(--combo-h);
  background: url(assets/hud_kit_04_combo_plate.webp) center / 100% 100% no-repeat;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.7);
  transition: opacity .08s linear;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12%;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.75));
}
#comboPlate.show { opacity: 1; }
.comboLabel {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: calc(var(--combo-h) * .19);
  letter-spacing: .2em;
  color: #f5d998;
  text-shadow: 0 1px 2px #000;
}
.comboNum {
  font-family: 'Share Tech Mono', monospace;
  font-size: calc(var(--combo-h) * .62);
  line-height: 1;
  color: #ffe9b0;
  text-shadow: 0 0 9px rgba(255,170,50,.8), 0 2px 0 #000, 0 0 3px #000;
}
.comboNum.t2 { color: #ffb14a; text-shadow: 0 0 12px rgba(255,120,20,.9), 0 2px 0 #000; }
.comboNum.t3 { color: #ff5c36; text-shadow: 0 0 16px rgba(255,40,20,1), 0 2px 0 #000; }
.comboNum.stamp { animation: numStamp .26s cubic-bezier(.2,.9,.3,1.3); }
@keyframes numStamp {
  0% { transform: scale(1.7) rotate(-4deg); }
  55% { transform: scale(.9); }
  100% { transform: scale(1); }
}

#roundBanner {
  position: absolute;
  left: 50%;
  top: 33%;
  width: var(--banner-w);
  aspect-ratio: 616 / 142;
  transform: translate(-50%, -50%) scale(1.4);
  background: url(assets/hud_kit_05_round_banner.webp) center / 100% 100% no-repeat;
  display: grid;
  place-items: center;
  opacity: 0;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.8));
}
#roundBanner.show { opacity: 1; animation: bannerIn .26s cubic-bezier(.2,.9,.3,1.15) forwards; }
@keyframes bannerIn {
  0% { transform: translate(-50%,-50%) scale(1.5); opacity: 0; }
  60% { transform: translate(-50%,-50%) scale(.96); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}
#bannerText {
  font-family: 'Staatliches', Impact, sans-serif;
  font-size: calc(var(--banner-w) * .095);
  letter-spacing: .05em;
  color: #ffeec2;
  text-shadow: 0 0 14px rgba(255,150,40,.55), 0 3px 0 #120800, 2px 0 0 #000, -2px 0 0 #000, 0 -2px 0 #000;
  white-space: nowrap;
}

#breakerBand {
  position: absolute;
  left: 0;
  right: 0;
  top: 42%;
  height: clamp(58px, 19vh, 160px);
  background:
    linear-gradient(90deg, rgba(3,2,5,.94), rgba(3,2,5,.55) 16%, rgba(3,2,5,.55) 84%, rgba(3,2,5,.94)),
    url(assets/breaker_crack.webp) center / 100% 100% no-repeat,
    #060308;
  border-top: 2px solid rgba(255,180,60,.55);
  border-bottom: 2px solid rgba(255,180,60,.35);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scaleY(.08);
  transform-origin: center;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.8));
}
#breakerBand.on {
  opacity: 1;
  animation: breakerIn .3s cubic-bezier(.2,.9,.3,1.25) forwards;
}
@keyframes breakerIn {
  0% { transform: scaleY(.06); opacity: 1; }
  55% { transform: scaleY(1.12); }
  100% { transform: scaleY(1); opacity: 1; }
}
#breakerBand span {
  font-family: 'Staatliches', Impact, sans-serif;
  font-size: calc(clamp(58px, 19vh, 160px) * .36);
  letter-spacing: .04em;
  color: #fff2cf;
  text-shadow: 0 0 16px rgba(255,90,20,.9), 0 0 34px rgba(255,40,10,.5), 0 4px 0 #120000, 2px 0 0 #000, -2px 0 0 #000, 0 -2px 0 #000;
  white-space: nowrap;
}

#koStamp {
  position: absolute;
  left: 50%;
  top: 55%;
  width: var(--ko-w);
  aspect-ratio: 394 / 246;
  transform: translate(-50%, -50%) rotate(-10deg) scale(2.4);
  background: url(assets/hud_kit_06_ko_stamp.webp) center / 100% 100% no-repeat;
  opacity: 0;
  filter: drop-shadow(10px 14px 0 rgba(0,0,0,.75)) drop-shadow(0 0 24px rgba(255,120,20,.35));
}
#koStamp.on {
  opacity: 1;
  animation: koSlam .34s cubic-bezier(.15,.9,.3,1.2) forwards;
}
@keyframes koSlam {
  0% { transform: translate(-50%,-50%) rotate(-10deg) scale(2.6); opacity: 0; }
  55% { transform: translate(-50%,-50%) rotate(-10deg) scale(.93); opacity: 1; }
  100% { transform: translate(-50%,-50%) rotate(-10deg) scale(1); opacity: 1; }
}

/* ---------------- chrome type ---------------- */

.chrome {
  font-family: 'Staatliches', Impact, sans-serif;
  font-weight: 400;
  letter-spacing: .06em;
  color: #f2f7fc;
  background: linear-gradient(180deg, #ffffff 0%, #eaf5ff 14%, #a9c0d4 32%, #4e6478 45%, #f4faff 52%, #c7d6e2 64%, #6d8296 80%, #e8f1f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(1px 0 0 #050406) drop-shadow(-1px 0 0 #050406)
    drop-shadow(0 1px 0 #050406) drop-shadow(0 -1px 0 #050406)
    drop-shadow(0 4px 0 rgba(0,0,0,.9)) drop-shadow(0 8px 14px rgba(0,0,0,.6));
}

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

#titleScreen, #endScreen {
  position: absolute;
  inset: 0;
  z-index: 20;
  cursor: pointer;
}
#titleScreen.hidden, #endScreen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#logo {
  position: absolute;
  left: 50%;
  top: calc(var(--hudpad) + var(--barh) + 6px + var(--port) + 18px);
  transform: translateX(-50%);
  width: min(52vw, 700px);
  height: auto;
  display: block;
  pointer-events: none;
}

.titlePanel, .endPanel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 34px 12px max(18px, 6vh);
  background: linear-gradient(180deg, rgba(4,3,7,0) 0%, rgba(4,3,7,.62) 24%, rgba(4,3,7,.94) 58%, #040307 100%);
}
.endPanel {
  padding-top: 46px;
  background: linear-gradient(180deg, rgba(4,3,7,0) 0%, rgba(4,3,7,.72) 20%, rgba(4,3,7,.96) 48%, #040307 100%);
}
#endScreen {
  z-index: 21;
}

.titleSide {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(12px, 2.1vh, 24px);
  letter-spacing: .24em;
  color: #efc36d;
  text-shadow: 0 2px 0 #000, 0 0 12px rgba(255,150,40,.35);
}
.titleSide .vs {
  font-family: 'Staatliches', Impact, sans-serif;
  color: #ff5a36;
  letter-spacing: .1em;
  padding: 0 .3em;
}
.titleYou {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: clamp(9px, 1.55vh, 15px);
  letter-spacing: .22em;
  color: #9fb4c6;
  margin-bottom: clamp(4px, 1vh, 10px);
}
.titleTap {
  font-size: clamp(24px, 5.4vh, 62px);
  line-height: 1;
  animation: tapPulse 1.5s ease-in-out infinite;
  margin: 2px 0;
}
@keyframes tapPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .62; transform: scale(.985); }
}
.titleHint {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: clamp(9px, 1.75vh, 16px);
  letter-spacing: .13em;
  color: #d9c8a6;
  text-align: center;
  text-shadow: 0 1px 3px #000;
  padding: 0 12px;
}
.titleHint.small { font-size: clamp(8px, 1.45vh, 13px); color: #a8957a; }
.career {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: clamp(8px, 1.5vh, 14px);
  letter-spacing: .16em;
  color: #e6b95f;
  text-shadow: 0 1px 3px #000;
  margin-top: 2px;
  text-align: center;
}

/* ---------------- end screen ---------------- */

#endScreen {
  gap: 4px;
  z-index: 21;
}
.endKicker {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(10px, 1.7vh, 17px);
  letter-spacing: .5em;
  color: #e8a33d;
  text-indent: .5em;
}
.endName { font-size: clamp(30px, 7vh, 84px); line-height: 1; text-align: center; }
.endTap {
  font-size: clamp(17px, 3.2vh, 36px);
  margin-top: 2px;
  animation: tapPulse 1.5s ease-in-out infinite;
}
.board {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: clamp(6px, 1.6vh, 16px);
  min-width: min(78vw, 330px);
}
.boardTitle {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(8px, 1.4vh, 13px);
  letter-spacing: .26em;
  color: #d8a94a;
  text-align: center;
  margin-bottom: 2px;
}
.boardRow {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: clamp(9px, 1.6vh, 15px);
  letter-spacing: .08em;
  color: #cbbfa9;
  padding: 1px 6px;
  border-bottom: 1px solid rgba(232,163,61,.16);
}
.boardRow .r { width: 1.4em; color: #e8a33d; }
.boardRow .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boardRow .v { font-family: 'Share Tech Mono', monospace; color: #ffe6ab; }
.boardRow.mine { color: #fff1c6; background: rgba(232,163,61,.1); }
.boardEmpty { text-align: center; color: #8d7f6c; font-size: clamp(9px, 1.5vh, 13px); letter-spacing: .1em; padding: 4px; }

/* ---------------- touch controls ---------------- */

#touch { position: absolute; inset: 0; z-index: 30; pointer-events: none; display: none; }
#app[data-input="touch"] #touch { display: block; }
#touch .pad {
  position: absolute;
  left: max(8px, env(safe-area-inset-left));
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex;
  gap: 9px;
  pointer-events: auto;
}
#touch .acts {
  position: absolute;
  right: max(9px, env(safe-area-inset-right));
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  pointer-events: auto;
}
#touch .acts .block { grid-column: 1 / span 2; }

.tbtn {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  color: #f4e6c8;
  background:
    linear-gradient(180deg, rgba(64,48,40,.82), rgba(12,8,10,.88) 58%, rgba(24,14,12,.9));
  border: 1px solid rgba(232,163,61,.7);
  outline: 1px solid rgba(0,0,0,.85);
  box-shadow: inset 0 1px 0 rgba(255,229,170,.35), inset 0 -3px 6px rgba(0,0,0,.7), 0 3px 8px rgba(0,0,0,.55);
  clip-path: polygon(14% 0, 86% 0, 100% 20%, 100% 80%, 86% 100%, 14% 100%, 0 80%, 0 20%);
  text-shadow: 0 1px 2px #000;
  touch-action: none;
  cursor: pointer;
  padding: 0;
}
#touch .dir {
  width: clamp(46px, 12.5vw, 64px);
  height: clamp(48px, 6.4vh, 64px);
  font-size: calc(clamp(14px, 3.6vw, 22px));
  color: #efd9a8;
}
#touch .act {
  width: clamp(50px, 13.5vw, 68px);
  height: clamp(34px, 4.9vh, 46px);
  font-size: clamp(8px, 1.9vh, 13px);
  letter-spacing: .12em;
}
#touch .act.block {
  color: #bcd6ff;
  border-color: rgba(90,150,255,.65);
  background: linear-gradient(180deg, rgba(30,48,82,.85), rgba(8,10,20,.9) 58%, rgba(16,24,48,.9));
  box-shadow: inset 0 1px 0 rgba(180,214,255,.35), inset 0 -3px 6px rgba(0,0,0,.7), 0 3px 8px rgba(0,0,0,.55);
}
.tbtn.active {
  background: linear-gradient(180deg, rgba(255,90,52,.9), rgba(120,14,14,.95));
  border-color: #ffd08a;
  color: #fff6dd;
  transform: translateY(1px);
  box-shadow: 0 0 16px rgba(255,80,40,.55), inset 0 0 12px rgba(255,160,80,.4);
}
#touch .act.block.active {
  background: linear-gradient(180deg, rgba(90,160,255,.95), rgba(16,40,120,.95));
  border-color: #cfe4ff;
  box-shadow: 0 0 18px rgba(70,150,255,.6), inset 0 0 12px rgba(160,210,255,.45);
}

/* ---------------- hint + utility buttons ---------------- */

#hint {
  position: absolute;
  left: 50%;
  bottom: calc(9px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 31;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: clamp(9px, 1.5vh, 14px);
  letter-spacing: .14em;
  color: #c9b795;
  text-shadow: 0 1px 3px #000;
  white-space: nowrap;
  pointer-events: none;
}
#app[data-input="touch"] #hint { display: none; }

#utility {
  position: absolute;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 32;
  display: flex;
  align-items: center;
  gap: 6px;
}
#app[data-input="mouse"] #utility { bottom: calc(30px + env(safe-area-inset-bottom)); }
#app[data-phase="title"] #utility,
#app[data-phase="end"] #utility {
  top: calc(var(--hudpad) + var(--barh) + var(--port) + 20px);
  bottom: auto;
  left: max(8px, env(safe-area-inset-left));
  transform: none;
}
#soundBtn, #helpBtn {
  height: 26px;
  min-width: 34px;
  padding: 0 7px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .12em;
  color: #f0cf8b;
  background: linear-gradient(180deg, rgba(30,22,20,.9), rgba(8,6,9,.92));
  border: 1px solid rgba(232,163,61,.55);
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,225,160,.18);
  cursor: pointer;
}
#helpBtn { font-size: 13px; }
#soundBtn.off { color: #9c8f7a; border-color: rgba(140,120,80,.4); }

/* ---------------- help ---------------- */

#helpPanel {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4,3,6,.8);
  padding: 16px;
}
#helpPanel.on { display: flex; }
.helpCard {
  width: min(92vw, 400px);
  max-height: 88vh;
  overflow: auto;
  padding: clamp(14px, 3vh, 26px);
  background:
    linear-gradient(180deg, rgba(20,16,20,.98), rgba(7,6,9,.98)),
    #08070a;
  border: 1px solid rgba(232,163,61,.65);
  box-shadow: 0 0 0 1px #000, 0 18px 50px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,225,160,.15);
}
.helpTitle { font-size: clamp(20px, 3.4vh, 34px); text-align: center; margin-bottom: 10px; }
.helpRow {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(232,163,61,.18);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(11px, 1.9vh, 16px);
  letter-spacing: .05em;
  color: #d8cbb4;
}
.helpRow b { color: #f0c579; letter-spacing: .16em; font-weight: 700; }
.helpRow span { color: #b9a98f; text-align: right; }
.helpNote {
  margin-top: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(10px, 1.7vh, 14px);
  letter-spacing: .06em;
  color: #9e8f79;
  text-align: center;
}
#helpClose {
  display: block;
  margin: 14px auto 0;
  padding: 6px 26px;
  font-family: 'Staatliches', Impact, sans-serif;
  font-size: clamp(15px, 2.4vh, 22px);
  letter-spacing: .1em;
  color: #ffe8b0;
  text-shadow: 0 2px 0 #000, 0 0 8px rgba(255,170,60,.35);
  background: linear-gradient(180deg, rgba(70,52,28,.9), rgba(15,10,6,.95));
  border: 1px solid rgba(232,163,61,.8);
  box-shadow: inset 0 1px 0 rgba(255,225,160,.25), 0 3px 8px rgba(0,0,0,.6);
  cursor: pointer;
}

/* ---------------- loading ---------------- */

#loading {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: #050307;
  transition: opacity .5s ease;
}
#loading span {
  font-family: 'Staatliches', Impact, sans-serif;
  font-size: clamp(18px, 4vh, 40px);
  letter-spacing: .4em;
  text-indent: .4em;
  color: #e8a33d;
  text-shadow: 0 0 14px rgba(255,150,40,.4);
}
#loading.done { opacity: 0; pointer-events: none; }

@media (max-height: 430px) {
  .titleYou { display: none; }
  .titleHint.small { display: none; }
  .titlePanel { padding-top: 18px; padding-bottom: 4vh; }
  .endPanel { padding-top: 22px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  #logo { width: min(26vw, 320px); top: calc(var(--hudpad) + var(--barh) + 6px + var(--port) + 8px); }
}

#app[data-phase="title"] #touch,
#app[data-phase="end"] #touch { opacity: 0; pointer-events: none; }
#touch { transition: opacity .2s linear; }
#hint { transition: opacity .2s linear; }
#app[data-phase="title"] #hint,
#app[data-phase="end"] #hint { opacity: 0; }
