/*
 * Music Coast Mobile Experience v3.0
 * Mobile-only refinement layer for the public website.
 * Loaded after the existing Music Coast UI styles so desktop behavior remains intact.
 */

:root {
  --mc-mobile-dock-height: 68px;
  --mc-mobile-dock-gap: 10px;
  --mc-mobile-page-gutter: 16px;
}

/* Keep anchor targets clear of the fixed header on every public page. */
body.mc-public :where(section, article, [id]) {
  scroll-margin-top: calc(var(--header-height, 76px) + 18px);
}

/* Shared components created by musiccoast-mobile-v3.js. */
.mc-mobile-dock,
.mc-mobile-explore-backdrop,
.mc-mobile-explore-sheet,
.mc-lightbox-mobile-close,
.mc-lightbox-swipe-hint {
  display: none;
}

@media (max-width: 900px) {
  html.mc-mobile-v3-ready body.mc-public {
    padding-bottom: calc(var(--mc-mobile-dock-height) + env(safe-area-inset-bottom) + 18px);
  }

  html.mc-mobile-v3-ready body.mc-public .site-footer {
    padding-bottom: calc(var(--space-xl, 32px) + var(--mc-mobile-dock-height) + env(safe-area-inset-bottom));
  }

  /* ------------------------------------------------------------
     Persistent mobile navigation dock
     ------------------------------------------------------------ */
  .mc-mobile-dock {
    position: fixed;
    z-index: 1650;
    left: max(var(--mc-mobile-dock-gap), env(safe-area-inset-left));
    right: max(var(--mc-mobile-dock-gap), env(safe-area-inset-right));
    bottom: max(var(--mc-mobile-dock-gap), env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    min-height: var(--mc-mobile-dock-height);
    padding: 7px;
    border: 1px solid color-mix(in srgb, var(--border-color, rgba(127,127,127,.28)) 84%, transparent);
    border-radius: 22px;
    background: color-mix(in srgb, var(--bg-card, #ffffff) 93%, transparent);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22), 0 1px 0 rgba(255,255,255,.08) inset;
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
    transform: translateY(0);
    opacity: 1;
    transition: transform 180ms ease, opacity 180ms ease, visibility 180ms ease;
  }

  .mc-mobile-dock-item {
    appearance: none;
    border: 0;
    min-width: 0;
    min-height: 54px;
    padding: 5px 2px 4px;
    border-radius: 16px;
    background: transparent;
    color: var(--text-secondary, #5d6068);
    display: grid;
    grid-template-rows: 24px auto;
    place-items: center;
    gap: 3px;
    font: inherit;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1.05;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  }

  .mc-mobile-dock-item svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mc-mobile-dock-item:hover,
  .mc-mobile-dock-item:focus-visible,
  .mc-mobile-dock-item.is-active,
  .mc-mobile-dock-item[aria-expanded="true"] {
    color: var(--text-primary, #15161a);
    background: rgba(var(--accent-rgb, 232, 168, 36), .13);
  }

  .mc-mobile-dock-item:active {
    transform: scale(.96);
  }

  .mc-mobile-dock-item:focus-visible {
    outline: 3px solid rgba(var(--accent-rgb, 232, 168, 36), .36);
    outline-offset: 1px;
  }

  /* Hide the older floating app rail; the new dock already exposes Get the App. */
  .mc-v2-mobile-appbar {
    display: none !important;
  }

  /* Leave room for the dock when the cookie/accessibility launchers are visible. */
  .mc-cookie-root .mc-cookie-fab,
  .mc-a11y-root .mc-a11y-fab {
    bottom: calc(var(--mc-mobile-dock-height) + env(safe-area-inset-bottom) + 24px) !important;
  }

  /* Overlay states should never compete with the dock. */
  html.mc-mobile-nav-open .mc-mobile-dock,
  html.mc-cookie-dialog-open .mc-mobile-dock,
  html.mc-a11y-dialog-open .mc-mobile-dock,
  html.mc-lightbox-open .mc-mobile-dock,
  html.mc-mobile-explore-open .mc-mobile-dock,
  html.mc-mobile-keyboard-open .mc-mobile-dock,
  body.modal-open .mc-mobile-dock,
  body.mc-app-modal-open .mc-mobile-dock {
    transform: translateY(calc(100% + 28px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  /* ------------------------------------------------------------
     Explore bottom sheet
     ------------------------------------------------------------ */
  .mc-mobile-explore-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1710;
    display: block;
    background: rgba(4, 5, 8, .58);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  .mc-mobile-explore-sheet {
    position: fixed;
    z-index: 1720;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    display: block;
    max-height: min(78vh, 720px);
    max-height: min(78dvh, 720px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 10px 12px calc(14px + env(safe-area-inset-bottom));
    border: 1px solid var(--border-color, rgba(127,127,127,.28));
    border-radius: 26px;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #15161a);
    box-shadow: 0 30px 80px rgba(0,0,0,.32);
    transform: translateY(calc(100% + 30px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 220ms cubic-bezier(.2,.75,.2,1), opacity 180ms ease, visibility 180ms ease;
    -webkit-overflow-scrolling: touch;
  }

  html.mc-mobile-explore-open,
  html.mc-mobile-explore-open body {
    overflow: hidden;
  }

  html.mc-mobile-explore-open .mc-mobile-explore-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  html.mc-mobile-explore-open .mc-mobile-explore-sheet {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mc-mobile-explore-handle {
    width: 42px;
    height: 5px;
    margin: 2px auto 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-secondary, #737780) 32%, transparent);
  }

  .mc-mobile-explore-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 4px 12px;
  }

  .mc-mobile-explore-head-copy {
    min-width: 0;
  }

  .mc-mobile-explore-kicker {
    display: block;
    color: var(--text-tertiary, #858994);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .1em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .mc-mobile-explore-title {
    display: block;
    margin-top: 3px;
    font-size: 1.18rem;
    line-height: 1.2;
  }

  .mc-mobile-explore-close {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border: 1px solid var(--border-color, rgba(127,127,127,.28));
    border-radius: 15px;
    background: var(--surface-2, rgba(127,127,127,.08));
    color: var(--text-primary, #15161a);
    font: inherit;
    font-size: 1.35rem;
    cursor: pointer;
  }

  .mc-mobile-explore-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .mc-mobile-explore-link {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 62px;
    padding: 10px 11px;
    border: 1px solid var(--border-color, rgba(127,127,127,.24));
    border-radius: 18px;
    background: var(--surface-2, rgba(127,127,127,.06));
    color: var(--text-primary, #15161a);
    text-decoration: none;
  }

  .mc-mobile-explore-link:hover,
  .mc-mobile-explore-link:focus-visible,
  .mc-mobile-explore-link.is-active {
    border-color: rgba(var(--accent-rgb, 232,168,36), .42);
    background: rgba(var(--accent-rgb, 232,168,36), .11);
  }

  .mc-mobile-explore-link-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: rgba(var(--accent-rgb, 232,168,36), .13);
    font-size: 1.12rem;
  }

  .mc-mobile-explore-link-copy {
    min-width: 0;
  }

  .mc-mobile-explore-link-copy strong,
  .mc-mobile-explore-link-copy span {
    display: block;
  }

  .mc-mobile-explore-link-copy strong {
    font-size: .92rem;
    line-height: 1.18;
  }

  .mc-mobile-explore-link-copy span {
    margin-top: 3px;
    color: var(--text-secondary, #686c75);
    font-size: .72rem;
    line-height: 1.2;
  }

  /* ------------------------------------------------------------
     Sitewide mobile rhythm and touch targets
     ------------------------------------------------------------ */
  body.mc-public .wrap {
    padding-left: max(var(--mc-mobile-page-gutter), env(safe-area-inset-left));
    padding-right: max(var(--mc-mobile-page-gutter), env(safe-area-inset-right));
  }

  body.mc-public .section {
    padding-top: clamp(38px, 9vw, 64px);
    padding-bottom: clamp(44px, 11vw, 76px);
  }

  body.mc-public .site-main > .section:first-child,
  body.mc-public .site-main > section.wrap.section:first-child {
    padding-top: calc(var(--header-height, 72px) + 26px) !important;
  }

  body.mc-public :where(.section-head, .policy-hero, .resource-hero, .shop-hero-panel) h1,
  body.mc-homepage :where(.hero, .mc-v23-app-hero) h1 {
    font-size: clamp(2rem, 9.5vw, 3.15rem) !important;
    line-height: 1.04 !important;
    letter-spacing: -.045em;
    text-wrap: balance;
  }

  body.mc-public :where(.section-head, .policy-hero, .resource-hero, .shop-hero-panel) h2,
  body.mc-public .article-body h2,
  body.mc-public .richtext h2 {
    font-size: clamp(1.45rem, 6.6vw, 2rem);
    line-height: 1.15;
    text-wrap: balance;
  }

  body.mc-public :where(p, li, label, input, select, textarea, button, .btn) {
    -webkit-text-size-adjust: 100%;
  }

  body.mc-public :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    min-height: 48px;
    font-size: 16px !important;
  }

  body.mc-public textarea {
    min-height: 132px;
  }

  body.mc-public :where(.btn, button, .search-link, .cart-link, .theme-toggle, .mobile-menu-btn) {
    min-height: 44px;
  }

  body.mc-public :where(.card, .article-card, .interview-card, .album-card, .resource-card, .policy-card, .product-card) {
    border-radius: 20px !important;
  }

  body.mc-public :where(.cta-row, .artist-action-row, .artist-form-actions, .resource-actions, .policy-action-row) {
    gap: 10px;
  }

  body.mc-public :where(.cta-row, .artist-action-row, .artist-form-actions, .resource-actions, .policy-action-row) > .btn,
  body.mc-public :where(.cta-row, .artist-action-row, .artist-form-actions, .resource-actions, .policy-action-row) > a.btn,
  body.mc-public :where(.cta-row, .artist-action-row, .artist-form-actions, .resource-actions, .policy-action-row) > button {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
  }

  /* Keep the top bar compact and prevent action icons from crowding the logo. */
  body.mc-public .site-header .header-inner,
  body.mc-homepage .site-header .header-inner {
    min-height: 64px;
    gap: 8px;
  }

  body.mc-public .site-header .logo-text,
  body.mc-homepage .site-header .logo-text {
    font-size: 1.17rem !important;
  }

  body.mc-public .site-header .logo-img,
  body.mc-homepage .site-header .logo-img {
    max-height: 34px;
  }

  /* ------------------------------------------------------------
     Homepage mobile order and density
     ------------------------------------------------------------ */
  body.mc-homepage .hero {
    min-height: 0 !important;
    padding-top: calc(var(--header-height, 72px) + 24px) !important;
    padding-bottom: 36px !important;
  }

  body.mc-homepage :where(.hero-card, .mc-v23-app-hero, [data-mc-v23-app-hero]) {
    min-height: 0 !important;
    border-radius: 24px !important;
  }

  body.mc-homepage :where(.hero-copy, .mc-v23-app-hero-copy) {
    padding: 20px !important;
  }

  body.mc-homepage .home-section-jumps {
    border-radius: 20px;
    padding: 12px;
  }

  body.mc-homepage .home-section-jumps .btn {
    min-height: 48px;
  }

  body.mc-homepage :where(.mc-home-cinematic-section, .mc-app-experience-v2, .about-section, .leaders-section) {
    scroll-margin-top: calc(var(--header-height, 72px) + 14px);
  }

  /* ------------------------------------------------------------
     Articles and editorial pages
     ------------------------------------------------------------ */
  body.page-article .post-head,
  body.mc-public .post-head {
    margin-bottom: 18px;
  }

  body.page-article .post-head h1,
  body.mc-public .post-head h1 {
    font-size: clamp(2rem, 9vw, 3rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -.045em;
  }

  body.page-article .mc-article-byline,
  body.mc-public .mc-article-byline {
    gap: 10px;
    align-items: center;
  }

  body.page-article .mc-team-avatar-article,
  body.mc-public .mc-team-avatar-article {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  body.page-article .mc-article-byline-details,
  body.mc-public .mc-article-byline-details {
    row-gap: 6px;
  }

  body.page-article .mc-article-author-contact,
  body.mc-public .mc-article-author-contact {
    width: 34px;
    height: 34px;
  }

  body.page-article .article-body,
  body.page-article .richtext,
  body.mc-public .article-body,
  body.mc-public .richtext {
    font-size: 1.075rem;
    line-height: 1.72;
  }

  body.page-article .article-body :where(img, video, iframe),
  body.mc-public .article-body :where(img, video, iframe) {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
  }

  body.page-article .share-bar,
  body.mc-public .share-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 7px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  body.page-article .share-bar .share-btn,
  body.mc-public .share-bar .share-btn {
    flex: 0 0 auto;
    min-width: 124px;
    scroll-snap-align: start;
  }

  /* ------------------------------------------------------------
     Directories and galleries
     ------------------------------------------------------------ */
  body.page-photos .album-grid,
  body.page-articles .article-grid,
  body.page-interviews .interview-grid,
  body.page-search :where(.article-grid, .interview-grid, .album-grid) {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  body.page-album .photo-grid,
  body.mc-public .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  body.page-album .photo-item,
  body.mc-public .photo-item {
    min-width: 0;
    border-radius: 12px !important;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--surface-2, rgba(127,127,127,.08));
  }

  body.page-album .photo-item img,
  body.mc-public .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.page-album .album-view-tabs,
  body.mc-public .album-view-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin-inline: calc(var(--mc-mobile-page-gutter) * -1);
    padding: 2px var(--mc-mobile-page-gutter) 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  body.page-album .album-view-tabs .btn,
  body.mc-public .album-view-tabs .btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  body.page-album .pagination,
  body.page-photos .pagination,
  body.page-articles .pagination,
  body.page-interviews .pagination,
  body.mc-public .pagination {
    justify-content: center;
    gap: 8px;
  }

  body.mc-public .pagination-numbers {
    display: flex;
    max-width: 100%;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 1px 6px;
    -webkit-overflow-scrolling: touch;
  }

  body.mc-public .pagination :where(.page-link, .page-current, .page-number) {
    flex: 0 0 44px;
    min-width: 44px !important;
    height: 44px !important;
  }

  /* ------------------------------------------------------------
     Resources and policy navigation
     ------------------------------------------------------------ */
  body.page-resources .resource-mobile-jump {
    top: calc(var(--header-height, 72px) + 6px) !important;
    z-index: 120;
    margin-bottom: 14px;
    padding: 10px !important;
    border-radius: 18px !important;
    box-shadow: 0 12px 34px rgba(0,0,0,.16) !important;
  }

  body.page-resources .resource-mobile-jump-head {
    display: none !important;
  }

  body.page-resources .resource-mobile-jump-track {
    padding-bottom: 2px;
  }

  body.page-resources .resource-mobile-jump-link {
    min-height: 42px;
    max-width: 72vw;
    font-size: .84rem;
  }

  body.page-resources :where(.resource-grid, .resource-quick-steps, .resource-guide-grid, .artist-stat-grid, .artist-value-grid, .artist-monetization-grid, .artist-steps-grid, .artist-royalty-grid, .artist-faq-grid) {
    grid-template-columns: 1fr !important;
  }

  body.page-resources :where(.resource-card, .artist-section-card, .commercial-card) {
    padding: 17px !important;
  }

  body.page-resources :where(.card-tag, .resource-guide-kicker, .resource-guide-mini-label) {
    letter-spacing: .07em;
  }

  body.page-policies .policy-nav-pills,
  body.mc-public .policy-nav-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(var(--mc-mobile-page-gutter) * -1);
    padding: 2px var(--mc-mobile-page-gutter) 8px;
    -webkit-overflow-scrolling: touch;
  }

  /* ------------------------------------------------------------
     Shop, cart, checkout, contact, and recovery forms
     ------------------------------------------------------------ */
  body.page-shop .product-grid,
  body.page-cart .cart-grid,
  body.page-checkout .checkout-grid,
  body.page-contact .contact-grid,
  body.page-order .order-layout,
  body.page-product .product-detail {
    grid-template-columns: 1fr !important;
  }

  body.page-product .product-gallery,
  body.page-checkout :where(.checkout-summary, .order-summary) {
    position: static !important;
    top: auto !important;
  }

  body.mc-public :where(.form-grid, .artist-form-grid, .checkout-form-grid) {
    grid-template-columns: 1fr !important;
  }

  body.mc-public :where(.form-actions, .checkout-actions, .order-actions) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.mc-public :where(.form-actions, .checkout-actions, .order-actions) .btn {
    width: 100%;
    justify-content: center;
  }

  /* ------------------------------------------------------------
     Cookie and accessibility panels as safe mobile bottom sheets
     ------------------------------------------------------------ */
  .mc-cookie-overlay,
  .mc-a11y-overlay {
    padding: 10px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)) !important;
    align-items: flex-end !important;
  }

  .mc-cookie-panel,
  .mc-a11y-panel {
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(88vh, 760px) !important;
    max-height: min(88dvh, 760px) !important;
    border-radius: 24px !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .mc-cookie-panel-header,
  .mc-a11y-panel-header {
    position: sticky;
    top: 0;
    z-index: 3;
    background: inherit;
  }

  .mc-cookie-close,
  .mc-a11y-close {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 15px !important;
  }

  .mc-cookie-actions,
  .mc-cookie-footer,
  .mc-a11y-panel-footer {
    gap: 9px !important;
  }

  .mc-cookie-actions > *,
  .mc-cookie-footer > :where(button, a),
  .mc-a11y-panel-footer > button {
    min-height: 48px !important;
  }

  /* ------------------------------------------------------------
     Photo viewer: unmistakable close controls and safe-area layout
     ------------------------------------------------------------ */
  .lightbox {
    z-index: 20000 !important;
    align-items: center !important;
    padding:
      calc(max(12px, env(safe-area-inset-top)) + 58px)
      max(10px, env(safe-area-inset-right))
      calc(max(12px, env(safe-area-inset-bottom)) + 66px)
      max(10px, env(safe-area-inset-left)) !important;
    background: rgba(4, 5, 7, .97) !important;
    overscroll-behavior: contain;
  }

  .lightbox.active {
    display: flex;
  }

  /* The existing fixed header uses a deliberately high stacking level.
     Hide competing chrome while the photo viewer is active so both close
     controls remain visible on every mobile browser. */
  html.mc-lightbox-open .site-header,
  html.mc-lightbox-open .mc-cookie-root,
  html.mc-lightbox-open .mc-a11y-root {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .lightbox-inner {
    width: 100%;
    max-width: 100% !important;
    max-height: 100%;
    gap: 10px !important;
  }

  .lightbox-img {
    width: 100% !important;
    height: min(67vh, 720px) !important;
    height: min(67dvh, 720px) !important;
    max-height: calc(100vh - 176px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 176px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 16px !important;
    background-color: transparent !important;
  }

  .lightbox-close {
    position: fixed !important;
    z-index: 20075 !important;
    top: max(12px, env(safe-area-inset-top)) !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto !important;
    min-width: 96px;
    height: 48px !important;
    padding: 0 15px !important;
    border: 1px solid rgba(255,255,255,.28) !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    color: #111318 !important;
    box-shadow: 0 14px 34px rgba(0,0,0,.35) !important;
    font-size: 0 !important;
    font-weight: 900;
    line-height: 1;
    opacity: 1 !important;
    transform: none !important;
  }

  .lightbox-close::before {
    content: "×";
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1;
  }

  .lightbox-close::after {
    content: "Close";
    font-size: .88rem;
    letter-spacing: .01em;
  }

  html[lang^="es"] .lightbox-close::after {
    content: "Cerrar";
  }

  .lightbox-close:hover,
  .lightbox-close:focus-visible {
    background: #f4f5f7 !important;
    color: #000 !important;
    outline: 3px solid rgba(var(--accent-rgb, 232,168,36), .55);
    outline-offset: 2px;
  }

  .lightbox-nav {
    position: fixed !important;
    z-index: 20060 !important;
    top: auto !important;
    bottom: max(13px, env(safe-area-inset-bottom)) !important;
    width: 52px !important;
    height: 52px !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    background: rgba(18,20,25,.86) !important;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.28);
    transform: none !important;
  }

  .lightbox-nav.prev {
    left: max(12px, env(safe-area-inset-left)) !important;
  }

  .lightbox-nav.next {
    right: max(12px, env(safe-area-inset-right)) !important;
  }

  .lightbox-meta {
    width: 100%;
    max-width: 100% !important;
    max-height: 17vh;
    max-height: 17dvh;
    overflow: auto;
    padding: 0 8px !important;
    color: rgba(255,255,255,.94) !important;
    text-align: center !important;
    -webkit-overflow-scrolling: touch;
  }

  .lightbox-caption {
    font-size: .93rem !important;
    line-height: 1.35;
  }

  .lightbox-credit {
    font-size: .78rem !important;
    line-height: 1.35;
  }

  .mc-lightbox-toolbar {
    top: 8px !important;
    z-index: 7 !important;
    max-width: calc(100vw - 28px);
  }

  .lightbox-img[data-zoom-hint]:not(.is-zoomed)::after {
    content: none !important;
  }

  .mc-lightbox-mobile-close {
    position: fixed;
    z-index: 20065;
    left: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    height: 48px;
    padding: 0 18px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 16px;
    background: rgba(18,20,25,.9);
    color: #fff;
    box-shadow: 0 12px 28px rgba(0,0,0,.28);
    font: inherit;
    font-size: .88rem;
    font-weight: 850;
    transform: translateX(-50%);
    cursor: pointer;
  }

  .mc-lightbox-mobile-close:focus-visible {
    outline: 3px solid rgba(var(--accent-rgb, 232,168,36), .62);
    outline-offset: 2px;
  }

  .mc-lightbox-swipe-hint {
    position: fixed;
    z-index: 20055;
    left: 50%;
    top: max(15px, env(safe-area-inset-top));
    display: block;
    max-width: calc(100vw - 150px);
    overflow: hidden;
    color: rgba(255,255,255,.72);
    font-size: .72rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
  }
}

@media (max-width: 360px) {
  .mc-mobile-dock {
    left: max(6px, env(safe-area-inset-left));
    right: max(6px, env(safe-area-inset-right));
    gap: 1px;
    padding-inline: 4px;
  }

  .mc-mobile-dock-item {
    font-size: .61rem;
  }

  .mc-mobile-explore-grid {
    grid-template-columns: 1fr;
  }

  body.page-album .photo-grid,
  body.mc-public .photo-grid {
    gap: 4px !important;
  }

  .lightbox-close {
    min-width: 48px;
    padding-inline: 13px !important;
  }

  .lightbox-close::after {
    content: none !important;
  }

  .mc-lightbox-swipe-hint {
    max-width: calc(100vw - 86px);
    left: max(12px, env(safe-area-inset-left));
    transform: none;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
  :root {
    --mc-mobile-dock-height: 58px;
  }

  .mc-mobile-dock {
    min-height: 58px;
    padding: 4px;
  }

  .mc-mobile-dock-item {
    min-height: 48px;
    grid-template-rows: 20px auto;
    font-size: .61rem;
  }

  .mc-mobile-dock-item svg {
    width: 19px;
    height: 19px;
  }

  .lightbox {
    padding-top: calc(max(8px, env(safe-area-inset-top)) + 48px) !important;
    padding-bottom: calc(max(8px, env(safe-area-inset-bottom)) + 48px) !important;
  }

  .lightbox-img {
    height: min(70vh, 410px) !important;
    height: min(70dvh, 410px) !important;
    max-height: calc(100vh - 112px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 112px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .lightbox-meta,
  .mc-lightbox-swipe-hint {
    display: none !important;
  }

  .lightbox-close {
    top: max(7px, env(safe-area-inset-top)) !important;
    height: 42px !important;
  }

  .lightbox-nav,
  .mc-lightbox-mobile-close {
    bottom: max(7px, env(safe-area-inset-bottom)) !important;
    height: 42px !important;
  }
}

@media (min-width: 901px) {
  /* Desktop receives only the accessibility semantics from the JavaScript;
     the established desktop visual system remains unchanged. */
  .mc-mobile-dock,
  .mc-mobile-explore-backdrop,
  .mc-mobile-explore-sheet,
  .mc-lightbox-mobile-close,
  .mc-lightbox-swipe-hint {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mc-mobile-dock,
  .mc-mobile-explore-backdrop,
  .mc-mobile-explore-sheet,
  .mc-mobile-dock-item {
    transition: none !important;
  }
}

/* Mobile footer accordions are progressively enhanced by JavaScript. */
.mc-mobile-footer-toggle {
  display: none;
}

@media (max-width: 900px) {
  .site-footer .footer-col[data-mc-mobile-footer] > h4 {
    display: none !important;
  }

  .mc-mobile-footer-toggle {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    border: 1px solid var(--border-color, rgba(127,127,127,.24));
    border-radius: 16px;
    background: var(--surface-2, rgba(127,127,127,.06));
    color: var(--text-primary, #15161a);
    font: inherit;
    font-size: .98rem;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
  }

  .site-footer .mc-mobile-footer-toggle {
    border-color: rgba(255,255,255,.11);
    background: rgba(255,255,255,.045);
    color: rgba(255,255,255,.95);
  }

  .site-footer .mc-mobile-footer-toggle:hover,
  .site-footer .mc-mobile-footer-toggle:focus-visible {
    border-color: rgba(var(--accent-rgb, 232,168,36), .46);
    background: rgba(var(--accent-rgb, 232,168,36), .1);
    color: #fff;
  }

  .mc-mobile-footer-toggle::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 10px;
    background: rgba(var(--accent-rgb, 232,168,36), .12);
    font-size: 1.1rem;
    line-height: 1;
  }

  .site-footer .footer-col[data-mc-mobile-footer] > .footer-list {
    display: none !important;
    padding: 8px 4px 2px;
  }

  .site-footer .footer-col[data-mc-mobile-footer].is-open > .footer-list {
    display: grid !important;
  }

  .site-footer .footer-col[data-mc-mobile-footer].is-open > .mc-mobile-footer-toggle::after {
    content: "−";
  }
}

@media (min-width: 901px) {
  .site-footer .footer-col[data-mc-mobile-footer] > h4 {
    display: block !important;
  }

  .site-footer .footer-col[data-mc-mobile-footer] > .footer-list {
    display: grid !important;
  }
}
