:root {
  --bg: #0b0d12;
  --ink: #f4f5f7;
  --ink-2: #c3c7cf;
  --muted: #8a909b;
  --glass: rgba(16, 18, 24, 0.62);
  --line: rgba(255, 255, 255, 0.22);
  --red: #ff3b3b;
  --gold: #ffc861;
  --blue: #2f8cff;
  --green: #4dff8a;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  -webkit-user-select: none; user-select: none; touch-action: none; overscroll-behavior: none;
  -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
.red { color: var(--red); }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud button, #stick-zone { pointer-events: auto; }
.pill {
  background: var(--glass); border-radius: 10px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; font-variant-numeric: tabular-nums;
}
.hud-top-left { position: absolute; left: calc(12px + var(--safe-l)); top: calc(10px + var(--safe-t)); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.main-pill { font-size: 22px; font-weight: 500; letter-spacing: 0.02em; padding: 7px 16px; }
.main-pill .ico { font-size: 20px; filter: grayscale(1) brightness(2); }
.main-pill .sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.sub-row { display: flex; gap: 6px; }
.prize-pill { font-size: 15px; color: var(--gold); font-weight: 700; padding: 4px 12px; }
.icon-btn { font-size: 13px; font-weight: 800; padding: 4px 12px; color: var(--ink-2); }
.tracker {
  background: rgba(30, 20, 6, 0.72); border: 1px solid rgba(255, 200, 97, 0.55); border-radius: 10px;
  padding: 6px 10px; min-width: 210px; max-width: 280px; animation: glowBorder 1.2s ease-in-out infinite alternate;
}
.tracker.green { background: rgba(6, 30, 14, 0.72); border-color: rgba(77, 255, 138, 0.55); }
.tr-title { font-size: 13px; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.tr-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.tr-meta #tr-time { color: var(--gold); font-weight: 700; }
@keyframes glowBorder { from { box-shadow: 0 0 0 rgba(255, 200, 97, 0); } to { box-shadow: 0 0 14px rgba(255, 200, 97, 0.35); } }
.lockbar { background: rgba(120, 10, 10, 0.85); color: #fff; font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 8px; border: 1px solid rgba(255, 80, 80, 0.7); }
.lockbar.danger { animation: pulseBg 0.5s ease-in-out infinite alternate; }
@keyframes pulseBg { from { background: rgba(160, 10, 10, 0.9); } to { background: rgba(255, 40, 40, 0.95); } }
.carry { background: rgba(255, 200, 97, 0.9); color: #2a1b00; font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 999px; }

.hud-top-right { position: absolute; right: calc(12px + var(--safe-r)); top: calc(10px + var(--safe-t)); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.map-btn {
  width: 64px; height: 64px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 1px solid var(--line);
}
.map-btn span { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; }
.map-btn.on { background: rgba(47, 140, 255, 0.55); }
.mapview { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 12; background: rgba(0, 0, 0, 0.35); }
.mv-card {
  pointer-events: auto; background: rgba(14, 16, 22, 0.94); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px 10px;
  display: flex; flex-direction: column; gap: 6px; animation: mvIn 0.18s ease-out;
}
@keyframes mvIn { from { transform: scale(0.92); opacity: 0; } }
.mv-head { display: flex; align-items: center; gap: 10px; }
.mv-head b { letter-spacing: 0.2em; }
.mv-note { font-size: 11px; color: var(--gold); flex: 1; }
#btn-map-close { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); font-size: 15px; }
#minimap { display: block; width: min(62vh, 78vw); height: min(62vh, 78vw); border-radius: 6px; image-rendering: auto; }
.mv-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--ink-2); }
.mv-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.effect-pill { font-size: 17px; font-weight: 600; padding: 4px 12px; }
.effect-pill.warn #effect-time { color: var(--gold); }

#toasts { position: absolute; left: calc(12px + var(--safe-l)); top: 46%; display: flex; flex-direction: column; gap: 6px; }
.toast {
  background: var(--glass); border-left: 3px solid var(--red); border-radius: 6px; padding: 6px 12px; font-size: 13px;
  animation: toastIn 0.3s ease-out, toastOut 0.5s ease-in 3s forwards;
}
.toast.good { border-left-color: var(--green); }
.toast.info { border-left-color: var(--gold); }
@keyframes toastIn { from { transform: translateX(-20px); opacity: 0; } }
@keyframes toastOut { to { transform: translateX(-20px); opacity: 0; } }

/* スティック */
#stick-zone { position: absolute; left: 0; bottom: 0; width: 50%; height: 62%; touch-action: none; }
#stick-base {
  position: absolute; left: calc(36px + var(--safe-l)); bottom: calc(24px + var(--safe-b)); width: 124px; height: 124px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55); background: rgba(20, 22, 28, 0.25); transition: opacity 0.2s;
}
#stick-base.float { transition: none; }
#stick-knob {
  position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f2f2f2, #b9bcc2); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.ar { position: absolute; width: 0; height: 0; border: 6px solid transparent; opacity: 0.55; }
.ar.u { left: 50%; top: 8px; margin-left: -6px; border-bottom-color: #fff; border-top: 0; }
.ar.d { left: 50%; bottom: 8px; margin-left: -6px; border-top-color: #fff; border-bottom: 0; }
.ar.l { top: 50%; left: 8px; margin-top: -6px; border-right-color: #fff; border-left: 0; }
.ar.r { top: 50%; right: 8px; margin-top: -6px; border-left-color: #fff; border-right: 0; }

#btn-sprint {
  position: absolute; right: calc(28px + var(--safe-r)); bottom: calc(28px + var(--safe-b)); width: 96px; height: 96px; border-radius: 50%;
  background: rgba(20, 22, 28, 0.45); touch-action: none;
  --st: 100%;
}
#btn-sprint::before { /* スタミナの輪 */
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(var(--ring, #fff) var(--st), rgba(255, 255, 255, 0.15) 0);
  -webkit-mask: radial-gradient(circle, transparent 50px, #000 51px); mask: radial-gradient(circle, transparent 50px, #000 51px);
}
#btn-sprint.low { --ring: var(--red); }
#btn-sprint.boost { --ring: var(--green); }
#btn-sprint.on { background: rgba(255, 255, 255, 0.18); transform: scale(0.96); }
.runner-ico { width: 54px; height: 54px; }

#sense { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.sense {
  position: absolute; left: -22px; top: -16px; width: 44px; height: 32px; opacity: 0; transition: opacity 0.2s;
  background: radial-gradient(ellipse at 70% 50%, rgba(255, 40, 40, 0.9), rgba(255, 40, 40, 0) 70%);
  clip-path: polygon(0 0, 100% 50%, 0 100%, 30% 50%);
}
#btn-action {
  position: absolute; right: calc(40px + var(--safe-r)); bottom: calc(140px + var(--safe-b)); min-width: 72px; height: 72px; border-radius: 36px;
  padding: 0 14px; background: rgba(255, 200, 97, 0.92); color: #2a1b00; font-weight: 900; font-size: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; touch-action: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); animation: actPop 0.25s ease-out;
}
#btn-action #act-icon { font-size: 24px; line-height: 1.1; }
#btn-action.in { background: rgba(160, 120, 80, 0.95); color: #fff; }
@keyframes actPop { from { transform: scale(0.6); opacity: 0; } }
#btn-crouch, #btn-item {
  position: absolute; width: 62px; height: 62px; border-radius: 50%; background: rgba(20, 22, 28, 0.5); border: 2px solid rgba(255, 255, 255, 0.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none;
}
#btn-crouch { right: calc(140px + var(--safe-r)); bottom: calc(30px + var(--safe-b)); }
#btn-item { right: calc(140px + var(--safe-r)); bottom: calc(104px + var(--safe-b)); }
#btn-crouch span, #btn-item span { font-size: 22px; line-height: 1; }
#btn-crouch small, #btn-item small { font-size: 9px; font-weight: 800; margin-top: 2px; }
#btn-crouch.on { background: rgba(47, 140, 255, 0.6); border-color: #9fd0ff; }
#call-fx { position: absolute; inset: 0; box-shadow: inset 0 0 120px 30px rgba(40, 160, 80, 0.5); display: flex; align-items: center; justify-content: center; }
#call-fx span { background: rgba(0, 0, 0, 0.6); padding: 8px 18px; border-radius: 999px; font-size: 16px; font-weight: 800; }
#call-fx b { color: #7dffa0; font-size: 22px; }
#hide-fx { position: absolute; inset: 0; box-shadow: inset 0 0 160px 60px rgba(40, 25, 10, 0.85); display: flex; align-items: flex-end; justify-content: center; }
#hide-fx span { margin-bottom: calc(24px + var(--safe-b)); background: rgba(0, 0, 0, 0.5); padding: 6px 14px; border-radius: 999px; font-size: 13px; }
#vignette { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s; box-shadow: inset 0 0 120px 30px rgba(255, 0, 0, 0.55); }
#vignette.on { animation: pulse 0.6s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.35; } to { opacity: 0.9; } }
#spotted {
  position: absolute; left: 50%; top: 24%; transform: translateX(-50%); font-size: 30px; font-weight: 900; color: #fff;
  text-shadow: 0 0 12px var(--red), 0 2px 0 #900; letter-spacing: 0.1em; animation: pop 1.2s ease-out forwards;
}
@keyframes pop { 0% { transform: translateX(-50%) scale(1.8); opacity: 0; } 15% { transform: translateX(-50%) scale(1); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
#freeze-fx { position: absolute; inset: 0; box-shadow: inset 0 0 100px 20px rgba(120, 200, 255, 0.45); }

/* ミッション通知 */
.notice {
  position: fixed; left: 50%; top: calc(12px + var(--safe-t)); transform: translateX(-50%); width: min(420px, 62vw);
  background: rgba(245, 246, 248, 0.96); color: #111; border-radius: 16px; padding: 10px 14px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: drop 0.45s cubic-bezier(.2, 1.4, .4, 1); z-index: 20;
}
.notice.green .n-head span:first-child { color: #0a8a3a; }
@keyframes drop { from { transform: translate(-50%, -140%); } }
.n-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; color: #c41a1a; letter-spacing: 0.06em; }
.n-head span:last-child { color: #777; font-weight: 600; }
.n-title { font-size: 17px; font-weight: 900; margin-top: 3px; }
.n-body { font-size: 13px; line-height: 1.5; margin-top: 3px; color: #333; }

.center-msg {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); font-size: 64px; font-weight: 900; letter-spacing: 0.08em;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 0, 0, 0.6); z-index: 15; white-space: nowrap; pointer-events: none;
}
.center-msg.caught { color: #fff; font-size: 96px; text-shadow: 0 0 30px var(--red), 0 6px 0 #7a0000; animation: slam 0.35s cubic-bezier(.2, 1.6, .4, 1); }
.center-msg.small { font-size: 34px; }
.center-msg.anim { animation: slam 0.35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes slam { from { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } }

/* ---------- 画面（タイトル・モーダル） ---------- */
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 30; padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l)); }
#title { background: linear-gradient(90deg, rgba(5, 6, 10, 0.92) 0%, rgba(5, 6, 10, 0.55) 55%, rgba(5, 6, 10, 0.1) 100%); justify-content: flex-start; }
.title-inner { display: flex; flex-direction: column; gap: 14px; max-width: 420px; width: 100%; padding-left: 4vw; }
.logo-sub { font-size: 12px; letter-spacing: 0.3em; color: var(--ink-2); }
.logo-main { font-size: clamp(54px, 11vw, 84px); font-weight: 900; line-height: 1; letter-spacing: 0.04em; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.6); }
.logo-main .red { text-shadow: 0 0 24px rgba(255, 59, 59, 0.6), 0 4px 0 #6a0000; }
.logo-tag { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.diff { display: flex; background: rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 4px; gap: 4px; }
.diff button { flex: 1; padding: 10px 0; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.diff button.on { background: #fff; color: #111; }
.btn-primary, .btn-warn, .btn-ghost { width: 100%; padding: 14px; border-radius: 12px; font-size: 18px; font-weight: 800; }
.btn-primary { background: linear-gradient(180deg, #ff4d4d, #d81f1f); color: #fff; box-shadow: 0 4px 0 #7d0b0b, 0 8px 20px rgba(255, 40, 40, 0.3); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #7d0b0b; }
.btn-warn { background: var(--gold); color: #2a1b00; }
.btn-ghost { background: rgba(255, 255, 255, 0.1); font-size: 15px; padding: 11px; }
.title-row { display: flex; gap: 8px; }
.best { font-size: 13px; color: var(--muted); min-height: 1em; }
.rotate-hint { font-size: 12px; color: var(--muted); display: none; }
@media (orientation: portrait) {
  .rotate-hint { display: block; }
  #title { background: linear-gradient(180deg, rgba(5, 6, 10, 0.25), rgba(5, 6, 10, 0.92) 45%); align-items: flex-end; justify-content: center; }
  .title-inner { padding-left: 0; }
  .notice { width: calc(100vw - 32px); top: calc(150px + var(--safe-t)); }
  .center-msg { font-size: 44px; }
  .center-msg.caught { font-size: 72px; }
  #stick-zone { width: 55%; height: 45%; }
  #minimap { width: min(80vw, 46vh); height: min(80vw, 46vh); }
  .main-pill { font-size: 17px; padding: 5px 11px; gap: 6px; }
  .main-pill .sep { margin: 0 2px; }
}

.modal { background: rgba(4, 5, 8, 0.75); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.card {
  background: #15171d; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 18px; padding: 20px; width: min(560px, 100%);
  max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; touch-action: pan-y;
}
.card.small { width: min(360px, 100%); }
.card h2 { margin: 0 0 4px; font-size: 22px; }
.rules { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.rules b { color: var(--ink); }
.items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.items div { background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 8px 10px; display: grid; grid-template-columns: 32px 1fr; column-gap: 6px; }
.items span { grid-row: span 2; font-size: 24px; align-self: center; }
.items b { font-size: 14px; }
.items small { font-size: 11px; color: var(--muted); }
.kb { font-size: 12px; color: var(--muted); margin: 0; }
.muted { color: var(--ink-2); margin: 0 0 6px; font-size: 14px; }
.muted b { color: var(--gold); }

.result { text-align: center; align-items: stretch; width: min(420px, 100%); }
.r-label { font-size: 12px; letter-spacing: 0.3em; color: var(--muted); }
.r-title { font-size: 40px; font-weight: 900; }
.r-title.win { color: var(--gold); text-shadow: 0 0 20px rgba(255, 200, 97, 0.4); }
.r-title.lose { color: var(--red); }
.r-prize { font-size: 44px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.r-prize.zero { color: var(--muted); text-decoration: line-through; }
.r-new { color: #111; background: var(--gold); border-radius: 999px; padding: 3px 12px; align-self: center; font-weight: 800; font-size: 13px; }
.r-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 6px; }
.r-stats div { background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 8px; font-size: 12px; color: var(--muted); }
.r-stats b { display: block; font-size: 17px; color: var(--ink); margin-top: 2px; }

#loading { background: var(--bg); z-index: 50; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--red); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 小さい横画面（スマホ横）向けの詰め */
@media (max-height: 430px) {
  .main-pill { font-size: 18px; padding: 5px 12px; }
  .map-btn { width: 54px; height: 54px; }
  #minimap { width: min(60vh, 70vw); height: min(60vh, 70vw); }
  #stick-base { width: 112px; height: 112px; left: calc(28px + var(--safe-l)); bottom: calc(16px + var(--safe-b)); }
  #btn-sprint { width: 84px; height: 84px; right: calc(24px + var(--safe-r)); bottom: calc(20px + var(--safe-b)); }
  #btn-action { bottom: calc(118px + var(--safe-b)); right: calc(30px + var(--safe-r)); height: 64px; min-width: 64px; }
  #btn-crouch, #btn-item { width: 54px; height: 54px; right: calc(122px + var(--safe-r)); }
  #btn-crouch { bottom: calc(24px + var(--safe-b)); }
  #btn-item { bottom: calc(88px + var(--safe-b)); }
  #btn-sprint::before { -webkit-mask: radial-gradient(circle, transparent 44px, #000 45px); mask: radial-gradient(circle, transparent 44px, #000 45px); }
  .title-inner { gap: 9px; }
  .logo-main { font-size: 52px; }
  .btn-primary { padding: 11px; }
  .card { padding: 14px; gap: 8px; }
  .r-title { font-size: 30px; }
  .r-prize { font-size: 34px; }
}

/* ---------- 協力モード ---------- */
.btn-coop { width: 100%; padding: 12px; border-radius: 12px; font-size: 15px; font-weight: 800; background: rgba(59, 140, 255, 0.22); border: 1px solid rgba(110, 170, 255, 0.6); color: #dbe9ff; }
.lobby { gap: 8px; }
.lb-label { font-size: 12px; color: var(--muted); }
.lb-input { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink); font-size: 17px; -webkit-user-select: text; user-select: text; }
.lb-input.code { text-align: center; letter-spacing: 0.4em; font-size: 22px; font-weight: 800; }
.lb-or { font-size: 12px; color: var(--muted); text-align: center; margin: 6px 0 2px; }
.lb-joinrow { display: flex; gap: 8px; }
.lb-joinrow .btn-warn { width: 96px; flex: none; }
.lb-codebox { text-align: center; font-size: 12px; color: var(--muted); }
.lb-codebox b { display: block; font-size: 46px; letter-spacing: 0.25em; color: var(--gold); }
.lb-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lb-members li { background: rgba(255, 255, 255, 0.06); border-radius: 10px; padding: 9px 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.lb-members i, .mp-row i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1px solid rgba(255, 255, 255, 0.5); }
.lb-members small { margin-left: auto; font-size: 11px; color: var(--gold); }
.lb-status { min-height: 1em; font-size: 13px; color: var(--gold); margin: 0; text-align: center; }
.spec { position: absolute; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translateX(-50%); background: rgba(10, 12, 18, 0.8); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px 8px 14px; display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.spec span { font-size: 13px; display: flex; flex-direction: column; }
.spec small { color: var(--muted); font-size: 11px; }
.spec button { background: #3b8cff; color: #fff; font-weight: 800; font-size: 13px; padding: 8px 12px; border-radius: 10px; }
.r-stats .mp-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; text-align: left; font-size: 14px; color: var(--ink); }
.r-stats .mp-row b { margin-left: auto; font-size: 15px; display: inline; margin-top: 0; }
.r-stats .mp-row.me { background: rgba(255, 200, 97, 0.15); }

/* ---------- 変身かくれんぼ ---------- */
.btn-henshin { width: 100%; padding: 12px; border-radius: 12px; font-size: 15px; font-weight: 800; background: rgba(255, 120, 200, 0.18); border: 1px solid rgba(255, 150, 210, 0.6); color: #ffe0f2; }
.hs-bar { position: absolute; right: calc(132px + var(--safe-r)); bottom: calc(24px + var(--safe-b)); display: none; gap: 8px; }
body.mode-henshin .hs-bar { display: flex; }
body.mode-henshin #btn-crouch, body.mode-henshin #btn-item { display: none !important; }
.hs-bar button { width: 64px; height: 64px; border-radius: 16px; background: rgba(20, 22, 28, 0.6); border: 2px solid rgba(255, 150, 210, 0.6); display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; }
.hs-bar button span { font-size: 22px; line-height: 1; }
.hs-bar button small { font-size: 9px; font-weight: 800; margin-top: 3px; white-space: nowrap; }
.hs-bar button.off { opacity: 0.35; }
@media (max-height: 430px) { .hs-bar { right: calc(116px + var(--safe-r)); bottom: calc(18px + var(--safe-b)); } .hs-bar button { width: 56px; height: 56px; } }
@media (orientation: portrait) { .hs-bar { bottom: calc(140px + var(--safe-b)); right: calc(16px + var(--safe-r)); flex-direction: column; } }

.mapsel button { position: relative; font-size: 13px; }
.mapsel button small { position: absolute; top: -6px; right: 4px; background: var(--red); color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 6px; }
