/* ========================= */
/*       COMMON STYLES       */
/* ========================= */

 .hero-buttons {
  display: flex;
  flex-direction: row;
  box-sizing: border-box;
} 

.landing {
  height: 100%;
}

/* Tile-hero variant (the only hero button style now) */
.hero-btn {
  flex: 0 0 auto; /* allow shrinking */
  min-width: 0;   /* override intrinsic minimum width */
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;   /* restore original */
  justify-content: center;
  text-decoration: none;
  /* transition: transform 0.12s ease, background 0.15s ease; */
}
/* ========================= */
/* END HERO BUTTON STYLES    */
/* ========================= */

/* ========================= */
/* START TILE STYLES         */
/* ========================= */

/* BASE — tight tile grid, no outline */
.tile-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-content: center;
  padding: 0;
  outline: none;
  background: transparent;
  background: var(--panel);
}

.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  min-width: 0; /* allow shrinking */
  min-height: 0; /* allow shrinking */
  overflow: hidden;
  background: var(--button);
  color: var(--text);
}

.howto-panel.show {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
  pointer-events: auto;
}

.tile-grid {
  position: relative;
  overflow: hidden;
}

/* Panel hidden by default */
.howto-panel {
    position: absolute;
    inset: 0;
    padding: 1rem;
    background: var(--panel);
    border-radius: 16px;
    font-size: var(--std-font-size);
    line-height: 1.45;
    text-align: left;
    opacity: 0;
    transform: translateY(40px) rotateX(90deg);
    transition: transform 0.35s ease, opacity 0.35s ease;
    overflow-wrap: break-word;
    pointer-events: none; /* optional but recommended */
}

/* ================================================== */
/*                       LANDSCAPE-A                  */

  /* scale off vh */
  .LANDSCAPE .tile { 
    width: 7vh; 
    height: 7vh;
    font-size: 4vh;
    border: 0.5vh solid var(--line);
    border-radius: 1vh;
  }

  .LANDSCAPE .tile-grid {
    padding: 1vh;
    outline: 0.8vh solid var(--line);
    border-radius: 1.5vh;
    background: var(--panel);
  }

  .LANDSCAPE .tile-row {
    gap: 1vh;
    padding: 0;
    background: transparent;
  }

  .LANDSCAPE .hero-btn { 
    padding: 1vh;
    margin: 2.5vh 0.1vh;  /* t r b l */
  }

  .LANDSCAPE .hero-buttons { 
    gap: 2vh;
    width: 100%;
    height: 100%;
    padding: 1vh 2vh;   /* t r b l */
    justify-content: center; 
  }

.LANDSCAPE .reveal:hover .tile-row {
    opacity: 0;
    transform: translateY(-40px) rotateX(90deg);
  }

.LANDSCAPE .reveal:hover .howto-panel {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }  

/* PORTRAIT */
  .PORTRAIT .landing {
      /* central square */
      width: 100vw;
      height: 100vw;
      margin: 0 auto;
      min-height: 0; /* allow shrinking */
      display: flex;
      justify-content: center;
      align-items: center;
  }

  .PORTRAIT .hero-btn {
    padding: 1vw;
    margin: 2.5vw 0.1vw;  /* t r b l */
    scroll-snap-align: center;
    box-sizing: border-box;
    flex: 0 0 100%;
  }

  .PORTRAIT .hero-buttons {
    gap: 4vw;
    padding: 4vw;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    justify-content: flex-start;
    align-items: stretch; 
    width: 100%;
    height: 100%;
    margin: 0;
    scroll-padding-left: 4vw;
    scroll-padding-right: 4vw;
    touch-action: pan-x; /* allow horizontal scrolling */
  }
/* stylelint-disable no-descending-specificity */
 .PORTRAIT .tile-row {
    gap: 0.7vw;
  }
/* stylelint-enable no-descending-specificity */  

  .PORTRAIT .tile-grid {
    padding: 1vw;
    outline: 1vw solid var(--line);
    border-radius: 1vw;
    background: var(--panel);
    position: relative;     /* allow absolute children */
    overflow: hidden;       /* clip the panel */
  }

  .PORTRAIT .tile {
    width: calc(100vw / 7);
    height: calc(100vw / 7);
    font-size: calc(100vw / 10);
    border: 0.6vw solid var(--line);
    border-radius: 1vw; 
  }

  .PORTRAIT .howto-panel.show {
    transform: translateY(0) rotateX(0deg) !important;
  }


.tile.special {
  border-color: var(--highlight1);
}

/* ========================= */
/* END TILE STYLES           */
/* ========================= */
/* Hidden checkbox */

