/* Mobile-first flight view */

body.cmp-view-page {
  margin: 0;
  background: var(--bg, #030303);
  color: var(--text, #f4f4f4);
  font-family: Skynet, system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  overflow-x: hidden;
}

body.cmp-view-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(0, 242, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 242, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

.cmp-view,
.cmp-view-header {
  position: relative;
  z-index: 1;
}

.cmp-view-rotate-hint {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(3, 3, 3, 0.96);
}

.cmp-view-rotate-hint[hidden] {
  display: none !important;
}

.cmp-view-rotate-hint__card {
  max-width: 18rem;
  padding: 1.5rem 1.25rem;
  border: 1px solid rgba(0, 242, 255, 0.25);
  border-radius: 16px;
  background: rgba(12, 12, 12, 0.98);
  text-align: center;
}

.cmp-view-rotate-hint__icon {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 3.75rem;
  color: #47ff00;
}

.cmp-view-rotate-hint__text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: #ccc;
}

.cmp-view-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "brand nav"
    "meta meta";
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 1rem;
  padding-top: max(0.65rem, env(safe-area-inset-top));
  background: rgba(8, 8, 8, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.cmp-view-header .header__brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
}

.cmp-view-header .header__mark {
  height: 26px;
  width: auto;
}

.cmp-view-header .header__title {
  display: none;
}

.cmp-view-header__meta {
  grid-area: meta;
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8d8d8d;
}

.cmp-view-header__nav {
  grid-area: nav;
  display: flex;
  justify-content: flex-end;
}

.cmp-view-header__nav a {
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ccc;
  text-decoration: none;
}

.cmp-view {
  padding: 0 0 1.5rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.cmp-view-layout {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cmp-view-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cmp-view-media {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cmp-view-stage-wrap {
  position: relative;
  overflow: hidden;
  background: #000;
}

.cmp-view-stage-hud {
  --hud-action: clamp(3.5rem, 13vh, 4.25rem);
  --hud-action-icon: clamp(1.2rem, 5.5vh, 1.55rem);
  --hud-plaque-bg: rgba(8, 10, 12, 0.58);
  --hud-plaque-border: rgba(0, 242, 255, 0.18);
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  padding:
    max(0.65rem, env(safe-area-inset-top))
    max(0.65rem, env(safe-area-inset-right))
    0
    max(0.65rem, env(safe-area-inset-left));
  pointer-events: none;
}

.cmp-view-hud-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  pointer-events: none;
}

.cmp-view-hud {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--hud-plaque-border);
  border-radius: 999px;
  background: var(--hud-plaque-bg);
  backdrop-filter: blur(14px);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: auto;
}

.cmp-view-hud--left,
.cmp-view-hud--right {
  background: var(--hud-plaque-bg);
  border-color: var(--hud-plaque-border);
}

.cmp-view-hud--left {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 0.4rem;
  gap: 0.55rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  border-radius: 18px;
}

.cmp-view-hud--right {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: calc(var(--hud-action) * 0.85);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  border-radius: 18px;
}

.cmp-view-hud-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  pointer-events: auto;
}

.cmp-view-hud__time {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--hud-action);
  min-width: var(--hud-action);
  padding: 0;
  font-family: var(--mono, 'Courier New', monospace);
  font-size: clamp(0.95rem, 3.2vh, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #00f2ff;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(0, 242, 255, 0.35);
}

.cmp-view-hud__time.is-negative {
  color: #ff4444;
  text-shadow: 0 0 18px rgba(255, 68, 68, 0.4);
}

.cmp-view-hud__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
  border: 1px solid rgba(71, 255, 0, 0.28);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(71, 255, 0, 0.16), rgba(0, 242, 255, 0.1));
  color: #e8ffe8;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.cmp-view-hud__btn:hover {
  border-color: rgba(0, 242, 255, 0.45);
  box-shadow: 0 0 16px rgba(0, 242, 255, 0.15);
}

.cmp-view-hud__btn:active {
  transform: scale(0.96);
}

.cmp-view-hud__btn.cmp-view-hud__btn--play,
.cmp-view-hud__btn.cmp-view-hud__btn--mark,
.cmp-view-hud__btn.cmp-view-hud__btn--fs {
  flex-shrink: 0;
  align-self: center;
  margin-left: 0.15rem;
  box-sizing: border-box;
  width: var(--hud-action);
  height: var(--hud-action);
  min-width: var(--hud-action);
  min-height: var(--hud-action);
  padding: 0;
}

.cmp-view-hud__btn--mark {
  font-family: var(--mono, 'Courier New', monospace);
  font-size: var(--hud-action-icon);
  font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cmp-view-hud__figure-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.cmp-view-hud__chip {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--hud-action);
  min-width: var(--hud-action);
  min-height: calc(var(--hud-action) * 0.42);
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  font-size: calc(var(--hud-action-icon) * 0.52);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  box-sizing: border-box;
  letter-spacing: 0.02em;
}

.cmp-view-hud__chip--element {
  background: rgba(255, 152, 0, 0.94);
  color: #14110a;
  box-shadow: 0 0 16px rgba(255, 152, 0, 0.28);
}

.cmp-view-hud__chip--score {
  background: rgba(0, 242, 255, 0.9);
  color: #031318;
  box-shadow: 0 0 16px rgba(0, 242, 255, 0.24);
}

.cmp-view-hud__icon--play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--hud-action-icon);
  height: var(--hud-action-icon);
}

.cmp-view-hud__btn--play .cmp-view-hud__svg,
.cmp-view-hud__btn--fs svg {
  display: block;
  width: var(--hud-action-icon);
  height: var(--hud-action-icon);
}

.cmp-view-hud__svg--pause {
  display: none;
}

.cmp-view-hud__btn--play.is-playing .cmp-view-hud__svg--play {
  display: none;
}

.cmp-view-hud__btn--play.is-playing .cmp-view-hud__svg--pause {
  display: block;
}

.cmp-view-stage-fit {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  cursor: pointer;
}

.cmp-view-video-unavailable {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.82);
  border: 1px dashed rgba(0, 242, 255, 0.22);
  border-radius: 12px;
  pointer-events: none;
}

.cmp-view-video-unavailable[hidden] {
  display: none !important;
}

.cmp-view-video-unavailable__title {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f4f4f4;
}

.cmp-view-video-unavailable__hint {
  margin: 0;
  max-width: 22rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #8d8d8d;
}

.cmp-view-video.is-unavailable {
  visibility: hidden;
}

.cmp-view-hud__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.cmp-view-stage-scaler {
  width: 980px;
  height: 980px;
  transform-origin: top left;
}

.cmp-view-stage {
  position: relative;
  width: 980px;
  height: 980px;
  overflow: hidden;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
}

.cmp-view-video {
  position: absolute;
  z-index: 0;
  left: var(--cam-mleft, -80px);
  top: var(--cam-mtop, -80px);
  -webkit-transform: scale(var(--cam-zoom, 1));
  transform: scale(var(--cam-zoom, 1));
}

.cmp-view-hud__btn--mark.is-live {
  box-shadow: 0 0 18px rgba(0, 242, 255, 0.25);
}

.cmp-view-slider {
  width: 100%;
  height: 0.4rem;
  border-radius: 999px;
  accent-color: var(--green, #47ff00);
  cursor: pointer;
  background: transparent;
}

.cmp-view-slider::-webkit-slider-runnable-track {
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.cmp-view-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0.85rem;
  height: 0.85rem;
  margin-top: -0.25rem;
  border: 2px solid rgba(0, 242, 255, 0.5);
  border-radius: 50%;
  background: var(--green, #47ff00);
  box-shadow: 0 0 10px rgba(71, 255, 0, 0.35);
}

.cmp-view-slider::-moz-range-track {
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.cmp-view-slider::-moz-range-thumb {
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid rgba(0, 242, 255, 0.5);
  border-radius: 50%;
  background: var(--green, #47ff00);
  box-shadow: 0 0 10px rgba(71, 255, 0, 0.35);
}

.cmp-view-summary {
  margin: 0 1rem;
  --summary-gap: 0.65rem;
  padding: calc(var(--summary-gap) + 0.5rem) 1rem var(--summary-gap);
  border: 1px solid rgba(0, 242, 255, 0.18);
  border-radius: 16px;
  background: rgba(12, 12, 14, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--summary-gap);
}

.cmp-view-elements {
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: #c8c8c8;
  word-break: break-word;
}

.cmp-view-elements__item.is-active {
  color: #111;
  background: rgba(255, 152, 0, 0.92);
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
  font-weight: 600;
}

.cmp-view-elements__sep {
  opacity: 0.7;
}

.cmp-view-elements:empty {
  display: none;
  margin: 0;
}

.cmp-view-round {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8d8d8d;
}

.cmp-view-team-name {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: clamp(1.45rem, 5.5vw, 1.9rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f4f4f4;
  cursor: pointer;
}

.cmp-view-score {
  margin: 0;
  font-size: clamp(3rem, 18vw, 5rem);
  line-height: 1;
  color: #47ff00;
  text-shadow: 0 0 24px rgba(71, 255, 0, 0.2);
}

.cmp-view-stats {
  margin: 0;
  font-size: 1.125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8d8d8d;
}

.cmp-view-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.cmp-view-link {
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan, #00f2ff);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.cmp-view-link:hover {
  border-color: rgba(0, 242, 255, 0.35);
  background: rgba(0, 242, 255, 0.08);
}

.cmp-view-link--tour {
  display: none;
}

.cmp-view-marks-tour {
  display: none;
  flex-shrink: 0;
  align-items: center;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan, #00f2ff);
  text-decoration: none;
  white-space: nowrap;
}

.cmp-view-marks-tour:hover {
  border-color: rgba(0, 242, 255, 0.35);
  background: rgba(0, 242, 255, 0.08);
}

.cmp-view-marks-wrap {
  width: 100%;
  box-sizing: border-box;
  padding:
    0
    max(0, env(safe-area-inset-right))
    0
    max(0, env(safe-area-inset-left));
}

.cmp-view-marks-wrap:has(.cmp-view-marks-panel.is-open) {
  z-index: 25;
}

.cmp-view-marks-panel {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.55rem 0.65rem 0.4rem;
  border: 1px solid rgba(0, 242, 255, 0.14);
  border-radius: 14px;
  background: rgba(8, 10, 12, 0.88);
  backdrop-filter: blur(10px);
  max-height: none;
  overflow: hidden;
}

.cmp-view-marks-panel.is-open {
  background: rgba(8, 10, 12, 0.96);
  max-height: min(70vh, calc(100dvh - 5rem));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cmp-view-marks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.cmp-view-marks-head__slider {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.cmp-view-marks-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8d8d8d;
}

.cmp-view-marks-toggle {
  flex-shrink: 0;
  border: 1px solid rgba(0, 242, 255, 0.2);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(0, 242, 255, 0.06);
  color: #d8f7ff;
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cmp-view-marks-toggle:hover {
  border-color: rgba(0, 242, 255, 0.4);
  background: rgba(0, 242, 255, 0.12);
}

.cmp-view-marks {
  --mark-size: 1.5rem;
  --mark-gap: 0.12rem;
  --marks-label-min: 4.5rem;
  --marks-row-expanded: 3.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0;
  padding: 0.15rem 0 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-overflow-scrolling: touch;
}

.cmp-marks-nums-bar {
  display: grid;
  grid-template-columns: repeat(var(--figure-count, 1), var(--mark-size)) minmax(var(--marks-label-min), auto);
  column-gap: var(--mark-gap);
  align-items: center;
  width: max-content;
  min-width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.2rem;
  padding: 0 0.55rem;
}

.cmp-marks-nums-bar .cmp-marks-nums {
  display: contents;
}

.cmp-marks-nums-bar .cmp-view-marks-toggle {
  grid-column: calc(var(--figure-count, 1) + 1);
  justify-self: end;
  align-self: center;
  margin-left: auto;
}

.cmp-marks-nums,
.cmp-view-marks .result {
  display: grid;
  grid-template-columns: repeat(var(--figure-count, 1), var(--mark-size)) minmax(var(--marks-label-min), auto);
  column-gap: var(--mark-gap);
  align-items: center;
  width: max-content;
  min-width: 100%;
  box-sizing: border-box;
}

.cmp-marks-nums {
  margin-bottom: 0;
  padding: 0;
}

.cmp-marks-nums__cell {
  width: var(--mark-size);
  height: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.62rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cmp-marks-nums__cell.is-current {
  border-color: rgba(0, 242, 255, 0.55);
  background: rgba(0, 242, 255, 0.18);
  box-shadow: 0 0 14px rgba(0, 242, 255, 0.22);
  color: #fff;
}

.cmp-view-marks.open {
  overflow-y: hidden;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.cmp-view-marks.open .cmp-marks-nums-bar,
.cmp-view-marks.open .result {
  width: 100%;
  min-width: max-content;
  max-width: none;
  grid-template-columns: repeat(var(--figure-count, 1), var(--mark-size)) minmax(var(--marks-label-min), 1fr);
}

.cmp-view-marks.open .result:not(.total) {
  max-height: var(--marks-row-expanded);
  overflow: hidden;
}

.cmp-view-marks.open .result.total {
  max-height: none;
  overflow: visible;
}

.cmp-view-marks:not(.open) {
  padding-bottom: 0.2rem;
  overflow-y: hidden;
}

.cmp-view-marks:not(.open) .result.total {
  margin-top: 0.15rem;
  min-height: calc(var(--mark-size) + 0.35rem);
  padding: 0.3rem 0.55rem 0.35rem;
}

.cmp-view-marks:not(.open) .result:not(.total) {
  max-height: 0;
  min-height: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.cmp-view-marks .result:not(.total) {
  opacity: 1;
  transition:
    max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    border-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    min-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cmp-view-marks .marks {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--mark-size);
  height: var(--mark-size);
  margin: 0;
  justify-self: center;
  border-radius: 50%;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.35);
}

.cmp-view-marks .result {
  min-height: 2rem;
  margin-top: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.cmp-view-marks .result.total {
  border-color: rgba(71, 255, 0, 0.28);
  background: linear-gradient(90deg, rgba(71, 255, 0, 0.08), rgba(0, 242, 255, 0.05));
}

.cmp-marks-row__label {
  grid-column: calc(var(--figure-count, 1) + 1);
  justify-self: stretch;
  text-align: right;
  padding-left: 0.75rem;
  padding-right: 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #8d8d8d);
  white-space: nowrap;
}

.cmp-marks-row__label--total {
  color: var(--green, #47ff00);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(71, 255, 0, 0.25);
}

.cmp-view-marks .allmarks {
  position: static;
  width: 100%;
  height: auto;
  opacity: 1;
  overflow: visible;
}

.cmp-view-members {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.cmp-view-members.is-open {
  display: flex;
}

.cmp-view-members__card {
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px 16px 0 0;
  background: rgba(14, 14, 14, 0.98);
}

.cmp-view-members__close {
  float: right;
  border: 0;
  background: transparent;
  color: #8d8d8d;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cmp-view-members__photo {
  display: block;
  width: min(260px, 100%);
  margin: 0 auto 1rem;
  border-radius: 8px;
}

.cmp-view-members__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cmp-view-members__list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 1023px) and (orientation: portrait) {
  .cmp-view-marks-wrap {
    margin-top: 0.75rem;
  }

  .cmp-view {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
}

/* Phone landscape — video right, info left, marks under video */
@media (max-width: 1023px) and (orientation: landscape) {
  html,
  body.cmp-view-page--landscape {
    height: 100%;
    overflow: hidden;
  }

  body.cmp-view-page--landscape {
    min-height: 100svh;
    min-height: 100dvh;
  }

  body.cmp-view-page--landscape .cmp-view-header {
    display: none;
  }

  body.cmp-view-page--landscape .cmp-view {
    height: 100svh;
    height: 100dvh;
    min-height: 100svh;
    min-height: 100dvh;
    padding: 0;
    padding-left: max(0, env(safe-area-inset-left));
    padding-right: max(0, env(safe-area-inset-right));
    padding-bottom: max(0, env(safe-area-inset-bottom));
    overflow: hidden;
  }

  body.cmp-view-page--landscape .cmp-view-layout {
    display: grid;
    grid-template-columns: minmax(100px, 22vw) minmax(0, 1fr);
    grid-template-areas: "side media";
    gap: 0;
    height: 100%;
    max-height: 100svh;
    max-height: 100dvh;
    position: relative;
  }

  body.cmp-view-page--landscape .cmp-view-side {
    grid-area: side;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    gap: 0.35rem;
    min-height: 0;
    min-width: 0;
    height: 100%;
    padding: 0.35rem 0.4rem 0.35rem 0.35rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 6, 6, 0.98);
    overflow: hidden;
    box-sizing: border-box;
  }

  body.cmp-view-page--landscape .cmp-view-media {
    grid-area: media;
    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
    background: #000;
    overflow: hidden;
  }

  body.cmp-view-page--landscape .cmp-view-stage-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  body.cmp-view-page--landscape .cmp-view-marks-wrap {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    width: 100%;
    max-width: none;
    padding:
      0
      max(0.3rem, env(safe-area-inset-right))
      max(0.35rem, env(safe-area-inset-bottom))
      max(0.3rem, env(safe-area-inset-left));
    transform: translateY(1.5rem);
    pointer-events: auto;
  }

  body.cmp-view-page--landscape .cmp-view-marks-wrap:has(.cmp-view-marks-panel.is-open) {
    z-index: 25;
  }

  body.cmp-view-page--landscape .cmp-view-marks-panel {
    gap: 0.2rem;
    padding: 0.35rem 0.45rem 0.2rem;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(to top, rgba(8, 10, 12, 0.97) 82%, rgba(8, 10, 12, 0.88));
  }

  body.cmp-view-page--landscape .cmp-view-marks-wrap:has(.cmp-view-marks-panel.is-open) .cmp-view-marks-panel {
    background: linear-gradient(to top, rgba(8, 10, 12, 0.99) 88%, rgba(8, 10, 12, 0.92));
  }

  body.cmp-view-page--landscape .cmp-view-marks {
    padding-top: 0.1rem;
    border-top-color: rgba(255, 255, 255, 0.1);
  }

  body.cmp-view-page--landscape .cmp-view-summary {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    --summary-gap: 0.45rem;
    gap: var(--summary-gap);
    min-height: 0;
    min-width: 0;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: calc(var(--summary-gap) + 0.4rem) 0.4rem var(--summary-gap);
    border: 1px solid rgba(0, 242, 255, 0.15);
    border-radius: 8px;
    background: rgba(12, 12, 12, 0.95);
    text-align: center;
    box-sizing: border-box;
  }

  body.cmp-view-page--landscape .cmp-view-elements {
    display: block;
    width: 100%;
    font-size: 0.48rem;
    line-height: 1.35;
    text-align: center;
    letter-spacing: 0.06em;
    color: #a8a8a8;
  }

  body.cmp-view-page--landscape .cmp-view-elements__item.is-active {
    padding: 0.04rem 0.22rem;
  }

  body.cmp-view-page--landscape .cmp-view-round {
    margin: 0;
    font-size: 0.65rem;
    text-align: center;
  }

  body.cmp-view-page--landscape .cmp-view-team-name {
    display: -webkit-box;
    width: 100%;
    margin: 0;
    font-size: clamp(0.85rem, 4.2vh, 1.1rem);
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
  }

  body.cmp-view-page--landscape .cmp-view-score {
    font-size: clamp(1.5rem, 22vh, 2.5rem);
    text-align: center;
  }

  body.cmp-view-page--landscape .cmp-view-stats {
    margin: 0;
    font-size: 0.72rem;
    text-align: center;
  }

  body.cmp-view-page--landscape .cmp-view-links {
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
  }

  body.cmp-view-page--landscape .cmp-view-link {
    padding: 0.3rem 0.35rem;
    font-size: 0.48rem;
    text-align: center;
  }

  body.cmp-view-page--landscape .cmp-view-link--tour {
    display: inline-flex;
  }

  body.cmp-view-page--landscape .cmp-view-stage-hud {
    --hud-action: clamp(3.5rem, 15vh, 4.5rem);
    --hud-action-icon: clamp(1.15rem, 6.5vh, 1.45rem);
    padding:
      max(0.4rem, env(safe-area-inset-top))
      max(0.4rem, env(safe-area-inset-right))
      0
      max(0.4rem, env(safe-area-inset-left));
  }

  body.cmp-view-page--landscape .cmp-view-hud--left {
    margin-top: 0.25rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    gap: 0.45rem;
    border-radius: 14px;
  }

  body.cmp-view-page--landscape .cmp-view-hud--right {
    margin-top: calc(var(--hud-action) * 0.75);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    border-radius: 14px;
  }

  body.cmp-view-page--landscape .cmp-view-hud-stack {
    gap: 1.15rem;
  }

  body.cmp-view-page--landscape .cmp-view-hud__time {
    font-size: clamp(0.85rem, 4.8vh, 1.05rem);
  }

  body.cmp-view-page--landscape .cmp-view-marks-head {
    margin-top: 0;
    margin-bottom: 0;
    gap: 0.35rem;
  }

  body.cmp-view-page--landscape .cmp-view-marks-head__slider {
    height: 0.2rem;
  }

  body.cmp-view-page--landscape .cmp-view-marks-toggle {
    padding: 0.15rem 0.4rem;
    font-size: 0.48rem;
  }

  body.cmp-view-page--landscape .cmp-marks-nums-bar {
    margin-bottom: 0.1rem;
    padding: 0 0.35rem;
  }

  body.cmp-view-page--landscape .cmp-view-marks.open .cmp-marks-nums-bar {
    padding: 0 0.55rem;
  }

  body.cmp-view-page--landscape .cmp-view-marks {
    --mark-size: 1.05rem;
    --marks-label-min: 3rem;
    --marks-row-expanded: 2.35rem;
    padding: 0.1rem 0.3rem 0.1rem;
    border-radius: 6px;
    background: rgba(8, 8, 8, 0.75);
  }

  body.cmp-view-page--landscape .cmp-view-marks.open {
    overflow-y: hidden;
    padding-bottom: 0.25rem;
  }

  body.cmp-view-page--landscape .cmp-view-marks:not(.open) .result.total {
    margin-top: 0.1rem;
    min-height: 0;
    padding: 0.15rem 0.35rem;
  }

  body.cmp-view-page--landscape .cmp-marks-nums__cell {
    height: 0.9rem;
    font-size: 0.45rem;
  }

  body.cmp-view-page--landscape .cmp-view-marks .marks {
    font-size: 0.48rem;
  }

  body.cmp-view-page--landscape .cmp-view-stage {
    border-radius: 0;
    border-bottom: 0;
  }
}

/* Tablet+ */
@media (min-width: 640px) {
  .cmp-view-header .header__title {
    display: inline;
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #8d8d8d;
  }

  .cmp-view-header {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand meta nav";
    align-items: center;
    padding: 0.75rem 1.25rem;
  }

  .cmp-view-members {
    align-items: center;
  }

  .cmp-view-members__card {
    width: min(480px, 100%);
    border-radius: 14px;
  }

  .cmp-view-stage-wrap {
    padding: 0;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  body.cmp-view-page--desktop {
    overflow-y: hidden;
    height: 100dvh;
  }

  .cmp-view {
    padding-top: 0;
    padding-bottom: 0.35rem;
    overflow-x: clip;
    overflow-y: clip;
  }

  .cmp-view:has(.cmp-view-marks-panel.is-open) {
    overflow: visible;
  }

  .cmp-view-layout {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    grid-template-areas:
      "side stage";
    column-gap: 0;
    row-gap: 0.35rem;
    align-items: start;
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem 6.75rem;
    overflow-x: clip;
    min-width: 0;
  }

  .cmp-view-media {
    display: contents;
  }

  .cmp-view-side {
    grid-area: side;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    width: 100%;
    gap: 1rem;
    align-self: start;
  }

  .cmp-view-stage-wrap {
    grid-area: stage;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #000;
    overflow: hidden;
  }

  .cmp-view-stage-fit {
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    line-height: 0;
    box-sizing: border-box;
  }

  .cmp-view-stage-hud,
  .cmp-view-hud,
  .cmp-view-hud__time,
  .cmp-view-hud__btn {
    line-height: normal;
  }

  .cmp-view-stage-scaler {
    will-change: transform;
    width: 980px;
    height: 980px;
  }

  .cmp-view-stage {
    border-radius: 0;
    border-bottom: 0;
    background: transparent;
  }

  .cmp-view-summary {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--summary-gap);
    min-height: 0;
    width: 100%;
    margin: 0;
    overflow-y: auto;
    box-sizing: border-box;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .cmp-view-marks-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 1rem 0.75rem;
    pointer-events: auto;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    box-sizing: border-box;
  }

  .cmp-view-marks-panel.is-open {
    background: rgba(8, 10, 12, 0.97);
    max-height: min(72vh, calc(100dvh - 4.5rem));
    overflow-x: hidden;
    overflow-y: auto;
  }

  .cmp-view-marks:not(.open),
  .cmp-view-marks.open {
    padding-bottom: 0.2rem;
  }

  .cmp-view-marks-head {
    margin: 0;
    flex: 0 0 auto;
  }
}

@media (min-width: 1280px) {
  .cmp-view-header__meta {
    text-align: center;
  }

  .cmp-view-layout {
    max-width: 1400px;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  }
}

/* Fullscreen: video fills viewport; HUD and marks overlay on top */
.cmp-view-layout.is-fullscreen,
.cmp-view-layout:fullscreen,
.cmp-view-layout:-webkit-full-screen {
  display: block !important;
  position: relative !important;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  background: #000;
  overflow: hidden;
}

.cmp-view-layout.is-fullscreen .cmp-view-side,
.cmp-view-layout:fullscreen .cmp-view-side,
.cmp-view-layout:-webkit-full-screen .cmp-view-side {
  display: none !important;
}

.cmp-view-layout.is-fullscreen .cmp-view-media,
.cmp-view-layout:fullscreen .cmp-view-media,
.cmp-view-layout:-webkit-full-screen .cmp-view-media {
  display: block !important;
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.cmp-view-layout.is-fullscreen .cmp-view-stage-wrap,
.cmp-view-layout:fullscreen .cmp-view-stage-wrap,
.cmp-view-layout:-webkit-full-screen .cmp-view-stage-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-area: unset !important;
  overflow: hidden;
}

.cmp-view-layout.is-fullscreen .cmp-view-stage-fit,
.cmp-view-layout:fullscreen .cmp-view-stage-fit,
.cmp-view-layout:-webkit-full-screen .cmp-view-stage-fit {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.cmp-view-layout.is-fullscreen .cmp-view-stage-scaler,
.cmp-view-layout:fullscreen .cmp-view-stage-scaler,
.cmp-view-layout:-webkit-full-screen .cmp-view-stage-scaler {
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.cmp-view-layout.is-fullscreen .cmp-view-stage,
.cmp-view-layout:fullscreen .cmp-view-stage,
.cmp-view-layout:-webkit-full-screen .cmp-view-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  height: 100% !important;
  overflow: visible;
  border-radius: 0;
  border-bottom: 0;
}

.cmp-view-layout.is-fullscreen .cmp-view-video,
.cmp-view-layout:fullscreen .cmp-view-video,
.cmp-view-layout:-webkit-full-screen .cmp-view-video {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  height: auto !important;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center;
  transform: none !important;
  -webkit-transform: none !important;
}

.cmp-view-layout.is-fullscreen .cmp-view-stage-hud,
.cmp-view-layout:fullscreen .cmp-view-stage-hud,
.cmp-view-layout:-webkit-full-screen .cmp-view-stage-hud {
  z-index: 12;
}

.cmp-view-layout.is-fullscreen .cmp-view-hud--left,
.cmp-view-layout:fullscreen .cmp-view-hud--left,
.cmp-view-layout:-webkit-full-screen .cmp-view-hud--left {
  --hud-action: clamp(7rem, 26vh, 8.5rem);
  --hud-action-icon: clamp(2.4rem, 11vh, 3.1rem);
  margin-top: 0.8rem;
  gap: 1.1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  padding-left: 1.2rem;
  padding-right: 1.2rem;
  border-radius: 36px;
}

.cmp-view-layout.is-fullscreen .cmp-view-hud--left .cmp-view-hud__time,
.cmp-view-layout:fullscreen .cmp-view-hud--left .cmp-view-hud__time,
.cmp-view-layout:-webkit-full-screen .cmp-view-hud--left .cmp-view-hud__time {
  font-size: clamp(1.9rem, 6.4vh, 2.7rem);
}

.cmp-view-layout.is-fullscreen .cmp-view-hud__chip,
.cmp-view-layout:fullscreen .cmp-view-hud__chip,
.cmp-view-layout:-webkit-full-screen .cmp-view-hud__chip {
  display: flex;
}

.cmp-view-layout.is-fullscreen .cmp-view-hud__figure-stack,
.cmp-view-layout:fullscreen .cmp-view-hud__figure-stack,
.cmp-view-layout:-webkit-full-screen .cmp-view-hud__figure-stack {
  gap: 0.85rem;
}

.cmp-view-layout.is-fullscreen .cmp-view-hud__chip,
.cmp-view-layout:fullscreen .cmp-view-hud__chip,
.cmp-view-layout:-webkit-full-screen .cmp-view-hud__chip {
  min-height: calc(var(--hud-action) * 0.38);
  font-size: clamp(1.15rem, 4.8vh, 1.75rem);
}

.cmp-view-layout.is-fullscreen .cmp-view-marks-wrap,
.cmp-view-layout:fullscreen .cmp-view-marks-wrap,
.cmp-view-layout:-webkit-full-screen .cmp-view-marks-wrap {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  width: 100%;
  min-height: 0 !important;
  grid-area: unset !important;
  pointer-events: auto;
  padding:
    0
    max(0.5rem, env(safe-area-inset-right))
    max(0.5rem, env(safe-area-inset-bottom))
    max(0.5rem, env(safe-area-inset-left)) !important;
  box-sizing: border-box;
  background: transparent;
}

.cmp-view-layout.is-fullscreen .cmp-view-marks-panel,
.cmp-view-layout:fullscreen .cmp-view-marks-panel,
.cmp-view-layout:-webkit-full-screen .cmp-view-marks-panel {
  background: rgba(8, 10, 12, 0.82);
  backdrop-filter: blur(10px);
}

.cmp-view-layout.is-fullscreen .cmp-view-marks.open,
.cmp-view-layout:fullscreen .cmp-view-marks.open,
.cmp-view-layout:-webkit-full-screen .cmp-view-marks.open {
  overflow-y: hidden;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.cmp-view-layout.is-fullscreen .cmp-view-marks-wrap:has(.cmp-view-marks-panel.is-open) .cmp-view-marks-panel,
.cmp-view-layout:fullscreen .cmp-view-marks-wrap:has(.cmp-view-marks-panel.is-open) .cmp-view-marks-panel,
.cmp-view-layout:-webkit-full-screen .cmp-view-marks-wrap:has(.cmp-view-marks-panel.is-open) .cmp-view-marks-panel {
  background: rgba(8, 10, 12, 0.94);
  max-height: min(50vh, 400px);
  overflow-y: auto;
  overflow-x: hidden;
}

body.cmp-view-page--landscape .cmp-view-layout.is-fullscreen,
body.cmp-view-page--landscape .cmp-view-layout:fullscreen,
body.cmp-view-page--landscape .cmp-view-layout:-webkit-full-screen {
  display: block !important;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
  height: 100% !important;
  max-height: none !important;
}

@media (max-width: 1023px) {
  .cmp-view-slider {
    height: 0.2rem;
  }

  .cmp-view-slider::-webkit-slider-runnable-track {
    height: 0.18rem;
  }

  .cmp-view-slider::-webkit-slider-thumb {
    margin-top: -0.44rem;
  }

  .cmp-view-slider::-moz-range-thumb {
    transform: translateY(-0.1rem);
  }

  .cmp-view-slider::-moz-range-track {
    height: 0.18rem;
  }

  .cmp-view-layout.is-fullscreen .cmp-view-stage-hud,
  .cmp-view-layout:fullscreen .cmp-view-stage-hud,
  .cmp-view-layout:-webkit-full-screen .cmp-view-stage-hud {
    --hud-action: clamp(4.9rem, 18.2vh, 5.95rem);
    --hud-action-icon: clamp(1.68rem, 7.7vh, 2.17rem);
  }

  .cmp-view-layout.is-fullscreen .cmp-view-hud--left,
  .cmp-view-layout:fullscreen .cmp-view-hud--left,
  .cmp-view-layout:-webkit-full-screen .cmp-view-hud--left {
    --hud-action: clamp(4.9rem, 18.2vh, 5.95rem);
    --hud-action-icon: clamp(1.68rem, 7.7vh, 2.17rem);
    margin-top: 0.56rem;
    gap: 0.77rem;
    padding-top: 1.05rem;
    padding-bottom: 1.05rem;
    padding-left: 0.84rem;
    padding-right: 0.84rem;
    border-radius: 25px;
  }

  .cmp-view-layout.is-fullscreen .cmp-view-hud--left .cmp-view-hud__time,
  .cmp-view-layout:fullscreen .cmp-view-hud--left .cmp-view-hud__time,
  .cmp-view-layout:-webkit-full-screen .cmp-view-hud--left .cmp-view-hud__time {
    font-size: clamp(1.33rem, 4.48vh, 1.89rem);
  }

  .cmp-view-layout.is-fullscreen .cmp-view-hud__figure-stack,
  .cmp-view-layout:fullscreen .cmp-view-hud__figure-stack,
  .cmp-view-layout:-webkit-full-screen .cmp-view-hud__figure-stack {
    gap: 0.595rem;
  }

  .cmp-view-layout.is-fullscreen .cmp-view-hud__chip,
  .cmp-view-layout:fullscreen .cmp-view-hud__chip,
  .cmp-view-layout:-webkit-full-screen .cmp-view-hud__chip {
    font-size: clamp(0.805rem, 3.36vh, 1.225rem);
  }

  .cmp-view-layout.is-fullscreen .cmp-view-hud--right,
  .cmp-view-layout:fullscreen .cmp-view-hud--right,
  .cmp-view-layout:-webkit-full-screen .cmp-view-hud--right {
    gap: 1.65rem;
    margin-top: calc(var(--hud-action) * 0.58);
    padding-top: 0.525rem;
    padding-bottom: 0.525rem;
    padding-left: 0.42rem;
    padding-right: 0.42rem;
    border-radius: 25px;
  }

  .cmp-view-layout.is-fullscreen .cmp-view-hud--right .cmp-view-hud-stack,
  .cmp-view-layout:fullscreen .cmp-view-hud--right .cmp-view-hud-stack,
  .cmp-view-layout:-webkit-full-screen .cmp-view-hud--right .cmp-view-hud-stack {
    gap: 1.65rem;
  }

  .cmp-view-layout.is-fullscreen .cmp-view-marks-wrap:has(.cmp-view-marks-panel.is-open) .cmp-view-marks-panel,
  .cmp-view-layout:fullscreen .cmp-view-marks-wrap:has(.cmp-view-marks-panel.is-open) .cmp-view-marks-panel,
  .cmp-view-layout:-webkit-full-screen .cmp-view-marks-wrap:has(.cmp-view-marks-panel.is-open) .cmp-view-marks-panel {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - max(0.5rem, env(safe-area-inset-bottom)) - max(0.5rem, env(safe-area-inset-top)) - 2.5rem);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .cmp-view-layout.is-fullscreen .cmp-view-marks.open,
  .cmp-view-layout:fullscreen .cmp-view-marks.open,
  .cmp-view-layout:-webkit-full-screen .cmp-view-marks.open {
    overflow-y: visible;
    overflow-x: auto;
    flex: 1 1 auto;
    min-height: min-content;
    max-height: none;
  }

  body.cmp-view-page--landscape .cmp-view-layout.is-fullscreen .cmp-view-marks,
  body.cmp-view-page--landscape .cmp-view-layout:fullscreen .cmp-view-marks,
  body.cmp-view-page--landscape .cmp-view-layout:-webkit-full-screen .cmp-view-marks {
    --marks-row-expanded: 2.1rem;
  }

  .cmp-view-layout.is-fullscreen .cmp-view-marks-tour,
  .cmp-view-layout:fullscreen .cmp-view-marks-tour,
  .cmp-view-layout:-webkit-full-screen .cmp-view-marks-tour {
    display: inline-flex;
  }
}
