:root {
  color-scheme: light;
  --bg: #0d0d0d;
  --bg-accent: #1c1c1c;
  --panel: rgba(0, 0, 0, 0.54);
  --panel-strong: rgba(0, 0, 0, 0.70);
  --text: #e9e9e9;
  --heading: #64ff00;
  --panel-heading: #CF9C24;
  --muted: #7C7C7C;
  --accent: #64ff00;
  --accent-2: #64ff00;
  --danger: #ff4d4d;
  --shadow: 0 10px 22px rgba(0, 0, 0, 0.42);
  --border: rgba(255, 255, 255, 0.10);
  --radius: 10px;
  --section-gap: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-y: auto;
  overflow-x: hidden;
  background: #0a0a0a;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: inherit;
  background: transparent;
  position: relative;
  color: var(--text);
  padding: 16px 28px 36px;
}

/*
  Full-bleed background anchored to the viewport.
  Uses 100vw/100vh so it covers the scrollbar area on browsers where vw includes it.
*/
body::before {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  /* Extra pixels cover scrollbar gutter on browsers where 100vw excludes it. */
  width: calc(100vw + 32px);
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 82% 28%, rgba(121, 210, 199, 0.13), transparent 64%),
    radial-gradient(900px 520px at 50% 15%, rgba(0, 0, 0, 0.12), transparent 65%),
    radial-gradient(1200px 800px at 50% 85%, rgba(0, 0, 0, 0.40), rgba(0, 0, 0, 0.68)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.52)),
    url("karazhan.jpg") left top / cover no-repeat,
    #0a0a0a;
}

/* When viewing /reports/<id>, hide all panels until parsed. */
html.report-loading main {
  visibility: hidden;
  pointer-events: none;
}

html.import-restoring main {
  visibility: hidden;
  pointer-events: none;
}

.ambient {
  position: fixed;
  inset: 0;
  display: none;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px 32px;
  background: transparent;
  border-radius: var(--radius);
  box-shadow: none;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: fadeIn 0.8s ease-out;
  margin-bottom: var(--section-gap);
}

.character-header {
  padding: 18px 22px 16px;
}

.character-hero {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 18px;
  align-items: center;
  text-align: left;
  padding: 2px 2px 2px;
}

.character-hero-avatar {
  width: 86px;
  height: 86px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 26px rgba(0, 0, 0, 0.35);
}

.character-hero-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.character-hero-name {
  margin: 0;
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  letter-spacing: 0.01em;
  font-weight: 800;
  text-transform: none;
  color: rgba(242, 239, 230, 0.94);
}

.character-hero-name.alliance {
  color: #6db6ff;
}

.character-hero-name.horde {
  color: #ff7f7f;
}

#userHeroName {
  color: var(--accent);
}

.character-hero-realm {
  margin-top: 0;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(233, 233, 233, 0.65);
}

.character-hero-class {
  margin-top: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
}

.character-header .status {
  margin-top: 12px;
  text-align: left;
}

.overline {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.7rem;
  color: var(--accent);
  margin: 0 0 12px;
}

h1 {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  margin: 0 0 6px;
  letter-spacing: 0.12em;
  color: var(--heading);
}

.subhead {
  margin: 0;
  color: var(--muted);
  max-width: 420px;
}

.countdown-panel {
  background: transparent;
  margin: 0;
  padding: 14px 18px;
}

.panel.countdown-panel {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Countdown panel uses the standard .panel styling */

.countdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.countdown-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--accent);
  text-align: center;
  width: 100%;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 96px);
  gap: 10px;
  justify-content: center;
  width: fit-content;
}

.countdown-box {
  background: var(--panel-strong);
  border: none;
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
}

.countdown-value {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  color: var(--accent);
  letter-spacing: 0.08em;
  font-weight: 600;
}

.countdown-unit {
  margin-top: 4px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.home-status {
  display: flex;
  justify-content: center;
  margin: 0;
}

/* Home page spacing tweaks around raid countdown and leaderboard. */
body.home .upload-bar {
  margin-bottom: 24px;
}

body.home .countdown-panel {
  margin-top: 18px;
  margin-bottom: 6px;
}

body.home .home-status {
  margin-bottom: 6px;
}

.search-wrap {
  position: relative;
  width: min(780px, 92vw);
}

.search-wrap.topbar-search {
  width: min(520px, 48vw);
  max-width: 520px;
  flex: 1 1 320px;
  min-width: 220px;
}

.status:empty {
  display: none;
}

.upload-bar {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin: 0 0 calc(var(--section-gap) + 20px);
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Home topbar: keep search centered between brand and actions. */
.upload-bar.has-center-search {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 520px) 1fr;
  align-items: center;
}

.upload-bar.has-center-search .brand {
  justify-self: start;
}

.upload-bar.has-center-search .topbar-search {
  justify-self: center;
  width: 100%;
}

.upload-bar.has-center-search .top-actions {
  justify-self: end;
  margin-left: 0;
}

@media (max-width: 720px) {
  .upload-bar.has-center-search {
    grid-template-columns: auto 1fr auto;
  }
}

@media (max-width: 560px) {
  .upload-bar.has-center-search {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "search search";
    align-items: center;
    gap: 10px 8px;
  }

  .upload-bar.has-center-search .brand {
    grid-area: brand;
    justify-self: start;
    padding-left: 6px;
  }

  .upload-bar.has-center-search .topbar-search {
    grid-area: search;
    justify-self: stretch;
    width: 100%;
  }

  .upload-bar.has-center-search .top-actions {
    grid-area: actions;
    justify-self: end;
    margin-left: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-action {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  background: rgba(0, 0, 0, 0.25);
  color: rgba(220, 220, 220, 0.82);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

/* Dropdown-themed top-action variant. */
.top-action.is-bright {
  background: rgba(28, 28, 28, 0.9);
  color: #cfcfcf;
}

.top-action.is-bright:hover {
  background: rgba(28, 28, 28, 0.96);
  color: #cfcfcf;
}

button.top-action {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: inherit;
  line-height: 1;
  cursor: pointer;
}

.top-action:hover {
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.42);
  color: rgba(233, 233, 233, 0.92);
}

.top-action:active {
  color: rgba(233, 233, 233, 0.92);
}

.top-action.is-active {
  background: rgba(0, 0, 0, 0.32);
  color: var(--accent);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(100, 255, 0, 0.12);
}

.top-action:focus {
  outline: none;
}

.top-action:focus-visible {
  background: rgba(0, 0, 0, 0.32);
  box-shadow:
    0 0 0 1px rgba(100, 255, 0, 0.35),
    0 0 18px rgba(100, 255, 0, 0.14),
    0 12px 26px rgba(0, 0, 0, 0.42);
}

.top-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
}

.top-icon svg {
  width: 14px;
  height: 14px;
}

.upload-link {
  color: rgba(242, 239, 230, 0.9);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(242, 239, 230, 0.22);
  border-radius: 999px;
}

.upload-link:hover {
  border-color: rgba(242, 239, 230, 0.5);
}

.guild-lookup-wrap {
  position: relative;
}

.guild-lookup-wrap .search-input {
  padding-right: 36px;
}

.is-readonly {
  opacity: 0.75;
}

.guild-create-form {
  display: grid;
  gap: 1rem;
  max-width: 520px;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.action-button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0a0a;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.action-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.action-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.action-button.is-danger {
  border-color: rgba(255, 90, 90, 0.35);
  color: rgba(255, 127, 127, 0.92);
}

.action-button.is-danger:hover {
  background: rgba(255, 90, 90, 0.08);
  color: #ff7f7f;
}

.field {
  display: grid;
  gap: 0.55rem;
  position: relative;
}

.captcha-field {
  justify-items: center;
}

.field-corner-error {
  position: absolute;
  right: 0;
  top: 0;
  transform: none;
  font-size: 0.82rem;
  color: #ff5a5a;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.field label {
  color: rgba(242, 239, 230, 0.9);
  font-size: 0.9rem;
}

/* Allow corner errors to sit on the label row. */
.field.has-corner-error label {
  padding-right: 140px;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(28, 28, 28, 0.9);
  color: #cfcfcf;
  font-size: 1rem;
}

.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(28, 28, 28, 0.9);
  color: #cfcfcf;
  font-size: 1rem;
  resize: vertical;
  min-height: 52px;
}

.field select {
  padding-right: 40px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%238c8c8c' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.field input::placeholder {
  color: #8c8c8c;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: rgba(100, 255, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(100, 255, 0, 0.12);
}

.field textarea:focus {
  outline: none;
  border-color: rgba(100, 255, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(100, 255, 0, 0.12);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: rgba(255, 90, 90, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 90, 90, 0.12);
}

.field-error {
  position: absolute;
  right: 12px;
  top: 41px;
  color: #ff7f7f;
  font-size: 0.78rem;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.field-error:empty {
  display: none;
}

.upload-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

#parseUploadArea {
  margin-top: 12px;
}

.upload-inline-input {
  flex: 0 0 80ch;
  width: 80ch;
  max-width: 100%;
  min-width: 200px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(28, 28, 28, 0.9);
  color: #cfcfcf;
  font-size: 1rem;
}

/* Search-box themed variant for the parse name field. */
.upload-inline-input.is-searchlike {
  background: rgba(80, 80, 80, 0.2);
  border: none;
  border-radius: 12px;
  color: var(--text);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
}

.upload-inline-input.is-searchlike::placeholder {
  color: #8c8c8c;
}

.upload-inline-input.is-searchlike:focus {
  outline: none;
  box-shadow:
    0 0 0 1px rgba(100, 255, 0, 0.35),
    0 0 18px rgba(100, 255, 0, 0.16),
    0 10px 20px rgba(0, 0, 0, 0.35);
}

.upload-inline-input.is-searchlike.is-readonly {
  cursor: default;
  caret-color: transparent;
}

.upload-inline-input.is-searchlike.is-readonly:focus {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.upload-inline-input::placeholder {
  color: #8c8c8c;
}

.upload-inline-input:focus {
  outline: none;
  border-color: rgba(100, 255, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(100, 255, 0, 0.12);
}

@media (max-width: 620px) {
  .upload-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .upload-inline .top-action {
    width: fit-content;
    align-self: flex-end;
  }
}

#authLoginPanel {
  display: grid;
  gap: 1.1rem;
}

.guild-create-form label {
  display: grid;
  gap: 0.4rem;
  color: rgba(242, 239, 230, 0.9);
  font-size: 0.9rem;
}

.guild-create-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(28, 28, 28, 0.9);
  color: #cfcfcf;
  font-size: 1rem;
}

.guild-create-form select {
  width: 100%;
  background: rgba(28, 28, 28, 0.9);
  color: #cfcfcf;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 40px 12px 14px;
  font-size: 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%238c8c8c' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.guild-create-form input::placeholder {
  color: #8c8c8c;
}

.guild-create-form input:focus,
.guild-create-form select:focus {
  outline: none;
  border-color: rgba(100, 255, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(100, 255, 0, 0.12);
}

.guild-create-form .form-submit {
  width: fit-content;
}

.upload-layout {
  margin-top: 2.5rem;
}

.upload-guild-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.upload-dropzone {
  border: 1px dashed rgba(242, 239, 230, 0.35);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.9rem;
  color: rgba(242, 239, 230, 0.78);
  background: rgba(11, 16, 32, 0.35);
  cursor: pointer;
}

.dropzone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}


.dropzone-name-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(28, 28, 28, 0.9);
  color: #cfcfcf;
  font-size: 0.95rem;
}

.dropzone-name-input::placeholder {
  color: #8c8c8c;
}

.dropzone-name-input:focus {
  outline: none;
  border-color: rgba(100, 255, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(100, 255, 0, 0.12);
}

.dropzone-name-input[readonly] {
  opacity: 0.9;
}

#parseLoadedBar {
  margin-top: 12px;
  justify-content: flex-start;
}

#parseChoosePanel {
  padding-bottom: 16px;
}

.loaded-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.loaded-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}


.log-name-label {
  color: rgba(242, 239, 230, 0.92);
  padding: 8px 0;
  max-width: 80ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-name-label-name {
  font-weight: 400;
  letter-spacing: 0.02em;
}

.log-name-label-meta {
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.log-name-label-username {
  font-weight: 400;
  color: var(--accent);
  text-decoration: none;
}

.log-name-label-username:hover {
  text-decoration: underline;
}

.duplicate-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: rgba(242, 239, 230, 0.9);
}

.duplicate-text {
  color: rgba(233, 233, 233, 0.86);
}

.duplicate-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.duplicate-link:hover {
  text-decoration: underline;
}

.uploader-label {
  color: rgba(220, 220, 220, 0.78);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.dropzone-row .top-action {
  flex: 0 0 auto;
}


.upload-dropzone.is-active {
  border-color: rgba(100, 255, 0, 0.65);
  background: rgba(100, 255, 0, 0.08);
  color: #d7ffd7;
}

.upload-dropzone.has-file {
  border-color: rgba(100, 255, 0, 0.7);
  background: rgba(100, 255, 0, 0.12);
  color: #b7ffb7;
}

/* Parse page uses this to indicate a loaded file */
#parseDropZone.has-file {
  border-color: rgba(100, 255, 0, 0.7);
  background: rgba(100, 255, 0, 0.12);
  color: #b7ffb7;
}


.guild-selected-alliance {
  color: #6db6ff;
}

.guild-selected-horde {
  color: #ff7f7f;
}

@media (max-width: 980px) {
  .upload-guild-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .upload-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

.brand {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.95rem;
}

.brand-logo {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.brand-accent {
  color: var(--accent);
}

.brand-light {
  color: #ffffff;
}

.guild-input {
  width: 200px;
  background: rgba(28, 28, 28, 0.9);
  color: #cfcfcf;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.guild-input::placeholder {
  color: #8c8c8c;
}

.server-input {
  width: 140px;
  background: rgba(28, 28, 28, 0.9);
  color: #cfcfcf;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.server-input::placeholder {
  color: #8c8c8c;
}

.faction-input {
  width: 120px;
  background: rgba(28, 28, 28, 0.9);
  color: #cfcfcf;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%238c8c8c' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 8px;
  padding-right: 28px;
}

.guild-link.alliance {
  color: #5aa9ff;
}

.guild-link.horde {
  color: #ff5a5a;
}

.rank-badge {
  font-weight: 600;
  color: var(--text);
}

.rank-gold {
  color: #ffd36a;
}

.rank-pink {
  color: #ff7bbf;
}

.rank-orange {
  color: #ff9f4a;
}

.search-input {
  width: 100%;
  background: var(--panel-strong);
  border: none;
  border-radius: 12px;
  padding: 18px 20px 18px 56px;
  font-size: 1.2rem;
  color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 20px center;
  background-size: 24px 24px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
}

.search-input.is-compact {
  height: 36px;
  padding: 8px 12px 8px 38px;
  font-size: 0.92rem;
  border-radius: 10px;
  background-position: 14px center;
  background-size: 18px 18px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28);
}

.search-input:focus {
  outline: none;
  background-color: var(--panel-strong);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364ff00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  box-shadow:
    0 0 0 1px rgba(100, 255, 0, 0.35),
    0 0 18px rgba(100, 255, 0, 0.16);
}

.search-input:focus::placeholder {
  color: transparent;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:not(:focus):placeholder-shown {
  color: var(--muted);
}

.search-input.guild-selected-alliance {
  color: #6db6ff;
}

.search-input.guild-selected-horde {
  color: #ff7f7f;
}

.guild-locked-tick {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #7fe27f;
  font-size: 1rem;
  font-weight: 700;
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #141414;
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow: auto;
  z-index: 5;
}

.topbar-search .search-results {
  z-index: 20;
}

.search-result {
  padding: 10px 12px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-result-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-kind {
  flex: 0 0 auto;
  color: rgba(233, 233, 233, 0.55);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.search-result a {
  color: inherit;
  text-decoration: none;
}

.guild-link {
  color: var(--text);
  text-decoration: none;
}

.guild-link:hover {
  text-decoration: underline;
}

.search-result:hover {
  background: rgba(255, 255, 255, 0.04);
}

.search-result.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.search-result.guild-result-alliance {
  color: #6db6ff;
}

.search-result.guild-result-horde {
  color: #ff7f7f;
}

.search-result.player-result-druid {
  color: #ff7d0a;
}

.search-result.player-result-hunter {
  color: #aad372;
}

.search-result.player-result-mage {
  color: #3fc7eb;
}

.search-result.player-result-paladin {
  color: #f58cba;
}

.search-result.player-result-priest {
  color: #f0ebe0;
}

.search-result.player-result-rogue {
  color: #fff468;
}

.search-result.player-result-shaman {
  color: #0070de;
}

.search-result.player-result-warlock {
  color: #8788ee;
}

.search-result.player-result-warrior {
  color: #c79c6e;
}

.search-result.player-result-unknown {
  color: rgba(233, 233, 233, 0.78);
}

.upload-label {
  height: 36px;
  padding: 0 16px;
  background: #2b2b2b;
  color: #cfcfcf;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.upload-label:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  background: #3a3a3a;
}

.upload-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
}

.upload-icon svg {
  width: 14px;
  height: 14px;
}

input[type="file"] {
  display: none;
}

.status {
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-status {
  color: #ff7f7f;
  text-align: center;
}

.inline-error {
  font-size: 0.85rem;
  color: #ff5a5a;
  white-space: nowrap;
}

button.top-action.is-loading {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(220, 220, 220, 0.62);
  border-color: rgba(255, 255, 255, 0.14);
  opacity: 0.9;
  cursor: progress;
}

button.top-action.is-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(220, 220, 220, 0.35);
  border-top-color: rgba(220, 220, 220, 0.85);
  animation: uploadSpin 700ms linear infinite;
}

@keyframes uploadSpin {
  to {
    transform: rotate(360deg);
  }
}

button.top-action.is-loading:hover,
button.top-action.is-loading:active,
button.top-action.is-loading:focus,
button.top-action.is-loading:focus-visible,
button.top-action:disabled:hover,
button.top-action:disabled:active,
button.top-action:disabled:focus,
button.top-action:disabled:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(220, 220, 220, 0.62);
  border-color: rgba(255, 255, 255, 0.14);
  transform: none;
  box-shadow: none;
}

.layout {
  margin-top: 0;
  display: grid;
  gap: var(--section-gap);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  border: none;
  padding: 20px 22px 24px;
  box-shadow: var(--shadow);
  animation: fadeIn 0.45s ease-out;
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .panel {
    background: rgba(0, 0, 0, 0.78);
  }
  .hero {
    background: transparent;
  }
  .upload-bar {
    background: transparent;
  }
}

/* Mobile performance fallback:
   reduce scroll-time repaint/compositing cost from heavy blur + fixed layers. */
@media (hover: none) and (pointer: coarse) {
  body::before {
    display: none;
  }

  body {
    background:
      radial-gradient(900px 520px at 82% 28%, rgba(121, 210, 199, 0.10), transparent 64%),
      radial-gradient(1200px 800px at 50% 85%, rgba(0, 0, 0, 0.40), rgba(0, 0, 0, 0.70)),
      linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.58)),
      url("karazhan.jpg") left top / cover no-repeat,
      #0a0a0a;
    background-attachment: scroll;
  }

  .panel,
  .upload-bar,
  .top-action,
  .countdown-box {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .panel {
    background: rgba(18, 14, 8, 0.84);
  }

  .panel,
  .upload-bar,
  .top-action,
  .countdown-box,
  .character-hero-avatar {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.32);
  }
}

.summary {
  padding-bottom: 20px;
  padding-top: 20px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-header h2 {
  margin: 0;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--panel-heading);
}

.stacked .panel + .panel {
  margin-top: var(--section-gap);
}

.leaderboard-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

#leaderboardRules {
  text-align: center;
  margin-bottom: 22px;
}

.leaderboard-button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0a0a;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

a.leaderboard-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.leaderboard-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.leaderboard-button.is-active {
  background: rgba(100, 255, 0, 0.12);
  color: var(--accent);
  border-color: rgba(100, 255, 0, 0.35);
}

.is-hidden {
  display: none !important;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

#createGuildForm .button-row {
  justify-content: center;
}

#createGuildForm .field input,
#createGuildForm .field select {
  font-size: 0.9rem;
}

#createGuildForm .action-button {
  font-size: 0.82rem;
  padding: 8px 14px;
}

#joinGuildForm .field input,
#joinGuildForm .field select {
  font-size: 0.9rem;
}

#joinGuildForm .button-row {
  justify-content: center;
}

#joinGuildForm .action-button {
  font-size: 0.82rem;
  padding: 8px 14px;
}

#loginBtn,
#registerBtn {
  font-size: 0.82rem;
  padding: 8px 14px;
}

#loginFormGrid .button-row,
#signupFormGrid .button-row {
  justify-content: center;
}

#authEmail,
#authUsername,
#authPassword,
#authConfirmPassword {
  font-size: 0.9rem;
}

.mode-button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0a0a;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mode-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
}

.mode-icon svg {
  width: 14px;
  height: 14px;
}

.mode-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.mode-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #0a0a0a;
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.05);
}

.mode-button.is-active {
  background: rgba(100, 255, 0, 0.12);
  color: var(--accent);
  border-color: rgba(100, 255, 0, 0.35);
}

.summary {
  grid-column: span 2;
}

.full-row {
  grid-column: 1 / -1;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.card {
  background: rgba(10, 10, 10, 0.8);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
}

.card p {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.players-title-link {
  appearance: none;
  background: none;
  border: none;
  color: var(--panel-heading);
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: inherit;
  padding: 0;
}

.players-title-link:hover {
  text-decoration: underline;
}

.players-title-sep {
  color: var(--muted);
  margin: 0 6px;
}

.players-title-current {
  color: var(--text);
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: inherit;
}

.players-title-current-link {
  text-decoration: none;
}

.players-title-current-link:hover {
  text-decoration: underline;
}

.players-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.players-view-toggle-btn {
  appearance: none;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 5px 10px;
  text-transform: uppercase;
}

.players-view-toggle-btn:hover {
  color: var(--text);
}

.players-view-toggle-btn.is-active {
  background: rgba(100, 255, 0, 0.12);
  color: var(--accent);
}

.fight-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.summary .panel-header {
  align-items: center;
  margin-bottom: 0;
}

select {
  background: rgba(28, 28, 28, 0.9);
  color: #c2c2c2;
  border: none;
  border-radius: 8px;
  padding: 10px 40px 10px 12px;
  font-size: 0.95rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%239b9b9b' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* Encounter dropdown (Parse/Home fight selector) */
.fight-selector select {
  background: rgba(20, 20, 20, 0.35);
  color: rgba(233, 233, 233, 0.9);
  border: none;
  border-radius: 12px;
  padding: 12px 44px 12px 14px;
  font-size: 1rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%238c8c8c' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.fight-selector select:focus {
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2364ff00' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow:
    0 0 0 1px rgba(100, 255, 0, 0.30),
    0 0 18px rgba(100, 255, 0, 0.14),
    0 10px 20px rgba(0, 0, 0, 0.35);
}

/* Best-effort styling for the opened option list (browser support varies). */
.fight-selector select option {
  background-color: rgba(0, 0, 0, 0.95);
  color: rgba(233, 233, 233, 0.9);
}

.chart-shell {
  position: relative;
  height: 280px;
}

.charts canvas {
  width: 100% !important;
  height: 100% !important;
  cursor: crosshair;
}


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

.table-wrap a {
  color: var(--text);
  text-decoration: none;
}

.table-wrap a:hover {
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

#playersTable {
  table-layout: auto;
}

#enemiesTable {
  table-layout: auto;
}

#playersTable.mode-damage-done,
#playersTable.mode-damage-taken,
#playersTable.mode-healing,
#enemiesTable.mode-damage-done,
#enemiesTable.mode-damage-taken,
#enemiesTable.mode-healing {
  table-layout: fixed;
}

#playersTable.mode-events {
  table-layout: fixed;
}

#playersTable.mode-ability-stats {
  table-layout: fixed;
}

#playersTable.mode-ability-stats-healing {
  table-layout: fixed;
}

#enemiesTable.mode-ability-stats {
  table-layout: fixed;
}

#enemiesTable.mode-ability-stats-healing {
  table-layout: fixed;
}

#enemiesTable.mode-events {
  table-layout: fixed;
}

#playersTable.mode-damage-done th:first-child,
#playersTable.mode-damage-done td:first-child,
#playersTable.mode-damage-taken th:first-child,
#playersTable.mode-damage-taken td:first-child,
#playersTable.mode-healing th:first-child,
#playersTable.mode-healing td:first-child,
#enemiesTable.mode-damage-done th:first-child,
#enemiesTable.mode-damage-done td:first-child,
#enemiesTable.mode-damage-taken th:first-child,
#enemiesTable.mode-damage-taken td:first-child,
#enemiesTable.mode-healing th:first-child,
#enemiesTable.mode-healing td:first-child {
  width: 25%;
}

#playersTable.mode-damage-done th:nth-child(2),
#playersTable.mode-damage-done td:nth-child(2),
#playersTable.mode-damage-taken th:nth-child(2),
#playersTable.mode-damage-taken td:nth-child(2),
#playersTable.mode-healing th:nth-child(2),
#playersTable.mode-healing td:nth-child(2),
#enemiesTable.mode-damage-done th:nth-child(2),
#enemiesTable.mode-damage-done td:nth-child(2),
#enemiesTable.mode-damage-taken th:nth-child(2),
#enemiesTable.mode-damage-taken td:nth-child(2),
#enemiesTable.mode-healing th:nth-child(2),
#enemiesTable.mode-healing td:nth-child(2) {
  width: 65%;
}

#playersTable.mode-damage-done th:nth-child(3),
#playersTable.mode-damage-done td:nth-child(3),
#playersTable.mode-damage-taken th:nth-child(3),
#playersTable.mode-damage-taken td:nth-child(3),
#playersTable.mode-healing th:nth-child(3),
#playersTable.mode-healing td:nth-child(3),
#enemiesTable.mode-damage-done th:nth-child(3),
#enemiesTable.mode-damage-done td:nth-child(3),
#enemiesTable.mode-damage-taken th:nth-child(3),
#enemiesTable.mode-damage-taken td:nth-child(3),
#enemiesTable.mode-healing th:nth-child(3),
#enemiesTable.mode-healing td:nth-child(3) {
  width: 10%;
}

#playersTable.mode-events th:nth-child(1),
#playersTable.mode-events td:nth-child(1) {
  width: 96px;
  text-align: right;
  white-space: nowrap;
}

#enemiesTable.mode-events th:nth-child(1),
#enemiesTable.mode-events td:nth-child(1) {
  width: 96px;
  text-align: right;
  white-space: nowrap;
}

#playersTable.mode-events th:nth-child(2),
#playersTable.mode-events td:nth-child(2) {
  text-align: left;
}

#playersTable.mode-ability-stats th:nth-child(1),
#playersTable.mode-ability-stats td:nth-child(1) {
  width: 20% !important;
}

#enemiesTable.mode-ability-stats th:nth-child(1),
#enemiesTable.mode-ability-stats td:nth-child(1) {
  width: 20% !important;
}

#playersTable.mode-ability-stats thead tr th:nth-child(1) {
  text-align: left !important;
  padding-left: 0 !important;
}

#enemiesTable.mode-ability-stats thead tr th:nth-child(1) {
  text-align: left !important;
  padding-left: 0 !important;
}

#playersTable.mode-ability-stats th:nth-child(2),
#playersTable.mode-ability-stats td:nth-child(2) {
  width: 40% !important;
}

#enemiesTable.mode-ability-stats th:nth-child(2),
#enemiesTable.mode-ability-stats td:nth-child(2) {
  width: 40% !important;
}

#playersTable.mode-ability-stats th:nth-child(3),
#playersTable.mode-ability-stats td:nth-child(3),
#playersTable.mode-ability-stats th:nth-child(4),
#playersTable.mode-ability-stats td:nth-child(4),
#playersTable.mode-ability-stats th:nth-child(5),
#playersTable.mode-ability-stats td:nth-child(5),
#playersTable.mode-ability-stats th:nth-child(6),
#playersTable.mode-ability-stats td:nth-child(6) {
  width: 10% !important;
}

#enemiesTable.mode-ability-stats th:nth-child(3),
#enemiesTable.mode-ability-stats td:nth-child(3),
#enemiesTable.mode-ability-stats th:nth-child(4),
#enemiesTable.mode-ability-stats td:nth-child(4),
#enemiesTable.mode-ability-stats th:nth-child(5),
#enemiesTable.mode-ability-stats td:nth-child(5),
#enemiesTable.mode-ability-stats th:nth-child(6),
#enemiesTable.mode-ability-stats td:nth-child(6) {
  width: 10% !important;
}

#playersTable.mode-ability-stats thead tr th:nth-child(3),
#playersTable.mode-ability-stats thead tr th:nth-child(4),
#playersTable.mode-ability-stats thead tr th:nth-child(5),
#playersTable.mode-ability-stats thead tr th:nth-child(6) {
  text-align: right !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

#playersTable.mode-ability-stats-healing th:nth-child(1),
#playersTable.mode-ability-stats-healing td:nth-child(1),
#enemiesTable.mode-ability-stats-healing th:nth-child(1),
#enemiesTable.mode-ability-stats-healing td:nth-child(1) {
  width: 20% !important;
}

#playersTable.mode-ability-stats-healing thead tr th:nth-child(1),
#enemiesTable.mode-ability-stats-healing thead tr th:nth-child(1) {
  text-align: left !important;
  padding-left: 0 !important;
}

#playersTable.mode-ability-stats-healing th:nth-child(2),
#playersTable.mode-ability-stats-healing td:nth-child(2),
#enemiesTable.mode-ability-stats-healing th:nth-child(2),
#enemiesTable.mode-ability-stats-healing td:nth-child(2) {
  width: 40% !important;
}

#playersTable.mode-ability-stats-healing th:nth-child(3),
#playersTable.mode-ability-stats-healing td:nth-child(3),
#playersTable.mode-ability-stats-healing th:nth-child(4),
#playersTable.mode-ability-stats-healing td:nth-child(4),
#playersTable.mode-ability-stats-healing th:nth-child(5),
#playersTable.mode-ability-stats-healing td:nth-child(5),
#enemiesTable.mode-ability-stats-healing th:nth-child(3),
#enemiesTable.mode-ability-stats-healing td:nth-child(3),
#enemiesTable.mode-ability-stats-healing th:nth-child(4),
#enemiesTable.mode-ability-stats-healing td:nth-child(4),
#enemiesTable.mode-ability-stats-healing th:nth-child(5),
#enemiesTable.mode-ability-stats-healing td:nth-child(5) {
  width: 13.3333% !important;
}

#playersTable.mode-ability-stats-healing thead tr th:nth-child(3),
#playersTable.mode-ability-stats-healing thead tr th:nth-child(4),
#playersTable.mode-ability-stats-healing thead tr th:nth-child(5),
#enemiesTable.mode-ability-stats-healing thead tr th:nth-child(3),
#enemiesTable.mode-ability-stats-healing thead tr th:nth-child(4),
#enemiesTable.mode-ability-stats-healing thead tr th:nth-child(5) {
  text-align: right !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

#enemiesTable.mode-ability-stats thead tr th:nth-child(3),
#enemiesTable.mode-ability-stats thead tr th:nth-child(4),
#enemiesTable.mode-ability-stats thead tr th:nth-child(5),
#enemiesTable.mode-ability-stats thead tr th:nth-child(6) {
  text-align: right !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

#enemiesTable.mode-events th:nth-child(2),
#enemiesTable.mode-events td:nth-child(2) {
  text-align: left;
}

thead th {
  text-align: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  padding-bottom: 10px;
  padding-right: 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
  cursor: pointer;
}

#recentLogsTable thead th:first-child {
  text-align: left;
}

#recentLogsTable th:nth-child(1),
#recentLogsTable td:nth-child(1) {
  width: 50%;
}

#recentLogsTable th:nth-child(2),
#recentLogsTable td:nth-child(2),
#recentLogsTable th:nth-child(3),
#recentLogsTable td:nth-child(3) {
  width: 25%;
}

#recentLogsTable tbody td:nth-child(3) {
  text-align: center;
}

#recentLogsTable tbody td:nth-child(2) {
  text-align: center;
}

#recentLogsTable thead th:nth-child(2),
#recentLogsTable thead th:nth-child(3) {
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

#recentLogsTable .recent-uploader-link {
  color: var(--accent);
  text-decoration: none;
}

#recentLogsTable .recent-uploader-link:hover {
  text-decoration: underline;
}

.recent-uploader-unknown {
  color: var(--muted);
}

#playersTable td:nth-child(n + 2) {
  text-align: right;
}

#enemiesTable td:nth-child(n + 2) {
  text-align: right;
}

#playersTable.mode-events td:nth-child(n + 2) {
  text-align: left;
}

#enemiesTable.mode-events td:nth-child(n + 2) {
  text-align: left;
}

.event-row td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.event-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.timeline-range-label {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-range-label.is-active {
  color: var(--text);
  cursor: pointer;
}

.timeline-range-label.is-active:hover,
.timeline-range-label.is-active:focus-visible {
  color: #fff;
}

.timeline-range-clear {
  display: inline-block;
  margin-right: 3px;
  font-size: 1.15em;
  opacity: 0.75;
}

.event-token-muted {
  color: var(--muted);
}

.event-token-name,
.event-token-ability,
.event-token-value {
  color: var(--text);
}

.ability-expand {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ability-row {
  cursor: pointer;
}

.ability-row:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.ability-expand-caret {
  color: var(--muted);
  width: 10px;
  text-align: center;
}

.ability-row.is-expanded .ability-expand-caret {
  color: var(--accent);
}

.ability-target-row td {
  background: rgba(0, 0, 0, 0.5);
}

.ability-target-name {
  padding-left: 22px;
}

.ability-target-prefix {
  color: var(--muted);
  margin-right: 8px;
}

.ability-target-muted-text {
  color: var(--text);
  opacity: 0.75;
}

.ability-target-row .ability-target-prefix {
  color: var(--text);
  opacity: 0.75;
}

.ability-target-row .damage-percent,
.ability-target-row .damage-value {
  color: var(--text);
  opacity: 0.75;
}

.ability-target-row .damage-bar-fill {
  opacity: 0.75;
}

#leaderboardTable tbody td:nth-child(4),
#leaderboardTable tbody td:nth-child(5) {
  text-align: right;
}

#leaderboardTable tbody td:nth-child(3),
#leaderboardTable tbody td:nth-child(4) {
  text-align: center;
}


/* Profile logs table layout: avoid horizontal scroll; weight space to name. */
#profileRunsPanel .table-wrap {
  overflow-x: hidden;
}

#myRuns {
  table-layout: fixed;
}

#myRuns th:nth-child(1),
#myRuns td:nth-child(1) {
  width: 50%;
}

#myRuns thead th:nth-child(1) {
  text-align: left;
}

#myRuns th:nth-child(2),
#myRuns td:nth-child(2) {
  width: 25%;
  white-space: nowrap;
  text-align: center;
}

#myRuns th:nth-child(3),
#myRuns td:nth-child(3) {
  width: 25%;
  text-align: right;
  white-space: nowrap;
}

#myRuns td:nth-child(1) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#myRuns td:nth-child(1) a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

#userRuns {
  table-layout: fixed;
}

#userRuns th:nth-child(1),
#userRuns td:nth-child(1) {
  width: 75%;
}

#userRuns thead th:nth-child(1) {
  text-align: left;
}

#userRuns th:nth-child(2),
#userRuns td:nth-child(2) {
  width: 25%;
  white-space: nowrap;
  text-align: center;
}

#userRuns td:nth-child(1) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#userRuns td:nth-child(1) a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

/* Profile guilds table: center align all columns. */
#myGuilds th,
#myGuilds td {
  text-align: center;
}

#myGuilds thead th:nth-child(1),
#myGuilds tbody td:nth-child(1) {
  text-align: left;
}

#myGuilds {
  table-layout: fixed;
}

#myGuilds th:nth-child(1),
#myGuilds td:nth-child(1) {
  width: 38%;
}

#myGuilds th:nth-child(2),
#myGuilds td:nth-child(2) {
  width: 24%;
}

#myGuilds th:nth-child(3),
#myGuilds td:nth-child(3) {
  width: 14%;
}

#myGuilds th:nth-child(4),
#myGuilds td:nth-child(4) {
  width: 24%;
}

#myGuilds thead th {
  padding-left: 10px;
  padding-right: 10px;
}

#myGuilds tbody td {
  padding-left: 10px;
  padding-right: 10px;
}

.action-button.is-small {
  padding: 6px 10px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
}

.join-code-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.guild-owner-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

#guildOwnerActionsPanel {
  padding-top: 12px;
  padding-bottom: 12px;
}

.copy-toast {
  position: fixed;
  z-index: 40;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(242, 239, 230, 0.92);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 140ms ease, transform 140ms ease;
  box-shadow: 0 18px 26px rgba(0, 0, 0, 0.38);
}

.copy-toast.is-shown {
  opacity: 1;
  transform: translateY(0);
}

/* Character logs table: 75/25 split for Log/Uploaded. */
#characterLogs {
  table-layout: fixed;
}

#characterLogs th:nth-child(1),
#characterLogs td:nth-child(1) {
  width: 75%;
}

#characterLogs thead th:nth-child(1) {
  text-align: left;
}

#characterLogs th:nth-child(2),
#characterLogs td:nth-child(2) {
  width: 25%;
  white-space: nowrap;
  text-align: center;
}

#characterLogs td:nth-child(1) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#characterLogs td:nth-child(1) a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

#guildLogs th:nth-child(2),
#guildLogs td:nth-child(2),
#guildLogs th:nth-child(3),
#guildLogs td:nth-child(3) {
  text-align: right;
}

#characterRaids th:nth-child(2),
#characterRaids td:nth-child(2),
#characterRaids th:nth-child(3),
#characterRaids td:nth-child(3) {
  text-align: right;
}

#guildRaids th:nth-child(2),
#guildRaids td:nth-child(2),
#guildRaids th:nth-child(3),
#guildRaids td:nth-child(3) {
  text-align: right;
}

#leaderboardTable {
  table-layout: fixed;
}

#leaderboardTable thead th {
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
}

#leaderboardTable thead th:first-child {
  padding-left: 2px;
  padding-right: 2px;
}

#leaderboardTable thead th:nth-child(5) {
  text-align: right;
}


/* Guild logs table: align key headers. */
#guildLogs thead th:nth-child(1) {
  text-align: left;
}

#guildLogs thead th:nth-child(3) {
  text-align: right;
}

#leaderboardTable th:first-child,
#leaderboardTable td:first-child {
  width: 50px;
  text-align: center;
  padding-left: 2px;
  padding-right: 2px;
  white-space: nowrap;
  overflow: hidden;
}

#leaderboardTable th:nth-child(3),
#leaderboardTable td:nth-child(3) {
  width: 140px;
  white-space: nowrap;
}

#leaderboardTable th:nth-child(4),
#leaderboardTable td:nth-child(4) {
  width: 230px;
  white-space: nowrap;
}

#leaderboardTable th:nth-child(5),
#leaderboardTable td:nth-child(5) {
  width: 150px;
  white-space: nowrap;
}

#leaderboardTable th:nth-child(4),
#leaderboardTable td:nth-child(4),
#leaderboardTable th:nth-child(5),
#leaderboardTable td:nth-child(5) {
  white-space: nowrap;
}

.damage-cell {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 16%;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.damage-percent {
  color: var(--text);
  font-size: 0.78rem;
  text-align: right;
}

.damage-bar {
  position: relative;
  height: 8px;
  background: transparent;
  border-radius: 999px;
  overflow: hidden;
}

.damage-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
}

.damage-value {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
  justify-self: stretch;
  min-width: 0;
}

thead th.sorted::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

thead th.sorted.asc::after {
  border-bottom: 6px solid var(--accent-2);
}

thead th.sorted.desc::after {
  border-top: 6px solid var(--accent);
}

tbody tr {
  transition: background 0.2s ease;
  cursor: pointer;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}


tbody td {
  padding: 10px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}


.legend {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.legend-dot.damage {
  background: var(--accent);
}

.legend-dot.heal {
  background: var(--accent-2);
}

.selected {
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  body {
    padding: 12px 16px 22px;
  }

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

  .summary,
  .full-row {
    grid-column: 1;
  }

  .panel {
    padding: 16px 14px 18px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 6px;
  }

  .upload-layout {
    margin-top: 1.1rem;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 320px;
  }

  .panel-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
  }

  .fight-selector {
    width: 100%;
  }

  .fight-selector select {
    width: 100%;
  }

  #parseLoadedBar {
    align-items: stretch;
    gap: 12px;
  }

  .loaded-bar-left,
  .loaded-bar-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .loaded-bar-right {
    justify-content: flex-start;
  }

  .upload-inline-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  .search-wrap.topbar-search {
    min-width: 0;
  }

  .button-row {
    justify-content: flex-start;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  body {
    padding: 10px 10px 18px;
  }

  .upload-bar {
    margin-bottom: 18px;
  }

  .top-actions {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .upload-bar.has-center-search .top-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .top-action {
    height: 34px;
    padding: 0 11px;
    font-size: 0.84rem;
  }

  button.top-action {
    font-size: 0.84rem;
  }

  .panel-header h2 {
    font-size: 1rem;
    letter-spacing: 0.04em;
  }

  .countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
    gap: 6px;
  }

  .countdown-box {
    padding: 8px 6px;
    border-radius: 10px;
  }

  .countdown-value {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
  }

  .countdown-unit {
    font-size: 0.56rem;
    letter-spacing: 0.14em;
  }

  .leaderboard-tabs {
    gap: 6px;
    margin-bottom: 18px;
    flex-wrap: nowrap;
  }

  .leaderboard-button {
    padding: 6px 8px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    border-radius: 7px;
    white-space: nowrap;
  }

  .action-button {
    padding: 6px 10px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    border-radius: 7px;
  }

  .action-button.is-small {
    padding: 5px 8px;
    font-size: 0.68rem;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .card {
    padding: 12px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    font-size: 0.84rem;
  }

  #playersTable {
    min-width: 0;
    table-layout: fixed;
  }

  #playersTable thead th {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    padding-left: 4px;
    padding-right: 4px;
  }

  #playersTable tbody td {
    font-size: 0.72rem;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  #playersTable.mode-damage-done th:first-child,
  #playersTable.mode-damage-done td:first-child,
  #playersTable.mode-damage-taken th:first-child,
  #playersTable.mode-damage-taken td:first-child,
  #playersTable.mode-healing th:first-child,
  #playersTable.mode-healing td:first-child {
    width: 30%;
  }

  #playersTable.mode-damage-done th:nth-child(2),
  #playersTable.mode-damage-done td:nth-child(2),
  #playersTable.mode-damage-taken th:nth-child(2),
  #playersTable.mode-damage-taken td:nth-child(2),
  #playersTable.mode-healing th:nth-child(2),
  #playersTable.mode-healing td:nth-child(2) {
    width: 56%;
  }

  #playersTable.mode-damage-done th:nth-child(3),
  #playersTable.mode-damage-done td:nth-child(3),
  #playersTable.mode-damage-taken th:nth-child(3),
  #playersTable.mode-damage-taken td:nth-child(3),
  #playersTable.mode-healing th:nth-child(3),
  #playersTable.mode-healing td:nth-child(3) {
    width: 14%;
  }

  #playersTable.mode-ability-stats th:nth-child(1),
  #playersTable.mode-ability-stats td:nth-child(1) {
    width: 20% !important;
  }

  #enemiesTable.mode-ability-stats th:nth-child(1),
  #enemiesTable.mode-ability-stats td:nth-child(1) {
    width: 20% !important;
  }

  #playersTable.mode-ability-stats th:nth-child(2),
  #playersTable.mode-ability-stats td:nth-child(2) {
    width: 40% !important;
  }

  #enemiesTable.mode-ability-stats th:nth-child(2),
  #enemiesTable.mode-ability-stats td:nth-child(2) {
    width: 40% !important;
  }

  #playersTable.mode-ability-stats th:nth-child(3),
  #playersTable.mode-ability-stats td:nth-child(3),
  #playersTable.mode-ability-stats th:nth-child(4),
  #playersTable.mode-ability-stats td:nth-child(4),
  #playersTable.mode-ability-stats th:nth-child(5),
  #playersTable.mode-ability-stats td:nth-child(5),
  #playersTable.mode-ability-stats th:nth-child(6),
  #playersTable.mode-ability-stats td:nth-child(6) {
    width: 10% !important;
  }

  #enemiesTable.mode-ability-stats th:nth-child(3),
  #enemiesTable.mode-ability-stats td:nth-child(3),
  #enemiesTable.mode-ability-stats th:nth-child(4),
  #enemiesTable.mode-ability-stats td:nth-child(4),
  #enemiesTable.mode-ability-stats th:nth-child(5),
  #enemiesTable.mode-ability-stats td:nth-child(5),
  #enemiesTable.mode-ability-stats th:nth-child(6),
  #enemiesTable.mode-ability-stats td:nth-child(6) {
    width: 10% !important;
  }

  #playersTable.mode-ability-stats-healing th:nth-child(1),
  #playersTable.mode-ability-stats-healing td:nth-child(1),
  #enemiesTable.mode-ability-stats-healing th:nth-child(1),
  #enemiesTable.mode-ability-stats-healing td:nth-child(1) {
    width: 20% !important;
  }

  #playersTable.mode-ability-stats-healing th:nth-child(2),
  #playersTable.mode-ability-stats-healing td:nth-child(2),
  #enemiesTable.mode-ability-stats-healing th:nth-child(2),
  #enemiesTable.mode-ability-stats-healing td:nth-child(2) {
    width: 40% !important;
  }

  #playersTable.mode-ability-stats-healing th:nth-child(3),
  #playersTable.mode-ability-stats-healing td:nth-child(3),
  #playersTable.mode-ability-stats-healing th:nth-child(4),
  #playersTable.mode-ability-stats-healing td:nth-child(4),
  #playersTable.mode-ability-stats-healing th:nth-child(5),
  #playersTable.mode-ability-stats-healing td:nth-child(5),
  #enemiesTable.mode-ability-stats-healing th:nth-child(3),
  #enemiesTable.mode-ability-stats-healing td:nth-child(3),
  #enemiesTable.mode-ability-stats-healing th:nth-child(4),
  #enemiesTable.mode-ability-stats-healing td:nth-child(4),
  #enemiesTable.mode-ability-stats-healing th:nth-child(5),
  #enemiesTable.mode-ability-stats-healing td:nth-child(5) {
    width: 13.3333% !important;
  }

  #leaderboardTable {
    table-layout: auto;
  }

  #leaderboardTable thead th {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    padding-bottom: 8px;
    padding-left: 4px;
    padding-right: 4px;
  }

  #leaderboardTable tbody td {
    font-size: 0.74rem;
    padding: 8px 4px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #leaderboardTable th:first-child,
  #leaderboardTable td:first-child {
    width: 30px;
  }

  #leaderboardTable th:nth-child(2),
  #leaderboardTable td:nth-child(2) {
    width: auto;
  }

  #leaderboardTable th:nth-child(3),
  #leaderboardTable td:nth-child(3) {
    width: 64px;
  }

  #leaderboardTable th:nth-child(4),
  #leaderboardTable td:nth-child(4) {
    width: 86px;
    white-space: nowrap;
  }

  #leaderboardTable th:nth-child(5),
  #leaderboardTable td:nth-child(5) {
    width: 58px;
    white-space: nowrap;
  }

  #myRuns,
  #myGuilds,
  #userRuns,
  #characterLogs,
  #guildLogs,
  #characterRaids,
  #guildRaids {
    min-width: 0;
    table-layout: fixed;
  }

  #myRuns thead th,
  #myGuilds thead th,
  #userRuns thead th,
  #characterLogs thead th,
  #guildLogs thead th,
  #characterRaids thead th,
  #guildRaids thead th {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    padding-left: 4px;
    padding-right: 4px;
  }

  #myRuns tbody td,
  #myGuilds tbody td,
  #userRuns tbody td,
  #characterLogs tbody td,
  #guildLogs tbody td,
  #characterRaids tbody td,
  #guildRaids tbody td {
    padding: 8px 4px;
    font-size: 0.74rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #myRuns th:nth-child(1),
  #myRuns td:nth-child(1) {
    width: 52%;
  }

  #myRuns th:nth-child(2),
  #myRuns td:nth-child(2) {
    width: 74px;
    white-space: nowrap;
  }

  #myRuns th:nth-child(3),
  #myRuns td:nth-child(3) {
    width: 84px;
    white-space: nowrap;
  }

  #myRuns td:nth-child(1),
  #myRuns td:nth-child(1) a {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    line-height: 1.25;
  }

  #myGuilds th:nth-child(1),
  #myGuilds td:nth-child(1) {
    width: 28%;
  }

  #myGuilds th:nth-child(2),
  #myGuilds td:nth-child(2) {
    width: 26%;
  }

  #myGuilds th:nth-child(3),
  #myGuilds td:nth-child(3) {
    width: 16%;
  }

  #myGuilds th:nth-child(4),
  #myGuilds td:nth-child(4) {
    width: 30%;
  }

  #myGuilds td:nth-child(1) {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    line-height: 1.25;
  }

  #characterLogs th:nth-child(1),
  #characterLogs td:nth-child(1),
  #userRuns th:nth-child(1),
  #userRuns td:nth-child(1),
  #guildLogs th:nth-child(1),
  #guildLogs td:nth-child(1) {
    width: auto;
  }

  #characterLogs th:nth-child(2),
  #characterLogs td:nth-child(2),
  #userRuns th:nth-child(2),
  #userRuns td:nth-child(2),
  #guildLogs th:nth-child(2),
  #guildLogs td:nth-child(2) {
    width: 88px;
    white-space: nowrap;
    text-align: center;
  }

  #guildLogs th:nth-child(3),
  #guildLogs td:nth-child(3) {
    width: 58px;
    white-space: nowrap;
    text-align: right;
  }

  #guildLogs thead th,
  #guildRaids thead th {
    font-size: 0.58rem;
    letter-spacing: 0.06em;
  }

  #guildLogs tbody td,
  #guildRaids tbody td {
    font-size: 0.72rem;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  #guildLogs th:nth-child(1),
  #guildLogs td:nth-child(1) {
    width: 44%;
  }

  #guildLogs th:nth-child(2),
  #guildLogs td:nth-child(2) {
    width: 34%;
  }

  #guildLogs td:nth-child(1) {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    line-height: 1.2;
  }

  #guildRaids th:nth-child(1),
  #guildRaids td:nth-child(1) {
    width: 44%;
  }

  #guildRaids th:nth-child(2),
  #guildRaids td:nth-child(2) {
    width: 28%;
    text-align: center;
  }

  #guildRaids th:nth-child(3),
  #guildRaids td:nth-child(3) {
    width: 28%;
    text-align: right;
  }

  #characterRaids th:nth-child(1),
  #characterRaids td:nth-child(1),
  #guildRaids th:nth-child(1),
  #guildRaids td:nth-child(1) {
    width: auto;
  }

  #characterRaids th:nth-child(2),
  #characterRaids td:nth-child(2),
  #guildRaids th:nth-child(2),
  #guildRaids td:nth-child(2) {
    width: 66px;
    white-space: nowrap;
    text-align: center;
  }

  #characterRaids th:nth-child(3),
  #characterRaids td:nth-child(3),
  #guildRaids th:nth-child(3),
  #guildRaids td:nth-child(3) {
    width: 58px;
    white-space: nowrap;
    text-align: right;
  }

  .damage-cell {
    grid-template-columns: 34px minmax(0, 1fr) 18%;
    gap: 5px;
  }

  .damage-percent,
  .damage-value {
    font-size: 0.72rem;
  }

  .mode-button {
    padding: 5px 9px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .panel.full-row.requires-log .button-row {
    justify-content: center;
  }

  .upload-dropzone {
    padding: 0.72rem 0.78rem;
    font-size: 0.86rem;
  }

  .log-name-label,
  .duplicate-notice,
  .duplicate-text,
  .duplicate-link {
    font-size: 0.86rem;
  }

  .chart-shell {
    height: 220px;
  }
}
