html[data-theme] body:has(#auth-panel:not([hidden])) > main {
  width: min(1120px, 100%);
  max-width: none;
  margin-inline: auto;
  padding: clamp(24px, 6vw, 78px) clamp(14px, 4vw, 40px) clamp(36px, 7vw, 90px);
}
html[data-theme] body > main:has(#auth-panel:not([hidden])) > .intro {
  display: none;
}
html[data-theme] body #auth-panel:not([hidden]) {
  --auth-paper: #fbfdfc;
  --auth-input: #f2f7f5;
  --auth-ink: #13241e;
  --auth-muted: #40564c;
  --auth-line: #b8cbc2;
  --auth-action: #164d3f;
  --auth-action-hover: #0c4033;
  --auth-action-ink: #fff;
  --auth-highlight: #e0f1e9;
  --auth-error: #9c2f35;
  --auth-error-bg: #fcebec;
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1fr);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--auth-line);
  border-radius: 26px;
  overflow: hidden;
  color: var(--auth-ink);
  background: var(--auth-paper);
  box-shadow: 0 24px 70px #112c2221;
}
html[data-theme=dark] body #auth-panel:not([hidden]) {
  --auth-paper: #161f21;
  --auth-input: #1d2929;
  --auth-ink: #f0faf6;
  --auth-muted: #b7c9c0;
  --auth-line: #50665e;
  --auth-action: #a4ead2;
  --auth-action-hover: #c3f5e4;
  --auth-action-ink: #102620;
  --auth-highlight: #263d36;
  --auth-error: #ffb9b8;
  --auth-error-bg: #40272b;
  box-shadow: 0 26px 70px #040c0a76;
}
#auth-panel .auth-brand {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(14px, 3vw, 35px);
  padding: clamp(24px, 4vw, 49px);
  color: #f3fcf8;
  background:
    linear-gradient(160deg, transparent, #0d221e 82%),
    radial-gradient(ellipse at 42% 34%, #408874, transparent 62%),
    #102823;
}
#auth-panel .auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(#adfbe21c 1px, transparent 1px),
    linear-gradient(90deg, #adfbe21c 1px, transparent 1px);
  background-size: 33px 33px;
  mask-image: radial-gradient(ellipse at 46% 32%, #000 10%, transparent 76%);
}
#auth-panel .auth-brand img {
  display: block;
  width: min(100%, 235px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  align-self: center;
  filter: drop-shadow(0 18px 23px #071e18a8);
}
@keyframes auth-logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="reduce"]) #auth-panel:not([hidden]) .auth-brand img {
    animation: auth-logo-float 5.5s ease-in-out infinite;
  }
}
html[data-theme] body #auth-panel .auth-brand-copy p {
  margin: 0;
  color: #dbf0e8 !important;
  font-size: 15px;
  line-height: 1.55;
}
html[data-theme] body #auth-panel .auth-brand p.auth-brand-title {
  margin-bottom: 8px;
  color: #fff !important;
  font-size: clamp(25px, 3vw, 37px);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.14;
}
#auth-panel .auth-content {
  min-width: 0;
  padding: clamp(24px, 4vw, 52px);
}
html[data-theme] body #auth-panel .auth-title {
  margin: 0 0 22px;
  color: var(--auth-ink) !important;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.12;
  letter-spacing: -.04em;
}
#auth-panel .auth-title-signup,
#auth-panel:has(#signup-form:not([hidden])) .auth-title-login {
  display: none;
}
#auth-panel:has(#signup-form:not([hidden])) .auth-title-signup {
  display: block;
}
#auth-panel .auth-content .tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 24px;
  padding: 4px;
  background: var(--auth-input);
  border: 1px solid var(--auth-line);
  border-radius: 13px;
}
html[data-theme] body #auth-panel .auth-content .tabs button {
  min-height: 43px;
  margin: 0;
  padding: 6px;
  border: 1px solid transparent !important;
  border-radius: 9px;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--auth-muted) !important;
  font-size: 14px;
}
html[data-theme] body #auth-panel .auth-content .tabs button[aria-pressed=true] {
  border-color: var(--auth-line) !important;
  background: var(--auth-paper) !important;
  color: var(--auth-ink) !important;
  font-weight: 750;
}
#auth-panel .auth-content .stack:not([hidden]) {
  display: grid;
  gap: 16px;
  margin: 0;
}
#auth-panel .auth-content .stack[hidden] {
  display: none !important;
}
#auth-panel .signup-names {
  gap: 12px;
}
html[data-theme] body #auth-panel .auth-content .stack label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--auth-ink) !important;
  font-size: 14px;
  font-weight: 650;
}
html[data-theme] body #auth-panel .auth-content .stack input:not([type=color]):not([type=checkbox]) {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--auth-line) !important;
  border-radius: 10px;
  background: var(--auth-input) !important;
  color: var(--auth-ink) !important;
  box-shadow: none;
  font-size: 16px;
}
html[data-theme=dark] body #auth-panel input {
  color-scheme: dark;
}
#auth-panel input:-webkit-autofill {
  -webkit-text-fill-color: var(--auth-ink);
  box-shadow: 0 0 0 1000px var(--auth-input) inset !important;
}
html[data-theme] body #auth-panel .auth-content button.primary:not(:disabled) {
  min-height: 48px;
  border-color: var(--auth-action) !important;
  border-radius: 10px;
  background: var(--auth-action) !important;
  color: var(--auth-action-ink) !important;
  font-size: 15px;
  font-weight: 750;
}
html[data-theme] body #auth-panel .auth-content button.primary:hover:not(:disabled) {
  background: var(--auth-action-hover) !important;
}
html[data-theme] body #auth-panel .auth-content #reset-password:not(:disabled) {
  justify-self: start;
  padding-inline: 0;
  color: var(--auth-ink) !important;
  font-size: 14px;
}
html[data-theme] body #auth-panel .auth-content :is(small, .fine) {
  margin: 0;
  color: var(--auth-muted) !important;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.55;
}
#auth-panel .signup-privacy {
  padding: 11px 13px;
  border: 1px solid var(--auth-line);
  border-radius: 9px;
  background: var(--auth-highlight);
}
html[data-theme] body #auth-panel .auth-content .fine a {
  color: var(--auth-action) !important;
  text-underline-offset: .15em;
}
html[data-theme] body #auth-panel .auth-content #auth-message:not(:empty) {
  margin: 17px 0 0;
  padding: 11px 13px;
  border-radius: 9px;
  color: var(--auth-ink) !important;
  background: var(--auth-highlight);
  font-size: 14px;
}
html[data-theme] body #auth-panel .auth-content #auth-message[data-error=true]:not(:empty) {
  color: var(--auth-error) !important;
  background: var(--auth-error-bg);
}
#auth-panel #auth-message:empty { margin: 0; }
@media (max-width: 740px) {
  html[data-theme] body #auth-panel:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
  #auth-panel .auth-brand { flex-direction: row; align-items: center; justify-content: flex-start; }
  #auth-panel .auth-brand img { flex: 0 0 auto; width: clamp(54px, 14vw, 90px); }
  html[data-theme] body #auth-panel .auth-brand p.auth-brand-title { margin-bottom: 4px; }
}
@media (max-width: 390px) {
  #auth-panel .signup-names { grid-template-columns: minmax(0, 1fr); }
}

html[data-theme] body > header:has(> .auth-theme:not([hidden])) > #theme-toggle,
.auth-theme[hidden] {
  display: none !important;
}
.auth-theme {
  position: relative;
  flex: 0 0 auto;
}
html[data-theme] body > header .auth-theme-trigger {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid #7fa18d;
  border-radius: 50%;
  background: #edf5ee;
  color: #254d38;
}
html[data-theme=dark] body > header .auth-theme-trigger {
  border-color: #657080;
  background: #303641;
  color: #f2f4f8;
}
.auth-theme-trigger svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html[data-theme] body > header .auth-theme-options button {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-align: start;
}
html[data-theme] body > header .auth-theme-options button[aria-pressed=true] {
  border-color: currentColor;
  font-weight: 750;
}
html[data-theme] body > header .auth-theme-options button:hover {
  background: #829e902b;
}
.auth-theme :is(button):focus-visible {
  outline: 2px solid #76bea8;
  outline-offset: 2px;
}
@media (pointer: coarse) {
  html[data-theme] body > header .auth-theme-trigger { width: 44px; height: 44px; }
  html[data-theme] body > header .auth-theme-options button { min-height: 44px; }
}
