/* Profiles (2026-10-14, PROFILES-PLAN.md): Who's working?, PIN dialog, avatar chooser, switch menu. */
.profile-face { display: inline-flex; flex: none; overflow: hidden; align-items: flex-end; justify-content: center; box-shadow: 0 1px 0 rgba(255,255,255,.9) inset; }
.profile-face img { width: 100%; height: 100%; display: block; }
.profile-face img.photo { object-fit: cover; }

body.picker-screen { overflow: hidden; }
/* A periwinkle wash (PROFILE_TINTS.periwinkle) as the page (owner, 2026-10-14). The --pk-* colours
   keep AA contrast on it: #555E77 is 5.2:1 on #E4E7F7. Faces get a white ring so a periwinkle
   avatar still reads against the wash. */
.picker { --pk-ink: #22273E; --pk-soft: #555E77; --pk-ring: rgba(255,255,255,.95); --pk-badge: #fff; --pk-dash: #9AA2C0;
  position: fixed; inset: 0; z-index: 50; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 48px 24px;
  font-family: "IBM Plex Sans", system-ui, sans-serif; color: var(--pk-ink); background: linear-gradient(180deg, #EEF0FB 0%, #E4E7F7 100%); }
:root[data-theme="dark"] .picker { --pk-ink: #F1F3FF; --pk-soft: #BDC5DC; --pk-ring: rgba(255,255,255,.12); --pk-badge: #2C3148; --pk-dash: #5D6684;
  background: linear-gradient(180deg, #1B1E2E 0%, #20243A 100%); }
.picker-biz { margin: auto 0 0; max-width: 100%; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--pk-soft); text-align: center; overflow-wrap: anywhere; }
.picker h1 { margin: 8px 0 0; font-size: 36px; line-height: 42px; font-weight: 600; letter-spacing: -.015em; text-align: center; }
.picker-search { margin-top: 28px; width: min(420px, 100%); }
.picker-grid { margin-top: 56px; width: 100%; max-width: 760px; display: flex; flex-wrap: wrap; justify-content: center; gap: 44px 40px; }
.picker-tile { width: 116px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font: inherit; border-radius: 34px; }
.picker-face { position: relative; display: inline-flex; margin-bottom: 8px; }
.picker-tile .profile-face { box-shadow: 0 0 0 2px var(--pk-ring), 0 8px 20px rgba(34,39,62,.08); transition: transform .15s ease, box-shadow .15s ease; }
.picker-tile:hover .profile-face, .picker-tile:focus-visible .profile-face { transform: translateY(-2px); box-shadow: 0 0 0 3px var(--dk-tone-line,#59649D), 0 12px 24px rgba(34,39,62,.1); }
.picker-tile:focus-visible { outline: none; }
.picker-tile strong { font-size: 16px; line-height: 21px; font-weight: 600; max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-tile strong.muted, .picker-tile small { color: var(--pk-soft); }
.picker-tile small { font-size: 13px; line-height: 17px; display: inline-flex; align-items: center; gap: 4px; }
.picker-badge { position: absolute; right: -6px; bottom: -6px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--pk-badge); color: var(--pk-ink); box-shadow: 0 2px 8px rgba(34,39,62,.18); }
.picker-add { width: 108px; height: 108px; margin-bottom: 8px; border-radius: 34px; border: 1.5px dashed var(--pk-dash); display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 300; color: var(--pk-soft); box-sizing: border-box; }
.picker-manage, .picker-done { margin-top: 64px; min-height: 44px; }
.picker-manage { font-size: 14px; font-weight: 600; color: var(--pk-soft); }
.picker-done { padding-inline: 32px; }
.picker-signout { margin-top: 28px; margin-bottom: auto; min-height: 44px; font-size: 13px; color: var(--pk-soft); }
.picker-status { margin-top: 120px; color: var(--pk-soft); }
.picker-gate { display: grid; gap: 4px; }
.picker-gate-row { display: flex; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: 12px; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.picker-gate-row:hover { background: var(--paper-2); }
.picker-gate-row span { display: grid; } .picker-gate-row small { color: var(--ink-3); }
@media (max-width: 560px) { .picker { padding-block: 32px; } .picker h1 { font-size: 28px; line-height: 34px; } .picker-grid { margin-top: 36px; gap: 28px 20px; } .picker-tile { width: 96px; } .picker-tile .profile-face { width: 88px !important; height: 88px !important; border-radius: 28px !important; } .picker-add { width: 88px; height: 88px; border-radius: 28px; } .picker-manage, .picker-done { margin-top: 44px; } }

.pin-dialog { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pin-dialog h3 { margin: 10px 0 2px; font-size: 22px; font-weight: 600; }
.pin-prompt { margin: 0; color: var(--ink-2); font-size: 14px; }
.pin-dots { display: flex; gap: 18px; margin-top: 16px; }
.pin-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--ink-3); box-sizing: border-box; }
.pin-dots i.on { background: var(--ink); border-color: var(--ink); }
.pin-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pin-dialog .err { min-height: 20px; margin: 8px 0 0; }
.pin-dialog .err:empty { visibility: hidden; }
.pin-pad { margin-top: 8px; display: grid; grid-template-columns: repeat(3, 56px); gap: 10px 22px; }
.pin-key { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 22px; font-variant-numeric: tabular-nums; cursor: pointer; }
.pin-key:hover { background: var(--paper-2); }
/* The whole PIN dialog fits on a short laptop screen without scrolling. */
@media (max-height: 720px) { .pin-dialog .profile-face { width: 52px !important; height: 52px !important; border-radius: 18px !important; } .pin-dialog h3 { margin-top: 6px; font-size: 19px; } .pin-dots { margin-top: 10px; } .pin-pad { grid-template-columns: repeat(3, 48px); gap: 8px 20px; } .pin-key { width: 48px; height: 48px; font-size: 19px; } .pin-hint { margin-top: 8px; } }
@media (max-height: 640px) { .pin-dialog .profile-face { display: none; } .pin-dialog h3 { margin-top: 0; } .pin-pad { grid-template-columns: repeat(3, 44px); } .pin-key { width: 44px; height: 44px; } }
.pin-hint { margin: 14px 0 0; max-width: 300px; font-size: 12px; color: var(--ink-3); }

.avatar-picker { display: grid; gap: 18px; justify-items: center; }
.avatar-tints { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.avatar-tint { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.avatar-tint.on { border-color: var(--dk-tone-line,#59649D); box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--dk-tone-line,#59649D); }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 70px); gap: 12px; }
.avatar-choice { padding: 1px; border: 2.5px solid transparent; border-radius: 22px; background: none; cursor: pointer; }
.avatar-choice.on { border-color: var(--dk-tone-line,#59649D); }

.switch-menu { display: grid; gap: 18px; }
.switch-me { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; }
.switch-me { flex-wrap: wrap; }
.switch-me > div { flex: 1; display: grid; } .switch-me small { color: var(--ink-3); }
.switch-me > .switch-me-actions { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.switch-me > .err { flex-basis: 100%; margin: 0; }
.switch-label { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.switch-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.switch-other { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; }
.switch-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.profile-cell { display: flex; align-items: center; gap: 10px; }
.profile-cell > span:last-child { display: grid; } .profile-cell small { color: var(--ink-3); }
.activity-when { display: flex; align-items: center; gap: 10px; }
.activity-when > div { display: grid; }
/* the profile face fills the account card's tile: same corners, no purple frame showing behind it */
#account-avatar:has(.profile-face) { background: none; box-shadow: none; }
#account-avatar .profile-face { width: 100% !important; height: 100% !important; border-radius: inherit !important; }
.profiles-card { grid-column: 1 / -1; }
.profiles-card .row-actions { flex-wrap: wrap; white-space: normal; } /* four actions wrap instead of widening the table */

.profile-edit { display: flex; flex-direction: column; align-items: center; text-align: center; }
.profile-edit h3 { margin: 12px 0 0; font-size: 20px; font-weight: 600; }
.profile-edit > small { color: var(--ink-3); }
.profile-edit-actions { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.profile-edit .err { margin: 10px 0 0; }
