/* Veilwatch 2026-10-28: Mobile Threshold composition repair.
   The previous absolute social/foot rails drifted into the compass label
   and forced a large, unused bottom area. Preserve all actual artwork. */
@media (max-width: 760px) {
  #threshold.panel.hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    min-height: 0;
    height: auto;
    padding: 25px clamp(15px, 4.5vw, 26px) 23px;
    margin: 8px auto;
    overflow: hidden;
  }

  #threshold > .hero-copy {
    display: block;
    position: relative;
    order: 1;
    z-index: 3;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    transform: none;
  }

  #threshold .hero-copy .veil-title {
    max-width: min(88vw, 400px);
    margin: 0 0 10px;
  }

  #threshold .hero-copy .eyebrow { margin-bottom: 13px; }
  #threshold .hero-copy .overline { margin-bottom: 12px; }
  #threshold .hero-copy .lead { margin-bottom: 12px; }
  #threshold .hero-copy .intro {
    max-width: 44ch;
    margin: 0 0 22px;
    line-height: 1.54;
  }

  #threshold > .artifact {
    order: 2;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: none;
    width: min(100%, 420px);
    max-width: 420px;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    margin: 17px auto 0;
    padding: 0;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .26));
  }

  #threshold .artifact > .compass-stage {
    position: relative;
    flex: 0 0 auto;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1272 / 1237;
  }

  #threshold .artifact > .artifact-label {
    position: relative;
    z-index: 4;
    inset: auto;
    bottom: auto;
    left: auto;
    right: auto;
    display: grid;
    align-self: stretch;
    width: calc(100% - 12px);
    max-width: 400px;
    min-width: 0;
    margin: -6px auto 0;
    padding: 13px 15px 12px;
    transform: none;
  }

  #threshold .artifact-label .micro {
    line-height: 1.3;
    letter-spacing: .18em;
  }
  #threshold .artifact-label strong {
    line-height: 1.36;
    overflow-wrap: break-word;
  }

  #threshold > .veilwatch-home-bubbles {
    order: 3;
    position: relative !important;
    z-index: 5;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    display: flex;
    justify-content: center;
    align-self: center;
    transform: none !important;
    width: max-content;
    max-width: 100%;
    margin: 20px auto 0;
    padding: 0;
  }

  #threshold > .hero-foot {
    order: 4;
    position: relative !important;
    z-index: 3;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin: 22px 0 0;
    padding: 15px 1px 0;
    border-top: 1px solid rgba(221, 177, 117, .27);
  }

  #threshold .hero-foot > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  #threshold .hero-foot .visit-count {
    white-space: nowrap;
    flex: none;
  }

  /* The original SVG script layer remains behind all actionable controls. */
  #threshold > .vw-calligraphy,
  #threshold > .vw-panel-foil {
    order: -1;
    pointer-events: none;
  }
}
@media (max-width: 390px) {
  #threshold.panel.hero {
    padding: 21px 13px 20px;
  }
  #threshold > .artifact { margin-top: 12px; }
  #threshold > .veilwatch-home-bubbles { margin-top: 18px; }
  #threshold > .hero-foot { margin-top: 20px; }
  #threshold .artifact > .artifact-label {
    width: calc(100% - 6px);
  }
}
