/* Otter Flow — panels: always centred on both axes (pins anchored "cc"), opened without rebuilding the DOM. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
}
.modal.open {
  display: block;
}
/* fade only when a panel opens over the game; going settings <-> language swaps instantly (nothing blinks) */
.modal.open.fade {
  animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.veil {
  position: absolute;
  inset: 0;
  background: rgba(3, 12, 22, 0.5);
}
.ttl > span {
  font-size: 1em;
}
.cap {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

/* straight ribbons (art 7.2:1, contained by width: never stretched). Text on the smooth band: 14%..86% of the width,
   12%..72% of the art height; the font follows the art size (--rh = art height). */
.ribbon {
  background: center / contain no-repeat;
  --rh: calc(var(--wpx) / 7.2);
}
.ribbon.flat.gold {
  background-image: url(../assets/img/ribbon-flat-gold.webp);
}
.ribbon.flat.cyan {
  background-image: url(../assets/img/ribbon-flat-cyan.webp);
}
.ribbon.flat > span {
  position: absolute;
  left: 14%;
  right: 14%;
  top: calc(50% - var(--rh) * 0.44);
  height: calc(var(--rh) * 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: calc(var(--rh) * 0.44);
}

.stats {
  display: flex;
  align-items: center;
  justify-content: center;
}
.par-chip > span {
  font-size: 1em;
}
.win-star {
  z-index: 7;
}
.win-star.off {
  background-image: url(../assets/img/star-empty.webp);
}

/* sound rows */
.row-ic {
  background: center / contain no-repeat;
  aspect-ratio: 1;
  width: auto !important;
}
.ic-music {
  background-image: url(../assets/img/ic-music-round.webp);
}
.ic-sound {
  background-image: url(../assets/img/ic-sound.webp);
}
.ic-vibe {
  background-image: url(../assets/img/ic-vibe.webp);
}
.ic-motion {
  background-image: url(../assets/img/ic-motion.webp);
}
.ic-full {
  background-image: url(../assets/img/ic-full.webp);
}
.ic-lang {
  background-image: url(../assets/img/ic-lang.webp);
}
.row-lbl {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
}

/* slider: track, fill and knob are three pieces of art; the real range input sits on top for touch and keyboard */
.slider {
  --v: 0.65;
  border-style: solid;
  border-color: transparent;
  border-width: 0 calc(var(--hpx) / 2);
  border-image: url(../assets/img/track.webp) 0 59 fill / 0 calc(var(--hpx) / 2) stretch;
}
.slider > .sl-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--hpx) / -2);
  width: calc((100% + var(--hpx)) * var(--v));
  border-radius: 99px;
  background: url(../assets/img/track-fill.webp) left center / auto 100% no-repeat;
  overflow: hidden;
}
.slider > .sl-knob {
  position: absolute;
  top: 50%;
  height: 220%;
  aspect-ratio: 1;
  left: calc((100% + var(--hpx)) * var(--v) - var(--hpx) / 2);
  transform: translate(-50%, -50%);
  background: center / contain no-repeat url(../assets/img/thumb.webp);
  pointer-events: none;
}
.slider > input {
  position: absolute;
  left: calc(var(--hpx) / -2);
  right: calc(var(--hpx) / -2);
  top: -120%;
  bottom: -120%;
  width: calc(100% + var(--hpx));
  height: 340%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* toggle: on/off art, label on the empty side of the track */
.toggle {
  aspect-ratio: 2.07;
  width: auto !important;
  background: center / contain no-repeat url(../assets/img/toggle-off.webp);
}
.toggle[aria-checked='true'] {
  background-image: url(../assets/img/toggle-on.webp);
}
.toggle > span {
  position: absolute;
  top: 20%;
  bottom: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  --o: 0.13em;
}
.toggle > .tg-on {
  left: 11%;
  width: 44%;
  display: none;
}
.toggle > .tg-off {
  right: 11%;
  width: 44%;
}
.toggle[aria-checked='true'] > .tg-on {
  display: flex;
}
.toggle[aria-checked='true'] > .tg-off {
  display: none;
}
.pill.small > span {
  font-size: 1em;
}
/* settings rows re-spread when a row is hidden (no vibration / no fullscreen on iPhone): --dy set by ui.js */
.set-row > .pin {
  translate: 0 var(--dy, 0px);
}

/* language list: each language written in its own script */
.lang-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max(40px, calc((var(--hpx) - var(--u) * 110px) / 7));
  gap: calc(var(--u) * 14px) calc(var(--u) * 18px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: calc(var(--u) * 6px);
  scrollbar-width: thin;
  scrollbar-color: #f2b544 transparent;
}
.lang-btn {
  position: relative;
  overflow: visible;
  --hpx: calc(var(--H) * var(--u) * 0.01px * 5.7);
  font-size: calc(var(--u) * 38px);
}
.land .lang-btn {
  --hpx: calc(var(--H) * var(--u) * 0.01px * 7.2);
  font-size: calc(var(--u) * 34px);
}
.lang-btn::after {
  inset: 0;
}
.lang-btn.active {
  filter: drop-shadow(0 0 calc(var(--u) * 5px) #ffd76a);
}
.lang-btn.active > span {
  color: #ffe08a;
}
/* End of css/panels.css (complete file). */
