:root {
  color-scheme: dark;
  --bg: #020817;
  --bg-2: #092451;
  --surface: rgba(7, 28, 62, 0.66);
  --surface-strong: rgba(8, 31, 67, 0.92);
  --text: #f6faff;
  --muted: rgba(220, 237, 255, 0.64);
  --dim: rgba(211, 231, 251, 0.44);
  --stroke: rgba(162, 215, 255, 0.18);
  --stroke-strong: rgba(121, 230, 255, 0.35);
  --blue: #62b7ff;
  --cyan: #79e6ff;
  --green: #68efaa;
  --amber: #ffd06d;
  --red: #ff7895;
  --shadow: 0 28px 80px rgba(0, 4, 18, 0.48);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100dvh;
  margin: 0;
  padding:
    max(22px, env(safe-area-inset-top))
    16px
    max(36px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(42, 131, 255, 0.34), transparent 34%),
    radial-gradient(circle at 96% 4%, rgba(39, 218, 255, 0.16), transparent 29%),
    linear-gradient(160deg, var(--bg-2), var(--bg) 66%);
  background-attachment: fixed;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
}

.ambient-one {
  top: 12%;
  left: -12rem;
  width: 26rem;
  height: 26rem;
  background: rgba(55, 143, 255, 0.13);
}

.ambient-two {
  right: -10rem;
  bottom: 4%;
  width: 24rem;
  height: 24rem;
  background: rgba(46, 224, 255, 0.09);
}

.accounts-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.glass-panel {
  border: 1px solid var(--stroke);
  background:
    linear-gradient(145deg, rgba(91, 188, 255, 0.07), transparent 54%),
    var(--surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 48px rgba(0, 5, 24, 0.24);
  backdrop-filter: blur(24px);
}

.login-view {
  display: grid;
  min-height: calc(100dvh - 80px);
  place-items: center;
}

.login-stage {
  display: grid;
  width: min(100%, 460px);
  gap: 16px;
}

.login-card {
  width: 100%;
  padding: clamp(28px, 6vw, 48px);
  border-radius: 28px;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  place-items: center;
  border: 1px solid rgba(121, 230, 255, 0.3);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(91, 188, 255, 0.38), rgba(18, 76, 145, 0.4));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 34px rgba(0, 10, 28, 0.3);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.section-label {
  margin: 0 0 7px;
  color: var(--cyan);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 0;
  font-size: 1rem;
  letter-spacing: -0.015em;
}

.login-copy {
  margin-bottom: 26px;
  color: var(--muted);
  line-height: 1.6;
}

.stack-form,
.dialog-fields {
  display: grid;
  gap: 16px;
}

label > span,
.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 47px;
  border: 1px solid rgba(162, 215, 255, 0.19);
  border-radius: 13px;
  background: rgba(1, 9, 23, 0.58);
  padding: 0 13px;
  box-shadow: inset 0 1px 8px rgba(0, 4, 18, 0.22);
}

input::placeholder {
  color: rgba(220, 237, 255, 0.34);
}

input:disabled,
select:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.primary-button,
.quiet-button,
.back-icon,
.accounts-link {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  padding: 0 16px;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  border: 1px solid rgba(111, 191, 244, 0.34);
  background:
    linear-gradient(145deg, rgba(65, 158, 216, 0.46), rgba(24, 82, 123, 0.4));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 9px 24px rgba(2, 18, 36, 0.2);
  color: #e2f6ff;
  font-size: 0.8rem;
  font-weight: 820;
}

.primary-button:hover {
  border-color: rgba(136, 211, 255, 0.6);
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
}

.primary-button.compact {
  min-height: 40px;
  padding-inline: 13px;
}

.primary-button svg,
.back-icon svg,
.search-box svg,
.summary-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quiet-button {
  border: 1px solid rgba(162, 215, 255, 0.16);
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
}

.quiet-button:hover {
  border-color: rgba(121, 230, 255, 0.3);
  background: rgba(121, 230, 255, 0.1);
  color: var(--text);
}

.login-home-link {
  min-height: 47px;
  width: 100%;
}

.form-message {
  min-height: 19px;
  margin: 0;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 6px 4px 20px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-brand h1 {
  margin: 0;
}

.back-icon {
  width: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--stroke);
  background: rgba(3, 15, 35, 0.58);
  color: var(--text);
}

.owner-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px;
  border-radius: 16px;
}

.owner-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 38px;
  border: 1px solid rgba(121, 230, 255, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(91, 188, 255, 0.33), rgba(18, 76, 145, 0.37));
  font-size: 0.74rem;
  font-weight: 900;
}

.owner-copy {
  display: grid;
  min-width: 108px;
  line-height: 1.1;
}

.owner-copy strong {
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-copy small {
  margin-top: 5px;
  color: var(--dim);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.summary-card {
  display: flex;
  min-height: 94px;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border-radius: 19px;
}

.summary-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  flex: 0 0 43px;
  border-radius: 14px;
}

.churches-icon {
  background: rgba(98, 183, 255, 0.14);
  color: #9fd7ff;
}

.staff-icon {
  background: rgba(104, 239, 170, 0.12);
  color: #9bf6c7;
}

.clients-icon {
  background: rgba(121, 230, 255, 0.12);
  color: #a6f0ff;
}

.attention-icon {
  background: rgba(255, 208, 109, 0.12);
  color: #ffe09a;
}

.summary-card small {
  display: block;
  margin-bottom: 5px;
  color: var(--dim);
  font-size: 0.65rem;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.summary-card strong {
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.account-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
  padding: 6px;
  border-radius: 17px;
}

.tab-button {
  min-height: 39px;
  flex: 1;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 820;
  cursor: pointer;
}

.tab-button:hover {
  background: rgba(121, 230, 255, 0.06);
  color: var(--text);
}

.tab-button.active {
  border: 1px solid rgba(121, 230, 255, 0.19);
  background:
    linear-gradient(145deg, rgba(65, 158, 216, 0.27), rgba(24, 82, 123, 0.23));
  color: #e2f6ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.management-frame {
  overflow: hidden;
  border-radius: 24px;
}

.management-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--stroke);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.search-box {
  position: relative;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--dim);
  transform: translateY(-50%);
}

.search-box input {
  width: min(30vw, 250px);
  min-height: 40px;
  padding-left: 37px;
}

.management-content {
  min-height: 530px;
}

.record-layout {
  display: grid;
  min-height: 530px;
  grid-template-columns: 330px minmax(0, 1fr);
}

.record-list {
  border-right: 1px solid var(--stroke);
  background: rgba(1, 10, 25, 0.18);
}

.record-list-header {
  padding: 13px 16px 8px;
  color: var(--dim);
  font-size: 0.67rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.record-button {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  padding: 13px 15px 13px 13px;
  text-align: left;
  cursor: pointer;
}

.record-button:hover {
  background: rgba(121, 230, 255, 0.055);
}

.record-button.active {
  border-left-color: var(--cyan);
  background:
    linear-gradient(90deg, rgba(84, 175, 236, 0.17), rgba(84, 175, 236, 0.035));
}

.record-avatar {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(121, 230, 255, 0.18);
  border-radius: 12px;
  background: rgba(91, 188, 255, 0.1);
  color: #dff5ff;
  font-size: 0.68rem;
  font-weight: 900;
}

.record-copy {
  min-width: 0;
}

.record-copy strong,
.record-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-copy strong {
  font-size: 0.82rem;
}

.record-copy small {
  margin-top: 5px;
  color: var(--dim);
  font-size: 0.66rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(104, 239, 170, 0.7);
}

.status-dot.inactive {
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 120, 149, 0.55);
}

.record-detail {
  min-width: 0;
  padding: 22px;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.detail-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.protected-badge,
.setup-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(104, 239, 170, 0.22);
  border-radius: 999px;
  background: rgba(104, 239, 170, 0.1);
  padding: 0 10px;
  color: #9bf6c7;
  font-size: 0.62rem;
  font-weight: 850;
  white-space: nowrap;
}

.demo-badge,
.setup-badge.demo {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(121, 230, 255, 0.38);
  border-radius: 999px;
  background: rgba(20, 94, 120, 0.34);
  padding: 0 8px;
  color: var(--cyan);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.record-copy strong .demo-badge {
  margin-left: 6px;
}

.detail-demo-badge {
  min-height: 25px;
  margin-left: 8px;
  transform: translateY(-3px);
}

.church-station-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 14px 0;
}

.church-station-row + .church-station-row {
  border-top: 1px solid rgba(86, 152, 219, 0.18);
}

.primary-station-badge {
  border: 1px solid rgba(88, 224, 201, 0.42);
  border-radius: 999px;
  color: #79ead5;
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-left: 7px;
  padding: 2px 6px;
  vertical-align: 2px;
}

.station-health {
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 7px 9px;
  white-space: nowrap;
}

.station-health.live {
  background: rgba(49, 211, 151, 0.12);
  border: 1px solid rgba(49, 211, 151, 0.38);
  color: #5be0aa;
}

.station-health.warning {
  background: rgba(255, 184, 77, 0.12);
  border: 1px solid rgba(255, 184, 77, 0.4);
  color: #ffc76f;
}

.demo-text {
  color: var(--cyan);
  font-weight: 850;
  letter-spacing: 0.04em;
}

.station-name {
  color: var(--cyan) !important;
  font-weight: 800;
}

.dialog-demo-row {
  margin-top: 16px;
}

.setup-badge.invited {
  border-color: rgba(255, 208, 109, 0.24);
  background: rgba(255, 208, 109, 0.1);
  color: #ffe09a;
}

.setup-badge.needs-invite {
  border-color: rgba(255, 120, 149, 0.24);
  background: rgba(255, 120, 149, 0.09);
  color: #ffafc0;
}

.detail-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--stroke);
}

.detail-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.detail-section-heading p {
  margin: 5px 0 0;
  color: var(--dim);
  font-size: 0.72rem;
  line-height: 1.45;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 16px;
}

.toggle-list {
  display: grid;
  gap: 8px;
}

.client-list {
  display: grid;
  gap: 9px;
}

.client-card {
  overflow: hidden;
  border: 1px solid rgba(162, 215, 255, 0.11);
  border-radius: 15px;
  background: rgba(1, 10, 25, 0.22);
}

.client-card[open] {
  border-color: rgba(121, 230, 255, 0.22);
  background: rgba(4, 18, 40, 0.52);
}

.client-card summary {
  display: grid;
  min-height: 62px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  list-style: none;
  cursor: pointer;
}

.client-card summary::-webkit-details-marker {
  display: none;
}

.client-card summary:hover {
  background: rgba(121, 230, 255, 0.045);
}

.client-chevron {
  color: var(--dim);
  font-size: 1rem;
  transition: transform 160ms ease;
}

.client-card[open] .client-chevron {
  transform: rotate(180deg);
}

.client-user-form {
  padding: 15px;
  border-top: 1px solid var(--stroke);
}

.client-status-row {
  margin-top: 15px;
}

.compact-empty-state {
  padding: 20px;
  border: 1px dashed rgba(162, 215, 255, 0.14);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.74rem;
  text-align: center;
}

.access-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 56px;
  padding: 9px 11px;
  border: 1px solid rgba(162, 215, 255, 0.1);
  border-radius: 14px;
  background: rgba(1, 10, 25, 0.22);
}

.access-row-copy {
  min-width: 0;
}

.access-row-copy strong,
.access-row-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-row-copy strong {
  font-size: 0.78rem;
}

.access-row-copy small {
  margin-top: 4px;
  color: var(--dim);
  font-size: 0.64rem;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 24px;
  margin: 0;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
}

.switch span {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(162, 215, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: 160ms ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(220, 237, 255, 0.65);
  transition: 160ms ease;
}

.switch input:checked + span {
  border-color: rgba(104, 239, 170, 0.38);
  background: rgba(104, 239, 170, 0.22);
}

.switch input:checked + span::after {
  background: #9bf6c7;
  transform: translateX(18px);
}

.switch input:disabled + span {
  opacity: 0.48;
  cursor: not-allowed;
}

.empty-state,
.loading-state {
  display: grid;
  min-height: 420px;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.loading-state {
  align-content: center;
  gap: 13px;
}

.spinner {
  width: 27px;
  height: 27px;
  border: 3px solid rgba(121, 230, 255, 0.14);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.activity-list {
  display: grid;
  gap: 9px;
  padding: 19px 22px 24px;
}

.activity-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 13px;
  border: 1px solid rgba(162, 215, 255, 0.1);
  border-radius: 14px;
  background: rgba(1, 10, 25, 0.22);
}

.activity-marker {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 12px rgba(98, 183, 255, 0.6);
}

.activity-copy strong {
  display: block;
  font-size: 0.78rem;
}

.activity-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.activity-time {
  color: var(--dim);
  font-size: 0.64rem;
  white-space: nowrap;
}

.account-dialog {
  width: min(calc(100% - 28px), 580px);
  max-height: min(84dvh, 760px);
  overflow: auto;
  border: 1px solid rgba(162, 215, 255, 0.23);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(35, 107, 166, 0.13), transparent 54%),
    #06162f;
  padding: 24px;
  color: var(--text);
  box-shadow: var(--shadow);
}

.account-dialog::backdrop {
  background: rgba(0, 4, 14, 0.72);
  backdrop-filter: blur(8px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.dialog-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.2rem;
  cursor: pointer;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.dialog-access-list {
  display: grid;
  max-height: 220px;
  gap: 7px;
  overflow: auto;
  padding-right: 4px;
}

.dialog-access-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border: 1px solid rgba(162, 215, 255, 0.1);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(1, 10, 25, 0.22);
}

.dialog-access-item strong {
  font-size: 0.76rem;
}

.scoped-church-note {
  border: 1px solid rgba(121, 230, 255, 0.16);
  border-radius: 13px;
  background: rgba(121, 230, 255, 0.07);
  padding: 12px 13px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.scoped-church-note strong {
  color: var(--text);
}

.invite-copy {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.invite-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.player-tools-header {
  margin-bottom: 16px;
}

.player-tools-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(121, 230, 255, 0.15);
  border-radius: 16px;
  background: rgba(2, 16, 35, 0.34);
  padding: 13px;
}

.player-tools-context div {
  min-width: 0;
}

.player-tools-context small,
.player-tools-context strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-tools-context small {
  margin-bottom: 5px;
  color: var(--dim);
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-tools-context strong {
  color: var(--text);
  font-size: 0.76rem;
}

.player-tools-guide {
  white-space: nowrap;
}

.player-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.player-tool-card {
  min-width: 0;
  border: 1px solid rgba(162, 215, 255, 0.13);
  border-radius: 17px;
  background:
    radial-gradient(circle at 100% 0, rgba(73, 156, 235, 0.11), transparent 43%),
    rgba(1, 10, 25, 0.28);
  padding: 15px;
}

.player-tool-card:first-child {
  grid-column: 1 / -1;
}

.player-tool-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.player-tool-number,
.player-tool-use,
.player-tool-size {
  color: var(--dim);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.player-tool-number {
  color: var(--cyan);
}

.player-tool-card h3 {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.player-tool-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.player-tool-size {
  display: block;
  margin-top: 10px;
  color: #9bc7e8;
  letter-spacing: 0.03em;
  text-transform: none;
}

.player-tool-code {
  display: block;
  overflow: auto;
  height: 76px;
  margin-top: 11px;
  border: 1px solid rgba(126, 192, 243, 0.12);
  border-radius: 11px;
  background: rgba(0, 7, 19, 0.5);
  padding: 10px;
  color: #cfe8ff;
  font: 600 0.59rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.player-tool-code:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.player-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}

.player-tool-actions .primary-button,
.player-tool-actions .quiet-button {
  min-height: 37px;
  padding-inline: 11px;
  font-size: 0.65rem;
}

.player-tools-note {
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 0.66rem;
  line-height: 1.5;
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100% - 36px));
  border: 1px solid rgba(104, 239, 170, 0.28);
  border-radius: 14px;
  background: rgba(7, 35, 52, 0.94);
  padding: 12px 15px;
  color: #a8f8ce;
  box-shadow: 0 16px 40px rgba(0, 4, 18, 0.38);
  font-size: 0.76rem;
  font-weight: 760;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .player-tools-grid {
    grid-template-columns: 1fr;
  }

  .player-tool-card:first-child {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  body {
    padding-inline: 10px;
  }

  .workspace-header {
    align-items: flex-start;
  }

  .owner-copy {
    display: none;
  }

  .owner-control .quiet-button {
    padding-inline: 10px;
  }

  .management-toolbar {
    display: grid;
  }

  .player-tools-context {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .player-tools-guide {
    justify-self: start;
  }

  .toolbar-actions {
    width: 100%;
  }

  .search-box {
    flex: 1;
  }

  .search-box input {
    width: 100%;
  }

  .record-layout {
    display: block;
  }

  .record-list {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--stroke);
    padding: 8px;
  }

  .record-list-header {
    display: none;
  }

  .record-button {
    width: min(82vw, 260px);
    flex: 0 0 auto;
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: 12px;
  }

  .record-button.active {
    border-bottom-color: var(--cyan);
  }

  .record-detail {
    padding: 18px 15px 22px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .detail-section-heading {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .workspace-header {
    gap: 10px;
  }

  .header-brand {
    gap: 10px;
  }

  .header-brand .section-label {
    display: none;
  }

  .header-brand h1 {
    font-size: 2rem;
  }

  .owner-avatar {
    display: none;
  }

  .summary-grid {
    gap: 8px;
  }

  .summary-card {
    min-height: 82px;
    padding: 12px;
  }

  .summary-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .summary-card strong {
    font-size: 1.3rem;
  }

  .account-tabs {
    overflow-x: auto;
  }

  .tab-button {
    min-width: 100px;
    flex: 0 0 auto;
  }

  .client-card summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .client-card summary .setup-badge {
    display: none;
  }

  .toolbar-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .primary-button.compact span {
    display: none;
  }

  .management-toolbar,
  .activity-list {
    padding-inline: 14px;
  }

  .detail-header {
    display: grid;
  }

  .invite-link-row {
    grid-template-columns: 1fr;
  }
}

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


/* Station connection success */
.connection-passed,
.connection-passed:hover,
.connection-passed:focus-visible {
  color: #9af5c8 !important;
  background: rgba(26, 156, 105, 0.24) !important;
  border-color: rgba(91, 232, 169, 0.75) !important;
  box-shadow: 0 0 22px rgba(26, 156, 105, 0.14) !important;
}
