:root {
  color-scheme: light dark;
--header-bg: rgba(255,255,255, 0);
  --panel: rgba(0, 0, 0, 0.04);
--tile-bg: rgba(245, 245, 245, 1.0);

--text: rgba(0, 0, 0, 0.9);
  --muted: rgba(0, 0, 0, 0.6);
  --border: rgba(0, 0, 0, 0.12);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --positive: #00aa5a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Sundry', ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background: #f4f6f1;
  min-height: 100vh;
}

.bg-tint {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #dbdacc;
  pointer-events: none;
}

.bg-texture {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, #edede5 1px, transparent 2px),
    linear-gradient(to bottom, #edede5 1px, transparent 2px);
  background-size: 180px 180px;
  background-position: center;
  pointer-events: none;
  animation: bgTextureIn 600ms ease-out backwards;
}

@keyframes bgTextureIn {
  from {
    transform: scale(0.9);
  }
  to {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-texture {
    animation: none;
  }
}

.page {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  user-select: none;
}

.header {
  gap: 2rem;
  margin-top: auto;
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 18vh;
}

#logo {
  height: 2.5rem;
  width: auto;
  animation: logoIn 800ms ease backwards;
}

@keyframes logoIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  #logo {
    animation: none;
  }
}

a {
  color: inherit;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 180px));
  justify-content: center;
  gap: 3rem 2rem;
  padding-block: 3rem;
  margin-bottom: 2rem;
  background: rgba(142, 136, 129, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  animation: gridIn 420ms ease backwards;
}

@keyframes gridIn {
  from {
    transform: scale(0.93);
  }
  to {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .grid {
    animation: none;
  }
}

.tile {
  display: block;
  text-decoration: none;
  position: relative;
  z-index: 0;
  container-type: inline-size;
  animation: tileIn 480ms ease backwards;
  animation-delay: calc(var(--i, 0) * 40ms);
}

@keyframes tileIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile {
    animation: none;
  }
}

.tile:hover {
  z-index: 3;
}

.tileInner {
  --label-h: 42px;
  position: relative;
  display: grid;
  padding-bottom: var(--label-h);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tile-bg);
  box-shadow: var(--shadow);
  transition: transform 300ms ease, border-color 300ms ease, background 160ms ease, box-shadow 500ms ease;
}

.tile:hover .tileInner {
  transform: translateY(-8px) scale(1.01);
  background: rgb(255, 255, 255);
  border-color: rgba(120, 89, 255, 0.5);
  transition: transform 300ms ease, border-color 300ms ease, background 120ms ease, box-shadow 500ms ease;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.12);
}

.thumb {
  overflow: hidden;
  background: #dbdacc;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  position: relative;
}

.thumbImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.thumbImg,
.thumbPlaceholder {
  transition: transform 300ms ease;
}


.thumbPlaceholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(120, 89, 255, 0.25), rgba(0, 214, 214, 0.18));
}

.tileLabel {
  position: absolute;
  inset: auto 0 0 0;
  height: var(--label-h);
  box-sizing: border-box;
  padding: 11px 12px 10px;
  overflow: hidden;
  background: var(--tile-bg);
  transition: height 300ms ease, background 120ms ease;
}

.tile:hover .tileLabel {
  height: var(--label-open-h, 34%);
  background: rgb(255, 255, 255);
}

.tileName {
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.tileDescription {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  opacity: 0;
  transition: opacity 120ms ease;
}

.tile:hover .tileDescription {
  opacity: 1;
  transition: opacity 250ms ease 120ms;
}

@media (prefers-reduced-motion: reduce) {
  .tileLabel,
  .tileDescription,
  .thumbImg,
  .thumbPlaceholder {
    transition: none;
  }
}

.thumbLocalBadge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.4);
}

.thumbLocalBadge img {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

.thumbLocalBadge::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 100px;
  height: 30px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(20, 30, 20, 0.8);
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  pointer-events: none;
}

.thumbLocalBadge:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), transparent);
  padding: 14px 14px 16px;
  margin-top: 18px;
  box-shadow: var(--shadow);
}

.card--warning {
  border-color: rgba(255, 180, 0, 0.45);
}

.status--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(0, 0, 0, 0.12);
  border-top-color: #235537;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 1400ms;
  }
}

.cardTitle {
  margin: 0 0 6px;
  font-size: 16px;
}

.cardBody {
  margin: 0;
  color: var(--muted);
}


