:root {
  --v: #5b44e7;
  --v-mid: #7b68ee;
  --v-soft: rgba(91, 68, 231, .10);
  --v-faint: rgba(91, 68, 231, .05);
  --am: #b8762a;
  --am-soft: rgba(184, 118, 42, .13);
  --am-faint: rgba(184, 118, 42, .05);
  --pg: #f2f1fa;
  --cb: #ffffff;
  --bd: #e3e0f5;
  --bd2: #cac6ea;
  --t1: #18162e;
  --t2: #5a567c;
  --t3: #9b97bc;
  --ibg: #f6f5fc;
  --ifo: #edeafd;
  --ce: #ededf8;
  --ca: #e6e3fb;
  --r1: 7px;
  --r2: 12px;
  --r3: 18px;
  --r4: 24px;
  --sc: 0 4px 32px rgba(91, 68, 231, .07), 0 1px 6px rgba(0, 0, 0, .04);
  --sb: 0 2px 8px rgba(91, 68, 231, .22);
  --tr: 160ms cubic-bezier(.4, 0, .2, 1);
  --fd: "Crimson Pro", Georgia, "Times New Roman", serif;
  --fb: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --fm: "SF Mono", "Fira Code", "Cascadia Code", Menlo, monospace;
}

[data-theme="dark"] {
  --pg: #0d0c1a;
  --cb: #161428;
  --bd: #252240;
  --bd2: #353162;
  --t1: #ece8ff;
  --t2: #9e99c4;
  --t3: #615d8a;
  --ibg: #1a1730;
  --ifo: #201d3a;
  --ce: #1a1730;
  --ca: #201d3a;
  --v-faint: rgba(91, 68, 231, .08);
  --v-soft: rgba(91, 68, 231, .18);
  --am-soft: rgba(184, 118, 42, .20);
  --am-faint: rgba(184, 118, 42, .08);
  --sc: 0 4px 40px rgba(0, 0, 0, .45);
  --sb: 0 2px 8px rgba(0, 0, 0, .35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.clave-oculta-page {
  margin: 0;
  min-height: 100dvh;
  background: var(--pg);
  color: var(--t1);
  font-family: var(--fb);
  -webkit-font-smoothing: antialiased;
}

.co-page {
  width: min(100% - 28px, 760px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 92px 0 36px;
}

.game-page-head {
  max-width: 620px;
  margin: 0 auto 28px;
  text-align: center;
}

.game-page-kicker {
  margin: 0 0 7px;
  color: var(--v);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.game-page-head h1 {
  margin: 0;
  color: var(--t1);
  font-family: var(--fd);
  font-size: 36px;
  font-weight: 560;
  line-height: 1.05;
}

.game-page-head p:not(.game-page-kicker) {
  max-width: 34rem;
  margin: 12px auto 0;
  color: var(--t2);
  font-size: 14px;
  line-height: 1.62;
}

.game-page-head span {
  display: inline-flex;
  margin-top: 13px;
  padding: 6px 10px;
  color: var(--t2);
  background: var(--cb);
  border: 1px solid var(--bd);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

.co-card {
  width: 100%;
  max-width: 540px;
  background: var(--cb);
  border: 1px solid var(--bd);
  border-radius: var(--r4);
  box-shadow: var(--sc);
  padding: 28px 24px 24px;
}

.co-card > .co-ey,
.co-card > .co-ti,
.co-card > .co-su {
  display: none;
}

.co-ey {
  margin: 0 0 5px;
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--t3);
  font-weight: 600;
}

.co-ti {
  margin: 0 0 4px;
  font-family: var(--fd);
  font-size: 26px;
  font-weight: 500;
  color: var(--t1);
  letter-spacing: -.015em;
  line-height: 1.15;
}

.co-su {
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--t2);
  line-height: 1.55;
}

.co-dif {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 20px;
  background: var(--ibg);
  border: 1px solid var(--bd);
  border-radius: var(--r2);
  padding: 4px;
}

.co-db {
  min-width: 0;
  background: none;
  border: none;
  border-radius: calc(var(--r2) - 2px);
  padding: 8px 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  cursor: pointer;
  transition: all var(--tr);
  font-family: var(--fb);
  line-height: 1.35;
}

.co-db:hover:not(.active) {
  color: var(--t1);
  background: var(--ca);
}

.co-db.active {
  background: var(--cb);
  color: var(--v);
  box-shadow: 0 1px 5px rgba(91, 68, 231, .12), 0 0 0 1px var(--bd);
}

.co-db:focus-visible,
.co-cell:focus-visible,
.co-bp:focus-visible,
.co-bs:focus-visible,
.co-nk:focus-visible,
.co-bg:focus-visible,
.co-htt:focus-visible {
  outline: 2px solid var(--v);
  outline-offset: 2px;
}

.co-db-sub {
  display: block;
  font-size: 9.5px;
  font-weight: 400;
  opacity: .68;
  margin-top: 1px;
}

.co-level-detail {
  margin: -12px 0 18px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--t3);
  text-align: center;
}

.co-level-detail strong {
  color: var(--t2);
  font-weight: 700;
}

.co-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 11.5px;
  color: var(--t3);
}

.co-meta-a b {
  color: var(--t2);
}

.co-meta-t {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: .04em;
}

.co-cells {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-bottom: 12px;
}

.co-cell {
  flex: 0 0 auto;
  width: 60px;
  height: 68px;
  background: var(--ce);
  border: 2px solid var(--bd);
  border-radius: var(--r2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fm);
  font-size: 28px;
  font-weight: 600;
  color: var(--t1);
  cursor: pointer;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.co-cell.sel {
  border-color: var(--v);
  background: var(--ca);
  box-shadow: 0 0 0 4px var(--v-soft);
}

.co-cell.filled {
  border-color: var(--bd2);
}

.co-cell-cur {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  background: var(--v);
  border-radius: 1px;
  animation: co-blink 1.1s step-end infinite;
}

@keyframes co-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.co-cells[data-n="5"] .co-cell {
  width: 52px;
  height: 62px;
  font-size: 25px;
}

.co-cells[data-n="6"] .co-cell {
  width: 46px;
  height: 56px;
  font-size: 22px;
  border-radius: var(--r1);
}

.co-acts {
  display: flex;
  gap: 7px;
}

.co-bp,
.co-bs,
.co-bg {
  border-radius: var(--r2);
  font-family: var(--fb);
  cursor: pointer;
  transition: all var(--tr);
}

.co-bp {
  flex: 1;
  background: var(--v);
  color: #fff;
  border: none;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: var(--sb);
}

.co-bp:hover:not(:disabled) {
  background: #4a35c9;
}

.co-bs {
  background: none;
  border: 1px solid var(--bd);
  color: var(--t2);
  padding: 12px;
  font-size: 12.5px;
}

.co-bs:hover:not(:disabled),
.co-bg:hover {
  border-color: var(--bd2);
  color: var(--t1);
  background: var(--ibg);
}

.co-bp:disabled,
.co-bs:disabled,
.co-nk:disabled {
  opacity: .35;
  cursor: not-allowed;
  box-shadow: none;
}

.co-np {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.co-nk {
  min-height: 48px;
  background: var(--ibg);
  border: 1px solid var(--bd);
  border-radius: var(--r1);
  padding: 14px 6px;
  font-family: var(--fm);
  font-size: 17px;
  font-weight: 600;
  color: var(--t1);
  cursor: pointer;
  text-align: center;
  touch-action: manipulation;
}

.co-nk:hover:not(:disabled) {
  background: var(--ca);
  border-color: var(--bd2);
}

.co-nk-del,
.co-nk-ok {
  font-family: var(--fb);
  font-size: 12.5px;
  font-weight: 600;
}

.co-nk-ok {
  background: var(--v);
  color: #fff;
  border-color: var(--v);
}

.co-div {
  height: 1px;
  background: var(--bd);
  margin: 20px 0;
}

.co-leg {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 10px;
}

.co-leg-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--t3);
}

.co-leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.co-leg-dot.ex {
  background: var(--v);
}

.co-leg-dot.sh {
  background: var(--am);
}

.co-hy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.co-he {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--t3);
  padding: 18px 0;
  font-style: italic;
}

.co-att {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--ibg);
  border: 1px solid var(--bd);
  border-radius: var(--r2);
}

.co-att.win {
  border-color: var(--v);
  background: var(--v-faint);
}

.co-ai {
  font-size: 10px;
  color: var(--t3);
  text-align: center;
}

.co-ad {
  display: flex;
  gap: 5px;
  align-items: center;
}

.co-adig {
  font-family: var(--fm);
  font-size: 17px;
  font-weight: 600;
  min-width: 13px;
  text-align: center;
}

.co-sc {
  display: flex;
  gap: 5px;
}

.co-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 20px;
  min-width: 52px;
}

.co-pill-ex {
  background: var(--v-soft);
  color: var(--v);
}

.co-pill-sh {
  background: var(--am-soft);
  color: var(--am);
}

.co-pill.zero {
  background: var(--v-faint);
  color: var(--t3);
}

.co-pill-icon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.co-pill-n {
  font-family: var(--fm);
  font-size: 13.5px;
  font-weight: 800;
}

.co-pill-lbl {
  font-size: 9px;
  letter-spacing: .04em;
  font-weight: 600;
  text-transform: uppercase;
}

.co-st {
  margin-top: 16px;
  text-align: center;
}

.co-stm {
  margin: 0;
  font-size: 13px;
  color: var(--t2);
  line-height: 1.55;
}

.co-stm.ok {
  color: var(--v);
  font-weight: 700;
  font-size: 14px;
}

.co-stm.ko {
  color: var(--t1);
  font-weight: 700;
}

.co-stm.hi {
  color: var(--t3);
  font-size: 12px;
}

.co-pg {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.co-pg[hidden] {
  display: none;
}

.co-bg {
  background: none;
  border: 1px solid var(--bd);
  color: var(--t2);
  padding: 8px 15px;
  font-size: 12px;
}

.co-ht {
  width: 100%;
  max-width: 540px;
  margin: 18px auto 0;
  background: var(--cb);
  border: 1px solid var(--bd);
  border-radius: var(--r2);
  padding: 15px 16px;
}

.co-htt {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--v);
  cursor: pointer;
  font-family: var(--fb);
  padding: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}

.co-htt:hover {
  color: var(--t2);
}

.co-htt svg.arr {
  transition: transform var(--tr);
}

.co-htt[aria-expanded="true"] svg.arr {
  transform: rotate(180deg);
}

.co-htb {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--t2);
  line-height: 1.7;
}

.co-htb p {
  margin: 0 0 5px;
}

.co-htb strong {
  color: var(--t1);
  font-weight: 700;
}

.co-htex {
  margin-top: 9px;
  background: var(--ibg);
  border: 1px solid var(--bd);
  border-radius: var(--r2);
  padding: 11px 13px;
  font-size: 12px;
  color: var(--t2);
}

.co-htex code {
  font-family: var(--fm);
  font-size: 11.5px;
  background: var(--bd);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--t1);
}

.co-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--t1);
  color: var(--cb);
  font-size: 12px;
  padding: 8px 18px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 180ms, transform 180ms;
  pointer-events: none;
  white-space: nowrap;
  z-index: 200;
}

.co-toast.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.co-back {
  width: 100%;
  max-width: 540px;
  margin: 20px auto 0;
  text-align: center;
  font-size: 13px;
}

.co-back a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--t2);
  text-decoration: none;
  font-weight: 650;
}

.co-back a:hover {
  color: var(--v);
}

.site-footer-std {
  width: min(100% - 28px, 760px);
  margin: 0 auto;
  padding: 0 0 36px;
  color: var(--t3);
  font-size: 12px;
}

.site-footer-std p {
  margin: 0;
}

@keyframes co-shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

@media (max-width: 520px) {
  .co-dif {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 400px) {
  .co-page {
    width: min(100% - 16px, 760px);
    padding: 52px 0 34px;
  }

  .game-page-head h1 {
    font-size: 30px;
  }

  .co-card {
    padding: 20px 13px 18px;
    border-radius: var(--r3);
  }

  .co-ti {
    font-size: 22px;
  }

  .co-cell {
    width: 52px;
    height: 62px;
    font-size: 25px;
  }

  .co-cells[data-n="5"] .co-cell {
    width: 44px;
    height: 56px;
    font-size: 22px;
  }

  .co-cells[data-n="6"] .co-cell {
    width: 38px;
    height: 50px;
    font-size: 19px;
  }

  .co-cells {
    gap: 5px;
  }

  .co-pill {
    min-width: 46px;
    padding: 4px 7px;
  }

  .co-adig {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
