#memory-auth {
  --auth-bg: light-dark(#fcfcfa, #191d1a);
  --auth-surface: light-dark(#fff, #222722);
  --auth-ink: light-dark(#26382d, #ebf0e8);
  --auth-muted: light-dark(#637068, #abb7ad);
  --auth-line: light-dark(#dce3d9, #465047);
  --auth-green: light-dark(#2b5739, #b2d9b7);
  --auth-soft: light-dark(#edf2e9, #27332a);
  --auth-danger: light-dark(#a62d3b, #ffb4bc);
  color: var(--auth-ink);
  background: var(--auth-bg);
  font:
    15px/1.55 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
#memory-auth * {
  box-sizing: border-box;
}
#memory-auth [hidden] {
  display: none !important;
}
#memory-auth a {
  color: var(--auth-green);
  text-underline-offset: 4px;
}
#memory-auth a:hover {
  text-decoration-thickness: 2px;
}
#memory-auth button,
#memory-auth input {
  font: inherit;
}
#memory-auth button,
#memory-auth a {
  -webkit-tap-highlight-color: transparent;
}
#memory-auth :focus-visible {
  outline: 3px solid light-dark(#60856b, #9bc4a5);
  outline-offset: 3px;
}
.auth-header {
  height: 96px;
  padding: 0 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
#memory-auth .auth-brand {
  color: var(--auth-ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.6px;
  text-decoration: none;
}
.auth-brand img {
  opacity: 0.8;
}
.header-caption {
  color: var(--auth-muted);
  font-size: 13px;
}
#memory-auth .auth-page {
  width: min(1080px, 88%);
  margin: auto;
  padding: 32px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: center;
}
.auth-story {
  align-self: stretch;
  border-radius: 24px;
  padding: 36px 38px 28px;
  background: var(--auth-soft);
  overflow: hidden;
  min-height: 610px;
  display: flex;
  flex-direction: column;
}
.story-label,
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.7px;
  color: var(--auth-green);
}
.story-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--auth-green);
  border-radius: 50%;
}
.auth-story h2 {
  font:
    500 46px/1.12 Georgia,
    'Times New Roman',
    serif;
  letter-spacing: -1.6px;
  margin: 32px 0 18px;
}
.auth-story > p {
  color: var(--auth-muted);
  margin: 0;
  line-height: 1.7;
}
.memory-illustration {
  position: relative;
  height: 230px;
  width: 100%;
  max-width: 300px;
  margin: 30px auto 22px;
}
.paper {
  position: absolute;
  inset: 5px 5px;
  border-radius: 10px;
  border: 1px solid var(--auth-line);
  background: var(--auth-surface);
}
.paper-back {
  transform: rotate(-7deg) translate(-8px, 5px);
  opacity: 0.55;
}
.paper-middle {
  transform: rotate(5deg) translate(8px, 1px);
  opacity: 0.8;
}
.paper-front {
  transform: rotate(-2deg);
  padding: 25px;
  box-shadow: 0 12px 28px #122d1910;
}
.note-category {
  font-size: 9px;
  color: var(--auth-muted);
  letter-spacing: 1.6px;
}
.paper-front h3 {
  font:
    500 22px/1.25 Georgia,
    'Times New Roman',
    serif;
  letter-spacing: -0.3px;
  margin: 12px 0;
}
.note-rule {
  height: 1px;
  background: var(--auth-line);
}
.paper-front p {
  margin: 12px 0;
  font-size: 11px;
  color: var(--auth-muted);
}
.note-footer {
  font-size: 10px;
  color: var(--auth-green);
}
.note-footer .status-dot {
  width: 4px;
  height: 4px;
  margin-right: 4px;
}
.story-footer {
  font-size: 11px;
  color: var(--auth-muted);
  margin-top: auto;
}
.auth-card {
  max-width: 390px;
  width: 100%;
  padding: 14px 0;
}
.eyebrow {
  margin: 0 0 14px;
}
.auth-panel h1 {
  font-size: 31px;
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -1.1px;
  margin: 0 0 14px;
}
.auth-description {
  color: var(--auth-muted);
  margin: 0 0 30px;
  font-size: 14px;
}
.auth-description strong {
  font-weight: 500;
  overflow-wrap: anywhere;
}
.auth-field {
  margin-bottom: 19px;
}
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  margin-bottom: 7px;
}
.auth-field input {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid var(--auth-line);
  background: var(--auth-surface);
  color: var(--auth-ink);
  padding: 12px 14px;
  transition: border-color 0.15s;
}
.auth-field input:hover {
  border-color: var(--auth-muted);
}
.auth-field input::placeholder {
  color: var(--auth-muted);
  opacity: 0.8;
}
.password-input {
  position: relative;
}
.password-input input {
  padding-right: 70px;
}
.password-toggle {
  position: absolute;
  right: 5px;
  top: 4px;
  min-width: 55px;
  min-height: 40px;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--auth-muted);
  cursor: pointer;
  font-size: 12px !important;
}
.password-toggle:hover {
  color: var(--auth-ink);
  background: var(--auth-soft);
}
.field-hint {
  font-size: 12px;
  color: var(--auth-muted);
  margin: 8px 0 0;
}
.form-link {
  text-align: right;
  font-size: 12px;
  margin: -6px 0 23px;
}
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 49px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--auth-green);
  color: light-dark(#fff, #193220);
  font-weight: 550 !important;
  cursor: pointer;
}
.auth-submit:hover {
  filter: brightness(0.94);
}
.auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--auth-muted);
  margin: 25px 0 0;
}
.auth-switch a {
  font-weight: 550;
  margin-left: 3px;
}
.invitation-hint {
  color: var(--auth-muted);
  font-size: 12px;
  text-align: center;
  padding-top: 22px;
  margin: 26px 0 0;
  border-top: 1px solid var(--auth-line);
}
.auth-back {
  text-align: center;
  font-size: 13px;
  margin-top: 24px;
}
.auth-notice,
.auth-error {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 24px;
  overflow-wrap: anywhere;
}
.auth-notice {
  color: var(--auth-green);
  background: var(--auth-soft);
}
.auth-error {
  color: var(--auth-danger);
  background: light-dark(#fff0f2, #352529);
  border: 1px solid light-dark(#edc7cd, #6b424b);
}
.text-button {
  padding: 8px 4px;
  margin: -8px 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--auth-green);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.text-button:disabled {
  opacity: 0.6;
  cursor: default;
}
.code-input {
  letter-spacing: 4px;
}
.code-input::placeholder {
  letter-spacing: 0.3px;
}
.auth-footer {
  color: var(--auth-muted);
  font-size: 11px;
  text-align: center;
  padding: 26px;
}
@media (prefers-color-scheme: dark) {
  .auth-brand img {
    filter: invert(1);
  }
}
@media (max-width: 1000px) {
  #memory-auth .auth-page {
    gap: 48px;
  }
  .auth-story {
    padding: 30px;
  }
  .auth-story h2 {
    font-size: 40px;
  }
}
@media (max-width: 760px) {
  .auth-header {
    height: 80px;
    padding: 0 24px;
  }
  .header-caption {
    display: none;
  }
  #memory-auth .auth-page {
    display: block;
    width: 100%;
    padding: 28px 24px 40px;
    margin: auto;
  }
  .auth-story {
    display: none;
  }
  .auth-card {
    margin: auto;
    max-width: 400px;
    padding: 0;
  }
  .auth-panel h1 {
    font-size: 29px;
  }
  .auth-field input {
    font-size: 16px !important;
  }
  .auth-footer {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-field input {
    transition: none;
  }
}
