/* Sudoku Lanterns: the game screen (top bar, panda, board, tools, number pad, hint card). */
#game {
  justify-content: flex-start;
  padding-top: calc(3.5 * var(--u) + var(--sat));
}
.top {
  width: calc(93 * var(--u));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  position: relative;
  z-index: 3;
}
.pair {
  display: flex;
  gap: calc(2.2 * var(--u));
}
@media (orientation: landscape) {
  .top > .ib:first-child {
    margin-right: calc(12.8 * var(--u));
  }
}
.pill {
  --nine: pill;
  --slice: 76 104 76 104;
  background-color: #20245e;
  background-blend-mode: screen;
  border-radius: calc(5 * var(--u));
  min-width: calc(45 * var(--u));
  height: calc(9.4 * var(--u));
  padding: 0 calc(4.4 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(3.4 * var(--u));
  font-size: calc(4.5 * var(--u));
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill span {
  translate: 0 var(--cap);
}
#g-time {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.no-timer #g-time,
.lesson #g-time {
  display: none;
}
.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(2.2 * var(--u));
  padding-bottom: calc(1.5 * var(--u));
}
.board-wrap {
  position: relative;
  width: var(--b);
  height: var(--b);
  margin-top: calc(var(--peek) - 6 * var(--u));
  flex: none;
}
.peek {
  position: absolute;
  z-index: 2;
  left: calc((var(--b) - var(--peek) * 1.915) / 2 - var(--b) * 0.02);
  bottom: calc(100% - var(--b) * 0.03);
  width: calc(var(--peek) * 1.915);
  height: calc(var(--peek) * 1.4);
  overflow: hidden;
  pointer-events: none;
}
#peek {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--peek);
}
.board {
  --nine: board;
  --slice: 36 36 36 36;
  --edge: 4;
  filter: drop-shadow(0 0 calc(var(--b) * 0.018) rgba(120, 130, 255, 0.45));
  --pad: calc(var(--b) * 0.034);
  --gap: calc(var(--b) * 0.019);
  --third: calc((var(--b) - 2 * var(--pad) - 2 * var(--gap)) / 3);
  position: relative;
  width: 100%;
  height: 100%;
  padding: var(--pad);
  display: grid;
  grid-template: repeat(3, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
/* the four bright lines between the boxes */
.ln {
  position: absolute;
  z-index: 1;
  border-radius: calc(var(--b) * 0.004);
  background: rgba(238, 241, 255, 0.95);
  pointer-events: none;
}
.ln.v {
  top: var(--pad);
  bottom: var(--pad);
  width: calc(var(--b) * 0.011);
  left: calc(var(--pad) + var(--third) * var(--n) + var(--gap) * (var(--n) - 0.5) - var(--b) * 0.0055);
}
.ln.h {
  left: var(--pad);
  right: var(--pad);
  height: calc(var(--b) * 0.011);
  top: calc(var(--pad) + var(--third) * var(--n) + var(--gap) * (var(--n) - 0.5) - var(--b) * 0.0055);
}
.box {
  position: relative;
  display: grid;
  grid-template: repeat(3, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr));
  gap: calc(var(--b) * 0.0058);
  border-radius: calc(var(--b) * 0.008);
}
/* a finished box stays lit like a paper lantern */
.box::after {
  content: '';
  position: absolute;
  inset: calc(var(--b) * -0.001);
  z-index: 2;
  border-radius: calc(var(--b) * 0.012);
  box-shadow:
    inset 0 0 0 calc(var(--b) * 0.0075) var(--gold),
    0 0 calc(var(--b) * 0.04) rgba(255, 170, 40, 0.95),
    inset 0 0 calc(var(--b) * 0.025) rgba(255, 170, 40, 0.3);
  opacity: 0;
  transition: opacity 0.5s ease-out;
  pointer-events: none;
}
.box.lit::after {
  opacity: 1;
}
.cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-radius: 7%;
  background: url(../assets/ui/tile.webp) center / 240% 240% no-repeat;
  color: var(--gold);
  font-size: calc(var(--b) * 0.078);
  font-weight: 600;
  line-height: 1;
  display: grid;
  place-items: center;
}
.cell::before,
.cell::after {
  content: '';
  position: absolute;
  pointer-events: none;
  opacity: 0;
}
.cell::before {
  inset: 0;
  border-radius: inherit;
  background: url(../assets/ui/tile-gold.webp) center / 240% 240% no-repeat;
  filter: saturate(1.7) hue-rotate(-10deg) brightness(0.9);
  transition: opacity 0.5s ease-out;
}
.cell::after {
  inset: -5%;
  z-index: 3;
  background: center / 100% 100% no-repeat;
}
.cell .d,
.cell .nt {
  position: relative;
  z-index: 1;
}
.cell .d {
  translate: 0 var(--cap);
}
.cell.given {
  color: var(--ink);
}
.box.lit .cell {
  color: var(--gold);
}
.box.lit .cell::before {
  opacity: 0;
}
.cell.peer,
.cell.sel,
.cell.ht {
  background-image:
    linear-gradient(rgba(206, 196, 214, 0.12), rgba(206, 196, 214, 0.12)), url(../assets/ui/tile-peer.webp);
}
.cell.same {
  background-image: linear-gradient(rgba(34, 30, 92, 0.26), rgba(34, 30, 92, 0.26)), url(../assets/ui/tile-same.webp);
}
.cell.sel,
.cell.ht {
  z-index: 2;
  box-shadow: 0 0 calc(var(--b) * 0.03) rgba(255, 180, 50, 0.85);
}
.cell.sel::after,
.cell.ht::after {
  background-image: url(../assets/ui/ring-amber.webp);
  opacity: 1;
}
.cell.wrong {
  color: #ffd9e0;
  background-image:
    linear-gradient(rgba(255, 110, 140, 0.4), rgba(255, 110, 140, 0.4)), url(../assets/ui/tile-wrong.webp);
}
.cell.wrong::after {
  background-image: url(../assets/ui/ring-amber.webp);
  filter: hue-rotate(-62deg) saturate(1.25) brightness(1.12);
  opacity: 1;
}
.cell.wrong.sel {
  box-shadow: 0 0 calc(var(--b) * 0.03) rgba(255, 110, 150, 0.85);
}
.cell.hu {
  background-image: linear-gradient(rgba(22, 28, 80, 0.3), rgba(22, 28, 80, 0.3)), url(../assets/ui/tile-hint.webp);
}
/* lesson: the row and the column a number already on the board blocks */
.cell.hb {
  background-image:
    linear-gradient(rgba(196, 160, 255, 0.34), rgba(196, 160, 255, 0.34)), url(../assets/ui/tile-peer.webp);
}
.cell.hc::after {
  background-image: url(../assets/ui/ring-mint.webp);
  opacity: 1;
}
.cell.hk::after {
  background-image: url(../assets/ui/ring-mint.webp);
  filter: hue-rotate(105deg) saturate(1.2) brightness(1.15);
  opacity: 1;
}
.cell .d.pop {
  animation: pop 0.3s var(--spring);
}
.cell.wave::before {
  animation: wave-glow 0.62s ease-out both;
  animation-delay: inherit;
}
.cell.wave .d {
  animation: wave-digit 0.62s ease-out both;
  animation-delay: inherit;
}
.cell.shake {
  animation: shake 0.3s ease-out;
}
@keyframes pop {
  from {
    scale: 1.6;
    opacity: 0.4;
  }
}
@keyframes wave-glow {
  30% {
    opacity: 0.88;
  }
}
@keyframes wave-digit {
  30% {
    scale: 1.22;
    color: #fff;
    text-shadow: 0 0 calc(var(--b) * 0.012) rgba(120, 60, 0, 0.9);
  }
}
@keyframes shake {
  25% {
    translate: -7% 0;
  }
  50% {
    translate: 7% 0;
  }
  75% {
    translate: -3% 0;
  }
}
.calm .cell.wave::before,
.calm .cell.wave .d,
.calm .cell.shake,
.calm .cell .d.pop {
  animation-duration: 1ms;
}
.nt {
  position: absolute !important;
  inset: 3%;
  display: grid;
  grid-template: repeat(3, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr));
  place-items: center;
  font-size: calc(var(--b) * 0.0365);
  font-weight: 600;
  color: #e6ebff;
  pointer-events: none;
}
.nt i {
  font-style: normal;
  line-height: 1;
}
.hinting .nt,
.lesson .nt {
  font-size: calc(var(--b) * 0.041);
}
.nt i.hit {
  color: var(--gold);
  font-weight: 700;
}
.nt i.k {
  color: var(--mint);
  font-weight: 700;
}
.nt i.gone {
  color: var(--pink);
  font-weight: 700;
  text-decoration: line-through;
}
.veil {
  position: absolute;
  inset: calc(var(--b) * 0.012);
  z-index: 4;
  display: none;
  place-items: center;
  border-radius: calc(var(--b) * 0.03);
  background: #12154a;
  font-size: 0;
}
.paused .cell .d,
.paused .cell .nt {
  visibility: hidden;
}
.paused .cell {
  background-image: url(../assets/ui/tile.webp) !important;
  box-shadow: none !important;
}
.paused .cell::after,
.paused .box::after {
  opacity: 0 !important;
}
/* End of css/03-game.css (complete file). */
