/* Página de Keebi: el escritorio de prueba, las notas del día, los minijuegos y las preguntas.
   .game-main es la base de cualquier página de juego; .game-theme-keebi le pone los colores de Keebi. */

.game-main {
  --table-light: #f0cda0;
  --muted-ink: #624332;
  --accent: var(--green);
  --accent-dark: #254739;
  position: relative;
  isolation: isolate;
  overflow: clip;
  color: var(--ink);
}

.game-table {
  position: absolute;
  z-index: -1;
  inset: clamp(430px, 49vw, 615px) -12% -110px;
  border-radius: 50% 50% 0 0 / 130px 130px 0 0;
  background: repeating-linear-gradient(5deg, #a86a421f 0 1px, transparent 2px 39px, #a86a4214 40px 41px), linear-gradient(166deg, #edbc8d, var(--table-light) 51%, #efc599);
  box-shadow: inset 0 7px 0 #eab5857c, 0 -5px 20px #9c6a4828;
}

.game-main h2 {
  font-size: clamp(1.95rem, 3.3vw, 3.3rem);
  line-height: 1.08;
  text-wrap: balance;
}

.paper-back,
.game-text-link {
  width: fit-content;
  font-weight: 900;
  color: var(--accent-dark);
  text-underline-offset: 4px;
}

.paper-back:hover,
.paper-back:focus-visible,
.game-text-link {
  text-decoration: underline;
}

.game-text-link:hover,
.game-text-link:focus-visible {
  color: var(--clay);
}

.game-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 50px;
  padding: 10px 18px;
  border: 1px solid var(--accent-dark);
  background: var(--accent);
  color: #fff5e4;
  font-weight: 900;
}

.game-button:hover,
.game-button:focus-visible {
  background: var(--accent-dark);
}

.game-entry {
  display: grid;
  align-items: center;
  padding-block: clamp(45px, 5vw, 78px) clamp(58px, 7.6vw, 110px);
}

.game-intro h1 {
  margin: 12px 0 2px;
  font-size: clamp(4.6rem, 9.5vw, 8.8rem);
  line-height: .99;
  color: var(--game-ink, var(--ink));
  overflow-wrap: anywhere;
}

.game-intro .game-tagline {
  max-width: 15ch;
  margin: 8px 0 15px;
  font: 500 clamp(2.05rem, 3.8vw, 3.65rem)/1.04 var(--display);
  letter-spacing: -.045em;
  text-wrap: balance;
}

.game-intro > p {
  max-width: 38ch;
  font-size: clamp(1.02rem, 1.38vw, 1.2rem);
  line-height: 1.54;
}

.game-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 9px;
  list-style: none;
  margin: 17px 0 20px;
  padding: 0;
}

.game-specs li {
  padding: 3px 9px;
  border: 1px solid #a57a5c79;
  font-size: .875rem;
  font-weight: 800;
  line-height: 1.4;
}

.game-preview {
  min-width: 0;
  margin: 0;
  text-align: center;
}

.play-dialog {
  justify-self: start;
  padding: 7px 12px;
  border: 1px solid #af8667;
  box-shadow: 3px 4px 0 #76503c28;
  font-size: clamp(.81rem, 1.15vw, 1rem);
  font-weight: 900;
  line-height: 1.3;
  text-align: left;
}

.play-controls[hidden] {
  display: none;
}

.play-controls {
  position: relative;
  margin: -13px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
}

.play-controls button {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #866247;
  border-radius: 8px;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 900;
  line-height: 1.25;
}

.play-controls button:nth-child(1) {
  transform: rotate(-3deg);
}

.play-controls button:nth-child(2) {
  transform: rotate(1.7deg);
}

.play-controls button:nth-child(3) {
  transform: rotate(3deg);
}

.play-controls button:hover,
.play-controls button:focus-visible {
  transform: translateY(-3px);
}

.play-controls button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff4df;
  transform: none;
}

.play-controls button span {
  margin-right: 2px;
  font-size: 1.05rem;
}

.game-preview figcaption {
  margin-top: 12px;
  color: var(--muted-ink);
  font-size: .86rem;
}

.game-features {
  padding: 18px 0 clamp(55px, 7vw, 93px);
}

.game-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: clamp(15px, 2.2vw, 27px);
  list-style: none;
  margin: 25px 0 0;
  padding: 0;
}

.game-notes li {
  padding: clamp(17px, 2.35vw, 27px);
  transform: rotate(-1.7deg);
}

.game-notes li:nth-child(2) {
  transform: rotate(1.25deg);
}

.game-notes li:nth-child(3) {
  transform: rotate(-.7deg);
}

.game-notes h3 {
  font-size: clamp(1.15rem, 1.85vw, 1.65rem);
  line-height: 1.18;
}

.game-notes p {
  margin-top: 7px;
  line-height: 1.53;
}

.game-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 345px), 1fr));
  align-items: start;
  gap: clamp(18px, 3vw, 43px);
}

.game-sheet {
  padding: clamp(22px, 3.35vw, 47px);
}

.game-sheet:first-child {
  transform: rotate(-1deg);
}

.visit-pets {
  display: flex;
  align-items: end;
  gap: 4px;
  margin-bottom: 14px;
}

.visit-pets img {
  width: min(27%, 105px);
  height: auto;
}

.game-sheet > p {
  margin-top: 12px;
  line-height: 1.57;
}

.game-sheet:nth-child(2) {
  transform: rotate(1deg);
}

.paper-rows {
  margin: 16px 0 0;
}

.paper-rows > div {
  padding: 10px 0;
}

.paper-rows > div + div {
  border-top: 1px dashed #ad825d86;
}

.paper-rows dt {
  font-weight: 900;
}

.paper-rows dd {
  margin: 0;
  color: var(--muted-ink);
  line-height: 1.53;
}

.game-faq {
  display: grid;
  grid-template-columns: minmax(0, .77fr) minmax(0, 1.45fr);
  align-items: start;
  gap: clamp(20px, 5vw, 65px);
  padding-block: clamp(65px, 9vw, 120px);
}

.game-faq .game-text-link {
  display: inline-block;
  margin-top: 12px;
}

.paper-questions {
  border-top: 1px solid #9b704f91;
}

.paper-questions details {
  padding: 10px 7px 11px;
  border-bottom: 1px solid #9b704f91;
}

.paper-questions summary {
  cursor: pointer;
  padding-block: 6px;
  font-weight: 900;
  line-height: 1.4;
}

.paper-questions p {
  margin: 7px 0 0;
  line-height: 1.53;
  color: var(--muted-ink);
}

@media (max-width: 800px) {
  .game-entry,
  .game-panels,
  .game-faq {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-intro h1 {
    margin-top: 7px;
  }

  .game-notes {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 540px) {
  .game-faq {
    padding-block: 59px;
  }
}

.game-showcase {
  min-width: 0;
}

.game-showcase > .game-preview {
  margin-inline: auto;
}

.game-community {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 17px;
  text-align: center;
}

.game-community p {
  flex-basis: 100%;
  color: var(--muted-ink);
  font-size: .95rem;
  line-height: 1.4;
}

.page-game.theme-keebi .site-header {
  background: #fbf8ff;
  border-bottom: 1px solid #dccfee;
}

.page-game.theme-keebi .site-header .nav-support {
  background: #f3e9ff;
  border-color: #ac96cf;
}

.game-theme-keebi {
  --ink: #322542;
  --muted-ink: #514261;
  --game-ink: #49298c;
  --accent: #5a3ba0;
  --accent-dark: #472b83;
  --keebi-line: #5e497c;
  --keebi-mint: #ccecce;
  --keebi-pink: #f6d0e2;
  --keebi-cream: #fff8dd;
  background: radial-gradient(ellipse at 75% 10%, #e5d3ff 0, transparent 52%), radial-gradient(ellipse at 10% 38%, #d5f0e6 0, transparent 46%), #fbf6ff;
}

.game-theme-keebi .game-table {
  display: none;
}

.game-theme-keebi .game-entry {
  grid-template-columns: minmax(0, .69fr) minmax(0, 1.24fr);
  gap: clamp(25px, 4vw, 58px);
}

.game-theme-keebi .game-intro h1 {
  letter-spacing: -.064em;
}

.game-theme-keebi .game-tagline {
  color: var(--ink);
}

.game-theme-keebi .game-specs li {
  background: #fffbff;
  border-color: #c3afd9;
  color: var(--muted-ink);
  border-radius: 6px;
}

.game-theme-keebi .game-specs .game-status {
  background: var(--keebi-mint);
  border-color: #8bb592;
  color: #305745;
}

.game-theme-keebi .game-button {
  border-radius: 8px;
  box-shadow: 4px 4px 0 #baa7dc;
}

.keebi-desktop {
  overflow: hidden;
  border: 2px solid var(--keebi-line);
  border-radius: 17px;
  background: #f8f0ff;
  box-shadow: 7px 8px 0 #b8a5d2, 13px 17px 30px #59407924;
}

.keebi-desktop-bar,
.desk-window-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  font-weight: 900;
}

.keebi-desktop-bar {
  min-height: 41px;
  padding: 7px clamp(10px, 2vw, 19px);
  border-bottom: 1px solid var(--keebi-line);
  background: linear-gradient(90deg, #e7d5fb, #f5e8ff);
  font-size: .9rem;
}

.keebi-desktop-bar > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.keebi-desktop-bar > span:first-child i {
  width: 10px;
  aspect-ratio: 1;
  border: 1px solid #644699;
  border-radius: 3px;
  background: #b595ec;
  transform: rotate(11deg);
}

.keebi-window-dots {
  display: flex;
  gap: 6px;
}

.keebi-window-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9a81b7;
}

.keebi-playfield {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 265px;
  aspect-ratio: 1.66;
  background: radial-gradient(#8d72ae46 1.1px, transparent 1.2px) 0 0 / 18px 18px, radial-gradient(ellipse at 83% 90%, #ead7ff, transparent 78%), linear-gradient(132deg, #d7f1da, #f2efff 62%, #dfcef6);
}

.desk-window {
  position: absolute;
  overflow: hidden;
  border: 1.5px solid var(--keebi-line);
  border-radius: 9px;
  box-shadow: 5px 6px 0 #6b4e9440;
}

.desk-window-title {
  min-height: 29px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--keebi-line);
  font-size: clamp(.7rem, 1vw, .88rem);
  line-height: 1.15;
}

.desk-journal {
  z-index: -1;
  inset: 13% auto auto 7%;
  width: 41%;
  background: #fff9ec;
  transform: rotate(-6deg);
}

.desk-journal .desk-window-title {
  background: var(--keebi-pink);
}

.desk-note {
  display: grid;
  place-items: center;
  min-height: clamp(53px, 9vw, 112px);
  padding: 6px;
  color: #633a65;
  font: 500 clamp(1.05rem, 2.3vw, 1.9rem)/1.2 var(--display);
  background: repeating-linear-gradient(0deg, transparent 0 19px, #a46f9b22 20px 21px);
}

.desk-calendar {
  z-index: -2;
  top: 14%;
  right: 8%;
  width: 35%;
  background: #fff9e3;
  transform: rotate(7deg);
}

.desk-calendar .desk-window-title {
  background: var(--keebi-mint);
}

.desk-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(3px, .65vw, 8px);
  padding: clamp(8px, 1.65vw, 17px);
}

.desk-calendar-grid i {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #eee6f6;
}

.desk-calendar-grid i:nth-child(9) {
  background: #b4ddb9;
  outline: 1px solid #8fbe9c;
}

.desk-calendar-grid i:nth-child(13) {
  background: #f4c8dc;
}

.desk-footprints {
  position: absolute;
  z-index: -1;
  left: 13%;
  bottom: 12%;
  display: flex;
  align-items: center;
  gap: 7px;
  transform: rotate(-19deg);
}

.desk-footprints i {
  display: block;
  width: clamp(15px, 2.2vw, 28px);
  aspect-ratio: 1;
  color: transparent;
  background: radial-gradient(ellipse at 49% 71%, #8d72af82 0 22%, transparent 25%), radial-gradient(circle at 22% 46%, #8d72af82 0 11%, transparent 13%), radial-gradient(circle at 45% 31%, #8d72af82 0 12%, transparent 15%), radial-gradient(circle at 71% 39%, #8d72af82 0 11%, transparent 14%);
}

.desk-footprints i:nth-child(even) {
  transform: translateY(16%);
}

.keebi-dialog {
  position: absolute;
  z-index: 2;
  top: 56%;
  left: 7%;
  max-width: min(43%, 27ch);
  border-color: var(--keebi-line);
  border-radius: 10px 10px 10px 3px;
  background: #fffaed;
  color: var(--ink);
  pointer-events: none;
}

.keebi-token,
.keebi-guest {
  position: absolute;
  display: block;
  width: clamp(91px, 15.3vw, 216px);
  margin: 0;
}

.keebi-token {
  --pet-x: 57%;
  --pet-y: 85%;
  z-index: 3;
  left: var(--pet-x);
  top: var(--pet-y);
  aspect-ratio: 1.06;
  transform: translate(calc(-1 * var(--pet-x)), calc(-1 * var(--pet-y)));
  padding: 0;
  border: 0;
  border-radius: 18%;
  background: transparent;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.keebi-token:disabled {
  cursor: auto;
}

.keebi-token.is-dragging {
  cursor: grabbing;
}

.keebi-token img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(5px 7px 0 #6a537c52);
  pointer-events: none;
}

.keebi-guest {
  right: 6%;
  bottom: 7%;
  width: clamp(78px, 11vw, 151px);
  height: auto;
  filter: drop-shadow(4px 5px 0 #6a537c4d);
}

.keebi-guest[hidden] {
  display: none;
}

.keebi-controls {
  margin-top: 14px;
}

.keebi-controls button {
  border-color: var(--keebi-line);
  box-shadow: 3px 4px 0 #ab95cc;
}

.keebi-controls button:nth-child(1) {
  background: var(--keebi-pink);
}

.keebi-controls button:nth-child(2) {
  background: var(--keebi-cream);
}

.keebi-controls button:nth-child(3) {
  background: var(--keebi-mint);
}

.keebi-controls button[aria-pressed="true"] {
  background: var(--accent);
}

.game-theme-keebi .game-notes li,
.game-theme-keebi .game-sheet {
  border: 1px solid #8a73aa;
  border-radius: 10px;
  box-shadow: 4px 5px 0 #b8a5d2;
}

.game-theme-keebi .game-notes li {
  background: var(--keebi-pink);
}

.game-theme-keebi .game-notes li:nth-child(2) {
  background: var(--keebi-cream);
}

.game-theme-keebi .game-notes li:nth-child(3) {
  background: var(--keebi-mint);
}

.game-theme-keebi .game-sheet:first-child {
  background: #edf8e9;
}

.game-theme-keebi .game-sheet:nth-child(2) {
  background: #fff8df;
}

.game-theme-keebi .paper-questions,
.game-theme-keebi .paper-questions details {
  border-color: #b9a5ce;
}

@media (max-width: 800px) {
  .game-theme-keebi .game-entry {
    grid-template-columns: minmax(0, 1fr);
  }

  .keebi-preview {
    inline-size: min(100%, 545px);
  }
}

@media (max-width: 540px) {
  .keebi-desktop {
    box-shadow: 4px 5px 0 #b8a5d2;
  }

  .keebi-playfield {
    min-height: 235px;
  }

  .keebi-token {
    width: clamp(80px, 25vw, 108px);
  }

  .keebi-dialog {
    padding: 5px 8px;
  }

  .keebi-controls button {
    padding-inline: 9px;
  }
}
