/* Local trial for the full history dialog opened from the battlefield. */
#battle-log-dialog.battle-log-dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--ga-radius-panel);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 64px rgb(0 0 0 / 48%);
}
#battle-log-dialog .battle-log-dialog-heading {
  align-items: center;
  padding: 12px 16px 4px;
  border: 0;
  background: var(--surface-2);
}
#battle-log-dialog .battle-log-dialog-heading > div { min-width: 0; }
#battle-log-dialog .battle-log-dialog-heading .eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: var(--ga-font-caption);
  letter-spacing: .12em;
}
#battle-log-dialog .battle-log-dialog-heading h2 {
  margin: 0;
  font-size: var(--ga-font-page);
  line-height: 1.45;
}
#battle-log-dialog .dialog-close-button {
  border: 0;
  border-radius: var(--ga-radius-control);
  background: var(--surface-deep);
  color: var(--text);
  box-shadow: none;
}
#battle-log-dialog .dialog-close-button:focus-visible { outline: 2px solid var(--gold-strong); outline-offset: 2px; }
#battle-log-dialog .battle-log-dialog-meta {
  margin: 0;
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-size: var(--ga-font-note);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#battle-log-dialog > #battle-log-history {
  min-height: 0;
  margin: 0;
  padding: 0 16px env(safe-area-inset-bottom);
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: var(--ga-font-body);
  line-height: 1.55;
  scrollbar-width: thin;
}
#battle-log-history .log-entry.action {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
}
#battle-log-history .log-entry.side-player { --log-side-color: var(--gold); }
#battle-log-history .log-entry.side-enemy { --log-side-color: var(--red); }
#battle-log-history .log-entry.action.log-latest { background: var(--surface-2); }
#battle-log-history .log-mark {
  border: 0;
  border-radius: var(--ga-radius-panel);
  box-shadow: inset 0 -2px var(--log-side-color, var(--line));
}
#battle-log-history .log-meta {
  flex-wrap: wrap;
  gap: 2px 10px;
  font-size: var(--ga-font-note);
  overflow-wrap: anywhere;
}
#battle-log-history .log-meta > span:first-child { font-weight: 650; }
#battle-log-history .log-meta > span:last-child { font-variant-numeric: tabular-nums; }
#battle-log-history .log-copy > strong {
  margin: 2px 0 4px;
  font-size: var(--ga-font-section);
  overflow-wrap: anywhere;
}
#battle-log-history .log-entry.system {
  min-height: 0;
  padding: 7px 4px;
  border-bottom: 1px solid var(--line);
  font-size: var(--ga-font-note);
  overflow-wrap: anywhere;
}
#battle-log-history .log-entry.system.round { background: var(--surface-deep); font-weight: 700; }
#battle-log-history > p { padding: 12px 4px; }

@media (max-width: 420px) {
  #battle-log-dialog .battle-log-dialog-heading { padding-inline: 12px; }
  #battle-log-dialog .battle-log-dialog-meta,
  #battle-log-dialog > #battle-log-history { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .battle-log-backdrop:has(> #battle-log-dialog),
  #battle-log-dialog.battle-log-dialog,
  #battle-log-history .log-entry.log-current { animation: none; }
}
