* { box-sizing: border-box; }

[hidden] { display: none !important; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #1d1d1d;
}

#pulse-page {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

#profile-page {
  position: fixed;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #1d1d1d;
}

#desktop-profile-page {
  position: fixed;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #1d1d1d;
}

#settings-page {
  position: fixed;
  z-index: 5;
  inset: 0;
  overflow: auto;
  padding: 24px 16px 96px;
  background: #1d1d1d;
}

#login-page {
  position: fixed;
  z-index: 6;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 24px 16px;
  background: #1d1d1d;
  color: #fff;
  font: 14px/1.5 Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-card {
  width: min(100%, 480px);
  padding: 32px;
  border: 1px solid #383838;
  border-radius: 12px;
  background: #171717;
  box-shadow: 0 8px 24px #0005;
}

.login-card__eyebrow { color: #aaa; font-size: 12px; letter-spacing: .12em; }
.login-card h1 { margin: 8px 0 4px; font-size: 26px; }
.login-card__description { margin: 0 0 24px; color: #aaa; }
.login-card .login-form { width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.login-card .login-form input { background: #242424; }

.account { position: fixed; z-index: 1000; top: 14px; right: max(16px, calc((100vw - 1088px) / 2)); color: #fff; font: 14px/1.4 Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.account__trigger, .account__action { border: 0; color: #fff; background: transparent; font: inherit; cursor: pointer; }
.account__trigger { padding: 8px 10px; }
.account__menu { min-width: 190px; margin-top: 4px; padding: 12px; border: 1px solid #3c3c3c; border-radius: 8px; background: #202020; box-shadow: 0 8px 24px #0008; }
.account__menu strong { display: block; margin-bottom: 10px; font-weight: 500; }
.account__action { width: 100%; padding: 8px; border-radius: 5px; background: #303030; text-align: left; }
.login-modal { position: fixed; z-index: 1100; inset: 0; display: grid; place-items: center; padding: 20px; background: #0009; }
.login-form { position: relative; display: grid; gap: 14px; width: min(100%, 360px); padding: 26px; border-radius: 12px; background: #202020; color: #fff; font: 14px/1.4 Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; box-shadow: 0 12px 40px #0009; }
.login-form h1 { margin: 0 0 4px; font-size: 22px; }
.login-form label { display: grid; gap: 6px; }
.login-form input { width: 100%; padding: 10px; border: 1px solid #555; border-radius: 6px; color: #fff; background: #111; font: inherit; }
.login-form__close { position: absolute; top: 8px; right: 10px; border: 0; color: #aaa; background: transparent; font-size: 26px; cursor: pointer; }
.login-form__submit { padding: 10px; border: 0; border-radius: 6px; color: #fff; background: #1668dc; font: inherit; cursor: pointer; }
.login-form__error { min-height: 20px; margin: 0; color: #ff7875; }
.mobile-nav {
  position: fixed;
  z-index: 999;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  align-items: stretch;
  width: 100%;
  height: max(72px, calc(49px + env(safe-area-inset-bottom, 0px)));
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  overflow: visible;
  border: 0;
  border-top: 1px solid #303030;
  background: #141414;
}

.mobile-nav a {
  color: inherit;
  text-decoration: none;
}

.mobile-nav__item {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999 !important;
}

.mobile-nav__item.is-active {
  color: #1668dc !important;
}

.mobile-nav__item svg,
.mobile-nav__scan svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.mobile-nav__item svg {
  overflow: visible;
}

.mobile-nav__scan {
  position: relative;
  top: -31px;
  z-index: 2;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  color: #fff !important;
}

.mobile-nav__scan::before {
  position: absolute;
  z-index: -1;
  width: 60px;
  height: 60px;
  border: 7px solid #1d1d1d;
  border-radius: 50%;
  background: #1668dc;
  box-shadow: 0 0 0 1px #303030;
  content: "";
}

.camera {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background: #080808;
  color: #fff;
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.camera.is-open {
  display: flex;
}

.camera video {
  width: min(100%, 760px);
  max-height: 78vh;
  border-radius: 12px;
  background: #111;
  object-fit: contain;
}

.camera__close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #262626;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

#camera-message {
  margin: 0;
  text-align: center;
}

@media (max-width: 1095px) {
  .mobile-nav { display: flex; }
  .account { top: 8px; right: 12px; }
  #settings-page { padding: 16px 12px 96px; }
}

@media (min-width: 1096px) {
  #profile-page { display: none !important; }
}
