:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --card-alt: #e4e7ee;
  --ink: #2f3542;
  --text: #2f3542;
  --muted: #7a8194;
  --blue: #3b9cff;
  --blue-dark: #1f6fd1;
  --red: #ff6b6b;
  --red-dark: #c94444;
  --grey: #d6dae3;
  --grey-dark: #9aa1b1;
  --green: #74e06f;
  --yellow: #ffd952;
  --topbar: #3a4256;
  --row-hover: #f2f6ff;
  --me-row: #e8f3ff;
}

[data-theme="dark"] {
  --bg: #1b1f2a;
  --card: #2a3042;
  --card-alt: #222736;
  --ink: #0f1118;
  --text: #f1f3f8;
  --muted: #9aa3b8;
  --grey: #3d4457;
  --grey-dark: #262b3a;
  --topbar: #12151f;
  --row-hover: #323950;
  --me-row: #2c3d5c;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Fredoka", "Nunito", "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
}

a { color: inherit; }

.topbar {
  background: var(--topbar);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 4px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .4);
}

.brand img { height: 36px; }

.brand span { white-space: nowrap; }

.topbar nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.topbar nav a {
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(255, 255, 255, .08);
}

.topbar nav a.active { background: var(--blue); box-shadow: 0 3px 0 var(--blue-dark); }

.theme-toggle {
  background: rgba(255, 255, 255, .1);
  border: 0;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
}

.page { max-width: 1400px; margin: 0 auto; padding: 20px 16px 60px; }

.page-title {
  font-size: 30px;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.page-heading .page-title { margin: 0; }

.page-link-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card-alt);
  box-shadow: 0 3px 0 var(--grey-dark);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.page-link-chip:active { transform: translateY(3px); box-shadow: none; }
.page-link-chip:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.tech-reset-row {
  display: flex;
  justify-content: flex-end;
  margin: -2px 0 18px;
}

.page-lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  margin: -4px 0 18px;
}

.pill {
  background: var(--topbar);
  color: #fff;
  font-size: 15px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 3px solid var(--ink);
}

.card {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--ink);
  padding: 20px;
  margin-bottom: 18px;
}

.card-narrow { max-width: 440px; margin: 40px auto; }

.card-title { margin: 0 0 12px; font-size: 24px; }

.stack { display: flex; flex-direction: column; gap: 14px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }

.row input { flex: 1; min-width: 180px; }

.inline { display: inline; }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }

input, select {
  font: inherit;
  padding: 10px 12px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  width: 100%;
}

input:focus, select:focus { outline: none; border-color: var(--blue); }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  text-align: center;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .3);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform .05s;
}

.btn:active { transform: translateY(3px); box-shadow: none !important; }

.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-armed { background: var(--yellow) !important; color: #2f3542 !important; text-shadow: none; box-shadow: 0 3px 0 #c9a800 !important; }

.btn-blue { background: var(--blue); box-shadow: 0 4px 0 var(--blue-dark); }

.btn-red { background: var(--red); box-shadow: 0 4px 0 var(--red-dark); }

.btn-grey { background: var(--grey); color: var(--text); text-shadow: none; box-shadow: 0 4px 0 var(--grey-dark); }

.btn-outline { background: var(--card); color: var(--blue); text-shadow: none; border-color: var(--blue); box-shadow: 0 4px 0 var(--blue-dark); }

.btn-big { font-size: 22px; padding: 14px 24px; }

.btn-sm { font-size: 14px; padding: 6px 12px; border-radius: 10px; box-shadow: 0 3px 0 var(--blue-dark); }

.btn-red.btn-sm { box-shadow: 0 3px 0 var(--red-dark); }

.btn-grey.btn-sm { box-shadow: 0 3px 0 var(--grey-dark); }

.hint { color: var(--muted); font-size: 14px; margin: 0; }

.hint code { background: var(--card-alt); padding: 1px 5px; border-radius: 4px; }

.flash {
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-weight: 600;
  color: #2f3542;
}

.flash-ok { background: var(--green); }

.flash-error { background: var(--red); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); }

.picker { position: relative; }

.picker::after { content: '▾'; position: absolute; right: 14px; top: 10px; font-size: 20px; color: var(--muted); pointer-events: none; }

.picker-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  max-height: 240px;
  overflow-y: auto;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 5px 0 var(--ink);
}

.picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: 0;
  border-bottom: 2px solid var(--grey);
  padding: 10px 12px;
  cursor: pointer;
}

.picker-item:last-child { border-bottom: 0; }

.picker-item:hover, .picker-item:focus { background: var(--row-hover); outline: none; }

.profile-card { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }

.profile-row { display: flex; justify-content: space-between; gap: 12px; font-size: 17px; }

.profile-row .muted { color: var(--muted); }

.pin-input { -webkit-text-security: disc; letter-spacing: 4px; }

.pin-box {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 4px;
  text-align: center;
  background: var(--card-alt);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
  user-select: all;
}

.totals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.total-card {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--ink);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.total-card img { width: 46px; height: 46px; object-fit: contain; }

.total-label { color: var(--muted); font-size: 14px; }

.total-value { font-size: 26px; font-weight: 700; }

.table-tools { display: grid; gap: 12px; margin-bottom: 12px; }

.table-tools-row, .column-tools-row, .column-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-tools-row .btn { margin-left: auto; }

.column-tools-label { color: var(--muted); font-size: 14px; font-weight: 700; }

.table-tools .inactive-toggle {
  width: auto;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
  font-size: 14px;
}

.table-tools .inactive-toggle input { width: auto; }

.table-tools .inactive-toggle.asc-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }

.column-toggle {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card-alt);
  color: var(--muted);
  box-shadow: 0 2px 0 var(--ink);
  padding: 5px 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.column-toggle:hover { transform: translateY(-1px); }

.column-toggle[aria-pressed="true"] { background: var(--blue); color: #fff; }

.column-toggle[aria-pressed="false"] { opacity: .62; box-shadow: none; }

.inactive-toggle { width: auto; flex-direction: row; align-items: center; gap: 7px; font-size: 14px; }

.inactive-toggle input { width: auto; }

.mobile-table-controls { display: flex; gap: 8px; width: 100%; }

.mobile-table-controls input, .mobile-table-controls select { flex: 1; min-width: 0; }

.table-wrap { overflow-x: auto; }

table.members { width: 100%; border-collapse: collapse; }

table.members th, table.members td {
  padding: 10px 14px;
  border-bottom: 2px solid var(--grey);
  text-align: left;
  white-space: nowrap;
}

table.members thead th {
  background: var(--topbar);
  color: #fff;
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 0;
}

table.members thead th:first-child { border-radius: 10px 0 0 0; }

table.members th:first-child, table.members td:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); }

table.members thead tr:first-child th:first-child { background: var(--topbar); z-index: 2; }

table.members tr.filters th:first-child { background: var(--card-alt); }

table.members tbody tr.me td:first-child { background: var(--me-row); }

table.members thead th:last-child { border-radius: 0 10px 0 0; }

table.members th[data-sort][data-dir="asc"]::after { content: " ▲"; }

table.members th[data-sort][data-dir="desc"]::after { content: " ▼"; }

.th-icon { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; margin-right: 6px; }

table.members tr.filters th { background: var(--card-alt); padding: 6px; cursor: default; }

table.members tr.filters input,
table.members tr.filters select { padding: 5px 8px; border-width: 2px; border-radius: 8px; font-size: 14px; min-width: 80px; }

table.members tbody tr:hover { background: var(--row-hover); }

table.members tbody tr.me { background: var(--me-row); font-weight: 700; }

table.members tbody tr.inactive { opacity: .55; }

table.members td.muted { color: var(--muted); }

.member-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }

.member-card { margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }

.member-card.inactive { opacity: .6; }

.member-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.member-name { font-size: 18px; margin-right: auto; }

.actions { display: flex; gap: 6px; flex-wrap: wrap; }

.tag { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 2px solid var(--ink); color: #2f3542; }

.tag-green { background: var(--green); }

.tag-yellow { background: var(--yellow); }

.tag-grey { background: var(--grey); color: var(--text); }

.tag-blue { background: var(--blue); color: #fff; }

.tag-purple { background: #b48cff; color: #2f3542; }

.tag-xs { font-size: 10px; padding: 1px 6px; border-width: 1.5px; vertical-align: middle; }

td.saved { background: rgba(180, 140, 255, .18); }

.stat.saved { background: rgba(180, 140, 255, .18); border-radius: 8px; padding: 4px; margin: -4px; }

.stat.saved small { color: #b48cff; }

.asc-grid { grid-template-columns: repeat(2, 1fr); }

.small { font-size: 12px; }

.check-row { flex-direction: row; align-items: center; gap: 8px; margin-bottom: 14px; cursor: pointer; }

.check-row input { width: 22px; height: 22px; margin: 0; accent-color: var(--blue); }

.asc-toggle { cursor: pointer; }

.include-toggle { display: inline-block; margin-bottom: 14px; }

.include-toggle span { font-size: 15px; padding: 7px 14px; }

.asc-card .card-title { display: flex; align-items: center; gap: 10px; }

.asc-list { display: flex; flex-direction: column; gap: 8px; }

.asc-member { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.asc-member strong { margin-right: 6px; }

.asc-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }

.asc-toggle span {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--grey);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: background .15s, color .15s;
}

.asc-toggle span::before { content: '○ '; }

.asc-toggle input:checked + span { background: #b48cff; color: #2f3542; }

.asc-toggle input:checked + span::before { content: '✓ '; }

.asc-toggle input:focus-visible + span { outline: 3px solid var(--blue); }

.totals-title { margin: 10px 0 14px; font-size: 24px; }

.res-row { display: flex; flex-direction: column; gap: 14px; }

.res-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.res-head .btn { margin-left: auto; }

.res-title {
  margin: 0;
  min-width: 110px;
  text-align: center;
  font-size: 18px;
  background: var(--topbar);
  color: #fff;
  padding: 8px 16px;
  border-radius: 12px;
  border: 3px solid var(--ink);
}

.res-fields { display: flex; gap: 16px; flex-wrap: wrap; flex: 1; }


.res-fields label { min-width: 160px; flex: 1; max-width: 240px; }

.res-label { display: flex; align-items: center; gap: 8px; }

.res-label img { width: 34px; height: 34px; object-fit: contain; }

.res-fields input { font-size: 20px; font-weight: 700; }

.mobile-only { display: none; }

.mobile-tools { display: flex; gap: 8px; padding: 10px; }

.mobile-tools input { flex: 1; min-width: 0; }

.mobile-tools select { flex: 1; min-width: 0; }

@media (min-width: 601px) {
  .mobile-tools select {
    flex: 0 0 140px;
    width: 140px;
  }
}

.member-stats { padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 3px 0 var(--ink); }

.member-stats.me { background: var(--me-row); }

.member-stats-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 17px; }

.member-stats-head .muted { color: var(--muted); font-size: 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 10px; }

.stat { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; }

.stat img { width: 26px; height: 26px; object-fit: contain; grid-row: span 2; }

.stat span { font-weight: 700; font-size: 16px; line-height: 1.1; }

.stat small { color: var(--muted); font-size: 12px; white-space: nowrap; }

.site-footer { text-align: center; color: var(--muted); font-size: 12px; padding: 0 16px 24px; }

.hall-upload { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.hall-admin-upload { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.hall-upload .stack, .hall-admin-upload .stack { max-width: 520px; }
.hall-date-picker { display: grid; gap: 6px; }
.date-picker-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 18px; background: rgb(18 28 49 / .45); }
.date-picker-backdrop[hidden] { display: none; }
.date-picker-card { width: min(100%, 360px); padding: 18px; border: 3px solid var(--ink); border-radius: 16px; background: var(--card); box-shadow: 0 8px 0 var(--ink); }
.date-picker-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 8px; margin-bottom: 14px; text-align: center; }
.date-picker-head .btn { padding: 5px; }
.date-picker-weekdays, .date-picker-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.date-picker-weekdays { margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }
.date-picker-today { margin: -6px 0 12px; color: var(--muted); font-size: 13px; text-align: center; }
.date-picker-days > span { min-height: 38px; }
.date-picker-day { min-height: 38px; padding: 4px; border: 2px solid var(--ink); border-radius: 9px; background: var(--card-alt); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.date-picker-day.today { outline: 2px solid var(--blue-dark); outline-offset: 1px; }
.date-picker-day:disabled { opacity: .4; cursor: not-allowed; }
.date-picker-day:hover:not(:disabled), .date-picker-day.selected { border-color: var(--blue-dark); background: var(--blue); color: white; }
.date-picker-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.date-picker-actions .btn { width: 100%; box-sizing: border-box; }
.field-label { display: block; margin-bottom: 6px; font-weight: 600; }
.hall-admin-upload .stack > label,
.hall-admin-upload input[type="file"],
.hall-admin-upload .btn {
  width: 100%;
  box-sizing: border-box;
}
.upload-spinner { display: inline-block; width: .9em; height: .9em; margin-right: .45em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -.08em; animation: upload-spin .7s linear infinite; }
.btn.is-loading { cursor: wait; opacity: .86; }
@keyframes upload-spin { to { transform: rotate(360deg); } }
.hall-closed { margin: 0; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 12px; background: var(--card-alt); }
.hall-section-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hall-section-head .card-title { margin-bottom: 6px; }
.hall-draft { position: relative; }
.hall-draft .hall-section-head { padding-right: 40px; }
.hall-draft .hall-section-head > form { position: absolute; top: 14px; right: 14px; margin: 0; }
.hall-draft > .hall-section-head > .hall-draft-delete { position: absolute; top: 14px; right: 14px; width: 32px; min-width: 32px; height: 32px; min-height: 32px; margin: 0; padding: 0; font-size: 22px; line-height: 1; }
.hall-draft-status { margin: 0 0 10px; padding: 9px 11px; border: 2px solid var(--ink); border-radius: 10px; }
.tag-red { background: var(--red); color: #fff; }
.war-rows { display: flex; flex-direction: column; gap: 8px; }
.war-row { display: grid; grid-template-columns: 62px minmax(100px, 1fr) minmax(90px, .7fr) repeat(3, 38px); gap: 6px; align-items: center; }
.war-row input, .war-row select { min-width: 0; padding: 8px; }
.war-row input.is-invalid, .war-row select.is-invalid { border-color: var(--red-dark); background: #ffe4e4; box-shadow: 0 0 0 2px var(--red); }
.war-row .btn { padding: 5px; min-width: 0; }
.war-readonly { display: grid; gap: 6px; }
.hall-of-fame, .hall-ranking-column { display: contents; }
.hall-secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.hall-admin-upload { width: 100%; }
.hall-admin-upload .stack, .hall-admin-upload .hall-date-picker, .hall-admin-upload label { width: 100%; max-width: none; }
.hall-upload-batches { display: grid; gap: 8px; margin-top: 12px; }
.hall-upload-batch { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 8px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card-alt); }
.hall-upload-batch.is-queued { border-color: var(--green); }
.hall-upload-batch.is-failed { border-color: var(--red); }
.hall-upload-thumbs { display: flex; gap: 4px; }
.hall-upload-thumbs img { width: 42px; height: 42px; object-fit: cover; border: 1px solid var(--ink); border-radius: 6px; }
.hall-editor-controls { display: block; }
.hall-editor-controls #warEditor { width: 100%; }
.hall-editor-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 14px; }
.hall-editor-actions .hall-confirm-form { flex: 0 0 auto; }
.hall-editor-actions > .btn, .hall-editor-actions .hall-confirm-form, .hall-editor-actions .hall-confirm-form .btn { height: 50px; box-sizing: border-box; }
.war-add-row { display: grid; place-items: center; width: 38px; height: 38px; margin: 12px auto 0; border: 3px solid var(--ink); border-radius: 50%; background: var(--card-alt); color: var(--ink); font-size: 28px; font-weight: 800; line-height: 1; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.war-add-row:hover { background: var(--blue-light); }
.hall-editor-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.hall-editor-actions .btn, .hall-confirm-form .btn { width: auto; }
.hall-confirm-form { margin: 0; }
.hall-confirm-form .btn { background: #f5bc35; border-color: #6f4c00; color: #332200; box-shadow: 0 4px 0 #6f4c00; }
.hall-confirm-form .btn.btn-armed { background: var(--red); color: #fff; border-color: var(--red-dark); box-shadow: 0 4px 0 var(--red-dark); }
.hall-drafts { display: grid; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--ink); }
.hall-draft-list { display: flex; flex-wrap: wrap; gap: 8px; }
.hall-draft-list .btn { width: auto; }
.hall-all-time { position: relative; overflow: hidden; border-color: color-mix(in srgb, #c58c16 62%, var(--ink)); background: linear-gradient(145deg, color-mix(in srgb, #f3c75d 16%, var(--card)), var(--card) 58%); box-shadow: 0 6px 0 color-mix(in srgb, #a56b00 68%, var(--ink)); }
.hall-all-time::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgb(255 255 255 / .24), transparent 34%); }
.hall-all-time-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hall-legend-kicker { display: block; margin-bottom: 2px; color: #a56b00; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hall-legend-crown { color: #c58c16; font-size: 42px; line-height: 1; text-shadow: 0 2px 0 #7c5100, 0 0 16px rgb(224 172 37 / .45); }
.hall-all-time .hall-rankings { position: relative; z-index: 1; }
.hall-podium-1 { border-color: #bd8515 !important; background: linear-gradient(100deg, #f8dfa0, var(--card-alt)) !important; }
.hall-podium-2 { border-color: #909ca6 !important; background: linear-gradient(100deg, #e4eaf0, var(--card-alt)) !important; }
.hall-podium-3 { border-color: #ae7045 !important; background: linear-gradient(100deg, #efc4a3, var(--card-alt)) !important; }
.hall-podium-crowned .rank { position: relative; display: inline-flex; min-height: 42px; align-items: flex-end; justify-content: center; padding-top: 21px; text-align: center; }
.hall-podium:not(.hall-podium-crowned) .rank { align-self: center; text-align: center; }
.rank-crown { position: absolute; top: 0; left: 50%; display: block; width: auto; margin: 0; font-size: 20px; line-height: 1; transform: translateX(-50%); }
.hall-extra-entry { display: none !important; }
.hall-expanded .hall-extra-entry { display: grid !important; }
.hall-expanded tr.hall-extra-entry { display: table-row !important; }
.hall-expand-button { display: block; margin: 12px auto 0; }
.hall-editor-actions { align-items: flex-start; }
.hall-member-search { grid-column: 1 / -1; width: 100%; }
.hall-member-search-form { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.hall-member-search-form label { display: grid; gap: 5px; flex: 1 1 160px; }
.hall-member-search-form input, .hall-member-search-form select { width: 100%; }
.hall-member-search-form .btn { width: auto; }
.hall-member-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; margin: 14px 0 0; padding: 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card-alt); }
.hall-member-result small { grid-column: 1 / -1; color: var(--muted); }
.hall-podium-1 .rank, .hall-podium-1 .rank-crown { color: #a56b00; }
.hall-podium-2 .rank, .hall-podium-2 .rank-crown { color: #687683; }
.hall-podium-3 .rank, .hall-podium-3 .rank-crown { color: #94592f; }
.hall-podium-1 strong { color: #704500; }
.hall-page { position: relative; }
.hall-page-coming-soon > :not(.hall-coming-soon) { filter: grayscale(.35) blur(1px); opacity: .38; pointer-events: none; user-select: none; }
.hall-coming-soon { position: absolute; inset: 0; z-index: 5; display: grid; place-items: start center; padding-top: clamp(120px, 28vh, 250px); background: color-mix(in srgb, var(--bg) 48%, transparent); }
.hall-coming-soon-card { display: grid; justify-items: center; gap: 10px; max-width: 300px; padding: 28px 24px; text-align: center; border: 2px solid var(--blue-dark); border-radius: 20px; background: var(--card); box-shadow: 0 8px 0 var(--blue-dark); }
.hall-coming-soon-card strong { font-size: 32px; line-height: 1; color: var(--blue-dark); }
.hall-coming-soon-card > span:last-child { color: var(--muted); font-size: 14px; }
.hall-rankings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hall-rankings li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px; background: var(--card-alt); border: 2px solid var(--ink); border-radius: 12px; }
.hall-rankings li:first-child .rank { color: #a56b00; }
.hall-empty { display: block !important; grid-template-columns: 1fr !important; white-space: normal; }
.war-record-table td:last-child { font-weight: 700; }
.hall-rankings li small { color: var(--muted); }
.rank { font-weight: 700; color: var(--blue-dark); }
.audit-filters { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.audit-filters label { display: grid; gap: 5px; min-width: 180px; font-weight: 700; }
.audit-filters select { width: 100%; }
.audit-table td { vertical-align: top; white-space: normal; }
.audit-table-wrap { width: 100%; overflow-x: auto; }
.audit-table { min-width: 980px; }
.audit-table thead th { position: static; top: auto; }
.audit-table th:first-child,
.audit-table td:first-child { position: static; left: auto; z-index: auto; background: transparent; }
.audit-table thead tr:first-child th:first-child { background: var(--topbar); }
.audit-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; text-align: center; }

@media (max-width: 600px) {
  .mobile-only { display: block; }
  .desktop-only { display: none; }
  .topbar {
    padding: 10px 14px;
    gap: 10px;
    flex-wrap: nowrap;
    min-height: 64px;
  }
  .brand { font-size: 18px; gap: 6px; }
  .brand img { height: 30px; }
  .brand-long { display: none; }
  .topbar nav { margin-left: auto; gap: 4px; flex-wrap: nowrap; }
  .topbar nav a { padding: 6px 10px; font-size: 14px; }
  .theme-toggle { width: 32px; height: 32px; font-size: 16px; }
  .page { padding: 12px 12px 40px; }
  .page-title { font-size: 24px; margin: 0 0 14px; }
  .page-heading { align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 14px; }
  .page-heading .page-title { flex: 0 1 auto; }
  .page-link-chip { min-height: 34px; padding: 5px 10px; font-size: 13px; }
  .page-lead { font-size: 15px; margin: -2px 0 14px; }
  .tech-reset-row { margin: -2px 0 16px; }
  .card { padding: 16px; margin-bottom: 16px; }
  .totals { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
  .total-card { padding: 8px 10px; gap: 8px; box-shadow: 0 3px 0 var(--ink); }
  .total-card img { width: 34px; height: 34px; }
  .total-label { font-size: 12px; }
  .total-value { font-size: 20px; }
  .res-row { gap: 10px; }
  .res-title { font-size: 18px; padding: 6px 12px; min-width: 0; }
  .res-head { gap: 8px; }
  .asc-toggle span { font-size: 13px; padding: 4px 10px; }
  .res-fields { gap: 10px; }
  .res-fields label { min-width: 0; max-width: none; flex: 1 1 calc(50% - 5px); }
  .res-label { font-size: 14px; gap: 6px; }
  .res-label img { width: 26px; height: 26px; }
  .res-fields input { font-size: 18px; padding: 8px 10px; }
  .btn-big { font-size: 20px; padding: 12px 20px; }
  .member-list { grid-template-columns: 1fr; gap: 10px; }
  .mobile-only .mobile-tools { flex-direction: column; align-items: stretch; }
  .mobile-only .inactive-toggle { align-self: stretch; justify-content: center; }
  .mobile-only .inactive-toggle span { white-space: nowrap; }
  .hall-of-fame { grid-template-columns: 1fr; gap: 14px; }
  .war-row { grid-template-columns: 52px minmax(0, 1fr) 82px repeat(3, 32px); gap: 4px; }
  .war-row input, .war-row select { padding: 7px 5px; font-size: 14px; }
  .war-row .btn { font-size: 13px; padding: 4px; }
  .hall-rankings li { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 8px; font-size: 14px; }
  .hall-rankings li span:last-child { text-align: right; }
  .hall-section-head form { width: 100%; }
  .hall-draft .hall-section-head > form { position: absolute; top: 14px; right: 14px; left: auto; width: auto; }
  .hall-editor-actions { align-items: stretch; }
  .hall-editor-actions > .btn, .hall-editor-actions .hall-confirm-form, .hall-editor-actions .hall-confirm-form .btn { display: flex; align-items: center; justify-content: center; min-height: 52px; }
  .hall-editor-actions .hall-confirm-form { flex: 1 1 auto; }
  .hall-editor-actions > .btn { flex: 0 1 auto; }
}

.war-days { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px; }
.war-options { margin: -4px 0 4px; }
.war-total .war-options { margin: 6px 0 0; }
.war-total .include-toggle { margin-bottom: 0; }

.war-total { text-align: center; }

.war-total .total-label { font-size: 15px; }

.war-total-value { font-size: 42px; font-weight: 700; line-height: 1.1; }

.war-breakdown { white-space: normal; display: flex; gap: 6px; flex-wrap: wrap; padding-right: 16px; }

.war-chip { background: var(--card-alt); border-radius: 999px; padding: 2px 10px; font-size: 13px; }

.title-actions { display: inline-flex; align-items: center; gap: 8px; }

.save-bar { display: flex; align-items: center; gap: 12px; margin-top: 18px; }

.save-bar .btn { flex: 1; }

.bubble-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }

.bubble { margin: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }

.bubble-max { border-color: var(--green); box-shadow: 0 4px 0 var(--green); }

.bubble-head { display: flex; align-items: center; gap: 10px; }

.bubble-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.bubble-title strong { font-size: 15px; }

.bubble-icon { width: 42px; height: 42px; object-fit: contain; border-radius: 50%; flex: none; }

.bubble-desc { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }

.bubble-level { color: var(--muted); font-size: 13px; }

@media (max-width: 600px) {
  .war-total-value { font-size: 32px; }
  .bubble-grid { grid-template-columns: 1fr 1fr; }
  .war-chip { font-size: 12px; }
}

.nav-primary, .nav-secondary { display: contents; }

.drawer-theme-label { display: none; }

.nav-scrim, .drawer-close, .drawer-head { display: none; }

.burger { display: none; }

.war-sub { font-size: 20px; margin: 18px 0 10px; }

.war-member { margin-bottom: 10px; padding: 12px 14px; box-shadow: 0 3px 0 var(--ink); }

.war-member.me { background: var(--me-row); }

.war-member-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }

.war-member-points { font-size: 20px; font-weight: 700; }

@media (max-width: 600px) {
  .nav-primary {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .nav-primary a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 14px;
  }

  .burger {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .1); border: 0; border-radius: 12px;
    width: 44px; height: 44px; font-size: 23px; line-height: 1; color: #fff; cursor: pointer;
  }

  .burger:focus-visible, .drawer-close:focus-visible, .drawer-theme:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

  .nav-secondary {
    display: flex; position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
    flex-direction: column; align-items: stretch; gap: 10px; padding: max(18px, env(safe-area-inset-top)) 16px 16px;
    width: min(320px, 86vw); background: var(--bg); color: var(--text);
    border-left: 4px solid var(--ink); border-radius: 20px 0 0 20px;
    box-shadow: -8px 0 24px rgba(0, 0, 0, .35);
    transform: translateX(105%); transition: transform .24s ease;
  }

  .nav-secondary.open { transform: translateX(0); }

  .nav-secondary a {
    text-align: left; padding: 13px 16px; font-size: 16px; font-weight: 700;
    color: var(--text); background: var(--card);
    border: 3px solid var(--ink); border-radius: 14px;
    box-shadow: 0 4px 0 var(--ink);
  }

  .nav-secondary a:active { transform: translateY(3px); box-shadow: none; }

  .nav-secondary a.active { background: var(--blue); color: #fff; box-shadow: 0 4px 0 var(--blue-dark); }

  .drawer-head {
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 12px; margin-bottom: 2px;
    border-bottom: 3px solid var(--grey);
  }

  .drawer-head strong { flex: 1; font-size: 19px; color: var(--text); text-shadow: none; }

  .drawer-logo { width: 34px; height: 34px; object-fit: contain; }

  .drawer-close {
    display: flex; align-items: center; justify-content: center;
    background: var(--card); border: 3px solid var(--ink); border-radius: 12px;
    width: 44px; height: 44px; color: var(--text); font-size: 16px; font-weight: 700;
    cursor: pointer; box-shadow: 0 3px 0 var(--ink);
  }

  .drawer-theme {
    display: inline-flex; align-items: center; justify-content: flex-start; gap: 10px;
    width: 100%; min-height: 50px; padding: 10px 16px; margin-top: auto;
    color: var(--text); background: var(--card-alt); border: 3px solid var(--ink); border-radius: 14px;
    box-shadow: 0 4px 0 var(--ink); font: inherit; font-weight: 700; cursor: pointer;
  }

  .drawer-theme .theme-icon { font-size: 21px; }
  .drawer-theme-label { display: inline; }

  .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 35; }

  body.drawer-open { overflow: hidden; }

  .topbar { position: relative; }

  .war-days { padding: 8px; gap: 6px; }

  .war-days .btn { flex: 1 1 calc(33.333% - 4px); }

  .bubble-grid { grid-template-columns: 1fr; }

  .bubble-desc { display: none; }

  .save-bar { position: sticky; bottom: 10px; }
}

.war-actions summary { cursor: pointer; font-weight: 700; font-size: 18px; }

.war-actions[open] summary { margin-bottom: 12px; }

.war-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 14px 0 4px; }

.war-split-item { background: var(--card-alt); border-radius: 14px; padding: 10px 12px; }

.war-split-label { color: var(--muted); font-size: 13px; }

.war-split-value { font-size: 20px; font-weight: 700; }

.war-split-count { color: var(--muted); font-size: 12px; }

@media (max-width: 600px) {
  .war-split { grid-template-columns: 1fr 1fr; gap: 8px; }
  .war-split-value { font-size: 17px; }
}

/* Keep war action points usable on narrow screens: action labels scroll within their own cell while points remain visible. */
table.members.war-points-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.war-points-table th:first-child,
.war-points-table td:first-child {
  position: static;
  z-index: auto;
  background: transparent;
}

.war-points-table thead th:first-child { background: var(--topbar); }
.war-points-table th:first-child,
.war-points-table td:first-child { width: calc(100% - 104px); }
.war-points-table th:last-child,
.war-points-table td:last-child { width: 104px; text-align: right; }

.war-action-cell { overflow: hidden; }
.war-action-scroll {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.war-points-value { font-weight: 700; }
.war-actions .table-wrap { margin-top: 14px; overflow: hidden; }
.war-actions .hint { margin-top: 16px; line-height: 1.4; }

@media (max-width: 600px) {
  .war-points-table th,
  .war-points-table td { padding: 10px; }
  .war-points-table th:first-child,
  .war-points-table td:first-child { width: calc(100% - 96px); }
  .war-points-table th:last-child,
  .war-points-table td:last-child { width: 96px; }
  .war-points-table th:last-child { white-space: normal; line-height: 1.1; }
  .hall-secondary { grid-template-columns: 1fr; }
  .hall-editor-controls { display: block; }
  .hall-confirm-form { display: flex; justify-content: flex-end; margin-top: 10px; }
  .hall-editor-actions .hall-confirm-form { margin-top: 0; align-self: flex-start; }
  .hall-editor-actions > .btn { align-self: flex-start; }
}

.claim-card { padding: 14px 16px; }

.claim-ready { border-color: var(--green); box-shadow: 0 5px 0 var(--green); }

.claim-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#claimCard .claim-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; }
#claimCard .claim-reset { grid-column: 1 / -1; display: block; padding-top: 3px; }
.totals-title { margin: 28px 0 14px; font-size: 24px; }

.claim-coin { font-size: 34px; line-height: 1; }

.claim-text { flex: 1 1 190px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.claim-text strong { font-size: 18px; }
.current-streak { display: flex; align-items: baseline; flex-wrap: wrap; gap: .16em; max-width: 100%; min-width: 0; color: var(--blue-dark); font-size: clamp(28px, 4.5vw, 46px); font-weight: 700; line-height: 1.08; }
.current-streak strong { color: var(--text); font-size: 1.35em; line-height: 1; }
.claim-status { display: inline-flex; align-self: flex-start; margin-top: 3px; padding: 3px 8px; border: 2px solid var(--ink); border-radius: 8px; font-weight: 700; font-size: 13px; }
.claim-status.is-claimed { background: var(--green); color: #20352a; }
.claim-status.is-unclaimed { background: var(--red); color: #fff; }

.claim-streak { margin: 8px 0 0; }

.pull-result { display: flex; align-items: center; gap: 16px; padding: 18px; }

.pull-rarity { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

.pull-name { font-size: 22px; font-weight: 700; }

.collection-country { font-size: 20px; margin: 22px 0 10px; }

.pill-done { background: var(--green); color: #2f3542; }

.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }

.collectible { position: relative; margin: 0; padding: 14px 10px; text-align: center; }

.collectible-art { width: 74px; height: 74px; display: block; margin: 0 auto 6px; }

.collectible-unknown {
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700; color: var(--muted);
  background: var(--card-alt); border-radius: 18px;
}

.pull-art { width: 84px; height: 84px; flex: none; }

.collectible-name { font-weight: 700; font-size: 14px; margin-top: 4px; }

.collectible-rarity { font-size: 12px; color: var(--muted); }

.collectible-count {
  position: absolute; top: 6px; right: 8px; font-size: 12px; font-weight: 700;
  background: var(--card-alt); border-radius: 999px; padding: 1px 7px;
}

.collectible.locked { opacity: .5; }

.collectible.locked .collectible-name { color: var(--muted); }

.rarity-rare { border-color: var(--blue); }

.rarity-epic { border-color: #b48cff; }

.rarity-legendary { border-color: var(--yellow); }

.rarity-clan { border-color: #2fb8ab; }

.rarity-mythic { border-color: var(--red); }

@media (max-width: 600px) {
  .collection-grid { grid-template-columns: 1fr 1fr; }
  .claim-coin { font-size: 28px; }
  .pull-art { width: 64px; height: 64px; }
}

.claim-spaced { margin-top: 26px; }

.claim-top { margin-bottom: 22px; }

.coin-badge {
  display: inline-flex; align-items: center; gap: 5px; position: relative;
  padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 14px;
  text-decoration: none; color: #fff; background: rgba(255, 255, 255, .1);
}

.coin-ready { background: var(--yellow); color: #2f3542; text-shadow: none; }

.coin-dot {
  position: absolute; top: -2px; right: -2px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--red); border: 2px solid var(--topbar);
  animation: coin-pulse 1.4s ease-in-out infinite;
}

@keyframes coin-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }

.art-wrap, .pull-art-wrap { position: relative; display: inline-block; }

.art-flag {
  position: absolute; top: -4px; right: -6px; font-size: 17px; line-height: 1;
  background: var(--card); border-radius: 999px; padding: 2px 3px;
  box-shadow: 0 0 0 2px var(--ink);
}

.pull-art-wrap .art-flag { font-size: 22px; top: -2px; right: -4px; }

.reveal { animation: reveal-pop .5s cubic-bezier(.2, 1.4, .5, 1) both; }

.reveal .pull-art-wrap { animation: reveal-spin .6s ease-out both; }

@keyframes reveal-pop {
  0% { transform: scale(.4) rotate(-6deg); opacity: 0; }
  60% { transform: scale(1.06) rotate(1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes reveal-spin {
  0% { transform: rotate(-180deg) scale(.2); }
  100% { transform: rotate(0) scale(1); }
}

.reveal-legendary, .reveal-clan, .reveal-mythic { position: relative; overflow: hidden; }

.reveal-legendary::after, .reveal-clan::after, .reveal-mythic::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%);
  animation: shine 1.1s ease-out .25s both;
}

@keyframes shine { from { transform: translateX(-120%); } to { transform: translateX(120%); } }

.reveal-mythic { box-shadow: 0 5px 0 var(--ink), 0 0 26px rgba(232, 68, 58, .55); }

.reveal-legendary { box-shadow: 0 5px 0 var(--ink), 0 0 24px rgba(255, 217, 82, .6); }

.reveal-clan { box-shadow: 0 5px 0 var(--ink), 0 0 26px rgba(47, 184, 171, .65); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal .pull-art-wrap, .coin-dot { animation: none; }
  .reveal-legendary::after, .reveal-clan::after, .reveal-mythic::after { display: none; }
}

.pull-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

.pull-buttons .btn { flex: 0 0 auto; white-space: nowrap; }

.drop-rates { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; margin-top: 4px; }

.drop-rate { white-space: nowrap; }

.drop-rate { font-weight: 700; }

.rarity-text-common { color: var(--muted); }
.rarity-text-rare { color: var(--blue); }
.rarity-text-epic { color: #b48cff; }
.rarity-text-legendary { color: #c9a800; }
.rarity-text-clan { color: #2fb8ab; }
.rarity-text-mythic { color: var(--red); }

.modal-scrim {
  position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}

.modal {
  position: relative; margin: 0; width: min(820px, 100%);
  max-height: 90vh; overflow-y: auto; text-align: center; padding: 24px;
}

.modal-close {
  position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; margin: -14px -2px -20px auto; padding: 0; line-height: 1; cursor: pointer;
  background: var(--card); border: 3px solid var(--ink); border-radius: 12px;
  width: 38px; height: 38px; font-size: 20px; color: var(--muted); box-shadow: 0 3px 0 var(--ink);
}

.modal-close:hover { color: var(--text); }
.modal-close-left { margin-right: auto; margin-left: -2px; }

.collection-result-close {
  position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; justify-content: center;
  width: 32px; min-width: 32px; height: 32px; min-height: 32px; margin: -10px -2px -22px auto; padding: 0;
  font-size: 22px; line-height: 1;
}

.save-confirm-modal { width: min(620px, 100%); padding-top: 28px; }
.save-confirm-list { display: grid; gap: 7px; margin: 14px 0; text-align: left; }
.save-confirm-row { display: grid; grid-template-columns: 28px minmax(150px, 1fr) auto; align-items: center; gap: 9px; padding: 8px 10px; border: 2px solid var(--grey); border-radius: 10px; background: var(--card-alt); }
.save-confirm-row.is-changed { border-color: var(--blue); }
.save-confirm-row img { width: 24px; height: 24px; object-fit: contain; }
.save-confirm-label { font-weight: 700; }
.save-confirm-values { white-space: nowrap; color: var(--blue-dark); }
.save-confirm-flags { display: grid; gap: 7px; margin: 0 0 18px; padding: 12px; border: 2px solid var(--grey); border-radius: 10px; text-align: left; font-size: 14px; }
.save-confirm-flags .is-changed { color: var(--blue-dark); }

.toast-stack { position: fixed; z-index: 100; top: 76px; right: 16px; display: flex; flex-direction: column; gap: 10px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 5px 0 rgba(0,0,0,.2); color: #2f3542; font-weight: 600; pointer-events: auto; }
.toast > span { flex: 1; min-width: 0; }
.toast-success { background: var(--green); }
.toast-info { background: var(--yellow); }
.toast-error { background: var(--red); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.toast-close { flex: none; border: 0; background: transparent; color: currentColor; font: inherit; font-size: 18px; cursor: pointer; }
.toast-action { flex: none; white-space: nowrap; }

@media (max-width: 600px) {
  .audit-pagination { flex-wrap: wrap; gap: 9px; }
  .save-confirm-row { grid-template-columns: 28px minmax(0, 1fr); }
  .save-confirm-row > :last-child { grid-column: 2; }
  .toast-stack { top: 66px; right: 10px; width: calc(100vw - 20px); }
}

.modal-title { font-size: 22px; margin: 0 0 14px; }

.modal-single .modal-art { width: 160px; height: 160px; }

.modal-single .pull-name { font-size: 26px; }

.modal-summary { margin: 0 0 12px; font-size: 14px; }

.modal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }

.modal-item { position: relative; border: 3px solid var(--ink); border-radius: 14px; padding: 8px 4px; background: var(--card-alt); }

.modal-item.is-dupe { opacity: .55; }

.modal-item.is-new { z-index: 1; transform: translateY(-4px) scale(1.035); isolation: isolate; background: linear-gradient(145deg,#fff 0%,#e8f4ff 58%,#f4ecff 100%); border-width: 4px; box-shadow: 0 5px 0 var(--ink),0 0 0 3px rgba(62,153,245,.2),0 0 22px rgba(62,153,245,.42); animation: new-collectible-pop .55s cubic-bezier(.2,1.45,.45,1) both; }
.modal-new-badge { position:absolute;z-index:2;top:-13px;left:50%;transform:translateX(-50%) rotate(-5deg);padding:3px 8px;border:2px solid var(--ink);border-radius:999px;background:var(--yellow);color:var(--ink);font-size:10px;font-weight:900;letter-spacing:.5px;line-height:1;box-shadow:0 3px 0 var(--ink) }
.modal-item.is-new.rarity-mythic .modal-new-badge { background:var(--red);color:#fff }
.modal-item.is-new .modal-grid-art { animation:new-collectible-art .7s .14s cubic-bezier(.2,1.5,.45,1) both }
@keyframes new-collectible-pop { 0%{opacity:0;transform:translateY(10px) scale(.72) rotate(-3deg)} 70%{opacity:1;transform:translateY(-6px) scale(1.07) rotate(1deg)} 100%{opacity:1;transform:translateY(-4px) scale(1.035)} }
@keyframes new-collectible-art { 0%{transform:scale(.35) rotate(-18deg)} 75%{transform:scale(1.18) rotate(4deg)} 100%{transform:scale(1)} }

.modal-grid-art { width: 58px; height: 58px; display: block; margin: 0 auto; }

.modal-item-name { font-size: 11px; font-weight: 700; line-height: 1.2; margin-top: 4px; }

.modal-item-rarity { font-size: 10px; text-transform: uppercase; font-weight: 700; }

.modal-ok { width: 100%; margin-top: 16px; }

@media (max-width: 600px) {
  .modal-single .modal-art { width: 120px; height: 120px; }
  .modal-single .pull-name { font-size: 21px; }
  .modal-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .modal { padding: 16px 12px; }
  .modal-title { font-size: 19px; }
  .modal-grid-art { width: 52px; height: 52px; }
  .modal-item { padding: 10px 4px; }
  .modal-item-name { font-size: 10px; }
  .drop-rates { gap: 7px; font-size: 11px; }
  .pull-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-left: 0; width: 100%; }
  .pull-buttons form, .pull-buttons .btn { width: 100%; min-width: 0; }
  .modal-actions .btn { flex: 1 1 auto; padding: 12px 10px; font-size: 14px; }
}

.claim-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.claim-btn { padding: 12px 28px; font-size: 19px; }

.claim-ready { animation: claim-glow 2s ease-in-out infinite; }

@keyframes claim-glow {
  0%, 100% { box-shadow: 0 5px 0 var(--green); }
  50% { box-shadow: 0 5px 0 var(--green), 0 0 18px rgba(116, 224, 111, .7); }
}

@media (prefers-reduced-motion: reduce) { .claim-ready { animation: none; } }

.streak-ladder { margin-top: 14px; border-top: 3px solid var(--grey); padding-top: 12px; }

.streak-ladder summary { cursor: pointer; font-weight: 700; }

.ladder-strip { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 2px 4px; }

.ladder-step {
  flex: 1 1 92px; min-width: 92px; text-align: center; padding: 10px 8px;
  background: var(--card-alt); border: 3px solid var(--ink); border-radius: 12px;
}

.ladder-day { font-size: 12px; color: var(--muted); white-space: nowrap; }

.ladder-coins { font-weight: 700; font-size: 17px; white-space: nowrap; }

.ladder-bonus { font-size: 11px; color: #c9a800; font-weight: 700; white-space: nowrap; }

.ladder-step.is-bonus { border-color: var(--yellow); }

.ladder-step.is-done { opacity: .5; }

.ladder-step.is-next { border-color: var(--blue); background: var(--me-row); box-shadow: 0 3px 0 var(--blue-dark); }

.ladder-step.is-gap { border-style: dashed; background: transparent; }

.ladder-step.is-gap .ladder-bonus { color: var(--muted); }

.title-spacer { flex: 1; }

.claim-chip { white-space: nowrap; }

.claim-chip-ready { animation: chip-pulse 1.8s ease-in-out infinite; }

@keyframes chip-pulse {
  0%, 100% { box-shadow: 0 3px 0 var(--blue-dark); }
  50% { box-shadow: 0 3px 0 var(--blue-dark), 0 0 14px rgba(59, 156, 255, .8); }
}

.claim-balance { color: var(--muted); font-weight: 500; }

@media (prefers-reduced-motion: reduce) { .claim-chip-ready { animation: none; } }

@media (max-width: 600px) {
  .title-spacer { display: none; }
  .claim-chip { font-size: 13px; }
}

.claim-actions .btn { padding: 12px 24px; font-size: 17px; line-height: 1.2; }

.flash { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.flash span { flex: 1; min-width: 0; }

.flash-action { flex: none; white-space: nowrap; animation: chip-pulse 1.8s ease-in-out infinite; }

.modal-item-country { font-size: 9px; color: var(--muted); line-height: 1.2; }

.modal-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }

.modal-actions .btn { flex: 0 0 auto; padding: 12px 22px; font-size: 16px; }

.modal-balance { margin: 10px 0 0; }

@media (max-width: 600px) {
  .ladder-strip { flex-wrap: nowrap; overflow-x: auto; }
  .ladder-step { flex: none; min-width: 84px; }
}
