/*
 * 用心棒 Yōjinbō — side-scrolling beat 'em up.
 *
 * Landscape, like Kageboushi and for the same reason: this genre is a street
 * seen from the side and it needs the width. One player here, so the stick
 * sits bottom-left and the buttons bottom-right, both inside the letterbox.
 */
.yj-stage { position: relative; overflow: hidden; touch-action: none; }
.yj-stage canvas#canvas { display: block; width: 100%; height: 100%; background: #0a0710; }

:root {
  --yj-paper: #f2e6cf; --yj-gold: #e0b040; --yj-red: #c0392b;
  --yj-serif: "Shippori Mincho B1", "Hiragino Mincho ProN", Georgia, serif;
}
.yj-hud[hidden], .yj-screen[hidden], .yj-banner[hidden], .yj-wpn[hidden] { display: none !important; }

.yj-hud { position: absolute; inset: 10px 14px auto 14px; display: flex;
  justify-content: space-between; align-items: flex-start; gap: 12px; pointer-events: none; }
.yj-left { display: flex; flex-direction: column; gap: 4px; min-width: 44%; }
.yj-hpbar { display: block; height: 16px; background: rgba(10,7,16,.55);
  border: 2px solid #14100e; border-radius: 2px; overflow: hidden; }
.yj-hpbar i { display: block; height: 100%; width: 100%; background: var(--yj-paper);
  transition: width .12s linear; }
.yj-row { display: flex; gap: 8px; align-items: center; }
.yj-lives { font-size: 12px; color: var(--yj-red); letter-spacing: .16em; }
.yj-wpn { font-family: var(--yj-serif); font-size: 12px; color: var(--yj-gold);
  border: 1px solid rgba(224,176,64,.5); border-radius: 3px; padding: 0 5px; }
.yj-right { text-align: right; }
.yj-lbl { display: block; font-family: Inter, system-ui, sans-serif; font-size: 8px;
  letter-spacing: .16em; color: rgba(242,230,207,.55); }
.yj-score { font-family: var(--yj-serif); font-size: 22px; color: var(--yj-paper);
  font-variant-numeric: tabular-nums; }
.yj-prog { position: absolute; left: 0; right: 0; bottom: -8px; height: 3px;
  background: rgba(10,7,16,.4); }
.yj-prog i { display: block; height: 100%; background: rgba(224,176,64,.75); width: 0; }

.yj-combo { position: absolute; right: 0; top: 54px; font-family: var(--yj-serif);
  font-size: 20px; color: var(--yj-gold); text-shadow: 0 2px 8px rgba(0,0,0,.85); }
.yj-combo[hidden] { display: none !important; }
.yj-banner { position: absolute; left: 50%; top: 30%; transform: translate(-50%,-50%);
  font-family: var(--yj-serif); font-size: 30px; letter-spacing: .12em;
  color: var(--yj-paper); text-shadow: 0 2px 10px rgba(0,0,0,.8); pointer-events: none; }

.yj-screen { position: absolute; inset: auto; left: 50%; top: 50%;
  transform: translate(-50%,-50%); width: min(94%, 520px); max-height: 94%;
  overflow-y: auto; justify-content: flex-start;
  background: linear-gradient(180deg, rgba(28,20,34,.97), rgba(12,8,16,.98));
  border: 1px solid rgba(224,176,64,.28); border-radius: 16px;
  font-family: var(--yj-serif); color: var(--yj-paper);
  box-shadow: 0 22px 60px rgba(0,0,0,.7); z-index: 5; }
.yj-logo { text-align: center; margin: 0; }
.yj-logo span { display: block; font-size: 44px; letter-spacing: .14em; color: var(--yj-gold); }
.yj-logo em { display: block; font-style: normal; font-family: Inter, system-ui, sans-serif;
  font-size: 9px; letter-spacing: .3em; color: rgba(242,230,207,.5); margin-top: 6px; }
.yj-logo.yj-small span { font-size: 28px; }
.yj-screen p { font-size: 15px; line-height: 1.5; text-align: center; color: rgba(242,230,207,.85); }
.yj-fine { font-size: 12px !important; color: rgba(242,230,207,.45) !important; }
.yj-moves { display: flex; flex-direction: column; gap: 4px; font-size: 13px;
  color: rgba(242,230,207,.72); text-align: left; width: 100%; }
.yj-moves .yj-key { color: var(--yj-gold); }
.yj-btn-gold { background: var(--yj-gold); color: #241a06; border: 0; border-radius: 999px;
  font-family: Inter, system-ui, sans-serif; font-weight: 700; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; padding: 13px 26px; }
.yj-screen .jg-btn { border-radius: 999px; font-family: Inter, system-ui, sans-serif;
  font-size: 12px; letter-spacing: .12em; }
.yj-rotate { display: none; }

/* ---- touch: stick left, buttons right, both in the letterbox ---- */
.yj-pads { position: absolute; inset: 0; pointer-events: none; z-index: 2; display: none; }
body.yj-touch .yj-pads { display: block; }
.yj-b { position: absolute; pointer-events: auto; border-radius: 50%;
  background: rgba(14,10,18,.34); border: 2px solid rgba(242,230,207,.28);
  color: rgba(242,230,207,.92); font-family: var(--yj-serif); font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  user-select: none; -webkit-user-select: none; }
.yj-b.on { background: var(--yj-gold); color: #241a06; border-color: #8a6a14; }
.yj-l, .yj-r, .yj-u, .yj-d { width: 60px; height: 60px; }
.yj-l { left: 14px;  bottom: calc(76px + env(safe-area-inset-bottom,0px)); }
.yj-r { left: 146px; bottom: calc(76px + env(safe-area-inset-bottom,0px)); }
.yj-u { left: 80px;  bottom: calc(140px + env(safe-area-inset-bottom,0px)); }
.yj-d { left: 80px;  bottom: calc(14px + env(safe-area-inset-bottom,0px)); }
.yj-hit { right: 16px;  bottom: calc(20px + env(safe-area-inset-bottom,0px));
  width: 84px; height: 84px; font-size: 14px; letter-spacing: .05em; }
.yj-jmp { right: 108px; bottom: calc(64px + env(safe-area-inset-bottom,0px));
  width: 66px; height: 66px; font-size: 11px; letter-spacing: .05em; }
.yj-blk { right: 112px; bottom: calc(146px + env(safe-area-inset-bottom,0px));
  width: 62px; height: 62px; font-size: 20px;
  border-color: rgba(110,170,210,.7); color: #bcd9ec; }
.yj-sp  { right: 26px;  bottom: calc(116px + env(safe-area-inset-bottom,0px));
  width: 58px; height: 58px; font-size: 20px;
  border-color: rgba(192,57,43,.7); color: #f0b8ac; }

@media (orientation: portrait) and (pointer: coarse) {
  .yj-rotate { display: block; color: var(--yj-gold) !important; }
}
@media (max-width: 560px) { .yj-logo span { font-size: 32px; } .yj-banner { font-size: 22px; } }
