#slime-scores {
  --ink: #412343;
  --muted: #74536b;
  --paper: #fff7e9;
  --purple: #6e2b92;
  box-sizing: border-box;
  width: min(540px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 24px;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  border: 3px solid #a7497a;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  font: 800 17px/1.4 SlimeRound, system-ui, sans-serif;
  scrollbar-color: #a7497a var(--paper);
  user-select: text;
}
#slime-scores::backdrop { background: rgb(39 20 51 / 78%); }
#slime-scores *, #slime-scores *::before, #slime-scores *::after { box-sizing: border-box; }
#slime-scores [hidden] { display: none !important; }
#slime-scores ::selection { background: #ecc3ee; color: var(--ink); }
#slime-scores h2 { margin: 0; font-size: 34px; line-height: 1.1; color: #8c2659; }
#slime-scores h3 { margin: 0 0 4px; font-size: 22px; }
#slime-scores p { margin: 6px 0 16px; }
#slime-scores .scores-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#slime-scores .scores-subtitle { color: var(--muted); font-size: 15px; }
#slime-scores button, #slime-scores select, #slime-scores input { font: inherit; touch-action: manipulation; }
#slime-scores button {
  min-height: 48px;
  padding: 8px 14px;
  border: 2px solid #c39bad;
  border-radius: 12px;
  color: var(--ink);
  background: #fffdfa;
  cursor: pointer;
}
#slime-scores button:hover { background: #f2dcef; }
#slime-scores button:active { background: #e4c6e1; }
#slime-scores button:disabled { cursor: default; opacity: .6; }
#slime-scores :focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
#slime-scores .scores-close { min-width: 48px; padding: 0; font-size: 26px; }
#slime-scores .scores-modes { display: flex; gap: 8px; margin: 18px 0 12px; }
#slime-scores .scores-modes button { flex: 1; padding-inline: 8px; }
#slime-scores button[aria-pressed="true"], #slime-scores .scores-save { background: var(--purple); border-color: var(--purple); color: #fff; }
#slime-scores button[aria-pressed="true"]:hover, #slime-scores .scores-save:hover { background: #572073; }
#slime-scores .scores-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
#slime-scores select { min-height: 48px; min-width: 0; flex: 1; padding: 8px; border: 2px solid #c39bad; border-radius: 10px; background: #fffdfa; color: var(--ink); }
#slime-scores .scores-entry { border-block: 2px solid #dfc3cc; padding-block: 16px; margin-block: 16px; }
#slime-scores .scores-entry p { margin-bottom: 10px; color: var(--muted); font-size: 15px; }
#slime-scores .scores-entry label { display: block; font-size: 15px; margin-bottom: 8px; }
#slime-scores .scores-entry-row { display: flex; gap: 12px; }
#slime-scores input {
  min-width: 0;
  width: 140px;
  height: 54px;
  padding: 4px 10px 4px 20px;
  border: 2px solid var(--purple);
  border-radius: 10px;
  background: #fffdfa;
  color: var(--ink);
  font-size: 30px;
  letter-spacing: .25em;
  text-transform: uppercase;
  caret-color: var(--purple);
}
#slime-scores input::placeholder { color: #8a647d; opacity: 1; }
#slime-scores .scores-save { flex: 1; }
#slime-scores .scores-status { font-size: 15px; color: #68455e; }
#slime-scores .scores-status:empty { display: none; }
#slime-scores table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
#slime-scores caption { text-align: left; font-size: 20px; padding: 12px 0; color: #8c2659; }
#slime-scores th { color: var(--muted); font-size: 13px; text-align: left; padding: 8px 6px; border-bottom: 2px solid #dfc3cc; }
#slime-scores td { height: 38px; padding: 6px; border-bottom: 1px solid #e8d5d8; }
#slime-scores .scores-number { text-align: right; }
#slime-scores .scores-name { letter-spacing: .14em; }
#slime-scores tr[data-rank="1"] { color: #7b4d08; background: #ffebaa; }
#slime-scores tr.scores-yours { color: #3f2062; background: #ead5f3; }
#slime-scores .scores-empty { text-align: center; padding: 28px 8px; color: var(--muted); }
#slime-scores .scores-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
#slime-scores .scores-footer p { margin: 0; font-size: 13px; color: var(--muted); max-width: 32ch; }
@media (max-width: 380px), (max-height: 430px) {
  #slime-scores { padding: 16px; border-radius: 18px; }
  #slime-scores h2 { font-size: 28px; }
  #slime-scores .scores-entry-row { gap: 8px; }
  #slime-scores input { width: 120px; }
}
