.account-nav-host {
  position: relative;
  z-index: 12;
  min-height: 42px;
  display: flex;
  justify-content: flex-end;
}

.account-login-button,
.account-menu-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid #31516c;
  border-radius: 9px;
  background: linear-gradient(145deg, #14283b, #0d1b2a);
  color: #edf5fc;
  font: 800 12px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 3, 8, .25), inset 0 1px rgba(255, 255, 255, .035);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.account-login-button:hover,
.account-menu-button:hover,
.account-menu-button[aria-expanded="true"] {
  border-color: #61bdf7;
  background: linear-gradient(145deg, #18334b, #10243a);
  transform: translateY(-1px);
}

.account-login-button[aria-disabled="true"] {
  opacity: .5;
  pointer-events: none;
}

.account-login-button img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.account-menu-button {
  min-width: 154px;
  justify-content: flex-start;
  padding: 6px 10px 6px 7px;
}

.account-menu-avatar,
.account-menu-avatar-fallback {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #3c607c;
  border-radius: 8px;
  background: linear-gradient(145deg, #173451, #0d2033);
  color: #66c7ff;
  object-fit: cover;
  font-size: 12px;
  font-weight: 900;
}

.account-menu-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  margin-right: auto;
  text-align: left;
}

.account-menu-copy small {
  color: #70859a;
  font-size: 8px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.account-menu-copy strong {
  max-width: 120px;
  overflow: hidden;
  color: #eff5fa;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-chevron { color: #6f8498; font-size: 10px; }
.account-dropdown[hidden] { display: none; }
.account-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 230px;
  overflow: hidden;
  border: 1px solid #2b455b;
  border-radius: 11px;
  background: #091621;
  box-shadow: 0 24px 55px rgba(0, 3, 8, .62), inset 0 1px rgba(255, 255, 255, .035);
}

.account-dropdown-head {
  display: grid;
  gap: 5px;
  padding: 16px;
  border-bottom: 1px solid #203648;
}

.account-dropdown-head small {
  color: #71869a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
}

.account-dropdown-head strong {
  overflow: hidden;
  color: #63c5ff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown a,
.account-dropdown button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  border: 0;
  border-bottom: 1px solid #1d3041;
  background: transparent;
  color: #b5c3cf;
  font: 700 11px/1 Inter, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}

.account-dropdown a:hover,
.account-dropdown button:hover { background: #102337; color: #fff; }
.account-dropdown button:last-child { border-bottom: 0; color: #ff8990; }
.account-dropdown-icon { width: 18px; color: #6fc7fa; font-size: 15px; text-align: center; }
.account-setup-dot {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: #f0b84d;
  box-shadow: 0 0 9px rgba(240, 184, 77, .45);
}

.account-toast {
  position: fixed;
  z-index: 500;
  top: 22px;
  right: 22px;
  width: min(390px, calc(100% - 30px));
  padding: 15px 17px;
  border: 1px solid #70404a;
  border-radius: 10px;
  background: #24131a;
  color: #ffd8db;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .48);
  font-size: 12px;
  line-height: 1.5;
}

.account-toast a { color: #75caff; font-weight: 800; }
.hunt-account-row { min-height: 42px; display: flex; justify-content: flex-end; margin-bottom: 14px; }

/* Account settings */
.settings-body { min-height: 100vh; color: #eef4f9; background: #050d16; }
.settings-page { min-height: 100vh; padding: 28px 0 70px; background: #050d16; }
.settings-shell { width: min(1120px, calc(100% - 64px)); margin: 0 auto; }
.settings-topbar { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.settings-kicker { color: #68849d; font-size: 9px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.settings-header { padding: 28px 0 30px; border-bottom: 1px solid #263543; }
.settings-header h1 { margin: 0; color: #f5f8fb; font-size: clamp(35px, 5vw, 52px); letter-spacing: -.05em; }
.settings-header p { max-width: 650px; margin: 9px 0 0; color: #8495a6; font-size: 14px; line-height: 1.6; }
.settings-alert {
  margin: 22px 0 0;
  padding: 15px 17px;
  border: 1px solid #62502b;
  border-radius: 9px;
  background: #201a0e;
  color: #dfc16d;
  font-size: 12px;
  line-height: 1.5;
}
.settings-alert.is-complete { border-color: #28573f; background: #0e241b; color: #63dba4; }
.settings-alert[hidden] { display: none; }
.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 26px; margin-top: 28px; }
.settings-nav { height: max-content; overflow: hidden; border: 1px solid #293c4d; border-radius: 11px; background: #0b1722; }
.settings-nav span {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid #223646;
  color: #8193a4;
  font-size: 11px;
  font-weight: 800;
}
.settings-nav span:last-child { border-bottom: 0; }
.settings-nav .is-active { box-shadow: inset 3px 0 #5fc5ff; background: #112536; color: #66c9ff; }
.settings-content { display: grid; gap: 18px; }
.settings-card {
  overflow: hidden;
  border: 1px solid #293e50;
  border-radius: 12px;
  background: linear-gradient(155deg, #0d1c29, #09141f);
  box-shadow: 0 22px 50px rgba(0, 3, 8, .34), inset 0 1px rgba(255, 255, 255, .025);
}
.settings-card-head { padding: 21px 23px; border-bottom: 1px solid #24394a; }
.settings-card-head h2 { margin: 0; color: #f0f5f9; font-size: 17px; letter-spacing: -.02em; }
.settings-card-head p { margin: 6px 0 0; color: #75899d; font-size: 11px; line-height: 1.55; }
.settings-card-body { padding: 22px 23px; }
.connection-row { min-height: 92px; display: flex; align-items: center; gap: 16px; padding: 17px; border: 1px solid #2a3d4d; border-radius: 9px; background: #07111a; }
.connection-avatar,
.connection-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #315069;
  border-radius: 10px;
  background: #102235;
  color: #59c3fa;
  object-fit: cover;
  font-size: 21px;
  font-weight: 900;
}
.connection-mark.is-kick { border-color: #48d72c; background: #0c200d; color: #57ef37; }
.connection-copy { min-width: 0; display: grid; gap: 5px; }
.connection-copy small { color: #6d8193; font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.connection-copy strong { overflow: hidden; color: #edf3f8; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.connection-copy span { color: #758899; font-size: 10px; }
.connection-action { min-height: 39px; margin-left: auto; padding: 10px 15px; border: 1px solid #3e789c; border-radius: 7px; background: #12304a; color: #7bcefa; font: 800 10px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.connection-action:hover { border-color: #69c8ff; color: #fff; }
.connection-action.is-danger { border-color: #774047; background: #28141a; color: #ff878e; }
.connection-action[disabled] { opacity: .45; cursor: not-allowed; }
.settings-stack { display: grid; gap: 13px; }
.settings-label { color: #8ca0b2; font-size: 9px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.settings-field { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #30485d; border-radius: 8px; outline: 0; background: #07111b; color: #f0f5f8; font: 700 13px/1 Inter, system-ui, sans-serif; }
.settings-field:focus { border-color: #5fc4fb; box-shadow: 0 0 0 3px rgba(95, 196, 251, .1); }
.settings-help { color: #6e8193; font-size: 10px; line-height: 1.55; }
.settings-save { width: max-content; min-height: 42px; padding: 11px 18px; border: 1px solid #6dcafc; border-radius: 7px; background: linear-gradient(#64c8ff, #3299df); color: #071723; font: 900 10px/1 Inter, system-ui, sans-serif; letter-spacing: .06em; cursor: pointer; }
.settings-save:hover { filter: brightness(1.08); }
.settings-form-status { min-height: 18px; color: #66dca4; font-size: 10px; }
.settings-form-status.is-error { color: #ff858d; }
.settings-auth-panel { margin-top: 28px; padding: 52px 24px; border: 1px solid #293e50; border-radius: 12px; background: #0b1824; text-align: center; }
.settings-auth-panel h2 { margin: 0; font-size: 25px; }
.settings-auth-panel p { max-width: 500px; margin: 10px auto 22px; color: #8395a6; line-height: 1.6; }
.settings-auth-panel .account-login-button { min-height: 46px; }
.settings-loading { color: #71869b; }
[data-settings-authenticated][hidden], [data-settings-signed-out][hidden] { display: none; }

@media (max-width: 760px) {
  .hunt-account-row { margin: 0 0 11px; }
  .settings-page { padding-top: 18px; }
  .settings-shell { width: calc(100% - 28px); }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { display: flex; }
  .settings-nav span { flex: 1; justify-content: center; border-right: 1px solid #223646; border-bottom: 0; }
  .settings-nav span:last-child { border-right: 0; }
}

@media (max-width: 520px) {
  .account-menu-copy { display: none; }
  .account-menu-button { min-width: 0; }
  .account-toast { top: 82px; right: 15px; }
  .settings-header { padding-top: 22px; }
  .settings-header h1 { font-size: 36px; }
  .settings-nav span { min-height: 46px; padding-inline: 9px; font-size: 9px; }
  .settings-card-head, .settings-card-body { padding-inline: 16px; }
  .connection-row { align-items: flex-start; flex-wrap: wrap; }
  .connection-action { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .account-login-button, .account-menu-button { transition: none; }
}
