/* HamBeat host, live player, and technical surfaces.
   Core tokens live in hambeat-design-system.css; this file only composes them. */

.host-dashboard-page,
.hambeat-player-page,
.debug-page {
  --hb-canvas: var(--hb-porcelain);
  --hb-primary: var(--hb-cobalt);
  --hb-primary-container: var(--hb-powder);
  --hb-accent: var(--hb-butter);
  --hb-ink-muted: var(--hb-muted);
  --hb-surface-container: var(--hb-sand);
  --hb-on-primary: var(--hb-surface);
  --hb-on-accent: var(--hb-ink);
  --hambeat-purple: var(--hb-cobalt);
  --hambeat-pink: var(--hb-cobalt);
  --hambeat-cyan: var(--hb-cobalt);
  --hambeat-lime: var(--hb-butter);
  --hambeat-orange: var(--hb-butter);
  --hambeat-ink: var(--hb-ink);
  --hambeat-muted: var(--hb-muted);
  --hambeat-line: var(--hb-line);
  --hambeat-canvas: var(--hb-porcelain);
  --hambeat-surface: var(--hb-surface);
}

/* The legacy player markup contains example time labels. Keep them hidden until
   app.js replaces them with values from the authoritative server timeline. */
.hambeat-player-page:not(.track-state-ready) #decorative-progress,
.hambeat-player-page:not(.track-state-ready) #track-position,
.hambeat-player-page:not(.track-state-ready) .hambeat-time:has(#track-position) > span:first-child {
  visibility: hidden;
}

.hambeat-brand-lockup {
  display: grid;
  justify-items: center;
  line-height: 1;
}

.hambeat-brand-lockup b {
  color: inherit;
  font-size: 21px;
  font-weight: 950;
  letter-spacing: -.04em;
}

.hambeat-ui .hambeat-brand-lockup b::after {
  content: none;
}

.hambeat-brand-lockup small {
  margin-top: 5px;
  color: inherit;
  font: 650 9px/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .08em;
  opacity: .68;
}

/* Host dashboard */

.host-dashboard-page {
  --hb-app-sidebar-width: 176px;
  --hb-app-sidebar-padding: 24px 14px 20px;
  --hb-app-nav-gap: 7px;
  color: var(--hb-ink, #09213d);
  background: var(--hb-canvas, #f7f6f2);
}

.host-dashboard-page .hambeat-app {
  grid-template-columns: var(--hb-app-sidebar-width) minmax(0, 1fr);
  background: var(--hb-canvas, #f7f6f2);
}

.host-dashboard-page .hambeat-sidebar {
  border-inline-start: 1px solid rgba(255, 255, 255, .1);
}

.host-dashboard-page .hambeat-sidebar .hambeat-brand {
  min-height: 70px;
  padding: 2px 0 18px;
  display: grid;
  place-items: center;
  color: #fff;
}

.host-dashboard-page .hambeat-sidebar-foot {
  padding: 12px 6px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--hb-radius-md, 18px);
  background: rgba(255, 255, 255, .06);
  text-align: center;
}

.host-dashboard-page .hambeat-sidebar-foot strong {
  font-size: 10px;
}

.host-dashboard-page .hambeat-sidebar-foot small {
  margin-top: 4px;
  display: block;
  color: rgba(255, 255, 255, .6);
  font-size: 8px;
}

.host-dashboard-page .hambeat-main {
  inline-size: 100%;
  max-inline-size: 1500px;
  min-block-size: 100vh;
  margin-inline: auto;
  padding: 18px clamp(24px, 3vw, 46px) 80px;
  background: var(--hb-canvas, #f7f6f2);
}

.host-dashboard-page .hambeat-appbar {
  min-height: 62px;
  margin-bottom: 16px;
  padding: 0;
  border: 0;
}

.host-dashboard-page .host-appbar-brand .hambeat-icon-button {
  display: none;
}

.host-dashboard-page .hambeat-appbar-search {
  width: min(480px, 46vw);
  min-height: 50px;
  border: 1px solid var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-lg, 24px);
  color: var(--hb-ink-muted, #657287);
  background: var(--hb-surface, #fff);
}

.host-dashboard-page .hambeat-appbar-search input {
  color: var(--hb-ink, #09213d);
  background: transparent;
}

.host-dashboard-page .hambeat-icon-button,
.host-dashboard-page .host-user-button {
  border: 1px solid var(--hb-line, #d9dfe7);
  background: var(--hb-surface, #fff);
  box-shadow: none;
}

.host-dashboard-page .host-avatar {
  color: var(--hb-primary, #1e60e9);
  background: var(--hb-primary-container, #e8efff);
}

.host-dashboard-page .host-dashboard-title {
  margin-bottom: 18px;
  align-items: center;
}

.host-dashboard-page .host-dashboard-title h1 {
  color: var(--hb-ink, #09213d);
  font-size: clamp(30px, 2.4vw, 38px);
  font-weight: 950;
  letter-spacing: -.04em;
}

.host-dashboard-page .hambeat-kicker {
  color: var(--hb-primary, #1e60e9);
  font-size: 11px;
  font-weight: 850;
}

.host-dashboard-page .hambeat-subtle {
  color: var(--hb-ink-muted, #657287);
}

.host-dashboard-page .hambeat-button,
.host-dashboard-page .creator-form .hambeat-button {
  min-height: 48px;
  padding-inline: 21px;
  border: 0;
  border-radius: var(--hb-radius-sm, 14px);
  color: var(--hb-on-primary, #fff);
  background: var(--hb-primary, #1e60e9);
  box-shadow: none;
  font-weight: 850;
}

.host-dashboard-page .hambeat-button:hover {
  filter: brightness(.94);
}

.host-dashboard-page .hambeat-button-secondary {
  min-height: 46px;
  border: 1px solid var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-sm, 14px);
  color: var(--hb-ink, #09213d);
  background: var(--hb-surface, #fff);
}

.host-dashboard-page .host-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.host-dashboard-page .hambeat-stat {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-lg, 24px);
  color: var(--hb-ink, #09213d);
  background: var(--hb-surface, #fff);
  box-shadow: none;
}

.host-dashboard-page .hambeat-stat::before {
  display: none;
}

.host-dashboard-page .hambeat-stat > i {
  color: var(--hb-primary, #1e60e9);
  background: var(--hb-primary-container, #e8efff);
}

.host-dashboard-page .hambeat-stat:nth-child(2) > i,
.host-dashboard-page .hambeat-stat:nth-child(5) > i {
  color: var(--hb-on-accent, #2d2a00);
  background: var(--hb-accent, #ffdf5d);
}

.host-dashboard-page .hambeat-stat strong {
  color: var(--hb-ink, #09213d);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.host-dashboard-page .hambeat-stat span,
.host-dashboard-page .hambeat-stat small {
  color: var(--hb-ink-muted, #657287);
}

.host-dashboard-page .host-analytics-grid {
  margin-top: 18px;
  grid-template-columns: minmax(270px, .8fr) minmax(360px, 1.35fr) minmax(230px, .7fr);
  gap: 16px;
}
.host-dashboard-page:not(.host-event-selected) .host-analytics-grid,
.host-dashboard-page:not(.host-event-selected) .host-live-table-panel,
.host-dashboard-page:not(.host-event-selected) .host-quick-actions { display: none; }

.host-dashboard-page .hambeat-panel,
.host-dashboard-page .creator-card,
.host-dashboard-page .user-event-card {
  border: 1px solid var(--hb-line, #d9dfe7);
  color: var(--hb-ink, #09213d);
  background: var(--hb-surface, #fff);
  box-shadow: none;
}

.host-dashboard-page .hambeat-panel {
  padding: 22px;
  border-radius: var(--hb-radius-lg, 24px);
}

.host-dashboard-page .hambeat-panel-head {
  align-items: center;
}

.host-dashboard-page .hambeat-panel-head h2,
.host-dashboard-page .hambeat-section-head h2 {
  color: var(--hb-ink, #09213d);
  font-weight: 900;
}

.host-dashboard-page .host-quality-donut {
  border: 8px solid var(--hb-primary-container, #e8efff);
  background:
    radial-gradient(circle at center, var(--hb-surface, #fff) 0 52%, transparent 53%),
    conic-gradient(
      var(--hb-success, #16835b) 0 var(--excellent),
      var(--hb-cobalt, #3159d8) var(--excellent) calc(var(--excellent) + 25deg),
      var(--hb-butter, #f3d36a) 0 calc(var(--excellent) + 50deg),
      var(--hb-danger, #c63f4e) 0
    );
  box-shadow: none;
}

.host-dashboard-page .host-quality-legend,
.host-dashboard-page .host-event-overview small {
  color: var(--hb-ink-muted, #657287);
}

.host-dashboard-page .host-quality-legend b,
.host-dashboard-page .host-event-overview strong {
  color: var(--hb-ink, #09213d);
}

.host-dashboard-page .host-primary-qr {
  border-color: var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-md, 18px);
  background: var(--hb-surface, #fff);
}

.host-dashboard-page .host-share-actions button {
  border-color: var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-sm, 14px);
  color: var(--hb-primary, #1e60e9);
  background: var(--hb-primary-container, #e8efff);
}

.host-dashboard-page .host-share-actions button:disabled {
  color: var(--hb-ink-muted, #657287);
  background: var(--hb-surface-container, #f0f2f5);
}

.host-dashboard-page .host-live-table-panel {
  margin-top: 18px;
}

.host-dashboard-page .hambeat-table-wrap {
  margin-top: 16px;
  border: 1px solid var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-md, 18px);
  background: var(--hb-surface, #fff);
}

.host-dashboard-page table {
  color: var(--hb-ink, #09213d);
}

.host-dashboard-page thead {
  background: var(--hb-surface-container, #f0f2f5);
}

.host-dashboard-page th,
.host-dashboard-page td {
  border-color: var(--hb-line, #d9dfe7);
}

.host-dashboard-page .host-quick-actions {
  margin-top: 18px;
  gap: 12px;
}

.host-dashboard-page .host-quick-actions button {
  min-height: 88px;
  border: 1px solid var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-lg, 24px);
  color: var(--hb-ink, #09213d);
  background: var(--hb-surface, #fff);
  box-shadow: none;
}

.host-dashboard-page .host-quick-actions button > i,
.host-dashboard-page .host-quick-actions button:nth-child(n) > i {
  color: var(--hb-primary, #1e60e9);
  background: var(--hb-primary-container, #e8efff);
}

.host-dashboard-page .host-quick-actions button:nth-child(2) > i,
.host-dashboard-page .host-quick-actions button:nth-child(4) > i {
  color: var(--hb-on-accent, #2d2a00);
  background: var(--hb-accent, #ffdf5d);
}

.host-dashboard-page .host-quick-actions small {
  color: var(--hb-ink-muted, #657287);
}

.host-dashboard-page .hambeat-section {
  padding-top: 28px;
}

.host-dashboard-page .user-event-grid {
  gap: 0;
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-lg);
  overflow: hidden;
}

.host-dashboard-page .user-event-card {
  min-height: 92px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--hb-line);
  border-radius: 0;
}

.host-dashboard-page .user-event-cover {
  min-height: 178px;
}

.host-dashboard-page .user-event-cover::after {
  background: rgba(5, 33, 61, .24);
}

.host-dashboard-page .user-event-cover span {
  color: var(--hb-on-accent, #2d2a00);
  background: var(--hb-accent, #ffdf5d);
}

.host-dashboard-page .user-event-body {
  background: var(--hb-surface, #fff);
}

.host-dashboard-page .user-event-body h3,
.host-dashboard-page .user-event-body b {
  color: var(--hb-ink, #09213d);
}

.host-dashboard-page .event-card-meta,
.host-dashboard-page .user-event-body > p,
.host-dashboard-page .user-event-numbers {
  color: var(--hb-ink-muted, #657287);
}

.host-dashboard-page .host-runtime,
.host-dashboard-page .host-operation-panel {
  border-color: var(--hb-line, #d9dfe7);
  background: var(--hb-surface-container, #f0f2f5);
}

.host-dashboard-page .host-audience-control select,
.host-dashboard-page .host-playlist-list article,
.host-dashboard-page .host-participant-list > div {
  border-color: var(--hb-line, #d9dfe7);
  color: var(--hb-ink, #09213d);
  background: var(--hb-surface, #fff);
}

.host-dashboard-page .host-track-form label,
.host-dashboard-page .host-track-form button,
.host-dashboard-page .host-operations button,
.host-dashboard-page .host-playlist-list button {
  min-height: 42px;
  border-color: var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-sm, 14px);
  color: var(--hb-primary, #1e60e9);
  background: var(--hb-surface, #fff);
}

.host-dashboard-page .host-track-form button,
.host-dashboard-page .host-playlist-list .activate-track {
  color: var(--hb-on-primary, #fff);
  background: var(--hb-primary, #1e60e9);
}

.host-dashboard-page .host-event-chips {
  margin-top: var(--hb-space-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--hb-space-1);
}

.host-dashboard-page .host-event-chip {
  min-block-size: 34px;
  padding: 0 var(--hb-space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--hb-space-1);
  border: 1px solid var(--hb-line);
  border-radius: 999px;
  color: var(--hb-ink);
  background: var(--hb-surface);
  font-size: var(--hb-type-caption);
  font-weight: 850;
}

.host-dashboard-page .host-event-chip.genre {
  color: var(--hb-primary);
  background: color-mix(in srgb, var(--hb-primary) 8%, var(--hb-surface));
}

.host-dashboard-page .host-event-chip.access {
  color: var(--hb-ink-muted);
}

.host-dashboard-page .host-runtime {
  padding: var(--hb-space-4);
  display: grid;
  gap: var(--hb-space-4);
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-md);
}

.host-dashboard-page .host-edit-form,
.host-dashboard-page .host-playlist-editor {
  padding: var(--hb-space-4);
  display: grid;
  gap: var(--hb-space-4);
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-md);
  background: var(--hb-surface);
}

.host-dashboard-page .host-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--hb-space-3);
}

.host-dashboard-page .host-edit-header strong {
  display: block;
  color: var(--hb-ink);
  font-size: var(--hb-type-body);
  font-weight: 950;
}

.host-dashboard-page .host-edit-header small,
.host-dashboard-page .host-edit-grid small,
.host-dashboard-page .active-track-label {
  display: block;
  margin-top: var(--hb-space-1);
  color: var(--hb-ink-muted);
  font-size: var(--hb-type-caption);
  line-height: 1.8;
}

.host-dashboard-page .active-track-label {
  max-inline-size: 320px;
  padding: var(--hb-space-2) var(--hb-space-3);
  border-radius: 999px;
  background: color-mix(in srgb, var(--hb-primary) 8%, var(--hb-surface));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-dashboard-page .host-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--hb-space-3);
}

.host-dashboard-page .host-edit-grid label {
  min-inline-size: 0;
  display: grid;
  gap: var(--hb-space-1);
  color: var(--hb-ink);
  font-weight: 850;
}

.host-dashboard-page .host-edit-grid label.wide {
  grid-column: 1 / -1;
}

.host-dashboard-page .host-edit-grid :is(input, textarea, select) {
  inline-size: 100%;
  min-block-size: var(--hb-control-md);
  padding: 0 var(--hb-space-3);
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-sm);
  color: var(--hb-ink);
  background: var(--hb-surface);
  font: inherit;
}

.host-dashboard-page .host-edit-grid textarea {
  min-block-size: 96px;
  padding-block: var(--hb-space-3);
  resize: vertical;
}

.host-dashboard-page .host-edit-grid .host-check {
  min-block-size: var(--hb-control-md);
  padding: 0 var(--hb-space-3);
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-sm);
  background: var(--hb-surface-container);
}

.host-dashboard-page .host-edit-grid .host-check input {
  inline-size: auto;
  min-block-size: 0;
}

.host-dashboard-page .host-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hb-space-2);
}

.host-dashboard-page .host-edit-actions :is(button, a),
.host-dashboard-page .host-playlist-editor .reload-playlist,
.host-dashboard-page .host-playlist-list .remove-track {
  min-block-size: var(--hb-control-md);
  padding: 0 var(--hb-space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--hb-space-1);
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-sm);
  color: var(--hb-primary);
  background: var(--hb-surface);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.host-dashboard-page .host-edit-actions .save-host-event {
  color: var(--hb-on-primary);
  border-color: var(--hb-primary);
  background: var(--hb-primary);
}

.host-dashboard-page .host-edit-message,
.host-dashboard-page .host-track-message {
  flex: 1 1 220px;
  margin: 0;
  color: var(--hb-ink-muted);
  font-size: var(--hb-type-caption);
}

.host-dashboard-page .host-edit-message[data-type="success"],
.host-dashboard-page .host-track-message[data-type="success"] {
  color: var(--hb-success, #057a55);
}

.host-dashboard-page .host-edit-message[data-type="error"],
.host-dashboard-page .host-track-message[data-type="error"] {
  color: var(--hb-danger, #d92d20);
}

.host-dashboard-page .host-playlist-list .remove-track {
  color: var(--hb-danger, #d92d20);
  background: color-mix(in srgb, var(--hb-danger, #d92d20) 7%, var(--hb-surface));
}

.host-dashboard-page .host-playlist-row > div {
  flex-wrap: wrap;
}

.host-dashboard-page .user-event-actions a,
.host-dashboard-page .user-event-actions button {
  min-height: 44px;
  border-radius: var(--hb-radius-sm, 14px);
}

.host-dashboard-page .user-event-actions a {
  color: var(--hb-on-primary, #fff);
  background: var(--hb-primary, #1e60e9);
}

.host-dashboard-page .user-event-actions button {
  color: var(--hb-ink, #09213d);
  background: var(--hb-accent, #ffdf5d);
}

/* Creation flow: a focused M3 Expressive side sheet. */

.host-dashboard-page .creator-card:not([hidden]) {
  position: fixed;
  z-index: 1200;
  inset-block: 0;
  inset-inline-start: 116px;
  inset-inline-end: auto;
  width: min(680px, calc(100vw - 116px));
  max-height: 100vh;
  margin: 0;
  padding: 28px 32px 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  border-width: 0 0 0 1px;
  border-radius: 0;
  box-shadow: -18px 0 60px rgba(6, 40, 75, .16);
}

.host-dashboard-page .creator-heading {
  gap: 18px;
}

.host-dashboard-page .creator-heading h2 {
  margin: 5px 0 0;
  color: var(--hb-ink, #09213d);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 950;
}

.host-dashboard-page .creator-heading > button {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--hb-line, #d9dfe7);
  color: var(--hb-ink, #09213d);
  background: var(--hb-surface, #fff);
  font-size: 26px;
}

.host-dashboard-page .hambeat-wizard-steps {
  margin: 28px 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.host-dashboard-page .hambeat-wizard-steps button {
  color: var(--hb-ink-muted, #657287);
  background: transparent;
}

.host-dashboard-page .hambeat-wizard-steps button b {
  border: 1px solid var(--hb-line, #d9dfe7);
  color: var(--hb-ink-muted, #657287);
  background: var(--hb-surface-container, #f0f2f5);
}

.host-dashboard-page .hambeat-wizard-steps button.active {
  color: var(--hb-primary, #1e60e9);
}

.host-dashboard-page .hambeat-wizard-steps button.active b {
  border-color: var(--hb-primary, #1e60e9);
  color: var(--hb-on-primary, #fff);
  background: var(--hb-primary, #1e60e9);
}

.host-dashboard-page .creator-form {
  flex: 1;
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.host-dashboard-page .wizard-pane {
  padding: 0 0 28px;
  border: 0;
}

.host-dashboard-page .wizard-pane legend {
  margin-bottom: 24px;
  color: var(--hb-ink, #09213d);
  font-size: 25px;
  font-weight: 900;
}

.host-dashboard-page .wizard-pane legend span {
  display: block;
  color: var(--hb-primary, #1e60e9);
  font-size: 11px;
}

.host-dashboard-page .creator-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.host-dashboard-page .creator-form label > span,
.host-dashboard-page .cover-choice > span {
  color: var(--hb-ink, #09213d);
  font-weight: 750;
}

.host-dashboard-page .creator-form input:not([type="checkbox"]):not([type="radio"]),
.host-dashboard-page .creator-form select,
.host-dashboard-page .creator-form textarea {
  min-height: 52px;
  border: 1px solid var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-sm, 14px);
  color: var(--hb-ink, #09213d);
  background: var(--hb-surface, #fff);
  box-shadow: none;
}

.host-dashboard-page .creator-form textarea {
  min-height: 110px;
}

.host-dashboard-page .creator-form input:focus,
.host-dashboard-page .creator-form select:focus,
.host-dashboard-page .creator-form textarea:focus {
  border-color: var(--hb-primary, #1e60e9);
  outline: 3px solid color-mix(in srgb, var(--hb-primary, #1e60e9) 18%, transparent);
}

.host-dashboard-page .cover-choice label,
.host-dashboard-page .switch-label,
.host-dashboard-page .wizard-file-picker,
.host-dashboard-page .wizard-review,
.host-dashboard-page .location-fields {
  border-color: var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-lg, 24px);
  background: var(--hb-surface-container, #f0f2f5);
}

.host-dashboard-page .cover-choice label:has(input:checked) {
  border-color: var(--hb-primary, #1e60e9);
  outline: 2px solid var(--hb-primary, #1e60e9);
}

.host-dashboard-page .event-location-map {
  min-height: 330px;
  position: relative;
  overflow: hidden;
  border-radius: var(--hb-radius-lg, 24px);
  background:
    linear-gradient(135deg, rgba(49, 89, 216, .08) 25%, transparent 25%) 0 0 / 34px 34px,
    linear-gradient(315deg, rgba(16, 27, 43, .06) 25%, transparent 25%) 0 0 / 34px 34px,
    var(--hb-surface-container, #f0f2f5);
  isolation: isolate;
}

.host-dashboard-page .event-location-map::after {
  content: attr(data-map-fallback);
  position: absolute;
  z-index: 410;
  inset: 50% auto auto 50%;
  max-width: min(78%, 360px);
  padding: 10px 14px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-sm);
  color: var(--hb-ink);
  background: rgba(255, 253, 248, .92);
  box-shadow: 0 12px 32px rgba(16, 27, 43, .12);
  font-size: 12px;
  font-weight: var(--hb-weight-bold, 800);
  text-align: center;
  pointer-events: none;
}

.host-dashboard-page .event-location-map.is-map-loaded::after {
  content: none;
}

.host-dashboard-page .wizard-file-picker i,
.host-dashboard-page .music-step-copy i {
  color: var(--hb-primary, #1e60e9);
}

.host-dashboard-page .wizard-review {
  padding: 22px;
}

.host-dashboard-page .wizard-footer {
  position: sticky;
  z-index: 3;
  bottom: 0;
  margin-top: auto;
  padding: 16px 0 22px;
  border-top: 1px solid var(--hb-line, #d9dfe7);
  background: var(--hb-surface, #fff);
}

.host-dashboard-page .hambeat-dialog__surface {
  border: 1px solid var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-xl, 30px);
  color: var(--hb-ink, #09213d);
  background: var(--hb-surface, #fff);
}

@media (max-width: 980px) {
  .host-dashboard-page .hambeat-app {
    display: block;
    grid-template-columns: minmax(0, 1fr);
  }

  .host-dashboard-page :is(.hambeat-sidebar, .hb-app-sidebar) {
    display: none;
  }

  .host-dashboard-page .hambeat-main {
    max-inline-size: none;
    padding: 18px 18px calc(96px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  .host-dashboard-page .creator-card:not([hidden]) {
    inset: 0;
    width: 100vw;
    max-height: 100dvh;
    padding: 18px 16px 0;
    border: 0;
    box-shadow: none;
  }

  .host-dashboard-page .creator-heading {
    align-items: flex-start;
  }

  .host-dashboard-page .creator-heading h2 {
    font-size: 24px;
    line-height: 1.45;
  }

  .host-dashboard-page .hambeat-wizard-steps {
    margin-block: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .host-dashboard-page .hambeat-wizard-steps button {
    min-width: 0;
    gap: 5px;
    font-size: 10px;
    line-height: 1.35;
  }

  .host-dashboard-page .hambeat-wizard-steps button b {
    width: 34px;
    height: 34px;
  }

  .host-dashboard-page .creator-form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .host-dashboard-page .wizard-pane legend {
    margin-bottom: 16px;
    font-size: 22px;
    line-height: 1.5;
  }

  .host-dashboard-page .location-fields {
    padding: 12px;
  }

  .host-dashboard-page .event-location-map {
    min-height: 240px;
  }

  .host-dashboard-page .music-step {
    grid-template-columns: 1fr;
  }

  .host-dashboard-page .wizard-footer {
    position: static;
    padding-block: 12px calc(14px + env(safe-area-inset-bottom));
  }

  .host-dashboard-page .wizard-footer,
  .host-dashboard-page .wizard-footer > div {
    gap: 8px;
  }

  .host-dashboard-page .wizard-footer > div {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .host-dashboard-page .wizard-footer button {
    width: 100%;
    min-height: 48px;
    padding-inline: 10px;
    white-space: normal;
  }

  .host-dashboard-page .wizard-footer button[hidden] {
    display: none;
  }

  .host-dashboard-page .host-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .host-dashboard-page .hambeat-stat {
    min-height: 142px;
    padding: 12px 8px;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    text-align: center;
  }

  .host-dashboard-page .hambeat-stat > i {
    position: static;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
  }

  .host-dashboard-page .hambeat-stat span {
    max-width: 100%;
    font-size: 10px;
    line-height: 1.45;
  }

  .host-dashboard-page .hambeat-stat strong {
    font-size: 24px;
  }

  .host-dashboard-page .hambeat-stat small {
    font-size: 9px;
    line-height: 1.5;
  }
}

/* Live synchronized player */

.hambeat-player-page {
  min-height: 100vh;
  padding: 18px;
  color: var(--hb-ink, #09213d);
  background: var(--hb-canvas, #f7f6f2);
}

.hambeat-player-page .hambeat-live-shell {
  width: min(1480px, 100%);
  min-height: calc(100vh - 36px);
  grid-template-columns: minmax(230px, .68fr) minmax(430px, 1.65fr) minmax(250px, .72fr);
  gap: 18px;
  align-items: stretch;
}

.hambeat-player-page .hambeat-live-side,
.hambeat-player-page .hambeat-live-event-list {
  min-height: 0;
  padding: 24px;
  border: 1px solid var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-lg, 24px);
  color: var(--hb-ink, #09213d);
  background: var(--hb-surface, #fff);
  box-shadow: none;
}

.hambeat-player-page .hambeat-live-side .hambeat-brand {
  align-self: flex-start;
  color: var(--hb-ink, #09213d);
}

.hambeat-player-page .hambeat-live-side h1 {
  color: var(--hb-ink, #09213d);
  font-size: clamp(29px, 3vw, 43px);
  font-weight: 950;
  letter-spacing: -.04em;
}

.hambeat-player-page .hambeat-live-side p:not(.hambeat-kicker),
.hambeat-player-page .hambeat-live-event-list .hambeat-subtle {
  color: var(--hb-ink-muted, #657287);
}

.hambeat-player-page .hambeat-kicker {
  color: var(--hb-primary, #1e60e9);
}

.hambeat-player-page .live-process-list {
  gap: 8px;
}

.hambeat-player-page .live-process-list article {
  min-height: 66px;
  border: 1px solid var(--hb-line, #d9dfe7);
  border-radius: var(--hb-radius-md, 18px);
  color: var(--hb-ink, #09213d);
  background: var(--hb-surface-container, #f0f2f5);
}

.hambeat-player-page .live-process-list article > i {
  color: var(--hb-primary, #1e60e9);
  background: var(--hb-primary-container, #e8efff);
}

.hambeat-player-page .live-process-list article small {
  color: var(--hb-ink-muted, #657287);
}

.hambeat-player-page .player-route-nav.desktop {
  gap: 7px;
}

.hambeat-player-page .player-route-nav.desktop a {
  min-height: 46px;
  border-radius: var(--hb-radius-md, 18px);
}

@media (max-width: 760px) {
  .host-dashboard-page #my-events > .hambeat-section-head {
    align-items: flex-start;
  }

  .host-dashboard-page #event-list-create-owner {
    min-height: 44px;
  }

  .host-dashboard-page .hb-user-event-row {
    min-height: 116px;
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .host-dashboard-page .hb-user-event-row .user-event-cover {
    min-height: 116px;
  }

  .host-dashboard-page .hb-user-event-row .user-event-body {
    padding: 10px;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .host-dashboard-page .hb-user-event-row .user-event-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .host-dashboard-page .hb-user-event-row .user-event-actions :is(a, button) {
    min-width: 0;
    padding-inline: 6px;
    font-size: 11px;
  }

  .host-dashboard-page .joined-section .hb-user-event-row .user-event-actions {
    grid-template-columns: 1fr;
  }
}
/* Final cascade lock: older host-table selectors must not stack row actions. */
.host-dashboard-page #my-event-grid .hb-user-event-row .user-event-actions {
  display: flex;
  grid-template-columns: none;
  gap: 8px;
}

@media (max-width: 760px) {
  .host-dashboard-page #my-event-grid .hb-user-event-row .user-event-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Owner library: keep every event as one readable row. The legacy auto-fill
   card grid made wide dashboards merge several covers and action groups into
   one visual strip. */
.host-dashboard-page #my-event-grid.user-event-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--hb-space-3);
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.host-dashboard-page #my-event-grid .hb-user-event-row {
  max-inline-size: none;
  min-block-size: 164px;
  display: grid;
  grid-template-columns: minmax(156px, 196px) minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-lg);
  background: var(--hb-surface);
}

.host-dashboard-page #my-event-grid .hb-user-event-row:last-child {
  border-bottom: 1px solid var(--hb-line);
}

.host-dashboard-page #my-event-grid .hb-user-event-row .user-event-cover {
  block-size: auto;
  min-block-size: 164px;
}

.host-dashboard-page #my-event-grid .hb-user-event-row .user-event-body {
  min-inline-size: 0;
  padding: var(--hb-space-4);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "copy actions"
    "runtime runtime";
  align-items: center;
  gap: var(--hb-space-3) var(--hb-space-5);
}

.host-dashboard-page #my-event-grid .hb-user-event-copy {
  grid-area: copy;
  min-inline-size: 0;
}

.host-dashboard-page #my-event-grid .hb-user-event-copy h3 {
  margin: 0 0 var(--hb-space-2);
  overflow-wrap: anywhere;
  font-size: var(--hb-type-h4);
  line-height: 1.6;
}

.host-dashboard-page #my-event-grid .event-card-meta {
  min-block-size: 0;
  margin: 0;
  line-height: 1.8;
}

.host-dashboard-page #my-event-grid .host-runtime {
  grid-area: runtime;
  min-inline-size: 0;
}

.host-dashboard-page #my-event-grid .hb-user-event-row .user-event-actions {
  grid-area: actions;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--hb-space-2);
}

.host-dashboard-page #my-event-grid .hb-user-event-row .user-event-actions :is(a, button) {
  flex: 0 0 auto;
  min-inline-size: 112px;
  min-block-size: var(--hb-control-md);
  padding-inline: var(--hb-space-3);
  white-space: nowrap;
  font-size: var(--hb-type-body-sm);
}

@media (max-width: 1100px) {
  .host-dashboard-page #my-event-grid .hb-user-event-row {
    grid-template-columns: 148px minmax(0, 1fr);
  }

  .host-dashboard-page #my-event-grid .hb-user-event-row .user-event-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "actions"
      "runtime";
  }
}

@media (max-width: 760px) {
  .host-dashboard-page #my-event-grid.user-event-grid {
    gap: var(--hb-space-2);
  }

  .host-dashboard-page #my-event-grid .hb-user-event-row {
    min-block-size: 0;
    grid-template-columns: 96px minmax(0, 1fr);
    border-radius: var(--hb-radius-md);
  }

  .host-dashboard-page #my-event-grid .hb-user-event-row .user-event-cover {
    min-block-size: 132px;
  }

  .host-dashboard-page #my-event-grid .hb-user-event-row .user-event-body {
    padding: var(--hb-space-3);
    gap: var(--hb-space-2);
  }

  .host-dashboard-page #my-event-grid .hb-user-event-row .user-event-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--hb-space-1);
  }

  .host-dashboard-page #my-event-grid .hb-user-event-row .user-event-actions :is(a, button) {
    min-inline-size: 0;
    min-block-size: var(--hb-control-sm);
    padding-inline: var(--hb-space-1);
    white-space: normal;
    font-size: var(--hb-type-caption);
    line-height: 1.45;
  }

  .host-dashboard-page .host-runtime,
  .host-dashboard-page .host-edit-form,
  .host-dashboard-page .host-playlist-editor {
    padding: var(--hb-space-3);
  }

  .host-dashboard-page .host-edit-header,
  .host-dashboard-page .host-edit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .host-dashboard-page .host-edit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .host-dashboard-page .active-track-label {
    max-inline-size: none;
  }

  .host-dashboard-page .host-track-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .host-dashboard-page .host-playlist-list article {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .host-dashboard-page .host-playlist-list article > div {
    grid-column: 1 / -1;
  }
}

/* Unified event experience — the canonical event URL now starts with the real
   player and keeps admission, playlist, presence and chat on one page. */
.hambeat-player-page.hb-unified-event-page {
  --hb-app-sidebar-width: 176px;
  --hb-app-sidebar-padding: var(--hb-space-4) var(--hb-space-3);
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  color: var(--hb-ink);
  background: var(--hb-porcelain);
}

.hb-unified-event-page .hb-live-layout {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  display: grid;
  grid-template-columns: var(--hb-app-sidebar-width) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  direction: rtl;
}

.hb-unified-event-page .hb-live-nav {
  position: sticky;
  inset-block-start: 0;
  height: 100dvh;
  border: 0;
  border-radius: 0;
}

.hb-unified-event-page .hb-live-brand.hb-brand {
  --hb-brand-mark-size: 42px;
  min-height: 72px;
  padding-block-end: var(--hb-space-4);
  display: flex !important;
  flex-direction: row;
  justify-content: flex-start;
  gap: var(--hb-space-2);
  color: #fff;
}

.hb-unified-event-page .hb-live-brand .hb-brand__copy { justify-items: start; }
.hb-unified-event-page .hb-live-brand b { font-size: 20px; }
.hb-unified-event-page .hb-live-brand small { color: var(--hb-powder); font-size: 9px; }
.hb-unified-event-page .hb-live-nav .hb-app-nav { margin-top: var(--hb-space-2); }

.hb-unified-event-page .hb-live-main {
  width: min(calc(var(--hb-content-max) + (4 * var(--hb-space-10))), 100%);
  min-width: 0;
  margin: 0 auto;
  padding: var(--hb-space-5) var(--hb-space-5) var(--hb-space-8);
}

.hb-unified-event-page .hb-live-mobile-header { display: none; }
.hb-unified-event-page .hb-player-card {
  min-height: clamp(560px, 42vw, 680px);
  display: grid;
  grid-template-columns: 38% 62%;
  overflow: hidden;
  border-radius: var(--hb-radius-xl);
  color: #fff;
  background: var(--hb-navy);
  direction: ltr;
}

.hb-unified-event-page .hb-player-art {
  min-height: clamp(560px, 42vw, 680px);
  padding: var(--hb-space-4);
  background: url("./assets/covers/hambeat-event-general.webp") center / cover no-repeat;
}

.hb-unified-event-page .hb-player-console {
  min-width: 0;
  padding: var(--hb-space-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  direction: rtl;
}

.hb-unified-event-page .hb-player-console > #eyebrow { margin: var(--hb-space-3) 0 0; color: var(--hb-powder); font-size: 12px; }
.hb-unified-event-page .hb-player-console > #event-name { margin: 4px 0 0; color: #fff; font-size: 20px; line-height: 1.5; }
.hb-unified-event-page .hb-player-console > #event-location { margin: 2px 0 0; color: var(--hb-powder); font-size: 11px; }
.hb-unified-event-page .hb-now-playing { margin-top: var(--hb-space-4); }
.hb-unified-event-page .hb-now-playing > span { color: var(--hb-butter); font-size: 11px; font-weight: 800; }
.hb-unified-event-page .hb-now-playing h2 { margin: 4px 0 0; color: #fff; font-size: clamp(26px, 3.2vw, 42px); line-height: 1.35; }
.hb-unified-event-page .hb-now-playing p { margin: 3px 0 0; color: var(--hb-powder); font-size: 13px; }
.hb-unified-event-page .hb-player-console > .hambeat-progress { margin-top: var(--hb-space-4); }
.hb-unified-event-page .hb-player-controls { margin-top: var(--hb-space-3); grid-template-columns: 58px minmax(180px, 1fr); gap: var(--hb-space-3); }
.hb-unified-event-page .hb-player-controls > .hb-local-play-toggle { width: 58px; height: 58px; }
.hb-unified-event-page .hb-player-controls .hambeat-volume { grid-column: auto; }
.hb-unified-event-page .hb-player-controls .hambeat-volume input { accent-color: var(--hb-cobalt); }

.hb-unified-event-page .hb-player-join {
  margin-top: var(--hb-space-4);
  padding-top: var(--hb-space-3);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: var(--hb-space-3);
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.18);
}

.hb-unified-event-page .hb-player-join > div:first-child > span { color: var(--hb-butter); font-size: 9px; font-weight: 800; }
.hb-unified-event-page .hb-player-join h2 { margin: 2px 0 0; color: #fff; font-size: 15px; }
.hb-unified-event-page .hb-player-join p { margin: 3px 0 0; color: var(--hb-powder); font-size: 9px; line-height: 1.7; }
.hb-unified-event-page .hb-player-join .hb-button { justify-self: stretch; }
.hb-unified-event-page .hb-player-join .progress-wrap,
.hb-unified-event-page .hb-player-join .error-box { grid-column: 1 / -1; }
.hb-unified-event-page .hb-player-join .progress-wrap { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.hb-unified-event-page .hb-player-join .progress-wrap[hidden] { display: none; }
.hb-unified-event-page .hb-player-join .progress-wrap .hambeat-progress { margin: 0; }
.hb-unified-event-page .hb-player-join .error-box { padding: 10px; border-radius: var(--hb-radius-sm); color: #fff; background: var(--hb-danger); }
.hb-unified-event-page[data-state="playing"] .hb-player-join,
.hb-unified-event-page[data-state="playing"] .hb-readiness-details { display: none; }

.hb-unified-event-page .hb-quality-strip {
  min-height: 72px;
  margin: var(--hb-space-3) 0;
  padding: var(--hb-space-3) var(--hb-space-4);
  display: grid;
  grid-template-columns: 24px minmax(150px, 1fr) minmax(200px, auto) auto;
  gap: var(--hb-space-3);
  align-items: center;
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-md);
  color: var(--hb-navy);
  background: var(--hb-info-soft);
  text-align: start;
}
.hb-unified-event-page .hb-quality-strip .live-indicator {
  inline-size: 24px;
  block-size: 24px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  rotate: none;
  background: var(--hb-powder);
  box-shadow: none;
}
.hb-unified-event-page .hb-quality-strip .live-indicator span {
  inline-size: 8px;
  block-size: 8px;
  rotate: none;
  background: var(--hb-muted);
  box-shadow: none;
}
.hb-unified-event-page .hb-quality-strip .live-indicator.active span { background: var(--hb-success); }
.hb-unified-event-page .hb-quality-strip > #quality-label { font-size: var(--hb-type-body); font-weight: var(--hb-weight-bold); }
.hb-unified-event-page .hb-quality-strip > #quality-value { color: var(--hb-muted); font-size: var(--hb-type-body-sm); font-weight: var(--hb-weight-medium); }
.hb-unified-event-page .hb-quality-strip[data-quality="excellent"] { background: var(--hb-success-soft); }
.hb-unified-event-page .hb-quality-strip[data-quality="warning"] { background: var(--hb-warning-soft); }
.hb-unified-event-page .hb-quality-strip[data-quality="poor"] { background: var(--hb-danger-soft); }

.hb-unified-event-page .hb-status-panel {
  margin-block: calc(var(--hb-space-3) * -1) var(--hb-space-3);
  padding: var(--hb-space-4);
  border: 1px solid var(--hb-line);
  border-top: 0;
  border-radius: 0 0 var(--hb-radius-md) var(--hb-radius-md);
  background: var(--hb-surface);
}
.hb-unified-event-page .hb-status-panel > header { display: flex; align-items: center; justify-content: space-between; gap: var(--hb-space-3); }
.hb-unified-event-page .hb-status-panel > header span { color: var(--hb-cobalt); font-size: var(--hb-type-caption); font-weight: var(--hb-weight-bold); }
.hb-unified-event-page .hb-status-panel h2 { margin: 2px 0 0; color: var(--hb-navy); font-size: var(--hb-type-h3); }
.hb-unified-event-page .hb-status-empty { margin: var(--hb-space-3) 0 0; color: var(--hb-muted); font-size: var(--hb-type-body-sm); }
.hb-unified-event-page .hb-status-metrics { margin: var(--hb-space-4) 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--hb-line); }
.hb-unified-event-page .hb-status-metrics > div { min-width: 0; padding: var(--hb-space-3); border-inline-end: 1px solid var(--hb-line); }
.hb-unified-event-page .hb-status-metrics > div:last-child { border-inline-end: 0; }
.hb-unified-event-page .hb-status-metrics dt { color: var(--hb-muted); font-size: var(--hb-type-caption); }
.hb-unified-event-page .hb-status-metrics dd { margin: var(--hb-space-1) 0 0; color: var(--hb-navy); font-size: var(--hb-type-body); font-weight: var(--hb-weight-bold); }
.hb-unified-event-page .hb-readiness-details {
  margin-block: var(--hb-space-3);
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-md);
  background: var(--hb-surface);
}

.hb-unified-event-page .hb-readiness-details summary {
  min-height: 54px;
  padding: 0 var(--hb-space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hb-space-3);
  color: var(--hb-navy);
  cursor: pointer;
  list-style: none;
}

.hb-unified-event-page .hb-readiness-details summary::-webkit-details-marker { display: none; }
.hb-unified-event-page .hb-readiness-details summary > span { display: flex; align-items: center; gap: var(--hb-space-2); }
.hb-unified-event-page .hb-readiness-details summary > span > i { color: var(--hb-cobalt); }
.hb-unified-event-page .hb-readiness-details summary small { color: var(--hb-muted); font-size: 10px; }
.hb-unified-event-page .hb-readiness-details .hb-readiness-chevron { margin-inline-start: auto; color: var(--hb-muted); transition: transform .18s ease; }
.hb-unified-event-page .hb-readiness-details[open] .hb-readiness-chevron { transform: rotate(180deg); }
.hb-unified-event-page .hb-readiness-details .hb-readiness-panel {
  margin: 0;
  padding: 0 var(--hb-space-3) var(--hb-space-3);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 0;
  border-top: 1px solid var(--hb-line);
  border-radius: 0 0 var(--hb-radius-md) var(--hb-radius-md);
}
.hb-unified-event-page .hb-readiness-panel article {
  min-width: 0;
  min-height: 88px;
  padding: var(--hb-space-3);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: var(--hb-space-2);
  align-items: center;
  border-inline-end: 1px solid var(--hb-line);
  color: var(--hb-muted);
}
.hb-unified-event-page .hb-readiness-panel article:last-child { border-inline-end: 0; }
.hb-unified-event-page .hb-readiness-panel article > i { inline-size: 34px; block-size: 34px; display: grid; place-items: center; border-radius: var(--hb-radius-sm); color: var(--hb-cobalt); background: var(--hb-info-soft); }
.hb-unified-event-page .hb-readiness-panel article b,
.hb-unified-event-page .hb-readiness-panel article small { display: block; }
.hb-unified-event-page .hb-readiness-panel article b { color: var(--hb-navy); font-size: var(--hb-type-body-sm); }
.hb-unified-event-page .hb-readiness-panel article small { margin-top: 3px; color: var(--hb-muted); font-size: var(--hb-type-caption); line-height: 1.55; }
.hb-unified-event-page .hb-readiness-panel article.active > i { color: var(--hb-navy); background: var(--hb-butter); }
.hb-unified-event-page .hb-readiness-panel article.done > i { color: #fff; background: var(--hb-success); }
.hb-unified-event-page .event-timeline { margin-block: var(--hb-space-3); }

.hb-unified-event-page .hb-live-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--hb-space-3);
  align-items: start;
}

.hb-unified-event-page .hb-event-playlist,
.hb-unified-event-page .hb-live-social,
.hb-unified-event-page .hb-event-chat {
  min-width: 0;
  margin: 0;
  padding: var(--hb-space-4);
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-lg);
  background: var(--hb-surface);
}

.hb-unified-event-page .hb-event-playlist > header { display: flex; align-items: center; justify-content: space-between; gap: var(--hb-space-3); }
.hb-unified-event-page .hb-event-playlist > header span,
.hb-unified-event-page .hb-event-chat .event-chat-head span { color: var(--hb-cobalt); font-size: 10px; font-weight: 800; }
.hb-unified-event-page .hb-event-playlist h2,
.hb-unified-event-page .hb-event-chat h2 { margin: 3px 0 0; color: var(--hb-navy); font-size: 20px; }
.hb-unified-event-page .hb-event-playlist > header > strong { padding: 7px 10px; border-radius: var(--hb-radius-round); color: var(--hb-cobalt); background: var(--hb-info-soft); font-size: 10px; }
.hb-unified-event-page .hb-event-playlist-list { max-height: 520px; margin-top: var(--hb-space-3); overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--hb-line); scrollbar-color: var(--hb-powder) transparent; }
.hb-unified-event-page .hb-playlist-row { min-height: 66px; padding: 9px 4px; display: grid; grid-template-columns: 34px minmax(0,1fr) 62px 72px; gap: 10px; align-items: center; border-bottom: 1px solid var(--hb-line); }
.hb-unified-event-page .hb-playlist-row:last-child { border-bottom: 0; }
.hb-unified-event-page .hb-playlist-index { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--hb-muted); background: var(--hb-sand); font-size: 10px; }
.hb-unified-event-page .hb-playlist-copy { min-width: 0; }
.hb-unified-event-page .hb-playlist-copy b { display: block; overflow: hidden; color: var(--hb-navy); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.hb-unified-event-page .hb-playlist-copy small { display: block; margin-top: 3px; overflow: hidden; color: var(--hb-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.hb-unified-event-page .hb-playlist-duration { color: var(--hb-muted); font-size: 10px; direction: ltr; }
.hb-unified-event-page .hb-playlist-state { color: var(--hb-muted); font-size: 9px; text-align: center; }
.hb-unified-event-page .hb-playlist-row.active { background: var(--hb-info-soft); }
.hb-unified-event-page .hb-playlist-row.active .hb-playlist-index { color: #fff; background: var(--hb-cobalt); }
.hb-unified-event-page .hb-playlist-row.active .hb-playlist-state { color: var(--hb-cobalt); font-weight: 850; }
.hb-unified-event-page .hb-playlist-empty { min-height: 120px; padding: var(--hb-space-4); display: grid; grid-template-columns: 44px 1fr; gap: var(--hb-space-3); align-items: center; color: var(--hb-muted); }
.hb-unified-event-page .hb-playlist-empty > i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--hb-cobalt); background: var(--hb-info-soft); }
.hb-unified-event-page .hb-playlist-empty b { color: var(--hb-navy); }
.hb-unified-event-page .hb-playlist-empty p { margin: 4px 0 0; font-size: 11px; }

.hb-unified-event-page .hb-live-social { padding: var(--hb-space-4); display: grid; gap: var(--hb-space-4); }
.hb-unified-event-page .hb-live-social h2 { margin: 0; color: var(--hb-navy); font-size: var(--hb-type-h3); }
.hb-unified-event-page .hb-participant-summary { margin-top: var(--hb-space-3); display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--hb-space-3); align-items: center; }
.hb-unified-event-page .hb-participant-summary > span,
.hb-unified-event-page .hb-host-avatar { inline-size: 44px; block-size: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--hb-cobalt); background: var(--hb-info-soft); }
.hb-unified-event-page .hb-participant-summary > strong { color: var(--hb-navy); font-size: var(--hb-type-h2); line-height: 1; }
.hb-unified-event-page .hb-participant-summary > small { grid-column: 2; margin-top: -10px; color: var(--hb-muted); font-size: var(--hb-type-caption); }
.hb-unified-event-page .hb-host { padding-block: var(--hb-space-3); border-block: 1px solid var(--hb-line); }
.hb-unified-event-page .hb-host > small { color: var(--hb-muted); font-size: var(--hb-type-caption); }
.hb-unified-event-page .hb-host > div { margin-top: var(--hb-space-2); display: flex; align-items: center; gap: var(--hb-space-2); color: var(--hb-navy); }
.hb-unified-event-page .hb-invite-button { min-height: 64px; justify-content: flex-start; text-align: start; }
.hb-unified-event-page .hb-invite-button > i { inline-size: 34px; block-size: 34px; display: grid; place-items: center; border-radius: var(--hb-radius-sm); color: #fff; background: var(--hb-cobalt); }
.hb-unified-event-page .hb-invite-button b,
.hb-unified-event-page .hb-invite-button small { display: block; }
.hb-unified-event-page .hb-invite-button small { margin-top: 2px; color: var(--hb-muted); font-size: var(--hb-type-caption); }
.hb-unified-event-page .hb-event-chat { grid-column: 1 / -1; min-height: 390px; display: flex; flex-direction: column; }
.hb-unified-event-page .hb-event-chat .event-chat-head { display: flex; align-items: center; justify-content: space-between; }
.hb-unified-event-page .hb-event-chat .event-chat-list { flex: 1; min-height: 220px; max-height: 420px; margin-top: var(--hb-space-3); padding: var(--hb-space-3); overflow-y: auto; border-radius: var(--hb-radius-md); background: var(--hb-surface-cool); }
.hb-unified-event-page .hb-event-chat form { margin-top: var(--hb-space-3); display: grid; grid-template-columns: minmax(0,1fr) 104px; gap: var(--hb-space-2); }
.hb-unified-event-page .hb-event-chat form input { min-width: 0; min-height: 48px; padding-inline: var(--hb-space-3); border: 1px solid var(--hb-line); border-radius: var(--hb-radius-sm); font: inherit; }
.hb-unified-event-page .hb-event-chat #event-chat-note { margin: var(--hb-space-2) 0 0; color: var(--hb-muted); font-size: 10px; }
.hb-unified-event-page .player-route-nav.mobile { display: none; }

@media (max-width: 1040px) {
  .hb-unified-event-page .hb-live-layout { grid-template-columns: 176px minmax(0, 1fr); }
  .hb-unified-event-page .hb-live-nav { inline-size: 176px; }
  .hb-unified-event-page .hb-live-main { padding-inline: var(--hb-space-3); }
  .hb-unified-event-page .hb-player-card { grid-template-columns: 42% 58%; }
  .hb-unified-event-page .hb-player-console { padding: var(--hb-space-4); }
}

@media (max-width: 760px) {
  .hambeat-player-page.hb-unified-event-page { padding: 0 0 calc(72px + env(safe-area-inset-bottom)); }
  .hb-unified-event-page .hb-live-layout { min-height: 100dvh; display: block; }
  .hb-unified-event-page .hb-live-nav { display: none; }
  .hb-unified-event-page .hb-live-main { width: 100%; padding: 0 12px var(--hb-space-4); }
  .hb-unified-event-page .hb-live-mobile-header { position: sticky; z-index: 45; inset-block-start: 0; min-height: 68px; margin-inline: -12px; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--hb-line); background: var(--hb-surface); }
  .hb-unified-event-page .hb-mobile-live-brand.hb-brand { --hb-brand-mark-size: 38px; display: inline-flex !important; color: var(--hb-navy); }
  .hb-unified-event-page .hb-mobile-menu-button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; color: var(--hb-navy); background: transparent; font-size: 22px; }
  .hb-unified-event-page .hb-live-mobile-menu { position: absolute; inset: 60px 12px auto; padding: 10px; display: grid; gap: 4px; border: 1px solid var(--hb-line); border-radius: var(--hb-radius-md); background: var(--hb-surface); box-shadow: var(--hb-shadow-md); }
  .hb-unified-event-page .hb-live-mobile-menu[hidden] { display: none; }
  .hb-unified-event-page .hb-live-mobile-menu a { min-height: 44px; padding-inline: 12px; display: flex; align-items: center; border-radius: var(--hb-radius-sm); color: var(--hb-navy); text-decoration: none; }
  .hb-unified-event-page .hb-live-mobile-menu a:hover { background: var(--hb-info-soft); }
  .hb-unified-event-page .hb-player-card { min-height: 0; margin: 12px 0 0; grid-template-columns: 1fr; border-radius: var(--hb-radius-lg); }
  .hb-unified-event-page .hb-player-art { min-height: 132px; padding: 10px; background-position: center 40%; }
  .hb-unified-event-page .hb-player-art .hambeat-icon-button { width: 40px; height: 40px; }
  .hb-unified-event-page .hb-player-console { padding: 13px 16px 15px; }
  .hb-unified-event-page .hb-access-badge { min-height: 28px; }
  .hb-unified-event-page .hb-player-console > #eyebrow { margin-top: 7px; font-size: 9px; }
  .hb-unified-event-page .hb-player-console > #event-name { margin-top: 1px; font-size: 15px; }
  .hb-unified-event-page .hb-player-console > #event-location { font-size: 9px; }
  .hb-unified-event-page .hb-now-playing { margin-top: 9px; }
  .hb-unified-event-page .hb-now-playing > span { font-size: 9px; }
  .hb-unified-event-page .hb-now-playing h2 { margin-top: 2px; font-size: 25px; }
  .hb-unified-event-page .hb-now-playing p { margin-top: 1px; font-size: 10px; }
  .hb-unified-event-page .hb-live-presence { margin-top: 7px; }
  .hb-unified-event-page .hb-player-console > .hambeat-progress { margin-top: 9px; }
  .hb-unified-event-page .hb-player-controls { margin-top: 8px; grid-template-columns: 46px minmax(0,1fr); gap: 9px; }
  .hb-unified-event-page .hb-player-controls > .hb-local-play-toggle { width: 46px; height: 46px; }
  .hb-unified-event-page .hb-player-join { margin-top: 9px; padding-top: 9px; grid-template-columns: 1fr; gap: 7px; }
  .hb-unified-event-page .hb-player-join h2 { font-size: 13px; }
  .hb-unified-event-page .hb-player-join p { font-size: 8px; line-height: 1.55; }
  .hb-unified-event-page .hb-quality-strip { min-height: 0; margin: 8px 0; padding: 10px 12px; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; }
  .hb-unified-event-page .hb-quality-strip .live-indicator { inline-size: 22px; block-size: 22px; }
  .hb-unified-event-page .hb-quality-strip > #quality-label { font-size: 11px; }
  .hb-unified-event-page .hb-quality-strip > #quality-value { grid-column: 2 / -1; grid-row: 2; font-size: 9px; }
  .hb-unified-event-page .hb-quality-strip .hb-status-toggle { grid-column: 3; grid-row: 1; min-block-size: 44px; padding-inline: 10px; }
  .hb-unified-event-page .hb-quality-strip .hb-status-toggle span { display: none; }
  .hb-unified-event-page .hb-status-panel { margin-block-start: -8px; padding: 12px; }
  .hb-unified-event-page .hb-status-panel h2 { font-size: 16px; }
  .hb-unified-event-page .hb-status-metrics { grid-template-columns: 1fr 1fr; }
  .hb-unified-event-page .hb-status-metrics > div { border-bottom: 1px solid var(--hb-line); }
  .hb-unified-event-page .hb-readiness-details { margin-block: 8px; }
  .hb-unified-event-page .hb-readiness-details summary { min-height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) auto; justify-content: stretch; gap: 2px 8px; }
  .hb-unified-event-page .hb-readiness-details summary > span { grid-column: 1; }
  .hb-unified-event-page .hb-readiness-details summary > small { grid-column: 1; }
  .hb-unified-event-page .hb-readiness-details summary > .hb-readiness-chevron { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .hb-unified-event-page .hb-readiness-details .hb-readiness-panel { padding: 10px 14px; grid-template-columns: 1fr; }
  .hb-unified-event-page .hb-readiness-details .hb-readiness-panel article { min-height: 64px; grid-column: 1; border-inline-end: 0; border-bottom: 1px solid var(--hb-line); }
  .hb-unified-event-page .hb-readiness-details .hb-readiness-panel article:last-child { border-bottom: 0; }
  .hb-unified-event-page .event-timeline { margin: 8px 0; }
  .hb-unified-event-page .hb-live-content-grid { grid-template-columns: 1fr; gap: 8px; }
  .hb-unified-event-page .hb-event-playlist,
  .hb-unified-event-page .hb-live-social,
  .hb-unified-event-page .hb-event-chat { padding: 14px; border-radius: var(--hb-radius-md); }
  .hb-unified-event-page .hb-playlist-row { grid-template-columns: 30px minmax(0,1fr) 52px; }
  .hb-unified-event-page .hb-event-playlist-list { max-height: 420px; }
  .hb-unified-event-page .hb-playlist-state { grid-column: 2; justify-self: start; }
  .hb-unified-event-page .hb-live-social { min-height: 0; }
  .hb-unified-event-page .hb-event-chat { grid-column: 1; min-height: 420px; }
  .hb-unified-event-page .hb-event-chat .event-chat-list { min-height: 240px; max-height: 480px; }
  .hb-unified-event-page .hb-event-chat form { grid-template-columns: minmax(0,1fr) 82px; }
  .hb-unified-event-page .player-route-nav.mobile { position: fixed; z-index: 50; inset-inline: 0; bottom: 0; min-height: calc(66px + env(safe-area-inset-bottom)); padding: 5px 8px env(safe-area-inset-bottom); display: flex; border-top: 1px solid var(--hb-line); background: var(--hb-surface); }
  .hb-unified-event-page .player-route-nav.mobile a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--hb-muted); font-size: 9px; text-decoration: none; }
  .hb-unified-event-page .player-route-nav.mobile a.active { border-radius: var(--hb-radius-sm); color: var(--hb-cobalt); background: var(--hb-info-soft); }
  .hb-unified-event-page .player-route-nav.mobile i { color: currentColor; font-size: 17px; }
}

/* Unified player v13 — one public playback surface, one timeline, no public
   engineering panel. The queue stays beside the player on desktop and follows
   it immediately on smaller screens. */
.hb-unified-event-page .hb-live-main {
  width: min(100%, calc(var(--hb-content-max) + (6 * var(--hb-space-10))));
  padding: var(--hb-space-4);
}

.hb-unified-event-page .hb-player-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(336px, 392px);
  gap: var(--hb-space-3);
  align-items: stretch;
}

.hb-unified-event-page .hb-player-stage {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--hb-space-2);
}

.hb-unified-event-page .hb-player-card {
  min-height: 568px;
  grid-template-columns: minmax(260px, 38%) minmax(0, 62%);
  border-radius: var(--hb-radius-xl);
}

.hb-unified-event-page .hb-player-art {
  min-height: 568px;
  background-position: center;
}

.hb-unified-event-page .hb-player-console {
  padding: var(--hb-space-5);
  justify-content: flex-start;
}

.hb-unified-event-page .hb-player-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hb-space-2);
}

.hb-unified-event-page .hb-access-badge {
  min-height: 32px;
  padding-inline: var(--hb-space-2);
  display: inline-flex;
  align-items: center;
  gap: var(--hb-space-1);
  border: 1px solid rgba(255,255,255,.26);
  border-radius: var(--hb-radius-round);
  color: #fff;
  font-size: var(--hb-type-caption);
  font-weight: var(--hb-weight-bold);
}

.hb-unified-event-page .hb-event-context {
  margin-block-start: var(--hb-space-3);
}

.hb-unified-event-page .hb-event-context > #eyebrow {
  margin: 0;
  color: var(--hb-powder);
  font-size: var(--hb-type-caption);
  font-weight: var(--hb-weight-bold);
}

.hb-unified-event-page .hb-event-context > #event-name {
  margin: var(--hb-space-1) 0 0;
  overflow: hidden;
  color: #fff;
  font-size: var(--hb-type-h3);
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hb-unified-event-page .hb-event-context > #event-location {
  margin: 0;
  color: var(--hb-powder);
  font-size: var(--hb-type-caption);
}

.hb-unified-event-page .hb-now-playing {
  margin-block-start: var(--hb-space-4);
}

.hb-unified-event-page .hb-now-playing h2 {
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(28px, 3vw, 44px);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hb-unified-event-page .hb-live-presence {
  margin-block-start: var(--hb-space-2);
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
  color: var(--hb-powder);
  font-size: var(--hb-type-caption);
}

.hb-unified-event-page .hb-live-dot {
  inline-size: 8px;
  block-size: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--hb-butter);
}

.hb-unified-event-page .hb-track-timeline {
  margin-block-start: auto;
  padding-block-start: var(--hb-space-4);
}

.hb-unified-event-page .hb-track-timeline__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hb-space-2);
  color: var(--hb-powder);
  font-size: var(--hb-type-caption);
}

.hb-unified-event-page .hb-track-timeline__label > span:last-child {
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

.hb-unified-event-page .hb-track-timeline__label b {
  color: #fff;
  font-weight: var(--hb-weight-bold);
}

.hb-unified-event-page .hb-track-timeline > .hambeat-progress {
  height: 7px;
  margin: var(--hb-space-2) 0 0;
  direction: ltr;
  background: rgba(255,255,255,.18);
}

.hb-unified-event-page .hb-track-timeline > .hambeat-progress > span,
.hb-unified-event-page .hb-player-join .hambeat-progress > span {
  width: 0;
  background: var(--hb-butter);
  transition: width .16s linear;
}

.hb-unified-event-page .hb-player-controls {
  margin-block-start: var(--hb-space-3);
  display: grid;
  grid-template-columns: minmax(154px, auto) minmax(180px, 1fr);
  gap: var(--hb-space-2);
  align-items: center;
}

.hb-unified-event-page .hb-personal-audio-toggle {
  min-width: 154px;
  min-height: 48px;
  padding-inline: var(--hb-space-3);
  justify-content: center;
  white-space: nowrap;
}

.hb-unified-event-page .hb-personal-audio-toggle i {
  inline-size: 18px;
  text-align: center;
}

.hb-unified-event-page .hb-player-controls .hambeat-volume {
  min-width: 0;
  min-height: 48px;
  grid-template-columns: 18px minmax(80px, 1fr) 42px;
  padding-inline: var(--hb-space-2);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--hb-radius-sm);
  color: #fff;
}

.hb-unified-event-page .hb-player-controls .hambeat-volume input {
  min-width: 0;
  direction: ltr;
  accent-color: var(--hb-cobalt);
}

.hb-unified-event-page .hb-player-join {
  margin-block-start: var(--hb-space-3);
  padding-block-start: var(--hb-space-3);
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
}

.hb-unified-event-page .hb-player-join h2 {
  font-size: var(--hb-type-body);
}

.hb-unified-event-page .hb-player-join p {
  max-width: 54ch;
  font-size: var(--hb-type-caption);
}

.hb-unified-event-page .hb-quality-strip {
  min-height: 58px;
  margin: 0;
  padding: var(--hb-space-2) var(--hb-space-3);
  grid-template-columns: 24px minmax(0, 1fr);
  gap: var(--hb-space-2);
  border-radius: var(--hb-radius-md);
  background: var(--hb-surface);
}

.hb-unified-event-page .hb-quality-strip > div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hb-space-2);
}

.hb-unified-event-page .hb-quality-strip #quality-label,
.hb-unified-event-page .hb-quality-strip #quality-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hb-unified-event-page .hb-quality-strip #quality-label {
  color: var(--hb-navy);
  font-size: var(--hb-type-body-sm);
  font-weight: var(--hb-weight-bold);
}

.hb-unified-event-page .hb-quality-strip #quality-value {
  color: var(--hb-muted);
  font-size: var(--hb-type-caption);
  font-weight: var(--hb-weight-medium);
}

.hb-unified-event-page .hb-quality-strip[data-quality="good"] {
  background: var(--hb-success-soft);
}

.hb-unified-event-page .hb-player-queue {
  min-height: 0;
  max-height: 634px;
  padding: var(--hb-space-3);
  display: flex;
  flex-direction: column;
  align-self: stretch;
  overflow: hidden;
}

.hb-unified-event-page .hb-player-queue .hb-event-playlist-list {
  min-height: 0;
  max-height: none;
  flex: 1;
  margin-block-start: var(--hb-space-2);
}

.hb-unified-event-page .hb-playlist-row {
  min-height: 58px;
  grid-template-columns: 30px minmax(0,1fr) 52px;
  gap: var(--hb-space-2);
}

.hb-unified-event-page .hb-playlist-state {
  grid-column: 2;
  justify-self: start;
}

.hb-unified-event-page .hb-live-content-grid {
  margin-block-start: var(--hb-space-3);
  grid-template-columns: 320px minmax(0, 1fr);
  gap: var(--hb-space-3);
}

.hb-unified-event-page .hb-live-social {
  min-height: 318px;
}

.hb-unified-event-page .hb-event-chat {
  min-height: 318px;
  grid-column: auto;
}

.hb-unified-event-page .hb-event-chat .event-chat-list {
  min-height: 124px;
  max-height: 248px;
}

.hb-unified-event-page .hb-event-chat form {
  display: flex;
  flex-direction: row;
  direction: rtl;
}

.hb-unified-event-page .hb-event-chat form input {
  min-width: 0;
  flex: 1 1 auto;
  direction: rtl;
}

.hb-unified-event-page .hb-event-chat form .hb-button {
  flex: 0 0 104px;
}

@media (max-width: 1180px) {
  .hb-unified-event-page .hb-player-workspace {
    grid-template-columns: 1fr;
  }

  .hb-unified-event-page .hb-player-queue {
    max-height: 420px;
  }
}

@media (max-width: 760px) {
  .hb-unified-event-page .hb-live-main {
    width: 100%;
    padding: 0 12px var(--hb-space-4);
  }

  .hb-unified-event-page .hb-player-workspace {
    margin-block-start: 12px;
    gap: var(--hb-space-2);
  }

  .hb-unified-event-page .hb-player-card {
    min-height: 0;
    margin: 0;
    grid-template-columns: 1fr;
  }

  .hb-unified-event-page .hb-player-art {
    min-height: 188px;
    background-position: center 38%;
  }

  .hb-unified-event-page .hb-player-console {
    padding: var(--hb-space-3);
  }

  .hb-unified-event-page .hb-event-context {
    margin-block-start: var(--hb-space-2);
  }

  .hb-unified-event-page .hb-event-context > #event-name {
    font-size: var(--hb-type-body);
  }

  .hb-unified-event-page .hb-now-playing {
    margin-block-start: var(--hb-space-3);
  }

  .hb-unified-event-page .hb-now-playing h2 {
    font-size: 30px;
  }

  .hb-unified-event-page .hb-track-timeline {
    margin-block-start: var(--hb-space-3);
    padding-block-start: 0;
  }

  .hb-unified-event-page .hb-player-controls {
    grid-template-columns: minmax(136px, auto) minmax(0, 1fr);
  }

  .hb-unified-event-page .hb-personal-audio-toggle {
    min-width: 0;
    padding-inline: var(--hb-space-2);
    font-size: 11px;
  }

  .hb-unified-event-page .hb-player-controls .hambeat-volume {
    grid-template-columns: 16px minmax(54px, 1fr) 36px;
    gap: 6px;
  }

  .hb-unified-event-page .hb-player-join {
    grid-template-columns: 1fr;
  }

  .hb-unified-event-page .hb-player-join .hb-button {
    width: 100%;
  }

  .hb-unified-event-page .hb-quality-strip {
    min-height: 64px;
  }

  .hb-unified-event-page .hb-quality-strip > div {
    display: grid;
    gap: 2px;
  }

  .hb-unified-event-page .hb-player-queue {
    max-height: 356px;
    padding: 14px;
  }

  .hb-unified-event-page .hb-live-content-grid {
    margin-block-start: var(--hb-space-2);
    grid-template-columns: 1fr;
    gap: var(--hb-space-2);
  }

  .hb-unified-event-page .hb-live-social,
  .hb-unified-event-page .hb-event-chat {
    min-height: 0;
  }

  .hb-unified-event-page .hb-event-chat {
    grid-column: 1;
  }

  .hb-unified-event-page .hb-event-chat .event-chat-list {
    min-height: 160px;
    max-height: 280px;
  }

  .hb-unified-event-page .hb-event-chat form .hb-button {
    flex-basis: 82px;
  }
}

/* Unified player v20 — compact action-first console, soft cover handoff and
   deterministic current-track anchoring. */
.hb-unified-event-page .hb-player-card {
  min-height: 404px;
  grid-template-columns: minmax(360px, 54%) minmax(0, 46%);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  background: var(--hb-navy);
}

.hb-unified-event-page .hb-player-art {
  min-height: 404px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-size: cover;
}

.hb-unified-event-page .hb-player-art::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 46% 0 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(16,27,43,.82));
}

.hb-unified-event-page .hb-player-art::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset-block: 0;
  inset-inline-start: -1px;
  inline-size: clamp(144px, 14vw, 228px);
  pointer-events: none;
  background: linear-gradient(to left, var(--hb-navy) 0%, rgba(16,27,43,.94) 34%, rgba(16,27,43,.58) 68%, transparent 100%);
}

.hb-unified-event-page .hb-player-back,
.hb-unified-event-page .hb-player-art-actions,
.hb-unified-event-page .hb-player-art .hb-event-context {
  position: absolute;
  z-index: 1;
}

.hb-unified-event-page .hb-player-back {
  inset-block-start: var(--hb-space-3);
  inset-inline-end: var(--hb-space-3);
}

.hb-unified-event-page .hb-player-art-actions {
  inset-block-start: var(--hb-space-3);
  inset-inline-start: var(--hb-space-3);
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
}

.hb-unified-event-page .hb-player-art .hb-event-context {
  inset-inline: var(--hb-space-4);
  inset-block-end: var(--hb-space-4);
  margin: 0;
}

.hb-unified-event-page .hb-player-art .hb-event-context > #eyebrow,
.hb-unified-event-page .hb-player-art .hb-event-context > #event-location {
  color: rgba(255,255,255,.82);
  text-shadow: 0 1px 12px rgba(16,27,43,.7);
}

.hb-unified-event-page .hb-player-art .hb-event-context > #event-name {
  max-width: 20ch;
  margin-block-start: 2px;
  color: #fff;
  font-size: clamp(20px, 2vw, 30px);
  text-shadow: 0 2px 18px rgba(16,27,43,.85);
}

.hb-unified-event-page .hb-player-console {
  min-height: 404px;
  padding: var(--hb-space-4);
  position: relative;
  z-index: 1;
}

.hb-unified-event-page .hb-now-playing {
  margin-block-start: 0;
}

.hb-unified-event-page .hb-now-playing h2 {
  font-size: clamp(27px, 2.45vw, 36px);
  line-height: 1.24;
  -webkit-line-clamp: 1;
}

.hb-unified-event-page .hb-player-action-deck {
  margin-block-start: 10px;
  display: grid;
  grid-template-columns: minmax(230px, .9fr) minmax(280px, 1.1fr);
  gap: var(--hb-space-2);
  align-items: stretch;
}

.hb-unified-event-page .hb-player-action-deck .hb-player-join {
  min-width: 0;
  margin: 0;
  padding: var(--hb-space-2);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--hb-space-2);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--hb-radius-md);
  background: rgba(255,255,255,.055);
}

.hb-unified-event-page .hb-player-action-deck .hb-player-join p {
  display: none;
}

.hb-unified-event-page .hb-player-action-deck .hb-player-join .hb-button {
  min-height: 44px;
  padding-inline: var(--hb-space-3);
  white-space: nowrap;
}

.hb-unified-event-page .hb-player-action-deck .hb-player-join .error-box {
  min-height: 0;
  padding: 7px 9px;
  border: 1px solid rgba(239,104,113,.38);
  border-radius: var(--hb-radius-sm);
  color: var(--hb-powder);
  background: rgba(239,104,113,.13);
  font-size: 10px;
  line-height: 1.65;
}

.hb-unified-event-page .hb-player-action-deck .hb-player-controls {
  min-width: 0;
  margin: 0;
  grid-template-columns: minmax(136px, auto) minmax(120px, 1fr);
}

.hb-unified-event-page[data-state="playing"] .hb-player-action-deck {
  grid-template-columns: 1fr;
}

.hb-unified-event-page[data-state="playing"] .hb-player-action-deck .hb-player-controls {
  grid-column: 1 / -1;
}

.hb-unified-event-page .hb-track-timeline {
  margin-block-start: 10px;
  padding-block-start: 10px;
}

.hb-unified-event-page .hb-player-console > .hb-quality-strip {
  min-height: 40px;
  margin-block-start: var(--hb-space-2);
  padding: 7px var(--hb-space-2);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--hb-radius-sm);
  background: rgba(255,255,255,.055);
}

.hb-unified-event-page .hb-player-console > .hb-quality-strip #quality-label {
  color: #fff;
}

.hb-unified-event-page .hb-player-console > .hb-quality-strip #quality-value {
  color: var(--hb-powder);
}

.hb-unified-event-page .hb-player-console > .hb-quality-strip[data-quality="good"],
.hb-unified-event-page .hb-player-console > .hb-quality-strip[data-quality="excellent"] {
  background: rgba(87,219,165,.1);
}

.hb-unified-event-page .hb-player-console > .hb-quality-strip[data-quality="warning"] {
  background: rgba(255,204,89,.1);
}

.hb-unified-event-page .hb-player-console > .hb-quality-strip[data-quality="poor"] {
  border-color: rgba(239,104,113,.32);
  background: rgba(239,104,113,.12);
}

.hb-unified-event-page .hb-player-queue {
  max-height: 404px;
}

.hb-unified-event-page .hb-player-queue .hb-event-playlist-list {
  overflow-anchor: none;
  scrollbar-gutter: stable;
}

.hb-unified-event-page .hb-playlist-row {
  min-height: 54px;
  scroll-margin-block: 96px;
}

.hb-unified-event-page .hb-playlist-row.active {
  position: relative;
  z-index: 1;
  box-shadow: inset -3px 0 0 var(--hb-cobalt);
}

@media (max-width: 1180px) {
  .hb-unified-event-page .hb-player-queue {
    max-height: 360px;
  }
}

@media (max-width: 760px) {
  .hb-unified-event-page .hb-player-card {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .hb-unified-event-page .hb-player-art {
    min-height: 244px;
    background-position: center 36%;
  }

  .hb-unified-event-page .hb-player-art::before {
    inset: 42% 0 0;
    background: linear-gradient(to bottom, transparent, rgba(16,27,43,.88));
  }

  .hb-unified-event-page .hb-player-art::after {
    inset: auto 0 -1px;
    inline-size: auto;
    block-size: 116px;
    background: linear-gradient(to bottom, transparent 0%, rgba(16,27,43,.7) 52%, var(--hb-navy) 100%);
  }

  .hb-unified-event-page .hb-player-back,
  .hb-unified-event-page .hb-player-art-actions {
    inset-block-start: 12px;
  }

  .hb-unified-event-page .hb-player-back {
    inset-inline-end: 12px;
  }

  .hb-unified-event-page .hb-player-art-actions {
    inset-inline-start: 12px;
  }

  .hb-unified-event-page .hb-player-art .hb-event-context {
    inset-inline: 14px;
    inset-block-end: 12px;
  }

  .hb-unified-event-page .hb-player-art .hb-event-context > #event-name {
    max-width: 24ch;
    font-size: 19px;
  }

  .hb-unified-event-page .hb-player-console {
    min-height: 0;
    margin-block-start: -28px;
    padding: 30px 14px 14px;
    border-radius: 24px 24px 0 0;
  }

  .hb-unified-event-page .hb-now-playing h2 {
    margin-block-start: 1px;
    font-size: 23px;
    line-height: 1.3;
  }

  .hb-unified-event-page .hb-now-playing p,
  .hb-unified-event-page .hb-live-presence {
    font-size: 10px;
  }

  .hb-unified-event-page .hb-live-presence {
    margin-block-start: 5px;
  }

  .hb-unified-event-page .hb-player-action-deck {
    order: -1;
    margin-block-start: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
  }

  .hb-unified-event-page .hb-player-action-deck .hb-player-join {
    min-height: 46px;
    display: block;
    padding: 6px;
  }

  .hb-unified-event-page .hb-player-action-deck .hb-player-join > div:first-child {
    display: none;
  }

  .hb-unified-event-page .hb-player-action-deck .hb-player-join .hb-button {
    width: 100%;
    min-height: 44px;
    padding-inline: 12px;
    font-size: 11px;
  }

  .hb-unified-event-page .hb-player-action-deck .hb-player-controls {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .hb-unified-event-page:not([data-state="playing"]) .hb-player-action-deck .hb-player-controls .hambeat-volume {
    display: none;
  }

  .hb-unified-event-page[data-state="playing"] .hb-player-action-deck {
    grid-template-columns: 1fr;
  }

  .hb-unified-event-page[data-state="playing"] .hb-player-action-deck .hb-player-join {
    display: none;
  }

  .hb-unified-event-page[data-state="playing"] .hb-player-action-deck .hb-player-controls {
    grid-template-columns: minmax(124px, auto) minmax(0, 1fr);
  }

  .hb-unified-event-page .hb-player-action-deck .hb-player-controls > * {
    min-height: 44px;
  }

  .hb-unified-event-page .hb-track-timeline {
    margin-block-start: 8px;
    padding-block-start: 0;
  }

  .hb-unified-event-page .hb-track-timeline__label {
    font-size: 9px;
  }

  .hb-unified-event-page .hb-quality-strip {
    min-height: 42px;
    padding-block: 8px;
  }

  .hb-unified-event-page .hb-player-console > .hb-quality-strip > div {
    display: flex;
    gap: 6px;
  }

  .hb-unified-event-page .hb-player-console > .hb-quality-strip #quality-value {
    font-size: 8px;
  }

  .hb-unified-event-page .hb-player-queue {
    max-height: 312px;
  }
}

/* Player navigation cleanup: the live event is a single focused surface, so the
   desktop rail is replaced with a compact utility header. */
.hb-unified-event-page .hb-live-layout {
  display: block;
}

.hb-unified-event-page .hb-live-nav {
  display: none;
}

.hb-unified-event-page .hb-live-main {
  width: min(100%, 1272px);
  padding: var(--hb-space-3) var(--hb-space-4) var(--hb-space-8);
}

.hb-unified-event-page .hb-live-mobile-header {
  width: min(100%, 1240px);
  min-height: 64px;
  margin: 0 auto var(--hb-space-3);
  padding: 8px var(--hb-space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hb-space-3);
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-lg);
  background: var(--hb-surface);
  box-shadow: 0 10px 30px rgba(16, 27, 43, .06);
}

.hb-unified-event-page .hb-mobile-live-brand.hb-brand {
  --hb-brand-mark-size: 38px;
  color: var(--hb-navy);
}

.hb-unified-event-page .hb-live-quick-nav {
  display: flex;
  align-items: center;
  gap: var(--hb-space-2);
}

.hb-unified-event-page .hb-live-quick-nav a {
  min-height: 44px;
  padding-inline: var(--hb-space-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-sm);
  color: var(--hb-navy);
  background: var(--hb-surface-cool);
  font-size: 12px;
  font-weight: var(--hb-weight-bold);
  text-decoration: none;
}

.hb-unified-event-page .hb-live-quick-nav a:hover,
.hb-unified-event-page .hb-live-quick-nav a:focus-visible {
  color: #fff;
  border-color: var(--hb-cobalt);
  background: var(--hb-cobalt);
}

.hb-unified-event-page .hb-mobile-menu-button {
  display: none;
}

@media (max-width: 760px) {
  .hambeat-player-page.hb-unified-event-page {
    padding-block-end: max(16px, env(safe-area-inset-bottom));
  }

  .hb-unified-event-page .hb-live-main {
    padding: 0 12px 18px;
  }

  .hb-unified-event-page .hb-live-mobile-header {
    position: sticky;
    z-index: 45;
    inset-block-start: 0;
    width: auto;
    min-height: 68px;
    margin: 0 -12px 12px;
    padding: 8px 16px;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: none;
  }

  .hb-unified-event-page .hb-live-quick-nav {
    display: none;
  }

  .hb-unified-event-page .hb-mobile-menu-button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--hb-navy);
    background: transparent;
    font-size: 22px;
  }

  .hb-unified-event-page .player-route-nav.mobile {
    position: static;
    min-height: 62px;
    margin: 12px 0 0;
    padding: 6px;
    display: flex;
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius-md);
    background: var(--hb-surface);
    box-shadow: 0 10px 30px rgba(16,27,43,.08);
  }
}

/* Unified player v26 - real playback affordance and non-overlapping controls. */
.hb-unified-event-page .hb-live-main {
  width: min(100%, 1816px);
}

.hb-unified-event-page .hb-player-workspace {
  grid-template-columns: minmax(760px, 1fr) minmax(380px, 480px);
  align-items: stretch;
}

.hb-unified-event-page .hb-player-card {
  min-height: 520px;
  grid-template-columns: minmax(430px, 52%) minmax(420px, 48%);
}

.hb-unified-event-page .hb-player-art {
  min-height: 520px;
  background-position: center center;
}

.hb-unified-event-page .hb-player-art::after {
  inset: 0;
  inline-size: auto;
  block-size: auto;
  background:
    linear-gradient(to bottom, rgba(16,27,43,.08) 0%, rgba(16,27,43,.34) 52%, rgba(16,27,43,.84) 100%);
}

.hb-unified-event-page .hb-player-console {
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.hb-unified-event-page .hb-player-console-actions {
  margin-block-end: var(--hb-space-3);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--hb-space-2);
}

.hb-unified-event-page .hb-player-console-actions .hb-access-badge,
.hb-unified-event-page .hb-player-console-actions .hb-button {
  min-height: 44px;
}

.hb-unified-event-page .hb-player-action-deck {
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

.hb-unified-event-page .hb-player-action-deck .hb-player-join {
  grid-template-columns: minmax(0, 1fr);
  padding: var(--hb-space-3);
}

.hb-unified-event-page .hb-player-action-deck .hb-player-join p {
  display: block;
}

.hb-unified-event-page .hb-player-action-deck .hb-player-join .hb-button {
  width: 100%;
  justify-content: center;
  gap: 9px;
  white-space: normal;
}

.hb-unified-event-page:not([data-state="playing"]) .hb-player-action-deck .hb-player-controls {
  display: none;
}

.hb-unified-event-page[data-state="playing"] .hb-player-action-deck .hb-player-join {
  display: none;
}

.hb-unified-event-page[data-state="playing"] .hb-player-action-deck .hb-player-controls {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
}

.hb-unified-event-page .hb-track-timeline {
  margin-block-start: auto;
}

.hb-unified-event-page .hb-player-queue {
  max-height: 520px;
}

.hb-unified-event-page .hb-player-queue .hb-event-playlist-list {
  padding-inline-end: 4px;
}

.hb-unified-event-page .hb-playlist-row {
  min-height: 48px;
}

@media (max-width: 1180px) {
  .hb-unified-event-page .hb-player-workspace {
    grid-template-columns: 1fr;
  }

  .hb-unified-event-page .hb-player-card {
    grid-template-columns: minmax(320px, 45%) minmax(0, 55%);
  }

  .hb-unified-event-page .hb-player-queue {
    max-height: 420px;
  }
}

@media (max-width: 760px) {
  .hb-unified-event-page .hb-player-card {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .hb-unified-event-page .hb-player-art {
    min-height: 232px;
  }

  .hb-unified-event-page .hb-player-art::after {
    inset: auto 0 -1px;
    block-size: 128px;
    background: linear-gradient(to bottom, transparent 0%, rgba(16,27,43,.72) 56%, var(--hb-navy) 100%);
  }

  .hb-unified-event-page .hb-player-console {
    min-height: 0;
    margin-block-start: 0;
    padding: 14px;
    display: block;
  }

  .hb-unified-event-page .hb-player-console-actions {
    margin-block-end: 10px;
  }

  .hb-unified-event-page .hb-player-action-deck {
    order: initial;
    margin-block-start: 10px;
    grid-template-columns: 1fr;
  }

  .hb-unified-event-page .hb-player-action-deck .hb-player-join {
    display: grid;
    padding: 10px;
  }

  .hb-unified-event-page .hb-player-action-deck .hb-player-join > div:first-child {
    display: block;
  }

  .hb-unified-event-page .hb-player-action-deck .hb-player-join p {
    display: block;
    font-size: 10px;
  }

  .hb-unified-event-page .hb-player-action-deck .hb-player-join .hb-button {
    font-size: 12px;
  }

  .hb-unified-event-page:not([data-state="playing"]) .hb-player-action-deck .hb-player-controls {
    display: none;
  }

  .hb-unified-event-page[data-state="playing"] .hb-player-action-deck .hb-player-controls {
    grid-template-columns: 1fr;
  }

  .hb-unified-event-page .hb-track-timeline {
    margin-block-start: 10px;
  }

  .hb-unified-event-page .hb-player-queue {
    block-size: clamp(300px, 46dvh, 380px);
    max-height: clamp(300px, 46dvh, 380px);
    scroll-margin-block-start: 72px;
  }

  .hb-unified-event-page .hb-player-queue .hb-event-playlist-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }
}

/* Unified player v28 - preserve cover composition across desktop widths. */
@media (min-width: 761px) {
  .hb-unified-event-page .hb-player-card {
    grid-template-columns: minmax(0, 3fr) minmax(440px, 2fr);
  }

  .hb-unified-event-page .hb-player-art::before {
    inset: 54% 0 0;
    background: linear-gradient(to bottom, transparent, rgba(16,27,43,.78));
  }

  .hb-unified-event-page .hb-player-art::after {
    inset: 0 0 0 auto;
    inline-size: 96px;
    block-size: auto;
    background: linear-gradient(to left, var(--hb-navy) 0%, rgba(16,27,43,.72) 42%, transparent 100%);
  }

  .hb-unified-event-page .hb-player-art .hb-event-context > #event-name {
    max-width: none;
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    text-overflow: clip;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hb-unified-event-page .hb-now-playing h2 {
    font-size: clamp(24px, 2vw, 34px);
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }
}

@media (min-width: 1181px) and (max-width: 1700px) {
  .hb-unified-event-page .hb-player-workspace {
    grid-template-columns: 1fr;
  }

  .hb-unified-event-page .hb-player-queue {
    max-height: 360px;
  }
}

@media (max-width: 760px) {
  .hb-unified-event-page .hb-player-art::before {
    inset: 50% 0 0;
    background: linear-gradient(to bottom, transparent, rgba(16,27,43,.86));
  }

  .hb-unified-event-page .hb-player-art::after {
    display: none;
  }

  .hb-unified-event-page .hb-now-playing h2 {
    font-size: 22px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }
}

/* Technical debug surface */
.debug-page {
  min-height: 100dvh;
  color: var(--hb-navy);
  background: var(--hb-porcelain);
}

.debug-page .debug-shell {
  width: min(100% - 32px, 1240px);
  margin-inline: auto;
  padding-block: 30px 48px;
}

.debug-page .page-header {
  margin-block-end: var(--hb-space-4);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--hb-space-4);
}

.debug-page .page-header h1 {
  margin: 2px 0 0;
  color: var(--hb-navy);
  font-size: 34px;
  line-height: 1.25;
}

.debug-page .page-header .eyebrow,
.debug-page .debug-event-identity span,
.debug-page :where(dt, small, p) {
  color: var(--hb-muted);
}

.debug-page .back-link,
.debug-page .debug-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hb-navy);
  text-decoration: none;
}

.debug-page .debug-event-strip,
.debug-page .debug-timeline,
.debug-page .debug-measurements,
.debug-page .debug-history,
.debug-page .debug-status,
.debug-page .debug-guide,
.debug-page .debug-note,
.debug-page .debug-actions {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-lg);
  background: var(--hb-surface);
  box-shadow: 0 10px 32px rgba(16, 27, 43, .06);
}

.debug-page .debug-event-strip {
  min-height: 96px;
  padding: var(--hb-space-3);
  display: grid;
  grid-template-columns: 80px minmax(160px, .8fr) minmax(0, 1.8fr);
  align-items: center;
  gap: var(--hb-space-4);
}

.debug-page .debug-event-strip img {
  inline-size: 80px;
  block-size: 80px;
  object-fit: cover;
  border-radius: var(--hb-radius-sm);
}

.debug-page .debug-event-identity {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.debug-page .debug-event-identity strong {
  overflow: hidden;
  color: var(--hb-navy);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.debug-page .debug-event-strip dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.debug-page .debug-event-strip dl > div {
  min-width: 0;
  padding-inline: var(--hb-space-3);
  border-inline-start: 1px solid var(--hb-line);
}

.debug-page .debug-event-strip dl > div:last-child {
  border-inline-start: 0;
}

.debug-page dt {
  font-size: var(--hb-type-caption);
  font-weight: var(--hb-weight-medium);
}

.debug-page dd {
  margin: 5px 0 0;
  color: var(--hb-navy);
  font-weight: var(--hb-weight-bold);
}

.debug-page .debug-primary-grid {
  margin-block-start: var(--hb-space-3);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: var(--hb-space-3);
  align-items: start;
}

.debug-page .debug-main-column,
.debug-page .debug-side-column {
  min-width: 0;
  display: grid;
  gap: var(--hb-space-3);
}

.debug-page :where(.debug-timeline, .debug-measurements, .debug-history, .debug-status, .debug-guide, .debug-note, .debug-actions) {
  padding: var(--hb-space-4);
}

.debug-page h2 {
  margin: 0 0 var(--hb-space-3);
  color: var(--hb-navy);
  font-size: 18px;
}

.debug-page .debug-timeline > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--hb-space-2);
}

.debug-page .debug-timeline span,
.debug-page .metrics-grid article {
  min-width: 0;
  padding: var(--hb-space-3);
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-md);
  background: var(--hb-surface-cool);
}

.debug-page .debug-timeline strong,
.debug-page .metrics-grid strong {
  margin-block-start: 6px;
  display: block;
  direction: ltr;
  color: var(--hb-navy);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.debug-page .timeline-track {
  margin-block: var(--hb-space-3) 0;
  background: var(--hb-line);
}

.debug-page .timeline-track > span {
  background: var(--hb-cobalt);
}

.debug-page .timeline-track > i {
  border-color: var(--hb-surface);
  background: var(--hb-butter);
}

.debug-page .metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--hb-space-2);
  direction: rtl;
}

.debug-page .metrics-grid article {
  min-height: 120px;
  display: grid;
  align-content: space-between;
}

.debug-page .metrics-grid article.wide {
  grid-column: span 2;
  background: var(--hb-info-soft);
}

.debug-page .debug-quality-legend {
  margin-block-start: var(--hb-space-3);
  padding: var(--hb-space-2) var(--hb-space-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hb-space-3);
  border-radius: var(--hb-radius-md);
  background: var(--hb-info-soft);
}

.debug-page .debug-status {
  color: #fff;
  background: var(--hb-navy);
}

.debug-page .debug-status :where(small, p) {
  color: var(--hb-powder);
}

.debug-page .debug-status > div:first-child {
  margin-block-end: var(--hb-space-3);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: var(--hb-space-3);
  align-items: center;
}

.debug-page .debug-status #app-title {
  grid-column: 1 / -1;
  margin-block: 2px 0;
  display: block;
  color: #fff;
  font-size: 22px;
  line-height: 1.35;
}

.debug-page .debug-status #status-detail {
  grid-column: 1 / -1;
  margin: 0;
  line-height: 1.85;
}

.debug-page .debug-status #ready-button,
.debug-page .debug-actions button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: var(--hb-radius-sm);
  font: inherit;
  font-weight: var(--hb-weight-bold);
  cursor: pointer;
}

.debug-page .debug-status #ready-button {
  color: #fff;
  background: var(--hb-cobalt);
}

.debug-page #quality-card {
  margin-block-start: var(--hb-space-3);
  padding: var(--hb-space-3);
  border-radius: var(--hb-radius-md);
  background: rgba(255, 255, 255, .08);
}

.debug-page #quality-card span,
.debug-page #quality-card strong {
  display: block;
}

.debug-page #quality-card strong {
  margin-block-start: 4px;
  color: var(--hb-butter);
  font-size: 24px;
}

.debug-page .debug-guide ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--hb-space-2);
  list-style: none;
}

.debug-page .debug-guide li {
  min-height: 44px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--hb-space-2);
  border-bottom: 1px solid var(--hb-line);
}

.debug-page .debug-guide li:last-child {
  border-bottom: 0;
}

.debug-page .quality-dot {
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--hb-muted);
}

.debug-page .quality-dot.excellent { background: var(--hb-success); }
.debug-page .quality-dot.good { background: var(--hb-cobalt); }
.debug-page .quality-dot.warning { background: var(--hb-warning); }
.debug-page .quality-dot.bad { background: var(--hb-danger); }

.debug-page .debug-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-radius-md);
}

.debug-page table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.debug-page th,
.debug-page td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hb-line);
  text-align: start;
}

.debug-page th {
  color: var(--hb-muted);
  background: var(--hb-surface-cool);
}

.debug-page .debug-actions {
  display: grid;
  gap: var(--hb-space-2);
}

.debug-page .debug-actions button {
  color: #fff;
  background: var(--hb-cobalt);
}

.debug-page .debug-actions button + button,
.debug-page .debug-actions a {
  justify-content: center;
  color: var(--hb-navy);
  border: 1px solid var(--hb-line);
  background: var(--hb-surface-cool);
}

@media (max-width: 920px) {
  .debug-page .page-header,
  .debug-page .debug-event-strip,
  .debug-page .debug-primary-grid {
    grid-template-columns: 1fr;
  }

  .debug-page .page-header {
    align-items: stretch;
  }

  .debug-page .debug-event-strip {
    align-items: start;
  }

  .debug-page .debug-event-strip dl,
  .debug-page .debug-timeline > div,
  .debug-page .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .debug-page .debug-event-strip dl > div {
    padding-block: var(--hb-space-2);
  }

  .debug-page .debug-side-column {
    display: contents;
  }

  .debug-page .debug-status {
    order: -1;
  }

  .debug-page .debug-main-column {
    order: 0;
  }

  .debug-page .debug-guide {
    order: 1;
  }

  .debug-page .debug-note {
    order: 2;
  }

  .debug-page .debug-actions {
    order: 3;
  }
}

@media (max-width: 520px) {
  .debug-page .debug-shell {
    width: min(100% - 20px, 480px);
    padding-block-start: 18px;
  }

  .debug-page .page-header h1 {
    font-size: 26px;
  }

  .debug-page .debug-event-strip {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: var(--hb-space-3);
  }

  .debug-page .debug-event-strip img {
    inline-size: 72px;
    block-size: 72px;
  }

  .debug-page .debug-event-identity {
    align-self: center;
  }

  .debug-page .debug-event-strip dl {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .debug-page .debug-status > div:first-child {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px 10px;
    align-items: start;
  }

  .debug-page .debug-status #eyebrow {
    align-self: end;
  }

  .debug-page .debug-status #app-title,
  .debug-page .debug-status #status-detail {
    grid-column: 1 / -1;
  }

  .debug-page .debug-status #app-title {
    margin-block-start: 2px;
    font-size: 22px;
    line-height: 1.32;
  }

  .debug-page .debug-status #status-detail {
    margin: 0;
    line-height: 1.9;
  }

  .debug-page .debug-timeline > div,
  .debug-page .metrics-grid,
  .debug-page .metrics-grid article.wide {
    grid-template-columns: 1fr;
    grid-column: auto;
  }
}
