.hero [hidden], .fusion-chat [hidden] { display: none !important; }
.hero-carousel { justify-content: stretch; }
.hero-viewport { overflow: clip; }
.hero-track { display: flex; touch-action: pan-y pinch-zoom; transform: translateX(calc(var(--slide, 0) * -100%)); transition: transform .62s cubic-bezier(.22,.75,.25,1); }
.hero-frame { flex: 0 0 100%; min-width: 0; min-height: 565px; position: relative; isolation: isolate; display: flex; align-items: center; }
.hero-repeat-title { font-size: clamp(52px, 5.45vw, 92px); line-height: 1.07; font-weight: 900; letter-spacing: -.076em; }
.hero-repeat-title > span { display: block; color: var(--lime); }
.hero-frame-match { background: radial-gradient(ellipse at 74% 44%, #39286b, #110f25 72%); }
.hero-switcher:not([hidden]) { position: absolute; right: 22px; bottom: 58px; z-index: 2; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid #8479ae84; border-radius: 10px; background: #141328e6; width: max-content; max-width: calc(100% - 44px); }
.hero-switcher button { min-height: 32px; padding: 4px 10px; border: 0; border-radius: 6px; background: transparent; color: #e9e5fb; font-size: 12px; white-space: nowrap; }
.hero-switcher button:focus-visible { outline-offset: -2px; }
.hero-switcher [aria-pressed="true"], .hero-choices [aria-pressed="true"] { color: #18122a; background: var(--lime); }
.theme-fusion .hero-content { padding-bottom: 117px; }
.hero-panel { padding: 46px clamp(22px,5.15vw,80px) 133px; }
.hero-panel h2 { white-space: pre-line; font-size: clamp(34px, 4.3vw, 66px); line-height: 1.07; letter-spacing: -.065em; }
.hero-panel p { max-width: 33em; margin: 14px 0 17px; color: #e4def5; }
.hero-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.hero-choices button, .chat-tabs button, .chat-thread button { padding: 6px 10px; border-radius: 6px; border: 1px solid #625985; color: var(--paper); background: #17152ce8; font-size: 12px; }
.hero-panel-match { width: 100%; display: grid; grid-template-columns: minmax(235px,.56fr) minmax(0,1.44fr); gap: clamp(14px,3vw,46px); align-items: center; padding-top: 23px; padding-bottom: 108px; }
.match-preview { min-width: 0; }
.match-phone {
  --felt: #0b4c3a;
  --felt-light: #1c9262;
  --cushion: #177b59;
  --accent: #9ce6b2;
  width: 100%;
  color: #f4f2fb;
  background: radial-gradient(ellipse at 50% 35%,#343653,#151524 80%);
  border: 1px solid #706989;
  border-radius: 17px;
  box-shadow: 0 14px 36px #080716b8, inset 0 0 0 3px #10101c;
  padding: clamp(7px,1.25vw,16px);
  container-type: inline-size;
}
.match-neon { --felt: #173573; --felt-light: #3164bc; --cushion: #5469ca; --accent: #b4c4ff; }
.match-final { --felt: #48315b; --felt-light: #825371; --cushion: #a5647e; --accent: #ffd19e; }
.match-hud { display: grid; grid-template-columns: 8% minmax(0,1fr) 17% minmax(0,1fr) 8%; align-items: center; gap: 1.1cqw; margin-bottom: 1cqw; }
.match-utility { width: 5.4cqw; height: 5.4cqw; display: grid; place-items: center; justify-self: center; border: 1px solid #63617c; border-radius: 50%; background: linear-gradient(#45455e,#171724); font: 800 clamp(8px,2.8cqw,18px)/1 var(--sans); }
.match-player { min-width: 0; display: flex; align-items: center; gap: 1cqw; padding: .7cqw; border: 1px solid #555979; border-radius: 5px; background: #181a2c; font-size: clamp(8px,2cqw,14px); }
.match-player-active { background: linear-gradient(110deg,#2864ce,#1a2e5d); border-color: #7db2fd; }
.match-player-opponent { justify-content: flex-end; text-align: right; }
.match-player > div { min-width: 0; }
.match-player strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-player img, .match-player b { flex: none; width: 6.7cqw; height: 6.7cqw; border-radius: 4px; object-fit: cover; object-position: center 24%; }
.match-player b { display: grid; place-items: center; border: 1px solid #8c88a5; background: radial-gradient(circle at 37% 29%,#797795,#201e33 64%); }
.match-rack { display: flex; gap: .55cqw; margin-top: .4cqw; }
.match-player-opponent .match-rack { justify-content: flex-end; }
.match-rack i { display: grid; place-items: center; width: 2.35cqw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 32%,#fffdf0 30%,var(--ball) 44%,#242133 100%); color: #252034; font: 800 clamp(4px,1.2cqw,9px)/1 var(--mono); }
.match-score { min-width: 0; display: grid; text-align: center; line-height: 1.1; }
.match-score strong { color: #fff; font: 800 clamp(10px,3.6cqw,26px)/1 var(--mono); white-space: nowrap; }
.match-score span { margin-top: .55cqw; color: #d6caeb; font-size: clamp(6px,1.45cqw,11px); }
.match-field { display: grid; grid-template-columns: 6% minmax(0,1fr) 6%; align-items: stretch; gap: 1cqw; }
.match-table { display: block; width: 100%; height: auto; }
.match-cue-rack { justify-self: center; width: 59%; height: 79%; align-self: end; margin-bottom: 10%; display: grid; place-items: center; background: #121321; border: 1px solid #67657a; border-radius: 7px; }
.match-cue-rack i { width: 19%; min-width: 2px; height: 89%; border-radius: 3px; background: linear-gradient(#8dd6fe 0 5%,#e5bf83 5% 52%,#6b472e 65%,#593854); }
.match-side { display: grid; grid-template-rows: auto 1fr; justify-items: center; gap: 13%; padding-block: 5%; }
.match-spin { display: grid; place-items: center; width: 87%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 2px 4px #090911; background: radial-gradient(circle at 43% 37%,#fff9df,#b3a58e 60%,#605770); }
.match-spin::after { content: ""; width: 17%; aspect-ratio: 1; margin: 0 0 13% 12%; border-radius: 50%; background: #c93b48; }
.match-power { width: 55%; display: flex; align-items: flex-end; border: 1px solid #5e5d78; border-radius: 5px; overflow: hidden; background: repeating-linear-gradient(#161723 0 3px,#34344a 4px 5px); }
.match-power i { display: block; width: 100%; height: var(--power,62%); background: linear-gradient(var(--accent),#6d657f); }
.match-practice { max-width: 1040px; margin-inline: auto; }
.match-practice #pool { width: 100%; aspect-ratio: 40/21; display: block; }
.match-bottom { display: flex; justify-content: space-between; margin: .75cqw 7% 0; color: #ccc7db; font-size: clamp(7px,1.65cqw,12px); }
.match-bottom span:nth-child(2) { color: var(--accent); font-weight: 750; }
.match-home-indicator { width: 25%; height: 2px; margin: .8cqw auto 0; border-radius: 3px; background: #a19ab7; }
.fusion-chat { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); align-items: center; gap: 24px; margin-bottom: 30px; padding: clamp(15px,3.5vw,46px); border: 1px solid var(--line); border-radius: 10px; background: radial-gradient(ellipse at right,#25204a,#131225 62%); }
.chat-intro h2 { font-size: clamp(28px,4.3vw,57px); line-height: 1.1; letter-spacing: -.06em; }
.chat-intro p { color: var(--muted); margin-top: 12px; }
.chat-intro .chat-disclosure { color: var(--lime); font-size: 12px; }
.chat-intro .store-links { margin-top: 17px; }
.chat-phone { width: min(100%,330px); min-height: 510px; justify-self: center; display: flex; flex-direction: column; padding: 8px 12px 5px; border: 4px solid #746889; border-radius: 33px; background: radial-gradient(ellipse at 85% 10%, #262042, #141326 57%); box-shadow: 0 18px 42px #0907158a, inset 0 0 0 2px #110e1e; }
.chat-statusbar { min-height: 29px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-inline: 6px; color: #eae4f6; font: 700 11px var(--mono); }
.chat-statusbar i { width: 49px; height: 13px; border-radius: 20px; background: #090812; }
.chat-statusbar svg { width: 36px; height: 13px; justify-self: end; }
.chat-top { display: flex; gap: 9px; align-items: center; padding: 8px 2px 12px; }
.chat-top img { width: 35px; height: 35px; }
.chat-top strong, .chat-top span { display: block; line-height: 1.25; }
.chat-top span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.chat-tabs { display: flex; gap: 4px; padding: 3px; border: 1px solid #44395d; background: #131225; border-radius: 12px; }
.chat-tabs button { flex: 1; min-height: 36px; border: 0; border-radius: 8px; }
.chat-tabs [aria-pressed="true"] { color: #1b1525; background: var(--lime); font-weight: 800; }
.chat-log { flex: 1 1 260px; min-height: 0; max-height: 270px; overflow: auto; padding: 10px 3px 8px 0; }
.chat-log p { position: relative; margin: 2px 0 12px; padding-left: 49px; min-height: 52px; display: flex; flex-direction: column; align-items: flex-start; font-size: 13px; }
.chat-avatar { --trim: #e3a78e; position: relative; flex: none; display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 4px; border: 2px solid var(--trim); border-radius: 50%; background: #312742; }
.chat-avatar-silver { --trim: #b9d1ff; background: #283751; }
.chat-avatar-gold { --trim: #ffda8f; box-shadow: 0 0 8px #ffbc5c40; }
.chat-avatar img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 25%; }
.chat-avatar-mark { color: #fff2fb; font: 800 13px var(--mono); }
.chat-level { position: absolute; right: -7px; bottom: -5px; padding: 2px 4px; outline: 2px solid #151426; border-radius: 6px; color: #1d1727; background: var(--trim); white-space: nowrap; font: 800 9px/1 var(--mono); }
.chat-log .chat-avatar { position: absolute; left: 2px; top: 4px; }
.chat-log p strong { padding: 0 4px; color: #d4caff; font-size: 11px; }
.chat-log .chat-bubble { overflow-wrap: anywhere; max-width: 100%; padding: 7px 10px; background: #2d2749; border-radius: 4px 12px 12px 12px; }
.chat-log .own-message { align-items: flex-end; padding: 0 49px 0 0; }
.chat-log .own-message .chat-avatar { left: auto; right: 7px; }
.chat-log .own-message .chat-bubble { background: #ffb28e; color: #261a29; border-radius: 12px 4px 12px 12px; }
.chat-friends { flex: 1; margin: 8px 0 3px; }
.chat-friends button { display: flex; background: transparent; color: var(--paper); border: 0; border-bottom: 1px solid var(--line); align-items: center; width: 100%; padding: 8px 6px; gap: 15px; text-align: left; }
.chat-friends button:hover { background: #282349; }
.chat-friends small { color: var(--muted); margin-left: 5px; }
.chat-thread { display: flex; gap: 13px; align-items: center; margin-top: 7px; font-size: 13px; }
.chat-form { display: flex; gap: 6px; margin-top: auto; padding-top: 7px; border-top: 1px solid #423855; }
.chat-form input { flex: 1; min-width: 0; background: #201d3b; padding: 7px 10px; border: 1px solid #5e557b; border-radius: 20px; color: var(--paper); font-size: 16px; }
.chat-form input::placeholder { font-size: 12px; color: #c8bfdc; }
.chat-form button { min-height: 38px; border-radius: 20px; border: 0; padding: 6px 11px; background: var(--lime); color: #23192b; white-space: nowrap; font-size: 13px; font-weight: 800; }
.chat-home-bar { width: 34%; height: 4px; margin: 10px auto 2px; border-radius: 5px; background: #e0d6eea8; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 700px) {
  .hero-frame { align-items: flex-end; min-height: 533px; }
  .hero-repeat-title { font-size: clamp(42px, 10vw, 58px); letter-spacing: -.065em; }
  .hero-switcher:not([hidden]) { bottom: 49px; right: 5px; max-width: calc(100% - 10px); gap: 1px; }
  .hero-switcher button { font-size: 11px; padding-inline: 5px; }
  .theme-fusion .hero-content { padding-bottom: 96px; }
  .hero-panel { padding: 118px 17px 103px; }
  .hero-panel .hero-kicker { margin-bottom: 8px; }
  .hero-panel-match { grid-template-columns: minmax(0,1fr); gap: 12px; padding: 16px 14px 104px; align-self: center; }
  .hero-panel-match h2 { font-size: clamp(28px,6.6vw,41px); white-space: normal; }
  .hero-panel-match .hero-kicker { margin-bottom: 5px; }
  .hero-panel-match p { margin: 6px 0 10px; font-size: 13px; }
  .hero-panel-match .button { min-height: 35px; font-size: 12px; padding-block: 5px; }
  .hero-panel-match .hero-choices { margin-top: 7px; }
  .hero-panel-match .hero-choices button { font-size: 11px; padding: 4px 7px; }
  .match-phone { border-radius: 11px; }
  .fusion-chat { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

.match-phone.match-practice {
  --accent: #a9e8fa;
  max-width: 1120px;
  padding: clamp(8px, 1.5vw, 20px);
  border-color: #43586e;
  background: radial-gradient(ellipse at 50% 30%, #27374a, #111925 77%);
}
.practice-hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(5px, 2cqw, 20px);
  align-items: stretch;
  margin: 0 0 1cqw;
}
.practice-hud > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.2cqw, 12px);
  padding: clamp(5px, 1.1cqw, 12px);
  border: 1px solid #43586e;
  border-radius: 9px;
  background: #101926;
}
.practice-hud strong { font-size: clamp(10px, 1.65cqw, 16px); }
.practice-hud .practice-rack { flex-wrap: wrap; gap: 3px 12px; }
.practice-balls { display: flex; flex-wrap: wrap; gap: clamp(3px, .55cqw, 6px); }
.practice-ball {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(19px, 3.1cqw, 32px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #141820;
  background:
    radial-gradient(ellipse at 26% 18%, #fffffff0 0, #fff6 14%, transparent 38%),
    radial-gradient(circle at 33% 24%, transparent 25%, #10141d32 61%, #060912d9 100%),
    linear-gradient(162deg, #f8f3e6 0 25%, var(--ball) 27% 73%, #f8f3e6 75%);
  box-shadow: 0 2px 3px #0009, inset 0 0 0 1px #ffffff24;
  font: 900 clamp(8px, 1.12cqw, 12px)/1 var(--sans);
  font-variant-numeric: tabular-nums;
}
.practice-ball-black {
  background: radial-gradient(circle at 30% 20%, #d8e4f4 0, #677183 10%, #252a35 32%, #080a0d 73%, #000 100%);
}
.practice-ball b {
  display: grid;
  place-items: center;
  width: 53%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, #fffef9 35%, #dedaca 100%);
  box-shadow: 0 0 0 .5px #0003;
}
.practice-ball.is-pocketed { opacity: .28; }
.practice-mode .practice-ball { width: clamp(25px, 4.4cqw, 44px); font-size: clamp(12px, 1.8cqw, 19px); }
.practice-mode [data-match-view] { display: block; color: var(--accent); font-size: clamp(8px, 1.2cqw, 12px); }
.match-practice .match-field { grid-template-columns: 6.5% minmax(0, 1fr) 6.5%; gap: .5cqw; }
.match-practice .shot-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) max-content; gap: 12px; margin: 12px 0 0; }
.match-practice #shot-status { grid-column: 2; margin: 0; text-align: center; color: #dce8f6; font-size: clamp(12px, 1.5cqw, 14px); }
.shot-buttons { display: flex; justify-self: end; gap: clamp(6px, 1.3cqw, 14px); }
.practice-download { max-width: 1120px; margin: 14px auto 0; text-align: end; }
.practice-download a { min-height: 44px; }
.practice-table { position: relative; min-width: 0; }
.practice-celebration {
  --win-color: #8df8ff;
  --win-glow: #5968fd;
  position: absolute;
  inset: 3%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  pointer-events: none;
  animation: practice-win-veil 2.4s ease both;
  background: repeating-linear-gradient(0deg, transparent 0 14px, #75e7ff1d 15px 16px), #0e164965;
  box-shadow: inset 0 0 18px #7895ff80;
}
.practice-celebration[hidden] { display: none; }
.practice-sparks { position: absolute; inset: 0; }
.practice-sparks i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(4px, 1cqw, 12px);
  height: 2px;
  border-radius: 99px;
  background: var(--spark);
  box-shadow: 0 0 8px var(--spark);
  animation: practice-win-spark 1.75s var(--delay) ease-out both;
}
.practice-wave {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58%;
  height: 68%;
  border: 2px solid var(--win-color);
  border-radius: 50%;
  box-shadow: 0 0 16px var(--win-glow), inset 0 0 16px var(--win-glow);
  animation: practice-win-wave 1.35s ease-out both;
}
.practice-wave:nth-child(2) { animation-delay: .15s; }
.practice-wave:nth-child(3) { animation-delay: .3s; }
.match-practice #shot-status.is-win-status { opacity: 0; }
@keyframes practice-win-veil { 0%, 100% { opacity: 0; } 12%, 77% { opacity: 1; } }
@keyframes practice-win-spark {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(0) scale(.3); }
  22%, 56% { opacity: 1; }
  100% { left: var(--x); top: var(--y); opacity: 0; transform: translate(-50%, -50%) rotate(var(--turn)) scale(.8); }
}
@keyframes practice-win-wave {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.15); }
  22% { opacity: .85; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.65); }
}
@media (prefers-reduced-motion: reduce) {
  .practice-celebration { animation: none; }
  .practice-wave, .practice-sparks { display: none; }
}
.match-control {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
  gap: .35cqw;
  min-width: 0;
  padding-block: .35cqw;
  color: #f4edf9;
  font-size: clamp(8px, 1.6cqw, 13px);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.match-control input {
  appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
  touch-action: none;
  cursor: ns-resize;
  width: min(100%, 32px);
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 1px solid #77718a;
  border-radius: 8px;
}
.match-control input:focus-visible { outline: 2px solid #ffb18c; outline-offset: 2px; }
.match-cue-control input {
  direction: ltr;
  background:
    linear-gradient(#7bd7fa 0 5%, #ffdb9f 5% 60%, #a16a43 61% 76%, #3e282e 77%) center / 20% 87% no-repeat,
    linear-gradient(to bottom, #ffb18c66 0 var(--power, 44.44%), transparent var(--power, 44.44%)),
    #121322;
}
.match-angle-control { touch-action: none; cursor: ns-resize; }
.match-angle-control input {
  pointer-events: none;
  background: repeating-linear-gradient(0deg, #827e99 0 1px, transparent 1px 10%) right / 30% 85% no-repeat, #121322;
}
.match-control input::-webkit-slider-thumb {
  appearance: none;
  width: clamp(12px, 2.4cqw, 24px);
  height: clamp(10px, 2.25cqw, 17px);
  border-radius: 4px;
  border: 1px solid #ffe6dc;
  background: #ffb18c;
  box-shadow: 0 1px 6px #16101d;
}
.match-control input::-moz-range-thumb {
  width: clamp(12px, 2.4cqw, 24px);
  height: clamp(10px, 2.25cqw, 17px);
  border-radius: 4px;
  border: 1px solid #ffe6dc;
  background: #ffb18c;
}
.match-control output { color: #ffcaad; }
.practice-chances {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  text-align: right;
  font-size: clamp(9px, 1.5cqw, 15px);
}
.practice-chances output { color: #ff778e; font-size: clamp(13px, 2.4cqw, 23px); white-space: nowrap; }
.practice-chances output[data-remaining="0"] { color: #f494a2; }

@media (max-width: 520px) {
  .practice-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .practice-hud .practice-rack { grid-column: 1 / -1; }
  .match-practice .match-field { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 2px; }
  .match-control { font-size: 11px; }
  .match-control input { width: 100%; }
  .practice-hud > div { border-radius: 6px; }
  .match-practice .shot-controls { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; }
  .match-practice #shot-status { grid-column: 1; }
  .shot-buttons { justify-self: stretch; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
  .match-practice .shot-controls .button { min-height: 44px; padding-inline: 10px; }
}
