.cww-auth-host,
[data-cww-auth]{
  display:flex;
  align-items:center;
  min-width:0;
}

.cww-auth-trigger{
  max-width:190px;
  min-height:36px;
  padding:0 13px;
  border:1px solid color-mix(in srgb,var(--amber) 34%,var(--border));
  border-radius:11px;
  background:linear-gradient(140deg,color-mix(in srgb,var(--amber) 10%,var(--surface)),var(--surface));
  color:var(--text);
  font-family:var(--font-ui);
  font-size:12px;
  font-weight:680;
  line-height:18px;
  letter-spacing:-.005em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
  transition:border-color 140ms ease,background 140ms ease,transform 140ms ease;
}

.cww-auth-trigger:hover{
  border-color:var(--amber);
  background:color-mix(in srgb,var(--amber) 12%,var(--surface));
}

.cww-auth-trigger:active{transform:scale(.985)}

.cww-auth-dialog{
  width:min(430px,calc(100vw - 32px));
  max-width:none;
  max-height:min(720px,calc(100dvh - 32px));
  margin:auto;
  padding:26px;
  border:1px solid color-mix(in srgb,var(--amber) 26%,var(--border));
  border-radius:22px;
  background:linear-gradient(150deg,color-mix(in srgb,var(--surface2) 72%,var(--surface)),var(--surface) 54%);
  color:var(--text);
  box-shadow:0 34px 100px rgba(0,0,0,.48),inset 0 1px 0 rgba(255,255,255,.06);
  overflow:hidden auto;
  isolation:isolate;
}

.cww-auth-dialog::backdrop{
  background:rgba(3,6,11,.68);
  backdrop-filter:blur(12px) saturate(.88);
  -webkit-backdrop-filter:blur(12px) saturate(.88);
}

.cww-auth-glow{
  position:absolute;
  z-index:-1;
  width:230px;
  height:230px;
  right:-90px;
  top:-110px;
  border-radius:999px;
  background:radial-gradient(circle,rgba(240,180,41,.18),transparent 68%);
  pointer-events:none;
}

.cww-auth-dialog-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
}

.cww-auth-kicker{
  display:block;
  color:var(--amber);
  font-size:10px;
  font-weight:800;
  line-height:15px;
  letter-spacing:.13em;
}

.cww-auth-dialog h2{
  margin:7px 0 0;
  font-family:var(--font-display);
  font-size:24px;
  font-weight:740;
  line-height:30px;
  letter-spacing:-.035em;
}

.cww-auth-close{
  flex:none;
  width:36px;
  height:36px;
  border:1px solid var(--border);
  border-radius:11px;
  background:color-mix(in srgb,var(--surface2) 72%,transparent);
  color:var(--text2);
  font-size:22px;
  line-height:1;
  cursor:pointer;
}

.cww-auth-close:hover{color:var(--text);border-color:var(--text3)}

.cww-auth-description{
  max-width:340px;
  margin:10px 0 22px;
  color:var(--text2);
  font-size:13px;
  line-height:21px;
}

.cww-auth-form{
  display:grid;
  gap:10px;
}

.cww-auth-form label{
  color:var(--text2);
  font-size:11px;
  font-weight:720;
  line-height:16px;
}

.cww-auth-form input{
  width:100%;
  min-height:48px;
  padding:0 14px;
  border:1px solid var(--border);
  border-radius:12px;
  outline:0;
  background:color-mix(in srgb,var(--bg) 66%,var(--surface));
  color:var(--text);
  font-family:var(--font-ui);
  font-size:15px;
  line-height:22px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
  transition:border-color 120ms ease,box-shadow 120ms ease;
}

.cww-auth-form input::placeholder{color:var(--text3)}
.cww-auth-form input:focus{border-color:var(--amber);box-shadow:0 0 0 3px rgba(240,180,41,.12)}

.cww-auth-primary,
.cww-auth-secondary{
  min-height:46px;
  border-radius:12px;
  font-size:13px;
  font-weight:760;
  line-height:19px;
  cursor:pointer;
  transition:filter 120ms ease,transform 120ms ease,opacity 120ms ease;
}

.cww-auth-primary{
  margin-top:4px;
  border:0;
  background:linear-gradient(135deg,#FFD46B,var(--amber));
  color:#171107;
  box-shadow:0 10px 26px rgba(240,180,41,.17),inset 0 1px 0 rgba(255,255,255,.54);
}

.cww-auth-primary:hover{filter:brightness(1.05)}
.cww-auth-primary:active,.cww-auth-secondary:active{transform:scale(.988)}

.cww-auth-primary:disabled,
.cww-auth-secondary:disabled,
.cww-auth-secondary-row button:disabled{
  cursor:not-allowed;
  opacity:.5;
  transform:none;
}

.cww-auth-destination{
  margin-bottom:3px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:color-mix(in srgb,var(--surface2) 76%,transparent);
  color:var(--text);
  font-family:var(--font-numeric);
  font-size:12px;
  line-height:18px;
  overflow-wrap:anywhere;
}

.cww-auth-secondary-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:3px;
}

.cww-auth-secondary-row button{
  min-height:36px;
  padding:0;
  border:0;
  background:transparent;
  color:var(--text2);
  font-size:11px;
  font-weight:680;
  cursor:pointer;
}

.cww-auth-secondary-row button:hover{color:var(--text)}

.cww-auth-account{
  padding:18px;
  border:1px solid var(--border);
  border-radius:16px;
  background:linear-gradient(145deg,color-mix(in srgb,var(--amber) 7%,var(--surface2)),var(--surface2));
  text-align:center;
}

.cww-auth-avatar{
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  margin:0 auto 12px;
  border:1px solid color-mix(in srgb,var(--amber) 50%,var(--border));
  border-radius:15px;
  background:rgba(240,180,41,.1);
  color:var(--amber);
  font-family:var(--font-display);
  font-size:22px;
  font-weight:760;
}

.cww-auth-account strong{
  display:block;
  font-size:14px;
  line-height:21px;
  overflow-wrap:anywhere;
}

.cww-auth-account p{
  margin:7px 0 14px;
  color:var(--text2);
  font-size:11px;
  line-height:18px;
}

.cww-auth-secondary{
  width:100%;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text2);
}

.cww-auth-secondary:hover{border-color:var(--text3);color:var(--text)}

.cww-auth-status,
.cww-auth-error{
  min-height:18px;
  margin:14px 0 0;
  font-size:11px;
  line-height:18px;
}

.cww-auth-status{color:var(--green)}
.cww-auth-error{color:var(--red)}

html[data-theme="light"] .cww-auth-dialog{
  box-shadow:0 34px 100px rgba(31,41,55,.28),inset 0 1px 0 rgba(255,255,255,.85);
}

html[data-theme="light"] .cww-auth-dialog::backdrop{background:rgba(44,54,69,.54)}

@media (max-width:760px){
  .cww-auth-trigger{
    width:38px;
    min-width:38px;
    padding:0;
    color:transparent;
    font-size:0;
  }
  .cww-auth-trigger::before{
    content:"@";
    color:var(--amber);
    font-family:var(--font-display);
    font-size:15px;
    font-weight:800;
  }
  .cww-auth-dialog{
    width:min(430px,calc(100vw - 20px));
    max-height:calc(100dvh - 20px);
    padding:22px;
    border-radius:20px;
  }
}

@media (prefers-reduced-motion:reduce){
  .cww-auth-trigger,.cww-auth-primary,.cww-auth-secondary{transition:none}
}
