:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #fff8df;
  --line: #e7e0cf;
  --text: #151515;
  --muted: #ded8c8;
  --brand: #b77900;
  --yellow: #f5c84c;
  --yellow-strong: #e8b321;
  --ok: #8bd17c;
  --danger: #f87171;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

body:has(.hero),
body:has(.user-hero),
body:has(.pdfs-page),
body:has(.apps-page),
body:has(.admin-page),
body:has(.elito-page) {
  background: #000000;
  color: #ffffff;
}

body:has(.hero)::before,
body:has(.user-hero)::before {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(100vw, 760px);
  z-index: 0;
  pointer-events: none;
  background: #000000 url("/background-image") center / cover no-repeat;
  transform: translateX(-50%) translateZ(0);
}

body:has(.hero)::after,
body:has(.user-hero)::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(100vw, 760px);
  z-index: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, .44);
  transform: translateX(-50%);
}

body:has(.home-stagger-menu) .topbar {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  padding: 12px 13px;
  font-size: 16px;
}

input:focus {
  outline: 2px solid rgba(125, 211, 252, .5);
  outline-offset: 1px;
}

.shell {
  position: relative;
  width: min(100%, 760px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

.top-fade-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100vw;
  height: calc(42px + env(safe-area-inset-top));
  pointer-events: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background: rgba(255, 255, 255, .82);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .72) 42%, rgba(0, 0, 0, .18) 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .72) 42%, rgba(0, 0, 0, .18) 78%, transparent 100%);
}

.bottom-fade-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  width: 100vw;
  height: calc(42px + env(safe-area-inset-bottom));
  pointer-events: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background: rgba(255, 255, 255, .82);
  -webkit-mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .72) 42%, rgba(0, 0, 0, .18) 78%, transparent 100%);
  mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .72) 42%, rgba(0, 0, 0, .18) 78%, transparent 100%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 18px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.iconbtn,
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: #191400;
  padding: 0 14px;
  cursor: pointer;
}

.button {
  width: 100%;
  font-weight: 700;
}

.button.primary {
  border-color: var(--yellow-strong);
  background: var(--yellow);
}

.button.small {
  width: auto;
  min-height: 38px;
  padding: 0 12px;
}

.button.danger {
  border-color: rgba(248, 113, 113, .4);
  color: #8b1d1d;
}

.hero,
.panel,
.welcome,
.page-head {
  padding: 18px 0;
}

.hero {
  min-height: calc(100svh - 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.hero-person {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 380px);
  max-height: 45svh;
  margin: 0 auto -18px;
  object-fit: contain;
}

.login-panda {
  --panda-eye-x: 0px;
  --panda-eye-y: 0px;
  position: relative;
  z-index: 100;
  width: clamp(112px, 32vw, 148px);
  height: clamp(112px, 32vw, 148px);
  margin: 0 auto -48px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .18));
  pointer-events: none;
}

.login-panda svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.panda-pupil {
  transform: translate(var(--panda-eye-x), var(--panda-eye-y));
  transition: transform .08s linear;
}

.panda-brow {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}

.panda-paw {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .42s cubic-bezier(.2, 1.25, .3, 1);
}

.login-panda.is-covering .panda-pupil {
  transform: translate(0, 0);
}

.login-panda.is-covering .panda-brow-left {
  transform: translateY(2px) rotate(10deg);
}

.login-panda.is-covering .panda-brow-right {
  transform: translateY(2px) rotate(-10deg);
}

.login-panda.is-covering .panda-paw-left {
  transform: translate(12px, -42px) rotate(38deg);
}

.login-panda.is-covering .panda-paw-right {
  transform: translate(-12px, -42px) rotate(-38deg);
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(100%, 380px);
  margin: 0 auto;
  border: 1px solid rgba(245, 196, 0, .95);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% -15%, rgba(245, 196, 0, .12), transparent 32%),
    rgba(8, 9, 10, .86);
  box-shadow:
    0 0 0 1px rgba(255, 215, 64, .08) inset,
    0 24px 70px rgba(0, 0, 0, .48),
    0 0 46px rgba(245, 196, 0, .2);
  padding: 54px 18px 22px;
  backdrop-filter: blur(8px);
}

.account-auth-page {
  position: relative;
  min-height: calc(100svh - 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 0 88px;
}

.account-auth-page .login-panda {
  margin-bottom: -28px;
  transform: translateY(-18px);
}

.account-auth-card {
  padding-top: 34px;
}

.account-auth-card .auth-copy {
  margin-bottom: 18px;
}

.account-auth-card .auth-copy p {
  max-width: 31ch;
  margin-left: auto;
  margin-right: auto;
}

.auth-badge {
  position: absolute;
  display: grid;
  place-items: center;
  left: 50%;
  top: 0;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(245, 196, 0, .95);
  border-radius: 999px;
  background: rgba(9, 10, 11, .92);
  box-shadow: 0 0 28px rgba(245, 196, 0, .24);
  transform: translate(-50%, -50%);
}

.auth-badge svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #f5c400;
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.auth-copy {
  text-align: center;
  margin-bottom: 22px;
}

.auth-copy h1 {
  margin: 0;
  color: #f5c400;
  font-size: 27px;
  line-height: 1.12;
}

.auth-copy h1::first-letter {
  color: inherit;
}

.auth-copy p {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: 16px;
}

.auth-form {
  display: none;
  gap: 13px;
}

.auth-form.is-active {
  display: grid;
  animation: form-slide .22s ease-out both;
}

.auth-form input {
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 8px;
  background: rgba(10, 11, 12, .44);
  color: #ffffff;
  text-align: left;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
}

.password-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.password-field .field-error {
  grid-column: 1 / -1;
}

.password-field input {
  grid-column: 1 / -1;
  grid-row: 1;
  padding-right: 54px;
}

.password-eye-toggle {
  grid-column: 2;
  grid-row: 1;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: 5px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(17, 17, 17, .72);
  cursor: pointer;
}

.password-eye-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-eye-toggle .eye-slash {
  opacity: 1;
  transform-origin: center;
  transition: opacity .16s ease, transform .16s ease;
}

.password-eye-toggle.is-visible .eye-slash {
  opacity: 0;
  transform: scale(.78);
}

.field-wrap {
  position: relative;
  display: grid;
}

.field-error {
  justify-self: start;
  max-width: 100%;
  margin: 0 0 7px;
  border: 1px solid rgba(239, 68, 68, .8);
  border-radius: 8px;
  background: rgba(20, 0, 0, .96);
  color: #fecaca;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .28);
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, .82);
}

.auth-form input:focus {
  border-color: rgba(17, 17, 17, .32);
  outline: 2px solid rgba(17, 17, 17, .12);
  outline-offset: 2px;
}

.auth-form input.is-invalid {
  border-color: #ef4444;
  background: rgba(127, 29, 29, .26);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .24), 0 10px 26px rgba(0, 0, 0, .18);
  animation: field-shake .28s ease both;
}

@keyframes field-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.auth-form .button {
  margin-top: 2px;
}

.password-strength {
  display: grid;
  gap: 8px;
  margin: -2px 0 2px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
}

.password-strength-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

.password-strength-track span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: #ef4444;
  transition: width .2s ease, background-color .2s ease;
}

.password-strength strong {
  color: #f87171;
  font-size: 12px;
}

.password-strength ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.password-strength li {
  position: relative;
  padding-left: 15px;
}

.password-strength li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ef4444;
}

.password-strength li.is-ok {
  color: #ffffff;
}

.password-strength li.is-ok::before {
  background: #4ade80;
}

.password-strength[data-score="3"] .password-strength-track span,
.password-strength[data-score="4"] .password-strength-track span {
  background: #f5c400;
}

.password-strength[data-score="3"] strong,
.password-strength[data-score="4"] strong {
  color: #f5c400;
}

.password-strength[data-score="5"] .password-strength-track span {
  background: #4ade80;
}

.password-strength[data-score="5"] strong {
  color: #4ade80;
}

.auth-form .button.primary {
  min-height: 58px;
  border: 1px solid #f5c400;
  border-radius: 8px;
  background: #f5c400;
  color: #111111;
  text-transform: uppercase;
  letter-spacing: 0;
  box-shadow: 0 12px 28px rgba(245, 196, 0, .22);
}

.auth-form .button.primary:active {
  transform: translateY(1px);
}

.google-login-wrap {
  display: none;
  margin-top: 12px;
}

.auth-card[data-auth-mode="login"] .google-login-wrap {
  display: block;
}

.google-login-button {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  border: 1px solid rgba(17, 17, 17, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  color: #111111;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 15, 15, .06);
}

.google-login-button:active {
  transform: translateY(1px);
}

.google-logo-text {
  display: inline-flex;
  align-items: center;
  gap: 0;
  line-height: 1;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0;
  font-family: Arial, Helvetica, sans-serif;
}

.google-wordmark {
  width: auto;
  height: 28px;
  display: block;
  object-fit: contain;
  margin-right: -1px;
}

.google-letter.blue {
  color: #4285f4;
}

.google-letter.red {
  color: #ea4335;
}

.google-letter.yellow {
  color: #fbbc05;
}

.google-letter.green {
  color: #34a853;
}

.auth-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: #ffffff;
}

.auth-switch a {
  color: #ffffff;
  padding: 6px 1px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.auth-switch a.is-active {
  color: #f5c84c;
}

.auth-switch span {
  color: #ffffff;
  font-weight: 700;
}

.copyright {
  position: relative;
  z-index: 51;
  margin: 14px 0 0;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
}

body:has(.hero) .copyright,
.home-footer .copyright {
  color: #ffffff;
}

.toast-stack {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  top: max(18px, env(safe-area-inset-top));
  z-index: 180;
  display: grid;
  gap: 14px;
  justify-items: center;
  pointer-events: none;
}

@media (min-width: 720px) {
  .toast-stack {
    left: auto;
    right: max(26px, env(safe-area-inset-right));
    width: min(430px, calc(100vw - 52px));
    justify-items: end;
  }
}

.toast {
  --toast-color: #22c55e;
  --toast-soft: rgba(34, 197, 94, .12);
  position: relative;
  width: min(100%, 430px);
  min-height: 82px;
  display: grid;
  grid-template-columns: 48px 1fr 34px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, .06);
  border-radius: 14px;
  background: #ffffff;
  color: #1f2937;
  padding: 14px 13px 17px 16px;
  box-shadow:
    0 22px 58px rgba(15, 23, 42, .18),
    0 8px 20px rgba(15, 23, 42, .08),
    0 0 0 1px rgba(255, 255, 255, .78) inset;
  opacity: 0;
  transform: translateY(-18px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  --toast-color: #22c55e;
  --toast-soft: rgba(34, 197, 94, .12);
}

.toast.error {
  --toast-color: #ef4444;
  --toast-soft: rgba(239, 68, 68, .12);
}

.toast.warning {
  --toast-color: #f97316;
  --toast-soft: rgba(249, 115, 22, .13);
}

.toast-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--toast-soft);
  color: var(--toast-color);
  font-size: 24px;
  font-weight: 950;
}

.toast-body {
  min-width: 0;
}

.toast-title {
  display: block;
  color: #253044;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.18;
}

.toast-text {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.25;
}

.toast-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9ca3af;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.toast-close:hover {
  color: #374151;
}

.toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: var(--toast-color);
  transform-origin: left center;
  animation: toast-progress var(--toast-duration, 4500ms) linear forwards;
  box-shadow:
    0 4px 12px color-mix(in srgb, var(--toast-color) 34%, transparent),
    0 10px 22px color-mix(in srgb, var(--toast-color) 18%, transparent);
}

@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.not-found-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 0;
  background: #000000;
}

body:has(.not-found-page) .shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

body:has(.not-found-page) {
  background: #000000;
}

body:has(.user-hero) {
  color: #ffffff;
}

body:has(.user-hero) .shell {
  width: min(100%, 760px);
}

body:has(.user-hero) .topbar {
  display: none;
}

.user-hero {
  display: grid;
  place-items: center;
  padding: 16px 0 20px;
}

.user-hero img {
  width: min(58vw, 220px);
  max-height: 210px;
  object-fit: contain;
}

.service-grid:has(.service-icon) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
}

.service-icon {
  min-height: auto;
  aspect-ratio: auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 4px;
}

.service-icon img {
  display: block;
  width: min(100%, 180px);
  height: auto;
  object-fit: contain;
  filter: none;
}

.service-icon.admin {
  border: 0;
}

body:has(.user-hero) .user-hero img {
  width: min(74vw, 320px);
  max-height: 320px;
}

body:has(.user-hero) .service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px;
}

body:has(.user-hero) .service.service-icon {
  min-height: 0;
  aspect-ratio: auto;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body:has(.user-hero) .service.service-icon img {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
  object-fit: contain;
  filter: none;
}

.home-link-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 24px 0 0;
}

.home-link-action {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 196, 0, .72);
  border-radius: 8px;
  background: rgba(16, 16, 16, .72);
  color: #f5c400;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
}

.admin-link-action {
  padding-right: 12px;
}

.action-badge {
  position: absolute;
  right: -7px;
  top: -8px;
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.url-display {
  width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  border: 1px solid rgba(245, 196, 0, .38);
  border-radius: 8px;
  background: rgba(0, 0, 0, .38);
  color: #ffffff !important;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.35;
}

.link-modal .button.primary {
  display: inline-flex;
  width: min(100%, 190px);
  margin: 0 auto;
  justify-self: center;
}

.link-modal .email-modal-card {
  display: grid;
  justify-items: center;
}

.link-modal .auth-copy {
  width: 100%;
}

.home-corner-actions {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  top: max(12px, env(safe-area-inset-top));
  z-index: 80;
  display: grid;
  justify-items: start;
  gap: 8px;
}

body:has(.home-stagger-menu) .service-grid,
body:has(.home-stagger-menu) > .floating-action,
body:has(.home-stagger-menu) .shell > .floating-gear,
body:has(.home-stagger-menu) .shell > .floating-key,
body:has(.home-stagger-menu) .shell > .floating-elito:not(.elito-close-arrow) {
  display: none !important;
}

.home-stagger-menu {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}

.home-menu-trigger {
  position: fixed;
  top: max(6px, calc(env(safe-area-inset-top) + 6px));
  right: max(12px, env(safe-area-inset-right));
  z-index: 122;
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: auto;
  height: auto;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #ffffff;
  padding: 0;
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: none;
  cursor: pointer;
  pointer-events: auto;
}

.home-menu-trigger img {
  display: none;
}

.home-menu-words {
  position: relative;
  display: block;
  width: 190px;
  height: 40px;
  overflow: hidden;
  line-height: 40px;
  text-align: right;
}

.home-menu-words span {
  display: block;
  position: absolute;
  right: 0;
  bottom: 0;
  font: inherit;
  letter-spacing: 0;
  transition: transform .28s cubic-bezier(.16, 1, .3, 1), opacity .2s ease;
}

.home-menu-words span:first-child {
  transform: translateY(0);
  opacity: 1;
}

.home-menu-words span:last-child {
  transform: translateY(110%);
  opacity: 0;
}

.home-stagger-menu.is-open .home-menu-trigger {
  opacity: 1;
  pointer-events: auto;
  color: #000000;
}

.home-stagger-menu.is-open .home-menu-words span:first-child {
  transform: translateY(-110%);
  opacity: 0;
}

.home-stagger-menu.is-open .home-menu-words span:last-child {
  transform: translateY(0);
  opacity: 1;
}

.home-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 121;
  pointer-events: none;
  visibility: hidden;
}

.home-stagger-menu.is-open .home-menu-overlay {
  pointer-events: auto;
  visibility: visible;
}

.home-menu-layer,
.home-menu-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100dvh;
  transform: translateX(104%);
  will-change: transform;
}

.home-menu-layer {
  pointer-events: none;
}

.home-menu-layer.layer-one {
  background:
    linear-gradient(
      to right,
      #f5c400 0 11.111%,
      #7c3aed 11.111% 22.222%,
      #f97316 22.222% 33.333%,
      #16a34a 33.333% 44.444%,
      #2563eb 44.444% 55.555%,
      #ec4899 55.555% 66.666%,
      #06b6d4 66.666% 77.777%,
      #64748b 77.777% 88.888%,
      #ef4444 88.888% 100%
    );
  transition: transform .46s cubic-bezier(.16, 1, .3, 1);
}

.home-menu-layer.layer-two {
  background:
    linear-gradient(
      to right,
      rgba(245, 196, 0, .78) 0 11.111%,
      rgba(124, 58, 237, .78) 11.111% 22.222%,
      rgba(249, 115, 22, .78) 22.222% 33.333%,
      rgba(22, 163, 74, .78) 33.333% 44.444%,
      rgba(37, 99, 235, .78) 44.444% 55.555%,
      rgba(236, 72, 153, .78) 55.555% 66.666%,
      rgba(6, 182, 212, .78) 66.666% 77.777%,
      rgba(100, 116, 139, .78) 77.777% 88.888%,
      rgba(239, 68, 68, .78) 88.888% 100%
    );
  transition: transform .52s cubic-bezier(.16, 1, .3, 1) .055s;
}

.home-menu-layer.layer-three {
  background:
    linear-gradient(
      to right,
      rgba(245, 196, 0, .42) 0 11.111%,
      rgba(124, 58, 237, .42) 11.111% 22.222%,
      rgba(249, 115, 22, .42) 22.222% 33.333%,
      rgba(22, 163, 74, .42) 33.333% 44.444%,
      rgba(37, 99, 235, .42) 44.444% 55.555%,
      rgba(236, 72, 153, .42) 55.555% 66.666%,
      rgba(6, 182, 212, .42) 66.666% 77.777%,
      rgba(100, 116, 139, .42) 77.777% 88.888%,
      rgba(239, 68, 68, .42) 88.888% 100%
    );
  transition: transform .58s cubic-bezier(.16, 1, .3, 1) .105s;
}

.home-menu-panel {
  display: flex;
  flex-direction: column;
  align-content: start;
  overflow: auto;
  overscroll-behavior: contain;
  padding: calc(34px + env(safe-area-inset-top)) max(32px, calc((100vw - 760px) / 2 + 32px)) calc(34px + env(safe-area-inset-bottom));
  background: #ffffff;
  color: #000000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: transform .62s cubic-bezier(.16, 1, .3, 1) .16s;
}

.home-stagger-menu.is-open .home-menu-layer,
.home-stagger-menu.is-open .home-menu-panel {
  transform: translateX(0);
}

.home-menu-close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 2;
  display: inline-flex;
  width: auto;
  height: auto;
  min-height: 44px;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000000;
  padding: 0;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.home-menu-close {
  display: none;
}

.home-menu-close::before {
  content: "Fechar";
}

.home-menu-close::after {
  content: "+";
  display: inline-block;
  font-size: 24px;
  line-height: 1;
  transform: translateY(-1px) rotate(0deg);
  transition: transform .26s cubic-bezier(.16, 1, .3, 1);
}

.home-stagger-menu.is-open .home-menu-close::after {
  transform: translateY(-1px) rotate(45deg);
}

.home-menu-close span,
.home-menu-close span::before {
  display: none;
}

.home-menu-close span {
  position: relative;
  transform: rotate(45deg);
}

.home-menu-close span::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: rotate(90deg);
}

.home-menu-head {
  display: none;
}

.home-menu-head img {
  width: min(42vw, 190px);
  max-height: 190px;
  object-fit: contain;
}

.home-menu-head strong {
  color: #f5c400;
  font-size: clamp(24px, 7vw, 42px);
  line-height: 1;
  font-weight: 950;
}

.home-menu-list {
  display: grid;
  width: min(100%, 640px);
  margin: 54px 0 auto;
  padding: 0;
  list-style: none;
  gap: 10px;
}

.home-menu-list li {
  opacity: 0;
  transform: translateY(34px) rotate(1deg);
  transition:
    opacity .34s ease calc(.24s + var(--i) * .055s),
    transform .5s cubic-bezier(.16, 1, .3, 1) calc(.24s + var(--i) * .055s);
}

.home-stagger-menu.is-open .home-menu-list li {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.home-menu-item {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  width: 100%;
  min-height: 0;
  gap: 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000000;
  padding: 0;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}

.home-menu-item:hover,
.home-menu-item:focus-visible {
  color: var(--menu-color, #eab308);
  background: transparent;
  outline: 0;
}

.home-menu-item img {
  display: none;
}

.home-menu-item > span:not(.live-badge):not(.home-menu-symbol) {
  max-width: calc(100vw - 92px);
  overflow-wrap: normal;
  color: inherit;
  font-size: clamp(24px, 7vw, 58px);
  font-weight: 950;
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: normal;
}

.home-menu-list li .home-menu-item::after {
  color: var(--menu-color, #eab308);
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 500;
  line-height: 1;
  transform: translateY(.22em);
}

.home-menu-list li:nth-child(1) .home-menu-item::after { content: "01"; }
.home-menu-list li:nth-child(2) .home-menu-item::after { content: "02"; }
.home-menu-list li:nth-child(3) .home-menu-item::after { content: "03"; }
.home-menu-list li:nth-child(4) .home-menu-item::after { content: "04"; }
.home-menu-list li:nth-child(5) .home-menu-item::after { content: "05"; }
.home-menu-list li:nth-child(6) .home-menu-item::after { content: "06"; }
.home-menu-list li:nth-child(7) .home-menu-item::after { content: "07"; }
.home-menu-list li:nth-child(8) .home-menu-item::after { content: "08"; }
.home-menu-list li:nth-child(9) .home-menu-item::after { content: "09"; }

.home-menu-list li:nth-child(1) { --menu-color: #f5c400; }
.home-menu-list li:nth-child(2) { --menu-color: #7c3aed; }
.home-menu-list li:nth-child(3) { --menu-color: #f97316; }
.home-menu-list li:nth-child(4) { --menu-color: #16a34a; }
.home-menu-list li:nth-child(5) { --menu-color: #2563eb; }
.home-menu-list li:nth-child(6) { --menu-color: #ec4899; }
.home-menu-list li:nth-child(7) { --menu-color: #06b6d4; }
.home-menu-list li:nth-child(8) { --menu-color: #64748b; }
.home-menu-list li:nth-child(9) { --menu-color: #ef4444; }


.home-menu-symbol {
  display: none;
}

.home-menu-symbol svg {
  display: block;
  width: 42px;
  height: 42px;
  fill: none;
  stroke: #f5c400;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-menu-logout {
  margin: 0;
}

.home-menu-logout .home-menu-item {
  font: inherit;
}

.home-menu-item .live-badge {
  display: none;
}

html.home-menu-open,
body.home-menu-open {
  overflow: hidden;
  height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .home-menu-layer,
  .home-menu-panel,
  .home-menu-list li {
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

.email-warning-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}

.email-warning-badge {
  border: 1px solid rgba(239, 68, 68, .22);
  background: rgba(20, 0, 0, .78);
  color: #fecaca;
}

.warning-triangle {
  width: 0;
  height: 0;
  display: inline-grid;
  place-items: center;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 18px solid #ef4444;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  position: relative;
}

.warning-triangle::after {
  content: "!";
  position: absolute;
  top: 5px;
  left: -3px;
}

.email-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 22px;
}

.email-modal:target {
  display: grid;
}

.email-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(4px);
}

.email-modal-card {
  position: relative;
  width: min(100%, 380px);
  border: 1px solid rgba(245, 196, 0, .95);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% -15%, rgba(245, 196, 0, .12), transparent 32%),
    rgba(8, 9, 10, .94);
  box-shadow:
    0 0 0 1px rgba(255, 215, 64, .08) inset,
    0 24px 70px rgba(0, 0, 0, .55),
    0 0 46px rgba(245, 196, 0, .2);
  padding: 54px 18px 22px;
}

.email-modal-badge {
  top: 0;
}

.email-modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  color: rgba(255, 255, 255, .7);
  font-size: 20px;
  font-weight: 900;
  z-index: 2;
}

.iptv-service {
  position: relative;
}

.live-badge {
  position: absolute;
  right: 8px;
  top: 8px;
  display: block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, .75);
  border-radius: 999px;
  background: currentColor;
  color: #f87171;
  padding: 0;
}

.iptv-service.is-online .live-badge,
.live-badge.is-online {
  border-color: rgba(74, 222, 128, .45);
  color: #4ade80;
  box-shadow: 0 0 18px rgba(74, 222, 128, .42);
}

.iptv-service.is-offline .live-badge,
.live-badge.is-offline {
  border-color: rgba(248, 113, 113, .45);
  color: #f87171;
  box-shadow: 0 0 18px rgba(248, 113, 113, .35);
}

body:has(.iptv-player-page) {
  background: #000000;
  color: #ffffff;
}

body:has(.iptv-player-page) .topbar {
  display: none;
}

body:has(.floating-action) .topbar {
  display: none;
}

.floating-action {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  bottom: auto;
  right: max(12px, calc((100vw - 760px) / 2 + 12px));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 156px;
  height: 156px;
}

.floating-action img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.floating-action button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.floating-back {
  width: 150px;
  height: 150px;
}

.floating-back-circle,
.floating-gear,
.floating-key,
.floating-elito {
  top: auto;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 54px;
  height: 54px;
  border: 2px solid #f5c400;
  border-radius: 999px;
  background: rgba(0, 0, 0, .78);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .35), 0 0 18px rgba(245, 196, 0, .18);
  backdrop-filter: blur(6px);
}

.floating-back-circle,
.floating-key {
  top: max(12px, env(safe-area-inset-top));
  bottom: auto;
}

.floating-gear {
  top: max(12px, env(safe-area-inset-top));
  bottom: auto;
}

.floating-elito {
  top: max(12px, env(safe-area-inset-top));
  bottom: auto;
  text-decoration: none;
  padding: 6px;
  border-color: transparent;
  overflow: visible;
  box-shadow: none;
  animation: none;
}

.floating-elito::before,
.floating-elito::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid transparent;
  background:
    conic-gradient(from 0deg, transparent 0 18%, rgba(255, 255, 255, .95) 23% 29%, transparent 34% 66%, rgba(255, 255, 255, .95) 71% 77%, transparent 82% 100%)
    border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  filter: drop-shadow(0 0 9px rgba(255, 255, 255, .42));
  animation: elito-ring-sweep 2.4s ease-in-out infinite alternate;
}

.floating-elito::after {
  animation-direction: alternate-reverse;
}

@keyframes elito-ring-sweep {
  0% {
    transform: rotate(0deg);
    opacity: .58;
  }
  50% {
    opacity: 1;
  }
  to {
    transform: rotate(180deg);
    opacity: .9;
  }
}

.floating-elito-user {
  top: calc(max(12px, env(safe-area-inset-top)) + 66px);
}

.floating-elito-admin {
  right: max(78px, calc((100vw - 760px) / 2 + 78px));
}

.floating-back-circle span,
.floating-gear span {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.floating-back-circle span::before {
  content: "←";
  color: #f5c400;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
}

.floating-gear span::before {
  content: "⚙";
  color: #f5c400;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.floating-key svg {
  display: block;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #f5c400;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.floating-elito img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.elito-modal:target {
  display: block;
}

html.elito-open,
body.elito-open {
  overflow: hidden;
  height: 100%;
  touch-action: none;
}

.elito-modal .email-modal-backdrop {
  position: fixed;
  background: rgba(0, 0, 0, .48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.elito-card {
  position: fixed;
  inset: 0;
  z-index: 56;
  display: grid;
  justify-items: stretch;
  grid-template-rows: 1fr auto;
  width: min(100vw, 760px);
  max-width: 760px;
  height: 100dvh;
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(14px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, .40);
  box-shadow: none;
  overflow: hidden;
  touch-action: auto;
}

.link-modal .elito-card {
  justify-items: stretch;
}

.elito-close-arrow {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, calc((100vw - 760px) / 2 + 12px));
  bottom: auto;
  z-index: 58;
}

.elito-head {
  align-self: start;
  padding: 4px 70px 14px 4px;
  text-align: left;
}

.elito-head h1 {
  margin: 0;
  color: #f5c400;
  font-size: clamp(1.25rem, 6vw, 1.8rem);
  line-height: 1.08;
}

.elito-chat-log {
  display: grid;
  align-content: end;
  gap: 12px;
  overflow: auto;
  padding: 8px 0 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .7) transparent;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.elito-message-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.elito-message-row.user {
  justify-content: flex-end;
}

.elito-message-row.assistant {
  justify-content: flex-start;
}

.elito-avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(245, 196, 0, .22));
}

.elito-avatar.user {
  border: 1px solid rgba(245, 196, 0, .42);
  border-radius: 999px;
  object-fit: cover;
  background: rgba(0, 0, 0, .5);
}

.elito-message {
  width: fit-content;
  max-width: min(82%, 520px);
  padding: 11px 13px;
  border: 1px solid rgba(245, 196, 0, .42);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(13, 13, 13, .76);
  font-size: 1rem;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.elito-message.user {
  border-color: rgba(255, 255, 255, .24);
  background: rgba(245, 196, 0, .2);
  border-bottom-right-radius: 4px;
}

.elito-message.assistant {
  border-bottom-left-radius: 4px;
}

.elito-message a {
  color: #f5c400;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.elito-chat-form {
  display: grid;
  grid-template-columns: 1fr 50px;
  align-items: end;
  gap: 10px;
  width: 100%;
  padding-top: 10px;
  touch-action: auto;
}

.elito-chat-form textarea {
  width: 100%;
  min-height: 50px;
  max-height: 140px;
  resize: none;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 14px;
  background: rgba(0, 0, 0, .72);
  color: #ffffff;
  padding: 14px 15px;
  font: inherit;
  font-size: 16px;
  outline: none;
}

.elito-chat-form textarea:focus {
  border-color: rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}

.elito-send {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 14px;
  background: rgba(0, 0, 0, .78);
  color: #ffffff;
  cursor: pointer;
}

.elito-send:disabled {
  opacity: .55;
  cursor: wait;
}

.elito-send svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.iptv-player-page {
  min-height: calc(100svh - 32px);
  display: grid;
  align-content: start;
  gap: 16px;
  padding: calc(76px + env(safe-area-inset-top)) 0 calc(72px + env(safe-area-inset-bottom));
}

.iptv-player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.iptv-player-head h1 {
  margin: 0;
  color: #f97316;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.iptv-video-wrap {
  overflow: hidden;
  border: 1px solid rgba(249, 115, 22, .44);
  border-radius: 14px;
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 18px 52px rgba(15, 15, 15, .12);
}

.iptv-video-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.iptv-now,
.iptv-empty {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  color: #151515;
}

.iptv-player-error {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(239, 68, 68, .32);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  color: #ef4444;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.iptv-now strong,
.iptv-empty strong {
  color: #f97316;
  font-size: 18px;
  font-weight: 950;
}

.iptv-now span,
.iptv-empty p,
.iptv-now small {
  margin: 0;
  color: #151515;
  font-size: 14px;
  line-height: 1.35;
}

.iptv-empty .button {
  width: 100%;
  margin-top: 8px;
  background: #f97316;
  color: #111111 !important;
}

.iptv-empty .iptv-regenerate-form {
  margin-top: 8px;
}

.iptv-regenerate-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.iptv-now.live-panel {
  grid-template-columns: clamp(132px, 34vw, 176px) minmax(0, 1fr);
  align-items: center;
  gap: 12px 16px;
}

.iptv-now.live-panel .live-logo-wrap img {
  width: clamp(132px, 34vw, 176px);
  max-height: 176px;
}

.iptv-now.live-panel .live-copy {
  gap: 6px;
}

.iptv-now.live-panel .live-head strong {
  color: #151515 !important;
  font-size: 18px;
}

.iptv-now.live-panel .live-copy p,
.iptv-now.live-panel .live-copy small {
  color: #151515 !important;
}

.iptv-now.live-panel .iptv-regenerate-form {
  grid-column: 1 / -1;
}

.iptv-playlist-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .62);
}

.iptv-playlist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.iptv-playlist-head strong {
  color: #151515 !important;
  font-size: 15px;
  font-weight: 950;
}

.iptv-playlist-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  overflow: visible;
  border: 1px solid rgba(17, 17, 17, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .92);
  padding: 10px;
}

.iptv-playlist-field p {
  min-width: 0;
  margin: 0;
  color: #111827;
  font: 800 13px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
  word-break: break-word;
  user-select: all;
}

.iptv-copy-button {
  position: relative;
  justify-self: end;
  align-self: center;
  min-height: 34px;
  border: 1px solid rgba(34, 197, 94, .32);
  border-radius: 9px;
  background: rgba(255, 255, 255, .74);
  margin: 0;
  padding: 0 14px;
  color: #16a34a;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.iptv-copy-button:active {
  transform: translateY(1px);
}

.iptv-playlist-warning {
  margin: 0;
  color: #151515 !important;
  font-size: 12px !important;
  line-height: 1.35;
}

.iptv-playlist-warning {
  border: 1px dashed rgba(249, 115, 22, .28);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, .48);
}

.iptv-regenerate-button {
  width: auto;
  min-height: 42px;
  border: 1px solid rgba(239, 68, 68, .36);
  border-radius: 8px;
  background: #ffffff !important;
  color: #ef4444 !important;
  padding: 0 18px;
  justify-self: end;
}

.iptv-regenerate-button:disabled {
  opacity: .62;
  cursor: wait;
}

.iptv-confirm-modal[hidden] {
  display: none;
}

html.modal-open,
html.modal-open body {
  overflow: hidden;
}

.iptv-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.iptv-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .58);
  backdrop-filter: blur(8px);
}

.iptv-confirm-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  display: grid;
  gap: 14px;
  border: 1px solid rgba(17, 17, 17, .14);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  padding: 26px 20px 20px;
  box-shadow: 0 24px 70px rgba(15, 15, 15, .16);
}

.iptv-confirm-card h2 {
  margin: 0;
  color: #151515;
  font-size: 21px;
  font-weight: 950;
  line-height: 1.15;
}

.iptv-confirm-card p {
  margin: 0;
  color: #151515;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.iptv-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.iptv-confirm-actions button {
  min-height: 42px;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.iptv-confirm-cancel {
  border: 1px solid rgba(17, 17, 17, .16);
  color: #151515;
}

.iptv-confirm-generate {
  border: 1px solid rgba(239, 68, 68, .38);
  color: #ef4444;
}

.not-found-art {
  position: relative;
  width: min(100vw, calc(100svh * .8));
  max-width: 1080px;
}

.not-found-art img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.not-found-home {
  position: absolute;
  left: 33.9%;
  top: 83.7%;
  width: 32.8%;
  height: 5.8%;
  border-radius: 8px;
}

.not-found-home:focus-visible {
  outline: 3px solid #f5c84c;
  outline-offset: 3px;
}

@keyframes form-slide {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero h1,
.panel h1,
.welcome h1,
.page-head h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1;
  letter-spacing: 0;
}

.hero p,
.page-head p,
.muted {
  color: var(--muted);
}

.actions {
  display: grid;
  gap: 10px;
  margin: 28px 0 14px;
}

.subtle,
.inline-links a {
  color: var(--brand);
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.inline-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  font-size: 14px;
}

.messages {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.message {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 11px 12px;
  color: var(--muted);
}

.message.success {
  border-color: rgba(139, 209, 124, .45);
  color: #2e6f1e;
}

.message.error {
  border-color: rgba(248, 113, 113, .45);
  color: #8b1d1d;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-weight: 700;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px;
}

.service span {
  color: var(--muted);
  font-size: 13px;
}

.service strong {
  font-size: 18px;
  line-height: 1.15;
}

.service.admin {
  border-color: rgba(245, 200, 76, .75);
}

.strip {
  margin-top: 28px;
}

.strip.is-empty {
  display: none;
}

.strip h2,
.panel h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.strip h2 {
  color: #ffffff;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 132px;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  padding-bottom: 12px;
}

.cover {
  scroll-snap-align: start;
  display: grid;
  gap: 8px;
}

.cover img,
.pdf-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--panel);
}

.cover span {
  min-height: 0;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.25;
}

.cover small {
  display: block;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.live-panel {
  display: grid;
  grid-template-columns: clamp(132px, 38vw, 176px) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  color: #ffffff;
}

.live-logo-wrap {
  display: grid;
  place-items: center;
  min-width: 0;
}

.live-logo-wrap img {
  display: block;
  width: clamp(132px, 38vw, 176px);
  max-height: 176px;
  object-fit: contain;
}

.live-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.live-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.live-head strong {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.2;
}

.live-state-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.live-state-pill.is-online {
  color: #4ade80;
}

.live-state-pill.is-offline {
  color: #f87171;
}

.live-copy p {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.28;
}

.live-copy small {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.blank-cover {
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--panel);
  padding: 10px;
  color: var(--muted);
  text-align: center;
}

.pdf-grid,
.list {
  display: grid;
  gap: 10px;
}

.pdf-card,
.list-row,
.admin-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 10px;
}

.pdf-card div,
.list-row,
.admin-row div {
  min-width: 0;
}

.pdf-card strong,
.list-row strong,
.admin-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.pdf-card span,
.list-row span,
.admin-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.list-row,
.admin-row {
  grid-template-columns: 1fr;
}

.admin-row {
  grid-template-columns: 1fr auto auto;
}

.admin-row input {
  min-height: 40px;
  margin-top: 8px;
}

@media (min-width: 680px) {
  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pdf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions,
  .button {
    width: auto;
  }

  .actions {
    grid-template-columns: repeat(3, minmax(0, 180px));
  }
}

body:has(.user-hero) .user-hero img {
  width: min(74vw, 320px);
  max-height: 320px;
}

body:has(.user-hero) .service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px;
}

body:has(.user-hero) .service.service-icon {
  min-height: 0;
  aspect-ratio: auto;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body:has(.user-hero) .service.service-icon img {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
  object-fit: contain;
  filter: none;
}

body:has(.pdfs-page) {
  color: #ffffff;
}

body:has(.pdfs-page) .shell,
body:has(.apps-page) .shell {
  width: min(100%, 760px);
  padding-top: max(28px, env(safe-area-inset-top));
}

body:has(.apps-page) {
  color: #ffffff;
}

body:has(.admin-page) {
  color: #ffffff;
}

body:has(.admin-page) .shell {
  width: min(100%, 760px);
  padding-top: max(28px, env(safe-area-inset-top));
}

.pdfs-page {
  display: grid;
  gap: 18px;
  padding: 72px 0 24px;
}

.pdf-day {
  display: grid;
  gap: 12px;
}

.pdf-day[hidden],
.pdf-calendar-month[hidden] {
  display: none !important;
}

.pdf-calendar {
  display: grid;
  gap: 10px;
  border: 0;
  background: transparent;
}

.pdf-calendar-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
}

.pdf-calendar-head button {
  appearance: none;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #f5c400;
  cursor: pointer;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.pdf-calendar-head button:disabled {
  color: rgba(255, 255, 255, .22);
  cursor: default;
}

.pdf-calendar-title {
  display: none;
  margin: 0;
  color: #f5c400;
  font-size: 22px;
  font-weight: 950;
  text-align: center;
}

.pdf-calendar-title.is-active {
  display: block;
}

.pdf-calendar-weekdays,
.pdf-calendar-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.pdf-calendar-weekdays span {
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.pdf-calendar-day {
  appearance: none;
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, .32);
  color: rgba(255, 255, 255, .38);
  font-size: 14px;
  font-weight: 900;
}

.pdf-calendar-day.has-pdfs {
  color: #ffffff;
  cursor: pointer;
}

.pdf-calendar-day.has-pdfs::after {
  content: "";
  position: absolute;
  bottom: 9px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f5c400;
  transform: translateX(-50%);
}

.pdf-calendar-day.is-active {
  background: #f5c400;
  color: #111111;
}

.pdf-calendar-day:disabled {
  cursor: default;
}

.pdf-calendar-day.is-empty {
  background: transparent;
}

.pdfs-page .pdf-grid {
  gap: 12px;
}

.pdfs-page .pdf-card {
  grid-template-columns: 82px 1fr;
  border: 0;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  padding: 6px 0;
}

.pdfs-page .pdf-card img {
  background: #111111;
}

.pdfs-page .pdf-card strong {
  color: #ffffff;
}

.pdfs-page .pdf-card span {
  color: #ffffff;
  font-weight: 800;
}

.pdf-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.pdf-actions a {
  color: #ffffff;
}

.admin-page {
  display: grid;
  gap: 26px;
  padding: 72px 0 30px;
}

.admin-panel {
  display: grid;
  gap: 12px;
  padding: 0;
}

.admin-panel h2 {
  margin: 0;
  color: #f5c400;
  font-size: 22px;
  font-weight: 900;
}

.admin-panel .muted {
  margin: 0;
  color: #d8d8d8;
}

.admin-page .admin-row {
  grid-template-columns: 1fr;
  border: 0;
  border-top: 1px solid rgba(245, 196, 0, .28);
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  padding: 14px 0;
}

.admin-page .admin-row strong {
  color: #ffffff;
}

.admin-page .admin-row span {
  color: #f5c400;
}

.admin-page .admin-row input {
  border-color: rgba(245, 196, 0, .52);
  background: rgba(15, 15, 15, .92);
  color: #ffffff;
}

.admin-page .admin-row select {
  min-height: 40px;
  border: 1px solid rgba(245, 196, 0, .52);
  border-radius: 8px;
  background: rgba(15, 15, 15, .92);
  color: #ffffff;
  padding: 0 10px;
  font: inherit;
}

.admin-page .admin-row input::placeholder {
  color: #8f8f8f;
}

.admin-page .invite-code-row strong {
  color: #f5c400;
  font-size: 22px;
  letter-spacing: 1px;
}

.admin-page .invite-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-page .background-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-page .background-upload-row input[type="file"] {
  min-height: 44px;
  border: 1px solid rgba(245, 196, 0, .52);
  border-radius: 8px;
  background: rgba(15, 15, 15, .92);
  color: #ffffff;
  padding: 10px;
}

.background-grid {
  display: grid;
  gap: 14px;
}

.background-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(245, 196, 0, .28);
  padding-top: 14px;
}

.background-item img {
  width: 92px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid rgba(245, 196, 0, .42);
  border-radius: 8px;
  background: #050505;
}

.background-item-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.background-item-copy strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.background-item-copy span {
  color: #f5c400;
  font-size: 12px;
}

.background-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.background-actions form {
  margin: 0;
}

.admin-page .invite-create-row input {
  min-height: 44px;
  border: 1px solid rgba(245, 196, 0, .52);
  border-radius: 8px;
  background: rgba(15, 15, 15, .92);
  color: #ffffff;
}

.admin-page .invite-create-row input::placeholder {
  color: #8f8f8f;
}

.admin-page .invite-code-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.admin-page .invite-delete-button {
  border-color: rgba(248, 113, 113, .82);
  background: transparent;
  color: #fecaca;
}

.admin-users-panel {
  gap: 16px;
}

.admin-users-table {
  display: grid;
  gap: 8px;
}

.admin-users-head,
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 52px minmax(96px, .95fr);
  align-items: center;
  gap: 8px;
}

.admin-users-head {
  color: #f5c400;
  font-size: 13px;
  font-weight: 800;
}

.admin-user-row {
  min-height: 48px;
  border: 1px solid rgba(245, 196, 0, .22);
  border-radius: 8px;
  background: rgba(12, 12, 12, .92);
  padding: 8px 10px;
}

.admin-user-name {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-name:focus,
.admin-user-name:hover {
  color: #f5c400;
}

.mail-state {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
}

.mail-state.has-mail {
  color: #4ade80;
}

.mail-state.no-mail {
  color: #f87171;
}

.last-seen {
  color: #ffffff;
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.visit-sort-head {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.visit-sort-head a {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(245, 196, 0, .45);
  border-radius: 8px;
  color: #ffffff;
  line-height: 1;
}

.visit-sort-head a.is-active {
  background: #f5c400;
  color: #050505;
}

.admin-user-modal .email-modal-card {
  background: linear-gradient(180deg, rgba(25, 25, 22, .98), rgba(5, 5, 5, .98));
}

.admin-user-modal .auth-copy h1 {
  color: #f5c400;
}

.admin-remove-email {
  margin-top: 10px;
  background: transparent;
  color: #fecaca;
}

.admin-page .button.small {
  width: 100%;
  border-color: rgba(245, 196, 0, .72);
  border-radius: 8px;
  background: #f5c400;
  color: #111111;
  font-weight: 900;
}

.admin-page .button.danger {
  border-color: rgba(248, 113, 113, .7);
  background: transparent;
  color: #fecaca;
}

@media (min-width: 680px) {
  .admin-page .admin-row {
    grid-template-columns: 1fr auto auto;
  }

  .admin-page .invite-code-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-page .button.small {
    width: auto;
  }
}

@media (max-width: 390px) {
  .admin-page .invite-create-row {
    grid-template-columns: 1fr;
  }

  .admin-page .background-upload-row {
    grid-template-columns: 1fr;
  }

  .admin-users-head,
  .admin-user-row {
    grid-template-columns: minmax(0, 1fr) 38px 86px;
    gap: 6px;
  }

  .visit-sort-head {
    gap: 4px;
  }

  .visit-sort-head a {
    width: 23px;
    height: 23px;
  }

  .last-seen {
    font-size: 12px;
  }
}

.apps-page {
  display: grid;
  gap: 72px;
  padding: 72px 0 30px;
}

.app-service {
  display: grid;
  justify-items: center;
  gap: 24px;
}

.app-service-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.app-service-head::-webkit-details-marker {
  display: none;
}

.app-service-head img {
  display: block;
  width: min(52vw, 190px);
  max-height: 132px;
  object-fit: contain;
}

.app-service-head span {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 196, 0, .72);
  border-radius: 8px;
  padding: 0 18px;
  color: #f5c400;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.app-service[open] .app-service-head span {
  background: #f5c400;
  color: #111111;
}

.app-access-section {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.app-access-toggle {
  appearance: none;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 196, 0, .72);
  border-radius: 8px;
  background: rgba(0, 0, 0, .36);
  color: #f5c400;
  padding: 0 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.app-service-head .app-access-toggle {
  margin-top: 6px;
}

.app-access-toggle.is-active {
  background: #f5c400;
  color: #111111;
}

.app-access-panel {
  display: grid;
  width: 100%;
  gap: 10px;
  padding: 0;
  color: #ffffff;
  text-align: left;
}

.app-access-panel[hidden] {
  display: none !important;
}

.app-access-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
}

.app-access-row strong {
  color: #f5c400;
  font-size: 13px;
}

.app-access-row p {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.app-access-row button {
  grid-column: 3;
  justify-self: end;
  min-height: 30px;
  border: 1px solid rgba(245, 196, 0, .72);
  border-radius: 8px;
  background: transparent;
  color: #f5c400;
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.app-access-copy {
  grid-row: 2;
  margin-top: -4px;
}

.app-device-list {
  width: 100%;
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.app-device-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 18px 10px;
  border-top: 1px solid rgba(245, 196, 0, .28);
}

.app-device-card h2 {
  margin: 0;
  color: #f5c400;
  font-size: 19px;
  font-weight: 900;
}

.app-logo {
  display: block;
  width: 86px;
  max-height: 86px;
  object-fit: contain;
}

.app-device-card strong {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
}

.store-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.store-links a {
  display: block;
}

.store-links img {
  display: block;
  width: 122px;
  max-height: 42px;
  object-fit: contain;
}

.service-access-page {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  padding: 92px 0 92px;
}

.service-access-logo {
  display: block;
  width: min(50vw, 210px);
  max-height: 150px;
  object-fit: contain;
}

.service-access-card {
  width: min(100%, 430px);
  padding-top: 34px;
}

.jellyfin-access-page .service-access-card {
  --auth-accent: #7c3aed;
  --auth-accent-strong: #5b21b6;
}

.service-access-details {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.service-access-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  text-align: left;
}

.service-access-row strong {
  color: var(--auth-accent);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.35;
}

.service-access-row p {
  margin: 0;
  color: #151515;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
}

.service-access-note {
  margin: 16px 0 0;
  color: #4b4b4b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.service-access-note.warning {
  color: #b91c1c;
}

.service-access-enter {
  margin-top: 18px;
  text-decoration: none;
  justify-self: center;
  width: min(100%, 300px);
}

.jellyfin-enter-button {
  position: relative;
  overflow: visible;
  background: rgba(255, 255, 255, .96) !important;
  background-image: none !important;
  border: 1px solid rgba(0, 164, 220, .42) !important;
  box-shadow:
    0 12px 28px rgba(127, 45, 187, .12),
    0 8px 22px rgba(0, 164, 220, .1) !important;
}

.jellyfin-enter-button::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(90deg, #00a4dc, #00ffd0, #aa5cc3, #7f2dbb);
  opacity: .22;
  filter: blur(10px);
}

.jellyfin-enter-button span {
  background-image: linear-gradient(90deg, #00a4dc, #7f2dbb) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  text-transform: none !important;
  font-weight: 950;
}

@media (max-width: 420px) {
  .app-logo {
    width: 74px;
    max-height: 74px;
  }

  .store-links img {
    width: 112px;
  }

  .service-access-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}

.home-footer {
  position: relative;
  z-index: 51;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 26px 0 4px;
}

.home-footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
}

body:has(.home-stagger-menu) .home-footer-actions .home-logout {
  display: none;
}

.install-app-button {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: min(46vw, 260px);
  height: 156px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.install-app-button[hidden] {
  display: none;
}

.install-app-button img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.home-logout {
  width: 156px;
  height: 156px;
}

.home-logout button {
  appearance: none;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.home-logout img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Light dot-field theme */
:root {
  --bg: #ffffff;
  --panel: rgba(255, 255, 255, .84);
  --panel-2: rgba(255, 248, 223, .86);
  --line: rgba(183, 121, 0, .26);
  --text: #151515;
  --muted: #5f5f5f;
  --dot: rgba(17, 17, 17, .14);
}

html,
body,
body:has(.hero),
body:has(.user-hero),
body:has(.pdfs-page),
body:has(.apps-page),
body:has(.admin-page),
body:has(.elito-page),
body:has(.service-access-page),
body:has(.iptv-player-page) {
  background-color: #ffffff !important;
  background-image: none !important;
  background-size: 18px 18px !important;
  background-position: 0 0 !important;
  color: var(--text) !important;
}

.dot-field-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body:has(.hero)::before,
body:has(.hero)::after,
body:has(.user-hero)::before,
body:has(.user-hero)::after,
body:has(.pdfs-page)::before,
body:has(.pdfs-page)::after,
body:has(.apps-page)::before,
body:has(.apps-page)::after,
body:has(.admin-page)::before,
body:has(.admin-page)::after,
body:has(.elito-page)::before,
body:has(.elito-page)::after,
body:has(.service-access-page)::before,
body:has(.service-access-page)::after {
  content: none !important;
  display: none !important;
}

.home-menu-trigger {
  color: #151515;
}

.auth-card,
.email-modal-card,
.admin-user-modal .email-modal-card {
  background: rgba(255, 255, 255, .92) !important;
  color: var(--text) !important;
  box-shadow:
    0 0 0 1px rgba(17, 17, 17, .05) inset,
    0 18px 52px rgba(15, 15, 15, .1) !important;
}

.auth-badge {
  background: rgba(255, 255, 255, .94);
}

.auth-copy p,
.password-strength,
.auth-switch,
.auth-switch span,
.copyright,
body:has(.hero) .copyright,
.home-footer .copyright {
  color: #4b4b4b !important;
}

.auth-form input,
.admin-page .admin-row input,
.admin-page .admin-row select,
.admin-page .background-upload-row input[type="file"],
.admin-page .invite-create-row input {
  border-color: rgba(17, 17, 17, .14) !important;
  background: rgba(255, 255, 255, .92) !important;
  color: #151515 !important;
  box-shadow: 0 10px 24px rgba(15, 15, 15, .06) !important;
}

.auth-form input::placeholder,
.admin-page .admin-row input::placeholder,
.admin-page .invite-create-row input::placeholder {
  color: #747474 !important;
}

.auth-switch a {
  color: #151515;
}

.auth-switch a.is-active,
.auth-copy h1,
.strip h2,
.panel h2,
.admin-panel h2,
.app-device-card h2,
.app-access-row strong {
  color: #b77900 !important;
}

.jellyfin-strip h2 {
  color: #7c3aed !important;
}

.live-strip h2 {
  color: #f97316 !important;
}

.pdf-strip h2 {
  color: #16a34a !important;
}

.calibre-strip h2 {
  color: #2563eb !important;
}

.password-strength li.is-ok,
.cover span,
.cover small,
.live-panel,
.live-head strong,
.live-copy p,
.live-copy small,
.pdfs-page .pdf-card,
.pdfs-page .pdf-card strong,
.pdfs-page .pdf-card span,
.pdf-actions,
.pdf-actions a,
.admin-page .admin-row,
.admin-page .admin-row strong,
.background-item-copy strong,
.admin-user-name,
.last-seen,
.visit-sort-head a,
.app-access-panel,
.app-device-card strong {
  color: #151515 !important;
}

.strip,
.panel,
.admin-panel,
.live-panel,
.pdf-calendar,
.app-service,
.app-access-panel {
  background: transparent;
}

.pdf-calendar-day {
  background: rgba(255, 255, 255, .72) !important;
  color: #9a9a9a !important;
  border: 1px solid rgba(183, 121, 0, .12);
}

.pdf-calendar-day.has-pdfs {
  color: #151515 !important;
}

.pdf-calendar-day.is-active {
  background: #f5c400 !important;
  color: #111111 !important;
}

.pdfs-page .pdf-card,
.admin-user-row {
  background: rgba(255, 255, 255, .74) !important;
  border-color: rgba(183, 121, 0, .18) !important;
}

.pdfs-page .pdf-card img,
.cover img,
.blank-cover,
.background-item img {
  background: rgba(255, 255, 255, .86) !important;
}

.admin-page .muted {
  color: #5f5f5f !important;
}

.admin-page .admin-row span,
.background-item-copy span {
  color: #8a6500 !important;
}

.visit-sort-head a {
  background: rgba(255, 255, 255, .74);
}

.visit-sort-head a.is-active {
  background: #f5c400;
  color: #111111 !important;
}

.app-access-toggle {
  background: rgba(255, 255, 255, .78);
  color: #b77900;
}

.app-device-card {
  border-top-color: rgba(183, 121, 0, .22);
}

/* Pointer-following border glow for auth/password cards */
.auth-card,
#email-modal .email-modal-card,
#password-modal .email-modal-card {
  isolation: isolate;
  overflow: visible;
  --auth-accent: #eab308;
  --auth-accent-strong: #b77900;
  --border-glow-x: 50%;
  --border-glow-y: 0%;
  --border-glow-px: 50%;
  --border-glow-py: 0%;
  --border-glow-opacity: 0;
  --border-glow-rgb: 17, 17, 17;
  border-color: rgba(17, 17, 17, .14) !important;
}

.auth-card[data-auth-mode="login"] {
  --auth-accent: #eab308;
  --auth-accent-strong: #b77900;
}

.auth-card[data-auth-mode="register"] {
  --auth-accent: #f97316;
  --auth-accent-strong: #c2410c;
}

.auth-card[data-auth-mode="recover"] {
  --auth-accent: #ef4444;
  --auth-accent-strong: #b91c1c;
}

.auth-card > :not(.auth-badge),
#email-modal .email-modal-card > :not(.auth-badge),
#password-modal .email-modal-card > :not(.auth-badge) {
  position: relative;
  z-index: 1;
}

.auth-glow-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

html.home-menu-open .auth-glow-overlay,
body.home-menu-open .auth-glow-overlay {
  display: none !important;
}

.auth-card::before,
.auth-card::after,
#email-modal .email-modal-card::before,
#email-modal .email-modal-card::after,
#password-modal .email-modal-card::before,
#password-modal .email-modal-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  display: none;
}

.auth-card::before,
#email-modal .email-modal-card::before,
#password-modal .email-modal-card::before {
  z-index: 0;
  border: 2px solid transparent;
  background:
    radial-gradient(
      120px circle at var(--border-glow-x) var(--border-glow-y),
      rgba(255, 255, 255, .96) 0 8%,
      rgba(var(--border-glow-rgb), .98) 16%,
      rgba(var(--border-glow-rgb), .72) 31%,
      transparent 54%
    )
    border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: blur(10px);
  opacity: calc(var(--border-glow-opacity) * .66);
  transition: opacity .18s ease;
}

.auth-card::after,
#email-modal .email-modal-card::after,
#password-modal .email-modal-card::after {
  z-index: 0;
  border: 1px solid transparent;
  background:
    radial-gradient(
      100px circle at var(--border-glow-x) var(--border-glow-y),
      rgba(255, 255, 255, .98) 0 7%,
      rgba(var(--border-glow-rgb), 1) 15%,
      rgba(var(--border-glow-rgb), .82) 30%,
      transparent 54%
    )
    border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: var(--border-glow-opacity);
  transition: opacity .18s ease;
}

.auth-card .auth-form input,
#email-modal .auth-form input,
#password-modal .auth-form input {
  background: rgba(255, 255, 255, .94) !important;
  border-color: rgba(17, 17, 17, .14) !important;
  box-shadow: 0 10px 24px rgba(15, 15, 15, .06) !important;
}

.auth-card .auth-form .button.primary,
#email-modal .auth-form .button.primary,
#password-modal .auth-form .button.primary {
  background: var(--auth-accent) !important;
  border-color: var(--auth-accent) !important;
  color: #111111 !important;
  box-shadow: 0 12px 24px rgba(15, 15, 15, .08) !important;
}

.auth-card .auth-badge,
#email-modal .auth-badge,
#password-modal .auth-badge {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  --badge-glow-x: 50%;
  --badge-glow-y: 50%;
  border-color: rgba(17, 17, 17, .14) !important;
  box-shadow:
    0 0 0 1px rgba(17, 17, 17, .08) inset,
    0 10px 24px rgba(15, 15, 15, .06);
}

.auth-card .auth-badge svg,
#email-modal .auth-badge svg,
#password-modal .auth-badge svg {
  position: relative;
  z-index: 1;
  stroke: rgba(17, 17, 17, .62) !important;
}

.auth-card .auth-badge::before,
.auth-card .auth-badge::after,
#email-modal .auth-badge::before,
#email-modal .auth-badge::after,
#password-modal .auth-badge::before,
#password-modal .auth-badge::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  pointer-events: none;
  display: none;
}

.auth-card .auth-badge::before,
#email-modal .auth-badge::before,
#password-modal .auth-badge::before {
  z-index: -1;
  border: 2px solid transparent;
  background:
    radial-gradient(
      110px circle at var(--badge-glow-x) var(--badge-glow-y),
      rgba(255, 255, 255, .95) 0 8%,
      rgba(var(--border-glow-rgb), .98) 17%,
      rgba(var(--border-glow-rgb), .7) 34%,
      transparent 58%
    )
    border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: blur(7px);
  opacity: calc(var(--border-glow-opacity) * .82);
}

.auth-card .auth-badge::after,
#email-modal .auth-badge::after,
#password-modal .auth-badge::after {
  z-index: 0;
  border: 1px solid transparent;
  background:
    radial-gradient(
      92px circle at var(--badge-glow-x) var(--badge-glow-y),
      rgba(255, 255, 255, .98) 0 8%,
      rgba(var(--border-glow-rgb), 1) 17%,
      rgba(var(--border-glow-rgb), .76) 34%,
      transparent 58%
    )
    border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: calc(var(--border-glow-opacity) * .78);
}

.auth-card[data-auth-mode] .auth-copy h1,
.auth-card[data-auth-mode] .auth-switch a.is-active {
  color: var(--auth-accent-strong) !important;
}

/* PDF calendar polish */
.pdfs-page .pdf-calendar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(17, 17, 17, .14);
  border-radius: 18px;
  background: rgba(255, 255, 255, .25) !important;
  box-shadow: 0 18px 52px rgba(15, 15, 15, .08);
}

.pdfs-page .pdf-calendar::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 17px;
  background: rgba(255, 255, 255, .25);
}

.pdfs-page .pdf-calendar-title.is-active {
  color: #151515 !important;
}

.pdfs-page .pdf-calendar-head button {
  color: #151515;
}

.pdfs-page .pdf-calendar-weekdays span {
  color: #5f5f5f !important;
}

.pdfs-page .pdf-calendar-day {
  background: rgba(255, 255, 255, .56) !important;
  border-color: rgba(17, 17, 17, .12) !important;
}

.pdfs-page .pdf-calendar-day.is-active {
  border-color: var(--pdf-day-accent, #f5c400) !important;
  background: var(--pdf-day-accent, #f5c400) !important;
  color: #111111 !important;
  box-shadow: 0 10px 24px rgba(15, 15, 15, .12);
}

.pdfs-page .pdf-calendar-day.has-pdfs::after {
  background: var(--pdf-day-accent, #f5c400) !important;
  width: 10px;
  height: 10px;
  bottom: 2px;
}

.pdfs-page .pdf-calendar-day.is-active::after {
  background: var(--pdf-day-accent, #f5c400) !important;
}

.pdfs-page .pdf-card,
.pdfs-page .pdf-card img {
  background: transparent !important;
}

.pdfs-page .pdf-card {
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Assistant view aligned with the main portal layout */
html.elito-open,
body.elito-open {
  overflow: auto !important;
  height: auto !important;
  touch-action: auto !important;
}

.elito-modal:target {
  display: grid;
  place-items: stretch;
  pointer-events: none;
}

.elito-modal:target .email-modal-backdrop {
  display: none;
}

.elito-modal:target .elito-card {
  pointer-events: auto;
}

.elito-card {
  position: fixed !important;
  top: max(72px, env(safe-area-inset-top)) !important;
  bottom: max(12px, env(safe-area-inset-bottom)) !important;
  left: 50% !important;
  right: auto !important;
  z-index: 55;
  width: min(100% - 32px, 760px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-width: 760px;
  margin: 0 !important;
  padding: 0 0 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: translateX(-50%);
}

.elito-close-arrow {
  display: none !important;
}

.elito-chat-log {
  width: 100%;
  min-height: 0;
  padding: 8px 0 16px;
}

.elito-chat-form {
  width: 100%;
  padding: 10px 0 0;
}

.elito-page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: calc(100svh - 42px);
  min-height: 0;
  padding: 72px 0 max(10px, env(safe-area-inset-bottom));
  overflow: hidden;
}

.elito-page .elito-chat-log {
  align-content: start;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  padding: 8px 0 16px;
  scroll-behavior: smooth;
}

.elito-page .elito-chat-form {
  padding: 10px 0 0;
}

.elito-page .elito-message.assistant {
  border-color: rgba(17, 17, 17, .18);
  background: rgba(0, 0, 0, .58);
  color: #ffffff;
}

.elito-page .elito-message.user {
  border-color: rgba(37, 99, 235, .36);
  background: rgba(37, 99, 235, .82);
  color: #ffffff;
}

.elito-page .elito-message a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.elito-page .elito-chat-form {
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 8px;
}

.elito-page .elito-chat-form textarea {
  min-height: 58px;
  border-color: rgba(17, 17, 17, .14);
  background: rgba(255, 255, 255, .94);
  color: #151515;
  box-shadow: 0 10px 24px rgba(15, 15, 15, .06);
}

.elito-page .elito-chat-form textarea::placeholder {
  color: #747474;
}

.elito-page .elito-chat-form textarea:focus {
  border-color: rgba(17, 17, 17, .32);
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .08);
}

.elito-page .elito-send {
  width: 72px;
  height: 58px;
  align-self: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #151515;
  box-shadow: none;
}

.elito-page .elito-send svg {
  width: 54px;
  height: 54px;
  stroke-width: 0;
}

.elito-page .elito-send svg path {
  fill: #111111;
  stroke: none;
}

.jellyfin-access-page .service-access-card,
.jellyfin-access-page .auth-card[data-auth-mode="register"] {
  --auth-accent: #7c3aed;
  --auth-accent-strong: #5b21b6;
}

.jellyfin-access-page .auth-copy h1,
.jellyfin-access-page .service-access-row strong {
  color: #7c3aed !important;
}

.jellyfin-access-page .service-access-enter {
  display: flex;
  width: min(100%, 300px);
  margin: 18px auto 0;
  justify-self: center;
}
