@font-face {
  font-family: 'Rubik';
  font-weight: 400;
  font-display: swap;
  src: url('../vendor/fonts/rubik-latin-400-normal.woff2') format('woff2');
}
.privacy-note {
  max-width: 390px;
  margin: 8px auto 0;
  padding: 5px 10px;
  border-radius: 10px;
  color: #123c46;
  background: #fffbe9ed;
  font-size: 11px;
  line-height: 1.4;
  text-align: left;
  pointer-events: auto;
}
.privacy-note summary {
  cursor: pointer;
  text-align: center;
}
.privacy-note p {
  margin: 6px 0;
}
.privacy-note[open] {
  max-height: 22vh;
  overflow: auto;
}
#title.splash .privacy-note {
  display: none;
}
@font-face {
  font-family: 'Rubik';
  font-weight: 500;
  font-display: swap;
  src: url('../vendor/fonts/rubik-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-weight: 600;
  font-display: swap;
  src: url('../vendor/fonts/rubik-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-weight: 700;
  font-display: swap;
  src: url('../vendor/fonts/rubik-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fredoka';
  font-weight: 500;
  font-display: swap;
  src: url('../vendor/fonts/fredoka-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fredoka';
  font-weight: 600;
  font-display: swap;
  src: url('../vendor/fonts/fredoka-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fredoka';
  font-weight: 700;
  font-display: swap;
  src: url('../vendor/fonts/fredoka-latin-700-normal.woff2') format('woff2');
}

:root {
  --ink: #123c46;
  --ink-2: #2b5a63;
  --foam: #f7fbf6;
  --foam-2: #e6f3ee;
  --coral: #ff5a48;
  --coral-deep: #d9402f;
  --sun: #ffc42e;
  --shallow: #47e0d0;
  --grass: #6dbd45;
  --silver: #c9d6dc;
  --bronze: #d88a4e;
  --glass: rgba(14, 52, 60, 0.62);
  --glass-line: rgba(255, 255, 255, 0.16);
  --display: 'Fredoka', 'Rubik', system-ui, sans-serif;
  --ui: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --gutter: 16px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #9fd8f6;
  overscroll-behavior: none;
  touch-action: none;
  font-family: var(--ui);
  color: var(--foam);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}
#game {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}
#aim-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 12;
}
#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}
#ui * {
  pointer-events: auto;
}
#ui .passive,
#ui .passive * {
  pointer-events: none;
}
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(
    120% 90% at 50% 45%,
    rgba(0, 0, 0, 0) 60%,
    rgba(8, 40, 48, 0.28) 100%
  );
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

/* ---------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  background: var(--foam);
  color: var(--ink);
  box-shadow: 0 4px 0 rgba(10, 45, 52, 0.28);
  transition:
    transform 0.12s var(--ease),
    box-shadow 0.12s var(--ease),
    background 0.2s;
}
.btn:hover {
  background: #ffffff;
}
.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(10, 45, 52, 0.28);
}
.btn.primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 4px 0 var(--coral-deep);
}
.btn.primary:hover {
  background: #ff6b5a;
}
.btn.primary:active {
  box-shadow: 0 1px 0 var(--coral-deep);
}
.btn.quiet {
  background: rgba(255, 255, 255, 0.14);
  color: var(--foam);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.28);
}
.btn.quiet:hover {
  background: rgba(255, 255, 255, 0.22);
}
.btn.quiet:active {
  transform: translateY(1px);
}
.btn.wide {
  width: 100%;
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  transition:
    transform 0.12s var(--ease),
    background 0.2s;
}
.icon-btn:active {
  transform: scale(0.94);
}
.icon-btn.on {
  background: rgba(255, 196, 46, 0.92);
  color: var(--ink);
}
.icon-btn svg {
  width: 22px;
  height: 22px;
}

/* ---------- screens */
.screen {
  position: fixed;
  inset: 0;
  display: none;
}
.screen.show {
  display: block;
}
.fade-in {
  animation: fadeIn 0.35s var(--ease) both;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  60% {
    transform: scale(1.12);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

/* ---------- title: logo on top, actions centred at the bottom */
#title {
  background: linear-gradient(
    180deg,
    rgba(10, 50, 60, 0.38) 0%,
    rgba(10, 50, 60, 0) 26%,
    rgba(10, 50, 60, 0) 52%,
    rgba(10, 50, 60, 0.6) 100%
  );
}
.title-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: calc(4vh + var(--sat)) calc(var(--gutter) + var(--sar)) calc(3.5vh + var(--sab))
    calc(var(--gutter) + var(--sal));
}
.title-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: rise 0.6s var(--ease) both;
}
.wordmark {
  display: block;
  width: min(560px, 82vw);
  height: auto;
  max-height: 24vh;
  filter: drop-shadow(0 8px 22px rgba(5, 40, 50, 0.4));
}
.tagline {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(19px, 2.4vw, 26px);
  margin: 8px 0 0;
  color: #fffbe9;
  -webkit-text-stroke: 5px #123c46;
  paint-order: stroke fill;
}
.title-foot {
  width: min(540px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: rise 0.6s 0.12s var(--ease) both;
}
.title-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.title-actions .row {
  display: flex;
  gap: 12px;
}
.title-actions .row > * {
  flex: 1;
  min-width: 0;
}
.btn.big {
  min-height: 70px;
  font-family: var(--display);
  font-size: 27px;
  border-radius: 22px;
  box-shadow:
    0 6px 0 var(--coral-deep),
    0 14px 30px rgba(120, 30, 20, 0.28);
  gap: 12px;
}
.btn.big svg {
  width: 26px;
  height: 26px;
}
.btn.big:active {
  box-shadow: 0 2px 0 var(--coral-deep);
}
.btn.mid {
  min-height: 60px;
  padding: 0 14px;
  border-radius: 18px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  gap: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 5px 0 rgba(10, 45, 52, 0.3);
}
.btn.mid svg {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--coral-deep);
}
.btn.mid .lbl {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 72px;
  border-radius: 18px;
  background: rgba(14, 52, 60, 0.55);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  transition:
    transform 0.12s var(--ease),
    background 0.2s;
}
.tile:hover {
  background: rgba(14, 52, 60, 0.7);
}
.tile:active {
  transform: scale(0.95);
}
.tile svg {
  width: 27px;
  height: 27px;
}
.tile span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 4px;
}
.title-best {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  min-height: 20px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  text-align: center;
}

/* ---------- panels (holes / settings / pause) */
.backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 44, 52, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.panel {
  position: absolute;
  inset: 0;
  margin: auto;
  height: fit-content;
  width: min(560px, calc(100% - 2 * var(--gutter)));
  max-height: calc(100% - 2 * var(--gutter) - var(--sat) - var(--sab));
  overflow: auto;
  background: var(--foam);
  color: var(--ink);
  border-radius: 26px;
  padding: 26px 24px 24px;
  box-shadow: 0 24px 60px rgba(4, 30, 36, 0.35);
  animation: rise 0.35s var(--ease) both;
}
.panel h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 30px;
  margin: 0 0 4px;
}
.panel .sub {
  margin: 0 0 20px;
  color: var(--ink-2);
  font-size: 15px;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.close-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--foam-2);
  display: grid;
  place-items: center;
  flex: none;
}
.close-btn svg {
  width: 20px;
  height: 20px;
}

.holes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.hole-card {
  position: relative;
  text-align: left;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #d5e6e2;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition:
    transform 0.12s var(--ease),
    box-shadow 0.2s;
}
.hole-card:hover:not(.locked) {
  box-shadow: inset 0 0 0 2px var(--shallow);
}
.hole-card:active:not(.locked) {
  transform: scale(0.97);
}
.hole-card .num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
}
.hole-card .name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
}
.hole-card .meta {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: auto;
}
.hole-card .coin {
  position: absolute;
  right: 12px;
  top: 12px;
}
.hole-card.locked {
  background: var(--foam-2);
  color: #7d989c;
  cursor: not-allowed;
  box-shadow: none;
}
.hole-card.locked .num {
  color: #9db3b6;
}

.coin {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.45);
  box-shadow:
    inset 0 -3px 0 rgba(0, 0, 0, 0.14),
    0 2px 4px rgba(0, 0, 0, 0.12);
}
.coin.gold {
  background: radial-gradient(circle at 35% 30%, #fff1b0, var(--sun) 55%, #e6a515);
}
.coin.silver {
  background: radial-gradient(circle at 35% 30%, #ffffff, var(--silver) 60%, #9fb2ba);
}
.coin.bronze {
  background: radial-gradient(circle at 35% 30%, #ffd3ad, var(--bronze) 60%, #a85e2b);
}
.coin.none {
  background: #e8efed;
  box-shadow: inset 0 0 0 2px #d0dfdc;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 2px;
  border-bottom: 1px solid #e1ece9;
  min-height: 56px;
}
.set-row:last-child {
  border-bottom: 0;
}
.set-row label,
.set-row .lbl {
  font-weight: 500;
  font-size: 16px;
}
.set-row .hint {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 400;
  margin-top: 2px;
}
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 170px;
  height: 32px;
  background: transparent;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--shallow) var(--fill, 50%), #d9e7e4 var(--fill, 50%));
}
input[type='range']::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: #d9e7e4;
}
input[type='range']::-moz-range-progress {
  height: 8px;
  border-radius: 4px;
  background: var(--shallow);
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0 0 0 2px var(--ink);
}
input[type='range']::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink);
}
.toggle {
  position: relative;
  width: 56px;
  height: 32px;
  border-radius: 16px;
  background: #cfdedb;
  flex: none;
  transition: background 0.2s;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s var(--ease);
}
.toggle[aria-checked='true'] {
  background: var(--grass);
}
.toggle[aria-checked='true']::after {
  transform: translateX(24px);
}
.seg {
  display: inline-flex;
  background: var(--foam-2);
  border-radius: 13px;
  padding: 3px;
}
.seg button {
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  min-height: 38px;
}
.seg button[aria-pressed='true'] {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  font-weight: 600;
}
.swatches {
  display: flex;
  gap: 10px;
}
.swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.9),
    0 0 0 2px transparent;
  transition: box-shadow 0.15s;
}
.swatch[aria-pressed='true'] {
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.9),
    0 0 0 3px var(--ink);
}
.danger {
  color: var(--coral-deep);
  font-weight: 600;
  padding: 10px 0;
}

.pause-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pause-actions .btn {
  width: 100%;
}
.pause-actions .btn.ghost {
  background: var(--foam-2);
  box-shadow: none;
}

/* ---------- HUD */
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
#hud.show {
  display: block;
}
.hud-top {
  position: absolute;
  top: calc(12px + var(--sat));
  left: calc(var(--gutter) + var(--sal));
  right: calc(var(--gutter) + var(--sar));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.hole-tag {
  padding: 9px 16px 10px 14px;
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.hole-tag .n {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: var(--sun);
}
.hole-tag .t {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.hole-tag .k {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}
.hole-tag .name {
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-right {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.score {
  display: flex;
  align-items: stretch;
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--glass-line);
}
.score > div {
  padding: 7px 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 62px;
}
.score .v {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
}
.score .k {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 3px;
}
.score .par {
  background: rgba(255, 255, 255, 0.08);
}
.score .v.bump {
  animation: pop 0.38s var(--ease);
}
.hud-buttons {
  display: flex;
  gap: 8px;
}

/* Hints: plain outlined text near the top, never a card where the thumb rests. */
.outlined {
  font-family: var(--display);
  font-weight: 600;
  color: #fffbe9;
  -webkit-text-stroke: 5px #123c46;
  paint-order: stroke fill;
  text-wrap: balance;
}
.hint {
  position: absolute;
  left: 50%;
  top: calc(88px + var(--sat));
  transform: translateX(-50%);
  font-size: 20px;
  text-align: center;
  width: max-content;
  max-width: calc(100% - 2 * var(--gutter));
  white-space: normal;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.hint.show {
  opacity: 1;
  animation: hintBreath 2.4s ease-in-out infinite;
}
@keyframes hintBreath {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}
.hint .drag-demo {
  display: inline-block;
  width: 26px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  position: relative;
}
.hint .drag-demo::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: dragdemo 1.6s var(--ease) infinite;
}
@keyframes dragdemo {
  0%,
  15% {
    transform: translateX(14px);
    opacity: 1;
  }
  70% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(0);
    opacity: 0;
  }
}

.toast-wrap {
  position: absolute;
  top: calc(136px + var(--sat));
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--foam);
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 8px 24px rgba(4, 30, 36, 0.25);
  animation: toastIn 0.3s var(--ease) both;
  display: flex;
  gap: 10px;
  align-items: center;
}
.toast.out {
  animation: toastOut 0.3s var(--ease) both;
}
.toast .pill {
  background: var(--coral);
  color: #fff;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 14px;
}
.toast.celebrate {
  background: var(--sun);
  font-family: var(--display);
  font-size: 24px;
  padding: 10px 22px;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ---------- results */
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: calc(var(--gutter) + var(--sab));
  width: min(460px, calc(100% - 2 * var(--gutter)));
  background: var(--foam);
  color: var(--ink);
  border-radius: 28px;
  padding: 22px 22px 20px;
  box-shadow: 0 24px 60px rgba(4, 30, 36, 0.35);
  animation: rise 0.4s var(--ease) both;
}
.res-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.res-head .k {
  font-size: 14px;
  color: var(--ink-2);
}
.res-head h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  margin: 2px 0 0;
}
.res-main {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 16px 0 14px;
}
.res-strokes {
  font-family: var(--display);
  font-weight: 700;
  font-size: 76px;
  line-height: 0.9;
  color: var(--ink);
}
.res-desc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.res-desc .score-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  color: var(--coral-deep);
}
.res-desc .par-line {
  font-size: 15px;
  color: var(--ink-2);
}
.res-medal {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.res-medal .coin {
  width: 64px;
  height: 64px;
  font-size: 26px;
  animation: pop 0.5s 0.25s var(--ease) both;
}
.res-medal .ml {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  min-height: 0;
}
.badge {
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  background: var(--foam-2);
  animation: pop 0.4s 0.4s var(--ease) both;
}
.badge.pb {
  background: #fff0c2;
  color: #8a5a00;
}
.badge.ace {
  background: var(--coral);
  color: #fff;
}
.res-actions {
  display: flex;
  gap: 10px;
}
.res-actions .btn {
  flex: 1;
}

.course-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 18px;
  font-size: 15px;
}
.course-table th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-2);
  font-size: 13px;
  padding: 6px 4px;
}
.course-table td {
  padding: 9px 4px;
  border-top: 1px solid #e1ece9;
}
.course-table td.num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  text-align: right;
}
.course-table th.num {
  text-align: right;
}
.course-table .coin {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
}
.course-total {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 4px 0 6px;
}
.course-total .big {
  font-family: var(--display);
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
}
.course-total .rel {
  font-family: var(--display);
  font-size: 24px;
  color: var(--coral-deep);
}

/* ---------- loading */
#loading {
  background: linear-gradient(180deg, #57b7ea, #bfe8f8);
  display: none;
  place-items: center;
}
#loading.show {
  display: grid;
}
#loading .ld {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  font-family: var(--display);
  font-size: 20px;
  color: #fff;
}
#loading .ball {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.08);
  animation: hop 0.9s ease-in-out infinite;
}
@keyframes hop {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-22px);
  }
}
.err {
  max-width: 420px;
  text-align: center;
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
  padding: 0 var(--gutter);
}

/* ---------- responsive */
@media (max-width: 640px) {
  .holes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  input[type='range'] {
    width: 130px;
  }
}
@media (max-width: 480px) {
  .hole-tag {
    padding: 8px 12px 9px 11px;
    gap: 9px;
  }
  .hole-tag .n {
    font-size: 26px;
  }
  .hole-tag .name {
    font-size: 15px;
    max-width: 48vw;
  }
  .score > div {
    min-width: 50px;
    padding: 6px 10px 7px;
  }
  .score .v {
    font-size: 22px;
  }
  .icon-btn {
    width: 44px;
    height: 44px;
  }
  .hud-right {
    flex-direction: column-reverse;
    align-items: flex-end;
  }
  .res-strokes {
    font-size: 64px;
  }
  .hint {
    font-size: 18px;
    top: calc(118px + var(--sat));
  }
  .panel {
    padding: 22px 18px 18px;
    border-radius: 22px;
  }
}
@media (max-height: 480px) and (orientation: landscape) {
  .sheet {
    bottom: calc(10px + var(--sab));
    padding: 16px 18px;
  }
  .res-main {
    margin: 8px 0;
  }
  .res-strokes {
    font-size: 54px;
  }
  .toast-wrap {
    top: calc(70px + var(--sat));
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

#fade {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  background: radial-gradient(120% 100% at 50% 40%, #d6eefa, #8fd0ef);
}
#fade.on {
  opacity: 1;
}

/* ---------- tap to start */
.tap-start {
  display: none;
}
#title.splash {
  cursor: pointer;
}
#title.splash .title-actions,
#title.splash .title-best {
  display: none;
}
#title.splash .tap-start {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 0 34px 0 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  box-shadow:
    0 6px 0 rgba(10, 45, 52, 0.25),
    0 12px 30px rgba(5, 40, 50, 0.25);
  animation:
    rise 0.6s 0.24s var(--ease) both,
    tapPulse 1.8s 1s ease-in-out infinite;
}
.tap-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    inset 0 0 0 3px var(--ink),
    0 0 0 0 rgba(255, 90, 72, 0.6);
  animation: tapRing 1.8s 1s ease-out infinite;
}
@keyframes tapPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}
@keyframes tapRing {
  0% {
    box-shadow:
      inset 0 0 0 3px var(--ink),
      0 0 0 0 rgba(255, 90, 72, 0.7);
  }
  80%,
  100% {
    box-shadow:
      inset 0 0 0 3px var(--ink),
      0 0 0 16px rgba(255, 90, 72, 0);
  }
}
#title.reveal .title-actions > *,
#title.reveal .title-actions .row > * {
  animation: rise 0.45s var(--ease) both;
}
#title.reveal .title-actions .row > *:nth-child(2) {
  animation-delay: 0.06s;
}
.select {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--foam-2);
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  min-height: 42px;
}
.sheet.ace .res-strokes {
  color: var(--coral);
}

/* ---------- juice */
.icon-btn.hidden {
  display: none;
}
.hand-hint {
  position: absolute;
  left: 0;
  top: 0;
  width: 46px;
  height: 46px;
  margin: -6px 0 0 -14px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.hand-hint.show {
  opacity: 1;
}
.hand-hint svg {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  animation: handPull 2.2s var(--ease) infinite;
}
@keyframes handPull {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  12% {
    opacity: 1;
    transform: translate(0, 0) scale(0.92);
  }
  55% {
    transform: translate(18px, 70px) scale(0.92);
    opacity: 1;
  }
  66% {
    transform: translate(18px, 70px) scale(1.04);
    opacity: 1;
  }
  85%,
  100% {
    transform: translate(18px, 70px) scale(1);
    opacity: 0;
  }
}
.floaters {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.floater {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  color: #fffbe9;
  text-shadow:
    0 2px 0 #123c46,
    0 0 10px rgba(18, 60, 70, 0.5);
  white-space: nowrap;
  animation: floatUp 1.25s var(--ease) both;
}
.floater.gold {
  color: var(--sun);
  font-size: 26px;
}
.floater.almost {
  color: #fff;
  font-size: 26px;
}
@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.6);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1.12);
  }
  30% {
    transform: translate(-50%, -70%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -170%) scale(1);
  }
}
.letterbox .lb {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  background: #0b2329;
  transition: height 0.35s var(--ease);
}
.letterbox .top {
  top: 0;
}
.letterbox .bottom {
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 calc(var(--gutter) + 8px);
}
.letterbox.show .lb {
  height: 9vh;
}
.lb-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  color: var(--sun);
  opacity: 0;
  transition: opacity 0.3s 0.2s;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.lb-label::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  animation: rec 1s steps(2) infinite;
}
@keyframes rec {
  50% {
    opacity: 0.2;
  }
}
.letterbox.show .lb-label {
  opacity: 1;
}
.score.cheer {
  animation: cheer 0.7s var(--ease);
}
@keyframes cheer {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.12) rotate(-3deg);
  }
  50% {
    transform: scale(1.05) rotate(3deg);
  }
  75% {
    transform: scale(1.08) rotate(-1deg);
  }
  100% {
    transform: none;
  }
}
.res-strokes.landed,
.course-total .big.landed {
  animation: pop 0.35s var(--ease);
}
.coin.flip {
  animation: coinFlip 1s 0.2s var(--ease) both !important;
  position: relative;
  overflow: hidden;
}
.coin.flip::after {
  content: '';
  position: absolute;
  inset: -40%;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(255, 255, 255, 0.85) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  animation: shine 1.4s 1.1s ease-out both;
}
@keyframes coinFlip {
  0% {
    transform: rotateY(90deg) scale(0.4);
    opacity: 0;
  }
  40% {
    transform: rotateY(540deg) scale(1.15);
    opacity: 1;
  }
  70% {
    transform: rotateY(720deg) scale(0.95);
  }
  100% {
    transform: rotateY(720deg) scale(1);
    opacity: 1;
  }
}
@keyframes shine {
  to {
    transform: translateX(100%);
  }
}
.res-main {
  position: relative;
}
.stamp {
  position: absolute;
  right: 86px;
  top: -6px;
  transform: rotate(-12deg);
  padding: 4px 12px;
  border: 3px solid var(--coral);
  border-radius: 10px;
  color: var(--coral);
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.7);
  animation: stampIn 0.45s 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.course-total {
  position: relative;
}
.course-total .stamp {
  position: static;
  margin-left: auto;
  align-self: center;
}
@keyframes stampIn {
  0% {
    opacity: 0;
    transform: rotate(-12deg) scale(2.4);
  }
  100% {
    opacity: 1;
    transform: rotate(-12deg) scale(1);
  }
}
.course-panel {
  width: min(640px, calc(100% - 2 * var(--gutter)));
}
.scorecard-wrap {
  overflow-x: auto;
  margin: 4px 0 18px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 2px #d5e6e2;
}
.scorecard {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  text-align: center;
  min-width: 420px;
}
.scorecard th,
.scorecard td {
  padding: 8px 4px;
  border-left: 1px solid #e1ece9;
}
.scorecard tr > :first-child {
  border-left: 0;
  text-align: left;
  padding-left: 12px;
  font-weight: 500;
  color: var(--ink-2);
  font-size: 13px;
}
.scorecard .sc-head {
  background: var(--ink);
  color: #fff;
}
.scorecard .sc-head th {
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}
.scorecard .sc-strokes td span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
}
.scorecard td.under span {
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--coral);
  color: var(--coral-deep);
}
.scorecard td.ace span {
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
}
.scorecard td.over span {
  box-shadow: inset 0 0 0 2px #9ab3b6;
  border-radius: 6px;
}
.scorecard tr > th:last-child {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  background: var(--foam-2);
}
.scorecard .sc-head > th:last-child {
  background: var(--coral);
  color: #fff;
  font-size: 13px;
}
.scorecard .coin {
  width: 22px;
  height: 22px;
  display: inline-block;
}
.btn.quiet-dark {
  background: var(--foam-2);
  box-shadow: 0 4px 0 #c4d8d3;
  color: var(--ink);
  padding: 0 16px;
}
.btn.quiet-dark svg {
  flex: none;
}
@media (max-width: 480px) {
  .btn.quiet-dark span {
    display: none;
  }
  .stamp {
    font-size: 17px;
  }
}

body.has-post .vignette {
  display: none;
}

/* ---------- title extras */
.title-top {
  position: absolute;
  top: calc(14px + var(--sat));
  right: calc(var(--gutter) + var(--sar));
  display: flex;
  gap: 8px;
}
#title.splash .title-top {
  display: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 9px;
  border-radius: 999px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  color: #fff;
}
.chip.dark {
  background: var(--foam-2);
  color: var(--ink);
  box-shadow: none;
  margin-left: auto;
  margin-right: 8px;
  align-self: center;
}
.coin-ico {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
  background: radial-gradient(circle at 35% 30%, #fff1b0, var(--sun) 55%, #e09b12);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}
.star-ico {
  display: inline-grid;
  width: 20px;
  height: 20px;
}
.star-ico svg {
  width: 100%;
  height: 100%;
  fill: var(--sun);
  stroke: #8a5a00;
  stroke-width: 1.2;
}
.title-actions [data-a='daily'] {
  gap: 8px;
}
.title-actions .streak {
  font-size: 16px;
  flex: none;
}
.title-actions .streak.done {
  color: #2c9a46;
  font-weight: 700;
}

/* ---------- course picker */
.panel.wide {
  width: min(720px, calc(100% - 2 * var(--gutter)));
}
.panel.narrow {
  width: min(440px, calc(100% - 2 * var(--gutter)));
}
.course-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}
.course-card {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #d5e6e2;
  display: flex;
  flex-direction: column;
}
.course-card .cc-art {
  height: 150px;
  background: #5fb6ec url(../img/course-ruins.jpg) center / cover no-repeat;
  position: relative;
}
.course-card.pier .cc-art {
  background-color: #0c143c;
  background-image: url(../img/course-pier.jpg);
}
.course-card .cc-art::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 36%;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.18));
  pointer-events: none;
}
.course-card.locked .cc-art {
  filter: grayscale(0.55) brightness(0.8);
}
.course-card .cc-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.course-card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  margin: 0;
}
.course-card .sub {
  margin: 0;
  font-size: 14px;
}
.course-card .cc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
  margin-top: auto;
}
.course-card .btn {
  width: 100%;
}
.course-card.locked {
  background: var(--foam-2);
}
.course-card.locked .cc-art {
  filter: grayscale(0.7) brightness(0.8);
}
.cc-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- tabs */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--foam-2);
  padding: 4px;
  border-radius: 14px;
  margin: 0 0 14px;
  overflow-x: auto;
}
.tab {
  flex: 1;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tab.on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.tab.locked {
  opacity: 0.55;
  cursor: not-allowed;
}
.tab svg {
  width: 15px;
  height: 15px;
}

/* ---------- stars */
.stars {
  display: inline-flex;
  gap: 2px;
}
.stars .st {
  width: 22px;
  height: 22px;
  display: inline-grid;
}
.stars.small .st {
  width: 16px;
  height: 16px;
}
.stars .st svg {
  width: 100%;
  height: 100%;
  fill: #dbe7e4;
  stroke: #b9cecb;
  stroke-width: 1.2;
}
.stars .st.on svg {
  fill: var(--sun);
  stroke: #b77f00;
}
.hole-card .stars {
  margin-top: 2px;
}
.res-stars {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 6px;
  border-radius: 16px;
  background: var(--foam-2);
}
.res-stars .rs {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.res-stars .st {
  width: 38px;
  height: 38px;
  display: grid;
}
.res-stars .st svg {
  width: 100%;
  height: 100%;
  fill: #d3e1de;
  stroke: #b4c9c6;
  stroke-width: 1.2;
}
.res-stars .rs.on .st svg {
  fill: var(--sun);
  stroke: #b77f00;
}
.res-stars .rs.on .st {
  animation: starPop 0.5s var(--d) cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.res-stars .rs.new .st {
  filter: drop-shadow(0 0 8px rgba(255, 196, 46, 0.9));
}
.res-stars .sl {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
}
.res-stars .rs.new .sl {
  color: #8a5a00;
}
@keyframes starPop {
  0% {
    transform: scale(0) rotate(-40deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}
.badge.coins {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff0c2;
  color: #8a5a00;
}
.badge .coin-ico {
  width: 16px;
  height: 16px;
}
.unlock-note {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(90deg, #22306e, #6d4b8f);
  color: #fff;
  font-weight: 600;
  animation: pop 0.5s 0.9s var(--ease) both;
}
.floater .coin-ico {
  width: 20px;
  height: 20px;
  vertical-align: -3px;
}
.score.coin-bump {
  animation: cheer 0.5s var(--ease);
}

/* ---------- locker */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}
.item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #d5e6e2;
  transition: transform 0.12s var(--ease);
}
.item:active {
  transform: scale(0.96);
}
.item.on {
  box-shadow: inset 0 0 0 3px var(--shallow);
}
.item.locked {
  opacity: 0.65;
}
.item .nm {
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}
.item .tag {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--foam-2);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.item .tag.eq {
  background: var(--shallow);
  color: var(--ink);
}
.item .tag.price {
  background: #fff0c2;
  color: #8a5a00;
}
.item .tag.price.short {
  background: #f1e7e6;
  color: #a46d66;
}
.item .tag .coin-ico,
.item .tag .star-ico {
  width: 15px;
  height: 15px;
}
.pv {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
}
.pv.ball {
  border-radius: 50%;
  box-shadow:
    inset -6px -8px 0 rgba(0, 0, 0, 0.12),
    inset 4px 4px 0 rgba(255, 255, 255, 0.35),
    0 3px 6px rgba(0, 0, 0, 0.15);
}
.pv.trail {
  width: 80px;
  height: 18px;
  border-radius: 9px;
  background: linear-gradient(90deg, transparent, #ff6a52);
}
.pv.trail.t-none {
  background: repeating-linear-gradient(90deg, #d5e6e2 0 6px, transparent 6px 12px);
}
.pv.trail.t-rainbow {
  background: linear-gradient(90deg, transparent, #ff5a48, #ffd23f, #5fd3a8, #2e8fe6, #9b7bff);
}
.pv.trail.t-fire {
  background: linear-gradient(90deg, transparent, #ff5214, #ffd23f, #fffbe0);
}
.pv.trail.t-bubbles {
  background:
    radial-gradient(circle at 20% 50%, #bff6ff 0 4px, transparent 5px),
    radial-gradient(circle at 50% 40%, #7fe6ff 0 6px, transparent 7px),
    radial-gradient(circle at 80% 55%, #bff6ff 0 5px, transparent 6px);
}
.pv.trail.t-sparkle {
  background:
    radial-gradient(circle at 20% 50%, #ffd23f 0 2px, transparent 3px),
    radial-gradient(circle at 45% 30%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 70% 60%, #ffd23f 0 2px, transparent 3px),
    radial-gradient(circle at 90% 40%, #fff 0 2px, transparent 3px);
}
.pv.flag {
  width: 66px;
  height: 44px;
  border-radius: 4px 10px 10px 4px;
  background-size: cover;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.pv.cele {
  font-size: 38px;
}

/* ---------- daily */
.daily-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #d5e6e2;
  margin-bottom: 16px;
}
.dc-mod {
  display: flex;
  gap: 12px;
  align-items: center;
}
.dc-ico {
  font-size: 38px;
}
.dc-mod b {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
}
.dc-mod span {
  color: var(--ink-2);
  font-size: 14px;
}
.dc-hole {
  font-size: 15px;
}
.dc-goal {
  font-weight: 600;
  color: var(--coral-deep);
}
.dc-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ink-2);
}
.done-msg {
  text-align: center;
  width: 100%;
  margin: 0 !important;
}

/* ---------- HUD extras */
.hud-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
}
.player-tag,
.mod-tag {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  font-weight: 600;
  font-size: 15px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.player-tag.show,
.mod-tag.show {
  display: inline-flex;
}
.player-tag .dot,
.turn-banner .dot,
.mp-row .dot,
.mp-table .dot,
.podium-row .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}
.mod-tag .wind-arrow {
  display: none;
  width: 22px;
  height: 22px;
  color: var(--sun);
}
.mod-tag.wind .wind-arrow {
  display: inline-grid;
}
.mod-tag .wind-arrow svg {
  width: 22px;
  height: 22px;
}
.turn-banner {
  position: absolute;
  left: 50%;
  top: 32%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  white-space: nowrap;
}
.turn-banner .dot {
  width: 26px;
  height: 26px;
  box-shadow:
    0 0 0 4px #123c46,
    inset 0 0 0 3px rgba(255, 255, 255, 0.8);
}
.turn-banner.show {
  animation: turnIn 1.6s var(--ease) both;
}
@keyframes turnIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.8);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
  25% {
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
}
.name-tags {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.name-tag {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 15px;
  -webkit-text-stroke-width: 4px;
  padding-bottom: 4px;
  border-bottom: 3px solid var(--c, #fff);
  white-space: nowrap;
  opacity: 0.9;
}
.name-tag.active {
  font-size: 18px;
  opacity: 1;
}
.ach-ico {
  font-size: 22px;
}

/* ---------- multiplayer */
.kb-lift {
  margin-bottom: calc(var(--gutter) + var(--kb, 0px));
  transition: margin-bottom 0.2s;
}
.mp-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
}
.mp-block .lbl {
  font-weight: 600;
}
.mp-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 8px;
}
.mp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #d5e6e2;
  min-height: 54px;
}
.mp-row .mp-name {
  flex: 1;
  font-weight: 600;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link {
  color: #1a7f90;
  font-weight: 600;
  padding: 8px 4px;
}
.name-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  background: var(--foam-2);
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 40px;
  outline: 2px solid var(--shallow);
  user-select: text;
  -webkit-user-select: text;
}
.btn.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}
.mp-note {
  margin: 8px 0 16px !important;
  font-size: 14px !important;
}
.mp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  font-size: 16px;
}
.mp-table th {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  text-align: right;
  padding: 4px 6px;
}
.mp-table td {
  padding: 9px 6px;
  border-top: 1px solid #e1ece9;
}
.mp-table td:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.mp-table td.num {
  text-align: right;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
}
.mp-table td.lead {
  color: var(--coral-deep);
}
.podium {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 18px;
}
.podium-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #d5e6e2;
  animation: rise 0.4s var(--ease) both;
}
.podium-row.first {
  background: #fff4cf;
  box-shadow: inset 0 0 0 2px var(--sun);
}
.podium-row .place {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  width: 24px;
  color: var(--ink-2);
}
.podium-row .pn {
  flex: 1;
  font-weight: 600;
  font-size: 17px;
}
.podium-row .num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
}
.btn.danger-btn {
  background: #fde4e0;
  color: var(--coral-deep);
  box-shadow: 0 4px 0 #f3c3bb;
}

/* ---------- records */
.sec {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  margin: 14px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sec .sub {
  margin: 0;
  font-size: 14px;
}
.stats-wrap {
  overflow-x: auto;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px #d5e6e2;
}
.stats {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 440px;
}
.stats th {
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 500;
  padding: 8px 6px;
  text-align: right;
}
.stats td {
  padding: 8px 6px;
  border-top: 1px solid #e1ece9;
}
.stats td.num {
  text-align: right;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
}
.stats td.nm {
  font-weight: 600;
}
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.ach {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--foam-2);
  opacity: 0.7;
}
.ach.got {
  background: #fff4cf;
  opacity: 1;
}
.ach .ai {
  font-size: 26px;
}
.ach .an {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--ink-2);
}
.ach .an b {
  color: var(--ink);
  font-size: 15px;
}

/* ---------- first-time lesson (only "skip" takes taps) */
#ui .lesson,
#ui .lesson * {
  pointer-events: none;
}
#ui .lesson .lesson-skip {
  pointer-events: auto;
}
.lesson {
  position: fixed;
  inset: 0;
  z-index: 2;
}
.lesson-text {
  position: absolute;
  left: 50%;
  top: calc(90px + var(--sat));
  transform: translateX(-50%);
  width: min(560px, calc(100% - 2 * var(--gutter)));
  text-align: center;
}
.lt-title {
  font-size: 30px;
  line-height: 1.15;
}
.lt-sub {
  margin-top: 8px;
  font-size: 18px;
  -webkit-text-stroke-width: 4px;
}
.lesson-area {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(18px + var(--sab));
  height: 22%;
  border: 3px dashed rgba(255, 255, 255, 0.75);
  border-radius: 26px;
  display: grid;
  place-items: end center;
  padding-bottom: 14px;
}
.lesson-area span {
  font-size: 18px;
  -webkit-text-stroke-width: 4px;
}
.lesson-finger {
  position: absolute;
  left: 50%;
  bottom: calc(18px + var(--sab) + 11%);
  width: 54px;
  height: 54px;
  margin: 0 0 -27px -20px;
}
.lesson-finger svg {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
  animation: lessonPull 2.8s var(--ease) infinite;
}
@keyframes lessonPull {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translate(0, 0) scale(0.9);
  }
  55% {
    transform: translate(var(--dx, 0px), var(--dy, 90px)) scale(0.9);
    opacity: 1;
  }
  65% {
    transform: translate(var(--dx, 0px), var(--dy, 90px)) scale(1.05);
    opacity: 1;
  }
  85%,
  100% {
    transform: translate(var(--dx, 0px), var(--dy, 90px)) scale(1);
    opacity: 0;
  }
}
.lesson-finger {
  --dx: 0px;
  --dy: 90px;
}
.lesson-finger svg {
  --dx: inherit;
  --dy: inherit;
}
.lesson-skip {
  position: absolute;
  right: calc(var(--gutter) + var(--sar));
  bottom: calc(22% + 34px + var(--sab));
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.lesson-done {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  font-size: 54px;
  opacity: 0;
}
.lesson.done > :not(.lesson-done) {
  opacity: 0;
  transition: opacity 0.2s;
}
.lesson.done .lesson-done {
  animation: pop 0.5s var(--ease) both;
  opacity: 1;
}

/* ---------- accessibility */
body.colorblind .coin {
  position: relative;
}
body.colorblind .coin[data-g]:not([data-g=''])::before {
  content: attr(data-g);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 60%;
  color: rgba(40, 25, 0, 0.75);
}
body.colorblind .coin.flip::before {
  z-index: 1;
}
body.large-text .panel,
body.large-text .sheet,
body.large-text .hud-top,
body.large-text .title-wrap,
body.large-text .toast-wrap,
body.large-text .title-top {
  zoom: 1.15;
}
body.large-text .hint,
body.large-text .lesson-text {
  font-size: 115%;
}

@media (max-width: 480px) {
  .lesson-text {
    top: calc(128px + var(--sat));
  }
}
@media (max-width: 640px) {
  .course-cards {
    grid-template-columns: 1fr;
  }
  .course-card .cc-art {
    height: 132px;
  }
  .turn-banner {
    font-size: 32px;
  }
  .lt-title {
    font-size: 25px;
  }
  .lt-sub {
    font-size: 16px;
  }
}
@media (max-height: 480px) and (orientation: landscape) {
  .lesson-text {
    top: calc(70px + var(--sat));
  }
  .lt-title {
    font-size: 22px;
  }
  .lesson-area {
    height: 26%;
  }
}

/* title on short landscape screens (phones turned sideways) */
@media (max-height: 520px) and (orientation: landscape) {
  .title-wrap {
    padding-top: calc(10px + var(--sat));
    padding-bottom: calc(10px + var(--sab));
  }
  .wordmark {
    height: 19vh;
    width: auto;
  }
  .tagline {
    display: none;
  }
  .title-foot {
    width: min(640px, 100%);
    gap: 8px;
  }
  .title-actions {
    gap: 8px;
  }
  .btn.big {
    min-height: 54px;
    font-size: 22px;
  }
  .btn.mid {
    min-height: 48px;
    font-size: 16px;
  }
  .tile {
    min-height: 50px;
    flex-direction: row;
    gap: 8px;
  }
  .tile svg {
    width: 22px;
    height: 22px;
  }
  .title-best {
    display: none;
  }
}
@media (max-width: 440px) {
  .btn.mid {
    font-size: 16px;
    padding: 0 10px;
    gap: 7px;
    min-height: 62px;
  }
  .btn.mid svg {
    width: 21px;
    height: 21px;
  }
  .btn.mid .lbl {
    white-space: normal;
    line-height: 1.1;
    text-align: left;
  }
  .tile {
    font-size: 12px;
  }
  .tile span {
    padding: 0 2px;
  }
}

/* ---------------------------------------------------------------- online */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow:
    inset 0 0 0 1.5px #d5e6e2,
    0 3px 0 #d5e6e2;
  color: var(--ink);
  min-height: 76px;
}
.choice:active {
  transform: translateY(2px);
  box-shadow: inset 0 0 0 1.5px #d5e6e2;
}
.choice .ci {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--foam-2);
  color: var(--ink);
}
.choice .ci svg {
  width: 28px;
  height: 28px;
}
.choice[data-a='online'] .ci {
  background: var(--coral);
  color: #fff;
}
.choice .ct {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.choice .ct b {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
}
.choice .ct span {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.3;
}
.ol-panel h2 {
  margin-bottom: 4px;
}
.ol-name {
  margin: 10px 0 4px;
  font-size: 16px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.ol-name b {
  color: var(--ink);
}
.ol-name.editing {
  gap: 10px;
  flex-wrap: nowrap;
}
.ol-name.editing .name-input {
  flex: 1;
  min-width: 0;
}
.res-actions.col {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.res-actions.col .btn {
  width: 100%;
}
.btn.big-ish {
  min-height: 58px;
  font-size: 20px;
}
.ol-code-row {
  display: flex;
  gap: 10px;
  margin: 14px 0 6px;
}
.ol-code-row .code-input {
  flex: 1;
  min-width: 0;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-align: center;
}
.ol-err {
  color: var(--coral-deep);
  font-weight: 600;
  margin: 6px 0 0;
}
.ol-spin {
  display: grid;
  place-items: center;
  padding: 22px 0 10px;
}
.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid #d5e6e2;
  border-top-color: var(--coral);
  display: inline-block;
  animation: olspin 0.8s linear infinite;
}
.spinner.small {
  width: 16px;
  height: 16px;
  border-width: 2.5px;
  vertical-align: -3px;
  margin-right: 8px;
}
@keyframes olspin {
  to {
    transform: rotate(360deg);
  }
}
.ol-code {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 12px 0 8px;
  user-select: text;
  -webkit-user-select: text;
}
.ol-code span {
  width: 46px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #fffbe9;
  font-family: var(--display);
  font-weight: 700;
  font-size: 32px;
  box-shadow:
    inset 0 -26px 0 rgba(255, 255, 255, 0.06),
    0 3px 0 #0b2830;
  animation: rise 0.35s var(--ease) both;
}
.ol-code span:nth-child(2) {
  animation-delay: 0.05s;
}
.ol-code span:nth-child(3) {
  animation-delay: 0.1s;
}
.ol-code span:nth-child(4) {
  animation-delay: 0.15s;
}
.ol-code span:nth-child(5) {
  animation-delay: 0.2s;
}
.invite-btn {
  gap: 8px;
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 4px 0 #d9a21b;
}
.ol-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 6px;
}
.ol-slot.empty {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px dashed #c8dcd7;
  border: 1.5px dashed #c8dcd7;
  box-shadow: none;
  color: #8aa8a6;
}
.ol-slot.empty .dot {
  background: #e1ece9;
}
.ol-slot.me {
  box-shadow: inset 0 0 0 2px var(--ink);
}
.ol-slot.off {
  opacity: 0.55;
}
.ol-you {
  font-weight: 500;
  color: var(--ink-2);
  font-size: 14px;
}
.ol-left {
  font-weight: 500;
  color: #8aa8a6;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ol-host {
  font-size: 18px;
}
.ol-ball {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  box-shadow:
    inset 0 0 0 1.5px rgba(18, 60, 70, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.15);
}
.ol-cfg {
  text-align: center;
  margin: 10px 0;
}
.ol-wait {
  text-align: center;
  color: var(--ink-2);
  font-weight: 500;
  margin: 8px 0;
  min-height: 22px;
}
.mp-table tr.left td,
.podium-row.left {
  opacity: 0.5;
}
.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}
.net-banner {
  position: fixed;
  top: calc(var(--sat) + 10px);
  left: 50%;
  transform: translate(-50%, -140%);
  z-index: 60;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--glass);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.25s var(--ease);
  pointer-events: none;
}
.net-banner.show {
  transform: translate(-50%, 0);
}
.net-banner .spinner {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
}
.player-tag .note {
  font-weight: 500;
  opacity: 0.75;
  font-size: 13px;
}
.player-tag .note:empty {
  display: none;
}
.player-tag .clock {
  display: none;
  font-family: var(--display);
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
}
.player-tag .clock.show {
  display: inline-block;
}
.player-tag .clock.urgent {
  background: var(--coral);
  animation: olpulse 0.8s ease-in-out infinite;
}
@keyframes olpulse {
  50% {
    transform: scale(1.12);
  }
}
@media (max-width: 380px) {
  .ol-code span {
    width: 40px;
    height: 52px;
    font-size: 28px;
  }
}

/* ---------------------------------------------------------------- locker juice */
.item.pop {
  animation: itempop 0.45s var(--ease);
}
@keyframes itempop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.08) rotate(-1.5deg);
  }
  70% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}
.nope {
  animation: nope 0.42s ease;
}
@keyframes nope {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-7px) rotate(-2deg);
  }
  40% {
    transform: translateX(6px) rotate(2deg);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(3px);
  }
}
.coins-chip.bump {
  animation: chipbump 0.5s var(--ease);
}
@keyframes chipbump {
  30% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}
.short-card {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(10, 40, 48, 0.38);
  animation: shortfade 0.2s ease both;
}
.short-card.out {
  animation: shortfade 0.2s ease reverse both;
}
@keyframes shortfade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.short-box {
  width: min(360px, 100%);
  background: var(--foam);
  color: var(--ink);
  border-radius: 24px;
  padding: 20px 20px 16px;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.3),
    inset 0 0 0 2px #fff;
  animation: shortpop 0.42s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
@keyframes shortpop {
  from {
    transform: scale(0.7) translateY(30px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.short-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.short-top h3 {
  font-family: var(--display);
  font-size: 22px;
  margin: 0;
}
.short-top .sub {
  margin: 2px 0 0;
}
.short-pv {
  position: relative;
  width: 64px;
  height: 64px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #d5e6e2;
}
.short-pv .pv {
  transform: scale(0.9);
}
.short-lock {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  animation: lockwiggle 1.2s ease-in-out 0.3s 2;
}
.short-lock svg {
  width: 16px;
  height: 16px;
}
@keyframes lockwiggle {
  0%,
  100% {
    transform: rotate(0);
  }
  15% {
    transform: rotate(-14deg);
  }
  30% {
    transform: rotate(12deg);
  }
  45% {
    transform: rotate(-6deg);
  }
  60% {
    transform: rotate(0);
  }
}
.short-need {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 8px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
}
.short-need b {
  color: var(--coral-deep);
  font-size: 26px;
}
.short-need .coin-ico,
.short-need .star-ico {
  width: 24px;
  height: 24px;
  animation: coinspin 1.1s ease-in-out infinite;
}
@keyframes coinspin {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.25);
  }
}
.short-bar {
  position: relative;
  height: 22px;
  border-radius: 11px;
  background: #e3eeeb;
  overflow: hidden;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.08);
}
.short-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: 11px;
  background: linear-gradient(90deg, #ffd23f, #ffb020);
  animation: barfill 0.8s var(--ease) 0.15s both;
}
@keyframes barfill {
  from {
    width: 0;
  }
}
.short-bar em {
  position: relative;
  display: block;
  text-align: center;
  font-style: normal;
  font-weight: 700;
  font-size: 13px;
  line-height: 22px;
  color: var(--ink);
}
.short-tips {
  margin: 14px 0 6px;
  padding: 0 0 0 18px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}
.short-tips li {
  margin: 3px 0;
}
.lesson .lesson-text,
.lesson .lesson-area {
  transition: opacity 0.2s ease;
}
.lesson.aiming .lesson-text,
.lesson.aiming .lesson-area,
.lesson.aiming .lesson-finger {
  opacity: 0;
}
.lesson ~ .toast-wrap,
body .hud .toast-wrap {
  transition: top 0.2s var(--ease);
}

/* ---------------------------------------------------------------- global ranking */
.tabs.two {
  margin-bottom: 14px;
}
.view-ranking .seg {
  display: flex;
  width: 100%;
  margin: 0 0 8px;
}
.view-ranking .seg button {
  flex: 1;
}
.rk-list {
  min-height: 140px;
  margin: 8px 0 4px;
}
.rk-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #d5e6e2;
  animation: rise 0.35s var(--ease) both;
}
.rk-row.me {
  background: #fff4cf;
  box-shadow: inset 0 0 0 2px var(--sun);
}
.rk-row.out {
  margin-top: 8px;
}
.rk-pos {
  width: 30px;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink-2);
  flex: none;
}
.rk-pos.top1,
.rk-pos.top2,
.rk-pos.top3 {
  font-size: 22px;
}
.rk-nm {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rk-sc {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  white-space: nowrap;
}
.rk-sc small {
  font-family: var(--ui);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-2);
}
.rk-next,
.rk-closes {
  text-align: center;
  margin: 8px 0 0;
}
.rk-empty {
  padding: 24px 0;
}
.rk-how {
  text-align: center;
  font-size: 13px;
}
.rank-line {
  margin: 12px auto 4px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--foam-2);
  font-weight: 600;
  text-align: center;
  width: fit-content;
  max-width: 100%;
}
.rank-line.done {
  background: #fff4cf;
  box-shadow: inset 0 0 0 2px var(--sun);
  animation: itempop 0.5s var(--ease);
}
.rank-line.muted {
  color: var(--ink-2);
  font-weight: 500;
}
.rank-line .rk-new {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 14px;
  animation: chipbump 0.6s var(--ease) 0.2s both;
}

/* ---------------------------------------------------------------- juice round 1 */
/* course progress pips under the hole name */
.hole-tag .pips {
  display: none;
  gap: 4px;
  margin-top: 5px;
}
.hole-tag .pips.show {
  display: flex;
}
.pip {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.25);
}
.pip.gold {
  background: #ffc42e;
  box-shadow: 0 0 6px rgba(255, 196, 46, 0.6);
}
.pip.silver {
  background: #d6e2e6;
}
.pip.bronze {
  background: #d88a4e;
}
.pip.none {
  background: rgba(255, 255, 255, 0.45);
}
.pip.now {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
  animation: pipnow 1.4s ease-in-out infinite;
}
@keyframes pipnow {
  50% {
    transform: scale(1.35);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
  }
}

/* strokes counter warms up at par and past it */
.score > div:first-child {
  transition: background 0.35s ease;
  border-radius: 16px 0 0 16px;
}
.score.at-par > div:first-child {
  background: rgba(255, 196, 46, 0.28);
}
.score.over-par > div:first-child {
  background: rgba(255, 90, 72, 0.38);
}

/* cinematic hole title during the intro sweep */
.intro-card {
  position: absolute;
  left: 50%;
  top: 31%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  width: calc(100% - 2 * var(--gutter));
}
.intro-card.show {
  animation: cardin 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.intro-card.out {
  animation: cardout 0.35s ease both;
}
.intro-card .hc-k {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fffbe9;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(14, 52, 60, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.intro-card .hc-k em {
  font-style: normal;
  opacity: 0.65;
}
.intro-card .hc-name {
  font-size: clamp(34px, 9vw, 58px);
  line-height: 1.02;
  -webkit-text-stroke-width: 7px;
}
.intro-card .hc-par {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: #123c46;
  background: var(--sun);
  padding: 3px 14px;
  border-radius: 999px;
  box-shadow: 0 3px 0 #d9a21b;
  animation: cardpar 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) 0.35s both;
}
@keyframes cardin {
  from {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes cardout {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -62%) scale(0.96);
  }
}
@keyframes cardpar {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* the big word when the ball drops */
.splash-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.score-splash {
  position: absolute;
  left: 50%;
  top: 36%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}
.score-splash .word {
  position: relative;
  font-size: clamp(42px, 12vw, 86px);
  line-height: 1;
  white-space: nowrap;
  -webkit-text-stroke-width: 9px;
  animation: splashpop 0.55s cubic-bezier(0.2, 1.7, 0.35, 1) both;
}
.score-splash .ch {
  display: inline-block;
  animation: chdrop 0.5s cubic-bezier(0.2, 1.8, 0.4, 1) both;
  animation-delay: calc(var(--i) * 32ms);
}
.score-splash .sub {
  position: relative;
  font-size: 22px;
  -webkit-text-stroke-width: 5px;
  animation: cardpar 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) 0.25s both;
}
.score-splash.out {
  animation: splashout 0.4s ease both;
}
.score-splash.ace .word {
  color: #ffd23f;
  font-size: clamp(48px, 13.5vw, 98px);
}
.score-splash.ace .ch:nth-child(odd) {
  color: #fff3a8;
}
.score-splash.eagle .word {
  color: #d8c4ff;
}
.score-splash.birdie .word {
  color: #8ff0c4;
}
.score-splash.par .word {
  color: #fffbe9;
  font-size: clamp(38px, 10vw, 70px);
}
.score-splash.bogey .word,
.score-splash.over .word {
  color: #ffd9cf;
  font-size: clamp(30px, 8vw, 54px);
}
.score-splash .rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.22) 0 9deg, transparent 9deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%);
  mask: radial-gradient(circle, #000 18%, transparent 62%);
  animation:
    rays 3s linear infinite,
    raysin 0.5s ease both;
}
.score-splash.ace .rays {
  background: repeating-conic-gradient(rgba(255, 214, 70, 0.38) 0 9deg, transparent 9deg 20deg);
  width: 680px;
  height: 680px;
  margin: -340px 0 0 -340px;
}
@keyframes rays {
  to {
    transform: rotate(360deg);
  }
}
@keyframes raysin {
  from {
    opacity: 0;
    scale: 0.3;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}
@keyframes splashpop {
  0% {
    transform: scale(0.2) rotate(-10deg);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(-3deg);
  }
}
@keyframes chdrop {
  0% {
    transform: translateY(-60px) scale(0.6);
  }
  100% {
    transform: none;
  }
}
@keyframes splashout {
  to {
    opacity: 0;
    transform: translate(-50%, -70%) scale(1.08);
  }
}

/* result: chasing the par star, and the next hole calling */
.btn.chase {
  gap: 6px;
}
.btn.chase .star-ico {
  width: 18px;
  height: 18px;
  display: inline-flex;
  color: var(--sun);
}
.btn.chase .star-ico svg {
  fill: currentColor;
}
.btn.next-glow {
  animation: nextglow 1.6s ease-in-out 1.4s infinite;
}
@keyframes nextglow {
  0%,
  100% {
    box-shadow:
      0 4px 0 var(--coral-deep),
      0 0 0 0 rgba(255, 90, 72, 0);
  }
  50% {
    box-shadow:
      0 4px 0 var(--coral-deep),
      0 0 0 8px rgba(255, 90, 72, 0.18);
  }
}

/* the record stamp sits in the sheet's free top-right corner, never over the score words */
.sheet .res-main .stamp {
  right: 6px;
  top: -58px;
}
.course-panel .res-actions .btn {
  white-space: nowrap;
}
.course-panel .res-actions .btn.quiet-dark {
  flex: 0 0 56px;
  padding: 0;
}
@media (max-width: 400px) {
  .course-panel .res-actions .btn {
    font-size: 16px;
    padding: 0 10px;
  }
}

/* ---------------------------------------------------------------- juice round 2 */
/* streak flame next to the hole name */
.streak-chip {
  display: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff9a3c, #ff5a48);
  color: #fff;
  box-shadow:
    0 2px 0 #c43a2c,
    0 0 14px rgba(255, 120, 50, 0.45);
  white-space: nowrap;
}
.streak-chip.show {
  display: inline-block;
}
.streak-chip.bump {
  animation: flamebump 0.6s cubic-bezier(0.2, 1.7, 0.4, 1);
}
@keyframes flamebump {
  0% {
    transform: scale(0.4) rotate(-12deg);
  }
  60% {
    transform: scale(1.25) rotate(4deg);
  }
  100% {
    transform: none;
  }
}
.badge.streak {
  background: linear-gradient(180deg, #ffe1c7, #ffd0b0);
  color: #a3401c;
  font-weight: 700;
}

/* the wallet on the result sheet, and the coins flying into it */
.sheet .res-wallet {
  position: absolute;
  right: 18px;
  top: -18px;
  z-index: 2;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 12px rgba(4, 30, 36, 0.3);
}
.sheet .res-wallet b {
  min-width: 2ch;
  text-align: right;
}
.res-wallet.bump,
.coins-chip.bump {
  animation: chipbump 0.28s var(--ease);
}
.fly-coin {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  pointer-events: none;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
}
.fly-coin .coin-ico {
  width: 22px;
  height: 22px;
  display: block;
}

/* a livelier title: the logo bounces in, Play nudges and shines now and then */
#title.reveal .wordmark {
  animation: wmbounce 0.75s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
@keyframes wmbounce {
  0% {
    transform: scale(0.85) translateY(10px);
  }
  55% {
    transform: scale(1.06) translateY(-4px);
  }
  100% {
    transform: none;
  }
}
#title .btn.big[data-a='play'] {
  position: relative;
  overflow: hidden;
  animation: playnudge 5.5s ease-in-out 2.5s infinite;
}
#title .btn.big[data-a='play']::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-18deg);
  animation: playshine 5.5s ease-in-out 2.5s infinite;
  pointer-events: none;
}
@keyframes playnudge {
  0%,
  84%,
  100% {
    translate: 0 0;
    scale: 1;
  }
  87% {
    translate: 0 -4px;
    scale: 1.035;
  }
  90% {
    translate: 0 0;
    scale: 0.985;
  }
  93% {
    scale: 1.012;
  }
}
@keyframes playshine {
  0%,
  70% {
    left: -60%;
  }
  86%,
  100% {
    left: 130%;
  }
}
#title.splash .btn.big[data-a='play'] {
  animation: none;
}

/* ---------- five courses: compact cards (3 across on wide screens, rows on phones) */
.course-card.ice .cc-art {
  background-color: #bfe2f6;
  background-image: url(../img/course-ice.jpg);
}
.course-card.sky .cc-art {
  background-color: #f6d9ea;
  background-image: url(../img/course-sky.jpg);
}
.course-card.lava .cc-art {
  background-color: #3a1a22;
  background-image: url(../img/course-lava.jpg);
}
.panel.wide:has(.course-cards.n5) {
  width: min(900px, calc(100% - 2 * var(--gutter)));
}
.course-cards.n5 {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.course-cards.n5 .cc-art {
  height: 112px;
}
.course-cards.n5 .cc-body {
  padding: 12px 14px 14px;
  gap: 6px;
}
.course-cards.n5 h3 {
  font-size: 20px;
}
.course-cards.n5 .sub {
  font-size: 13px;
  line-height: 1.35;
}
.course-cards.n5 .cc-meta {
  font-size: 14px;
}
.course-cards.n5 .cc-lock {
  font-size: 13px;
}
.tab-ico {
  font-size: 15px;
  line-height: 1;
}
.tabs .tab {
  flex: 1 0 auto;
}
.seg.course-seg {
  flex-wrap: wrap;
  justify-content: center;
}
.seg.course-seg button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
@media (max-width: 760px) {
  .course-cards.n5 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .course-cards.n5 .course-card {
    flex-direction: row;
    min-height: 118px;
  }
  .course-cards.n5 .cc-art {
    width: 104px;
    height: auto;
    flex: none;
  }
  .course-cards.n5 .cc-body {
    padding: 10px 12px 12px;
    gap: 4px;
    min-width: 0;
  }
  .course-cards.n5 h3 {
    font-size: 18px;
  }
  .course-cards.n5 .sub {
    font-size: 12.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .course-cards.n5 .btn {
    min-height: 40px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
}
.unlock-note.go {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 0 #161f4a;
}
.unlock-note.go:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #161f4a;
}
.unlock-note .go-play {
  flex: none;
  background: #ffd23f;
  color: #3a2a00;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--display);
  font-weight: 700;
  animation: tapPulse 1.4s 1.6s ease-in-out infinite;
}
.next-course {
  width: 100%;
  margin: 0 0 12px;
}

/* ---------- contrast pass: buttons on light panels were foam-on-foam */
.panel .btn:not(.primary),
.sheet .btn:not(.primary):not(.chase),
.course-panel .btn:not(.primary) {
  background: #fff;
  color: var(--ink);
  box-shadow:
    inset 0 0 0 2px var(--ink),
    0 4px 0 var(--ink);
}
.panel .btn:not(.primary):hover,
.sheet .btn:not(.primary):hover {
  background: var(--foam-2);
}
.panel .btn:not(.primary):active,
.sheet .btn:not(.primary):active {
  box-shadow:
    inset 0 0 0 2px var(--ink),
    0 1px 0 var(--ink);
}
.panel .btn.ghost,
.pause-actions .btn.ghost {
  background: #fff;
  box-shadow:
    inset 0 0 0 2px var(--ink),
    0 4px 0 var(--ink);
}
.panel .btn.quiet-dark {
  background: #fff;
}
.panel .btn.danger-btn {
  background: #fff;
  color: var(--coral-deep);
  box-shadow:
    inset 0 0 0 2px var(--coral-deep),
    0 4px 0 var(--coral-deep);
}
.panel .btn.invite-btn {
  background: var(--sun);
  box-shadow:
    inset 0 0 0 2px #9a6b00,
    0 4px 0 #9a6b00;
}
.panel .btn.small:not(.primary) {
  box-shadow:
    inset 0 0 0 2px var(--ink),
    0 3px 0 var(--ink);
}
.panel .btn.primary,
.sheet .btn.primary {
  color: #fff;
  text-shadow: 0 1px 0 rgba(120, 20, 10, 0.35);
  box-shadow:
    0 4px 0 var(--coral-deep),
    0 0 0 2px var(--coral-deep);
}
.sheet .btn.chase {
  background: #fff7d6;
  color: #5a3d00;
  box-shadow:
    inset 0 0 0 2px #b88400,
    0 4px 0 #b88400;
}
/* course cards: Jogar is a solid dark button */
.course-card .btn:not(.primary) {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 0 #0a2830;
}
.course-card .btn:not(.primary):hover {
  background: var(--ink-2);
}
.course-card .btn.primary {
  box-shadow: 0 4px 0 var(--coral-deep);
}
/* seg / tabs: unselected needs an outline */
.seg {
  box-shadow: inset 0 0 0 1.5px #b9d3cc;
}
.seg button {
  color: var(--ink);
}
.tabs .tab:not(.on) {
  color: var(--ink);
}
.link {
  color: #0f6577;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.panel .sub,
.sheet .sub {
  color: #1f4d57;
}

/* next course after a finished course: the big call to action */
.unlock-note.go {
  min-height: 76px;
  padding: 12px 14px 12px 18px;
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.15;
  background: linear-gradient(180deg, #ffd84a, #ffb21c);
  color: #3a2400;
  border-radius: 20px;
  box-shadow:
    0 6px 0 #b87800,
    0 12px 26px rgba(184, 120, 0, 0.35),
    inset 0 0 0 2px rgba(255, 255, 255, 0.55);
  animation:
    pop 0.5s 0.6s var(--ease) both,
    goGlow 1.6s 1.4s ease-in-out infinite;
}
.unlock-note.go:active {
  box-shadow: 0 2px 0 #b87800;
  transform: translateY(4px);
}
.unlock-note .go-play {
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 20px;
  animation: none;
  box-shadow: 0 3px 0 #0a2830;
}
@keyframes goGlow {
  0%,
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.08);
    transform: scale(1.025);
  }
}
.next-course {
  background: var(--ink) !important;
  color: #fff !important;
  box-shadow: 0 5px 0 #0a2830 !important;
  min-height: 60px;
  font-family: var(--display);
  font-size: 20px;
}
@media (prefers-reduced-motion: reduce) {
  .unlock-note.go {
    animation: none;
  }
}
.view-ranking .seg.course-seg button {
  flex: 1 1 30%;
}
@media (max-width: 480px) {
  .scorecard {
    min-width: 0;
    font-size: 13px;
    table-layout: fixed;
  }
  .scorecard th,
  .scorecard td {
    padding: 7px 1px;
  }
  .scorecard tr > :first-child {
    width: 22%;
    padding-left: 6px;
    font-size: 11px;
  }
  .scorecard .sc-head th {
    font-size: 12px;
  }
  .scorecard .sc-strokes td span {
    width: 24px;
    height: 24px;
    font-size: 15px;
  }
  .scorecard tr > th:last-child {
    font-size: 15px;
    width: 13%;
  }
  .scorecard .coin {
    width: 17px;
    height: 17px;
  }
}
/* solo stroke limit + failed hole card */
.score .strokes[data-max]::after {
  content: '/' attr(data-max);
  font-size: 0.52em;
  font-weight: 600;
  opacity: 0.75;
  margin-left: 1px;
}
.sheet.failed .failed-body {
  text-align: center;
  padding: 6px 4px 14px;
}
.sheet.failed .failed-ico {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 6px;
}
.sheet.failed h2 {
  font-family: var(--display);
  font-size: 32px;
  margin: 0 0 8px;
  color: var(--coral-deep);
}
.sheet.failed p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink-2);
}
/* camera turn buttons: bottom corners, hold to rotate */
.cam-rot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(14px + var(--sab));
  display: flex;
  justify-content: space-between;
  padding: 0 calc(12px + var(--sar)) 0 calc(12px + var(--sal));
  pointer-events: none;
  z-index: 6;
}
.rot-btn {
  pointer-events: auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(14, 52, 60, 0.58);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  touch-action: none;
}
.rot-btn svg {
  width: 30px;
  height: 30px;
}
.rot-btn.held,
.rot-btn:active {
  background: rgba(255, 196, 46, 0.9);
  color: var(--ink);
  box-shadow:
    inset 0 0 0 2px #fff,
    0 2px 6px rgba(0, 0, 0, 0.25);
}
@media (hover: hover) and (pointer: fine) {
  .rot-btn {
    width: 46px;
    height: 46px;
    opacity: 0.8;
  }
  .rot-btn svg {
    width: 24px;
    height: 24px;
  }
}
/* new world unlocked */
.panel.world-unlocked {
  position: relative;
  overflow: hidden;
  text-align: center;
  width: min(430px, calc(100% - 2 * var(--gutter)));
  padding: 22px 20px 18px;
  background: linear-gradient(180deg, #fffbe6, #f7fbf6 55%);
  animation: wuPop 0.6s var(--ease) both;
}
@keyframes wuPop {
  0% {
    transform: scale(0.82) translateY(24px);
    opacity: 0;
  }
  60% {
    transform: scale(1.04);
    opacity: 1;
  }
  100% {
    transform: none;
  }
}
.wu-back {
  background: radial-gradient(
    circle at 50% 45%,
    rgba(255, 214, 90, 0.35),
    rgba(5, 20, 28, 0.75) 70%
  );
}
.wu-rays {
  position: absolute;
  left: 50%;
  top: 150px;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  pointer-events: none;
  opacity: 0.55;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 210, 70, 0.55) 0 8deg,
    rgba(255, 210, 70, 0) 8deg 20deg
  );
  -webkit-mask: radial-gradient(circle, #000 5%, transparent 66%);
  mask: radial-gradient(circle, #000 5%, transparent 66%);
  animation: wuSpin 22s linear infinite;
}
@keyframes wuSpin {
  to {
    transform: rotate(360deg);
  }
}
.wu-kicker {
  position: relative;
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b87800;
}
.wu-card {
  position: relative;
  width: min(330px, 86%);
  margin: 0 auto 14px;
  border-radius: 22px;
  box-shadow:
    0 0 0 4px #ffd23f,
    0 0 34px 8px rgba(255, 200, 60, 0.65),
    0 14px 30px rgba(0, 0, 0, 0.28);
  animation: wuGlow 1.8s ease-in-out infinite;
}
.wu-card .cc-art {
  height: 150px;
  border-radius: 22px;
  overflow: hidden;
}
@keyframes wuGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 4px #ffd23f,
      0 0 26px 4px rgba(255, 200, 60, 0.55),
      0 14px 30px rgba(0, 0, 0, 0.28);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 4px #fff0a0,
      0 0 46px 14px rgba(255, 214, 90, 0.85),
      0 14px 30px rgba(0, 0, 0, 0.28);
    transform: scale(1.025);
  }
}
.wu-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.75) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  animation: wuShine 2.4s 0.6s ease-in-out infinite;
}
@keyframes wuShine {
  0% {
    transform: translateX(-120%);
  }
  55%,
  100% {
    transform: translateX(120%);
  }
}
.wu-spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 14px;
  height: 14px;
  pointer-events: none;
  transform: scale(0) rotate(0deg);
  animation: wuSpark 2.2s var(--d) ease-in-out infinite;
  background: #ffe27a;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
@keyframes wuSpark {
  0%,
  100% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  35% {
    transform: scale(var(--s)) rotate(70deg);
    opacity: 1;
  }
  70% {
    transform: scale(calc(var(--s) * 0.4)) rotate(150deg);
    opacity: 0.5;
  }
}
.wu-name {
  position: relative;
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 34px;
  line-height: 1.05;
  color: var(--ink);
}
.wu-sub {
  position: relative;
  margin: 0 8px 16px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink-2);
}
.wu-go {
  position: relative;
  width: 100%;
  min-height: 66px;
  font-size: 26px;
  animation: goGlow 1.5s 1s ease-in-out infinite;
}
.wu-later {
  position: relative;
  margin-top: 8px;
  font-size: 15px;
}
@media (prefers-reduced-motion: reduce) {
  .wu-rays,
  .wu-card,
  .wu-shine,
  .wu-spark,
  .wu-go {
    animation: none;
  }
  .wu-spark {
    transform: scale(0.8);
    opacity: 0.8;
  }
}
body.reduced-motion .wu-rays,
body.reduced-motion .wu-spark,
body.reduced-motion .wu-shine {
  animation: none;
}
