:root {
  --bg: #07080d;
  --bg-elevated: rgba(18, 20, 28, 0.88);
  --bg-elevated-soft: rgba(255, 255, 255, 0.04);
  --accent: #e7c14f;
  --accent-soft: rgba(231, 193, 79, 0.16);
  --accent-strong: #f0d36a;
  --text: #f4efe4;
  --text-muted: rgba(244, 239, 228, 0.68);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius-lg: 18px;
  --radius-xl: 28px;
  --transition-fast: 160ms ease;
  --font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: #c9ae4e #1a1c24;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.bar-dialog-scroll::-webkit-scrollbar,
.comment-list::-webkit-scrollbar,
.comment-list--hidden::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.bar-dialog-scroll::-webkit-scrollbar-track,
.comment-list::-webkit-scrollbar-track,
.comment-list--hidden::-webkit-scrollbar-track {
  background: #1a1c24;
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.bar-dialog-scroll::-webkit-scrollbar-thumb,
.comment-list::-webkit-scrollbar-thumb,
.comment-list--hidden::-webkit-scrollbar-thumb {
  background: #c9ae4e;
  border-radius: 999px;
  border: 2px solid #101218;
  background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.bar-dialog-scroll::-webkit-scrollbar-thumb:hover,
.comment-list::-webkit-scrollbar-thumb:hover,
.comment-list--hidden::-webkit-scrollbar-thumb:hover {
  background: var(--accent-strong);
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
.bar-dialog-scroll::-webkit-scrollbar-corner,
.comment-list::-webkit-scrollbar-corner {
  background: transparent;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #c9ae4e #1a1c24;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 12% -10%, rgba(231, 193, 79, 0.16), transparent 42%),
    radial-gradient(circle at 90% 0%, rgba(232, 93, 76, 0.16), transparent 38%),
    radial-gradient(circle at 80% 100%, rgba(45, 212, 191, 0.1), transparent 40%),
    var(--bg);
  background-attachment: fixed;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--accent);
  color: #111;
  padding: 8px 12px;
  z-index: 20;
}

.skip-link:focus {
  top: 12px;
}

.app-root {
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 18px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.app-header {
  position: relative;
  z-index: 4020;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  padding: 22px 24px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(231, 193, 79, 0.12), transparent 42%),
    rgba(12, 14, 20, 0.8);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
}

.header-brand h1,
.panel-header h2,
.dialog-copy h2 {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  margin: 0;
}

.header-brand h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.9;
}

.header-home {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  width: fit-content;
}

.header-home:hover h1,
.header-home:focus-visible h1 {
  color: var(--accent);
}

.tagline {
  margin: 10px 0 0;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 1rem;
}

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

.header-nav {
  display: flex;
  gap: 8px;
}

.filters-toggle,
.filters-drawer-head,
.filters-scrim,
.about-toggle {
  display: none;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.9rem;
}

.nav-link.is-active {
  background: var(--accent);
  color: #16140c;
  border-color: var(--accent);
  font-weight: 600;
}

.scale-panel,
.stats-row,
.toolbar,
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.scale-panel {
  padding: 16px 18px 14px;
  display: grid;
  gap: 12px;
}

.scale-track {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 2px 18px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.scale-keys {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
}

.stats-row article {
  padding: 16px 18px;
  border-right: 1px solid var(--border-subtle);
}

.stats-row article:last-child {
  border-right: none;
}

.stats-row p:not(.stats-sub) {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.stats-row h2 {
  margin: 4px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats-sub {
  margin: 6px 0 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolbar {
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: space-between;
  align-items: end;
}

.search-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: min(100%, 240px);
}

.search-group label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.search-group input,
.toolbar-filters select,
#guessInput {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(7, 8, 13, 0.85);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  outline: none;
}

.search-group input:focus-visible,
.toolbar-filters select:focus-visible,
#guessInput:focus-visible,
.btn-ghost:focus-visible,
.rate-btn:focus-visible,
.about-toggle:focus-visible,
.nav-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(231, 193, 79, 0.35);
  border-color: var(--accent);
}

.toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.view-toggle-group {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.app-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.results-summary {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.bars-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bars-list--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.bar-card {
  margin: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.bar-card:hover {
  transform: translateY(-3px);
  border-color: rgba(231, 193, 79, 0.45);
}

.bar-card-button {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bar-card--list .bar-card-button {
  flex-direction: row;
  align-items: stretch;
}

.bar-card--list .bar-media {
  width: 148px;
  flex: 0 0 148px;
  aspect-ratio: 1;
}

.bar-media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #171821;
}

.bar-image,
.bar-monogram,
.game-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bar-monogram,
.game-image:empty,
.game-image:not([style*="url"]) {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.72);
}

.bar-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bar-title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.bar-meta-line,
.bar-description,
.bar-yours {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.bar-yours {
  color: var(--accent);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bar-rating-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(11, 12, 18, 0.8);
  color: #f4efe4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 22px var(--overlay-glow, rgba(231, 193, 79, 0.45)),
    0 10px 28px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  animation: rating-pulse 4.8s ease-in-out infinite;
}

.bar-rating-overlay--empty {
  animation: none;
  color: rgba(244, 239, 228, 0.72);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 22px rgba(0, 0, 0, 0.38);
}

.bar-rating-overlay-number {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--score-color, #f4efe4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}

.bar-rating-overlay--decimal .bar-rating-overlay-number {
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.bar-rating-overlay-label {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.72;
  line-height: 1;
  margin-top: 0.45em;
}

@keyframes rating-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

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

.btn-ghost {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(20, 23, 31, 0.65);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  padding: 7px 12px;
  cursor: pointer;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-toggle {
  border: 0;
  background: transparent;
}

.btn-toggle--active {
  background: var(--accent);
  color: #16140c;
}

.map-panel {
  position: relative;
  z-index: 0;
  isolation: isolate;
  min-height: 72vh;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.map-hint {
  position: absolute;
  z-index: 500;
  left: 12px;
  top: 12px;
  margin: 0;
  max-width: min(360px, calc(100% - 24px));
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 18, 24, 0.88);
  border: 1px solid var(--border-subtle);
  color: var(--text);
  font-size: 0.8rem;
  pointer-events: none;
}

.map-canvas {
  height: 72vh;
  width: 100%;
  background: #e6e2d6;
}

.leaflet-container {
  isolation: isolate;
  font-family: var(--font-body);
  background: #e6e2d6;
}

.leaflet-control-zoom a {
  background: #101218;
  color: var(--text);
  border: 1px solid var(--border-subtle);
}

.leaflet-control-zoom a:hover {
  background: #1c1f28;
  color: var(--accent);
}

.leaflet-bar {
  border: 0;
  box-shadow: var(--shadow-soft);
}

.map-pin-wrap {
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.map-pin {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--pin-color, #e7c14f);
  border: 2px solid #101218;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  pointer-events: none;
  touch-action: manipulation;
}

.map-pin span {
  transform: rotate(45deg);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: #101218;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.map-pin--decimal span {
  font-size: 0.7rem;
  letter-spacing: 0;
}

.map-pin.is-selected {
  outline: 3px solid #fff;
  outline-offset: 2px;
  transform: rotate(-45deg) scale(1.12);
}

.leaflet-tooltip.map-hover-tooltip,
.leaflet-popup.map-hover-popup .leaflet-popup-content-wrapper {
  background: #101218;
  color: var(--text);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 0;
  box-shadow: var(--shadow-soft);
  white-space: normal;
}

.leaflet-tooltip.map-hover-tooltip::before {
  display: none;
}

.leaflet-popup.map-hover-popup .leaflet-popup-content {
  margin: 0;
  width: 220px !important;
}

.leaflet-popup.map-hover-popup .leaflet-popup-tip {
  background: #101218;
  border: 1px solid var(--border-subtle);
  box-shadow: none;
}

.leaflet-popup.map-hover-popup .leaflet-popup-close-button {
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  font-size: 22px;
  color: #f4f1e8;
  z-index: 2;
}

.leaflet-popup.map-hover-popup .leaflet-popup-close-button:hover {
  color: var(--accent);
}

.map-hover-card {
  width: 220px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.map-hover-image {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  background: #171821;
  pointer-events: none;
}

.map-hover-image--empty {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--text-muted);
}

.map-hover-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 10px;
}

.map-hover-copy strong {
  font-size: 0.95rem;
}

.map-hover-score {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.03em;
}

.map-hover-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.map-hover-vote {
  margin-top: 8px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #16140c;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.map-hover-vote:hover,
.map-hover-vote:focus-visible {
  background: var(--accent-strong);
}

.app-footer {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.5;
}

.app-footer a {
  color: var(--accent);
}

.persistence-note {
  color: #f59e0b;
}

.bar-dialog {
  position: fixed;
  inset: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 4010;
  width: min(880px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  background: #101218;
  color: var(--text);
  padding: 0;
  box-shadow: var(--shadow-soft);
  color-scheme: dark;
}

.bar-dialog-scroll {
  max-height: calc(100vh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c9ae4e #1a1c24;
}

.bar-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.dialog-scrim {
  position: fixed;
  inset: 0;
  z-index: 4000;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.dialog-chrome {
  display: flex;
  justify-content: flex-end;
  padding: 12px 12px 0;
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(#101218, #101218 70%, transparent);
}

.dialog-body {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  grid-template-areas:
    "media copy"
    "comments comments";
  gap: 18px 22px;
  padding: 8px 22px 24px;
  align-items: start;
}

.dialog-media {
  grid-area: media;
}

.dialog-copy {
  grid-area: copy;
  min-width: 0;
}

.dialog-comments {
  grid-area: comments;
  min-width: 0;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.dialog-media .bar-media {
  aspect-ratio: 1;
}

.dialog-copy h2 {
  font-size: 2.4rem;
  line-height: 0.95;
}

.dialog-score {
  font-size: 1.4rem;
  margin: 8px 0;
}

.dialog-score-value {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.dialog-score small {
  display: inline-block;
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dialog-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dialog-links a {
  color: var(--accent);
}

.histogram-wrap {
  margin: 8px 0 4px;
}

.histogram-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.histogram {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  align-items: end;
  height: 96px;
  margin: 16px 0;
  padding: 0;
}

.histogram li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.histogram-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
}

.rate-scale {
  border: 0;
  margin: 8px 0 0;
  padding: 0;
}

.rate-scale legend {
  margin-bottom: 8px;
  color: var(--text-muted);
}

.rate-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.rate-btn {
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  border-radius: 12px;
  padding: 8px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rate-btn span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--score-color, var(--accent));
}

.rate-btn small {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.rate-btn.is-selected,
.rate-btn:hover {
  border-color: var(--score-color, var(--accent));
  background: rgba(255, 255, 255, 0.08);
}

.rank-tabs {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.comment-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 10px;
}

.comment-field span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.comment-field textarea {
  width: 100%;
  resize: vertical;
  min-height: 4.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}

.comment-field textarea:focus {
  outline: 2px solid rgba(231, 193, 79, 0.35);
  border-color: var(--accent);
}

.comment-field small {
  color: var(--text-muted);
  font-size: 0.75rem;
}

#saveRating {
  width: fit-content;
}

.rate-status {
  min-height: 1.2em;
  color: var(--accent);
  font-size: 0.88rem;
}

.comment-section {
  margin-top: 16px;
}

.comment-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.comment-section h3 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.comment-list--hidden {
  padding: 8px 10px 10px;
}

.comment-list--hidden li {
  opacity: 0.78;
}

.hidden-comments {
  margin-top: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.hidden-comments summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.hidden-comments summary::-webkit-details-marker {
  display: none;
}

.hidden-comments summary::before {
  content: "▸ ";
  color: var(--accent);
}

.hidden-comments[open] summary::before {
  content: "▾ ";
}

.hidden-comments[open] summary {
  border-bottom: 1px solid var(--border-subtle);
}

.hidden-comments-note {
  margin: 0;
  padding: 8px 12px 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-list li {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.comment-text {
  margin: 0;
  width: 100%;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.comment-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 5px 9px 4px;
  border-radius: 10px;
  background: rgba(11, 12, 18, 0.92);
  color: var(--score-color, #f4efe4);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 14px var(--overlay-glow, rgba(231, 193, 79, 0.4)),
    0 6px 14px rgba(0, 0, 0, 0.45);
}

.comment-score-number {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--score-color, #f4efe4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.comment-score-label {
  font-size: 0.62rem;
  font-weight: 600;
  opacity: 0.72;
  line-height: 1;
  margin-top: 0.28em;
}

.comment-sort {
  display: flex;
  gap: 8px;
  margin: 0;
}

.comment-sort-btn {
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.comment-sort-btn.is-active {
  border-color: var(--accent);
  color: var(--text);
}

.comment-votes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.comment-vote {
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.comment-vote:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--text);
}

.comment-vote.is-active {
  color: var(--text);
}

.comment-vote--up.is-active {
  border-color: #4ade80;
  color: #86efac;
  background: rgba(74, 222, 128, 0.12);
}

.comment-vote--down.is-active {
  border-color: #f87171;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
}

.comment-vote:disabled {
  cursor: default;
  opacity: 0.85;
}

.comment-vote-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: inherit;
}

.comment-own {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.panel {
  overflow: hidden;
}

.panel-header {
  padding: 18px 18px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.panel-header h2 {
  font-size: 2rem;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.faq-list {
  display: grid;
  gap: 10px;
  padding: 16px 18px 20px;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--transition-fast);
}

.faq-item[open] summary {
  background: var(--accent);
  color: #16140c;
}

.faq-item[open] summary::after {
  transform: rotate(225deg);
}

.faq-item summary:focus-visible {
  outline: 3px solid rgba(231, 193, 79, 0.45);
  outline-offset: -3px;
}

.faq-answer {
  padding: 16px 18px 18px;
  display: grid;
  gap: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

.faq-answer p {
  margin: 0;
}

.faq-answer img {
  display: block;
  width: 100%;
  max-width: 28rem;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
}

.faq-answer a {
  color: var(--accent);
}

.game-area {
  display: flex;
  justify-content: center;
  padding: 16px;
}

.game-card {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
}

.game-image {
  height: 220px;
  background: #171821 center/cover no-repeat;
}

.game-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-info h3 {
  margin: 0;
  font-size: 1.3rem;
}

.game-input-row {
  display: flex;
  gap: 10px;
}

#guessInput {
  flex: 1;
}

.guess-feedback {
  margin: 0;
  color: var(--text-muted);
}

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

@media (max-width: 760px) {
  .bar-dialog {
    top: max(20px, env(safe-area-inset-top, 0px));
    transform: translate(-50%, 0);
    max-height: calc(100dvh - 40px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  .bar-dialog-scroll {
    max-height: inherit;
  }

  .dialog-chrome {
    padding: 16px 14px 6px;
  }

  .dialog-body {
    display: flex;
    flex-direction: column;
    padding: 4px 16px 24px;
  }

  .dialog-comments {
    padding-top: 14px;
  }

  .comment-field textarea {
    min-height: 10rem;
    height: 10rem;
  }

  .bar-card--list .bar-card-button {
    flex-direction: column;
  }

  .bar-card--list .bar-media {
    width: 100%;
  }

  .rate-buttons {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 760px) and (pointer: coarse) {
  .app-root {
    padding: 8px 10px 12px;
    gap: 8px;
  }

  .app-header {
    align-items: center;
    padding: 8px 10px;
    border-radius: 16px;
    gap: 8px;
  }

  .eyebrow,
  .tagline,
  .scale-panel {
    display: none;
  }

  .header-brand h1 {
    font-size: 1.65rem;
  }

  .nav-link {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  body:not(.page-info) .nav-link-info {
    display: none;
  }

  body:not(.page-info) .about-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    flex-shrink: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: rgba(20, 23, 31, 0.65);
    color: var(--accent);
    text-decoration: none;
    font: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
  }

  .filters-toggle {
    --filters-drawer-width: min(14rem, 66vw);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 3900;
    width: 44px;
    height: 80px;
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-right: 0;
    border-radius: 14px 0 0 14px;
    background: rgba(18, 20, 28, 0.94);
    color: var(--accent);
    box-shadow: -6px 0 18px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transform: translateY(-50%);
    transition: right 0.22s ease, background var(--transition-fast), color var(--transition-fast);
  }

  .filters-toggle-chevron::before {
    content: "‹";
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 600;
  }

  body.filters-open .filters-toggle {
    right: var(--filters-drawer-width);
    z-index: 4510;
    background: var(--accent);
    color: #16140c;
    border-color: var(--accent);
  }

  body.filters-open .filters-toggle-chevron::before {
    content: "›";
  }

  .filters-drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  .filters-drawer-head h2 {
    margin: 0;
    font-family: var(--font-display);
    letter-spacing: 0.04em;
    font-size: 1.15rem;
    font-weight: 400;
  }

  .filters-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 4400;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.filters-open .filters-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .toolbar {
    position: fixed;
    top: 50%;
    right: 0;
    bottom: auto;
    --filters-drawer-width: min(14rem, 66vw);
    width: var(--filters-drawer-width);
    height: auto;
    max-height: calc(100dvh - 24px);
    margin: 0;
    border-radius: 16px 0 0 16px;
    z-index: 4500;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 22px;
    padding: 18px 14px 22px;
    overflow-y: auto;
    transform: translate(100%, -50%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.22s ease, visibility 0.22s ease;
  }

  body.filters-open .toolbar {
    transform: translate(0, -50%);
    visibility: visible;
    pointer-events: auto;
  }

  #filtersDrawer .search-group,
  #filtersDrawer .toolbar-filters,
  #filtersDrawer .filters-drawer-head {
    flex: 0 0 auto;
  }

  .search-group {
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .toolbar-filters {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
  }

  #filtersDrawer .view-toggle-group {
    margin-top: 0;
  }

  .toolbar-filters select,
  .rank-tabs,
  .view-toggle-group {
    width: 100%;
  }

  .rank-tabs,
  .view-toggle-group {
    display: flex;
  }

  .rank-tabs button,
  .view-toggle-group button {
    flex: 1;
    padding-left: 6px;
    padding-right: 6px;
    font-size: 0.74rem;
  }

  .toolbar .search-group input,
  .toolbar-filters select {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .app-header,
  .stats-row {
    flex-shrink: 0;
  }

  .stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-radius: 14px;
  }

  .stats-row article {
    padding: 8px 8px 7px;
    border-right: 1px solid var(--border-subtle);
    border-bottom: 0;
  }

  .stats-row p:not(.stats-sub) {
    font-size: 1.2rem;
  }

  .stats-row h2 {
    margin: 2px 0 0;
    font-size: 0.58rem;
    letter-spacing: 0.06em;
  }

  .stats-sub {
    margin: 2px 0 0;
    font-size: 0.68rem;
  }

  body:has(#mapPanel:not([hidden])) {
    overflow: hidden;
  }

  body:has(#mapPanel:not([hidden])) .app-root {
    height: 100dvh;
    min-height: 100dvh;
  }

  body:has(#mapPanel:not([hidden])) .app-main {
    flex: 1 1 auto;
    min-height: 0;
    gap: 0;
  }

  body:has(#mapPanel:not([hidden])) .results-summary,
  body:has(#mapPanel:not([hidden])) .map-hint,
  body:has(#mapPanel:not([hidden])) .app-footer {
    display: none;
  }

  body:has(#mapPanel:not([hidden])) .map-panel {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
  }

  body:has(#mapPanel:not([hidden])) .map-canvas {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }

  .comment-field textarea {
    min-height: 12rem;
    height: 12rem;
  }
}

@media (min-width: 761px), (pointer: fine) {
  .filters-toggle,
  .filters-drawer-head,
  .filters-scrim,
  .about-toggle {
    display: none;
  }

  .toolbar {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    overflow: visible;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 16px 18px;
    border-radius: var(--radius-xl);
    z-index: auto;
  }

  body.filters-open .toolbar {
    transform: none;
    visibility: visible;
    pointer-events: auto;
  }

  .toolbar-filters {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
  }

  .toolbar-filters select,
  .rank-tabs,
  .view-toggle-group {
    width: auto;
  }
}

@media (max-width: 760px) and (pointer: coarse) and (prefers-reduced-motion: reduce) {
  .filters-scrim,
  .filters-toggle,
  .toolbar {
    transition: none;
  }
}
