/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f0f13;
  --surface: #1a1a24;
  --surface-2: #24243a;
  --primary: #6c5ce7;
  --primary-hover: #7f70f0;
  --accent: #fd79a8;
  --green: #00b894;
  --red: #d63031;
  --yellow: #fdcb6e;
  --text: #f0f0f5;
  --text-muted: #8888a0;
  --radius: 12px;
  --radius-sm: 8px;
  --gap: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* GPU-accelerated background pattern animation */
body::before {
  content: "";
  position: fixed;
  inset: -60px;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ctext x='30' y='38' text-anchor='middle' font-family='Arial,sans-serif' font-size='28' font-weight='700' fill='white' opacity='0.04' transform='rotate(-45 30 30)'%3E%3F%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
  will-change: transform;
  animation: bgScroll 9s linear infinite;
}

@keyframes bgScroll {
  to { transform: translate3d(60px, -60px, 0); }
}

/* --- Layout --- */
.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.screen {
  display: none;
  min-height: 100dvh;
}

.screen.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#screen-game.active {
  justify-content: flex-start;
  align-items: stretch;
}

.game-container {
  padding: 10px 20px;
}

/* --- Game Layout: two columns on desktop --- */
.game-layout {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.game-col-photo {
  width: 100%;
}

.game-col-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.panel-info {
  flex-shrink: 0;
}

.panel-hint {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-guess {
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .game-layout {
    flex-direction: row;
    gap: 20px;
    height: calc(100vh - 70px);
  }

  .game-col-photo {
    flex: 1 1 60%;
    min-width: 0;
    height: 100%;
  }

  .game-col-controls {
    flex: 0 0 360px;
    height: 100%;
    overflow: hidden;
  }

  .photo-explorer {
    height: 100% !important;
  }
}

/* --- Panels (separated containers) --- */
.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 18px;
}

/* --- Home Screen --- */
.title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 12px;
}

.highlight {
  color: var(--primary);
}

.subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1rem;
}

/* --- Buttons --- */
.btn {
  border: none;
  border-radius: var(--radius);
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

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

.btn-primary {
  background: var(--primary);
  color: white;
  width: 100%;
  max-width: 300px;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-muted);
  width: 100%;
  max-width: 300px;
  margin-top: 12px;
  font-size: 0.95rem;
}

.btn-secondary:hover {
  background: #2e2e4a;
  color: var(--text);
}

.btn-hint {
  background: var(--surface-2);
  color: var(--text);
  padding: 10px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-hint:hover {
  background: #2e2e4a;
}

.btn-hint:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hint-cost {
  color: var(--accent);
  font-size: 0.75rem;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Rules icon button (in game header) */
.btn-rules-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--text-muted);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-rules-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* --- Game Header --- */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.round-counter {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-muted);
}

.total-score {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
}

/* --- Photo Explorer (inline) --- */
.photo-explorer {
  position: relative;
  width: 100%;
  height: 50vh;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--radius);
  cursor: pointer;
}

.explorer-photo-bg {
  position: absolute;
  inset: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  object-fit: cover;
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
}

.explorer-photo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  user-select: none;
  -webkit-user-drag: none;
}

/* Inline carousel navigation arrows */
.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}

.photo-nav:hover {
  background: rgba(0, 0, 0, 0.75);
}

.photo-nav-prev { left: 10px; }
.photo-nav-next { right: 10px; }

.photo-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.photo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.2s;
}

.photo-dot.active {
  background: white;
  width: 20px;
  border-radius: 4px;
}

.photo-counter {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  z-index: 2;
}

.photo-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.photo-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Business Info --- */
.business-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.business-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.tag-city {
  background: var(--primary);
  color: white;
}

.tag-type {
  background: var(--surface-2);
  color: var(--text-muted);
}

.business-reviews {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Hints --- */
.panel-hint-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.2s;
}

.panel-hint-toggle:hover {
  color: var(--text);
}

.toggle-eye {
  transition: opacity 0.2s;
}

.toggle-eye.hidden-state {
  opacity: 0.4;
}

.hint-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.hint-body.blurred {
  filter: blur(6px);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}

.hints-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hint-display {
  border-left: 3px solid var(--yellow);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.hint-display blockquote {
  font-style: italic;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Subtle scrollbar for hint panel */
.panel-hint::-webkit-scrollbar {
  width: 4px;
}
.panel-hint::-webkit-scrollbar-track {
  background: transparent;
}
.panel-hint::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 2px;
}

/* --- Lightbox (fullscreen photo viewer) --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}

.lightbox-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.lightbox-photo {
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev-btn { left: 12px; }
.lightbox-next-btn { right: 12px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  z-index: 1001;
}

@media (max-width: 768px) {
  .lightbox-nav { display: none; }
}

/* --- Guess Section --- */
.guess-section {
  text-align: center;
}

.guess-label {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 10px;
  display: block;
}

.slider-wrapper {
  padding: 0 8px;
  margin-bottom: 4px;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--surface-2);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.4);
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid var(--bg);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 4px;
}

.guess-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 6px 0;
}

.guess-stars {
  font-size: 1.3rem;
  margin-bottom: 14px;
  letter-spacing: 2px;
}

/* --- Result Screen --- */
.result-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
  width: 100%;
}

.result-message {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.result-ratings {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 16px;
}

.result-col {
  text-align: center;
}

.result-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.result-number {
  font-size: 2.5rem;
  font-weight: 800;
}

.result-actual {
  color: var(--yellow);
}

.result-score-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
}

.result-diff {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.result-score {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
}

.result-reviews {
  margin-top: 16px;
  text-align: left;
}

.result-reviews-spoiler {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.result-reviews-content {
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.result-reviews-spoiler.blurred .result-reviews-content {
  filter: blur(6px);
  opacity: 0.4;
  user-select: none;
}

.result-reviews-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.result-reviews-spoiler.blurred .result-reviews-reveal {
  opacity: 1;
  pointer-events: auto;
}

.result-reviews-reveal span {
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.result-reviews-content blockquote {
  font-style: italic;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
  border-left: 3px solid var(--yellow);
  padding: 8px 12px;
  margin-bottom: 8px;
}

/* --- Final Screen --- */
.final-title {
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 20px;
}

.final-score {
  font-size: 4rem;
  font-weight: 800;
  text-align: center;
  color: var(--primary);
}

.final-max {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 16px;
}

.final-message {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 32px;
  color: var(--yellow);
}

/* --- Modal (Rules) --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  max-width: 440px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 901;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--primary);
}

.rules-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.rule-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rule-item p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.rule-item p strong {
  color: var(--text);
}

.rules-subtitle {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 8px;
  color: var(--text);
}

.credits-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.credits-text a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.credits-text a:hover {
  text-decoration: underline;
}

/* --- Loading --- */
.loading {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 19, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--surface-2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

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

/* --- Error Toast --- */
.error-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 200;
  max-width: 90%;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(214, 48, 49, 0.3);
}

/* --- Utilities --- */
.hidden {
  display: none !important;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

.scale-in {
  animation: scaleIn 0.3s ease-out;
}

/* --- Mobile: limit hint panel height so guess button stays visible --- */
@media (max-width: 899px) {
  .panel-hint {
    max-height: 180px;
  }
}

/* --- Responsive mobile --- */
@media (max-width: 400px) {
  .title {
    font-size: 2rem;
  }

  .guess-value {
    font-size: 2rem;
  }

  .result-number {
    font-size: 2rem;
  }

  .final-score {
    font-size: 3rem;
  }

  .photo-explorer {
    height: 40vh;
  }

  .photo-nav { display: none; }
}

/* ============================================
   MOBILE OPTIMIZATIONS (< 900px)
   Best practices 2025:
   - Thumb-friendly controls (44px+ touch targets)
   - Sticky CTA button in thumb zone
   - Compact layout
   - Value above slider (NN/g recommendation)
   - Scrollable hints panel
   ============================================ */

@media (max-width: 899px) {

  /* --- LAYOUT: Compact but scrollable --- */
  #screen-game.active {
    min-height: 100dvh;
  }

  .game-container {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 16px);
  }

  .game-header {
    flex-shrink: 0;
    margin-bottom: 6px;
  }

  .game-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* --- PHOTO: More compact --- */
  .game-col-photo {
    flex: 0 0 auto;
    height: 30vh;
    min-height: 160px;
    max-height: 240px;
  }

  .photo-explorer {
    height: 100% !important;
    border-radius: 10px;
  }

  /* --- INFO PANEL: Ultra compact --- */
  .panel-info {
    padding: 10px 12px;
    flex-shrink: 0;
  }

  .business-name {
    font-size: 1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .business-meta {
    flex-wrap: wrap;
    gap: 6px;
  }

  .tag {
    padding: 2px 8px;
    font-size: 0.7rem;
  }

  .business-reviews {
    font-size: 0.75rem;
  }

  /* --- HINTS PANEL: Scrollable with visible scrollbar --- */
  .panel-hint {
    flex: 1 1 auto;
    min-height: 80px;
    max-height: 25vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 12px;
  }

  .hint-body {
    gap: 6px;
  }

  .hint-display {
    padding: 8px 10px;
  }

  .hint-display blockquote {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .btn-hint {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  /* --- GUESS PANEL: Sticky at bottom --- */
  .panel-guess {
    flex-shrink: 0;
    background: var(--surface);
    padding: 12px 14px 16px;
    border-radius: 12px;
    margin-top: auto;
  }

  .guess-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .guess-label {
    display: none;
  }

  /* --- SLIDER: Touch-optimized (value ABOVE) --- */
  .slider-wrapper {
    padding: 0;
    margin-bottom: 0;
    order: 1;
  }

  /* Value ABOVE slider (visible during thumb manipulation) */
  .guess-value {
    order: 0;
    font-size: 2rem;
    margin: 0;
    line-height: 1;
    text-align: center;
  }

  .guess-stars {
    order: 0;
    font-size: 1rem;
    margin-bottom: 4px;
    letter-spacing: 1px;
    text-align: center;
  }

  /* Larger slider track */
  input[type=range] {
    height: 10px;
    border-radius: 5px;
    margin: 6px 0;
  }

  /* MUCH larger thumb (44px min for touch - Apple HIG) */
  input[type=range]::-webkit-slider-thumb {
    width: 44px;
    height: 44px;
    border: 4px solid var(--bg);
    box-shadow: 0 2px 12px rgba(108, 92, 231, 0.5);
  }

  input[type=range]::-moz-range-thumb {
    width: 44px;
    height: 44px;
    border: 4px solid var(--bg);
  }

  .slider-labels {
    font-size: 0.7rem;
    margin-top: 2px;
    padding: 0 4px;
  }

  /* --- SUBMIT BUTTON: Large touch target --- */
  #btn-guess {
    order: 2;
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    margin-top: 6px;
    -webkit-tap-highlight-color: transparent;
  }

  #btn-guess:active {
    transform: scale(0.98);
    background: var(--primary-hover);
  }

  /* --- PHOTO NAV: Visible on mobile --- */
  .photo-dots {
    bottom: 8px;
  }

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

  .photo-dot.active {
    width: 24px;
  }

  /* Show arrows on mobile (larger touch targets) */
  .photo-nav {
    display: flex !important;
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    opacity: 0.7;
  }

  .photo-nav-prev { left: 6px; }
  .photo-nav-next { right: 6px; }

  .photo-fullscreen-btn {
    width: 32px;
    height: 32px;
    top: 8px;
    right: 8px;
  }

  /* --- RESULT SCREEN: Compact --- */
  #screen-result .container {
    padding: 16px;
  }

  .result-card {
    padding: 18px 16px;
    margin-bottom: 16px;
  }

  .result-message {
    font-size: 1.3rem;
    margin-bottom: 14px;
  }

  .result-ratings {
    gap: 24px;
    margin-bottom: 12px;
  }

  .result-number {
    font-size: 2rem;
  }

  .result-score-row {
    gap: 14px;
  }

  /* --- FINAL SCREEN: Compact --- */
  .final-title {
    font-size: 1.5rem;
  }

  .final-score {
    font-size: 3.5rem;
  }

  /* --- HEADER: Compact --- */
  .game-header {
    padding: 0;
  }

  .round-counter,
  .total-score {
    font-size: 0.9rem;
  }

  .btn-rules-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }

  /* --- MODAL: Full mobile --- */
  .modal-content {
    width: 95%;
    max-height: 85vh;
    padding: 20px 16px;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  .rule-item p {
    font-size: 0.85rem;
  }

  /* --- LIGHTBOX: Mobile optimized --- */
  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }

  .lightbox-counter {
    bottom: 60px;
    font-size: 0.8rem;
  }
}

/* --- VERY SMALL SCREENS (< 380px) --- */
@media (max-width: 380px) {
  .game-col-photo {
    height: 25vh;
    min-height: 140px;
    max-height: 200px;
  }

  .guess-value {
    font-size: 1.8rem;
  }

  .guess-stars {
    font-size: 0.95rem;
  }

  input[type=range]::-webkit-slider-thumb,
  input[type=range]::-moz-range-thumb {
    width: 40px;
    height: 40px;
  }

  .business-name {
    font-size: 0.95rem;
  }

  .panel-info,
  .panel-hint,
  .panel-guess {
    padding: 8px 10px;
  }
  
  .panel-hint {
    max-height: 20vh;
  }
}

/* --- SAFE AREA (iPhone notch/home indicator) --- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 899px) {
    .panel-guess {
      padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
  }
}

/* --- Best Score Display --- */
.final-best {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  min-height: 1.5em;
}

.final-best .new-record {
  color: var(--yellow);
  font-weight: 700;
  font-size: 1.2rem;
}

.new-record-anim {
  animation: recordPulse 0.6s ease-out;
}

@keyframes recordPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Trophy icon for new record */
.final-best .new-record::before {
  content: '🏆 ';
}

/* --- Offline Banner --- */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--yellow);
  color: var(--bg);
  text-align: center;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* --- Vote Buttons --- */
.vote-section {
  text-align: center;
  margin-top: 1.2rem;
}

.vote-label {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.vote-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0.5rem 0 0 0;
  opacity: 0.7;
}

.vote-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.btn-vote {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  color: var(--text-secondary);
}

.btn-vote-up:hover {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.btn-vote-down:hover {
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.btn-vote-up.active {
  border-color: var(--green);
  color: var(--green);
  background: rgba(34, 197, 94, 0.15);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.5);
}

.btn-vote-down.active {
  border-color: var(--red);
  color: var(--red);
  background: rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
}


/* === CONFIG MODAL === */

.config-modal-content {
  max-width: 600px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.config-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 12px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  -webkit-overflow-scrolling: touch;
}

.config-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.config-rounds-row {
  display: flex;
  gap: 8px;
}

.config-round-btn {
  flex: 1;
  padding: 10px 0;
  border: 2px solid var(--surface-2);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.config-round-btn.active {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.15);
  color: var(--primary);
}

.config-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.config-chip {
  padding: 8px 14px;
  border-radius: 20px;
  border: 2px solid var(--surface-2);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.config-chip.active {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.15);
  color: var(--primary);
}

.config-chip .chip-icon {
  margin-right: 4px;
}

.config-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.config-preset-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--surface-2);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.config-preset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.config-preset-btn.active {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary);
}

/* Custom preset chips */
.config-custom-preset {
  position: relative;
  padding-right: 24px;
}

.custom-preset-delete {
  display: none;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.5;
  line-height: 1;
}

.config-custom-preset:hover .custom-preset-delete {
  display: inline;
}

.custom-preset-delete:hover {
  opacity: 1;
  color: var(--red);
}

/* Save button */
.config-save-btn {
  border-style: dashed;
}

/* Inline save input */
.config-save-inline {
  display: flex;
  align-items: center;
  gap: 4px;
}

.config-save-input {
  width: 120px;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--primary);
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
  outline: none;
}

.config-save-input:focus {
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

.config-save-confirm,
.config-save-cancel {
  padding: 4px 8px;
  border-radius: 50%;
  border: 1px solid var(--surface-2);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

.config-save-confirm:hover { color: var(--green); border-color: var(--green); }
.config-save-cancel:hover { color: var(--red); border-color: var(--red); }

#config-custom-section.hidden { display: none; }

.config-search-wrapper {
  margin-bottom: 10px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-1, #1a1a2e);
  padding: 4px 0 8px 0;
  /* position context for clear button */
}

.config-search {
  width: 100%;
  padding: 10px 36px 10px 14px;
  border: 2px solid var(--surface-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.config-search-clear {
  position: absolute;
  right: 10px;
  top: calc(50% + 2px);
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.config-search-clear:hover {
  color: var(--text);
}

.config-search-clear.hidden {
  display: none;
}

.config-search:focus {
  border-color: var(--primary);
}

.config-search::placeholder {
  color: var(--text-muted);
}

.config-regions,
.config-categories {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.config-region {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.config-region.hidden-by-search {
  display: none;
}

.config-region-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface-2);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border: none;
  width: 100%;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}

.config-region-header:hover {
  filter: brightness(1.15);
}

.region-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.region-chevron {
  transition: transform 0.2s;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.config-region.open .region-chevron {
  transform: rotate(90deg);
}

.region-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.region-select-all {
  font-size: 0.75rem;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
}

.region-progress {
  height: 3px;
  background: var(--surface-2);
  overflow: hidden;
}

.region-progress-bar {
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 0 2px 2px 0;
}

.config-region-cities {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.config-region.open .config-region-cities {
  max-height: 500px;
}

.config-city-list {
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.config-city-tag {
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px solid var(--surface-2);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.config-city-tag.active {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.12);
  color: var(--primary);
}

.config-city-tag.hidden-by-search {
  display: none;
}

.config-footer {
  flex-shrink: 0;
  padding: 12px 0 16px 0;
  border-top: 1px solid var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.config-summary {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.config-summary-error {
  color: var(--red, #ff4757);
}

.config-footer .btn-primary {
  width: 100%;
}

.config-footer .btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.config-section-data {
  border-top: 1px solid var(--surface-2);
  padding-top: 16px;
}

.config-data-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 8px 14px;
}

.btn-danger-outline {
  border-color: var(--red) !important;
  color: var(--red) !important;
}

.btn-danger-outline:hover {
  background: rgba(255, 71, 87, 0.1) !important;
}

@media (max-width: 899px) {
  .config-modal-content {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    padding: 16px 14px 0 14px;
  }

  .config-footer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .config-region.open .config-region-cities {
    max-height: 200px;
    overflow-y: auto;
  }
}

/* --- Page Credit (footer) --- */
.page-credit {
  margin-top: auto;
  padding-top: 40px;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
  text-align: center;
  transition: opacity 0.2s ease;
}

.page-credit:hover {
  opacity: 1;
}

.page-credit a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-credit a:hover {
  color: var(--primary);
}

/* --- Credits Modal --- */
.credits-modal-content {
  max-width: 360px;
  text-align: center;
}

.credits-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.credits-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.credits-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary);
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.credits-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.credits-info {
  text-align: center;
}

.credits-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px 0;
}

.credits-role {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.credits-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.credits-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--surface-2);
  border-radius: 24px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.credits-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.credits-link svg {
  flex-shrink: 0;
}

.credits-footer {
  padding-top: 16px;
  border-top: 1px solid var(--surface-2);
}

.credits-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 4px 0;
}

.credits-kofi-link {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.2s, color 0.2s;
}

.credits-kofi-link:hover {
  opacity: 1;
  color: var(--primary);
}

.credits-version {
  opacity: 0.6;
}

/* --- Credits Button (footer) --- */
.btn-credits {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* --- Beta Testers Section --- */
.credits-testers {
  padding: 16px 0;
  border-top: 1px solid var(--surface-2);
}

.credits-testers-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}

.credits-testers-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tester-name {
  padding: 6px 14px;
  background: var(--surface-2);
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.2s ease;
}

.tester-name:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

/* --- Fix: Center config buttons --- */
.config-data-buttons {
  justify-content: center;
}

.config-footer {
  align-items: center;
}

.config-footer .btn-primary {
  max-width: 300px;
}

/* ============================================
   TWITCH CHAT MODE
   ============================================ */

/* --- Twitch In-Game Toggle + Popover --- */
.twitch-game-wrapper {
  position: relative;
}

.btn-twitch-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--text-muted);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-twitch-icon:hover {
  border-color: #9146ff;
  color: #9146ff;
}

.btn-twitch-icon[aria-pressed="true"] {
  background: rgba(145, 70, 255, 0.2);
  border-color: #9146ff;
  color: #9146ff;
}

.twitch-popover {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid rgba(145, 70, 255, 0.3);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.twitch-popover-input {
  padding: 8px 10px;
  border: 2px solid var(--surface-2);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.twitch-popover-input:focus {
  border-color: #9146ff;
}

.twitch-popover-input::placeholder {
  color: var(--text-muted);
}

.btn-twitch-connect {
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: #9146ff;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.btn-twitch-connect:hover {
  background: #7c3aed;
}

.btn-twitch-connect.connected {
  background: var(--red);
}

.btn-twitch-connect.connected:hover {
  background: #b91c1c;
}

@media (max-width: 899px) {
  .twitch-popover {
    left: 0;
    transform: none;
    min-width: 200px;
  }
}

/* --- Twitch Config (Home Screen) --- */
.twitch-config {
  width: 100%;
  max-width: 300px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-twitch-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border: 2px solid var(--surface-2);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-twitch-toggle:hover {
  border-color: #9146ff;
  color: #9146ff;
}

.btn-twitch-toggle[aria-pressed="true"] {
  border-color: #9146ff;
  background: rgba(145, 70, 255, 0.15);
  color: #9146ff;
}

.twitch-icon {
  flex-shrink: 0;
}

.twitch-channel-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.twitch-channel-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--surface-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.twitch-channel-input:focus {
  border-color: #9146ff;
}

.twitch-channel-input::placeholder {
  color: var(--text-muted);
}

.twitch-status {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.twitch-status.connected {
  color: var(--green);
}

.twitch-status.disconnected {
  color: var(--red);
}

/* --- Twitch Gauge Panel (Game Screen) --- */
.panel-twitch {
  border: 1px solid rgba(145, 70, 255, 0.25);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(145, 70, 255, 0.05) 100%);
  flex-shrink: 0;
}

.twitch-gauge-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9146ff;
  margin-bottom: 8px;
}

.twitch-icon-sm {
  flex-shrink: 0;
  color: #9146ff;
}

.twitch-vote-count {
  margin-left: auto;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.twitch-average-display {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
  transition: color 0.3s;
  color: var(--text-muted);
}

.twitch-average-display.color-green { color: var(--green); }
.twitch-average-display.color-purple { color: #9146ff; }
.twitch-average-display.color-red { color: var(--red); }

/* --- Twitch Distribution Bars --- */
.twitch-distribution {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.twitch-dist-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.twitch-dist-label {
  width: 14px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}

.twitch-dist-bar-bg {
  flex: 1;
  height: 10px;
  background: var(--surface-2);
  border-radius: 5px;
  overflow: hidden;
}

.twitch-dist-bar {
  height: 100%;
  width: 0%;
  background: #9146ff;
  border-radius: 5px;
  transition: width 0.4s ease;
}

/* --- Twitch Overload Message (fixed banner) --- */
.twitch-overload {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 14px 20px;
  background: linear-gradient(135deg, #9146ff, #6441a5);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 -4px 20px rgba(145, 70, 255, 0.5);
  animation: overloadPulse 1.5s ease-in-out infinite;
}

@keyframes overloadPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.01); }
}

/* --- Twitch Result Column --- */
.result-col-chat .result-chat {
  color: #9146ff;
}

.result-chat-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Twitch First Exact Match --- */
.twitch-first-exact {
  margin-top: 12px;
  margin-bottom: 4px;
  text-align: center;
}

.twitch-first-exact-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.twitch-first-exact-name {
  display: inline-block;
  padding: 4px 14px;
  margin-left: 6px;
  background: rgba(145, 70, 255, 0.2);
  border: 1px solid rgba(145, 70, 255, 0.4);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #9146ff;
  text-shadow: 0 0 12px rgba(145, 70, 255, 0.3);
}

.twitch-first-exact-none {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Twitch Mobile Adjustments --- */
@media (max-width: 899px) {
  .panel-twitch {
    padding: 10px 12px;
  }

  .twitch-average-display {
    font-size: 1.6rem;
    margin-bottom: 6px;
  }

  .twitch-dist-bar-bg {
    height: 8px;
  }

  .result-ratings {
    gap: 16px;
  }
}

@media (max-width: 380px) {
  .twitch-average-display {
    font-size: 1.4rem;
  }

  .result-ratings {
    gap: 12px;
    flex-wrap: wrap;
  }
}
