:root {
  --bg: #f3f0e8;
  --bg-2: #17306f;
  --card: #fffdf8;
  --ink: #1f2430;
  --muted: #556070;
  --brand: #2f6bff;
  --brand-ink: #ffffff;
  --ok: #22c55e;
  --bad: #b42318;
  --c-red: #e21b3c;
  --c-blue: #2f6bff;
  --c-yellow: #f2c94c;
  --c-green: #26890c;
  --radius: 0px;
  --border: 2px solid #1f2430;
  --shadow: 8px 8px 0 #1f2430;
  --btn-shadow: 4px 4px 0 #1f2430;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(31, 36, 48, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 36, 48, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: -1;
}

body.home-landing {
  position: relative;
  background: #f3f0e8;
  color: #1f2430;
  display: block;
  overflow-x: hidden;
}

.home-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(31, 36, 48, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 36, 48, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
}

.home-header,
.home-shell {
  position: relative;
  z-index: 1;
}

.home-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.home-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.home-wordmark-mark {
  width: 44px;
  height: 44px;
  border: 2px solid #1f2430;
  background: #f2c94c;
  box-shadow: 4px 4px 0 #1f2430;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* sotaque retro só no selo (design-direction): pixel na marca "CP" */
  font-family: "Press Start 2P", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
}

.home-wordmark-text {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.home-header-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-link {
  color: #495365;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 12px;
}

.home-link-strong {
  border: 2px solid #1f2430;
  background: #ffffff;
  box-shadow: 4px 4px 0 #1f2430;
}

.home-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 20px 40px;
}

.home-hero {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}

.home-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 800;
  color: #556070;
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.home-subtitle {
  margin: 14px auto 0;
  max-width: 620px;
  font-size: 1.02rem;
  line-height: 1.6;
  color: #556070;
}

.video-embed-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border: 2px solid #1f2430;
  background: #111827;
  box-shadow: 4px 4px 0 #1f2430;
}

.video-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.home-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.home-stage,
.home-side {
  min-width: 0;
}

.home-card,
.home-side-card {
  background: #fffdf8;
  border: 2px solid #1f2430;
  box-shadow: 8px 8px 0 #1f2430;
}

.home-card {
  padding: 24px;
}

.home-card-secondary h2,
.home-side-card h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.home-card-primary {
  padding: 28px;
}

.home-label {
  display: block;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  font-weight: 800;
  color: #556070;
}

.home-code-input {
  width: 100%;
  min-height: 74px;
  padding: 18px 20px;
  border: 3px solid #1f2430;
  background: #ffffff;
  color: #1f2430;
  outline: none;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 2px #e7e1d2;
  margin-bottom: 14px;
}

.home-code-input::placeholder {
  letter-spacing: 0.04em;
  font-weight: 700;
  font-size: 0.95rem;
  color: #7a8699;
}

.home-code-input:focus,
.home-name-input:focus {
  border-color: #2f6bff;
  box-shadow: inset 0 0 0 2px #dbe7ff;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 12px 18px;
  border: 2px solid #1f2430;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.18s ease, opacity 0.18s ease;
}

.home-btn:hover { filter: brightness(1.04); }
.home-btn:active { transform: translateY(2px); }
.home-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.home-btn-primary {
  width: 100%;
  background: #2f6bff;
  color: #fff;
  box-shadow: 5px 5px 0 #1f2430;
}

.home-btn-secondary {
  background: #ffffff;
  color: #1f2430;
  box-shadow: 4px 4px 0 #1f2430;
}

.home-btn-ghost {
  min-width: 110px;
  background: #f2c94c;
  color: #1f2430;
  box-shadow: 4px 4px 0 #1f2430;
}

.home-btn-block {
  width: 100%;
}

.home-status {
  margin: 14px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.home-status-neutral { color: #556070; }
.home-status-error { color: #b42318; font-weight: 700; }

.home-chip {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 2px solid #1f2430;
  background: #f2c94c;
  box-shadow: 4px 4px 0 #1f2430;
  /* selo de "fase": sotaque pixel, pequeno e legível */
  font-family: "Press Start 2P", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
}

.home-helper {
  margin: 0 0 16px;
  color: #556070;
  line-height: 1.5;
}

.home-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.home-name-input {
  margin: 0;
  min-height: 56px;
}

.home-inline-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 16px;
}

.home-side {
  display: grid;
  gap: 18px;
}

.home-side-card {
  padding: 20px;
}

.home-list {
  margin: 0;
  padding-left: 18px;
  color: #495365;
  line-height: 1.7;
}

.home-list li + li {
  margin-top: 4px;
}

.wrap {
  width: 100%;
  max-width: 720px;
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.brand {
  color: var(--ink);
  text-align: center;
  padding: 24px 0 8px;
}
.brand h1 { margin: 0; font-size: 2rem; letter-spacing: 1px; font-weight: 800; }
.brand p { margin: 6px 0 0; color: var(--muted); font-weight: 700; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 16px 0;
}

h2 { margin: 0 0 16px; }

input, button, select {
  font: inherit;
}

.field {
  width: 100%;
  padding: 14px 16px;
  border: var(--border);
  border-radius: var(--radius);
  font-size: 1.1rem;
  outline: none;
  margin-bottom: 12px;
  background: #ffffff;
  color: var(--ink);
}
.field:focus { border-color: var(--c-blue); box-shadow: inset 0 0 0 2px #dbe7ff; }

.btn {
  width: 100%;
  padding: 14px 16px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: var(--btn-shadow);
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.18s ease;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(2px); box-shadow: 2px 2px 0 #1f2430; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: var(--border); box-shadow: var(--btn-shadow); }

.pin-display {
  text-align: center;
  color: #fff;
}
.pin-display .label { opacity: 0.75; margin-bottom: 4px; }
.pin-display .pin {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 16px;
  display: inline-block;
}

.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

/* Player chips (lobby) */
.players {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip {
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  animation: pop 0.2s ease;
}
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Answer grid (Kahoot style) */
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.answer {
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 28px 16px;
  cursor: pointer;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.08s, opacity 0.2s;
}
.answer:active { transform: scale(0.98); }
.answer.a0 { background: var(--c-red); }
.answer.a1 { background: var(--c-blue); }
.answer.a2 { background: var(--c-yellow); }
.answer.a3 { background: var(--c-green); }
.answer.dim { opacity: 0.35; }
.answer.correct { outline: 5px solid #fff; }

.timer {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
}
.qmeta { color: var(--muted); text-align: center; opacity: 0.85; }
.qtext {
  color: var(--ink);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 12px 0;
}
/* In the editor the question input must be readable on a white card */
input.qtext {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
}

/* leaderboard */
.lb { list-style: none; padding: 0; margin: 8px 0 0; }
.lb li {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f3f4f6;
  margin-bottom: 8px;
  font-weight: 700;
}
.lb li .pos { color: var(--brand); margin-right: 10px; }

/* Kahoot-style extras */
.badge {
  display: inline-block;
  background: #fbbf24;
  color: #1a1a2e;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
  animation: pop 0.2s ease;
}
.qr-box {
  flex: 0 0 auto !important;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  line-height: 0;
}
.qr-box img { width: 140px; height: 140px; }
.answer.tf { min-height: 120px; font-size: 1.4rem; }
.gained {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ok);
  margin: 4px 0;
  animation: pop 0.25s ease;
}
.streak {
  font-size: 1.1rem;
  font-weight: 800;
  color: #d97706;
  margin: 4px 0;
}

/* Tabs (teacher dashboard) */
.tabs { display: flex; gap: 8px; margin: 8px 0; }
.tab {
  flex: 1;
  border: var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  box-shadow: 4px 4px 0 #1f2430;
  transition: transform 0.08s;
}
.tab.active { background: var(--card); box-shadow: inset 0 -4px 0 var(--brand); transform: translateY(2px); }

/* Report tables */
.rtable { width: 100%; border-collapse: collapse; margin-top: 8px; }
.rtable th, .rtable td { text-align: left; padding: 10px 12px; }
.rtable th { background: #f3f4f6; font-size: 0.85rem; text-transform: uppercase; color: var(--muted); }
.rtable tr:nth-child(even) td { background: #fafafa; }
.rtable td { border-bottom: 1px solid #f0f0f0; }

/* Selectable turma chips (launch form) */
.chip.selectable { cursor: pointer; background: #e5e7eb; color: var(--ink); user-select: none; }
.chip.selectable:has(input:checked) { background: var(--brand); color: #fff; }
.chip.selectable input { accent-color: #fff; margin-right: 4px; }

@media (max-width: 900px) {
  .home-entry {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-grid {
    background-size: 22px 22px;
  }

  .home-header {
    padding: 14px 16px 0;
    flex-direction: column;
    align-items: stretch;
  }

  .home-header-links {
    justify-content: stretch;
  }

  .home-link,
  .home-link-strong {
    text-align: center;
  }

  .home-shell {
    padding: 20px 16px 32px;
  }

  .home-card,
  .home-side-card {
    box-shadow: 6px 6px 0 #1f2430;
  }

  .home-card-primary,
  .home-card,
  .home-side-card {
    padding: 18px;
  }

  .home-name-row,
  .home-inline-actions {
    grid-template-columns: 1fr;
  }
}

/* Teacher area: library + editor */
.quiz-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg);
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.quiz-item-info { display: flex; flex-direction: column; }
.quiz-item-actions { display: flex; gap: 6px; }
.mini {
  border: none;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
}
.mini.ghost { background: #e5e7eb; color: var(--ink); }
.mini.danger { background: #fee2e2; color: var(--bad); }
.mini:hover { opacity: 0.85; }

.qcard {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.ans-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding-left: 10px;
  border-left: 6px solid #e5e7eb;
  border-radius: 4px;
}
.ans-row.a0 { border-left-color: var(--c-red); }
.ans-row.a1 { border-left-color: var(--c-blue); }
.ans-row.a2 { border-left-color: var(--c-yellow); }
.ans-row.a3 { border-left-color: var(--c-green); }
.ans-row .acorrect { width: 20px; height: 20px; accent-color: var(--ok); cursor: pointer; }
.ans-row .atext { flex: 1; }

/* Scoring model selector in question card */
.qscore-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.qscore-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.qscore-select {
  flex: 1;
  min-width: 160px;
  padding: 6px 10px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background: #f9fafb;
  cursor: pointer;
  outline: none;
}
.qscore-select:focus { border-color: var(--brand); }
.qscore-select.model-speed  { border-left: 4px solid var(--brand); }
.qscore-select.model-fixed  { border-left: 4px solid var(--ok); }
.qscore-select.model-none   { border-left: 4px solid var(--muted); }

/* Google Forms question kinds */
.answer.multi { opacity: 0.75; }
.answer.multi.picked {
  opacity: 1;
  outline: 4px solid #fff;
  outline-offset: -4px;
}
.confirm-answer { margin-top: 4px; }
.confirm-answer:disabled { opacity: 0.5; cursor: not-allowed; }

/* Hub computacao.pro */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.hub-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 12px;
  transition: border-color 0.15s, transform 0.08s;
}
.hub-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.hub-icon { font-size: 1.8rem; }

/* COMPUTPLAN */
.ia-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: #f5f3ff;
  border-radius: 10px;
  padding: 12px;
  margin: 16px 0 4px;
}
.plan-field { margin-top: 12px; }
.plan-field label { font-weight: 700; }
.plan-field textarea { margin-top: 6px; }
.plan-quiz-box {
  background: #f9fafb;
  border: 2px dashed #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}
.linked-quiz {
  display: inline-block;
  background: #ede9fe;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 6px 14px;
  margin: 4px 6px 0 0;
  font-size: 0.9rem;
}
.version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

/* Turma roster */
.roster {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.roster code { background: #eef2ff; padding: 2px 6px; border-radius: 6px; }
.cred-box {
  background: #fef9c3;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 12px;
}

/* Grading panel (dissertativas) */
#gradingPanel {
  border-top: 2px dashed #e5e7eb;
  margin-top: 20px;
  padding-top: 16px;
}
.grade-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.grade-row-main { flex: 1; min-width: 0; }
.grade-text {
  margin: 6px 0 0;
  white-space: pre-wrap;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid #f0f0f0;
}
.grade-comment { margin: 6px 0 0; color: var(--muted); font-size: 0.85rem; }
.grade-verdict { display: flex; gap: 6px; flex: 0 0 auto; }
.grade-verdict .mini { background: #e5e7eb; font-size: 1rem; }
.grade-verdict .v-ok.on  { background: var(--ok); }
.grade-verdict .v-bad.on { background: var(--bad); }
.grade-btn { margin-left: 6px; padding: 4px 10px; font-size: 0.78rem; }

/* Report: expandable student answers */
.student-row { cursor: pointer; }
.student-row:hover td { background: #f5f3ff !important; }
.expand-cell { color: var(--brand); font-weight: 800; width: 20px; }
.answer-detail { padding: 4px 8px; }
.answer-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 6px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}
.answer-line:last-child { border-bottom: none; }
.answer-mark { flex: 0 0 auto; }

.status-big {
  color: #fff;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  margin: 24px 0;
}
.emoji { font-size: 3rem; }

/* Feedback banner in quiz editor (AI modal) */
.import-banner {
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.import-banner.ok   { background: #dcfce7; color: #166534; }
.import-banner.warn { background: #fef9c3; color: #854d0e; }
.import-banner.err  { background: #fee2e2; color: #991b1b; }

/* Images */
.q-image {
  display: block;
  max-width: 100%;
  max-height: 250px;
  margin: 12px auto;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(0,0,0,0.05);
}
@media (min-width: 768px) {
  .q-image { max-height: 350px; }
}

.img-uploader {
  display: flex;
  gap: 8px;
  margin: 8px 0;
  align-items: center;
}
.img-preview-box {
  position: relative;
  display: inline-block;
  margin-top: 8px;
}
.img-preview-box img {
  max-width: 200px;
  max-height: 120px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.img-preview-box .rm-img {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--bad);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* ── Fullscreen async code overlay ──────────────────────────────────────────── */
.code-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(1200px 700px at 50% -10%, var(--bg-2), var(--bg));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.code-overlay .co-title {
  color: rgba(255,255,255,.7);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.code-overlay .co-quiz {
  color: #fff;
  font-size: 1.7rem;
  font-weight: 800;
  text-align: center;
  max-width: 700px;
  line-height: 1.2;
  padding: 0 20px;
}
.code-overlay .co-code {
  font-size: clamp(4rem, 16vw, 9rem);
  font-weight: 900;
  letter-spacing: .18em;
  color: #fff;
  background: rgba(255,255,255,.1);
  border: 3px solid rgba(255,255,255,.25);
  border-radius: 24px;
  padding: 20px 48px;
  margin: 8px 0;
  line-height: 1;
  text-shadow: 0 4px 30px rgba(0,0,0,.4);
  animation: pulse-code 2.5s ease-in-out infinite;
}
@keyframes pulse-code {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.15); }
  50%       { box-shadow: 0 0 0 20px rgba(255,255,255,0); }
}
.code-overlay .co-url {
  color: rgba(255,255,255,.6);
  font-size: 1rem;
  text-align: center;
}
.code-overlay .co-url b { color: rgba(255,255,255,.9); }

.code-overlay .co-info-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.code-overlay .co-badge {
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 8px 20px;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
}
.code-overlay .co-badge.due {
  background: rgba(251,191,36,.2);
  border-color: rgba(251,191,36,.5);
  color: #fbbf24;
}
.code-overlay .co-badge.expired {
  background: rgba(239,68,68,.18);
  border-color: rgba(239,68,68,.45);
  color: #fca5a5;
}
.code-overlay .co-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,.12);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.code-overlay .co-close:hover { background: rgba(255,255,255,.25); }
.code-overlay .co-clock {
  font-size: 1.2rem;
  font-weight: 800;
  color: rgba(255,255,255,.85);
  text-align: center;
  letter-spacing: .03em;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  padding: 4px 8px;
  transition: color 0.1s;
}
.nav-link:hover {
  color: var(--ink);
}
