.party-scheduler-page {
  display: grid;
  gap: 1.25rem;
}

#party-scheduler-status {
  font-size: 26px !important;
  line-height: 1.45;
}

.party-scheduler-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.party-scheduler-schedules {
  min-width: 0;
  width: 100%;
}

.party-scheduler-pool {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 7rem);
  overflow: auto;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px);
}

.party-scheduler-pool h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--gold);
}

.party-scheduler-pool input[type="search"] {
  width: 100%;
  margin-bottom: 1rem;
}

.party-scheduler-group {
  margin-bottom: 1rem;
}

.party-scheduler-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0 0 0.45rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--chip-color, var(--cyan));
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: grab;
  touch-action: none;
}

.party-scheduler-chip:active {
  cursor: grabbing;
}

.party-scheduler-chip.is-dragging {
  opacity: 0.45;
}

.party-scheduler-chip-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--chip-color, var(--cyan));
  flex-shrink: 0;
}

.party-scheduler-chip-body {
  min-width: 0;
}

.party-scheduler-chip-body strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.2;
}

.party-scheduler-chip-body small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.party-scheduler-boards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  width: 100%;
}

.party-scheduler-board {
  width: 100%;
  min-width: 0;
  padding: 0.85rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.party-scheduler-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.party-scheduler-board-title {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.party-scheduler-board-head h3 {
  margin: 0;
  font-size: 1rem;
}

.party-scheduler-board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.party-scheduler-board-actions button {
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
}

.party-scheduler-coins {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.party-scheduler-combined {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 215, 0, 0.18);
  background: rgba(255, 215, 0, 0.05);
}

.party-scheduler-combined span {
  color: var(--muted);
  font-size: 0.85rem;
}

.party-scheduler-combined strong {
  color: var(--gold);
  font-size: 1rem;
}

.party-scheduler-timeline-wrap {
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 180, 220, 0.08);
}

.party-scheduler-sheet {
  width: 100%;
  min-width: 100%;
}

.party-scheduler-sheet-head {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(12, 10, 18, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.party-scheduler-time-head,
.party-scheduler-col-header {
  padding: 0.45rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  border-left: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.party-scheduler-time-head {
  border-left: none;
}

.party-scheduler-col-headers {
  display: grid;
  grid-template-columns: repeat(var(--col-count, 3), minmax(0, 1fr));
}

.party-scheduler-sheet-body {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  height: calc(var(--slot-count, 96) * var(--slot-height, 22px));
}

.party-scheduler-times {
  display: grid;
  grid-auto-rows: var(--slot-height, 22px);
  height: calc(var(--slot-count, 96) * var(--slot-height, 22px));
  border-right: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.02);
}

.party-scheduler-cols {
  display: grid;
  grid-template-columns: repeat(var(--col-count, 3), minmax(0, 1fr));
  width: 100%;
}

.party-scheduler-col {
  position: relative;
  border-left: 1px solid rgba(148, 163, 184, 0.25);
  height: calc(var(--slot-count, 96) * var(--slot-height, 22px));
  overflow: hidden;
}

.party-scheduler-col-header--powerup {
  background: rgba(34, 197, 94, 0.12);
}

.party-scheduler-col-header--bling {
  background: rgba(99, 102, 241, 0.12);
}

.party-scheduler-slots {
  display: grid;
  grid-auto-rows: var(--slot-height, 22px);
  min-height: 100%;
}

.party-scheduler-time {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.08rem 0.2rem 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.62rem;
  line-height: 1;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.party-scheduler-time.is-half-hour {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  border-top-color: rgba(148, 163, 184, 0.28);
}

.party-scheduler-time.is-hour {
  color: rgba(255, 255, 255, 0.92);
  border-top-color: rgba(148, 163, 184, 0.45);
}

.party-scheduler-slot {
  min-height: var(--slot-height, 22px);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.015);
}

.party-scheduler-slot.is-half-hour {
  border-top-color: rgba(148, 163, 184, 0.28);
}

.party-scheduler-slot.is-hour {
  border-top-color: rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.03);
}

.party-scheduler-time.is-six-hour,
.party-scheduler-slot.is-six-hour {
  border-top-width: 2px;
  border-top-color: rgba(15, 23, 42, 0.85);
}

.party-scheduler-bar.is-extends-past,
.party-scheduler-bar.is-extends-before {
  border-style: solid;
  border-width: 1px;
}

.party-scheduler-bar.is-extends-past {
  border-bottom-style: dashed;
  border-bottom-width: 2px;
}

.party-scheduler-bar.is-extends-before {
  border-top-style: dashed;
  border-top-width: 2px;
}

.party-scheduler-time.is-six-hour {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
}

.party-scheduler-time.is-beyond-scale {
  border-top-color: rgba(148, 163, 184, 0.08);
  background: rgba(255, 255, 255, 0.01);
}

.party-scheduler-slot.is-six-hour {
  background: rgba(255, 255, 255, 0.045);
}

.party-scheduler-slot.is-drop-target {
  background: rgba(34, 211, 238, 0.16);
}

.party-scheduler-slot.is-invalid {
  background: rgba(239, 68, 68, 0.16);
}

.party-scheduler-bars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.party-scheduler-bar {
  position: absolute;
  left: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: 0.15rem;
  background: color-mix(in srgb, var(--bar-color, var(--cyan)) 78%, rgba(255, 255, 255, 0.08));
  color: #101010;
  font-size: 0.68rem;
  line-height: 1.15;
  overflow: hidden;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  text-align: center;
}

.party-scheduler-bar:active {
  cursor: grabbing;
  z-index: 2;
}

.party-scheduler-board-meta {
  display: none;
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.party-scheduler-bar-start {
  display: none;
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.1;
}

.party-scheduler-bar-label {
  font-weight: 700;
  width: 100%;
}

.party-scheduler-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.party-scheduler-toolbar button:last-child {
  margin-left: auto;
}

.party-scheduler-share-status {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 0.9rem;
}

.party-scheduler-share-status[hidden] {
  display: none !important;
}

.party-scheduler-toolbar label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.party-scheduler-toolbar input[type="time"] {
  width: auto;
}

@media print {
  @page {
    size: portrait;
    margin: 0.35in;
  }

  html,
  body {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: hidden !important;
  }

  header,
  footer,
  .cookie-banner,
  .heading,
  .party-scheduler-pool,
  .party-scheduler-toolbar,
  .party-scheduler-share-status,
  #party-scheduler-status,
  .party-scheduler-combined,
  .party-scheduler-board-actions,
  body[data-print-schedule] .party-scheduler-board {
    display: none !important;
  }

  body[data-print-schedule="table1"] [data-board="table1"],
  body[data-print-schedule="table2"] [data-board="table2"] {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: #fff !important;
    box-shadow: none !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
  }

  .page-shell,
  main,
  #view-partyScheduler,
  .party-scheduler-page,
  .party-scheduler-layout,
  .party-scheduler-schedules,
  .party-scheduler-boards,
  #party-scheduler-root,
  .section {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: #fff !important;
    max-width: none !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .party-scheduler-print-fit {
    transform: scale(var(--print-scale, 0.82));
    transform-origin: top left;
    width: calc(100% / var(--print-scale, 0.82));
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .party-scheduler-board-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 0 0.15in !important;
    padding: 0 !important;
  }

  .party-scheduler-board-title {
    display: flex !important;
    align-items: baseline !important;
    gap: 0.15in !important;
  }

  .party-scheduler-board-head h3 {
    margin: 0 !important;
    font-size: 12pt !important;
    color: #111 !important;
  }

  .party-scheduler-coins {
    font-size: 10pt !important;
    color: #333 !important;
  }

  .party-scheduler-timeline-wrap,
  .party-scheduler-col,
  .party-scheduler-sheet,
  .party-scheduler-sheet-body {
    overflow: hidden !important;
    background: #fff !important;
  }

  .party-scheduler-timeline-wrap {
    border: 1px solid #999 !important;
  }

  .party-scheduler-sheet-head {
    background: #f3f4f6 !important;
    color: #111 !important;
  }

  .party-scheduler-time-head,
  .party-scheduler-col-header,
  .party-scheduler-time,
  .party-scheduler-slot {
    color: #111 !important;
    border-color: #bbb !important;
    background: #fff !important;
  }

  .party-scheduler-col-header--powerup,
  .party-scheduler-col-header--bling {
    background: #eee !important;
  }

  .party-scheduler-board-meta,
  .party-scheduler-bar-start {
    display: block !important;
  }

  .party-scheduler-board-meta {
    margin: 0 0 0.1in !important;
    font-size: 9pt !important;
    color: #333 !important;
  }

  .party-scheduler-bar {
    flex-direction: column !important;
    gap: 0.05rem !important;
  }

  .party-scheduler-bar-start {
    font-size: 6pt !important;
    color: #111 !important;
  }

  .party-scheduler-bar {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    color: #111 !important;
    border-color: #333 !important;
    font-size: 6pt !important;
  }

  .party-scheduler-bar-label {
    font-weight: 700;
    width: 100%;
  }
  .party-scheduler-bar.is-extends-before {
    border-style: solid !important;
  }
}

@media (max-width: 960px) {
  .party-scheduler-layout {
    grid-template-columns: 1fr;
  }

  .party-scheduler-pool {
    position: static;
    max-height: none;
  }

  .party-scheduler-boards {
    grid-template-columns: 1fr;
  }
}
