:root {
  --bg: #11100d;
  --panel: #191611;
  --panel-strong: #211c14;
  --ink: #f7efdf;
  --muted: #b9a986;
  --line: #332a1c;
  --gold: #d5a642;
  --amber: #ffce62;
  --green: #8bd27b;
  --red: #e16d5d;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(213, 166, 66, 0.13), transparent 26rem),
    linear-gradient(135deg, #0d0c0a 0%, #17130e 55%, #0f0e0c 100%);
  font-family: Georgia, "Times New Roman", serif;
}

button,
input {
  font: inherit;
}

a {
  color: var(--amber);
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: end;
  padding: 24px;
  border: 1px solid rgba(213, 166, 66, 0.22);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(34, 28, 18, 0.94), rgba(18, 16, 12, 0.94));
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 10px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.intro {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.world-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(12, 10, 7, 0.56);
}

.world-form label,
.search span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.world-row {
  display: flex;
  gap: 8px;
}

input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--ink);
  background: #0f0d0a;
  outline: none;
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(213, 166, 66, 0.16);
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  color: #1b1408;
  background: var(--amber);
  cursor: pointer;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}

.status-card {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(25, 22, 17, 0.82);
}

.status-label,
.status-card span,
.status-card a {
  display: block;
  color: var(--muted);
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.76rem;
}

.status-card strong {
  display: block;
  margin: 6px 0;
  font-size: 1.45rem;
  line-height: 1;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 16px 0 22px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.filter {
  color: var(--ink);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.filter.is-active {
  color: #181107;
  background: var(--gold);
}

.notice,
.empty-state {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(213, 166, 66, 0.22);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(18, 16, 12, 0.68);
}

.notice {
  margin-bottom: 16px;
  border-color: rgba(225, 109, 93, 0.38);
  color: #ffd8d2;
  background: rgba(225, 109, 93, 0.1);
}

.creature-section {
  margin-top: 22px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(213, 166, 66, 0.16);
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin-bottom: 5px;
  color: var(--muted);
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.creature-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(25, 22, 17, 0.8);
}

.creature-card.is-hot {
  border-color: rgba(139, 210, 123, 0.58);
  background: linear-gradient(180deg, rgba(36, 43, 25, 0.88), rgba(21, 19, 13, 0.9));
}

.creature-card.is-missing {
  opacity: 0.62;
}

.creature-card__top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.creature-card.has-no-sprite .creature-card__top {
  grid-template-columns: minmax(0, 1fr) auto;
}

.creature-sprite {
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
}

.tag {
  margin-bottom: 5px;
  color: var(--gold);
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.08;
}

.pill {
  align-self: start;
  white-space: nowrap;
  border-radius: 999px;
  padding: 4px 7px;
  color: #171107;
  background: #695a42;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
}

.pill.is-hot {
  background: var(--green);
}

.pill.is-cold {
  color: var(--muted);
  background: #12100c;
  border: 1px solid var(--line);
}

.status-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.25;
}

.status-line--muted {
  color: #8f7f61;
  font-size: 0.78rem;
}

.status-line--meta {
  color: #c0a76d;
  font-size: 0.76rem;
}

@media (max-width: 1040px) {
  .creature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .filter-group {
    justify-content: flex-start;
  }

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

@media (max-width: 560px) {
  .shell {
    width: min(100% - 18px, 1180px);
    padding: 18px 0 30px;
  }

  .hero {
    padding: 18px;
    border-radius: 18px;
  }

  .world-row,
  .section-heading {
    display: block;
  }

  .world-row button {
    width: 100%;
    margin-top: 8px;
  }

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