/* Shell móvil — Biblia Torah Viviente
   Prioridad: contenido 70% / chrome 30%. Sin barras laterales en teléfono. */

:root {
  --tv-red: #801b1b;
  --tv-red-deep: #5a1212;
  --gold: #c4a35a;
  --bg: #f7f3e8;
  --card: #fffaf2;
  --ink: #2a241c;
  --ink-soft: #5c5348;
  --line: #e6dcc8;
  --tap: 44px;
  --read-leading: 1.45;
  --pad-x: 16px;
}

html, body {
  background: #801b1b;
}

#phone.app {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--bg-dot, #e4dcc8) 0.85px, transparent 1.05px);
  background-size: 10px 10px;
  padding-top: env(safe-area-inset-top, 0px);
}

#phone.app::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: env(safe-area-inset-top, 0px);
  background: #801b1b;
  z-index: 400;
  pointer-events: none;
}
#phone.app::after {
  display: none;
}

.icon-btn {
  width: var(--tap);
  height: var(--tap);
  min-width: var(--tap);
  min-height: var(--tap);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tv-red);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 10px;
}
.icon-btn:active {
  background: rgba(128, 27, 27, 0.08);
}

/* 1. Cabecera calendario — compacta */
.top-calendar-header.header {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 2px 6px 4px;
  flex-shrink: 0;
  z-index: 12;
  background: rgba(247, 243, 232, 0.96);
  border-bottom: 1px solid var(--line);
}
.top-calendar-header .date-nav {
  flex: 1;
  min-width: 0;
  gap: 0;
}
.top-calendar-header .date-board {
  padding: 2px 4px;
}
.top-calendar-header .date-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.top-calendar-header .date-eterno-line,
.top-calendar-header .date-israel-time {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 1px;
  line-height: 1.2;
}
.top-calendar-header .date-eterno-line {
  color: var(--tv-red);
}
.top-calendar-header .date-israel-time {
  color: var(--ink-soft);
}
.top-calendar-header .date-arrow {
  width: var(--tap);
  height: var(--tap);
  color: var(--tv-red);
}
.top-calendar-header .ministry-nav {
  flex: 1;
  min-width: 0;
  padding: 0.15rem 0.2rem;
}
.top-calendar-header .ministry-title {
  font-size: clamp(1.18rem, 5.6vw, 1.62rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0.01em;
}

/* 2. Barra de identidad */
.brand-header.gold-banner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0 12px;
  min-height: 46px;
  border-radius: 0;
  background: var(--tv-red);
  color: #fff;
  z-index: 12;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.brand-header .logo {
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: #000;
}
.brand-header .brand-title {
  flex: 1;
  min-width: 0;
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 0.15rem;
  cursor: pointer;
}
.brand-header .gtr-trigger {
  max-width: 118px;
  min-height: 36px;
  padding: 0.2rem 0.4rem;
  border-color: rgba(255, 255, 255, 0.4);
}

/* 3. Tabs de contenido */
.content-tabs.tabs-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 4px 0 2px;
  min-height: 44px;
  background: rgba(247, 243, 232, 0.96);
  border-bottom: 1px solid var(--line);
  z-index: 11;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}
.content-tabs .seg-tabs {
  flex: 1;
  display: flex;
  align-items: stretch;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  min-width: 0;
}
.content-tabs .seg {
  flex: 1;
  border: 0;
  border-right: 0;
  background: transparent;
  color: #3a3228;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.55rem 0.08rem 0.45rem;
  min-height: var(--tap);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.content-tabs .seg.active {
  background: transparent;
  color: var(--tv-red);
  box-shadow: inset 0 -2px 0 var(--tv-red);
}
.tab-psalm-jump {
  flex: 0 0 auto;
  align-self: stretch;
  min-height: var(--tap);
  padding: 0.55rem 0.28rem 0.45rem;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tv-red);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
.tab-psalm-jump[hidden] {
  display: none !important;
}
.tab-psalm-jump:active,
.content-tabs .seg:active {
  background: rgba(128, 27, 27, 0.08);
}
.aa-zoom {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}
.aa-zoom-btn {
  min-width: 34px;
  width: 34px;
  min-height: var(--tap);
  border: 0;
  background: transparent;
  color: var(--tv-red);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.aa-zoom-btn:active {
  background: var(--tv-red-soft);
  transform: scale(0.94);
}
.aa-fs-btn {
  display: inline-grid;
  place-items: center;
  padding: 0;
}
.aa-fs-btn svg {
  display: block;
  pointer-events: none;
  width: 17px;
  height: 17px;
}
@media (hover: hover) and (pointer: fine) {
  .content-tabs .seg:hover,
  .tab-psalm-jump:hover,
  .aa-zoom-btn:hover {
    background: rgba(128, 27, 27, 0.08);
  }
}
@media (max-width: 380px) {
  .content-tabs.tabs-row {
    padding: 0 2px;
  }
  .content-tabs .seg,
  .tab-psalm-jump {
    font-size: 0.72rem;
    padding-left: 0.04rem;
    padding-right: 0.04rem;
  }
  .tab-psalm-jump {
    padding-left: 0.18rem;
    padding-right: 0.18rem;
  }
  .aa-zoom-btn {
    min-width: 30px;
    width: 30px;
    font-size: 1.22rem;
  }
  .aa-fs-btn svg {
    width: 15px;
    height: 15px;
  }
}

/* 4. Lista principal — todo el ancho */
.body-row.main-scroll-area {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  grid-template-columns: none;
}
.list-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.psalm-list {
  padding: 0 0 4.2rem;
  font-size: var(--read-size, 1.02rem);
}
.psalm-list li {
  display: grid;
  grid-template-columns: 36px 1fr 18px;
  gap: 0.15rem 0.7rem;
  align-items: start;
  padding: 0.85rem var(--pad-x);
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.psalm-list li.selected {
  background: rgba(128, 27, 27, 0.05);
  outline: none;
}
.psalm-list li.is-daily {
  background: rgba(196, 163, 90, 0.08);
}
.icon-cell {
  width: 32px;
  height: 32px;
  margin-top: 2px;
}
.icon-cell img.harp {
  width: 28px;
  height: 28px;
  opacity: 0.72;
}
.item-title {
  font-size: calc(var(--read-size, 1.02rem) * 1.1);
  font-weight: 800;
  color: var(--tv-red);
  line-height: 1.25;
}
.item-heb {
  flex: 0 0 auto;
  font-size: calc(var(--read-size, 1.02rem) * 1.03);
  color: var(--tv-red);
  font-weight: 700;
}
.item-cat {
  margin: 0.12rem 0 0;
  font-size: calc(var(--read-size, 1.02rem) * 0.67);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tv-red);
  line-height: 1.3;
}
.item-sefer {
  margin: 0.08rem 0 0;
  font-size: calc(var(--read-size, 1.02rem) * 0.76);
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.3;
}
.item-preview {
  margin: 0.18rem 0 0;
  font-size: calc(var(--read-size, 1.02rem) * 0.9);
  color: var(--ink);
  line-height: var(--read-leading);
  -webkit-line-clamp: 2;
}
.item-chevron {
  color: var(--gold);
  font-size: 1.15rem;
  line-height: 1.2;
  margin-top: 0.15rem;
  font-weight: 400;
}

/* 5. GPS / horarios compactos */
.location-schedule-panel.shabbat-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "city city"
    "in out";
  gap: 0.35rem 0.45rem;
  padding: 0.35rem var(--pad-x) 0.4rem;
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  background: rgba(247, 243, 232, 0.97);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  z-index: 11;
}
.shabbat-city-btn {
  min-height: 32px;
  min-width: 0;
  max-width: 100%;
  font-size: 0.78rem;
  background: var(--card);
}
#shabbatCityLabel {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shabbat-item {
  padding: 0.35rem 0.45rem;
  min-height: 52px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(145deg, #f0c0c0 0%, #801b1b 50%, #4a0e0e 100%) border-box;
}
.shabbat-card-label {
  display: block;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--tv-red);
  text-align: left;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shabbat-item strong {
  font-size: 0.95rem;
}
.shabbat-item em {
  font-size: 0.68rem;
}

@media (max-width: 420px) {
  .location-schedule-panel.shabbat-bar {
    gap: 0.28rem 0.32rem;
    padding: 0.28rem 8px 0.32rem;
  }
  .shabbat-city-btn {
    min-height: 30px;
    font-size: 0.7rem;
    padding: 0.18rem 0.4rem;
  }
  .shabbat-item {
    padding: 0.28rem 0.32rem;
    min-height: 0;
    gap: 0.28rem;
  }
  .shabbat-item > img {
    width: 28px;
    height: 28px;
  }
  .shabbat-lupa {
    width: 18px;
    height: 18px;
  }
  .shabbat-lupa svg {
    width: 11px;
    height: 11px;
  }
  .shabbat-card-label {
    font-size: 0.5rem;
    letter-spacing: 0.01em;
  }
  .shabbat-item strong {
    font-size: 0.86rem;
  }
  .shabbat-item em {
    font-size: 0.6rem;
  }
  .shabbat-zoom {
    min-width: 0;
    max-width: min(210px, calc(100vw - 16px));
    padding: 0.5rem 0.6rem;
  }
  .shabbat-zoom .zoom-time {
    font-size: 1.28rem;
  }
  .shabbat-zoom .zoom-date {
    font-size: 0.78rem;
    white-space: normal;
  }
  #shabbatIn .shabbat-zoom {
    left: 0;
    transform: translateX(0) scale(0.92);
  }
  #shabbatIn.is-zoomed .shabbat-zoom {
    transform: translateX(0) scale(1);
  }
}

@media (hover: hover) and (pointer: fine) and (max-width: 420px) {
  #shabbatIn:hover .shabbat-zoom,
  #shabbatIn:focus-visible .shabbat-zoom {
    transform: translateX(0) scale(1);
  }
}

@media (max-width: 360px) {
  .shabbat-card-extra {
    display: none;
  }
  .shabbat-lupa {
    display: none;
  }
  .shabbat-item > img {
    width: 24px;
    height: 24px;
  }
  .shabbat-card-label {
    font-size: 0.52rem;
    letter-spacing: 0;
  }
  .shabbat-item strong {
    font-size: 0.82rem;
  }
  .shabbat-item em {
    font-size: 0.56rem;
    white-space: nowrap;
  }
}

@media (max-width: 320px) {
  .location-schedule-panel.shabbat-bar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "city"
      "in"
      "out";
    gap: 0.22rem;
    padding: 0.24rem 8px 0.28rem;
  }
  .shabbat-item {
    padding: 0.22rem 0.4rem;
  }
  .shabbat-item > img {
    width: 26px;
    height: 26px;
  }
  .shabbat-lupa {
    display: grid;
  }
  .shabbat-card-extra {
    display: inline;
  }
}

/* 6. Navegación inferior */
.bottom-navigation {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  flex-shrink: 0;
  background: var(--tv-red);
  color: #fff;
  padding: 5px 3px calc(7px + env(safe-area-inset-bottom, 0px));
  z-index: 13;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}
.nav-item {
  min-height: 54px;
  border: 0;
  background: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-family: inherit;
  padding: 5px 2px 4px;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.nav-item svg {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: currentColor;
}
.nav-item span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  white-space: nowrap;
  color: #fff;
}
@media (hover: hover) and (pointer: fine) {
  .nav-item:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #f4d78a;
  }
  .nav-item:hover span {
    color: #f4d78a;
  }
}
.nav-item:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.2);
}
.nav-item.is-active {
  color: #e8c56a;
}
.nav-item.is-active span {
  color: #e8c56a;
  border-bottom: 2px solid #e8c56a;
  padding-bottom: 1px;
}

/* Detalle: maximizar lectura */
#phone.mode-detail .top-calendar-header,
#phone.mode-detail .content-tabs,
#phone.mode-detail .location-schedule-panel,
#phone.mode-detail .tab-psalm-jump,
#phone.mode-detail .bottom-navigation {
  display: none !important;
}
#phone.mode-detail .brand-header {
  flex-shrink: 0;
  margin: 0;
  min-height: 42px;
}
#phone.mode-detail .detail-view {
  flex: 1 1 auto;
}

/* Drawer */
.drawer-backdrop,
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 16, 16, 0.38);
  z-index: 60;
}
.app-drawer {
  position: absolute;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  bottom: 0;
  width: min(78vw, 300px);
  background: var(--bg);
  z-index: 61;
  padding: 1.1rem 0.85rem 1.4rem;
  box-shadow: 8px 0 28px rgba(40, 20, 20, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}
.drawer-title {
  margin: 0 0 0.7rem;
  color: var(--tv-red);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.app-drawer button,
.app-drawer a {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  padding: 0.75rem 0.4rem;
  min-height: var(--tap);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.app-drawer a.drawer-ofrendas {
  margin: 0.45rem 0 0.15rem;
  border: 0;
  border-radius: 8px;
  background: #801b1b;
  color: #fff !important;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.04em;
}
#btnShabbatTehilim {
  border-bottom: 0;
  color: var(--tv-red);
  font-weight: 800;
}
.drawer-splash-wrap {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin-top: 0.65rem;
  position: relative;
  background: #01011b url("img/splash_back.png?v=2") center / contain no-repeat;
  border-radius: 10px;
  overflow: hidden;
}
.drawer-splash {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  opacity: 0;
}

/* Hojas / modales */
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 62;
  background: var(--card);
  border-radius: 16px 16px 0 0;
  padding: 1rem var(--pad-x) calc(1.1rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 32px rgba(40, 20, 20, 0.18);
  max-height: 72vh;
  overflow: auto;
}
.sheet-tall {
  max-height: 82vh;
}
.sheet-title {
  margin: 0 0 0.85rem;
  text-align: center;
  color: var(--tv-red);
  font-weight: 800;
  font-size: 1.05rem;
}
.sheet-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}
.sheet-title-row .sheet-title {
  margin: 0;
  text-align: left;
  flex: 1;
}
.sheet-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--tv-red);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
.sheet-close:active {
  background: var(--tv-red-soft);
}
.read-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: var(--tap);
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.95rem;
}
.read-stepper {
  display: flex;
  gap: 0.35rem;
}
.read-stepper button,
.sheet-action {
  min-height: 40px;
  min-width: 48px;
  padding: 0 0.7rem;
  border: 1px solid var(--tv-red);
  border-radius: 8px;
  background: var(--tv-red-soft);
  color: var(--tv-red);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
#leadingRange {
  flex: 1;
  max-width: 160px;
}
.read-row-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.55rem 0;
}
.read-chips,
.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.search-chips {
  margin: 0 0 0.45rem;
}
.read-chips button,
.search-chips button {
  min-height: 34px;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.read-chips button.is-on,
.search-chips button.is-on {
  background: var(--tv-red);
  color: #fff;
  border-color: var(--tv-red);
}
.search-hint {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.35;
}
.psalm-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
}
.psalm-grid button {
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--tv-red);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.psalm-grid button:active {
  background: var(--tv-red);
  color: #fff;
}
.search-input {
  width: 100%;
  min-height: var(--tap);
  margin-bottom: 0.7rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  background: #fff;
}
.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--read-size, 1.02rem);
}
.search-results li {
  padding: 0.75rem 0.2rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  min-height: var(--tap);
}
.search-results strong {
  color: var(--tv-red);
}
.search-meta {
  display: block;
  font-size: 0.75em;
  color: var(--ink-soft);
  margin-top: 0.12rem;
}
.search-snip {
  margin: 0.22rem 0 0;
  font-size: 0.88em;
  color: var(--ink-soft);
  line-height: 1.35;
}
.search-results mark {
  background: rgba(196, 163, 90, 0.45);
  color: inherit;
  padding: 0 0.08em;
  border-radius: 2px;
}
#phone.theme-dark {
  --bg: #1c1612;
  --bg-dot: #3a3228;
  --ink: #f0e6d4;
  --ink-soft: #c4b8a4;
  --card: #241c16;
  --line: #3a3228;
  --tv-red-soft: #3a1c1c;
  color-scheme: dark;
}
#phone.theme-dark .search-input {
  background: #2a221c;
  color: var(--ink);
  border-color: var(--line);
}
#phone.read-font-times .detail-body.align-es,
#phone.read-font-times .detail-body.align-tr,
#phone.read-font-times .item-title,
#phone.read-font-times .item-preview,
#phone.read-font-times .item-sefer,
#phone.read-font-times .panel-body.align-es {
  font-family: "Times New Roman", Times, serif;
}
#phone.read-margin-compact .detail-body {
  padding-inline: 0.35rem 0.55rem;
}
#phone.read-margin-wide .detail-body {
  padding-inline: 1.4rem 1.6rem;
}

.list-wrap,
.detail-read-wrap,
.detail-body,
.psalm-list,
.item-main {
  max-width: 100%;
  overflow-x: hidden;
}
.item-title,
.item-preview,
.item-cat,
.item-sefer,
.detail-toolbar h1 {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.detail-titles {
  flex-wrap: wrap;
}
.table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.6rem 0;
}
.detail-body table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.detail-body td,
.detail-body th {
  padding: 0.2rem 0.35rem;
  vertical-align: top;
  overflow-wrap: anywhere;
}
#phone.app {
  overflow-x: hidden;
}
.detail-body {
  line-height: var(--read-leading);
  font-size: 1.05rem;
}
#phone.theme-ink {
  --bg: #f3ead4;
  --ink: #1a140e;
}

@media (max-width: 599px) {
  #phone.app {
    max-width: none;
    width: 100%;
    border-radius: 0;
  }
}

@media (min-width: 500px) and (max-width: 899px) {
  html, body {
    background: #801b1b;
  }
  body {
    padding: 0;
  }
  #phone.app {
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  #phone.app {
    max-width: none;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
  .psalm-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (min-width: 900px) {
  html, body {
    background: #801b1b;
    height: 100%;
    overflow: hidden;
  }
  body {
    padding: 0;
    margin: 0;
  }
  #phone.app,
  #phone.app.is-fs {
    max-width: none;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    padding-top: 0;
  }
  #phone.app::before {
    display: none;
  }
  .bottom-navigation {
    padding-bottom: 8px;
    border-radius: 0;
  }
  .detail-body,
  .list-wrap {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
  }
}
