:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: transparent;
  --panel: rgba(8, 13, 19, 0.82);
  --panel-strong: rgba(13, 20, 29, 0.94);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f6fbff;
  --muted: #aab7c7;
  --accent: #49d3b4;
  --accent-2: #f6c453;
  --warn: #ff7d61;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: transparent;
  color: var(--text);
}

body {
  padding: 18px;
}

.overlay {
  width: min(860px, 100vw - 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 28, 38, 0.92), var(--panel));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

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

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 850;
}

.status {
  display: grid;
  gap: 3px;
  min-width: 104px;
  text-align: right;
}

.status span {
  color: var(--accent-2);
  font-size: 20px;
  font-weight: 850;
}

.status small {
  color: var(--muted);
  font-size: 12px;
}

.crafts {
  display: grid;
  gap: 10px;
  padding: 14px;
  max-height: calc(100vh - 116px);
  overflow: hidden;
}

.craft {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.icon-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.icon-wrap img {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.42));
}

.icon-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 850;
}

.tier {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  min-width: 28px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #07100f;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.content {
  min-width: 0;
}

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

h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.2;
}

.station {
  margin: 3px 0 9px;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  flex: 0 0 auto;
  border: 1px solid rgba(73, 211, 180, 0.4);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.progress-labels,
.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.progress-labels strong {
  color: var(--text);
}

.bar {
  width: 100%;
  height: 7px;
  margin: 5px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.message {
  margin: 0;
  padding: 22px;
  color: var(--muted);
  font-weight: 750;
}

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

  .overlay {
    width: calc(100vw - 20px);
  }

  .topbar {
    align-items: flex-start;
    padding: 14px;
  }

  h1 {
    font-size: 22px;
  }

  .craft {
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 92px;
    padding: 10px;
  }

  .icon-wrap {
    width: 46px;
    height: 46px;
  }

  h2 {
    font-size: 16px;
  }

  .meta {
    flex-wrap: wrap;
    gap: 6px 10px;
  }
}
