/* Sudoku Lanterns: continues css/01-base.css (same cascade order). */
/* ---- buttons ---- */
.btn,
.ib,
.tool,
.key {
  --slice: 50 64 58 64;
  transition:
    translate 0.34s var(--spring),
    scale 0.34s var(--spring),
    filter 0.12s;
}
.btn {
  --h: calc(12.4 * var(--u));
  height: var(--h);
  padding: 0 calc(5 * var(--u)) calc(var(--h) * 0.06);
  font-size: calc(5.8 * var(--u));
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: 0 calc(0.25 * var(--u)) 0 rgba(20, 10, 60, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.kl {
  margin-right: -0.085em; /* see src/lib/kern.js */
}
.kt {
  white-space: nowrap;
}
.btn > .kt {
  translate: 0 var(--cap);
}
.btn b {
  font-weight: 600;
  translate: 0 var(--cap);
}
.btn small {
  font-size: calc(3.5 * var(--u));
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.95;
}
.btn.two b {
  font-size: calc(5 * var(--u));
  line-height: 1.05;
}
.btn.sm {
  flex: none;
  --h: calc(9.4 * var(--u));
  font-size: calc(3.9 * var(--u));
  padding-left: calc(4.4 * var(--u));
  padding-right: calc(4.4 * var(--u));
  min-width: calc(22 * var(--u));
}
.ib {
  --h: calc(10.6 * var(--u));
  width: var(--h);
  height: var(--h);
  padding-bottom: calc(var(--h) * 0.06);
  display: grid;
  place-items: center;
}
.ib.sm {
  position: relative;
}
.ib.sm::after {
  content: '';
  position: absolute;
  inset: calc(-1.8 * var(--u));
}
.ib.sm {
  --h: calc(8 * var(--u));
}
.ic {
  width: 58%;
  height: 58%;
  object-fit: contain;
  pointer-events: none;
}
.ib.flip .ic {
  scale: -1 1;
}
:is(.btn, .ib, .x, .tool, .key, .item, .rowb, .day)[data-down] {
  transition-duration: 60ms;
  transition-timing-function: ease-out;
  filter: brightness(0.9);
}
:is(.btn, .tool, .key)[data-down] {
  translate: 0 calc(var(--h) * 0.08);
  scale: 0.96 0.91;
}
:is(.ib, .x, .day)[data-down] {
  scale: 0.86;
}
:is(.item, .rowb)[data-down] {
  scale: 0.97;
}
@media (hover: hover) {
  .btn:not(:disabled, [data-down]):hover {
    translate: 0 -4%;
  }
  :is(.ib, .x):not([data-down]):hover {
    scale: 1.06;
  }
}
.calm :is(.btn, .ib, .x, .tool, .key, .item, .rowb, .day) {
  transition-duration: 1ms;
}

/* ---- menu ---- */
#menu {
  justify-content: space-between;
  padding-top: calc(17 * var(--u) + var(--sat));
  padding-bottom: calc(10 * var(--u) + var(--sab));
}
.logo {
  width: calc(84 * var(--u));
  filter: drop-shadow(0 calc(1 * var(--u)) calc(2.4 * var(--u)) rgba(14, 8, 40, 0.45));
  height: auto;
  aspect-ratio: 1100 / 508;
  flex: none;
}
.corner {
  position: absolute;
  top: calc(3.5 * var(--u) + var(--sat));
  right: calc(3.5 * var(--u));
  display: flex;
  gap: calc(2.2 * var(--u));
}
.corner.left {
  right: auto;
  left: calc(3.5 * var(--u));
}
.menu-buttons {
  width: calc(66 * var(--u));
  display: flex;
  flex-direction: column;
  gap: calc(2.6 * var(--u));
}
.menu-buttons .btn:first-of-type,
#btn-play.amber {
  --h: calc(13.6 * var(--u));
  font-size: calc(7.4 * var(--u));
}
.menu-buttons .btn.two:first-of-type b {
  font-size: calc(5.2 * var(--u));
}
.has-save .menu-buttons {
  gap: calc(2.4 * var(--u));
}
.has-save .menu-buttons .btn {
  --h: calc(10.6 * var(--u));
  font-size: calc(5.2 * var(--u));
}
#menu.has-save {
  padding-bottom: calc(9 * var(--u) + var(--sab));
}
.has-save .menu-buttons .btn:first-of-type {
  --h: calc(11.6 * var(--u));
  font-size: calc(5.8 * var(--u));
}
.has-save #btn-play {
  --h: calc(12.6 * var(--u));
  font-size: calc(6.8 * var(--u));
}
#menu .menu-buttons .btn.two {
  --h: calc(14.2 * var(--u));
}
#menu .menu-buttons .btn.two b {
  font-size: calc(4.7 * var(--u));
  line-height: 1.1;
}
#menu .menu-buttons .btn.two small {
  font-size: calc(3.3 * var(--u));
  line-height: 1.15;
}
#menu.has-save .menu-buttons .btn.two {
  --h: calc(12.8 * var(--u));
}
#menu.has-save .menu-buttons .btn.two b {
  font-size: calc(4.4 * var(--u));
}
#menu.has-save .menu-buttons .btn.two small {
  font-size: calc(3.1 * var(--u));
}
.arriving .menu-buttons,
.arriving .corner {
  pointer-events: none;
}
.prestart .menu-buttons,
.prestart .corner {
  visibility: hidden;
}
.tap {
  position: absolute;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: calc(22 * var(--u) + var(--sab));
}
.prestart .tap {
  display: flex;
}
.pilltext {
  --nine: pill;
  --slice: 76 104 76 104;
  height: calc(11 * var(--u));
  padding: 0 calc(7 * var(--u)) calc(0.7 * var(--u));
  display: flex;
  align-items: center;
  font-size: calc(4.6 * var(--u));
  animation: breathe 2.2s ease-in-out infinite;
}
@keyframes breathe {
  50% {
    opacity: 0.6;
    scale: 0.97;
  }
}
@media (orientation: landscape) {
  #menu {
    padding-top: calc(9 * var(--u) + var(--sat));
    padding-bottom: calc(9 * var(--u) + var(--sab));
  }
  #menu.has-save {
    padding-bottom: calc(7 * var(--u) + var(--sab));
  }
  #menu .menu-buttons .btn.two {
    --h: calc(12.8 * var(--u));
  }
  #menu .menu-buttons .btn.two b {
    font-size: calc(4.3 * var(--u));
  }
  #menu .menu-buttons .btn.two small {
    font-size: calc(3 * var(--u));
  }
  #menu.has-save .menu-buttons .btn.two {
    --h: calc(11.8 * var(--u));
  }
  .logo {
    width: calc(66 * var(--u));
  }
  #menu.has-save .logo {
    width: calc(58 * var(--u));
  }
  #menu .logo,
  #menu .menu-buttons,
  #menu .tap .pilltext {
    translate: var(--shift) 0;
  }
  .menu-buttons {
    width: calc(56 * var(--u));
    gap: calc(2.2 * var(--u));
  }
  .btn {
    --h: calc(10.8 * var(--u));
    font-size: calc(4.8 * var(--u));
  }
  .menu-buttons .btn:first-of-type,
  #btn-play.amber {
    --h: calc(12.2 * var(--u));
    font-size: calc(6 * var(--u));
  }
  .tap {
    padding-bottom: calc(16 * var(--u) + var(--sab));
  }
  #app[data-screen='game'] .toast {
    left: calc(50% + 34 * var(--u));
    bottom: auto;
    top: calc(14 * var(--u) + var(--sat));
    max-width: calc(56 * var(--u));
  }
}

/* ---- the tutorial hand: its fingertip sits on the point it shows, and it taps ---- */
.hand {
  position: absolute;
  z-index: 12;
  width: calc(11 * var(--u));
  height: auto;
  translate: -38% -3%;
  transform-origin: 38% 3%; /* the fingertip: the hand shrinks and turns around it */
  pointer-events: none;
  filter: drop-shadow(0 calc(0.8 * var(--u)) calc(1.2 * var(--u)) rgba(10, 6, 34, 0.55));
  transition:
    left 0.45s cubic-bezier(0.2, 0.9, 0.3, 1),
    top 0.45s cubic-bezier(0.2, 0.9, 0.3, 1);
  animation: hand-tap 1.15s ease-in-out infinite;
}
@keyframes hand-tap {
  0%,
  100% {
    transform: translateY(8%);
  }
  45% {
    transform: translateY(0) scale(0.95);
  }
}
.calm .hand {
  animation: none;
  transition: none;
}
#app[data-panel] .hand {
  display: none;
}

/* ---- toast and effects ---- */
.toast {
  position: absolute;
  z-index: 30;
  left: 50%;
  translate: -50% 0;
  bottom: calc(4 * var(--u) + var(--sab));
  max-width: calc(90 * var(--u));
  width: max-content;
  padding: calc(2.2 * var(--u)) calc(4.4 * var(--u));
  border-radius: calc(4 * var(--u));
  background: rgba(19, 22, 62, 0.96);
  box-shadow: inset 0 0 0 calc(0.4 * var(--u)) var(--gold);
  font-size: calc(3.6 * var(--u));
  font-weight: 400;
  text-align: center;
  pointer-events: none;
}
#app[data-panel] .toast {
  display: none;
}
@media (orientation: portrait) {
  /* with the hint card open the bottom belongs to the card and its buttons: the message goes under the top bar */
  #game.hinting ~ .toast {
    bottom: auto;
    top: calc(14.5 * var(--u) + var(--sat));
    padding-top: calc(1.4 * var(--u));
    padding-bottom: calc(1.4 * var(--u));
  }
}
.fx {
  position: absolute;
  inset: 0;
  z-index: 15;
  overflow: hidden;
  pointer-events: none;
}
.fx.back {
  z-index: 0;
}
.fx img {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform, opacity;
}

/* Art that only shows in a state (highlights, toggles): loaded up front so the first use never blinks. */
#app::after {
  content: url(../assets/ui/tile-peer.webp) url(../assets/ui/tile-same.webp) url(../assets/ui/tile-hint.webp)
    url(../assets/ui/tile-wrong.webp) url(../assets/ui/tile-gold.webp) url(../assets/ui/ring-amber.webp)
    url(../assets/ui/ring-mint.webp) url(../assets/ui/toggle-on.webp) url(../assets/ui/toggle-off.webp)
    url(../assets/fx/lantern.webp);
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
/* End of css/02-menu.css (complete file). */
