/* Services, library, Quran tools, install button and motion. Loaded after site.css and svc.css. */

/* ---------- header actions and install */
.top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.top-icon {
  display: none;
  color: var(--bone);
  padding: 0.4rem;
  border-radius: 50%;
}
.top-account {
  display: inline-flex;
  color: var(--bone);
  padding: 0.4rem;
  border-radius: 50%;
}
/* The home header has no back button: with the account icon it is wider than a phone, and the bottom bar already has search. */
@media (max-width: 26rem) {
  .top:not(.has-back) { column-gap: 0.75rem; }
  .top:not(.has-back) .top-account ~ .top-search { display: none; }
}
.install-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  color: #17100b;
  background: linear-gradient(135deg, var(--amber-soft), var(--amber));
  border: 0;
  border-radius: 99px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(242, 169, 59, 0.5);
}
.is-installed [data-install],
.is-installed [data-install-box],
.is-installed .play-box {
  display: none !important;
}
.sheet {
  border: 1px solid #7a5a2f;
  border-radius: 1rem;
  background: var(--bg2);
  color: var(--bone);
  padding: 1.2rem 1.3rem;
  width: min(92vw, 34rem);
  max-height: 85vh;
}
.sheet::backdrop {
  background: rgba(0, 0, 0, 0.75);
}
.sheet h2 {
  margin-top: 0;
  font-size: 1.35rem;
}
.sheet ol {
  padding-inline-start: 1.4rem;
  line-height: 2.1;
}

/* ---------- section headings and service cards */
.sec-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-block: 2.2rem 0.8rem;
}
.sec-line h2 {
  margin: 0;
  position: relative;
  padding-inline-start: 0.8rem;
}
.sec-line h2::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: 0.25em;
  width: 3px;
  border-radius: 3px;
  background: var(--amber);
}
.sec-line .more {
  color: var(--amber-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
.services-home {
  position: relative;
  z-index: 3;
  margin-top: -1.4rem;
}
.services-home .sec-line {
  margin-top: 0;
}
.svc-grid {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.75rem;
}
.svc-grid > li {
  display: grid;
}
.svc {
  display: grid;
  grid-template-rows: auto auto 1fr;
  justify-items: center;
  align-content: start;
  gap: 0.25rem;
  text-align: center;
  padding: 1rem 0.6rem 0.85rem;
  font: inherit;
  color: var(--bone);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: linear-gradient(165deg, #2a1d11, var(--bg2) 55%);
  overflow: hidden;
}
.svc:hover,
.svc:focus-visible {
  border-color: var(--amber);
}
.svc-ic {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50% 50% 34% 34%;
  color: var(--amber);
  border: 1px solid rgba(242, 169, 59, 0.45);
  background: radial-gradient(
    circle at 50% 20%,
    rgba(242, 169, 59, 0.22),
    transparent 70%
  );
}
.svc strong {
  font-size: 1.05rem;
  line-height: 1.5;
}
.svc small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}
.svc-quran {
  border-color: rgba(242, 169, 59, 0.55);
}
.svc-install {
  border-style: dashed;
  border-color: var(--amber);
}

/* ---------- home rows */
.tiles-s {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.7rem;
  margin-block: 0.6rem 1.5rem;
}
.tile-s {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--bg2);
  color: var(--bone);
  text-decoration: none;
}
.tile-s .ic {
  color: var(--amber);
  flex: none;
}
.tile-s span {
  display: grid;
}
.tile-s small {
  color: var(--muted);
}
.tile-s:hover {
  border-color: var(--amber);
}
.hscroll .scards {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(13rem, 17rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.6rem;
  margin-bottom: 0.5rem;
}
.hscroll .scard {
  scroll-snap-align: start;
}
.photostrip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
}
.photostrip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.6rem;
  display: block;
}
.person-chip {
  border-color: rgba(242, 169, 59, 0.4);
}
@media (max-width: 40rem) {
  .photostrip {
    grid-template-columns: repeat(3, 1fr);
  }
  .svc-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
  }
  .svc {
    padding: 0.75rem 0.3rem 0.65rem;
  }
  .svc strong {
    font-size: 0.9rem;
  }
  .svc small {
    font-size: 0.72rem;
  }
  .svc:not(.svc-prayer):not(.svc-wird) small {
    display: none;
  }
  .svc-ic {
    width: 2.9rem;
    height: 2.9rem;
  }
}
@media (max-width: 22rem) {
  .install-btn span {
    display: none;
  }
}
@media (max-width: 900px) {
  .top-icon {
    display: inline-flex;
  }
  .services-home {
    margin-top: -2.6rem;
  }
}

/* ---------- Quran: tools, tajweed colours, tafsir */
.q-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  align-items: center;
  max-width: 48rem;
  margin-block: 1rem;
}
.q-repeat {
  flex: 1 1 100%;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.4rem 0.9rem;
}
.q-repeat summary {
  cursor: pointer;
  font-weight: 600;
}
.q-repeat-in {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: end;
  padding-block: 0.6rem;
}
.q-repeat input {
  width: 5rem;
}
.tj-key {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}
.tj-key[hidden] {
  display: none;
}
.mushaf .text {
  font-size: calc(clamp(1.7rem, 5.2vw, 2.4rem) * var(--q-scale, 1));
}
.mushaf i,
.tj-key i {
  font-style: normal;
}
.mushaf.tj .tj-h,
.mushaf.tj .tj-s,
.tj-key .tj-h,
.tj-key .tj-s {
  color: #8d8577;
}
.mushaf.tj .tj-l,
.tj-key .tj-l {
  color: #a79c8a;
}
.mushaf.tj .tj-n,
.tj-key .tj-n {
  color: #9cc3ff;
}
.mushaf.tj .tj-p,
.tj-key .tj-p {
  color: #5fa3ff;
}
.mushaf.tj .tj-o,
.tj-key .tj-o {
  color: #8b8cff;
}
.mushaf.tj .tj-m,
.tj-key .tj-m {
  color: #d38bff;
}
.mushaf.tj .tj-q,
.tj-key .tj-q {
  color: #4fdcff;
}
.mushaf.tj .tj-g,
.tj-key .tj-g {
  color: #ff9a3d;
}
.mushaf.tj .tj-f,
.tj-key .tj-f {
  color: #ff6f9f;
}
.mushaf.tj .tj-c,
.tj-key .tj-c {
  color: #ffa3d1;
}
.mushaf.tj .tj-i,
.tj-key .tj-i {
  color: #28e0a4;
}
.mushaf.tj .tj-a,
.tj-key .tj-a {
  color: #55d66a;
}
.mushaf.tj .tj-u,
.tj-key .tj-u {
  color: #bfe85c;
}
.mushaf.tj .tj-w,
.tj-key .tj-w {
  color: #9be58a;
}
.mushaf.tj .tj-d,
.mushaf.tj .tj-b,
.tj-key .tj-d,
.tj-key .tj-b {
  color: #e0c36b;
}
.tafsir-ayah {
  font:
    400 1.5rem/2.4 "Noto Naskh Arabic",
    serif;
  color: var(--amber-soft);
}
#tafsir-text {
  line-height: 2.1;
}

/* ---------- tajweed lessons and quiz */
.lesson-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.lesson-list a {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--bg2);
  color: var(--bone);
  text-decoration: none;
}
.lesson-list a:hover {
  border-color: var(--amber);
}
.lesson-list a.seen::after {
  content: "✓ قرأته";
  margin-inline-start: auto;
  color: var(--patina);
  font-size: 0.85rem;
  white-space: nowrap;
}
.lesson-list .sn {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--amber);
  border-radius: 50%;
  color: var(--amber);
  flex: none;
}
.lesson-list .st {
  display: grid;
}
.lesson-list small {
  color: var(--muted);
}
.quiz {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.4rem 1.1rem 1.1rem;
  background: var(--bg2);
  margin-block: 2rem 1rem;
}
.qz-q {
  font-size: 1.25rem;
  font-weight: 700;
}
.qz-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.qz-opts .right {
  background: #1f5a3a;
  border-color: #55d66a;
  color: #fff;
}
.qz-opts .wrong {
  background: #5a2320;
  border-color: var(--danger);
  color: #fff;
}
.qz-opts button:disabled {
  opacity: 0.9;
  cursor: default;
}

/* ---------- daily wird */
.wd-bar {
  height: 0.7rem;
  border-radius: 99px;
  background: var(--wood);
  overflow: hidden;
  margin-block: 1rem;
}
.wd-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--amber), var(--amber-soft));
  transition: width 0.45s ease;
}
.wd-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.wd-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--bg2);
}
.wd-list li label {
  flex: 1;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  cursor: pointer;
}
.wd-list input[type="checkbox"] {
  width: 1.4rem;
  height: 1.4rem;
  accent-color: var(--amber);
  flex: none;
}
.wd-list li.done {
  border-color: var(--patina);
}
.wd-list li.done label span {
  text-decoration: line-through;
  color: var(--muted);
}
.wd-week {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}
.wd-week li {
  display: grid;
  justify-items: center;
  padding: 0.45rem 0.1rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
}
.wd-week li.some {
  border-color: var(--amber);
}
.wd-week li.full {
  background: var(--amber);
  color: #17100b;
  border-color: var(--amber);
}
.wd-week small {
  font-size: 0.72rem;
}
.wd-edit {
  margin-block: 1.4rem;
}
.wd-edit summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--amber-soft);
}
.wird label select,
.wird label input[type="time"],
.wd-edit input {
  display: block;
  margin-top: 0.3rem;
}

/* ---------- sebha counters, hijri, reader */
.sb-list ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.sb-list li {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding-inline-end: 0.7rem;
}
.sb-list li.on {
  border-color: var(--amber);
}
.sb-pick {
  flex: 1;
  display: grid;
  text-align: start;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}
.sb-pick small,
.sb-none {
  color: var(--muted);
}
.sb-list .sb-none {
  border: 0;
}
.hj-upcoming {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.hj-upcoming li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 1rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--bg2);
}
.hj-upcoming span {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.9rem;
}
.hj-upcoming small {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--amber-soft);
}
.reader audio {
  width: 100%;
  margin-block: 1rem;
}
.reader .cover {
  max-width: 14rem;
  border-radius: 0.7rem;
}
.reader-tools {
  margin-block: 0.5rem;
}
.reader-tools[hidden] {
  display: none;
}

/* ---------- motion: only for people who have not asked their device to reduce it */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
  .svc,
  .tile-s,
  .scard,
  .menu a,
  .menu-b,
  .result,
  .lesson-list a,
  .quick a,
  .arch,
  .install-btn {
    transition:
      transform 0.25s ease,
      border-color 0.25s ease,
      box-shadow 0.25s ease;
  }
  @media (hover: hover) {
    .svc:hover,
    .tile-s:hover,
    .scard:hover,
    .menu a:hover,
    .menu-b:hover,
    .lesson-list a:hover {
      transform: translateY(-3px);
      box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(242, 169, 59, 0.25);
    }
  }
  .svc:active,
  .tile-s:active,
  .scard:active,
  .menu a:active,
  .menu-b:active,
  .btn:active,
  .tabbar a:active,
  .install-btn:active {
    transform: scale(0.96);
  }
  .ic * {
    transform-box: view-box;
    transform-origin: 12px 12px;
  }
  .ic {
    transform-origin: 50% 50%;
  }
  /* each icon has its own gesture, played on hover, keyboard focus or touch */
  :is(a, button):is(:hover, :focus-visible, .tapped) .ic-map .a-pin {
    animation: pin-hop 0.65s ease;
  }
  :is(a, button):is(:hover, :focus-visible, .tapped) .ic-compass .a-needle {
    animation: needle 0.8s ease;
  }
  :is(a, button):is(:hover, :focus-visible, .tapped) .ic-clock .a-hand {
    animation: spin 0.8s ease;
  }
  :is(a, button):is(:hover, :focus-visible, .tapped) .ic-install .a-drop {
    animation: drop 0.7s ease;
  }
  :is(a, button):is(:hover, :focus-visible, .tapped) .ic-quran {
    animation: open-book 0.6s ease;
  }
  :is(a, button):is(:hover, :focus-visible, .tapped) .ic-book {
    animation: open-book 0.6s ease;
  }
  :is(a, button):is(:hover, :focus-visible, .tapped) .ic-sebha {
    animation: bead 0.65s steps(7);
  }
  :is(a, button):is(:hover, :focus-visible, .tapped) .ic-moon {
    animation: sway 0.8s ease;
  }
  :is(a, button):is(:hover, :focus-visible, .tapped) .ic-wird .a-check {
    stroke-dasharray: 14;
    animation: draw 0.6s ease;
  }
  :is(a, button):is(:hover, :focus-visible, .tapped) .ic-tajweed .a-dot {
    animation: pulse-dot 0.7s ease;
  }
  :is(a, button):is(:hover, :focus-visible, .tapped) :is(.ic-heart, .ic-star) {
    animation: beat 0.6s ease;
  }
  :is(a, button):is(:hover, :focus-visible, .tapped)
    :is(
      .ic-shrines,
      .ic-gov,
      .ic-home,
      .ic-grid,
      .ic-search,
      .ic-mic,
      .ic-waves,
      .ic-routes
    ) {
    animation: lift 0.55s ease;
  }
  .explore .go,
  .sec-line .more span {
    display: inline-block;
    transition: transform 0.25s ease;
  }
  :is(.explore, .sec-line .more):is(:hover, :focus-visible) :is(.go, span) {
    animation: point 0.8s ease infinite;
  }
  /* a single glance at the install button when the page opens */
  .install-btn {
    animation: glow 1.6s ease 1.2s 2;
  }
  .reveal {
    opacity: 0;
    transform: translateY(14px);
  }
  .reveal.in {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.45s ease var(--delay, 0ms),
      transform 0.45s ease var(--delay, 0ms);
  }
  .sheet[open],
  .lightbox[open] {
    animation: rise 0.28s ease;
  }
  details[open] > :not(summary) {
    animation: rise 0.25s ease;
  }
}
@keyframes pin-hop {
  35% {
    transform: translateY(-3.5px);
  }
  60% {
    transform: translateY(0.5px);
  }
  78% {
    transform: translateY(-1.2px);
  }
}
@keyframes needle {
  30% {
    transform: rotate(70deg);
  }
  60% {
    transform: rotate(-30deg);
  }
  82% {
    transform: rotate(10deg);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes drop {
  40% {
    transform: translateY(3px);
  }
  70% {
    transform: translateY(-1.5px);
  }
}
@keyframes open-book {
  45% {
    transform: scaleX(1.18) translateY(-1px);
  }
}
@keyframes bead {
  to {
    transform: rotate(51.4deg);
  }
}
@keyframes sway {
  30% {
    transform: rotate(-22deg);
  }
  65% {
    transform: rotate(12deg);
  }
}
@keyframes draw {
  from {
    stroke-dashoffset: 14;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes pulse-dot {
  50% {
    r: 4.6;
    fill: currentColor;
  }
}
@keyframes beat {
  30% {
    transform: scale(1.25);
  }
  55% {
    transform: scale(0.95);
  }
  75% {
    transform: scale(1.1);
  }
}
@keyframes lift {
  45% {
    transform: translateY(-3px) scale(1.08);
  }
}
@keyframes point {
  50% {
    transform: translateX(-5px);
  }
}
@keyframes glow {
  50% {
    box-shadow: 0 0 0 6px rgba(242, 169, 59, 0.25);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ---------- downloads and working offline */
.offline-bar { display: none; margin: 0; padding: 0.35rem 1rem; text-align: center; background: #3a2616; color: var(--bone); font-size: 0.9rem; }
.offline-bar a { color: var(--amber-soft); }
.is-offline .offline-bar { display: block; }
.dl-box { border: 1px solid var(--line); border-radius: 1rem; background: var(--bg2); padding: 0.2rem 1.1rem 1rem; margin-block: 1rem 1.6rem; }
.dl-status:not(:empty) { border: 1px solid var(--danger); border-radius: 0.7rem; padding: 0.6rem 0.9rem; }
.dl-list { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.dl-list li { border: 1px solid var(--line); border-radius: 0.8rem; background: var(--bg2); padding: 0.7rem 0.9rem; }
.dl-list li[data-state="done"] { border-color: var(--patina); }
.dl-list li[data-state="error"] { border-color: var(--danger); }
.dl-head { display: flex; justify-content: space-between; gap: 0.8rem; align-items: baseline; }
.dl-head small { color: var(--muted); white-space: nowrap; }
.dl-desc { color: var(--muted); font-size: 0.9rem; margin: 0.3rem 0; }
.dl-state { margin: 0.25rem 0; color: var(--amber-soft); font-size: 0.92rem; }
.dl-bar { height: 0.5rem; border-radius: 99px; background: var(--wood); overflow: hidden; }
.dl-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--amber-soft)); transition: width 0.25s ease; }
.dl-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-top: 0.5rem; }
.dl-surahs { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
#dl-surahs-box summary { cursor: pointer; font-weight: 700; color: var(--amber-soft); padding-block: 0.4rem; }
.dl-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1.5rem; }
.downloads select { display: block; margin-top: 0.3rem; }
@media (prefers-reduced-motion: no-preference) { :is(a, button):is(:hover, :focus-visible, .tapped) .ic-download .a-drop { animation: drop 0.7s ease; } }
.q-saved .check { display: flex; gap: 0.5rem; align-items: center; padding-block: 0.2rem; }
.surah-list a.saved .st strong::after { content: " ✓ محفوظة"; font-size: 0.75rem; font-weight: 400; color: var(--patina); }

/* ---------- stores and owner-defined fields */
.chips-label {
  align-self: center;
  color: var(--muted);
}
.good-store {
  margin: 0;
  font-size: 0.9rem;
}
.good .good-store a {
  display: inline;
}
.store-logo {
  width: 6rem;
  height: 6rem;
  object-fit: cover;
  border-radius: 1rem;
}
.specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 1rem;
}
.specs dt {
  color: var(--muted);
}
.specs dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.mine li {
  margin-block: 0.3rem;
}

/* ---------- long books */
.book-toc {
  margin-block: 1rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}
.book-toc summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.book-toc ol {
  max-height: 22rem;
  overflow: auto;
}
.book-toc [aria-current] {
  font-weight: 700;
}
.book-turn {
  align-items: center;
}
.book-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-block: 1rem;
}
.book-jump input {
  width: 6rem;
  min-height: 2.75rem;
  padding: 0 0.5rem;
  border: 1px solid #7a5a2f;
  border-radius: 0.6rem;
  background: var(--bg2);
  color: var(--bone);
  font: inherit;
}
.book-page {
  margin: 0;
  text-align: center;
}
.book-page img {
  max-width: 100%;
  height: auto;
  border-radius: 0.6rem;
}
.book-page figcaption,
.book-credit {
  color: var(--muted);
  font-size: 0.9rem;
}
.book-credit {
  overflow-wrap: anywhere;
}
.book-listen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-block: 0.8rem;
}
.book-listen[hidden],
.book-listen [hidden] {
  display: none;
}
.book-listen select {
  min-height: 2.5rem;
  padding: 0 0.5rem;
  border: 1px solid #7a5a2f;
  border-radius: 0.6rem;
  background: var(--bg2);
  color: var(--bone);
  font: inherit;
}
.book-listen .hint {
  flex-basis: 100%;
  margin: 0;
}
.reader-body .reading {
  background: rgb(242 169 59 / 0.14);
  border-radius: 0.4rem;
}

/* ---------- visitor accounts */
.account { max-width: 32rem; }
.account .gbtn { display: flex; align-items: center; justify-content: center; gap: 0.7rem; width: 100%; min-height: 3rem; margin-block: 1rem; padding: 0.6rem 1rem; background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 99px; font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.account .or { text-align: center; color: var(--muted); }
.account dt { color: var(--muted); font-size: 0.92rem; }
.account dd { margin: 0 0 0.7rem; overflow-wrap: anywhere; }
.account h2 { margin-top: 2rem; }
.account .danger-zone { margin-top: 2rem; }
.account .danger-zone summary { cursor: pointer; padding-block: 0.6rem; }
.me-pic { position: relative; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; overflow: hidden; flex: none; }
.me-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.me-pic.big { width: 6rem; height: 6rem; border: 1px solid #7a5a2f; }
.top-account { align-items: center; gap: 0.35rem; text-decoration: none; }
.top-account .me-pic { width: 1.5rem; height: 1.5rem; } /* as wide as the icon: the header is full at 360px */
.top-account .me-name { display: none; max-width: 8rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (min-width: 70rem) { .top-account .me-name { display: inline; } }
.account .me { display: flex; align-items: center; gap: 1rem; }
.account .me-title { margin: 0; font-size: 1.4rem; font-weight: 700; overflow-wrap: anywhere; }
.account .me-edit summary { cursor: pointer; padding-block: 0.6rem; }
.account .sync-ask { border: 1px solid #7a5a2f; border-radius: 1rem; padding: 0 1rem; margin-top: 1.5rem; }
.account .mine { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.account .mine a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; min-height: 3rem; border: 1px solid #7a5a2f; border-radius: 0.8rem; text-decoration: none; }
