#vtg-account-pop {
  position: fixed !important;
  inset: 0 auto auto 0;
  width: 0;
  height: 0;
  overflow: visible !important;
  z-index: 2147483645 !important;
  pointer-events: none;
  background: transparent;
  margin: 0;
  padding: 0;
  display: block !important;
}
#vtg-account-pop[hidden] .vtg-account-pop__card { display: none !important; }
#vtg-account-pop.is-open .vtg-account-pop__card,
#vtg-account-pop:target .vtg-account-pop__card {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.vtg-account-pop__card {
  position: fixed !important;
  left: 272px;
  bottom: 16px;
  width: min(288px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 10px;
  background: #fff !important;
  border: 1px solid #e8e4dc;
  border-top: 3px solid #C09C40;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(22, 24, 29, 0.18);
  font-family: Inter, system-ui, sans-serif;
  z-index: 2147483646 !important;
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (max-width: 639px) {
  #vtg-account-pop.is-open,
  #vtg-account-pop:target {
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    pointer-events: auto !important;
    background: rgba(15, 23, 42, 0.48);
  }
  .vtg-account-pop__card {
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: none !important;
    max-height: min(92dvh, calc(100% - 8px));
    border-radius: 18px 18px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.2);
  }
  .vtg-account-pop__close {
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    font-size: 24px;
  }
  .vtg-account-pop__form {
    gap: 10px;
    padding: 4px 0 8px;
  }
  .vtg-account-pop__form-title {
    font-size: 18px;
    padding-right: 40px;
  }
  .vtg-account-pop__field input,
  .vtg-account-pop__field select,
  .vtg-account-pop__field textarea {
    min-height: 44px;
    font-size: 16px; /* iOS will not zoom */
    padding: 10px 12px;
    border-radius: 12px;
  }
  .vtg-account-pop__cta {
    min-height: 48px;
    font-size: 16px;
    margin: 8px 0 4px;
  }
  .vtg-account-pop__linkbtn {
    min-height: 44px;
    font-size: 15px;
  }
  .vtg-account-pop__reqs {
    font-size: 14px;
  }
}

@media (min-width: 640px) and (max-width: 899px) {
  .vtg-account-pop__card {
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: 12px !important;
    width: auto !important;
    max-width: 400px;
    margin: 0 auto;
    max-height: calc(100vh - 24px);
  }
}

body.vtg-account-open {
  overflow: hidden;
}
.vtg-account-pop__card {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.vtg-account-pop__close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.vtg-account-pop__close:hover { color: #475569; }

.vtg-account-pop__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid #f1efe9;
}
.vtg-account-pop__ava,
.vtg-account-pop__initial {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #154787;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}
.vtg-account-pop__meta { min-width: 0; }
.vtg-account-pop__name {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vtg-account-pop__mail {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vtg-account-pop__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin: 4px 0 8px;
  padding: 0 16px;
  border-radius: 12px;
  background: #154787;
  color: #fff;
  font-weight: 650;
  font-size: 14px;
  text-decoration: none;
}
.vtg-account-pop__cta svg { stroke: currentColor; }
.vtg-account-pop__cta:hover { background: #0e3568; color: #fff; }

.vtg-account-pop__kicker {
  margin: 8px 8px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.vtg-account-pop__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 12px;
  color: #0f172a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}
.vtg-account-pop__item:hover { background: #f7f5f1; }
.vtg-account-pop__ico {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f7f5f1;
  color: #154787;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vtg-account-pop__ico svg { width: 18px; height: 18px; stroke: currentColor; }
.vtg-account-pop__lab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.vtg-account-pop__lab-t { font-weight: 600; line-height: 1.25; }
.vtg-account-pop__lab-h { font-size: 12px; font-weight: 400; color: #64748b; line-height: 1.3; }

.vtg-account-pop__foot {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #f1efe9;
}
.vtg-account-pop__item.is-muted { color: #64748b; font-weight: 500; }
.vtg-account-pop__item.is-muted .vtg-account-pop__ico { color: #64748b; background: #f8fafc; }
.vtg-account-pop__item.is-danger { color: #b91c1c; }
.vtg-account-pop__item.is-danger .vtg-account-pop__ico { color: #b91c1c; background: #fef2f2; }

.vtg-account-pop__switch { margin-top: 8px; padding-top: 4px; }
.vtg-account-pop__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 4px 4px;
}
.vtg-account-pop__chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f7f5f1;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.vtg-account-pop__chip:hover { background: #efeae2; }
.vtg-account-pop__chip.is-active { background: #154787; color: #fff; }

/* Sidebar trigger — 2 short lines, no wrap mess */
.vtg-sidebar-user__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.vtg-sidebar-user__name,
.vtg-sidebar-user__email {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.vtg-sidebar-user__name { font-size: 13px; font-weight: 650; color: #0f172a; }
.vtg-sidebar-user__email { font-size: 11px; font-weight: 500; color: #64748b; }


/* Auth forms inside pop */
.vtg-account-pop__form { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 4px; }
.vtg-account-pop__form-title {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.vtg-account-pop__field { display: block; margin: 0; }
.vtg-account-pop__field > span:not(.screen-reader-text) {
  display: none;
}
.vtg-account-pop__field .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.vtg-account-pop__field input,
.vtg-account-pop__field select {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.25;
  background: #fff;
  color: #0f172a;
  box-sizing: border-box;
}
.vtg-account-pop__field input:focus,
.vtg-account-pop__field select:focus {
  outline: none;
  border-color: #154787;
  box-shadow: 0 0 0 3px rgba(21,71,135,.12);
}
.vtg-account-pop__err {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
}
.vtg-account-pop__cta {
  border: 0;
  cursor: pointer;
  width: 100%;
}
.vtg-account-pop__warn {
  margin: 0;
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}
.vtg-account-pop__linkbtn {
  border: 0;
  background: transparent;
  color: #154787;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
  text-align: left;
}
.vtg-account-pop__linkbtn:hover { text-decoration: underline; }
.vtg-account-pop__foot {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid #f1efe9;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vtg-account-pop__signup {
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.vtg-account-pop__item {
  text-decoration: none !important;
}
.vtg-account-pop__item:hover {
  text-decoration: none !important;
  background: #f8fafc;
}

.vtg-account-pop__ok {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
}

.vtg-account-pop__field input::placeholder,
.vtg-account-pop__field select:invalid {
  color: #94a3b8;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  opacity: 1;
}
.vtg-account-pop__field select {
  color: #0f172a;
}
.vtg-account-pop__field select:invalid {
  color: #94a3b8;
}
.vtg-account-pop__form {
  gap: 6px;
}
.vtg-account-pop__form-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  margin: 0 0 2px;
}
.vtg-account-pop__field {
  position: relative;
}

/* Role upgrade block in the account pop. The textarea has to opt in to the
   field styling explicitly — the rules above name input and select only, so a
   textarea dropped in beside them rendered unstyled and full-bleed. */
.vtg-account-pop__field textarea {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
  background: #fff;
  color: #0f172a;
  box-sizing: border-box;
  resize: vertical;
}

.vtg-account-pop__field textarea:focus {
  outline: none;
  border-color: #154787;
  box-shadow: 0 0 0 3px rgba(21, 71, 135, .12);
}

.vtg-account-pop__note {
  margin: 2px 4px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
}

/* iOS zooms any focused control whose computed font-size is < 16px.
   The unscoped 14px rules above used to win over the mobile 16px block. */
#vtg-account-pop input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
#vtg-account-pop select,
#vtg-account-pop textarea {
  font-size: 16px !important;
  line-height: 1.25 !important;
}
