:root {
  color-scheme: light;
  --bg: #f7f3eb;
  --ink: #132238;
  --muted: #5f6670;
  --accent: #d94f04;
  --accent-soft: #ffd19b;
  --line: rgba(19, 34, 56, 0.1);
  --panel: rgba(255, 255, 255, 0.9);
  --panel-border: rgba(19, 34, 56, 0.12);
  font-family: var(--bs-body-font-family);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(217, 79, 4, 0.18), transparent 24%),
    linear-gradient(135deg, #faf6ef 0%, #f2e3cd 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

.gameday-page {
  padding-bottom: 112px;
}

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

.hero {
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, rgba(19, 34, 56, 0.96), rgba(217, 79, 4, 0.95));
  color: white;
  box-shadow: 0 20px 40px rgba(19, 34, 56, 0.14);
}

.hero p {
  max-width: 50rem;
}

.page-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.04em;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.panel-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-header {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
}

.clip-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.clip-list-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  padding: 0;
}

.bootstrap-icon {
  display: inline-block;
  line-height: 1;
  font-size: 1rem;
  font-style: normal;
}

.site-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-soft);
  font-size: 1.4rem;
  line-height: 1;
  margin-left: 0.15rem;
}

.clip-list-add-button .bootstrap-icon {
  font-size: 1.2rem;
}

.walkup-modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(11, 18, 28, 0.76);
  backdrop-filter: blur(10px);
  z-index: 10000;
}

.walkup-modal {
  max-width: 1080px;
  max-height: 92vh;
  overflow: auto;
  position: relative;
  z-index: 10001;
}

.walkup-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0;
}

.walkup-modal-header h2 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.walkup-modal-header .eyebrow {
  color: var(--accent);
  opacity: 1;
}

.walkup-modal-body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.walkup-step-breadcrumb {
  --bs-breadcrumb-divider: "›";
  align-items: center;
  color: var(--muted);
  margin-bottom: 0;
}

.walkup-step-breadcrumb .breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  opacity: 0.82;
}

.walkup-step-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: var(--muted);
}

.walkup-step-breadcrumb .breadcrumb-item.active {
  color: var(--accent);
  font-weight: 600;
  opacity: 1;
}

.walkup-modal-actions {
  justify-content: flex-start;
}

.source-progress-panel {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid rgba(19, 34, 56, 0.12);
  border-radius: 0.85rem;
  background: rgba(19, 34, 56, 0.04);
}

.source-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
}

.source-progress-bar {
  position: relative;
  overflow: hidden;
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(19, 34, 56, 0.12);
}

.source-progress-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #f5a13b);
  transition: width 160ms ease;
}

.source-progress-bar.is-indeterminate .source-progress-bar-fill {
  width: 42% !important;
  animation: source-progress-slide 1.05s ease-in-out infinite;
}

@keyframes source-progress-slide {
  0% {
    transform: translateX(-115%);
  }

  100% {
    transform: translateX(250%);
  }
}

.walkup-panel-actions {
  justify-content: flex-end;
  margin-top: 0.85rem;
}

.panel {
  padding: 1.25rem;
  border: 1px solid var(--panel-border);
  border-radius: 1rem;
  background: var(--panel);
  box-shadow: 0 18px 32px rgba(19, 34, 56, 0.08);
  backdrop-filter: blur(12px);
}

.walkup-library-panel {
  position: relative;
  z-index: 2;
}

.walkup-library-panel + .panel {
  position: relative;
  z-index: 1;
}

.panel h2,
.panel h3 {
  margin-top: 0;
}

.gameday-loading-panel {
  min-height: min(42vh, 24rem);
  display: grid;
  place-items: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem 1.5rem;
}

.gameday-loading-spinner {
  width: 3rem;
  height: 3rem;
  border-width: 0.28rem;
}

.gameday-loading-copy {
  display: grid;
  gap: 0.35rem;
  max-width: 24rem;
}

.gameday-loading-label {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stack {
  display: grid;
  gap: 0.75rem;
}

.gameday-clip-list {
  gap: 0.4rem;
}

.gameday-clip-list .clip-summary {
  padding: 0.6rem 0;
}

.clip-summary {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.clip-summary:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.clip-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.clip-summary-title-row {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  line-height: 1.15;
}

.clip-summary-title-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.clip-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.clip-summary-subtitle {
  margin-left: 2.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.clip-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b58900;
  line-height: 1;
}

.clip-status-icon .bi {
  font-size: 0.95rem;
}

.gameday-clip-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.icon-button-circle {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button-bare {
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button-menu {
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  border-radius: 999px;
  overflow: visible;
}

.icon-button-menu .bootstrap-icon {
  font-size: 1rem;
}

.icon-button .bootstrap-icon {
  font-size: 1em;
  vertical-align: -0.125em;
}

.icon-button {
  line-height: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .icon-button:hover:not(:disabled) {
    background: rgba(19, 34, 56, 0.06);
  }
}

.icon-button:disabled {
  opacity: 0.45;
}

.clip-summary-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.clip-summary-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 11000;
  min-width: 12rem;
  padding: 0.45rem;
  border: 1px solid var(--panel-border);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 28px rgba(19, 34, 56, 0.14);
  display: grid;
  gap: 0.35rem;
}

.clip-summary-menu.is-up {
  top: auto;
  bottom: calc(100% + 0.45rem);
}

.clip-summary-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-radius: 0.5rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.clip-summary-menu-action {
  width: 100%;
  justify-content: flex-start;
}

.clip-summary-menu-action .clip-summary-menu-icon {
  color: inherit;
}

.clip-summary-menu-item.is-active {
  background: rgba(217, 79, 4, 0.08);
  color: var(--accent);
}

.clip-summary-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  color: var(--muted);
  flex: 0 0 auto;
}

.clip-summary-menu-icon .bootstrap-icon {
  font-size: 1em;
  vertical-align: -0.125em;
}

.clip-summary-menu-label {
  padding: 0.45rem 0.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.clip-details-stats {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.clip-details-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.clip-details-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.clip-details-game-list,
.clip-pin-game-list {
  display: grid;
  gap: 0.5rem;
}

.clip-details-game-row,
.clip-pin-game-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.74);
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.clip-pin-game-row {
  text-align: left;
}

.clip-pin-game-row.is-active {
  border-color: rgba(217, 79, 4, 0.32);
  background: rgba(217, 79, 4, 0.08);
}

.clip-pin-game-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.clip-pin-game-row .pill.is-active {
  background: rgba(217, 79, 4, 0.12);
  color: var(--accent);
}

.icon-button {
  min-width: 2.1rem;
  padding-inline: 0.5rem;
  text-align: center;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0;
  color: rgba(244, 237, 226, 0.8);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field input,
.field select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.92);
}

.list {
  display: grid;
  gap: 0.65rem;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.85rem;
}

.panel-note {
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  background: rgba(19, 34, 56, 0.06);
  color: var(--muted);
}

.asset-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.asset-card-header {
  display: flex;
  gap: 0.9rem;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.asset-card-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  flex: 1 1 240px;
}

.asset-card-copy strong,
.asset-card-filename {
  overflow-wrap: anywhere;
}

.asset-card-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.asset-card-meta {
  display: grid;
  gap: 0.35rem;
}

.asset-card-footer {
  justify-content: flex-start;
}

.asset-card .field input {
  min-width: 0;
}

.clip-editor {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.78);
}

.clip-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.clip-editor-range {
  font-size: 0.95rem;
  color: var(--ink);
}

.clip-waveform-shell {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.72);
}

.clip-waveform-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.clip-waveform-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.clip-waveform-meta .btn-group {
  flex: 0 0 auto;
}

.clip-wavesurfer {
  overflow: hidden;
  min-height: 7rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(19, 34, 56, 0.12);
  background:
    linear-gradient(180deg, rgba(19, 34, 56, 0.05), rgba(19, 34, 56, 0.02)),
    rgba(19, 34, 56, 0.03);
  overscroll-behavior: contain;
}

.clip-wavesurfer ::part(region) {
  border-inline: 2px solid rgba(217, 79, 4, 0.78);
  border-radius: 0.65rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.clip-wavesurfer ::part(region-handle-left),
.clip-wavesurfer ::part(region-handle-right) {
  width: 1.5rem;
  height: 1.8rem !important;
  top: 50% !important;
  bottom: auto !important;
  border-radius: 0.3rem;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-grip-vertical' viewBox='0 0 16 16'%3E%3Cpath d='M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0'/%3E%3C/svg%3E"),
    linear-gradient(90deg, rgba(19, 34, 56, 0.94), rgba(19, 34, 56, 0.94)),
    rgba(19, 34, 56, 0.94);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 0.82rem 0.82rem, 2px 100%, auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92), 0 0.25rem 0.65rem rgba(19, 34, 56, 0.16);
  cursor: ew-resize;
  transform: translateY(-50%);
  touch-action: none;
}

.clip-wavesurfer ::part(region-handle-right) {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-grip-vertical' viewBox='0 0 16 16'%3E%3Cpath d='M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0'/%3E%3C/svg%3E"),
    linear-gradient(90deg, rgba(217, 79, 4, 0.96), rgba(217, 79, 4, 0.96)),
    rgba(217, 79, 4, 0.96);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 0.82rem 0.82rem, 2px 100%, auto;
  touch-action: none;
}

@media (pointer: coarse) {
  .clip-wavesurfer ::part(region-handle-left),
  .clip-wavesurfer ::part(region-handle-right) {
    width: 1.8rem;
    height: 2.2rem !important;
    background-size: 0.92rem 0.92rem, 2px 100%, auto;
  }
}

.clip-zoom-scrubber {
  display: grid;
  gap: 0.35rem;
}

.clip-zoom-scrubber-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.clip-zoom-scrubber input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.clip-waveform-controls {
  display: grid;
  gap: 0.75rem;
}

.clip-waveform-control {
  display: grid;
  gap: 0.45rem;
}

.clip-waveform-control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.clip-waveform-nudges {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.clip-waveform-preview-action {
  display: flex;
  justify-content: stretch;
}

.clip-waveform-preview-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.clip-waveform-preview-button svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: currentColor;
}

.clip-editor-fields {
  align-items: stretch;
}

.clip-editor-shortcuts {
  display: flex;
  align-items: flex-end;
}

.clip-editor-shortcut {
  padding-inline: 0.75rem;
}

.clip-editor-actions {
  justify-content: space-between;
  align-items: center;
}

.action-card {
  width: 100%;
  text-align: left;
}

.action-card.active,
.action-card.is-selected {
  border-color: rgba(217, 79, 4, 0.6);
  box-shadow: 0 0 0 2px rgba(217, 79, 4, 0.12);
}

.gameday-toolbar {
  position: fixed;
  right: 1.75rem;
  bottom: 1.15rem;
  left: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(19, 34, 56, 0.16);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(19, 34, 56, 0.18);
  z-index: 20;
}

.gameday-toolbar-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.gameday-toolbar-label {
  color: rgba(19, 34, 56, 0.58);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gameday-toolbar-copy strong,
.gameday-toolbar-copy .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gameday-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .gameday-toolbar {
    left: 1rem;
    right: 1rem;
  }
}
