@font-face {
  font-family: "Cv Display";
  src: url("glyphs/display.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cv Body";
  src: url("glyphs/body-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cv Body";
  src: url("glyphs/body-semibold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Cv Body";
  src: url("glyphs/body-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --abyss: #041523;
  --gorge: #0a3552;
  --current: #168cc4;
  --aqua: #72e7f2;
  --ice: #f0fbff;
  --ruby: #ff3157;
  --gold: #ffb14a;
  --mist: #a8c7d8;
  --ink: #041523;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--abyss); }
body {
  font-family: "Cv Body", "Segoe UI", sans-serif;
  color: var(--ice);
  overflow: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, p { margin: 0; }
h1 {
  font-family: "Cv Display", serif;
  font-size: 30px;
  line-height: 34px;
  letter-spacing: 0.8px;
  font-weight: 400;
}
h2 { font-size: 19px; line-height: 23px; font-weight: 700; }

.cv-app {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--abyss);
  overflow: hidden;
}
.cv-photo, .cv-shade, .cv-mist {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cv-photo {
  background: url("plates/falls-bg.png") center/cover no-repeat;
  opacity: 0.34;
}
.cv-bright .cv-photo { opacity: 0.42; }
.cv-shade {
  background: linear-gradient(rgba(4, 21, 35, 0.54), rgba(4, 21, 35, 0.38), rgba(4, 21, 35, 0.96));
}
.cv-bright .cv-shade {
  background: linear-gradient(rgba(4, 21, 35, 0.78), rgba(4, 21, 35, 0.62), rgba(4, 21, 35, 0.96));
}
.cv-mist { z-index: 1; }
.cv-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: calc(8px + env(safe-area-inset-top)) 12px 12px;
  background-color: var(--abyss);
  background-image: linear-gradient(rgba(4, 21, 35, 0.54), rgba(4, 21, 35, 0.38), rgba(4, 21, 35, 0.96)), url("plates/falls-bg.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.cv-bright .cv-stage {
  background-image: linear-gradient(rgba(4, 21, 35, 0.74), rgba(4, 21, 35, 0.42), rgba(4, 21, 35, 0.9)), url("plates/falls-bg.png");
}
.cv-dock {
  position: relative;
  z-index: 3;
  flex: none;
  background: linear-gradient(#0a3552, #041523);
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  min-height: 104px;
}
.cv-route {
  margin: 0 0 3px 6px;
  color: var(--mist);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
}
.cv-tabs { display: flex; gap: 0; }
.cv-tab {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  border-radius: 18px 5px 18px 5px;
  padding: 3px 2px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cv-tab.cv-live { background: rgba(22, 140, 196, 0.34); }
.cv-tab i {
  display: block;
  width: 12px;
  height: 3px;
  border-radius: 50px;
  background: rgba(168, 199, 216, 0.35);
  margin-bottom: 2px;
}
.cv-tab.cv-live i { width: 30px; background: var(--aqua); }
.cv-tab span { color: var(--mist); font-size: 20px; line-height: 21px; }
.cv-tab.cv-live span { color: var(--aqua); }
.cv-tab small {
  display: block;
  width: 100%;
  color: var(--mist);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cv-tab.cv-live small { color: var(--ice); }

.cv-page, .cv-play { display: flex; flex-direction: column; gap: 14px; padding-bottom: 18px; }
.cv-play { gap: 8px; }
.cv-head { display: flex; gap: 12px; align-items: center; }
.cv-badge, .cv-node, .cv-seal, .cv-gem {
  display: grid;
  place-items: center;
  flex: none;
}
.cv-badge {
  width: 48px;
  height: 48px;
  border-radius: 22px 6px 22px 6px;
  background: linear-gradient(135deg, var(--aqua), var(--current));
  border: 1px solid rgba(240, 251, 255, 0.65);
  color: var(--abyss);
  font-size: 25px;
  font-weight: 700;
}
.cv-head p, .cv-panel p, .cv-dim { color: var(--mist); font-size: 16px; line-height: 22px; }
.cv-panel {
  border-radius: 28px 8px 28px 8px;
  padding: 16px;
  background: linear-gradient(rgba(10, 53, 82, 0.93), rgba(4, 21, 35, 0.95));
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
}
.cv-tone-aqua { border-color: rgba(114, 231, 242, 0.8); }
.cv-tone-ruby { border-color: rgba(255, 49, 87, 0.8); }
.cv-tone-gold { border-color: rgba(255, 177, 74, 0.8); }
.cv-tone-blue { border-color: rgba(22, 140, 196, 0.8); }
.cv-tone-mist { border-color: rgba(168, 199, 216, 0.45); }
.cv-link { width: 100%; }
.cv-pair { display: flex; gap: 10px; }
.cv-pair > * { flex: 1; min-width: 0; }
.cv-gap { visibility: hidden; }
.cv-kicker { color: var(--aqua); font-size: 14px; font-weight: 700; letter-spacing: 1.2px; }
.cv-tone-gold > .cv-kicker, .cv-panel.cv-tone-gold > small { color: var(--gold); }
.cv-gold { color: var(--gold); }
.cv-aqua { color: var(--aqua); }
.cv-ruby { color: var(--ruby); }
.cv-center { text-align: center; }
.cv-split { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.cv-meter {
  height: 8px;
  border-radius: 99px;
  background: rgba(240, 251, 255, 0.09);
  overflow: hidden;
}
.cv-meter i { display: block; height: 100%; border-radius: inherit; background: var(--aqua); }
.cv-meter-gold i { background: var(--gold); }
.cv-meter-ruby i { background: var(--ruby); }
.cv-readouts { display: flex; gap: 8px; }
.cv-read {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 7px;
  align-items: center;
  border-radius: 15px;
  padding: 8px 10px;
  background: rgba(4, 21, 35, 0.8);
  border: 1px solid rgba(168, 199, 216, 0.5);
}
.cv-read b { font-size: 16px; }
.cv-read span { display: flex; flex-direction: column; min-width: 0; }
.cv-read small { color: var(--mist); font-size: 10px; font-weight: 700; line-height: 11px; }
.cv-read strong { font-size: 17px; line-height: 18px; }
.cv-tone-gold.cv-read, .cv-read.cv-tone-gold { border-color: rgba(255, 177, 74, 0.5); }
.cv-read.cv-tone-gold b { color: var(--gold); }
.cv-read.cv-tone-ruby { border-color: rgba(255, 49, 87, 0.5); }
.cv-read.cv-tone-ruby b { color: var(--ruby); }
.cv-read.cv-tone-aqua { border-color: rgba(114, 231, 242, 0.5); }
.cv-read.cv-tone-aqua b { color: var(--aqua); }

.cv-top { display: flex; align-items: center; gap: 10px; }
.cv-word { flex: 1; }
.cv-word h1 {
  font-family: "Cv Body", sans-serif;
  font-weight: 800;
  font-size: 27px;
  letter-spacing: 2px;
  line-height: 27px;
}
.cv-jack {
  border-radius: 14px;
  border: 1px solid rgba(255, 177, 74, 0.65);
  background: rgba(4, 21, 35, 0.8);
  padding: 8px 12px;
  text-align: right;
}
.cv-jack small { display: block; color: var(--gold); font-size: 11px; font-weight: 700; }
.cv-jack strong { font-size: 18px; }
.cv-machine {
  position: relative;
  height: 226px;
  display: flex;
  gap: 4px;
  padding: 9px;
  border-radius: 34px 8px 34px 8px;
  background: linear-gradient(#126892, #041523);
  border: 2px solid rgba(114, 231, 242, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 177, 74, 0.55);
}
.cv-well {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: 13px;
  background: rgba(240, 251, 255, 0.94);
  border: 1px solid rgba(114, 231, 242, 0.55);
  container-type: size;
}
.cv-film { display: flex; flex-direction: column; }
.cv-film img { width: 92%; height: calc(100cqh / 3); flex: none; object-fit: contain; margin: 0 auto; }
.cv-lane, .cv-pay { position: absolute; inset: 9px; }
.cv-lane {
  top: 50%;
  height: 66px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 177, 74, 0.42);
  border-radius: 10px;
}
.cv-pay { width: calc(100% - 18px); height: calc(100% - 18px); }
.cv-banner {
  min-height: 30px;
  margin: 0;
  text-align: center;
  color: var(--aqua);
  font-size: 14px;
  font-weight: 800;
}
.cv-banner.cv-big { font-size: 21px; color: var(--gold); }
.cv-banner.cv-gold { color: var(--gold); }
.cv-bets, .cv-quicks, .cv-spinrow { display: flex; gap: 8px; }
.cv-spinrow { gap: 10px; align-items: stretch; }
.cv-bet, .cv-quick {
  flex: 1;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(168, 199, 216, 0.42);
  background: rgba(4, 21, 35, 0.76);
  color: var(--mist);
  font-size: 15px;
  font-weight: 700;
  padding: 9px 4px;
}
.cv-bet.cv-live { background: rgba(114, 231, 242, 0.22); border-color: var(--aqua); color: var(--ice); }
.cv-quick { border-radius: 13px; color: var(--ice); font-size: 13px; font-weight: 800; padding: 10px 4px; }
.cv-quick.cv-live { background: rgba(114, 231, 242, 0.2); border-color: var(--aqua); color: var(--aqua); }
.cv-stake {
  flex: 1;
  border-radius: 28px 8px 28px 8px;
  padding: 10px 16px;
  background: linear-gradient(rgba(10, 53, 82, 0.93), rgba(4, 21, 35, 0.95));
  border: 1px solid rgba(255, 177, 74, 0.8);
}
.cv-stake small { display: block; color: var(--mist); font-size: 12px; font-weight: 700; }
.cv-stake.cv-tone-gold small { color: var(--gold); }
.cv-stake strong { font-size: 19px; }
.cv-action {
  border: 1px solid rgba(240, 251, 255, 0.65);
  border-radius: 999px;
  padding: 13px 18px;
  background: linear-gradient(90deg, var(--aqua), var(--current));
  color: var(--abyss);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.cv-action.cv-hot { flex: 1.15; background: linear-gradient(90deg, var(--ruby), #b8143d); }
.cv-action:disabled, .cv-bet:disabled, .cv-quick:disabled {
  background: linear-gradient(90deg, var(--mist), var(--gorge));
  color: rgba(240, 251, 255, 0.65);
}
.cv-stage-row { display: flex; gap: 12px; align-items: stretch; }
.cv-node-col { width: 42px; display: flex; flex-direction: column; align-items: center; }
.cv-node {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gorge);
  border: 2px solid rgba(114, 231, 242, 0.55);
  color: var(--ice);
  font-weight: 800;
  font-size: 18px;
}
.cv-node.cv-done { background: var(--aqua); color: var(--abyss); }
.cv-node.cv-now { border-color: var(--ruby); }
.cv-stem { width: 3px; flex: 1; min-height: 43px; background: rgba(168, 199, 216, 0.25); }
.cv-stem.cv-done { background: var(--aqua); }
.cv-chest {
  height: 190px;
  display: grid;
  place-items: center;
}
.cv-chest img { width: 168px; height: 168px; object-fit: contain; }
.cv-offer { display: flex; gap: 12px; align-items: center; }
.cv-gem {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  font-size: 28px;
  background: rgba(114, 231, 242, 0.17);
  border: 1px solid var(--aqua);
}
.cv-gem.cv-tone-ruby { color: var(--ruby); border-color: var(--ruby); background: rgba(255, 49, 87, 0.17); }
.cv-gem.cv-tone-blue { color: var(--current); border-color: var(--current); }
.cv-gem.cv-tone-gold { color: var(--gold); border-color: var(--gold); background: rgba(255, 177, 74, 0.17); }
.cv-rank { color: var(--gold); font-size: 30px; }
.cv-linkmark { font-size: 27px; color: var(--aqua); }
.cv-tone-gold .cv-linkmark { color: var(--gold); }
.cv-week { display: flex; justify-content: space-between; }
.cv-day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cv-day i {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--abyss);
  border: 1px solid rgba(114, 231, 242, 0.4);
  color: var(--mist);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}
.cv-day i.cv-done { background: var(--aqua); color: var(--abyss); }
.cv-day i.cv-now { border-color: var(--gold); }
.cv-day b { color: var(--gold); font-size: 13px; }
.cv-day:last-child b { color: var(--ruby); }
.cv-racer { display: flex; gap: 13px; align-items: center; }
.cv-racer > b { width: 30px; text-align: center; font-size: 22px; }
.cv-racer > div { flex: 1; }
.cv-racer p { font-size: 14px; }
.cv-plate { width: 100%; height: 108px; object-fit: contain; }
.cv-hero { height: 170px; display: grid; place-items: center; }
.cv-hero img { height: 170px; width: auto; }
.cv-field { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 18px; }
.cv-field span { color: var(--mist); }
.cv-field b { font-size: 19px; }
.cv-fave { display: flex; align-items: center; gap: 8px; }
.cv-fave img { width: 96px; height: 96px; }
.cv-badge-row { display: flex; gap: 13px; align-items: center; }
.cv-badge-row > div:nth-child(2) { flex: 1; min-width: 0; }
.cv-seal {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(114, 231, 242, 0.1);
  border: 1px solid rgba(114, 231, 242, 0.45);
  color: var(--aqua);
  font-size: 27px;
}
.cv-seal.cv-done { background: rgba(255, 177, 74, 0.22); border-color: var(--gold); color: var(--gold); }
.cv-toggle { display: flex; gap: 12px; align-items: center; padding: 5px 0; }
.cv-toggle > div { flex: 1; }
.cv-toggle p { font-size: 15px; }
.cv-switch {
  width: 52px;
  height: 32px;
  border-radius: 99px;
  border: 0;
  background: var(--gorge);
  position: relative;
  flex: none;
}
.cv-switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mist);
}
.cv-switch.cv-live { background: var(--aqua); }
.cv-switch.cv-live::after { left: 24px; background: var(--abyss); }
.cv-story {
  position: relative;
  height: 250px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(114, 231, 242, 0.6);
}
.cv-story img { width: 100%; height: 100%; object-fit: cover; }
.cv-story div {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px;
  background: linear-gradient(transparent, rgba(4, 21, 35, 0.92));
}
.cv-story p { letter-spacing: 2px; font-weight: 700; font-size: 15px; }
.cv-prize { font-size: 31px; color: var(--gold); line-height: 1.1; }
.cv-intro {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, #187fb2 0%, var(--abyss) 62%);
}
.cv-intro[hidden] { display: none; }
.cv-intro-card { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cv-intro-card img {
  width: 164px;
  height: 164px;
  object-fit: cover;
  border-radius: 42px;
  border: 2px solid rgba(114, 231, 242, 0.8);
}
.cv-intro-card p {
  color: var(--mist);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.4px;
}
