/* Bundled Offline Google Fonts (Baloo 2 & Fredoka — works 100% offline on Web & Android APK) */
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/baloo2-800-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/baloo2-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/fredoka-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/fredoka-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('assets/fonts/fredoka-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('assets/fonts/fredoka-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --native-sat: 0px;
  --native-sat-sides: 0px;
  --native-sar: 0px;
  --native-sab: 0px;
  --native-sal: 0px;
  --sat: max(env(safe-area-inset-top, 0px), var(--native-sat, 0px));
  --sat-sides: var(--native-sat-sides, 0px);
  --sar: max(env(safe-area-inset-right, 0px), var(--native-sar, 0px));
  --sab: max(env(safe-area-inset-bottom, 0px), var(--native-sab, 0px));
  --sal: max(env(safe-area-inset-left, 0px), var(--native-sal, 0px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: #bfcad6;
  font-family: 'Fredoka', 'Arial Rounded MT Bold', 'Segoe UI', system-ui, sans-serif;
  color: #16293a;
  touch-action: none;
}

@media (pointer: fine) and (min-width: 601px) and (min-height: 601px) {
  html,
  body {
    background: radial-gradient(circle at 50% 25%, #1e3348 0%, #0d1824 70%, #081018 100%);
  }
}

.app-shell {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: var(--sat) var(--sar) var(--sab) var(--sal);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (pointer: coarse), (max-width: 600px), (max-height: 600px) {
  .app-shell {
    padding: 0;
  }
}

.app-shell.fullscreen-mode {
  padding: 0;
}

.rink-stage {
  --lpx: 1px;
  --su: 4.61px;
  --hud-web-su: 3.87px;
  --hud-apk-su: 4.24px;
  --shu: 8.19px;
  --upx: 1px;
  --msu: 4.61px;
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #bfcad6;
  touch-action: none;
}

.rink-stage.card-mode {
  border-radius: 24px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    inset 0 0 18px rgba(255, 255, 255, 0.25);
}

#gameCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background: #bfcad6;
  cursor: grab;
  touch-action: none;
}

#gameCanvas:active {
  cursor: grabbing;
}

#topCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 15;
}

/* Top HUD: Left & Right sit up in the top ears with generous breathing room inside the 12% oval rails */
.hud-bar {
  position: absolute;
  top: calc(max(32 * var(--lpx), var(--sat-sides) + 12 * var(--lpx)));
  left: calc(36 * var(--lpx) + var(--sal));
  right: calc(36 * var(--lpx) + var(--sar));
  height: calc(10.0 * var(--su));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  overflow: visible;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.48s ease;
}

.hud-bar.intro-hidden {
  opacity: 0;
}

.hud-bar.intro-hidden .icon-btn,
.hud-bar.intro-hidden .exit-practice-btn {
  pointer-events: none !important;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: calc(0.82 * var(--su));
}

/* On Web (outside Android APK), shrink ONLY left & right top HUD groups (~16%) so they sit airily beside center hearts */
.rink-stage:not(.native-apk) .hud-left,
.rink-stage:not(.native-apk) .hud-right {
  --su: var(--hud-web-su);
}

/* In Android APK, match the same generous breathing room inside the 12% oval corners */
.rink-stage.native-apk .hud-bar {
  top: calc(max(35 * var(--lpx), var(--sat-sides) + 12 * var(--lpx)));
  left: calc(38 * var(--lpx) + var(--sal));
  right: calc(38 * var(--lpx) + var(--sar));
}

.rink-stage.native-apk .hud-left,
.rink-stage.native-apk .hud-right {
  --su: var(--hud-apk-su);
}

.rink-stage.native-apk .hud-center {
  top: calc(max(0px, var(--sat) + 6 * var(--lpx) - max(35 * var(--lpx), var(--sat-sides) + 12 * var(--lpx))));
}

.brand-logo-svg {
  height: calc(7.75 * var(--su));
  width: auto;
  overflow: visible;
  display: block;
}

.logo-layer {
  font-family: 'Baloo 2', 'Fredoka', 'Arial Rounded MT Bold', sans-serif;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.01em;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.logo-rausva-size {
  font-size: 38px;
  letter-spacing: -0.015em;
}

.logo-sub-size {
  font-size: 35px;
}

.logo-seq-rausva {
  opacity: 1;
  transition: opacity 0.55s ease;
}

.logo-seq-ph {
  opacity: 0;
  transition: opacity 0.55s ease;
}

#brandBadge.show-ph .logo-seq-rausva {
  opacity: 0;
}

#brandBadge.show-ph .logo-seq-ph {
  opacity: 1;
}

.logo-lip {
  fill: rgba(255, 255, 255, 0.72);
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 2.5px;
  paint-order: stroke fill;
}

.logo-shade {
  fill: rgba(42, 54, 68, 0.36);
  stroke: rgba(42, 54, 68, 0.36);
  stroke-width: 2.5px;
  paint-order: stroke fill;
}

.logo-carved {
  fill: url(#slotGreyGrad);
  stroke: url(#slotGreyGrad);
  stroke-width: 2.5px;
  paint-order: stroke fill;
}

.hud-center {
  position: absolute;
  left: 50%;
  top: calc(max(0px, var(--sat) + 6 * var(--lpx) - max(32 * var(--lpx), var(--sat-sides) + 12 * var(--lpx))));
  min-height: 100%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(0.62 * var(--su));
}

.hud-right {
  display: flex;
  align-items: center;
  gap: calc(0.85 * var(--su));
}

.hud-pill {
  background: linear-gradient(180deg, rgba(136, 144, 152, 0.88) 0%, rgba(162, 168, 175, 0.82) 100%);
  border: none;
  border-radius: 999px;
  height: calc(6.25 * var(--su));
  padding: 0 calc(1.75 * var(--su));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(0.78 * var(--su));
  min-width: calc(10.8 * var(--su));
  box-shadow:
    inset 2px 2.5px 4px rgba(42, 54, 68, 0.44),
    1px 1.5px 0 rgba(255, 255, 255, 0.65);
}

.hud-icon {
  width: calc(3.3 * var(--su));
  height: calc(3.3 * var(--su));
  flex-shrink: 0;
}

.hud-pill .accent-gold {
  color: #ffe078;
}

.hud-pill .accent-blue {
  color: #7ee2ff;
}

.accent-blue {
  color: #0b84b5;
}

.accent-gold {
  color: #d99116;
}

.accent-teal {
  color: #0e9f88;
}

.accent-coral {
  color: #d63855;
}

.hud-value {
  font-size: calc(3.3 * var(--su));
  font-weight: 900;
  color: #f4f9fd;
  text-shadow: 0 1px 2px rgba(32, 46, 62, 0.50);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.combo-badge {
  background: linear-gradient(180deg, rgba(136, 144, 152, 0.88) 0%, rgba(162, 168, 175, 0.82) 100%);
  color: #f4f9fd;
  text-shadow: 0 1px 2px rgba(32, 46, 62, 0.50);
  font-size: calc(2.65 * var(--su));
  font-weight: 900;
  padding: calc(0.46 * var(--su)) calc(1.98 * var(--su)) calc(0.46 * var(--su)) calc(1.55 * var(--su));
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: calc(0.46 * var(--su));
  box-shadow:
    inset 2px 2.5px 4px rgba(42, 54, 68, 0.44),
    1px 1.5px 0 rgba(255, 255, 255, 0.65);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-variant-numeric: tabular-nums;
}

.combo-icon {
  width: calc(2.75 * var(--su));
  height: calc(2.75 * var(--su));
  color: #7ee2ff;
}

.combo-badge.hot .combo-icon {
  color: #ff758f;
}

.combo-badge.pop {
  transform: scale(1.25);
}

.lives-row {
  display: flex;
  gap: calc(0.45 * var(--su));
  align-items: center;
  justify-content: center;
}

.heart {
  width: calc(2.98 * var(--su));
  height: calc(2.98 * var(--su));
  color: rgba(115, 138, 158, 0.34);
  transition: transform 0.25s ease, color 0.25s ease;
}

.heart.active {
  color: #c93b55;
}

.heart.lost {
  transform: scale(0.75);
}

.heart.heal-pop {
  animation: heartHealPop 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heartHealPop {
  0% { transform: scale(0.75); }
  55% { transform: scale(1.42); }
  100% { transform: scale(1); }
}

.icon-btn {
  pointer-events: auto;
  width: calc(7.1 * var(--su));
  height: calc(7.1 * var(--su));
  border-radius: 50%;
  border: none;
  background: linear-gradient(180deg, rgba(136, 144, 152, 0.88) 0%, rgba(162, 168, 175, 0.82) 100%);
  box-shadow:
    inset 2px 2.5px 4px rgba(42, 54, 68, 0.44),
    1px 1.5px 0 rgba(255, 255, 255, 0.65);
  color: #f4f9fd;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.icon-btn.active-practice {
  background: linear-gradient(135deg, #1094cc 0%, #06b0e2 100%);
  box-shadow:
    0 3px 10px rgba(8, 148, 208, 0.42),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.72);
  color: #ffffff;
}

.icon-btn:active {
  transform: scale(0.92);
}

.btn-svg {
  width: calc(3.8 * var(--su));
  height: calc(3.8 * var(--su));
}

/* Practice Mode Top HUD Elements */
.lives-row.hidden,
.combo-badge.hidden,
.hud-pill.hidden,
.practice-inf-badge.hidden,
.exit-practice-btn.hidden,
.practice-normal-btn.hidden {
  display: none !important;
}

.practice-inf-badge {
  background: linear-gradient(180deg, rgba(136, 144, 152, 0.88) 0%, rgba(162, 168, 175, 0.82) 100%);
  border-radius: 999px;
  padding: calc(1.15 * var(--su)) calc(2.7 * var(--su));
  display: inline-flex;
  align-items: center;
  gap: calc(1.3 * var(--su));
  box-shadow:
    inset 2px 2.5px 4px rgba(42, 54, 68, 0.44),
    1px 1.5px 0 rgba(255, 255, 255, 0.65);
}

.prac-heart-svg {
  width: calc(3.48 * var(--su));
  height: calc(3.48 * var(--su));
  color: #e6425e;
}

.prac-inf-svg {
  width: calc(4.35 * var(--su));
  height: calc(4.35 * var(--su));
  color: #f4f9fd;
}

.exit-practice-btn {
  pointer-events: auto;
  height: calc(7.1 * var(--su));
  padding: 0 calc(2.65 * var(--su));
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, #1094cc 0%, #06b0e2 100%);
  box-shadow:
    0 4px 12px rgba(8, 140, 196, 0.36),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.65);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: calc(1.1 * var(--su));
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease;
}

.exit-practice-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(8, 150, 212, 0.48);
}

.exit-practice-btn:active {
  transform: scale(0.93);
}

.exit-crown-svg {
  width: calc(3.68 * var(--su));
  height: calc(3.68 * var(--su));
  color: #ffe078;
}

.exit-play-svg {
  width: calc(3.45 * var(--su));
  height: calc(3.45 * var(--su));
  color: #ffffff;
}

.hidden-icon {
  display: none;
}

/* Wordless Reset-to-Tee Circular Symbol Button (Recessed Ice Slot Style) */
.tee-btn {
  position: absolute;
  bottom: calc(max(30 * var(--lpx), var(--sab) + 12 * var(--lpx)));
  left: calc(30 * var(--lpx) + var(--sal));
  z-index: 10;
  width: calc(9.3 * var(--su));
  height: calc(9.3 * var(--su));
  border-radius: 50%;
  border: none;
  background: linear-gradient(180deg, rgba(136, 144, 152, 0.88) 0%, rgba(162, 168, 175, 0.82) 100%);
  color: #f4f9fd;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow:
    inset 2px 2.5px 4px rgba(42, 54, 68, 0.44),
    1px 1.5px 0 rgba(255, 255, 255, 0.65);
  transition: opacity 0.2s ease, transform 0.12s ease;
}

.tee-btn svg {
  width: 52%;
  height: 52%;
}

.tee-btn:active {
  transform: scale(0.92);
}

.tee-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Wordless Pure-Symbol Game Over Modal (Frosted Ice / Glassmorphism — stage-responsive!) */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(154, 182, 206, 0.44);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(4.2 * var(--su));
  z-index: 30;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: calc(354 * var(--upx));
  max-height: calc(660 * var(--upx));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  background: linear-gradient(155deg, rgba(236, 247, 255, 0.94) 0%, rgba(202, 226, 245, 0.90) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.82);
  border-radius: calc(26 * var(--upx));
  padding: calc(22 * var(--upx)) calc(19 * var(--upx)) calc(18 * var(--upx));
  text-align: center;
  box-shadow:
    0 20px 46px rgba(12, 34, 56, 0.24),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.88),
    inset 0 -1.5px 3px rgba(120, 165, 202, 0.24);
}

.modal-header-symbols {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: calc(3.2 * var(--msu));
}

.finish-hero-logo {
  width: min(88%, calc(54 * var(--msu)));
  height: auto;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(2.1 * var(--msu));
  margin-bottom: calc(3.6 * var(--msu));
}

.stat-box {
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65);
  border-radius: calc(3.4 * var(--msu));
  padding: calc(2.4 * var(--msu)) calc(2.0 * var(--msu));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(1.6 * var(--msu));
}

.stat-icon {
  width: calc(4.2 * var(--msu));
  height: calc(4.2 * var(--msu));
  flex-shrink: 0;
}

.stat-num {
  font-size: calc(4.4 * var(--msu));
  font-weight: 900;
  color: #102a42;
  font-variant-numeric: tabular-nums;
}

.stat-num.highlight {
  color: #097aa8;
}

/* =========================================================
   OSAKKI-STYLE 4 CIRCULAR FINISH ACTION BUTTONS
   ========================================================= */
.finish-actions-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(2.5 * var(--msu));
  width: 100%;
  margin: 4px 0 2px;
}

.finish-circle-btn {
  width: calc(11.2 * var(--msu));
  height: calc(11.2 * var(--msu));
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.finish-circle-btn:active {
  transform: scale(0.91) !important;
}

.finish-svg {
  width: calc(5.1 * var(--msu));
  height: calc(5.1 * var(--msu));
  display: block;
  transition: transform 0.32s ease;
}

/* 1. Profile / Settings (Cyan) */
.finish-btn-profile {
  background: radial-gradient(circle, rgba(12, 168, 224, 0.28) 0%, rgba(12, 168, 224, 0.10) 72%, rgba(255, 255, 255, 0.25) 100%);
  border: 2px solid rgba(14, 152, 212, 0.72);
  box-shadow: 0 6px 16px rgba(10, 138, 196, 0.26), inset 0 1px 2px rgba(255, 255, 255, 0.75);
  color: #0872a6;
}

.finish-btn-profile:hover {
  transform: scale(1.12) rotate(45deg);
  border-color: #0a8fd0;
  box-shadow: 0 8px 22px rgba(10, 150, 214, 0.48), inset 0 0 10px rgba(255, 255, 255, 0.8);
}

/* 2. Share (Emerald) */
.finish-btn-share {
  background: radial-gradient(circle, rgba(16, 204, 136, 0.28) 0%, rgba(16, 204, 136, 0.10) 72%, rgba(255, 255, 255, 0.25) 100%);
  border: 2px solid rgba(14, 178, 118, 0.72);
  box-shadow: 0 6px 16px rgba(14, 168, 112, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.75);
  color: #097c54;
}

.finish-btn-share:hover {
  transform: scale(1.12);
  border-color: #0db87a;
  box-shadow: 0 8px 22px rgba(14, 184, 122, 0.48), inset 0 0 10px rgba(255, 255, 255, 0.8);
}

/* 3. Leaderboard (Gold) */
.finish-btn-leaderboard {
  background: radial-gradient(circle, rgba(245, 182, 24, 0.32) 0%, rgba(245, 182, 24, 0.10) 72%, rgba(255, 255, 255, 0.25) 100%);
  border: 2px solid rgba(218, 150, 12, 0.76);
  box-shadow: 0 6px 16px rgba(212, 146, 12, 0.26), inset 0 1px 2px rgba(255, 255, 255, 0.75);
  color: #966004;
}

.finish-btn-leaderboard:hover {
  transform: scale(1.12) translateY(-2px);
  border-color: #e09b0c;
  box-shadow: 0 8px 22px rgba(226, 158, 14, 0.50), inset 0 0 10px rgba(255, 255, 255, 0.8);
}

/* 4. Restart / Play (Vibrant Ice Blue) */
.finish-btn-restart {
  background: linear-gradient(135deg, #1094cc 0%, #06b0e2 100%);
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(8, 140, 196, 0.42), inset 0 1px 2px rgba(255, 255, 255, 0.65);
  color: #ffffff;
}

.finish-btn-restart:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 26px rgba(8, 150, 212, 0.58);
}

.finish-btn-restart:hover .restart-spin-svg {
  transform: rotate(180deg);
}

.finish-btn-restart .restart-spin-svg {
  width: calc(5.7 * var(--msu));
  height: calc(5.7 * var(--msu));
}

.ph-mini-circle {
  width: calc(44 * var(--upx));
  height: calc(44 * var(--upx));
}

.ph-mini-circle .finish-svg {
  width: calc(21 * var(--upx));
  height: calc(21 * var(--upx));
}

/* =========================================================
   PROFILE, LEADERBOARD & SHARE SUB-MODALS
   (Unified Frosted-Ice Glassmorphism matching Finish Menu)
   ========================================================= */

/* Smoothly fade Finish menu behind active sub-menu so both share identical single-layer frosted ice over the rink */
.rink-stage.submodal-active .modal-backdrop {
  display: none !important;
}

.submodal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(154, 182, 206, 0.44);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(14 * var(--upx)) calc(12 * var(--upx));
}

.submodal-backdrop.hidden {
  display: none !important;
}

.submodal-card {
  width: 100%;
  max-width: calc(376 * var(--upx));
  max-height: calc(672 * var(--upx));
  background: linear-gradient(155deg, rgba(238, 248, 255, 0.95) 0%, rgba(204, 228, 246, 0.91) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.84);
  border-radius: calc(25 * var(--upx));
  box-shadow:
    0 20px 46px rgba(12, 34, 56, 0.24),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.88),
    inset 0 -1.5px 3px rgba(120, 165, 202, 0.24);
  color: #102a42;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#profileModal .submodal-card {
  max-width: calc(384 * var(--upx));
}

.submodal-card.ph-lb-card {
  max-width: calc(386 * var(--upx));
  max-height: calc(668 * var(--upx));
}

.submodal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(13 * var(--upx)) calc(16 * var(--upx)) calc(11 * var(--upx));
  border-bottom: 1px solid rgba(255, 255, 255, 0.52);
  flex-shrink: 0;
}

.submodal-header-left {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--upx));
}

.submodal-badge,
.submodal-privacy-link {
  width: calc(38 * var(--upx));
  height: calc(38 * var(--upx));
  border-radius: calc(13 * var(--upx));
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
}

.submodal-privacy-link {
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.submodal-privacy-link:hover {
  background: rgba(255, 255, 255, 0.68);
  transform: translateY(-1px);
}

.submodal-close-btn {
  width: calc(37 * var(--upx));
  height: calc(37 * var(--upx));
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.78);
  color: #264866;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.submodal-close-btn svg {
  width: calc(17.5 * var(--upx));
  height: calc(17.5 * var(--upx));
}

.submodal-close-btn:hover {
  background: rgba(201, 59, 85, 0.16);
  border-color: rgba(201, 59, 85, 0.52);
  color: #c93b55;
  transform: rotate(90deg);
}

.submodal-close-btn:active {
  transform: scale(0.91);
}

.submodal-body {
  padding: calc(14 * var(--upx)) calc(16 * var(--upx)) calc(17 * var(--upx));
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(88, 132, 168, 0.36) transparent;
  display: flex;
  flex-direction: column;
  gap: calc(11 * var(--upx));
}

.submodal-body::-webkit-scrollbar {
  width: calc(4 * var(--upx));
}

.submodal-body::-webkit-scrollbar-track {
  background: transparent;
}

.submodal-body::-webkit-scrollbar-thumb {
  background: rgba(88, 132, 168, 0.34);
  border-radius: 999px;
}

/* Profile Country Flag Avatar (Frosted Crystal Ring) */
.ph-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: calc(3 * var(--upx));
}

.ph-avatar-frame {
  width: calc(88 * var(--upx));
  height: calc(88 * var(--upx));
  border-radius: 50%;
  border: calc(3.2 * var(--upx)) solid rgba(255, 255, 255, 0.90);
  background: rgba(226, 241, 252, 0.65);
  box-shadow:
    0 8px 20px rgba(12, 34, 56, 0.18),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.90);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ph-avatar-flag {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.flag-tr,
img[src*="/tr.png"] {
  object-position: 28% center !important;
}

/* Frosted Ice Rows (Exact Material Match to Finish Menu .stat-box) */
.ph-stat-row,
.ph-split-row,
.ph-audio-row {
  width: 100%;
  min-height: calc(52 * var(--upx));
  background: rgba(255, 255, 255, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.74);
  border-radius: calc(16 * var(--upx));
  padding: calc(10 * var(--upx)) calc(14 * var(--upx));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(9 * var(--upx));
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#profileModal .stat-icon {
  width: calc(21 * var(--upx));
  height: calc(21 * var(--upx));
}

.ph-name-box input {
  flex: 1;
  min-width: 0;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #102a42;
  font-family: inherit;
  font-size: calc(18.5 * var(--upx));
  font-weight: 800;
  text-align: center;
  user-select: text;
  -webkit-user-select: text;
}

.ph-name-box input::placeholder {
  color: rgba(16, 42, 66, 0.38);
}

.ph-name-box.is-valid {
  border-color: rgba(14, 168, 112, 0.72);
  background: rgba(226, 252, 240, 0.56);
  box-shadow: 0 4px 12px rgba(14, 168, 112, 0.14), inset 0 1px 1px rgba(255, 255, 255, 0.82);
}

.ph-name-box.is-valid input {
  color: #087a52;
}

.ph-name-box.is-invalid {
  border-color: rgba(201, 59, 85, 0.74);
  background: rgba(255, 230, 236, 0.58);
  box-shadow: 0 4px 12px rgba(201, 59, 85, 0.14), inset 0 1px 1px rgba(255, 255, 255, 0.82);
}

.ph-name-box.is-invalid input {
  color: #b82540;
}

.ph-name-box.is-scanning {
  border-color: rgba(11, 132, 181, 0.68);
  background: rgba(232, 246, 255, 0.56);
}

.ph-spin-icon {
  width: calc(18 * var(--upx));
  height: calc(18 * var(--upx));
  color: #0b84b5;
  animation: phSpin 0.75s linear infinite;
}

@keyframes phSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ph-status-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #486b88;
}

.ph-status-svg svg {
  width: calc(18 * var(--upx));
  height: calc(18 * var(--upx));
}

.ph-ok-svg {
  color: #0b9b68;
}

.ph-err-svg {
  color: #c93b55;
}

.ph-row-action {
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3f6280;
  flex-shrink: 0;
}

.ph-copy-slot {
  width: calc(32 * var(--upx));
  height: calc(32 * var(--upx));
  border-radius: calc(10 * var(--upx));
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.68);
  color: #2f5473;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ph-copy-slot svg {
  width: calc(17 * var(--upx));
  height: calc(17 * var(--upx));
}

.ph-id-row {
  cursor: pointer;
}

.ph-id-row:hover {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(255, 255, 255, 0.82);
}

.ph-id-text {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: calc(16 * var(--upx));
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #097aa8;
  white-space: nowrap;
}

.ph-split-col {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(7 * var(--upx));
}

.ph-split-divider {
  width: 1px;
  height: calc(25 * var(--upx));
  background: rgba(128, 162, 192, 0.38);
  flex-shrink: 0;
}

.ph-score-txt {
  font-size: calc(21 * var(--upx));
  font-weight: 900;
  color: #102a42;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ph-date-txt {
  font-size: calc(15 * var(--upx));
  font-weight: 800;
  color: #2b4c68;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ph-audio-row {
  justify-content: center;
  gap: calc(13 * var(--upx));
}

.ph-switch {
  position: relative;
  display: inline-block;
  width: calc(52 * var(--upx));
  height: calc(29 * var(--upx));
  flex-shrink: 0;
  cursor: pointer;
}

.ph-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ph-slider {
  position: absolute;
  inset: 0;
  background: rgba(142, 166, 188, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1.5px 3px rgba(24, 48, 72, 0.18);
  border-radius: 999px;
  transition: 0.22s ease;
}

.ph-slider::before {
  content: '';
  position: absolute;
  width: calc(23 * var(--upx));
  height: calc(23 * var(--upx));
  left: calc(2 * var(--upx));
  bottom: calc(2 * var(--upx));
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(16, 42, 66, 0.25);
  transition: 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ph-switch input:checked + .ph-slider {
  background: linear-gradient(135deg, #1094cc 0%, #06b0e2 100%);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(8, 148, 208, 0.30);
}

.ph-switch input:checked + .ph-slider::before {
  transform: translateX(calc(23 * var(--upx)));
  background: #ffffff;
}

.ph-prof-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(7 * var(--upx));
  margin-top: calc(4 * var(--upx));
  padding-top: calc(12 * var(--upx));
  border-top: 1px solid rgba(155, 184, 208, 0.38);
}

.ph-prof-studio {
  width: calc(44 * var(--upx));
  height: calc(44 * var(--upx));
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.78);
  border-radius: calc(14 * var(--upx));
  padding: calc(6 * var(--upx));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
}

.ph-prof-studio:hover {
  background: rgba(255, 255, 255, 0.65);
  transform: scale(1.08);
}

.ph-prof-studio img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.8));
}

.ph-ver-pill {
  flex: 1;
  min-width: 0;
  height: calc(44 * var(--upx));
  padding: 0 calc(8 * var(--upx));
  border-radius: calc(14 * var(--upx));
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(5 * var(--upx));
  font-size: calc(15 * var(--upx));
  font-weight: 800;
  color: #244562;
  white-space: nowrap;
}

#profileModal .stat-icon.ph-ver-icon,
.stat-icon.ph-ver-icon {
  width: calc(16 * var(--upx));
  height: calc(16 * var(--upx));
}

/* =========================================================
   FROSTED ICE TOP-3 PODIUM & TOP-12 LEADERBOARD
   ========================================================= */
.ph-lb-scroll {
  padding: calc(13 * var(--upx)) calc(14 * var(--upx)) calc(16 * var(--upx));
}

.ph-podium-arena {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: calc(8 * var(--upx));
  width: 100%;
  margin: calc(26 * var(--upx)) auto calc(10 * var(--upx));
}

.ph-podium {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: calc(122 * var(--upx));
  min-width: 0;
}

.ph-crown {
  position: absolute;
  top: calc(-27 * var(--upx));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  animation: phCrownFloat 2.4s ease-in-out infinite;
}

.ph-crown svg {
  width: calc(28 * var(--upx));
  height: calc(28 * var(--upx));
}

@keyframes phCrownFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(calc(-4 * var(--upx))); }
}

.ph-podium-avatar-wrap {
  position: relative;
  margin-bottom: calc(7 * var(--upx));
  display: flex;
  justify-content: center;
}

.ph-podium-avatar {
  border-radius: 50%;
  background: rgba(230, 243, 252, 0.8);
  border: calc(2.8 * var(--upx)) solid var(--podium-color);
  box-shadow: 0 5px 14px var(--podium-glow), inset 0 1px 2px rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.ph-podium-avatar img,
.ph-lb-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.ph-podium-rank-badge {
  position: absolute;
  bottom: calc(-2 * var(--upx));
  right: calc(-2 * var(--upx));
  width: calc(23 * var(--upx));
  height: calc(23 * var(--upx));
  border-radius: 50%;
  background: var(--podium-color);
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  color: #ffffff;
  font-size: calc(12.5 * var(--upx));
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(12, 34, 56, 0.25);
}

.ph-podium-base {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: calc(9.5 * var(--upx)) calc(4 * var(--upx)) calc(8.5 * var(--upx));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.64) 0%, rgba(214, 234, 250, 0.44) 100%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-top: calc(4 * var(--upx)) solid var(--podium-color);
  border-radius: calc(16 * var(--upx)) calc(16 * var(--upx)) calc(11 * var(--upx)) calc(11 * var(--upx));
  box-shadow:
    0 8px 18px rgba(12, 34, 56, 0.10),
    inset 0 8px 16px -6px var(--podium-glow),
    inset 0 1px 1px rgba(255, 255, 255, 0.85);
}

.ph-podium-name {
  font-size: calc(13 * var(--upx));
  line-height: 1.24;
  font-weight: 800;
  color: #102a42;
  width: 100%;
  max-width: 96%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  margin-bottom: calc(6 * var(--upx));
}

.ph-podium-score {
  font-size: calc(12 * var(--upx));
  line-height: 1.15;
  font-weight: 900;
  padding: calc(3.5 * var(--upx)) calc(8.5 * var(--upx));
  border-radius: calc(11 * var(--upx));
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid var(--podium-color);
  color: var(--podium-text);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.ph-podium-score svg,
.ph-lb-score-pill svg {
  width: calc(13.5 * var(--upx));
  height: calc(13.5 * var(--upx));
  margin-right: calc(3.5 * var(--upx)) !important;
  flex-shrink: 0;
}

.ph-rank-1 {
  --podium-color: #e09b0c;
  --podium-glow: rgba(245, 182, 24, 0.34);
  --podium-text: #8c5800;
  order: 2;
}
.ph-rank-1 .ph-podium-avatar { width: calc(65 * var(--upx)); height: calc(65 * var(--upx)); }
.ph-rank-1 .ph-podium-base { min-height: calc(94 * var(--upx)); }

.ph-rank-2 {
  --podium-color: #0b95cc;
  --podium-glow: rgba(14, 168, 224, 0.30);
  --podium-text: #07658f;
  order: 1;
}
.ph-rank-2 .ph-podium-avatar { width: calc(53 * var(--upx)); height: calc(53 * var(--upx)); }
.ph-rank-2 .ph-podium-base { min-height: calc(80 * var(--upx)); }

.ph-rank-3 {
  --podium-color: #cf3653;
  --podium-glow: rgba(214, 56, 85, 0.28);
  --podium-text: #9c1f38;
  order: 3;
}
.ph-rank-3 .ph-podium-avatar { width: calc(53 * var(--upx)); height: calc(53 * var(--upx)); }
.ph-rank-3 .ph-podium-base { min-height: calc(68 * var(--upx)); }

.ph-lb-list {
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--upx));
}

.ph-lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10.5 * var(--upx)) calc(13 * var(--upx));
  border-radius: calc(16 * var(--upx));
  background: rgba(255, 255, 255, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.74);
}

.ph-lb-my-row {
  background: linear-gradient(90deg, rgba(16, 168, 228, 0.24) 0%, rgba(255, 255, 255, 0.56) 100%);
  border-color: rgba(12, 148, 208, 0.72);
  box-shadow: 0 4px 14px rgba(12, 148, 208, 0.16), inset 0 1px 1px rgba(255, 255, 255, 0.82);
}

.ph-lb-player-banner {
  background: linear-gradient(90deg, rgba(245, 182, 24, 0.24) 0%, rgba(255, 255, 255, 0.58) 100%);
  border-color: rgba(218, 150, 12, 0.72);
}

.ph-lb-divider {
  text-align: center;
  color: rgba(44, 82, 114, 0.55);
  font-size: calc(13 * var(--upx));
  letter-spacing: calc(4 * var(--upx));
}

.ph-lb-left {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--upx));
  min-width: 0;
  flex: 1;
}

.ph-lb-rank {
  width: calc(25 * var(--upx));
  font-size: calc(14.5 * var(--upx));
  font-weight: 900;
  color: #466885;
  text-align: center;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.ph-lb-my-row .ph-lb-rank {
  color: #0872a6;
}

.ph-lb-avatar-box {
  width: calc(35 * var(--upx));
  height: calc(35 * var(--upx));
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 6px rgba(12, 34, 56, 0.15);
  overflow: hidden;
  flex-shrink: 0;
}

.ph-lb-name {
  font-size: calc(15 * var(--upx));
  font-weight: 800;
  color: #102a42;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-lb-score-pill {
  font-size: calc(13 * var(--upx));
  font-weight: 900;
  color: #8c5800;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(217, 145, 22, 0.50);
  padding: calc(4.5 * var(--upx)) calc(10 * var(--upx));
  border-radius: calc(11 * var(--upx));
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   FROSTED ICE SHARE MODAL
   ========================================================= */
.ph-share-banner-wrap {
  width: 100%;
  border-radius: calc(16 * var(--upx));
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 18px rgba(12, 34, 56, 0.12);
}

#shareBannerImg {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.ph-share-score-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(8 * var(--upx));
  background: rgba(255, 255, 255, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.75);
  border-radius: calc(16 * var(--upx));
  padding: calc(10 * var(--upx));
  font-size: calc(22 * var(--upx));
  font-weight: 900;
  color: #102a42;
  font-variant-numeric: tabular-nums;
}

.stat-icon.ph-share-crown-icon {
  width: calc(22 * var(--upx));
  height: calc(22 * var(--upx));
}

.ph-share-link-box {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--upx));
  background: rgba(255, 255, 255, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.75);
  border-radius: calc(16 * var(--upx));
  padding: calc(8 * var(--upx)) calc(10 * var(--upx)) calc(8 * var(--upx)) calc(12 * var(--upx));
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.stat-icon.ph-share-link-icon {
  width: calc(17 * var(--upx));
  height: calc(17 * var(--upx));
}

.ph-share-link-box:hover {
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(255, 255, 255, 0.85);
}

.ph-share-url {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: calc(12.5 * var(--upx));
  font-weight: 800;
  color: #1c4464;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-share-copy {
  width: calc(28 * var(--upx));
  height: calc(28 * var(--upx));
  border-radius: calc(9 * var(--upx));
}

.ph-share-btns {
  display: flex;
  gap: calc(10 * var(--upx));
  margin-top: calc(2 * var(--upx));
}

.ph-share-native {
  flex: 1;
  height: calc(46 * var(--upx));
  border: 1.5px solid rgba(255, 255, 255, 0.82);
  border-radius: calc(16 * var(--upx));
  background: linear-gradient(135deg, #1094cc 0%, #06b0e2 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(8, 140, 196, 0.34), inset 0 1px 2px rgba(255, 255, 255, 0.55);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease;
}

.ph-share-native svg {
  width: calc(22 * var(--upx));
  height: calc(22 * var(--upx));
}

.ph-share-native:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 22px rgba(8, 150, 212, 0.46);
}

.ph-share-wa {
  flex: 1;
  height: calc(46 * var(--upx));
  border: 1.5px solid rgba(255, 255, 255, 0.80);
  border-radius: calc(16 * var(--upx));
  background: linear-gradient(135deg, #22c35e 0%, #109868 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(18, 168, 108, 0.30), inset 0 1px 2px rgba(255, 255, 255, 0.50);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease;
}

.ph-share-wa svg {
  width: calc(24 * var(--upx));
  height: calc(24 * var(--upx));
}

.ph-share-wa:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 22px rgba(18, 178, 114, 0.42);
}

.ph-share-native:active,
.ph-share-wa:active {
  transform: scale(0.95);
}

/* =========================================================
   FROSTED ICE TRAINING / PRACTICE MODAL
   ========================================================= */
.prac-header-pill {
  display: inline-flex;
  align-items: center;
  gap: calc(6 * var(--upx));
  padding: calc(5 * var(--upx)) calc(12 * var(--upx));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.prac-header-pill svg:first-child {
  width: calc(16 * var(--upx));
  height: calc(16 * var(--upx));
}

.prac-header-pill svg:last-child {
  width: calc(20 * var(--upx));
  height: calc(20 * var(--upx));
}

.practice-shapes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(8 * var(--upx));
}

.practice-shape-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: calc(15 * var(--upx));
  background: rgba(255, 255, 255, 0.38);
  border: 1.5px solid rgba(255, 255, 255, 0.68);
  box-shadow:
    0 6px 14px rgba(12, 34, 56, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(5 * var(--upx));
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.practice-shape-card:hover {
  transform: translateY(-2px) scale(1.03);
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(14, 152, 212, 0.68);
}

.practice-shape-card:active {
  transform: scale(0.95);
}

.practice-shape-card.selected {
  background: linear-gradient(155deg, rgba(224, 246, 255, 0.72) 0%, rgba(255, 255, 255, 0.58) 100%);
  border: 2px solid #0b95cc;
  box-shadow:
    0 8px 20px rgba(11, 149, 204, 0.24),
    inset 0 1px 2px rgba(255, 255, 255, 0.90);
}

.practice-shape-card canvas {
  width: 88%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  pointer-events: none;
}

.practice-motion-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(8 * var(--upx));
  margin-top: calc(2 * var(--upx));
}

.practice-motion-btn {
  height: calc(42 * var(--upx));
  border-radius: calc(14 * var(--upx));
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.75);
  color: #2b4e6c;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.practice-motion-btn svg {
  width: calc(20 * var(--upx));
  height: calc(20 * var(--upx));
}

.practice-motion-btn:hover {
  background: rgba(255, 255, 255, 0.55);
}

.practice-motion-btn.active {
  background: linear-gradient(135deg, rgba(16, 148, 204, 0.22) 0%, rgba(255, 255, 255, 0.62) 100%);
  border: 1.5px solid #0b95cc;
  color: #076b99;
  box-shadow: 0 4px 12px rgba(11, 149, 204, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.85);
}

.practice-normal-btn {
  width: 100%;
  height: calc(46 * var(--upx));
  margin-top: calc(2 * var(--upx));
  border-radius: calc(15 * var(--upx));
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, #1094cc 0%, #06b0e2 100%);
  box-shadow:
    0 8px 20px rgba(8, 140, 196, 0.36),
    inset 0 1px 2px rgba(255, 255, 255, 0.62);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(10 * var(--upx));
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease;
}

.practice-normal-btn svg {
  width: calc(19 * var(--upx));
  height: calc(19 * var(--upx));
}

.practice-normal-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 24px rgba(8, 150, 212, 0.48);
}

.practice-normal-btn:active {
  transform: scale(0.96);
}

.prac-norm-icons {
  display: inline-flex;
  align-items: center;
  gap: calc(4 * var(--upx));
}

.prac-norm-heart {
  color: #ff8fa3;
}

.prac-norm-num {
  font-size: calc(16 * var(--upx));
  font-weight: 900;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.prac-norm-sep {
  width: 1px;
  height: calc(18 * var(--upx));
  background: rgba(255, 255, 255, 0.42);
}

.prac-norm-crown {
  color: #ffe078;
}

.modal-brand-footer {
  margin-top: calc(15 * var(--upx));
  padding-top: calc(12 * var(--upx));
  border-top: 1px solid rgba(155, 184, 208, 0.38);
  display: flex;
  justify-content: center;
}

.studio-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: calc(4 * var(--upx)) calc(10 * var(--upx));
  border-radius: calc(12 * var(--upx));
  opacity: 0.78;
  transition: opacity 0.18s ease, transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.studio-link:hover {
  opacity: 1;
  transform: scale(1.08);
}

.studio-link:active {
  transform: scale(0.95);
}

.studio-logo-img {
  height: calc(28 * var(--upx));
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.8));
}

/* =========================================================
   FROSTED ICE CUSTOMIZATION SHOP (PUCK SKINS & MALLETS)
   ========================================================= */
.ph-dual-banners {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: calc(10 * var(--upx));
  align-items: stretch;
}

.ph-dual-banners .ph-audio-row {
  min-height: calc(55 * var(--upx));
  padding: calc(6 * var(--upx)) calc(8 * var(--upx));
  justify-content: center;
  gap: calc(11 * var(--upx));
}

.ph-shop-open-btn {
  width: 100%;
  min-height: calc(55 * var(--upx));
  cursor: pointer;
  justify-content: center;
  gap: calc(8 * var(--upx));
  padding: calc(4 * var(--upx)) calc(6 * var(--upx));
  overflow: hidden;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.74);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.18s ease, border-color 0.18s ease;
}

.ph-shop-open-btn:hover {
  transform: translateY(-1px) scale(1.015);
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(14, 152, 212, 0.56);
}

.ph-shop-open-btn:active {
  transform: scale(0.97);
}

#profileModal .stat-icon.ph-shop-bag-icon,
.stat-icon.ph-shop-bag-icon {
  flex-shrink: 0;
  width: calc(26 * var(--upx));
  height: calc(26 * var(--upx));
}

.ph-shop-equipped-strip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(3 * var(--upx));
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
}

.ph-shop-equipped-strip canvas {
  width: calc(39 * var(--upx));
  height: calc(39 * var(--upx));
  aspect-ratio: 1 / 1;
  display: block;
  pointer-events: none;
}

.submodal-card.ph-shop-card-modal {
  max-width: calc(374 * var(--upx));
}

.ph-shop-back-btn {
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.16s ease;
}

.ph-shop-back-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.72);
}

.ph-shop-tabs {
  display: inline-flex;
  align-items: center;
  gap: calc(4 * var(--upx));
  padding: calc(4 * var(--upx));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 2px rgba(18, 48, 76, 0.08);
}

.ph-shop-tab {
  min-width: calc(54 * var(--upx));
  height: calc(32 * var(--upx));
  padding: 0 calc(13 * var(--upx));
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #3a607e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.ph-shop-tab svg {
  width: calc(19 * var(--upx));
  height: calc(19 * var(--upx));
}

.ph-shop-tab:hover {
  color: #103552;
}

.ph-shop-tab.active {
  background: linear-gradient(135deg, #1094cc 0%, #06b0e2 100%);
  border-color: rgba(255, 255, 255, 0.86);
  color: #ffffff;
  box-shadow: 0 4px 11px rgba(8, 144, 204, 0.32);
}

.ph-shop-body {
  overflow-y: auto;
}

.ph-shop-hero {
  position: relative;
  width: 100%;
  border-radius: calc(16 * var(--upx));
  background: linear-gradient(180deg, rgba(226, 242, 252, 0.72) 0%, rgba(198, 224, 242, 0.56) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 2px 8px rgba(18, 52, 82, 0.10),
    0 6px 14px rgba(12, 36, 58, 0.07);
  padding: calc(4 * var(--upx));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ph-shop-hero-hit {
  position: absolute;
  z-index: 1;
  top: calc(5 * var(--upx));
  bottom: calc(5 * var(--upx));
  width: calc(50% - 8 * var(--upx));
  border-radius: calc(12 * var(--upx));
  background: transparent;
  border: 1.5px solid transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease;
}

.ph-shop-hero-hit.is-left {
  left: calc(5 * var(--upx));
}

.ph-shop-hero-hit.is-right {
  right: calc(5 * var(--upx));
}

.ph-shop-hero-hit:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.72);
}

.ph-shop-hero-hit:active {
  transform: scale(0.97);
}

.ph-shop-hero-hit.active {
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(14, 152, 212, 0.46);
  box-shadow:
    0 4px 12px rgba(8, 136, 196, 0.11),
    inset 0 1px 1px rgba(255, 255, 255, 0.85);
}

.ph-shop-hero canvas {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 440 / 164;
  height: auto;
  display: block;
  pointer-events: none;
}

.ph-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(10 * var(--upx));
}

.ph-shop-grid.hidden {
  display: none !important;
}

.ph-shop-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: calc(16 * var(--upx));
  background: rgba(255, 255, 255, 0.42);
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 6px 14px rgba(12, 34, 56, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(5 * var(--upx));
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.ph-shop-item:hover {
  transform: translateY(-2px) scale(1.03);
  background: rgba(255, 255, 255, 0.60);
  border-color: rgba(14, 152, 212, 0.68);
}

.ph-shop-item:active {
  transform: scale(0.95);
}

.ph-shop-item.selected {
  background: linear-gradient(155deg, rgba(220, 248, 240, 0.78) 0%, rgba(255, 255, 255, 0.66) 100%);
  border: 2px solid #0ea870;
  box-shadow:
    0 8px 20px rgba(14, 168, 112, 0.22),
    inset 0 1px 2px rgba(255, 255, 255, 0.92);
}

.ph-shop-item canvas {
  width: 86%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  pointer-events: none;
}

.ph-shop-check {
  position: absolute;
  top: calc(5 * var(--upx));
  right: calc(5 * var(--upx));
  width: calc(19 * var(--upx));
  height: calc(19 * var(--upx));
  border-radius: 50%;
  background: linear-gradient(135deg, #12b87c 0%, #099260 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  color: #ffffff;
  display: none;
  place-items: center;
  box-shadow: 0 2px 6px rgba(8, 86, 56, 0.28);
}

.ph-shop-check svg {
  width: calc(11 * var(--upx));
  height: calc(11 * var(--upx));
}

.ph-shop-item.selected .ph-shop-check {
  display: grid;
}
