:root {
  --ink: #f6f2e8;
  --ink-soft: rgba(255, 255, 255, 0.78);
  --accent: #ff5049;
  --accent-2: #ff7872;
  --accent-3: #ff9a95;
  --panel: rgba(10, 10, 10, 0.62);
  --panel-strong: rgba(10, 10, 10, 0.78);
  --shadow: rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #060606;
  color: var(--ink);
  font-family: 'ProtestStrike-Regular', 'Arial Narrow Bold', sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Mini framework utilities */
.ui {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 90px;
  z-index: 1;
}

.ui-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(980px, 94vw);
}

.ui-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-top {
  display: block;
  width: 100%;
  margin-bottom: 12px;
}

.hero-top .ui-tag {
  justify-self: start;
  width: max-content;
  max-width: 100%;
}

.hero-actions {
  justify-self: end;
  align-self: start;
  margin-left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.ui-list.hero-actions {
  flex-direction: row;
}

.top-menu-fixed {
  position: fixed;
  top: 5px;
  right: 5px;
  z-index: 1300;
}

.top-menu-shell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 999px;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

.lang-switch-wrap {
  display: inline-flex;
  position: relative;
  min-height: 38px;
}

.lang-switch {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  min-height: 38px;
  min-width: 58px;
  padding: 4px 10px;
  text-align: center;
  text-align-last: center;
  font-family: 'ProtestStrike-Regular', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-image: none !important;
}

.map-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 38px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.52);
  overflow: hidden;
}

.map-switch-btn {
  position: relative;
  z-index: 2;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111111;
  font-family: 'ProtestStrike-Regular', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
  transform: translateY(1px);
}

.map-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #ff5049;
  transition: transform 0.22s ease;
  z-index: 1;
}

.map-switch[data-mode="3d"] .map-switch-thumb {
  transform: translateX(33px);
}

.hof-icon-link {
  text-decoration: none;
  border-radius: 999px;
  min-height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.52);
  font-size: 1.05rem;
  line-height: 1;
}

.member-icon-link {
  text-decoration: none;
  border-radius: 999px;
  min-height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.52);
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.member-icon-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
}

.member-icon-link.is-member {
  border-color: rgba(255, 216, 77, 0.92);
  background: linear-gradient(140deg, #ffd84d, #ffbf2f);
  color: #2b1a00;
  box-shadow: 0 0 0 2px rgba(255, 216, 77, 0.22), 0 10px 22px rgba(0, 0, 0, 0.35);
  animation: memberButtonGlow 2s ease-in-out infinite;
}

@keyframes memberButtonGlow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 216, 77, 0.16), 0 10px 22px rgba(0, 0, 0, 0.35); }
  50% { box-shadow: 0 0 0 4px rgba(255, 216, 77, 0.30), 0 12px 24px rgba(0, 0, 0, 0.38); }
}

/* Hall of Fame specific top-menu order: language -> home -> member -> trophy */
.page-hof .top-menu-shell .lang-switch-wrap { order: 1; }
.page-hof .top-menu-shell .home-icon-link { order: 2; }
.page-hof .top-menu-shell .member-icon-link { order: 3; }
.page-hof .top-menu-shell .hof-icon-link[title="Hall of Fame"] { order: 4; }

.home-icon-link {
  filter: grayscale(1);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.ui-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 30px 80px var(--shadow);
  backdrop-filter: none;
}

.ui-title {
  font-family: 'RoadRage-Regular', Impact, sans-serif;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
  margin: 0;
}

.ui-subtitle {
  font-family: 'ProtestStrike-Regular', sans-serif;
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  color: var(--ink-soft);
  margin: 0;
}

.ui-stat {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.ui-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 350px 999px 999px 350px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.ui-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.ui-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.ui-duo .ui-card {
  height: 100%;
}

.ui-button {
  appearance: none;
  border: none;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  font-size: 1.1rem;
  font-family: 'ProtestStrike-Regular', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.ui-button:hover {
  transform: scale(1.04) rotate(-0.5deg);
  background: rgba(255, 255, 255, 0.2);
}

.ui-button.primary {
  background: linear-gradient(130deg, #ff5049, #ff7872);
  color: #ffffff;
}

.ui-button.secondary {
  background: linear-gradient(130deg, #7bb3ff, #79f2c0);
  color: #06131b;
}

.ui-button.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.mode-toggle {
  --btn-w: 58px;
  --pad-x: 10px;
  --gap: 6px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--gap);
  padding: 14px var(--pad-x);
  border-radius: 350px 999px 999px 350px !important;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  min-width: calc(var(--btn-w) * 2 + var(--pad-x) * 2 + var(--gap));
  min-height: 54px;
  justify-content: center;
}

.mode-toggle-hero {
  align-self: flex-start;
  margin-top: 4px;
}

.mode-toggle-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mode-toggle-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: #ffd84d;
  color: #111111;
  padding: 6px 10px;
  border-radius: 999px;
  z-index: 3;
  animation: newPulse 1.4s ease-in-out infinite;
  position: absolute;
  right: -18px;
  top: -10px;
  box-shadow: 0 6px 16px rgba(255, 216, 77, 0.35);
}

.mode-toggle-button {
  background: transparent;
  border: none;
  color: var(--ink);
  padding: 10px 10px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  z-index: 2;
  position: relative;
  width: var(--btn-w);
  text-align: center;
}

.mode-toggle-thumb {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: var(--btn-w);
  border-radius: 999px;
  background: linear-gradient(130deg, #ff5049, #ff7872);
  left: var(--pad-x);
  transition: transform 0.25s ease;
  z-index: 1;
}

.mode-toggle[data-mode="3d"] .mode-toggle-thumb {
  transform: translateX(calc(var(--btn-w) + var(--gap)));
}

.mode-toggle[data-mode="2d"] .mode-toggle-thumb {
  border-radius: 8px;
}

.mode-toggle[data-mode="3d"] .mode-toggle-thumb {
  border-radius: 999px;
  box-shadow:
    inset -10px -12px 20px rgba(0, 0, 0, 0.55),
    inset 10px 10px 18px rgba(255, 255, 255, 0.4),
    0 12px 22px rgba(0, 0, 0, 0.45);
}

.mode-toggle-hint {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.poll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.community-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
}

.poll-option {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 1rem;
  font-family: 'ProtestStrike-Regular', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.poll-option:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.poll-option.is-selected {
  background: linear-gradient(130deg, #ff5049, #ff7872);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.poll-option.poll-option--leader {
  border-color: rgba(255, 217, 77, 0.8);
  box-shadow: 0 0 0 2px rgba(255, 217, 77, 0.22), 0 10px 22px rgba(0, 0, 0, 0.32);
  animation: pollLeaderPulse 1.6s ease-in-out infinite;
}

@keyframes pollLeaderPulse {
  0% { transform: translateY(0); }
  50% { transform: translateY(-1px); box-shadow: 0 0 0 3px rgba(255, 217, 77, 0.35), 0 12px 24px rgba(0, 0, 0, 0.35); }
  100% { transform: translateY(0); }
}

.poll-option.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.poll-status {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.wish-box {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.recent-animals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.recent-animal-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 10, 15, 0.58);
  color: #fff;
  cursor: pointer;
  text-align: left;
}

.recent-animal-pill:hover,
.recent-animal-pill.is-active {
  border-color: rgba(255, 80, 73, 0.92);
  box-shadow: 0 0 0 2px rgba(255, 80, 73, 0.22);
}

.recent-animal-pill img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.recent-animal-pill span {
  font-size: .95rem;
  line-height: 1.1;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.recent-animal-detail {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.34);
}

.recent-animal-detail__image {
  width: min(240px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-bottom: 10px;
}

.recent-animal-detail__name {
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffd763;
}

.recent-animal-detail__desc {
  margin-top: 6px;
  font-size: .94rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
}

.recent-animal-popup__content {
  width: min(680px, 94vw);
}

.recent-animal-popup__image {
  display: block;
  width: min(520px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 6px auto 10px auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.recent-animal-popup__name {
  font-size: clamp(1.05rem, 2.3vw, 1.35rem);
  font-weight: 700;
  color: #ffd763;
  text-align: center;
}

.recent-animal-popup__desc {
  margin-top: 8px;
  font-size: 0.98rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.recent-animals-empty {
  margin-top: 10px;
  opacity: .85;
}

.wish-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 8px;
}

#animal-wish-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--ink);
  padding: 10px 12px;
  font-family: 'ProtestStrike-Regular', sans-serif;
  font-size: 0.98rem;
}

#animal-wish-input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

#animal-wish-website {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.promo-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  border-radius: 18px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 100%;
}

.promo-card:hover {
  transform: scale(1.02) rotate(-0.4deg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.promo-card img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.promo-card-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.promo-card-title {
  font-family: 'RoadRage-Regular', Impact, sans-serif;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.promo-card-subtitle {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.seo-rich-card {
  background: linear-gradient(135deg, rgba(9, 9, 9, 0.78), rgba(20, 10, 10, 0.78));
}

.seo-rich-copy {
  margin-top: 8px;
  max-width: 90ch;
  font-size: clamp(0.82rem, 1.5vw, 1rem);
  line-height: 1.34;
}

.expand-copy {
  margin-top: 10px;
}

.expand-copy summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 12px;
}

.expand-copy summary::-webkit-details-marker {
  display: none;
}

.expand-copy summary::after {
  content: "+";
  font-weight: 700;
}

.expand-copy[open] summary::after {
  content: "-";
}

.expand-copy > *:not(summary) {
  margin-top: 8px;
}

.ui-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ui-link {
  text-decoration: none;
  color: inherit;
}

/* Animated background */
#animated-landscape {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  transform: translateZ(0);
  will-change: transform;
  isolation: isolate;
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  contain: layout style;
}

#animated-landscape svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* pop-in base style (used site-wide) */
.pop-in {
  animation: popIn 0.6s ease-out both;
}

.pop-in.delay-1 { animation-delay: 0.08s; }
.pop-in.delay-2 { animation-delay: 0.16s; }
.pop-in.delay-3 { animation-delay: 0.24s; }
.pop-in.delay-4 { animation-delay: 0.32s; }

@keyframes popIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.92) perspective(500px) rotateX(6deg) rotateZ(-2deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) perspective(500px) rotateX(0deg) rotateZ(0deg);
  }
}

/* SVG layer animations (reuse original names) */
@keyframes sunSet {
  0% { transform: translateY(210px); }
  100% { transform: translateY(0); }
}

@keyframes sunRise {
  0% { transform: translateY(0); }
  100% { transform: translateY(210px); }
}

@keyframes moveBackDark {
  0% { transform: translateX(-15px) scale(1.02); }
  100% { transform: translateX(0) scale(1.06); }
}

@keyframes moveBackLight {
  0% { transform: translateX(0) scale(1.06); }
  100% { transform: translateX(-15px) scale(1.02); }
}

@keyframes moveFrontDark {
  0% { transform: translateX(25px) scale(1.08); }
  100% { transform: translateX(0) scale(1.16); }
}

@keyframes moveFrontLight {
  0% { transform: translateX(0) scale(1.16); }
  100% { transform: translateX(25px) scale(1.08); }
}

@keyframes moveForegroundDark {
  0% { transform: translateX(50px) translateY(6px) scale(1.12); }
  100% { transform: translateX(0) translateY(-10px) scale(1.24); }
}

@keyframes moveForegroundLight {
  0% { transform: translateX(0) translateY(-10px) scale(1.24); }
  100% { transform: translateX(50px) translateY(6px) scale(1.12); }
}

@keyframes newPulse {
  0% { transform: scale(1) rotate(-2deg); box-shadow: 0 0 0 rgba(255, 80, 73, 0); }
  50% { transform: scale(1.08) rotate(-4deg); box-shadow: 0 0 18px rgba(255, 80, 73, 0.5); }
  100% { transform: scale(1) rotate(-2deg); box-shadow: 0 0 0 rgba(255, 80, 73, 0); }
}

/* Logo + footer actions */
.logo {
  position: fixed;
  top: 6px;
  left: 6px;
  z-index: 1007;
}

.logo img {
  width: 200px;
}

.home-footer {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  z-index: 5;
  pointer-events: auto;
  margin: 14px auto 10px;
}

.cookie-notice {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, calc(100vw - 24px));
  right: auto;
  bottom: 12px;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(8, 8, 8, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: none;
}

.cookie-notice__text {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.cookie-notice__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

html[dir="rtl"] .cookie-notice {
  direction: rtl;
}

html[dir="rtl"] .cookie-notice__text {
  text-align: right;
}

@media (max-width: 760px) {
  .cookie-notice {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: min(680px, calc(100vw - 16px));
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }
  .cookie-notice__actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  html[dir="rtl"] .cookie-notice__actions {
    justify-content: flex-start;
  }
}

.cookie-notice__link,
.cookie-notice__btn {
  appearance: none;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cookie-notice__btn {
  cursor: pointer;
}

.cookie-notice--hidden {
  display: none !important;
}

.home-footer button {
  background: rgba(0, 0, 0, 0.6);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.popup.show {
  display: flex;
}

.popup-content {
  background: rgba(10, 10, 10, 0.9);
  color: var(--ink);
  padding: 24px;
  border-radius: 18px;
  width: min(520px, 92vw);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

.popup-content h2,
.popup-content h3 {
  margin-top: 0;
}

.popup-content .close {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
}

.member-popup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 14px 0;
}

.member-stat {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
}

.member-stat-label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.member-stat-value {
  font-size: 1.05rem;
}

.member-stat--clickable {
  cursor: pointer;
  position: relative;
  padding-right: 34px;
}

.member-stat--clickable:hover {
  border-color: rgba(255, 216, 77, 0.6);
  background: rgba(255, 216, 77, 0.08);
}

.member-stat--clickable::after {
  content: "📸";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.9;
}

.member-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.member-name-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--ink);
  padding: 10px 12px;
  font-family: 'ProtestStrike-Regular', sans-serif;
  font-size: 0.98rem;
}

.member-status {
  margin-top: 8px;
  min-height: 18px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.member-mode-ranks {
  margin-top: 12px;
}

.member-mode-ranks-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-mode-rank-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.member-mode-rank--gold {
  border-color: rgba(255, 216, 77, 0.95);
  background: linear-gradient(130deg, rgba(255, 216, 77, 0.22), rgba(255, 176, 64, 0.18));
  box-shadow: 0 0 0 1px rgba(255, 216, 77, 0.35);
  animation: memberGoldGlow 1.7s ease-in-out infinite;
}

.member-mode-rank--silver {
  border-color: rgba(218, 223, 231, 0.9);
  background: linear-gradient(130deg, rgba(218, 223, 231, 0.2), rgba(170, 180, 196, 0.14));
  box-shadow: 0 0 0 1px rgba(218, 223, 231, 0.25);
}

.member-mode-rank--bronze {
  border-color: rgba(219, 143, 84, 0.9);
  background: linear-gradient(130deg, rgba(219, 143, 84, 0.2), rgba(178, 101, 45, 0.14));
  box-shadow: 0 0 0 1px rgba(219, 143, 84, 0.24);
}

.member-mode-rank--top10 {
  border-color: rgba(124, 191, 255, 0.75);
  background: linear-gradient(130deg, rgba(124, 191, 255, 0.16), rgba(106, 234, 214, 0.12));
  box-shadow: 0 0 0 1px rgba(124, 191, 255, 0.2);
}

@keyframes memberGoldGlow {
  0% {
    box-shadow: 0 0 0 1px rgba(255, 216, 77, 0.3), 0 0 0 rgba(255, 216, 77, 0.0);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(255, 216, 77, 0.5), 0 0 16px rgba(255, 216, 77, 0.45);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(255, 216, 77, 0.3), 0 0 0 rgba(255, 216, 77, 0.0);
  }
}

.member-share-image {
  width: 100%;
  border-radius: 14px;
  margin: 10px 0 6px 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.badge {
  background-color: #ff3d3d;
  color: white;
  font-size: 12px;
  line-height: 12px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 50px;
  display: inline-block;
  margin-left: 8px;
  transform: rotate(-3deg);
}

.badge--tomorrow {
  background-color: #f7d560;
  color: #1a1a1a;
}

.hof-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mode-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.mode-card:hover {
  transform: scale(1.03) rotate(-0.4deg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.mode-card--soon {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
  filter: grayscale(0.2);
}

.mode-soon-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 4px 10px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
  transform: rotate(-6deg);
}

.mode-title {
  font-family: 'RoadRage-Regular', Impact, sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Desktop mode-card icon system (reuse mobile menu icons) */
.mode-grid-desktop > .mode-card {
  position: relative;
  padding-right: 78px;
}

.mode-grid-desktop .mode-title::after {
  content: "";
  width: 44px;
  height: 44px;
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: currentColor;
  opacity: 0.95;
  -webkit-mask: var(--mode-icon) center / contain no-repeat;
  mask: var(--mode-icon) center / contain no-repeat;
}

.mode-grid-desktop [data-mode-2d*="daily-beast"] .mode-title { --mode-icon: url('../animalguessr-tabs/icon-calendar.svg'); }
.mode-grid-desktop [data-mode-2d*="streak-mode"] .mode-title { --mode-icon: url('../animalguessr-tabs/icon-series.svg'); }
.mode-grid-desktop [data-mode-2d*="time-attack-mode"] .mode-title { --mode-icon: url('../animalguessr-tabs/icon-compass.svg'); }
.mode-grid-desktop [data-mode-2d*="photo-hunt-mode"] .mode-title { --mode-icon: url('../animalguessr-tabs/icon-hunt.svg'); }
.mode-grid-desktop .classic-cluster > .mode-title { --mode-icon: url('../animalguessr-tabs/icon-globe.svg'); }
.mode-grid-desktop [data-mode-2d*="classic-mode"] .mode-title { --mode-icon: url('../animalguessr-tabs/icon-globe.svg'); }
.mode-grid-desktop [data-mode-2d*="ocean-mode"] .mode-title { --mode-icon: url('../animalguessr-tabs/icon-globe.svg'); }
.mode-grid-desktop [data-mode-2d*="red-list-mode"] .mode-title { --mode-icon: url('../animalguessr-tabs/icon-globe.svg'); }
.mode-grid-desktop [data-mode-2d*="mammals-mode"] .mode-title { --mode-icon: url('../animalguessr-tabs/icon-globe.svg'); }

.mode-grid-desktop .mode-card--compact {
  padding-right: 12px;
}

.mode-grid-desktop .mode-card--compact .mode-title::after {
  display: none;
}

@media (max-width: 640px) {
  .member-popup-grid {
    grid-template-columns: 1fr;
  }
}

/* Desktop colors aligned to mobile palette */
.mode-grid-desktop [data-mode-2d*="daily-beast"] .mode-title { color: #ff7a18 !important; }
.mode-grid-desktop [data-mode-2d*="streak-mode"] .mode-title { color: #4fe08a !important; }
.mode-grid-desktop [data-mode-2d*="time-attack-mode"] .mode-title { color: #ff2cb1 !important; }
.mode-grid-desktop [data-mode-2d*="photo-hunt-mode"] .mode-title { color: #38b7ff !important; }
.mode-grid-desktop .classic-cluster > .mode-title,
.mode-grid-desktop [data-mode-2d*="classic-mode"] .mode-title { color: #ff4f49 !important; }

/* Ensure Daily icon keeps accent color */
.mode-grid-desktop [data-mode-2d*="daily-beast"] .mode-title::after {
  background-color: currentColor;
  -webkit-mask: url('../animalguessr-tabs/icon-calendar.svg') center / contain no-repeat;
  mask: url('../animalguessr-tabs/icon-calendar.svg') center / contain no-repeat;
}

.mode-grid-desktop .js-daily-mode-link.mode-card--soon .mode-title::after,
.mode-grid-desktop .js-daily-mode-link[aria-disabled="true"] .mode-title::after {
  display: none;
}

.mode-desc {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.classic-cluster {
  grid-column: 1 / -1;
}

.classic-cluster-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.mode-card--compact {
  padding: 12px;
  gap: 4px;
}

.mode-card--compact .mode-title {
  font-size: 1.2rem;
}

.mode-card--compact .mode-desc {
  font-size: 0.86rem;
  line-height: 1.25;
}

.mode-mobile-switcher {
  display: none;
}

@media (max-width: 640px) {
  .mode-mobile-switcher {
    display: block;
    margin-top: 10px;
  }
  .mode-grid-desktop {
    display: none;
  }
  .mode-mobile-tabs {
    --tab-index: 0;
    --tab-color: #ffd400;
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(10, 10, 10, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
  }
  .mode-mobile-tab {
    position: relative;
    z-index: 1;
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 64px;
    border-radius: 12px;
    padding: 8px 4px 8px;
  }
  .mode-mobile-tab img {
    display: none;
  }
  .mode-mobile-tab::before {
    content: "";
    width: 24px;
    height: 24px;
    background: currentColor;
    opacity: 0.95;
    -webkit-mask: var(--tab-icon) center / contain no-repeat;
    mask: var(--tab-icon) center / contain no-repeat;
  }
  .mode-mobile-tab[data-tab="classic"] { --tab-icon: url('../animalguessr-tabs/icon-globe.svg'); }
  .mode-mobile-tab[data-tab="time"] { --tab-icon: url('../animalguessr-tabs/icon-compass.svg'); }
  .mode-mobile-tab[data-tab="daily"] { --tab-icon: url('../animalguessr-tabs/icon-calendar.svg'); }
  .mode-mobile-tab[data-tab="series"] { --tab-icon: url('../animalguessr-tabs/icon-series.svg'); }
  .mode-mobile-tab[data-tab="photo"] { --tab-icon: url('../animalguessr-tabs/icon-hunt.svg'); }
  .mode-mobile-tab[data-tab="classic"] { --tab-color: #ff4f49; color: #ff4f49; }
  .mode-mobile-tab[data-tab="time"] { --tab-color: #ff2cb1; color: #ff2cb1; }
  .mode-mobile-tab[data-tab="daily"] { --tab-color: #ff7a18; color: #ff7a18; }
  .mode-mobile-tab[data-tab="series"] { --tab-color: #4fe08a; color: #4fe08a; }
  .mode-mobile-tab[data-tab="photo"] { --tab-color: #38b7ff; color: #38b7ff; }
  .mode-mobile-tab.is-active {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
  .mode-mobile-tab span {
    font-size: 0.66rem;
    line-height: 1.05;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
  }
  .mode-mobile-tab--daily {
    transform: scale(1.06);
  }
  .mode-mobile-tab--daily.is-available {
    animation: dailyPulse 1.15s ease-in-out infinite;
  }
  .mode-mobile-tab--daily.is-locked {
    opacity: 0.62;
  }
  .mode-mobile-tab--daily::after {
    content: "";
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 216, 98, 0.35), transparent 68%);
    opacity: 0.58;
    pointer-events: none;
    animation: dailySpark 1.7s linear infinite;
  }
  .mode-mobile-tab--daily:not(.is-available)::after {
    display: none;
  }
  .mode-mobile-panels {
    position: relative;
    margin-top: 12px;
    min-height: 0;
  }
  .mode-mobile-panel {
    position: relative;
    inset: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
    display: none;
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(8, 8, 8, 0.76);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  }
  .mode-mobile-panel.is-active {
    display: block;
  }
  .mode-mobile-panel[data-color="classic"] { border-color: rgba(255, 120, 114, 0.38); }
  .mode-mobile-panel[data-color="time"] { border-color: rgba(255, 93, 143, 0.42); }
  .mode-mobile-panel[data-color="daily"] { border-color: rgba(255, 143, 56, 0.45); }
  .mode-mobile-panel[data-color="series"] { border-color: rgba(57, 201, 122, 0.55); }
  .mode-mobile-panel[data-color="photo"] { border-color: rgba(56, 183, 255, 0.46); }
  .mode-mobile-head {
    margin-bottom: 8px;
  }
  .mode-mobile-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: none;
    overflow: visible;
    padding-right: 2px;
  }
  .mode-mobile-item {
    display: block;
    width: calc(50% - 4px);
    border-radius: 12px;
    padding: 10px 12px;
    text-decoration: none;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
  }
  .mode-mobile-panel[data-color="classic"] .mode-mobile-item { background: #ff4f49; }
  .mode-mobile-panel[data-color="time"] .mode-mobile-item { background: #ff2cb1; }
  .mode-mobile-panel[data-color="daily"] .mode-mobile-item { background: #ff7a18; }
  .mode-mobile-panel[data-color="series"] .mode-mobile-item { background: #39c97a; }
  .mode-mobile-panel[data-color="photo"] .mode-mobile-item { background: #2ea9ff; }
  .mode-mobile-item .mode-title {
    color: #ffffff !important;
    font-size: 1.22rem;
    line-height: 1.05;
    text-align: center;
  }
  .mode-mobile-item .mode-desc {
    margin-top: 5px;
    font-size: 0.78rem;
    line-height: 1.18;
    color: rgba(255, 255, 255, 0.94);
    text-align: center;
  }
  .mode-mobile-item .mode-mobile-go {
    margin-top: 8px;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    color: rgba(0, 0, 0, 0.82);
    font-family: 'RoadRage-Regular', Impact, sans-serif;
  }
  .mode-mobile-item[aria-disabled="true"] {
    opacity: 0.6;
    pointer-events: none;
  }
  .hero-top {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hero-actions {
    justify-self: start;
    width: 100%;
    flex-wrap: wrap;
  }
  .top-menu-fixed {
    top: 5px;
    right: 5px;
  }
  .logo img { width: 160px; }
  .ui-card { padding: 16px; }
  .ui-duo { grid-template-columns: 1fr; }
  .wish-row { grid-template-columns: 1fr; }
  .home-footer { flex-direction: column; gap: 6px; }
  .community-grid { grid-template-columns: 1fr; }
  .cookie-notice {
    flex-direction: column;
    align-items: flex-start;
    bottom: 10px;
  }
  .cookie-notice__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@keyframes dailyPulse {
  0% { transform: scale(1.08); }
  50% { transform: scale(1.16); }
  100% { transform: scale(1.08); }
}

@keyframes dailySpark {
  0% { transform: scale(0.7); opacity: 0.35; }
  50% { transform: scale(1.15); opacity: 0.75; }
  100% { transform: scale(0.72); opacity: 0.35; }
}

@media (max-width: 900px), (max-height: 720px) {
  .ui {
    min-height: auto;
    padding-bottom: 140px;
  }
  .ui-duo {
    grid-template-columns: 1fr;
  }
}
