/* 0919signin1: selected desktop side-sheet / mobile bottom-sheet. Auth presentation only. */
:root { --signin-layer: 94; --signin-surface: #131e28; --signin-copy: #b8c8d0; }
html:has(body.signin-open), html:has(body.signin-confirm-open) { scrollbar-gutter: auto; overflow: hidden; }
body.signin-open, body.signin-confirm-open { overflow: hidden; }
.signin-overlay {
  position: fixed; inset: 0; width: 100vw; z-index: var(--signin-layer); display: flex; justify-content: flex-end;
  padding: 16px; background: rgba(4, 10, 17, .54); backdrop-filter: blur(3px);
}
.signin-sheet {
  width: 500px; max-width: 100%; height: 100%; min-height: 0; overflow: auto;
  display: flex; flex-direction: column; padding: 26px 34px 22px; border-radius: 16px;
  background: linear-gradient(155deg, #1c303b 0, var(--signin-surface) 28%, #101923 100%);
  border: 1px solid #33434d; color: var(--ink); overscroll-behavior: contain;
  animation: signin-enter 200ms cubic-bezier(.22, 1, .36, 1); scrollbar-gutter: stable;
}
.signin-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex: none; }
.signin-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; letter-spacing: .12em; }
.signin-brand > svg { width: 30px; height: 30px; color: var(--teal); }
.signin-close { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1px solid #455761; border-radius: 50%; color: #dbe6eb; }
.signin-close svg { width: 20px; height: 20px; }
.signin-close:hover { background: #293d48; }
.signin-context { display: flex; gap: 8px; align-items: center; padding-top: 28px; color: var(--signin-copy); font-size: 12px; }
.signin-context [data-signin-context] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signin-context-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); flex: none; }
.signin-sheet .signin-content.rg-panel { width: 100%; max-width: none; padding: 40px 0; margin: auto 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; text-align: left; }
.signin-sheet .rg-h { color: var(--ink); font-size: 28px; line-height: 1.18; letter-spacing: -.025em; text-align: left; margin: 0; text-wrap: balance; }
.signin-sheet #signinTitle:focus { outline: none; }
.signin-sheet .rg-tag { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: var(--signin-copy); text-align: left; }
.signin-sheet .rg-soc-col { max-width: none; width: 100%; gap: 12px; margin: 28px 0 0; }
.signin-sheet .rg-soc { width: 100%; height: 54px; min-height: 54px; justify-content: flex-start; gap: 14px; padding: 0 18px; background: #21313c; border: 1px solid #42525d; border-radius: 12px; color: var(--ink); box-shadow: none; font-size: 14px; font-weight: 600; }
.signin-sheet .rg-soc:hover { background: #2c424e; }
.signin-sheet #rgMail, .signin-sheet #lgMailB, .signin-sheet .rg-cta { background: linear-gradient(110deg, #a9f3e1, #55d5cc); color: #10282b; border: 0; box-shadow: none; font-weight: 700; }
.signin-sheet #rgMail:hover, .signin-sheet #lgMailB:hover, .signin-sheet .rg-cta:hover { filter: brightness(1.05); }
.signin-sheet .rg-soc svg { width: 22px; height: 22px; flex: none; }
.signin-sheet .rg-foot { font-size: 14px; line-height: 1.7; color: var(--signin-copy); margin: 24px 0 0; text-align: left; }
.signin-sheet .rg-link { font-size: inherit; color: var(--mint); display: inline-flex; align-items: center; gap: 7px; min-height: 36px; }
.signin-sheet .rg-legal { color: var(--signin-copy); opacity: 1; font-size: 12px; line-height: 1.7; text-align: left; max-width: 38ch; margin: 20px 0 0; }
.signin-sheet .rg-legal a { color: #dce9ed; text-decoration: underline; text-underline-offset: 3px; }
.signin-sheet .rg-walnote { color: var(--signin-copy); font-size: 12px; line-height: 1.7; text-align: left; margin: 18px 0 0; }
.signin-sheet .rg-form { max-width: none; width: 100%; margin: 24px 0 0; }
.signin-sheet .rg-lab { font-size: 12px; color: #dce9ed; line-height: 1.5; margin: 16px 0 8px; letter-spacing: 0; text-transform: none; }
.signin-sheet .lg-in { width: 100%; height: 50px; padding: 12px 14px; border: 1px solid #455965; border-radius: 10px; background: #0d1821; color: var(--ink); font-size: 16px; }
.signin-sheet .lg-in::placeholder { color: #adbec9; opacity: 1; }
.signin-sheet .rg-cta { height: 50px; border-radius: 12px; font-size: 14px; margin-top: 24px; }
.signin-sheet .rg-eye { height: 50px; color: #c0d2dc; }
.signin-sheet .rg-err { color: #ffb8be; font-size: 14px; text-align: left; line-height: 1.6; margin: 16px 0 0; }
.signin-sheet .rg-err[hidden], .signin-sheet .rg-mark[hidden] { display: none; }
.signin-footer { flex: none; margin-top: auto; padding-top: 18px; border-top: 1px solid #344550; }
.signin-explore { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; font-size: 14px; color: var(--signin-copy); }
.signin-explore svg { width: 18px; height: 18px; color: var(--mint); }
.signin-sheet :is(button, a, input):focus-visible, .signin-confirm :is(button, input):focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
.signin-sheet button:disabled { opacity: .65; cursor: wait; }
.signin-handle { display: none; }
.signin-preview { display: none; }

/* Keep the approved mobile geometry. Desktop uses the existing page image to
   retain context, with fixed form spacing instead of height-dependent voids. */
@media (min-width: 641px) {
  .signin-overlay { padding: 0; }
  .signin-sheet { border-radius: 0; border-width: 0 0 0 1px; }
  .signin-preview { display: block; position: relative; flex: 1 1 0; min-height: 0; margin-top: 24px; overflow: hidden; border-radius: 12px; }
  .signin-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .signin-sheet .signin-content.rg-panel { flex: none; margin: 0; padding: 28px 0 24px; }
  .signin-footer { margin-top: 0; }
  .signin-sheet:has(.rg-form) .signin-preview { display: none; }
}
@media (min-width: 641px) and (max-height: 800px) {
  .signin-preview { display: none; }
}

.signin-confirm-overlay { width: 100vw; background: rgba(4, 10, 17, .6); backdrop-filter: blur(3px); }
.modal.signin-confirm { position: relative; max-width: 464px; padding: 36px 32px 22px; border-radius: 16px; border: 1px solid #427273; background: radial-gradient(ellipse at 18% 0, #245d5c 0, #183e43 27%, #12222d 66%); color: var(--ink); overscroll-behavior: contain; }
.signin-confirm .tg-head { display: block; margin-bottom: 20px; padding-right: 26px; }
.signin-confirm .tg-badge { display: grid; width: 48px; height: 48px; margin: 0 0 22px; border-radius: 12px; background: #99eddb; color: #143536; }
.signin-confirm .tg-badge svg { width: 23px; height: 23px; }
.signin-confirm h3 { font-size: 26px; line-height: 1.2; letter-spacing: -.025em; }
.signin-confirm .tg-kick { margin: 10px 0 0; color: #c4dadb; font-size: 14px; }
.signin-confirm .tg-kick b { color: var(--mint); }
.signin-confirm .tg-sub { font-size: 14px; line-height: 1.7; color: #c2d2da; margin-bottom: 24px; }
.signin-key-label { display: block; font-size: 12px; color: #dce9ed; margin-bottom: 8px; }
.signin-confirm .tg-in { width: 100%; min-height: 52px; font-size: 16px; background: #0c1a24; border: 1px solid #65848e; border-radius: 10px; padding: 13px 14px; }
.signin-confirm .tg-in::placeholder { color: #b6c9d3; opacity: 1; }
.signin-confirm .tg-hint { font-size: 12px; color: #b8cdd6; line-height: 1.6; margin-top: 12px; }
.signin-confirm .tg-hint b { opacity: 1; }
.signin-confirm .tg-err { color: #ffb8be; font-size: 14px; line-height: 1.5; }
.signin-confirm .tg-actions { margin-top: 24px; }
.signin-confirm .tg-actions .btn-primary { height: 52px; border-radius: 12px; font-size: 14px; font-weight: 700; color: #10282b; background: linear-gradient(110deg, #a9f3e1, #55d5cc); box-shadow: none; }
.signin-confirm-close { position: absolute; right: 20px; top: 20px; font-size: 26px; font-weight: 300; line-height: 1; }
.signin-cancel { display: block; min-height: 44px; width: 100%; margin-top: 10px; font-size: 14px; color: #c2d2da; }
.signin-cancel:hover, .signin-explore:hover { color: white; }
@keyframes signin-enter { from { opacity: .5; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
@media (max-width: 640px) {
  .signin-overlay { padding: 0; align-items: flex-end; }
  .signin-sheet { width: 100%; height: auto; max-height: calc(100dvh - 72px); border-radius: 22px 22px 0 0; padding: 12px 24px max(14px, env(safe-area-inset-bottom)); border-bottom: 0; animation-name: signin-enter-mobile; scrollbar-gutter: auto; }
  .signin-handle { display: block; flex: none; width: 38px; height: 4px; border-radius: 4px; background: #748b98; margin: 0 auto 12px; }
  .signin-header { gap: 16px; }
  .signin-brand { font-size: 12px; gap: 9px; }
  .signin-brand > svg { width: 26px; height: 26px; }
  .signin-context { padding-top: 14px; }
  .signin-sheet .signin-content.rg-panel { padding: 26px 0 24px; flex: none; }
  .signin-sheet .rg-h { font-size: 26px; }
  .signin-sheet .rg-soc-col { margin-top: 24px; gap: 10px; }
  .signin-sheet .rg-soc { min-height: 50px; height: 50px; }
  .signin-sheet .rg-form { margin-top: 20px; }
  .signin-sheet .rg-foot { margin-top: 18px; }
  .signin-sheet .rg-legal { margin-top: 14px; }
  .signin-footer { padding-top: 10px; }
  .signin-confirm-overlay { padding: 16px; }
  .modal.signin-confirm { padding: 28px 24px 16px; max-height: calc(100dvh - 32px); }
  .signin-confirm h3 { font-size: 24px; }
  .signin-confirm .tg-sub { font-size: 14px; }
}
@keyframes signin-enter-mobile { from { opacity: .5; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .signin-sheet { animation: none; } }
