.logo { font-size: clamp(44px, 13vw, 64px); }

.hero-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.hero-pick {
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font: inherit;
  color: var(--ink);
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.hero-pick.on { border-color: var(--sun); background: #33294a; }
.hero-pick canvas { width: 54px; height: 54px; }
.hero-pick small { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.1; }
.hero-pick.on small { color: var(--sun); }

.hero-show { display: grid; grid-template-columns: 136px minmax(0, 1fr); align-items: center; background: var(--panel); border-radius: 12px; }
#preview { width: 136px; height: 136px; display: block; }
.hero-info { padding: 10px 12px 10px 2px; font-size: 14px; }
.hero-info h3 { margin: 0; font-size: 17px; }
.hero-info h3 small { margin-left: 6px; color: var(--sun); font-size: 13px; }
.hero-info p { margin: 4px 0 8px; color: var(--muted); }
.hero-info ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.hero-info li { display: flex; gap: 8px; align-items: center; }
.hero-info li span { width: 22px; text-align: center; }
.hero-info li em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 12px; }

.laga {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #16261a;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.laga[hidden] { display: none; }
.laga > canvas#canvas, .laga > canvas#overlay { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.laga > canvas#overlay { pointer-events: none; }

.stick-zone { position: absolute; left: 0; top: 70px; bottom: 0; width: 50%; touch-action: none; }
.stick {
  position: absolute;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border-radius: 50%;
  background: rgba(255, 246, 230, .12);
  border: 2px solid rgba(255, 246, 230, .35);
  pointer-events: none;
}
.stick i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: rgba(255, 246, 230, .75);
}

.hud-top {
  position: absolute;
  top: max(6px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  pointer-events: none;
}
.me { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
.me canvas { width: 46px; height: 46px; flex: none; background: rgba(22, 19, 31, .75); border-radius: 50%; border: 2px solid var(--line); }
.lv {
  position: absolute;
  left: 30px;
  top: 30px;
  min-width: 20px;
  height: 20px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #1d0f0a;
  background: var(--sun);
  border-radius: 10px;
}
.me-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.xp { width: 110px; max-width: 100%; height: 5px; background: rgba(22, 19, 31, .75); border-radius: 3px; overflow: hidden; }
.xp i { display: block; height: 100%; width: 0; background: var(--sun); }
.me-text small { font-size: 12px; font-weight: 800; white-space: nowrap; text-shadow: 0 1px 2px #000; }
.items { display: flex; gap: 1px; font-size: 13px; min-height: 16px; }

.scoreboard {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 12px;
  background: rgba(22, 19, 31, .78);
  border-radius: 12px;
  font-weight: 800;
}
.scoreboard b { font-size: 20px; min-width: 22px; text-align: center; }
.scoreboard .us { color: #7fc4ff; }
.scoreboard .them { color: #ff8d7a; }
.scoreboard span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.corner { display: grid; grid-template-columns: auto auto; justify-content: end; justify-items: end; gap: 4px; }
.corner canvas { grid-column: 1 / -1; width: min(104px, 24vmin); height: min(104px, 24vmin); border-radius: 8px; border: 2px solid var(--line); background: #24402b; }
.round {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  background: rgba(22, 19, 31, .78);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
}
.round.off { opacity: .45; text-decoration: line-through; }

.feed {
  position: absolute;
  top: max(66px, calc(env(safe-area-inset-top) + 60px));
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, 60vw);
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}
.feed li { padding: 2px 10px; font-size: 12px; font-weight: 700; text-align: center; background: rgba(22, 19, 31, .72); border-radius: 8px; }
.feed li.good { color: #9fd5ff; }
.feed li.bad { color: #ffa897; }

.banner {
  position: absolute;
  top: 40%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: clamp(28px, 8vmin, 54px);
  font-weight: 900;
  font-style: italic;
  color: var(--sun);
  text-shadow: 0 3px 0 #231a2c;
  pointer-events: none;
}
.death-note {
  position: absolute;
  top: 45%;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 2px 3px #000;
  pointer-events: none;
}
.rotate-note { display: none; position: absolute; top: 112px; left: 0; right: 0; margin: 0; text-align: center; font-size: 12px; color: var(--muted); pointer-events: none; }
@media (orientation: portrait) { .rotate-note { display: block; } }

.actions {
  position: absolute;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  width: 216px;
  height: 196px;
  pointer-events: none;
}
.actions button { position: absolute; border: 0; border-radius: 50%; touch-action: none; cursor: pointer; pointer-events: auto; font: inherit; padding: 0; }
.attack { right: 0; bottom: 0; width: 92px; height: 92px; font-size: 38px; background: rgba(255, 90, 54, .88); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .25); }
.attack.down { transform: scale(.93); }
.skill { width: 64px; height: 64px; overflow: hidden; color: var(--ink); background: rgba(35, 30, 49, .9); box-shadow: inset 0 0 0 2px var(--sun); }
.skill.s0 { right: 106px; bottom: 0; }
.skill.s1 { right: 92px; bottom: 72px; }
.skill.s2 { right: 10px; bottom: 112px; }
.skill .ic { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; }
.skill .cd { position: absolute; inset: 0; background: conic-gradient(rgba(10, 8, 16, .78) calc(var(--cd, 0) * 360deg), transparent 0); }
.skill .num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; text-shadow: 0 1px 3px #000; }
.skill.locked { filter: grayscale(1); opacity: .55; box-shadow: inset 0 0 0 2px var(--line); }
.skill.aiming { box-shadow: inset 0 0 0 3px #fff; }
.actions.dead { opacity: .4; }

.overlay { position: absolute; inset: 0; z-index: 5; display: flex; padding: 12px; overflow-y: auto; background: rgba(10, 8, 16, .78); touch-action: pan-y; }
.sheet { margin: auto; width: min(460px, 100%); padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--night); border: 2px solid var(--line); border-radius: 16px; }
.sheet-title { margin: 0; text-align: center; font-size: 30px; font-weight: 900; font-style: italic; color: var(--sun); }
.sheet-title.lose { color: #ff8d7a; }
.tally { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tally ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 13px; }
.tally li { display: flex; justify-content: space-between; gap: 6px; padding: 3px 6px; background: var(--panel); border-radius: 6px; }
.tally li.me-row { outline: 2px solid var(--sun); }
.tally li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tally li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
