/* ============================================================================
   Level UP Fitness · mobilā lietotne (čaula)
   Tālrunī: pilns ekrāns. Platākā logā: ierīces rāmis ar piezīmēm blakus.
   ========================================================================== */

html, body { height: 100%; }
body { overflow: hidden; overscroll-behavior: none; }

.stage { height: 100dvh; display: grid; place-items: center; }
.stage__info { display: none; }

.device { position: relative; width: 100%; height: 100dvh; display: flex; flex-direction: column; background: var(--lu-canvas); overflow: hidden; overflow: clip; }
.statusbar { display: none; }
/* clip, nevis hidden: ārpus ekrāna noparkotie slāņi (caurlaide, lapas) nedrīkst padarīt čaulu ritināmu */
.app { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; overflow: clip; isolation: isolate; }

/* ----------------------------------------------------------------- ekrāns -- */
.screen {
  position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none;
  padding: calc(var(--lu-4) + env(safe-area-inset-top, 0px)) var(--lu-5) var(--lu-9);
  outline: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen::before {                 /* griestu gaisma: ekrāns ir izgaismota telpa, nevis melns lauks */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 320px; z-index: -1; pointer-events: none;
  background: radial-gradient(90% 100% at 50% -20%, color-mix(in oklab, var(--lu-accent) 22%, transparent), transparent 70%);
}
.screen.is-enter > * { animation: screen-in var(--lu-slow) var(--lu-ease) both; }
.screen.is-enter > *:nth-child(2) { animation-delay: 40ms; }
.screen.is-enter > *:nth-child(3) { animation-delay: 80ms; }
.screen.is-enter > *:nth-child(n+4) { animation-delay: 120ms; }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { @keyframes screen-in { from { opacity: 0; } } }

.top { display: flex; align-items: center; justify-content: space-between; gap: var(--lu-3); margin-bottom: var(--lu-5); }
.top__me { display: flex; align-items: center; gap: var(--lu-3); text-align: left; border-radius: var(--lu-r-sm); }
.top__hi { display: grid; gap: 1px; }
.top__name { font-size: var(--lu-t-2xl); }
.page-title { font-size: var(--lu-t-3xl); margin-bottom: var(--lu-5); }
.page-lead { color: var(--lu-ink-soft); margin-top: calc(var(--lu-3) * -1); margin-bottom: var(--lu-5); max-width: 34ch; }
.stack { display: grid; gap: var(--lu-4); }
.stack--lg { gap: var(--lu-7); }

/* piekļuves bloks: galvenā darbība */
.access { display: grid; gap: var(--lu-4); padding: var(--lu-4); }
.access__row { display: flex; align-items: center; justify-content: space-between; gap: var(--lu-3); }
.access__k { display: grid; gap: 2px; }
.access__v { font-weight: 700; font-stretch: 104%; }
.access .btn .ic { width: 1.5em; height: 1.5em; }

/* horizontālās sliedes */
.rail { display: flex; gap: var(--lu-3); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; margin-inline: calc(var(--lu-5) * -1); padding: 2px var(--lu-5); scroll-padding-inline: var(--lu-5); }
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: none; scroll-snap-align: start; }
.mini {
  display: grid; gap: 6px; align-content: start; width: 150px; padding: var(--lu-3); text-align: left;
  background: var(--lu-surface); border: 1px solid var(--lu-line); border-radius: var(--lu-r-md); box-shadow: var(--lu-edge);
  transition: border-color var(--lu-fast) var(--lu-ease), transform var(--lu-fast) var(--lu-ease);
}
.mini:active { transform: scale(0.97); }
.mini.is-booked { border-color: var(--lu-line-accent); }
.mini__hm { font-stretch: 112%; font-weight: 800; font-style: italic; font-size: var(--lu-t-xl); line-height: 1; }
.mini__name { font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__meta { font-size: var(--lu-t-xs); color: var(--lu-ink-soft); }
.rail .offer { width: 276px; min-height: 176px; }
.rail .offer__title { font-size: var(--lu-t-xl); }

/* zonu režģis */
.zones { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--lu-2); }
.zone {
  display: grid; justify-items: center; align-content: center; gap: 8px; aspect-ratio: 1 / 0.92; padding: var(--lu-2);
  background: var(--lu-surface); border: 1px solid var(--lu-line); border-radius: var(--lu-r-md); box-shadow: var(--lu-edge);
  transition: border-color var(--lu-fast) var(--lu-ease), background-color var(--lu-fast) var(--lu-ease), transform var(--lu-fast) var(--lu-ease);
}
.zone:active { transform: scale(0.96); }
.zone .ic { width: 26px; height: 26px; color: var(--lu-accent-hi); stroke-width: 1.6; }
.zone span { font-stretch: 82%; font-weight: 600; font-size: var(--lu-t-xs); letter-spacing: 0.07em; text-transform: uppercase; text-align: center; line-height: 1.15; }
@media (hover: hover) and (pointer: fine) { .zone:hover, .mini:hover { border-color: var(--lu-line-accent); } }

.profile { display: flex; align-items: center; gap: var(--lu-4); margin-bottom: var(--lu-5); }
.profile__name { font-size: var(--lu-t-2xl); }
.foot-note { display: grid; gap: var(--lu-2); justify-items: center; padding-top: var(--lu-6); text-align: center; color: var(--lu-ink-mute); font-size: var(--lu-t-xs); }

/* ---------------------------------------------------------------- tabbar -- */
.tabbar {
  position: relative; z-index: 20; flex: none; display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; align-items: end;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in oklab, var(--lu-canvas) 82%, transparent); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-top: 1px solid var(--lu-line);
}
.tab {
  position: relative; display: grid; justify-items: center; gap: 3px; min-height: 52px; padding: 8px 2px 4px; border-radius: var(--lu-r-sm); color: var(--lu-ink-mute);
  font-stretch: 82%; font-weight: 600; font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase;
  transition: color var(--lu-fast) var(--lu-ease), transform var(--lu-fast) var(--lu-ease);
}
.tab .ic { width: 23px; height: 23px; }
.tab:active { transform: scale(0.94); }
.tab[aria-current="page"] { color: var(--lu-accent-hi); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: -7px; width: 22px; height: 2px; border-radius: 1px; background: var(--lu-accent); }
@media (hover: hover) and (pointer: fine) { .tab:not([aria-current="page"]):hover { color: var(--lu-ink); } }
.tab--qr {
  justify-self: center; align-self: start; width: 62px; height: 62px; min-height: 0; margin-top: -24px; padding: 0; place-content: center;
  border-radius: var(--lu-r-lg); background: var(--lu-accent); color: var(--lu-accent-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .34), 0 0 0 5px var(--lu-canvas), 0 12px 24px -8px color-mix(in oklab, var(--lu-accent-deep) 80%, transparent);
}
.tab--qr .ic { width: 30px; height: 30px; stroke-width: 2; }
@media (hover: hover) and (pointer: fine) { .tab--qr:hover { background: var(--lu-accent-hi); color: var(--lu-accent-ink); } }

/* ----------------------------------------------------------- QR caurlaide -- */
.passview {
  position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--lu-canvas);
  transform: translateY(100%); transition: transform var(--lu-slow) var(--lu-ease-drawer), visibility 0s linear var(--lu-slow); visibility: hidden;
}
.passview[hidden] { display: flex !important; }
.passview.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.passview::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(100% 60% at 50% 0%, color-mix(in oklab, var(--lu-accent) 26%, transparent), transparent 70%); }
.passview__head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: calc(var(--lu-2) + env(safe-area-inset-top, 0px)) var(--lu-3) 0; }
.passview__head .lu-mark { font-size: 1.35rem; }
.passview__body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: var(--lu-5) var(--lu-5) calc(var(--lu-6) + env(safe-area-inset-bottom, 0px)); display: grid; align-content: center; }
.passview__body::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) {
  .passview { transform: none; opacity: 0; transition: opacity var(--lu-fast) linear, visibility 0s linear var(--lu-fast); }
  .passview.is-open { opacity: 1; }
}

/* ------------------------------------------------------------ sveiciens -- */
.welcome { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; }
.welcome .scene { z-index: -2; }
/* atlēts stāv telpā: melnais foto fons izzūd ar screen sajaukumu pār CSS gaiteni */
.welcome .scene { --ly: 0.36; }
.welcome__core { position: absolute; z-index: -1; left: 50%; top: 16%; width: 78%; height: 40%; translate: -50% 0; pointer-events: none; background: radial-gradient(50% 50% at 50% 50%, color-mix(in oklab, var(--lu-canvas) 95%, transparent) 46%, transparent 100%); }
.welcome__lifter { position: absolute; z-index: -1; left: 50%; top: 7.5%; height: 51%; width: auto; max-width: none; translate: -50% 0; mix-blend-mode: screen; filter: brightness(1.12) contrast(1.08) sepia(0.28); pointer-events: none; }
.welcome::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 42%, color-mix(in oklab, var(--lu-canvas) 82%, transparent) 57%, var(--lu-canvas) 70%); }
.welcome::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30%; z-index: -1; background: linear-gradient(180deg, var(--lu-canvas) 30%, transparent); }
.welcome__mark { position: absolute; top: calc(var(--lu-7) + env(safe-area-inset-top, 0px)); left: 0; right: 0; display: grid; justify-items: center; font-size: 2.5rem; }
.welcome__body { display: grid; gap: var(--lu-4); padding: var(--lu-5) var(--lu-5) calc(var(--lu-6) + env(safe-area-inset-bottom, 0px)); }
.welcome__title { font-size: clamp(2rem, 9.4cqw, 2.6rem); }
.welcome__lead { color: var(--lu-ink-soft); font-size: var(--lu-t-lg); max-width: 30ch; margin-bottom: var(--lu-2); }
.welcome .demo-flag { justify-self: center; margin-top: var(--lu-2); }
.screen.is-bare { padding: 0; overflow: hidden; }
.screen.is-bare::before { display: none; }

/* ======================================================= ierīces rāmis == */
@media (min-width: 600px) and (min-height: 560px) {
  body:not(.is-embed) { background: radial-gradient(70% 60% at 62% 40%, #1b130b 0%, var(--lu-canvas) 70%); }
  body:not(.is-embed) .stage { padding: 24px; }
  body:not(.is-embed) .device {
    width: 392px; height: min(848px, calc(100dvh - 48px)); border-radius: 54px; border: 11px solid #16120E;
    box-shadow: 0 0 0 1px rgb(247 239 229 / .16), inset 0 0 0 1px rgb(0 0 0 / .6), var(--lu-e3);
  }
  body:not(.is-embed) .statusbar { display: grid; }
}
.is-embed .statusbar { display: grid; }
.statusbar {
  flex: none; grid-template-columns: 1fr auto 1fr; align-items: center; height: 46px; padding: 6px 26px 0; z-index: 50;
  font-weight: 700; font-size: 0.9375rem; font-stretch: 100%; font-variant-numeric: tabular-nums; color: var(--lu-ink); background: var(--lu-canvas);
}
.statusbar__island { width: 104px; height: 30px; border-radius: 16px; background: #000; }
.statusbar__icons { justify-self: end; display: flex; align-items: center; gap: 6px; }
.statusbar__icons svg { fill: currentColor; }

@media (min-width: 1040px) and (min-height: 560px) {
  body:not(.is-embed) .stage { grid-template-columns: minmax(0, 380px) auto; justify-content: center; gap: clamp(40px, 7vw, 112px); }
  body:not(.is-embed) .stage__info { display: grid; gap: var(--lu-5); align-content: center; }
}
.stage__info .lu-mark { font-size: 2rem; justify-self: start; align-items: flex-start; }
.stage__title { font-size: clamp(2rem, 3.2vw, 2.9rem); }
.stage__lead { color: var(--lu-ink-soft); font-size: var(--lu-t-lg); max-width: 36ch; }
.stage__try { display: grid; gap: var(--lu-3); padding-top: var(--lu-4); border-top: 1px solid var(--lu-line); }
.stage__try li { display: grid; grid-template-columns: auto 1fr; gap: var(--lu-3); align-items: start; color: var(--lu-ink-soft); font-size: var(--lu-t-md); }
.stage__try li .ic { color: var(--lu-accent-hi); margin-top: 2px; }
.stage__try b { color: var(--lu-ink); font-weight: 600; }
.stage__links { display: flex; flex-wrap: wrap; gap: var(--lu-2); }
