/* wavelength game styles */

.wl-stage {
  display: grid;
  gap: 18px;
}
.wl-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.wl-head-side {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wl-card {
  padding: clamp(14px, 2.4vw, 22px) clamp(14px, 2.4vw, 26px) clamp(12px, 2vw, 18px);
  display: grid;
  gap: 12px;
}
.wl-lead {
  margin: 0;
  font-weight: 650;
  text-align: center;
}
.wl-hint {
  margin: 0;
  font-weight: 650;
  text-align: center;
}
.wl-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: var(--bw) dashed var(--ink-2);
  border-radius: var(--r-ctl);
  font-weight: 700;
  font-size: 15px;
  animation: fade-up 0.4s var(--ease) both;
}
.wl-note .ic {
  flex: none;
}

/* ---------------------------------------------------------------- dial */

.wl-dial-wrap {
  position: relative;
  width: min(100%, 580px);
  margin-inline: auto;
}
.wl-dial {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.wl-dial.is-live {
  cursor: grab;
  touch-action: none;
}
.wl-dial.is-live.is-dragging {
  cursor: grabbing;
}
.wl-dial:focus {
  outline: none;
}
.wl-dial:focus-visible .wl-face {
  stroke-width: 5;
}
.wl-dial.is-live:focus-visible .wl-knob {
  stroke-width: 4;
}
.wl-face {
  fill: var(--paper-2);
  stroke: var(--line);
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.wl-tick {
  stroke: var(--ink-2);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.45;
}
.wl-tick.major {
  opacity: 0.85;
}

/* scoring bands: strongest in the middle, lighter outward */
.wl-band {
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.wl-b0 {
  fill: var(--accent);
}
.wl-b1 {
  fill: color-mix(in srgb, var(--accent) 72%, var(--paper-2));
}
.wl-b2 {
  fill: color-mix(in srgb, var(--accent) 46%, var(--paper-2));
}
.wl-b3 {
  fill: color-mix(in srgb, var(--accent) 24%, var(--paper-2));
}
.wl-wedge {
  animation: wl-wedge-in 0.55s var(--ease) both;
  transform-origin: 210px 206px;
}
.wl-bl {
  font-family: var(--meme);
  font-size: 15px;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.wl-bl0,
.wl-bl1 {
  fill: var(--accent-ink);
}
.wl-bl2,
.wl-bl3 {
  fill: var(--ink);
}
.wl-target {
  stroke: var(--accent-ink);
  stroke-width: 2;
  stroke-dasharray: 5 5;
  stroke-linecap: round;
  opacity: 0.75;
}

/* needles */
.wl-needle {
  transition: transform 0.16s var(--ease);
}
.wl-needle.dragging {
  transition: none;
}
.wl-needle-line {
  stroke: var(--ink);
  stroke-width: 6;
  stroke-linecap: round;
}
.wl-knob {
  fill: var(--accent);
  stroke: var(--line);
  stroke-width: 2.5;
}
.wl-knob.idle {
  fill: var(--surface);
}
.wl-needle.ghost {
  opacity: 0.4;
}
.wl-hub {
  fill: var(--ink);
  stroke: var(--line);
  stroke-width: 2;
}
.wl-sway {
  opacity: 0.35;
  animation: wl-sway 3.4s ease-in-out infinite alternate;
}
.wl-pin-needle {
  transform: rotate(var(--rot));
  animation: wl-swing 0.9s var(--ease) both;
}
.wl-pin-under {
  stroke: var(--line);
  stroke-width: 7;
  stroke-linecap: round;
}
.wl-pin-line {
  stroke-width: 4;
  stroke-linecap: round;
}
.wl-pin {
  position: absolute;
  z-index: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: wl-pin-in 0.4s var(--ease) both;
}
.wl-pin .av {
  --s: 28px;
  box-shadow: 2px 2px 0 var(--shadow);
}
.wl-pin.me .av {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
}

.wl-ends {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 6px;
}
.wl-end {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 48%;
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.wl-end.r {
  justify-content: flex-end;
  text-align: right;
}
.wl-end .ic {
  color: var(--ink-2);
}
.wl-drag-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  text-align: center;
}

/* ---------------------------------------------------------- clue phase */

.wl-thinking {
  gap: 12px;
}
.wl-thinking span:last-child {
  animation: wl-breathe 1.8s ease-in-out infinite;
}
.wl-clue-form .field > label {
  font-size: 15px;
}
.wl-clue-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.wl-clue-input {
  flex: 1 1 240px;
  min-height: 60px;
  font-size: 20px;
  font-weight: 750;
}

/* ---------------------------------------------------------- guess phase */

.wl-locks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.wl-lock {
  padding: 3px 10px 3px 3px;
  max-width: 100%;
}
.wl-lock .av {
  border-width: 1.5px;
  font-size: 13px;
}
.wl-lock .nm {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wl-pos {
  font-size: 15px;
  font-weight: 650;
}
.wl-pos b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- reveal */

.wl-res {
  display: grid;
  gap: 8px;
}
.wl-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 14px 8px 10px;
  border: var(--bw) solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  animation: fade-up 0.4s var(--ease) both;
}
.wl-row.me {
  background: color-mix(in srgb, var(--accent) 26%, var(--surface));
}
.wl-row.psy {
  border-style: dashed;
}
.wl-row-txt {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}
.wl-row-txt .nm {
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wl-row-txt .sub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
}
.wl-pts {
  font-family: var(--meme);
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wl-pts.zero {
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- recap */

.wl-recap {
  display: grid;
  gap: 16px;
}
.wl-recap-head {
  flex-wrap: wrap;
  gap: 10px;
}
.wl-awards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wl-awards .chip {
  white-space: normal;
}
.wl-recap-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}
.wl-recap-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  box-shadow: 4px 4px 0 var(--shadow);
  animation: fade-up 0.4s var(--ease) both;
}
.wl-dial-wrap.mini {
  width: 100%;
}
.wl-dial-wrap.mini .wl-face {
  stroke-width: 6;
}
.wl-dial-wrap.mini .wl-band {
  stroke-width: 4;
}
.wl-dial-wrap.mini .wl-pin-under {
  stroke-width: 16;
}
.wl-dial-wrap.mini .wl-pin-line {
  stroke-width: 9;
}
.wl-dial-wrap.mini .wl-target {
  display: none;
}
.wl-recap-txt {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.3;
}
.wl-recap-txt strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.wl-recap-spec {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ----------------------------------------------------------- animations */

@keyframes wl-sway {
  from {
    transform: rotate(-58deg);
  }
  to {
    transform: rotate(58deg);
  }
}
@keyframes wl-swing {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(var(--rot));
  }
}
@keyframes wl-pin-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
@keyframes wl-wedge-in {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
}
@keyframes wl-breathe {
  50% {
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wl-sway,
  .wl-thinking span:last-child,
  .wl-pin-needle,
  .wl-pin,
  .wl-wedge {
    animation: none;
  }
  .wl-needle {
    transition: none;
  }
}

@media (max-width: 760px) {
  .wl-clue-row .btn {
    flex-basis: 100%;
  }
  .wl-recap-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .wl-bl {
    font-size: 17px;
  }
  .wl-pts {
    font-size: 22px;
  }
  .wl-head-side .chip {
    font-size: 12px;
  }
}
