/* Scoped exhibition scoreboard. Numbers retain a fixed, right-aligned slot. */
.vm-ledger-host, .vm-ledger-host * { box-sizing: border-box; }
.vm-ledger-host {
  position: absolute;
  z-index: 8;
  top: 116px;
  right: 28px;
  width: 306px;
  max-width: calc(100vw - 32px);
  pointer-events: auto;
  --vm-ledger-ink: hsl(245 25% 24%);
  --vm-ledger-muted: hsl(245 12% 43%);
  --vm-ledger-border: hsl(249 26% 88%);
  --vm-ledger-action: hsl(252 40% 94%);
  --vm-ledger-action-hover: hsl(252 40% 86%);
  --vm-ledger-action-active: hsl(252 40% 80%);
  --vm-ledger-focus: hsl(254 48% 43%);
  color: var(--vm-ledger-ink);
  font-family: "Helvetica Neue", "PingFang SC", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.vm-ledger {
  overflow: hidden;
  margin: 0;
  border: 1px solid hsl(0 0% 100% / .98);
  border-radius: 24px;
  background: hsl(250 30% 99% / .96);
  box-shadow: 0 3px 0 hsl(251 34% 86% / .54), 0 14px 34px hsl(245 34% 30% / .09), 0 1px 6px hsl(245 34% 30% / .04);
}

.vm-ledger__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 85px;
  padding: 15px 18px;
  border-radius: 22px;
  list-style: none;
  cursor: pointer;
  background: linear-gradient(120deg, hsl(273 74% 97%), hsl(203 90% 97%));
  transition: filter 120ms ease, background 120ms ease;
  user-select: none;
}

.vm-ledger__summary::-webkit-details-marker { display: none; }
.vm-ledger__summary:hover { filter: brightness(.975); }
.vm-ledger__summary:active { filter: brightness(.945); }
.vm-ledger__summary:focus-visible {
  outline: 2px solid var(--vm-ledger-focus);
  outline-offset: -5px;
}

.vm-ledger__emblem {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  height: 44px;
  border: 1px solid hsl(0 0% 100% / .96);
  border-radius: 16px;
  color: hsl(262 43% 38%);
  background: linear-gradient(145deg, hsl(298 77% 94%), hsl(246 75% 88%));
  box-shadow: inset 0 2px 1px hsl(0 0% 100% / .9), 0 3px 0 hsl(253 40% 78% / .6);
  font: 28px/1 Georgia, serif;
}

.vm-ledger__heading { display: grid; flex: 1; min-width: 0; gap: 4px; }
.vm-ledger__eyebrow { color: var(--vm-ledger-muted); font-size: 11px; font-weight: 650; letter-spacing: .08em; }
.vm-ledger__total-line { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.vm-ledger__total {
  display: inline-block;
  color: var(--vm-ledger-ink);
  font-size: 29px;
  line-height: 1.06;
  letter-spacing: -.04em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transform-origin: 50% 70%;
}
.vm-ledger__unit { color: var(--vm-ledger-muted); font-size: 10px; white-space: nowrap; }
.vm-ledger__chevron {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin: -4px 3px 0 0;
  border-right: 1.6px solid var(--vm-ledger-muted);
  border-bottom: 1.6px solid var(--vm-ledger-muted);
  transform: rotate(45deg);
  transition: transform 120ms ease;
}
.vm-ledger[open] .vm-ledger__chevron { transform: translateY(3px) rotate(225deg); }
.vm-ledger__body { padding: 9px 13px 13px; }
.vm-ledger__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 7px; margin: 0; }
.vm-ledger__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 31px;
  padding: 7px 8px;
  border-radius: 10px;
  background: hsl(252 35% 95%);
}
.vm-ledger__row[data-tint="rose"] { background: hsl(342 64% 95%); }
.vm-ledger__row[data-tint="blue"] { background: hsl(208 76% 95%); }
.vm-ledger__row[data-tint="mint"] { background: hsl(162 48% 94%); }
.vm-ledger__row[data-tint="peach"] { background: hsl(30 75% 94%); }
.vm-ledger__row[data-tint="lilac"] { background: hsl(269 65% 95%); }
.vm-ledger__label { min-width: 0; color: var(--vm-ledger-ink); font-size: 11px; line-height: 1.3; white-space: nowrap; }
.vm-ledger__value {
  margin: 0;
  color: var(--vm-ledger-ink);
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-align: right;
  white-space: nowrap;
}
.vm-ledger__row[data-empty="true"] .vm-ledger__value { color: var(--vm-ledger-muted); }
.vm-ledger__unknown {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 7px;
  border-bottom: 1px solid var(--vm-ledger-border);
}
.vm-ledger__unknown .vm-ledger__label { color: var(--vm-ledger-muted); font-size: 10px; }
.vm-ledger__note { margin: 10px 6px 0; color: var(--vm-ledger-ink); font-size: 10px; font-weight: 600; line-height: 1.5; }
.vm-ledger__hint { margin: 3px 6px 0; color: var(--vm-ledger-muted); font-size: 10px; line-height: 1.5; }
.vm-ledger__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; margin: 8px 2px 0 6px; }
.vm-ledger__storage { color: var(--vm-ledger-muted); font-size: 9px; line-height: 1.5; }
.vm-ledger__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: auto; }
.vm-ledger__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--vm-ledger-ink);
  background: var(--vm-ledger-action);
  font: 600 10px/1.25 "Helvetica Neue", "PingFang SC", sans-serif;
  cursor: pointer;
  transition: background 120ms ease, transform 80ms ease;
}
.vm-ledger__button:hover { background: var(--vm-ledger-action-hover); }
.vm-ledger__button:active { background: var(--vm-ledger-action-active); transform: scale(.97); }
.vm-ledger__button:focus-visible { outline: 2px solid var(--vm-ledger-focus); outline-offset: 2px; }
.vm-ledger__button:disabled { opacity: .42; cursor: not-allowed; pointer-events: none; }
.vm-ledger__button[aria-busy="true"] { opacity: .7; cursor: wait; pointer-events: none; }
.vm-ledger__button[hidden] { display: none; }
.vm-ledger__button[data-confirm="true"] { color: hsl(340 58% 33%); background: hsl(340 66% 93%); }
.vm-ledger__button[data-confirm="true"]:hover { background: hsl(340 66% 85%); }
.vm-ledger__button[data-confirm="true"]:active { background: hsl(340 66% 79%); }
.vm-ledger__button--cancel { background: transparent; }
.vm-ledger__button--undo { color: hsl(254 48% 36%); }
.vm-ledger__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

select.vm-language-select:focus-visible { outline: 2px solid hsl(254 48% 43%); outline-offset: 3px; }
select.vm-language-select:disabled { opacity: .42; cursor: not-allowed; }
select.vm-language-select { transition: filter 120ms ease; }
select.vm-language-select:hover { filter: brightness(.96); }
select.vm-language-select:active { filter: brightness(.92); }

#stage[data-exhibit="true"] .vm-ledger-host { top: 24px; right: 28px; }

@media (max-width: 1100px) {
  .vm-ledger-host { right: 18px; width: 276px; }
  .vm-ledger__body { padding-right: 10px; padding-left: 10px; }
  .vm-ledger__list { gap: 4px; }
  .vm-ledger__row { padding-right: 7px; padding-left: 7px; }
  .vm-ledger__label { font-size: 10px; }
}

@media (max-width: 900px), (max-height: 650px) {
  .vm-ledger-host { top: 108px; right: 16px; width: 264px; }
  .vm-ledger__summary { min-height: 66px; padding: 10px 14px; gap: 10px; }
  .vm-ledger__emblem { flex-basis: 34px; height: 36px; border-radius: 13px; font-size: 24px; }
  .vm-ledger__total { font-size: 24px; }
  .vm-ledger__eyebrow { font-size: 10px; }
  .vm-ledger:not([open]) { width: 206px; margin-left: auto; border-radius: 20px; }
  .vm-ledger:not([open]) .vm-ledger__summary { border-radius: 18px; }
  .vm-ledger__row { min-height: 27px; padding-top: 5px; padding-bottom: 5px; }
  .vm-ledger__hint { font-size: 9px; }
  #stage[data-exhibit="true"] .vm-ledger-host { top: 16px; right: 16px; }
}

@media (max-width: 480px) {
  .vm-ledger-host { top: 92px; right: 10px; width: 258px; }
  #stage[data-exhibit="true"] .vm-ledger-host { right: 10px; top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .vm-ledger-host *, select.vm-language-select { transition: none !important; animation: none !important; }
  .vm-ledger__button:active { transform: none; }
}
