/* Hunter × Hunter Nen run: scoped to its modal and panel. */
.game-modal[data-game="hunter"] .game-modal-content { width: min(980px, 100%); padding: 20px; background: #15131a; color: #ece4d2; border: 1px solid #3a3443; border-radius: 12px; }
.game-modal[data-game="hunter"] .game-modal-header { margin-bottom: 10px; }
.game-modal[data-game="hunter"] .game-heading h3 { font-size: 11px; color: #9a8f7c; letter-spacing: .08em; text-transform: uppercase; }
.game-modal[data-game="hunter"] .game-back { color: #b9ac95; border-color: #3a3443; }
.game-modal[data-game="hunter"] .game-close { color: #ece4d2; }
.game-modal[data-game="hunter"] .game-close:hover { background: #2a2531; }
.game-modal[data-game="hunter"] :focus-visible { outline: 3px solid #f0c777; outline-offset: 3px; }
.hunter-game { font: 13px/1.45 system-ui, sans-serif; color: #ece4d2; }
.hunter-game *, .hunter-game *::before, .hunter-game *::after { box-sizing: border-box; }
.hunter-game h4, .hunter-game h5, .hunter-game p { margin: 0; }
.hunter-game svg { width: 22px; height: 22px; flex-shrink: 0; }
.hunter-game button { font: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.hn-eyebrow { display: block; font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; color: #a89b82; }
.hn-masthead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.hn-masthead h4 { font-size: 26px; letter-spacing: -.04em; line-height: 1.15; color: #f5efe0; }
.hn-masthead h4 span { color: #f0c777; }
.hn-top-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hn-score { display: flex; align-items: baseline; gap: 4px; font: 600 18px ui-monospace, monospace; color: #f5efe0; margin-right: 6px; }
.hn-score span { font-size: 11px; color: #a89b82; }
.hn-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid #3a3443; border-radius: 8px; background: #1e1a25; color: #d9cfbb; }
.hn-icon-button[aria-pressed="true"] { background: #f0c777; color: #1e1a25; border-color: #f0c777; }
.hn-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, .85fr); gap: 14px; align-items: start; }
.hunter-game[data-screen="play"] .hn-layout { grid-template-columns: 1fr; }
.hunter-game[data-screen="play"] .hn-stage { width: 100%; max-width: 880px; margin: 0 auto; }
.hunter-game[data-screen="play"] .hn-live { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; max-width: 880px; margin: 0 auto; width: 100%; }
.hn-stage { position: relative; border-radius: 10px; overflow: hidden; background: #1b1a22; border: 1px solid #3a3443; isolation: isolate; }
#hunterCanvas { display: block; width: 100%; aspect-ratio: 16 / 9; touch-action: none; user-select: none; -webkit-user-select: none; color: transparent; }
.hn-hud { position: absolute; inset: 0; pointer-events: none; font: 11px/1.3 ui-monospace, monospace; color: #f5efe0; text-shadow: 0 1px 2px #000c; }
.hn-hud-stage { position: absolute; top: 10px; left: 12px; display: grid; gap: 2px; }
.hn-hud-stage span { font-size: 9px; letter-spacing: .12em; color: #d9cfbb; }
.hn-hud-stage strong { font-size: 13px; font-weight: 600; }
.hn-hud-stage #hunterApplicants { margin-top: 3px; color: #f0c777; }
.hn-progress { display: block; width: 110px; height: 3px; background: #ffffff33; border-radius: 2px; overflow: hidden; margin-top: 3px; }
.hn-progress b { display: block; height: 100%; background: #f0c777; transform-origin: left; transform: scaleX(0); }
.hn-hud-plates { position: absolute; top: 10px; right: 12px; text-align: right; }
.hn-hud-plates strong { display: block; font-size: 18px; font-weight: 600; }
.hn-hud-plates span { font-size: 9px; letter-spacing: .12em; color: #d9cfbb; }
.hn-warning { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); padding: 4px 10px; background: #5b1b28e6; border: 1px solid #ff9aa8; border-radius: 4px; font-size: 10px; letter-spacing: .08em; color: #ffd7dd; white-space: nowrap; }
.hn-hud-aura { position: absolute; left: 154px; right: 112px; bottom: 26px; display: grid; grid-template-columns: 58px 1fr 30px; align-items: center; gap: 8px; }
.hn-hud-aura span { font-size: 10px; letter-spacing: .14em; }
.hn-hud-aura span:last-child { text-align: right; }
.hn-hud-aura i { display: block; height: 6px; background: #ffffff2a; border-radius: 3px; overflow: hidden; }
.hn-hud-aura b { display: block; height: 100%; background: linear-gradient(90deg, #8fc96a, #f0c777); transform-origin: left; transition: transform .08s linear; }
.hn-hud-aura b[data-low="true"] { background: #e8706a; }
.hunter-game[data-phase="playing"] .hn-hud-aura span:first-child { color: #f0c777; }
.hn-toast { position: absolute; bottom: 58px; left: 50%; transform: translate(-50%, 6px); padding: 6px 12px; border-radius: 6px; background: #15131aee; border: 1px solid var(--toast-color, #efe7d2); color: var(--toast-color, #efe7d2); font: 11px/1.4 ui-monospace, monospace; max-width: 86%; text-align: center; opacity: 0; transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
.hn-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.hn-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; background: #0d0b11b8; backdrop-filter: blur(2px); }
.hunter-game[data-screen="setup"] .hn-overlay { background: linear-gradient(#0d0b1150, #0d0b11cc); backdrop-filter: none; }
.hn-message { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 420px; }
.hn-card-art { height: 56px; margin-bottom: -2px; }
.hn-card-art:empty { display: none; }
.hn-card-art svg { height: 56px; width: 140px; }
.hn-message h5 { font-size: 30px; letter-spacing: -.04em; line-height: 1.05; color: #f5efe0; }
.hn-message p { font-size: 13px; color: #d9cfbb; max-width: 380px; }
.hn-message-hint { font: 10px/1.5 ui-monospace, monospace; color: #a89b82; }
.hn-result-stats { display: flex; gap: 18px; }
.hn-result-stats span { display: grid; gap: 1px; font: 10px/1.4 ui-monospace, monospace; letter-spacing: .08em; color: #a89b82; text-align: center; }
.hn-result-stats strong { font-size: 20px; color: #f5efe0; letter-spacing: 0; }
.hn-result-stats small { font-size: 11px; }
.hn-run-notes { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 4px; }
.hn-run-notes span { flex-basis: 100%; font: 9px/1.5 ui-monospace, monospace; letter-spacing: .14em; color: #a89b82; }
.hn-run-notes b { font: 600 10px ui-monospace, monospace; padding: 3px 8px; border-radius: 4px; background: #2a2431; color: #d9cfbb; border: 1px solid #3a3443; }
.hn-run-notes b.is-new { background: #f0c777; color: #1e1a25; border-color: #f0c777; }
.hn-result-stats { flex-wrap: wrap; justify-content: center; }
.hn-primary { min-height: 46px; padding: 11px 22px; border: 0; border-radius: 8px; background: #f0c777; color: #1e1a25; font-weight: 700; font-size: 14px; }
.hn-primary:hover { background: #f7d58f; }
.hn-secondary { min-height: 38px; padding: 8px 14px; border: 1px solid #5a5165; border-radius: 8px; background: transparent; color: #d9cfbb; font-size: 12px; }
.hn-console { display: grid; gap: 12px; }
.hn-setup { display: grid; gap: 10px; }
.hn-characters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.hn-characters button { display: grid; justify-items: center; gap: 1px; padding: 0 0 7px; border: 1px solid #3a3443; border-radius: 8px; background: #1e1a25; color: #ece4d2; overflow: hidden; }
.hn-characters svg { display: block; width: 100%; height: 56px; }
.hn-characters strong { font-size: 12px; }
.hn-characters span { font: 8px/1.3 ui-monospace, monospace; color: #a89b82; letter-spacing: .04em; }
.hn-characters button[aria-pressed="true"] { border-color: var(--hero); box-shadow: inset 0 -3px var(--hero); background: #262030; }
.hn-kit { padding: 10px 12px; border: 1px solid #3a3443; border-radius: 8px; background: #1a1720; }
.hn-kit strong { display: block; font-size: 13px; color: #f0c777; }
.hn-kit p { font-size: 12px; color: #d9cfbb; margin-top: 3px; }
.hn-kit small { display: block; margin-top: 5px; font: 10px/1.5 ui-monospace, monospace; color: #a89b82; }
.hn-mode-row { display: grid; gap: 8px; }
.hn-difficulties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hn-difficulties button { display: grid; gap: 2px; text-align: left; padding: 8px 9px; border: 1px solid #3a3443; border-radius: 8px; background: #1e1a25; color: #ece4d2; min-height: 58px; }
.hn-difficulties strong { font-size: 12px; }
.hn-difficulties span { font-size: 10px; line-height: 1.35; color: #a89b82; }
.hn-difficulties button[aria-pressed="true"] { border-color: #f0c777; background: #2a2431; }
.hn-modes { display: flex; border: 1px solid #3a3443; border-radius: 8px; overflow: hidden; }
.hn-modes button { flex: 1; min-height: 38px; border: 0; background: #1e1a25; color: #a89b82; font-size: 12px; }
.hn-modes button[aria-pressed="true"] { background: #f0c777; color: #1e1a25; font-weight: 700; }
.hn-setup-record { font: 10px/1.5 ui-monospace, monospace; color: #a89b82; }
.hn-live { display: grid; gap: 10px; }
.hn-abilities { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 14px 22px; pointer-events: none; }
.hn-abilities-left { display: flex; gap: 10px; }
.hn-ability { pointer-events: auto; position: relative; width: 56px; height: 56px; border-radius: 50%; border: 2px solid #ffffff66; background: #15131ad9; color: #f5efe0; display: grid; place-items: center; touch-action: none; box-shadow: 0 4px 14px #00000066; }
.hn-ability svg { width: 24px; height: 24px; position: relative; z-index: 1; }
.hn-ability kbd { position: absolute; top: -7px; right: -5px; font: 700 9px ui-monospace, monospace; background: #f5efe0; color: #15131a; border-radius: 4px; padding: 1px 4px; z-index: 2; }
.hn-ability small { position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%); font: 700 8px ui-monospace, monospace; letter-spacing: .12em; white-space: nowrap; color: #e9e0cc; text-shadow: 0 1px 2px #000; }
.hn-ability-state { position: absolute; top: -6px; left: 50%; transform: translate(-50%, -100%); font: 9px/1.2 ui-monospace, monospace; font-style: normal; white-space: nowrap; color: #d9cfbb; text-shadow: 0 1px 2px #000; }
.hn-ability[aria-pressed="true"] { background: #3a2d55ee; border-color: #b78bff; box-shadow: 0 0 16px #b78bff99; }
.hn-ability[data-nen="zetsu"][aria-pressed="true"] { background: #243247ee; border-color: #8fb4d8; box-shadow: 0 0 16px #8fb4d899; }
.hn-ability:disabled { opacity: .45; }
.hn-hatsu { width: 74px; height: 74px; border-color: var(--hero); }
.hn-hatsu::before { content: ''; position: absolute; inset: -2px; border-radius: 50%; background: conic-gradient(var(--hero) calc(var(--progress, 1) * 1turn), #ffffff22 0); }
.hn-hatsu::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #15131ad9; }
.hn-hatsu[data-state="ready"]::after { background: color-mix(in srgb, var(--hero) 30%, #15131a); }
.hn-hatsu[data-state="active"]::after { background: color-mix(in srgb, var(--hero) 60%, #15131a); }
.hn-hatsu svg { width: 30px; height: 30px; }
.hn-hatsu[aria-disabled="true"]:not([data-state="active"]) { opacity: .8; }
@media (pointer: fine) { .hn-ability kbd { display: block; } }
@media (pointer: coarse) { .hn-ability kbd { display: none; } }
.hn-kit-live strong { color: var(--hero, #f0c777); }
.hn-instructions { font: 10px/1.5 ui-monospace, monospace; color: #a89b82; }
.hn-touch-hint { display: none; }
@media (pointer: coarse) { .hn-keyboard-hint { display: none; } .hn-touch-hint { display: inline; } }
.hn-tip { padding: 9px 11px; border-left: 2px solid #f0c777; background: #1a1720; border-radius: 0 6px 6px 0; }
.hn-tip p { font-size: 11px; color: #d9cfbb; margin-top: 2px; }
.hn-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #3a3443; }
.hn-guide, .hn-log { flex: 1 1 100%; font-size: 12px; color: #d9cfbb; }
.hn-guide summary, .hn-log summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 30px; color: #ece4d2; font-weight: 600; }
.hn-log summary span { display: inline-flex; align-items: center; gap: 6px; }
.hn-log summary span:last-child { font: 10px ui-monospace, monospace; color: #a89b82; }
.hn-guide p { margin: 8px 0; line-height: 1.6; }
.hn-discoveries { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin-top: 8px; }
.hn-discovery { padding: 8px 10px; border: 1px solid #2d2835; border-radius: 6px; background: #1a1720; color: #6f6678; }
.hn-discovery strong { display: block; font-size: 11px; }
.hn-discovery p { font-size: 10.5px; margin-top: 2px; line-height: 1.4; }
.hn-discovery.is-found { color: #d9cfbb; border-color: #4c4258; }
.hn-discovery.is-found strong { color: #f0c777; }
.hn-plates-collected { margin-top: 10px; }
.hn-plates-collected > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.hn-plate { display: inline-grid; justify-items: center; padding: 4px 8px 3px; border-radius: 5px; background: #1a1720; border: 1px solid #2d2835; font: 600 11px ui-monospace, monospace; color: #6f6678; }
.hn-plate small { font-size: 8px; font-weight: 400; letter-spacing: .06em; }
.hn-plate.is-found { background: #f5efe0; color: #2a2d36; border-color: #f5efe0; }
.hn-mode-switch, .hn-restart { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1px solid #3a3443; border-radius: 8px; background: transparent; color: #d9cfbb; font-size: 12px; }
.hn-restart svg { width: 16px; height: 16px; }
.preview-hunter { background: #1b1a22; }
.preview-hunter svg { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .hn-layout { grid-template-columns: 1fr; }
  .hn-characters svg { height: 48px; }
}
@media (max-width: 600px) and (orientation: portrait) {
  /* Phones hold the runner the way Temple Run is played: taller than wide, more road ahead. */
  #hunterCanvas { aspect-ratio: 4 / 5; }
}
@media (max-width: 600px) {
  .game-modal[data-game="hunter"] { padding: 8px; }
  .game-modal[data-game="hunter"] .game-modal-content { padding: 12px; max-height: calc(100dvh - 16px); }
  .hn-masthead { margin-bottom: 8px; }
  .hn-masthead h4 { font-size: 20px; }
  .hn-eyebrow { font-size: 8.5px; }
  .hn-score { font-size: 15px; }
  .hn-icon-button { width: 34px; height: 34px; }
  .hn-message h5 { font-size: 22px; }
  .hn-message p { font-size: 11.5px; }
  .hn-card-art, .hn-card-art svg { height: 40px; }
  .hn-message { gap: 7px; }
  .hn-primary { min-height: 40px; padding: 8px 16px; font-size: 13px; }
  .hn-result-stats { gap: 12px; }
  .hn-result-stats strong { font-size: 16px; }
  .hn-hud-aura { grid-template-columns: 50px 1fr 28px; bottom: 96px; left: 10px; right: 10px; }
  .hn-abilities { padding: 0 10px 20px; }
  .hn-ability { width: 54px; height: 54px; }
  .hn-hatsu { width: 70px; height: 70px; }
  .hunter-game[data-screen="play"] .hn-live { grid-template-columns: 1fr; }
  .hn-hud-stage { top: 8px; left: 10px; }
  .hn-hud-plates { top: 8px; right: 10px; }
  .hn-warning { top: 36px; font-size: 9px; }
  .hn-toast { font-size: 9.5px; padding: 4px 8px; max-width: 92%; bottom: 122px; }
  .hn-difficulties button { min-height: 54px; padding: 6px 7px; }
  .hn-difficulties span { font-size: 9px; }
  .hn-characters strong { font-size: 11px; }
  .hn-characters span { font-size: 7.5px; }
}
@media (max-width: 380px) {
  .hn-difficulties { grid-template-columns: 1fr; }
  .hn-difficulties button { min-height: 0; }
}
@media (min-width: 650px) and (max-height: 560px) {
  .game-modal[data-game="hunter"] { padding: 6px; }
  .game-modal[data-game="hunter"] .game-modal-content { padding: 8px 10px; max-height: calc(100dvh - 12px); }
  .game-modal[data-game="hunter"] .game-modal-header { margin-bottom: 4px; }
  .hunter-game[data-screen="play"] .hn-masthead > div:first-child { display: none; }
  .hn-masthead { margin-bottom: 4px; justify-content: flex-end; }
  .hn-masthead h4 { font-size: 16px; }
  .hn-icon-button { width: 32px; height: 32px; }
  .hn-layout { grid-template-columns: minmax(0, 1fr) 196px; gap: 8px; }
  .hn-stage, .hunter-game[data-screen="play"] .hn-stage { width: max-content; max-width: 100%; margin: 0 auto; }
  .hunter-game[data-screen="play"] #hunterCanvas { width: auto; height: calc(100dvh - 108px); max-width: 100%; }
  .hn-toast { bottom: 44px; }
  .hunter-game[data-screen="play"] .hn-live { display: none; }
  .hunter-game[data-screen="play"] .hn-layout { grid-template-columns: 1fr; }
  .hn-hud-aura { bottom: 16px; left: 140px; right: 100px; }
  .hn-abilities { padding: 0 10px 14px; }
  .hn-ability { width: 48px; height: 48px; }
  .hn-hatsu { width: 62px; height: 62px; }
  .hn-ability small { display: none; }
  .hn-bottom { margin-top: 6px; padding-top: 6px; gap: 6px 10px; }
  .hn-guide summary, .hn-log summary { min-height: 24px; font-size: 11px; }
  .hn-characters svg { height: 40px; }
  .hn-difficulties button { min-height: 0; padding: 5px 7px; }
  .hn-difficulties span { display: none; }
  .hn-message h5 { font-size: 22px; }
  .hn-message { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .hunter-game *, .hunter-game *::before, .hunter-game *::after { animation: none !important; transition: none !important; }
}
