/* ============================================================
   BomberParty — online manual
   Styled after the game's own interface: dark blue grid, amber
   panel headers with a rule, boxed tabs, keycaps.
   Standalone — does not depend on the main site stylesheet.
   ============================================================ */

@font-face {
  font-family: 'Inter var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../font/inter-var.woff2') format('woff2');
}

:root {
  --bg:        #10151f;
  --bg-grid:   rgba(255, 255, 255, .028);
  --panel:     #1b2230;
  --panel-2:   #222a3a;
  --panel-3:   #171d29;
  --line:      rgba(255, 255, 255, .10);
  --line-2:    rgba(255, 255, 255, .18);

  --fg:        #e9edf5;
  --fg-dim:    #a7b0c2;
  --fg-mute:   #6f7889;

  --amber:     #f0b429;
  --amber-dim: rgba(240, 180, 41, .14);
  --cyan:      #5bb8e8;
  --hp:        #e14b4b;
  --stam:      #45b6e8;
  --coin:      #f2c744;
  --ok:        #4dbd74;

  --steam:     #66c0f4;

  --r:  4px;
  --r2: 8px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --t: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  overflow-x: clip;
}

body {
  background: var(--bg);
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--fg);
  font-family: 'Inter var', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15.5px;
  line-height: 1.62;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
::selection { background: rgba(240, 180, 41, .3); }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--panel-3); }
::-webkit-scrollbar-thumb { background: #2c3548; border: 2px solid var(--panel-3); border-radius: 99px; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- top bar (mirrors the in-game HUD strip) ---------- */
.hud {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 17, 25, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hud__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 56px;
}
.hud__game {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hud__game svg { width: 20px; height: 20px; flex: none; color: var(--amber); }
.hud__game small {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--fg-mute);
  padding-left: 12px;
  border-left: 1px solid var(--line-2);
}
.hud__links { display: flex; align-items: center; gap: 6px; }
.hud__links a {
  padding: 7px 11px;
  border-radius: var(--r);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--fg-mute);
  border: 1px solid transparent;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.hud__links a:hover { color: var(--fg); background: rgba(255,255,255,.05); border-color: var(--line); }
.hud__links a.is-current { color: var(--amber); border-color: rgba(240,180,41,.4); background: var(--amber-dim); }

/* ---------- language switch ---------- */
.lang {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 2px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: rgba(0, 0, 0, .28);
  flex: none;
}
.lang a {
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--fg-mute);
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.lang a:hover { color: var(--fg); }
.lang a[aria-current='true'] {
  color: #1a1204;
  background: var(--amber);
}

/* ---------- page head ---------- */
.head {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.head::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 120% at 78% 0%, rgba(240,180,41,.10), transparent 62%);
  pointer-events: none;
}
.head__inner { position: relative; z-index: 1; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
}
.kicker::before { content: ''; width: 3px; height: 15px; background: var(--amber); }

h1 {
  font-size: clamp(30px, 4.6vw, 50px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}
.head p {
  color: var(--fg-dim);
  max-width: 66ch;
  font-size: 16px;
}
.head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: rgba(255,255,255,.035);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.chip svg { width: 13px; height: 13px; }
.chip--amber { color: var(--amber); border-color: rgba(240,180,41,.35); background: var(--amber-dim); }

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  padding: 44px 0 88px;
}

.side {
  position: sticky;
  top: 84px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--panel-3);
  overflow: hidden;
}
.side__title {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  background: rgba(255,255,255,.025);
}
.side nav { display: grid; padding: 6px; gap: 1px; }
.side a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r);
  font-size: 13.5px;
  color: var(--fg-dim);
  border-left: 2px solid transparent;
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.side a:hover { color: var(--fg); background: rgba(255,255,255,.045); }
.side a.is-active { color: var(--amber); background: var(--amber-dim); border-left-color: var(--amber); }
.side a span {
  font-size: 10.5px;
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
  min-width: 16px;
}

/* ---------- panels ---------- */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--panel);
  margin-bottom: 26px;
  overflow: hidden;
  scroll-margin-top: 84px;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.022);
}
.panel__head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.panel__head h2::before { content: ''; width: 3px; height: 17px; background: var(--amber); flex: none; }
.panel__head .hint {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.panel__body { padding: 22px 20px 24px; }
.panel__body > * + * { margin-top: 14px; }
.panel__body p { color: var(--fg-dim); }
.panel__body strong { color: var(--fg); font-weight: 600; }

h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-top: 26px !important;
  margin-bottom: 12px !important;
}
h3::before { content: ''; width: 2px; height: 13px; background: currentColor; }
.panel__body > h3:first-child { margin-top: 0 !important; }

/* bullet lists in the game's square-marker style */
ul.list, ol.list { list-style: none; padding: 0; display: grid; gap: 9px; }
ul.list li, ol.list li {
  position: relative;
  padding-left: 18px;
  color: var(--fg-dim);
  font-size: 14.5px;
  line-height: 1.58;
}
ul.list li::before {
  content: '';
  position: absolute;
  left: 2px; top: .58em;
  width: 5px; height: 5px;
  background: var(--amber);
  opacity: .85;
}
ol.list { counter-reset: step; }
ol.list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.list b, .list strong { color: var(--fg); font-weight: 600; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r2); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 460px;
}
thead th {
  text-align: left;
  padding: 10px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  white-space: nowrap;
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-dim);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.022); }
td b, td strong { color: var(--fg); font-weight: 600; }
td .ru { color: var(--fg-mute); font-size: 12.5px; }

/* ---------- keycaps ---------- */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 25px;
  padding: 0 7px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: var(--r);
  background: var(--panel-2);
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  vertical-align: middle;
}
.keys { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.keys em { font-style: normal; color: var(--fg-mute); font-size: 12px; }

/* ---------- ability grid (mirrors the skills screen) ---------- */
.abilities { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 10px; }
.ability {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--panel-2);
}
.ability__ico {
  width: 30px; height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: rgba(0,0,0,.25);
  color: var(--amber);
}
.ability__ico svg { width: 15px; height: 15px; }
.ability h4 { font-size: 14.5px; font-weight: 600; margin-bottom: 2px; }
.ability h4 span { color: var(--fg-mute); font-weight: 400; font-size: 12.5px; }
.ability p { font-size: 13px; color: var(--fg-dim); line-height: 1.5; }
.ability__key { margin-left: auto; align-self: flex-start; }

/* ---------- stat bars (HUD-style) ---------- */
.bars { display: grid; gap: 10px; }
.bar__row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.bar__label { width: 88px; flex: none; color: var(--fg-mute); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.bar__track { flex: 1; height: 9px; border-radius: 2px; background: rgba(0,0,0,.4); overflow: hidden; border: 1px solid var(--line); }
.bar__fill { height: 100%; }
.bar__fill--hp   { background: var(--hp);   width: 100%; }
.bar__fill--stam { background: var(--stam); width: 100%; }
.bar__fill--xp   { background: var(--cyan); width: 12%; }
.bar__fill--armor{ background: #93a1b8;     width: 0%; }
.bar__val { width: 92px; text-align: right; color: var(--fg-dim); font-variant-numeric: tabular-nums; font-size: 12.5px; }

/* ---------- callouts ---------- */
.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--r);
  background: rgba(240, 180, 41, .06);
  padding: 13px 16px;
  font-size: 14px;
  color: var(--fg-dim);
}
.note--danger { border-left-color: var(--hp); background: rgba(225, 75, 75, .07); }
.note--info   { border-left-color: var(--cyan); background: rgba(91, 184, 232, .07); }
.note b { color: var(--fg); }

/* ---------- shots ---------- */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.shot {
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow: hidden;
  background: var(--panel-3);
}
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shot figcaption {
  padding: 9px 13px;
  font-size: 12px;
  color: var(--fg-mute);
  border-top: 1px solid var(--line);
  letter-spacing: .02em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--panel-2);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform var(--t) var(--ease), background-color var(--t) var(--ease),
              border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { transform: translateY(-1px); border-color: var(--line-2); background: #2a3346; }

.btn--amber {
  border-color: rgba(240,180,41,.5);
  background: var(--amber-dim);
  color: var(--amber);
}
.btn--amber:hover { background: rgba(240,180,41,.22); }

/* Steam-flavoured button: their dark navy plus the familiar blue */
.btn--steam {
  border-color: rgba(102, 192, 244, .38);
  background: linear-gradient(180deg, #2a475e 0%, #1b2838 100%);
  color: #c7e3f7;
  font-weight: 600;
}
.btn--steam:hover {
  background: linear-gradient(180deg, #35617f 0%, #22344a 100%);
  border-color: rgba(102, 192, 244, .7);
  color: #fff;
}
.btn--steam svg { color: var(--steam); }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  background: rgba(13, 17, 25, .6);
  padding: 30px 0 36px;
}
.foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--fg-mute);
}
.foot__links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot__links a { color: var(--fg-dim); }
.foot__links a:hover { color: var(--amber); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  /* minmax(0,…) — a plain 1fr track refuses to shrink below its content */
  .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; }
  .side { position: static; }
  .side nav { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .side a { border-left: 0; border: 1px solid transparent; min-width: 0; }
  .side a.is-active { border-color: rgba(240,180,41,.4); }
  .hud__game small { display: none; }

  /* the four tabs do not fit a phone: scroll them instead of overflowing the page */
  .hud__inner { gap: 12px; }
  .hud__links {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-right: -15px;
    padding-right: 15px;
  }
  .hud__links::-webkit-scrollbar { display: none; }
  .hud__links a { padding: 7px 8px; font-size: 11px; white-space: nowrap; }
  .lang { margin-left: 6px; }
  .lang a { padding: 5px 8px; font-size: 11px; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .wrap { padding-inline: 15px; }
  .panel__body { padding: 18px 15px 20px; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .hud, .side, .foot, .btn-row { display: none !important; }
  body { background: #fff; color: #000; }
  .panel, .table-wrap { break-inside: avoid; border-color: #ccc; }
  .panel__body p, tbody td, ul.list li { color: #222; }
}
