:root {
  --page: #241f2a;
  --page-deep: #15131a;
  --card: #302b35;
  --card-dark: #211e27;
  --line: #61586a;
  --line-bright: #dfbd70;
  --text: #faf2de;
  --muted: #d2c8d8;
  --accent: #e2bf72;
  --green: #70a96d;
  --blue: #42a6d9;
  --red: #dc5a65;
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at 50% 0, rgba(226, 191, 114, 0.16), transparent 30rem),
    radial-gradient(circle at 88% 8%, rgba(143, 101, 216, 0.2), transparent 22rem),
    linear-gradient(180deg, var(--page) 0%, var(--page-deep) 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.tool-header {
  align-items: center;
  border-bottom: 1px solid rgba(226, 191, 114, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 16px 20px;
}

.tool-brand,
.tool-header nav {
  align-items: center;
  display: flex;
}

.tool-brand {
  gap: 10px;
  font-weight: 900;
}

.tool-brand img {
  height: 38px;
  width: 38px;
}

.tool-header nav {
  background: rgba(24, 21, 30, 0.78);
  border: 1px solid rgba(226, 191, 114, 0.24);
  border-radius: 8px;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
}

.tool-header nav a {
  border-radius: 6px;
  color: #dddddd;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 12px;
}

.tool-header nav a:hover {
  background: #3b3347;
  color: #ffffff;
}

.tool-header nav a.discord-button {
  background: #5865f2;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.tool-header .site-account {
  margin-left: auto;
}

main {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 20px 42px;
}

.hero,
.tool-section,
.map-panel {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 8px;
}

.hero,
.tool-section,
.map-panel {
  padding: 16px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2 {
  color: var(--accent);
  line-height: 1;
  margin: 0;
  text-shadow: 2px 2px 0 #171717;
}

h1 {
  font-size: clamp(38px, 6vw, 58px);
  margin-top: 8px;
}

h2 {
  font-size: 26px;
}

p {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
  margin: 8px 0 0;
}

button,
input {
  background: var(--card-dark);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  min-height: 42px;
  padding: 8px 10px;
}

button {
  cursor: pointer;
}

button:hover {
  border-color: var(--line-bright);
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 900;
  gap: 6px;
}

.workspace {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.68fr);
}

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

.section-heading {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.map-wrap {
  border: 1px solid rgba(250, 242, 222, 0.12);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.map-wrap img {
  display: block;
  height: auto;
  width: 100%;
}

.spot-button {
  align-items: center;
  background: rgba(33, 30, 39, 0.72);
  border: 3px solid var(--line-bright);
  border-radius: 999px;
  color: #ffffff;
  display: grid;
  font-size: clamp(9px, 1.2vw, 14px);
  gap: 1px;
  height: 8.8%;
  justify-items: center;
  line-height: 1.05;
  min-height: 0;
  padding: 3px;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 11.7%;
}

.spot-button strong {
  font-size: 1.32em;
}

.spot-button small {
  font-size: 0.78em;
}

.spot-button.is-free,
.spot-button.is-unlocked {
  border-color: var(--green);
}

.spot-button.is-unlocked {
  background: rgba(36, 91, 55, 0.78);
}

.spot-button.is-deep {
  border-color: var(--blue);
}

.spot-button.is-swampy {
  border-color: var(--red);
}

.spot-button.is-unlocked::after {
  content: "✓";
  font-size: 1.1em;
  position: absolute;
  right: 10%;
  top: 8%;
}

.material-totals,
.inventory-grid,
.compact-totals {
  display: grid;
  gap: 10px;
}

.panel-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0 10px;
}

.panel-actions button {
  min-height: 38px;
}

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

.material-total {
  align-items: center;
  background: var(--card-dark);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 90px;
  padding: 12px 8px;
}

.inventory-item,
.compact-total {
  align-items: center;
  background: var(--card-dark);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 10px;
}

.material-total img,
.compact-total img {
  height: 36px;
  object-fit: contain;
  width: 36px;
}

.inventory-item img {
  height: 28px;
  object-fit: contain;
  width: 28px;
}

.compact-total span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.material-total strong,
.compact-total strong {
  color: var(--accent);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  justify-self: end;
}

.material-total strong {
  font-size: 32px;
  justify-self: center;
  line-height: 1;
}

.inventory-item {
  grid-template-columns: 1fr 82px;
}

.inventory-item span {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.inventory-item strong {
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-item input {
  min-height: 38px;
  text-align: center;
  width: 100%;
}

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

.extra-grid .tool-section {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.extra-card-heading {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 70px minmax(0, 1fr);
  margin-bottom: 0;
}

.extra-card-heading img {
  background: rgba(112, 169, 109, 0.12);
  border: 1px solid rgba(250, 242, 222, 0.09);
  border-radius: 8px;
  height: 70px;
  object-fit: contain;
  padding: 8px;
  width: 70px;
}

.extra-card-heading p {
  font-size: 13px;
  line-height: 1.35;
}

.field-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 2px;
}

.field-grid input {
  min-width: 0;
  width: 100%;
}

.coin-total {
  background: rgba(226, 191, 114, 0.12);
  border: 1px solid rgba(226, 191, 114, 0.22);
  border-radius: 8px;
  color: var(--accent);
  display: block;
  font-size: 26px;
  margin-top: 0;
  padding: 12px;
}

.compact-totals {
  gap: 12px;
}

.spot-button.is-unlocked::after {
  content: "";
}

footer {
  color: #a9a9a9;
  font-size: 13px;
  font-weight: 700;
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 20px 30px;
}

@media (max-width: 980px) {
  .tool-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-header nav {
    width: 100%;
  }

  .tool-header .site-account {
    margin-left: 0;
  }

  .workspace,
  .extra-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main {
    padding: 20px 12px 34px;
  }

  .spot-button {
    border-width: 2px;
    font-size: 8px;
    width: 13.2%;
  }

  .spot-button small {
    display: none;
  }

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

  .material-total {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .material-total strong {
    justify-self: center;
  }

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