body {
  font-family: system-ui, sans-serif;
  text-align: center;
}

/*.grid {
  width: 320px;
  height: 320px;
  margin: 20px auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 2px;
}*/

.cell {
  position: relative;
  border: 1px solid #333;
  cursor: pointer;
  background-size: 400% 400%;
  background-repeat: no-repeat;
}

.cell .cover {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
}

.cell.revealed .cover {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}



#modalGrid {
  font-size: 20px;
  line-height: 1.2;
  margin: 12px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 15px 0;
}

.stats-grid div {
  font-size: 14px;
}

#distribution {
  margin-top: 10px;
  text-align: left;
  font-size: 14px;
}

.dist-row {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.dist-label {
  width: 16px;
}

.dist-bar {
  height: 18px;
  background: #444;
  margin-left: 6px;
  color: #fff;
  padding: 0 6px;
  font-size: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 10px 8px;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
}

.top-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #333;
}

.icon-btn:hover {
  opacity: 0.7;
}

.countdown {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #555;
}

.final-info {
  margin: 20px auto;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 10px;
}

.final-info h2 {
  margin-top: 0;
}

.final-info.hidden {
  display: none;
}



.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  color: #555;
}

.modal-close:hover {
  color: #000;
}


body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
}

.app {
  max-width: 360px;
  margin: 0 auto;
  padding: 12px;
}


/*.grid {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 16px;
}*/

.cell {
  border-radius: 6px;
  overflow: hidden;
  background-color: #ddd;
  transition: transform 0.15s ease;
}

.cell:hover {
  transform: scale(1.02);
}

.cell .cover {
  background: linear-gradient(
    135deg,
    #dcdcdc,
    #cfcfcf
  );
  transition: opacity 0.2s ease;
}

.controls {
  margin-top: 20px;
  display: flex;
  gap: 8px;
}

.controls input {
  flex: 1;
  padding: 10px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.controls button {
  padding: 0 16px;
  border: none;
  color: white;
  font-weight: 600;
}

.final-info {
  margin-top: 20px;
  background: var(--surface);
  border-radius: 12px;
}



.icon-btn {
  color: var(--muted);
}

.icon-btn:hover {
  color: var(--accent);
}

.modal {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0 }
  to { opacity: 1 }
}



.controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  z-index: 10;
  position: relative;
}

#guess {
  width: 200px;
  padding: 12px 14px;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid #ccc;
  background: #fff;
  color: #111;
  outline: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

#guess::placeholder {
  color: #999;
}

#guess:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}

.btn {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: #6366f1;
  color: white;
  box-shadow: 0 6px 16px rgba(99,102,241,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(99,102,241,.35);
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

#submit {
  all: unset;
}

#submit.btn {
  all: unset;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: #6366f1;
  color: white;
  box-shadow: 0 6px 16px rgba(99,102,241,.35);
}

.guess-container {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}

/* Dropdown */
#suggestions{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;

  /* Dark / glass look */
  background: rgba(22, 25, 34, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;

  margin: 0;
  padding: 6px;

  list-style: none;
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  z-index: 9999;
  max-height: 240px;
  overflow-y: auto;

  display: none;
}

/* Items */
#suggestions li{
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;

  color: rgba(255,255,255,0.92);
  border-radius: 10px;

  transition: background 120ms ease, transform 120ms ease;
}

/* Hover */
#suggestions li:hover{
  background: rgba(120,110,255,0.18);
}

/* Active (para teclado si lo usas) */
#suggestions li.active{
  background: rgba(120,110,255,0.25);
}

/* Scrollbar (opcional, queda más pro) */
#suggestions::-webkit-scrollbar{
  width: 10px;
}
#suggestions::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  border: 2px solid rgba(22,25,34,0.92);
}
#suggestions::-webkit-scrollbar-track{
  background: transparent;
}

@media (max-width: 520px){
  #suggestions{
    max-height: 180px;
  }
}


/*#suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;

  background: #ffffff;
  border-radius: 12px;
  margin-top: 8px;
  padding: 6px 0;

  list-style: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);

  z-index: 1000;
  max-height: 240px;
  overflow-y: auto;

  display: none;
}

#suggestions li {
  padding: 10px 14px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease;
}

#suggestions li:hover {
  background: #f0f2ff;
}*/

:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --card-soft: #202430;
  --text: #e6e8ee;
  --muted: #9aa0b3;
  --accent: #6c72ff;
  --border: rgba(255,255,255,0.08);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border: 1px solid var(--border);
}

.app {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border: 1px solid var(--border);
}

.guess-container {
  position: relative;
  display: flex;
  gap: 10px;
}

#guess {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: var(--card-soft);
  color: var(--text);
  font-size: 15px;
}

#guess::placeholder {
  color: var(--muted);
}

#submit {
  padding: 0 18px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.result-card {
  text-align: center;
}

.result-card h2 {
  margin: 0 0 6px;
}

.result-card .answer {
  color: var(--muted);
  margin-bottom: 10px;
}

.result-card .description {
  font-size: 14px;
  line-height: 1.5;
  color: #cfd3ff;
}

.modal-card {
  background: #1e1e1e;
  color: #f1f1f1;
  border-radius: 18px;
  padding: 20px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}

.modal-content {
  background: #1e1e1e;
  color: #f1f1f1;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 320px;
  text-align: center;
  position: relative;

  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
}

.modal-content h2 {
  margin-top: 0;
}

.hidden { display: none; }

.cell {
  transition: transform 0.60s ease, filter 0.8s ease;
}

.cell.revealed {
  filter: none;
}

.cell:not(.revealed) {
  filter: brightness(0.6);
}

.share-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.share-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: var(--card-soft);
  border: 1px solid var(--border);
  color: var(--text);

  cursor: pointer;
  text-decoration: none;

  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.share-icon:hover {
  transform: translateY(-1px);
  background: rgba(108, 114, 255, 0.12);
  border-color: rgba(108, 114, 255, 0.35);
}

.share-icon:active {
  transform: translateY(0);
}


.modal-title {
  margin: 0 0 14px;
  font-size: 20px;
  letter-spacing: 0.2px;
  text-align: center;
}

.modal-section {
  margin: 14px 0;
}

.modal-h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--text);
  opacity: 0.95;
}

.modal-p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
  max-width: 34ch;
  margin-inline: auto;
}

.center { text-align: center; }
.subtle { color: var(--muted); }

.modal-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.modal-footer {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
}


.help-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 12px;
  margin-top: 8px;
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.step-text {
  color: var(--text);
  opacity: 0.9;
  font-size: 14px;
  line-height: 1.35;
}

.callout {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
}

.callout.tip {
  background: rgba(108,114,255,0.14);
  border-color: rgba(108,114,255,0.25);
}

.callout.highlight {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
  text-align: center;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 160px;
  margin: 10px auto 6px;
}

.mini {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.mini.revealed {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.16);
}


kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.cell.revealed {
  animation: reveal 1s ease;
}

@keyframes reveal {
  from {
    transform: scale(.92);
    opacity: .6;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}


.cell {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  perspective: 900px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
}

.cell-inner {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(.2,.8,.2,1);
}

.cell.revealed .cell-inner {
  transform: rotateY(180deg);
}

.cell-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}


.cell-front {
  background: rgba(255,255,255,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}


.cell-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,0));
  opacity: .7;
}


.cell-back {
  transform: rotateY(180deg);
  background-repeat: no-repeat;
  background-size: 400% 400%;
}


.cell.can-reveal:hover .cell-front {
  background: rgba(108,114,255,0.18);
}


.cell.blocked {
  opacity: 1;
  pointer-events: none;
}

.title-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.title {
  margin: 0;
  line-height: 1;
}

.subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .3px;
  text-align: left;
}

.countdown {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}



.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-soft);
  color: var(--text);
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(108,114,255,0.12);
  border-color: rgba(108,114,255,0.35);
}


/*.grid {
  gap: 0;
}*/

.cell {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}


.cell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  outline: 1px solid rgba(255,255,255,0.10);
  outline-offset: -1px;
  pointer-events: none;
}

.result-card { text-align: center; }

.final-info {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.result-head{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-bottom: 6px;
}

.result-emoji{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-size: 18px;
}

.result-title{
  margin: 0;
  font-size: 18px;
  letter-spacing: .2px;
}

.result-name{
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .4px;
  margin: 6px 0 6px;
}

.result-meta{
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .3px;
  margin-bottom: 12px;
}

.result-image{
  width: 170px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 auto 12px;
  display: block;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.result-desc{
  margin: 0 auto;
  max-width: 34ch;
  line-height: 1.5;
  font-size: 14px;
  color: #cfd3ff;
}


#resultCard.win{
  border-color: rgba(80,200,120,.28);
}

#resultCard.lose{
  border-color: rgba(255,170,80,.28);
}


#resultCard.show-pop{
  animation: pop .32s ease;
}

@keyframes pop{
  from{ transform: scale(.98); opacity: .6; }
  to{ transform: scale(1); opacity: 1; }
}


#resultCard .final-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.result-head{
  width: 100%;
  justify-content: center;
}

.result-desc{
  width: 100%;
  max-width: 34ch;
  margin: 0 auto;
  text-align: center;
}


.site-footer{
  margin: 18px auto 6px;
  padding: 10px 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .2px;
}



.footer-link{
  color: var(--text);
  opacity: .9;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding-bottom: 1px;
}

.footer-link:hover{
  opacity: 1;
  border-bottom-color: rgba(108,114,255,0.55);
}

.footer-sep{ opacity: .6; }
.footer-note{ opacity: .9; }


.credits-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.credit-item{
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.credit-title{
  font-weight: 700;
  letter-spacing: .2px;
  margin-bottom: 4px;
}

.credit-sub{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.credit-link{
  color: var(--text);
  opacity: .9;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.credit-link:hover{
  border-bottom-color: rgba(108,114,255,0.55);
  opacity: 1;
}

.credit-box{
  margin: 12px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.credit-label{
  font-size: 12px;
  letter-spacing: .3px;
  color: var(--muted);
  margin-bottom: 6px;
}

.credit-text{
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
}

.credit-text a{
  color: var(--text);
  opacity: .9;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.credit-text a:hover{
  opacity: 1;
  border-bottom-color: rgba(108,114,255,0.55);
}

@media (max-width: 520px){
  .app{
    max-width: 100%;
    padding: 10px;
  }
}

@media (max-width: 520px){
  .grid{
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

.grid{
  width: 100%;
  aspect-ratio: var(--img-ar, 1 / 1);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0px;
  margin-top: 16px;
}

.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
}


.modal-content{
  max-height: calc(100vh - 24px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}


.modal .modal-close{
  position: fixed !important;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  z-index: 10000;
}

.modal .modal-close{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(20,22,28,0.75);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.seo-text{
  margin-top:60px;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,0.06);

  font-size:13px;
  line-height:1.5;
  color:#7c8597;

  max-width:620px;
  margin-left:auto;
  margin-right:auto;

  text-align:center;
}

/* Footer X icon */
.footer-icon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: var(--card-soft);
  border: 1px solid var(--border);
  color: var(--text);

  opacity: .9;
  text-decoration: none;

  transition: transform .12s ease, background .12s ease, border-color .12s ease, opacity .12s ease;
}

.footer-icon:hover{
  transform: translateY(-1px);
  background: rgba(108,114,255,0.12);
  border-color: rgba(108,114,255,0.35);
  opacity: 1;
}

.footer-icon:active{
  transform: translateY(0);
}

@media (max-width: 520px){
  .site-footer{
    flex-wrap: wrap;
    row-gap: 8px;
  }
}

.site-footer{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  text-align:center;
}


.controls{
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 10;
}

.controls #guess{
  width: 100%;
  box-sizing: border-box;
}

.controls #suggestions{
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
}

.controls-actions{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.controls-actions .btn{
  width: 100%;
  justify-content: center;
}

.btn-ghost{
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 6px 16px rgba(255,255,255,0.06);
}

.btn-ghost:hover{
  border-color: rgba(108,114,255,0.10);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255,255,255,0.06);
}

.btn-danger{
  background: rgba(255, 90, 90, 0.18);
  border: 1px solid rgba(255, 90, 90, 0.22);
  color: #ffd6d6;
  box-shadow: 0 6px 16px rgba(255, 90, 90, 0.18);
}

.btn-danger:hover{
  background: rgba(255, 90, 90, 0.28);
  border-color: rgba(255, 90, 90, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255, 90, 90, 0.28);
}

#submit.btn:hover {
  background: #6366f1;
  border-color: #6366f1;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px #6366f1;
}

.btn:disabled:hover{
  transform: none !important;
}

input:disabled{
  cursor: not-allowed;
  opacity: 0.75;
}


button:disabled,
.btn:disabled{
  cursor: not-allowed !important;
  opacity: 0.55;
  transform: none !important;
  box-shadow: none !important;
  filter: saturate(0.9);
}

.btn{
  position: relative;
}

.btn:disabled:hover::after{
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 14px;
  opacity: 0.9;
  pointer-events: none;
}

@keyframes tilePulse{
  0%{ transform:scale(1);}
  50%{ transform:scale(1.03);}
  100%{ transform:scale(1);}
}

.cell.can-reveal{
  animation: tilePulse 1.8s infinite;
}

.attempt-bar{
  margin: 14px auto 10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}

.attempt-pips{
  display:grid;
  grid-template-columns: repeat(6, 14px);
  gap:8px;
}

.pip{
  width:14px;
  height:14px;
  border-radius:6px;                /* cuadradito suave */
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
}

.pip.used{
  background: rgba(108,114,255,0.55);
  border-color: rgba(108,114,255,0.35);
}

.pip.used.warn{
  background: rgba(255, 190, 90, 0.45);
  border-color: rgba(255, 190, 90, 0.30);
}

.pip.used.danger{
  background: rgba(255, 90, 90, 0.35);
  border-color: rgba(255, 90, 90, 0.25);
}

.attempt-label{
  font-size: 12px;
  color: rgba(255,255,255,0.60);
}

.more-link{
  white-space: nowrap;
  margin-left: 6px;
  color: #8b93ff;
  text-decoration: none;
  font-weight: 500;
}

.more-link:hover{
  text-decoration: underline;
}

.puzzle-number{
  text-align:center;
  font-size:12px;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:6px;
}

/********** PUZZLES ****************/

.archive-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.archive-cell{
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  letter-spacing: .4px;
  cursor:pointer;
  user-select:none;
  position:relative;
  background: rgba(255,255,255,0.06);
}

.archive-cell:hover{
  transform: translateY(-1px);
}

.archive-cell.status-none{ background: rgba(255,255,255,0.06); }
.archive-cell.status-progress{ background: rgba(255, 200, 80, 0.18); border-color: rgba(255, 200, 80, 0.25); }
.archive-cell.status-win{ background: rgba(80, 200, 120, 0.18); border-color: rgba(80, 200, 120, 0.25); }
.archive-cell.status-lose{ background: rgba(255, 90, 90, 0.18); border-color: rgba(255, 90, 90, 0.25); }


.archive-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.archive-cell{
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  letter-spacing: .6px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  position: relative;
}

.archive-cell::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:12px;
  outline:1px solid rgba(255,255,255,0.10);
  outline-offset:-1px;
  pointer-events:none;
}

.archive-cell:hover{
  transform: translateY(-1px);
}

.archive-cell.status-none{ background: rgba(255,255,255,0.06); }

.archive-cell.status-progress{
  background: rgba(255, 200, 80, 0.16);
  border-color: rgba(255, 200, 80, 0.22);
}

.archive-cell.status-win{
  background: rgba(80, 200, 120, 0.16);
  border-color: rgba(80, 200, 120, 0.22);
}

.archive-cell.status-lose{
  background: rgba(255, 90, 90, 0.16);
  border-color: rgba(255, 90, 90, 0.22);
}

.archive-cell-text{
  font-size: 18px;
}

.btn-daily{
  background: linear-gradient(135deg, #ff7a18, #ffb347);
  color:#111;
  font-weight:600;
  border:none;
  text-decoration:none;

  box-shadow:
    0 6px 18px rgba(255,140,50,.25);

  transition: all .18s ease;
}

.btn-daily:hover{
  transform: translateY(-1px);
  box-shadow:
    0 10px 26px rgba(255,140,50,.35);
}

.btn-daily{
  height:34px;
  padding:0 16px;

  display:flex;
  align-items:center;
  justify-content:center;

  text-decoration:none; /* mata el subrayado */
}

.modal-result{
  display:flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
}

.modal-result-image{
  width: 150px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.modal-result-name{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .3px;
}

/* FIX: no scrollbar dentro del modal */
.modal{
  overflow-y: auto; 
  -webkit-overflow-scrolling: touch;
  padding: 24px 16px;
  align-items: flex-start;
}

.modal-content{
  max-height: none !important;
  overflow: visible !important;
  margin: 0 auto;
}

.modal{
  scrollbar-width: none;
}
.modal::-webkit-scrollbar{
  width: 0;
  height: 0;
}

#introModal .modal-content{
  text-align: center;
}

#introPlayBtn{
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}

.modal-subtitle{
  margin: 10px 0 34px;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;      /* ← CENTRADO vertical */
  justify-content: center;  /* ← CENTRADO horizontal */
  padding: 24px 16px;
  overflow-y: auto;         /* permite scroll si no cabe */
}