*,
*::before,
*::after {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none !important;
  -webkit-tap-highlight-color: transparent !important;
  box-sizing: border-box;
  outline: none;
}

:root {
  --vb-red: #e50914;
  --vb-red-soft: rgba(229, 9, 20, .82);
  --vb-cyan: #04c9ff;
  --vb-ice: #eaf7f7;
  --vb-text: rgba(255, 255, 255, .94);
  --vb-muted: rgba(255, 255, 255, .68);
  --vb-dim: rgba(255, 255, 255, .46);
  --vb-line: rgba(255, 255, 255, .17);
  --vb-glass: rgba(4, 10, 13, .42);
  --vb-bottom-pad: clamp(34px, 7vh, 76px);
  --accent: var(--vb-red);
  --accent-dark: #97131d;
  --aqua: var(--vb-cyan);
  --text: var(--vb-text);
  --muted: var(--vb-muted);
  --quiet: var(--vb-dim);
  --line: var(--vb-line);
  --panel: var(--vb-glass);
  --bg: #06191d;
  --font-display: 'Graphik-Super', Arial, sans-serif;
  --font-body: 'Graphik-Light', Arial, sans-serif;
}

@font-face {
  font-family: 'Graphik-Super';
  src: url('../fonts/Graphik-Super.otf') format('opentype');
  font-display: swap;
}

@font-face {
  font-family: 'Graphik-Light';
  src: url('../fonts/Graphik-Light.otf') format('opentype');
  font-display: swap;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: #06191d;
  color: var(--vb-text);
  font-family: var(--font-body);
  font-weight: 400;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, .08) 34%, rgba(3, 20, 23, .50) 62%, rgba(8, 31, 35, .92) 100%),
    url('../img/bkg_optimized.jpg');
  background-position: center center;
  background-size: cover;
  opacity: 1;
}

body::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(3, 20, 23, .08) 47%, rgba(7, 31, 35, .74) 73%, rgba(55, 101, 104, .90) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .38));
}

.page-shell {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(196px, 38vh, 318px) 5.6vw var(--vb-bottom-pad);
  overflow: hidden;
}

.content {
  position: relative;
  z-index: 2;
  width: min(1060px, 100%);
  min-width: 0;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 0;
  color: var(--vb-text);
  text-align: center;
}

.media-panel {
  position: fixed;
  z-index: 3;
  top: clamp(30px, 5.8vh, 58px);
  left: 50%;
  width: clamp(300px, 27vw, 520px);
  height: clamp(78px, 9.8vh, 126px);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.logo-wrap {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .46));
}

body.access-link-page .media-panel {
  top: clamp(24px, 4.8vh, 50px);
  width: clamp(420px, 42vw, 760px);
  height: clamp(108px, 14vh, 184px);
}

.signal-row {
  display: none;
}

.brand-mark {
  display: none;
}

.account_text,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(760px, 100%);
  min-height: 34px;
  margin: 0 0 clamp(10px, 1.8vh, 18px);
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .13);
  color: rgba(255, 255, 255, .74);
  font-family: var(--font-body);
  font-size: clamp(11px, 1.45vh, 14px);
  font-style: normal;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .12em;
  word-break: break-word;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 26px rgba(0, 0, 0, .20);
}

h1 {
  width: 100%;
  max-width: min(940px, 100%);
  margin: 0 auto;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, .82);
  font-family: var(--font-display);
  font-size: clamp(34px, 5vh, 52px);
  font-weight: 680;
  line-height: 1.05;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .40);
}

h2 {
  margin: 0 0 9px;
  color: var(--vb-text);
  font-family: var(--font-display);
  font-size: clamp(14px, 1.8vh, 19px);
  font-weight: 850;
  line-height: 1.16;
  letter-spacing: 0;
}

h3,
p,
.lead {
  width: min(620px, 100%);
  max-width: 100%;
  margin: clamp(11px, 1.8vh, 16px) auto clamp(18px, 3vh, 30px);
  color: var(--vb-muted);
  font-family: var(--font-body);
  font-size: clamp(15px, 2vh, 20px);
  font-weight: 700;
  line-height: 1.34;
  text-align: center;
}

.actions {
  width: min(720px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

button,
.start_button,
.reload_button,
.primary-button,
.install_button {
  -webkit-appearance: none;
  appearance: none;
  min-width: clamp(146px, 14vw, 210px);
  min-height: clamp(46px, 6vh, 62px);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  color: #071017;
  padding: 0 clamp(18px, 2.2vw, 30px);
  font-family: var(--font-display);
  font-size: clamp(14px, 1.9vh, 19px);
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), 0 18px 36px rgba(0, 0, 0, .30);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

button::after,
.start_button::after,
.reload_button::after,
.primary-button::after,
.install_button::after {
  content: "";
  width: .55em;
  height: .55em;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  flex: 0 0 auto;
}

button:hover,
button:focus,
.start_button:hover,
.start_button:focus,
.reload_button:hover,
.reload_button:focus,
.primary-button:hover,
.primary-button:focus,
.install_button:hover,
.install_button:focus {
  transform: translateY(-3px) scale(1.045);
  border-color: var(--vb-cyan);
  background: var(--vb-cyan);
  color: #02060d;
  box-shadow: 0 0 0 4px rgba(4, 201, 255, .38), 0 0 0 9px rgba(255, 255, 255, .18), 0 18px 38px rgba(0, 0, 0, .44);
}

button:focus-visible,
.start_button:focus-visible,
.reload_button:focus-visible,
.primary-button:focus-visible,
.install_button:focus-visible,
.close-btn:focus-visible {
  outline: 0;
}

.install-note,
.small_text {
  max-width: min(420px, 100%);
  color: rgba(255, 255, 255, .58);
  font-family: var(--font-body);
  font-size: clamp(12px, 1.5vh, 15px);
  font-style: normal;
  font-weight: 700;
  line-height: 1.38;
  text-align: center;
}

.footer {
  width: min(620px, 100%);
  margin-top: clamp(17px, 3vh, 34px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, .46);
  font-size: clamp(11px, 1.35vh, 14px);
  font-weight: 750;
  text-align: center;
}

.footer::before,
.footer::after {
  content: "";
  flex: 1 1 44px;
  max-width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .46));
}

.footer::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, .46), transparent);
}

.footer p {
  width: auto;
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: 1.32;
}

.status-card {
  width: min(420px, 100%);
  margin-top: clamp(18px, 2.8vh, 28px);
  padding: clamp(16px, 2.5vh, 24px);
  border: 1px solid var(--vb-line);
  border-radius: 8px;
  background: var(--vb-glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 44px rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.code_text {
  display: inline-flex;
  min-width: min(230px, 100%);
  min-height: clamp(58px, 8vh, 76px);
  margin: 0 0 clamp(14px, 2.2vh, 22px);
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  color: var(--vb-text);
  font-family: var(--font-display);
  font-size: clamp(28px, 4.7vh, 46px);
  line-height: 1;
  letter-spacing: .08em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.timer_text {
  margin: 0 0 12px;
  color: var(--vb-muted);
  font-family: var(--font-body);
  font-size: clamp(14px, 1.9vh, 18px);
  font-weight: 750;
  line-height: 1.32;
}

#code_container {
  display: none;
}

.link-exit-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vh, 52px) clamp(18px, 5vw, 58px);
  background: rgba(0, 0, 0, .78);
  color: #fff;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.link-exit-overlay[hidden] {
  display: none !important;
}

.link-exit-dialog {
  width: min(640px, 92vw);
  padding: clamp(24px, 4vh, 42px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(10, 10, 12, .96);
  box-shadow: 0 26px 90px rgba(0, 0, 0, .62);
}

.link-exit-dialog:focus {
  outline: none;
}

.link-exit-kicker {
  margin-bottom: 12px;
  color: var(--vb-red);
  font-family: var(--font-body);
  font-size: clamp(13px, 1.7vh, 16px);
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.link-exit-title {
  margin: 0 0 14px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vh, 52px);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: 0;
}

.link-exit-message {
  width: auto;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, .76);
  font-size: clamp(16px, 2.4vh, 20px);
  line-height: 1.42;
  text-align: left;
}

.link-exit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.link-exit-button {
  min-width: 160px;
  min-height: 56px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: clamp(16px, 2.3vh, 19px);
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
}

.link-exit-button::after {
  display: none;
}

.link-exit-button.is-primary {
  border-color: var(--vb-red);
  background: var(--vb-red);
}

.link-exit-button:focus,
.link-exit-button:hover {
  outline: 3px solid rgba(255, 255, 255, .9) !important;
  outline-offset: 4px;
  transform: scale(1.03);
  color: #fff;
}

.permission-list {
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 16px);
  padding: 0;
  margin: -4px 0 clamp(18px, 3vh, 30px);
  list-style: none;
}

.permission-list li,
.permission-list p {
  min-height: clamp(64px, 9vh, 94px);
  margin: 0;
  padding: clamp(13px, 1.7vh, 18px);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 8px;
  background: rgba(255, 255, 255, .10);
  color: rgba(255, 255, 255, .70);
  font-size: clamp(13px, 1.6vh, 16px);
  font-weight: 750;
  line-height: 1.28;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 12px 28px rgba(0, 0, 0, .20);
}

.permission-list li::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--vb-red), var(--vb-cyan));
}

.permission-list strong {
  color: var(--vb-text);
  font-weight: 850;
}

.permission-list.blocked-reason-list {
  width: min(660px, 100%);
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  margin-top: clamp(2px, .8vh, 8px);
}

.permission-list.blocked-reason-list p {
  min-height: 0;
  padding: clamp(16px, 2.1vh, 23px) clamp(18px, 2.4vw, 30px);
  text-align: center;
}

#loadingAnimation {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100svh;
  background: rgba(0, 0, 0, .84);
  display: none;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.spinner {
  position: relative;
  width: 78px;
  height: 78px;
  border: 4px solid rgba(255, 255, 255, .18);
  border-top-color: #fff;
  border-right-color: var(--vb-cyan);
  border-radius: 50%;
  animation: spin .85s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .36);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 1000px) and (orientation: landscape) {
  .content {
    min-height: clamp(210px, 31vh, 340px);
  }

  .permission-list.kicked-list,
  .permission-list.reinstall-list {
    width: min(720px, 100%);
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) and (max-width: 1180px) and (orientation: landscape) {
  :root {
    --vb-bottom-pad: clamp(28px, 6vh, 54px);
  }

  .page-shell {
    padding: clamp(158px, 35vh, 258px) 5vw var(--vb-bottom-pad);
  }

  .media-panel {
    top: clamp(24px, 5vh, 44px);
    width: clamp(230px, 28vw, 340px);
    height: clamp(58px, 8vw, 84px);
  }

  body.access-link-page .media-panel {
    width: clamp(330px, 40vw, 520px);
    height: clamp(84px, 10vw, 130px);
  }

  h1 {
    font-size: clamp(30px, 5.4vh, 46px);
  }

  h3,
  p,
  .lead {
    width: min(580px, 100%);
    font-size: clamp(14px, 2.15vh, 18px);
  }

  button,
  .start_button,
  .reload_button,
  .primary-button,
  .install_button {
    min-height: clamp(44px, 6.5vh, 56px);
  }

  .permission-list {
    width: min(760px, 100%);
  }
}

@media (min-width: 600px) and (orientation: portrait) {
  :root {
    --vb-bottom-pad: calc(env(safe-area-inset-bottom, 0px) + clamp(42px, 7vh, 84px));
  }

  body::before {
    background-position: center top;
  }

  .page-shell {
    justify-content: flex-end;
    padding: calc(env(safe-area-inset-top, 0px) + clamp(146px, 29vh, 264px)) clamp(28px, 5vw, 54px) var(--vb-bottom-pad);
    overflow: hidden auto;
  }

  .media-panel {
    top: calc(env(safe-area-inset-top, 0px) + clamp(32px, 5vh, 58px));
    width: clamp(250px, 36vw, 380px);
    height: clamp(64px, 9vw, 94px);
  }

  body.access-link-page .media-panel {
    width: clamp(340px, 58vw, 520px);
    height: clamp(88px, 15vw, 136px);
  }

  .content {
    width: min(720px, 100%);
  }

  h1 {
    font-size: clamp(38px, 6.2vw, 62px);
  }

  h3,
  p,
  .lead {
    width: min(590px, 100%);
    font-size: clamp(17px, 2.7vw, 22px);
  }

  .permission-list {
    grid-template-columns: 1fr;
    width: min(620px, 100%);
  }

  .permission-list li,
  .permission-list p {
    min-height: 0;
    text-align: center;
  }

  .permission-list li::before {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  :root {
    --vb-bottom-pad: calc(env(safe-area-inset-bottom, 0px) + 24px);
  }

  body {
    overflow: hidden;
  }

  body::before {
    background-position: center top;
  }

  body::after {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, .08) 0%, rgba(0, 0, 0, .12) 34%, rgba(3, 20, 23, .64) 59%, rgba(8, 31, 35, .96) 100%),
      linear-gradient(90deg, rgba(0, 0, 0, .26), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .26));
  }

  .page-shell {
    justify-content: flex-end;
    padding: calc(env(safe-area-inset-top, 0px) + 118px) clamp(14px, 4vw, 22px) var(--vb-bottom-pad);
    overflow: hidden auto;
    -webkit-overflow-scrolling: touch;
  }

  .media-panel {
    top: calc(env(safe-area-inset-top, 0px) + 20px);
    width: clamp(190px, 55vw, 270px);
    height: clamp(50px, 14vw, 72px);
  }

  body.access-link-page .media-panel {
    width: clamp(250px, 72vw, 360px);
    height: clamp(66px, 19vw, 96px);
  }

  .content {
    width: min(460px, 100%);
  }

  .account_text,
  .status-pill {
    min-height: 28px;
    margin-bottom: 10px;
    padding: 6px 10px;
    font-size: clamp(10px, 2.8vw, 12px);
    letter-spacing: .08em;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(27px, 8.3vw, 42px);
    line-height: 1.05;
  }

  h2 {
    font-size: clamp(13px, 3.6vw, 16px);
  }

  h3,
  p,
  .lead {
    width: min(390px, 100%);
    margin: 10px auto 16px;
    font-size: clamp(13px, 3.75vw, 16px);
    line-height: 1.32;
  }

  .actions {
    width: 100%;
    gap: 10px;
  }

  button,
  .start_button,
  .reload_button,
  .primary-button,
  .install_button {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0 16px;
    font-size: clamp(13px, 3.8vw, 16px);
  }

  .install-note,
  .small_text {
    width: min(330px, 100%);
    font-size: clamp(11px, 3.25vw, 13px);
  }

  .footer {
    margin-top: 14px;
    font-size: clamp(10px, 3vw, 12px);
  }

  .permission-list {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
    margin-bottom: 14px;
  }

  .permission-list li,
  .permission-list p {
    min-height: 0;
    padding: 11px 12px;
    font-size: clamp(12px, 3.35vw, 14px);
    line-height: 1.26;
    text-align: left;
  }

  .permission-list li::before {
    display: inline-block;
    width: 24px;
    height: 3px;
    margin: 0 10px 3px 0;
    vertical-align: middle;
  }

  .status-card {
    width: 100%;
    margin-top: 14px;
    padding: 14px;
  }

  .code_text {
    min-width: min(190px, 100%);
    min-height: 54px;
    margin-bottom: 12px;
    font-size: clamp(25px, 8vw, 34px);
  }

  .timer_text {
    font-size: clamp(13px, 3.6vw, 15px);
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  :root {
    --vb-bottom-pad: calc(env(safe-area-inset-bottom, 0px) + 16px);
  }

  .page-shell {
    padding: calc(env(safe-area-inset-top, 0px) + 86px) 22px var(--vb-bottom-pad);
    overflow: hidden auto;
  }

  .media-panel {
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    width: 196px;
    height: 52px;
  }

  body.access-link-page .media-panel {
    width: 260px;
    height: 70px;
  }

  h1 {
    font-size: clamp(24px, 8vh, 34px);
  }

  h3,
  p,
  .lead {
    width: min(520px, 100%);
    margin: 8px auto 12px;
    font-size: clamp(12px, 3.3vh, 15px);
  }

  .actions {
    gap: 9px;
  }

  button,
  .start_button,
  .reload_button,
  .primary-button,
  .install_button {
    min-height: 40px;
    min-width: 132px;
    font-size: clamp(12px, 3.1vh, 15px);
  }

  .install-note,
  .footer {
    display: none;
  }

  .permission-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  .permission-list li,
  .permission-list p {
    min-height: 0;
    padding: 10px;
    font-size: 12px;
  }
}

@media (max-width: 380px), (max-height: 560px) {
  .page-shell {
    padding-top: calc(env(safe-area-inset-top, 0px) + 82px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  }

  .media-panel {
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    width: 162px;
    height: 44px;
  }

  body.access-link-page .media-panel {
    width: 210px;
    height: 56px;
  }

  .account_text,
  .status-pill {
    margin-bottom: 7px;
  }

  h1 {
    font-size: clamp(22px, 7.5vw, 32px);
  }

  h3,
  p,
  .lead {
    margin: 8px auto 12px;
    font-size: 12px;
    line-height: 1.25;
  }

  button,
  .start_button,
  .reload_button,
  .primary-button,
  .install_button {
    min-height: 40px;
  }

  .footer {
    display: none;
  }

  .permission-list li,
  .permission-list p {
    padding: 9px 10px;
    font-size: 11px;
  }

  .status-card {
    padding: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
