html {
  font-size: calc(14px * var(--mobile-font-scale, 100) / 100);
}

.navbar-non-live { background-color: #fff3d9; }
[data-bs-theme="dark"] .navbar-non-live { background-color: #3b3223; }
[data-bs-theme="dark"] {
  --bs-body-color: #fff;
  --bs-body-color-rgb: 255, 255, 255;
  --bs-body-bg: #000;
  --bs-body-bg-rgb: 0, 0, 0;
  --bs-secondary-color: #c2c8ce;
  --bs-secondary-color-rgb: 194, 200, 206;
  --bs-tertiary-color: #adb5bd;
  --bs-tertiary-color-rgb: 173, 181, 189;
  --bs-secondary-text-emphasis: #c2c8ce;
}
/* Bootstrap's text-secondary uses a fixed gray instead of its theme-aware text color. */
[data-bs-theme="dark"] .text-secondary {
  color: rgba(var(--bs-secondary-color-rgb), var(--bs-text-opacity, 1)) !important;
}
/* Brighter action outlines retain each button's semantic color in dark mode. */
[data-bs-theme="dark"] .btn { --dark-button-accent:#d1d9e2; }
[data-bs-theme="dark"] :is(.btn-primary, .btn-outline-primary) { --dark-button-accent:#93c5fd; }
[data-bs-theme="dark"] :is(.btn-success, .btn-outline-success) { --dark-button-accent:#86efac; }
[data-bs-theme="dark"] :is(.btn-danger, .btn-outline-danger) { --dark-button-accent:#fda4af; }
[data-bs-theme="dark"] :is(.btn-warning, .btn-outline-warning) { --dark-button-accent:#fde68a; }
[data-bs-theme="dark"] :is(.btn-info, .btn-outline-info) { --dark-button-accent:#67e8f9; }
[data-bs-theme="dark"] .btn[class*="btn-outline-"] {
  --bs-btn-color:var(--dark-button-accent);
  --bs-btn-border-color:var(--dark-button-accent);
  --bs-btn-hover-color:#111827;
  --bs-btn-hover-bg:var(--dark-button-accent);
  --bs-btn-hover-border-color:var(--dark-button-accent);
  --bs-btn-active-color:#111827;
  --bs-btn-active-bg:var(--dark-button-accent);
  --bs-btn-active-border-color:var(--dark-button-accent);
  --bs-btn-disabled-color:var(--dark-button-accent);
  --bs-btn-disabled-border-color:var(--dark-button-accent);
}
[data-bs-theme="dark"] :is(.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-dark) {
  --bs-btn-color:#fff;
  --bs-btn-hover-color:#fff;
  --bs-btn-active-color:#fff;
}
[data-bs-theme="dark"] :is(.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-light, .btn-dark) {
  --bs-btn-border-color:var(--dark-button-accent);
  --bs-btn-hover-border-color:var(--dark-button-accent);
  --bs-btn-active-border-color:var(--dark-button-accent);
}
.admin-review-badge { margin-right: .1rem !important; }
.profile-history-record p { margin-bottom: .25rem; }
.profile-history-record p:last-child { margin-bottom: 0; }

.workspace-list {
  max-height: 65vh;
  overflow-y: auto;
}

@media (max-width: 991.98px) {
  .workspace-list {
    max-height: var(--entity-list-height, 17.5rem);
  }
}

.record-file-thumbnail { padding: 0; border: 0; background: transparent; cursor: zoom-in; max-width: 100%; }
.file-viewer { width: min(76rem, calc(100vw - 1rem)); height: calc(100vh - 2rem); height: calc(100dvh - 2rem); max-width: none; max-height: none; padding: 0; border: 1px solid #adb5bd; border-radius: .5rem; }
.file-viewer[open] { display: flex; flex-direction: column; }
.file-viewer::backdrop { background: rgba(15, 23, 42, .7); }
.file-viewer-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: 1rem; border-bottom: 1px solid #dee2e6; }
.file-viewer-header h2 { min-width: 0; flex: 1 1 15rem; }
.file-viewer-status { padding: .5rem 1rem; }
.file-viewer-status:empty { display: none; }
.file-viewer-content { flex: 1; min-height: 0; min-width: 0; overflow: auto; padding: 1rem; overscroll-behavior: contain; }
.file-viewer-image { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; margin: auto; object-fit: contain; }
.file-viewer-content.is-actual-size .file-viewer-image { max-width: none; max-height: none; margin: 0; }
.file-viewer-canvas { display: block; border: 1px solid #dee2e6; }
.file-viewer-content.is-pdf { overflow-y: scroll; }
.file-viewer-pdf-controls { position: sticky; top: 0; background: white; padding-block: .25rem; z-index: 1; }
.file-viewer-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.file-viewer-sheet { width: max-content; max-width: none; }
.file-viewer-sheet td { min-width: 6rem; max-width: 24rem; white-space: pre-wrap; overflow-wrap: anywhere; }
html:has(dialog[open]) { overflow:hidden; overscroll-behavior:none; }
body.dialog-scroll-locked { position:fixed; top:var(--dialog-scroll-top); left:0; right:0; width:100%; }
dialog { overscroll-behavior:contain; }

.feedback-record-current > summary {
  background-color: var(--bs-gray-200, #e9ecef);
  border-radius: inherit;
}

[data-bs-theme="dark"] .feedback-record-current > summary {
  background-color: #304963;
}

.feedback-record-current[open] > summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Keep focused fields readable without iPhone Safari's small-text zoom. */
@media (max-width: 991.98px), (pointer: coarse) {
  /* Allow scrolling while preventing gestures from changing the page scale. */
  html {
    touch-action: pan-x pan-y;
  }

  input.form-control,
  textarea.form-control,
  select.form-select {
    font-size: max(16px, 1em);
  }
}

.workspace-record-data dt,
.workspace-record-data dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Keep a scrollable preview of the selected record without hiding relationships. */
.workspace-record-data.is-compact {
  height: var(--record-preview-height, 9rem);
  overflow-y: auto;
}

.workspace-data-toggle {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.workspace-data-toggle::before {
  content: "▾";
  display: inline-block;
  margin-right: .35rem;
}

.workspace-data-toggle[aria-expanded="false"]::before {
  content: "▸";
}

.workspace-data-toggle:focus-visible {
  outline: 2px solid #258cfb;
  outline-offset: 2px;
}

.relationship-card > summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  list-style: none;
}

.relationship-card > summary:focus-visible {
  outline: 2px solid #258cfb;
  outline-offset: 2px;
}

.relationship-card:not([open]) > summary {
  border-bottom: 0;
}

.relationship-card:not([open]) > summary > .feature-help-button {
  display: none;
}

.workspace-detail {
  min-height: 16rem;
}

.record-label-compact { display:none; }
.upload-help-mobile { display:none; }
@media (max-width:767px), (pointer:coarse) {
  .upload-help-mobile { display:inline; }
  .upload-help-desktop { display:none; }
}
@media (max-width: 767px) {
  .record-detail-fields {
    display:grid;
    grid-template-columns:minmax(0, 30%) minmax(0, 1fr);
    gap:.25rem .65rem;
  }
  .record-detail-fields > dt,
  .record-detail-fields > dd {
    width:auto;
    min-width:0;
    margin:0;
    overflow-wrap:anywhere;
  }
  .record-detail-fields > dt { font-weight:700 !important; }
  .record-detail-fields .record-label-full { display:none; }
  .record-detail-fields .record-label-compact { display:inline; }
}

@media (min-width: 768px) {
  html {
    font-size: calc(16px * var(--desktop-font-scale, 100) / 100);
  }
}

header .navbar a.nav-link[aria-current="page"] {
    position:relative;
    text-decoration:none;
}
header .navbar a.nav-link[aria-current="page"]::after {
    content:"";
    position:absolute;
    left:var(--bs-navbar-nav-link-padding-x, .5rem);
    right:var(--bs-navbar-nav-link-padding-x, .5rem);
    bottom:.1rem;
    height:3px;
    border-radius:2px;
    background:currentColor;
    pointer-events:none;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* A wrapping mobile footer needs its own space below the page content. */
@media (max-width: 991.98px) {
  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    margin-bottom: 0;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
.search-hero {
  max-width: 58rem;
}

.home-brand-mark {
  width: 133px;
  height: auto;
}

@media (min-width: 768px) {
  .home-brand-mark {
    width: 152px;
  }
}

.landing-brand-mark {
  width: clamp(9rem, 22vw, 14rem);
  height: auto;
  filter: drop-shadow(0 .75rem 1.5rem rgba(15, 23, 42, .16));
}

#organization-panel {
  max-width: 32rem;
}

.search-message {
  background: var(--bs-tertiary-bg);
}

.relationship-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.relationship-item-list {
  min-height: 6rem;
  max-height: 70vh;
  overflow: auto;

}

.relationship-search::-webkit-search-cancel-button {
  cursor: pointer;
}

.note-body,
.reminder-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#natural-search-query::placeholder {
  color: var(--bs-secondary-color);
  font-size: 1rem;
  opacity: .75;
}
.search-query-field { position:relative; flex:1 1 auto; width:1%; min-width:0; }
.search-query-field > .form-control { width:100%; padding:.5rem 44px .5rem 1rem; font-size:1.25rem; border-radius:var(--bs-border-radius-lg) 0 0 var(--bs-border-radius-lg); }
#natural-search-query::-webkit-search-cancel-button { -webkit-appearance:none; }
.search-query-clear { position:absolute; right:0; top:0; bottom:0; width:44px; border:0; background:transparent; color:var(--bs-secondary-color); font-size:1.5rem; padding:0; z-index:5; }
.search-query-clear:focus-visible { outline:2px solid var(--bs-primary); outline-offset:-4px; border-radius:.5rem; }
.search-query-field:has(input:placeholder-shown) .search-query-clear,
.search-query-field:has(input:disabled) .search-query-clear { display:none; }

.search-result-card {
  border-color: var(--bs-border-color-translucent);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.search-result-card:hover {
  transform: translateY(-1px);
}

@media (max-width: 575.98px) {
  .search-hero-heading {
    flex-wrap: wrap;
  }

  .search-hero-heading > div {
    flex: 1 1 12rem;
    min-width: 0;
  }

  .search-results-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .search-results-actions #results-summary {
    width: 100%;
    text-align: right;
  }

  .search-hero .input-group {
    display: flex;
  }

  .search-hero .search-query-field {
    width:100%;
  }
  .search-hero .search-query-field > .form-control {
    width: 100%;
    border-radius: var(--bs-border-radius-lg) !important;
  }

  .search-hero .input-group > .btn {
    width: 100%;
    margin-top: .75rem;
    border-radius: var(--bs-border-radius-lg) !important;
  }
}
.search-dialog { width: min(42rem, calc(100% - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; }
.search-dialog-wide { width: min(72rem, calc(100% - 2rem)); }
.search-dialog::backdrop { background: rgba(15, 23, 42, .55); }
#unexpected-results-list { max-height: 14rem; overflow: auto; }
#contact-industry-options[hidden] { display: none; }
.issue-json { max-height: 14rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.record-file-preview {
    display: block;
    max-width: 100%;
    width: auto;
    max-height: 10rem;
    object-fit: contain;
}
.record-file-preview.record-file-icon-tile {
    width:3.5rem;
    height:3.5rem;
    border-radius:.65rem;
    object-fit:cover;
}
.file-viewer-video { display:block; width:100%; max-height:75dvh; background:#000; }
.record-file-heading { display:flex; align-items:center; gap:1rem; }
.record-file-heading .record-file-thumbnail { position:relative; flex:0 0 3.5rem; width:3.5rem; height:3.5rem; overflow:hidden; border-radius:.65rem; }
.record-file-heading .record-file-thumbnail > * { position:absolute; inset:0; }
.record-file-generic-icon { display:flex; width:3.5rem; height:3.5rem; border-radius:.65rem; align-items:center; justify-content:center; background:#556b86; color:#fff; }
.record-file-generic-icon svg { width:1.75rem; height:1.75rem; }
.record-file-missing-image, .record-missing-image-icon { background:#6c757d; color:#fff; }
.record-missing-image-icon { display:flex; width:100%; height:100%; align-items:center; justify-content:center; }
.record-missing-image-icon svg { width:2rem; height:2rem; }
.record-file-heading [hidden] { display:none !important; }
.record-file-icon-choice { display:flex; align-items:center; gap:.5rem; margin-top:.75rem; }
.record-file-icon-choice .form-check-input { float:none; margin:0; flex-shrink:0; }
.record-file-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin-top:.75rem; }
.record-file-actions > .btn { margin:0 !important; }

/* Calendar home and the shared Directory dialog. */
.calendar-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap: .4rem; }
.calendar-days:not(.is-agenda), .public-profile-content { position:relative; isolation:isolate; }
:is(.profile-home-content, .public-directory-content) { flex:1; min-height:0; }
:is(.profile-home-content, .public-directory-content)::before { background-position:center; background-size:contain; }
body:has(:is(.profile-home-content, .public-directory-content)) { display:flex; flex-direction:column; min-height:100vh; min-height:100dvh; margin-bottom:0; }
body:has(:is(.profile-home-content, .public-directory-content)) > .container { flex:1; display:flex; flex-direction:column; }
body:has(:is(.profile-home-content, .public-directory-content)) main { flex:1; display:flex; flex-direction:column; }
body:has(:is(.profile-home-content, .public-directory-content)) .footer { position:static; margin-top:auto; }
:is(.profile-home-content, .public-directory-content) .card { background-color:transparent; }
.calendar-days:not(.is-agenda)::before, .public-profile-content::before {
    content:"";
    position:fixed;
    inset:5%;
    z-index:-1;
    background:url("../images/touring-musicians-mark.png") center / contain no-repeat;
    opacity:.08;
    pointer-events:none;
}
.calendar-days:not(.is-agenda) .calendar-day { background:transparent; }
.calendar-weekday { text-align:center; font-weight:600; padding:.4rem; }
.calendar-day { border:1px solid #d7dce2; border-radius:.5rem; min-width:0; background:var(--bs-body-bg); }
.calendar-day-header { display:flex; align-items:center; justify-content:space-between; gap:.15rem; border-bottom:1px solid #e9ecef; }
.calendar-date { font-size:.9rem; margin:0; padding:.5rem; min-width:0; }
.calendar-day-button { display:none; }
.calendar-event-stack { display:inline-block; flex:none; width:.62rem; height:.5rem; position:relative; margin-inline-start:.3rem; }
.calendar-event-stack::before, .calendar-event-stack::after { content:""; position:absolute; inset:0; border:1px solid currentColor; border-radius:2px; }
.calendar-event-stack::before { inset:.12rem -.12rem -.12rem .12rem; }
.calendar-event-stack::after { background:var(--bs-body-bg); }
.calendar-day-dialog { width:min(32rem,96vw); max-height:90dvh; padding:0; border:1px solid var(--bs-border-color); border-radius:.6rem; }
.calendar-day-dialog::backdrop { background:rgba(0,0,0,.5); }
.calendar-day-list { display:flex; flex-direction:column; gap:.6rem; padding:1rem; }
.calendar-options-toggle { display: list-item; list-style-position: inside; cursor: pointer; }
.calendar-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem 1.5rem; margin-bottom:1rem; }
.calendar-heading-row { flex:1 1 32rem; min-width:0; }
.calendar-toolbar > #calendar-options { flex:2 1 42rem; min-width:0; }
.calendar-options-toggle:focus-visible { outline: 2px solid #258cfb; outline-offset: 2px; }
#calendar-options[open] > summary { border-bottom: 1px solid var(--bs-border-color, #dee2e6); }
.calendar-options-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 11rem) auto minmax(0, 8rem); grid-template-areas: "org month navigation view"; gap: .5rem; align-items: center; padding: .5rem; }
.calendar-options-controls > div { min-width: 0; }
.calendar-options-org { grid-area: org; }
.calendar-options-month { grid-area: month; }
.calendar-options-navigation { grid-area: navigation; }
.calendar-options-view { grid-area: view; }
#calendar-desktop-legend { grid-column: 1 / -1; }
#calendar-desktop-legend:empty { display: none; }
#calendar-legend-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
#calendar-legend { margin-left: auto; text-align: right; }
#calendar-desktop-legend #calendar-legend > div { justify-content: flex-end; }
#calendar-month { min-width: 0; width: 100%; }
@media (min-width: 768px) and (pointer: fine), (min-width: 768px) and (min-height: 768px) {
    body > .container:has(#calendar-root) { max-width: none; }
    .calendar-grid-area { width:100%; min-width:0; }
    .calendar-grid-area .calendar-days:not(.is-agenda) {
        margin-inline:auto;
        width:var(--calendar-grid-width,100%);
        height:var(--calendar-grid-height,auto);
        grid-template-rows:2rem repeat(var(--calendar-weeks,5),minmax(0,1fr));
    }
    .calendar-grid-area .calendar-days:not(.is-agenda) .calendar-weekday { height:2rem; }
    .calendar-grid-area .calendar-days:not(.is-agenda) .calendar-day {
        display:flex; flex-direction:column; min-height:0; overflow:hidden; aspect-ratio:auto;
    }
    .calendar-grid-area .calendar-days:not(.is-agenda) .calendar-day-header { flex-shrink:0; }
    .calendar-days:not(.is-agenda) .calendar-date { display:none; }
    .calendar-day-button {
        display:flex; align-items:center; justify-content:center; border:0; border-radius:.25rem;
        width:100%; padding:0; background:transparent; color:var(--bs-body-color); font-size:.9rem; line-height:1.5;
    }
    .calendar-day.is-today .calendar-day-button { color:var(--bs-primary); font-weight:700; }
    .calendar-day-button:hover { background:var(--bs-secondary-bg); }
    .calendar-day-button:focus-visible { outline:2px solid var(--bs-primary); outline-offset:-2px; }
    .calendar-grid-area .calendar-days:not(.is-agenda) .calendar-day-events {
        flex:1; height:auto; min-height:0; overscroll-behavior:contain;
    }
    #calendar-options { border: 0; border-radius: 0; background: transparent; }
    .calendar-options-controls { padding: 0; }
    #calendar-options > summary { display: none; }
}
@media (max-width: 767px), (pointer: coarse) and (max-height: 767px) {
    .calendar-toolbar > #calendar-options { flex-basis:100%; }
    .calendar-options-controls { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "org org" "month view" "navigation navigation"; gap: .375rem; }
    .calendar-options-controls .form-control, .calendar-options-controls .form-select { padding-left: .5rem; min-height: 44px; }
    .calendar-options-navigation .btn { min-height: 44px; }
}
.calendar-day.is-today { border:2px solid var(--bs-primary); }
.calendar-day.is-today .calendar-date { color:var(--bs-primary); font-weight:700; }
.calendar-day-events { height:10rem; overflow-y:auto; overflow-x:hidden; padding:.3rem; display:flex; flex-direction:column; gap:.35rem; }
.calendar-event { display:flex; flex-direction:column; text-align:left; flex:none; min-width:0; width:100%; border:1px solid; border-left-width:3px; border-radius:.3rem; padding:.4rem; color:#172c45; overflow-wrap:anywhere; font-size:12px; }
.calendar-event .small { font-size:inherit; }
@media (hover: hover) and (pointer: fine) {
    .calendar-days:not(.is-agenda) .calendar-day-events {
        scrollbar-width:none;
    }
    .calendar-days:not(.is-agenda) .calendar-day.show-scrollbar .calendar-day-events,
    .calendar-days:not(.is-agenda) .calendar-day:has(:focus-visible) .calendar-day-events {
        scrollbar-width:auto;
        scrollbar-color:var(--bs-secondary-color) var(--bs-secondary-bg);
    }
}
.calendar-empty-add { background:transparent; border:1px dashed #b9c1ca; border-radius:.3rem; padding:.4rem; color:#365d88; flex:none; }
.calendar-day-add { flex:none; width:100%; padding:.4rem; min-height:2rem; border:1px dashed #b9c1ca; border-radius:.3rem; background:transparent; color:#365d88; font-size:.8rem; line-height:1.2; }
.calendar-day-add:hover,.calendar-day-add:focus-visible { background:#dbeaff; }
.calendar-empty-add { flex:1; border-color:transparent; color:transparent; min-height:3rem; }
.calendar-empty-add:hover,.calendar-empty-add:focus-visible { color:#365d88; border-color:#b9c1ca; background:#f5f8fc; }
.calendar-days.is-agenda { grid-template-columns:1fr; }
.is-agenda .calendar-day-events { height:auto; max-height:26rem; min-height:3rem; }
.is-agenda .calendar-empty-add { min-height:3rem; }
.calendar-detail-dialog {
    inset:0;
    width:100vw;
    max-width:none;
    height:100vh;
    height:100dvh;
    max-height:none;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
}
.calendar-detail-dialog::backdrop { background:rgba(0,0,0,.5); }
.calendar-detail-dialog[open], .calendar-day-dialog[open] { display:flex; flex-direction:column; overflow:hidden; }
.calendar-detail-dialog > [data-embedded], .calendar-day-dialog > .calendar-day-list {
    min-height:0; overflow-y:auto; overscroll-behavior:contain; position:relative; isolation:isolate;
}
.calendar-detail-dialog > .calendar-dialog-header,
.calendar-day-dialog > .calendar-dialog-header { flex-shrink:0; }
.calendar-dialog-header { position:sticky; top:0; z-index:2; padding:1rem; padding-right:calc(44px + 1.5rem); min-height:calc(44px + 1rem); background:var(--bs-body-bg); border-bottom:1px solid #ddd; }
.calendar-dialog-header h2 { min-width:0; overflow-wrap:anywhere; }
.calendar-dialog-close { position:absolute; top:.5rem; right:.5rem; width:44px; height:44px; box-sizing:border-box; padding:0; background-size:1rem; }
:is(#calendar-directory, #search-directory) { padding:1rem; }
:is(#calendar-directory, #search-directory) #workspace-root > header,
:is(#calendar-directory, #search-directory) #workspace-root > .workspace-filters,
:is(#calendar-directory, #search-directory) section[aria-labelledby="workspace-list-heading"] { display:none !important; }
:is(#calendar-directory, #search-directory) section[aria-labelledby="workspace-detail-heading"] { width:100%; }
@media (max-width: 767px), (pointer: coarse) and (max-height: 767px) {
    .calendar-days:not(.is-agenda) { gap:.5rem 0; }
    .calendar-days:not(.is-agenda) .calendar-day { border:0; background:transparent; }
    .calendar-days:not(.is-agenda) .calendar-day-header { justify-content:center; border:0; }
    .calendar-days:not(.is-agenda) .calendar-date,
    .calendar-days:not(.is-agenda) .calendar-day-events { display:none; }
    .calendar-day-button { display:flex; align-items:center; justify-content:center; width:min(44px,100%); aspect-ratio:1; padding:0; border:3px solid transparent; border-radius:50%; background:transparent; color:var(--bs-body-color); font-size:1rem; }
    .calendar-day-button.has-events {
        background: var(--calendar-artist-light, hsl(var(--calendar-artist-hue, 212) 80% 95%));
        color: var(--calendar-artist-light-text, #172c45);
    }
    [data-bs-theme="dark"] .calendar-day-button.has-events {
        background: var(--calendar-artist-dark, hsl(var(--calendar-artist-hue, 212) 38% 29%));
        color: var(--calendar-artist-dark-text, #f1f4fa);
    }
    .calendar-day-button[aria-current="date"] { border-color:#b24900; font-weight:700; }
    .calendar-day-button:focus-visible { outline:2px solid var(--bs-body-color); outline-offset:2px; }
    .calendar-weekday { font-size:.75rem; padding:.2rem; }
    .calendar-day-add { font-size:.7rem; padding:.2rem; }
    .calendar-dialog-header { flex-wrap:wrap; }
    :is(#calendar-directory, #search-directory) { padding:.5rem; }
}

:is(#calendar-directory, #search-directory) #workspace-root > .row { margin:0; }
:is(#calendar-directory, #search-directory) section[aria-labelledby="workspace-detail-heading"] { padding:0; min-width:0; }

@media(max-width:575.98px) {
    .navbar-collapse .navbar-nav { align-items:flex-end; text-align:right; }
    .navbar-collapse .nav-item { text-align:right; }
    .navbar-collapse .nav-link { font-size:1.2rem; min-height:44px; padding-top:.6rem; padding-bottom:.6rem; }
    .navbar-collapse .nav-item.d-flex { justify-content:flex-end; }
    .navbar-collapse .navbar-nav > .nav-item > form { display:flex; justify-content:flex-end; }
}
/* Keep unselected checkbox and radio outlines visible in both themes. */
.form-check-input:not(:checked):not(:indeterminate):not(:focus) {
    border-color: var(--bs-secondary-color);
}
.display-more { position: relative; flex-shrink: 0; }
.display-more > summary { cursor: pointer; padding: .5rem; list-style: none; }
.display-more > summary::-webkit-details-marker { display: none; }
.display-more-panel { position: absolute; right: 0; top: 100%; z-index: 1030; width: max-content; max-width: calc(100vw - 2rem); box-shadow: 0 .5rem 1rem #0002; }
.display-more-panel [role="group"] { flex-wrap: wrap; }
.display-more-panel button { min-height: 44px; min-width: 44px; }
#text-size-value { min-width: 3ch; text-align: center; }
@media(max-width:575.98px) {
    .display-more > summary { display:flex; align-items:center; justify-content:flex-end; min-height:44px; }
    .display-more-panel { display: block; position: static; width: 100%; margin-top: .5rem; box-shadow: none; }
}
/* Search assist stays anchored below the query without moving the results. */
.search-assist-control { position: relative; }
.search-assist-panel { position: absolute; top: 100%; left: 0; right: 0; z-index: 1050; max-height: 22rem; overflow-y: auto; }
.search-assist-option { cursor: pointer; display: flex; justify-content: space-between; }
.search-assist-option:hover, .search-assist-option[aria-selected="true"] { background: var(--bs-primary); color: white; }
.search-assist-option:hover small, .search-assist-option[aria-selected="true"] small { color: white !important; }
.log-error-highlight { background:#664d03; color:#fff3cd; padding:0; }
.log-error-highlight.is-current-error { background:#842029; color:#fff; outline:2px solid #ffca2c; }

[data-bs-theme="dark"] .calendar-day,
[data-bs-theme="dark"] .calendar-day-header { border-color:var(--bs-border-color); }
[data-bs-theme="dark"] .calendar-day.is-today { border-color:var(--bs-primary); }
[data-bs-theme="dark"] .calendar-day-add:hover,
[data-bs-theme="dark"] .calendar-day-add:focus-visible,
[data-bs-theme="dark"] .calendar-empty-add:hover,
[data-bs-theme="dark"] .calendar-empty-add:focus-visible { background:#304963; color:#e2edff; }
[data-bs-theme="dark"] .calendar-day-add { color:#a9caff; }
.calendar-day-dialog { color:#172c45; border-color:#b8d1f0; }
.calendar-day-dialog > .calendar-dialog-header { flex-wrap:nowrap; padding-right:calc(44px + .75rem); background:inherit; border-color:#b8d1f0; }
.calendar-day-dialog .calendar-dialog-close { right:.75rem; }
.calendar-day-dialog #calendar-day-icon { display:inline-flex; }
.calendar-day-dialog #calendar-day-title { flex:1 1 0; min-width:0; font-size:1.125rem; }
.calendar-day-dialog .calendar-day-list { background:inherit; }
.calendar-day-dialog .calendar-event { gap:.7rem; padding:.8rem; border:1px solid; border-left-width:4px; border-radius:.6rem; box-shadow:0 .2rem .55rem rgba(25,65,120,.1); font-size:1rem; }
.calendar-day-dialog .calendar-event-heading { display:block; min-width:0; }
.calendar-day-dialog .calendar-event-name { font-size:1.2rem; line-height:1.3; }
.calendar-day-dialog .calendar-event-facts { display:grid; gap:.35rem; padding-top:.55rem; border-top:1px solid #b8d1f0; }
.calendar-day-dialog .calendar-event-fact { display:grid; grid-template-columns:3.4rem minmax(0,1fr); gap:.25rem; align-items:baseline; }
.calendar-day-dialog .calendar-event-fact-time { grid-template-columns:3.4rem minmax(0,1fr) auto; align-items:center; }
.calendar-day-dialog .calendar-event-fact-label { color:#476888; font-size:.8rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.calendar-day-dialog .calendar-event-fact-value { font-size:1rem; font-weight:500; }
.calendar-day-dialog .calendar-event-status { display:inline-flex; align-items:center; justify-self:end; gap:.3rem; flex:none; padding:.12rem .5rem; border:1px solid currentColor; border-radius:999px; font-size:.8rem; font-weight:700; line-height:1.3; }
.calendar-day-dialog .calendar-event-status-confirmed,
.calendar-day-dialog .calendar-event-status-completed { color:#146c43; }
.calendar-day-dialog .calendar-event-status-cancelled { color:#a52834; }
.calendar-day-dialog .calendar-event-status-tentative { color:#815400; }
[data-bs-theme="dark"] .calendar-day-dialog { background:#20354d; color:#e2edff; border-color:#527aaa; }
[data-bs-theme="dark"] .calendar-day-dialog > .calendar-dialog-header { border-color:#527aaa; }
[data-bs-theme="dark"] .calendar-day-dialog .calendar-event
{ background:#304963; color:#e2edff; border-color:#527aaa; }
[data-bs-theme="dark"] .calendar-day-dialog .calendar-event-facts { border-color:#527aaa; }
[data-bs-theme="dark"] .calendar-day-dialog .calendar-event-fact-label { color:#b5d2ef; }
[data-bs-theme="dark"] .calendar-day-dialog .calendar-event-status-confirmed,
[data-bs-theme="dark"] .calendar-day-dialog .calendar-event-status-completed { color:#88d6ac; }
[data-bs-theme="dark"] .calendar-day-dialog .calendar-event-status-cancelled { color:#ffb5bd; }
[data-bs-theme="dark"] .calendar-day-dialog .calendar-event-status-tentative { color:#ffd37a; }
[data-bs-theme="dark"] .calendar-day-dialog .calendar-day-list > .btn { color:#a9caff; border-color:#a9caff; }
.calendar-event, .calendar-day-dialog .calendar-event {
    position: relative;
    padding-inline-end: 1rem;
    background: var(--calendar-artist-light, hsl(var(--calendar-artist-hue, 212) 80% 95%));
    color: var(--calendar-artist-light-text, #172c45);
    border-color: hsl(var(--calendar-artist-hue, 212) 40% 71%);
    border-left-color: hsl(var(--calendar-artist-hue, 212) 50% 48%);
}
.calendar-event:not([data-calendar-preview]):is(:hover, :focus-visible) {
    background: var(--calendar-artist-light, hsl(var(--calendar-artist-hue, 212) 80% 90%));
}
[data-bs-theme="dark"] .calendar-event:not([data-calendar-preview="light"]),
.calendar-event[data-calendar-preview="dark"] {
    background: var(--calendar-artist-dark, hsl(var(--calendar-artist-hue, 212) 38% 29%));
    border-color: hsl(var(--calendar-artist-hue, 212) 32% 47%);
    color: var(--calendar-artist-dark-text, #f1f4fa);
}
[data-bs-theme="dark"] .calendar-event:not([data-calendar-preview]):is(:hover, :focus-visible) {
    background: var(--calendar-artist-dark, hsl(var(--calendar-artist-hue, 212) 38% 34%));
}
.calendar-day-dialog .calendar-event .calendar-event-fact-label,
[data-bs-theme="dark"] .calendar-day-dialog .calendar-event .calendar-event-fact-label { color: inherit; }
.calendar-event::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: .8rem;
    height: .8rem;
    border-top-right-radius: inherit;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    background: var(--calendar-status-color, #6c757d);
    pointer-events: none;
}
.calendar-legend-artist.calendar-event { width: auto; padding: .2rem .45rem; }
.calendar-legend-all { --calendar-artist-light: #e2e8f0; --calendar-artist-dark: #465569; }
#calendar-legend-artists > button { font-size: 12px; }
.calendar-legend-artist::after { display: none; }
button.calendar-legend-artist[aria-pressed="true"] { outline: 2px solid var(--bs-primary); outline-offset: 1px; }
.calendar-legend-status { display: inline-flex; align-items: center; gap: .25rem; }
.calendar-legend-status::before {
    content: "";
    width: .7rem;
    height: .7rem;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    background: var(--calendar-status-color);
}
.calendar-event-tentative { --calendar-status-color: #db8400; }
.calendar-event-confirmed { --calendar-status-color: #198754; }
.calendar-event-cancelled { --calendar-status-color: #dc3545; }
.calendar-event-completed { --calendar-status-color: #6f42c1; }
[data-bs-theme="dark"] .calendar-event-tentative { --calendar-status-color: #ffc65c; }
[data-bs-theme="dark"] .calendar-event-confirmed:not([data-calendar-preview="light"]),
.calendar-event-confirmed[data-calendar-preview="dark"] { --calendar-status-color: #70d4a2; }
[data-bs-theme="dark"] .calendar-event-cancelled { --calendar-status-color: #ff8290; }
[data-bs-theme="dark"] .calendar-event-completed { --calendar-status-color: #c3a1ff; }

[data-bs-theme="dark"] .calendar-day-button[aria-current="date"] { border-color:#ffb36b; }
[data-bs-theme="dark"] .calendar-days:not(.is-agenda)::before,
[data-bs-theme="dark"] .public-profile-content::before {
    opacity:.14;
}
@media (max-width: 767px), (pointer: coarse) and (max-height: 767px) {
    .calendar-days:not(.is-agenda)::before, .public-profile-content::before { opacity:.12; }
    [data-bs-theme="dark"] .calendar-days:not(.is-agenda)::before,
    [data-bs-theme="dark"] .public-profile-content::before { opacity:.2; }
}
[data-bs-theme="dark"] .calendar-days:not(.is-agenda)::before,
[data-bs-theme="dark"] .public-profile-content::before,
[data-bs-theme="dark"] .search-hero-heading .home-brand-mark {
    filter:drop-shadow(0 0 2px rgba(190, 235, 255, .9)) drop-shadow(0 0 8px rgba(110, 210, 255, .65));
}
.event-summary { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; }
.event-detail-toolbar { display:flex; flex:none; align-items:flex-start; gap:.5rem; }
.event-detail-header > h3 { min-width:0; flex:1; }
.event-detail-header .workspace-data-toggle { max-width:100%; overflow-wrap:anywhere; }
.event-summary-date { font-weight:700; font-size:1.15rem; margin-bottom:.25rem; }
.event-confirmation { display:inline-flex; flex:0 0 2.25rem; width:2.25rem; height:2.25rem; align-items:center; justify-content:center; border:0; border-radius:.25rem; font-size:1.5rem; font-weight:800; line-height:1; cursor:pointer; }
.event-confirmation.is-confirmed, .event-confirmation.is-completed { background:#218838; color:#fff; }
.event-confirmation.is-tentative { background:#e07a00; color:#fff; }
.event-confirmation.is-cancelled { background:#dc3545; color:#fff; }
.event-confirmation.is-archived { background:#6c757d; color:#fff; }
.event-confirmation:focus-visible { outline:2px solid var(--bs-primary); outline-offset:2px; }
.event-status-control { position:relative; display:inline-flex; flex:none; }
.event-status-bubble { position:absolute; top:calc(100% + .65rem); right:0; z-index:10; min-width:7rem; max-width:min(16rem,80vw); padding:.55rem .8rem; border:1px solid var(--bs-border-color); border-radius:.65rem; background:var(--bs-body-bg); color:var(--bs-body-color); box-shadow:0 .35rem .9rem rgba(0,0,0,.22); font-size:.9rem; font-weight:600; line-height:1.3; text-align:center; white-space:nowrap; }
.event-status-bubble[hidden] { display:none; }
.event-status-bubble::before { content:""; position:absolute; top:-.45rem; right:.7rem; width:.8rem; height:.8rem; transform:rotate(45deg); border-top:1px solid var(--bs-border-color); border-left:1px solid var(--bs-border-color); background:var(--bs-body-bg); }
.event-card-menu { position:relative; flex:none; }
.event-red-flag-button { display:flex; align-items:center; justify-content:center; width:2.25rem; height:2.25rem; border:1px solid #dc3545; border-radius:.25rem; background:var(--bs-body-bg); color:#dc3545; font-size:1.25rem; line-height:1; cursor:pointer; }
.event-red-flag-button svg { width:1.35rem; height:1.35rem; fill:currentColor; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.event-red-flag-button:hover { background:var(--bs-danger-bg-subtle); }
.event-red-flag-button.has-red-flags { border-color:#dc3545; background:#dc3545; color:#fff; }
.event-red-flag-button.has-red-flags:hover { background:#bb2d3b; }
.event-red-flag-button:focus-visible { outline:2px solid var(--bs-danger); outline-offset:2px; }
.red-flag-item { user-select:text; }
.red-flag-heading { display:flex; align-items:center; gap:.6rem; }
.red-flag-edit-button { display:inline-flex; flex:none; align-items:center; justify-content:center; width:1.9rem; height:1.9rem; padding:0; border:1px solid var(--bs-danger); border-radius:.3rem; background:var(--bs-body-bg); color:var(--bs-danger); cursor:pointer; }
.red-flag-edit-button:hover { background:var(--bs-danger-bg-subtle); }
.red-flag-edit-button:focus-visible { outline:2px solid var(--bs-danger); outline-offset:2px; }
.red-flag-edit-button svg { width:1rem; height:1rem; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.red-flag-separator { margin:.5rem 0; opacity:.35; }
.event-card-menu-gear { display:flex; align-items:center; justify-content:center; width:2.25rem; height:2.25rem; border:2px solid var(--bs-primary); border-radius:.375rem; background:var(--bs-body-bg); color:var(--bs-primary); font-size:1.5rem; line-height:1; cursor:pointer; list-style:none; }
.event-card-menu-gear svg { width:1.35rem; height:1.35rem; fill:currentColor; }
.event-card-menu-gear .event-gear-hole { fill:var(--bs-body-bg); }
.event-card-menu-gear::-webkit-details-marker { display:none; }
.event-card-menu-gear:hover { background:var(--bs-primary-bg-subtle); }
.event-card-menu-gear:focus-visible { outline:2px solid var(--bs-primary); outline-offset:2px; }
.event-card-menu-items { position:absolute; top:calc(100% + .25rem); right:0; z-index:5; display:grid; min-width:10rem; gap:.25rem; padding:.4rem; border:1px solid var(--bs-border-color); border-radius:.375rem; background:var(--bs-body-bg); box-shadow:0 .3rem .8rem rgba(0,0,0,.2); }
.event-card-menu-items > button { width:100%; text-align:left; white-space:nowrap; }
.event-summary-description { margin-top:1rem; white-space:pre-wrap; }
.venue-summary { display:flex; gap:1rem; align-items:center; margin-bottom:.75rem; }
.workspace-data-toggle:disabled { color:inherit; opacity:1; cursor:default; }
.contact-summary, .record-summary-heading { display:flex; gap:1rem; align-items:center; }
.record-summary-heading { font-size:1.5rem; }
.record-summary-content { min-width:0; flex:1; overflow-wrap:anywhere; }
.record-summary-icon { display:inline-flex; flex:0 0 3.5rem; width:3.5rem; height:3.5rem; align-items:center; justify-content:center; border-radius:.65rem; color:#fff; }
.record-summary-icon svg { width:1.75rem; height:1.75rem; }
.record-summary-icon img { width:2.75rem; height:2.75rem; object-fit:contain; }
.record-summary-icon-events { background:#315db5; flex-direction:column; gap:.1rem; line-height:1; }
.record-summary-icon-events span { font-size:.75rem; font-weight:700; }
.record-summary-icon-events strong { font-size:1.6rem; }
.record-summary-icon-venues { background:#147d73; }
.record-summary-icon-contacts { background:#7653a6; }
.record-summary-icon-artists { background:#a24969; }
.record-summary-icon-artists svg { width:2.5rem; height:2.5rem; }
.record-summary-icon-tours { background:#e4c46a; }
.record-summary-icon-notes { background:#556b86; }
.record-summary-icon-notes.has-reminder { background:#c62828; }
.workspace-data-title::before { display:none; }
.record-summary-icon.has-uploaded-icon { background:transparent; overflow:hidden; }
.record-summary-icon[role="button"] { cursor:zoom-in; }
.record-summary-icon[role="button"]:focus-visible { outline:2px solid var(--bs-primary); outline-offset:2px; }
.record-summary-icon.has-uploaded-icon > :not(.record-uploaded-icon) { display:none; }
.record-summary-icon img.record-uploaded-icon { width:100%; height:100%; object-fit:cover; }
/* Contextual help remains usable above record/edit dialogs and on small screens. */
.alert-actions { display:grid; grid-template-columns:max-content minmax(0,1fr); align-items:start; gap:.75rem; }
.alert-template-panel { justify-self:end; max-width:100%; margin-top:.25rem; }
.alert-template-panel.is-expanded { width:min(32rem,100%); border:1px solid var(--bs-primary); border-radius:.375rem; }
.alert-template-toggle { width:100%; text-align:left; }
.alert-template-panel.is-expanded .alert-template-toggle { border:0; border-bottom:1px solid var(--bs-border-color); border-radius:.3rem .3rem 0 0; }
@media (max-width:575px) {
    .alert-actions { grid-template-columns:minmax(0,1fr); }
    .alert-actions > button { justify-self:start; }
    .alert-template-panel, .alert-template-panel.is-expanded { width:100%; }
}
.feature-help-dialog {
    width: min(38rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
}
.feature-help-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.feature-help-dialog p { line-height: 1.75; }
.feature-help-action {
    display: inline-block;
    padding: .08em .4em;
    border: 1px solid var(--bs-primary-border-subtle);
    border-radius: .3rem;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
    font-size: .875em;
    font-weight: 600;
    line-height: 1.25;
    vertical-align: baseline;
    white-space: nowrap;
}
.feature-help-button {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-hover-color: var(--bs-emphasis-color);
    --bs-btn-active-color: var(--bs-emphasis-color);
    border: 0;
    width: 1.25rem;
    height: 1rem;
    padding: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: -.1rem;
    border-radius: 50%;
}
[data-bs-theme="dark"] .feature-help-button {
    --bs-btn-color: #f1f5f9;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
}
/* Returning focus after help closes must not add the generic button halo. */
.feature-help-button.btn:focus,
.feature-help-button.btn:active:focus {
    box-shadow: none;
}
.feature-help-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
.feature-help-button.feature-help-pointer-focus:focus {
    outline: none;
}

.public-directory-thumbnail { position: relative; width: 80px; height: 80px; border-radius: .5rem; overflow: hidden; background: #e9f1fa; color: #24496c; }
.public-directory-thumbnail svg { width: 100%; height: 100%; padding: 16px; }
.public-directory-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.phone-actions-dialog { max-width: calc(100vw - 2rem); background: var(--bs-body-bg); color: var(--bs-body-color); }
.phone-actions-dialog::backdrop { background: rgba(15, 23, 42, .55); }

/* Opaque listing panel, with a shaded watermark behind its content. */
#directory-profile-dialog {
  width: min(92vw, 960px);
  border-radius: var(--bs-border-radius-lg);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
}
@media (max-width: 767.98px) {
  #directory-profile-dialog {
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }
}

#directory-profile-dialog .public-profile-content::before {
    background-image: linear-gradient(rgba(var(--bs-body-bg-rgb), .65), rgba(var(--bs-body-bg-rgb), .65)), url("../images/touring-musicians-mark.png");
    filter: none;
}

.contact-payment-links { margin: .85rem 0; }
@media (max-width: 767px) {
    .contact-summary { align-items: flex-start; font-size: 1.125rem; line-height: 1.65; }
    .contact-summary .record-summary-content > .fw-semibold { font-size: 1.25rem; }
    .contact-summary .record-summary-content > div + div { margin-top: .2rem; }
    .contact-payment-links .btn { font-size: 1rem; min-height: 44px; padding: .55rem .85rem; }
    .relationship-contact-card { flex-wrap: wrap; }
    .relationship-contact-card > .relationship-copy { flex-basis: calc(100% - 6rem); min-width: 0; }
    .relationship-contact-card > .contact-payment-links { order: 2; flex-basis: 100%; margin: .75rem 0 .25rem; }
}

/* Give entity details and their relationships distinct surfaces. */
.workspace-detail:has(> .entity-details-panel) {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
    gap: 1.25rem;
}
.entity-details-panel,
.entity-relationships-panel {
    flex: none;
    min-width: 0;
    padding: 1.25rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    box-shadow: 0 .3rem 1rem rgba(15, 23, 42, .12);
}
.entity-relationships-panel > .relationship-card {
    border-radius: .8rem;
    box-shadow: 0 .15rem .45rem rgba(15, 23, 42, .06);
}
.entity-relationships-panel > :last-child { margin-bottom: 0 !important; }
[data-bs-theme="dark"] .entity-details-panel,
[data-bs-theme="dark"] .entity-relationships-panel {
    background: #11161c;
    border-color: #343d48;
    box-shadow: 0 .4rem 1.25rem rgba(0, 0, 0, .45);
}
@media (max-width: 767px) {
    .entity-details-panel, .entity-relationships-panel { padding: 1rem; }
}

/* Relationship headings keep their native details keyboard behavior. */
.relationship-card > summary::-webkit-details-marker { display:none; }
.relationship-card > summary::marker { content:""; }

.event-alert-controls { display:flex; align-items:center; gap:.5rem; flex-wrap:nowrap; }
.event-alert-controls > .btn { flex:none; margin:0 !important; }
.alert-icon-action { display:inline-flex; align-items:center; justify-content:center; min-width:2.5rem; min-height:2.5rem; }
#note-form { min-width:0; overflow-wrap:anywhere; }
#note-form .row > *, #note-form .form-control, #note-form .form-select { min-width:0; max-width:100%; }
#note-form .btn-close { flex-shrink:0; }
@media (max-width:575px) {
  #note-dialog { width:calc(100% - 1rem); max-width:calc(100% - 1rem); }
  #note-form { padding:1rem !important; }
  #note-reminder-due { width:100%; appearance:none; }
}

.relationship-heading-icon { display:inline-flex; flex:0 0 1.25rem; width:1.25rem; height:1.25rem; }
.relationship-heading-icon > svg { display:block; width:100%; height:100%; }

.artist-genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr));
  gap: 0.25rem 0.75rem;
}

.listing-media-carousel [data-listing-slide] {
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: #eef0f2;
}

[data-bs-theme="dark"] .listing-media-carousel [data-listing-slide] {
  background: rgb(10, 10, 10);
}

.listing-media-carousel[data-listing-carousel-ready] [data-listing-carousel-track] {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.listing-media-carousel[data-listing-carousel-ready] [data-listing-slide] {
  display: flex;
  flex-direction: column;
  margin-bottom: 0 !important;
  padding-inline: clamp(2.75rem, 7vw, 4rem);
  min-width: 0;
  scroll-snap-align: start;
}

.listing-carousel-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: clamp(12rem, min(48dvh, 65vw), 28rem);
}

.listing-media-carousel[data-listing-carousel-ready] .listing-carousel-stage {
  flex: 1 0 auto;
}

.listing-carousel-stage [data-listing-full-image] {
  height: 100%;
  max-width: 100%;
}

.listing-carousel-photo {
  width: auto;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.listing-carousel-stage [data-listing-video] {
  width: 100%;
  height: 100%;
}

.listing-carousel-stage video {
  width: 100%;
  height: 100%;
  max-height: 100% !important;
  object-fit: contain;
}

.listing-full-media {
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #101010;
}

.listing-full-media-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.listing-full-media-item {
  display: grid;
  place-items: center;
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  height: 100%;
  scroll-snap-align: start;
}

.listing-full-media-item img,
.listing-full-media-item video {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.listing-full-media-item audio {
  width: min(32rem, calc(100% - 6rem));
}

.listing-full-media-close {
  position: absolute;
  z-index: 3;
  top: 1rem;
  right: 1rem;
}

.listing-full-media-close .btn {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
}

.listing-full-media-close-icon {
  position: relative;
  display: block;
  width: 1rem;
  height: 1rem;
}

.listing-full-media-close-icon::before,
.listing-full-media-close-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.listing-full-media-close-icon::before {
  transform: rotate(45deg);
}

.listing-full-media-close-icon::after {
  transform: rotate(-45deg);
}

.listing-media-carousel {
  position: relative;
}

.listing-carousel-arrow,
.listing-carousel-position {
  position: absolute;
  z-index: 2;
  color: white;
  background-color: rgb(20 24 30 / 68%);
}

.listing-carousel-arrow {
  top: 50%;
  display: grid;
  place-items: center;
  width: clamp(2.25rem, 6vw, 2.75rem);
  aspect-ratio: 1;
  padding: 0 0 0.125em;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 50%;
  transform: translateY(-50%);
  font-size: 1.75rem;
  line-height: 1;
}

.listing-carousel-arrow:hover,
.listing-carousel-arrow:focus-visible {
  background-color: rgb(20 24 30 / 90%);
}

.listing-carousel-arrow:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.listing-carousel-previous,
.listing-carousel-position {
  left: clamp(0.375rem, 1.5vw, 0.75rem);
}

.listing-carousel-next {
  right: clamp(0.375rem, 1.5vw, 0.75rem);
}

.listing-carousel-position {
  top: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
