:root {
  color-scheme: dark;
  --bg: #090b13;
  --surface: rgba(24, 27, 43, 0.72);
  --surface-2: rgba(35, 38, 58, 0.78);
  --ink: #f4eff8;
  --muted: #b3b1c4;
  --line: rgba(151, 163, 207, 0.18);
  --strong-line: rgba(183, 151, 255, 0.5);
  --accent: #8556d8;
  --accent-strong: #a572f2;
  --gold: #f2d36a;
  --danger: #d98989;
  --now-color: #ad1fff;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
  --hour-height: 28px;
  --day-header-height: 74px;
  --time-axis-width: 64px;
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 17, 0.96), rgba(38, 28, 48, 0.88) 52%, rgba(7, 8, 14, 0.98)),
    linear-gradient(135deg, #211a2d 0%, #101827 38%, #2a2030 72%, #090b13 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid rgba(169, 139, 255, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(46, 48, 70, 0.9), rgba(20, 23, 38, 0.9));
  color: var(--ink);
  cursor: pointer;
  min-height: 38px;
  padding: 0 14px;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

button:hover {
  border-color: var(--strong-line);
  background: linear-gradient(180deg, rgba(63, 56, 92, 0.95), rgba(28, 29, 48, 0.95));
}

button:disabled,
button:disabled:hover {
  border-color: rgba(151, 163, 207, 0.14);
  background: rgba(18, 20, 32, 0.55);
  color: rgba(244, 239, 248, 0.42);
  cursor: not-allowed;
  transform: none;
}

button:active {
  transform: translateY(1px);
}

a.button-link {
  align-items: center;
  border: 1px solid rgba(169, 139, 255, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(133, 86, 216, 0.92), rgba(87, 54, 143, 0.92));
  border-color: rgba(196, 152, 255, 0.62);
  color: white;
  display: inline-flex;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a.button-link:focus-visible {
  outline: 3px solid rgba(165, 114, 242, 0.32);
  outline-offset: 2px;
}

.app-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 16px 22px 22px;
}

.login-shell {
  align-items: center;
  display: flex;
  min-height: 100vh;
  padding: 18px;
  justify-content: center;
}

.login-panel {
  background:
    linear-gradient(180deg, rgba(35, 37, 57, 0.88), rgba(15, 18, 31, 0.88));
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(126, 149, 207, 0.28);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  max-width: 520px;
  padding: 22px;
  width: min(100%, 520px);
}

.login-panel h1 {
  font-size: clamp(2rem, 7vw, 3.8rem);
  line-height: 0.95;
  margin: 0;
}

.login-form {
  display: grid;
  gap: 8px;
}

.login-form label {
  color: #c6bfd8;
  font-size: 0.78rem;
  font-weight: 720;
  text-transform: uppercase;
}

.login-form .inline-form input {
  flex: 1 1 auto;
  width: auto;
}

.login-actions {
  justify-content: flex-start;
}

.account-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 22px;
}

.account-panel {
  background:
    linear-gradient(180deg, rgba(35, 37, 57, 0.9), rgba(15, 18, 31, 0.92));
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(126, 149, 207, 0.28);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  overflow: hidden;
  width: min(100%, 1080px);
}

.notifications-panel,
.profile-panel {
  width: min(100%, 1240px);
}

.account-header {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 16px 20px;
}

.account-header h1 {
  font-size: 1.45rem;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

.account-header-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

a.button-link-muted {
  background: rgba(16, 19, 33, 0.66);
  border-color: rgba(151, 163, 207, 0.26);
  color: #ddd9e7;
}

a.schedule-link {
  background: linear-gradient(180deg, rgba(133, 86, 216, 0.96), rgba(87, 54, 143, 0.96));
  border-color: rgba(196, 152, 255, 0.68);
  color: #fff;
  font-weight: 720;
}

a.schedule-link:hover {
  background: linear-gradient(180deg, rgba(151, 99, 235, 0.98), rgba(98, 60, 162, 0.98));
  border-color: rgba(215, 183, 255, 0.82);
}

.discord-connect {
  border-top: 1px solid var(--line);
  display: grid;
  min-height: 220px;
  padding: 24px;
  place-items: center;
}

.discord-button {
  background: linear-gradient(180deg, rgba(112, 88, 205, 0.96), rgba(73, 58, 154, 0.96));
  border-color: rgba(190, 174, 255, 0.62);
  color: #fff;
  font-weight: 740;
  min-height: 44px;
  padding: 0 20px;
}

.profile-login-stack {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 620px;
  width: 100%;
}

.profile-entry-video-placeholder {
  align-items: center;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 42%, rgba(133, 86, 216, 0.18), transparent 42%),
    rgba(9, 12, 23, 0.72);
  border: 1px dashed rgba(196, 152, 255, 0.38);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  gap: 10px;
  justify-content: center;
  max-width: 520px;
  width: 100%;
}

.profile-entry-video-icon {
  align-items: center;
  background: rgba(133, 86, 216, 0.24);
  border: 1px solid rgba(196, 152, 255, 0.48);
  border-radius: 50%;
  color: #eadfff;
  display: inline-flex;
  font-size: 0.82rem;
  height: 42px;
  justify-content: center;
  padding-left: 2px;
  width: 42px;
}

.profile-login-fallback {
  border-top: 1px solid rgba(151, 163, 207, 0.2);
  color: var(--muted);
  max-width: 460px;
  padding-top: 14px;
  text-align: center;
  width: 100%;
}

.profile-login-fallback summary {
  color: #d9d4e4;
  cursor: pointer;
  font-size: 0.82rem;
}

.profile-login-fallback p {
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 10px 0 12px;
}

.profile-login-fallback .discord-button {
  min-height: 38px;
}

.profile-connect-copy {
  display: grid;
  gap: 7px;
  justify-items: center;
  max-width: 590px;
  text-align: center;
}

.profile-connect-copy h2,
.profile-connect-copy p {
  margin: 0;
}

.profile-connect-copy h2 {
  font-size: 1.2rem;
}

.profile-connect-copy p {
  color: var(--muted);
  line-height: 1.45;
}

.profile-connect-copy .profile-privacy-note {
  color: #cdbbff;
  font-size: 0.78rem;
}

.profile-membership-gate {
  gap: 18px;
}

.profile-gate-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.content-state:not(.is-active) {
  display: none !important;
}

.content-state-body {
  align-items: center;
  color: #ded8e8;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.content-state-body strong {
  font-size: 0.88rem;
  letter-spacing: 0;
}

.content-state.is-error .content-state-body strong {
  color: #ffc3c3;
}

.loading-spinner {
  animation: loading-spin 0.8s linear infinite;
  border: 2px solid rgba(169, 139, 255, 0.2);
  border-radius: 50%;
  border-top-color: #a98bff;
  height: 22px;
  width: 22px;
}

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

.account-content {
  border-top: 1px solid var(--line);
  display: grid;
}

.account-identity-row {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 12px 20px;
}

.account-identity {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.account-identity > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-avatar {
  border: 1px solid rgba(169, 139, 255, 0.4);
  border-radius: 50%;
  height: 38px;
  object-fit: cover;
  width: 38px;
}

.account-role {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.account-role-edit-link {
  color: #cdbbff;
  font-size: 0.72rem;
  font-weight: 680;
  text-decoration-color: rgba(205, 187, 255, 0.52);
  text-underline-offset: 3px;
  width: fit-content;
}

.account-role-edit-link:hover,
.account-role-edit-link:focus-visible {
  color: #efe8ff;
  text-decoration-color: currentColor;
}

.account-role-edit-link:focus-visible {
  border-radius: 3px;
  outline: 2px solid rgba(165, 114, 242, 0.5);
  outline-offset: 3px;
}

.account-actions,
.preference-actions,
.preference-pair-form {
  align-items: center;
  display: flex;
  gap: 8px;
}

.sign-out-button {
  color: var(--muted);
}

.toggle-row.solo-ai-toggle {
  border-color: rgba(169, 139, 255, 0.34);
  color: #e5dcff;
}

.solo-ai-summary {
  align-items: center;
  border-color: rgba(169, 139, 255, 0.34);
  color: #e5dcff;
  display: inline-flex;
  gap: 8px;
  max-width: 100%;
  text-align: left;
  width: fit-content;
}

.solo-ai-summary.is-enabled {
  background: linear-gradient(180deg, rgba(92, 61, 148, 0.92), rgba(49, 35, 84, 0.92));
  border-color: rgba(196, 152, 255, 0.62);
}

.solo-ai-state {
  color: #cdbbff;
  font-size: 0.7rem;
  font-weight: 820;
  margin-left: auto;
}

.solo-ai-summary-arrow {
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}

.toggle-row.solo-ai-toggle input {
  accent-color: #a98bff;
}

.solo-ai-toggle-symbol {
  font-size: 0.9rem;
}

.preference-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 16px 20px 18px;
}

.notifications-section {
  gap: 0;
  padding-bottom: 18px;
}

.notifications-header {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 14px;
}

.notifications-header-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.notifications-header h2 {
  font-size: 1.28rem;
  letter-spacing: 0;
  margin: 0;
}

.notifications-header p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
  margin: 0;
}

.bell-toggle {
  align-items: center;
  align-self: center;
  background: rgba(16, 19, 33, 0.66);
  border-color: rgba(151, 163, 207, 0.26);
  color: var(--muted);
  display: inline-flex;
  justify-content: center;
  min-width: 68px;
  padding: 0 11px;
}

.bell-toggle:hover {
  background: rgba(169, 139, 255, 0.1);
  border-color: rgba(169, 139, 255, 0.5);
}

.bell-toggle:focus-visible {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(133, 86, 216, 0.2);
  outline: none;
}

.bell-toggle.is-enabled {
  background: linear-gradient(180deg, rgba(84, 58, 130, 0.88), rgba(42, 34, 72, 0.88));
  border-color: rgba(196, 152, 255, 0.58);
  color: #eee6ff;
}

.bell-toggle:disabled,
.bell-toggle:disabled:hover {
  background: rgba(18, 20, 32, 0.55);
  border-color: rgba(151, 163, 207, 0.14);
  color: rgba(244, 239, 248, 0.42);
}

.bell-toggle-state {
  align-items: center;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  gap: 7px;
  letter-spacing: 0.05em;
}

.bell-toggle-state svg {
  height: 18px;
  width: 18px;
}

.bell-toggle-state-on {
  display: none;
}

.bell-toggle.is-enabled .bell-toggle-state-off {
  display: none;
}

.bell-toggle.is-enabled .bell-toggle-state-on {
  display: inline-flex;
}

.notification-groups {
  background: rgba(8, 11, 22, 0.24);
  border: 1px solid rgba(151, 163, 207, 0.16);
  border-radius: 6px;
  overflow: hidden;
}

.notification-type-group {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.notification-type-group + .notification-type-group {
  border-top: 1px solid rgba(151, 163, 207, 0.16);
}

.notification-type-header {
  display: grid;
  gap: 4px;
}

.notification-type-title-row {
  align-items: center;
  display: flex;
  gap: 8px;
}

.notification-type-title-row h3 {
  font-size: 1rem;
  letter-spacing: 0;
  margin: 0;
}

.notification-time-header {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.notification-time-header > div:first-child {
  display: grid;
  gap: 4px;
}

.timezone-update-notice {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(106, 67, 173, 0.3), rgba(56, 39, 94, 0.22));
  border: 1px solid rgba(196, 152, 255, 0.54);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 14px;
}

.timezone-update-notice-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.timezone-update-notice-copy strong {
  color: #f4efff;
  font-size: 0.88rem;
}

.timezone-update-notice-copy p {
  color: #c8c1d7;
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.timezone-update-button {
  background: linear-gradient(180deg, rgba(151, 101, 231, 0.98), rgba(101, 61, 164, 0.98));
  border-color: rgba(220, 186, 255, 0.82);
  color: white;
  font-weight: 720;
  max-width: 100%;
}

.timezone-update-button:hover {
  background: linear-gradient(180deg, rgba(169, 119, 246, 1), rgba(116, 70, 185, 1));
  border-color: rgba(235, 213, 255, 0.94);
}

.timezone-update-notice.is-pending {
  background: rgba(35, 38, 58, 0.5);
  border-color: rgba(169, 139, 255, 0.28);
}

.timezone-update-notice.is-pending .timezone-update-button {
  background: linear-gradient(180deg, rgba(46, 48, 70, 0.9), rgba(20, 23, 38, 0.9));
  border-color: rgba(169, 139, 255, 0.34);
  color: #e4dcef;
  font-weight: 650;
}

.timezone-update-notice.is-pending .timezone-update-button:hover {
  background: linear-gradient(180deg, rgba(63, 56, 92, 0.95), rgba(28, 29, 48, 0.95));
  border-color: var(--strong-line);
}

.notification-add-pair-button,
.notification-type-group .solo-ai-summary {
  justify-self: start;
}

.preference-header {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.preference-header h2 {
  font-size: 1rem;
  letter-spacing: 0;
  margin: 0;
}

.preference-subheading {
  color: #ded7e8;
  font-size: 0.82rem;
  letter-spacing: 0;
  margin: 0;
}

.preference-subsection-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.compact-action-button {
  min-height: 32px;
  padding: 0 11px;
}

.primary-action-button {
  background: linear-gradient(180deg, rgba(133, 86, 216, 0.92), rgba(87, 54, 143, 0.92));
  border-color: rgba(196, 152, 255, 0.62);
  color: white;
}

.primary-action-button:hover {
  background: linear-gradient(180deg, rgba(151, 101, 231, 0.96), rgba(101, 61, 164, 0.96));
  border-color: rgba(220, 186, 255, 0.78);
}

.preference-header > div:first-child {
  display: grid;
  gap: 4px;
}

.interaction-hint {
  color: #f2d36a;
  font-weight: 700;
}

.preference-pair-form {
  align-items: stretch;
  background: rgba(12, 15, 28, 0.42);
  border: 1px solid rgba(151, 163, 207, 0.18);
  border-radius: 8px;
  flex-wrap: wrap;
  padding: 10px;
}

.preference-pair-form select {
  min-width: 180px;
}

.preference-pair-form .pair-confirm-button {
  background: linear-gradient(180deg, rgba(133, 86, 216, 0.92), rgba(87, 54, 143, 0.92));
  border-color: rgba(196, 152, 255, 0.62);
  color: white;
}

.pair-editor-separator {
  align-self: center;
  color: var(--muted);
  font-weight: 760;
}

.pair-preference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pair-preference-list:empty {
  display: none;
}

.pair-preference {
  align-items: center;
  background: linear-gradient(180deg, rgba(109, 71, 176, 0.82), rgba(61, 42, 105, 0.82));
  border: 1px solid rgba(196, 152, 255, 0.58);
  border-radius: 8px;
  display: inline-flex;
  gap: 9px;
  min-height: 36px;
  padding: 0 4px 0 11px;
}

.pair-preference-label {
  color: white;
  font-size: 0.82rem;
  font-weight: 680;
  white-space: nowrap;
}

.pair-remove-button {
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  height: 28px;
  min-height: 28px;
  padding: 0;
  width: 28px;
}

.pair-remove-button:hover {
  background: rgba(217, 137, 137, 0.12);
  color: #ffc3c3;
}

.empty-state {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}

.language-pair-options {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.preference-grid-scroller {
  border: 1px solid rgba(151, 163, 207, 0.2);
  border-radius: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.session-match-dot {
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  box-shadow: 0 0 7px currentColor;
  display: inline-block;
  flex: 0 0 auto;
  height: 8px;
  transition: opacity 140ms ease, box-shadow 140ms ease;
  width: 8px;
}

.session-match-dot.is-solo-ai {
  background: #58d68d;
  color: rgba(88, 214, 141, 0.62);
}

.session-match-dot.is-hosted {
  background: #a98bff;
  color: rgba(169, 139, 255, 0.64);
}

.session-match-dot.is-muted {
  box-shadow: none;
  opacity: 0.24;
}

.session-match-preview-status {
  color: var(--muted);
  font-size: 0.7rem;
}

.session-match-preview-status.is-error {
  color: #ffb3b3;
}

.session-match-preview-status:empty {
  display: none;
}

.time-preference-grid {
  background: rgba(7, 10, 20, 0.52);
  display: grid;
  grid-template-columns: 60px repeat(7, minmax(76px, 1fr));
  min-width: 660px;
  touch-action: pan-x;
  user-select: none;
}

.time-preference-grid.is-painting {
  cursor: crosshair;
}

.preference-hint {
  color: var(--muted);
  font-size: 0.72rem;
  margin: 4px 0 0;
}

.preference-grid-corner,
.preference-day-heading,
.preference-hour-label {
  align-items: center;
  background: rgba(27, 30, 48, 0.94);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: flex;
  height: 30px;
  justify-content: center;
}

.preference-day-heading {
  color: #e9e5f2;
  font-size: 0.76rem;
  font-weight: 760;
  text-transform: uppercase;
}

.preference-hour-label {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  position: sticky;
  left: 0;
  z-index: 2;
}

.time-preference-button {
  background:
    linear-gradient(180deg, rgba(127, 183, 255, 0.08), rgba(10, 13, 25, 0.28));
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  border-right: 1px solid var(--line);
  min-height: 30px;
  padding: 0;
  position: relative;
}

.time-preference-button:hover {
  background: rgba(169, 139, 255, 0.14);
}

.time-preference-markers {
  display: flex;
  gap: 3px;
  opacity: 1;
  pointer-events: none;
  position: absolute;
  right: 5px;
  top: 4px;
  transition: opacity 140ms ease;
}

.time-preference-grid.is-preview-updating .time-preference-markers {
  opacity: 0.32;
}

.time-preference-markers .session-match-dot {
  height: 6px;
  width: 6px;
}

.time-preference-button::after {
  background: transparent;
  border: 1px solid rgba(169, 139, 255, 0.3);
  border-radius: 3px;
  content: "";
  height: 12px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
}

.time-preference-button.is-selected {
  background:
    linear-gradient(180deg, rgba(242, 211, 106, 0.22), rgba(103, 77, 32, 0.18));
}

.time-preference-button.is-selected::after {
  background: var(--gold);
  border-color: #ffe895;
  box-shadow: 0 0 12px rgba(242, 211, 106, 0.3);
}

.account-status {
  border-top: 1px solid var(--line);
  margin: 0;
  min-height: 40px;
  padding: 12px 22px;
}

.account-status:empty {
  display: none;
}

.account-status.is-error {
  color: #ffb3b3;
}

.save-options-button {
  background: linear-gradient(180deg, rgba(133, 86, 216, 0.96), rgba(87, 54, 143, 0.96));
  border-color: rgba(196, 152, 255, 0.68);
  color: white;
  min-width: 76px;
}

.save-options-button:not(:disabled):hover {
  background: linear-gradient(180deg, rgba(151, 99, 235, 0.98), rgba(98, 60, 162, 0.98));
  border-color: rgba(215, 183, 255, 0.82);
}

.timeline-header h2,
.panel-heading h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

.timezone-label {
  color: var(--muted);
  font-size: 0.94rem;
  margin: 0;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: min(100%, 440px);
}

.field-group {
  display: grid;
  gap: 7px;
}

.field-group label {
  color: #c6bfd8;
  font-size: 0.78rem;
  font-weight: 720;
  text-transform: uppercase;
}

.inline-form {
  display: flex;
  gap: 8px;
}

.inline-form input {
  width: min(42vw, 210px);
}

.pair-form {
  display: flex;
  gap: 8px;
}

.pair-form select {
  width: 150px;
}

.auth-controls .inline-form {
  align-items: center;
}

input,
select {
  border: 1px solid rgba(151, 163, 207, 0.32);
  border-radius: 8px;
  background: rgba(10, 13, 25, 0.72);
  color: var(--ink);
  min-height: 38px;
  padding: 0 12px;
}

select {
  -webkit-appearance: none;
  appearance: none;
  background-color: #0a0d19;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b3b1c4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 16px;
  color-scheme: dark;
  cursor: pointer;
  padding-right: 34px;
}

select option,
select optgroup {
  background-color: #0a0d19;
  color: var(--ink);
}

select:disabled {
  color: rgba(244, 239, 248, 0.42);
  cursor: not-allowed;
}

.toggle-row {
  align-items: center;
  border: 1px solid rgba(242, 211, 106, 0.38);
  border-radius: 8px;
  color: var(--gold);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 760;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  text-transform: none;
}

.toggle-row input {
  accent-color: var(--gold);
  min-height: 0;
  padding: 0;
}

.recurring-controls .toggle-row {
  border-color: rgba(127, 183, 255, 0.36);
  color: #cfe3ff;
}

.recurring-controls .toggle-row input {
  accent-color: #7fb7ff;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.timeline-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.header-icon-button {
  align-items: center;
  background: linear-gradient(180deg, rgba(31, 34, 52, 0.92), rgba(11, 14, 27, 0.92));
  border-color: rgba(169, 139, 255, 0.28);
  color: #cdbaff;
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  position: relative;
  width: 38px;
}

.header-icon-button:hover,
.header-icon-button:focus-visible {
  color: #eadfff;
}

.header-icon-button.is-active {
  background: linear-gradient(180deg, rgba(83, 69, 43, 0.92), rgba(31, 27, 27, 0.94));
  border-color: rgba(242, 211, 106, 0.58);
  color: var(--gold);
}

.header-icon-button.is-active::after {
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(242, 211, 106, 0.5);
  content: "";
  height: 5px;
  position: absolute;
  right: 5px;
  top: 5px;
  width: 5px;
}

.header-icon-button svg {
  height: 18px;
  width: 18px;
}

.toolbar-actions button:first-child,
.inline-form button {
  background: linear-gradient(180deg, rgba(133, 86, 216, 0.92), rgba(87, 54, 143, 0.92));
  border-color: rgba(196, 152, 255, 0.62);
  color: white;
}

.toolbar-actions button:first-child:hover,
.inline-form button:hover {
  background: linear-gradient(180deg, rgba(165, 114, 242, 0.96), rgba(101, 63, 166, 0.96));
  border-color: rgba(225, 192, 255, 0.76);
}

.toolbar-actions button:disabled,
.toolbar-actions button:disabled:hover,
.inline-form button:disabled,
.inline-form button:disabled:hover {
  border-color: rgba(151, 163, 207, 0.14);
  background: rgba(18, 20, 32, 0.55);
  color: rgba(244, 239, 248, 0.42);
}

.status-text {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
  margin: 3px 0 0;
  min-height: 1em;
}

.modal-backdrop {
  align-items: center;
  background: rgba(4, 6, 14, 0.68);
  backdrop-filter: blur(10px);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 20;
}

.schedule-dialog,
.session-details-dialog,
.filter-dialog,
.notifications-dialog {
  background:
    linear-gradient(180deg, rgba(35, 37, 57, 0.96), rgba(14, 17, 30, 0.96));
  border: 1px solid rgba(169, 139, 255, 0.34);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  max-height: min(720px, calc(100vh - 36px));
  max-width: 640px;
  overflow: auto;
  padding: 18px;
  width: min(100%, 640px);
}

.session-details-dialog {
  max-width: 420px;
  width: min(100%, 420px);
}

.filter-dialog,
.notifications-dialog {
  max-width: 440px;
  width: min(100%, 440px);
}

.modal-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.modal-header h2 {
  font-size: 1.1rem;
  line-height: 1;
  margin: 0;
}

.icon-button {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  font-size: 1rem;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  width: 34px;
}

.schedule-time {
  background: rgba(9, 12, 24, 0.72);
  border: 1px solid rgba(151, 163, 207, 0.22);
  border-radius: 8px;
  color: #eadfff;
  font-size: 0.94rem;
  font-weight: 720;
  line-height: 1.35;
  margin: 0;
  padding: 12px 14px;
}

.schedule-fields {
  display: grid;
  gap: 14px;
}

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

.filter-fields label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.filter-fields label > span {
  color: #c6bfd8;
  font-size: 0.78rem;
  font-weight: 720;
  text-transform: uppercase;
}

.filter-fields select {
  min-width: 0;
  width: 100%;
}

.confirmation-copy {
  color: #d8d2e2;
  line-height: 1.45;
  margin: 0;
}

.solo-ai-info-copy {
  display: grid;
  gap: 12px;
}

.game-session-notifications-copy {
  display: grid;
  gap: 12px;
}

.game-session-notifications-modal-toggle {
  align-items: center;
  background: rgba(13, 16, 29, 0.72);
  border: 1px solid rgba(169, 139, 255, 0.26);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.game-session-notifications-modal-toggle[hidden] {
  display: none;
}

.game-session-notifications-modal-toggle:focus-within {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(133, 86, 216, 0.18);
}

.game-session-notifications-modal-toggle-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.game-session-notifications-modal-toggle-copy strong {
  color: #f1eaf8;
  font-size: 0.88rem;
}

.game-session-notifications-modal-toggle-copy > span {
  color: var(--muted);
  font-size: 0.74rem;
}

.game-session-notifications-modal-toggle-control {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  position: relative;
}

.game-session-notifications-modal-toggle-control input {
  height: 1px;
  min-height: 0;
  opacity: 0;
  padding: 0;
  position: absolute;
  width: 1px;
}

.game-session-notifications-modal-toggle-track {
  background: rgba(72, 76, 99, 0.72);
  border: 1px solid rgba(183, 187, 216, 0.34);
  border-radius: 999px;
  display: inline-flex;
  height: 24px;
  padding: 2px;
  transition:
    background 140ms ease,
    border-color 140ms ease;
  width: 42px;
}

.game-session-notifications-modal-toggle-thumb {
  background: #b9b6c4;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  height: 18px;
  transform: translateX(0);
  transition:
    background 140ms ease,
    transform 140ms ease;
  width: 18px;
}

.game-session-notifications-modal-toggle-control input:checked +
  .game-session-notifications-modal-toggle-track {
  background: rgba(114, 68, 190, 0.9);
  border-color: rgba(202, 166, 255, 0.8);
}

.game-session-notifications-modal-toggle-control input:checked +
  .game-session-notifications-modal-toggle-track
  .game-session-notifications-modal-toggle-thumb {
  background: #f5efff;
  transform: translateX(16px);
}

.game-session-notifications-modal-toggle-control input:focus-visible +
  .game-session-notifications-modal-toggle-track {
  outline: 2px solid rgba(196, 152, 255, 0.9);
  outline-offset: 3px;
}

.game-session-notifications-modal-toggle-control input:disabled +
  .game-session-notifications-modal-toggle-track {
  opacity: 0.52;
}

.game-session-notifications-modal-state {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 820;
  min-width: 24px;
}

.game-session-notifications-modal-toggle-control input:checked ~
  .game-session-notifications-modal-state {
  color: #d9c7ff;
}

.notification-scope-note {
  background: rgba(169, 139, 255, 0.08);
  border: 1px solid rgba(169, 139, 255, 0.2);
  border-radius: 8px;
  color: #e1d9ee;
  line-height: 1.45;
  margin: 0;
  padding: 11px 12px;
}

.notification-unsaved-note {
  color: #d8c892;
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0;
}

.solo-ai-modal-toggle {
  justify-self: stretch;
}

.language-toggle-group {
  border: 0;
  display: grid;
  gap: 8px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.language-toggle-group legend {
  color: #c6bfd8;
  font-size: 0.78rem;
  font-weight: 720;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.language-toggle-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.language-toggle {
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: 0 10px;
  text-align: left;
}

.language-toggle.is-selected {
  background: linear-gradient(180deg, rgba(133, 86, 216, 0.92), rgba(87, 54, 143, 0.92));
  border-color: rgba(225, 192, 255, 0.7);
  color: white;
}

.language-toggle:disabled {
  opacity: 0.36;
}

.repeat-row {
  justify-self: start;
}

.schedule-error {
  color: #ffb3b3;
  margin: 0;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal-actions button:last-child {
  background: linear-gradient(180deg, rgba(133, 86, 216, 0.92), rgba(87, 54, 143, 0.92));
  border-color: rgba(196, 152, 255, 0.62);
  color: white;
}

.filter-dialog #filterClearButton {
  margin-right: auto;
}

.session-details-dialog .modal-actions button:last-child {
  background: linear-gradient(180deg, rgba(150, 64, 72, 0.96), rgba(91, 37, 48, 0.96));
  border-color: rgba(255, 159, 169, 0.58);
}

.session-details-list {
  border-bottom: 1px solid rgba(151, 163, 207, 0.18);
  border-top: 1px solid rgba(151, 163, 207, 0.18);
  display: grid;
  margin: 0;
}

.session-details-list > div {
  display: grid;
  gap: 14px;
  grid-template-columns: 104px minmax(0, 1fr);
  padding: 12px 2px;
}

.session-details-list > div + div {
  border-top: 1px solid rgba(151, 163, 207, 0.12);
}

.session-details-list dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.45;
  text-transform: uppercase;
}

.session-details-list dd {
  color: #f1eaf8;
  font-size: 0.9rem;
  font-weight: 680;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0 auto;
  max-width: 1380px;
  width: 100%;
}

.people-panel,
.timeline-panel {
  background:
    linear-gradient(180deg, rgba(35, 37, 57, 0.72), rgba(15, 18, 31, 0.72));
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(126, 149, 207, 0.28);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.people-panel {
  align-items: start;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px;
}

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading h2,
.timeline-header h2 {
  font-size: 1.05rem;
}

.meta-pill {
  align-items: center;
  background: rgba(242, 211, 106, 0.13);
  border: 1px solid rgba(242, 211, 106, 0.45);
  border-radius: 999px;
  color: var(--gold);
  display: inline-flex;
  font-size: 0.77rem;
  font-weight: 760;
  min-height: 28px;
  padding: 0 10px;
  white-space: nowrap;
}

.people-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

.person-button {
  align-items: center;
  background: transparent;
  border-color: transparent;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  justify-items: start;
  min-height: 42px;
  padding: 0 8px;
  text-align: left;
  width: 190px;
}

.person-button:hover,
.person-button.is-active {
  background: rgba(127, 183, 255, 0.08);
  border-color: rgba(127, 183, 255, 0.28);
}

.person-button:disabled {
  color: var(--ink);
  cursor: default;
  opacity: 0.78;
}

.person-button:disabled:hover {
  background: transparent;
  border-color: transparent;
}

.person-button.is-active {
  box-shadow:
    inset 0 0 0 1px rgba(169, 139, 255, 0.34),
    0 0 20px rgba(127, 183, 255, 0.08);
}

.person-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.person-name,
.person-meta {
  font-weight: 690;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-meta {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 660;
}

.person-count {
  color: var(--muted);
  font-size: 0.78rem;
}

.people-empty {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.82rem;
  min-height: 42px;
}

.timeline-panel {
  min-width: 0;
  overflow: hidden;
}

.timeline-content {
  position: relative;
}

.content-state-overlay {
  background: rgba(8, 10, 20, 0.8);
  backdrop-filter: blur(2px);
  inset: 0;
  position: absolute;
  z-index: 12;
}

.content-state-overlay.is-active {
  display: grid;
  place-items: center;
}

.timeline-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  min-height: 48px;
  padding: 10px 18px;
}

.schedule-title {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

.selection-output {
  color: var(--muted);
  font-size: 0.86rem;
  grid-column: 1 / -1;
  min-height: 1.2em;
  text-align: right;
}

.selection-output:empty {
  display: none;
}

.timeline-scroller {
  background: rgba(8, 11, 22, 0.32);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

.timeline-canvas {
  cursor: default;
  min-width: 1080px;
  position: relative;
  user-select: none;
}

.timeline-canvas.is-readonly {
  cursor: default;
}

.hour-layer,
.day-layer,
.blocks-layer {
  inset: 0;
  position: absolute;
}

.blocks-layer {
  inset: 0;
}

.hour-row {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: var(--time-axis-width) 1fr;
  height: var(--hour-height);
  left: 0;
  position: absolute;
  right: 0;
}

.hour-label {
  align-items: center;
  background: rgba(9, 12, 24, 0.86);
  border-right: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 0.68rem;
  font-weight: 720;
  justify-content: center;
  left: 0;
  line-height: 1;
  position: sticky;
  z-index: 6;
}

.hour-label span {
  background: rgba(9, 12, 24, 0.76);
  border: 1px solid rgba(151, 163, 207, 0.22);
  border-radius: 999px;
  padding: 3px 6px;
}

.hour-fill {
  position: relative;
  background:
    linear-gradient(to right, rgba(151, 163, 207, 0.18) 1px, transparent 1px)
      0 0 / calc((100%) / 7) 100%,
    linear-gradient(to bottom, rgba(151, 163, 207, 0.16), transparent 38%);
}

.day-column {
  --day-accent: #7fb7ff;
  --day-bg: rgba(127, 183, 255, 0.1);
  --day-border: rgba(127, 183, 255, 0.28);
  --day-date-color: #a9cffb;
  --day-name-color: var(--ink);
  background:
    linear-gradient(180deg, var(--day-bg), rgba(10, 12, 24, 0.03) 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent var(--day-header-height));
  border-left: 1px solid var(--day-border);
  color: var(--ink);
  pointer-events: none;
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
}

.day-column::after {
  background: var(--day-accent);
  bottom: 0;
  content: "";
  left: 0;
  opacity: 0.8;
  position: absolute;
  top: var(--day-header-height);
  width: 4px;
}

.day-column.is-now {
  background:
    linear-gradient(180deg, rgba(242, 211, 106, 0.22), rgba(42, 32, 26, 0.08) 48%),
    linear-gradient(180deg, rgba(255, 236, 156, 0.08), transparent var(--day-header-height));
}

.day-column.is-now::after {
  box-shadow: 0 0 18px rgba(242, 211, 106, 0.34);
  opacity: 1;
}

.day-column.is-wrapped {
  background:
    linear-gradient(180deg, rgba(169, 139, 255, 0.16), rgba(25, 18, 42, 0.07) 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent var(--day-header-height));
}

.day-column.is-upcoming {
  background:
    linear-gradient(180deg, rgba(127, 183, 255, 0.13), rgba(16, 28, 44, 0.06) 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent var(--day-header-height));
}

.day-column-header {
  align-content: center;
  display: grid;
  gap: 4px;
  height: var(--day-header-height);
  padding: 0 12px;
  position: absolute;
  text-align: center;
  top: 0;
  width: 100%;
}

.day-name {
  color: var(--day-name-color);
  font-size: clamp(1.6rem, 2.8vw, 2.7rem);
  font-weight: 520;
  letter-spacing: 0;
  line-height: 0.9;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.day-date {
  color: var(--day-date-color);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.now-line {
  align-items: center;
  display: flex;
  pointer-events: none;
  position: absolute;
  z-index: 4;
}

.now-line::before {
  background: var(--now-color);
  border-radius: 999px;
  box-shadow:
    0 0 0 1px rgba(173, 31, 255, 0.25),
    0 0 16px rgba(173, 31, 255, 0.52);
  content: "";
  height: 4px;
  width: 100%;
}

.now-line span {
  display: none;
}

.availability-block,
.preview-block {
  border-radius: 8px;
  overflow: hidden;
  position: absolute;
  z-index: 3;
}

.slot-rail {
  display: flex;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  position: absolute;
  scrollbar-width: none;
  touch-action: pan-x;
  z-index: 4;
}

.slot-rail-track {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  min-width: max-content;
}

.slot-rail.is-scrollable .slot-rail-track {
  animation: slot-pan 7s ease-in-out infinite alternate;
}

.slot-rail.is-scrollable:hover .slot-rail-track {
  animation-play-state: paused;
}

.slot-rail .availability-block {
  flex: 0 0 var(--slot-block-width);
  height: 100%;
  min-height: 0;
  position: relative;
  scroll-snap-align: start;
}

.slot-add-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: rgba(244, 239, 248, 0.42);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 780;
  justify-content: center;
  line-height: 1;
  min-height: 0;
  opacity: 0.72;
  padding: 0;
  position: absolute;
  text-shadow: 0 0 10px rgba(169, 139, 255, 0.12);
  z-index: 5;
}

.slot-add-button:hover,
.slot-add-button:focus-visible {
  background: rgba(244, 239, 248, 0.04);
  color: rgba(244, 239, 248, 0.9);
  opacity: 1;
}

.system-slot-highlight {
  align-items: center;
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: absolute;
  z-index: 3;
}

.system-slot-marker {
  filter: saturate(0.82);
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0.58;
  text-shadow: 0 0 12px rgba(98, 229, 198, 0.3);
  white-space: nowrap;
}

@keyframes slot-pan {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(var(--slot-pan-distance));
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation: none;
  }

  .slot-rail.is-scrollable .slot-rail-track {
    animation: none;
  }
}

.availability-block {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(38, 40, 61, 0.96), rgba(17, 20, 34, 0.96));
  border: 1px solid rgba(169, 139, 255, 0.42);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: default;
  display: flex;
  min-height: 24px;
}

.availability-block.is-readonly {
  cursor: default;
}

.availability-block.is-fixed {
  cursor: default;
}

.availability-block.is-readonly .block-body {
  padding-right: 8px;
}

.availability-block.is-recurring {
  border-style: dashed;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(127, 183, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.availability-block.is-owned {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(116, 87, 35, 0.98), rgba(45, 35, 22, 0.98));
  border-color: rgba(242, 211, 106, 0.78);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(242, 211, 106, 0.22),
    inset 0 0 0 1px rgba(255, 241, 181, 0.1);
  color: #fff4c9;
}

.availability-block.is-actionable {
  cursor: pointer;
}

.availability-block.is-actionable:hover {
  border-color: rgba(196, 152, 255, 0.82);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    0 0 20px rgba(169, 139, 255, 0.2),
    inset 0 0 0 1px rgba(222, 208, 255, 0.12);
}

.availability-block.is-owned.is-actionable:hover {
  border-color: rgba(255, 231, 143, 0.95);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(242, 211, 106, 0.28),
    inset 0 0 0 1px rgba(255, 241, 181, 0.16);
}

.availability-block.is-actionable:focus-visible,
.system-slot-highlight.is-actionable:focus-visible {
  outline: 2px solid rgba(196, 152, 255, 0.9);
  outline-offset: 1px;
}

.system-slot-highlight.is-actionable {
  cursor: pointer;
}

.system-slot-highlight.is-actionable:hover .system-slot-marker,
.system-slot-highlight.is-actionable:focus-visible .system-slot-marker {
  opacity: 0.9;
}

.block-body {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: 0 8px;
  width: 100%;
}

.availability-block.is-readonly .block-body {
  padding-right: 8px;
}

.block-emoji {
  flex: 0 0 auto;
  font-size: 0.9rem;
  line-height: 1;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.availability-block .block-emoji {
  font-size: 1rem;
}

.preview-block {
  background: rgba(165, 114, 242, 0.18);
  border: 1px dashed rgba(225, 192, 255, 0.78);
  color: #eadfff;
  display: grid;
  min-height: 24px;
  place-items: center;
  z-index: 5;
}

.preview-block[hidden] {
  display: none;
}

.preview-block::after {
  content: attr(data-label);
  font-size: 0.68rem;
  font-weight: 760;
  padding: 0 8px;
  text-align: center;
}

@media (max-height: 860px) {
  .app-shell {
    align-items: flex-start;
  }
}

@media (max-width: 880px) {
  .app-shell {
    align-items: flex-start;
    padding: 14px;
  }

  .toolbar {
    align-items: stretch;
    justify-content: flex-start;
    min-width: 0;
  }

  .people-panel {
    grid-template-columns: 1fr;
  }

  .people-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .person-button {
    width: 100%;
  }

}

@media (max-width: 560px) {
  :root {
    --hour-height: 24px;
    --day-header-height: 54px;
    --time-axis-width: 54px;
  }

  .app-shell {
    min-height: 100svh;
    padding: 8px;
  }

  .account-shell {
    align-items: flex-start;
    min-height: 100svh;
    padding: 8px;
  }

  .account-header,
  .account-identity-row,
  .preference-header,
  .notification-time-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .account-header,
  .account-identity-row,
  .preference-section,
  .preference-save-bar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .account-header h1 {
    font-size: 1.42rem;
  }

  .notification-type-group {
    padding: 14px 12px;
  }

  .notifications-header {
    align-items: start;
  }

  .bell-toggle {
    align-self: start;
  }

  .notification-groups {
    margin-left: -6px;
    margin-right: -6px;
  }

  .timezone-update-notice {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  .timezone-update-button {
    min-height: 42px;
    overflow-wrap: anywhere;
    white-space: normal;
    width: 100%;
  }

  .account-actions,
  .preference-actions,
  .solo-ai-toggle {
    flex-wrap: wrap;
  }

  .preference-pair-form select {
    flex: 1 1 150px;
    min-width: 0;
  }

  .preference-pair-form button {
    flex: 1 1 calc(50% - 4px);
  }

  .pair-preference {
    max-width: 100%;
  }

  .pair-preference-label {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .toolbar,
  .inline-form,
  .pair-form,
  .toolbar-actions {
    flex-wrap: wrap;
  }

  .inline-form input,
  .pair-form select {
    width: min(100%, 210px);
  }

  .timeline-header {
    align-items: center;
    gap: 2px 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 0;
    padding: 8px 10px;
  }

  .timeline-header > div:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .timezone-label {
    font-size: 0.76rem;
  }

  .schedule-title {
    font-size: 1rem;
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    white-space: normal;
  }

  .timeline-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
  }

  .selection-output {
    grid-column: 1 / -1;
    grid-row: 3;
    text-align: left;
  }

  .filter-fields {
    grid-template-columns: 1fr;
  }

  .timeline-canvas {
    min-width: 900px;
  }

  .day-column-header {
    padding-left: 8px;
    padding-right: 8px;
  }

  .day-name {
    font-size: 1.42rem;
  }

  .day-date {
    font-size: 0.62rem;
  }

  .hour-label {
    font-size: 0.62rem;
  }

  .hour-label span {
    padding: 2px 5px;
  }
}

@media (max-width: 560px) and (min-height: 800px) {
  :root {
    --hour-height: 28px;
    --day-header-height: 58px;
  }
}

@media (max-width: 560px) and (max-height: 700px) {
  :root {
    --hour-height: 20px;
    --day-header-height: 50px;
  }
}

@media (max-width: 560px) and (max-height: 600px) {
  :root {
    --hour-height: 17px;
    --day-header-height: 46px;
  }
}

/* Legacy join route and Discord access controls */

.join-shell {
  align-items: flex-start;
  display: flex;
  justify-content: center;
  min-height: 100svh;
  padding: clamp(16px, 4vw, 54px) 18px;
}

.join-panel {
  background:
    linear-gradient(180deg, rgba(35, 37, 57, 0.94), rgba(14, 17, 30, 0.96));
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(126, 149, 207, 0.28);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  width: min(100%, 920px);
}

.join-header {
  display: grid;
  gap: 8px;
  padding: clamp(22px, 4vw, 34px);
}

.join-eyebrow {
  color: #cdbbff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0;
  text-transform: uppercase;
}

.join-header h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1;
  margin: 0;
}

.join-introduction {
  color: var(--muted);
  line-height: 1.5;
  margin: 2px 0 0;
  max-width: 680px;
}

.join-progress {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.join-progress[hidden] {
  display: none;
}

.join-progress li {
  align-items: center;
  background: rgba(9, 12, 23, 0.48);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: rgba(179, 177, 196, 0.68);
  display: flex;
  font-size: 0.78rem;
  gap: 9px;
  min-height: 42px;
  padding: 8px 11px;
}

.join-progress li > span {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.66rem;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.join-progress li.is-current {
  background: rgba(133, 86, 216, 0.15);
  border-color: rgba(196, 152, 255, 0.5);
  color: #eadfff;
}

.join-progress li.is-complete {
  border-color: rgba(88, 214, 141, 0.28);
  color: #8ee5b2;
}

.join-progress li.is-complete > span {
  background: rgba(88, 214, 141, 0.14);
}

.join-state {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
  min-height: 300px;
  padding: clamp(28px, 6vw, 58px);
  text-align: center;
}

.join-loading-state {
  color: #ded8e8;
}

.join-state-copy {
  display: grid;
  gap: 8px;
  justify-items: center;
  max-width: 590px;
}

.join-state-copy h2 {
  font-size: 1.3rem;
  line-height: 1.15;
  margin: 0;
}

.join-state-copy p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.join-state-copy .join-privacy-note {
  color: #cdbbff;
  font-size: 0.78rem;
}

.join-primary-button,
.join-primary-link {
  background: linear-gradient(180deg, rgba(133, 86, 216, 0.96), rgba(87, 54, 143, 0.96));
  border-color: rgba(196, 152, 255, 0.68);
  color: white;
  font-weight: 760;
  justify-content: center;
  min-height: 44px;
  padding-left: 19px;
  padding-right: 19px;
}

.join-primary-button:not(:disabled):hover,
.join-primary-link:hover {
  background: linear-gradient(180deg, rgba(151, 99, 235, 0.98), rgba(98, 60, 162, 0.98));
  border-color: rgba(215, 183, 255, 0.82);
}

.join-inline-status {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0;
  min-height: 1.1em;
}

.join-inline-status:empty {
  display: none;
}

.join-inline-status.is-error,
.join-field-error {
  color: #ffb3b3;
}

#joinOnboardingState {
  border-top: 1px solid var(--line);
}

.join-account-row {
  align-items: center;
  background: rgba(24, 27, 43, 0.56);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 12px clamp(18px, 4vw, 32px);
}

.join-account-identity {
  align-items: center;
  display: flex;
  gap: 11px;
  min-width: 0;
}

.join-account-identity > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.join-account-identity span {
  color: var(--muted);
  font-size: 0.7rem;
}

.join-account-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.join-form {
  display: grid;
}

.join-fieldset {
  border: 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin: 0;
  min-width: 0;
  padding: clamp(22px, 4vw, 32px);
}

.join-fieldset legend {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 780;
  padding: 0;
}

.join-fieldset legend > span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  margin-left: 5px;
  text-transform: uppercase;
}

.join-required-fieldset legend > span {
  color: #f2d36a;
}

.join-fieldset > p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
  margin: -6px 0 0;
}

.join-search-label {
  color: #d8d1e5;
  font-size: 0.7rem;
  font-weight: 720;
}

.join-search {
  max-width: 360px;
  width: 100%;
}

.join-choice-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.join-choice {
  align-items: center;
  background: rgba(9, 12, 23, 0.55);
  border: 1px solid rgba(151, 163, 207, 0.22);
  border-radius: 8px;
  color: #ddd9e7;
  cursor: pointer;
  display: flex;
  gap: 9px;
  min-height: 42px;
  min-width: 0;
  padding: 8px 10px;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.join-choice:hover {
  background: rgba(60, 50, 87, 0.5);
  border-color: rgba(196, 152, 255, 0.46);
}

.join-choice:has(.join-choice-input:checked) {
  background: linear-gradient(180deg, rgba(109, 71, 176, 0.62), rgba(61, 42, 105, 0.62));
  border-color: rgba(196, 152, 255, 0.64);
  color: white;
}

.join-choice.is-opt-out {
  grid-column: 1 / -1;
  max-width: 260px;
}

.join-choice-input {
  height: 1px;
  margin: 0;
  min-height: 0;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.join-choice-control {
  align-items: center;
  border: 1px solid rgba(169, 139, 255, 0.52);
  border-radius: 4px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.join-choice-input[type="radio"] + .join-choice-control {
  border-radius: 50%;
}

.join-choice-input[type="checkbox"]:checked + .join-choice-control::after {
  color: white;
  content: "✓";
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
}

.join-choice-input[type="radio"]:checked + .join-choice-control::after {
  background: #caa7ff;
  border-radius: 50%;
  content: "";
  height: 8px;
  width: 8px;
}

.join-choice-input:focus-visible + .join-choice-control {
  outline: 3px solid rgba(165, 114, 242, 0.38);
  outline-offset: 3px;
}

.join-choice-input:focus-visible {
  outline: none;
}

.join-choice-input:disabled ~ * {
  opacity: 0.46;
}

.join-choice-name {
  font-size: 0.8rem;
  font-weight: 660;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.join-search-empty {
  color: var(--muted);
  font-size: 0.76rem;
  margin: 0;
}

.join-required-fieldset.has-error {
  background: rgba(150, 64, 72, 0.08);
}

.join-required-fieldset.has-error .join-geolocation-grid {
  border-radius: 8px;
  outline: 2px solid rgba(217, 137, 137, 0.46);
  outline-offset: 4px;
}

.join-fieldset > .join-field-error {
  font-size: 0.76rem;
  margin: 0;
  min-height: 1em;
}

.join-field-error:empty {
  display: none;
}

.join-submit-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  padding: 20px clamp(18px, 4vw, 32px);
}

.join-submit-row .join-inline-status {
  margin-right: auto;
}

.join-submit-row a[aria-disabled="true"] {
  opacity: 0.46;
  pointer-events: none;
}

.join-submit-row a[hidden] {
  display: none;
}

.join-success-mark,
.join-error-mark {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  font-size: 1.4rem;
  font-weight: 850;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.join-success-mark {
  background: rgba(88, 214, 141, 0.1);
  color: #8ee5b2;
}

.join-success-mark.is-pending {
  background: rgba(242, 211, 106, 0.1);
  color: var(--gold);
}

.join-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.join-error-mark {
  background: rgba(217, 137, 137, 0.1);
  color: #ffb3b3;
}

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

@media (max-width: 480px) {
  .join-shell {
    padding: 8px;
  }

  .join-panel {
    border-radius: 9px;
  }

  .join-header {
    padding: 20px 16px;
  }

  .join-progress {
    gap: 6px;
  }

  .join-progress li {
    display: grid;
    gap: 4px;
    justify-items: center;
    padding: 7px 4px;
    text-align: center;
  }

  .join-progress li > span {
    height: 20px;
    width: 20px;
  }

  .join-state {
    min-height: 280px;
    padding: 32px 18px;
  }

  .join-account-row {
    align-items: flex-start;
    padding-left: 16px;
    padding-right: 16px;
  }

  .join-fieldset {
    padding: 22px 16px;
  }

  .join-submit-row {
    align-items: stretch;
    flex-direction: column;
    padding: 18px 16px;
  }

  .join-submit-row .join-inline-status {
    margin-right: 0;
  }

  .join-submit-row button {
    width: 100%;
  }
}

@media (max-width: 350px) {
  .join-choice-grid {
    grid-template-columns: 1fr;
  }

  .join-choice.is-opt-out {
    grid-column: auto;
    max-width: none;
  }
}
