:root {
  --display-width: 1920px;
  --display-height: 1080px;
  --bg: #f36f25;
  --panel: rgba(255, 250, 243, 0.92);
  --ink: #1d1a17;
  --muted: #5e554b;
  --accent: #c75b39;
  --accent-soft: #f2c4a3;
  --line: rgba(29, 26, 23, 0.1);
  --shadow: 0 24px 60px rgba(58, 40, 25, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Helvetica, Arial, sans-serif;
}

body {
  display: flex;
  justify-content: center;
}

.screen {
  width: min(100vw, var(--display-width));
  height: var(--display-height);
  padding: 18px 20px 20px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
}

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
}

h1,
.album-title,
.artist-name,
.position-pill,
.message {
  margin: 0;
}

h1 {
  font-size: clamp(1.9rem, 2.8vw, 3rem);
  line-height: 0.95;
  text-align: center;
}

.last-refresh-inline {
  margin: 0;
  color: rgba(29, 26, 23, 0.72);
  font-size: 0.82rem;
  line-height: 1.2;
  text-align: center;
}

.page-footer {
  display: flex;
  justify-content: center;
}

.message {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 250, 243, 0.85);
  border: 1px solid var(--line);
}

.message[data-state="error"] {
  color: #7a2618;
  background: rgba(255, 233, 227, 0.95);
  border-color: rgba(122, 38, 24, 0.18);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, 392px);
  grid-auto-rows: max-content;
  gap: 12px;
  min-height: 0;
  align-content: start;
  justify-content: center;
}

.chart-card {
  background: #1d1a17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto auto;
  padding: 5px 5px 0;
  width: 392px;
}

.chart-card--promo {
  grid-template-rows: 1fr auto;
}

.art-shell {
  position: relative;
  width: 380px;
  height: 380px;
  background:
    linear-gradient(135deg, rgba(199, 91, 57, 0.18), rgba(79, 120, 96, 0.2)),
    #ddd3c7;
  border-radius: 12px;
  overflow: hidden;
}

.art-shell--empty::after {
  content: "No cover art";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.artwork {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.position-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #f36f25;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.card-copy {
  padding: 10px 10px 12px;
  background: #1d1a17;
}

.album-title {
  color: #fff8ef;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  line-height: 1.08;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.artist-name {
  margin-top: 6px;
  color: rgba(255, 248, 239, 0.72);
  font-size: clamp(0.8rem, 0.95vw, 0.92rem);
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.promo-art {
  width: 380px;
  height: 380px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2a201b 0%, #1d1a17 100%);
  display: grid;
  place-items: center;
}

.promo-message {
  padding: 28px;
  text-align: center;
}

.promo-line,
.promo-subline {
  margin: 0;
}

.promo-line {
  color: #fff8ef;
  font-size: 2rem;
  line-height: 1.06;
  font-weight: 700;
}

.promo-subline {
  margin-top: 14px;
  color: rgba(255, 248, 239, 0.76);
  font-size: 1.05rem;
  line-height: 1.35;
}

@media (max-width: 1200px) {
  .screen {
    padding: 18px;
    height: auto;
    min-height: 100vh;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .chart-grid {
    grid-template-columns: repeat(2, 392px);
  }
}

@media (max-width: 700px) {
  .chart-grid {
    grid-template-columns: 392px;
  }
}
