/* Spretta — app UI on top of Cruip style.css (landing template) */

/* ---- Cruip shell (matches apps.html) ---- */
.sp-shell-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0 0.75rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.03);
  backdrop-filter: blur(8px);
}

.sp-shell-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(var(--color-gray-100), var(--color-gray-200)) border-box;
  -webkit-mask: linear-gradient(white 0 0) padding-box, linear-gradient(white 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.sp-main {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding: 6rem 1rem 4rem;
}

.sp-main.max-w-3xl {
  max-width: 48rem;
}

@media (min-width: 768px) {
  .sp-main { padding-top: 6.5rem; }
}

.sp-hero-cruip,
.sp-hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(to right, transparent, color-mix(in oklab, var(--color-slate-300) 80%, transparent), transparent) 1;
}

@media (min-width: 768px) {
  .sp-hero-cruip,
  .sp-hero-title { font-size: 3.75rem; }
}

/* Integration card — same as /design/apps.html */
.sp-int-card,
.sp-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1.25rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.7);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.03);
  transition: background 0.15s ease;
}

.home-feature-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  text-align: inherit;
  color: inherit;
  width: 100%;
}

.sp-int-card::before,
.sp-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(var(--color-gray-100), var(--color-gray-200)) border-box;
  -webkit-mask: linear-gradient(white 0 0) padding-box, linear-gradient(white 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.sp-int-card:hover,
.sp-tile:hover { background: #fff; }

.sp-int-card-arrow,
.sp-tile-arrow {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  transition: transform 0.15s ease;
}

.sp-int-card:hover .sp-int-card-arrow,
.group.sp-int-card:hover .sp-int-card-arrow,
.group:hover .sp-int-card-arrow,
.sp-tile-clickable:hover .sp-tile-arrow { transform: rotate(45deg); }

.sp-app-section {
  position: relative;
}

.sp-app-body {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding: 7rem 1rem 3rem;
}

@media (min-width: 768px) {
  .sp-app-body { padding-top: 8rem; }
}

.sp-section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.sp-section-label h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.sp-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-blue-500);
  transition: color 0.15s;
}

.sp-link:hover {
  color: var(--color-blue-600);
}

.sp-link-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-blue-500);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.sp-link-back:hover { color: var(--color-blue-600); }

.sp-btn-primary {
  color: #f9fafb !important;
  background-color: #1f2937 !important;
  border-color: #1f2937 !important;
}

.sp-btn-primary:hover {
  background-color: #111827 !important;
}

.sp-panel {
  position: relative;
  border-radius: 1rem;
  padding: 1.25rem;
  background: #fff;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.03);
  margin-bottom: 1.5rem;
}

.sp-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(var(--color-gray-100), var(--color-gray-200)) border-box;
  -webkit-mask: linear-gradient(white 0 0) padding-box, linear-gradient(white 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.sp-panel-lg { padding: 1.5rem; }

.sp-panel.mb-0 { margin-bottom: 0; }

.sp-tile-clickable,
.sp-int-card-clickable { cursor: pointer; }

.sp-nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-blue-500);
  transition: color 0.15s;
}

.sp-nav-link:hover { color: var(--color-blue-600); }

/* ---- Layout ---- */
.sp-page {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 6rem;
  padding-bottom: 4rem;
}

.sp-page-home {
  padding-bottom: 3rem;
}

.sp-card-toolbar {
  padding: 1rem 1.25rem;
}

.sp-card-aside {
  padding: 1rem 1.25rem;
}

.sp-room-form {
  max-width: 42rem;
  margin-left: 0;
  margin-right: 0;
}

.sp-page-narrow {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Top bar (matches landing floating header) ---- */
.sp-topbar-wrap {
  position: fixed;
  top: 0.5rem;
  left: 0;
  right: 0;
  z-index: 30;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .sp-topbar-wrap { top: 1.5rem; }
}

.sp-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0 0.75rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.03);
  backdrop-filter: blur(8px);
}

.sp-topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(var(--color-gray-100), var(--color-gray-200)) border-box;
  -webkit-mask: linear-gradient(white 0 0) padding-box, linear-gradient(white 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Header logo — use .sp-header-logo + spretta-mark.svg everywhere */
.sp-header-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  color: var(--color-blue-500);
  text-decoration: none;
}

.sp-header-logo--btn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.sp-header-logo__mark {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
}

.sp-header-logo__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
}

.sp-header-logo:hover .sp-header-logo__name {
  color: #111827;
}

.sp-header-logo--btn:focus-visible {
  outline: 2px solid var(--color-blue-500);
  outline-offset: 2px;
  border-radius: 0.375rem;
}

/* App top bar (index) — comfortable single-row layout on tablet/desktop */
@media (min-width: 48rem) {
  .sp-app-topbar {
    min-height: 3.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    gap: 0.75rem;
  }

  .sp-app-topbar__nav {
    gap: 0.75rem;
  }

  .sp-header-logo__mark {
    width: 1.875rem;
    height: 1.875rem;
  }

  .sp-header-logo__name {
    font-size: 0.9375rem;
  }
}

/* ---- Cards (apps.html integration cards) ---- */
.sp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgb(229 231 235 / 0.9);
  background: #fff;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.03);
}

.sp-card-soft {
  background: rgb(255 255 255 / 0.7);
}

.sp-card-soft:hover {
  background: #fff;
}

.sp-card-clickable {
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.sp-card-clickable:hover {
  border-color: var(--color-blue-200);
  box-shadow: 0 4px 16px color-mix(in oklab, var(--color-blue-500) 18%, transparent);
}

.sp-card-arrow {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  transition: transform 0.15s;
}

.sp-card-clickable:hover .sp-card-arrow {
  transform: rotate(45deg);
}

/* ---- Hero blocks ---- */
.sp-hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(to right, transparent, rgb(203 213 225 / 0.8), transparent) 1;
}

@media (min-width: 768px) {
  .sp-hero-title { font-size: 3rem; }
}

.sp-hero-sub {
  font-size: 1.125rem;
  color: #374151;
  line-height: 1.55;
}

.sp-banner-indigo,
.sp-banner-blue,
.sp-banner {
  border-radius: 1rem;
  padding: 1.5rem;
  color: #fff;
  background: linear-gradient(to bottom right, var(--color-blue-600), var(--color-blue-700));
  box-shadow: 0 12px 40px color-mix(in oklab, var(--color-blue-600) 28%, transparent);
}

.sp-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.9;
}

/* ---- Tabs ---- */
.sp-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.sp-tab {
  flex: 1;
  border: none;
  border-radius: 0.5rem;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4b5563;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sp-tab:hover { background: #f9fafb; }

.sp-tab.is-active {
  color: #fff;
  background: var(--color-blue-600);
  box-shadow: 0 1px 2px color-mix(in oklab, var(--color-blue-600) 35%, transparent);
}

/* ---- Buttons (use with Cruip .btn / .btn-sm) ---- */
.sp-btn-dark {
  color: #f9fafb !important;
  background-color: #1f2937 !important;
  border: 1px solid #1f2937 !important;
}

.sp-btn-dark:hover {
  background-color: #111827 !important;
}

.sp-btn-primary-full {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

/* ---- Forms panel ---- */
.sp-panel {
  margin-bottom: 1.5rem;
}

.sp-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.35rem;
}

.sp-label-upper {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
}

.sp-field-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sp-editor {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.sp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.sp-toolbar-grow {
  flex: 1;
  min-width: 12rem;
}

.sp-toolbar h3 {
  margin-bottom: 0;
}

/* ---- Page header (teams + poker) ---- */
.sp-page-header {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.sp-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
}

.sp-room-back {
  text-align: left;
  padding: 0;
}

.sp-room-header .sp-page-actions {
  justify-content: flex-start;
}

@media (min-width: 640px) {
  .sp-room-header .sp-page-actions {
    justify-content: flex-end;
  }
}

.sp-room-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.375rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.375rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #1a2332 0%, #0f1419 100%);
  border: 1px solid #232f3e;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
  color: #9ca3af;
  width: fit-content;
}

.sp-room-status__tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff9900;
}

.sp-room-status__text {
  color: #cbd5e1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.sp-room-status--revealed {
  border-color: color-mix(in oklab, #34d399 35%, #232f3e);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.08),
    inset 0 0 0 1px rgb(52 211 153 / 0.12);
}

.sp-room-status--revealed .sp-room-status__tag {
  color: #6ee7b7;
}

.sp-room-status--revealed .sp-room-status__text {
  color: #a7f3d0;
  font-weight: 600;
}

.sp-room-deck {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.35rem 0 0.75rem;
}

.sp-menu-wrap {
  display: inline-flex;
}

.sp-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  min-width: 11rem;
  padding: 0.35rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 10px 30px rgb(15 23 42 / 0.12);
}

.sp-menu__item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.sp-menu__item:hover {
  background: #f3f4f6;
  color: #111827;
}

.sp-menu__item.hidden {
  display: none;
}

/* ---- Poker room (aligned with team status panel) ---- */
.sp-room-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sp-room-block + .sp-room-block {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
}

.sp-room-block h3,
.sp-lobby-block h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.75rem;
}

.sp-lobby-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sp-lobby-block + .sp-lobby-block {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
}

.sp-lobby-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sp-lobby-form-grid {
  display: grid;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .sp-lobby-form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.sp-lobby-form-col {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.sp-lobby-form-head {
  margin-bottom: 1rem;
}

.sp-lobby-form-head h3 {
  margin-bottom: 0.35rem;
}

.sp-lobby-form-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #6b7280;
}

@media (min-width: 768px) {
  .sp-lobby-form-head {
    min-height: 4.75rem;
  }
}

.sp-lobby-form-fields {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sp-lobby-form-fields .sp-label {
  margin-bottom: 0.35rem;
}

.sp-lobby-form-fields .form-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.sp-lobby-form-fields .form-input.sp-field-mono {
  font-size: 0.875rem;
  letter-spacing: 0.06em;
}

.sp-lobby-form-fields .sp-form-action {
  margin-top: 0.75rem;
  width: 100%;
  min-height: 2.5rem;
}

@media (min-width: 768px) {
  .sp-lobby-form-fields {
    min-height: 7.35rem;
  }

  .sp-lobby-form-fields--actions-only {
    justify-content: flex-end;
  }

  .sp-lobby-form-fields--actions-only .sp-form-action {
    margin-top: auto;
  }
}

.sp-facilitator-panel {
  padding: 1.35rem 1.25rem 1.5rem;
  border-radius: 0.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  text-align: center;
}

.sp-facilitator-panel h3 {
  margin-bottom: 0.35rem;
}

.sp-facilitator-lead {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #6b7280;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.sp-facilitator-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sp-facilitator-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #9ca3af;
}

.sp-chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 18rem;
}

@media (min-width: 1024px) {
  .sp-chat-panel {
    min-height: 28rem;
  }
}

.sp-chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  min-height: 6rem;
}

.sp-chat-msg {
  margin-bottom: 0;
}

.sp-update-me {
  background: color-mix(in oklab, var(--color-blue-50) 55%, #fafafa);
  border-color: color-mix(in oklab, var(--color-blue-200) 45%, #e5e7eb);
}

.sp-chat-compose {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.85rem;
}

/* ---- Status feed ---- */
.sp-update {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  background: #fafafa;
  margin-bottom: 0.75rem;
}

/* Text-generated avatars (initials + deterministic color) */
.sp-avatar-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  flex-shrink: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
}

.sp-update-avatar.sp-avatar-text {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.65rem;
}

.sp-team-avatar.sp-avatar-text {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 0.7rem;
}

.sp-update-content {
  flex: 1;
  min-width: 0;
}

.sp-update-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.35rem;
}

.sp-update-body {
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  color: #374151;
}

.sp-empty {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #9ca3af;
}

/* ---- Team list row ---- */
.sp-team-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sp-team-row:hover {
  border-color: var(--color-blue-200);
  box-shadow: 0 4px 12px color-mix(in oklab, var(--color-blue-500) 15%, transparent);
}

.sp-team-row-body {
  flex: 1;
  min-width: 0;
}

.sp-team-row strong {
  display: block;
  font-size: 0.875rem;
  color: #111827;
}

.sp-team-row .code {
  margin-top: 0.2rem;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--color-blue-600);
}

.sp-team-row .arrow {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-blue-600);
}

/* ---- Poker ---- */
.sp-poker-card {
  width: 3.25rem;
  height: 4.5rem;
  border: 2px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  color: #1f2937;
  cursor: pointer;
  transform-origin: center bottom;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.25s cubic-bezier(0.34, 1.45, 0.64, 1),
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}

.sp-poker-card:hover:not(:disabled):not(.is-selected) {
  border-color: var(--color-blue-500);
  transform: translateY(-2px);
}

.sp-poker-card.is-selected,
.card-btn.is-selected {
  border-color: var(--color-blue-600);
  background: var(--color-blue-600);
  color: #fff;
  transform: translateY(-5px) scale(1.07);
  box-shadow: 0 10px 22px color-mix(in oklab, var(--color-blue-600) 38%, transparent);
}

.sp-poker-card.is-popping {
  animation: sp-card-pop 0.45s cubic-bezier(0.34, 1.55, 0.64, 1);
}

.sp-poker-card.is-flipping {
  animation: sp-card-reveal-flip 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.deck-is-revealed .sp-poker-card.is-revealed-pick {
  border-color: #047857;
  background: linear-gradient(160deg, #10b981, #047857);
  color: #fff;
  transform: translateY(-5px) scale(1.08);
  box-shadow: 0 12px 26px color-mix(in oklab, #059669 42%, transparent);
  opacity: 1;
}

.deck-is-revealed .sp-poker-card.is-revealed:not(.is-revealed-pick) {
  opacity: 0.5;
  transform: scale(0.94);
  cursor: not-allowed;
}

.sp-poker-card:disabled:not(.is-revealed-pick) {
  cursor: not-allowed;
}

.sp-player-vote.sp-vote-reveal-anim {
  animation: sp-vote-pop 0.5s cubic-bezier(0.34, 1.55, 0.64, 1) both;
}

@keyframes sp-card-pop {
  0% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-8px) scale(1.14);
  }
  100% {
    transform: translateY(-5px) scale(1.07);
  }
}

@keyframes sp-card-reveal-flip {
  0% {
    transform: rotateY(-90deg) scale(0.9);
    opacity: 0.35;
  }
  100% {
    transform: rotateY(0) scale(0.94);
    opacity: 0.5;
  }
}

.deck-is-revealed .sp-poker-card.is-revealed-pick.is-flipping {
  animation-name: sp-card-reveal-pick;
}

@keyframes sp-card-reveal-pick {
  0% {
    transform: rotateY(-90deg) scale(0.92);
    opacity: 0.4;
  }
  100% {
    transform: translateY(-5px) scale(1.08);
    opacity: 1;
  }
}

@keyframes sp-vote-pop {
  0% {
    transform: scale(0.35);
    opacity: 0;
  }
  65% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-poker-card {
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  }

  .sp-poker-card.is-selected,
  .card-btn.is-selected {
    transform: none;
    box-shadow: none;
  }

  .sp-poker-card.is-popping,
  .sp-poker-card.is-flipping,
  .sp-player-vote.sp-vote-reveal-anim {
    animation: none;
  }

  .deck-is-revealed .sp-poker-card.is-revealed-pick {
    transform: none;
  }

  .deck-is-revealed .sp-poker-card.is-revealed:not(.is-revealed-pick) {
    transform: none;
  }
}

.sp-player-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.35rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  min-width: 0;
  text-align: center;
}

.sp-player-tile-me {
  border-color: color-mix(in oklab, var(--color-blue-500) 35%, #e5e7eb);
  background: color-mix(in oklab, var(--color-blue-50) 50%, #fff);
}

.sp-player-avatar.sp-avatar-text {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.68rem;
}

.sp-player-tile-me .sp-player-avatar.sp-avatar-text {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--color-blue-500);
}

.sp-player-name {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: #374151;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-player-badge {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--color-blue-600);
  margin-top: 0.1rem;
}

.sp-player-vote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  min-height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.sp-player-vote-revealed {
  font-size: 0.875rem;
  color: #111827;
  background: #f3f4f6;
}

.sp-player-vote-done {
  color: var(--color-blue-600);
  background: color-mix(in oklab, var(--color-blue-500) 12%, #fff);
}

.sp-player-vote-pending {
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 600;
}

/* ---- Alerts ---- */
.sp-alert {
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.sp-alert-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.sp-alert-warn {
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #78350f;
}

/* ---- Sign-in page ---- */
.sp-signin-page {
  background: #f9fafb;
}

.sp-signin-page main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

.sp-signin-left {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.sp-signin-left__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  box-sizing: border-box;
  padding-top: 6rem;
  padding-bottom: 1.5rem;
}

@media (width >= 48rem) {
  .sp-signin-left__body {
    padding-top: 6.75rem;
  }
}

.sp-signin-console {
  display: none;
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: linear-gradient(165deg, #bfdbfe 0%, #93c5fd 55%, #7dd3fc 100%);
  box-shadow:
    0 1px 3px rgb(37 99 235 / 0.14),
    0 0 0 1px rgb(59 130 246 / 0.22);
}

.sp-signin-console__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  margin-left: -6rem;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 60% at 50% 50%,
    rgb(37 99 235 / 0.18) 0%,
    transparent 72%
  );
}

@media (width >= 64rem) {
  .sp-signin-page main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 572px;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    padding: 1.5rem;
    box-sizing: border-box;
    column-gap: 0;
  }

  .sp-signin-left {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow:
      0 1px 3px rgb(15 23 42 / 0.06),
      0 0 0 1px rgb(15 23 42 / 0.04);
  }

  .sp-signin-console {
    display: block;
    width: 572px;
    min-height: 100%;
    height: 100%;
  }

  .sp-signin-console__terminal {
    z-index: 1;
  }
}

.sp-signin-content {
  margin-inline: auto;
  text-align: center;
}

.sp-signin-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0 0 1.75rem;
}

.sp-signin-brand__mark {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.sp-signin-brand__name {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #111827;
}

.sp-signin-intro {
  margin-bottom: 2rem;
  text-align: center;
}

.sp-signin-eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2563eb;
}

.sp-signin-title {
  margin: 0;
  padding: 0.65rem 0;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #111827;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(
      to right,
      transparent,
      color-mix(in oklab, var(--color-slate-300, #cbd5e1) 80%, transparent),
      transparent
    )
    1;
}

@media (min-width: 640px) {
  .sp-signin-title {
    font-size: 2.5rem;
  }
}

.sp-signin-lead {
  margin: 1rem auto 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  text-align: center;
  color: #4b5563;
  max-width: 22rem;
}

.sp-signin-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 0;
  padding: 1.5rem 1.35rem 1.35rem;
}

@media (width >= 64rem) {
  .sp-signin-left .sp-signin-card.sp-panel {
    background: transparent;
    box-shadow: none;
  }

  .sp-signin-left .sp-signin-card.sp-panel::before {
    display: none;
  }

}

.sp-signin-card__alerts {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
}

.sp-signin-card__alerts:not(:has(p:not(.hidden))) {
  display: none;
}

.sp-signin-card .sp-alert {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: left;
}

.sp-signin-config-warn__title {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.sp-signin-config-warn__body {
  display: block;
  margin-bottom: 0.5rem;
  color: #92400e;
}

.sp-signin-config-warn__vars {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sp-signin-config-warn__vars code {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
  background: #fef3c7;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

.sp-signin-card__action {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 0;
  padding: 1.25rem 0 1.5rem;
}

.sp-signin-google-btn {
  width: auto;
  max-width: 100%;
}

.sp-signin-card__alerts:not(:has(p:not(.hidden))) + .sp-signin-card__action {
  padding-top: 0.75rem;
}

.sp-signin-card__alerts:has(p:not(.hidden)) + .sp-signin-card__action {
  padding-top: 0.5rem;
}

.sp-signin-card__footer {
  margin-top: 0;
  padding-top: 0.25rem;
  width: 100%;
  text-align: left;
}

.sp-signin-card__hint {
  margin: 0 0 0.25rem;
  padding: 0 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: center;
  color: #6b7280;
}

.sp-signin-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  margin: 1.5rem 0 1.125rem;
}

.sp-signin-divider__line {
  flex: 1;
  height: 1px;
  min-width: 1.5rem;
  background: #e5e7eb;
}

.sp-signin-divider__label {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}

.sp-signin-minis {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
  text-align: left;
}

.sp-signin-minis--quad,
.sp-signin-minis--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sp-signin-features {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sp-signin-feature-group + .sp-signin-feature-group {
  padding-top: 0.85rem;
  border-top: 1px solid #e5e7eb;
}

.sp-signin-features .sp-feature-group-desc {
  font-size: 0.75rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

@media (max-width: 30rem) {
  .sp-signin-minis {
    grid-template-columns: 1fr;
  }

  .sp-signin-minis--quad,
  .sp-signin-minis--pair {
    grid-template-columns: 1fr;
  }
}

.sp-signin-mini {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  box-sizing: border-box;
}

.sp-signin-mini__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.06);
}

.sp-signin-mini__icon--cli {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  color: #93c5fd;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.12);
}

.sp-signin-mini__icon--agents {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgb(29 78 216 / 0.2);
}

.sp-signin-mini__icon--agents svg {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
}

.sp-signin-mini__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.sp-signin-mini__title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  color: #111827;
}

.sp-signin-mini__desc {
  display: block;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #6b7280;
}

.sp-btn-dark,
.sp-btn-primary {
  color: #f9fafb !important;
  background-color: #1f2937 !important;
  border-color: #1f2937 !important;
}

.sp-btn-dark:hover,
.sp-btn-primary:hover {
  background-color: #111827 !important;
}

/* ---- Slack / misc ---- */
.icon-slack { color: #4a154b; }

.btn-slack {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: #4a154b;
  border: 1px solid #4a154b;
  border-radius: 0.5rem;
  cursor: pointer;
}

.btn-slack:hover { background: #3e1240; }

.btn-icon { width: 1rem; height: 1rem; flex-shrink: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---- Confirm modal ---- */
body.sp-modal-open {
  overflow: hidden;
}

.sp-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.sp-modal.hidden {
  display: none;
}

.sp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 0.45);
  backdrop-filter: blur(4px);
}

.sp-modal-panel--error .sp-modal-title {
  color: #b91c1c;
}

.sp-modal-panel--success .sp-modal-title {
  color: #047857;
}

.sp-modal-panel--info .sp-modal-title {
  color: #1e40af;
}

.sp-modal-panel {
  position: relative;
  width: 100%;
  max-width: 26rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgb(229 231 235 / 0.95);
  background: #fff;
  box-shadow:
    0 20px 25px -5px rgb(0 0 0 / 0.12),
    0 8px 10px -6px rgb(0 0 0 / 0.08);
}

.sp-modal-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}

.sp-modal-message {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #4b5563;
}

.sp-modal-message--tight {
  margin-bottom: 0.85rem;
}

.sp-modal-field {
  margin-bottom: 1.25rem;
}

textarea.sp-modal-field {
  min-height: 6rem;
  resize: vertical;
}

.sp-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.sp-modal-btn-danger {
  background-color: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #fff !important;
}

.sp-modal-btn-danger:hover {
  background-color: #991b1b !important;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  max-width: 24rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 40px rgb(15 23 42 / 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.toast.show { opacity: 1; }
.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
.toast-info { background: #1e293b; }

body.sp-has-console:not(.sp-console-collapsed):not(.sp-console-hidden) .toast {
  bottom: calc(var(--sp-console-h, 220px) + 1rem);
}

body.sp-has-console.sp-console-collapsed:not(.sp-console-hidden) .toast {
  bottom: calc(var(--sp-console-bar-h, 2.25rem) + 1rem);
}

/* ---- Spretta CLI panel (CloudShell–style) ---- */
:root {
  --sp-console-h: 220px;
  --sp-console-bar-h: 2.25rem;
}

.sp-console {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  height: var(--sp-console-h);
  max-height: 50vh;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  background: #0f1419;
  color: #d4d4d8;
  border-top: 1px solid #232f3e;
  box-shadow: 0 -8px 32px rgb(0 0 0 / 0.35);
}

.sp-console.is-collapsed {
  height: var(--sp-console-bar-h);
  max-height: var(--sp-console-bar-h);
}

.sp-console.is-hidden {
  display: none !important;
}

body.sp-has-console:not(.sp-console-hidden):not(.sp-console-collapsed) {
  padding-bottom: var(--sp-console-h);
}

body.sp-has-console.sp-console-collapsed:not(.sp-console-hidden) {
  padding-bottom: var(--sp-console-bar-h);
}

body.sp-has-console.sp-console-hidden .toast {
  bottom: 1.5rem;
}

body.sp-console-resizing {
  cursor: ns-resize;
  user-select: none;
}

.sp-console__resize {
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 8px;
  cursor: ns-resize;
  z-index: 2;
}

.sp-console__bar {
  flex: 0 0 var(--sp-console-bar-h);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  background: linear-gradient(180deg, #1a2332 0%, #161d27 100%);
  border-bottom: 1px solid #232f3e;
  min-height: var(--sp-console-bar-h);
}

.sp-console__brand-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.4rem;
  margin: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff9900;
  cursor: pointer;
  border-radius: 3px;
}

.sp-console__brand-btn:hover {
  background: rgb(255 153 0 / 0.12);
}

.sp-console__brand-icon {
  flex-shrink: 0;
  color: #ff9900;
}

.sp-console__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border-radius: 3px;
  border: 1px solid #3d4f5f;
  background: #232f3e;
  color: #d4d4d8;
  cursor: pointer;
}

.sp-console__icon-btn:hover {
  background: #2a3644;
  border-color: #5c6b7a;
  color: #fff;
}

.sp-console__icon-btn--close:hover {
  background: #3b1212;
  border-color: #7f1d1d;
  color: #fca5a5;
}

.sp-console__icon-btn.is-collapsed svg {
  transform: rotate(180deg);
}

.sp-console-header-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.55rem 0.3rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.sp-console-header-toggle:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.sp-console-header-toggle__label {
  user-select: none;
}

.sp-console-header-toggle__track {
  display: inline-flex;
  align-items: center;
  width: 2rem;
  height: 1.125rem;
  padding: 2px;
  border-radius: 9999px;
  background: #d1d5db;
  transition: background 0.2s;
}

.sp-console-header-toggle__thumb {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.2);
  transform: translateX(0);
  transition: transform 0.2s;
}

.sp-console-header-toggle[aria-checked="true"] .sp-console-header-toggle__track {
  background: #2563eb;
}

.sp-console-header-toggle[aria-checked="true"] .sp-console-header-toggle__thumb {
  transform: translateX(0.875rem);
}

.sp-console-header-toggle.is-off {
  color: #6b7280;
}

.sp-console-header-toggle.is-notifying .sp-console-header-toggle__label {
  animation: sp-console-terminal-blink 1.4s ease-in-out infinite;
}

/* CLI mark: terminal icon + label */
.sp-cli-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
}

.sp-cli-brand__icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.sp-cli-brand--header .sp-cli-brand__icon {
  color: #2563eb;
}

.sp-cli-brand--header .sp-console-header-toggle__label {
  margin-left: 0;
}

.sp-console-header-toggle__badge,
.sp-console-fab__badge {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px #fff;
}

.sp-cli-brand--bar .sp-cli-brand__icon,
.sp-cli-brand--bar .sp-console__brand-text {
  color: #ff9900;
}

.sp-cli-brand--bar .sp-console__brand-text {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.sp-cli-brand--fab {
  color: #ff9900;
}

.sp-console-fab__badge {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px #fff;
}

.sp-console-fab__badge {
  box-shadow: 0 0 0 2px #161d27;
}

.sp-console-header-toggle.is-notifying,
.sp-console-fab.is-notifying {
  animation: sp-console-pulse-ring 1.4s ease-in-out infinite;
}

.sp-console-fab.is-notifying .sp-cli-brand {
  animation: sp-console-terminal-blink 1.4s ease-in-out infinite;
}

.sp-console-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 44;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid #3d4f5f;
  border-radius: 50%;
  background: linear-gradient(180deg, #1a2332 0%, #0f1419 100%);
  color: #ff9900;
  cursor: pointer;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.sp-console-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.45);
  color: #ffb84d;
}

.sp-console-fab.hidden {
  display: none !important;
}

@keyframes sp-console-terminal-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes sp-console-pulse-ring {
  0%, 100% {
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.35), 0 0 0 0 rgb(255 153 0 / 0.45);
  }
  50% {
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.35), 0 0 0 6px rgb(255 153 0 / 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-console-header-toggle.is-notifying,
  .sp-console-fab.is-notifying,
  .sp-console-fab.is-notifying .sp-cli-brand,
  .sp-console-header-toggle.is-notifying .sp-console-header-toggle__label {
    animation: none;
  }
}

/* ---- Activity console metrics strip ---- */
.sp-console__stats[hidden] {
  display: none;
}

.sp-console__metrics {
  flex: 0 0 auto;
  padding: 0.5rem 0.75rem;
  background: #161d27;
  border-bottom: 1px solid #232f3e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.65rem;
}

.sp-console.is-collapsed .sp-console__metrics {
  display: none;
}

.sp-console__context {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.6rem;
  margin-bottom: 0;
  line-height: 1.35;
}

.sp-console__metrics:has(.sp-console__stats:not([hidden])) .sp-console__context {
  margin-bottom: 0.45rem;
}

.sp-console__context--clickable {
  width: 100%;
  margin: 0 0 0.45rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sp-console__context--clickable:hover {
  background: rgb(255 153 0 / 0.08);
  border-color: #3d4f5f;
}

.sp-console__context--clickable.is-active {
  background: rgb(37 99 235 / 0.15);
  border-color: #2563eb;
}

.sp-console__ctx-hint {
  margin-left: auto;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  opacity: 0;
  transition: opacity 0.15s;
}

.sp-console__context--clickable:hover .sp-console__ctx-hint,
.sp-console__context--clickable.is-active .sp-console__ctx-hint {
  opacity: 1;
}

.sp-console__ctx-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff9900;
}

.sp-console__ctx-head {
  color: #f4f4f5;
  font-weight: 700;
}

.sp-console__ctx-detail {
  color: #9ca3af;
  flex: 1 1 12rem;
  min-width: 0;
}

.sp-console__stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.35rem;
  margin: 0;
}

.sp-console__chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 0.25rem 0.4rem;
  border-radius: 3px;
  background: #0f1419;
  border: 1px solid #232f3e;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.sp-console__chip:hover:not(:disabled) {
  background: #1a2332;
  border-color: #5c6b7a;
}

.sp-console__chip:active:not(:disabled) {
  transform: scale(0.98);
}

.sp-console__chip.is-active {
  border-color: #2563eb;
  background: rgb(37 99 235 / 0.12);
  box-shadow: inset 0 0 0 1px rgb(37 99 235 / 0.35);
}

.sp-console__chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sp-console__chip-label {
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.sp-console__chip-value {
  margin-top: 0.1rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #e4e4e7;
  font-variant-numeric: tabular-nums;
}

.sp-console__chip--warn .sp-console__chip-value {
  color: #f87171;
}

.sp-console__chip--warn.is-active {
  border-color: #dc2626;
  background: rgb(220 38 38 / 0.12);
}

.sp-console__summary {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.6rem;
  color: #9ca3af;
  display: none;
}

.sp-console.is-collapsed .sp-console__summary {
  display: block;
}

.sp-console.is-collapsed .sp-console__filters {
  display: none;
}

.sp-console__filters {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  min-width: 0;
  overflow-x: auto;
}

.sp-console__filter {
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  border: 1px solid #3d4f5f;
  background: transparent;
  color: #9ca3af;
  font: inherit;
  font-size: 0.65rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sp-console__filter:hover {
  border-color: #5c6b7a;
  color: #e5e7eb;
}

.sp-console__filter.is-active {
  background: #232f3e;
  border-color: #ff9900;
  color: #ff9900;
}

.sp-console__actions {
  flex-shrink: 0;
  display: flex;
  gap: 0.35rem;
}

.sp-console__action {
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid #3d4f5f;
  background: #232f3e;
  color: #d4d4d8;
  font: inherit;
  font-size: 0.65rem;
  cursor: pointer;
}

.sp-console__action:hover {
  background: #2a3644;
  border-color: #5c6b7a;
}

.sp-console.is-collapsed .sp-console__body,
.sp-console.is-collapsed .sp-console__input-row,
.sp-console.is-collapsed .sp-console__quick-actions {
  display: none;
}

.sp-console__input-row {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem 0.55rem;
  border-top: 1px solid rgb(55 65 81 / 0.85);
  background: #0a0e12;
}

.sp-console__prompt {
  flex: 0 0 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ff9900;
  user-select: none;
}

.sp-console__input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: #f4f4f5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.4;
  outline: none;
}

.sp-console__input::placeholder {
  color: #6b7280;
}

.sp-console__input:focus {
  outline: none;
}

.sp-console__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 0.5rem 0.75rem 0.75rem;
  background: #0f1419;
}

.sp-console__body.is-following {
  scroll-behavior: smooth;
}

.sp-console__line {
  display: grid;
  grid-template-columns: 4.5rem 3.25rem 1fr;
  gap: 0.5rem;
  padding: 0.12rem 0;
  border-bottom: 1px solid rgb(35 47 62 / 0.45);
}

.sp-console__line[hidden] {
  display: none;
}

.sp-console__time {
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

.sp-console__tag {
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.sp-console__line--team .sp-console__tag { color: #34d399; }
.sp-console__line--room .sp-console__tag { color: #60a5fa; }
.sp-console__line--ws .sp-console__tag { color: #fbbf24; }
.sp-console__line--status .sp-console__tag { color: #c084fc; }
.sp-console__line--nav .sp-console__tag { color: #94a3b8; }
.sp-console__line--info .sp-console__tag { color: #67e8f9; }
.sp-console__line--error .sp-console__tag { color: #f87171; }
.sp-console__line--sys .sp-console__tag { color: #ff9900; }
.sp-console__line--cmd .sp-console__tag { color: #22d3ee; }
.sp-console__line--cmd .sp-console__msg { color: #a5f3fc; }

.sp-console__msg {
  color: #e4e4e7;
  word-break: break-word;
}

@media (max-width: 640px) {
  .sp-console__line {
    grid-template-columns: 4rem 2.75rem 1fr;
    gap: 0.35rem;
  }
  .sp-console__filters {
    display: none;
  }
}

/* ---- Room toolbar ---- */
.sp-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* ---- App shell: footer at bottom on short pages ---- */
.sp-app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.sp-app-shell > .grow {
  flex: 1 1 auto;
  min-height: 0;
}

.sp-app-shell__footer {
  flex-shrink: 0;
  margin-top: auto;
}

/* ---- Open source footer (all pages) ---- */
.site-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  border-top: 1px solid rgb(226 232 240 / 0.6);
  background: rgb(248 250 252 / 0.75);
  padding: 1.25rem 1rem;
  backdrop-filter: blur(8px);
}

.site-footer-inner {
  max-width: 28rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.site-footer-tagline {
  font-size: 10px;
  line-height: 1.375;
  color: #64748b;
}

.site-footer-badge {
  display: inline-block;
  margin-right: 0.25rem;
  padding: 1px 0.375rem;
  border-radius: 999px;
  background: #ecfdf5;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #047857;
  box-shadow: 0 0 0 1px rgb(167 243 208 / 0.8);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.375rem;
  font-size: 10px;
  color: #64748b;
}

.site-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer-links a:hover {
  color: #2563eb;
}

.site-footer-dot {
  color: #cbd5e1;
  user-select: none;
}

.site-footer-github {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #64748b;
}

.site-footer-github-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #475569;
}

.site-footer-slack-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #475569;
}

.site-footer-sponsor {
  font-weight: 600;
  color: #db2777;
}

.site-footer-sponsor:hover {
  color: #be185d;
}

/* ---- Sprint retro board ---- */
.sp-retro-board {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .sp-retro-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .sp-retro-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.sp-retro-column {
  display: flex;
  flex-direction: column;
  min-height: 12rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sp-retro-column.is-drag-over {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgb(147 197 253 / 0.45);
}

.sp-retro-column__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  border-radius: 0.75rem 0.75rem 0 0;
  background: #fafafa;
}

.sp-retro-column__head::before {
  content: "";
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #9ca3af;
}

.sp-retro-column--well .sp-retro-column__head::before {
  background: #34d399;
}

.sp-retro-column--improve .sp-retro-column__head::before {
  background: #60a5fa;
}

.sp-retro-column--stop .sp-retro-column__head::before {
  background: #f87171;
}

.sp-retro-column--actions .sp-retro-column__head::before {
  background: #a78bfa;
}

.sp-retro-column__head h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #374151;
}

.sp-retro-column__drop {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem 0.5rem;
  min-height: 6rem;
}

.sp-retro-column__compose {
  padding: 0 0.75rem 0.85rem;
  border-top: 1px solid #e5e7eb;
  margin-top: auto;
}

.sp-retro-column__compose .form-input {
  font-size: 0.875rem;
}

.sp-retro-sticky {
  position: relative;
  padding: 0.7rem 0.75rem 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  cursor: grab;
  touch-action: none;
  transition: box-shadow 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

/* Author tints — same palette as participant avatars */
.sp-retro-sticky--author-0 {
  background: #eff6ff;
  border-color: #93c5fd;
}

.sp-retro-sticky--author-0 .sp-retro-sticky__grip {
  background: repeating-linear-gradient(to bottom, #2563eb 0, #2563eb 2px, transparent 2px, transparent 4px);
}

.sp-retro-sticky--author-1 {
  background: #eef2ff;
  border-color: #a5b4fc;
}

.sp-retro-sticky--author-1 .sp-retro-sticky__grip {
  background: repeating-linear-gradient(to bottom, #4f46e5 0, #4f46e5 2px, transparent 2px, transparent 4px);
}

.sp-retro-sticky--author-2 {
  background: #f5f3ff;
  border-color: #c4b5fd;
}

.sp-retro-sticky--author-2 .sp-retro-sticky__grip {
  background: repeating-linear-gradient(to bottom, #7c3aed 0, #7c3aed 2px, transparent 2px, transparent 4px);
}

.sp-retro-sticky--author-3 {
  background: #fdf4ff;
  border-color: #f0abfc;
}

.sp-retro-sticky--author-3 .sp-retro-sticky__grip {
  background: repeating-linear-gradient(to bottom, #c026d3 0, #c026d3 2px, transparent 2px, transparent 4px);
}

.sp-retro-sticky--author-4 {
  background: #fffbeb;
  border-color: #fcd34d;
}

.sp-retro-sticky--author-4 .sp-retro-sticky__grip {
  background: repeating-linear-gradient(to bottom, #d97706 0, #d97706 2px, transparent 2px, transparent 4px);
}

.sp-retro-sticky--author-5 {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.sp-retro-sticky--author-5 .sp-retro-sticky__grip {
  background: repeating-linear-gradient(to bottom, #059669 0, #059669 2px, transparent 2px, transparent 4px);
}

.sp-retro-sticky--author-6 {
  background: #eff6ff;
  border-color: #93c5fd;
}

.sp-retro-sticky--author-6 .sp-retro-sticky__grip {
  background: repeating-linear-gradient(to bottom, #2563eb 0, #2563eb 2px, transparent 2px, transparent 4px);
}

.sp-retro-sticky--author-7 {
  background: #fff7ed;
  border-color: #fdba74;
}

.sp-retro-sticky--author-7 .sp-retro-sticky__grip {
  background: repeating-linear-gradient(to bottom, #ea580c 0, #ea580c 2px, transparent 2px, transparent 4px);
}

.sp-retro-sticky:hover {
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.08);
}

.sp-retro-sticky.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
}

.sp-retro-sticky--locked {
  cursor: default;
}

.sp-retro-sticky__grip {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  width: 0.5rem;
  height: 0.65rem;
  opacity: 0.45;
  border-radius: 1px;
  pointer-events: none;
}

.sp-retro-sticky__text {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #1f2937;
  white-space: pre-wrap;
  word-break: break-word;
  padding-right: 0.5rem;
}

.sp-retro-sticky__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.sp-retro-sticky__vote {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}

.sp-retro-sticky__vote.is-voted {
  border-color: color-mix(in oklab, var(--color-blue-300) 80%, #e5e7eb);
  background: color-mix(in oklab, var(--color-blue-50) 90%, #fff);
  color: #1d4ed8;
}

.sp-retro-sticky__actions {
  margin-left: auto;
  display: inline-flex;
  gap: 0.25rem;
}

.sp-retro-sticky__action {
  padding: 0.1rem 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6b7280;
  border-radius: 0.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
}

.sp-retro-sticky__action:hover {
  color: #111827;
  background: rgb(0 0 0 / 0.05);
}

.sp-retro-participants {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sp-retro-participant {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
}

.sp-retro-participant__badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  background: #f3f4f6;
}

.sp-retro-anon-wrap {
  display: inline-flex;
  align-items: center;
}

.sp-retro-anon-toggle {
  margin-right: 0.15rem;
}

.sp-retro-sticky--hidden {
  cursor: default;
  border-style: dashed;
  border-color: #d1d5db;
  background: repeating-linear-gradient(
    -45deg,
    #f9fafb,
    #f9fafb 6px,
    #f3f4f6 6px,
    #f3f4f6 12px
  );
  box-shadow: none;
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-retro-sticky--hidden .sp-retro-sticky__placeholder {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.02em;
}

/* ---- Sprint planning & review ---- */
.sp-sprints-section .sp-page-header,
.sp-sprints-section .sp-page-actions,
.sp-sprints-section .sp-menu-wrap {
  overflow: visible;
}

.sp-modal-panel--wide {
  max-width: 28rem;
}

.sp-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

@media (max-width: 480px) {
  .sp-form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.sp-sprint-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sp-sprint-list-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  padding: 0.75rem 0.85rem;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sp-sprint-list-item.is-active {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  box-shadow: 0 4px 14px rgb(37 99 235 / 10%);
}

.sp-sprint-list-item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.sp-sprint-list-item__name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
  line-height: 1.3;
}

.sp-sprint-list-item__badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
}

.sp-sprint-list-item__meta {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.35rem;
  line-height: 1.4;
}

.sp-sprint-list-item__jira {
  font-size: 0.7rem;
  font-family: ui-monospace, monospace;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.sp-sprint-list-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
  padding-top: 0.55rem;
  border-top: 1px solid #f3f4f6;
}

.sp-sprint-board-scroll-hint {
  display: none;
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0 0 0.5rem;
}

.sp-sprint-board,
.sp-sprint-review-board {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.65rem;
  min-height: 14rem;
  align-items: flex-start;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.sp-sprint-col {
  flex: 0 0 15.5rem;
  min-width: 15.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  padding: 0.7rem;
  max-height: 70vh;
  overflow-y: auto;
}

.sp-sprint-col--active {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #f8fbff 0%, #f8fafc 100%);
}

.sp-sprint-col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e2e8f0;
}

.sp-sprint-col__head--active {
  color: #1d4ed8;
}

.sp-sprint-col__count {
  font-weight: 600;
  color: #94a3b8;
}

.sp-sprint-col__add {
  width: 100%;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #64748b;
  background: transparent;
  border: 1px dashed #cbd5e1;
  border-radius: 0.4rem;
  padding: 0.4rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.sp-sprint-col__add:hover {
  border-color: #94a3b8;
  color: #334155;
  background: #fff;
}

.sp-sprint-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.sp-sprint-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgb(15 23 42 / 6%);
  transform: translateY(-1px);
}

.sp-sprint-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
}

.sp-sprint-card__title {
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.sp-sprint-card__points {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.sp-sprint-card__desc {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.3rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-sprint-card__assignee {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: #64748b;
}

.sp-sprint-card__avatar {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.55rem;
}

.sp-team-members-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sp-team-member-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fafafa;
}

.sp-team-member-item__email {
  font-size: 0.875rem;
  color: #374151;
  word-break: break-all;
}

.sp-sprint-card__foot {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.sp-sprint-card__move {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  padding: 0.25rem 0.35rem;
}

.sp-sprint-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.sp-sprint-status--todo { background: #f1f5f9; color: #475569; }
.sp-sprint-status--progress { background: #dbeafe; color: #1d4ed8; }
.sp-sprint-status--review { background: #ede9fe; color: #6d28d9; }
.sp-sprint-status--done { background: #d1fae5; color: #047857; }
.sp-sprint-status--blocked { background: #fee2e2; color: #b91c1c; }

.sp-sprint-review-card {
  cursor: default;
}

.sp-sprint-review-card:hover {
  transform: none;
}

.sp-sprint-review-card .sp-sprint-card__status-select {
  width: 100%;
  margin-top: 0.45rem;
  font-size: 0.75rem;
}

.sp-sprint-review-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sp-sprint-stat {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.5rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  color: #1e40af;
}

.sp-sprint-stat strong {
  font-weight: 700;
}

.sp-sprint-progress {
  max-width: 20rem;
}

.sp-sprint-progress__bar {
  height: 0.45rem;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.sp-sprint-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 999px;
  transition: width 0.35s ease;
  width: 0%;
}

.sp-sprint-progress__label {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.sp-sprint-col--review.sp-sprint-col--todo { border-top: 3px solid #94a3b8; }
.sp-sprint-col--review.sp-sprint-col--progress { border-top: 3px solid #3b82f6; }
.sp-sprint-col--review.sp-sprint-col--review-status { border-top: 3px solid #8b5cf6; }
.sp-sprint-col--review.sp-sprint-col--done { border-top: 3px solid #10b981; }
.sp-sprint-col--review.sp-sprint-col--blocked { border-top: 3px solid #ef4444; }

/* ---- Sprint Trello board ---- */
.sp-sprint-trello-board {
  align-items: stretch;
  min-height: 18rem;
}

.sp-sprint-trello-col {
  display: flex;
  flex-direction: column;
  max-height: min(72vh, 40rem);
}

.sp-sprint-trello-col__drop {
  flex: 1 1 auto;
  min-height: 5rem;
  overflow-y: auto;
  padding: 0.15rem 0;
  border-radius: 0.4rem;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.sp-sprint-trello-col.is-drag-over .sp-sprint-trello-col__drop {
  background: rgb(59 130 246 / 8%);
  box-shadow: inset 0 0 0 2px rgb(96 165 250 / 45%);
}

.sp-sprint-trello-col__empty {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
  padding: 0.75rem 0.35rem;
  border: 1px dashed #e2e8f0;
  border-radius: 0.4rem;
}

.sp-sprint-trello-card {
  position: relative;
  padding-left: 1.35rem;
  cursor: grab;
  touch-action: manipulation;
}

.sp-sprint-trello-card:active {
  cursor: grabbing;
}

.sp-sprint-trello-card.is-dragging {
  opacity: 0.55;
  transform: rotate(1.5deg);
  box-shadow: 0 8px 20px rgb(15 23 42 / 12%);
}

.sp-sprint-trello-card__grip {
  position: absolute;
  left: 0.35rem;
  top: 0.65rem;
  width: 0.45rem;
  height: 0.9rem;
  border-radius: 1px;
  background: repeating-linear-gradient(
    180deg,
    #cbd5e1 0,
    #cbd5e1 2px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.65;
}

.sp-sprint-trello-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.sp-sprint-trello-card__priority {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.sp-sprint-trello-card__assignee {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #1d4ed8;
  max-width: 100%;
}

.sp-sprint-trello-card__assignee span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-sprint-trello-card__assignee--empty {
  color: #94a3b8;
  font-weight: 500;
}

.sp-sprint-trello-card__avatar {
  width: 1.2rem;
  height: 1.2rem;
  font-size: 0.52rem;
  flex-shrink: 0;
}

.sp-sprint-review-members__label {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.sp-sprint-review-members__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sp-sprint-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem 0.35rem 0.4rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  font-size: 0.78rem;
  color: #1e40af;
}

.sp-sprint-member-chip--unassigned {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.sp-sprint-member-chip__avatar {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.58rem;
  flex-shrink: 0;
}

.sp-sprint-member-chip__name {
  font-weight: 600;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-sprint-member-chip__count {
  min-width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0 0.3rem;
}

.sp-sprint-member-chip--unassigned .sp-sprint-member-chip__count {
  background: #e2e8f0;
  color: #64748b;
}

/* ---- Sprint review tabs + Gantt ---- */
.sp-sprint-review-tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  margin-bottom: 1rem;
  border-radius: 0.55rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.sp-sprint-review-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sp-sprint-review-tab:hover {
  color: #334155;
}

.sp-sprint-review-tab.is-active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgb(15 23 42 / 8%);
}

.sp-sprint-gantt {
  min-height: 12rem;
}

.sp-sprint-gantt__empty {
  margin: 0;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
}

.sp-sprint-gantt__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
}

.sp-sprint-gantt__head {
  display: grid;
  grid-template-columns: 9.5rem minmax(28rem, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  min-width: 36rem;
}

.sp-sprint-gantt__head-spacer {
  flex-shrink: 0;
}

.sp-sprint-gantt__ticks {
  position: relative;
  height: 1.35rem;
  border-bottom: 1px solid #e2e8f0;
}

.sp-sprint-gantt__tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.sp-sprint-gantt__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 36rem;
}

.sp-sprint-gantt__lane {
  display: grid;
  grid-template-columns: 9.5rem minmax(28rem, 1fr);
  gap: 0.5rem;
  align-items: stretch;
}

.sp-sprint-gantt__lane-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  padding: 0.35rem 0;
  min-width: 0;
}

.sp-sprint-gantt__lane-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-sprint-gantt__lane-avatar {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.58rem;
  flex-shrink: 0;
}

.sp-sprint-gantt__lane-avatar--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
}

.sp-sprint-gantt__lane-track {
  position: relative;
  min-height: 2.1rem;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  border-radius: 0.4rem;
  overflow: hidden;
}

.sp-sprint-gantt__lane-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: #cbd5e1;
}

.sp-sprint-gantt__bar {
  position: absolute;
  top: 0.2rem;
  bottom: 0.2rem;
  min-width: 1.5rem;
  border: none;
  border-radius: 0.35rem;
  padding: 0.15rem 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  cursor: pointer;
  font: inherit;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.sp-sprint-gantt__bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgb(15 23 42 / 12%);
  z-index: 1;
}

.sp-sprint-gantt__bar-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.sp-sprint-gantt__bar-pts {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgb(255 255 255 / 88%);
  flex-shrink: 0;
}

.sp-sprint-gantt__bar--todo { background: linear-gradient(180deg, #94a3b8, #64748b); }
.sp-sprint-gantt__bar--progress { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.sp-sprint-gantt__bar--review { background: linear-gradient(180deg, #a78bfa, #7c3aed); }
.sp-sprint-gantt__bar--done { background: linear-gradient(180deg, #34d399, #059669); }
.sp-sprint-gantt__bar--blocked { background: linear-gradient(180deg, #f87171, #dc2626); }

.sp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .sp-form-row {
    grid-template-columns: 1fr;
  }
}

/* ---- Poker final estimate ---- */
.sp-final-vote-deck .sp-poker-card.is-final-pick {
  border-color: #b45309;
  background: linear-gradient(160deg, #fbbf24, #d97706);
  color: #1f2937;
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 10px 22px color-mix(in oklab, #d97706 38%, transparent);
}

.sp-final-vote-hint {
  font-weight: 600;
  color: #92400e;
}

.sp-room-status__final {
  color: #b45309;
  font-weight: 700;
}

/* ---- Home team gate ---- */
.sp-home-gate {
  text-align: center;
  padding: 1.5rem 1.25rem;
  margin-bottom: 2rem;
  border: 2px solid #93c5fd;
  border-radius: 0.75rem;
  background: #eff6ff;
}

.sp-home-gate__step {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2563eb;
  margin: 0 0 0.25rem;
}

.sp-home-gate__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0 0 0.5rem;
}

.sp-home-gate__desc {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.6;
  margin: 0 auto 1rem;
  max-width: 30rem;
}

/* ---- Poker → story estimate banner ---- */
.sp-poker-link {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.75rem;
  background: #eff6ff;
}

.sp-poker-link__body {
  min-width: 0;
  flex: 1;
}

.sp-poker-link__eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2563eb;
  margin: 0;
}

.sp-poker-link__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  margin: 0.1rem 0 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.sp-poker-link__hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.3rem 0 0;
}

.sp-poker-link__btn {
  flex-shrink: 0;
  color: #e5e7eb;
  background: #1f2937;
}

.sp-poker-link__btn:hover:not(:disabled) {
  background: #111827;
}

.sp-poker-link__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (min-width: 640px) {
  .sp-poker-link {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 639px) {
  .sp-poker-link__btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---- Home feature groups ---- */
.sp-feature-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1d4ed8;
  margin: 0 0 0.15rem;
}

.sp-feature-group-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 0.9rem;
}

/* ---- Sprint capacity / velocity bar ---- */
.sp-capacity {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sp-capacity--compact {
  gap: 0.2rem;
}

.sp-capacity__bar {
  height: 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.sp-capacity__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width 0.2s ease;
}

.sp-capacity.is-near .sp-capacity__fill {
  background: linear-gradient(90deg, #fbbf24, #d97706);
}

.sp-capacity.is-over .sp-capacity__fill {
  background: linear-gradient(90deg, #f87171, #dc2626);
}

.sp-capacity__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
}

.sp-capacity.is-over .sp-capacity__label {
  color: #b91c1c;
}

.sp-capacity--nocap .sp-capacity__label {
  color: #64748b;
}

/* ---- Sprint board toolbar (search / filter) ---- */
.sp-sprint-board-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.sp-sprint-board-toolbar__search {
  flex: 1 1 12rem;
  min-width: 9rem;
}

.sp-sprint-board-toolbar__select {
  flex: 0 1 10rem;
  min-width: 7rem;
}

/* ---- Checklist badge on cards ---- */
.sp-checklist-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0.35rem 0 0;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
}

.sp-checklist-badge.is-complete {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.sp-checklist-badge svg {
  flex-shrink: 0;
}

/* ---- Sprint burndown chart ---- */
.sp-sprint-burndown {
  min-height: 14rem;
}

.sp-burndown__svg {
  display: block;
  width: 100%;
  min-width: 20rem;
  height: auto;
}

.sp-burndown__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
}

.sp-burndown__key {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sp-burndown__key::before {
  content: "";
  width: 1.1rem;
  height: 0.2rem;
  border-radius: 999px;
  display: inline-block;
}

.sp-burndown__key--ideal::before {
  background: #94a3b8;
}

.sp-burndown__key--actual::before {
  background: #2563eb;
}

.sp-burndown__grid {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.sp-burndown__ylabel,
.sp-burndown__xlabel {
  font-size: 0.6rem;
  font-weight: 600;
  fill: #94a3b8;
}

.sp-burndown__xlabel {
  text-anchor: middle;
}

.sp-burndown__ylabel {
  text-anchor: end;
}

.sp-burndown__today {
  stroke: #f59e0b;
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}

.sp-burndown__ideal {
  fill: none;
  stroke: #94a3b8;
  stroke-width: 2;
  stroke-dasharray: 5 4;
}

.sp-burndown__actual {
  fill: none;
  stroke: #2563eb;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
