.live-shell {
  min-height: 100dvh;
}
.live-shell .sidebar {
  height: 100dvh;
}
.brand-button {
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}
.sidebar .nav-item {
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}
.sidebar .nav-item.active {
  background: var(--green);
  color: white;
}
.sidebar .nav-item:hover {
  background: #eaf0e9;
  color: var(--green);
}
.sidebar .nav-item.active:hover {
  background: var(--deep);
  color: white;
}
.workspace,
#app,
.screen,
.dashboard-main,
.right-column {
  min-width: 0;
}
.hero {
  margin: 0;
  padding: 0;
}
.station-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.workspace {
  display: flex;
  flex-direction: column;
}
#app {
  flex: 1;
}
.topbar-end {
  margin-left: auto;
  margin-right: 18px;
}
.topbar-end:empty {
  display: none;
}
.station-card {
  display: block;
  color: inherit;
  cursor: pointer;
  width: 100%;
}
.station-card.done {
  border-color: #bed8c2;
  background: #f5faf3;
}
.station-card.done .station-bottom .done {
  color: var(--green);
  font-weight: 700;
}
.station-card:disabled {
  cursor: default;
  opacity: 0.65;
}
.project-shortcut {
  border: 1px solid var(--line);
  background: white;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  column-gap: 12px;
  align-items: center;
  width: 100%;
  padding: 18px;
  text-align: left;
  margin: 16px 0 20px;
  color: var(--ink);
  font-weight: 700;
}
.project-shortcut small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.shortcut-arrow {
  grid-column: 3;
  grid-row: 1 / 3;
  color: var(--green);
  font-size: 20px;
}
.project-shortcut .station-icon {
  grid-row: 1 / 3;
}
.admin-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.admin-action-grid button {
  min-width: 0;
}
.queue-card {
  width: 100%;
}
.settings-form .primary {
  margin-top: 18px;
}
.settings-form .secondary {
  margin-top: 12px;
}
.settings-page .period-preview {
  align-self: start;
}
.period-preview-name,
.period-preview-dates {
  overflow-wrap: anywhere;
}
.mobile-nav .nav-item:nth-child(4) {
  display: flex;
}
dialog {
  border: 0;
  padding: 0;
  border-radius: 20px;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  box-shadow: 0 24px 80px #06281c50;
}
dialog::backdrop {
  background: #0c251bc0;
}
.modal {
  padding: 24px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.modal-head h2 {
  margin: 0;
  font-size: 20px;
}
.modal-close {
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
}
.modal p {
  color: var(--muted);
  font-size: 13px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
.modal-actions button {
  min-width: 110px;
}
@media (max-width: 900px) {
  .admin-action-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .live-shell {
    min-height: 100dvh;
  }
  .workspace {
    padding: 0 16px;
  }
  .mobile-nav {
    align-items: stretch;
  }
  .mobile-nav .nav-item {
    flex: 1 1 0;
    min-width: 0;
    padding: 5px 2px;
    white-space: nowrap;
  }
  .mobile-nav .nav-item svg {
    width: 19px;
    height: 19px;
  }
  .mobile-nav .nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .staff-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .modal-actions {
    flex-direction: column-reverse;
  }
  .modal-actions button {
    width: 100%;
  }
}
@media (max-width: 360px) {
  .workspace {
    padding: 0 12px;
  }
  .mobile-nav .nav-item {
    font-size: 8px;
  }
  .mobile-brand b {
    font-size: 11px;
  }
  .greeting h1 {
    font-size: 22px;
  }
}

/* Shared rhythm for participant, instructor and administrator screens. */
.live-shell {
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --text-caption: 12px;
  --text-body: 14px;
  --text-heading: 20px;
  --text-page: 32px;
  font-size: var(--text-body);
  line-height: 1.55;
}
.live-shell .workspace {
  padding-inline: var(--space-5);
}
.live-shell #app {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding: 0 0 48px;
}
.live-shell .screen {
  padding-top: var(--space-4);
}
.live-shell #app .screen h1,
.live-shell #app .screen .page-title {
  font-size: var(--text-page);
  line-height: 1.18;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
.live-shell #app .screen h2 {
  font-size: var(--text-heading);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.live-shell #app .screen h3 {
  font-size: 17px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.live-shell #app .screen p,
.live-shell #app .screen li,
.live-shell #app .screen .page-intro,
.live-shell #app .screen .notice {
  font-size: var(--text-body);
  line-height: 1.55;
}
.live-shell #app .screen small,
.live-shell #app .screen .station-bottom,
.live-shell #app .screen .station-number,
.live-shell #app .screen .hero-meta,
.live-shell #app .screen .side-sub {
  font-size: var(--text-caption);
  line-height: 1.4;
}
.live-shell #app .screen .eyebrow,
.live-shell #app .screen .card-kicker {
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.08em;
}
.live-shell #app .screen .field-label {
  font-size: 13px;
  line-height: 1.4;
}
.live-shell #app .screen .primary,
.live-shell #app .screen .secondary,
.live-shell #app .screen .danger,
.live-shell #app .screen .small-button,
.live-shell #app .screen .text-button {
  min-height: 44px;
  font-size: var(--text-body);
  line-height: 1.35;
}
.live-shell #app .screen .primary,
.live-shell #app .screen .secondary,
.live-shell #app .screen .danger {
  padding: 12px 16px;
}
.live-shell #app .screen .card,
.live-shell #app .screen .large-card,
.live-shell #app .screen .side-card {
  padding: var(--space-4);
}
.live-shell #app .screen .participant-profile {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}
.live-shell #app .screen .participant-profile-identity,
.live-shell #app .screen .participant-profile-access {
  min-width: 0;
}
.live-shell #app .screen .participant-profile-access {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-left: 1px solid var(--line);
  padding-left: var(--space-4);
}
.live-shell #app .screen .participant-profile-label {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.live-shell #app .screen .participant-profile-name {
  margin: 0 0 var(--space-1);
  color: var(--green);
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.2;
}
.live-shell #app .screen .participant-profile-club,
.live-shell #app .screen .participant-profile-email,
.live-shell #app .screen .participant-profile-help {
  margin: 0;
}
.live-shell #app .screen .participant-profile-club {
  color: var(--muted);
}
.live-shell #app .screen .participant-profile-email {
  color: var(--green);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.live-shell #app .screen .participant-profile-help {
  margin-top: var(--space-1);
  color: var(--muted);
}
.live-shell #app .screen .participant-profile-access .secondary {
  margin-top: var(--space-3);
}
.live-shell #app .screen .admin-status-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-block: 16px;
  padding: 18px 20px;
  border-radius: 16px;
}
.live-shell #app .screen .admin-status-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.live-shell #app .screen .admin-status-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.live-shell #app .screen .admin-status-badge {
  padding: 5px 10px;
  border-radius: 999px;
  background: #eaf0e9;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.live-shell #app .screen .admin-status-period {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.live-shell #app .screen .admin-status-action {
  align-self: flex-start;
  min-height: 44px;
  margin: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.live-shell #app .screen .admin-status-action:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.live-shell #app .screen .admin-status-action:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.live-shell #app .screen .large-card {
  margin-block: var(--space-3);
}
.live-shell #app .screen .section-heading,
.live-shell #app .screen .section-head {
  margin-block: var(--space-4) var(--space-2);
}
.live-shell #app .screen .page-intro {
  margin-block: var(--space-2) var(--space-4);
}
.live-shell #app .screen .dashboard-grid,
.live-shell #app .screen .station-grid,
.live-shell #app .screen .right-column,
.live-shell #app .screen .admin-action-grid {
  gap: var(--space-3);
}
.live-shell #app .screen .station-card {
  min-width: 0;
  padding: var(--space-3);
}
.live-shell #app .screen .station-card h3 {
  min-height: 0;
}
.live-shell #app .screen .station-card p {
  min-height: 0;
  margin-top: 6px;
}
.live-shell #app .screen .station-bottom {
  flex-wrap: wrap;
  gap: 6px 12px;
}
.live-shell #app .screen .hero-copy {
  width: 74%;
  padding: var(--space-5);
}
.live-shell .hero::before,
.live-shell .hero::after {
  content: none;
}
.live-shell #app .screen .hero h2 {
  font-size: clamp(34px, 3.5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.live-shell #app .screen .hero-pattern {
  top: auto;
  right: -20px;
  bottom: -25px;
  width: 34%;
  height: 110%;
  opacity: 0.45;
  mask-image: linear-gradient(to right, transparent, black 58%);
}
.live-shell #app .screen .hero-meta {
  flex-wrap: wrap;
  gap: 8px 16px;
  white-space: normal;
}
.live-shell #app .screen .staff-banner {
  gap: var(--space-4);
  padding: var(--space-4);
}
.live-shell #app .screen .staff-banner h2 {
  font-size: 24px;
}
.live-shell #app .screen .queue-name strong,
.live-shell .profile-link,
.live-shell .project-shortcut {
  overflow-wrap: anywhere;
}
.live-shell #app .screen .staff-stats,
.live-shell #app .screen .metric-grid {
  gap: var(--space-2);
  margin-block: var(--space-4);
}
.live-shell #app .screen .staff-stats > div {
  padding: var(--space-3);
}
.live-shell #app .screen .settings-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: min(100%, 480px);
  margin: 16px 0 24px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  overflow: visible;
}
.live-shell #app .screen .settings-tabs button {
  display: flex;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  margin-bottom: -1px;
  padding: 10px 8px 11px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    color 150ms ease,
    border-color 150ms ease;
}
.live-shell #app .screen .settings-tabs button.active {
  border-bottom-color: var(--green);
  background: transparent;
  color: var(--green);
  font-weight: 700;
}
.live-shell #app .screen .settings-tabs button:hover:not(.active) {
  background: #eaf0e9;
  color: var(--green);
}
.live-shell #app .screen .settings-tabs button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--green);
  outline-offset: -3px;
}
.live-shell #app .screen .settings-section-title {
  gap: 12px;
  margin-bottom: 18px;
}
.live-shell #app .screen .settings-section-title h2 {
  font-size: 18px;
}
.live-shell #app .screen .settings-section-title p {
  font-size: 13px;
  line-height: 1.45;
}
.live-shell #app .screen .empty {
  padding: 24px 20px;
  border-radius: 14px;
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.5;
}
.live-shell #app .screen .admin-slot {
  gap: 16px;
  padding-block: 14px;
}
.live-shell #app .screen .day-strip {
  max-width: 100%;
  margin-inline: 0;
  padding-inline: 0;
}
.live-shell #app .screen .admin-slot strong {
  font-size: 16px;
}
.live-shell #app .screen .admin-slot small {
  font-size: 13px;
}
.live-shell #app .screen .stepper button {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 21px;
}
.live-shell #app .screen .stepper b {
  min-width: 24px;
  font-size: 16px;
}
.live-shell #app .screen .settings-helper {
  font-size: var(--text-body) !important;
}
.live-shell .nav-item {
  font-size: 14px;
}
.live-shell .profile-link small,
.live-shell .sidebar-bottom p {
  font-size: var(--text-caption);
}
.live-shell footer {
  font-size: var(--text-caption);
}
.live-shell .help-button {
  display: none;
}

@media (max-width: 900px) {
  .live-shell .sidebar {
    display: none;
  }
  .live-shell .workspace {
    width: 100%;
    padding-inline: 0;
  }
  .live-shell .topbar {
    min-height: 72px;
    height: auto;
    padding: 12px 24px;
  }
  .live-shell .top-label {
    display: none;
  }
  .live-shell .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .live-shell .mobile-brand img {
    width: 30px;
    height: 37px;
    object-fit: contain;
    flex: none;
  }
  .live-shell .topbar-end {
    flex: none;
    margin-right: 8px;
  }
  .live-shell .help-button {
    display: block;
    width: 44px;
    height: 44px;
    flex: none;
  }
  .live-shell #app {
    padding: 0 24px calc(104px + var(--safe));
  }
  .live-shell footer {
    padding: 24px 24px calc(104px + var(--safe));
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    width: 100%;
    justify-content: space-around;
    padding: 8px 12px calc(8px + var(--safe));
    border-top: 1px solid var(--line);
    background: #fffffff5;
    backdrop-filter: blur(15px);
  }
  .mobile-nav .nav-item {
    flex: 1 1 0;
    min-width: 0;
    min-height: 54px;
    margin: 0;
    padding: 5px 4px;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
  }
  .mobile-nav .nav-item:nth-child(4) {
    display: flex;
  }
  .mobile-nav .nav-item.active {
    background: transparent;
    color: var(--green);
  }
  .mobile-nav .nav-item:not(.active) {
    color: #6d7871;
  }
  .mobile-nav .nav-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-nav .nav-item svg {
    width: 21px;
    height: 21px;
  }
  .live-shell #app .screen .hero-copy {
    width: 80%;
  }
}

@media (max-width: 650px) {
  .live-shell {
    --text-page: 27px;
    --text-heading: 19px;
  }
  .live-shell .topbar {
    padding-inline: 16px;
  }
  .live-shell #app {
    padding-inline: 16px;
  }
  .live-shell footer {
    padding-inline: 16px;
  }
  .live-shell #app .screen .hero-copy {
    width: 100%;
    padding: 24px 20px;
  }
  .live-shell #app .screen .hero h2 {
    font-size: clamp(30px, 8vw, 36px);
  }
  .live-shell #app .screen .hero p {
    max-width: 240px;
  }
  .live-shell #app .screen .hero-pattern {
    width: 150px;
    height: 230px;
    right: -18px;
    bottom: -28px;
    opacity: 0.24;
  }
  .live-shell #app .screen .greeting {
    align-items: flex-start;
  }
  .live-shell #app .screen .greeting > .badge {
    display: none;
  }
  .live-shell #app .screen .station-grid {
    gap: var(--space-2);
  }
  .live-shell #app .screen .station-card,
  .live-shell #app .screen .card,
  .live-shell #app .screen .large-card,
  .live-shell #app .screen .side-card {
    padding: var(--space-3);
  }
  .live-shell #app .screen .participant-profile {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-3);
  }
  .live-shell #app .screen .participant-profile-access {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: var(--space-3) 0 0;
  }
  .live-shell #app .screen .participant-profile-access .secondary {
    width: 100%;
  }
  .live-shell #app .screen .staff-banner {
    padding: 20px;
  }
  .live-shell #app .screen .staff-banner h2 {
    font-size: 22px;
  }
  .live-shell #app .screen .settings-tabs {
    width: 100%;
  }
  .live-shell #app .screen .admin-slot {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .live-shell #app .screen .admin-slot .stepper {
    justify-content: flex-end;
  }
  .mobile-nav .nav-item {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .live-shell .topbar,
  .live-shell #app,
  .live-shell footer {
    padding-inline: 12px;
  }
  .mobile-nav {
    padding-inline: 4px;
  }
  .mobile-nav .nav-item {
    font-size: 9px;
  }
  .live-shell #app .screen .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
}
/* Standalone PWA sign-in */
.auth-screen {
  display: grid;
  min-height: min(70dvh, 720px);
  place-items: center;
}
.auth-card {
  width: min(100%, 440px);
  padding: clamp(24px, 5vw, 40px);
  display: grid;
  gap: 18px;
}
.auth-card .page-title {
  margin-bottom: 8px;
}
.auth-card .input {
  width: 100%;
}
.auth-password-wrap {
  position: relative;
}
.auth-password-wrap .input {
  padding-right: 58px;
}
.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
}
.auth-password-toggle:hover,
.auth-password-toggle.is-visible {
  color: var(--green);
  background: var(--soft-green);
}
.auth-password-toggle svg {
  width: 22px;
  height: 22px;
}
.auth-password-toggle .eye-slash {
  display: none;
}
.auth-password-toggle.is-visible .eye-slash {
  display: block;
}
.logout-button {
  margin-left: 12px;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}
.auth-mode .sidebar-bottom,
.auth-mode .help-button {
  display: none;
}

.rules-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 20px 0 16px;
  color: var(--green);
  font-size: var(--text-body);
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}
.rules-consent input[type='checkbox'] {
  flex: 0 0 20px;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  margin: 2px 0 0;
  accent-color: var(--green);
}
.reset-password-value {
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  font-size: 18px;
  overflow-wrap: anywhere;
  user-select: all;
}
