/* ========================================
   Design Tokens
   ======================================== */
:root {
  /* Brand */
  --primary: #394D22;
  --primary-dark: #2A3A18;
  --primary-light: #4E6A2F;
  --primary-bg: rgba(57, 77, 34, 0.06);
  --primary-bg-hover: rgba(57, 77, 34, 0.12);

  --accent: #E98224;
  --accent-dark: #D06E18;
  --accent-light: #F5A44D;
  --accent-bg: rgba(233, 130, 36, 0.08);

  /* Silver / Neutrals */
  --silver-50: #F8FAFC;
  --silver-100: #F1F5F9;
  --silver-200: #E5E7EB;
  --silver-300: #CBD5E1;
  --silver-400: #9CA3AF;
  --silver-500: #6B7280;
  --silver-600: #4B5563;
  --silver-700: #374151;
  --silver-800: #1F2937;

  /* Semantic */
  --success: #2E7D32;
  --success-bg: rgba(46, 125, 50, 0.08);
  --danger: #C62828;
  --danger-bg: rgba(198, 40, 40, 0.08);

  /* Surfaces */
  --bg: #F4F5F0;
  --bg-gradient: linear-gradient(168deg, #F4F5F0 0%, #EEF0E8 40%, #F0EDE8 100%);
  --card-bg: #FFFFFF;
  --card-border: rgba(0, 0, 0, 0.06);

  /* Typography */
  --font: 'Heebo', -apple-system, BlinkMacSystemFont, sans-serif;
  --text: var(--silver-800);
  --text-secondary: var(--silver-500);
  --text-muted: var(--silver-400);

  /* Layout */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.03);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.2s;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  background: #FAFAF7;
  color: var(--text);
  min-height: 100vh;
  direction: rtl;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
}

/* ========================================
   Background Layer (global ambient)
   ======================================== */
#bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(57, 77, 34, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 60% 45% at 8% 88%, rgba(233, 130, 36, 0.025) 0%, transparent 65%),
    linear-gradient(168deg, #FAFAF7 0%, #F7F7F3 50%, #F9F8F5 100%);
}

#bg-layer::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 500px at 15% 25%, rgba(57, 77, 34, 0.02) 0%, transparent 100%),
    radial-gradient(circle 400px at 85% 75%, rgba(233, 130, 36, 0.015) 0%, transparent 100%);
}

#bg-layer::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -25%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 77, 34, 0.015) 0%, transparent 70%);
}

/* ========================================
   Header
   ======================================== */
#app-header {
  background: var(--primary);
  background-image: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(57, 77, 34, 0.12);
  overflow: hidden;
}

#app-header::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -10%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

#app-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, var(--accent-light) 50%, var(--accent) 70%, transparent 100%);
  opacity: 0.35;
}

.header-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  font-size: 22px;
  opacity: 0.7;
}

#app-header h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.btn-reset-header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.btn-reset-header:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.reset-icon {
  font-size: 16px;
}

/* ========================================
   Card
   ======================================== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card-hero {
  border: none;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.card-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 77, 34, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.card-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 130, 36, 0.025) 0%, transparent 70%);
  pointer-events: none;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  line-height: 1.4;
  white-space: nowrap;
}

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

.btn:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
}

/* Primary (green) */
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 1px 4px rgba(57, 77, 34, 0.15);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 2px 8px rgba(57, 77, 34, 0.18);
}

/* Accent (orange) */
.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: 0 1px 4px rgba(233, 130, 36, 0.18);
}

.btn-accent:hover {
  background: var(--accent-dark);
  box-shadow: 0 2px 8px rgba(233, 130, 36, 0.22);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--silver-600);
  border: 1.5px solid var(--silver-300);
  padding: 11px 28px;
}

.btn-ghost:hover {
  background: var(--silver-100);
  border-color: var(--silver-400);
  color: var(--silver-700);
}

/* Danger */
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger);
  padding: 11px 28px;
}

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

/* Large */
.btn-large {
  display: flex;
  width: 100%;
  max-width: 420px;
  margin: 28px auto;
  padding: 16px 32px;
  font-size: 20px;
  font-weight: 700;
  border-radius: var(--radius);
  letter-spacing: -0.2px;
}

/* ========================================
   Screens
   ======================================== */
.screen {
  display: none;
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  position: relative;
}

.screen.active {
  display: block;
  animation: screenIn 0.35s var(--ease);
}

/* ---- Per-screen ambient backgrounds ---- */
#screen-participants::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -120px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 77, 34, 0.025) 0%, transparent 70%);
  pointer-events: none;
}

#screen-who-answers::before {
  content: '';
  position: absolute;
  top: 60px;
  left: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 130, 36, 0.02) 0%, transparent 70%);
  pointer-events: none;
}

#screen-answer::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 77, 34, 0.02) 0%, transparent 65%);
  pointer-events: none;
}

#screen-game::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(57, 77, 34, 0.025) 0%, transparent 70%);
  pointer-events: none;
}

#screen-intro::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 130, 36, 0.025) 0%, rgba(57, 77, 34, 0.015) 50%, transparent 70%);
  pointer-events: none;
}

#screen-all-ready::before,
#screen-game-end::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 77, 34, 0.02) 0%, rgba(233, 130, 36, 0.01) 50%, transparent 70%);
  pointer-events: none;
}

.screen-header {
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.screen-header h2 {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--silver-700);
  margin-bottom: 8px;
}

.form-label-sm {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--silver-500);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  background: var(--silver-50);
  border: 1.5px solid var(--silver-200);
  border-radius: var(--radius-sm);
  direction: rtl;
  outline: none;
  transition: all var(--duration) var(--ease);
}

.form-input::placeholder {
  color: var(--silver-400);
}

.form-input:hover {
  border-color: var(--silver-300);
}

.form-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px var(--primary-bg);
}

textarea.form-input {
  resize: vertical;
  min-height: 64px;
  line-height: 1.6;
}

/* ========================================
   Add Participant Form
   ======================================== */
.add-participant-form {
  padding: 28px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.add-participant-form::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 77, 34, 0.02) 0%, transparent 70%);
  pointer-events: none;
}

.add-participant-form .btn {
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ========================================
   Icon Grid
   ======================================== */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
}

.icon-option {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid var(--silver-200);
  background: var(--silver-50);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  overflow: hidden;
  padding: 0;
}

.icon-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.icon-option:hover {
  border-color: var(--silver-300);
  background: white;
  transform: scale(1.08);
  box-shadow: var(--shadow);
}

.icon-option.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
  box-shadow: 0 0 0 3px rgba(57, 77, 34, 0.12);
}

/* ========================================
   Participants Grid
   ======================================== */
.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.participant-card {
  background: var(--card-bg);
  border: 1.5px solid var(--silver-200);
  border-radius: var(--radius-lg);
  padding: 24px 16px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  position: relative;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.participant-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.participant-card:hover::after {
  opacity: 1;
}

.participant-card:hover {
  border-color: var(--silver-300);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.participant-card .card-icon {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  line-height: 1;
}

.participant-card .card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Inline icon in answer title */
.answer-title-icon {
  width: 36px;
  height: 36px;
  vertical-align: middle;
  margin-left: 8px;
  border-radius: 50%;
  object-fit: cover;
}

/* Inline icon in game result text */
.result-icon {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin: 0 4px;
  border-radius: 50%;
  object-fit: cover;
}

.participant-card .card-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--silver-800);
  display: block;
}

.participant-card .card-status {
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
  color: var(--text-muted);
  display: block;
}

.participant-card.completed {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(57, 77, 34, 0.04) 0%, var(--card-bg) 100%);
}

.participant-card.completed::after {
  opacity: 0.7;
  background: var(--primary);
}

.participant-card.completed .card-status {
  color: var(--primary);
  font-weight: 600;
}

.participant-card .delete-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--silver-100);
  color: var(--silver-400);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
}

.participant-card .delete-btn:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ========================================
   Answer Screen / Question Blocks
   ======================================== */
#questions-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0 0 32px;
}

.question-block {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.question-block::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -30px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 130, 36, 0.015) 0%, transparent 70%);
  pointer-events: none;
}

.question-block h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  line-height: 1.4;
}

.image-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--silver-200);
}

.image-section label {
  font-size: 14px;
  font-weight: 600;
  color: var(--silver-600);
  display: block;
  margin-bottom: 10px;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.gallery-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2.5px solid var(--silver-200);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  background: white;
  box-shadow: var(--shadow-sm);
}

.gallery-img:hover {
  border-color: var(--silver-300);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.gallery-img.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(57, 77, 34, 0.1), var(--shadow);
  transform: translateY(-2px);
}

.btn-sticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-bg);
  color: var(--accent-dark);
  border: 1.5px solid rgba(233, 130, 36, 0.25);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.btn-sticker:hover {
  background: rgba(233, 130, 36, 0.14);
  border-color: var(--accent);
}

.selected-image-preview {
  margin-top: 14px;
  text-align: center;
}

.selected-image-preview img {
  max-width: 110px;
  max-height: 110px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ========================================
   Ready Screen
   ======================================== */
.ready-content {
  text-align: center;
  padding: 48px 32px;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.ready-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow:
    0 3px 12px rgba(57, 77, 34, 0.15),
    0 0 0 6px rgba(57, 77, 34, 0.05),
    0 0 0 12px rgba(57, 77, 34, 0.02);
}

.ready-badge.trophy {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  box-shadow:
    0 3px 12px rgba(233, 130, 36, 0.18),
    0 0 0 6px rgba(233, 130, 36, 0.05),
    0 0 0 12px rgba(233, 130, 36, 0.02);
}

.ready-content h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.ready-content p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.ready-content .btn-ghost,
.ready-content .btn-danger {
  margin-top: 12px;
}

/* ========================================
   Intro Screen
   ======================================== */
.intro-badge {
  font-size: 32px;
}

.intro-steps {
  text-align: right;
  max-width: 380px;
  margin: 0 auto 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.intro-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--silver-700);
  line-height: 1.5;
}

.intro-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   Answer Info Box
   ======================================== */
.answer-info-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent-bg);
  border: 1.5px solid rgba(233, 130, 36, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-top: 12px;
}

.answer-info-icon {
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

.answer-info-box span:last-child {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-dark);
  line-height: 1.4;
}

/* ========================================
   Feedback Section (Game End)
   ======================================== */
.feedback-section {
  margin-bottom: 16px;
}

.feedback-ask {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.feedback-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ========================================
   Game Screen
   ======================================== */
.game-progress {
  text-align: center;
  margin-bottom: 24px;
}

.game-progress {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.game-card {
  padding: 32px;
  text-align: center;
  margin-bottom: 28px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 350px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(57, 77, 34, 0.02) 0%, transparent 70%);
  pointer-events: none;
}

.game-card-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.game-card-question {
  font-size: 20px;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.5;
}

.game-card-divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 20px auto;
}

.game-card-image {
  margin: 16px auto;
}

.game-card-image img {
  max-width: 180px;
  max-height: 180px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.game-card-answer {
  font-size: 22px;
  font-weight: 700;
  color: var(--silver-800);
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--silver-50);
  border: 1px solid var(--silver-200);
  border-radius: var(--radius);
  line-height: 1.5;
  position: relative;
}

.grouped-notice {
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.grouped-texts {
  margin-top: 8px;
  text-align: right;
}

.grouped-text-line {
  font-size: 16px;
  font-weight: 400;
  color: var(--silver-700);
  padding: 4px 0;
  line-height: 1.5;
}

.grouped-text-line strong {
  font-weight: 700;
  color: var(--silver-800);
}

.game-subtitle {
  font-weight: 600;
  color: var(--silver-600);
  margin-bottom: 16px;
}

.game-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.game-choice-btn {
  background: var(--card-bg);
  border: 2px solid var(--silver-200);
  border-radius: var(--radius);
  padding: 18px 14px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: var(--silver-700);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.game-choice-btn:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.game-choice-btn .choice-icon {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  line-height: 1;
}

.game-choice-btn .choice-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.game-choice-btn.correct {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}

.game-choice-btn.wrong {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.game-choice-btn.disabled {
  pointer-events: none;
  opacity: 0.55;
}

.game-choice-btn.correct.disabled,
.game-choice-btn.wrong.disabled {
  opacity: 1;
}

.game-result {
  text-align: center;
  padding: 20px;
}

.game-result-text {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 41, 55, 0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn 0.2s var(--ease);
}

.modal {
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s var(--ease);
}

.modal-sm {
  max-width: 380px;
}

.modal-header {
  padding: 24px 28px 0;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.modal-body {
  padding: 24px 28px;
}

.modal-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--silver-800);
  margin-bottom: 8px;
}

.modal-footer {
  padding: 0 28px 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-icon-warn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.text-muted {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ========================================
   Sticker Options
   ======================================== */
.sticker-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.sticker-option-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sticker-bg-grid,
.sticker-color-grid,
.sticker-icon-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sticker-bg-option {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all var(--duration) var(--ease);
}

.sticker-bg-option:hover { transform: scale(1.1); }
.sticker-bg-option.selected {
  border-color: var(--silver-800);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--silver-800);
}

.sticker-color-option {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid var(--silver-200);
  transition: all var(--duration) var(--ease);
}

.sticker-color-option:hover { transform: scale(1.1); }
.sticker-color-option.selected {
  border-color: var(--silver-800);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--silver-800);
}

.sticker-icon-option {
  width: 38px;
  height: 38px;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid var(--silver-200);
  background: var(--silver-50);
  transition: all var(--duration) var(--ease);
}

.sticker-icon-option:hover { transform: scale(1.08); }
.sticker-icon-option.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.sticker-preview-wrap {
  background: var(--silver-100);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

#sticker-canvas {
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  max-width: 100%;
  height: auto;
}

/* ========================================
   Privacy Note
   ======================================== */
.intro-privacy,
.answer-privacy {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 500;
  line-height: 1.5;
}

.answer-privacy {
  margin-top: -8px;
}

/* ========================================
   Question Progress Dots
   ======================================== */
.question-progress-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.q-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--silver-200);
  transition: all 0.3s var(--ease);
}

.q-dot.active {
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(57, 77, 34, 0.15);
  transform: scale(1.15);
}

.q-dot.done {
  background: var(--primary-light);
}

/* ========================================
   Question Text (single question mode)
   ======================================== */
.question-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 20px;
  line-height: 1.5;
}

.question-block h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ========================================
   Answer Navigation
   ======================================== */
.answer-nav {
  margin-top: 16px;
  margin-bottom: 32px;
}

.answer-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 420px;
  margin: 0 auto;
  gap: 12px;
}

.btn-nav-next {
  min-width: 140px;
}

.btn-nav-next.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========================================
   Animations
   ======================================== */
@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 640px) {
  .header-inner {
    padding: 12px 16px;
  }

  #app-header h1 {
    font-size: 19px;
  }

  .reset-label {
    display: none;
  }

  .screen {
    padding: 24px 16px 40px;
  }

  .screen-header h2 {
    font-size: 26px;
  }

  .add-participant-form {
    padding: 20px;
  }

  .participants-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
  }

  .question-block {
    padding: 20px;
  }

  .game-card {
    padding: 24px 20px;
  }

  .game-card-answer {
    font-size: 19px;
    padding: 14px 16px;
  }

  .game-choices {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-large {
    font-size: 18px;
    padding: 14px 24px;
  }

  .icon-grid {
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 8px;
  }

  .participant-card .card-icon {
    width: 44px;
    height: 44px;
  }

  .game-choice-btn .choice-icon {
    width: 36px;
    height: 36px;
  }

  .answer-title-icon {
    width: 30px;
    height: 30px;
  }

  .image-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .ready-content {
    padding: 36px 20px;
  }

  .ready-content h2 {
    font-size: 28px;
  }

  .modal {
    margin: 0 8px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 0 20px 20px;
  }
}

@media (min-width: 641px) and (max-width: 860px) {
  .participants-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  }
}

/* ========================================
   Scrollbar (WebKit)
   ======================================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--silver-300);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--silver-400);
}

/* ========================================
   Selection
   ======================================== */
::selection {
  background: rgba(57, 77, 34, 0.15);
  color: var(--primary-dark);
}
