:root {
  --ink: #1c1a16;
  --muted: #5b554d;
  --panel: #f6f1e7;
  --panel-2: #fffaf0;
  --accent: #cc5b2b;
  --accent-2: #206a6c;
  --accent-3: #f0b43c;
  --border: #e3d7c6;
  --shadow: 0 18px 50px rgba(39, 27, 16, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Palatino", "Palatino Linotype", "Book Antiqua", serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff7e1, #f5efe6 45%, #e6ded4 100%);
}

h1, h2, h3 {
  margin: 0 0 0.4rem 0;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.4rem, 3vw, 3.4rem);
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 0.8rem 0;
}

main {
  padding: 2rem 6vw 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

.legend-item {
  background: #fffdf7;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.legend-item span {
  font-size: 1.1rem;
}
.hero {
  background: linear-gradient(135deg, #f6d18b, #f5b97d 40%, #f28b5c 100%);
  padding: 2.5rem 6vw;
  color: #2a1b0d;
  box-shadow: var(--shadow);
}

.hero-inner {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 1rem;
  background: rgba(255, 255, 255, 0.55);
  padding: 1rem 1.4rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.hero-metric .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7b5d3a;
}

.hero-metric .value {
  font-size: 1.8rem;
  font-weight: 600;
}

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.6rem;
  color: #57351e;
}

.subhead {
  max-width: 520px;
  font-size: 1.1rem;
}

.panel {
  background: var(--panel);
  border-radius: 18px;
  padding: 1.6rem;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(58, 41, 27, 0.08);
}

.panel-header {
  margin-bottom: 1rem;
}

.grid.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--panel-2);
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.controls {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.plan-slider {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-left: 0.4rem;
}

.plan-slider input[type="range"] {
  width: 140px;
}

.controls button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.toggle input {
  accent-color: var(--accent-2);
}

.controls button:hover {
  filter: brightness(0.95);
}

.controls input[type="file"] {
  flex: 1;
}

.control-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.control-row input[type="text"] {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

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

.pill {
  background: var(--accent-2);
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pill.warn {
  background: #9a3c2e;
}

.scroll {
  max-height: 260px;
  overflow-y: auto;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 0.6rem;
  background: #fffdf7;
}

.scroll.scroll-tall {
  max-height: 960px;
}

.sync-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid #f0e2ce;
  padding: 0.4rem 0;
}

.sync-item:last-child {
  border-bottom: none;
}

.sync-item img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #d2c1a8;
  background: white;
}

.sync-item .meta {
  display: flex;
  flex-direction: column;
}

.mapping {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}

.mapping label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--muted);
}

.boss-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.4rem;
  max-height: 140px;
  overflow-y: auto;
  padding: 0.4rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fffdf7;
}

.boss-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.mapping select {
  margin-top: 0.3rem;
  padding: 0.3rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.plan.grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.tab-content.plan.grid {
  display: none;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

.tab {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  color: var(--ink);
}

.tab.active {
  background: var(--accent-3);
  border-color: var(--accent-3);
}

.tab-meta {
  margin-left: auto;
  display: flex;
  gap: 0.4rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content.active.plan.grid {
  display: grid;
}

.round {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem;
  background: #fff9ee;
}

.not-owned {
  margin-top: 0.8rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.6rem;
  background: #fffdf7;
}

.not-owned summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}
.round h4 {
  margin: 0 0 0.6rem 0;
}

.round .boss {
  padding: 0.4rem 0;
  border-top: 1px dashed #ead6be;
}

.round .boss:first-of-type {
  border-top: none;
}

.round .boss-title {
  font-weight: 600;
  color: #503420;
}

.boss-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.boss-line img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #d2c1a8;
  background: white;
}

.boss.used {
  opacity: 0.5;
}

.used-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.detail {
  margin-top: 0.4rem;
  padding: 0.5rem 0.6rem;
  border-left: 3px solid var(--accent-3);
  background: #fffdf7;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.detail a {
  color: var(--accent-2);
}

.detail summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}

.difficulty {
  margin-top: 0.2rem;
  font-size: 1rem;
}

.diff-badge {
  display: inline-block;
  padding: 0.1rem 0.25rem;
  border-radius: 6px;
  background: #fff3dc;
  border: 1px solid var(--border);
  cursor: help;
  position: relative;
}

.diff-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: 120%;
  min-width: 220px;
  max-width: 320px;
  background: #fffdf7;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(39, 27, 16, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 10;
}

.diff-badge:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.compare-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px dashed #ead6be;
}

.compare-row:last-child {
  border-bottom: none;
}

.compare-left img {
  width: 100px;
  height: 100px;
  border-radius: 14px;
  border: 1px solid #d2c1a8;
  background: white;
}

.compare-right {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.compare-candidates {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.compare-candidate {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  border: 1px solid #e3d7c6;
  background: #fffdf7;
  font-size: 0.95rem;
}

.compare-candidate img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid #d2c1a8;
  background: white;
}

.compare-candidate input {
  accent-color: var(--accent);
}

.unmatched-item {
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0e2ce;
}

.unmatched-item.has-icon {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.unmatched-item.has-icon img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid #d2c1a8;
  background: white;
  flex-shrink: 0;
}

.manual-match {
  display: grid;
  grid-template-columns: auto 1fr minmax(140px, 180px);
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid #f0e2ce;
}

.manual-match:last-child {
  border-bottom: none;
}

.manual-icons {
  display: flex;
  gap: 0.4rem;
}

.manual-icons img {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  border: 1px solid #d2c1a8;
  background: white;
}

.manual-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.95rem;
}

.ghost {
  border: 1px solid var(--border);
  background: #fff3dc;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
}

.ghost:hover {
  background: #f3dfc1;
}

.not-owned-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.95rem;
}

.not-owned-bosses {
  font-size: 0.9rem;
  color: var(--muted);
}

footer {
  padding: 1.5rem 6vw 2.5rem;
  color: #7d6a58;
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
}
