:root {
  color-scheme: dark;
  --glass-bg: rgba(7, 12, 24, 0.76);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text-muted: rgba(235, 240, 255, 0.7);
  --shadow: 0 35px 80px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  max-height: 100vh;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f5f8ff;
  background-color: #05080d;
  background-image:
    linear-gradient(135deg, rgba(4, 9, 18, 0.85), rgba(6, 12, 24, 0.75)),
    url('./background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}

main.wrap {
  flex: 1;
  min-height: calc(100vh - 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 1.5rem 6rem;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
}

.mood-visual {
  display: flex;
  justify-content: center;
  margin: 0 0 1.5rem;
}

.mood-visual img {
  width: 60%;
  max-width: 100%;
  height: auto;
}

.card {
  width: min(560px, 100%);
  padding: clamp(2rem, 5vw, 3rem);
  border-radius: 26px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

  .card-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(640px, 100%);
  padding: 0 clamp(2.5rem, 6vw, 3.75rem);
}

.card-shell .card {
  flex: 0 1 min(560px, 100%);
}

.day-nav {
  position: absolute;
  top: 50%;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f5f8ff;
  border-radius: 999px;
  width: clamp(46px, 4.5vw, 58px);
  height: clamp(46px, 4.5vw, 58px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.3rem, 3vw, 1.85rem);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(-50%);
}

.day-nav--prev {
  left: clamp(0.5rem, 2.5vw, 1.5rem);
}

.day-nav--next {
  right: clamp(0.5rem, 2.5vw, 1.5rem);
}

.day-nav:disabled {
  opacity: 0.35;
  cursor: default;
  transform: translateY(-50%);
  box-shadow: none;
}

.day-nav:not(:disabled):active {
  transform: translateY(-50%) scale(0.97);
}

.day-nav:focus-visible {
  outline: 2px solid rgba(135, 182, 255, 0.9);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .day-nav:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.32);
    transform: translateY(-50%) scale(1.05);
  }
}

.card__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  align-items: center;
  text-align: center;
}

.stat__label {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.25em;
}

.big {
  font-size: clamp(3.25rem, 8vw, 4.75rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.meta-item {
  padding: 1rem 1.25rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.meta-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.meta-value {
  font-size: 1.1rem;
  font-weight: 500;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(90, 158, 255, 0.15);
  border: 1px solid rgba(90, 158, 255, 0.35);
  color: #d7e6ff;
  font-size: 0.95rem;
}

@media (max-width: 520px) {
  body {
    min-height: 100svh;
    max-height: none;
  }

  main.wrap {
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
    padding: 1.2rem 1rem 5.25rem;
  }

  h1 {
    margin-bottom: 1rem;
    font-size: clamp(1.6rem, 6vw, 1.85rem);
  }

  .card {
    width: 100%;
    border-radius: 20px;
    padding: 1.6rem 1.25rem 1.4rem;
    touch-action: pan-y;
  }

    .card-shell {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    max-width: none;
    gap: 0;
    touch-action: pan-y;
  }

  .card-shell .card {
    flex: 1 1 auto;
  }

  .mood-visual {
    margin-bottom: 0.75rem;
  }

  .mood-visual img {
    max-width: 180px;
  }

  .stat {
    margin-bottom: 0.75rem;
  }

  .big {
    font-size: clamp(2.6rem, 18vw, 3.3rem);
  }

  .day-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    min-width: 44px;
    min-height: 44px;
    padding: 0.35rem;
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    color: #e7eeff;
    z-index: 3;
  }

  .day-nav--prev { left: 0.25rem; }
  .day-nav--next { right: 0.25rem; }

  .day-nav:disabled {
    opacity: 0.55;
  }

  .day-nav:not(:disabled):active {
    transform: translateY(-50%) scale(0.94);
  }

  .meta-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

.ticker {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 48px;
  background: #0d141d;
  border-top: 1px solid #223;
  overflow: hidden;
  display: flex;
  align-items: center;
  z-index: 9999;
  white-space: nowrap;
}

.ticker__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.ticker__track {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
  min-width: 200%;
}

.ticker__item {
  display: inline-block;
  margin: 0 28px;
  font-size: 15px;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 60ch;
  overflow: hidden;
}

.dot { opacity: .45; margin: 0 12px; }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (hover:hover) and (pointer:fine) {
  .ticker:hover .ticker__track {
    animation-play-state: paused;
    cursor: default;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ticker__track {
    animation: ticker-scroll 40s linear infinite;
  }
}

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

