/* The housing and key edges are photographic slices of the approved switch. */
#portada {
  --cover-width: min(100%, calc(80vh - 89px), 860px);
}
@supports (height: 100svh) {
  #portada { --cover-width: min(100%, calc(80svh - 89px), 860px); }
}
#portada .hero-stack {
  background: var(--mural) center top / 100% 91% no-repeat, #c3a177;
}
#portada .hero-stack > .mast {
  padding: 7px 0 4px;
  background: transparent;
  box-shadow: none;
}
#portada .salon-palmeras {
  background: var(--wood-top) center bottom / 100% 10% no-repeat;
}
#portada .mast .table-select {
  position: relative;
  isolation: isolate;
  --case-height: 2.6rem;
  width: min(9.25rem, 43.5%);
  height: var(--case-height);
  margin: 0 auto;
  min-height: 0;
  display: block;
  filter: drop-shadow(0 1px .5px #3d200a66) drop-shadow(1px 2px 1.5px #42230d55);
}
#portada .mast .table-select::before {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  transform: none;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: url("edicion-assets/portada/selector-esmalte.webp") center / 100% 100% no-repeat;
  clip-path: polygon(0.4% 74%, 2% 23%, 2.7% 16%, 4% 9%, 5.5% 5%, 8.2% 1%, 11% .3%, 89.7% .3%, 93% 1.6%, 95.3% 5.8%, 97% 14%, 98% 23%, 99.5% 73%, 99.5% 82%, 98.7% 91%, 97% 96%, 94.2% 99%, 5.7% 99%, 3% 96.5%, 1.2% 90%, .4% 81%);
}
#portada .teclado {
  position: absolute;
  inset: 16.3% 9.3% 20.4% 9.5%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: .5px;
  border-radius: 3px / 3.5px;
  background: linear-gradient(#281604 0%, #120c04 20%, #2f1d0a);
  box-shadow: 0 1px 1px #e1b87266, 0 0 1px 1px #542d0d;
}
#portada .mast .table-select label[for] {
  --dip: 0px;
  --latched: 0;
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  justify-items: center;
  min-width: 0;
  /* Enlarge the hit box around the key without enlarging its printed face. */
  --face-inset: max(0px, calc((44px - var(--case-height) * .633) / 2));
  align-self: center;
  height: max(100%, 44px);
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  outline: 0;
  border-radius: 2.5px;
  color: #321c0c;
  background: transparent;
  text-decoration: none !important;
  font: 500 clamp(.78rem, 1.3vw, .88rem)/1 Georgia, 'Times New Roman', serif;
  letter-spacing: -.045em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
#portada .teclado label::before,
#portada .teclado label::after {
  content: '';
  position: absolute;
  inset: var(--face-inset) 0;
  z-index: -1;
  border: solid transparent;
  border-width: 0 .43rem;
  border-radius: 2.5px;
  clip-path: inset(0 round 2.5px);
  pointer-events: none;
  transition: top 135ms cubic-bezier(.2,.7,.25,1), opacity 100ms ease;
}
#portada .teclado label::before {
  top: calc(var(--face-inset) + var(--dip));
  opacity: calc(1 - var(--latched));
  border-image: url("edicion-assets/portada/tecla-alta.webp") 0 46 0 44 fill / 0 .43rem stretch;
}
#portada .teclado label::after {
  top: calc(var(--face-inset) + var(--dip));
  opacity: var(--latched);
  border-image: url("edicion-assets/portada/tecla-hundida.webp") 0 69 0 70 fill / 0 .65rem stretch;
}
#portada .teclado .nombre-mes {
  transform: translateY(calc(-.115rem + var(--dip) * .8));
  text-shadow: 0 1px #fff1ca88;
  transition: transform 135ms cubic-bezier(.2,.7,.25,1);
}
#mes-dic:checked ~ #portada:not(.changing-edition) label[for="mes-dic"],
#mes-ene:checked ~ #portada:not(.changing-edition) label[for="mes-ene"],
#portada.changing-edition .teclado label.next-edition {
  --dip: .255rem;
  --latched: 1;
}
#mes-dic:focus-visible ~ #portada .teclado label[for="mes-dic"],
#mes-ene:focus-visible ~ #portada .teclado label[for="mes-ene"] {
  outline: 2px solid #fff6d7;
  outline-offset: 2px;
  z-index: 1;
  box-shadow: 0 0 0 4px #432a11;
}
@media (max-width: 600px) {
  #portada .mast .table-select { --case-height: 2.35rem; width: min(8.25rem, 44%); }
}
@media (prefers-reduced-motion: reduce) {
  #portada .teclado label::before, #portada .teclado label::after,
  #portada .teclado .nombre-mes { transition: none; }
}
@media (forced-colors: active) {
  #portada .mast .table-select { filter: none; }
  #portada .teclado label[for] { border: 1px solid ButtonText; }
  #mes-dic:checked ~ #portada .teclado label[for="mes-dic"],
  #mes-ene:checked ~ #portada .teclado label[for="mes-ene"] { outline: 3px solid Highlight; }
}
