.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
}
.btn:hover { background: var(--raised); border-color: var(--gold); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #201713; }
.btn-gold:hover { background: var(--gold-hover); }
.btn:disabled { background: var(--surface); border-color: var(--edge); color: #898393; cursor: default; }
.scr-h2, .scr-card-location h3 { margin: 0; font: 400 40px var(--display); }
.scr-cover {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #030c10 0%, #030c10d1 6%, #030c1000 22%),
    linear-gradient(90deg, #030d158f 0%, #030d1559 22%, #030d1500 47%),
    var(--scr-cover-art, none) center / cover no-repeat,
    #08151b var(--scr-cover-preview, none) center / cover no-repeat;
}
.scr-menu-startup {
  --scr-cover-art: url("../assets/backgrounds/lich-battle-moonlit-chapel-1280.webp");
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 1;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.scr-cover-copy {
  position: absolute;
  top: 116px;
  left: 68px;
  width: 420px;
}
.scr-title {
  margin: 0;
  font: 700 74px/.87 "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-variant-caps: small-caps;
  letter-spacing: -.025em;
  white-space: nowrap;
  filter: drop-shadow(0 3px 4px #01070de6);
}
.scr-title span {
  display: block;
  width: max-content;
  color: #e4edf0;
  background: linear-gradient(175deg, #fff 16%, #e1eaec 48%, #9daeb4 94%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.scr-title span + span {
  margin-top: 11px;
  color: #efbe73;
  font-size: 1.26em;
  background-image: linear-gradient(172deg, #fff1be 12%, #edbd71 53%, #ac6f3a 97%);
}
@media (forced-colors: active) {
  .scr-title span,
  .scr-title span + span {
    color: CanvasText;
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}
.scr-intro {
  max-width: 322px;
  margin: 32px 0 30px;
  color: #e3ded2;
  font: 500 18px/1.5 Georgia, serif;
  text-shadow: 0 1px 5px #03080c;
}
.scr-menu-actions { display: grid; width: max-content; gap: 4px; }
.scr-menu-footer {
  position: absolute;
  inset: auto 68px 20px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 9px;
  border-top: 1px solid #ba956360;
}
.scr-menu-utilities { display: flex; align-items: center; gap: 10px; }
.scr-cover .btn {
  border-color: transparent;
  border-radius: 4px;
  background: transparent;
  color: #e4ddd0;
  font-weight: 600;
}
.scr-cover .btn:hover { border-color: #b690616e; }
.scr-menu-actions .btn { justify-content: flex-start; }
.scr-prologue {
  box-sizing: border-box;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 14px;
  padding: 16px 24px;
  background: #101015;
}
.scr-prologue img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.scr-prologue > .btn { grid-row: 2; }
.scr-comic-status { align-self: center; margin: 0; color: var(--muted); }
.scr-menu-icon {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 2px #000b);
}
.scr-menu-stats-icon::before {
  content: "";
  width: 24px;
  height: 22px;
  background: linear-gradient(#ffe1a9, #b37c45);
  clip-path: polygon(0 86%, 8% 86%, 8% 50%, 26% 50%, 26% 86%, 41% 86%, 41% 28%,
    59% 28%, 59% 86%, 74% 86%, 74% 7%, 92% 7%, 92% 86%, 100% 86%, 100% 100%, 0 100%);
}
.scr-menu-news-icon::before {
  content: "";
  width: 19px;
  height: 24px;
  border-radius: 1px;
  background:
    linear-gradient(#654722 0 0) 4px 10px / 11px 1px no-repeat,
    linear-gradient(#654722 0 0) 4px 14px / 11px 1px no-repeat,
    linear-gradient(#654722 0 0) 4px 18px / 7px 1px no-repeat,
    linear-gradient(45deg, #99692f 50%, transparent 50%) right top / 7px 7px no-repeat,
    linear-gradient(#ffe1a9, #b37c45);
  clip-path: polygon(0 0, 12px 0, 100% 7px, 100% 100%, 0 100%);
}
.scr-menu-feedback-icon { position: relative; }
.scr-menu-feedback-icon::before {
  content: "";
  width: 24px;
  height: 24px;
  background:
    linear-gradient(#654722 0 0) 13px 10px / 7px 1px no-repeat,
    linear-gradient(#654722 0 0) 13px 16px / 7px 1px no-repeat,
    linear-gradient(#d09d61 0 0) top / 100% 3px no-repeat,
    linear-gradient(#af7b44 0 0) bottom / 100% 3px no-repeat,
    linear-gradient(#ffe1a9, #b37c45);
  clip-path: polygon(0 0, 100% 0, 100% 17%, 91% 17%, 91% 83%, 100% 83%, 100% 100%,
    0 100%, 0 83%, 9% 83%, 9% 17%, 0 17%);
}
.scr-menu-feedback-icon::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 8px;
  width: 7px;
  height: 12px;
  background: #654722;
  clip-path: path("M0 2 L2 4 L6 0 L7 1 L2 6 L0 4 Z M0 8 L2 10 L6 6 L7 7 L2 12 L0 10 Z");
}
.scr-menu-profile-icon::before {
  content: "";
  width: 32px;
  height: 18px;
  transform: rotate(-32deg);
  background:
    radial-gradient(circle at 8.5px 9px, transparent 4px, #966836 4.3px, #e6bd81 5px,
      transparent 5.4px 6.4px, #f8d699 7px, #966836 7.6px, transparent 7.8px),
    linear-gradient(#ffe4ac, #ac773e) 15px 6px / 2px 6px no-repeat,
    linear-gradient(90deg, #efc991, #ffeac0 55%, #e1b477) 17px 7px / 14px 1px no-repeat,
    linear-gradient(170deg, #fff0c9 12%, #edc689 43%, #c99758 58%, #986838 95%);
  clip-path: path(evenodd, "M8.5 1.5 A7.5 7.5 0 0 1 15.7 7 H29.5 Q31 7 31 8.5 V14 Q31 15 30 15 H28 Q27 15 27 14 V11 H25 V13 Q25 14 24 14 H22 Q21 14 21 13 V11 H15.7 A7.5 7.5 0 1 1 8.5 1.5 Z M12.5 9 A4 4 0 1 0 4.5 9 A4 4 0 1 0 12.5 9 Z");
}
.scr-dialog {
  box-sizing: border-box;
  width: min(432px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  margin: auto;
  padding: 0;
  border: 1px solid #93724d;
  border-radius: 12px;
  background: linear-gradient(145deg, #243037, #12191e 60%);
  color: var(--ink);
  color-scheme: dark;
  box-shadow: 0 22px 60px #000a;
}
.scr-dialog::backdrop { background: #080f15a8; backdrop-filter: blur(2px); }
.scr-dialog form { padding: 24px; }
.scr-dialog-header, .scr-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.scr-dialog-header .scr-h2 { font-size: 35px; }
.scr-dialog-close {
  position: relative;
  flex: 0 0 36px;
  min-height: 36px;
  padding: 0;
  border-color: #6d5844;
  background: #151e24;
}
.scr-dialog-close::before, .scr-dialog-close::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
}
.scr-dialog-close::after { transform: rotate(-45deg); }
.scr-profile { width: min(475px, calc(100vw - 30px)); }
.scr-profile section { margin-top: 21px; }
.scr-profile section p { margin: 0 0 14px; color: #e0d4c6; font-size: 14px; line-height: 1.55; }
.scr-profile section .scr-profile-mode { margin-bottom: 5px; color: var(--gold); font-weight: 650; }
.scr-profile section .scr-profile-status { min-height: 1.55em; }
.scr-profile label { display: block; color: #dfc49f; font-size: 13px; font-weight: 650; }
.scr-profile-key {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  margin: 6px 0 12px;
  padding: 8px 11px;
  border: 1px solid #6d5844;
  border-radius: 6px;
  background: #10191e;
  color: var(--ink);
  font: 14px ui-monospace, monospace;
}
.scr-profile-actions { justify-content: flex-start; flex-wrap: wrap; }
.scr-profile .btn { padding-inline: 12px; }
.scr-profile .scr-dialog-close { padding: 0; }
.scr-profile-conflict {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #6d5844;
  border-radius: 6px;
  background: #191c1e;
}
.scr-profile section .scr-profile-copy-status:not(:empty) { margin: 10px 0 0; color: var(--gold); }
.scr-profile section p:last-child { margin-bottom: 0; }
.scr-dialog-error { margin: 0; color: #ffb6a1; font-size: 14px; line-height: 1.55; }
.scr-dialog-error:not(:empty) { margin-block: 12px 8px; overflow-wrap: anywhere; }
.scr-raid-stats { width: min(875px, calc(100vw - 30px)); }
.scr-raid-stats form { padding: 18px 22px 20px; }
.scr-raid-totals, .scr-raid-outcomes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 14px 0 8px;
}
.scr-raid-totals > div, .scr-raid-outcomes > div {
  display: grid;
  align-items: center;
  gap: 3px 8px;
  padding: 8px 12px;
  border: 1px solid #a7804c55;
  border-radius: 6px;
  background: #0e161dc2;
}
.scr-raid-totals > div:has(img) { position: relative; padding-left: 43px; }
.scr-raid-totals img {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 23px;
  height: 23px;
  object-fit: contain;
  transform: translateY(-50%);
}
.scr-raid-totals dt, .scr-raid-outcomes dt { color: #dacdbf; font-size: 13px; line-height: 1.15; }
.scr-raid-totals dd, .scr-raid-outcomes dd {
  margin: 0;
  color: var(--gold);
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.scr-raid-outcomes { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 13px; }
.scr-raid-outcomes > div { grid-template-columns: 1fr auto; padding: 7px 9px; }
.scr-raid-outcomes dd { font-size: 16px; }
.scr-raid-table { overflow-x: auto; }
.scr-raid-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.scr-raid-table caption {
  padding-bottom: 6px;
  color: var(--gold);
  text-align: left;
  font: 400 21px var(--display);
}
.scr-raid-table th, .scr-raid-table td { padding: 8px; border-bottom: 1px solid #a7804c44; }
.scr-raid-table thead th { color: #dacdbf; background: #1d272c; font-weight: 600; }
.scr-raid-table thead th:first-child, .scr-raid-table tbody th { text-align: left; }
.scr-raid-table tbody th { min-width: 100px; font-weight: 650; }
.scr-raid-table tbody tr:nth-child(odd) { background: #0e161d90; }
.scr-raid-table td { text-align: center; font-variant-numeric: tabular-nums; }
.scr-raid-table td:last-child { white-space: nowrap; }
.scr-raid-table .scr-raid-first { min-width: 115px; color: #dacdbf; }
.scr-raid-first strong { color: var(--gold); }
.scr-raid-first small { display: block; margin-top: 2px; font-size: 11px; }
.scr-raid-note { margin: 8px 0 0; color: #dacdbf; font-size: 12px; }
.scr-confirm-description { margin: 18px 0 25px; color: #e0d4c6; font-size: 14px; line-height: 1.55; }
.scr-confirm-actions { justify-content: center; flex-wrap: wrap; }
.scr-confirm-actions > [hidden] { display: none; }
.scr-dialog-footer .btn { min-height: 40px; }
.scr-dialog-footer a.btn { box-sizing: border-box; text-decoration: none; }
.scr-dialog-footer a.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.scr-volume { min-width: 0; margin: 22px 0 16px; padding: 0; border: 0; }
.scr-volume legend { padding: 0; color: #dfc49f; font-size: 13px; font-weight: 650; }
.scr-settings-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.scr-settings-actions .btn { min-height: 40px; padding: 4px 8px; }
.scr-hotkeys { width: min(478px, calc(100vw - 30px)); }
.scr-hotkeys form { padding: 18px 20px; }
.scr-hotkeys-help { margin: 10px 0; color: #e0d4c6; font-size: 14px; }
.scr-hotkey-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.scr-hotkey-slot {
  display: grid;
  gap: 4px;
  padding: 5px;
  border: 1px solid #79604370;
  border-radius: 8px;
  background: #10171cb3;
  color: #e0d4c6;
  font-size: 13px;
  text-align: center;
}
.scr-hotkey-key {
  display: block;
  min-width: 0;
  min-height: 34px;
  padding: 3px 4px;
  border-color: #796043;
  color: var(--gold);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scr-hotkey-key[aria-pressed="true"] {
  border-color: var(--gold);
  background: #423321;
}
.scr-hotkey-capture { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.scr-hotkey-capture:has(.scr-hotkey-status:empty):has(.scr-hotkey-cancel[hidden]) { display: none; }
.scr-hotkey-status { margin: 0; color: #e0d4c6; font-size: 13px; }
.scr-hotkey-cancel { min-height: 30px; margin-left: auto; padding: 0 10px; font-size: 13px; }
.scr-hotkey-cancel[hidden] { display: none; }
.scr-hotkeys-footer { margin-top: 12px; }
.scr-music-credits { width: min(440px, calc(100vw - 30px)); }
.scr-music-description { margin: 12px 0; color: #e0d4c6; font-size: 14px; line-height: 1.4; }
.scr-music-track-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.scr-music-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #79604370;
  border-radius: 8px;
  background: #10171cb3;
  font-size: 14px;
}
.scr-music-attribution { margin-top: 3px; color: #e0d4c6; font-size: 12px; }
.scr-music-attribution a { color: #e8cb8e; text-underline-offset: 2px; }
.scr-copy-track { width: 36px; min-height: 36px; padding: 0; }
.scr-music-copy-field {
  box-sizing: border-box;
  width: 100%;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid #796043;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  user-select: text;
}
.scr-music-credits-footer { margin-top: 12px; }
.scr-music-copy-status { margin: 0; color: #e0d4c6; font-size: 13px; }
.scr-result-art, .scr-report {
  border: 1px solid var(--edge);
  border-radius: 14px;
  background-color: var(--surface);
}
.scr-slider-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding: 12px 14px;
  background: #0d151b;
  border: 1px solid #4b433f;
  border-radius: 8px;
}
.scr-slider-row label { font-size: 14px; font-weight: 600; }
.scr-slider-row output { color: var(--gold); font-size: 14px; font-variant-numeric: tabular-nums; }
.scr-slider-row input { grid-column: 1 / -1; width: 100%; height: 20px; margin: 0; accent-color: var(--gold); cursor: pointer; }
.scr-location { padding: 46px 54px; }
.scr-news {
  box-sizing: border-box;
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 24px;
}
.scr-news-list {
  overflow: auto;
  scrollbar-color: #806447 #191820;
  margin: 0;
  padding: 0 26px;
  list-style: none;
  border: 1px solid #514653;
  border-radius: 12px;
  background: linear-gradient(150deg, #25222b, var(--surface) 70%);
}
.scr-news-list:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.scr-news-entry {
  display: grid;
  grid-template-columns: 158px minmax(0, 1fr);
  gap: 24px;
  padding-block: 20px;
}
.scr-news-entry + .scr-news-entry { border-top: 1px solid #514653; }
.scr-news-entry time {
  padding-top: 5px;
  color: #e5b575;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.scr-news-entry h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font: 400 25px/1.2 var(--display);
}
.scr-news-entry ul {
  max-width: 80ch;
  margin: 0;
  padding-inline-start: 18px;
  color: #e0d4c6;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.scr-news-entry li + li { margin-top: 3px; }
.scr-camp {
  box-sizing: border-box;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 26px;
  padding-block: 40px;
}
.scr-statusbar, .scr-status-info { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.scr-status-info span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.scr-status-info b { color: var(--gold); }
.scr-status-info .scr-camp-runes b { color: #ddd3ff; }
.scr-status-info img { width: 22px; image-rendering: pixelated; }
.scr-raid-grid { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; }
.scr-carousel { min-width: 0; display: grid; }
.scr-card-location {
  position: relative;
  display: flex;
  align-items: end;
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
  padding: 32px;
  border: 1px solid #77604d;
  border-radius: 14px;
  background: #171b24;
}
.scr-carousel-art, .scr-card-location::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.scr-carousel-art { object-fit: cover; }
.scr-art-enter { animation: scr-art-enter .25s ease-out; }
@keyframes scr-art-enter { from { opacity: .4; } }
.scr-card-location::after {
  content: "";
  background: linear-gradient(0deg, #111019 2%, #13121bc9 28%, transparent 72%),
    linear-gradient(90deg, #1110196b, transparent 54%);
}
.scr-carousel-info h3 { font-size: 50px; margin: 0; }
.scr-location-meta { color: var(--gold); font-size: 14px; font-weight: 650; }
.scr-carousel-info .scr-location-meta { margin: 8px 0 16px; }
.scr-location-cleared { color: #9dd6b0; }
.scr-location-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.scr-location-buttons .btn { min-width: 132px; }
.scr-carousel-arrow {
  position: absolute;
  top: 42%;
  width: 47px;
  min-height: 47px;
  padding: 0;
  border-color: #b08c65;
  background: #14121ce8;
  color: var(--gold);
  border-radius: 9px;
}
.scr-carousel-arrow:disabled {
  background: #17161de0;
  border-color: #615967;
  color: #88818e;
}
.scr-carousel-arrow span { width: 9px; height: 9px; border: solid currentColor; border-width: 2px 2px 0 0; }
.scr-carousel-prev { left: 20px; }
.scr-carousel-prev span { transform: translateX(2px) rotate(-135deg); }
.scr-carousel-next { right: 20px; }
.scr-carousel-next span { transform: translateX(-2px) rotate(45deg); }
.scr-campsite, .scr-campsite-art, .scr-lich-diary-hotspot {
  position: absolute;
  inset: 0;
}
.scr-campsite-art {
  width: 100%;
  height: 100%;
}
#scr-camp-back {
  position: absolute;
  top: 32px;
  right: 54px;
}
.scr-camp-player {
  position: absolute;
  left: 28px;
  bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  box-sizing: border-box;
  width: 318px;
  padding: 10px 12px;
  border: 1px solid #796043;
  border-radius: 10px;
  background: linear-gradient(160deg, #211b19f2, #12151bee);
  box-shadow: 0 5px 18px #09090b80;
  color: var(--ink);
}
.scr-player-title {
  margin: 0;
  color: var(--gold);
  font: 400 20px/1.1 var(--display);
}
.scr-player-playlist summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  cursor: pointer;
  list-style: none;
}
.scr-player-playlist summary::-webkit-details-marker { display: none; }
.scr-player-playlist summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.scr-player-playlist[open] summary::after { transform: rotate(225deg); }
.scr-player-playlist summary:hover { color: #ffe1a7; }
.scr-player-playlist summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.scr-player-list {
  --track-height: 38px;
  --track-gap: 4px;
  display: grid;
  gap: var(--track-gap);
  max-height: calc(5 * var(--track-height) + 4 * var(--track-gap));
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #9c7951 #171416;
}
.scr-player-list > li { min-width: 0; }
@supports selector(::-webkit-scrollbar) {
  .scr-player-list { scrollbar-width: auto; scrollbar-color: auto; }
  .scr-player-list::-webkit-scrollbar { width: 10px; }
  .scr-player-list::-webkit-scrollbar-track { background: #191617; border-radius: 5px; }
  .scr-player-list::-webkit-scrollbar-thumb {
    border: 2px solid #191617;
    border-radius: 5px;
    background: #a78355;
  }
}
.scr-player-track, .scr-player-key {
  box-sizing: border-box;
  border: 1px solid #634e3b;
  border-radius: 6px;
  background: #302721b3;
  color: inherit;
  cursor: pointer;
}
.scr-player-track {
  display: grid;
  align-content: center;
  gap: 1px;
  width: 100%;
  height: var(--track-height);
  padding: 0 9px;
  font-size: 14px;
  line-height: 16px;
  font-weight: 600;
  text-align: left;
}
.scr-track-name, .scr-track-locations {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scr-track-locations, .scr-player-empty {
  color: #d3bb9f;
  font-size: 12px;
  line-height: 14px;
  font-weight: 400;
}
.scr-player-empty { margin: 0; }
.scr-player-track[aria-current="true"] {
  border-color: #bb8b52;
  background: #493422;
  box-shadow: inset 3px 0 #e4ad66;
  color: var(--gold);
}
.scr-player-track:hover, .scr-player-key:enabled:hover {
  border-color: var(--gold);
  background: #55402c;
}
.scr-player-track:focus-visible, .scr-player-key:focus-visible,
.scr-player-volume input:focus-visible {
  outline: 2px solid #ffe1a7;
  outline-offset: -2px;
}
.scr-player-controls, .scr-player-transport, .scr-player-volume {
  display: flex;
  align-items: center;
}
.scr-player-controls {
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid #63503c;
}
.scr-player-transport { gap: 4px; }
.scr-player-key {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  padding: 0;
  color: var(--gold);
}
.scr-player-key:disabled {
  border-color: #494038;
  background: #201d1c;
  color: #8e8073;
  cursor: default;
}
.scr-player-key svg, .scr-player-volume svg {
  width: 16px;
  height: 16px;
}
.scr-player-volume {
  flex: 1;
  gap: 6px;
  min-width: 0;
  color: #d3bb9f;
}
.scr-player-volume svg { flex: none; }
.scr-player-volume input {
  flex: 1;
  min-width: 0;
  margin: 0;
  accent-color: var(--gold);
  color-scheme: dark;
  cursor: pointer;
}
.scr-player-volume input:disabled { cursor: default; }
.scr-lich-diary-hotspot {
  pointer-events: none;
}
.scr-lich-diary-hotspot:has(.scr-lich-diary-trigger:is(:hover, :focus-visible)) {
  filter: drop-shadow(0 0 2px #ffc878) drop-shadow(0 0 6px #f3a333b0);
}
.scr-lich-diary-trigger {
  --book-contour:
    7.6% 26.8%, 12.5% 24.4%, 18.7% 16.2%, 29.2% 20.9%, 35.5% 26.8%,
    38.9% 32.7%, 40.3% 38.6%, 43.8% 29.1%, 50.8% 22.1%, 59.8% 16.2%,
    67.5% 12.6%, 73.1% 6.7%, 76.5% 22.1%, 82.8% 42.1%, 91.2% 63.4%,
    94.6% 75.2%, 93.2% 87.0%, 85.6% 91.7%, 76.5% 90.5%, 65.4% 85.8%,
    56.3% 83.5%, 50.1% 87.0%, 36.8% 79.9%, 26.4% 71.7%, 20.1% 58.7%;
  position: absolute;
  left: 66.7%;
  top: 51.4%;
  width: 8.6%;
  height: 9%;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  clip-path: polygon(var(--book-contour));
  cursor: pointer;
  pointer-events: auto;
}
.scr-lich-diary-trigger:is(:hover, :focus-visible)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffe1a7;
  /* Внутренний контур оставляет видимой только светящуюся кромку. */
  clip-path: polygon(evenodd, var(--book-contour), 7.6% 26.8%,
    9.2% 28.2%, 13.9% 26.0%, 19.9% 18.2%, 30.0% 22.6%, 36.0% 28.2%,
    39.4% 33.7%, 40.7% 39.3%, 44.1% 30.4%, 50.8% 23.7%, 59.5% 18.2%,
    66.9% 14.9%, 72.2% 9.3%, 75.6% 23.7%, 81.6% 42.6%, 89.7% 62.5%,
    93.0% 73.6%, 91.7% 84.7%, 84.3% 89.1%, 75.6% 88.0%, 64.9% 83.6%,
    56.1% 81.3%, 50.1% 84.7%, 37.4% 78.0%, 27.3% 70.3%, 21.3% 58.1%,
    9.2% 28.2%, 7.6% 26.8%);
  pointer-events: none;
}
.scr-lich-diary {
  width: min(1000px, calc(100vw - 24px), calc((100dvh - 128px) * 1.5));
}
.scr-lich-diary form { padding: 10px 12px; }
.scr-lich-diary .scr-h2 { color: var(--gold); font-size: 27px; }
.scr-lich-diary .scr-dialog-header { margin-bottom: 8px; }
.scr-lich-diary-page { display: block; width: 100%; height: auto; border-radius: 5px; }
.scr-lich-diary .scr-dialog-footer { margin-top: 8px; }
.scr-lich-diary .scr-dialog-footer .btn {
  width: 48px;
  min-height: 38px;
  padding: 0;
  font-size: 21px;
}
.scr-lich-diary-caption { color: var(--gold); font: 18px var(--display); text-align: center; }
.scr-party {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.scr-party-roster, .scr-party-actions { display: grid; gap: 10px; }
.scr-party-roster { grid-auto-flow: column; grid-auto-columns: 154px; }
.scr-party-actions { grid-auto-flow: column; grid-auto-columns: max-content; }
.scr-cover .btn, .scr-party-actions .btn {
  min-width: 150px;
  white-space: nowrap;
  font-size: 14px;
}
.scr-cover .btn, .scr-party-actions .btn, .scr-party .scr-hero {
  box-sizing: border-box;
  height: 54px;
  padding: 0 10px;
  gap: 10px;
}
.scr-party .scr-hero, .scr-party-actions .btn { border-radius: 7px; }
.scr-party .scr-hero {
  border-color: #463c40;
  background: linear-gradient(145deg, #25222a, #181820);
}
.scr-hero { display: flex; align-items: center; gap: 12px; padding: 8px; background: #15151edb; border: 1px solid var(--edge); border-radius: 8px; }
.scr-hero strong, .scr-hero span { display: block; }
.scr-hero span { color: var(--muted); margin-top: 3px; font-size: 13px; }
.scr-portrait { position: relative; width: 57px; height: 57px; overflow: hidden; border-radius: 6px; background: #292734; }
.scr-portrait img { position: absolute; width: 182px; left: -62px; top: -45px; image-rendering: pixelated; }
.scr-party .scr-portrait { flex: 0 0 36px; height: 36px; background: #302b31; }
.scr-party .scr-portrait img { width: 152px; left: -60px; top: -34px; image-rendering: auto; }
.scr-party .scr-hero strong { font-size: 14px; }
.scr-party .scr-hero span { margin-top: 2px; font-size: 12px; }
.scr-party .btn {
  justify-content: flex-start;
  border-color: #806042;
  background: linear-gradient(145deg, #362b27, #201d24);
  color: #ffdfae;
  text-align: left;
}
.scr-party .btn:hover {
  border-color: var(--gold);
  background: linear-gradient(145deg, #47362b, #2b2428);
}
.scr-cover .btn img, .scr-cover .scr-menu-icon, .scr-party-actions img {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.scr-results-page {
  box-sizing: border-box;
  height: 100%;
  padding-block: 40px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
}
.scr-result-art { position: relative; display: flex; align-items: end; padding: 34px; overflow: hidden; }
.scr-result-art img, .scr-result-art::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.scr-result-art img { object-fit: cover; }
.scr-result-art::after {
  content: "";
  background: linear-gradient(0deg, #12121af7, #12121a52 49%, transparent 77%),
    linear-gradient(90deg, #12121a7a, transparent 52%);
}
.scr-result-art > div { position: relative; z-index: 1; }
.scr-results-title { margin: 6px 0 0; font: 400 55px var(--display); }
.scr-results-win { color: var(--gold); }
.scr-results-wipe { color: #ff948b; }
.scr-report {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 220px 190px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}
.scr-report-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}
.scr-report-progress strong { color: var(--gold); }
.scr-report-progress progress { grid-column: 1 / -1; width: 100%; height: 8px; accent-color: var(--gold); }
.scr-results-rewards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 15px;
  padding-left: 18px;
  border-left: 1px solid var(--edge);
  color: var(--muted);
  font-size: 14px;
}
.scr-results-rewards > div { display: flex; align-items: center; gap: 5px; }
.scr-results-rewards img { width: 24px; image-rendering: pixelated; }
.scr-results-rewards b { display: block; color: var(--gold); font-size: 23px; line-height: 1.05; }
.scr-results-rewards .scr-result-runes b { color: #ddd3ff; }
.scr-result-trophies { flex-basis: 100%; color: var(--gold); font-size: 12px; }
.scr-result-roster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.scr-result-hero {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px;
  border: 1px solid var(--edge);
  border-radius: 7px;
  background: var(--bg);
}
.scr-result-hero strong, .scr-result-hero span { display: block; white-space: nowrap; }
.scr-result-hero strong { font-size: 12px; }
.scr-result-hero span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.scr-result-hero .scr-portrait { flex: 0 0 36px; height: 36px; }
.scr-result-hero .scr-portrait img { width: 125px; left: -42px; top: -31px; }
.scr-result-fallen .scr-portrait { filter: grayscale(1); }
.scr-result-fallen span { color: #ff948b; }
.scr-result-actions { grid-column: 4; display: grid; gap: 7px; }
.scr-result-actions .btn { min-height: 36px; white-space: nowrap; }
.scr-result-actions .btn[aria-expanded="true"] { border-color: var(--gold); }
.scr-stats-dialog {
  inset: 0 0 var(--stats-bottom, 120px);
  width: min(880px, calc(100vw - 30px));
  max-height: calc(100dvh - var(--stats-bottom, 120px) - 24px);
  overflow: auto;
}
.scr-stats-filter { display: flex; align-items: center; gap: 10px; margin: 15px 0 0; color: var(--muted); font-size: 14px; }
.scr-stats-filter select { padding: 5px 8px; border: 1px solid #6d5844; border-radius: 6px; background: #151e24; color: var(--ink); font: inherit; }
.scr-stats-party {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 222px), 1fr));
  gap: 10px;
  margin-top: 16px;
}
.scr-stats-hero {
  padding: 14px;
  border: 1px solid var(--edge);
  border-radius: 9px;
  background: var(--bg);
  font-size: 14px;
}
.scr-stats-hero h3 { margin: 0; color: var(--gold); font: 400 23px var(--display); }
.scr-stats-hero h4 { margin: 13px 0 5px; color: var(--muted); font-size: 13px; font-weight: 600; }
.scr-stats-hero b { color: var(--ink); }
.scr-stats-summary, .scr-stats-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 6px 9px;
}
.scr-stats-list, .scr-stats-list dd { margin: 0; }
.scr-stats-summary b, .scr-stats-list dd { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scr-stats-list dt { overflow-wrap: anywhere; }
.scr-stats-detail { color: var(--muted); font-size: 12px; }
.scr-stats-death small { display: block; margin-top: 3px; color: var(--muted); }
.scr-stats-empty, .scr-stats-survived { margin: 0; color: var(--muted); }
.scr-stats-received { margin: 7px 0 12px; color: var(--muted); font-size: 13px; }
.scr-stats-death, .scr-stats-survived { margin: 0; padding-top: 9px; border-top: 1px solid var(--edge); }
.scr-stats-death { color: #ff948b; }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .scr-art-enter { animation: none; }
}
