[data-auth-root] { display: inline-flex; flex: 0 0 auto; }
.auth-trigger {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--color-accent-border);
  border-radius: 9px;
  color: var(--color-accent-hover);
  background: var(--color-accent-soft);
  cursor: pointer;
  font: 700 11px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out);
}
.auth-trigger:active { transform: scale(.97); }
.auth-trigger.loading { opacity: .58; }
.auth-trigger-avatar {
  display: grid;
  width: 21px;
  height: 21px;
  min-width: 21px;
  flex: 0 0 21px;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: var(--color-accent);
  font-size: 10px;
}
.auth-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overscroll-behavior: contain;
  background: rgba(22, 36, 58, .32);
  backdrop-filter: blur(12px);
  animation: authFadeIn 160ms ease both;
}
.auth-dialog {
  width: min(100%, 430px);
  max-height: min(720px, calc(100svh - 40px));
  padding: 25px;
  overflow: auto;
  border: 1px solid var(--color-accent-border);
  border-radius: 20px;
  color: #273956;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 24px 80px rgba(37, 57, 88, .22);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  animation: authDialogIn 220ms cubic-bezier(.2, .8, .2, 1) both;
}
.auth-dialog.auth-settings-dialog {
  display: grid !important;
  width: min(960px, calc(100vw - 48px)) !important;
  height: min(680px, calc(100dvh - 48px)) !important;
  max-width: 960px !important;
  max-height: 680px !important;
  grid-template-columns: 240px minmax(0, 1fr);
  padding: 0 !important;
  overflow: hidden !important;
  border-color: var(--color-border) !important;
  border-radius: 22px !important;
}
.auth-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.auth-dialog h2 { margin: 0; color: #182945; font-size: 22px; letter-spacing: -.035em; }
.auth-dialog-header p { margin: 7px 0 0; color: #74849b; font-size: 12px; line-height: 1.6; }
.auth-close, .auth-settings-close {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text-secondary);
  background: var(--color-surface-secondary);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out);
}
.auth-settings-close { width: 44px; height: 44px; border-radius: 12px; background: transparent; }
.auth-close svg, .auth-settings-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.auth-close:active, .auth-settings-close:active { transform: scale(.97); }
.auth-close:focus-visible, .auth-settings-close:focus-visible { border-color: var(--color-border-focus); outline: 3px solid var(--color-focus-ring); outline-offset: 1px; }
.auth-provider-list { display: grid; gap: 10px; margin-top: 24px; }
.auth-provider {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 15px;
  border: 1px solid #dbe5f2;
  border-radius: 11px;
  color: #2d3d57;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 680;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 140ms ease;
}
.auth-provider:active:not(:disabled) { transform: scale(.985); }
.auth-provider:disabled { cursor: not-allowed; opacity: .45; }
.auth-provider-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  font-style: normal;
  font-size: 18px;
  font-weight: 760;
}
.auth-provider-google .auth-provider-mark, .auth-provider-mark.google { color: #4285f4; }
.auth-provider-apple .auth-provider-mark, .auth-provider-mark.apple { color: #111; font-size: 21px; }
.auth-privacy { margin: 17px 0 0; color: #91a0b4; font-size: 10px; line-height: 1.65; text-align: center; }
.auth-profile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; min-height: 112px; align-items: center; margin-top: 0; padding: 22px 24px; border: 1px solid var(--color-border-strong) !important; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--color-accent) 8%, var(--color-surface-elevated)), var(--color-surface-secondary)) !important; box-shadow: 0 12px 30px color-mix(in srgb, var(--color-accent) 8%, transparent); }
.auth-avatar { display: grid; width: 64px; height: 64px; flex: 0 0 auto; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--color-accent) 28%, transparent); border-radius: 50%; color: var(--color-accent-contrast) !important; background: var(--color-accent) !important; box-shadow: 0 0 0 5px color-mix(in srgb, var(--color-accent) 8%, transparent); font-size: 20px; font-weight: 750; }
.auth-avatar img { width: 100%; height: 100%; object-fit: cover; }
.auth-profile > div { display: grid; min-width: 0; gap: 5px; }
.auth-profile-kicker { color: var(--color-accent-hover) !important; font-size: 10px; font-weight: 720; letter-spacing: .045em; line-height: 1.2; text-transform: uppercase; }
.auth-profile strong { overflow: hidden; color: var(--color-text) !important; font-size: 20px; font-weight: 680; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.auth-profile > div > span { overflow: hidden; color: var(--color-text-secondary) !important; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.auth-account-panel .auth-profile > div > span:not(.auth-profile-kicker) { overflow: hidden; color: var(--color-text-secondary) !important; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.auth-profile-status { align-self: start; display: inline-flex; gap: 6px; align-items: center; margin-top: 1px; padding: 6px 9px; border: 1px solid var(--color-accent-border); border-radius: var(--radius-pill); color: var(--color-accent-hover); background: var(--color-accent-soft); font-size: 10px; font-weight: 700; white-space: nowrap; }
.auth-profile-status::before { width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); content: ""; }
.auth-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}
.auth-settings-icon { display: inline-grid; flex: 0 0 auto; place-items: center; }
.auth-settings-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.auth-settings-sidebar {
  min-width: 0;
  padding: 22px 14px;
  border-right: 1px solid var(--color-border);
  background: var(--color-sidebar);
}
.auth-settings-mobile-title { display: none; }
.auth-settings-tabs { display: grid; gap: 6px; margin-top: 22px; }
.auth-settings-tab {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: var(--color-text-secondary);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  text-align: left;
  transition: color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out);
}
.auth-settings-tab[aria-selected="true"] { color: var(--color-text); background: var(--color-selected); }
.auth-settings-tab:active { transform: scale(.98); }
.auth-settings-tab:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.auth-settings-main { display: block !important; grid-template-columns: none !important; gap: 0 !important; min-width: 0; min-height: 0; overflow: hidden; background: var(--color-surface-elevated); }
.auth-settings-panel {
  height: 100%;
  padding: 32px 34px 40px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.auth-settings-panel[hidden] { display: none; }
.auth-settings-panel:focus { outline: none; }
.auth-settings-panel-header { padding-bottom: 24px; border-bottom: 1px solid var(--color-border); }
.auth-settings-panel-header h2 { margin: 0; color: var(--color-text); font-size: 25px; font-weight: 650; letter-spacing: -.035em; }
.auth-settings-panel-header p { margin: 7px 0 0; color: var(--color-text-secondary); font-size: 12px; line-height: 1.55; }
.auth-setting-list { border-bottom: 1px solid var(--color-border); }
.auth-setting-row {
  position: relative;
  display: grid;
  min-height: 80px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--color-border);
}
.auth-setting-row:last-child { border-bottom: 0; }
.auth-setting-copy { display: grid; min-width: 0; gap: 5px; }
.auth-setting-label { color: var(--color-text); font-size: 16px; font-weight: 560; }
.auth-setting-note { color: var(--color-text-tertiary); font-size: 11px; line-height: 1.45; }
.auth-setting-control { position: relative; min-width: 0; }
.auth-setting-switch {
  position: relative;
  display: inline-flex;
  min-width: 52px;
  min-height: 44px;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
}
.auth-setting-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.auth-setting-switch-track {
  position: relative;
  display: block;
  width: 48px;
  height: 28px;
  padding: 3px;
  border-radius: 999px;
  background: var(--color-border-strong);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
.auth-setting-switch-track::after {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-surface-elevated);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--color-text) 22%, transparent);
  content: "";
  transition: transform 160ms var(--ease-out);
}
.auth-setting-switch input:checked + .auth-setting-switch-track { background: var(--color-accent); }
.auth-setting-switch input:checked + .auth-setting-switch-track::after { transform: translateX(20px); }
.auth-setting-switch input:focus-visible + .auth-setting-switch-track { outline: 3px solid var(--color-focus-ring); outline-offset: 2px; }
.auth-setting-switch input:disabled + .auth-setting-switch-track { cursor: wait; opacity: .55; }
.auth-setting-trigger {
  display: inline-flex;
  min-width: 154px;
  min-height: 44px;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 8px 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--color-text);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  transition: border-color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out);
}
.auth-setting-trigger[aria-expanded="true"] { border-color: var(--color-border); background: var(--color-selected); }
.auth-setting-trigger:active { transform: scale(.98); }
.auth-setting-trigger:focus-visible { border-color: var(--color-border-focus); outline: 3px solid var(--color-focus-ring); outline-offset: 1px; }
.auth-setting-current { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-setting-chevron { transition: transform 160ms var(--ease-out); }
.auth-setting-trigger[aria-expanded="true"] .auth-setting-chevron { transform: rotate(180deg); }
.auth-setting-menu {
  position: absolute;
  z-index: 4;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  max-height: min(440px, calc(100dvh - 96px));
  padding: 10px;
  overflow-y: auto;
  visibility: hidden;
  border: 1px solid var(--color-border-strong);
  border-radius: 18px;
  opacity: 0;
  color: var(--color-text);
  background: var(--color-surface-elevated);
  box-shadow: var(--shadow-dialog);
  pointer-events: none;
  transform: scale(.98);
  transform-origin: top right;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), visibility 0s linear 160ms;
}
.auth-setting-menu.is-open { visibility: visible; opacity: 1; pointer-events: auto; transform: scale(1); transition-delay: 0s; }
.auth-setting-menu[data-keyboard-open="true"] { transform: none; transition: none; }
.auth-setting-row[data-setting="language"] .auth-setting-control { width: 220px; }
.auth-setting-row[data-setting="language"] .auth-setting-trigger,
.auth-setting-row[data-setting="language"] .auth-setting-menu { width: 100%; min-width: 0; }
.auth-accent-menu { top: 50%; transform: translateY(-50%) scale(.98); transform-origin: right center; }
.auth-accent-menu.is-open { transform: translateY(-50%) scale(1); }
.auth-accent-menu[data-keyboard-open="true"] { transform: translateY(-50%); }
.auth-choice-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.auth-choice-option {
  position: relative;
  display: grid;
  min-height: 50px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border-radius: 12px;
  color: var(--color-text);
  cursor: pointer;
  font-size: 14px;
  transition: background-color 140ms ease, transform 120ms var(--ease-out);
}
.auth-choice-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.auth-choice-option:has(input:checked) { background: var(--color-selected); }
.auth-choice-option:has(input:focus-visible) { outline: 2px solid var(--color-border-focus); outline-offset: -2px; }
.auth-choice-option:active { transform: scale(.985); }
.auth-choice-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-choice-check { visibility: hidden; color: var(--color-text); }
.auth-choice-check svg { width: 20px; height: 20px; stroke-width: 2.2; }
.auth-choice-option input:checked ~ .auth-choice-check { visibility: visible; }
.auth-accent-dot {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  background: var(--auth-accent-swatch, #B4B4B4);
  box-shadow: 0 0 0 1px var(--color-border-strong);
}
.auth-accent-dot[data-accent="gray"] { --auth-accent-swatch: #B4B4B4; }
.auth-accent-dot[data-accent="blue"] { --auth-accent-swatch: #3A83F7; }
.auth-accent-dot[data-accent="green"] { --auth-accent-swatch: #53B559; }
.auth-accent-dot[data-accent="yellow"] { --auth-accent-swatch: #F6C543; }
.auth-accent-dot[data-accent="pink"] { --auth-accent-swatch: #F077AF; }
.auth-accent-dot[data-accent="orange"] { --auth-accent-swatch: #EE7C37; }
.auth-accent-dot[data-accent="purple"] { --auth-accent-swatch: #8952EE; }
.auth-accent-dot[data-accent="black"] { --auth-accent-swatch: #000000; }
.auth-account-panel .auth-settings-panel-header,
.auth-account-panel > .auth-account-section,
.auth-account-panel > .auth-dialog-status { width: min(100%, 760px); margin-inline: auto; }
.auth-account-panel .auth-settings-panel-header h2 { font-size: 28px; letter-spacing: -.05em; }
.auth-account-panel .auth-settings-panel-header p { max-width: 460px; }
.auth-account-section { margin-top: 30px; }
.auth-account-section > h3 { display: flex; gap: 10px; align-items: center; margin: 0 0 12px; color: var(--color-text); font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.auth-account-section > h3::after { height: 1px; flex: 1; background: var(--color-border); content: ""; }
.auth-account-section .auth-profile { margin-top: 0; }
.auth-profile-form { display: grid; gap: 10px; margin-top: 16px; padding: 16px; border: 1px solid var(--color-border) !important; border-radius: 16px; background: var(--color-surface-secondary) !important; }
.auth-profile-form label { display: block; margin: 0; color: var(--color-text-secondary); font-size: 12px; font-weight: 680; }
.auth-profile-form > div { display: flex; gap: 10px; }
.auth-profile-form input {
  min-width: 0;
  min-height: 44px;
  flex: 1;
  padding: 0 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  color: var(--color-text);
  background: var(--color-surface-elevated);
  font: inherit;
  font-size: 13px;
}
.auth-profile-form input:focus { border-color: var(--color-border-focus); outline: 3px solid var(--color-focus-ring); }
.auth-secondary {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  color: var(--color-text);
  background: var(--color-surface-elevated);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  transition: border-color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out);
}
.auth-secondary:active:not(:disabled) { transform: scale(.985); }
.auth-secondary:disabled, .auth-account-button:disabled { cursor: wait; opacity: .5; }
.auth-account-management { margin-top: 30px; }
.auth-account-list { overflow: hidden; border: 1px solid var(--color-border) !important; border-radius: 16px; background: var(--color-surface-secondary); }
.auth-account-link, .auth-account-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  color: var(--color-text);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  text-align: left;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out);
}
.auth-account-link:last-child, .auth-account-button:last-child { border-bottom: 0; }
.auth-account-link:active, .auth-account-button:active:not(:disabled) { transform: scale(.99); }
.auth-account-link:focus-visible, .auth-account-button:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: -2px; }
.auth-account-copy { display: grid; min-width: 0; flex: 1 1 auto; gap: 3px; }
.auth-account-title, .auth-account-expiry { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-account-title { color: inherit; font-size: 13px; font-weight: 560; line-height: 1.35; }
.auth-account-expiry { color: var(--color-text-tertiary); font-size: 10px; font-weight: 520; line-height: 1.35; }
.auth-account-chevron { color: var(--color-text-tertiary); transform: rotate(-90deg); }
.auth-danger { color: #B4232F; }
html[data-theme="dark"] .auth-danger { color: #F38A92; }
.auth-linked { margin-top: 30px; padding: 16px; border: 1px solid var(--color-border) !important; border-radius: 18px; background: var(--color-surface-secondary) !important; }
.auth-linked-row { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--color-border); background: transparent !important; }
.auth-linked-row:last-child { border-bottom: 0; }
.auth-linked-row > span { display: inline-flex; align-items: center; gap: 10px; color: var(--color-text); font-size: 13px; font-weight: 580; }
.auth-provider-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid var(--color-border); border-radius: 10px; color: var(--color-text-secondary); background: var(--color-surface-elevated); }
.auth-provider-icon .auth-provider-mark { display: grid; width: auto; height: auto; place-items: center; font-size: 17px; font-weight: 760; line-height: 1; }
.auth-provider-icon .auth-provider-mark.google { color: #4285f4 !important; }
.auth-provider-icon .auth-provider-mark.apple { color: var(--color-text) !important; font-size: 20px; }
.auth-linked-row .auth-provider { width: auto; min-height: 36px; padding: 0 10px; font-size: 10px; }
.auth-linked-row .auth-provider .auth-provider-mark { display: none; }
.auth-linked-state { display: inline-flex; gap: 6px; align-items: center; padding: 6px 9px; border: 1px solid var(--color-border); border-radius: var(--radius-pill); color: var(--color-text-secondary); background: var(--color-surface-elevated); font-size: 10px; font-weight: 720; white-space: nowrap; }
.auth-linked-state::before { width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); content: ""; }
.auth-linked-unavailable { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-pill); color: var(--color-text-tertiary); background: transparent; font-size: 10px; font-weight: 650; white-space: nowrap; }
.auth-unlink { min-height: 36px; padding: 5px 9px; border: 0; border-radius: 8px; color: var(--color-text-secondary); background: transparent; cursor: pointer; font: inherit; font-size: 10px; font-weight: 650; }
.auth-status-slot:empty { display: none; }
.auth-dialog-status { margin: 16px 0 0; padding: 9px 11px; border-radius: 8px; color: #39705a; background: #edf8f2; font-size: 11px; line-height: 1.5; }
.auth-dialog-status.error { color: #a8434d; background: #fff0f1; }
.auth-dialog-loading { padding: 50px 0 30px; color: #8998ac; font-size: 12px; text-align: center; }
html.auth-dialog-open, body.auth-dialog-open { overflow: hidden; overscroll-behavior: none; }
@keyframes authFadeIn { from { opacity: 0; } }
@keyframes authDialogIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@media (hover: hover) and (pointer: fine) {
  .auth-trigger:hover { border-color: var(--color-accent-border); background: var(--color-surface-elevated); }
  .auth-close:hover, .auth-settings-close:hover { border-color: var(--color-border-strong); color: var(--color-text); background: var(--color-hover); }
  .auth-provider:hover:not(:disabled) { border-color: var(--color-accent-border); box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 10%, transparent); }
  .auth-settings-tab:hover:not([aria-selected="true"]), .auth-setting-trigger:hover { background: var(--color-hover); }
  .auth-choice-option:hover { background: var(--color-hover); }
  .auth-linked-row:hover { background: var(--color-hover) !important; }
  .auth-account-link:hover, .auth-account-button:hover:not(:disabled) { background: var(--color-hover); }
  .auth-secondary:hover:not(:disabled) { border-color: var(--color-border-focus); background: var(--color-hover); }
  .auth-unlink:hover { color: #B4232F; background: var(--color-hover); }
}
@media (max-width: 720px) {
  .auth-settings-overlay { place-items: stretch; padding: 0; }
  .auth-dialog.auth-settings-dialog {
    width: 100% !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
  .auth-settings-sidebar {
    position: relative;
    z-index: 2;
    padding: max(12px, env(safe-area-inset-top)) 14px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-elevated);
  }
  .auth-settings-mobile-title {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    right: 64px;
    left: 64px;
    display: grid;
    height: 44px;
    place-items: center;
    color: var(--color-text);
    font-size: 16px;
    font-weight: 650;
    pointer-events: none;
  }
  .auth-settings-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
  .auth-settings-tab { justify-content: center; padding: 0 10px; text-align: center; }
  .auth-settings-main { min-height: 0; }
  .auth-settings-panel { padding: 22px 18px max(28px, env(safe-area-inset-bottom)); scrollbar-gutter: auto; }
  .auth-settings-panel-header { padding-bottom: 20px; }
  .auth-settings-panel-header h2 { font-size: 23px; }
  .auth-account-panel .auth-settings-panel-header,
  .auth-account-panel > .auth-account-section,
  .auth-account-panel > .auth-dialog-status { width: 100%; }
  .auth-account-panel .auth-settings-panel-header h2 { font-size: 25px; }
  .auth-setting-row { min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 21px 0; }
  .auth-setting-control,
  .auth-setting-row[data-setting="language"] .auth-setting-control { position: static; width: 100%; }
  .auth-setting-trigger { width: 100%; justify-content: flex-start; padding: 0 12px; border-color: var(--color-border); background: var(--color-surface-secondary); }
  .auth-setting-switch { width: 100%; justify-content: flex-start; }
  .auth-setting-current { flex: 1; text-align: left; }
  .auth-setting-menu { position: static; display: none; width: 100%; max-height: min(410px, calc(100dvh - 220px)); margin-top: 8px; visibility: visible; opacity: 1; pointer-events: auto; transform: none; transition: none; }
  .auth-setting-menu.is-open { display: block; }
  .auth-choice-option { min-height: 48px; }
  .auth-account-section { margin-top: 24px; }
  .auth-profile { min-height: 100px; padding: 18px; }
  .auth-profile-status { margin-top: 0; }
}
@media (max-width: 620px) {
  .auth-trigger-name { display: none; }
  .auth-overlay:not(.auth-settings-overlay) { align-items: end; padding: 0; }
  .auth-dialog:not(.auth-settings-dialog) { width: 100%; max-height: 90svh; padding: 22px 18px max(22px, env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
  .auth-profile { grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
  .auth-profile-status { grid-column: 2; justify-self: start; margin-top: -5px; }
  .auth-profile-form > div { align-items: stretch; flex-direction: column; }
  .auth-profile-form .auth-secondary { width: 100%; }
}
@media (max-width: 360px) {
  .auth-profile-form > div { align-items: stretch; flex-direction: column; }
  .auth-profile-form .auth-secondary { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-overlay, .auth-dialog { animation: none; }
  .auth-trigger, .auth-close, .auth-settings-close, .auth-settings-tab,
  .auth-setting-trigger, .auth-setting-chevron, .auth-setting-menu,
  .auth-choice-option, .auth-account-link, .auth-account-button,
  .auth-secondary { transition: none; }
  .auth-setting-menu { transform: none; }
  .auth-setting-switch-track, .auth-setting-switch-track::after { transition: none; }
}
