:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(238, 243, 248, 0.9);
  --text: #17202c;
  --muted: #607086;
  --line: #dce4ee;
  --accent: #1f7a8c;
  --accent-strong: #155e6c;
  --gold: #b17818;
  --danger: #a63d40;
  --shadow: 0 18px 44px rgba(27, 44, 67, 0.12);
  --top-gradient: linear-gradient(180deg, rgba(31, 122, 140, 0.08), transparent 340px);
  --head-gradient: linear-gradient(135deg, #ecf7f9, #fffaf1);
  --hover: #f4fbfd;
  --input-bg: rgba(251, 253, 255, 0.88);
  --metric-bg: rgba(238, 248, 250, 0.88);
  --fallback-bg: linear-gradient(135deg, #ffffff, #edf7f9);
  --bg-image: url("assets/ragnarok-bg.webp");
  --bg-overlay: linear-gradient(180deg, rgba(246, 250, 253, 0.34), rgba(235, 244, 248, 0.52));
  --bg-scrim: rgba(255, 255, 255, 0.18);
  --panel-alpha: 0.88;
}

.skill-planner-page .app {
  max-width: 1480px;
}

.skill-topbar .mode-toggle a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.skill-topbar .mode-toggle a.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent-strong);
}

.skill-planner-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.class-picker {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow-soft);
  padding: 10px 12px;
}

.class-picker-head {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-bottom: 0;
}

.class-picker-head label {
  display: grid;
  min-width: 210px;
  gap: 4px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.class-picker-head select {
  min-height: 38px;
  border: 2px solid color-mix(in srgb, var(--accent) 76%, var(--line));
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 10px;
  font: inherit;
  font-weight: 800;
}

.class-picker-head p {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.class-picker-toggle {
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  color: var(--accent-strong);
  padding: 0 14px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.class-card-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.class-picker.open .class-card-grid {
  display: grid;
}

.class-card {
  position: relative;
  aspect-ratio: 157 / 195;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #433e5a;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.class-card:hover,
.class-card.selected {
  transform: translateY(-2px);
  filter: saturate(1.08);
}

.class-card.locked {
  cursor: default;
  filter: grayscale(0.8);
  opacity: 0.72;
}

.class-card-frame,
.class-card-char {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.class-card-char {
  object-fit: cover;
  transform: translateY(-8%);
}

.class-card-icon {
  position: absolute;
  top: 8%;
  right: 5%;
  width: 25px;
  height: 25px;
  pointer-events: none;
  image-rendering: pixelated;
}

.class-card span {
  position: absolute;
  left: 50%;
  bottom: 7%;
  width: 78%;
  transform: translateX(-50%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.compact-job-select {
  display: none !important;
}

.skill-sidebar,
.skill-board-wrap,
.skill-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: var(--shadow-soft);
}

.skill-sidebar {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.skill-sidebar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.skill-sidebar input,
.skill-sidebar select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input);
  color: var(--text);
  padding: 0 10px;
  font: inherit;
  text-transform: none;
}

.skill-point-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-2) 80%, transparent);
}

.skill-point-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.skill-point-box strong {
  font-size: 22px;
}

.skill-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.skill-actions button,
.planner-detail-level button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.skill-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.skill-board-wrap {
  min-width: 0;
  overflow: hidden;
}

.skill-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.skill-board-head h2,
.planner-detail-head h2 {
  margin: 0;
  line-height: 1.1;
}

.skill-board-head p,
.planner-detail-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.skill-toast {
  padding: 8px 10px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 13px;
}

.skill-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(172px, 1fr));
  gap: 10px;
  padding: 14px;
}

.planner-skill {
  margin-left: calc(var(--skill-depth, 0) * 10px);
  min-height: 74px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-2) 88%, transparent);
  color: var(--text);
  padding: 8px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.planner-skill:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.planner-skill.learned {
  background: color-mix(in srgb, var(--accent) 16%, var(--panel-2));
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
}

.planner-skill.locked:not(.learned) {
  opacity: 0.58;
}

.planner-skill.selected {
  outline: 2px solid color-mix(in srgb, var(--accent) 68%, transparent);
  outline-offset: 1px;
}

.planner-skill-icon,
.planner-detail-icon {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--input) 90%, transparent);
  overflow: hidden;
}

.planner-skill-icon img,
.planner-detail-icon img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

.planner-skill-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.planner-skill-main strong,
.planner-skill-main small,
.planner-skill-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-skill-main strong {
  font-size: 13px;
}

.planner-skill-main small,
.planner-skill-main em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.planner-skill-level {
  min-width: 42px;
  padding: 4px 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  text-align: center;
  font-weight: 900;
  font-size: 12px;
}

.skill-detail-card {
  position: sticky;
  top: 12px;
  padding: 14px;
}

.planner-detail-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.planner-detail-level {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
  align-items: center;
  margin: 14px 0;
}

.planner-detail-level strong {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input);
  font-size: 18px;
}

.planner-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}

.planner-detail-meta div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.planner-detail-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.planner-detail-meta dd {
  margin: 3px 0 0;
  font-weight: 800;
}

.skill-detail-card h3 {
  margin: 14px 0 8px;
  color: var(--accent-strong);
  font-size: 14px;
}

.planner-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.planner-chip-list span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-2) 85%, transparent);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .skill-planner-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .skill-detail-card {
    grid-column: 1 / -1;
    position: static;
  }

  .skill-board {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
}

@media (max-width: 760px) {
  .skill-planner-shell {
    grid-template-columns: 1fr;
  }

  .skill-sidebar,
  .skill-detail-card {
    position: static;
  }

  .skill-board {
    grid-template-columns: 1fr;
  }

  .planner-skill {
    margin-left: 0;
  }

  .skill-board-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.skill-planner-page .skill-planner-shell {
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #5663a4;
}

.skill-planner-page .skill-sidebar {
  position: static;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, auto) auto auto auto;
  align-items: end;
  gap: 10px;
  padding: 10px;
}

.skill-planner-page .skill-help,
.skill-planner-page .skill-point-box:nth-of-type(2) {
  display: none;
}

.skill-planner-page .skill-actions {
  min-width: 210px;
}

.skill-tooltip-toggle {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.skill-tooltip-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.skill-planner-page .skill-point-box {
  min-width: 150px;
  min-height: 38px;
  padding: 7px 10px;
}

.skill-planner-page .skill-point-box strong {
  font-size: 18px;
}

.skill-planner-page .skill-board-wrap {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.skill-planner-page .skill-board-head {
  display: none;
}

.skill-planner-page .skill-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 0;
}

.skill-tree-panel {
  min-width: 0;
  min-height: 0;
  border: 1px solid #b7bfd5;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
  color: #161b24;
  box-shadow: 0 2px 5px rgba(20, 25, 55, 0.2);
  padding: 7px 9px 9px;
}

.skill-tree-panel h3 {
  margin: 0 0 5px;
  text-align: center;
  font-size: 15px;
  line-height: 1.1;
  font-weight: 700;
}

.skill-tree-panel h3 span {
  font-size: 13px;
}

.skill-tree-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(46px, 1fr));
  grid-template-rows: repeat(var(--tree-rows, 5), 64px);
  gap: 5px 7px;
}

.skill-tree-lines {
  position: absolute;
  inset: 18px 0 12px;
  width: 100%;
  height: calc(100% - 30px);
  pointer-events: none;
  z-index: 0;
}

.skill-tree-lines path {
  fill: none;
  stroke: rgba(84, 91, 160, 0.28);
  stroke-width: 0.03;
  vector-effect: non-scaling-stroke;
}

.skill-tree-cell,
.skill-tree-empty {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  grid-template-rows: 20px 29px 15px;
  justify-items: center;
  align-items: center;
}

.skill-tree-cell::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.14s ease, box-shadow 0.14s ease;
}

.skill-tree-cell.learned::before {
  opacity: 1;
  background: linear-gradient(180deg, rgba(255, 235, 167, 0.42), rgba(114, 188, 211, 0.18));
  box-shadow: 0 0 0 1px rgba(210, 153, 45, 0.32), 0 8px 18px rgba(83, 95, 167, 0.18);
}

.skill-tree-cell:hover::before {
  opacity: 1;
  background: linear-gradient(180deg, rgba(126, 218, 244, 0.34), rgba(255, 235, 167, 0.22));
  box-shadow: 0 0 0 1px rgba(77, 130, 210, 0.42), 0 0 14px rgba(85, 154, 222, 0.34);
}

.skill-tree-cell.requirement-highlight::before {
  opacity: 1;
  background: linear-gradient(180deg, rgba(126, 244, 142, 0.34), rgba(94, 195, 214, 0.2));
  box-shadow: 0 0 0 2px rgba(73, 189, 94, 0.48), 0 0 20px rgba(73, 189, 94, 0.42);
}

.skill-tree-cell.requirement-highlight::after {
  content: "Lv " attr(data-required-level);
  position: absolute;
  right: -7px;
  top: 14px;
  z-index: 4;
  min-width: 28px;
  border: 1px solid rgba(54, 126, 71, 0.5);
  border-radius: 999px;
  background: #eaffef;
  color: #145724;
  box-shadow: 0 6px 14px rgba(21, 88, 36, 0.2);
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.skill-tree-cell:hover {
  z-index: 15;
}

.skill-tooltip-float {
  position: fixed;
  z-index: 2000;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  border: 1px solid rgba(74, 87, 151, 0.34);
  border-radius: 7px;
  background: rgba(20, 25, 42, 0.96);
  color: #f8fbff;
  box-shadow: 0 14px 28px rgba(16, 21, 39, 0.28);
  padding: 9px 10px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
  text-align: left;
  white-space: pre-line;
}

.skill-tree-empty::before {
  content: "";
  align-self: center;
  grid-row: 2;
  width: 28px;
  height: 28px;
  border: 1px dashed #cbd0db;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
}

.skill-tree-cell.locked {
  opacity: 0.72;
}

.skill-tree-name {
  max-width: 70px;
  overflow: hidden;
  color: #6a6d78;
  font-size: 11px;
  line-height: 1.05;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-tree-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  background: #fff;
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.skill-tree-cell:hover .skill-tree-icon {
  border-color: #6e87d5;
  box-shadow: 0 0 0 2px rgba(110, 135, 213, 0.18);
  transform: translateY(-1px);
}

.skill-tree-icon img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

.skill-tree-cell.learned .skill-tree-icon {
  border-color: #d89b31;
  background: #fff8de;
  box-shadow: 0 0 0 2px rgba(231, 176, 72, 0.32), 0 0 16px rgba(245, 199, 91, 0.38);
}

.skill-tree-cell.learned .skill-tree-name {
  color: #1d293c;
  font-weight: 900;
}

.skill-tree-cell.learned .skill-tree-level strong {
  color: #111827;
  font-weight: 900;
}

.skill-tree-level {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #29317e;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  line-height: 1;
}

.skill-tree-level button {
  width: 11px;
  height: 14px;
  border: 0;
  background: transparent;
  color: #5960b1;
  padding: 0;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}

.skill-tree-level strong {
  min-width: 34px;
  color: #111827;
  font-size: 12px;
}

@media (max-width: 1120px) {
  .skill-planner-page .skill-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .skill-planner-page .skill-planner-shell {
    padding: 8px;
  }

  .skill-planner-page .skill-sidebar {
    grid-template-columns: 1fr;
  }

  .skill-tree-panel {
    padding: 12px 8px;
    overflow-x: auto;
  }

  .skill-tree-grid {
    min-width: 410px;
    grid-template-columns: repeat(7, minmax(46px, 1fr));
  }
}

@media (max-width: 760px) {
  .mvp-toolbar {
    grid-template-columns: 1fr;
  }

  .mvp-counter {
    justify-items: start;
  }

  .mvp-view-toggle > div {
    width: 100%;
  }

  .mvp-view-toggle button {
    flex: 1;
  }

  .mvp-timer-grid {
    grid-template-columns: 1fr;
  }

  .mvp-card-head {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .mvp-sprite {
    width: 42px;
    height: 42px;
  }

  .mvp-respawn-line,
  .mvp-timer-state {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .mvp-timer-state b {
    min-width: 0;
    text-align: left;
  }

  .mvp-actions {
    grid-template-columns: 1fr;
  }

  .mvp-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .mvp-row-location,
  .mvp-row-respawn,
  .mvp-row-state,
  .mvp-row .mvp-actions {
    grid-column: 1 / -1;
  }
}

body.dark {
  color-scheme: dark;
  --bg: #10161d;
  --panel: rgba(23, 33, 43, 0.91);
  --panel-strong: rgba(32, 45, 56, 0.9);
  --text: #edf4f7;
  --muted: #9aacbb;
  --line: #2d3b48;
  --accent: #5ec3d6;
  --accent-strong: #8bd8e6;
  --gold: #f0bd5f;
  --danger: #dd7578;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  --top-gradient: linear-gradient(180deg, rgba(94, 195, 214, 0.08), transparent 340px);
  --head-gradient: linear-gradient(135deg, #1d3440, #2b271a);
  --hover: #1d3038;
  --input-bg: rgba(17, 27, 36, 0.9);
  --metric-bg: rgba(22, 45, 53, 0.88);
  --fallback-bg: linear-gradient(135deg, #17212b, #21313c);
  --bg-overlay: linear-gradient(180deg, rgba(8, 13, 20, 0.76), rgba(6, 10, 16, 0.84));
  --bg-scrim: rgba(0, 0, 0, 0.22);
  --panel-alpha: 0.91;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background-image: var(--bg-image);
  background-position: center;
  background-size: cover;
  filter: saturate(0.96) contrast(0.98);
  transform: scale(1.02);
}

body::after {
  z-index: -1;
  background:
    var(--top-gradient),
    radial-gradient(circle at 50% 18%, transparent 0 26%, var(--bg-scrim) 70%),
    var(--bg-overlay);
  transition: background 0.22s ease;
}

body.dark::before {
  filter: saturate(0.84) contrast(0.9);
}

button,
input,
select {
  font: inherit;
}

.app {
  position: relative;
  z-index: 0;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(420px, 100%);
  margin-left: auto;
}

.top-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(27, 44, 67, 0.08);
}

.top-link-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.price-access {
  position: relative;
  display: grid;
  justify-items: end;
}

.price-toggle,
.price-submit,
.price-logout {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(27, 44, 67, 0.08);
}

.price-toggle:hover,
.price-submit:hover,
.price-logout:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.price-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 500;
  display: grid;
  width: min(280px, calc(100vw - 32px));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 12px;
}

.price-panel[hidden] {
  display: none;
}

.price-actions {
  display: flex;
  gap: 8px;
  justify-content: end;
}

.price-submit {
  background: var(--accent);
  color: #fff;
}

.price-message {
  min-height: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.price-message[data-kind="ok"] {
  color: var(--accent-strong);
}

.price-message[data-kind="error"] {
  color: var(--danger);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

body.dark .summary div {
  background: rgba(23, 33, 43, 0.78);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(27, 44, 67, 0.08);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.mode-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  width: min(240px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 3px;
  box-shadow: 0 8px 20px rgba(27, 44, 67, 0.08);
}

.mode-toggle button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.mode-toggle button.active {
  background: var(--accent);
  color: #fff;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.top-actions .page-nav {
  margin-top: 0;
}

.page-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(27, 44, 67, 0.08);
}

.page-nav a:hover,
.page-nav a.active {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.page-nav a.active {
  background: color-mix(in srgb, var(--panel) 86%, var(--accent));
}

.page-nav a.mvp-nav-link {
  position: relative;
  border-color: color-mix(in srgb, var(--gold) 62%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 22%, var(--panel)), color-mix(in srgb, #fff 74%, var(--gold))),
    var(--panel);
  color: color-mix(in srgb, var(--gold) 72%, var(--text));
  box-shadow: 0 8px 22px rgba(177, 120, 24, 0.16);
  overflow: hidden;
}

.page-nav a.mvp-nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 28%, rgba(255, 255, 255, 0.34) 42%, transparent 58% 100%);
  transform: translateX(-130%);
  transition: transform 0.45s ease;
  pointer-events: none;
}

.page-nav a.mvp-nav-link:hover::before,
.page-nav a.mvp-nav-link.active::before {
  transform: translateX(130%);
}

.page-nav a.mvp-nav-link:hover,
.page-nav a.mvp-nav-link.active {
  border-color: color-mix(in srgb, var(--gold) 82%, var(--accent));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 32%, var(--panel)), color-mix(in srgb, #fff 58%, var(--gold))),
    var(--panel);
  color: color-mix(in srgb, var(--gold) 84%, #1f2937);
  box-shadow: 0 10px 28px rgba(177, 120, 24, 0.24);
}

body.dark .page-nav a.mvp-nav-link {
  background:
    linear-gradient(135deg, rgba(177, 120, 24, 0.24), rgba(57, 42, 21, 0.82)),
    var(--panel);
  color: #ffd37a;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.14);
}

body.dark .page-nav a.mvp-nav-link:hover,
body.dark .page-nav a.mvp-nav-link.active {
  border-color: #ffd37a;
  background:
    linear-gradient(135deg, rgba(214, 158, 46, 0.34), rgba(75, 53, 26, 0.88)),
    var(--panel);
  color: #ffe4a8;
}

.hero-mode-toggle {
  margin-top: 12px;
  width: min(260px, 100%);
}

.theme-toggle-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: inset -5px -4px 0 rgba(255, 255, 255, 0.65);
}

body.dark .theme-toggle-icon {
  background: #dbeafe;
  box-shadow: inset -6px -3px 0 #17212b;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) minmax(92px, 0.52fr) minmax(150px, 0.82fr) repeat(5, minmax(108px, 0.78fr));
  align-items: end;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.level-filter {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.level-filter > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.range-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.range-inputs input {
  padding: 0 10px;
  text-align: center;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.toolbar select,
.toolbar input {
  height: 40px;
}

.item-filter {
  display: none;
}

body.item-mode .toolbar {
  grid-template-columns: minmax(240px, 1.3fr) minmax(132px, 0.65fr) minmax(160px, 0.8fr) minmax(170px, 0.9fr) minmax(170px, 0.85fr);
}

body.item-mode .toolbar > :not(.search) {
  display: none;
}

body.item-mode .toolbar > .item-filter {
  display: grid;
}

.item-filter.disabled {
  opacity: 0.48;
}

.item-filter.disabled select {
  cursor: not-allowed;
}

body.item-mode .damage-panel {
  display: none;
}

.player-level-field input {
  text-align: center;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 122, 140, 0.14);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
}

.summary strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.summary span {
  color: var(--muted);
  font-size: 13px;
}

.compact-summary {
  width: min(420px, 100%);
}

.compact-summary div {
  min-width: 0;
  padding: 8px 10px;
  text-align: center;
}

.compact-summary strong {
  font-size: 18px;
}

.compact-summary span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.visit-counter {
  width: min(210px, 100%);
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--gold) 13%, transparent), transparent 58%),
    var(--panel);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--line) 72%, transparent), 0 8px 18px rgba(27, 44, 67, 0.08);
  padding: 4px;
}

.visit-counter-title {
  margin-bottom: 3px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 0 color-mix(in srgb, var(--panel) 80%, transparent);
}

.visit-counter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}

.visit-counter-grid span {
  display: grid;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent),
    var(--input-bg);
  padding: 3px 2px;
  text-align: center;
}

.visit-counter-grid b {
  color: var(--text);
  font-family: "Trebuchet MS", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  line-height: 1;
}

.visit-counter-grid small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
}

.exp-app {
  max-width: 1280px;
}

.exp-topbar {
  align-items: center;
}

.mvp-app {
  max-width: 1480px;
}

.mvp-topbar {
  align-items: center;
}

.mvp-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px auto auto;
  gap: 12px;
  align-items: end;
  margin: 18px 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: var(--shadow-soft);
}

.mvp-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mvp-toolbar input,
.mvp-toolbar select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 11px;
  font: inherit;
  font-weight: 700;
}

.mvp-counter {
  display: inline-grid;
  min-height: 48px;
  align-content: center;
  justify-items: end;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--metric-bg);
}

.mvp-counter strong {
  font-size: 22px;
  line-height: 1;
}

.mvp-counter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mvp-view-toggle {
  display: grid;
  gap: 6px;
}

.mvp-view-toggle > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mvp-view-toggle > div {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
}

.mvp-view-toggle button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.mvp-view-toggle button.active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-strong);
}

.mvp-timer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.mvp-timer-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.mvp-timer-card.window {
  border-color: color-mix(in srgb, var(--gold) 68%, var(--line));
  box-shadow: 0 16px 38px rgba(177, 120, 24, 0.16);
}

.mvp-timer-card.ready {
  border-color: color-mix(in srgb, var(--accent) 66%, var(--line));
}

.mvp-timer-card.pinned {
  border-color: color-mix(in srgb, var(--gold) 74%, var(--line));
  background: color-mix(in srgb, var(--panel) 90%, rgba(177, 120, 24, 0.14));
}

.mvp-card-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.mvp-sprite {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--fallback-bg);
  overflow: hidden;
}

.mvp-sprite::before {
  content: attr(data-fallback);
  color: var(--muted);
  font-weight: 900;
}

.mvp-sprite img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
}

.mvp-card-head h2 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mvp-card-head p,
.mvp-location-text span,
.mvp-timer-state span {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mvp-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  cursor: pointer;
}

.mvp-pin input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mvp-pin span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: transparent;
  font-size: 15px;
  font-weight: 1000;
  line-height: 1;
}

.mvp-pin input:checked + span {
  background: color-mix(in srgb, var(--gold) 22%, transparent);
  color: var(--gold);
}

.mvp-location-text {
  display: grid;
  gap: 3px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-strong) 70%, transparent);
}

.mvp-location-text strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mvp-location-text span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mvp-respawn-line,
.mvp-timer-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mvp-respawn-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mvp-respawn-line strong,
.mvp-timer-state strong,
.mvp-timer-state b {
  color: var(--text);
  font-size: 15px;
  font-weight: 1000;
}

.mvp-timer-state b {
  flex: 0 0 auto;
  min-width: 72px;
  text-align: right;
}

.mvp-progress {
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 72%, transparent);
  overflow: hidden;
}

.mvp-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.25s ease;
}

.mvp-timer-card.window .mvp-progress span {
  background: var(--gold);
}

.mvp-timer-card.ready .mvp-progress span {
  background: #35a06d;
}

.mvp-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mvp-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  color: var(--accent-strong);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.mvp-actions button:disabled {
  cursor: default;
  opacity: 0.45;
}

.mvp-timer-grid.table-view,
.mvp-timer-grid.row-view {
  display: block;
}

.mvp-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow-soft);
}

.mvp-timer-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.mvp-timer-table th,
.mvp-timer-table td {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-align: left;
  vertical-align: middle;
}

.mvp-timer-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.mvp-timer-table tr:last-child td {
  border-bottom: 0;
}

.mvp-timer-table tr.pinned,
.mvp-row.pinned {
  background: color-mix(in srgb, var(--gold) 10%, transparent);
}

.mvp-timer-table td > strong,
.mvp-timer-table td > span,
.mvp-row strong,
.mvp-row span {
  display: block;
}

.mvp-timer-table td > span,
.mvp-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mvp-timer-table .mvp-progress,
.mvp-row .mvp-progress {
  margin-top: 5px;
}

.mvp-timer-table .mvp-actions {
  min-width: 136px;
}

.mvp-row {
  display: grid;
  grid-template-columns: 34px minmax(150px, 1.1fr) minmax(190px, 1.4fr) minmax(90px, 0.7fr) minmax(170px, 1.4fr) 150px;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow-soft);
}

.mvp-row-respawn {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.mvp-row-state strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 1000;
}


.exp-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.exp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(31, 122, 140, 0.16), rgba(177, 120, 24, 0.12)),
    var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

.exp-hero > div:first-child {
  align-self: center;
}

.exp-hero h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1;
}

.exp-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.exp-total-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(31, 122, 140, 0.28);
  border-radius: 8px;
  background: var(--metric-bg);
  padding: 14px;
}

.exp-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.exp-range-fields label {
  display: grid;
  gap: 4px;
}

.exp-total-card span,
.exp-range-fields span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.exp-total-card strong {
  color: var(--accent-strong);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
}

.exp-range-fields input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

.exp-range-fields input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 122, 140, 0.14);
}

.exp-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px 130px minmax(280px, 1.4fr);
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 12px;
}

.exp-toolbar label {
  display: grid;
  gap: 5px;
}

.exp-toolbar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.exp-toolbar input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

.exp-toolbar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 122, 140, 0.14);
}

.exp-ranges {
  display: flex;
  flex-wrap: wrap;
  align-content: end;
  gap: 6px;
}

.exp-ranges button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.exp-ranges button:hover,
.exp-ranges button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.exp-table-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.exp-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.exp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--head-gradient);
  padding: 10px 12px;
}

.exp-card-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1;
}

.exp-card-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.exp-card table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.exp-card th,
.exp-card td {
  padding: 5px 10px;
  border-bottom: 1px solid rgba(96, 112, 134, 0.16);
  text-align: right;
  font-size: 13px;
}

.exp-card th:first-child,
.exp-card td:first-child {
  width: 54px;
  text-align: center;
}

.exp-card th {
  color: var(--muted);
  background: var(--panel-strong);
  font-size: 11px;
  text-transform: uppercase;
}

.exp-card tbody tr:nth-child(even) {
  background: rgba(31, 122, 140, 0.07);
}

.exp-card tbody tr:hover,
.exp-card tbody tr.marked {
  background: rgba(240, 189, 95, 0.2);
  color: var(--accent-strong);
}

.exp-card td:last-child {
  color: var(--accent-strong);
  font-weight: 800;
}

.exp-footer {
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

.exp-footer a {
  color: var(--accent-strong);
  font-weight: 800;
}

.content {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(0, 1.08fr);
  gap: 14px;
  align-items: start;
}

.side-column {
  display: grid;
  gap: 10px;
}

.list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 252px);
  overflow: auto;
  padding-right: 4px;
}

.damage-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.damage-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  border: 0;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
  text-align: left;
}

.damage-toggle:hover {
  background: var(--hover);
}

.damage-toggle span {
  font-weight: 800;
}

.damage-toggle small {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
}

.damage-body {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.damage-body[hidden] {
  display: none;
}

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

.damage-grid label:nth-child(1),
.damage-grid label:nth-child(2),
.damage-grid label:nth-child(7),
.damage-grid label:nth-child(8) {
  grid-column: span 2;
}

.damage-grid input,
.damage-grid select {
  min-height: 38px;
  height: 38px;
}

.damage-result {
  display: grid;
  order: -1;
  gap: 8px;
  min-height: 0;
}

.damage-skill-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  padding: 8px;
}

.basic-attack-card {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
}

.damage-skill-card .skill-icon {
  width: 34px;
  height: 34px;
}

.damage-skill-card .skill-icon img {
  width: 28px;
  height: 28px;
}

.damage-skill-card strong,
.damage-skill-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.damage-skill-card strong {
  font-size: 14px;
  line-height: 1.15;
}

.damage-skill-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.basic-attack-card strong {
  font-size: 13px;
}

.basic-attack-card span {
  font-size: 11px;
}

.basic-attack-icon {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 6px;
  background:
    radial-gradient(circle at 64% 28%, rgba(247, 201, 95, 0.32), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 54%),
    var(--panel-strong);
}

.basic-attack-icon::before,
.basic-attack-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 5px;
  width: 4px;
  height: 18px;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(#f7e4a0 0 38%, #9fd6df 38% 72%, #6b4d30 72%);
  box-shadow: 0 0 0 1px rgba(5, 15, 24, 0.24);
  transform: rotate(42deg);
}

.basic-attack-icon::after {
  left: 16px;
  transform: rotate(-42deg);
}

.damage-total {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
  padding: 10px;
}

.damage-total span,
.damage-total small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.damage-total strong {
  display: block;
  margin: 4px 0;
  color: var(--accent-strong);
  font-size: 24px;
  line-height: 1;
}

.damage-note {
  display: block;
  margin-top: 6px;
  color: var(--accent-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.card-advice {
  display: grid;
  gap: 8px;
}

.card-advice .section-title,
.card-advice p {
  margin: 0;
}

.card-advice-list {
  display: grid;
  gap: 6px;
}

.card-advice-list span {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--input-bg);
  padding: 8px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
}

.monster-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.monster-row:hover,
.monster-row.active {
  border-color: rgba(31, 122, 140, 0.56);
  background: var(--hover);
}

.item-row {
  grid-template-columns: 38px 1fr auto;
  min-height: 64px;
}

.item-row .item-icon {
  width: 34px;
  height: 34px;
}

.item-row .item-icon img {
  width: 26px;
  height: 26px;
}

.monster-row.mvp-monster.active {
  border-color: color-mix(in srgb, var(--gold) 70%, var(--line));
  background:
    radial-gradient(circle at 12% 16%, color-mix(in srgb, var(--gold) 18%, transparent) 0 30%, transparent 52%),
    color-mix(in srgb, var(--gold) 9%, var(--hover));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 26%, transparent), 0 10px 24px rgba(177, 120, 24, 0.12);
}

.sprite,
.portrait {
  position: relative;
}

.sprite {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
}

.sprite::after,
.portrait::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--fallback-bg);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.sprite:has(img)::after,
.portrait:has(img)::after {
  display: none;
}

.monster-row img,
.portrait img {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}

.monster-row h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.1;
}

.monster-row h2 > span:first-child {
  min-width: 0;
}

.mvp-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  color: #fff4c7;
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow: 0 1px 0 #8d3a57, 0 0 4px rgba(255, 95, 152, 0.7);
  isolation: isolate;
}

.mvp-mark::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background:
    radial-gradient(circle at 80% 80%, #ff79b0 0 11%, transparent 12%),
    conic-gradient(from 12deg, #ff4b8b, #fff08a, #ff8a44, #fff08a, #ff4b8b);
  clip-path: polygon(50% 0, 60% 29%, 96% 12%, 73% 42%, 100% 55%, 66% 58%, 80% 100%, 50% 72%, 20% 100%, 34% 58%, 0 55%, 27% 42%, 4% 12%, 40% 29%);
  filter: drop-shadow(0 1px 0 #b73b66);
}

.mvp-mark.mini {
  width: 34px;
  height: 19px;
  font-size: 9px;
}

.mvp-mark.big {
  width: 78px;
  height: 45px;
  font-size: 18px;
  animation: mvpTinyShake 2.8s ease-in-out infinite;
}

.monster-row p,
.muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.boss {
  border-color: rgba(177, 120, 24, 0.34);
  background: color-mix(in srgb, var(--gold) 14%, var(--panel));
  color: var(--gold);
}

.details {
  position: sticky;
  top: 16px;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: visible;
}

.detail-head {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: 8px 8px 0 0;
  background: var(--head-gradient);
  border-bottom: 1px solid var(--line);
}

.detail-head.legendary-head {
  border-color: color-mix(in srgb, var(--gold) 44%, var(--line));
  background:
    radial-gradient(circle at 92% 18%, color-mix(in srgb, var(--gold) 24%, transparent) 0 14%, transparent 38%),
    radial-gradient(circle at 10% 20%, rgba(255, 79, 137, 0.16) 0 18%, transparent 36%),
    var(--head-gradient);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 18%, transparent);
}

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

.portrait {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.portrait img {
  width: 62px;
  height: 62px;
}

.item-portrait img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  image-rendering: pixelated;
}

.link-badge {
  text-decoration: none;
}

.item-description {
  white-space: pre-line;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  padding: 12px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.item-description a {
  color: var(--accent-strong);
  font-weight: 900;
}

.description-item-ref {
  position: relative;
  display: inline-block;
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  cursor: help;
}

.description-item-ref:hover,
.description-item-ref:focus {
  z-index: 320;
  outline: none;
}

.description-item-ref:hover .item-tooltip,
.description-item-ref:focus .item-tooltip {
  display: grid;
  gap: 8px;
}

.static-row {
  cursor: default;
}

.detail-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.05;
}

.detail-title h2 {
  margin-bottom: 8px;
}

@keyframes mvpTinyShake {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  43% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  46% {
    transform: translate3d(-0.5px, 0.5px, 0) rotate(-1deg);
  }
  49% {
    transform: translate3d(0.7px, -0.4px, 0) rotate(1deg);
  }
  52% {
    transform: translate3d(-0.3px, 0.3px, 0) rotate(-0.6deg);
  }
  55% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
}

.detail-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}

.stat {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--input-bg);
  padding: 6px 8px;
}

.stat.medium {
  grid-column: span 1;
}

.stat.wide {
  grid-column: span 2;
}

.element-advice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  padding: 12px;
  margin-top: 6px;
}

.element-advice-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.element-advice-head .section-title {
  margin: 0 0 4px;
}

.element-advice-head p {
  margin: 0;
}

.element-advice-head > strong {
  min-width: 64px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  color: var(--accent-strong);
  padding: 7px 10px;
  text-align: center;
  font-size: 20px;
  line-height: 1;
}

.best-elements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.best-element {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 13%, var(--panel));
  color: var(--text);
  padding: 5px 9px;
}

.best-element b,
.best-element small {
  line-height: 1;
}

.best-element small {
  color: var(--gold);
  font-weight: 800;
}

.element-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.element-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 6px 8px;
}

.element-grid span.top {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.element-grid small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.element-grid b {
  font-size: 14px;
  line-height: 1;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.stat strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.1;
}

.section-title {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--accent-strong);
}

.section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--accent-strong);
  padding: 0 10px;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.section-toggle:hover {
  border-color: rgba(31, 122, 140, 0.56);
  background: var(--hover);
}

.section-toggle::after {
  content: "▾";
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.16s ease;
}

.section-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.section-toggle small {
  margin-left: auto;
  margin-right: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compact-toggle {
  min-height: 34px;
}

.compact-toggle + .location-list {
  margin-top: 6px;
}

.drop-table {
  width: 100%;
  border-collapse: collapse;
  overflow: visible;
  border-radius: 8px;
}

.drop-table tbody,
.drop-table tr,
.drop-table td {
  overflow: visible;
}

.drop-table th,
.drop-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
  font-size: 13px;
  text-align: left;
}

.drop-table th:nth-child(2),
.drop-table th:nth-child(3),
.drop-table td:nth-child(2),
.drop-table td:nth-child(3) {
  width: 112px;
  white-space: nowrap;
}

.drop-table strong {
  display: block;
  font-size: 13px;
}

.item-cell {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.item-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  flex: 0 0 auto;
}

.item-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
}

.item-icon.empty {
  opacity: 0.35;
}

.item-link {
  display: inline;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent-strong);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

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

.item-info {
  position: relative;
  display: inline-block;
}

.item-info:hover,
.item-info:focus-within {
  z-index: 300;
}

.item-tooltip {
  position: absolute;
  left: 0;
  bottom: calc(100% - 1px);
  z-index: 100;
  display: none;
  width: min(430px, 82vw);
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 11px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.42;
}

.item-tooltip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
}

.item-info:hover .item-tooltip,
.item-info:focus-within .item-tooltip {
  display: grid;
  gap: 8px;
}

.item-tooltip div {
  display: block;
}

.tooltip-title {
  color: var(--accent-strong);
  font-size: 13px;
  line-height: 1.2;
}

.tooltip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tooltip-meta b {
  border: 1px solid rgba(31, 122, 140, 0.22);
  border-radius: 999px;
  background: var(--metric-bg);
  padding: 3px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.item-tooltip p {
  margin: 0;
  color: var(--text);
  white-space: pre-line;
}

.item-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.drop-table th {
  color: var(--muted);
  font-size: 12px;
}

.chance-value {
  color: var(--text);
  font-weight: 700;
}

.chance-stack {
  display: grid;
  gap: 2px;
}

.chance-stack strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.1;
}

.chance-stack small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}

.price-cell {
  color: var(--text);
  font-weight: 700;
}

.price-value {
  white-space: nowrap;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.skill-list,
.location-list,
.reverse-drop-list {
  display: grid;
  gap: 6px;
}

.skill-row,
.location-row,
.reverse-drop-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  padding: 10px;
}

.skill-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  row-gap: 6px;
  padding: 8px 10px;
}

.skill-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.skill-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
}

.skill-icon.empty {
  opacity: 0.35;
}

.skill-main {
  min-width: 0;
}

.skill-main strong,
.skill-main span {
  display: block;
}

.skill-main strong {
  line-height: 1.15;
}

.skill-main span,
.skill-condition {
  color: var(--muted);
  font-size: 12px;
}

.skill-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 5px;
}

.skill-metrics span {
  display: grid;
  min-width: 52px;
  border: 1px solid rgba(31, 122, 140, 0.2);
  border-radius: 6px;
  background: var(--metric-bg);
  padding: 5px 7px;
  text-align: center;
}

.skill-metrics small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.skill-metrics b {
  color: var(--accent-strong);
  font-size: 13px;
  line-height: 1.05;
  white-space: nowrap;
}

.skill-condition {
  grid-column: 2 / -1;
}

.location-row {
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 8px;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.location-row:hover,
.location-row.active {
  border-color: rgba(31, 122, 140, 0.58);
  background: var(--hover);
}

.location-row.active {
  transform: translateY(-1px);
}

.map-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  aspect-ratio: 1 / 1;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(45deg, color-mix(in srgb, var(--line) 34%, transparent) 25%, transparent 25%),
    linear-gradient(-45deg, color-mix(in srgb, var(--line) 34%, transparent) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, color-mix(in srgb, var(--line) 34%, transparent) 75%),
    linear-gradient(-45deg, transparent 75%, color-mix(in srgb, var(--line) 34%, transparent) 75%),
    var(--panel-strong);
  background-position:
    0 0,
    0 6px,
    6px -6px,
    -6px 0;
  background-size: 12px 12px;
}

.map-thumb::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.map-thumb:has(img)::after {
  display: none;
}

.map-thumb img {
  position: relative;
  z-index: 1;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  image-rendering: pixelated;
}

.location-main {
  min-width: 0;
}

.location-main strong,
.location-main span {
  display: block;
}

.location-main strong {
  margin-bottom: 4px;
  line-height: 1.15;
}

.location-main span,
.reverse-drop-row small {
  color: var(--muted);
  font-size: 12px;
}

.location-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 6px;
}

.location-metrics span {
  display: grid;
  min-width: 78px;
  border: 1px solid rgba(31, 122, 140, 0.22);
  border-radius: 6px;
  background: var(--metric-bg);
  padding: 6px 8px;
  text-align: center;
}

.location-metrics small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.location-metrics b {
  color: var(--accent-strong);
  font-size: 16px;
  line-height: 1.05;
}

.location-spawns {
  margin: 6px 0 4px 108px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--panel-strong) 82%, transparent);
}

.location-spawns-head,
.location-spawn-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 10px;
}

.location-spawns-head {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.location-spawns-head span {
  justify-self: end;
  color: var(--accent-strong);
  font-weight: 900;
}

.location-spawn-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.location-spawn-row:last-child {
  border-bottom: 0;
}

.location-spawn-row:hover {
  background: var(--hover);
}

.location-spawn-row strong,
.location-spawn-row small {
  display: block;
}

.location-spawn-row small,
.location-spawn-metrics small {
  color: var(--muted);
  font-size: 12px;
}

.location-spawn-metrics {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.location-spawn-metrics b {
  color: var(--accent-strong);
  font-size: 15px;
}

.mini-mvp {
  color: #f7c95f;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.reverse-drop-row {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.reverse-drop-row:hover {
  border-color: rgba(31, 122, 140, 0.56);
  background: var(--hover);
}

.reverse-drop-row strong,
.reverse-drop-row small {
  display: block;
}

.reverse-drop-row b {
  color: var(--accent-strong);
}

.vendor-row {
  border-color: rgba(191, 147, 63, 0.34);
  background: linear-gradient(90deg, rgba(191, 147, 63, 0.12), var(--input-bg));
}

.vendor-row b {
  color: #e7c56f;
}

.vendor-row[data-copy-navi] {
  cursor: copy;
}

.copy-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  max-width: min(360px, calc(100vw - 32px));
  transform: translateY(14px);
  border: 1px solid rgba(31, 122, 140, 0.36);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

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

.item-drop-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.panel-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head .item-icon {
  width: 28px;
  height: 28px;
}

.panel-head .item-icon img {
  width: 26px;
  height: 26px;
}

.close-item {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-strong);
  color: var(--muted);
  padding: 0 10px;
  cursor: pointer;
}

.close-item:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

@media (max-width: 980px) {
  .toolbar,
  .content {
    grid-template-columns: 1fr;
  }

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

  .list {
    max-height: 430px;
  }

  .details {
    position: static;
  }

  .exp-hero,
  .exp-toolbar {
    grid-template-columns: 1fr;
  }

  .exp-table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .app {
    width: min(100% - 20px, 1440px);
    padding-top: 16px;
  }

  .topbar {
    display: grid;
  }

  .top-actions {
    justify-content: stretch;
    min-width: 0;
  }

  .top-actions > * {
    flex: 1 1 auto;
  }

  .price-access {
    justify-items: stretch;
  }

  .price-panel {
    left: 0;
    right: auto;
  }

  .summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compact-summary {
    width: 100%;
  }

  .compact-summary div {
    padding: 8px 6px;
  }

  .compact-summary strong {
    font-size: 16px;
  }

  .compact-summary span {
    font-size: 10px;
  }

  .visit-counter {
    width: 100%;
  }

  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .stat.wide {
    grid-column: span 1;
  }

  .monster-row {
    grid-template-columns: 38px 1fr auto;
    min-height: 58px;
    gap: 8px;
    padding: 8px;
  }

  .monster-row > .badges {
    grid-column: auto;
    justify-content: end;
  }

  .monster-row .badge {
    min-height: 22px;
    padding: 0 7px;
    font-size: 11px;
  }

  .monster-row .badge:nth-child(n + 2) {
    display: none;
  }

  .monster-row h2 {
    margin-bottom: 3px;
    font-size: 14px;
  }

  .monster-row p {
    font-size: 11px;
    line-height: 1.2;
  }

  .sprite {
    width: 38px;
    height: 38px;
  }

  .monster-row img {
    width: 38px;
    height: 38px;
  }

  .list {
    max-height: 62vh;
    padding-right: 2px;
  }

  .detail-head {
    grid-template-columns: 64px 1fr;
    gap: 12px;
    padding: 14px;
  }

  .portrait {
    width: 64px;
    height: 64px;
  }

  .detail-head h2 {
    font-size: 23px;
  }

  .location-row,
  .panel-head {
    grid-template-columns: 1fr;
  }

  .skill-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .skill-metrics,
  .skill-condition {
    grid-column: 2 / -1;
  }

  .skill-metrics {
    justify-content: start;
  }

  .map-thumb {
    width: 100%;
    height: auto;
    max-height: 180px;
  }

  .location-metrics {
    justify-content: start;
  }

  .location-spawns {
    margin-left: 0;
  }

  .location-spawns-head,
  .location-spawn-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .location-spawns-head span,
  .location-spawn-metrics {
    justify-self: start;
    justify-items: start;
  }

  .page-nav {
    width: 100%;
  }

  .page-nav a {
    flex: 1;
    justify-content: center;
  }

  .exp-hero {
    padding: 14px;
  }

  .exp-table-grid {
    grid-template-columns: 1fr;
  }

  .exp-card th,
  .exp-card td {
    padding: 8px 10px;
    font-size: 14px;
  }

  .exp-ranges button {
    flex: 1 1 80px;
  }
}
