/* Mobile-first presentation layer. The legacy readers and data renderers stay
   intact; this layer gives them one predictable touch surface on phones. */

@media (max-width: 760px) {
  :root {
    --uw-header: 144px !important;
    --mobile-gutter: 12px;
    --mobile-surface: #0b1718;
    --mobile-surface-2: #102123;
    --mobile-line: rgba(225, 214, 182, .13);
    --mobile-teal: #7be1cf;
  }

  html,
  body {
    min-width: 0 !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  body.uw-active {
    min-height: 100dvh !important;
    padding-top: var(--uw-header) !important;
    background: #071010 !important;
  }

  body.uw-active .uw-chrome {
    height: var(--uw-header) !important;
    min-height: var(--uw-header) !important;
    overflow: visible !important;
  }

  body.uw-active .uw-primary {
    height: 62px !important;
    min-height: 62px !important;
    grid-template-columns: 30px minmax(0, 1fr) 34px !important;
    gap: 4px !important;
    padding: 5px 6px !important;
    overflow: visible !important;
  }

  body.uw-active .uw-brand {
    display: grid !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 50px !important;
    padding: 0 !important;
    place-items: center !important;
    border-right: 0 !important;
    border-left: 2px solid var(--mobile-teal) !important;
    border-radius: 0 8px 8px 0 !important;
    background: rgba(123, 225, 207, .06) !important;
  }

  body.uw-active .uw-brand span {
    display: block !important;
    font-size: 0 !important;
  }

  body.uw-active .uw-brand span::before {
    content: 'b' !important;
    color: #f1e6c9 !important;
    font: 600 1.32rem/1 var(--q-display, Georgia, serif) !important;
  }

  body.uw-active .uw-brand small {
    display: none !important;
  }

  body.uw-active .uw-studios {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    padding: 3px !important;
    border: 1px solid rgba(233, 225, 202, .12) !important;
    border-radius: 10px !important;
    background: rgba(11, 24, 23, .9) !important;
  }

  body.uw-active .uw-studio,
  body.uw-active .uw-studio:nth-child(n+4) {
    display: grid !important;
    min-width: 0 !important;
    min-height: 48px !important;
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    gap: 2px !important;
    padding: 3px 0 !important;
    border-radius: 8px !important;
    text-align: center !important;
  }

  body.uw-active .uw-studio > i {
    width: 21px !important;
    height: 21px !important;
    font-size: .56rem !important;
  }

  body.uw-active .uw-studio strong {
    max-width: 48px !important;
    font-size: .47rem !important;
    line-height: 1.05 !important;
  }

  body.uw-active .uw-studio small {
    display: none !important;
  }

  body.uw-active .uw-global-actions {
    min-width: 34px !important;
    padding-left: 0 !important;
    border-left: 0 !important;
  }

  body.uw-active .uw-global-actions .uw-icon {
    width: 34px !important;
    height: 50px !important;
    border-radius: 9px !important;
  }

  body.uw-active .uw-global-actions .uw-icon:nth-child(2) {
    display: none !important;
  }

  body.uw-active .uw-contextbar {
    height: 82px !important;
    min-height: 82px !important;
    grid-template-columns: minmax(102px, 1fr) minmax(0, 1fr) 36px !important;
    grid-template-areas: "tool ref truth" "focus focus focus" !important;
    gap: 5px !important;
    padding: 6px !important;
    overflow: hidden !important;
  }

  body.uw-active .uw-tool-current,
  body.uw-active .uw-ref-form,
  body.uw-active .uw-truth-button {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 9px !important;
  }

  body.uw-active .uw-tool-current {
    grid-area: tool !important;
    padding-inline: 8px !important;
  }

  body.uw-active .uw-tool-current small,
  body.uw-active .uw-ref-form label {
    display: none !important;
  }

  body.uw-active .uw-tool-current strong {
    font-size: .72rem !important;
  }

  body.uw-active .uw-ref-form {
    grid-area: ref !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 0 9px !important;
  }

  body.uw-active .uw-ref-form button {
    display: none !important;
  }

  body.uw-active .uw-ref-form input {
    width: 100% !important;
    min-width: 0 !important;
    height: 30px !important;
    font-size: .74rem !important;
  }

  body.uw-active .uw-truth-button {
    grid-area: truth !important;
    width: 36px !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  body.uw-active .uw-truth-button > span {
    display: none !important;
  }

  body.uw-active .uw-focus-summary {
    display: grid !important;
    grid-area: focus !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    padding: 0 4px !important;
  }

  body.uw-active .uw-focus-summary > span {
    display: block !important;
    color: var(--mobile-teal) !important;
    font: 600 .45rem/1 var(--q-mono, monospace) !important;
    letter-spacing: .12em !important;
  }

  body.uw-active .uw-focus-summary strong {
    display: block !important;
    overflow: hidden !important;
    color: #f1e6c9 !important;
    font-size: .73rem !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.uw-active .uw-focus-summary small,
  body.uw-active .uw-handoff,
  body.uw-active .uw-reader-toggle {
    display: none !important;
  }

  body.uw-active .uw-tool-menu {
    top: calc(var(--uw-header) + 6px) !important;
    right: 6px !important;
    left: 6px !important;
    z-index: 20500 !important;
    width: auto !important;
    max-height: calc(100dvh - var(--uw-header) - 12px) !important;
    overflow: auto !important;
    border-color: rgba(123, 225, 207, .32) !important;
    background: rgba(9, 18, 18, .98) !important;
  }

  body.uw-active .uw-tool-menu > div button {
    min-height: 58px !important;
    padding: 10px 12px !important;
  }

  body.uw-active .uw-backdrop {
    z-index: 20400 !important;
    inset: var(--uw-header) 0 0 !important;
  }

  body.uw-active > .app {
    height: calc(100dvh - var(--uw-header)) !important;
    max-height: calc(100dvh - var(--uw-header)) !important;
    min-height: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  body.uw-active.mobile-first-ready[data-uw-bridge="reader"] .app > .viz {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    border: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  body.uw-active.mobile-first-ready:not([data-uw-bridge="reader"]) .app > .viz {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: hidden auto !important;
  }

  body.uw-active.mobile-first-ready:not([data-uw-bridge="reader"]) > .app {
    display: block !important;
    overflow: hidden auto !important;
  }

  body.uw-active.mobile-first-ready:not([data-uw-bridge="reader"]) .app > .side {
    display: none !important;
  }

  body.uw-active.mobile-first-ready[data-uw-bridge="reader"] .app > .side {
    position: static !important;
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, #0b1718, #071010) !important;
    overflow: hidden auto !important;
  }

  /* Timeline: the list is the mobile default. The canvas and research rail
     remain available behind an explicit detail action. */
  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY {
    border-radius: 0 !important;
    overflow: auto !important;
    display: block !important;
    background: #08100e !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-head {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas: "title actions" "controls controls" !important;
    gap: 9px !important;
    min-height: 94px !important;
    padding: 12px !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-title-wrap h2 {
    font-size: 1.55rem !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-sub,
  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-command-meta,
  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-reader-nav {
    display: none !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-commandbar {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-head-actions {
    gap: 4px !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-head-actions > :not(.tl-close) {
    display: none !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-ribbon {
    min-height: 67px !important;
    padding: 7px 12px !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tlr-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tlr-summary-item:nth-child(n+3) {
    display: none !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-main {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 12px 22px !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-stage-shell,
  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-sidebar-shell {
    display: none !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-stage-shell {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-stage-shell > :not(.tl-accessible-list):not(.mobile-timeline-intro) {
    display: none !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY.mobile-details-open .tl-stage-shell {
    display: grid !important;
    height: 420px !important;
    margin-top: 12px !important;
    padding: 10px !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY.mobile-details-open .tl-stage-shell > .tl-stage-meta,
  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY.mobile-details-open .tl-stage-shell > .tl-stage {
    display: block !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY.mobile-details-open .tl-stage-shell > .tl-accessible-list,
  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY.mobile-details-open .tl-stage-shell > .mobile-timeline-intro {
    display: none !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY.mobile-details-open .tl-stage-shell > .mobile-timeline-intro {
    display: grid !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-accessible-list {
    display: block !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 12px !important;
    border: 1px solid rgba(223,189,123,.16) !important;
    border-radius: 13px !important;
    background: rgba(16,25,22,.72) !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-list-items {
    position: relative !important;
    display: grid !important;
    gap: 6px !important;
    padding: 10px 0 0 19px !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-list-items::before {
    content: "" !important;
    position: absolute !important;
    top: 13px !important;
    bottom: 13px !important;
    left: 5px !important;
    width: 1px !important;
    background: linear-gradient(180deg, #dfbd7b, rgba(123,225,207,.18)) !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-list-items button {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr) !important;
    gap: 8px !important;
    min-height: 64px !important;
    width: 100% !important;
    padding: 9px 8px !important;
    border: 1px solid rgba(223,189,123,.11) !important;
    border-radius: 9px !important;
    background: rgba(7,11,10,.46) !important;
    text-align: left !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-list-items button[hidden] {
    display: none !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .mobile-timeline-intro {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 12px 0 10px !important;
    padding: 13px !important;
    border: 1px solid rgba(123,225,207,.2) !important;
    border-radius: 13px !important;
    background: linear-gradient(145deg, rgba(123,225,207,.1), rgba(223,189,123,.05)) !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .mobile-timeline-kicker {
    display: block !important;
    color: #7be1cf !important;
    font: 700 .48rem/1 var(--q-mono, monospace) !important;
    letter-spacing: .13em !important;
    text-transform: uppercase !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .mobile-timeline-intro strong {
    display: block !important;
    margin-top: 5px !important;
    color: #f1e6c9 !important;
    font: 600 1.12rem/1 var(--q-display, Georgia, serif) !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .mobile-timeline-intro p {
    margin: 5px 0 0 !important;
    color: #a9b4ae !important;
    font-size: .64rem !important;
    line-height: 1.45 !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .mobile-timeline-intro button,
  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .mobile-timeline-more {
    min-height: 42px !important;
    padding: 0 10px !important;
    border: 1px solid rgba(123,225,207,.3) !important;
    border-radius: 9px !important;
    color: #dffbf5 !important;
    background: rgba(123,225,207,.1) !important;
    font-size: .6rem !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .mobile-timeline-more {
    display: block !important;
    width: 100% !important;
    margin-top: 10px !important;
  }

  /* Dense legacy canvases should still read as a single column in all other
     studios; rails and secondary copy become detail content, not the first
     viewport. */
  body.uw-active.mobile-first-ready .app[data-active-mode]:not([data-active-mode="timeline"]) .modechrome-text,
  body.uw-active.mobile-first-ready .app[data-active-mode]:not([data-active-mode="timeline"]) .studymode-copy {
    display: none !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="motifs"] .viz,
  body.uw-active.mobile-first-ready .app[data-active-mode="motifs"] #MOTIFMODE,
  body.uw-active.mobile-first-ready .app[data-active-mode="motifs"] .motifmode-main {
    min-height: 100% !important;
    height: 100% !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="motifs"] #MOTIFMODE[aria-hidden="false"] {
    display: grid !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="motifs"] .motifmode-main {
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: auto !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="motifs"] .motif-panel,
  body.uw-active.mobile-first-ready .app[data-active-mode="motifs"] .motif-rail {
    display: none !important;
  }
}

  body.uw-active .side-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 12 !important;
    padding: 10px var(--mobile-gutter) 8px !important;
    border-bottom: 1px solid var(--mobile-line) !important;
    background: rgba(11, 23, 24, .96) !important;
    backdrop-filter: blur(18px) !important;
  }

  body.uw-active .side-headcopy {
    display: block !important;
  }

  body.uw-active .side-kicker {
    font-size: .46rem !important;
    letter-spacing: .14em !important;
  }

  body.uw-active .side-title {
    margin-top: 4px !important;
    color: #f1e6c9 !important;
    font: 600 1.12rem/1 var(--q-display, Georgia, serif) !important;
  }

  body.uw-active .side-headline {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
  }

  body.uw-active .reader-tools {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 5px !important;
    width: 100% !important;
    margin-top: 10px !important;
  }

  body.uw-active .tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.uw-active .tabs .tab,
  body.uw-active .reader-word-toggle,
  body.uw-active .reader-expert-toggle {
    min-height: 42px !important;
    padding: 0 8px !important;
    font-size: .61rem !important;
  }

  body.uw-active .reader-word-toggle {
    display: inline-flex !important;
  }

  body.uw-active .side-collapse {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
  }

  body.uw-active .side-copy,
  body.uw-active .readerpulse,
  body.uw-active .side-resizer,
  body.uw-active .side-top-resizer {
    display: none !important;
  }

  body.uw-active .focussearch {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 7px !important;
    margin-top: 9px !important;
  }

  body.uw-active .focussearch input,
  body.uw-active .sbox input {
    min-height: 42px !important;
    width: 100% !important;
    min-width: 0 !important;
    font-size: .72rem !important;
  }

  body.uw-active .focussearch button {
    min-height: 42px !important;
    padding: 0 10px !important;
    font-size: .58rem !important;
  }

  body.uw-active .pcont {
    min-height: 0 !important;
  }

  body.uw-active #tX {
    padding: 0 var(--mobile-gutter) 24px !important;
  }

  body.uw-active #tR {
    padding: 0 var(--mobile-gutter) 24px !important;
  }

  body.uw-active .rnav {
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 58px 42px 42px !important;
    gap: 5px !important;
    padding: 8px 0 !important;
    background: rgba(11, 23, 24, .96) !important;
  }

  body.uw-active .rnav select,
  body.uw-active .rnav button {
    min-width: 0 !important;
    min-height: 42px !important;
    height: 42px !important;
    font-size: .68rem !important;
  }

  body.uw-active .rnav select:nth-child(2) {
    grid-column: 2 !important;
  }

  body.uw-active .rnav select:first-child {
    grid-column: 1 !important;
  }

  body.uw-active .rbody,
  body.uw-active .rlist {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.uw-active .rlist > *,
  body.uw-active .rbody > * {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  body.uw-active .modechrome-actions button,
  body.uw-active .studymode-actions button,
  body.uw-active .modebrief-actions button,
  body.uw-active .heatmode-main button,
  body.uw-active .treemode-main button,
  body.uw-active .motifmode-main button {
    min-height: 44px !important;
  }

  body.uw-active .uw-panel,
  body.uw-active .uw-command,
  body.uw-active .uw-compare {
    z-index: 20600 !important;
  }
}

@media (min-width: 761px) and (max-width: 900px) {
  body.uw-active .uw-tool-menu {
    z-index: 20500 !important;
  }
}

/* A few legacy mobile layers intentionally use a more specific fixed Reader
   rule. Keep this final guard tied to the marker added by mobile-first.js. */
@media (max-width: 760px) {
  body.uw-active.mobile-first-ready .uw-contextbar,
  body.uw-active.mobile-first-ready[data-uw-bridge="reader"] .uw-contextbar {
    height: 82px !important;
    min-height: 82px !important;
    grid-template-columns: minmax(102px, 1fr) minmax(0, 1fr) 36px !important;
    grid-template-areas: "tool ref truth" "focus focus focus" !important;
    padding: 6px !important;
  }

  body.uw-active.mobile-first-ready[data-uw-bridge="reader"] .uw-focus-summary {
    display: grid !important;
  }

  body.uw-active.mobile-first-ready > .app > .side,
  body.uw-active.mobile-first-ready[data-uw-bridge="reader"] > .app > .side {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  /* Legacy study-open rules use an auto-height mobile grid. Once the
     reduced shell owns the viewport, every non-reader studio gets the same
     scrollable touch surface instead of collapsing to two pixels. */
  body.uw-active.mobile-first-ready.study-open:not([data-uw-bridge="reader"]) > .app {
    height: calc(100dvh - var(--uw-header)) !important;
    max-height: calc(100dvh - var(--uw-header)) !important;
    min-height: 0 !important;
  }

  body.uw-active.mobile-first-ready.analysis-open:not(.fullscreen-active) > .app[data-active-mode="afterChrist"] {
    height: calc(100dvh - var(--uw-header)) !important;
    max-height: calc(100dvh - var(--uw-header)) !important;
    min-height: 0 !important;
  }

  /* Keep the compact six-studio header usable as a real touch surface. The
     previous 30/34px side controls were visually neat but too narrow for
     reliable thumb input at phone widths. */
  body.uw-active .uw-primary {
    grid-template-columns: 38px minmax(0, 1fr) 40px !important;
  }

  body.uw-active .uw-brand {
    width: 38px !important;
    min-width: 38px !important;
  }

  body.uw-active .uw-global-actions,
  body.uw-active .uw-global-actions .uw-icon {
    min-width: 40px !important;
    width: 40px !important;
  }

  /* Legacy studios contain their own button systems. Normalize their vertical
     hit area without forcing a desktop-like multi-column layout. */
  body.uw-active.mobile-first-ready > .app > .viz button,
  body.uw-active.mobile-first-ready > .app > .viz a[role="button"],
  body.uw-active.mobile-first-ready > .app > .viz input,
  body.uw-active.mobile-first-ready > .app > .viz select,
  body.uw-active.mobile-first-ready > .app > .viz textarea {
    min-height: 42px !important;
  }

  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-shell-btn,
  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-close,
  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-stage-btn,
  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tl-drawer-close {
    min-width: 42px !important;
    min-height: 42px !important;
  }

  /* Detail views are the deliberate escape hatch from compact summaries;
     never truncate the selected timeline marker's full title there. */
  body.uw-active.mobile-first-ready .app[data-active-mode="timeline"] #TIMELINE_OVERLAY .tli-head h3 {
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    text-overflow: clip !important;
  }
}
