/* Independent VEGAS.iD gateway: compact, mobile-first and quietly premium. */
body.gate {
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 48% 22%, rgba(49, 112, 203, .2), transparent 44%),
    radial-gradient(ellipse at 92% 92%, rgba(36, 76, 145, .14), transparent 34%),
    linear-gradient(155deg, #090c12 0%, #0d121b 56%, #090d14 100%);
  color: #f3f7ff;
  font-size: 16px;
}
.gate .noise { display: none; }
.gateway {
  display: flex;
  flex-direction: column;
  width: min(100%, 620px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 20px max(26px, env(safe-area-inset-bottom));
}
.gateway-brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  direction: ltr;
  color: #f4f7fc;
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -.065em;
}
.gateway-brand span { color: #70b1ff; }
.gateway-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; direction: ltr; }
.gateway-controls { display: flex; align-items: center; gap: 8px; direction: ltr; }
.gateway-language-picker { position: relative; }
.gateway-language-trigger, .gateway-theme {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(151, 188, 235, .23);
  border-radius: 15px;
  color: #edf5ff;
  background: linear-gradient(145deg, rgba(28, 39, 55, .9), rgba(17, 25, 37, .8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 18px rgba(0, 0, 0, .16);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.gateway-language-trigger { grid-template-columns: 1fr auto; gap: 1px; padding: 0 5px; font-size: 20px; }
.gateway-language-trigger svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.gateway-language-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 168px;
  padding: 7px;
  border: 1px solid rgba(151, 188, 235, .2);
  border-radius: 17px;
  background: rgba(16, 24, 36, .94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.gateway-language-menu[hidden] { display: none; }
.gateway-language-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 8px 11px;
  border: 0;
  border-radius: 11px;
  color: #edf5ff;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.gateway-language-choice[aria-checked="true"] { background: rgba(102, 169, 255, .16); }
.gateway-language-trigger:hover, .gateway-theme:hover { border-color: rgba(112, 177, 255, .6); background-color: #1b2b40; }
.gateway-language-trigger:active, .gateway-theme:active { transform: scale(.96); }
.gateway-language-trigger:focus-visible, .gateway-theme:focus-visible, .gateway-language-choice:focus-visible { outline: 2px solid #83bfff; outline-offset: 3px; }
.gateway-theme svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.theme-sun { display: none; }
.gateway-light .theme-sun { display: block; }
.gateway-light .theme-moon { display: none; }
.gateway-entry {
  position: relative;
  isolation: isolate;
  width: 100%;
  margin: auto 0;
  padding: clamp(28px, 7vw, 44px) clamp(20px, 6vw, 42px) 30px;
  overflow: visible;
  border: 1px solid rgba(139, 184, 239, .2);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(24, 34, 49, .86), rgba(14, 21, 32, .76));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .065);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.gateway-entry::before {
  position: absolute;
  inset: 0 12% auto;
  z-index: -1;
  height: 170px;
  border-radius: inherit;
  background: radial-gradient(ellipse at top, rgba(77, 145, 236, .14), transparent 70%);
  content: "";
  pointer-events: none;
}
.gateway h1 {
  margin: 0 0 30px;
  color: #f5f8fe;
  text-align: center;
  font-size: clamp(28px, 6.3vw, 35px);
  line-height: 1.2;
  letter-spacing: -.025em;
  font-weight: 760;
}
.gateway .code-form { display: flex; flex-direction: column; gap: 0; }
.gateway-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); font-size: 16px; }
.gateway #access-code {
  width: min(100%, 410px);
  min-height: 76px;
  margin: 0 auto 18px;
  padding: 14px;
  border: 1px solid rgba(112, 177, 255, .65);
  border-radius: 17px;
  color: #f4f8ff;
  background: rgba(7, 13, 22, .58);
  box-shadow: inset 0 1px 10px rgba(0, 0, 0, .18), 0 0 0 1px rgba(112, 177, 255, .08);
  outline: none;
  direction: ltr;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  letter-spacing: .2em;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.gateway #access-code::placeholder { color: #a8bbd5; opacity: 1; letter-spacing: .08em; }
.gateway #access-code:focus { border-color: #9acaff; background: rgba(9, 17, 29, .78); box-shadow: 0 0 0 4px rgba(101, 172, 255, .15), 0 0 34px rgba(73, 147, 240, .13); }
.gateway-connect {
  width: 100%;
  min-height: 60px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 16px;
  color: #061323;
  background: linear-gradient(115deg, #82c0ff 0%, #68a9ff 48%, #75a5ff 100%);
  box-shadow: 0 12px 28px rgba(65, 139, 234, .22), inset 0 1px 0 rgba(255, 255, 255, .38);
  font-size: 18px;
  font-weight: 760;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.gateway-connect:hover { filter: brightness(1.06); box-shadow: 0 15px 34px rgba(65, 139, 234, .3), inset 0 1px 0 rgba(255, 255, 255, .42); }
.gateway-connect:active { transform: translateY(1px) scale(.99); }
.gateway-connect:focus-visible { outline: 3px solid #c0e0ff; outline-offset: 4px; }
.gateway-invite {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  width: fit-content;
  max-width: 100%;
  margin: 19px auto 0;
  padding: 8px 14px;
  border: 1px solid rgba(126, 180, 245, .2);
  border-radius: 999px;
  color: #d9eaff;
  background: rgba(93, 151, 222, .08);
  font-size: 14px;
  font-weight: 650;
}
#gateway-help { max-width: 44ch; margin: 13px auto 0; text-align: center; color: #b9c6d8; font-size: 16px; line-height: 1.55; }
.gateway .form-status { margin: 14px 0 0; text-align: center; color: #c5d4e8; font-size: 14px; }
.gateway .form-status:empty { min-height: 0; margin: 0; }
.gateway .form-status.is-error { color: #ffadb7; }
.gateway-light {
  color-scheme: light;
  background:
    radial-gradient(ellipse at 48% 18%, rgba(103, 163, 237, .18), transparent 44%),
    linear-gradient(155deg, #f7f9fd 0%, #edf3fa 58%, #f4f7fc 100%) !important;
  color: #142338 !important;
}
.gateway-light .gateway-brand { color: #182b42; }
.gateway-light .gateway-language-trigger, .gateway-light .gateway-theme { border-color: rgba(83, 119, 164, .22); background: rgba(255, 255, 255, .78); color: #183654; box-shadow: 0 7px 18px rgba(36, 72, 115, .08), inset 0 1px 0 #fff; }
.gateway-light .gateway-language-menu { border-color: #d2deec; background: rgba(255, 255, 255, .96); box-shadow: 0 18px 46px rgba(32, 51, 75, .18); }
.gateway-light .gateway-language-choice { color: #183654; }
.gateway-light .gateway-language-choice[aria-checked="true"] { background: #e6f0fc; }
.gateway-light .gateway-entry { border-color: rgba(105, 145, 195, .2); background: linear-gradient(145deg, rgba(255, 255, 255, .84), rgba(242, 247, 253, .76)); box-shadow: 0 28px 75px rgba(31, 61, 97, .12), inset 0 1px 0 #fff; }
.gateway-light .gateway-entry::before { background: radial-gradient(ellipse at top, rgba(91, 151, 226, .13), transparent 70%); }
.gateway-light h1 { color: #142338; }
.gateway-light #access-code { border-color: #8aa9ce; background: rgba(255, 255, 255, .78); color: #162b45; box-shadow: inset 0 1px 6px rgba(36, 72, 115, .07); }
.gateway-light #access-code::placeholder { color: #647b98; }
.gateway-light #access-code:focus { border-color: #4d91e6; background: #fff; box-shadow: 0 0 0 4px rgba(77, 145, 230, .14); }
.gateway-light .gateway-connect { color: #061323; }
.gateway-light .gateway-invite { border-color: rgba(74, 123, 182, .18); color: #1a3d64; background: rgba(81, 139, 206, .08); }
.gateway-light #gateway-help { color: #445771; }
.gateway-light .gateway .form-status { color: #475f7b; }
.gateway-light .gateway .form-status.is-error { color: #ac2639; }
.gateway-light .sheet-panel { border-color: #bccce0; background: linear-gradient(165deg, #fff, #edf3fa); color: #142338; }
.gateway-light .sheet-panel > p { color: #435770; }
.gateway-light .sheet-panel .eyebrow { color: #246bb8; }
.gateway-light .sheet-close { color: #27405c; background: #e3ebf5; }
.gateway-light .text-action { color: #245f9b; }
@media (min-width: 700px) {
  .gateway { width: min(100%, 680px); padding-top: 34px; padding-bottom: 34px; }
  .gateway-entry { padding: 44px 50px 34px; border-radius: 30px; }
}
@media (max-width: 380px) {
  .gateway { padding-left: 16px; padding-right: 16px; }
  .gateway-brand { font-size: 27px; }
  .gateway-header { gap: 7px; }
  .gateway-controls { gap: 6px; }
  .gateway-entry { padding: 25px 17px 23px; border-radius: 23px; }
  .gateway h1 { margin-bottom: 25px; font-size: 28px; }
  .gateway #access-code { min-height: 70px; font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .gateway-language-trigger, .gateway-theme, .gateway #access-code, .gateway-connect { transition: none; }
}
