/* ============================================================
   Dr. Anjali C — Portfolio
   Palette: clinical teal + warm coral accent, warm-white ground.
   Type: Fraunces (display) / Work Sans (body) / IBM Plex Mono (data)
   ============================================================ */

:root {
  --bg: #f3f7f6;
  --surface: #ffffff;
  --surface-sunken: #eaf1ef;
  --ink: #12302a;
  --ink-soft: #4c6b64;
  --ink-faint: #7c968f;
  --line: #d9e6e2;
  --primary: #0e5c56;
  --primary-strong: #0a413d;
  --primary-soft: #dff0ec;
  --accent: #e2664f;
  --accent-strong: #c94f3a;
  --accent-soft: #fbe6e1;
  --gold: #d1a13a;
  --shadow: 0 20px 45px -25px rgba(14, 46, 41, 0.35);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --maxw: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1f1c;
    --surface: #102b26;
    --surface-sunken: #0e2521;
    --ink: #eaf4f1;
    --ink-soft: #a9c4bd;
    --ink-faint: #7c968f;
    --line: #1c3b34;
    --primary: #57d6c4;
    --primary-strong: #8be9db;
    --primary-soft: #143733;
    --accent: #f0917f;
    --accent-strong: #f6ad9f;
    --accent-soft: #2c1a17;
    --gold: #e2bd6b;
    --shadow: 0 25px 55px -25px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  --bg: #0b1f1c;
  --surface: #102b26;
  --surface-sunken: #0e2521;
  --ink: #eaf4f1;
  --ink-soft: #a9c4bd;
  --ink-faint: #7c968f;
  --line: #1c3b34;
  --primary: #57d6c4;
  --primary-strong: #8be9db;
  --primary-soft: #143733;
  --accent: #f0917f;
  --accent-strong: #f6ad9f;
  --accent-soft: #2c1a17;
  --gold: #e2bd6b;
  --shadow: 0 25px 55px -25px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.4em;
  text-wrap: balance;
}

p { margin: 0 0 1em; color: var(--ink-soft); }

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 24px;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: var(--accent);
  display: inline-block;
}

section { padding-block: 88px; }
section + section { border-top: 1px solid var(--line); }

/* ---------- Icons ---------- */
.icon {
  display: inline-flex;
  flex: none;
  width: 1em;
  height: 1em;
  color: currentColor;
}
.icon svg { width: 100%; height: 100%; display: block; }

/* ---------- Motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: inherit;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 0 0 0 transparent; }
.btn-primary:hover { background: var(--primary-strong); transform: translateY(-2px); box-shadow: 0 12px 24px -14px var(--primary); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: 0 12px 24px -14px var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn:active { transform: translateY(0); }
.btn .btn-arrow { width: 14px; height: 14px; transition: transform 0.25s ease; }
.btn:hover .btn-arrow { transform: translate(3px, -3px); }

/* ---------- Header / Nav ---------- */
header.site {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
header.site.scrolled { box-shadow: 0 8px 24px -20px rgba(14, 46, 41, 0.4); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
  transition: padding-block 0.3s ease;
}
header.site.scrolled .nav { padding-block: 12px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "Fraunces", serif;
  font-size: 0.95rem;
}
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative;
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 500;
  padding-block: 2px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  position: relative;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle .bar {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.6px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}
.nav-toggle .bar:nth-child(1) { top: calc(50% - 6px); }
.nav-toggle .bar:nth-child(2) { top: 50%; }
.nav-toggle .bar:nth-child(3) { top: calc(50% + 6px); }
.nav-toggle.open .bar:nth-child(1) { top: 50%; transform: translateX(-50%) rotate(45deg); }
.nav-toggle.open .bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .bar:nth-child(3) { top: 50%; transform: translateX(-50%) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    padding: 0 24px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
  }
  .nav-toggle { display: block; }
  .nav-links.open {
    max-height: 420px;
    opacity: 1;
    padding: 20px 24px;
    pointer-events: auto;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: 76px 120px;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 48px;
  align-items: center;
  padding-top: 28px;
  --mx: 0;
  --my: 0;
}
@media (max-width: 900px) {
  .hero-stage { grid-template-columns: 1fr; gap: 60px; padding-top: 8px; }
  .hero-portrait-col { order: -1; }
}

.hero-bgshape {
  position: absolute;
  z-index: 0;
  top: -32px;
  left: -64px;
  width: 58%;
  height: 112%;
  background: linear-gradient(160deg, var(--primary-soft), var(--surface-sunken));
  border-radius: 40px;
  transform: rotate(-4deg) translate(calc(var(--mx) * 6px), calc(var(--my) * 6px));
  transition: transform 0.4s ease-out;
  animation: heroShapeIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (max-width: 900px) {
  .hero-bgshape { left: -16px; right: -16px; width: auto; transform: rotate(-2deg); height: 106%; top: -16px; }
}

.hero-portrait-col {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding-block: 20px;
}

.hero-ghost-text {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% + var(--mx) * 10px), calc(-50% + var(--my) * 10px));
  transition: transform 0.4s ease-out;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: clamp(3.4rem, 10vw, 7rem);
  color: color-mix(in srgb, var(--primary) 15%, transparent);
  letter-spacing: -0.02em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  animation: heroFade 1s 0.1s both;
}

.hero-portrait-frame {
  position: relative;
  z-index: 1;
  width: min(340px, 78vw);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(155deg, var(--primary-soft), var(--surface-sunken));
  transform: translate(calc(var(--mx) * -6px), calc(var(--my) * -6px));
  transition: transform 0.4s ease-out;
  animation: heroScaleIn 0.8s 0.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  flex-direction: column;
  text-align: center;
  gap: 8px;
}
.portrait-fallback .initials {
  font-family: "Fraunces", serif;
  font-size: 3.4rem;
  color: var(--primary);
}
.portrait-fallback small {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  max-width: 20ch;
}

.hero-float-badge {
  position: absolute;
  z-index: 2;
  left: -6%;
  bottom: 8%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: heroPop 0.6s 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.hero-float-badge strong {
  font-family: "Fraunces", serif;
  color: var(--primary);
  font-size: 1.3rem;
}
.hero-float-badge span {
  font-size: 0.72rem;
  color: var(--ink-faint);
  max-width: 14ch;
  line-height: 1.25;
}
@media (max-width: 900px) { .hero-float-badge { left: 10px; bottom: 10px; } }

.hero-content { position: relative; z-index: 2; }
.hero-hey {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-bottom: 8px;
  animation: heroUp 0.7s both;
}

.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); animation: heroUp 0.7s 0.08s both; }
.hero .role {
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
  animation: heroUp 0.7s 0.16s both;
}
.hero .tagline { font-size: 1.08rem; max-width: 46ch; animation: heroUp 0.7s 0.22s both; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 26px 0 32px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  animation: heroUp 0.7s 0.28s both;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .icon { color: var(--primary); width: 15px; height: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; animation: heroUp 0.7s 0.34s both; }

@keyframes heroUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes heroFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes heroScaleIn {
  from { opacity: 0; transform: scale(0.94) translate(calc(var(--mx) * -6px), calc(var(--my) * -6px)); }
  to { opacity: 1; transform: scale(1) translate(calc(var(--mx) * -6px), calc(var(--my) * -6px)); }
}
@keyframes heroShapeIn {
  from { opacity: 0; transform: rotate(-4deg) scale(0.96) translate(calc(var(--mx) * 6px), calc(var(--my) * 6px)); }
  to { opacity: 1; transform: rotate(-4deg) scale(1) translate(calc(var(--mx) * 6px), calc(var(--my) * 6px)); }
}
@keyframes heroPop {
  from { opacity: 0; transform: scale(0.7) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------- Stat strip ---------- */
.stats {
  padding-block: 40px;
  background: var(--primary);
  color: #fff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat .value {
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-variant-numeric: tabular-nums;
}
.stat .label {
  font-size: 0.82rem;
  color: color-mix(in srgb, #fff 78%, transparent);
  max-width: 22ch;
}

/* ---------- About / Competencies ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid p { font-size: 1.02rem; }

.competency-list { display: flex; flex-direction: column; gap: 22px; }
.competency-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.competency-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.competency-card h3 { font-size: 1rem; font-family: "Work Sans", sans-serif; font-weight: 700; margin-bottom: 12px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 0.8rem;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 500;
}

/* ---------- Experience timeline ---------- */
.timeline { position: relative; margin-top: 8px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 130px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
@media (max-width: 720px) { .timeline::before { left: 14px; } }

.timeline-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 28px;
  position: relative;
  padding-bottom: 44px;
}
.timeline-item:last-child { padding-bottom: 0; }
@media (max-width: 720px) {
  .timeline-item { grid-template-columns: 1fr; padding-left: 34px; }
  .timeline-item .dates { padding-left: 0; }
}

.timeline-item .dates {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--ink-faint);
  padding-top: 4px;
}
.timeline-dot {
  position: absolute;
  left: 125px;
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  transform: scale(0);
}
.timeline-item.in-view .timeline-dot {
  animation: dotPop 0.5s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes dotPop {
  to { transform: scale(1); }
}
@media (max-width: 720px) { .timeline-dot { left: 9px; } }

.timeline-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-item:hover .timeline-body {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}
.timeline-body h3 { font-size: 1.08rem; margin-bottom: 2px; }
.timeline-body .org {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.92rem;
  margin-bottom: 2px;
}
.timeline-body .loc {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-bottom: 14px;
  display: block;
}
.timeline-body ul { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 0.94rem; }
.timeline-body li { margin-bottom: 6px; }
.timeline-body li:last-child { margin-bottom: 0; }

/* ---------- Achievements ---------- */
.achv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 700px) { .achv-grid { grid-template-columns: 1fr; } }
.achv-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  gap: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.achv-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.achv-card .mark {
  color: var(--accent);
  width: 22px;
  height: 22px;
  flex: none;
  transition: transform 0.4s ease;
}
.achv-card:hover .mark { transform: rotate(15deg) scale(1.1); }
.achv-card p { margin: 0; color: var(--ink); font-size: 0.95rem; }

/* ---------- Education / licensing / CME ---------- */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 820px) { .cred-grid { grid-template-columns: 1fr; } }
.cred-col h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: 16px;
}
.cred-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.cred-col li {
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  font-size: 0.92rem;
}
.cred-col li .t { font-weight: 600; display: block; }
.cred-col li .o { color: var(--ink-faint); font-size: 0.85rem; }
.lang-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* ---------- Testimonials ---------- */
.testi-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}
@media (max-width: 960px) { .testi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .testi-grid { grid-template-columns: 1fr; } }

.testi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.testi-stars { display: flex; gap: 3px; }
.testi-stars .icon { width: 14px; height: 14px; }
.testi-stars .star-filled { color: var(--gold); }
.testi-stars .star-empty { color: var(--line); }
.testi-text { font-size: 0.94rem; color: var(--ink); margin: 0; }
.testi-who { font-size: 0.82rem; color: var(--ink-faint); margin-top: auto; }
.testi-who b { color: var(--ink-soft); }

.testi-empty, .testi-loading {
  color: var(--ink-faint);
  font-size: 0.9rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  grid-column: 1 / -1;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 34px;
}
.contact-card h3 { color: #fff; }
.contact-card p { color: color-mix(in srgb, #fff 85%, transparent); }
.contact-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.contact-list li { display: flex; align-items: center; gap: 10px; }
.contact-list .icon { width: 17px; height: 17px; opacity: 0.85; flex: none; }
.contact-list a { text-decoration: none; font-weight: 600; transition: opacity 0.2s ease; }
.contact-list a:hover { text-decoration: underline; opacity: 0.85; }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  padding-block: 28px;
  font-size: 0.82rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 22, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 440px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal h3 { margin-bottom: 6px; }
.modal .sub { font-size: 0.85rem; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.82rem; font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 90px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.modal-status { font-size: 0.85rem; margin-top: 12px; min-height: 1.2em; }
.modal-status.error { color: var(--accent-strong); }
.modal-status.success { color: var(--primary); }
.modal-close {
  float: right;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-faint);
  padding: 4px;
}
.modal-close .icon { width: 16px; height: 16px; display: block; transition: transform 0.3s ease; }
.modal-close:hover .icon { transform: rotate(90deg); color: var(--accent); }

/* ---------- Star picker ---------- */
.star-picker {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}
.star-btn {
  background: none;
  border: none;
  padding: 3px;
  cursor: pointer;
  color: var(--line);
  border-radius: 6px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.star-btn .icon { width: 28px; height: 28px; }
.star-btn.selected,
.star-btn.selected ~ .star-btn {
  color: var(--gold);
}
.star-btn:hover,
.star-btn:hover ~ .star-btn {
  color: var(--gold);
  transform: scale(1.14);
}
.star-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
