/* ============================================================
   DRAMAGIC PRESENTACY — COHESIVE LIGHT/DARK REDESIGN
   Matches the main Dramagic system instead of fighting it.
============================================================ */
:root {
  color-scheme: light;
  --dm-bg: #f8fdff;
  --dm-bg-2: #eefaff;
  --dm-surface: rgba(255, 255, 255, 0.86);
  --dm-surface-solid: #ffffff;
  --dm-elevated: #ffffff;
  --dm-ink: #101820;
  --dm-ink-2: #253747;
  --dm-muted: #657786;
  --dm-soft: #d8eef6;
  --dm-line: rgba(8, 169, 217, 0.18);
  --dm-line-strong: rgba(8, 169, 217, 0.28);
  --dm-blue: #08a9d9;
  --dm-blue-dark: #007aa7;
  --dm-blue-soft: rgba(8, 169, 217, 0.12);
  --dm-pink: #d31f73;
  --dm-success: #198754;
  --dm-warning: #b26b00;
  --dm-danger: #d62828;
  --dm-radius-sm: 14px;
  --dm-radius-md: 20px;
  --dm-radius-lg: 28px;
  --dm-radius-xl: 38px;
  --dm-shadow-sm: 0 14px 40px rgba(0, 122, 167, 0.10);
  --dm-shadow-md: 0 18px 55px rgba(0, 122, 167, 0.14);
  --dm-shadow-lg: 0 28px 80px rgba(0, 122, 167, 0.18);
  --dm-blur: blur(18px) saturate(1.2);
  --dm-max: 1180px;
  --dm-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--dm-bg); }
body {
  margin: 0;
  min-height: 100svh;
  color: var(--dm-ink);
  font-family: var(--dm-font);
  background:
    radial-gradient(circle at 12% 0%, rgba(8, 169, 217, 0.18), transparent 340px),
    radial-gradient(circle at 88% 12%, rgba(91, 83, 255, 0.10), transparent 360px),
    linear-gradient(180deg, var(--dm-bg), var(--dm-bg-2));
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow-x: hidden;
}

body.dark-mode,
html.dark-mode body {
  color-scheme: dark;
  --dm-bg: #07131b;
  --dm-bg-2: #0b1d28;
  --dm-surface: rgba(12, 29, 40, 0.88);
  --dm-surface-solid: rgba(7, 19, 27, 0.94);
  --dm-elevated: rgba(16, 42, 56, 0.92);
  --dm-ink: #f4fbff;
  --dm-ink-2: #e4f7ff;
  --dm-muted: #b8c9d6;
  --dm-soft: rgba(111, 223, 255, 0.18);
  --dm-line: rgba(255, 255, 255, 0.10);
  --dm-line-strong: rgba(111, 223, 255, 0.22);
  --dm-blue: #08a9d9;
  --dm-blue-dark: #6fdfff;
  --dm-blue-soft: rgba(8, 169, 217, 0.16);
  --dm-shadow-sm: 0 16px 48px rgba(0, 0, 0, 0.22);
  --dm-shadow-md: 0 22px 65px rgba(0, 0, 0, 0.28);
  --dm-shadow-lg: 0 34px 90px rgba(0, 0, 0, 0.36);
  background:
    radial-gradient(circle at 12% 0%, rgba(8, 169, 217, 0.16), transparent 340px),
    radial-gradient(circle at 88% 12%, rgba(91, 83, 255, 0.10), transparent 360px),
    linear-gradient(180deg, #07131b 0%, #0b1d28 55%, #07131b 100%) !important;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.presentacy-page {
  min-height: 100svh;
  padding: 18px 0 70px;
  color: var(--dm-ink);
  background: transparent;
}
body.dark-mode .presentacy-page,
html.dark-mode .presentacy-page { background: transparent !important; }

.topbar {
  width: min(var(--dm-max), calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 12px;
  border: 1px solid var(--dm-line);
  background: var(--dm-surface);
  backdrop-filter: var(--dm-blur);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--dm-shadow-sm);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.brand strong { display: block; color: var(--dm-ink); font-size: 17px; font-weight: 900; letter-spacing: -0.03em; }
.brand span { display: block; margin-top: 2px; color: var(--dm-muted); font-size: 10px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { flex: 0 0 auto; padding: 10px 14px; border-radius: 999px; color: var(--dm-muted); font-weight: 900; font-size: 13px; }
.main-nav a:hover,
.main-nav a.active { color: white; background: linear-gradient(135deg, var(--dm-blue), var(--dm-blue-dark)); box-shadow: 0 12px 26px rgba(8, 169, 217, 0.22); }

main { width: min(var(--dm-max), calc(100% - 32px)); margin: 0 auto; }
.eyebrow { margin: 0 0 12px; color: var(--dm-blue-dark); font-size: 12px; line-height: 1.1; font-weight: 950; letter-spacing: 0.16em; text-transform: uppercase; }
h1, h2, h3 { color: var(--dm-ink); letter-spacing: -0.045em; }
p { color: var(--dm-muted); }

.hero {
  margin-top: 28px;
  padding: clamp(32px, 6vw, 72px);
  border-radius: 44px;
  color: white;
  background:
    radial-gradient(circle at 84% 0%, rgba(255, 255, 255, 0.22), transparent 260px),
    linear-gradient(135deg, #075a77, #08a9d9);
  box-shadow: var(--dm-shadow-lg);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: center;
  overflow: hidden;
}
body.dark-mode .hero,
html.dark-mode .hero {
  background:
    radial-gradient(circle at 88% 0%, rgba(111, 223, 255, 0.20), transparent 270px),
    linear-gradient(135deg, #082635 0%, #075a77 52%, #08a9d9 130%) !important;
}
.hero .eyebrow { color: rgba(255, 255, 255, 0.78) !important; }
.hero h1 { margin: 0; color: #fff; font-size: clamp(52px, 8vw, 96px); line-height: 0.9; font-weight: 950; letter-spacing: -0.075em; }
.hero p { max-width: 720px; margin: 22px 0 0; color: rgba(255, 255, 255, 0.86); font-size: 18px; line-height: 1.58; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-card { padding: 24px !important; color: #fff; background: rgba(255, 255, 255, 0.12) !important; border: 1px solid rgba(255, 255, 255, 0.20) !important; border-radius: var(--dm-radius-lg); box-shadow: none !important; backdrop-filter: var(--dm-blur); }
.hero-card span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: rgba(255, 255, 255, 0.14); font-size: 26px; }
.hero-card h3 { margin: 18px 0 8px; color: white; font-size: 26px; }
.hero-card p { margin-top: 0; color: rgba(255, 255, 255, 0.82); font-size: 15px; }

.access-panel,
.presentacy-app,
.locked-view,
.panel,
.summary-card,
.generator-card,
.practice-card,
.challenge-card,
.next-presenter,
.criteria-card,
.score-row,
.score-history-card,
.selected-score-card {
  background: var(--dm-surface) !important;
  border: 1px solid var(--dm-line) !important;
  box-shadow: var(--dm-shadow-sm) !important;
  backdrop-filter: var(--dm-blur);
}
.access-panel { margin-top: 20px; padding: 20px 22px; border-radius: var(--dm-radius-lg); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.access-panel h2,
.section-heading h2 { margin: 0; color: var(--dm-ink); font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.05em; }
.access-panel p { max-width: 650px; margin: 8px 0 0; line-height: 1.55; }
.access-controls { display: flex; gap: 10px; flex-wrap: wrap; }

label { display: grid; gap: 8px; color: var(--dm-ink); font-size: 13px; font-weight: 900; }
input, textarea, select {
  width: 100%;
  min-width: 160px;
  min-height: 48px;
  padding: 13px 15px;
  color: var(--dm-ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--dm-line);
  border-radius: 16px;
  outline: 0;
  transition: 0.18s ease;
}
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
html.dark-mode input,
html.dark-mode textarea,
html.dark-mode select { background: rgba(255, 255, 255, 0.07) !important; }
input:focus, textarea:focus, select:focus { border-color: var(--dm-blue); box-shadow: 0 0 0 4px var(--dm-blue-soft); }
textarea { min-height: 110px; resize: vertical; }

.btn,
.primary-btn,
.secondary-btn,
.primary-link,
.tab-btn,
.board-btn {
  min-height: 44px;
  border-radius: 999px !important;
  border: 1px solid var(--dm-line) !important;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 950 !important;
  transition: 0.18s ease;
}
.primary-btn,
.primary-link,
.tab-btn.active,
.board-btn.active,
.tab-btn:hover,
.board-btn:hover {
  color: #fff !important;
  background: linear-gradient(135deg, var(--dm-blue), var(--dm-blue-dark)) !important;
  border-color: transparent !important;
  box-shadow: 0 12px 26px rgba(8, 169, 217, 0.24) !important;
}
.secondary-btn,
.tab-btn,
.board-btn {
  color: var(--dm-ink) !important;
  background: rgba(255, 255, 255, 0.66) !important;
}
body.dark-mode .secondary-btn,
body.dark-mode .tab-btn,
body.dark-mode .board-btn,
html.dark-mode .secondary-btn,
html.dark-mode .tab-btn,
html.dark-mode .board-btn { background: rgba(255, 255, 255, 0.08) !important; }

.presentacy-app,
.locked-view,
.panel { margin-top: 20px; padding: 22px !important; border-radius: var(--dm-radius-lg); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 6px; border-radius: 999px; background: rgba(8, 169, 217, 0.08); border: 1px solid var(--dm-line); }
body.dark-mode .tabs,
html.dark-mode .tabs { background: rgba(255, 255, 255, 0.06); }
.tab-section { display: none; }
.tab-section.active { display: block; }

.section-heading,
.mini-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.overview-grid,
.challenge-grid,
.criteria-grid,
.controls-grid,
.form-grid,
.generator-layout,
.scoring-layout,
.two-column,
.presenters-columns { display: grid; gap: 16px; }
.overview-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.generator-layout,
.scoring-layout,
.two-column,
.presenters-columns,
.controls-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.criteria-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.challenge-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.summary-card,
.generator-card,
.practice-card,
.challenge-card,
.next-presenter,
.score-history-card,
.selected-score-card,
.criteria-card { padding: 22px !important; border-radius: 26px; }
.summary-icon,
.challenge-card > span,
.criteria-card > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--dm-blue), var(--dm-blue-dark));
  font-size: 24px;
  margin-bottom: 14px;
}
.summary-card h3,
.panel h3,
.generator-card h3,
.practice-card h3,
.challenge-card h3,
.criteria-card h3 { margin: 0 0 10px; color: var(--dm-ink); font-size: 22px; }
.summary-card p,
.panel p,
.practice-card p,
.challenge-card p,
.generated-topic p,
.criteria-card p { color: var(--dm-muted); line-height: 1.6; }

.generated-topic,
.big-topic,
.topic-help,
.timer-box,
.score-total {
  padding: 18px;
  border-radius: 22px;
  background: rgba(8, 169, 217, 0.08);
  border: 1px solid var(--dm-line);
}
body.dark-mode .generated-topic,
body.dark-mode .big-topic,
body.dark-mode .topic-help,
body.dark-mode .timer-box,
body.dark-mode .score-total,
html.dark-mode .generated-topic,
html.dark-mode .big-topic,
html.dark-mode .topic-help,
html.dark-mode .timer-box,
html.dark-mode .score-total { background: rgba(255, 255, 255, 0.06); }
.big-topic { color: var(--dm-ink) !important; font-size: 22px; font-weight: 900; }
.topic-actions,
.button-row,
.student-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.student-list,
.leaderboard-list,
.score-history-list { display: grid; gap: 10px; }
.student-row,
.leaderboard-row,
.saved-score-row,
.score-history-item,
.score-row { padding: 14px; border-radius: 18px; border: 1px solid var(--dm-line); background: var(--dm-surface-solid); }
.student-row,
.leaderboard-row,
.saved-score-row,
.score-row-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rank-badge,
.rank-number,
.pill,
.mini-tags span,
.student-chip,
.mini-heading span { padding: 7px 10px; border-radius: 999px; background: var(--dm-blue-soft); color: var(--dm-blue-dark); font-size: 12px; font-weight: 950; }
.leaderboard-points,
.score-total strong { color: var(--dm-blue-dark); }
.progress-line { height: 9px; border-radius: 999px; background: rgba(8, 169, 217, 0.14); overflow: hidden; margin-top: 16px; }
.progress-line > *,
.progress-line span { display: block; height: 100%; background: linear-gradient(135deg, var(--dm-blue), var(--dm-blue-dark)); border-radius: inherit; }
.timer-box span { display: block; margin-bottom: 12px; color: var(--dm-ink); font-size: 42px; font-weight: 950; letter-spacing: -0.06em; }
.locked-view { text-align: center; padding: 54px 24px !important; }
.lock-icon { font-size: 44px; }

.teacher-action.hidden,
.teacher-only.hidden { display: none !important; }

@media (max-width: 880px) {
  .hero,
  .generator-layout,
  .scoring-layout,
  .two-column,
  .presenters-columns,
  .controls-grid { grid-template-columns: 1fr; }
  .topbar { border-radius: 26px; flex-wrap: wrap; }
  .main-nav { width: 100%; }
  .access-panel { display: grid; }
  .access-controls { width: 100%; }
  .access-controls label { flex: 1; }
}

@media (max-width: 560px) {
  main,
  .topbar { width: min(100% - 22px, var(--dm-max)); }
  .presentacy-page { padding-top: 10px; }
  .hero { padding: 32px; border-radius: 32px; }
  .hero h1 { font-size: 56px; }
  .tabs { border-radius: 22px; }
  .section-heading,
  .mini-heading { align-items: flex-start; flex-direction: column; }
  .student-row,
  .leaderboard-row { align-items: flex-start; flex-direction: column; }
}


/* ============================================================
   SCORING PAGE UX FIX
   The score form now appears before the big rubric guide, so
   teachers do not need to scroll past the rubric on mobile.
============================================================ */
.score-sheet-layout,
.score-first-layout {
  display: grid;
  gap: 16px;
}

.teacher-score-panel {
  order: 1;
}

.after-score-guide,
.scoring-guide-panel {
  order: 2;
}

.after-score-guide .simple-note {
  margin-bottom: 16px;
}

@media (max-width: 560px) {
  .after-score-guide .criteria-grid,
  .scoring-guide-panel .criteria-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   SCORE PRESENTER PICKER
   Lets teachers choose the presenter directly inside Add Score.
============================================================ */
.score-picker-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr) auto;
  align-items: center;
  gap: 16px;
}

.score-picker-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
}

.score-picker-controls label {
  margin: 0;
}

.score-picker-controls select {
  min-width: 0;
  width: 100%;
}

@media (max-width: 980px) {
  .score-picker-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .score-picker-controls {
    order: 1;
  }

  .score-picker-card .selected-score-main {
    order: 2;
  }

  .score-picker-card .selected-score-stats {
    order: 3;
  }
}

@media (max-width: 560px) {
  .score-picker-card {
    padding: 18px !important;
  }

  .score-picker-controls {
    grid-template-columns: 1fr;
  }

  .score-picker-controls select {
    min-height: 54px;
    border-radius: 18px;
    font-size: 16px;
  }
}

/* ============================================================
   MOBILE-FRIENDLY 1–4 PRESENTACY BUTTON SCORING
   1 = Needs Improvement, 2 = Developing, 3 = Good, 4 = Excellent
============================================================ */
.scoring-sliders {
  display: grid;
  gap: 12px;
}

.score-button-row {
  display: grid !important;
  gap: 12px;
  padding: 16px !important;
  overflow: hidden;
}

.score-row-top {
  width: 100%;
}

.score-row-top span {
  min-width: 0;
  color: var(--dm-ink);
  font-weight: 950;
  line-height: 1.25;
}

.score-row-top strong {
  min-width: 178px;
  text-align: right;
  color: var(--dm-blue-dark);
  font-weight: 950;
  letter-spacing: -0.02em;
}

.score-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.score-choice-btn {
  min-width: 0;
  min-height: 78px;
  padding: 10px 8px;
  border: 1px solid var(--dm-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.70);
  color: var(--dm-ink);
  display: grid;
  place-items: center;
  gap: 4px;
  text-align: center;
  box-shadow: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

body.dark-mode .score-choice-btn,
html.dark-mode .score-choice-btn {
  background: rgba(255, 255, 255, 0.06);
}

.score-choice-btn strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--dm-blue-soft);
  color: var(--dm-blue-dark);
  font-size: 18px;
  font-weight: 950;
}

.score-choice-btn span {
  color: var(--dm-muted);
  font-size: 11px;
  line-height: 1.15;
  font-weight: 900;
}

.score-choice-btn:hover {
  transform: translateY(-1px);
  border-color: var(--dm-line-strong);
}

.score-choice-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--dm-blue), var(--dm-blue-dark));
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(8, 169, 217, 0.20);
}

.score-choice-btn.active strong {
  background: rgba(255, 255, 255, 0.20);
  color: #fff;
}

.score-choice-btn.active span {
  color: rgba(255, 255, 255, 0.92);
}

.score-choice-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

@media (max-width: 720px) {
  .teacher-score-panel,
  .score-button-row {
    border-radius: 22px !important;
  }

  .score-row-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .score-row-top strong {
    min-width: 0;
    text-align: left;
  }

  .score-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .score-choice-btn {
    min-height: 68px;
    padding: 9px 7px;
    border-radius: 16px;
  }
}

@media (max-width: 430px) {
  main {
    width: min(100% - 16px, var(--dm-max));
  }

  .presentacy-app,
  .panel,
  .selected-score-card {
    padding: 14px !important;
  }

  .score-choice-grid {
    gap: 7px;
  }

  .score-choice-btn strong {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .score-choice-btn span {
    font-size: 10px;
  }
}

.access-panel{display:none!important;}
.history-item{padding:14px;border:1px solid var(--dm-line);border-radius:16px;margin-bottom:10px;}


/* Dramagic connected points note */
.points-adjustment-note {
  display: block;
  margin-top: 4px;
  color: var(--dm-muted);
  font-size: 11px;
  font-weight: 850;
}


/* DRAMAGIC FIX — Total score file */
.score-ledger-subtitle {
  max-width: 720px;
  margin: 8px 0 0;
}

.total-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.score-ledger-list {
  display: grid;
  gap: 10px;
}

.score-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--dm-line);
  border-radius: 18px;
  background: var(--dm-surface-solid);
}

.score-ledger-row strong,
.score-ledger-row span,
.score-ledger-row small {
  display: block;
}

.score-ledger-row strong {
  color: var(--dm-ink);
  font-weight: 950;
}

.score-ledger-row span {
  margin-top: 4px;
  color: var(--dm-muted);
  font-size: 13px;
  font-weight: 750;
}

.score-ledger-row small {
  margin-top: 3px;
  color: var(--dm-muted);
  font-size: 12px;
}

.score-ledger-points {
  min-width: 78px;
  text-align: center;
  padding: 10px 12px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--dm-blue), var(--dm-blue-dark));
  font-weight: 950;
}

.score-ledger-points.negative {
  background: var(--dm-danger);
}

.score-ledger-points.neutral {
  color: var(--dm-ink);
  background: var(--dm-blue-soft);
}

body.dark-mode .score-ledger-row,
html.dark-mode .score-ledger-row {
  background: var(--dm-elevated);
}

@media (max-width: 900px) {
  .total-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .total-score-grid { grid-template-columns: 1fr; }
  .score-ledger-row { grid-template-columns: 1fr; }
  .score-ledger-points { width: fit-content; }
}


/* =====================================================
   Manager score viewer: CEO/Teacher can choose whose file
   they are reviewing without relying on the hidden preview tools.
===================================================== */
.manager-score-viewer {
  margin: 16px 0 18px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--dm-line-strong);
  border-radius: var(--dm-radius-lg);
  background: var(--dm-surface);
  box-shadow: var(--dm-shadow-sm);
  backdrop-filter: var(--dm-blur);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
  gap: 18px;
  align-items: end;
}
.manager-score-viewer h3 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.manager-score-viewer p:not(.eyebrow) {
  margin: 0;
  max-width: 620px;
  color: var(--dm-muted);
  line-height: 1.55;
}
.manager-score-controls {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 12px;
}
.manager-score-controls label {
  display: grid;
  gap: 8px;
  color: var(--dm-ink);
  font-size: 13px;
  font-weight: 950;
}
.manager-score-controls select {
  min-height: 50px;
  width: 100%;
  border: 1px solid var(--dm-line-strong);
  border-radius: 16px;
  padding: 0 14px;
  color: var(--dm-ink);
  background: var(--dm-elevated);
  font-weight: 850;
  outline: none;
}
.manager-score-controls select:focus {
  border-color: var(--dm-blue);
  box-shadow: 0 0 0 4px var(--dm-blue-soft);
}
body:not(.presentacy-manager) .manager-score-viewer {
  display: none !important;
}
body.dark-mode .manager-score-viewer,
html.dark-mode .manager-score-viewer {
  background: var(--dm-surface) !important;
}
@media (max-width: 820px) {
  .manager-score-viewer {
    grid-template-columns: 1fr;
  }
  .manager-score-controls {
    grid-template-columns: 1fr;
  }
}


/* Dramagic Presentacy readability + personal score file redesign */
.generator-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch;
}
.generator-card {
  width: 100%;
}
.generated-topic,
.topic-help {
  font-size: 1rem;
  line-height: 1.75;
}
.generated-topic h3 {
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.15;
}
.generated-topic ul,
.topic-help ul {
  padding-left: 1.25rem;
}
.topic-help {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.topic-help h4 {
  grid-column: 1 / -1;
  font-size: 1.35rem;
}
.compact-practice-card {
  display: block;
  padding: 18px 20px;
}
.compact-practice-card ol {
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-left: 0;
  list-style: none;
}
.compact-practice-card li {
  background: rgba(10, 169, 217, 0.08);
  border: 1px solid rgba(10, 169, 217, 0.18);
  border-radius: 16px;
  padding: 12px;
  font-weight: 800;
}
.timer-box { display: none !important; }
.offline-score-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 18px 0;
  border-style: dashed;
}
.offline-score-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.score-profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, .8fr);
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(0, 170, 220, .16), rgba(119, 93, 255, .13));
  border: 1px solid rgba(10, 169, 217, .22);
  box-shadow: 0 22px 55px rgba(0, 82, 120, .09);
  margin-bottom: 18px;
}
.score-profile-name {
  font-size: clamp(2rem, 5vw, 4rem);
  margin: 0;
  line-height: .95;
}
.score-profile-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.score-profile-pill {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(10, 169, 217, .18);
  font-weight: 900;
  color: var(--presentacy-heading, #0f1b2d);
}
.score-big-total {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 190px;
  border-radius: 26px;
  background: linear-gradient(135deg, #08a9d9, #695cff);
  color: #fff;
  box-shadow: 0 18px 40px rgba(8, 169, 217, .22);
}
.score-big-total strong {
  display: block;
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: .9;
}
.score-profile-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.score-profile-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(10, 169, 217, .2);
}
.score-profile-card span {
  display: block;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--presentacy-muted, #63758a);
}
.score-profile-card strong {
  display: block;
  font-size: 2rem;
  margin-top: 8px;
}
body.dark-mode .score-profile-hero,
html.dark-mode .score-profile-hero,
body.dark-mode .score-profile-card,
html.dark-mode .score-profile-card,
body.dark-mode .compact-practice-card li,
html.dark-mode .compact-practice-card li {
  background: rgba(13, 23, 36, .84);
  border-color: rgba(255,255,255,.12);
}
@media (max-width: 820px) {
  .topic-help { grid-template-columns: 1fr; }
  .compact-practice-card ol { grid-template-columns: 1fr; }
  .offline-score-panel { display: grid; }
  .offline-score-actions { justify-content: flex-start; }
  .score-profile-hero { grid-template-columns: 1fr; }
  .score-profile-cards { grid-template-columns: 1fr; }
}


/* DRAMAGIC FIX — personalized total score layout should not stay inside the old 4-column summary grid */
.total-score-grid.score-profile-layout,
.total-score-grid:has(.score-profile-hero),
.total-score-grid:has(.score-profile-cards) {
  display: block;
  grid-template-columns: none;
}
.total-score-grid.score-profile-layout .score-profile-hero,
.total-score-grid:has(.score-profile-hero) .score-profile-hero {
  width: 100%;
}
.total-score-grid.score-profile-layout .score-profile-cards,
.total-score-grid:has(.score-profile-cards) .score-profile-cards {
  width: 100%;
}

/* DRAMAGIC FIX — nicer Presentation History cards */
.history-item { display: none; }
.presentation-history-card {
  padding: clamp(18px, 3vw, 26px);
  border-radius: 26px;
  border: 1px solid rgba(10, 169, 217, .22);
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(238, 250, 255, .88));
  box-shadow: 0 20px 50px rgba(0, 82, 120, .08);
  margin-bottom: 18px;
}
.presentation-history-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.presentation-history-head h3 {
  margin: 4px 0 6px;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1;
  color: var(--presentacy-heading, #0f1b2d);
}
.presentation-history-head span,
.presentation-history-meta,
.presentation-feedback-card p {
  color: var(--presentacy-muted, #63758a);
  font-weight: 750;
}
.presentation-history-score {
  min-width: 116px;
  padding: 16px;
  border-radius: 22px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #08a9d9, #695cff);
  box-shadow: 0 16px 34px rgba(8,169,217,.2);
}
.presentation-history-score strong {
  display: block;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: .9;
}
.presentation-history-score span { color: rgba(255,255,255,.9); font-weight: 950; }
.presentation-progress-line {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(10,169,217,.12);
  margin: 18px 0 10px;
}
.presentation-progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #08a9d9, #6b5cff);
}
.presentation-history-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.presentation-history-meta span,
.presentation-feedback-card {
  border: 1px solid rgba(10,169,217,.16);
  background: rgba(255,255,255,.72);
  border-radius: 16px;
}
.presentation-history-meta span { padding: 8px 12px; }
.presentation-feedback-card { padding: 14px 16px; margin-bottom: 16px; }
.presentation-feedback-card strong { display:block; margin-bottom: 5px; color: var(--presentacy-heading, #0f1b2d); }
.presentation-feedback-card p { margin: 0; }
.presentation-criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.presentation-criterion-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(10,169,217,.18);
  background: rgba(255,255,255,.86);
}
.presentation-criterion-card span {
  font-weight: 950;
  color: var(--presentacy-heading, #0f1b2d);
  line-height: 1.15;
}
.presentation-criterion-card strong {
  grid-row: span 2;
  min-width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #08a9d9, #695cff);
  font-size: 1.45rem;
  line-height: 1;
}
.presentation-criterion-card strong small { font-size: .75rem; opacity: .9; margin-left: 1px; }
.presentation-criterion-card em {
  font-style: normal;
  color: var(--presentacy-muted, #63758a);
  font-weight: 800;
  font-size: .88rem;
}
body.dark-mode .presentation-history-card,
html.dark-mode .presentation-history-card {
  background: linear-gradient(180deg, rgba(13,23,36,.94), rgba(10,33,48,.88));
  border-color: rgba(255,255,255,.12);
}
body.dark-mode .presentation-criterion-card,
html.dark-mode .presentation-criterion-card,
body.dark-mode .presentation-feedback-card,
html.dark-mode .presentation-feedback-card,
body.dark-mode .presentation-history-meta span,
html.dark-mode .presentation-history-meta span {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}
@media (max-width: 900px) {
  .presentation-criteria-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .presentation-history-head { display: grid; }
  .presentation-history-score { width: 100%; }
  .presentation-criteria-grid { grid-template-columns: 1fr; }
}
