/* ============================================================
   COSMIC CONNECTIONS — Dhruva Astronomy Club
   Modern, astrophysics-themed NYT Connections game
   ============================================================ */

:root {
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', -apple-system, sans-serif;

  /* Deep Space Theme */
  --bg-deep: #070b14;
  --bg-surface: rgba(15, 23, 42, 0.7);
  --bg-card: rgba(30, 41, 59, 0.65);
  --bg-card-hover: rgba(51, 65, 85, 0.8);
  --bg-card-selected: #38bdf8;
  --text-selected: #082f49;

  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-card: rgba(255, 255, 255, 0.14);
  --border-active: rgba(56, 189, 248, 0.8);

  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  /* Category Difficulties — Recommended Space Palette (Minimalist Gradient, Borderless) */

  /* Category Difficulties — Original Palette (Sampled from image) */

  /* 🟨 1. Classic Yellow (#F9DF6D) */
  --color-yellow-bg: linear-gradient(165deg,
    #fce98a 0%,
    #F9DF6D 45%,
    #eed054 100%);
  --color-yellow-border: #000000;
  --color-yellow-text: #171300;
  --color-yellow-shadow: rgba(249, 223, 109, 0.35);

  /* 🟩 2. Classic Green (#A0C35A) */
  --color-green-bg: linear-gradient(165deg,
    #b3d56b 0%,
    #A0C35A 45%,
    #8db047 100%);
  --color-green-border: #000000;
  --color-green-text: #121a00;
  --color-green-shadow: rgba(160, 195, 90, 0.35);

  /* 🟦 3. Classic Blue (#B0C4EF) */
  --color-blue-bg: linear-gradient(165deg,
    #c4d5f7 0%,
    #B0C4EF 45%,
    #96b0e8 100%);
  --color-blue-border: #000000;
  --color-blue-text: #07152d;
  --color-blue-shadow: rgba(176, 196, 239, 0.35);

  /* 🟪 4. Classic Purple (#BA81C5) */
  --color-purple-bg: linear-gradient(165deg,
    #cb94d4 0%,
    #BA81C5 45%,
    #a66db1 100%);
  --color-purple-border: #000000;
  --color-purple-text: #23072c;
  --color-purple-shadow: rgba(186, 129, 197, 0.35);

  --color-cyan: #48bfff;
  --color-cyan-glow: rgba(72, 191, 255, 0.4);

  --header-height: 64px;
  --max-content-width: 580px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  width: 100%;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

body {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-deep);
  background-image: url('assets/dhruva_observatory_bg.jpg?v=landscape4');
  background-size: cover;
  background-position: center 72%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-main);
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  position: relative;
}

.bg-image {
  display: none;
}

#starfield {
  display: none;
}

.nebula-glow {
  display: none;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 50;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.header-right {
  justify-content: flex-end;
}

.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

#game-title {
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 3.8vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #ffffff 40%, #bae6fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dhruva-badge {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--color-cyan);
  text-transform: uppercase;
  margin-top: -2px;
}

.header-icon-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.header-icon-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

#reset-puzzle-btn svg {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#reset-puzzle-btn:hover svg {
  transform: rotate(-180deg);
}

.hint-pill-btn {
  padding: 6px 12px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.hint-pill-btn:hover {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.6);
  color: #fef08a;
}

#dhruva-logo-link {
  display: flex;
  align-items: center;
  touch-action: manipulation;
}

#dhruva-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

#dhruva-logo:hover {
  transform: scale(1.08);
  border-color: var(--color-cyan);
}

.game-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  margin-left: 8px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  touch-action: manipulation;
}

.game-link:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: var(--color-cyan);
}

.stardle-short-text {
  display: none;
}

.mobile-community-bar {
  display: none;
}

/* ============================================================
   MAIN CONTAINER
   ============================================================ */
#game-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 30px 14px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

.game-meta {
  text-align: center;
  margin-bottom: 14px;
}

#puzzle-title-display {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.weekly-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 12px;
  background: rgba(14, 23, 42, 0.65);
  border: 1px solid rgba(72, 191, 255, 0.28);
  border-radius: 16px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #cbd5e1;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.weekly-timer-badge svg {
  color: var(--color-cyan);
  flex-shrink: 0;
}

.weekly-timer-badge strong {
  color: #38bdf8;
  font-weight: 700;
  letter-spacing: 0.04em;
}

#game-instructions {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ============================================================
   SOLVED CATEGORIES LIST
   ============================================================ */
#solved-categories-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.solved-banner {
  width: 100%;
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: bannerReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

/* Gloss shine strip at the top */
.solved-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  pointer-events: none;
  border-radius: 12px 12px 0 0;
}

/* Bright edge highlight */
.solved-banner::after {
  content: '';
  display: none;
}

.solved-banner.level-0 {
  background: var(--color-yellow-bg);
  border: 2px solid #000000;
  color: var(--color-yellow-text);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    0 2px 8px var(--color-yellow-shadow);
}

.solved-banner.level-1 {
  background: var(--color-green-bg);
  border: 2px solid #000000;
  color: var(--color-green-text);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    0 2px 8px var(--color-green-shadow);
}

.solved-banner.level-2 {
  background: var(--color-blue-bg);
  border: 2px solid #000000;
  color: var(--color-blue-text);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    0 2px 8px var(--color-blue-shadow);
}

.solved-banner.level-3 {
  background: var(--color-purple-bg);
  border: 2px solid #000000;
  color: var(--color-purple-text);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    0 2px 8px var(--color-purple-shadow);
}

.banner-category-name {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 3.2vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.banner-category-words {
  font-size: clamp(0.85rem, 2.8vw, 0.95rem);
  font-weight: 500;
  opacity: 0.92;
}

.banner-fact-toggle {
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  color: inherit;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.banner-fact-toggle:hover {
  opacity: 1;
}

.banner-fact-text {
  font-size: 0.8rem;
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  line-height: 1.35;
  font-style: italic;
  display: none;
}

.banner-fact-text.open {
  display: block;
}

/* ============================================================
   GRID OF TILES
   ============================================================ */
#grid-container {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.tile {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 4px;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(0.72rem, 2.6vw, 0.98rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1),
              background 0.15s ease,
              border-color 0.15s ease,
              box-shadow 0.15s ease;
  height: 72px;
  min-height: 56px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  touch-action: manipulation;
}

@media (hover: hover) {
  .tile:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.3);
  }
}

.tile:active {
  transform: scale(0.96);
}

.tile.selected {
  background: #38bdf8 !important;
  color: #031326 !important;
  border-color: #7dd3fc !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
  transform: translateY(-2px);
}

.tile.shake {
  animation: shake 0.45s ease-in-out;
}

.tile.clearing {
  animation: popOut 0.35s forwards;
}

/* Long word auto scaling */
.tile[data-long="true"] {
  font-size: clamp(0.6rem, 2vw, 0.8rem);
  line-height: 1.1;
}

.tile[data-xlong="true"] {
  font-size: clamp(0.50rem, 1.7vw, 0.68rem);
  line-height: 1.05;
}

/* ============================================================
   MISTAKES REMAINING
   ============================================================ */
.mistakes-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.mistakes-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.mistakes-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dot.lost {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  transform: scale(0.7);
}

/* ============================================================
   ACTION BUTTONS
   ============================================================ */
.action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 28px;
  padding: 12px 22px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  user-select: none;
  touch-action: manipulation;
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (hover: hover) {
  .btn-secondary:hover:not(:disabled) {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
  }

  .btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.55);
    transform: translateY(-1px);
  }
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  animation: toastFade 2.4s ease forwards;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.12);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-card {
  transform: scale(1);
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s;
  touch-action: manipulation;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-body {
  padding: 20px 20px 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  line-height: 1.5;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

.modal-intro {
  margin-bottom: 14px;
}

.rules-list {
  padding-left: 20px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-examples-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.category-pill {
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.pill-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.pill-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.88rem;
}

.pill-items {
  font-size: 0.8rem;
  opacity: 0.85;
}

.pill-yellow {
  background: var(--color-yellow-bg);
  border: 2px solid #000000;
  color: var(--color-yellow-text);
  box-shadow: 0 2px 10px var(--color-yellow-shadow);
}
.pill-green {
  background: var(--color-green-bg);
  border: 2px solid #000000;
  color: var(--color-green-text);
  box-shadow: 0 2px 10px var(--color-green-shadow);
}
.pill-blue {
  background: var(--color-blue-bg);
  border: 2px solid #000000;
  color: var(--color-blue-text);
  box-shadow: 0 2px 10px var(--color-blue-shadow);
}
.pill-purple {
  background: var(--color-purple-bg);
  border: 2px solid #000000;
  color: var(--color-purple-text);
  box-shadow: 0 2px 10px var(--color-purple-shadow);
}

.modal-tip {
  margin-top: 14px;
  font-size: 0.85rem;
  color: #94a3b8;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

/* ============================================================
   STATS & ARCHIVE MODAL STYLING
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.guess-distribution {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.dist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  width: 100%;
  min-width: 0;
}

.dist-num {
  font-size: 0.82rem;
  font-weight: 700;
  width: 14px;
  text-align: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.dist-bar-wrap {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  height: 22px;
  display: flex;
  overflow: hidden;
  min-width: 0;
}

.dist-bar {
  background: #38bdf8;
  height: 100%;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-weight: 700;
  font-size: 0.75rem;
  color: #042f4c;
  min-width: 20px;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 3px;
  transition: width 0.35s ease;
}

.dist-row.highlight .dist-bar {
  background: linear-gradient(90deg, #38bdf8 0%, #818cf8 100%);
  color: #031326;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.dist-row.highlight .dist-num {
  color: var(--color-cyan);
}

.empty-stats-msg {
  text-align: center;
  padding: 24px 14px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

/* Archive List */
.archive-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.archive-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.archive-card:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.4);
}

.archive-card.active-puzzle {
  border-color: var(--color-cyan);
  background: rgba(56, 189, 248, 0.12);
}

.archive-info-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}

.archive-info-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.archive-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.archive-badge.completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.archive-card.locked-puzzle {
  cursor: not-allowed;
  opacity: 0.48;
}

.archive-card.locked-puzzle:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
}

.archive-badge.locked-badge {
  background: rgba(255, 255, 255, 0.05);
  color: #64748b;
  font-size: 1rem;
  padding: 2px 8px;
}

/* Hints List */
.hints-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hint-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.25s ease;
}

.hint-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.hint-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hint-category-badge {
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.hint-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.hint-reveal-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 16px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
}

.hint-reveal-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.hint-reveal-btn.active {
  background: rgba(72, 191, 255, 0.18);
  border-color: rgba(72, 191, 255, 0.45);
  color: #7dd3fc;
}

.hint-reveal-btn svg {
  transition: transform 0.25s ease;
}

.hint-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  animation: bannerReveal 0.3s ease;
}

.hint-guidance-text,
.hint-category-name {
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  color: #f1f5f9;
  line-height: 1.4;
  margin: 0;
}

/* ============================================================
   GAME OVER MODAL
   ============================================================ */
.game-over-message {
  text-align: center;
  font-size: 1.05rem;
  color: #ffffff;
  margin-bottom: 16px;
}

.emoji-result-preview {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.5;
  letter-spacing: 0.2em;
  margin-bottom: 18px;
  user-select: all;
}

.astronomy-insights-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-cyan);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.game-over-categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.insight-card {
  border-radius: 8px;
  padding: 10px 12px;
}

.insight-card.level-0 { background: var(--color-yellow-bg); border: 2px solid #000000; color: var(--color-yellow-text); box-shadow: 0 2px 10px var(--color-yellow-shadow); }
.insight-card.level-1 { background: var(--color-green-bg); border: 2px solid #000000; color: var(--color-green-text); box-shadow: 0 2px 10px var(--color-green-shadow); }
.insight-card.level-2 { background: var(--color-blue-bg); border: 2px solid #000000; color: var(--color-blue-text); box-shadow: 0 2px 10px var(--color-blue-shadow); }
.insight-card.level-3 { background: var(--color-purple-bg); border: 2px solid #000000; color: var(--color-purple-text); box-shadow: 0 2px 10px var(--color-purple-shadow); }

.insight-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.88rem;
}

.insight-words {
  font-size: 0.78rem;
  margin-bottom: 4px;
  opacity: 0.9;
}

.insight-desc {
  font-size: 0.8rem;
  line-height: 1.35;
  opacity: 0.95;
  font-style: italic;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 4px;
  margin-top: 4px;
}

.game-over-timer-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(72, 191, 255, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(72, 191, 255, 0.06);
}

.timer-card-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-cyan);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.timer-countdown-digits {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-shadow: 0 0 16px rgba(72, 191, 255, 0.45);
  margin-bottom: 4px;
}

.timer-subtext {
  font-size: 0.76rem;
  color: #94a3b8;
  font-style: italic;
}

.game-over-actions {
  display: flex;
  gap: 10px;
}

.game-over-actions .btn {
  flex: 1;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@keyframes popOut {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.7; }
  100% { transform: scale(0.5); opacity: 0; }
}

.tile.clearing {
  animation: popOut 0.35s cubic-bezier(0.4, 0, 0.6, 1) forwards;
  pointer-events: none;
}

@keyframes bannerReveal {
  0% { transform: translateY(-10px) scale(0.96); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes toastFade {
  0% { opacity: 0; transform: translateY(-10px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* ============================================================
   VIEW BACKGROUND PHOTO FEATURE
   ============================================================ */
.view-photo-btn {
  position: fixed;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  right: calc(22px + env(safe-area-inset-right, 0px));
  background: rgba(10, 15, 29, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  padding: 8px 14px;
  border-radius: 22px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  z-index: 60;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
  user-select: none;
  touch-action: manipulation;
}

.view-photo-btn:hover {
  background: rgba(22, 32, 58, 0.92);
  color: #ffffff;
  border-color: rgba(72, 191, 255, 0.5);
  box-shadow: 0 4px 22px rgba(72, 191, 255, 0.25);
  transform: translateY(-2px);
}

.view-photo-btn.active {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  box-shadow: 0 4px 22px rgba(239, 68, 68, 0.35);
}

.view-photo-btn.active:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #ffffff;
}

/* Photo Modal Backdrop & Scrollable Vertical Viewer */
.modal-backdrop.photo-modal-backdrop {
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  padding: 0;
  background: rgba(3, 7, 18, 0.94);
  -webkit-overflow-scrolling: touch;
}

.photo-viewer-container {
  width: 100%;
  max-width: 640px;
  min-height: 100vh;
  overflow-x: hidden;
  touch-action: pan-y;
  margin: 0 auto;
  padding: 16px 14px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.photo-viewer-header {
  position: sticky;
  top: 14px;
  z-index: 50;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 15, 29, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  margin-bottom: 18px;
}

.photo-viewer-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.photo-badge {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.photo-scroll-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.photo-viewer-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.photo-viewer-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.7);
  color: #ffffff;
  transform: scale(1.05);
}

.photo-viewer-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-figure {
  width: 100%;
  margin: 0;
}

.photo-frame {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000000;
}

.full-vertical-photo {
  width: 100%;
  height: auto;
  display: block;
}

.photo-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px 4px;
  text-align: center;
  color: #e2e8f0;
  font-family: var(--font-main);
  line-height: 1.5;
}

.photo-caption-location {
  font-size: 0.95rem;
}

.photo-caption-credit {
  color: #ffffff;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.photo-viewer-heading {
  font-family: var(--font-mono);
  font-size: 0.90rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
}

/* ============================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS
   ============================================================ */

/* Touch-action and tap highlight for interactive controls */
.tile,
.btn,
.header-icon-btn,
.game-link,
.modal-close-btn,
.hint-reveal-btn,
.banner-fact-toggle,
.view-photo-btn,
.archive-card {
  touch-action: manipulation;
}

/* Base safe area support */
body {
  min-height: 100vh;
  min-height: 100dvh;
}

/* TABLET & SMALL LAPTOPS (max-width: 768px) */
@media (max-width: 768px) {
  body {
    background-attachment: scroll; /* Eliminates mobile Safari / Chrome stutter */
  }

  #game-container {
    max-width: 520px;
    padding: 20px 14px calc(70px + env(safe-area-inset-bottom, 0px));
  }
}

/* SMARTPHONES & COMPACT SCREENS (max-width: 640px) */
@media (max-width: 640px) {
  :root {
    --header-height: 58px;
  }

  header {
    padding: 0 max(12px, env(safe-area-inset-left, 12px));
    justify-content: space-between;
  }

  /* Move community links down to mobile bar */
  #dhruva-logo-link,
  header .game-link {
    display: none !important;
  }

  .header-left {
    flex: 0 0 auto;
    gap: 8px;
  }

  .header-right {
    flex: 0 0 auto;
    gap: 8px;
    justify-content: flex-end;
  }

  .header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    padding: 0 8px;
  }

  #game-title {
    font-size: clamp(0.95rem, 3.8vw, 1.25rem);
    letter-spacing: 0.08em;
    white-space: nowrap;
    text-align: center;
    margin: 0;
  }

  .header-icon-btn {
    min-width: 38px;
    min-height: 38px;
    padding: 7px;
    border-radius: 8px;
  }

  .hint-pill-btn span {
    display: none;
  }

  .hint-pill-btn {
    padding: 7px;
    border-radius: 8px;
  }

  #game-container {
    padding: 12px 10px calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .game-meta {
    margin-bottom: 10px;
  }

  #puzzle-title-display {
    font-size: 0.88rem;
  }

  .weekly-timer-badge {
    margin-top: 4px;
    padding: 3px 10px;
    font-size: 0.72rem;
  }

  /* Mobile Community & Partner Bar */
  .mobile-community-bar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 18px auto 0;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  }

  .mobile-dhruva-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
  }

  .mobile-dhruva-link:hover,
  .mobile-dhruva-link:active {
    color: #ffffff;
  }

  .mobile-dhruva-logo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .mobile-community-dot {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
  }

  .mobile-game-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--color-cyan);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
  }

  .mobile-game-link:hover,
  .mobile-game-link:active {
    color: #bae6fd;
  }

  .game-meta {
    margin-bottom: 10px;
  }

  #puzzle-title-display {
    font-size: 0.88rem;
  }

  .weekly-timer-badge {
    margin-top: 4px;
    padding: 3px 10px;
    font-size: 0.72rem;
  }

  #game-instructions {
    font-size: 0.84rem;
    margin-top: 4px;
  }

  /* 4-column Grid on Mobile */
  #grid-container {
    gap: 6px;
    margin-bottom: 14px;
  }

  .tile {
    height: auto;
    min-height: 52px;
    padding: 6px 3px;
    font-size: clamp(0.70rem, 2.7vw, 0.90rem);
    line-height: 1.15;
    border-radius: 7px;
  }

  .tile[data-long="true"] {
    font-size: clamp(0.58rem, 2.3vw, 0.74rem);
    line-height: 1.1;
  }

  .mistakes-container {
    margin-bottom: 14px;
    gap: 8px;
  }

  .mistakes-label {
    font-size: 0.82rem;
  }

  .dot {
    width: 10px;
    height: 10px;
  }

  /* Action Buttons: evenly distributed in 1 row */
  .action-buttons {
    gap: 8px;
  }

  .action-buttons .btn {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 10px 8px;
    font-size: 0.80rem;
    letter-spacing: 0.01em;
  }

  .action-buttons .btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  .btn-secondary {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.24);
  }

  /* Solved Banners on Mobile */
  .solved-banner {
    padding: 10px 8px;
    border-radius: 10px;
  }

  .banner-category-name {
    font-size: clamp(0.82rem, 3.2vw, 0.98rem);
    margin-bottom: 2px;
  }

  .banner-category-words {
    font-size: clamp(0.72rem, 2.6vw, 0.84rem);
  }

  .banner-fact-toggle {
    min-height: 28px;
    padding: 4px 10px;
    font-size: 0.68rem;
    margin-top: 5px;
  }

  .banner-fact-text {
    font-size: 0.76rem;
    padding: 6px 8px;
  }

  /* View Photo Button: in-flow centered below game controls on mobile */
  .view-photo-btn {
    position: static;
    margin: 16px auto 20px;
    display: flex;
    width: fit-content;
    padding: 8px 16px;
    font-size: 0.74rem;
    background: rgba(10, 15, 29, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  }

  /* Modals on Mobile */
  .modal-backdrop {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 10px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .modal-card {
    max-height: 88dvh;
    border-radius: 14px;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-header h2 {
    font-size: 1.05rem;
  }

  .modal-close-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 1.3rem;
  }

  .modal-body {
    padding: 14px 14px 20px;
    font-size: 0.86rem;
  }

  /* Stats grid on mobile */
  .stats-row {
    gap: 6px;
    margin-bottom: 16px;
  }

  .stat-box {
    padding: 8px 4px;
  }

  .stat-num {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.62rem;
  }

  .dist-row {
    gap: 6px;
  }

  .dist-bar {
    padding: 0 6px;
    font-size: 0.7rem;
    min-width: 18px;
  }

  /* Game Over Modal actions */
  .game-over-actions {
    flex-direction: column;
    gap: 8px;
  }

  .game-over-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  .game-over-timer-card {
    padding: 12px 14px;
    margin-bottom: 16px;
  }

  .timer-countdown-digits {
    font-size: clamp(1.1rem, 4.5vw, 1.4rem);
  }
}

/* NARROW PHONES (max-width: 360px, e.g. iPhone SE 1st gen, Galaxy Z Fold outer, 320px screens) */
@media (max-width: 360px) {
  :root {
    --header-height: 52px;
  }

  header {
    padding: 0 6px;
  }

  .header-left, .header-right {
    gap: 3px;
  }

  .header-icon-btn {
    min-width: 34px;
    min-height: 34px;
    padding: 5px;
  }

  .header-icon-btn svg {
    width: 16px;
    height: 16px;
  }

  #game-title {
    font-size: 0.88rem;
    letter-spacing: 0.05em;
  }

  #game-container {
    padding: 8px 6px calc(65px + env(safe-area-inset-bottom, 0px));
  }

  #grid-container {
    gap: 4px;
    margin-bottom: 10px;
  }

  .tile {
    min-height: 46px;
    padding: 4px 2px;
    font-size: clamp(0.62rem, 2.5vw, 0.80rem);
  }

  .tile[data-long="true"] {
    font-size: clamp(0.50rem, 2.1vw, 0.66rem);
    line-height: 1.05;
  }

  .action-buttons {
    gap: 5px;
  }

  .action-buttons .btn {
    min-height: 42px;
    padding: 8px 4px;
    font-size: 0.74rem;
  }

  .action-buttons .btn svg {
    display: none; /* Hide icon on 320px to save space for text */
  }

  .weekly-timer-badge {
    font-size: 0.68rem;
    padding: 2px 8px;
  }

  .category-pill {
    padding: 8px 10px;
  }

  .pill-title {
    font-size: 0.80rem;
  }

  .pill-items {
    font-size: 0.72rem;
  }
}

/* LANDSCAPE ORIENTATION ON PHONES (max-height: 500px and orientation: landscape) */
@media (max-height: 500px) and (orientation: landscape) {
  :root {
    --header-height: 46px;
  }

  body {
    background-attachment: scroll;
  }

  header {
    padding: 0 max(12px, env(safe-area-inset-left, 12px));
  }

  #game-container {
    padding: 6px 12px calc(45px + env(safe-area-inset-bottom, 0px));
    max-width: 600px;
  }

  .game-meta {
    margin-bottom: 6px;
  }

  #puzzle-title-display {
    font-size: 0.82rem;
    display: inline-block;
    margin-right: 8px;
  }

  .weekly-timer-badge {
    display: inline-flex;
    margin-top: 0;
    padding: 2px 8px;
    font-size: 0.68rem;
  }

  #game-instructions {
    display: none; /* Conserve vertical space in short landscape */
  }

  #grid-container {
    gap: 5px;
    margin-bottom: 8px;
  }

  .tile {
    height: 42px;
    min-height: 38px;
    font-size: 0.76rem;
    padding: 2px 4px;
  }

  .tile[data-long="true"] {
    font-size: 0.66rem;
  }

  .solved-banner {
    padding: 6px 8px;
    margin-bottom: 4px;
  }

  .banner-category-name {
    font-size: 0.80rem;
    margin-bottom: 1px;
  }

  .banner-category-words {
    font-size: 0.72rem;
  }

  .banner-fact-toggle, .banner-fact-text {
    display: none; /* Keep clean in short landscape */
  }

  .mistakes-container {
    margin-bottom: 8px;
    gap: 8px;
  }

  .mistakes-label {
    font-size: 0.78rem;
  }

  .dot {
    width: 9px;
    height: 9px;
  }

  .action-buttons {
    gap: 8px;
  }

  .action-buttons .btn {
    min-height: 38px;
    padding: 6px 14px;
    font-size: 0.78rem;
  }

  .view-photo-btn {
    position: static;
    margin: 10px auto 16px;
    display: flex;
    width: fit-content;
    padding: 5px 12px;
    font-size: 0.68rem;
  }

  .modal-card {
    max-height: 92dvh;
  }

  .modal-header {
    padding: 8px 14px;
  }

  .modal-body {
    padding: 10px 14px 16px;
  }
}

/* ACCESSIBILITY: PREFERS-REDUCED-MOTION */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .tile.shake,
  .tile.clearing,
  .solved-banner {
    animation: none !important;
  }
}

/* ACCESSIBILITY: FOCUS-VISIBLE INDICATORS */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
}
