@font-face {
  font-family: Manrope;
  src: url('/static/fonts/Manrope.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --bg: #f8f7f4;

  --paper: #fff;

  --ink: #253046;

  --muted: #626d7e;
  --red: #df0927;
  --red-dark: #b9001b;

  --line: #dfe3ea;

  --charcoal: #263246;

  --gold: #956317;
  --green: #26744e;
  --amber: #c0a264;
  --radius: 10px;
  --text: var(--ink);
  --border: var(--line);
  --cyan: var(--red);
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
::selection {
  background: #f6b6bf;
  color: #222;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  line-height: 1.14;
  letter-spacing: -0.045em;
  font-weight: 800;
}
p {
  margin-bottom: 1em;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-color: var(--ink);
}
input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid #cccec5;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  transition: border-color 0.16s;
}
input::placeholder,
textarea::placeholder {
  color: #81847c;
}
input[type='checkbox'] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--red);
  padding: 0;
  flex: 0 0 18px;
}
input[type='file'] {
  padding: 12px;
  font-size: 12px;
  background: #f8f8f5;
}
input[type='file']::file-selector-button {
  border: 0;
  background: var(--ink);
  color: white;
  padding: 6px 10px;
  margin-right: 12px;
  border-radius: 3px;
}
label {
  font-size: 12px;
  font-weight: 700;
}
small {
  font-size: 11px;
}
.icon {
  height: 20px;
  width: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1.6;
  text-transform: uppercase;
}
.muted,
.paragraph {
  color: var(--muted);
}
.tiny {
  font-size: 12px;
}
.numeric,
.timer,
.projector-timer,
.code {
  font-variant-numeric: tabular-nums;
}
.hidden {
  display: none !important;
}
.full {
  width: 100%;
}
.center {
  text-align: center;
}
.split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.grid {
  display: grid;
  gap: 20px;
}
.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.section {
  margin-top: 28px;
}
.hr {
  height: 1px;
  background: var(--line);
  margin: 24px 0;
}
.compact {
  padding: 24px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  min-height: 48px;
  padding: 12px 19px;
  background: var(--red);
  color: white;
  font-weight: 750;
  font-size: 12px;
  text-decoration: none;
  transition:
    background 0.16s,
    transform 0.16s;
}
.btn:hover:not(:disabled) {
  background: var(--red-dark);
  transform: translateY(-1px);
}
.btn .icon {
  width: 18px;
  height: 18px;
}
.btn.secondary {
  background: var(--ink);
  color: white;
}
.btn.secondary:hover {
  background: #42443e;
}
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover {
  background: #ebece5;
}
.btn.danger {
  background: #fff2f3;
  border-color: #f0c6cc;
  color: #ac0820;
}
.btn.danger:hover {
  background: #fce0e5;
}
.btn.small {
  min-height: 38px;
  font-size: 11px;
  padding: 8px 12px;
}
.icon-button {
  height: 36px;
  width: 36px;
  display: grid;
  place-items: center;
  background: transparent;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}
.field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.field label span {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}
.field small {
  color: var(--muted);
}
.notice {
  background: #f1f2ec;
  border: 1px solid #d7dacb;
  padding: 13px 16px;
  border-radius: 6px;
  margin-top: 16px;
  color: #53594b;
  font-size: 12px;
}
.notice.error {
  background: #fff1f2;
  border-color: #edbdc4;
  color: #a00621;
}
.notice.success {
  background: #ecf6ef;
  border-color: #b8d5c1;
  color: #22633f;
}
.pill,
.badge,
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.badge {
  color: var(--red);
  border-color: #edbbc2;
  background: #fff6f7;
}
.status.registration {
  background: #f0f2eb;
  color: #546347;
  border-color: #d5dccb;
}
.status.question,
.status.countdown {
  background: #fff1f2;
  color: #ae0721;
  border-color: #f1b4bf;
}
.status.reveal {
  background: #eef2f5;
  color: #466176;
  border-color: #ccd5dc;
}
.status.closed {
  background: #f7f0e2;
  color: #776139;
  border-color: #e2d3b6;
}
.status.finished {
  background: #eff4f0;
  color: #356047;
  border-color: #cad9cf;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-weight: 800;
  text-decoration: none;
  font-size: 21px;
  letter-spacing: -0.07em;
  white-space: nowrap;
}
.brand span {
  color: var(--red);
}
.brand small {
  letter-spacing: 0.07em;
  font-size: 9px;
  font-weight: 500;
  margin-left: 7px;
}
.institution-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  padding: 21px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.institution-logos {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 65px;
}
.institution-logos img {
  object-fit: contain;
  display: block;
  height: 100%;
  width: auto;
}
.institution-logos .gov-logo {
  width: 207px;
}
.institution-logos .route-logo {
  width: 165px;
}
.logo-divider {
  height: 35px;
  width: 1px;
  background: var(--line);
}
.edition {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: right;
}
.edition span {
  display: block;
  color: var(--muted);
  letter-spacing: 0;
  font-weight: 500;
  font-size: 11px;
  margin-top: 5px;
}
.player-wrap {
  max-width: 1232px;
  padding: 0 32px;
  margin: auto;
}
.entry-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.intro-card {
  position: relative;

  background: #fff1ef;

  color: var(--ink);
  padding: 34px 40px 24px;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.intro-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.intro-meta .eyebrow {
  font-size: 9px;

  color: #8d2635;
}
.red-square {
  display: inline-block;
  height: 6px;
  width: 6px;
  background: var(--red);
  margin-right: 8px;
  vertical-align: middle;
}
.issue-number {
  font-size: 10px;

  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.game-wordmark {
  font-size: clamp(80px, 9.6vw, 138px);
  letter-spacing: -0.085em;
  line-height: 0.88;
  margin: 45px 0 27px;
  position: relative;
  z-index: 1;
}
.wordmark-bottom {
  display: inline-flex;
  align-items: baseline;
  gap: 16px;

  color: var(--red);
}
.wordmark-o {
  font-size: 0.6em;

  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.08em;
}
.question-mark {
  -webkit-text-stroke: 1px var(--red);
  color: transparent;
  font-weight: 500;
}
.perception-art {
  position: absolute;
  width: 290px;
  height: 290px;
  right: -73px;
  top: 213px;
  z-index: -1;
  opacity: 0.65;
}
.art-grid {
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(#d70b2e0a 1px, transparent 1px),
    linear-gradient(90deg, #d70b2e0a 1px, transparent 1px);
  background-size: 29px 29px;
}
.perception-ring {
  border: 1px solid #949b7c;
  border-radius: 50%;
  position: absolute;
  inset: 20px;
  transform: rotate(-30deg);
  border-color: #a4aeb8;
}
.ring-two {
  inset: 43px;
  border: 1px solid #f32941;
  border-color: #d70b2e;
}
.ring-three {
  inset: 68px;
  border: 18px solid #ffffff14;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  border-color: #d70b2e0e;
}
.perception-core {
  position: absolute;
  inset: 110px;
  border: 1px solid #d7d8c9;
  border-radius: 50%;
  border-color: #8c98a7;
}
.perception-core:before,
.perception-core:after {
  content: '';
  position: absolute;
  background: #aaaf97;
  top: 50%;
  left: -35px;
  right: -35px;
  height: 1px;
}
.perception-core:after {
  transform: rotate(90deg);
}
.art-cross {
  position: absolute;
  font-size: 16px;

  color: #6c7b8e;
}
.cross-one {
  top: 24px;
  left: 28px;
}
.cross-two {
  bottom: 17px;
  right: 27px;
}
.art-caption {
  font-size: 7px;
  letter-spacing: 0.18em;

  color: #657286;
  position: absolute;
  bottom: -18px;
  left: 25px;
}
.intro-copy {
  margin-top: 14px;
  max-width: 390px;
}
.intro-copy h2 {
  font-size: 30px;
  letter-spacing: -0.05em;
  line-height: 1.2;
  margin-bottom: 13px;
}
.intro-copy p {
  font-size: 12px;

  color: #626575;
  line-height: 1.8;
}
.game-facts {
  display: flex;
  gap: 32px;

  border-top: 1px solid #e5cdd0;
  margin-top: 28px;
  padding: 23px 0 28px;
}
.game-facts > div {
  display: flex;
  flex-direction: column;
}
.game-facts strong {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.05em;
}
.game-facts strong span {
  font-size: 15px;
}
.game-facts > div > span {
  font-size: 10px;

  color: #666778;
  margin-top: 6px;
}
.intro-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: auto;

  border-top: 1px solid #e5cdd0;
  padding-top: 20px;
}
.intro-foot > span:first-child {
  font-size: 8px;
  letter-spacing: 0.12em;
  line-height: 1.8;

  color: #656575;
}
.corner-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #ffffff40;
  border-radius: 50%;
  transform: rotate(-45deg);
  border-color: #d5afb5;
  color: var(--red);
}
.entry-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px 40px;

  background: #fff;
}
.entry-panel > .eyebrow {
  color: var(--red);
  margin-bottom: 13px;
}
.entry-panel h2 {
  font-size: 33px;
  margin-bottom: 28px;
}
.code-input {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.22em;
  background: #f6f6f1;
  font-size: 18px;
}
.code-input::placeholder {
  letter-spacing: 0.1em;
  font-size: 15px;
  font-weight: 500;
}
.consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 22px 0;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.7;
  font-size: 10px;
}
.consent-label input {
  margin: 2px 0 0;
}
.entry-panel #joinBtn {
  justify-content: space-between;
  font-size: 13px;
  padding: 14px 18px;
}
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 25px 0;
  font-size: 9px;
  color: var(--muted);
}
.footer > span:first-child {
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.footer a {
  text-decoration: none;
  white-space: nowrap;
}
.footer a:hover {
  text-decoration: underline;
}
.skip-link {
  position: fixed;
  left: 15px;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: white;
  padding: 10px;
}
.skip-link:focus {
  top: 12px;
}
/* Participación: las imágenes conservan su encuadre completo. */
#game {
  max-width: 900px;
  margin: 0 auto;
}
.game-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 0 20px;
}
.connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.status-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: #a1a68f;
}
.connection[data-status='online'] .status-dot {
  background: var(--green);
}
.connection[data-status='offline'] .status-dot {
  background: var(--red);
}
.reconnect-banner {
  display: none;
  background: #fff2df;
  color: #735620;
  padding: 12px;
  font-size: 12px;
}
.is-offline .reconnect-banner {
  display: block;
}
.player-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 26px 0;
}
.player-head h2 {
  font-size: 22px;
  margin: 5px 0;
}
.player-head .muted {
  font-size: 11px;
}
.personal-stats {
  display: flex;
  gap: 25px;
}
.personal-stats > div {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.personal-stats span {
  display: block;
  font-size: 9px;
  color: var(--muted);
}
.personal-stats strong {
  font-size: 23px;
  letter-spacing: -0.04em;
}
.stage {
  padding: 26px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  animation: enter 0.25s ease;
}
.stage-progress {
  height: 3px;
  background: #eeeee7;
  margin: 20px 0 24px;
}
.stage-progress > span {
  display: block;
  height: 100%;
  background: var(--red);
  transition: width 0.3s;
}
.challenge-title {
  font-size: 32px;
  margin: 9px 0 12px;
}
.challenge-title .accent {
  color: var(--red);
}
.timer {
  font-size: 31px;
  line-height: 1;
  font-weight: 800;
}
.timer.low {
  color: var(--red);
}
.timer-label {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.option-card {
  position: relative;
  min-width: 0;
}
.option {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f6f6f1;
  color: var(--ink);
  overflow: hidden;
  transition:
    border 0.15s,
    box-shadow 0.15s;
}
.option img {
  width: 100%;
  height: 275px;
  object-fit: contain;
  display: block;
  background: #eeeee7;
}
.option:hover:not(:disabled) {
  border-color: var(--ink);
}
.option.selected {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red);
}
.option.correct {
  border: 2px solid var(--green);
}
.option.incorrect {
  opacity: 0.65;
}
.option-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  font-size: 11px;
  font-weight: 800;
  background: white;
}
.option-tag {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 3px;
  margin-right: 7px;
}
.option-action {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.zoom-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 34px;
  height: 34px;
  border: 1px solid #fff9;
  background: #fffe;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: #252624;
}
.waiting {
  margin: 32px auto;
  max-width: 640px;
  padding: 40px;
}
.big-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 50%;
  margin-bottom: 24px;
  background: #f4f5ed;
  color: var(--green);
}
.big-icon .icon {
  width: 25px;
  height: 25px;
}
.waiting h2 {
  font-size: 34px;
  margin: 10px 0 15px;
}
.waiting p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 430px;
}
.waiting-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 11px;
}
.waiting-dots {
  display: flex;
  gap: 5px;
  margin-right: 6px;
}
.waiting-dots i {
  width: 4px;
  height: 4px;
  background: var(--red);
  border-radius: 50%;
  animation: blink 1.5s infinite;
}
.waiting-dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.waiting-dots i:nth-child(3) {
  animation-delay: 0.4s;
}
.feedback {
  padding: 20px;
  background: #f1f3ec;
  border-left: 3px solid #7e8a69;
  margin-top: 22px;
  font-size: 12px;
  line-height: 1.8;
}
.feedback b {
  display: block;
  font-size: 9px;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: #58614b;
}
.feedback p {
  margin: 0;
}
.reveal-result {
  color: var(--green);
  font-weight: 800;
}
.reveal-result.miss {
  color: var(--red);
}
.countdown-stage {
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  background: #fff;

  color: var(--ink);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.countdown-digit {
  font-size: 140px;
  line-height: 1.1;
  letter-spacing: -0.07em;
  font-weight: 800;

  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.countdown-stage p {
  color: var(--muted);
}
.personal-result {
  background: #fff;

  color: var(--ink);
  text-align: center;
  padding: 38px 25px;
  border-radius: 10px;
  border: 1px solid #ead8b2;
  box-shadow: 0 12px 32px #9b6a190a;
}
.personal-result .eyebrow {
  color: #8b601c;
}
.personal-result h2 {
  font-size: 37px;
  margin: 13px 0;
}
.personal-result > p {
  color: var(--muted);
}
.personal-result .result-score {
  font-size: 60px;
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 1.2;
  color: var(--red);
}
.result-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 24px 0 0;
}
.result-stats span {
  font-size: 11px;

  color: var(--muted);
}
.result-stats strong {
  display: block;

  color: var(--ink);
  font-size: 24px;
}
.scoreboard-scroll {
  max-height: 430px;
  overflow: auto;
}
.table-wrap {
  overflow-x: auto;
}
.rank-table {
  border-collapse: collapse;
  width: 100%;
}
.rank-table th {
  text-align: left;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 10px;
  white-space: nowrap;
}
.rank-table td {
  padding: 13px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.rank-table tr:last-child td {
  border-bottom: 0;
}
.rank-table th:last-child,
.rank-table td:last-child {
  text-align: right;
}
.rank-table td:last-child {
  font-size: 16px;
  font-weight: 800;
}
.table-sub {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}
.place {
  font-size: 11px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #f3f4ee;
  border-radius: 50%;
}
.place-1 {
  color: #fff;
  background: #9b7f45;
}
.place-2 {
  background: #e1e5e5;
  color: #43555a;
}
.place-3 {
  background: #eee1d5;
  color: #8b5736;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 35px 18px;
  color: var(--muted);
  gap: 14px;
}
.empty-state > .icon {
  width: 30px;
  height: 30px;
  opacity: 0.6;
}
.empty-state strong {
  color: var(--ink);
  font-size: 13px;
}
.empty-state p {
  font-size: 11px;
  max-width: 340px;
  margin: 0;
}
.empty-state .btn {
  margin-top: 5px;
}
.zoom-dialog {
  border: 0;
  border-radius: 10px;
  background: #f5f5ef;
  width: min(1100px, calc(100% - 28px));
  max-height: 95dvh;
  padding: 20px;
  overflow: auto;
}
.zoom-dialog::backdrop {
  background: #121510ed;
}
.zoom-dialog img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 70dvh;
  object-fit: contain;
  margin: 15px auto;
}
.zoom-dialog .row {
  justify-content: center;
}
.zoom-dialog .split .eyebrow {
  color: var(--ink);
}
/* Moderación: una acción principal por etapa. */
.mod-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;

  background: #fff;

  color: var(--ink);
  padding: 35px 23px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.sidebar .brand {
  font-size: 23px;
}
.sidebar .brand span {
  color: var(--red);
}
.sidebar-sub {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  margin: 10px 0 32px;
}
.nav {
  display: grid;
  gap: 7px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 12px;

  color: #626d7e;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
}
.nav button .icon {
  width: 17px;
  height: 17px;
}
.nav button:hover {
  background: #f5f6f8;

  color: var(--ink);
}
.nav button.active {
  color: #b30929;

  background: #fff0f2;

  border-color: #f0ccd3;
}
.nav button.active:before {
  content: '';
  height: 15px;
  width: 2px;

  background: var(--red);
  margin-left: -13px;
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 35px;
}
.sidebar-foot .connection {
  color: var(--muted);
}
.sidebar-foot p {
  font-size: 10px;

  color: var(--muted);
  line-height: 1.9;
  margin-top: 20px;
}
.sidebar-foot .btn {
  color: var(--ink);

  border-color: var(--line);
  width: 100%;
  justify-content: flex-start;
}
.sidebar-foot .btn:hover {
  background: #f5f6f8;
}
.mod-main {
  min-width: 0;
  max-width: 1550px;
  padding: 32px 40px 0;
}
.mod-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 25px;
  margin-bottom: 26px;
}
.mod-heading h1 {
  font-size: 33px;
  margin: 8px 0;
}
.mod-heading p {
  font-size: 11px;
  margin: 0;
  color: var(--muted);
}
.mod-heading .eyebrow {
  color: var(--red);
  font-size: 9px;
}
.metric {
  padding: 20px 23px;
  border-radius: 7px;
  position: relative;
  overflow: hidden;
}
.metric label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.metric b {
  display: block;
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.2;
  margin: 12px 0 6px;
}
.metric small {
  color: var(--muted);
  font-size: 10px;
}
.metric .metric-icon {
  position: absolute;
  right: 23px;
  top: 20px;
  color: #9ea58f;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 17px;
}
.section-head h2 {
  font-size: 20px;
  margin: 0;
}
.section-head h3 {
  font-size: 15px;
  margin: 0;
}
.section-head p {
  font-size: 11px;
  margin: 6px 0 0;
}
.list-card {
  padding: 4px 22px;
}
.group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.group-row:last-child {
  border-bottom: 0;
}
.group-row.is-selected .group-title {
  color: var(--red);
}
.group-title {
  font-size: 13px;
  font-weight: 800;
}
.group-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 6px;
}
.group-row .row {
  gap: 8px;
}
.controls {
  padding: 25px;
}
.controls-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.controls .timer {
  font-size: 46px;
}
.controls-info {
  max-width: 520px;
}
.controls-info h3 {
  font-size: 23px;
  margin: 15px 0 8px;
}
.controls-info p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.preview-block {
  display: grid;
  grid-template-columns: 135px 1fr;
  gap: 25px;
  align-items: center;
  background: #f7f7f1;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.preview-block > img {
  height: 130px;
  width: 130px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px;
  background: white;
}
.code {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.5;
}
.preview-block p {
  font-size: 11px;
  margin: 5px 0 12px;
  color: var(--muted);
}
.meter {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #e9ebe1;
  margin: 18px 0;
}
.meter span {
  display: block;
  height: 100%;
  background: var(--red);
  transition: width 0.25s;
}
.answers-big {
  font-size: 45px;
  font-weight: 650;
  letter-spacing: -0.06em;
}
.answers-big small {
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
}
.question-editor {
  padding: 25px;
}
.question-editor h3 {
  font-size: 19px;
  margin-bottom: 20px;
}
.question-form-actions {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 20px;
}
.upload-pair {
  border: 1px dashed #bfc5b2;
  border-radius: 6px;
  background: #f8f9f4;
  padding: 18px;
}
.upload-pair label {
  margin-bottom: 10px;
}
.upload-preview {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #e9ece0;
  margin-bottom: 10px;
  border-radius: 4px;
}
.question-row {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.question-row:last-child {
  border-bottom: 0;
}
.question-thumbs {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.question-thumbs img {
  height: 52px;
  width: 66px;
  object-fit: contain;
  background: #f0f1e9;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.question-details {
  min-width: 0;
  flex: 1;
}
.question-details strong {
  font-size: 12px;
}
.question-details p {
  color: var(--muted);
  font-size: 10px;
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.question-row.is-inactive {
  opacity: 0.6;
}
.bank-readiness {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  background: white;
  border-radius: 6px;
  font-size: 11px;
}
.bank-readiness.ready {
  border-left-color: var(--green);
}
.bank-readiness strong {
  display: block;
  font-size: 12px;
}
.filter-select {
  width: auto;
  min-width: 120px;
  min-height: 38px;
  padding: 7px 12px;
  font-size: 11px;
}
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.login-masthead {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 16px 35px;
}
.login-masthead .institution-logos {
  height: 65px;
}
.login-center {
  width: min(440px, calc(100% - 32px));
  margin: 65px auto;
  padding: 35px;
  background: #fffefa;
}
.login-center .brand {
  margin-bottom: 30px;
}
.login-center h1 {
  font-size: 35px;
  margin: 10px 0 15px;
}
.login-center .paragraph {
  font-size: 12px;
  line-height: 1.9;
  margin-bottom: 28px;
}
.login-center .eyebrow {
  color: var(--red);
}
.login-note {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  margin: 20px 0 0;
}
.login-note .icon {
  height: 15px;
  width: 15px;
}
.global-podium-mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.global-podium-mini .metric b {
  font-size: 20px;
}
.global-podium-mini .metric:first-child {
  border-top: 3px solid var(--gold);
}
/* Proyección: lienzo 16:9 y lectura a distancia. */
.projection-page {
  background: var(--bg);

  color: var(--ink);

  --line: #dfe3ea;

  --muted: #626d7e;

  --ink: #253046;

  --paper: #fff;
}
.projection {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 38px;
  max-width: 1920px;
  margin: auto;
}
.projector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 0;
  gap: 25px;
  border-bottom: 1px solid var(--line);
}
.projector-header .brand {
  font-size: 27px;
}
.projector-header .brand span {
  color: var(--red);
}
.projector-header .connection {
  color: var(--muted);
}
.projector-header .btn.ghost {
  color: var(--ink);
  background: #fff;
}
.projector-stage {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 32px 0;
  min-height: 0;
}
.projector-stage > div {
  width: 100%;
}
.projection .footer {
  padding: 18px 0;
  color: #b0b6a4;
  border-top: 1px solid var(--line);
  font-size: 9px;
}
.projection .footer > span:first-child {
  color: #fff;
}
.projection .footer img {
  height: 43px;
  width: 145px;
  object-fit: contain;
  display: block;
  background: white;
  border-radius: 3px;
}
.projection .footer .footer-institution {
  display: flex;
  align-items: center;
  gap: 14px;
}
.projector-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}
.projector-intro .eyebrow {
  color: var(--muted);
  font-size: 11px;
}
.projector-intro h1 {
  font-size: clamp(80px, 10vw, 160px);
  line-height: 0.88;
  letter-spacing: -0.08em;
  margin: 30px 0;
}
.projector-intro h1 span {
  color: var(--red);
}
.projector-intro .paragraph {
  font-size: clamp(15px, 1.5vw, 24px);
  line-height: 1.6;
  max-width: 590px;
}
.projector-details {
  display: flex;
  gap: 30px;
  margin-top: 35px;
}
.projector-details strong {
  font-size: 26px;
  display: block;
  font-weight: 650;
}
.projector-details span {
  font-size: 10px;

  color: var(--muted);
}
.qr-card {
  background: #fff;

  color: var(--ink);
  padding: 30px;
  border-radius: 10px;
  max-width: 385px;
  margin: auto;
  text-align: center;
  position: relative;
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px #25304608;
}
.qr-card > .eyebrow {
  color: var(--muted);
  font-size: 10px;
}
.projector-qr {
  display: block;
  width: 250px;
  max-width: 100%;
  height: auto;
  margin: 18px auto 10px;
}
.qr-code {
  font-size: 40px;
  letter-spacing: 0.15em;
  font-weight: 800;
  line-height: 1.3;
}
.qr-card p {
  font-size: 12px;

  color: var(--muted);
  margin: 8px 0 0;
}
.qr-card .qr-count {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  border-top: 1px solid #deded7;
  padding-top: 20px;
  margin-top: 20px;
  font-size: 12px;
}
.qr-card .qr-count strong {
  color: #d20a25;
}
.projector-round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 20px;
}
.projector-round-head h1 {
  font-size: clamp(28px, 3.8vw, 65px);
  margin: 8px 0;
  letter-spacing: -0.055em;
}
.projector-round-head .eyebrow {
  color: var(--muted);
  font-size: 11px;
}
.projector-timer {
  font-size: clamp(50px, 5.5vw, 95px);
  font-weight: 800;
  line-height: 1;

  color: var(--ink);
}
.projector-timer.low {
  color: var(--red);
}
.projector-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 215px;
  gap: 25px;
  align-items: stretch;
}
.projector-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.projector-images figure {
  margin: 0;
  min-width: 0;
  position: relative;
}
.projector-images img {
  width: 100%;
  height: clamp(200px, 38vh, 510px);
  object-fit: contain;

  background: #eef1f4;
  border: 1px solid #ffffff20;
  border-radius: 7px;
  display: block;
  border-color: #d5dce5;
}
.projector-images figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-top: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.projector-images figcaption .image-letter {
  font-size: 12px;
  border: 1px solid #ffffff45;
  padding: 5px 12px;
  border-radius: 3px;
  background: #fff;
  border-color: #d5dce5;
}
.participation-panel {
  border: 1px solid #ffffff25;
  border-radius: 7px;
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;

  background: #fff;
  border-color: var(--line);
}
.participation-panel > .eyebrow {
  font-size: 9px;

  color: var(--muted);
}
.participation-panel strong {
  font-size: 76px;
  line-height: 1.3;
  letter-spacing: -0.07em;
}
.participation-panel p {
  font-size: 12px;

  color: var(--muted);
}
.participation-panel > .icon {
  height: 25px;
  width: 25px;

  color: #717e92;
  margin-bottom: 10px;
}
.projection .meter {
  background: #e4e9ef;
}
.projection .meter span {
  background: var(--red);
}
.projector-learning {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid #ffffff25;
  padding-top: 20px;
}
.projector-learning .eyebrow {
  min-width: 110px;
  color: #c4caae;
}
.projector-learning p {
  font-size: clamp(13px, 1.3vw, 21px);
  line-height: 1.6;
  color: #d4d9ca;
  margin: 0;
  max-width: 1100px;
}
.reveal-real {
  outline: 3px solid #9cb883;
  outline-offset: 3px;
}
.reveal-fake {
  opacity: 0.45;
}
.projector-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}
.projector-summary .rank-table td {
  padding: 13px 8px;
  font-size: 12px;
}
.projector-summary .rank-table td:last-child {
  font-size: 18px;
}
.projector-summary .rank-table th {
  font-size: 8px;
}
.projector-summary .rank-table .place {
  background: #eef2f6;

  color: #42536b;
}
.projector-summary .rank-table .place-1 {
  background: #fff0c7;

  color: #86580d;
}
.projector-countdown {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.projector-countdown .countdown-digit {
  font-size: clamp(150px, 28vh, 320px);

  color: var(--red);
}
.projector-countdown h1 {
  font-size: 32px;
  margin: 25px 0 10px;
}
.projector-countdown p {
  color: var(--muted);
}
.finished-heading {
  text-align: center;
}
.finished-heading .eyebrow {
  color: #94631c;
  font-size: 11px;
}
.finished-heading h1 {
  font-size: clamp(38px, 4vw, 64px);
  margin: 15px 0;
}
.finished-heading p {
  color: var(--muted);
  font-size: 14px;
}
.projector-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 18px;
  max-width: 1060px;
  margin: 35px auto 15px;
}
.podium-person {
  position: relative;
  border: 1px solid #ffffff20;

  background: #fff;

  border-radius: 14px;
  padding: 28px 25px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  animation: podiumEnter 0.65s ease both;
  border-color: #dce2e9;
  box-shadow: 0 12px 28px #25304605;
}
.podium-person .podium-rank {
  font-size: 64px;
  line-height: 1;
  color: #99a28a;
  letter-spacing: -0.08em;
  font-weight: 400;
  margin-bottom: 20px;
}
.podium-person > .eyebrow {
  color: #58697e;
  font-size: 9px;
}
.podium-1 {
  min-height: 280px;

  border-top: 3px solid #c39335;

  background: #fff9e9;
  animation-delay: 0.15s;
  border-color: #e3c27e;
  box-shadow: 0 18px 44px #aa771113;
}
.podium-1 .podium-rank {
  color: #d0b478;
  font-size: 82px;
}
.podium-1 > .eyebrow {
  color: #865b13;
}
.podium-3 {
  min-height: 200px;
  animation-delay: 0.3s;
  border-color: #e3c9b7;
  background: #fffaf5;
}
.podium-3 .podium-rank {
  color: #b89981;
}
.podium-names {
  width: 100%;
  margin-top: 17px;
  display: grid;
  gap: 4px;
}
.podium-names strong {
  display: block;
  font-size: clamp(18px, 2vw, 29px);
  line-height: 1.25;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}
.podium-names small {
  display: block;
  font-size: 11px;

  color: var(--muted);
  margin-bottom: 8px;
}
.podium-person .pill {
  color: #805b19;
  background: #fff;
  border-color: #e3d4b6;
}
.podium-empty {
  font-size: 25px;
  text-align: center;

  color: var(--muted);
  padding: 80px 30px;
}
.projection-code-form {
  max-width: 400px;
  margin: 30px auto;
  display: flex;
  gap: 10px;
}
.projection-code-form input {
  background: #fff;
  color: #222;
}
.institutional-meta {
  display: flex;
  justify-content: center;
  gap: 25px;
  font-size: 11px;

  color: var(--muted);
  margin-top: 25px;
}
.institutional-meta strong {
  color: var(--ink);
}
.podium-topline {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.projection .badge {
  background: #fff;

  border-color: var(--line);

  color: #51627b;
}
/* Interacciones y accesibilidad. */
.app-dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px;
  width: min(530px, calc(100% - 28px));
  max-height: 90dvh;
  background: #fffefa;
  color: #252624;
  box-shadow: 0 25px 100px #0003;
}
.app-dialog::backdrop {
  background: #1c2118a9;
  backdrop-filter: blur(3px);
}
.app-dialog h2 {
  font-size: 26px;
  margin: 23px 0 15px;
}
.app-dialog p {
  font-size: 12px;
  line-height: 1.9;
}
.app-dialog .field {
  margin-top: 16px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  background: #252924;
  color: #fff;
  padding: 14px 22px;
  border: 1px solid #666e60;
  border-radius: 7px;
  font-size: 12px;
  z-index: 100;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
  pointer-events: none;
  box-shadow: 0 8px 25px #0002;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.confetti {
  position: fixed;
  top: -15px;
  width: 5px;
  height: 10px;
  pointer-events: none;
  z-index: 90;
  animation: fall var(--fall) linear forwards;
}
.load-error {
  padding: 60px 25px;
  text-align: center;
}
.load-error h1 {
  font-size: 36px;
}
.load-error .btn {
  margin-top: 20px;
}
.upload-help {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 25px 0;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.divider-label:after {
  content: '';
  height: 1px;
  background: var(--line);
  flex: 1;
}
.image-label {
  font-size: 12px;
  font-weight: 800;
}
.subtle-link {
  font-size: 11px;
  color: var(--muted);
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
@keyframes podiumEnter {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fall {
  to {
    transform: translate(var(--drift), 105vh) rotate(450deg);
    opacity: 0.1;
  }
}
@media (min-width: 1500px) {
  .projector-stage {
    padding: 40px 20px;
  }
  .projector-content {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
  .participation-panel {
    padding: 30px;
  }
  .projector-images figcaption {
    font-size: 20px;
  }
  .projector-summary {
    grid-template-columns: minmax(0, 1fr) 390px;
  }
  .projector-summary .rank-table td {
    font-size: 16px;
  }
}
@media (max-width: 1100px) {
  .mod-main {
    padding: 25px;
  }
  .mod-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 30px 17px;
  }
  .sidebar .brand {
    font-size: 20px;
  }
  .mod-heading h1 {
    font-size: 28px;
  }
  .entry-panel {
    padding: 32px;
  }
  .intro-card {
    padding: 30px;
  }
  .projector-content {
    grid-template-columns: minmax(0, 1fr) 165px;
    gap: 20px;
  }
  .participation-panel {
    padding: 17px;
  }
  .participation-panel strong {
    font-size: 55px;
  }
  .projector-summary {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 22px;
  }
  .projector-grid {
    gap: 25px;
  }
  .projector-qr {
    width: 215px;
  }
  .qr-card {
    padding: 22px;
  }
  .projector-header .brand small {
    display: none;
  }
}
@media (max-width: 800px) {
  .institution-logos {
    height: 55px;
    gap: 15px;
  }
  .institution-logos .gov-logo {
    width: 170px;
  }
  .institution-logos .route-logo {
    width: 140px;
  }
  .edition {
    display: none;
  }
  .player-wrap {
    padding: 0 20px;
  }
  .intro-card {
    padding: 25px;
  }
  .entry-panel {
    padding: 28px;
  }
  .game-wordmark {
    font-size: 90px;
    margin-top: 40px;
  }
  .intro-copy h2 {
    font-size: 26px;
  }
  .game-facts {
    gap: 22px;
  }
  .game-facts strong {
    font-size: 23px;
  }
  .intro-meta .issue-number {
    display: none;
  }
  .intro-meta .eyebrow {
    font-size: 8px;
  }
  .entry-panel h2 {
    font-size: 28px;
  }
  .mod-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 25px;
    padding: 15px 20px;
  }
  .sidebar-sub,
  .sidebar-foot {
    display: none;
  }
  .nav {
    display: flex;
    gap: 5px;
  }
  .nav button {
    font-size: 10px;
    min-height: 38px;
    padding: 9px;
  }
  .nav button.active:before {
    display: none;
  }
  .sidebar .brand {
    font-size: 21px;
  }
  .mod-main .three {
    gap: 12px;
  }
  .metric {
    padding: 18px;
  }
  .projector-summary {
    grid-template-columns: 1fr;
  }
  .projector-summary .projection-ranking {
    display: none;
  }
  .projection {
    padding: 0 23px;
  }
  .projector-header {
    align-items: flex-start;
  }
  .projector-header .row {
    justify-content: flex-end;
  }
  .projector-grid {
    grid-template-columns: 1fr 1fr;
  }
  .projector-intro h1 {
    font-size: 90px;
  }
  .projector-intro .paragraph {
    font-size: 15px;
  }
  .projector-details {
    gap: 18px;
  }
  .projector-details strong {
    font-size: 21px;
  }
  .projector-content {
    grid-template-columns: 1fr;
  }
  .participation-panel {
    padding: 15px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
  }
  .participation-panel strong {
    font-size: 30px;
  }
  .participation-panel p {
    margin: 0;
  }
  .participation-panel .meter {
    width: 90px;
  }
  .participation-panel .icon {
    display: none;
  }
}
@media (max-width: 600px) {
  .player-wrap {
    padding: 0 16px;
  }
  .institution-header {
    padding: 14px 0;
    margin-bottom: 16px;
    justify-content: center;
  }
  .institution-logos {
    height: 50px;
    gap: 12px;
  }
  .institution-logos .gov-logo {
    width: 157px;
  }
  .institution-logos .route-logo {
    width: 126px;
  }
  .logo-divider {
    height: 26px;
  }
  .entry-grid {
    grid-template-columns: 1fr;
    border-radius: 8px;
  }
  .intro-card {
    padding: 24px 25px 20px;
    min-height: 350px;
  }
  .intro-meta .issue-number {
    display: block;
  }
  .intro-meta .eyebrow {
    font-size: 8px;
  }
  .game-wordmark {
    line-height: 0.88;
    margin: 27px 0 20px;
    font-size: clamp(48px, 15vw, 84px);
    white-space: nowrap;
    letter-spacing: -0.08em;
  }
  .game-wordmark br {
    display: none;
  }
  .game-wordmark .wordmark-bottom {
    gap: 9px;
    margin-left: 9px;
  }
  .wordmark-bottom .wordmark-o {
    font-size: 0.5em;
  }
  .intro-copy {
    max-width: 260px;
    margin-top: 3px;
  }
  .intro-copy h2 {
    font-size: 28px;
    line-height: 1.1;
  }
  .intro-copy p {
    font-size: 11px;
    line-height: 1.8;
  }
  .perception-art {
    width: 240px;
    height: 240px;
    top: 100px;
    right: -95px;
    opacity: 0.6;
  }
  .perception-core {
    inset: 90px;
  }
  .game-facts {
    padding: 17px 0 0;
    margin-top: 14px;
    gap: 29px;
  }
  .game-facts strong {
    font-size: 23px;
  }
  .game-facts > div > span {
    font-size: 9px;
  }
  .intro-foot {
    display: none;
  }
  .entry-panel {
    padding: 27px 25px;
  }
  .entry-panel h2 {
    font-size: 30px;
  }
  .entry-panel > .eyebrow {
    font-size: 9px;
  }
  .entry-panel .field {
    margin-bottom: 16px;
  }
  .consent-label {
    font-size: 11px;
  }
  .footer {
    flex-wrap: wrap;
    gap: 10px;
    font-size: 9px;
    padding: 20px 0;
  }
  .footer > span:nth-child(2) {
    width: 100%;
    order: 3;
    font-size: 9px;
  }
  .footer a {
    margin-left: auto;
    font-size: 9px;
  }
  .player-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    margin: 24px 0;
  }
  .player-head h2 {
    font-size: 23px;
  }
  .personal-stats {
    gap: 24px;
    width: 100%;
    background: #e9ebe2;
    border-radius: 6px;
    padding: 12px 16px;
  }
  .personal-stats > div {
    padding: 0 20px 0 0;
    border-left: 0;
    border-right: 1px solid #cfd3c5;
    flex: 1;
  }
  .personal-stats > div:last-child {
    border: 0;
  }
  .personal-stats strong {
    font-size: 23px;
  }
  .stage {
    padding: 20px 15px;
  }
  .stage .badge {
    font-size: 9px;
  }
  .challenge-title {
    font-size: 27px;
    line-height: 1.2;
  }
  .options {
    gap: 10px;
    margin-top: 20px;
  }
  .option img {
    height: clamp(165px, 47vw, 240px);
  }
  .option-footer {
    padding: 10px 8px;
    font-size: 10px;
    gap: 4px;
  }
  .option-tag {
    margin-right: 2px;
    height: 23px;
    width: 23px;
  }
  .option-action {
    font-size: 0;
  }
  .option-action .icon {
    width: 16px;
    height: 16px;
  }
  .zoom-btn {
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
  }
  .zoom-btn .icon {
    width: 15px;
    height: 15px;
  }
  .waiting {
    padding: 30px 24px;
    margin: 24px auto;
  }
  .waiting h2 {
    font-size: 31px;
  }
  .waiting-bottom {
    flex-wrap: wrap;
  }
  .feedback {
    padding: 15px;
    font-size: 12px;
  }
  .personal-result h2 {
    font-size: 30px;
  }
  .personal-result .result-score {
    font-size: 60px;
  }
  .compact {
    padding: 18px;
  }
  .rank-table td,
  .rank-table th {
    padding: 12px 6px;
  }
  .rank-table td {
    font-size: 11px;
  }
  .rank-table td:last-child {
    font-size: 14px;
  }
  .mod-main {
    padding: 22px 16px 0;
  }
  .sidebar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .sidebar .nav {
    width: 100%;
    justify-content: space-between;
  }
  .nav button {
    flex: 1;
    justify-content: center;
    font-size: 10px;
    padding: 9px 6px;
    gap: 7px;
  }
  .nav .icon {
    width: 15px;
    height: 15px;
  }
  .mod-heading {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  .mod-heading h1 {
    font-size: 29px;
  }
  .mod-heading > .row {
    justify-content: space-between;
    width: 100%;
  }
  .mod-main .three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .metric {
    padding: 13px 10px;
  }
  .metric label {
    font-size: 8px;
    letter-spacing: 0;
    line-height: 1.5;
    display: block;
  }
  .metric b {
    font-size: 28px;
    margin: 10px 0 4px;
  }
  .metric small {
    font-size: 8px;
    display: block;
  }
  .metric-icon {
    display: none;
  }
  .two {
    grid-template-columns: 1fr;
  }
  .section-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .section-head h2 {
    font-size: 20px;
  }
  .section-head .btn {
    font-size: 10px;
    min-height: 39px;
    padding: 10px 12px;
  }
  .group-row {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }
  .group-row > .row {
    justify-content: space-between;
    width: 100%;
  }
  .group-row .row .status {
    font-size: 9px;
  }
  .list-card {
    padding: 0 18px;
  }
  .controls {
    padding: 20px 18px;
  }
  .controls-info h3 {
    font-size: 22px;
  }
  .controls .timer {
    font-size: 37px;
  }
  .controls-actions .btn {
    flex: 1;
  }
  .controls-actions .btn.danger.small {
    flex-basis: 100%;
    order: 3;
  }
  .preview-block {
    grid-template-columns: 95px 1fr;
    gap: 14px;
    padding: 13px;
  }
  .preview-block > img {
    width: 95px;
    height: 95px;
  }
  .preview-block .eyebrow {
    font-size: 7px;
  }
  .code {
    font-size: 24px;
    letter-spacing: 0.1em;
  }
  .preview-block p {
    font-size: 9px;
  }
  .preview-block .row {
    gap: 7px;
  }
  .preview-block .row .btn {
    font-size: 9px;
    min-height: 32px;
    padding: 6px 8px;
  }
  .question-editor {
    padding: 20px 17px;
  }
  .question-row {
    flex-wrap: wrap;
    gap: 12px;
  }
  .question-thumbs img {
    width: 52px;
    height: 45px;
  }
  .question-row > .row {
    margin-left: auto;
  }
  .question-details {
    flex-basis: calc(100% - 128px);
  }
  .global-podium-mini {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .global-podium-mini .metric b {
    font-size: 23px;
  }
  .global-podium-mini .metric label,
  .global-podium-mini .metric small {
    font-size: 10px;
  }
  .bank-readiness {
    gap: 15px;
    align-items: flex-start;
  }
  .bank-readiness .btn {
    font-size: 10px;
    padding: 9px;
  }
  .app-dialog {
    padding: 24px;
  }
  .app-dialog h2 {
    font-size: 24px;
  }
  .app-dialog .dialog-actions .btn {
    padding: 12px 15px;
  }
  .login-center {
    margin: 35px auto;
  }
  .login-masthead {
    padding: 12px 16px;
  }
  .login-masthead .institution-logos {
    justify-content: center;
    height: 50px;
  }
  .projection {
    padding: 0 17px;
  }
  .projector-header {
    align-items: center;
    gap: 10px;
    padding: 14px 0;
  }
  .projector-header .brand {
    font-size: 21px;
  }
  .projector-header .row {
    gap: 7px;
  }
  .projector-header .pill {
    display: none;
  }
  .projector-header .btn {
    padding: 7px;
    font-size: 0;
    min-height: 34px;
  }
  .projector-header .btn .icon {
    width: 17px;
    height: 17px;
  }
  .projector-header .connection {
    font-size: 9px;
  }
  .projector-stage {
    padding: 25px 0;
  }
  .projector-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .projector-intro h1 {
    font-size: 95px;
    margin: 25px 0;
  }
  .projector-intro .eyebrow {
    font-size: 9px;
  }
  .projector-intro .paragraph {
    font-size: 16px;
  }
  .projector-details {
    margin-top: 20px;
    gap: 35px;
  }
  .qr-card {
    padding: 25px;
    max-width: 330px;
  }
  .qr-code {
    font-size: 34px;
  }
  .qr-card .projector-qr {
    width: 220px;
  }
  .projector-round-head h1 {
    font-size: 29px;
  }
  .projector-round-head .eyebrow {
    font-size: 9px;
  }
  .projector-timer {
    font-size: 48px;
  }
  .projector-content {
    gap: 15px;
  }
  .projector-images {
    gap: 13px;
  }
  .projector-images img {
    height: 220px;
  }
  .projector-images figcaption {
    font-size: 10px;
    letter-spacing: 0;
    margin-top: 10px;
  }
  .projector-images figcaption .image-letter {
    font-size: 10px;
    padding: 3px 8px;
  }
  .participation-panel {
    gap: 9px;
    padding: 12px;
  }
  .participation-panel > .eyebrow {
    font-size: 7px;
  }
  .participation-panel strong {
    font-size: 32px;
  }
  .participation-panel p {
    font-size: 9px;
  }
  .participation-panel .meter {
    width: 60px;
  }
  .projector-learning {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .projector-learning p {
    font-size: 13px;
  }
  .projector-podium {
    gap: 7px;
    margin-top: 28px;
  }
  .podium-person {
    padding: 20px 8px;
    min-height: 180px;
  }
  .podium-person .podium-rank {
    font-size: 42px;
    margin-bottom: 13px;
  }
  .podium-1 {
    min-height: 240px;
  }
  .podium-1 .podium-rank {
    font-size: 62px;
  }
  .podium-3 {
    min-height: 160px;
  }
  .podium-names strong {
    font-size: 16px;
  }
  .podium-names small {
    font-size: 9px;
  }
  .podium-person > .eyebrow {
    font-size: 7px;
  }
  .finished-heading h1 {
    font-size: 34px;
  }
  .finished-heading p {
    font-size: 12px;
  }
  .institutional-meta {
    flex-wrap: wrap;
    gap: 12px;
    font-size: 10px;
  }
  .projection .footer .footer-institution {
    gap: 9px;
    font-size: 8px;
  }
  .projection .footer img {
    width: 115px;
    height: 35px;
  }
  .projection .footer > span:nth-child(2) {
    width: auto;
    order: 0;
    font-size: 8px;
  }
  .projection .footer {
    gap: 9px;
  }
  .zoom-dialog {
    padding: 13px;
  }
  .zoom-dialog .badge {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Los originales se muestran sin alterar: el marco retira sus márgenes vacíos. */
.logo-window {
  position: relative;
  display: block;
  overflow: hidden;
  flex-shrink: 0;
  background: white;
}
.logo-window.gov-logo {
  aspect-ratio: 2285/766;
}
.logo-window.route-logo {
  aspect-ratio: 2266/892;
}
.logo-window.gov-logo img {
  position: absolute;
  left: -7.746%;
  top: -46.867%;
  width: 118.906%;
  height: 181.593%;
  max-width: none;
  object-fit: fill;
}
.logo-window.route-logo img {
  position: absolute;
  left: -11.739%;
  top: -35.426%;
  width: 119.903%;
  height: 155.942%;
  max-width: none;
  object-fit: fill;
}
.institution-logos .logo-window {
  background: transparent;
}
.projection .footer .gov-logo {
  width: 155px;
  height: 52px;
  border-radius: 3px;
  border: 6px solid white;
}
.projection .footer .route-logo {
  width: 127px;
  height: 50px;
  border-radius: 3px;
  border: 5px solid white;
}
.consent-label {
  font-size: 11px;
}
.intro-foot > span:first-child {
  font-size: 9px;
}
.footer {
  font-size: 10px;
}
@media (max-width: 600px) {
  .projection .footer .gov-logo {
    width: 120px;
    height: 40px;
    border-width: 4px;
  }
  .projection .footer .route-logo {
    width: 100px;
    height: 40px;
    border-width: 3px;
  }
  .has-group .intro-card {
    min-height: 0;
    padding: 20px 25px;
  }
  .has-group .intro-copy,
  .has-group .game-facts {
    display: none;
  }
  .has-group .game-wordmark {
    margin: 25px 0 10px;
  }
  .has-group .perception-art {
    top: 0;
    opacity: 0.25;
  }
  .institution-logos {
    gap: 15px;
  }
  .institution-logos .gov-logo {
    width: 157px;
  }
  .institution-logos .route-logo {
    width: 126px;
  }
}
/* Protagonismo del primer puesto y nombres legibles en el auditorio. */
@media (min-width: 1100px) {
  .projector-podium {
    max-width: 1320px;
    gap: 22px;
  }
  .podium-person {
    min-height: 260px;
    padding: 32px 25px;
  }
  .podium-1 {
    min-height: 340px;
  }
  .podium-3 {
    min-height: 235px;
  }
  .podium-names strong {
    font-size: clamp(26px, 2.1vw, 36px);
  }
  .podium-1 .podium-names strong {
    font-size: clamp(30px, 2.4vw, 43px);
  }
  .podium-names small {
    font-size: 13px;
  }
  .podium-1 .podium-rank {
    font-size: 100px;
  }
  .podium-person > .eyebrow {
    font-size: 10px;
  }
  .institutional-meta {
    font-size: 13px;
  }
}
@media (min-width: 1100px) and (max-height: 850px) {
  .projector-stage {
    padding: 22px 0;
  }
  .projector-podium {
    margin: 25px auto 10px;
    max-width: 1100px;
  }
  .podium-person {
    min-height: 190px;
    padding: 20px;
  }
  .podium-1 {
    min-height: 260px;
  }
  .podium-3 {
    min-height: 175px;
  }
  .podium-person .podium-rank {
    font-size: 50px;
    margin-bottom: 12px;
  }
  .podium-1 .podium-rank {
    font-size: 76px;
  }
  .podium-names {
    margin-top: 10px;
  }
  .podium-names strong {
    font-size: 24px;
  }
  .podium-1 .podium-names strong {
    font-size: 28px;
  }
  .finished-heading h1 {
    font-size: 42px;
    margin: 12px 0;
  }
  .finished-heading p {
    font-size: 13px;
  }
  .podium-topline {
    margin-bottom: 16px;
  }
  .projection .footer {
    padding: 12px 0;
  }
}
/* Una franja institucional continua da a ambos originales el mismo fondo. */
.projection {
  --projection-gutter: 38px;
}
.projection .institution-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin-inline: calc(-1 * var(--projection-gutter));
  padding: 18px var(--projection-gutter);
  border-top: 1px solid #deded7;
  background: #fff;
  color: #343831;
  --ink: #252624;
  --muted: #5d6259;
}
.projection .institution-footer .footer-institution {
  gap: 20px;
}
.projection .institution-footer .footer-label {
  color: #53594e;
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0;
}
.projection .institution-footer .footer-label strong {
  color: #2c3029;
  font-weight: 750;
}
.projection .institution-footer .footer-tagline {
  width: auto;
  order: 0;
  color: #343831;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  text-align: center;
  letter-spacing: 0;
}
.projection .institution-footer .logo-window.gov-logo,
.projection .institution-footer .logo-window.route-logo {
  height: auto;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.projection .institution-footer .logo-window.gov-logo {
  width: 180px;
}
.projection .institution-footer .logo-window.route-logo {
  width: 152px;
  justify-self: end;
}
@media (max-width: 1000px) {
  .projection .institution-footer .footer-label {
    display: none;
  }
}
@media (max-width: 800px) {
  .projection {
    --projection-gutter: 23px;
  }
  .projection .institution-footer {
    gap: 18px;
  }
  .projection .institution-footer .footer-tagline {
    font-size: 11px;
  }
  .projection .institution-footer .logo-window.gov-logo {
    width: 150px;
  }
  .projection .institution-footer .logo-window.route-logo {
    width: 126px;
  }
}
@media (max-width: 600px) {
  .projection {
    --projection-gutter: 17px;
  }
  .projection .institution-footer {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding-block: 16px;
  }
  .projection .institution-footer .footer-tagline {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 12px;
    border-top: 1px solid #e4e6df;
  }
  .projection .institution-footer .footer-tagline br {
    display: none;
  }
  .projection .institution-footer .footer-tagline br::after {
    content: ' ';
  }
  .projection .institution-footer .logo-window.gov-logo {
    width: 144px;
  }
  .projection .institution-footer .logo-window.route-logo {
    width: 116px;
  }
}
/* Revelación: una sola fotografía, completa y con todo el ancho disponible. */
.revealed-photo {
  margin: 22px 0 0;
  overflow: hidden;
  border: 1px solid #c6d4bd;
  border-radius: 7px;
  background: #f0f2eb;
}
.revealed-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 65dvh;
  object-fit: contain;
}
.revealed-photo-projection {
  margin-top: 0;

  border-color: #a9bba0;

  background: #edf1eb;
}
.revealed-photo-projection img {
  height: calc(100dvh - 340px);
  min-height: 180px;
  max-height: 680px;
}
@media (max-width: 600px) {
  .revealed-photo {
    margin-top: 18px;
  }
  .revealed-photo-projection img {
    height: auto;
    max-height: 65dvh;
  }
}
/* La revelación conserva el ranking sin restar protagonismo a la fotografía. */
.projector-summary .projection-ranking {
  min-width: 0;
  max-height: min(680px, calc(100dvh - 340px));
  overflow: auto;
}
@media (max-width: 800px) {
  .projector-summary .projection-ranking {
    display: block;
    max-height: none;
    overflow: visible;
  }
}
/* Reconocimientos: el mismo lenguaje de trofeo y medallas en todas las vistas. */
.accent {
  color: var(--red);
}
.real-answer-letter {
  color: #27734c;
}
.closed-round-icon {
  margin: 30px auto;
  background: #fff3d6;
  border-color: #e9d5a3;
  color: #8a651d;
}
.award-mark {
  display: inline-block;
  width: 80px;
  height: 80px;
  flex: 0 0 auto;
  line-height: 0;
  --award-fill: #f2cf76;
  --award-stroke: #976314;
  --award-soft: #fff0c6;
}
.award-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}
.award-2 {
  --award-fill: #d4dfeb;
  --award-stroke: #60768f;
  --award-soft: #eef3f8;
}
.award-3 {
  --award-fill: #e6bc96;
  --award-stroke: #96633c;
  --award-soft: #fff0e2;
}
.podium-person .award-mark {
  width: 86px;
  height: 86px;
  margin-bottom: 18px;
}
.podium-1 .award-mark {
  width: 108px;
  height: 108px;
}
.projector-podium .podium-person .podium-rank {
  position: absolute;
  top: 20px;
  right: 20px;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #7b8797;
}
.projector-podium .podium-1 .podium-rank {
  color: #946317;
}
.projector-podium .podium-3 .podium-rank {
  color: #936241;
}
.rank-table .place {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: 48px;
  width: auto;
  height: 31px;
  padding: 0 8px;
  background: #eef2f6;
  color: #52637b;
  border-radius: 6px;
}
.rank-table .place .icon {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}
.rank-table .place.place-1 {
  background: #fff0c6;
  color: #86580e;
}
.rank-table .place.place-2 {
  background: #eaf0f7;
  color: #506984;
}
.rank-table .place.place-3 {
  background: #fbeadd;
  color: #885735;
}
.rank-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.rank-indicator .icon {
  width: 19px;
  height: 19px;
}
.rank-tone-1 {
  color: #86580e;
}
.rank-tone-2 {
  color: #506984;
}
.rank-tone-3 {
  color: #885735;
}
.personal-result > .award-mark {
  display: block;
  margin: 0 auto 20px;
}
.personal-result > .completion-symbol {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  color: var(--green);
}
.global-podium-mini .metric {
  padding-right: 88px;
  min-height: 145px;
}
.global-podium-mini .award-mark {
  position: absolute;
  top: 20px;
  right: 18px;
  width: 54px;
  height: 54px;
}
.global-podium-mini .metric:nth-child(2) {
  border-top: 3px solid #aebfd2;
}
.global-podium-mini .metric:nth-child(3) {
  border-top: 3px solid #c8956c;
}
@media (min-width: 1100px) and (max-height: 850px) {
  .podium-person .award-mark {
    width: 66px;
    height: 66px;
    margin-bottom: 12px;
  }
  .podium-1 .award-mark {
    width: 84px;
    height: 84px;
  }
}
@media (max-width: 600px) {
  .podium-person .award-mark {
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
  }
  .podium-1 .award-mark {
    width: 70px;
    height: 70px;
  }
  .projector-podium .podium-person .podium-rank {
    top: 10px;
    right: 10px;
    font-size: 11px;
  }
  .rank-table .place {
    min-width: 40px;
    padding: 0 6px;
    gap: 4px;
  }
  .rank-table .place .icon {
    width: 14px;
    height: 14px;
  }
  .personal-stats .rank-indicator {
    gap: 4px;
  }
  .personal-stats .rank-indicator .icon {
    width: 17px;
    height: 17px;
  }
}
/* En proyectores de 720p, el QR mantiene una escala cómoda dentro del lienzo. */
@media (min-width: 801px) and (max-height: 850px) {
  .qr-card {
    padding: 22px;
  }
  .projector-qr {
    width: 200px;
    margin: 12px auto 8px;
  }
  .qr-code {
    font-size: 34px;
  }
  .qr-card .qr-count {
    padding-top: 14px;
    margin-top: 14px;
  }
}
.personal-stats strong .rank-indicator,
.result-stats strong .rank-indicator {
  display: inline-flex;
  font-size: inherit;
}
.personal-stats strong .rank-indicator span,
.result-stats strong .rank-indicator span {
  display: inline;
  font-size: inherit;
  color: inherit;
}
/* Banco visual: bibliotecas independientes y galería de pares. */
.library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.library-card {
  padding: 0;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
.library-card:hover {
  border-color: #c58c97;
  box-shadow: 0 7px 20px #25304608;
}
.library-card.is-selected {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}
.library-cover {
  display: flex;
  height: 105px;
  background: #f2f4f7;
  gap: 3px;
  padding: 10px;
  overflow: hidden;
}
.library-cover img {
  width: calc(50% - 2px);
  min-width: 0;
  flex: 1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #fff;
}
.library-cover-empty {
  width: 100%;
  display: grid;
  place-items: center;
  color: #97a3b5;
}
.library-cover-empty .icon {
  width: 38px;
  height: 38px;
}
.library-card-body {
  padding: 18px;
  position: relative;
  display: grid;
  gap: 7px;
}
.library-card-body > strong {
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  padding-right: 25px;
}
.library-card-body > .muted {
  font-size: 11px;
}
.library-card-body > .split {
  margin-top: 12px;
  gap: 8px;
}
.library-card-icon {
  position: absolute;
  right: 18px;
  top: 19px;
  color: var(--red);
}
.library-card-icon .icon {
  width: 18px;
  height: 18px;
}
.library-state {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 650;
  color: #6a7384;
  background: #f0f2f5;
  border-radius: 4px;
  padding: 4px 7px;
  white-space: nowrap;
}
.library-state.ready {
  color: #2b6a47;
  background: #edf5ee;
}
.library-open {
  font-size: 10px;
  font-weight: 750;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.library-open .icon {
  width: 15px;
  height: 15px;
}
.library-empty {
  grid-column: 1/-1;
  padding: 42px 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.library-empty h3 {
  font-size: 22px;
  margin: 0;
}
.library-empty p {
  font-size: 12px;
  line-height: 1.8;
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}
.library-empty .btn {
  margin-top: 8px;
}
.library-empty-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: #fff0f2;
  color: var(--red);
  margin-bottom: 5px;
}
.library-empty-icon .icon {
  width: 28px;
  height: 28px;
}
.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}
.library-title-block {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}
.library-folder {
  display: grid;
  place-items: center;
  background: #fff0f2;
  color: var(--red);
  width: 45px;
  height: 45px;
  border: 1px solid #f0d6dd;
  border-radius: 8px;
  flex-shrink: 0;
}
.library-folder .icon {
  width: 23px;
  height: 23px;
}
.library-title-block h3 {
  font-size: 23px;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.library-title-block p {
  margin: 0;
  font-size: 11px;
}
.library-title-block .eyebrow {
  font-size: 8px;
  color: var(--muted);
}
.library-toolbar > .row {
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 8px;
}
.library-toolbar > .row .btn {
  font-size: 10px;
  padding: 9px 12px;
  min-height: 38px;
}
.library-toolbar > .row .btn .icon {
  width: 15px;
  height: 15px;
}
.library-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}
.library-filter-bar h3 {
  font-size: 16px;
  margin: 0 0 5px;
}
.library-filter-bar .muted {
  font-size: 10px;
}
.library-search {
  min-height: 38px;
  width: 225px;
  padding: 8px 12px;
  font-size: 11px;
}
.library-filter-bar > .row {
  flex-wrap: nowrap;
}
.question-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.question-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}
.question-card.is-inactive {
  border-style: dashed;
}
.question-card.is-inactive .question-card-images {
  opacity: 0.65;
}
.question-card-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 9px 9px 0;
}
.question-card-image {
  position: relative;
  padding: 0;
  border: 1px solid #e2e6ec;
  border-radius: 5px;
  overflow: hidden;
  background: #eef1f4;
  color: var(--ink);
  min-width: 0;
}
.question-card-image img {
  display: block;
  width: 100%;
  height: 165px;
  object-fit: contain;
}
.question-card-image > .image-label {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  font-size: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.question-expand {
  position: absolute;
  bottom: 7px;
  right: 7px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  background: #fffe;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.question-expand .icon {
  width: 14px;
  height: 14px;
}
.question-card-body {
  padding: 18px;
}
.question-card-body h4 {
  font-size: 15px;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.question-card-body > .split {
  align-items: flex-start;
  gap: 10px;
}
.question-real {
  font-size: 11px;
  color: #4b6b57;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 13px 0 17px;
}
.question-real .icon {
  width: 15px;
  height: 15px;
}
.question-card-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.question-card-actions .btn {
  font-size: 10px;
  min-height: 34px;
  padding: 7px 10px;
  gap: 6px;
}
.question-card-actions .btn .icon {
  width: 14px;
  height: 14px;
}
.question-card-actions .danger {
  margin-left: auto;
}
#questionEditor {
  scroll-margin-top: 22px;
}
#libraryWorkspace {
  scroll-margin-top: 22px;
}
#questionEditor > .section-head h3 {
  margin: 0;
}
#questionEditor > .section-head {
  margin-bottom: 25px;
}
.library-image-dialog {
  width: min(1100px, calc(100% - 30px));
  max-height: 94dvh;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.library-image-dialog::backdrop {
  background: #23304799;
  backdrop-filter: blur(3px);
}
.library-image-dialog h3 {
  font-size: 21px;
  margin: 7px 0 0;
}
.library-image-dialog .eyebrow {
  color: var(--muted);
}
.library-image-dialog > img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 73dvh;
  object-fit: contain;
  margin: 22px auto 0;
}
@media (max-width: 1200px) {
  .library-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }
  .library-toolbar > .row {
    justify-content: flex-start;
  }
}
@media (max-width: 1000px) {
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .library-search {
    width: 190px;
  }
  .question-card-body {
    padding: 15px;
  }
  .question-card-actions .btn {
    padding: 7px 8px;
  }
}
@media (max-width: 600px) {
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .library-cover {
    height: 80px;
    padding: 7px;
  }
  .library-card-body {
    padding: 13px;
    gap: 5px;
  }
  .library-card-body > strong {
    font-size: 13px;
    padding-right: 20px;
  }
  .library-card-body > .muted {
    font-size: 9px;
  }
  .library-card-icon {
    top: 15px;
    right: 12px;
  }
  .library-card-icon .icon {
    width: 15px;
    height: 15px;
  }
  .library-card-body > .split {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .library-state {
    font-size: 9px;
  }
  .library-toolbar > .row {
    width: 100%;
    flex-wrap: wrap;
  }
  .library-toolbar > .row .btn {
    flex: 1;
    font-size: 10px;
    white-space: nowrap;
  }
  .library-toolbar > .row .btn:last-child {
    flex-basis: 100%;
  }
  .library-filter-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .library-filter-bar > .row {
    width: 100%;
    gap: 9px;
  }
  .library-search {
    width: auto;
    min-width: 0;
    flex: 1;
  }
  .library-filter-bar .filter-select {
    min-width: 110px;
  }
  .question-gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .question-card-image img {
    height: 170px;
  }
  .question-card-body {
    padding: 17px;
  }
  .question-card-body h4 {
    font-size: 15px;
  }
  .question-card-actions .btn {
    font-size: 10px;
    padding: 8px 10px;
    min-height: 36px;
  }
  .library-empty {
    padding: 32px 20px;
  }
  .library-empty h3 {
    font-size: 21px;
  }
  .library-title-block h3 {
    font-size: 23px;
  }
  .library-title-block p {
    font-size: 10px;
  }
  .library-image-dialog {
    padding: 17px;
  }
  .library-image-dialog h3 {
    font-size: 18px;
  }
}
/* La fotografía auténtica se marca sobre su propia vista previa. */
.event-reset {
  display: flex;
  padding: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-color: #eadcdd;
}
.event-reset p {
  margin: 8px 0 0;
  max-width: 630px;
}
.event-reset > .btn {
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .event-reset {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}
.image-proof {
  position: relative;
  min-height: 225px;
  border: 1px solid #e0e5eb;
  border-radius: 7px;
  background: #eef2f6;
  overflow: hidden;
}
.image-proof .upload-preview {
  display: block;
  width: 100%;
  height: 225px;
  margin: 0;
  object-fit: contain;
  background: #eef2f6;
  border-radius: 0;
}
.image-proof-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9aa7b8;
}
.image-proof-empty > .icon {
  width: 38px;
  height: 38px;
}
.real-photo-choice {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid #cfd8e1;
  border-radius: 7px;
  background: #fff;
  color: #4d5a6e;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px #25304608;
}
.real-photo-choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.real-photo-check {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1.5px solid #aeb9c7;
  border-radius: 5px;
  background: #fff;
  flex-shrink: 0;
}
.real-photo-check .icon {
  width: 15px;
  height: 15px;
  opacity: 0;
  stroke-width: 2.4;
}
.real-photo-choice:has(input:checked) {
  color: #23623d;
  background: #f2fbf5;
  border-color: #42815a;
}
.real-photo-choice:has(input:checked) .real-photo-check {
  background: #26744e;
  border-color: #26744e;
  color: #fff;
}
.real-photo-choice:has(input:checked) .real-photo-check .icon {
  opacity: 1;
}
.real-photo-choice:has(input:focus-visible) {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.real-photo-choice:has(input:disabled) {
  opacity: 0.6;
  cursor: wait;
}
.upload-pair:has(input[name='real_side']:checked) {
  border-style: solid;
  border-color: #6a9a7c;
  background: #f6fbf7;
}
.upload-pair:has(input[name='real_side']:checked) .image-proof {
  border-color: #8bb69a;
}
@media (max-width: 600px) {
  .image-proof,
  .image-proof .upload-preview {
    min-height: 0;
    height: 220px;
  }
  .real-photo-choice {
    top: 10px;
    right: 10px;
    padding: 8px 10px;
    min-height: 42px;
    font-size: 11px;
  }
}
