:root {
  --black: #000000;
  --turquoise: #1de9b6;
  --turquoise-dim: rgba(29, 233, 182, 0.12);
  --folly: #ff3263;
  --gold: #c5a46e;
  --gold-hi: #e8d5a3;
  --grey: #8e8e8e;
  --white: #ffffff;
  --text: #f5f5f3;
  --text-muted: rgba(245, 245, 243, 0.78);
  --panel: rgba(0, 0, 0, 0.55);
  --panel-border: rgba(29, 233, 182, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Avenir";
  --nav-w: 248px;
  --list-w: 340px;
  /* Live Progress sunrise palette (matches iOS cards) */
  --sunrise-accepted: #e8a0b5;
  --sunrise-on-the-way: #e8897a;
  --sunrise-attending: #e07a3a;
  --sunrise-submitted: #e8897a;
  --sunrise-finished: #d4a017;
  --sunrise-pending: #f0db7a;
  --sunrise-pending-bright: #f7e89e;
  --sunrise-not-booked: #8e8e8e;
  --sunrise-booked: #1de9b6;
  --sunrise-accepted-bright: #fac7d9;
  --sunrise-on-the-way-bright: #fab09e;
  --sunrise-attending-bright: #faa361;
  --sunrise-finished-bright: #f5c747;
  --sunrise-booked-bright: #73f5d1;
}

@font-face {
  font-family: "Avenir";
  src: local("Avenir-Medium"), local("Avenir Medium");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Avenir";
  src: local("Avenir-Medium"), local("Avenir Medium");
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: "Avenir";
  src: local("Avenir-Heavy"), local("Avenir Heavy");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "Avenir";
  src: local("Avenir-Heavy"), local("Avenir Heavy");
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: "Avenir";
  src: local("Avenir-Heavy"), local("Avenir Heavy");
  font-weight: 800;
  font-style: normal;
}
@font-face {
  font-family: "Avenir";
  src: local("Avenir-Heavy"), local("Avenir Heavy");
  font-weight: 900;
  font-style: normal;
}

* { box-sizing: border-box; font-family: "Avenir", sans-serif; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Avenir", sans-serif;
  font-weight: 500;
  background-color: #181818;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select, option {
  font-family: "Avenir", sans-serif;
}

h1, h2, h3, .brand, .mark {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

a { color: var(--turquoise); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Background — same aurora image as auditiontracker.co.uk */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #181818;
  background-image: url("/connect/assets/background1.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

#app { position: relative; z-index: 1; min-height: 100vh; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid var(--panel-border);
  color: var(--turquoise);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  transition: opacity 0.2s ease;
}
.toast[hidden] { display: none; }

/* Auth gate — header + balanced two columns (matches reference) */
.gate {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 28px clamp(28px, 4vw, 56px) 40px;
  box-sizing: border-box;
  overflow-x: hidden;
}
.gate-top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.gate-logo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  flex-shrink: 0;
  object-fit: contain;
}
.eyebrow {
  color: rgba(245, 245, 243, 0.88);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: fit-content;
  padding: 7px 14px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  flex: 0 0 auto;
}
.gate-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(32px, 4vw, 72px);
  min-height: 0;
}
.gate-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-self: center;
  width: 100%;
  max-width: 420px;
  padding: 24px 0;
  box-sizing: border-box;
  min-width: 0;
}
.gate-copy h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: none;
  color: var(--white);
  margin: 0;
  white-space: nowrap;
}
.gate-copy h1 span {
  display: block;
  color: var(--turquoise);
  font-size: 0.42em;
  letter-spacing: 0.1em;
  margin-top: 12px;
  font-weight: 800;
  white-space: normal;
}
.gate-copy > p {
  margin: 24px 0 0;
  max-width: 34ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-muted);
  font-weight: 500;
}
.gate-steps {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 36ch;
  width: auto;
}
.gate-steps li {
  font-size: 15px;
  color: rgba(245, 245, 243, 0.78);
  padding-left: 20px;
  position: relative;
  line-height: 1.45;
}
.gate-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--turquoise);
  opacity: 0.95;
}
.gate-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  justify-self: center;
  width: 100%;
  max-width: 400px;
  padding: 24px 0;
  background: transparent;
  border: 0;
  box-sizing: border-box;
  min-width: 0;
  gap: 14px;
}
.gate-howto {
  width: 100%;
  margin-top: 0;
  text-decoration: none;
  border-radius: 12px;
  box-sizing: border-box;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(29, 233, 182, 0.14);
  border-radius: 16px;
  padding: 32px 28px 28px;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}
.gate .tabs {
  gap: 28px;
  margin-bottom: 28px;
}
.gate .tabs button {
  padding: 0 0 14px;
  font-size: 15px;
}
.gate .field {
  margin-bottom: 16px;
}
.gate .btn {
  margin-top: 10px;
  border-radius: 12px;
}
.gate .err {
  margin: 4px 0 12px;
}
.auth-title {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--white);
}
.auth-lead {
  margin: 0 0 18px;
  line-height: 1.45;
}
.auth-forgot,
.auth-back {
  margin: 4px 0 0;
}
.auth-msg {
  margin: 12px 0 0;
  color: var(--turquoise);
}
button.linkish {
  background: none;
  border: none;
  padding: 0;
  color: var(--turquoise);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.disconnect-block h3 {
  color: var(--folly);
}
@media (max-width: 900px) {
  .gate {
    padding: 24px 20px 48px;
  }
  .gate-logo {
    width: 56px;
    height: 56px;
  }
  .gate-body {
    grid-template-columns: 1fr;
    align-items: start;
    row-gap: 32px;
  }
  .gate-copy,
  .gate-panel {
    justify-self: stretch;
    max-width: none;
    padding: 0;
  }
  .gate-copy h1 {
    white-space: normal;
    font-size: clamp(34px, 10vw, 48px);
  }
  .auth-card {
    max-width: none;
  }
}

.tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--panel-border);
}
.tabs button {
  background: none;
  border: 0;
  color: var(--grey);
  padding: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.tabs button.on {
  color: var(--white);
  box-shadow: inset 0 -2px 0 var(--turquoise);
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  color: var(--white);
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  margin-top: 14px;
}
.search-input:focus {
  outline: none;
  border-color: var(--turquoise);
  box-shadow: 0 0 0 1px var(--turquoise);
}
.search-input::placeholder { color: var(--grey); }
.search-meta {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--grey);
}

.actor-picker { width: 100%; }
.actor-results {
  margin-top: 10px;
  max-height: min(320px, 42vh);
  overflow: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.4);
}
.actor-section-label {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.actor-pick {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}
.actor-section .actor-pick:first-of-type { border-top: 0; }
.actor-pick:hover { background: rgba(255, 255, 255, 0.04); }
.actor-pick.on {
  background: var(--turquoise-dim);
  box-shadow: inset 3px 0 0 var(--turquoise);
}
.actor-pick.on .avatar {
  box-shadow: 0 0 0 2px var(--turquoise);
}
.actor-pick-text {
  min-width: 0;
  flex: 1;
}
.actor-pick strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 2px;
}
.actor-pick-text span {
  display: block;
  color: var(--grey);
  font-size: 13px;
  font-weight: 500;
}
.actor-empty {
  padding: 20px 14px !important;
  margin: 0 !important;
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  color: var(--white);
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.detail.detail-full {
  padding: 28px 40px 80px;
}
@media (min-width: 721px) {
  .detail.detail-full {
    padding-right: clamp(28px, 4vw, 56px);
    padding-left: clamp(28px, 3vw, 48px);
  }
}
.field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.45;
  width: 100%;
}
.field textarea[name="instructions"] {
  min-height: 180px;
}
.field.is-drop textarea { border-color: var(--turquoise); }
.file-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.file-add .btn { width: auto; margin-top: 0; }
.file-add .hint { margin-top: 0 !important; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--turquoise);
  box-shadow: 0 0 0 1px var(--turquoise);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--turquoise);
  color: #000;
  border: 0;
  font-weight: 800;
  font-size: 15px;
  padding: 13px 22px;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
  border-radius: var(--radius-sm);
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.btn:hover:not(:disabled) { opacity: 0.92; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn.secondary {
  background: transparent;
  color: var(--turquoise);
  border: 1px solid var(--turquoise);
}
.btn.danger {
  background: var(--folly);
  color: var(--white);
}
.btn.gold {
  background: var(--gold);
  color: #000;
}
.btn.ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: auto;
}
.btn.sm {
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
  margin-top: 0;
}
.btn:disabled { opacity: 0.55; cursor: wait; }
.err {
  color: var(--folly);
  font-size: 14px;
  font-weight: 500;
  min-height: 1.2em;
  margin: 8px 0;
}

/* App shell */
.shell {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
}
.shell-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}
.shell-views {
  display: grid;
  grid-template-columns: minmax(280px, var(--list-w)) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  min-width: 0;
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .shell-views {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  }
}
/* New request (and other single-pane views) must span the full content area, not the list column. */
.shell-views .detail.detail-full {
  grid-column: 1 / -1;
  max-width: none;
  width: 100%;
}
.compose-wrap {
  width: 100%;
  max-width: 1100px;
}
.compose {
  width: 100%;
  max-width: none;
}
/* Roster / request forms — same comfortable width as the sign-in card */
.detail:not(.detail-full) .compose {
  max-width: 420px;
}
.detail:not(.detail-full) > h2,
.detail:not(.detail-full) > .meta,
.detail:not(.detail-full) > .block,
.detail:not(.detail-full) > .headshot-edit,
.detail:not(.detail-full) > .hint,
.detail:not(.detail-full) > .err,
.detail:not(.detail-full) > .detail-back,
.detail:not(.detail-full) > .badge,
.detail:not(.detail-full) > .next,
.detail:not(.detail-full) > .actions,
.detail:not(.detail-full) > .thread {
  max-width: 520px;
}
.compose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  align-items: start;
}
.compose-grid .field-span {
  grid-column: 1 / -1;
}
@media (max-width: 820px) {
  .compose-grid { grid-template-columns: 1fr; }
  .compose-grid .field-span { grid-column: auto; }
}
@media (max-width: 720px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    min-height: 100dvh;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  .shell-main {
    min-height: 0;
    height: 100%;
  }
  .shell-views {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
  }
  .shell .nav.desktop-nav { display: none; }
  .shell .list {
    border-right: 0;
    max-height: none;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .shell.mobile-detail .list { display: none; }
  .shell.mobile-detail .detail {
    grid-column: 1;
    display: flex;
  }
  .shell:not(.mobile-detail) .detail:not(.detail-full) { display: none; }
  .shell.mobile-detail .detail,
  .shell .detail.detail-full {
    display: flex;
    grid-column: 1;
    max-height: none;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 18px calc(32px + env(safe-area-inset-bottom, 0px));
  }
  .shell .detail.detail-full {
    display: block;
  }
}

.nav {
  padding: 24px 20px;
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}
.nav .mark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--white);
}
.nav .mark img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}
.nav .mark small {
  display: block;
  color: var(--turquoise);
  font-size: 10px;
  letter-spacing: 0.16em;
  margin-top: 4px;
  font-weight: 800;
}
.nav button {
  text-align: left;
  background: none;
  border: 0;
  color: rgba(245, 245, 243, 0.75);
  font-size: 15px;
  font-weight: 700;
  padding: 11px 12px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nav button:hover { background: rgba(255, 255, 255, 0.04); }
.nav button.on {
  color: var(--turquoise);
  background: var(--turquoise-dim);
}
.nav .badge {
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--folly);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav .spacer { flex: 1; }
.nav-howto {
  display: block;
  margin: 0 0 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(245, 245, 243, 0.55);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.nav-howto:hover {
  color: var(--turquoise);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}
.nav-divider {
  height: 1px;
  margin: 12px 12px 10px;
  background: rgba(29, 233, 182, 0.18);
  flex-shrink: 0;
}
.nav .who {
  font-size: 13px;
  font-weight: 500;
  color: var(--grey);
  line-height: 1.4;
  margin-bottom: 8px;
  padding: 0 12px;
}
.nav .signout {
  color: var(--grey);
  font-size: 14px;
}
.billing-pill {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--turquoise);
}

/* Agency suggestion box — fixed top-right of Connect shell */
.suggestion-box {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top, 0px));
  right: calc(18px + env(safe-area-inset-right, 0px));
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: min(360px, calc(100vw - 24px));
}
.suggestion-fab {
  appearance: none;
  border: 1px solid rgba(29, 233, 182, 0.35);
  background: rgba(0, 0, 0, 0.82);
  color: var(--turquoise);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.suggestion-fab:hover {
  border-color: rgba(29, 233, 182, 0.7);
  background: rgba(0, 0, 0, 0.92);
}
.suggestion-box.is-open .suggestion-fab {
  border-color: var(--turquoise);
  color: var(--black);
  background: var(--turquoise);
}
.suggestion-panel {
  width: min(360px, calc(100vw - 24px));
  background: rgba(8, 8, 8, 0.96);
  border: 1px solid rgba(29, 233, 182, 0.22);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.suggestion-panel[hidden] { display: none; }
.suggestion-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.suggestion-panel-head h2 {
  font-size: 18px;
  margin: 0 0 4px;
}
.suggestion-panel-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}
.suggestion-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--grey);
  font-size: 22px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.suggestion-close:hover { color: var(--text); }
.suggestion-panel .field { margin-bottom: 12px; }
.suggestion-panel .field select {
  position: relative;
  z-index: 2;
}
.suggestion-panel textarea {
  min-height: 110px;
  resize: vertical;
  position: relative;
  z-index: 1;
}
.suggestion-actions {
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 720px) {
  .suggestion-box {
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
  }
  .suggestion-fab {
    padding: 9px 12px;
    font-size: 12px;
  }
}

.shell-main-paywall {
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  overflow: auto;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(197, 164, 110, 0.12), transparent 60%),
    rgba(0, 0, 0, 0.15);
}
.paywall-topbar {
  display: none;
  width: 100%;
  max-width: 820px;
  margin: 0 auto 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.paywall-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.paywall-topbar-brand img {
  border-radius: 8px;
  flex-shrink: 0;
}
.paywall-topbar-brand strong {
  display: block;
  font-size: 14px;
  color: var(--white);
  line-height: 1.2;
}
.paywall-topbar-brand span {
  display: block;
  font-size: 12px;
  color: var(--grey);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 52vw;
}
.paywall-topbar .btn {
  margin: 0;
  width: auto;
  flex-shrink: 0;
}

.billing-panel {
  margin: 16px 16px 0;
  min-width: 0;
  flex-shrink: 0;
}
.shell-main-paywall .billing-panel {
  margin: 0;
  width: 100%;
  max-width: 820px;
}
.billing-panel-ok {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(29, 233, 182, 0.22);
  background: rgba(29, 233, 182, 0.08);
}
.billing-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.billing-status strong {
  display: block;
  font-size: 14px;
  color: var(--white);
}
.billing-status-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--grey);
}
.billing-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--turquoise);
  box-shadow: 0 0 0 4px rgba(29, 233, 182, 0.18);
  flex-shrink: 0;
}
.billing-panel-ok .btn {
  margin: 0;
  width: auto;
}

.billing-panel-plans {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 28px 24px;
  border-radius: 20px;
  border: 1px solid rgba(197, 164, 110, 0.32);
  background:
    linear-gradient(165deg, rgba(197, 164, 110, 0.12) 0%, rgba(0, 0, 0, 0.2) 40%, rgba(0, 0, 0, 0.55) 100%),
    rgba(18, 18, 18, 0.92);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.billing-panel-head {
  text-align: center;
  max-width: 520px;
  margin: 0 auto 22px;
}
.billing-panel-head .eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.billing-panel-head h2 {
  font-size: clamp(24px, 3.2vw, 30px);
  color: var(--white);
  letter-spacing: -0.03em;
}
.billing-lead {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
}
.billing-lead strong {
  color: var(--gold-hi);
  font-weight: 700;
}

.billing-plans {
  display: grid;
  gap: 16px;
  margin: 0 auto;
}
.billing-plans-1 {
  grid-template-columns: minmax(0, 360px);
  justify-content: center;
}
.billing-plans-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.billing-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 20px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.42);
  min-width: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.billing-plan:hover {
  border-color: rgba(255, 255, 255, 0.18);
}
.billing-plan-featured {
  border-color: rgba(197, 164, 110, 0.55);
  background:
    linear-gradient(165deg, rgba(197, 164, 110, 0.18), rgba(0, 0, 0, 0.48));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}
.billing-plan-featured:hover {
  border-color: rgba(197, 164, 110, 0.7);
}
.billing-plan-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a140c;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.billing-plan-top h3 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 10px;
}
.billing-plan-featured .billing-plan-top h3 {
  color: var(--gold-hi);
}
.billing-price {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.billing-amount {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--white);
  line-height: 1;
}
.billing-per {
  font-size: 14px;
  color: var(--grey);
  font-weight: 600;
}
.billing-billed,
.billing-trial {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.billing-trial {
  color: var(--gold-hi);
  font-weight: 700;
}
.billing-features {
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
  display: grid;
  gap: 10px;
  flex: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.billing-features li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
}
.billing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--turquoise);
  box-shadow: 0 0 0 3px rgba(29, 233, 182, 0.15);
}
.billing-plan .btn {
  margin: 4px 0 0;
  width: 100%;
  min-height: 46px;
  font-size: 15px;
}

@media (max-width: 900px) {
  .billing-plans-2 {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .shell-main-paywall {
    align-items: stretch;
    padding: 20px 16px;
  }
}
@media (max-width: 720px) {
  .shell-paywall {
    padding-bottom: 0;
  }
  .shell-paywall .nav.desktop-nav {
    display: none;
  }
  .shell-main-paywall {
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    justify-content: flex-start;
  }
  .paywall-topbar {
    display: flex;
  }
  .billing-panel {
    margin: 0;
  }
  .billing-panel-plans {
    padding: 22px 16px 18px;
    border-radius: 16px;
  }
  .billing-panel-head h2 {
    font-size: 24px;
  }
  .billing-amount {
    font-size: 34px;
  }
  .billing-plan {
    padding: 20px 16px 16px;
  }
}

/* Mobile bottom nav */
.mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.92);
  border-top: 1px solid var(--panel-border);
  backdrop-filter: blur(16px);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}
@media (max-width: 720px) {
  .mobile-nav { display: grid; }
}
.mobile-nav button {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 10px 2px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  position: relative;
}
.mobile-nav button.on {
  color: var(--turquoise);
  background: var(--turquoise-dim);
}
.mobile-nav .badge {
  position: absolute;
  top: 4px;
  right: 12px;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--folly);
  color: var(--white);
  font-weight: 800;
}

.list {
  border-right: 1px solid var(--panel-border);
  overflow: auto;
  max-height: 100vh;
  background: rgba(0, 0, 0, 0.2);
}
.list-head {
  padding: 22px 18px 12px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.95) 70%, transparent);
  backdrop-filter: blur(8px);
}
.list-head h2 {
  font-size: 22px;
  color: var(--turquoise);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.filters button {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--grey);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 999px;
}
.filters button.on {
  color: var(--turquoise);
  border-color: var(--turquoise);
  background: var(--turquoise-dim);
}

.kind-toggle {
  display: flex;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
}
@media (max-width: 520px) {
  .kind-toggle { width: 100%; }
  .kind-btn { flex: 1; text-align: center; padding: 12px 10px; }
}
.kind-btn {
  background: transparent;
  border: 0;
  color: var(--grey);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
}
.kind-btn + .kind-btn {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.kind-btn.on {
  color: var(--turquoise);
  background: var(--turquoise-dim);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.check-row input {
  margin-top: 3px;
  accent-color: var(--turquoise);
}

.item {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 18px;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.item:hover, .item.on {
  background: var(--turquoise-dim);
}
.item.on .avatar {
  box-shadow: 0 0 0 2px var(--turquoise);
}
/* Live Progress request cards — same stage wash/border as the iOS app */
.item.live-card {
  --card-tone: var(--sunrise-accepted);
  --card-border: var(--sunrise-accepted-bright);
  margin: 10px 12px;
  width: calc(100% - 24px);
  padding: 14px 14px 12px;
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  border-top: 1.5px solid var(--card-border);
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 3px 0 0 var(--card-border);
  position: relative;
  overflow: hidden;
}
.item.live-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: color-mix(in srgb, var(--card-tone) 16%, transparent);
  pointer-events: none;
}
.item.live-card > * { position: relative; z-index: 1; }
.item.live-card:hover,
.item.live-card.on {
  background: rgba(0, 0, 0, 0.62);
  box-shadow: inset 0 3px 0 0 var(--card-border), 0 0 0 1px color-mix(in srgb, var(--card-border) 40%, transparent);
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .item.live-card::before { opacity: 0.22; background: var(--card-tone); }
  .item.live-card.stage-pending_outcome::before,
  .item.live-card.stage-tape_sent::before { opacity: 0.16; }
}
.item.live-card.stage-accepted { --card-tone: var(--sunrise-accepted); --card-border: var(--sunrise-accepted-bright); }
.item.live-card.stage-on_the_way,
.item.live-card.stage-in_progress { --card-tone: var(--sunrise-on-the-way); --card-border: var(--sunrise-on-the-way-bright); }
.item.live-card.stage-attending { --card-tone: var(--sunrise-attending); --card-border: var(--sunrise-attending-bright); }
.item.live-card.stage-submitted,
.item.live-card.stage-finished { --card-tone: var(--sunrise-finished); --card-border: var(--sunrise-finished-bright); }
.item.live-card.stage-pending_outcome,
.item.live-card.stage-tape_sent { --card-tone: var(--sunrise-pending); --card-border: var(--sunrise-pending-bright); }
.item.live-card.stage-pending_outcome::before,
.item.live-card.stage-tape_sent::before {
  background: color-mix(in srgb, var(--sunrise-pending) 12%, transparent);
}
.item.live-card.stage-booked { --card-tone: var(--sunrise-booked); --card-border: var(--sunrise-booked-bright); }
.item.live-card.stage-not_booked { --card-tone: var(--sunrise-not-booked); --card-border: #b8b8b8; }
.live-card-msg-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--folly);
  background: rgba(255, 50, 99, 0.14);
}
.live-card-msg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--folly);
  box-shadow: 0 0 0 3px rgba(255, 50, 99, 0.18);
}
.item.live-card.has-unread-msg {
  box-shadow: inset 0 0 0 1px rgba(255, 50, 99, 0.28);
}
.msg-unread-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--folly);
  background: rgba(255, 50, 99, 0.14);
  vertical-align: middle;
}
.item.live-card.stage-requested {
  --card-tone: var(--sunrise-not-booked);
  --card-border: #b8b8b8;
}
.item.live-card.stage-declined,
.item.live-card.stage-closed,
.item.live-card.stage-outcome_conflict { --card-tone: var(--folly); --card-border: #ff8aa8; }

.item.live-card .live-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.item.live-card .live-card-status {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a0a0a;
  background: var(--card-tone);
  padding: 4px 8px;
  border-radius: 999px;
  line-height: 1.2;
}
.item.live-card.stage-pending_outcome .live-card-status,
.item.live-card.stage-tape_sent .live-card-status {
  color: #1a1408;
  background: var(--sunrise-pending);
}
.item.live-card.stage-not_booked .live-card-status,
.item.live-card.stage-requested .live-card-status {
  color: #fff;
  background: var(--sunrise-not-booked);
}
.item.live-card .live-card-meta {
  font-size: 12px;
  color: var(--grey);
  margin: 0 0 8px;
  line-height: 1.35;
}
.item.live-card .live-progress {
  margin: 6px 0 8px;
  max-width: none;
}
.item.live-card .live-progress-label {
  font-size: 9px;
}
.item.live-card .live-progress-meta { display: none; }
.item.live-card .live-card-due {
  display: block;
  font-size: 12px;
  color: rgba(245, 245, 243, 0.75);
  margin-top: 2px;
}
.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.item-text {
  min-width: 0;
  flex: 1;
}
.item .kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.item .kicker.declined { color: var(--folly); }
.item .kicker.action { color: var(--turquoise); }
.item span.overdue { color: var(--folly); }
.item span.due-soon { color: var(--gold); }
.item strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 2px;
}
.item.live-card strong {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.25;
}
.item-text span {
  color: var(--grey);
  font-size: 13px;
  font-weight: 500;
}

.avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--turquoise);
  background: var(--turquoise-dim);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.25);
}
.avatar.lg {
  width: 72px;
  height: 72px;
  font-size: 22px;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.headshot-edit {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
}

.detail {
  padding: 36px 40px 80px;
  overflow: auto;
  max-height: 100vh;
  min-width: 0;
  background: rgba(0, 0, 0, 0.32);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}
@media (max-width: 720px) {
  .detail { padding: 20px 18px 32px; max-height: none; background: transparent; border-left: 0; }
}
.detail-back {
  display: none;
  background: none;
  border: 0;
  color: var(--turquoise);
  font-size: 15px;
  font-weight: 800;
  padding: 0 0 16px;
  cursor: pointer;
}
@media (max-width: 720px) {
  .shell.mobile-detail .detail-back { display: inline-flex; align-items: center; gap: 6px; }
}
.detail h2 {
  font-size: clamp(26px, 4vw, 32px);
  color: var(--white);
  margin-bottom: 6px;
}
.meta {
  color: var(--grey);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.45;
}
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.badge.requested { color: var(--grey); background: rgba(255, 255, 255, 0.08); }
.badge.accepted { color: #e8a0b5; background: rgba(232, 160, 181, 0.16); }
.badge.on_the_way, .badge.in_progress { color: #e8897a; background: rgba(232, 137, 122, 0.16); }
.badge.attending { color: #e07a3a; background: rgba(224, 122, 58, 0.16); }
.badge.submitted, .badge.finished { color: #d4a017; background: rgba(212, 160, 23, 0.16); }
.badge.pending_outcome, .badge.tape_sent {
  color: #1a1408;
  background: color-mix(in srgb, var(--sunrise-pending) 55%, transparent);
}
.badge.booked { color: #1de9b6; background: rgba(29, 233, 182, 0.14); }
.badge.not_booked { color: var(--grey, #8e8e8e); background: rgba(255, 255, 255, 0.08); }
.badge.outcome_conflict { color: var(--folly); background: rgba(255, 50, 99, 0.14); }
.badge.declined, .badge.closed { color: var(--folly); background: rgba(255, 50, 99, 0.14); }

.detail.live-detail {
  --card-tone: var(--sunrise-accepted);
  --card-border: var(--sunrise-accepted-bright);
}
.detail.live-detail.stage-accepted { --card-tone: var(--sunrise-accepted); --card-border: var(--sunrise-accepted-bright); }
.detail.live-detail.stage-on_the_way,
.detail.live-detail.stage-in_progress { --card-tone: var(--sunrise-on-the-way); --card-border: var(--sunrise-on-the-way-bright); }
.detail.live-detail.stage-attending { --card-tone: var(--sunrise-attending); --card-border: var(--sunrise-attending-bright); }
.detail.live-detail.stage-submitted,
.detail.live-detail.stage-finished { --card-tone: var(--sunrise-finished); --card-border: var(--sunrise-finished-bright); }
.detail.live-detail.stage-pending_outcome,
.detail.live-detail.stage-tape_sent { --card-tone: var(--sunrise-pending); --card-border: var(--sunrise-pending-bright); }
.detail.live-detail.stage-booked { --card-tone: var(--sunrise-booked); --card-border: var(--sunrise-booked-bright); }
.detail.live-detail.stage-not_booked { --card-tone: var(--sunrise-not-booked); --card-border: #b8b8b8; }
.detail.live-detail.stage-requested {
  --card-tone: var(--sunrise-not-booked);
  --card-border: #b8b8b8;
}
.detail.live-detail.stage-declined,
.detail.live-detail.stage-closed,
.detail.live-detail.stage-outcome_conflict { --card-tone: var(--folly); --card-border: #ff8aa8; }

.detail-live-card {
  margin: 0 0 22px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--card-border);
  background: color-mix(in srgb, var(--card-tone) 14%, rgba(0, 0, 0, 0.55));
  box-shadow: inset 0 3px 0 0 var(--card-border);
}
.detail-live-card .badge { margin-bottom: 10px; }
.detail-live-card h2 { margin-bottom: 4px; }
.detail-live-card .meta { margin-bottom: 10px; }

.shell-views-roster-actor {
  grid-template-columns: minmax(240px, var(--list-w)) minmax(280px, 360px) minmax(0, 1fr);
}
@media (max-width: 1100px) {
  .shell-views-roster-actor {
    grid-template-columns: minmax(220px, 280px) minmax(240px, 300px) minmax(0, 1fr);
  }
}
.roster-profile {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.roster-auditions-pane {
  padding: 28px 28px 80px;
  overflow: auto;
  max-height: 100vh;
  min-width: 0;
  background: rgba(0, 0, 0, 0.28);
}
.roster-auditions-pane .actor-auditions {
  margin-top: 0 !important;
  max-width: none !important;
}
.roster-auditions-pane .actor-auditions h3 {
  font-size: 22px;
  color: var(--turquoise);
  margin: 0 0 6px;
}
.actor-auditions h3 {
  margin-bottom: 6px;
}
.actor-audition-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  max-width: 720px;
}
.actor-audition-list .item.live-card.actor-audition-card {
  margin: 10px 0;
  width: 100%;
}
.actor-audition-list .item.live-card.actor-audition-card .live-progress-meta {
  display: none;
}
@media (max-width: 720px) {
  .shell-views-roster-actor {
    grid-template-columns: 1fr;
  }
  .shell.mobile-detail .roster-profile {
    display: none;
  }
  .shell.mobile-detail .roster-auditions-pane {
    display: block;
    max-height: none;
    padding: 20px 18px 32px;
    background: transparent;
  }
  .shell:not(.mobile-detail) .roster-auditions-pane {
    display: none;
  }
}

.live-progress {
  margin: 14px 0 18px;
  max-width: 42rem;
}
.live-progress-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.live-progress-step {
  position: relative;
  flex: 1;
  min-width: 0;
  text-align: center;
  --step-color: var(--sunrise-pending);
}
.live-progress-step.stage-accepted { --step-color: var(--sunrise-accepted); }
.live-progress-step.stage-on_the_way { --step-color: var(--sunrise-on-the-way); }
.live-progress-step.stage-attending { --step-color: var(--sunrise-attending); }
.live-progress-step.stage-submitted { --step-color: var(--sunrise-submitted); }
.live-progress-step.stage-finished { --step-color: var(--sunrise-finished); }
.live-progress-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  margin-bottom: 6px;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.live-progress-step.done .live-progress-dot,
.live-progress-step.current .live-progress-dot {
  background: var(--step-color);
  border-color: var(--step-color);
}
.live-progress-step.current .live-progress-dot {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--step-color) 32%, transparent);
}
.live-progress-line {
  position: absolute;
  top: 4px;
  left: calc(50% + 8px);
  right: calc(-50% + 8px);
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease;
}
.live-progress-line.done {
  background: color-mix(in srgb, var(--step-color) 78%, transparent);
}
.live-progress-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey, #8e8e8e);
  line-height: 1.25;
}
.live-progress-step.done .live-progress-label,
.live-progress-step.current .live-progress-label {
  color: var(--step-color);
}
.live-progress-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--grey, #8e8e8e);
}
/* Fallback when color-mix unsupported */
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .live-progress-step.current .live-progress-dot {
    box-shadow: 0 0 0 3px rgba(232, 137, 122, 0.28);
  }
  .live-progress-line.done {
    background: rgba(232, 137, 122, 0.7);
  }
}
.outcome-block .outcome-conflict {
  border: 1px solid rgba(255, 50, 99, 0.45);
  background: rgba(255, 50, 99, 0.1);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  color: var(--folly);
  font-size: 13px;
}
.outcome-block .outcome-conflict strong {
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.next {
  border: 1px solid rgba(197, 164, 110, 0.45);
  background: rgba(197, 164, 110, 0.08);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 24px;
  color: var(--gold-hi);
  max-width: 52ch;
}
.next strong {
  display: block;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.action-callout {
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 24px;
  max-width: 56ch;
}
.action-callout-title {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 8px;
}
.action-callout p {
  margin: 0 0 14px;
  color: var(--grey);
  line-height: 1.45;
}
.action-callout .btn,
.action-callout a.btn {
  margin-top: 4px;
  margin-right: 10px;
}
.action-callout-tagmin {
  border: 1px solid rgba(29, 233, 182, 0.45);
  background: rgba(29, 233, 182, 0.08);
}
.action-callout-tagmin .action-callout-title {
  color: var(--turquoise);
}
.action-callout-decline {
  border: 1px solid rgba(255, 50, 99, 0.35);
  background: rgba(255, 50, 99, 0.08);
}
.action-callout-decline .action-callout-title {
  color: var(--folly);
}
.handoff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.handoff-preview {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--grey);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}
.handoff-link-label {
  margin: 0 0 6px;
}
.handoff-preview.handoff-link {
  max-height: 72px;
  color: var(--turquoise);
}

.block {
  margin: 20px 0;
  max-width: 62ch;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.block h3 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 8px;
}
.block p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
  font-weight: 500;
  color: var(--white);
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.actions .btn { width: auto; margin-top: 0; }

.messages,
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.28);
  max-height: min(52vh, 420px);
  overflow-y: auto;
}
.chat-row {
  display: flex;
  width: 100%;
}
.chat-row.actor { justify-content: flex-start; }
.chat-row.agent { justify-content: flex-end; }
.bubble {
  max-width: min(78%, 34rem);
  padding: 10px 12px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.bubble.actor {
  border-bottom-left-radius: 4px;
  background: rgba(197, 164, 110, 0.14);
  border-color: rgba(197, 164, 110, 0.28);
}
.bubble.agent {
  border-bottom-right-radius: 4px;
  background: rgba(29, 233, 182, 0.14);
  border-color: rgba(29, 233, 182, 0.28);
}
.bubble .by {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.bubble .by-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey);
}
.bubble.actor .by-name { color: var(--gold-hi); }
.bubble.agent .by-name { color: var(--turquoise); }
.bubble .by-time {
  font-size: 11px;
  font-weight: 600;
  color: rgba(142, 142, 142, 0.9);
  white-space: nowrap;
}
.bubble .body {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--white);
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.chat-compose .field {
  flex: 1;
  margin-bottom: 0;
}
.chat-compose textarea {
  min-height: 52px;
  max-height: 120px;
  resize: vertical;
}
.chat-compose .btn {
  flex: 0 0 auto;
  margin-top: 0;
  white-space: nowrap;
}

.empty {
  padding: 40px 24px;
  color: var(--grey);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 500;
}

.detail a {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.paste-box {
  min-height: 160px;
  font-size: 15px;
  line-height: 1.45;
  width: 100%;
}

.import-card {
  max-width: none;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 22px;
}
.import-card h3 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 8px;
}
.import-card p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.45;
}
.steps {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}
.steps strong { color: var(--white); font-weight: 800; }
a.bookmarklet {
  text-decoration: none;
  width: auto;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
a.bookmarklet:hover { text-decoration: none; }
.bookmarklet-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: 0 0 auto;
  display: block;
}
.hint {
  color: var(--grey) !important;
  font-size: 13px !important;
  margin-top: 10px !important;
}

.settings-wrap {
  max-width: 36rem;
}
.notify-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notify-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}
.notify-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
.notify-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--turquoise);
  cursor: pointer;
}
.notify-row-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.notify-row-copy strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}
.notify-row-copy span {
  font-size: 13px;
  color: var(--grey);
  line-height: 1.35;
}

.invite-code {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--turquoise);
  margin: 8px 0 12px;
  user-select: all;
}
.invite-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-card .label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 4px;
}
.stat-card .value {
  font-size: 28px;
  font-weight: 800;
  color: var(--turquoise);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.loading-overlay[hidden] { display: none; }
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(29, 233, 182, 0.2);
  border-top-color: var(--turquoise);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Connect Admin (/connect/admin) ---- */
.admin-gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}
.admin-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  backdrop-filter: blur(12px);
}
.admin-card img { margin-bottom: 14px; border-radius: 10px; }
.admin-card h1 { font-size: 28px; margin: 6px 0 8px; }
.admin-card .meta { color: var(--text-muted); margin: 0 0 18px; line-height: 1.45; }
.admin-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--turquoise);
}

.admin-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 20px 48px;
  min-height: 100dvh;
}
.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-brand img { border-radius: 10px; }
.admin-brand strong { display: block; font-size: 18px; }
.admin-brand span { color: var(--text-muted); font-size: 13px; }
.admin-top-actions { display: flex; gap: 8px; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.admin-stat {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.admin-stat strong {
  display: block;
  font-size: 28px;
  color: var(--turquoise);
  line-height: 1.1;
}
.admin-stat span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.admin-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-filters .chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.admin-filters .chip.on {
  background: var(--turquoise);
  border-color: var(--turquoise);
  color: #000;
}
.admin-search {
  flex: 1;
  min-width: 200px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
}
.admin-inline-err { margin-bottom: 10px; }

.admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 14px;
  min-height: 520px;
}
.admin-list,
.admin-detail {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  min-height: 420px;
}
.admin-list {
  overflow: auto;
  padding: 8px;
}
.admin-item {
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 10px;
  padding: 12px 12px;
  cursor: pointer;
  display: grid;
  gap: 2px;
}
.admin-item .kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--turquoise);
}
.admin-item strong { font-size: 15px; }
.admin-item span { color: var(--text-muted); font-size: 12px; }
.admin-item:hover { background: rgba(255, 255, 255, 0.04); }
.admin-item.on { background: var(--turquoise-dim); }
.admin-empty {
  padding: 28px 18px;
  color: var(--text-muted);
  text-align: center;
}
.admin-detail { padding: 20px 22px 28px; overflow: auto; }
.admin-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-detail-head h2 { font-size: 28px; margin: 4px 0 6px; }
.admin-detail-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.admin-block { margin-top: 18px; }
.admin-block h3 {
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-count {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(29, 233, 182, 0.16);
  color: var(--turquoise);
  font-size: 12px;
  padding: 0 7px;
}
.admin-people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.admin-people li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.admin-people.muted li { opacity: 0.78; }
.admin-people strong { font-size: 14px; }
.admin-people span,
.admin-people em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
}
.meta.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
}
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr; }
}

.sides-needed {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 50, 99, 0.45);
  background: rgba(255, 50, 99, 0.12);
  display: grid;
  gap: 4px;
}
.sides-needed strong {
  color: #ff8aa8;
  font-size: 14px;
}
.sides-needed span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}
.sides-needed-field {
  border: 1px solid rgba(29, 233, 182, 0.45);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(29, 233, 182, 0.06);
}

.import-card-primary {
  border-color: rgba(29, 233, 182, 0.35);
  background: rgba(29, 233, 182, 0.06);
}

.shell-views-import {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(29, 233, 182, 0.08), transparent 55%),
    transparent;
}

.import-detail .import-wrap {
  max-width: 640px;
}

.import-hero-head {
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(29, 233, 182, 0.16);
}

.import-hero-head h2 {
  margin: 0 0 8px;
}

.import-extension-hero {
  padding: 20px 20px 18px;
  margin-bottom: 14px;
}

.import-extension-hero h3 {
  font-size: 1.35rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--white);
  font-weight: 800;
  margin: 0 0 10px;
}

.import-drafts-card {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.import-alts-toggle {
  margin: 4px 0 14px;
}

.import-alts {
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.draft-chip {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.draft-chip-ok {
  color: #04110e;
  background: rgba(29, 233, 182, 0.85);
}
.draft-chip-warn {
  color: #1a1408;
  background: rgba(197, 164, 110, 0.85);
}
.sent-banner {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(29, 233, 182, 0.4);
  background: rgba(29, 233, 182, 0.1);
}
.sent-banner strong {
  display: block;
  color: var(--turquoise);
  margin-bottom: 4px;
}
.pre-wrap {
  white-space: pre-wrap;
  word-break: break-word;
}
.draft-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.draft-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  padding: 8px 8px 8px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
}
.draft-row:hover {
  border-color: rgba(29, 233, 182, 0.45);
  background: rgba(29, 233, 182, 0.08);
}
.draft-row-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.draft-row-delete {
  align-self: center;
  flex-shrink: 0;
  margin-right: 4px;
}
.draft-row strong {
  font-weight: 600;
}
.inbound-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.inbound-address {
  flex: 1;
  min-width: 200px;
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--panel-border);
  color: var(--turquoise);
  font-size: 13px;
  word-break: break-all;
}
.inbound-edit-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.inbound-edit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.inbound-edit-row input {
  flex: 1;
  min-width: 140px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.inbound-domain {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--turquoise);
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border-left: 1px solid var(--panel-border);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.2);
}
