:root {
  color-scheme: light;
  --ink: #143e3d;
  --ink-dark: #182c29;
  --muted: #526963;
  --peacock: #24756d;
  --peacock-dark: #195951;
  --paper: #f8faf7;
  --white: #fff;
  --mint: #e2f0e9;
  --line: #d7e2dc;
  --gold: #e9c46b;
  --danger: #922f34;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-dark);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #137d72; outline-offset: 4px; }
main:focus, [tabindex="-1"]:focus { outline: none; }
.icon { width: 1.2em; height: 1.2em; flex: 0 0 auto; vertical-align: middle; }
.skip-link {
  position: fixed;
  z-index: 5;
  inset: .8rem auto auto .8rem;
  background: var(--white);
  padding: .65rem 1rem;
  border-radius: 5px;
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }
.muted { color: var(--muted); }

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  max-width: 1360px;
  padding: 0 clamp(1.1rem, 4vw, 3rem);
  min-height: 72px;
  margin: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .62rem;
  width: fit-content;
  color: var(--ink);
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 39px;
  height: 39px;
  border-radius: 11px;
  background: var(--ink);
  color: #f6edcb;
}
.brand-mark .icon { width: 23px; height: 23px; }
.brand-name {
  font: 700 1.48rem/1 var(--serif);
  letter-spacing: -.05em;
}

.nav { display: flex; align-items: center; gap: .28rem; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  min-height: 40px;
  padding: .5rem .78rem;
  color: var(--muted);
  border-radius: 7px;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav-link:hover { background: var(--paper); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--mint); color: var(--ink); }
.nav-link .icon { font-size: 1rem; }

.account { display: flex; justify-content: end; align-items: center; gap: .65rem; }
.account-initials {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--ink);
  background: var(--mint);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.demo-label {
  font-size: .72rem;
  white-space: nowrap;
  font-weight: 650;
  color: #5c4319;
  background: #fff4da;
  padding: .28rem .52rem;
  border: 1px solid #e9d6a8;
  border-radius: 5px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
}
.icon-button:hover { color: var(--ink); background: var(--mint); }
.sign-out .icon { width: 19px; height: 19px; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .52rem;
  min-height: 44px;
  padding: .57rem .9rem;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}
.button--primary { background: var(--peacock-dark); color: var(--white); }
.button--primary:hover:not(:disabled) { background: var(--ink); }
.button--secondary { border-color: var(--line); background: var(--white); color: var(--ink); }
.button--secondary:hover:not(:disabled) { border-color: #8aa99a; background: var(--mint); }
.button--gold { color: #263526; background: var(--gold); }
.button--gold:hover { background: #f1d893; }
.button--quiet { color: var(--peacock-dark); background: transparent; }
.button--quiet:hover { background: var(--mint); }
.button--danger { background: var(--danger); color: var(--white); }
.button--danger:hover:not(:disabled) { background: #702029; }
.button--danger-quiet { color: var(--danger); background: transparent; padding-inline: .35rem; }
.button--danger-quiet:hover { background: #f9e9e9; }

.page-container { width: min(100% - clamp(2.2rem, 8vw, 6rem), 1220px); margin: 0 auto; }
.directory-page { padding-block: clamp(1.15rem, 4vw, 2.75rem) 4rem; }

.directory-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 244px;
  padding: clamp(1.5rem, 3.65vw, 3.125rem);
  border: 1px solid #2a514d;
  border-radius: 16px;
  background: var(--ink);
  color: #fcfbf3;
}
.hero-content { position: relative; z-index: 1; }
.hero-content h1, .page-intro h1, .signin h1 {
  font: 400 clamp(2.8rem, 5.2vw, 4.8rem)/.98 var(--serif);
  letter-spacing: -.065em;
}
.hero-content p {
  color: #d9e9dd;
  margin: .8rem 0 1.35rem;
  font-size: clamp(.94rem, 1.42vw, 1.08rem);
  line-height: 1.45;
}
.hero-content .button { min-height: 45px; }
.hero-content .button .icon:last-child { margin-left: .2rem; }
.hero-content a:focus-visible { outline-color: var(--gold); }

.deck-art {
  position: absolute;
  width: 360px;
  height: 240px;
  right: clamp(1rem, 7vw, 6rem);
  top: 50%;
  translate: 0 -50%;
  pointer-events: none;
}
.art-ring {
  position: absolute;
  border: 1px solid #72938a;
  border-radius: 50%;
  opacity: .38;
}
.art-ring--wide {
  width: 360px;
  height: 200px;
  inset: 21px 0 auto auto;
  transform: rotate(-18deg);
}
.art-ring--center {
  width: 311px;
  height: 167px;
  inset: 36px 18px auto auto;
  transform: rotate(-18deg);
  opacity: .27;
}
.deck-card {
  position: absolute;
  display: block;
  left: 114px;
  top: 28px;
  width: 130px;
  height: 175px;
  border-radius: 10px;
  transform-origin: center;
  border: 1px solid rgb(20 62 61 / 32%);
}
.deck-card--rear { background: #7caf9b; transform: translate(62px, 6px) rotate(21deg); }
.deck-card--middle { background: #badbc5; transform: translate(-43px, 10px) rotate(-17deg); }
.deck-card--front {
  background: #f8f4e6;
  padding: 10px;
  box-shadow: 2px 8px 18px rgb(7 34 32 / 32%);
  transform: rotate(4deg);
}
.deck-portrait {
  position: relative;
  height: 112px;
  overflow: hidden;
  border-radius: 5px;
  background: #c6dfca;
  display: grid;
  justify-items: center;
  align-items: end;
}
.deck-portrait::before {
  content: "";
  position: absolute;
  width: 75px;
  height: 92px;
  border: 1px solid #7aab94;
  border-bottom: 0;
  border-radius: 44px 44px 0 0;
  bottom: 0;
}
.deck-portrait span {
  display: block;
  position: relative;
  width: 54px;
  height: 38px;
  border-radius: 28px 28px 4px 4px;
  background: var(--peacock);
}
.deck-portrait span::before {
  content: "";
  position: absolute;
  width: 33px;
  height: 33px;
  left: 11px;
  bottom: 43px;
  border-radius: 50%;
  background: #376f62;
}
.deck-caption { display: grid; gap: 7px; margin-top: 12px; }
.deck-caption i { display: block; width: 58px; height: 4px; border-radius: 2px; background: #899f8a; }
.deck-caption i:last-child { width: 37px; opacity: .63; }
.art-spark {
  position: absolute;
  width: 23px;
  height: 23px;
  background: var(--gold);
  clip-path: polygon(50% 0, 59% 39%, 100% 50%, 59% 60%, 50% 100%, 41% 60%, 0 50%, 41% 39%);
}
.art-spark--upper { inset: 32px 36px auto auto; }
.art-spark--lower { inset: auto auto 39px 35px; width: 12px; height: 12px; }

.directory-section { margin-top: clamp(1.55rem, 3.6vw, 2.8rem); }
.section-heading, .people-title, .directory-tools { display: flex; align-items: center; }
.section-heading { justify-content: space-between; gap: .75rem; margin-bottom: .87rem; }
.people-title { gap: .7rem; flex-wrap: wrap; }
.people-title h2 {
  color: var(--ink);
  font: 400 clamp(2rem, 3.4vw, 2.8rem)/1.04 var(--serif);
  letter-spacing: -.055em;
}
.people-count {
  color: var(--muted);
  font-size: .83rem;
  font-weight: 600;
}
.directory-tools { gap: .62rem; margin-bottom: 1.2rem; }
.search-field { display: flex; position: relative; align-items: center; flex: 1; }
.search-field > .icon { position: absolute; left: .85rem; color: var(--peacock-dark); pointer-events: none; }
.search-field input {
  width: 100%;
  min-height: 46px;
  padding: .6rem .8rem .6rem 2.6rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-dark);
  background: var(--white);
  font-size: .925rem;
}
.search-field input::placeholder { color: var(--muted); opacity: 1; }
.search-field input:disabled { background: #f1f4ef; }
.view-controls {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.view-controls .icon-button { width: 39px; height: 38px; border-radius: 5px; }
.view-controls .icon-button[aria-pressed="true"] { color: var(--ink); background: var(--mint); }

.people-results { padding: 0; margin: 0; list-style: none; }
.people-results--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 186px), 1fr));
  gap: clamp(1.2rem, 2.55vw, 2rem) clamp(.8rem, 1.6vw, 1.3rem);
}
.person-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  height: 100%;
  background: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
}
.portrait {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  background: #e4eae2;
  color: var(--ink);
  border-radius: 8px;
}
.portrait--directory, .portrait--practice { aspect-ratio: 1; }
.portrait--directory { border: 1px solid rgb(20 62 61 / 8%); }
.portrait--directory img, .portrait--practice img { position: absolute; inset: 0; }
.portrait img { width: 100%; height: 100%; object-fit: contain; }
.portrait--missing {
  background: #e2ede5;
  font: 400 2.4rem/1 var(--serif);
  min-height: 0;
}
.people-results--grid li:nth-child(3n + 2) .portrait--missing { background: #dbe9e3; }
.people-results--grid li:nth-child(3n + 3) .portrait--missing { background: #ebece0; }
.person-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  width: 100%;
  min-height: 46px;
  padding: .55rem .15rem .3rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.person-name { font: 700 clamp(.98rem, 1.4vw, 1.15rem)/1.23 var(--serif); overflow-wrap: anywhere; }
.person-caption .icon { color: var(--muted); width: 16px; height: 16px; }
.person-card:hover .person-caption { color: var(--peacock-dark); border-color: #86aa99; }
.person-card:hover .person-caption .icon { color: var(--peacock-dark); }

.people-results--list { border-top: 1px solid var(--line); }
.people-results--list li { border-bottom: 1px solid var(--line); }
.people-results--list .person-card { flex-direction: row; align-items: center; gap: 1rem; min-height: 70px; padding: .5rem .75rem .5rem .4rem; }
.people-results--list .person-card:hover { background: var(--mint); }
.people-results--list .portrait { flex: 0 0 58px; width: 58px; aspect-ratio: 1; font-size: 1.35rem; border-radius: 5px; }
.people-results--list .person-caption { border-bottom: 0; padding: 0; }
.people-results--list .person-name { font: 650 .98rem/1.3 var(--sans); }

.loading-message { color: var(--muted); text-align: center; padding: 2.5rem 1rem; }
.initial-loading { display: grid; place-items: center; min-height: 100dvh; color: var(--muted); }
.empty-state {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: .55rem;
  padding: clamp(1.7rem, 4.3vw, 3.6rem) 1rem;
  min-height: 210px;
  color: var(--ink);
  border: 1px dashed #b8cbc0;
  border-radius: 12px;
}
.empty-state h3 { font: 400 clamp(1.56rem, 3vw, 2rem)/1.15 var(--serif); letter-spacing: -.038em; }
.empty-state p { font-size: .93rem; color: var(--muted); max-width: 42ch; }
.empty-state .button { margin-top: .4rem; }
.empty-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; background: var(--mint); font-size: 1.15rem; }
.boot-message { width: min(100% - 2rem, 470px); margin: 12vh auto 2rem; }
.boot-message > .brand { margin-bottom: .75rem; }
.boot-message h1 { font: 400 2.15rem/1.1 var(--serif); }


.page-intro { margin-bottom: clamp(1.2rem, 3.5vw, 2.2rem); color: var(--ink); }
.page-intro h1 { font-size: clamp(2.65rem, 5.1vw, 4.55rem); }
.page-intro p { color: var(--muted); margin-top: .58rem; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .8rem;
  min-height: 30px;
  color: var(--muted);
  font-size: .87rem;
  font-weight: 600;
}
.back-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }
.practice-page, .staff-page { padding-block: 1.6rem 3rem; }
.practice-page { width: min(100% - 2.2rem, 700px); }
.practice-page .page-intro { text-align: center; margin-bottom: 1.25rem; }
.practice-session { width: min(100%, 396px); margin: auto; }
.practice-session-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: .8rem;
}
.practice-counter { color: var(--muted); font-size: .81rem; font-weight: 650; }
.practice-session progress {
  display: block;
  width: 100%;
  height: 6px;
  appearance: none;
  border: 0;
  border-radius: 5px;
  background: #dce8e0;
  accent-color: var(--peacock);
}
.practice-session progress::-webkit-progress-bar { background: #dce8e0; border-radius: 5px; }
.practice-session progress::-webkit-progress-value { background: var(--peacock); border-radius: 5px; }
.practice-session progress::-moz-progress-bar { background: var(--peacock); border-radius: 5px; }
.practice-deck { position: relative; isolation: isolate; padding: .32rem .55rem .75rem; }
.practice-deck::before, .practice-deck::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: .75rem .6rem .75rem;
  border: 1px solid #cbded2;
  border-radius: 13px;
  background: #d0e3d6;
}
.practice-deck::before { transform: rotate(-3deg); }
.practice-deck::after { transform: rotate(2.5deg); background: #e8efe3; }
.practice-card {
  position: relative;
  border: 1px solid #d5e1d8;
  border-radius: 13px;
  padding: .7rem;
  background: var(--white);
  box-shadow: 0 7px 16px rgb(26 57 48 / 10%);
  transition: transform .18s ease, opacity .18s ease;
}
.practice-card--revealed { touch-action: pan-y pinch-zoom; user-select: none; cursor: grab; }
.practice-card.is-dragging { transition: none; cursor: grabbing; }
.practice-card.slide-left { transform: translateX(-26%) rotate(-9deg); opacity: 0; }
.practice-card.slide-right { transform: translateX(26%) rotate(9deg); opacity: 0; }
.practice-photo-frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #e4eae2;
}
.practice-photo-frame:focus-visible { outline-offset: -4px; outline-color: var(--ink); }
.portrait--practice img { pointer-events: none; }
.practice-caption {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: .6rem .25rem .1rem;
  text-align: center;
  color: var(--ink);
  font: 400 1.58rem/1.15 var(--serif);
  letter-spacing: -.035em;
}
.practice-caption h2 { font: inherit; font-size: 1.85rem; overflow-wrap: anywhere; animation: reveal-name .18s ease-out; }
@keyframes reveal-name { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.practice-options { min-height: 36px; display: grid; place-items: center; margin: .1rem 0 .3rem; }
.practice-options:has(.original-toggle[hidden]) { min-height: .62rem; }
.original-toggle { gap: .4rem; }
.practice-actions, .practice-finish-actions { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.practice-actions .button { min-width: 133px; }
.practice-help { text-align: center; font-size: .8rem; color: var(--muted); margin: .75rem .2rem 0; }
.practice-error { margin: 0 0 .6rem; }

.staff-intro-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}
.staff-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.staff-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(70px, .36fr) minmax(92px, .37fr) auto;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: .8rem .25rem;
}
.staff-row > .account-initials { width: 42px; height: 42px; }
.staff-person { min-width: 0; overflow-wrap: anywhere; }
.staff-person h2 { color: var(--ink); font: 650 1rem/1.32 var(--sans); }
.staff-person > span { font-size: .84rem; color: var(--muted); }
.you-label { color: var(--muted); font-size: .76rem; font-weight: 400; }
.staff-role { font-size: .88rem; text-transform: capitalize; color: var(--ink); }
.staff-status { display: flex; align-items: center; gap: .38rem; color: var(--muted); font-size: .81rem; }
.staff-status i { width: 8px; height: 8px; border-radius: 50%; background: #93999a; }
.staff-status .status-dot--active { background: #3d846b; }

.signin {
  display: grid;
  grid-template-columns: 1fr .98fr;
  align-items: stretch;
  min-height: 465px;
  width: min(100% - 2rem, 820px);
  margin: clamp(2rem, 12vh, 8rem) auto 2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 10px 40px rgb(19 62 61 / 6%);
  background: var(--white);
}
.signin-pane { padding: clamp(1.6rem, 4.3vw, 3rem); }
.signin-title { margin: 2rem 0 1.3rem; }
.signin h1 { color: var(--ink); font-size: clamp(2.55rem, 4.3vw, 3.7rem); }
.signin-title p { margin-top: .55rem; color: var(--muted); font-size: .94rem; }
.signin-art { position: relative; overflow: hidden; background-color: var(--ink); }
.signin-art .deck-art { top: 50%; left: 50%; translate: -50% -50%; scale: 1.04; }
.signin-submit { width: 100%; margin-top: .25rem; }
.signin-submit .icon { margin-left: .2rem; }
.account-switch { display: flex; min-height: 44px; width: fit-content; margin: .5rem auto -.55rem; }

.dialog {
  width: min(100% - 1.8rem, 630px);
  max-height: min(92dvh, 860px);
  padding: clamp(1rem, 3vw, 1.8rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-dark);
  background: var(--white);
  box-shadow: 0 14px 65px rgb(10 34 32 / 26%);
}
.dialog::backdrop { background: rgb(13 37 33 / 50%); }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: .8rem; margin-bottom: 1.1rem; }
.dialog-heading h2 { padding-top: .25rem; color: var(--ink); font: 400 clamp(1.68rem, 4vw, 2.38rem)/1.03 var(--serif); letter-spacing: -.045em; overflow-wrap: anywhere; }
.dialog-close { width: 38px; height: 38px; flex: 0 0 38px; }
.dialog-description, .detail-no-photo { color: var(--muted); }
.detail-photos { display: grid; gap: .65rem; }
.detail-photo { min-width: 0; }
.original-link { margin: .12rem 0 .25rem; }
.detail-photos--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.portrait--detail { min-width: 0; min-height: 120px; max-height: 420px; }
.portrait--detail img { height: auto; max-height: min(55vh, 420px); object-fit: contain; }
.detail-photos--pair .portrait--detail img { max-height: min(45vh, 330px); }
.detail-notes { margin-top: 1.15rem; }
.detail-notes h3 { color: var(--ink); margin-bottom: .28rem; font: 650 .88rem/1.3 var(--sans); }
.detail-notes p { white-space: pre-wrap; overflow-wrap: anywhere; }
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.28rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.dialog-actions-end { display: flex; gap: .45rem; margin-left: auto; }
.dialog-actions:has(.button--danger-quiet) { justify-content: space-between; }

.field { display: block; margin-bottom: .85rem; color: var(--ink); font-size: .875rem; font-weight: 650; }
.field-optional { color: var(--muted); font-size: .78rem; font-weight: 400; margin-left: .25rem; }
.field input, .field select, .field textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: .34rem;
  padding: .54rem .68rem;
  border: 1px solid #bfcfc5;
  border-radius: 6px;
  color: var(--ink-dark);
  background: var(--white);
  font-size: 1rem;
  font-weight: 400;
}
.field textarea { resize: vertical; }
.field-help, .role-help {
  margin: -.4rem 0 .8rem;
  font-size: .79rem;
  line-height: 1.4;
  color: var(--muted);
}
.checkbox-field { display: flex; align-items: center; gap: .45rem; width: fit-content; min-height: 40px; font-size: .87rem; font-weight: 600; color: var(--ink); }
.checkbox-field input { width: 17px; height: 17px; accent-color: var(--peacock-dark); }
.form-error {
  padding: .6rem .65rem;
  margin-bottom: .8rem;
  border: 1px solid #efcccd;
  border-radius: 6px;
  color: #81252d;
  background: #fdf0f0;
  font-size: .84rem;
}
.photo-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.photo-input { min-width: 0; margin: 0; padding: .47rem .6rem .5rem; border: 1px solid var(--line); border-radius: 7px; }
.photo-input legend { padding-inline: .24rem; color: var(--ink); font-size: .82rem; font-weight: 650; }
.upload-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  color: #5b786c;
  background: #e9f0e9;
  overflow: hidden;
}
.upload-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.upload-preview--cropped img { max-width: none; object-fit: fill; }
.photo-draft-status { color: var(--muted); font-size: .76rem; padding-block: .15rem .35rem; }
.upload-preview .icon { font-size: 1.25rem; }
.photo-field-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .5rem; margin-top: .2rem; }
.upload-choice, .text-button {
  display: inline-flex;
  align-items: center;
  position: relative;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  color: var(--peacock-dark);
  font-size: .81rem;
  font-weight: 650;
  cursor: pointer;
}
.upload-choice:hover, .text-button:hover { text-decoration: underline; text-underline-offset: .18em; }
.upload-choice:focus-within { outline: 3px solid #137d72; outline-offset: 2px; }
.upload-choice input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }

.toast {
  position: fixed;
  z-index: 5;
  inset: auto 1rem 1rem auto;
  padding: .7rem 1rem;
  max-width: calc(100vw - 2rem);
  border-radius: 6px;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 5px 18px rgb(20 62 61 / 20%);
  font-size: .86rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity .16s ease, transform .16s ease;
}
.toast.is-visible { opacity: 1; transform: none; }
.toast:empty { visibility: hidden; }

@media (max-width: 920px) {
  .deck-art { right: .7rem; scale: .86; transform-origin: right center; }
  .signin-art .deck-art { scale: .92; transform-origin: center; }
}
@media (max-width: 750px) {
  .header-inner { grid-template-columns: 1fr auto; gap: .4rem .8rem; padding-top: .58rem; }
  .nav { grid-area: 2 / 1 / 3 / 3; gap: .25rem; margin-bottom: .48rem; }
  .nav-link { min-height: 38px; }
  .directory-hero > .deck-art { right: -.4rem; scale: .67; opacity: .85; }
  .directory-hero { min-height: 210px; }
  .hero-content { max-width: 72%; }
  .people-results--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr)); }
}
@media (max-width: 540px) {
  .brand-mark { width: 33px; height: 33px; border-radius: 8px; }
  .brand-mark .icon { width: 20px; height: 20px; }
  .brand-name { font-size: 1.32rem; }
  .account { gap: .25rem; }
  .account > .account-initials { display: none; }
  .directory-hero { display: block; min-height: 188px; border-radius: 12px; padding: 1.3rem 1.05rem; }
  .hero-content { max-width: none; }
  .hero-content h1 { font-size: clamp(2.3rem, 9.5vw, 3.35rem); white-space: nowrap; }
  .hero-content p { max-width: 24ch; margin: .65rem 0 1rem; }
  .directory-hero > .deck-art { top: auto; bottom: -3.4rem; right: -2.5rem; translate: none; scale: .42; opacity: .65; }
  .people-results--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directory-tools { margin-bottom: .8rem; }
  .view-controls .icon-button { width: 35px; }
  .staff-intro-line { flex-wrap: wrap; }
  .staff-row { grid-template-columns: 36px minmax(0, 1fr) auto; gap: .15rem .55rem; }
  .staff-row > .account-initials { width: 34px; height: 34px; grid-row: 1; }
  .staff-row .button { grid-area: 1 / 3; align-self: start; }
  .staff-role { grid-area: 2 / 2; font-size: .82rem; }
  .staff-status { grid-area: 2 / 3; justify-content: end; padding-right: .2rem; }
  .signin { grid-template-columns: 1fr; min-height: auto; max-width: 420px; margin-top: clamp(1.2rem, 6vh, 3rem); }
  .signin-art { display: none; }
  .signin-pane { padding: 1.6rem 1.25rem 1.85rem; }
  .detail-photos--pair { grid-template-columns: minmax(0, 1fr); }
  .detail-photos--pair .portrait--detail img { max-height: 310px; }
  .practice-session { width: min(100%, 365px); }
  .practice-page { padding-top: .75rem; }
  .practice-page .page-intro { margin-bottom: .9rem; }
  .practice-page .page-intro p { font-size: .87rem; }
  .practice-caption { min-height: 53px; }
}
@media (max-width: 355px) {
  .hero-content h1 { font-size: 2rem; }
  .nav-link { gap: .33rem; padding-inline: .48rem; font-size: .81rem; }
  .search-field input { padding-left: 2rem; font-size: .8rem; }
  .search-field > .icon { left: .6rem; }
  .view-controls .icon-button { width: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.practice-totals {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin-top: .8rem;
  color: var(--muted);
  font-size: .8rem;
}
.practice-totals strong { color: var(--ink); font-weight: 650; }
.detail-status {
  display: flex;
  align-items: center;
  gap: .52rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: .81rem;
}
.status-tag {
  padding: .15rem .48rem;
  background: #edf0ed;
  border-radius: 4px;
  color: var(--ink);
  font-weight: 650;
}
.status-tag--known { background: var(--mint); }
.status-tag--learning { background: #f7edd1; color: #62451b; }

.draft-recovery {
  margin-bottom: 1rem;
  padding: .7rem;
  border: 1px solid #e6d4aa;
  border-radius: 6px;
  color: #59451f;
  background: #fcf5e4;
  font-size: .85rem;
}
.draft-recovery .button, .draft-actions { margin-top: .52rem; }
.draft-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.draft-actions .button { margin-top: 0; }


.photo-crop-dialog { width: min(100% - 1.5rem, 510px); }
.photo-crop-dialog .dialog-heading { margin-bottom: .5rem; }
.crop-instructions { color: var(--muted); font-size: .89rem; margin-bottom: .85rem; }
.crop-loading { padding-block: 2rem; text-align: center; color: var(--muted); }
.crop-frame {
  position: relative;
  width: min(100%, clamp(208px, 100dvh - 315px, 348px));
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  background: var(--mint);
  border-radius: 7px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.crop-frame.is-dragging { cursor: grabbing; }
.crop-image {
  position: absolute;
  display: block;
  max-width: none;
  object-fit: fill;
  pointer-events: none;
}
.crop-grid {
  position: absolute;
  inset: 0;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: inherit;
  background:
    linear-gradient(to right, transparent 33.1%, rgb(255 255 255 / 54%) 33.1% 33.45%, transparent 33.45% 66.45%, rgb(255 255 255 / 54%) 66.45% 66.8%, transparent 66.8%),
    linear-gradient(to bottom, transparent 33.1%, rgb(255 255 255 / 54%) 33.1% 33.45%, transparent 33.45% 66.45%, rgb(255 255 255 / 54%) 66.45% 66.8%, transparent 66.8%);
  pointer-events: none;
}
.crop-zoom {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 3.1rem;
  align-items: center;
  gap: .65rem;
  margin-top: .8rem;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 650;
}
.crop-zoom input { width: 100%; min-height: 42px; margin: 0; accent-color: var(--peacock-dark); cursor: pointer; }
.crop-zoom output { text-align: right; font-variant-numeric: tabular-nums; }
.crop-tools { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.crop-tools .text-button { min-height: 42px; }
.photo-crop-dialog .dialog-actions { margin-top: .55rem; }
