:root {
  --bg: #0d1117;
  --bg-elevated: #161b22;
  --bg-card: #1c2129;
  --border: #2a313c;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #4fd1e6;
  --accent-strong: #7fe6f7;
  --points: #ffb545;
  --fragment-legendary: #b8862f;
  --fragment-epic: #7a5fa8;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-inline: 16px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding-block: 24px 64px;
}

header.hero {
  text-align: center;
  padding-block: 12px 20px;
}

.event-title {
  margin: 0 0 4px;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  letter-spacing: 0.03em;
  color: var(--accent-strong);
}

.event-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tz-banner {
  margin-top: 18px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: center;
}

.tz-banner strong {
  color: var(--text);
}

.reset-countdown {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 600;
}

nav.day-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.day-tab {
  font: inherit;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
}

.day-tab:hover:not(:disabled) {
  border-color: var(--accent);
}

.day-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #04252c;
  font-weight: 600;
}

.day-tab:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.phase-tag {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.score-section h2 {
  text-align: center;
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 8px 0 28px;
  color: var(--accent-strong);
  position: relative;
  padding-bottom: 14px;
}

.score-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.item-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 560px) {
  .item-card {
    flex-direction: row;
    align-items: stretch;
  }
}

.item-media {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 560px) {
  .item-media {
    width: 260px;
    border-right: 1px solid var(--border);
  }
}

.item-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  display: block;
  background: var(--bg-elevated);
}

@media (min-width: 560px) {
  .item-image {
    aspect-ratio: auto;
    flex: 1;
    min-height: 160px;
  }
}

.fragment-gallery {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.fragment-gallery--epic {
  background: var(--fragment-epic);
}

.fragment-row {
  display: flex;
  justify-content: center;
}

.fragment-tile {
  flex: 0 0 33.333%;
  aspect-ratio: 82 / 86;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fragment-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.fragment-tile--legendary {
  background: var(--fragment-legendary);
}

.fragment-tile--epic {
  background: var(--fragment-epic);
}

.item-image-caption {
  margin: 0;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.item-image--placeholder {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, #10151c 100%);
  position: relative;
  min-height: 120px;
}

.item-image--placeholder::after {
  content: "image coming soon";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.item-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.item-notes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

@media (min-width: 720px) {
  .item-notes {
    flex-direction: row;
    gap: 24px;
  }
  .item-notes-group {
    flex: 1;
  }
}

.item-notes-group h4 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.item-notes-group ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.item-header h3 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text);
}

.item-points {
  flex-shrink: 0;
  color: var(--points);
  font-weight: 700;
  font-size: 0.95rem;
}

.item-description {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
}

footer.site-footer {
  text-align: center;
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.site-footer-credit {
  margin-top: 4px;
  color: var(--text-muted);
  opacity: 0.8;
}
