/* Account pages share the site's colors, typography, header and footer. */

/* The site's main navigation marks this page as the current one. */
.main-nav a[aria-current="page"] {
  background: var(--s3);
  color: var(--tx);
}

.auth-main {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: clamp(32px, 7vh, 72px) var(--gutter);
}

/* A faint grid behind the card that fades out from the center. */
.auth-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-position: center;
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 45%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 45%, #000 0%, transparent 72%);
  pointer-events: none;
}

/* auth.js sets data-view to signed-out, app-signed-out, app or signed-in. */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(24px, 6vw, 32px);
  background: var(--s1);
  border: 1px solid var(--line2);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

/* Later display rules must never reveal hidden elements. */
.auth-card [hidden] { display: none !important; }

.auth-card .ic { width: 16px; height: 16px; }

.auth-head { display: flex; flex-direction: column; gap: 12px; }
.auth-card h1 { font-size: 2rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.auth-lead { color: var(--tx2); font-size: 0.9375rem; line-height: 1.6; }
/* A lead of two sentences starts each one on a new line. */
.auth-lead > span { display: block; }

.auth-status { color: var(--tx2); font-size: var(--fs-sm); line-height: 1.55; }
.auth-status:empty { display: none; }

/* Opening Nico: the retry row shows the attempt, so the status is only announced. This keeps the button in place. */
.auth-card[data-view="app"] .auth-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Errors carry an icon as well as the color. */
.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--tx);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.55;
}

.auth-error-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral-tx);
}

.auth-error p { flex: 1; min-width: 0; padding-top: 3px; }

.auth-card button { font-family: inherit; cursor: pointer; }
.auth-card .btn { min-height: 44px; padding: 0 16px; }
.auth-check { align-self: flex-start; }
/* Keep the retry button close to the error it belongs to. */
.auth-error + .auth-check { margin-top: -12px; }

.auth-account {
  display: flex;
  flex-direction: column;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* On narrow screens the switch button moves below the account before the email breaks. */
.auth-who { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; padding: 12px 8px 12px 14px; }

.auth-avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--line2);
  border-radius: 999px;
  background: var(--grape-soft);
  color: var(--grape-tx);
  font-weight: 600;
  line-height: 1;
}

.auth-names { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* Show the whole account: the user checks it before handing the login to the app. */
.auth-name { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.auth-email { color: var(--tx2); font-size: var(--fs-xs); line-height: 1.4; overflow-wrap: anywhere; }

.auth-switch {
  flex: none;
  min-height: 44px;
  margin-left: auto;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--tx2);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-switch:hover { color: var(--tx); }

.auth-expiry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--tx3);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.auth-expiry .ic { flex: none; }

/* The signed-in view gives the account more room, as there is no switch button. */
.auth-card[data-view="signed-in"] .auth-who { padding: 16px; }
.auth-card[data-view="signed-in"] .auth-avatar { width: 48px; height: 48px; border: 0; font-family: var(--font-display); font-size: 1.25rem; }
.auth-card[data-view="signed-in"] .auth-name { font-size: 1rem; }
.auth-card[data-view="signed-in"] .auth-email { font-size: var(--fs-sm); }

.auth-signed-out { display: flex; flex-direction: column; gap: 24px; }
.auth-google { display: flex; flex-direction: column; gap: 12px; }
#auth-google { width: 100%; }
.auth-legal { color: var(--tx3); font-size: var(--fs-xs); line-height: 1.55; }
.auth-legal a { color: var(--tx2); text-underline-offset: 3px; }

.auth-info { display: flex; align-items: flex-start; gap: 8px; color: var(--tx2); font-size: var(--fs-xs); line-height: 1.55; }
.auth-info .ic { flex: none; margin-top: 2px; color: var(--apple-tx); }

.auth-app { display: flex; flex-direction: column; gap: 12px; }
.auth-buttons { display: flex; gap: 12px; }

/* Signed out: below a divider, the text on the left and the button on the right. */
.auth-card[data-view="signed-out"] .auth-app {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.auth-app-text { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.auth-app-text p { color: var(--tx2); font-size: var(--fs-xs); line-height: 1.5; }
.auth-app-text .auth-app-title { color: var(--tx); font-size: var(--fs-sm); font-weight: 500; }
.auth-card[data-view="signed-out"] .auth-buttons { flex: none; }
.auth-card[data-view="signed-out"] .auth-open { font-size: var(--fs-sm); }

/* Back from the app's request: opening Nico is the main action. */
.auth-card[data-view="app"] .auth-open { width: 100%; background: var(--apple); border-color: transparent; color: var(--apple-ink); font-weight: 600; }
.auth-card[data-view="app"] .auth-open:hover { background: var(--apple-hi); }

.auth-card[data-view="signed-in"] .auth-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Narrow padding keeps both labels on one line at 360px, also in Japanese. */
.auth-card[data-view="signed-in"] .auth-buttons > .btn { padding: 0 12px; }
.auth-logout { color: var(--coral-tx); }

/* The web app is not available yet: always disabled, with a label that says so. */
.auth-web { width: 100%; font-weight: 500; }
.auth-soon {
  padding: 1px 6px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  color: var(--tx2);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 16px;
}

/* Signed in: the way to the passkeys page, as a full-width row. */
.auth-manage a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--tx);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
}

.auth-manage a:hover { border-color: var(--line3); }
.auth-manage a > span { flex: 1; }
.auth-manage .ic { flex: none; color: var(--tx2); }

/* A note below a divider, its icon in a small tile. */
.auth-ready {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--tx2);
  font-size: var(--fs-xs);
  line-height: 1.55;
}

.auth-ready .ic {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 10px;
  background: var(--s3);
  color: var(--tx2);
}

.auth-ready span { padding-top: 6px; }

.auth-help { display: flex; flex-direction: column; gap: 4px; color: var(--tx2); font-size: var(--fs-xs); line-height: 1.55; }
.auth-retry { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--tx3); }
.auth-retry a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tx2); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.auth-retry a:hover { color: var(--tx); }

.auth-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--tx3);
}

.auth-note .ic { flex: none; }
.auth-retry:not([hidden]) + .auth-note { margin-top: 0; }

.auth-next { padding-top: 24px; border-top: 1px solid var(--line); color: var(--tx2); font-size: var(--fs-xs); line-height: 1.55; }

.auth-preview { position: relative; max-width: 460px; color: var(--tx3); font-size: var(--fs-xs); line-height: 1.55; text-align: center; text-wrap: balance; }

/* Phones only: a link about the desktop app replaces the button that opens it. */
.auth-desktop {
  position: relative;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 6px;
  color: var(--tx2);
  font-size: var(--fs-sm);
  line-height: 20px;
  text-align: center;
}

.auth-desktop a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  color: var(--tx);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--tx3);
  text-underline-offset: 3px;
}

.auth-desktop a:hover { text-decoration-color: currentColor; }
.auth-desktop .ic { width: 16px; height: 16px; }

/* Break lines between phrases, not inside them: at spaces and punctuation in Chinese, by phrase in Japanese where supported. */
:lang(zh) .auth-card p,
:lang(zh) .auth-preview,
:lang(zh) .auth-desktop { word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja) .auth-card p,
:lang(ja) .auth-preview,
:lang(ja) .auth-desktop { word-break: auto-phrase; }

/* Disabled buttons look inactive, also on hover. Keep this after the button colors above. */
.auth-card .btn:disabled,
.auth-card .btn:disabled:hover {
  background: var(--s3);
  border-color: var(--line);
  color: var(--tx3);
  cursor: not-allowed;
}

.auth-card .auth-switch:disabled { color: var(--tx3); cursor: not-allowed; }

/* ---------- Passkeys page ---------- */

/* passkeys.js sets data-view to loading, signed-out or manage. A list needs a wider card. */
.pk-card { max-width: 560px; }

.pk-signed-out,
.pk-manage { display: flex; flex-direction: column; gap: 24px; }
.pk-signed-out p { color: var(--tx2); font-size: 0.9375rem; line-height: 1.6; }
.pk-signed-out .btn { align-self: flex-start; }

/* The leftover note and the stale note sit in live regions that stay in the page; while a note
   is hidden, its empty region takes back the gap it adds. The leftover note is outside both
   views, so a sign-out after a cancel or revoke does not hide it. */
.pk-card > .pk-leftover-live:has(> .pk-leftover[hidden]) { margin-top: -24px; }
.pk-section > .pk-stale-live:has(> .pk-stale[hidden]) { margin-top: -12px; }

/* A failed fetch after an action: the rows may be out of date, so they fade (their actions are disabled). */
.pk-list[data-stale] { opacity: 0.55; }

.pk-notes { display: flex; flex-direction: column; gap: 10px; }

/* Not supported: a warning tile like the error box, without the alert role. */
.pk-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--tx);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.pk-warning .ic { flex: none; margin-top: 2px; color: var(--coral-tx); }

.pk-section { display: flex; flex-direction: column; gap: 12px; }
.pk-add { padding-top: 24px; border-top: 1px solid var(--line); }
.pk-heading { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.pk-heading:focus { outline: none; }

.pk-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pk-empty { color: var(--tx3); font-size: var(--fs-sm); line-height: 1.55; }

.pk-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.pk-item-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.pk-name { flex: 1 1 auto; min-width: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }

.pk-badge {
  flex: none;
  padding: 2px 8px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  color: var(--tx2);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 18px;
}

.pk-item[data-status="active"] > .pk-item-head > .pk-badge,
.pk-item[data-status="enabled"] > .pk-item-head > .pk-badge { background: var(--apple-soft); border-color: transparent; color: var(--apple-tx); }
/* Amber means waiting for you (site.css). A counter error overrides Active: the passkey is disabled. */
.pk-item[data-status="pending"] > .pk-item-head > .pk-badge,
.pk-item[data-status="needs_reauth"] > .pk-item-head > .pk-badge,
.pk-item[data-status="needs_review"] > .pk-item-head > .pk-badge { background: var(--amber-soft); border-color: transparent; color: var(--amber-tx); }
.pk-item[data-status="error"] > .pk-item-head > .pk-badge { background: var(--coral-soft); border-color: transparent; color: var(--coral-tx); }
.pk-item[data-regressed] > .pk-item-head > .pk-badge { background: transparent; border-color: var(--line2); color: var(--tx3); }

.pk-details { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 0; color: var(--tx3); font-size: var(--fs-xs); line-height: 1.5; }
.pk-details > div { display: flex; gap: 6px; }
.pk-details dd { margin: 0; color: var(--tx2); }

.pk-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-tag { padding: 1px 6px; border: 1px solid var(--line2); border-radius: 6px; color: var(--tx2); font-size: var(--fs-2xs); line-height: 16px; }
/* The counter error carries words as well as the color. */
.pk-regressed { background: var(--coral-soft); border-color: transparent; color: var(--coral-tx); }

.pk-deadline { color: var(--tx2); font-size: var(--fs-xs); line-height: 1.55; }

.pk-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.auth-card .pk-action { min-height: 40px; padding: 0 14px; font-size: var(--fs-sm); }
/* Only while enabled: a disabled Revoke keeps the inactive look of the rule above. */
.auth-card .pk-action[data-pk-action="revoke"]:not(:disabled) { color: var(--coral-tx); }

/* The revoke confirmation opens inside the row it belongs to. */
.pk-ask { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.pk-ask-text { color: var(--tx); font-size: var(--fs-sm); line-height: 1.55; }

.pk-field { display: flex; flex-direction: column; gap: 6px; }
.pk-field label { color: var(--tx2); font-size: var(--fs-sm); line-height: 1.45; }

.pk-input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  background: var(--well);
  border: 1px solid var(--line2);
  border-radius: 10px;
  color: var(--tx);
  font-family: inherit;
  font-size: 1rem;
}

.pk-input:hover { border-color: var(--line3); }
#pk-code { font-family: var(--font-mono); letter-spacing: 0.04em; }
#pk-add { align-self: flex-start; }

.pk-note { display: flex; align-items: flex-start; gap: 8px; color: var(--tx3); font-size: var(--fs-xs); line-height: 1.55; }
.pk-note .ic { flex: none; margin-top: 2px; }

/* ---------- Pairing and devices pages ---------- */

/* pair.js sets data-view to loading, signed-out, enter, review or done; devices.js to loading,
   signed-out or manage. They reuse the passkeys page's blocks. */
#pr-code { font-family: var(--font-mono); letter-spacing: 0.04em; }
#pr-lookup { align-self: flex-start; }
.pr-key { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--s2); border: 1px solid var(--line); border-radius: 14px; }
.pr-key-title { color: var(--tx2); font-size: var(--fs-xs); line-height: 1.5; }
/* Compared by eye with the terminal: large and monospaced. */
.pr-fingerprint { font-family: var(--font-mono); font-size: 1.375rem; font-weight: 600; letter-spacing: 0.06em; line-height: 1.3; overflow-wrap: anywhere; }
.pr-mono,
.dv-fingerprint dd { font-family: var(--font-mono); letter-spacing: 0.04em; }
.pr-repair > div,
.dv-recent > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dv-recent-title { font-weight: 600; }
.dv-recent-list { margin: 0; padding-left: 18px; overflow-wrap: anywhere; }
.dv-pair { align-self: flex-start; }
/* Only while enabled: a disabled Revoke keeps the inactive look. */
.auth-card .pk-action[data-dv-action="revoke"]:not(:disabled),
.auth-card .pk-action[data-cn-action="revoke"]:not(:disabled) { color: var(--coral-tx); }

.cn-accounts { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); list-style: none; }
.cn-account { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--s1); border: 1px solid var(--line); border-radius: 12px; }
.cn-account[data-status="active"] > .pk-item-head > .pk-badge { background: var(--apple-soft); border-color: transparent; color: var(--apple-tx); }
.cn-account[data-status="needs_reauth"] > .pk-item-head > .pk-badge { background: var(--amber-soft); border-color: transparent; color: var(--amber-tx); }
.cn-account[data-status="error"] > .pk-item-head > .pk-badge { background: var(--coral-soft); border-color: transparent; color: var(--coral-tx); }
.cn-account[data-status="revoked"] > .pk-item-head > .pk-badge { background: transparent; border-color: var(--line2); color: var(--tx3); }
.cn-verify { padding: 10px 12px; background: var(--s2); border: 1px solid var(--line); border-radius: 10px; font-size: var(--fs-xs); color: var(--tx2); display: flex; flex-direction: column; gap: 4px; }
.cn-verify-title { font-weight: 600; color: var(--apple-tx); }

/* ---------- Desktop read-only inbox and policy pages ---------- */

.ib-card,
.pl-card { max-width: 720px; }

.ib-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.ib-tab {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: var(--s2);
  color: var(--tx2);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.ib-tab[aria-selected="true"] {
  background: var(--s3);
  border-color: var(--line3);
  color: var(--tx);
}

.ib-card-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.ib-card-item[data-kind="alert"] { border-color: var(--line2); }

.ib-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; }
.ib-card-title { flex: 1 1 220px; min-width: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.ib-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-badge {
  padding: 2px 8px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  color: var(--tx2);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 18px;
}
.ib-badge[data-tone="pending"] { background: var(--amber-soft); border-color: transparent; color: var(--amber-tx); }
.ib-badge[data-tone="ok"] { background: var(--apple-soft); border-color: transparent; color: var(--apple-tx); }
.ib-badge[data-tone="danger"] { background: var(--coral-soft); border-color: transparent; color: var(--coral-tx); }
.ib-badge[data-tone="accent"] { background: var(--grape-soft); border-color: transparent; color: var(--grape-tx); }

.ib-body { color: var(--tx2); font-size: var(--fs-sm); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.ib-code {
  margin: 0;
  padding: 10px 12px;
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--tx);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ib-note {
  padding: 10px 12px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fs-xs);
  color: var(--tx2);
}
.ib-note-label { font-weight: 600; color: var(--amber-tx); }
.ib-warn {
  padding: 10px 12px;
  background: var(--s1);
  border: 1px solid var(--line2);
  border-radius: 10px;
  color: var(--amber-tx);
  font-size: var(--fs-xs);
  line-height: 1.5;
}
.ib-warn[data-tone="danger"] { color: var(--coral-tx); }
.ib-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.ib-pwa-link { color: var(--tx); font-size: var(--fs-xs); font-weight: 500; text-underline-offset: 3px; }
.ib-mono { font-family: var(--font-mono); overflow-wrap: anywhere; }

.pl-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--s2);
  border: 1px solid var(--line2);
  border-radius: 14px;
  color: var(--tx);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.pl-banner .ic { flex: none; margin-top: 2px; color: var(--amber-tx); }
.pl-select-row { display: flex; flex-direction: column; gap: 6px; }
.pl-select-row label { color: var(--tx2); font-size: var(--fs-sm); }
.pl-select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  background: var(--well);
  border: 1px solid var(--line2);
  border-radius: 10px;
  color: var(--tx);
  font-family: inherit;
  font-size: 0.9375rem;
}
.pl-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pl-tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: var(--fs-sm);
}
.pl-lists { display: flex; flex-direction: column; gap: 12px; }
.pl-list-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.pl-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pl-list-name { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 600; }
.pl-list-items {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--tx2);
  overflow-wrap: anywhere;
}
.pl-omitted { color: var(--tx2); font-size: var(--fs-xs); line-height: 1.55; }

@media (max-width: 480px) {
  .auth-main { justify-content: flex-start; padding-top: 32px; }
  .auth-card { padding: 28px 20px 20px; border-color: var(--line); box-shadow: none; }
  .auth-head { gap: 10px; }
  .auth-card h1 { font-size: 1.75rem; line-height: 1.2; }
  .auth-lead { font-size: 1rem; line-height: 1.55; }
  .auth-card .btn { width: 100%; min-height: 48px; font-size: 1rem; }
  .auth-buttons > .btn { flex: 1; }
  .auth-legal,
  .auth-info,
  .auth-help,
  .auth-next,
  .auth-ready,
  .auth-preview { font-size: var(--fs-sm); }
  .auth-ready span { padding-top: 5px; }
  .auth-check { align-self: stretch; }
  .pk-signed-out .btn,
  #pk-add,
  #pr-lookup,
  .dv-pair { align-self: stretch; }
  .auth-card .pk-action { flex: 1 1 auto; width: auto; min-height: 44px; }

  /* Signed out on a phone: the data note moves below a divider, and the desktop app row leaves the card. */
  .auth-card[data-view="signed-out"] .auth-app { display: none; }
  .auth-card[data-view="signed-out"] .auth-info { gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
  .auth-card[data-view="signed-out"] .auth-info .ic { width: 32px; height: 32px; margin-top: 0; padding: 7px; border-radius: 10px; background: var(--s3); color: var(--tx2); }
  .auth-card[data-view="signed-out"] .auth-info span { padding-top: 5px; }
  .auth-desktop:not([hidden]) { display: flex; }
  .auth-desktop:not([hidden]) + .auth-preview { margin-top: -16px; }
}
