.auth-page {
  display: grid;
  min-height: 100svh;
  align-content: center;
  justify-items: center;
  gap: clamp(14px, 3vh, 26px);
  padding: clamp(16px, 4vh, 36px) 16px;
  isolation: isolate;
}
.auth-page::before {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 18%, rgba(110, 200, 220, 0.16), transparent 52%),
    radial-gradient(circle at 20% 85%, rgba(139, 92, 246, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(19, 54, 60, 0.5), rgba(23, 62, 61, 0.28));
}
.auth-header .brand { color: #f4f9f3; }
.auth-header .brand small { color: #e0eae1; }
.auth-header .brand-mark {
  border: 1px solid #c5dbcd;
  border-radius: 10px;
  background: var(--blue-dark);
  box-shadow: none;
}
.auth-header .brand-mark::after { content: none; }
.auth-card {
  position: relative;
  width: min(100%, 460px);
  overflow: hidden;
  padding: clamp(22px, 4.5vw, 36px);
  border: 1px solid rgba(210, 225, 216, 0.8);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.16), transparent 52%),
    radial-gradient(circle at 0% 100%, rgba(139, 92, 246, 0.14), transparent 52%),
    linear-gradient(160deg, #fbfefb, #eef5f1);
  box-shadow: 0 24px 60px rgba(23, 56, 59, 0.3);
}

.auth-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6 55%, #ec4899);
  content: "";
}
.auth-avatar {
  display: grid;
  width: clamp(82px, 15vw, 104px);
  aspect-ratio: 1;
  place-items: center;
  margin: 0 auto 15px;
  overflow: hidden;
  border: 1px solid #9ab7a7;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}
.auth-avatar svg { width: 56%; height: auto; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.auth-avatar :is(img, video, canvas) { width: 100%; height: 100%; object-fit: cover; }
.auth-intro { margin: 0 0 18px; text-align: center; }
.auth-intro h1 { margin: 0; font-size: clamp(24px, 5vw, 32px); line-height: 1.25; }
.auth-intro p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.auth-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 24px;
  background: var(--blue-soft);
}
.auth-modes button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}
.auth-modes button[aria-pressed="true"] { border-color: #d0dfd6; background: #f8faf8; color: var(--ink); }
.auth-card .account-form input { border-radius: 12px; }
.auth-card .primary-button { min-height: 46px; border-radius: 24px; box-shadow: none; }
.auth-card .primary-button::after { content: none; }
.auth-card :is(a, button, input):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.auth-card .account-options { justify-content: center; }
.auth-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  padding: 5px 13px;
  border-radius: 20px;
  background: #173e3dde;
  font-size: 13px;
}
.auth-footer a { color: #f4f9f3; }
.account-form, .archive-save { display: grid; gap: 14px; }
.account-form label, .archive-save label { display: grid; gap: 5px; font-weight: 700; }
.account-form input, .archive-save input {
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf8;
  color: var(--ink);
  font: inherit;
}
.account-form .primary-button { width: 100%; justify-content: center; }
.account-options, .archive-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.account-options { margin-top: 14px; }
.lake-page :is(.account-options, .archive-actions, .archive-list, .account-form) :is(a, .text-button) { color: var(--blue); }
.account-message { margin: 10px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.account-message:empty { display: none; }
.account-message.is-error, .lake-page .archive-actions .is-danger { color: #95332e; }
.lake-page .account-link { margin-top: 0; }
.account-email { margin: 0; overflow-wrap: anywhere; }
.account-divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0 12px; }
.archive-save { max-width: 540px; margin: 10px 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.archive-save p { margin: 0; }
.archive-save .primary-button { justify-self: start; }
.archive-list { display: grid; gap: 14px; border-top: 0; }
.archive-list article {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 18px 20px 18px 22px;
  border: 1px solid rgba(160, 180, 172, 0.45);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.08), transparent 55%),
    linear-gradient(160deg, #ffffff, #f3f7f4);
  box-shadow: 0 10px 24px rgba(16, 44, 65, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.archive-list article::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, #3b82f6, #22d3ee);
  content: "";
}
.archive-list article:nth-child(4n+2)::before { background: linear-gradient(180deg, #8b5cf6, #ec4899); }
.archive-list article:nth-child(4n+3)::before { background: linear-gradient(180deg, #06b6d4, #0e7490); }
.archive-list article:nth-child(4n+4)::before { background: linear-gradient(180deg, #10b981, #047857); }
.archive-list article:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(16, 44, 65, 0.12);
}
.archive-list article:nth-child(even) { margin-left: 16px; }
.archive-list article h3 { margin: 0; overflow-wrap: anywhere; }
.archive-list details { margin-top: 10px; padding: 10px 12px; border-left: 2px solid var(--line); }
.archive-list summary { cursor: pointer; font-weight: 700; overflow-wrap: anywhere; }
.archive-list ul { padding-inline-start: 20px; }
.archive-list .version-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0; }
.archive-meta { color: var(--muted); font-size: 14px; }
@media print {
  .archive-save { display: none; }
}
