/* Coffee with Composers — The Midwest Clinic brand (blue #2356A7, purple #A34F9E). */

:root {
  --mw-blue: #2356a7;
  --mw-blue-deep: #14356e;
  --mw-purple: #a34f9e;
  --mw-purple-deep: #5f2d5c;
  --ink: #1b2235;
  --body: #39415a;
  --muted: #68708a;
  --rule: #e3e7f1;
  --page: #f4f6fb;
  --card: #ffffff;
  --heart: #e0245e;
  --bar: #0e0f12; /* footer */
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--body);
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* On html only: on body it would make body the scroll container and break position: sticky. */
html { overflow-x: hidden; }

a { color: var(--mw-blue); }

.cwc-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
/* Wide screens: the photo fills the hero and the logo + details sit side by side in a low band
   along the bottom, under everyone's faces. Narrower: photo on top, text below it on the blue. */
.cwc-hero {
  position: relative;
  min-height: clamp(320px, 40vw, 600px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: var(--mw-blue-deep);
}
.cwc-hero picture { display: block; }
.cwc-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}
.cwc-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 53, 110, 0) 45%, rgba(20, 53, 110, 0.6) 72%, rgba(20, 53, 110, 0.94) 100%),
    linear-gradient(90deg, rgba(95, 45, 92, 0.35) 0%, rgba(95, 45, 92, 0) 50%);
}
.cwc-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px clamp(24px, 3vw, 40px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 48px;
}
.cwc-hero__logo { margin: 0; line-height: 0; flex: 0 1 440px; }
.cwc-hero__logo img { width: 100%; max-width: 440px; height: auto; }

.cwc-hero__details {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: none;
}
.cwc-hero__details li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 0 1px 8px rgba(10, 20, 45, 0.45);
}
.cwc-hero__details svg { flex: none; width: 18px; height: 18px; }
.cwc-nowrap { white-space: nowrap; }

/* Edit page: a short banner, so the logo sits centered over the out-of-focus people. */
.cwc-hero--slim { min-height: 220px; }
.cwc-hero--slim .cwc-hero__photo { object-position: center 35%; }
.cwc-hero--slim .cwc-hero__inner { justify-content: center; }
.cwc-hero--slim .cwc-hero__logo { width: min(440px, 100%); }

@media (max-width: 1023px) {
  .cwc-hero { display: block; min-height: 0; }
  .cwc-hero__photo { position: relative; inset: auto; height: clamp(230px, 50vw, 400px); object-position: center 30%; }
  .cwc-hero::after {
    bottom: auto;
    height: clamp(230px, 50vw, 400px);
    background:
      linear-gradient(180deg, rgba(20, 53, 110, 0) 55%, var(--mw-blue-deep) 100%),
      linear-gradient(90deg, rgba(95, 45, 92, 0.3) 0%, rgba(95, 45, 92, 0) 50%);
  }
  .cwc-hero__inner { flex-direction: column; align-items: flex-start; margin-top: -36px; padding-bottom: 28px; gap: 16px; }
  .cwc-hero__logo { flex: none; width: min(420px, 100%); }
}
@media (max-width: 520px) {
  .cwc-hero__inner { padding: 0 16px 24px; }
  .cwc-hero__details li { font-size: 15px; align-items: flex-start; }
  .cwc-hero__details svg { margin-top: 1px; }
}

/* ── Buttons & inputs ─────────────────────────────────────────────────── */
.cwc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 700 14px/1 "Montserrat", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cwc-btn--purple { background: var(--mw-purple); color: #fff; }
.cwc-btn--purple:hover { background: var(--mw-purple-deep); }
.cwc-btn--blue { background: var(--mw-blue); color: #fff; }
.cwc-btn--blue:hover { background: var(--mw-blue-deep); }
.cwc-btn--ghost { border-color: var(--mw-blue); color: var(--mw-blue); background: transparent; }
.cwc-btn--ghost:hover { background: var(--mw-blue); color: #fff; }
.cwc-btn:disabled { opacity: 0.55; cursor: default; }
.cwc-btn:focus-visible, .cwc-input:focus-visible { outline: 3px solid rgba(163, 79, 158, 0.45); outline-offset: 2px; }

input[type="search"], input[type="email"], input[type="url"], input[type="text"], textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 16px;
  border: 1px solid #ccd3e3;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 500 16px/1.4 "Montserrat", sans-serif;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--mw-purple); box-shadow: 0 0 0 3px rgba(163, 79, 158, 0.18); }

/* ── Main ─────────────────────────────────────────────────────────────── */
.cwc-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px 72px;
}

/* "Meet the Composers!" + search + heart: a bar that sticks to the top once you scroll past it.
   The bar's background runs edge to edge via ::before; the content stays in the page column. */
.cwc-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  margin-bottom: 28px;
}
.cwc-toolbar::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #fff;
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.2s ease;
}
.cwc-toolbar.is-stuck::before { box-shadow: 0 6px 18px rgba(20, 53, 110, 0.1); }
.cwc-toolbar .cwc-filter-heart__count { border-color: #fff; }
.cwc-section-title {
  margin: 0;
  color: var(--mw-blue-deep);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.cwc-total { margin: 6px 0 0; color: var(--muted); font-size: 15px; font-weight: 600; }
.cwc-total:empty { display: none; }
.cwc-filters { display: flex; gap: 10px; flex: 1 1 360px; max-width: 540px; }
.cwc-search { flex: 1; min-width: 0; }
.cwc-filter-heart {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #ccd3e3;
  border-radius: 10px;
  background: #fff;
  color: #9aa3ba;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.cwc-filter-heart:hover { color: var(--heart); border-color: #f2b6c8; }
.cwc-filter-heart:focus-visible { outline: 3px solid rgba(224, 36, 94, 0.3); outline-offset: 2px; }
.cwc-filter-heart svg { width: 22px; height: 22px; overflow: visible; }
.cwc-filter-heart path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; transition: fill 0.2s ease; }
.cwc-filter-heart[aria-pressed="true"] { color: #fff; background: var(--heart); border-color: var(--heart); }
.cwc-filter-heart[aria-pressed="true"] path { fill: currentColor; }
.cwc-filter-heart__count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--page);
  border-radius: 999px;
  background: var(--mw-blue-deep);
  color: #fff;
  font: 700 11px/16px "Montserrat", sans-serif;
  text-align: center;
}
.cwc-filter-heart__count:empty { display: none; }

.cwc-status {
  text-align: center;
  color: var(--muted);
  font-size: 17px;
  margin: 40px 0;
}
.cwc-status:empty { display: none; }

.cwc-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  /* Cards in a row share the tallest card's height. */
  align-items: stretch;
}

.cwc-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 24px 24px;
  box-shadow: 0 1px 2px rgba(20, 53, 110, 0.06), 0 6px 18px rgba(20, 53, 110, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cwc-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--mw-blue) 0%, var(--mw-purple) 100%);
}
.cwc-card[hidden] { display: none; }

.cwc-card__top { display: flex; flex-direction: column; align-items: center; text-align: center; }

.cwc-photo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--mw-blue), var(--mw-purple));
}
.cwc-photo__inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #e9edf6;
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mw-blue);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cwc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cwc-photo-link { display: block; border-radius: 50%; text-decoration: none; }
.cwc-photo-link .cwc-photo { transition: opacity 0.2s ease; }
.cwc-photo-link:hover .cwc-photo { opacity: 0.88; }

.cwc-name {
  margin: 16px 0 4px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

/* ── "Hear their name" (pronunciation from composernames.com) ─────────── */
.cwc-say-name {
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1.5px solid #d4c0da;
  border-radius: 50%;
  background: #fff;
  color: var(--mw-purple);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cwc-say-name svg { width: 16px; height: 16px; }
.cwc-say-name:hover, .cwc-say-name:focus-visible, .cwc-say-name.is-playing {
  background: var(--mw-purple);
  border-color: var(--mw-purple);
  color: #fff;
}
.cwc-say-name.is-playing svg { animation: cwc-say-pulse 1s ease-in-out infinite; }
/* Full cards: top-left corner, same size and spacing as the heart in the top-right. */
.cwc-say-name--corner {
  position: absolute;
  top: 16px;
  left: 14px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: #b9c0d2;
  -webkit-tap-highlight-color: transparent;
}
.cwc-say-name--corner svg { width: 26px; height: 26px; }
.cwc-say-name--corner:hover { background: #f3e9f2; border-color: transparent; color: var(--mw-purple); }
.cwc-say-name--corner:focus-visible { background: transparent; color: var(--mw-purple); outline: 2px solid var(--mw-purple); outline-offset: 2px; }
.cwc-say-name--corner.is-playing { background: var(--mw-purple); color: #fff; }
@keyframes cwc-say-pulse { 50% { transform: scale(0.82); } }
.cwc-site {
  font-size: 14px;
  font-weight: 600;
  color: var(--mw-purple);
  text-decoration: none;
  /* One line only: long addresses end in "…" (the full URL is in the tooltip). */
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cwc-site:hover { text-decoration: underline; }

.cwc-qa { margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--rule); text-align: left; }
.cwc-qa dt {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mw-blue);
  line-height: 1.45;
}
.cwc-qa dd { margin: 5px 0 16px; font-size: 16px; line-height: 1.5; color: var(--body); white-space: pre-line; }
.cwc-qa dd:last-child { margin-bottom: 0; }
.cwc-soon { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--muted); font-style: italic; }

/* ── Compact roster: composers who haven't filled in their card yet ───── */
.cwc-roster { margin-top: 56px; }
.cwc-roster__title {
  margin: 0 0 24px;
  color: var(--mw-blue-deep);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}
.cwc-roster__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 28px 14px;
}
.cwc-tile { text-align: center; }
.cwc-tile__photo { position: relative; width: 84px; margin: 0 auto; }
.cwc-tile .cwc-photo { width: 84px; height: 84px; padding: 3px; }
.cwc-tile .cwc-photo__inner { font-size: 22px; border-width: 2px; }
.cwc-tile__name {
  display: block;
  margin: 10px 0 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.cwc-tile__name--link { text-decoration: none; }
.cwc-tile__name--link:hover, .cwc-tile__name--link:focus-visible { color: var(--mw-purple); text-decoration: underline; }

/* Email button: pinned to the bottom so it lines up across a row. The address is fetched on click. */
.cwc-card__foot { margin-top: auto; padding-top: 18px; text-align: center; }
.cwc-email {
  /* Both labels share one grid cell, so the button is always as wide as the longer one. */
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 2px solid var(--mw-purple);
  border-radius: 999px;
  background: transparent;
  color: var(--mw-purple);
  font: 700 13px/1 "Montserrat", sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  /* Quick fill: a slow cross-fade washes the label out mid-way (white on pale purple). */
  transition: background-color 0.14s ease-out, color 0.14s ease-out;
  -webkit-tap-highlight-color: transparent;
}
/* Only real pointers get the hover fill, so a tap on a phone doesn't leave it stuck on. */
@media (hover: hover) {
  .cwc-email:hover { background: var(--mw-purple); color: #fff; }
}
.cwc-email:focus-visible { background: var(--mw-purple); color: #fff; }
.cwc-email svg { width: 16px; height: 16px; flex: none; }
.cwc-email__face {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cwc-email__face--done { opacity: 0; transform: translateY(110%); }
.cwc-email.is-copied { background: var(--mw-purple); color: #fff; }
.cwc-email.is-copied .cwc-email__face--idle { opacity: 0; transform: translateY(-110%); }
.cwc-email.is-copied .cwc-email__face--done { opacity: 1; transform: none; }
/* The check draws itself in once the label has slid up. */
.cwc-email__face--done path { stroke-dasharray: 22; stroke-dashoffset: 22; }
.cwc-email.is-copied .cwc-email__face--done path { animation: cwc-check-draw 0.32s 0.14s ease-out forwards; }
@keyframes cwc-check-draw { to { stroke-dashoffset: 0; } }
.cwc-email-note { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.cwc-email-note:empty { display: none; }

/* ── Heart ────────────────────────────────────────────────────────────── */
.cwc-heart {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #b9c0d2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.cwc-heart:hover { color: var(--heart); background: #fdecf1; }
.cwc-heart:focus-visible { outline: 2px solid var(--heart); outline-offset: 2px; }
.cwc-heart svg { width: 26px; height: 26px; display: block; overflow: visible; }
.cwc-heart path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: fill 0.2s ease;
}
.cwc-heart[aria-pressed="true"] { color: var(--heart); }
.cwc-heart[aria-pressed="true"] path { fill: currentColor; }
.cwc-heart.is-popping svg { animation: cwc-heart-pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes cwc-heart-pop { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* "Saved!" beside the heart (heart: top 16px, right 14px, 44px square). */
.cwc-saved {
  position: absolute;
  top: 27px;
  right: 60px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fdecf1;
  color: var(--heart);
  font: 700 12px/16px "Montserrat", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  animation: cwc-saved 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes cwc-saved {
  0% { opacity: 0; transform: translateX(14px) scale(0.85); }
  16% { opacity: 1; transform: translateX(0) scale(1.06); }
  26% { transform: translateX(0) scale(1); }
  72% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(0) translateY(-6px); }
}

.cwc-burst-heart {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  color: var(--heart);
  line-height: 1;
  will-change: transform, opacity;
  display: block;
  animation: cwc-heart-float var(--dur, 900ms) ease-out forwards;
}
.cwc-burst-heart svg { width: 100%; height: 100%; display: block; }
.cwc-burst-heart path { fill: currentColor; }
@keyframes cwc-heart-float {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -80px))) scale(var(--s, 1)) rotate(var(--rot, 0deg)); }
}

/* ── Composer sign-in ─────────────────────────────────────────────────── */
.cwc-signin {
  margin-top: 56px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(110deg, var(--mw-blue) 0%, var(--mw-blue-deep) 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 40px;
  align-items: center;
}
.cwc-signin h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 28px); font-weight: 800; line-height: 1.2; }
.cwc-signin p { margin: 0; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, 0.88); }
.cwc-signin__form { display: grid; gap: 12px; }
.cwc-signin .cwc-signin__form input { border-color: transparent; } /* on the blue band */
/* On the white editor panel the field needs its own edge. */
.cwc-panel .cwc-signin__form { max-width: 480px; justify-items: start; }
.cwc-panel .cwc-signin__form input { border: 1px solid #c3cbe0; background: #f4f6fb; }
.cwc-panel .cwc-signin__form input:focus { background: #fff; }
.cwc-signin__message { min-height: 1.5em; font-weight: 600; }

/* Sign-in button after a send: "✓ Email sent!" until the page reloads. */
.cwc-signin__form button.is-sent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1f7a4d;
  border-color: #1f7a4d;
  color: #fff;
  opacity: 1;
  cursor: default;
}
.cwc-signin__form button.is-sent svg { width: 18px; height: 18px; flex: none; }
.cwc-signin__form button.is-sent:hover { background: #1f7a4d; color: #fff; }
.cwc-signin__form input[readonly] { color: var(--muted); }
.cwc-signin__message.is-error { color: #ffd3dd; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.cwc-footer {
  background: var(--bar);
  text-align: center;
  padding: 32px 16px calc(32px + env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}
.cwc-footer img { width: min(360px, 80%); height: auto; display: block; margin: 0 auto; }
.cwc-footer a { color: #fff; font-weight: 600; text-decoration: none; }
.cwc-footer a:hover { text-decoration: underline; }

/* ── Editor (coffee/edit/) ────────────────────────────────────────────── */
.cwc-editor {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 72px;
}
.cwc-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 36px);
  box-shadow: 0 1px 2px rgba(20, 53, 110, 0.06), 0 6px 18px rgba(20, 53, 110, 0.06);
}
.cwc-panel h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; color: var(--ink); }
.cwc-panel > p { margin: 0 0 22px; line-height: 1.55; }
.cwc-field { display: grid; gap: 8px; margin-bottom: 22px; }
.cwc-field label, .cwc-field .cwc-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mw-blue);
  line-height: 1.45;
}
.cwc-hint { font-size: 13px; color: var(--muted); }
.cwc-count { font-size: 12px; color: var(--muted); text-align: right; }
.cwc-drop {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px;
  border: 2px dashed #c3cbe0;
  border-radius: 12px;
  background: #f8f9fd;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cwc-drop:hover, .cwc-drop:focus-within { border-color: var(--mw-blue); }
.cwc-drop.is-over { border-color: var(--mw-purple); background: #f6edf5; }
.cwc-drop__text { display: grid; gap: 4px; font-size: 15px; color: var(--body); }
.cwc-drop__text strong { font-size: 17px; color: var(--ink); }
.cwc-drop__text u { color: var(--mw-blue); text-underline-offset: 2px; }
.cwc-drop__file { font-size: 13px; color: var(--muted); word-break: break-all; }
.cwc-drop__file:empty { display: none; }
.cwc-cropper { display: grid; gap: 12px; justify-items: start; margin-top: 16px; }
.cwc-cropper[hidden] { display: none; }
.cwc-cropper__frame {
  position: relative;
  width: min(300px, 100%);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: #e9edf6;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.cwc-cropper__frame.is-dragging { cursor: grabbing; }
.cwc-cropper__frame:focus-visible { outline: 3px solid var(--mw-purple); outline-offset: 3px; }
.cwc-cropper__frame img {
  position: absolute;
  max-width: none;
  pointer-events: none;
}
/* Dim everything outside the circle the card shows. */
.cwc-cropper__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(244, 246, 251, 0.72);
  outline: 2px solid #fff;
  pointer-events: none;
}
.cwc-cropper__controls { display: flex; align-items: center; gap: 18px; width: min(300px, 100%); }
.cwc-cropper__zoom { display: flex; align-items: center; gap: 8px; flex: 1; color: var(--muted); }
.cwc-cropper__zoom span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cwc-cropper__zoom svg { flex: none; width: 16px; height: 16px; }
.cwc-cropper__zoom input { flex: 1; min-width: 0; accent-color: var(--mw-purple); padding: 0; border: none; }
.cwc-cropper__zoom input:focus { box-shadow: none; }
.cwc-cropper__zoom input:focus-visible { outline: 2px solid var(--mw-purple); outline-offset: 4px; }
.cwc-optional { margin-left: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.cwc-names { display: grid; gap: 14px; margin-top: 4px; padding: 18px; border-radius: 12px; background: #f6f2f8; }
.cwc-names[hidden] { display: none; }
.cwc-names__note:empty { display: none; }
.cwc-names__audio { display: grid; gap: 14px; }
.cwc-names__audio[hidden] { display: none; }
.cwc-names__note a { color: var(--mw-purple); font-weight: 700; }
.cwc-say { margin: 0; font-size: 17px; color: var(--ink); }
.cwc-say strong { color: var(--mw-purple-deep); }
.cwc-recorder { display: grid; gap: 12px; }
.cwc-recorder[hidden] { display: none; }
.cwc-mic-gate { display: grid; gap: 8px; justify-items: start; }
.cwc-mic-gate[hidden], .cwc-mic-controls[hidden] { display: none; }
.cwc-mic-gate svg { width: 18px; height: 18px; }
.cwc-mic-controls { display: grid; gap: 12px; }
.cwc-recorder__mic { display: grid; gap: 6px; max-width: 420px; }
.cwc-recorder__mic label { font-size: 13px; font-weight: 600; color: var(--ink); }
.cwc-recorder__mic select {
  min-height: 42px; padding: 8px 12px; border: 1px solid #ccd3e3; border-radius: 10px; background: #fff;
  color: var(--ink); font: 500 15px "Montserrat", sans-serif; max-width: 100%;
}
.cwc-recorder__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cwc-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.cwc-rec-btn.is-recording { background: #c2183f; border-color: #c2183f; }
.cwc-rec-btn.is-recording .cwc-rec-dot { border-radius: 2px; animation: cwc-rec-pulse 1s ease-in-out infinite; }
@keyframes cwc-rec-pulse { 50% { opacity: 0.35; } }
.cwc-rec-time { font: 700 15px "Montserrat", sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; }
.cwc-rec-meter { width: 120px; height: 8px; border-radius: 999px; background: #e3dcea; overflow: hidden; }
.cwc-rec-meter span { display: block; height: 100%; width: 0; background: var(--mw-purple); transition: width 0.08s linear; }
.cwc-play-btn { border-color: var(--mw-purple); color: var(--mw-purple); background: #fff; }
.cwc-play-btn:hover, .cwc-play-btn.is-playing { background: var(--mw-purple); color: #fff; }
.cwc-play-btn[hidden] { display: none; }
.cwc-play-icon { display: inline-flex; }
.cwc-play-icon svg { width: 16px; height: 16px; }
.cwc-upload-play:empty { display: none; }
#rec-message:empty { display: none; }
.cwc-drop--audio { background: #fff; }
.cwc-drop__icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: #f3e8f2; color: var(--mw-purple); flex: none;
}
.cwc-drop__icon svg { width: 26px; height: 26px; }
.cwc-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.cwc-or::before, .cwc-or::after { content: ""; flex: 1; height: 1px; background: #ddd3e6; }
[aria-invalid="true"] { border-color: #c2183f !important; }
@media (prefers-reduced-motion: reduce) { .cwc-rec-btn.is-recording .cwc-rec-dot { animation: none; } }
.cwc-fieldset { border: none; padding: 0; margin: 0 0 22px; min-width: 0; }
.cwc-fieldset legend { padding: 0; margin-bottom: 8px; }
.cwc-choices { display: flex; gap: 22px; margin-bottom: 10px; }
.cwc-choice { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: var(--ink); cursor: pointer; }
.cwc-choice input { width: 18px; height: 18px; accent-color: var(--mw-purple); margin: 0; }
#contact-email-wrap { display: grid; gap: 8px; }
#contact-email-wrap[hidden] { display: none; }
.cwc-banner {
  margin: 0 0 22px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.5;
  background: #f3e8f2;
  color: var(--mw-purple-deep);
}
.cwc-banner.is-ok { background: #e7f6ec; color: #17603a; }
.cwc-banner.is-error { background: #fde8ec; color: #8a1630; }
.cwc-banner:empty { display: none; }
.cwc-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* "Saved ✓": the button stays greyed out until something on the card changes. */
.cwc-btn.is-saved { gap: 8px; }
.cwc-btn.is-saved svg { width: 18px; height: 18px; }

/* After a save */
.cwc-done { text-align: center; }
.cwc-done:focus { outline: none; }
.cwc-done__check {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 4px auto 14px;
  border-radius: 50%;
  background: #e7f6ec;
  color: #17603a;
}
.cwc-done__check svg { width: 34px; height: 34px; }
.cwc-done h2 { margin-top: 0; }
.cwc-done p { max-width: 34em; margin-left: auto; margin-right: auto; }
.cwc-done__actions { justify-content: center; margin-top: 22px; }
.cwc-link-btn { background: none; border: none; padding: 0; color: var(--mw-blue); font: 600 14px "Montserrat", sans-serif; cursor: pointer; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .cwc-card { transition: none; }
  .cwc-heart.is-popping svg { animation: none; }
  .cwc-say-name.is-playing svg { animation: none; }
  .cwc-toolbar::before { transition: none; }
  .cwc-burst-heart { display: none; }
  .cwc-saved { animation: cwc-saved-fade 1.4s linear forwards; }
  @keyframes cwc-saved-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
  .cwc-email, .cwc-email__face { transition: none; }
  .cwc-email.is-copied .cwc-email__face--done path { animation: none; stroke-dashoffset: 0; }
}

@media (max-width: 760px) {
  .cwc-cards { grid-template-columns: 1fr; gap: 18px; }
  .cwc-signin { grid-template-columns: 1fr; }
  .cwc-toolbar .cwc-btn { width: 100%; }
  /* Keep the sticky bar short on phones: smaller title, count beside it. */
  .cwc-toolbar { padding: 12px 0; gap: 10px; margin-bottom: 20px; }
  .cwc-toolbar__heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
  .cwc-toolbar .cwc-section-title { font-size: 23px; }
  .cwc-total { margin: 0; font-size: 13px; }
  .cwc-filters { max-width: none; }
  .cwc-roster__list { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 24px 8px; }
  .cwc-tile__photo { width: 72px; }
  .cwc-tile .cwc-photo { width: 72px; height: 72px; }
}
