/* Game — Bosses. Unit C of the plan owns this file. Prefix gm-bs-.
   Tokens only, as core.css. An enemy is drawn in --critical, what it still
   has of its HP too; the damage dealt (progress) is the accent, the reward
   is the usual chips. */

/* --- the monster ---------------------------------------------------------- */

.gm-bs-mon {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  color: var(--critical); background: color-mix(in srgb, var(--critical) 12%, transparent);
}
.gm-bs-mon.muted { color: var(--text-muted); background: var(--surface-2); }
.gm-bs-mon-svg { display: block; }

.gm-bs-enemy { font-size: 14.5px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.gm-bs-goal { font-size: 12.5px; color: var(--text-secondary); line-height: 1.35; overflow-wrap: anywhere; }

/* HP: ten squares, the part still standing in --critical. */
.gm-bs-hp { display: flex; align-items: center; gap: 8px; }
.gm-bs-hpsq i { background: color-mix(in srgb, var(--critical) 16%, var(--surface-2)); }
.gm-bs-hpsq i.on { background: var(--critical); }
.gm-bs-hp-v { font-family: var(--s-mono); font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.gm-bs-count {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-family: var(--s-mono); font-size: 11px; color: var(--text-secondary);
}
.gm-bs-count svg { color: var(--warning); }

.gm-bs-pill {
  display: inline-block; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em;
  padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-secondary);
}
.gm-bs-pill.active { background: var(--accent-quiet); color: var(--accent); }
.gm-bs-pill.ready { background: color-mix(in srgb, var(--warning) 20%, transparent); color: var(--warning); }
.gm-bs-pill.claimed { background: color-mix(in srgb, var(--good-text) 14%, transparent); color: var(--good-text); }
.gm-bs-pill.escaped { background: color-mix(in srgb, var(--critical) 14%, transparent); color: var(--critical); }

.gm-bs-chips { display: inline-flex; flex-wrap: wrap; gap: 5px; }

/* LiFE RPG's slider, full width: dashed track, dot, % at the end. */
.gm-bs-slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 0 2px; }

/* --- hub card: one card per boss, sliding sideways ------------------------ */

.gm-bs-hub { display: flex; flex-direction: column; gap: 10px; }
.gm-bs-hubhead { margin: 0; gap: 10px; }
.gm-bs-hubtitle { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.gm-bs-hubtitle svg { color: var(--critical); }
.gm-bs-hubhead .note { margin-left: 0; }

.gm-bs-none { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.gm-bs-none .btn { grid-column: 1 / -1; justify-self: start; }

.gm-bs-rail { display: flex; flex-direction: column; gap: 10px; }
.gm-bs-rail.many {
  flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -4px; padding: 0 4px 4px; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.gm-bs-rail.many::-webkit-scrollbar { display: none; }
.gm-bs-rail.many .gm-bs-mini { flex: 0 0 86%; scroll-snap-align: start; }

.gm-bs-mini {
  display: flex; flex-direction: column; gap: 9px; min-width: 0; cursor: pointer;
  padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-s);
  background: var(--surface-2);
}
.gm-bs-mini:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gm-bs-mini.ready { border-color: var(--warning); }
.gm-bs-mini-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.gm-bs-mini-id { min-width: 0; }
.gm-bs-mini-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
.gm-bs-mini-foot .gm-stat-v { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.gm-bs-claim { padding: 5px 14px; }

/* --- the Bosses screen ---------------------------------------------------- */

.gm-bs-quarter { display: flex; flex-direction: column; gap: 6px; }
.gm-bs-quarter-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.gm-bs-quarter-name { font-family: var(--s-display); font-size: 19px; font-weight: 600; margin-top: 3px; }

.gm-bs-seeds { display: flex; flex-direction: column; gap: 10px; }
.gm-bs-seeds .section-head { margin: 0; }
.gm-bs-seed {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center;
  padding: 7px 0; border-top: 1px solid var(--grid);
}
.gm-bs-seed .gm-bs-mon { width: 38px; height: 38px; border-radius: 10px; }

.gm-bs-list { display: flex; flex-direction: column; gap: 10px; }
.gm-bs-row {
  appearance: none; width: 100%; font: inherit; color: var(--text-primary); cursor: pointer; text-align: left;
  display: grid; grid-template-columns: auto minmax(0, 1fr) 12px; gap: 12px; align-items: center;
}
.gm-bs-row .gm-bs-mon { width: 52px; height: 52px; border-radius: 14px; }
.gm-bs-row.ready { border-color: var(--warning); }
.gm-bs-row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gm-bs-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 2px; }
.gm-bs-row-meta.center { justify-content: center; }
.gm-bs-row-bar { display: flex; align-items: center; gap: 8px; }
.gm-bs-past { align-self: flex-start; }
.gm-bs-archived summary { cursor: pointer; margin-bottom: 10px; }

/* One boss: LiFE RPG's goal card. */
.gm-bs-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.gm-bs-hero-mon {
  display: grid; place-items: center; width: 116px; height: 116px; border-radius: 30px; margin-bottom: 4px;
  color: var(--critical); background: color-mix(in srgb, var(--critical) 11%, transparent);
}
.gm-bs-hero-mon.muted { color: var(--text-muted); background: var(--surface-2); }
.gm-bs-hero-name { font-family: var(--s-display); font-size: 22px; font-weight: 600; line-height: 1.2; }
.gm-bs-hero-goal { color: var(--text-secondary); font-size: 14px; }
.gm-bs-hero .gm-bs-hp { margin-top: 4px; }

.gm-bs-goalcard { display: flex; flex-direction: column; gap: 16px; }
.gm-bs-field { display: flex; flex-direction: column; gap: 7px; }
.gm-bs-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--text-muted); }
.gm-bs-dates .gm-bs-count { margin-left: auto; }
.gm-bs-cheer .gm-tag { text-transform: none; letter-spacing: 0; font-size: 11.5px; color: var(--text-secondary); }
.gm-bs-claimbig { align-self: stretch; }

/* The form. */
.gm-bs-enemyrow { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 8px; align-items: start; }
.gm-bs-enemyrow .gm-dom-tool:last-child { color: var(--warning); }
.gm-bs-looks button { color: var(--text-muted); }
.gm-bs-looks button[aria-pressed="true"] { color: var(--critical); border-color: var(--critical); }
.gm-bs-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gm-bs-date { margin-bottom: 6px; }
.gm-bs-linkbox { display: contents; }
.gm-danger:empty { display: none; }

/* S.M.A.R.T. */
.gm-bs-intro { margin-bottom: 12px; }
.gm-bs-q { display: flex; flex-direction: column; gap: 8px; }
.gm-bs-q h3 { margin: 0; }
.gm-bs-asks { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.gm-bs-check { font-size: 12.5px; color: var(--text-secondary); }
.gm-bs-check b { color: var(--warning); font-weight: 600; }
.gm-bs-area { font-family: var(--s-body); font-size: 14px; min-height: 92px; }

.gm-bs-report { display: flex; flex-direction: column; gap: 12px; }
.gm-bs-report-title { font-family: var(--s-display); font-size: 19px; font-weight: 600; }
.gm-bs-report-skill { font-size: 13px; color: var(--text-secondary); display: flex; gap: 6px; align-items: center; }
.gm-bs-report-q { display: flex; flex-direction: column; gap: 5px; padding-top: 10px; border-top: 1px solid var(--grid); }
.gm-bs-report-head { display: flex; align-items: center; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; }
.gm-bs-report-a { font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.gm-bs-verdict { font-family: var(--s-mono); font-size: 11px; text-align: right; }
.gm-bs-verdict.ok { color: var(--good-text); }
.gm-bs-verdict.warn { color: var(--warning); }
.gm-bs-reportrow { grid-template-columns: 22px minmax(0, 1fr) auto auto 12px; }

/* --- the defeat moment ------------------------------------------------------ */

.gm-bs-defeat { gap: 10px; }
.gm-bs-defeat-mon {
  display: grid; place-items: center; width: 132px; height: 132px; border-radius: 34px;
  color: var(--critical); background: color-mix(in srgb, var(--critical) 12%, transparent);
}
.gm-bs-defeat-mon.hit { animation: gm-bs-fall 1.1s ease-out forwards; }
.gm-bs-defeat-name { font-family: var(--s-display); font-size: 22px; font-weight: 600; }
@keyframes gm-bs-fall {
  0%   { transform: translateX(0); }
  12%  { transform: translateX(-7px) rotate(-4deg); }
  24%  { transform: translateX(7px) rotate(4deg); }
  36%  { transform: translateX(-4px); color: var(--critical); }
  60%  { transform: scale(0.94) rotate(8deg); opacity: 0.9; }
  100% { transform: scale(0.86) rotate(12deg); opacity: 0.45; color: var(--text-muted);
         background: var(--surface-2); }
}
@media (prefers-reduced-motion: reduce) {
  .gm-bs-defeat-mon.hit { animation: none; }
}

@media (max-width: 440px) {
  .gm-bs-row .gm-bs-mon { width: 44px; height: 44px; }
  .gm-bs-row .gm-squares i { width: 7px; height: 7px; }
}
@media (min-width: 700px) {
  .gm-bs-rail.many .gm-bs-mini { flex-basis: 300px; }
}
