/* The polish pass (assets/next.js adds html.nx): 29 Nov 2026, approved and turned on for everyone on 30 Nov 2026.
   The rules, everywhere: nothing covers what you came to read; nothing floats unless you asked for it; every button
   says what it does; one main action per screen, the rest quieter. */

/* ---------- everywhere: the voice button stays, smaller and out of the way; its tip never covers content ---------- */
html.nx .hv-btn {
  width: 44px;
  height: 44px;
  opacity: 0.92;
}
html.nx .hv-tip {
  display: none;
}
/* "Use it offline" isn't the first thing anyone needs: it moves to the end of the page */
html.nx .htg-offline {
  order: 99;
  margin-top: 28px;
  opacity: 0.9;
}
html.nx .htg-offline .btn {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

/* ---------- Heart Turn Academy ---------- */
/* the notice: one quiet line, the whole of it a tap away (the Sources and credits section keeps it all) */
html.nx .sem-notice {
  margin: 10px 0 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(201, 151, 28, 0.1);
  font-size: 13px;
  line-height: 1.45;
  color: #5a4a1e;
}
/* the tabs on a phone: one line you swipe, never three lines of wrapped words */
@media (max-width: 760px) {
  html.nx .sem-bar .tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    margin: 0 -16px;
    padding: 0 16px;
  }
  html.nx .sem-bar .tabs::-webkit-scrollbar {
    display: none;
  }
  html.nx .sem-bar .tabs button {
    flex: none;
    white-space: nowrap;
  }
}

/* ---------- the Interactive Bible ---------- */
/* the tools say what they are, on every screen size */
@media (min-width: 900px) {
  html.nx .jm-ctl {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  html.nx .jm-icon {
    width: auto;
    padding: 0 14px 0 10px;
    gap: 6px;
    border-radius: 999px;
  }
  html.nx .jm-icon .jm-icon-t {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    font: 800 13px/1 var(--ui);
  }
}
/* the visitors' row: just the two things you can do */
html.nx .jm-lt-h {
  display: none;
}
/* the panel's grip: a quiet handle, not a labeled bar */
html.nx .jm-move {
  font-size: 0;
  height: 18px;
  min-height: 18px;
}
/* on a phone, the side tools: the menu, Tours and the passport in sight; the rest under the menu (☰ shows them all,
   with their names) */
html.nx .jm-rail:not(.jm-rail-open) .jm-rail-b:not([data-rail='walks']):not([data-rail='passport']) {
  display: none;
}
/* "Refresh map" says what it does */
html.nx .jm-nb-reset {
  font-size: 0;
}
html.nx .jm-nb-reset::after {
  content: 'Start over';
  font: 800 15px/1 var(--ui);
}
@media (max-width: 899px) {
  html.nx .jm-nb-reset::after {
    content: '';
  }
}
/* the welcome: over the map only, never over the panel */
html.nx .jm-intro {
  right: 400px;
}
@media (max-width: 899px) {
  html.nx .jm-intro {
    right: 0;
  }
}

/* ---------- God's Word, the Bible app ---------- */
/* nothing floats over the words until it's asked for: the player shows when listening, the ear with it */
html.nx #bxPlay.is-idle {
  display: none !important;
}
html.nx .bx-ear {
  display: none !important;
}
html.nx body:has(#bxPlay:not(.is-idle)) .bx-ear {
  display: grid !important;
}
/* one Community: the tab; the extra button in the corner goes */
html.nx .mf-btn {
  display: none !important;
}
/* Share is one tool among the others, not the loudest thing on the screen */
html.nx .bx-sharebtn {
  background: transparent !important;
  color: inherit !important;
  border-color: var(--line, #d6e1e9) !important;
}
/* the bar for chosen verses waits for a tap: the verse picked on its own when a chapter opens doesn't open it */
html.nx .bx-selbar.is-auto {
  display: none !important;
}
/* the verse beside the text: the tools as one compact row of tiles, the verse and its study first */
@media (min-width: 1200px) {
  html.nx #bxSsR .bx-pop-act.bx-roomy .bx-pop-btns {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  html.nx #bxSsR .bx-pop-act.bx-roomy .bx-btn {
    min-height: 58px;
    padding: 6px 4px;
    font-size: 12px;
  }
}

/* ---------- Discussion ---------- */
/* one main action; the way in for newcomers next to it; the Bible and the Academy as plain links */
html.nx .chat-band-cta {
  align-items: center;
}
html.nx .chat-band-cta a.btn-line {
  min-height: 0;
  padding: 6px 4px;
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

/* ---------- the Academy's notice: two lines, the rest on a tap ---------- */
html.nx .sem-notice:not(.nx-open) {
  max-height: 56px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

/* the verse beside the text (wide screens): the everyday tools; the group, discuss, memorize, pray, journal and
   add-to-note tools are in the bar that opens with Choose */
@media (min-width: 1200px) {
  html.nx #bxSsR .bx-pop-btns [data-pop='group'],
  html.nx #bxSsR .bx-pop-btns [data-pop='discuss'],
  html.nx #bxSsR .bx-pop-btns [data-pop='mem'],
  html.nx #bxSsR .bx-pop-btns [data-pop='pray'],
  html.nx #bxSsR .bx-pop-btns [data-pop='journal'],
  html.nx #bxSsR .bx-pop-btns [data-pop='clip'] {
    display: none;
  }
}

/* the bar for chosen verses on phones: six tools in a row, then "Compare passages" and Done sharing one tidy row
   (instead of a lone tile and an empty Done square), and the keep-it tools in readable labels */
@media (max-width: 560px) {
  html.nx .bx-selbar [data-act='parallel'] {
    grid-column: span 4;
    flex-direction: row;
    min-height: 44px;
    gap: 8px;
    font-size: 13px;
  }
  html.nx .bx-selbar:not(:has(a.bx-btn)) [data-act='parallel'] {
    grid-column: 1 / -2;
  }
  html.nx .bx-selbar [data-act='clear'] {
    grid-column: -2 / -1;
    min-height: 44px;
  }
  html.nx .bx-selbar a.bx-btn {
    min-height: 44px;
  }
  html.nx .bx-selbar .bx-keep .bx-btn {
    font-size: 12.5px;
    gap: 5px;
    padding: 0 4px;
    white-space: nowrap;
    overflow: hidden;
  }
  html.nx .bx-selbar .bx-keep .bx-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* the voice button steps aside while the chosen-verses bar is open, so it never sits on a tool */
html.nx body:has(.bx-selbar:not([hidden]):not(.is-auto)) .hv-btn {
  display: none;
}
