.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 25% 25%, rgba(121, 208, 133, 0.06), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(88, 197, 103, 0.08), transparent 25%);
  filter: blur(0px);
  z-index: 0;
}

main {
  padding: 26px;
  position: relative;
  z-index: 1;
}

.layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.session {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

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

.session-title {
  display: grid;
  gap: 4px;
}

.session-title h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #0b1222;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 180ms ease;
}

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

#imageFrame,
#answerImageFrame{
  text-align: center;
}

#answerImageFrame {
  margin-bottom: 10px;
  display: none;
}

.question-img {
  /* width: 100%; */
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card-2);
  object-fit: cover;
  max-height: 280px;
  cursor: zoom-in;
  max-width: 100%;
}

.empty-img {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
}

.answer-card {
  border: 1px solid var(--border);
  background: var(--card-2);
}

.answer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  color: var(--muted);
}

.reveal-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
}

.answer-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

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

.category-btn {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #0f1a30, #0f1524);
  color: var(--text);
  padding: 14px 12px;
  font-weight: 700;
  display: grid;
  gap: 4px;
  justify-items: start;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.category-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.category-btn.selected {
  box-shadow: 0 12px 35px rgba(88, 197, 103, 0.2);
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(88, 197, 103, 0.18), rgba(121, 208, 133, 0.12));
}

.category-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-top: 6px;
  flex-wrap: wrap;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  width: min(380px, 92vw);
  display: grid;
  gap: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.auth-card h2 {
  margin: 0 0 2px 0;
}

.auth-card label {
  font-size: 13px;
  color: var(--muted);
}

.auth-card input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
}

.auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.linkish {
  background: none;
  border: none;
  color: var(--accent-2);
  cursor: pointer;
  font-weight: 700;
}

.report-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  background: rgba(4, 7, 12, 0.7);
  backdrop-filter: blur(10px);
  z-index: 15;
}

.report-overlay.open {
  display: flex;
}

.report-card {
  width: min(1100px, 96vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
  max-height: calc(100vh - 80px);
  overflow: auto;
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.report-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.report-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-2);
  padding: 14px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  display: grid;
  gap: 10px;
}

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

.report-bar {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b1222;
}

.report-bar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.report-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.legend-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}

.report-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.report-score {
  font-weight: 800;
  color: var(--accent-2);
}

.img-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  z-index: 20;
}

.img-modal.open {
  display: flex;
}

.img-modal-content {
  position: relative;
  background: #0a0f1d;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  max-width: min(1100px, 96vw);
  max-height: min(85vh, 900px);
  display: grid;
  gap: 8px;
}

.img-modal-content img {
  width: 100%;
  height: 100%;
  max-height: 760px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--card-2);
}

.img-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(14, 22, 36, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  padding: 6px 10px;
  font-weight: 700;
}

.img-modal-hint {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 960px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand account"
      "select progress";
    gap: 8px 12px;
    padding: 10px 12px;
    align-items: center;
  }
}

@media (max-width: 640px) {
  main {
    padding: 16px;
  }
  .card {
    padding: 14px;
  }
}
