/**
 * Cáscara tipo puzzle diario. Solo en /tools/mtguesser.
 *
 * @package Cartonews_Mtguesser
 */

body.cnmg-game {
  background: #f3f2ef;
}

body.cnmg-game .site-header {
  background: #fff;
}

body.cnmg-game .site-main {
  padding-block: 0;
}

.cnmg {
  padding: 1.25rem 1rem 3rem;
}

.cnmg__shell {
  max-width: 26.5rem;
  margin-inline: auto;
}

.cnmg__more {
  max-width: 40rem;
  margin: 2.25rem auto 0;
}

.cnmg__kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--text-accent, #534ab7);
}

.cnmg__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.15rem 0 0.65rem;
}

.cnmg__header h1 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.cnmg__date {
  font-size: 0.9rem;
  color: var(--color-text-muted, #555);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cnmg__help {
  margin: 0 0 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8e6e0;
}

.cnmg__help summary {
  cursor: pointer;
  list-style: none;
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.cnmg__help summary::-webkit-details-marker {
  display: none;
}

.cnmg__help ul {
  margin: 0;
  padding: 0 1rem 0.85rem 1.7rem;
  color: var(--color-text-muted, #555);
  font-size: 0.92rem;
}

html.cnmg-notice-off .cnmg-notice,
.cnmg-notice[hidden] {
  display: none;
}

.cnmg-notice {
  position: relative;
  box-sizing: border-box;
  max-width: 26.5rem;
  margin: 0 auto 1rem;
  padding: 1rem 3.25rem 1rem 1.25rem;
  border: 1px solid color-mix(in srgb, var(--text-accent, #534ab7) 28%, var(--border, #e5e5e0));
  border-radius: var(--radius, 8px);
  background: color-mix(in srgb, var(--bg-accent, #eeeaf8) 55%, var(--surface-raised, #fff));
}

.cnmg-notice__close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius, 8px);
  background: transparent;
  color: var(--text-secondary, #555);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cnmg-notice__close:hover {
  color: var(--text-primary, #111);
  background: color-mix(in srgb, var(--text-accent, #534ab7) 10%, transparent);
}

.cnmg-notice__close:focus-visible {
  outline: 2px solid var(--fill-accent, #534ab7);
  outline-offset: 2px;
}

.cnmg-notice__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cnmg-notice__badge {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--text-accent, #534ab7);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

.cnmg-notice__text {
  margin: 0;
  color: var(--text-secondary, #555);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.cnmg-notice__text + .cnmg-notice__text {
  margin-top: 0.75rem;
}

.cnmg-notice__text a,
.cnmg-notice__feedback {
  color: var(--fill-accent, #534ab7);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.cnmg-notice__feedback {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cnmg__hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.cnmg__hud li {
  background: #fff;
  border-radius: 12px;
  padding: 0.65rem 0.4rem 0.55rem;
  text-align: center;
  border: 1px solid #e8e6e0;
}

.cnmg__hud-val {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.cnmg__hud-lbl {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted, #666);
}

.cnmg__board {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid #e8e6e0;
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 8px 24px rgb(0 0 0 / 5%);
}

.cnmg__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cnmg__live {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.cnmg__chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: #eeedfe;
  color: var(--wp--preset--color--text-accent, #534ab7);
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cnmg__art {
  position: relative;
  width: min(18.5rem, 100%);
}

.cnmg__canvas,
.cnmg__art-clear {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.cnmg__canvas {
  aspect-ratio: 640 / 460;
  background: #1c1c1c;
  image-rendering: pixelated;
}

.cnmg__art-clear {
  margin-bottom: 0.75rem;
}

.cnmg__full-card {
  display: block;
  width: min(11.5rem, 100%);
  height: auto;
  margin: 0.25rem auto 0;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgb(0 0 0 / 18%);
}

.cnmg__status {
  min-height: 1.25rem;
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text-muted, #555);
}

.cnmg__status a {
  font-weight: 700;
}

.cnmg__loss-title {
  display: block;
  margin: 0 0 0.2rem;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text, #1a1a1a);
}

.cnmg__artist {
  margin: 0.35rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-muted, #555);
}

.cnmg__form {
  margin-top: 0.85rem;
}

.cnmg__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cnmg__form-row {
  display: flex;
  gap: 0.45rem;
}

.cnmg__form-row input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  font-size: 1rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid #ddd9d0;
  border-radius: 999px;
  background: #f7f6f3;
}

.cnmg__form-row input:focus {
  outline: 2px solid var(--wp--preset--color--fill-accent, #534ab7);
  outline-offset: 1px;
  background: #fff;
}

.cnmg__form.is-busy .cnmg__form-row input,
.cnmg__form.is-busy .cnmg__btn {
  pointer-events: none;
  opacity: 0.72;
}

.cnmg__misses {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.cnmg__miss {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #c1121f;
  overflow-wrap: anywhere;
}

.cnmg__miss.is-pending {
  background: #8a8680;
  animation: cnmg-pending 0.7s ease-in-out infinite;
}

@keyframes cnmg-pending {
  50% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cnmg__miss.is-pending {
    animation: none;
    opacity: 0.7;
  }
}

.cnmg__attempts {
  margin: 0.4rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-muted, #666);
}

.cnmg__tomorrow {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--wp--preset--color--text-accent, #534ab7);
}

.cnmg__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.cnmg__btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0.55rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--wp--preset--color--fill-accent, #534ab7);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.cnmg__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cnmg__btn--ghost {
  background: transparent;
  color: var(--color-text, #1a1a1a);
  border: 1px solid #d9d6ce;
}

.cnmg__share-row a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cnmg__recap,
.cnmg__share,
.cnmg__rank-card,
.cnmg__ach {
  background: #fff;
  border: 1px solid #e8e6e0;
  border-radius: 16px;
}

.cnmg__recap,
.cnmg__share {
  margin-top: 0.85rem;
  padding: 1.1rem 1rem 1.15rem;
}

.cnmg__recap h2,
.cnmg__section-title,
.cnmg__rankings h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.cnmg__recap-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
}

.cnmg__recap-stats div {
  text-align: center;
  padding: 0.55rem 0.3rem;
  border-radius: 12px;
  background: #f7f6f3;
}

.cnmg__recap-stats dt {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted, #666);
}

.cnmg__recap-stats dd {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cnmg__recap-rank {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted, #555);
}

.cnmg__virals {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.cnmg__virals li {
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: #eeedfe;
  color: var(--wp--preset--color--text-accent, #534ab7);
  font-size: 0.9rem;
  font-weight: 650;
}

.cnmg__share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.cnmg__share p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.cnmg__section-title {
  margin: 0 0 0.65rem;
}

.cnmg__achievements {
  display: grid;
  gap: 0.5rem;
}

.cnmg__ach-empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text-muted, #555);
}

.cnmg__unlock {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: #eeedfe;
  color: var(--wp--preset--color--text-accent, #534ab7);
  font-size: 0.9rem;
  font-weight: 650;
}

.cnmg__ach {
  padding: 0.75rem 0.85rem;
}

.cnmg__ach.is-unlocked {
  border-color: var(--wp--preset--color--border-accent, #ccc8f8);
  background: #eeedfe;
}

.cnmg__ach strong {
  display: block;
  font-size: 0.92rem;
}

.cnmg__ach span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--wp--preset--color--text-accent, #534ab7);
}

.cnmg__ach p,
.cnmg__ach time {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted, #555);
}

.cnmg__ach time {
  display: block;
  font-size: 0.75rem;
}

.cnmg__rankings {
  margin-top: 1.75rem;
}

.cnmg__lede {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--color-text-muted, #555);
}

.cnmg__privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.92rem;
  min-height: 44px;
}

.cnmg__privacy input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.cnmg__rank-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 600px) {
  .cnmg__rank-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.cnmg__rank-card {
  padding: 0.85rem 1rem 1rem;
}

.cnmg__rank-card h3 {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cnmg__rankings ol {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.92rem;
}

.cnmg__rankings li.is-you {
  font-weight: 700;
}

.cnmg__rank-achs {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (min-width: 768px) {
  .cnmg__rank-achs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cnmg__legal {
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--color-text-muted, #666);
}

.cnmg__legal--fan {
  margin-top: 0.2rem;
}

.cnmg__canvas[hidden],
.cnmg__art-clear[hidden],
.cnmg__full-card[hidden],
.cnmg__chip[hidden],
.cnmg__live[hidden],
.cnmg__misses[hidden],
.cnmg__tomorrow[hidden],
.cnmg__form[hidden],
.cnmg__share[hidden],
.cnmg__recap[hidden],
.cnmg__virals[hidden],
.cnmg__virals [hidden],
.cnmg__when[hidden],
.cnmg__archive[hidden],
.cnmg__archive [hidden] {
  display: none;
}

.cnmg__when {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--wp--preset--color--text-accent, #534ab7);
}

.cnmg__archive {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.75rem;
  overflow: auto;
  border-radius: 16px;
  background: rgb(26 26 26 / 40%);
}

.cnmg__archive-dialog {
  box-sizing: border-box;
  flex-shrink: 0;
  width: min(100%, 16.5rem);
  padding: 0.55rem 0.6rem 0.65rem;
  border-radius: 12px;
  border: 1px solid #e8e6e0;
  background: #fff;
}

.cnmg__archive-head {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0.4rem;
}

.cnmg__archive-head h2 {
  flex: 1;
  margin: 0;
  font-size: 0.92rem;
  text-align: center;
}

.cnmg__archive-nav,
.cnmg__archive-close {
  min-height: 36px;
  min-width: 36px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #d9d6ce;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.cnmg__archive-week,
.cnmg__archive-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.cnmg__archive-week {
  margin-bottom: 4px;
  color: var(--color-text-muted, #555);
  font-size: 0.75rem;
  text-align: center;
}

.cnmg__archive-day {
  box-sizing: border-box;
  min-height: 32px;
  margin: 0;
  padding: 1px 0 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

button.cnmg__archive-day {
  cursor: pointer;
  border-color: #e8e6e0;
  background: #f7f6f3;
}

.cnmg__archive button:focus-visible {
  outline: 2px solid var(--wp--preset--color--fill-accent, #534ab7);
  outline-offset: 2px;
}

.cnmg__archive-day.is-quiet {
  color: #6b6b66;
}

.cnmg__archive-day.is-today {
  border-color: var(--wp--preset--color--fill-accent, #534ab7);
  color: var(--wp--preset--color--text-accent, #534ab7);
}

.cnmg__archive-num {
  font-weight: 700;
}

.cnmg__mark {
  min-height: 0.7rem;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

.cnmg__mark--ok {
  color: #0b6b3a;
}

.cnmg__mark--no {
  color: #8f2d2d;
}

.cnmg__mark--empty {
  display: inline-block;
  width: 0.7rem;
  min-height: 0.7rem;
  border-radius: 2px;
  border: 1px solid #c4c1b8;
}

.cnmg__archive-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--color-text-muted, #555);
  font-size: 0.72rem;
}

.cnmg__archive-legend li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cnmg__archive-empty,
.cnmg__archive-error {
  margin: 0.75rem 0 0;
  text-align: center;
}

.cnmg__archive-error {
  color: #8f2d2d;
  font-weight: 600;
}

.cnmg__archive [data-cnmg-archive-gate] .cnmg__btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
