* {
  box-sizing: border-box;
}

:root {
  --background: #f3efe7;
  --surface: #fbf9f4;
  --surface-strong: #ffffff;
  --text: #1f2824;
  --muted: #778078;
  --line: #ddd7cc;
  --accent: #68776b;
  --accent-soft: #e5e9e3;
  --gold: #a78b57;
  --shadow: 0 18px 45px rgba(35, 43, 38, 0.08);
}

body {
  margin: 0;
  min-height: 100vh;

  background:
    radial-gradient(
      circle at top right,
      rgba(104, 119, 107, 0.12),
      transparent 32%
    ),
    var(--background);

  color: var(--text);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.app-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 32px;
}

.hero {
  margin-bottom: 32px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h1 {
  font-size: clamp(40px, 7vw, 66px);
}

h2 {
  font-size: 30px;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 18px;
}

.controls label {
  color: var(--muted);
  font-size: 14px;
}

select {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 10px 14px;
  font: inherit;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card,
.leaderboard-card {
  border: 1px solid rgba(221, 215, 204, 0.85);
  background: rgba(251, 249, 244, 0.92);
  box-shadow: var(--shadow);
}

.summary-card {
  min-height: 118px;
  border-radius: 18px;
  padding: 20px;
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
}

.top-seller-value {
  overflow-wrap: anywhere;
  font-size: 22px !important;
}

.summary-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.leaderboard-card {
  border-radius: 24px;
  padding: 26px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

#lastUpdated {
  color: var(--muted);
  font-size: 12px;
}

.leaderboard {
  margin-top: 10px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--line);
}

.leaderboard-row:last-child {
  border-bottom: 0;
}

.rank {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.leaderboard-row:first-child .rank {
  background: var(--gold);
  color: white;
}

.dish-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 600;
}

.sold-value {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  white-space: nowrap;
}

.sold-label {
  margin-left: 5px;
  color: var(--muted);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 12px;
  font-weight: 400;
}

.state-message {
  padding: 36px 8px 16px;
  text-align: center;
  color: var(--muted);
}

.error {
  color: #9a4c46;
}

.hidden {
  display: none !important;
}

footer {
  padding: 24px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 680px) {

  .app-shell {
    width: min(100% - 20px, 920px);
    padding-top: 34px;
  }

  .controls {
    justify-content: center;
  }

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

  .summary-card {
    min-height: 0;
  }

  .leaderboard-card {
    padding: 20px 14px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .leaderboard-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 16px 4px;
  }

  .dish-name {
    font-size: 15px;
  }

  .sold-value {
    font-size: 18px;
  }
}


