/**
 * proyecto1 — lector literario (marfil / tan / serif).
 * Móvil y tablet: casco de app (pestañas inferiores).
 * Escritorio (≥1100px): barra lateral + columnas acotadas.
 */

:root,
[data-theme="light"] {
  --bg: #FFFCFA;
  --page: #F0E8DE;
  --surface: #FFFFFF;
  --tile: #FFFFFF;
  --text: #2C241C;
  --text-muted: #8A7F74;
  --accent: #C4A07A;
  --accent-strong: #8B6B45;
  --accent-soft: #F4E9DB;
  --border: #E6DDD2;
  --mark: #F4E07A;
  --danger: #B42318;
  --focus: #8B6B45;
  --nav: #FFFFFF;
  --nav-text: #6E645B;
  --nav-active: #C4A07A;
  --on-accent: #FFFFFF;
  --verse-num: #3D9B55;
  --shadow: 0 1px 2px rgba(44, 36, 28, 0.04), 0 10px 28px rgba(44, 36, 28, 0.06);
  --read-size: 18px;
  --read-lead: 1.8;
  --radius: 16px;
  --space: 16px;
  --gutter: clamp(16px, 3.2vw, 40px);
  --tabbar: 64px;
  --shell: 100%;
  --wide: min(72rem, 100%);
  --read-col: min(42rem, 100%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #1A1612;
  --surface: #262019;
  --text: #F3EDE4;
  --text-muted: #B3A89C;
  --accent: #D4B483;
  --accent-strong: #E2C49A;
  --accent-soft: #3A3228;
  --border: #3D342B;
  --mark: #C9A227;
  --danger: #F97066;
  --focus: #D4B483;
  --page: #100E0B;
  --tile: #2E271F;
  --nav: #262019;
  --nav-text: #B3A89C;
  --nav-active: #E2C49A;
  --verse-num: #6FCF8A;
  --on-accent: #1A1612;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --space: 16px;
}

[data-theme="sepia"] {
  --bg: #F4ECD8;
  --surface: #EFE6D0;
  --text: #3D2B1F;
  --text-muted: #7A6550;
  --accent: #8B6B45;
  --accent-strong: #6F5334;
  --accent-soft: #E8DFC8;
  --border: #D4C4A8;
  --mark: #E8C84A;
  --danger: #B42318;
  --focus: #0A2540;
  --page: #D9CDB4;
  --tile: #E7DCC4;
  --nav: #EFE6D0;
  --nav-text: #7A6550;
  --nav-active: #8B6B45;
  --verse-num: #2E7D4F;
  --on-accent: #FFFFFF;
  --shadow: 0 8px 24px rgba(61, 43, 31, 0.1);
  --radius: 12px;
  --space: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

body.page-auth,
body.page-perfil,
body.page-admin,
body.page-missing,
body.simple-app {
  overflow: auto;
  height: auto;
  min-height: 100dvh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  touch-action: manipulation;
}

img,
svg {
  display: block;
}

.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -40px;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 12px;
  border-radius: 8px;
  min-height: 44px;
}

.skip-link:focus {
  top: 8px;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
}

.nav {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 10px 18px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-mark .icon {
  width: 16px;
  height: 16px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.62;
}

.nav-primary,
.nav-account {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-account {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 12px;
  color: inherit;
  min-height: 52px;
}

.nav-user:hover {
  background: var(--accent-soft);
}

.nav-user[aria-current="page"] {
  background: var(--accent-soft);
}

.nav-avatar,
.acct-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.nav-user-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.nav-user-copy strong {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-copy span {
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item,
.bottom-tabs a {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 14px;
  cursor: pointer;
  color: inherit;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}

.nav-item:hover,
.bottom-tabs a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav-item[aria-current="page"],
.bottom-tabs a[aria-current="page"] {
  background: transparent;
  color: var(--nav-active);
  font-weight: 700;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  display: none;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(16px, 2.4vw, 18px);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.topbar-meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  flex-shrink: 0;
}

.content {
  flex: 1;
  padding: 12px var(--gutter) 20px;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  max-width: var(--wide);
  width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.screen {
  animation: rise 280ms ease;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

body.is-reading .content {
  max-width: var(--read-col);
  padding-bottom: 88px;
}

.screen[hidden] {
  display: none !important;
}

.lede {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.screen-heading {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.home-edition {
  margin: 0 0 20px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card-error {
  border-color: var(--danger);
}

.card-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead {
  margin-bottom: 20px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.muted {
  color: var(--text-muted);
  font-size: 13px;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 10px 16px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.btn-quiet {
  min-height: 38px;
  padding: 6px 12px;
  font-size: 13px;
  background: var(--bg);
}

.btn:hover:not(:disabled) {
  background: var(--accent-soft);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
  background: var(--accent);
}

@media (hover: hover) {
  .btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
  }
}

.btn-ghost {
  background: transparent;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-icon {
  min-width: 44px;
  padding-left: 12px;
  padding-right: 12px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 44px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chip[aria-pressed="true"],
.chip.is-on,
.chip[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.chip-row,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.input {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 44px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}

textarea.input {
  width: 100%;
  min-height: 8rem;
  resize: vertical;
  line-height: 1.5;
}

.input-jump {
  flex: 0 0 56px;
  width: 56px;
  min-width: 56px;
  padding: 8px 4px;
  text-align: center;
}

.search-bar {
  align-items: stretch;
}

.search-bar .input,
.btn-row .input {
  width: auto;
  flex: 1 1 12rem;
}

.search-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px 18px 14px;
  box-shadow: var(--shadow);
}

.search-hero-bar {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.search-hero-bar .input {
  flex: 1;
  min-height: 48px;
  border-radius: 14px;
  font-size: 16px;
}

.search-hero-bar .btn {
  min-height: 48px;
  padding-inline: 18px;
}

.search-scopes {
  margin-top: 12px;
}

.search-hint {
  margin: 12px 0 0;
  font-size: 13px;
}

.search-ex {
  appearance: none;
  border: 0;
  background: var(--accent-soft, rgba(196, 160, 122, 0.18));
  color: var(--accent-strong);
  border-radius: 999px;
  padding: 4px 10px;
  margin: 0 2px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.search-ex:hover {
  color: var(--text);
}

.search-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px 18px 8px;
  min-height: 12rem;
}

.search-live {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.search-results {
  display: flex;
  flex-direction: column;
}

.search-item {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.search-item:last-child {
  border-bottom: 0;
}

.search-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-item-head strong {
  font-size: 14px;
}

.search-item-text {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  line-height: 1.55;
  color: var(--text);
}

.search-item-text mark {
  background: var(--accent-soft, #ead9c0);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}

.mark-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.grid-chapters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
}

.grid-chapters .btn {
  min-width: 44px;
  padding: 8px;
}

.verse {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 14px;
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  font-size: var(--read-size, 18px);
  font-optical-sizing: auto;
  font-feature-settings: "liga" 1, "kern" 1;
  line-height: var(--read-lead, 1.85);
  padding: 3px 2px 12px;
  border-radius: 8px;
  position: relative;
  cursor: pointer;
  transition: background 180ms var(--ease);
}

.verse-main {
  min-width: 0;
}

@media (min-width: 720px) {
  .screen-read {
    --read-col: min(50rem, 100%);
  }

  .verse:has(.verse-xrefs) {
    grid-template-columns: minmax(0, 1fr) 7.6rem;
  }
}

.verse.is-lead {
  padding-top: 14px;
}

.verse.is-marked {
  background: transparent;
}

.verse.is-marked .verse-text {
  background: color-mix(in srgb, var(--mark-bg, var(--mark)) 52%, transparent);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  border-radius: 3px;
  box-shadow: inset 0 -0.22em 0 color-mix(in srgb, var(--mark-bg, var(--mark)) 88%, #000 6%);
  padding: 0 2px;
}

.verse:hover {
  background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
}

.verse.is-marked:hover,
.verse.is-marked.is-selected,
.verse.is-marked:focus-visible {
  background: var(--accent-soft);
}

.verse.is-selected,
.verse:focus-visible {
  background: #F6E6CF;
  box-shadow: none;
}

.verse.is-target {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.passage-heading {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.92em;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink, #2a2218);
  margin: 1.1em 2px 0.35em;
}

.verse-text {
  font: inherit;
}

.verse-text .wj {
  color: #9b1b1b;
}

.verse-num {
  color: var(--verse-num);
  font-size: 0.72em;
  font-weight: 700;
  margin-right: 6px;
  font-family: Newsreader, Georgia, serif;
  vertical-align: super;
}

.read-back {
  margin: 0 0 12px;
  position: sticky;
  top: 0;
  z-index: 4;
}

.read-back-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.read-back-btn .icon {
  width: 18px;
  height: 18px;
}

.read-back-btn:hover,
.read-back-btn:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.verse-xrefs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 12px;
  margin: 2px 0 0;
}

.verse-xref {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  color: var(--text-muted);
  font-family: Newsreader, Georgia, serif;
  font-size: 0.72em;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}

.verse-xref:hover,
.verse-xref:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
  outline: none;
}

.verse-xref:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

@media (min-width: 720px) {
  .verse-xrefs {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0;
    padding: 0.15em 0 0 10px;
    border-left: 1px solid var(--border);
  }

  .verse-xref {
    min-height: 28px;
    padding: 4px 0;
  }
}

@media (max-width: 719px) {
  .verse-xref {
    min-height: 44px;
  }
}

.verse-actions {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding: 8px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.verse.is-selected .verse-actions,
.verse:focus-within .verse-actions {
  display: flex;
}

.mark-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mark-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.mark-dot[aria-pressed="true"] {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text);
}

.mark-dot-off {
  background:
    linear-gradient(135deg, transparent 46%, var(--danger) 46%, var(--danger) 54%, transparent 54%),
    var(--surface) !important;
}

.verses-card {
  padding: 16px 18px 24px;
}

.chapter-toolbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chapter-toolbar-left,
.chapter-toolbar-right,
.font-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.chapter-toolbar-title {
  min-width: 0;
}

.chapter-heading {
  margin: 0;
  font-size: clamp(1.05rem, 3.6vw, 1.25rem);
  font-family: Newsreader, Georgia, serif;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-progress {
  margin: 2px 0 0;
  font-size: 12px;
}

.read-hint {
  margin: 0 0 12px;
  font-size: 13px;
}

.read-progress {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin: 0 0 14px;
}

.read-progress[hidden] {
  display: none !important;
}

.read-progress > span {
  display: block;
  height: 100%;
  width: var(--ch-pct, 0%);
  background: var(--accent);
  transition: width 220ms var(--ease);
}

.empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
}

.empty p:first-child {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--text);
}

.tabs-inner {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.list-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.list-item strong {
  font-size: 14px;
}

.list-item span {
  font-family: Newsreader, Georgia, serif;
  line-height: 1.55;
}

.list-item:last-child {
  border-bottom: 0;
}

mark {
  background: var(--mark);
  color: var(--text);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.swatches {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.swatch {
  width: 88px;
  min-height: 72px;
  border-radius: 8px;
  border: 2px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
}

.swatch-light {
  background: #F4F6F8;
  color: #0A2540;
}

.swatch-dark {
  background: #0A2540;
  color: #E8EEF4;
}

.swatch-sepia {
  background: #F4ECD8;
  color: #3D2B1F;
}

.swatch[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.skeleton {
  background: linear-gradient(90deg, var(--border) 0%, var(--surface) 50%, var(--border) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  border-radius: 6px;
}

.skeleton-line {
  height: 12px;
}

.skeleton-btn {
  height: 44px;
  width: 160px;
}

.w-40 { width: 40%; }
.w-50 { width: 50%; }
.w-70 { width: 70%; }
.w-80 { width: 80%; }
.w-85 { width: 85%; }
.w-90 { width: 90%; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.toast {
  position: fixed;
  bottom: calc(12px + var(--tabbar) + env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 8px);
  background: #2C241C;
  color: #F6F1EA;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 60;
  max-width: min(90vw, 28rem);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.verse-dock {
  flex-shrink: 0;
  margin: 0 var(--gutter) 8px;
  padding: 12px 14px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 -8px 28px rgba(44, 36, 28, 0.08);
}

.verse-dock[hidden] {
  display: none !important;
}

.verse-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.verse-dock-cite {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.verse-dock-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.verse-dock .mark-row {
  margin-bottom: 12px;
  justify-content: space-between;
}

.verse-dock-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.dock-act {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.dock-act[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.dock-act .icon {
  width: 1.2rem;
  height: 1.2rem;
}

body.has-dock .toast {
  bottom: calc(148px + env(safe-area-inset-bottom));
}

.toast[hidden] {
  display: none !important;
}

.bottom-tabs {
  display: flex;
  flex-shrink: 0;
  position: relative;
  background: var(--surface);
  color: var(--nav-text);
  border-top: 1px solid var(--border);
  padding: 4px 4px max(6px, env(safe-area-inset-bottom));
  padding-left: max(4px, env(safe-area-inset-left));
  padding-right: max(4px, env(safe-area-inset-right));
}

.tab-more {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 8px 0 4px;
}

.tab-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--accent-strong);
  color: var(--on-accent);
  box-shadow: 0 6px 16px rgba(139, 107, 69, 0.22);
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.tab-more-btn:active {
  transform: scale(0.94);
}

.tab-more-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.tab-more-btn .icon {
  width: 1.05rem;
  height: 1.05rem;
  stroke-width: 2.4;
}

.tab-more.is-open .tab-more-btn {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 6px 16px rgba(44, 36, 28, 0.18);
}

.tab-more-sheet {
  position: fixed;
  z-index: 40;
  left: 12px;
  right: 12px;
  bottom: calc(var(--tabbar) + 10px + env(safe-area-inset-bottom));
  display: grid;
  gap: 4px;
  max-height: min(70dvh, 440px);
  margin: 0;
  padding: 8px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transform: translateY(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease), visibility 180ms;
}

.tab-more.is-open .tab-more-sheet {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bottom-tabs .tab-more-sheet a {
  display: flex;
  flex: none;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.tab-more-sheet a[hidden] {
  display: none !important;
}

.tab-more.is-open .tab-more-sheet a {
  animation: tab-more-rise 220ms var(--ease) both;
}

.tab-more.is-open .tab-more-sheet a:nth-child(2) { animation-delay: 25ms; }
.tab-more.is-open .tab-more-sheet a:nth-child(3) { animation-delay: 45ms; }
.tab-more.is-open .tab-more-sheet a:nth-child(4) { animation-delay: 65ms; }
.tab-more.is-open .tab-more-sheet a:nth-child(5) { animation-delay: 85ms; }
.tab-more.is-open .tab-more-sheet a:nth-child(6) { animation-delay: 105ms; }
.tab-more.is-open .tab-more-sheet a:nth-child(7) { animation-delay: 125ms; }
.tab-more.is-open .tab-more-sheet a:nth-child(8) { animation-delay: 145ms; }

@keyframes tab-more-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.bottom-tabs a {
  flex: 1 1 0;
  flex-direction: column;
  gap: 2px;
  padding: 6px 2px;
  min-width: 0;
  min-height: 52px;
  font-size: 11px;
  justify-content: center;
}

.tab-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.stepper ol {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
}

.stepper li.is-active,
.stepper li.is-active .stepper-link {
  color: var(--accent);
  font-weight: 700;
}

.stepper-link {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  min-height: 44px;
  padding: 8px 4px;
}

.modal {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  max-width: 28rem;
  width: calc(100% - 32px);
  max-height: min(88dvh, 36rem);
  overflow: auto;
}

.share-modal {
  max-width: 32rem;
  max-height: min(94dvh, 58rem);
}

.modal::backdrop {
  background: rgba(10, 37, 64, 0.45);
}

.modal h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 800px) {
  body.is-reading .read-hint {
    display: none;
  }

  #chapter-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg);
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
    padding: 8px var(--gutter);
  }
}

@media (min-width: 720px) {
  :root,
  [data-theme="light"],
  [data-theme="dark"],
  [data-theme="sepia"] {
    --wide: min(64rem, 100%);
    --read-col: min(44rem, 100%);
  }

  .tile-row.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .book-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
  }

  .num-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (min-width: 960px) {
  :root,
  [data-theme="light"],
  [data-theme="dark"],
  [data-theme="sepia"] {
    --wide: min(72rem, 100%);
  }

  .home-ok {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.15fr);
    gap: 8px 36px;
    align-items: start;
  }

  .home-brand {
    max-width: var(--wide);
  }

  .tile {
    min-height: 108px;
  }
}

@media (min-width: 1100px) {
  :root,
  [data-theme="light"],
  [data-theme="dark"],
  [data-theme="sepia"] {
    --wide: min(64rem, 100%);
    --read-col: min(42rem, 100%);
    --desk-pad: 36px;
    --tabbar: 0px;
  }

  .app {
    flex-direction: row;
  }

  .nav {
    display: flex;
    flex-direction: column;
    width: 248px;
    flex-shrink: 0;
    align-self: stretch;
    min-height: 0;
    background: var(--surface);
    color: var(--text);
    border-right: 1px solid var(--border);
    padding: 22px 16px 18px;
    overflow-y: auto;
  }

  .nav .brand {
    padding: 4px 8px 22px;
  }

  .nav .brand-name {
    font-family: Newsreader, Georgia, serif;
    font-size: 1.28rem;
    font-weight: 600;
  }

  .nav .brand-sub {
    letter-spacing: 0.04em;
  }

  .nav-item {
    border-radius: 12px;
    color: var(--nav-text);
    padding: 10px 12px;
  }

  .nav-item .icon {
    color: var(--nav-text);
  }

  .nav-item:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
  }

  .nav-item[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 600;
  }

  .nav-item[aria-current="page"] .icon {
    color: var(--accent-strong);
  }

  .bottom-tabs {
    display: none !important;
  }

  .topbar {
    display: none;
  }

  .main {
    background: var(--bg);
  }

  .content {
    max-width: none;
    padding: 18px var(--desk-pad) 40px;
  }

  #view-home,
  #view-selector,
  #view-search,
  #view-favs,
  #view-settings,
  #view-history {
    max-width: 52rem;
    margin: 0 auto;
    width: 100%;
  }

  body.is-reading .content {
    max-width: none;
    padding-bottom: 40px;
  }

  body.is-reading #view-chapter {
    max-width: var(--read-col);
    margin: 0 auto;
  }

  .page-head {
    margin-bottom: 10px;
  }

  .page-title {
    font-size: 1.55rem;
  }

  .page-head a[href="#/inicio"] {
    display: none;
  }

  .index-tabs {
    gap: 28px;
    margin-bottom: 16px;
  }

  .book-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }

  .book-row {
    padding: 13px 4px;
  }

  .search-round {
    max-width: 26rem;
    margin: 4px 0 16px;
  }

  .testament-bar {
    position: static;
    justify-content: flex-start;
    gap: 32px;
    padding: 20px 4px 0;
  }

  .home-ok {
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) minmax(300px, 1.15fr);
    gap: 8px 40px;
    max-width: none;
    margin: 0;
  }

  .home-brand {
    margin-bottom: 8px;
  }

  .read-fabs {
    left: calc(248px + (100% - 248px) / 2);
    bottom: 28px;
    width: min(42rem, calc(100% - 248px - 72px));
  }

  .verses-card {
    padding-bottom: 72px;
  }

  .verse-dock {
    margin-left: auto;
    margin-right: auto;
  }

  .toast {
    bottom: 24px;
  }

  body.has-dock .toast {
    bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transform: none !important;
  }

  .screen {
    animation: none;
  }
}

.group-label {
  flex: 1 0 100%;
  margin: 12px 0 4px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.verse-msg {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 0.95rem;
  font-family: system-ui, sans-serif;
}

.verse-msg p {
  margin: 6px 0 0;
}

#chapter-jump:not([hidden]) {
  display: inline-block;
  width: 5rem;
  margin-left: 8px;
}

.err {
  color: var(--danger);
}

.ok {
  color: var(--accent);
}

.page-auth .err,
.page-perfil .err,
.acct-main .err {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.22);
}

.page-auth .ok,
.page-perfil .ok,
.acct-main .ok {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent-strong);
}

.field-label {
  display: block;
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: 13px;
}

#chapter-jump-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.input-narrow {
  width: 6rem;
  flex: none;
}

.split-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.card-link,
.card-link-btn {
  display: block;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.card-link:hover,
.card-link-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.card-hero .card-title {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.card-verse {
  border-left: 3px solid var(--accent);
}

.card-verse .verse-preview {
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  line-height: 1.7;
  margin: 10px 0 6px;
}

.card-verse .verse-preview::before {
  content: "“";
  display: block;
  font-size: 2.4rem;
  line-height: 0.7;
  color: var(--accent);
  font-family: Newsreader, Georgia, serif;
}

.cite-line {
  font-weight: 600;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.book-grid .group-label {
  grid-column: 1 / -1;
  margin: 12px 0 0;
}

.book-chip {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  min-height: 64px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.book-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.book-chip-abbr {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.book-chip-name {
  font-weight: 600;
  font-size: 14px;
}

.book-chip-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.search-hit {
  display: block;
  width: 100%;
  text-align: left;
}

.list-item a.search-hit-go {
  margin-top: 8px;
}

.page-auth,
.page-perfil {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.page-auth {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-box {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  animation: rise 280ms var(--ease);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  text-align: center;
}

.auth-brand .brand-name {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.btn-google {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
  gap: 10px;
}

.btn-google:hover:not(:disabled) {
  background: var(--accent-soft);
}

.g-icon {
  width: 18px;
  height: 18px;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 8px;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-foot {
  text-align: center;
  margin-top: 16px;
}

.auth-steps {
  padding-left: 1.2rem;
  line-height: 1.55;
}

.auth-code {
  display: block;
  margin-top: 6px;
  padding: 8px;
  background: var(--bg);
  border-radius: 8px;
  word-break: break-all;
  font-size: 12px;
}

.share-preview {
  max-height: 6rem;
  overflow: auto;
  font-family: Newsreader, Georgia, serif;
  line-height: 1.5;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.share-wa,
.share-tg {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.share-wa { background: #25D366; }
.share-tg { background: #2AABEE; }

.share-modal .sec-title {
  margin: 16px 0 8px;
}

.share-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.share-scene-cats {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0 0 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.share-scene-cats::-webkit-scrollbar {
  display: none;
}

.share-scene-cats .quiz-cat {
  flex-shrink: 0;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 13px;
}

.share-scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px;
}

.share-scene {
  appearance: none;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: center;
}

.share-scene.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent);
}

.share-scene-swatch {
  display: block;
  height: 44px;
  border-radius: 8px;
}

.share-scene-name {
  display: block;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-card-wrap {
  margin: 0 0 12px;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  place-items: center;
}

#share-card {
  display: block;
  width: min(100%, 260px);
  height: auto;
  border-radius: 8px;
}

.auth-box h1 {
  margin: 0 0 8px;
  text-align: center;
  font-family: Newsreader, Georgia, serif;
  font-weight: 500;
}

.auth-box .lede {
  margin-bottom: 16px;
  text-align: center;
}

.auth-box .btn-primary,
.auth-box .btn-google {
  width: 100%;
  min-height: 44px;
}

.auth-box .auth-foot a {
  color: var(--accent-strong);
  font-weight: 600;
}

.page-missing .auth-box .btn-primary {
  margin-top: 8px;
}

.auth-box label,
.simple-main label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.auth-box .stack,
.simple-main .stack {
  gap: 14px;
}

.simple-main .stack {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.simple-app {
  min-height: 100vh;
  background: var(--bg);
}

.simple-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  background: var(--nav);
  color: var(--nav-text);
}

.simple-bar a {
  color: var(--nav-text);
}

.simple-main {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 24px 16px;
}

body.page-perfil {
  overflow: hidden;
  height: 100dvh;
  max-height: 100dvh;
}

.acct-app {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

body.page-perfil .bottom-tabs {
  flex-shrink: 0;
  z-index: 5;
}

.acct-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.acct-top a {
  font-family: Newsreader, Georgia, serif;
  font-weight: 600;
}

.acct-top form {
  margin: 0;
}

.acct-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 52rem;
  min-height: 0;
  margin: 0 auto;
  padding: 16px 16px 28px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.acct-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 22px;
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.acct-avatar {
  width: 56px;
  height: 56px;
  font-size: 1.05rem;
}

.acct-kicker {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.acct-hero h1 {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 600;
}

.acct-meta {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.acct-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.acct-hero-actions form {
  margin: 0;
}

@media (max-width: 1099px) {
  .acct-top {
    flex-shrink: 0;
  }

  .acct-hero-actions form {
    display: none;
  }

  .acct-hero {
    gap: 12px;
    margin-bottom: 14px;
    padding: 16px;
  }

  .acct-hero-actions .btn {
    flex: 1 1 8rem;
  }

  .acct-actions .btn {
    width: 100%;
  }

  .acct-card label {
    margin-top: 14px;
  }
}

.acct-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.acct-card {
  margin-bottom: 0;
}

.acct-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
}

.acct-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin: 0 0 14px;
}

.acct-dl dt {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.acct-dl dd {
  margin: 4px 0 0;
  font-size: 15px;
}

.acct-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.acct-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 600;
}

.acct-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .split-cards {
    grid-template-columns: 1fr;
  }

  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  }

  .card {
    padding: 16px;
  }

  .card-hero .card-title {
    font-size: 1.25rem;
  }

  .auth-box {
    padding: 24px 18px;
  }

  .page-auth {
    padding: 16px;
    align-items: start;
  }
}

@media (max-width: 520px) {
  .chapter-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .search-bar {
    flex-direction: column;
  }

  .search-bar .btn {
    width: 100%;
  }

  .btn-row > .btn,
  .btn-row > a.btn {
    flex: 1 1 auto;
  }

  .verse-actions .btn {
    flex: 1 1 calc(50% - 6px);
  }

  .mark-row {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .swatch {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .chip-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .chip {
    flex: 0 0 auto;
  }

  .tabs-inner {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .verses-card {
    padding: 12px 10px 20px;
  }

  .chapter-toolbar.card {
    padding: 10px 12px;
  }
}

@media (max-width: 420px) {
  .bottom-tabs a {
    font-size: 10px;
    padding: 6px 0;
    gap: 1px;
  }
}

@media (max-width: 380px) {
  .verse-dock-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottom-tabs a {
    font-size: 10px;
    padding: 6px 1px;
  }

  .book-grid {
    grid-template-columns: 1fr 1fr;
  }

  .grid-chapters {
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  }
}

@media (max-width: 800px) and (max-height: 500px) {
  .bottom-tabs a {
    min-height: 44px;
    gap: 0;
  }

  .bottom-tabs .tab-text {
    display: none;
  }

  .topbar {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .content {
    padding-top: 10px;
  }
}

.verse-dock {
  max-width: var(--read-col);
  width: calc(100% - (2 * var(--gutter)));
  margin-left: auto;
  margin-right: auto;
}

@media (hover: none) {
  .verse:hover {
    background: transparent;
  }

  .verse.is-marked:hover {
    background: var(--mark-bg, var(--mark));
  }

  .btn:hover:not(:disabled) {
    background: var(--surface);
  }

  .btn-primary:hover:not(:disabled) {
    filter: none;
    background: var(--accent);
  }

  .book-chip:hover,
  .card-link:hover,
  .card-link-btn:hover {
    background: var(--surface);
    border-color: var(--border);
  }
}

/* ——— Casco tipo app (inicio, índice, lectura) ——— */

.page-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin: 0 0 4px;
}

.page-head h2,
.page-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.page-head .btn-ghost {
  color: var(--text-muted);
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 18px;
}

.home-brand .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
}

.home-brand .brand-name {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
}

.home-brand .brand-sub {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.75;
}

.sec-title {
  margin: 22px 0 12px;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
}

#view-home:has(#home-ok:not([hidden])) #home-status {
  display: none;
}

.home-ok {
  display: flex;
  flex-direction: column;
}

.home-col {
  min-width: 0;
}

#view-home {
  position: relative;
}

#view-home::before {
  content: "";
  position: absolute;
  inset: -20px -24px auto;
  height: 220px;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(196, 160, 122, 0.18), transparent 52%),
    radial-gradient(ellipse at 92% 8%, rgba(176, 156, 196, 0.12), transparent 48%);
  pointer-events: none;
  z-index: 0;
}

#view-home > * {
  position: relative;
  z-index: 1;
}

.votd-card {
  display: block;
  margin: 16px 0 4px;
  padding: 18px 18px 16px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  color: inherit;
}

.votd-card .verse-preview {
  margin: 8px 0 6px;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  line-height: 1.65;
}

.votd-card .cite-line {
  margin: 0;
  font-weight: 600;
}

.progress-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  color: inherit;
}

.progress-card .progress-ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.progress-card .progress-body {
  flex: 1;
  min-width: 0;
}

.progress-card .progress-name {
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 15px;
}

.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-track > span {
  display: block;
  height: 100%;
  width: var(--pct, 0%);
  background: var(--accent);
  transition: width 220ms var(--ease);
}

.progress-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}

.tile-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tile-row.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 96px;
  padding: 14px 6px;
  background: var(--tile);
  border: 0;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(44, 36, 28, 0.05);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.tile:hover {
  background: var(--accent-soft);
  box-shadow: 0 4px 16px rgba(44, 36, 28, 0.07);
}

.tile .icon {
  width: 24px;
  height: 24px;
  color: #5C5148;
}

[data-theme="dark"] .tile .icon {
  color: var(--accent);
}

.index-tabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  margin: 0 0 12px;
}

.index-tabs button {
  appearance: none;
  border: 0;
  background: none;
  padding: 10px 0 12px;
  color: var(--text-muted);
  font-family: Newsreader, Georgia, serif;
  font-size: 1.05rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.index-tabs button.is-on {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.search-round {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F3F1EE;
  border-radius: 999px;
  padding: 0 14px;
  margin-bottom: 8px;
}

[data-theme="dark"] .search-round {
  background: var(--tile);
}

.search-round .input {
  border: 0;
  background: transparent;
  min-height: 42px;
}

.book-list {
  display: grid;
  grid-template-columns: 1fr;
}

.book-row[hidden] {
  display: none;
}

.book-empty {
  grid-column: 1 / -1;
  margin: 12px 0;
}

.book-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 15px 2px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.12rem;
}

.book-row.is-on {
  color: var(--accent);
  font-weight: 600;
}

.book-row .pct {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.num-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.num-grid a,
.num-grid button {
  appearance: none;
  display: grid;
  place-items: center;
  min-height: 56px;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: Newsreader, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.num-grid a.is-on,
.num-grid button.is-on {
  color: var(--accent);
}

.testament-bar {
  display: flex;
  justify-content: space-around;
  gap: 12px;
  padding: 14px 4px 4px;
}

.testament-bar button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-family: Newsreader, Georgia, serif;
  font-size: 1rem;
  cursor: pointer;
  min-height: 44px;
}

.testament-bar button.is-on {
  color: var(--accent);
  font-weight: 600;
}

.more-pop {
  position: absolute;
  right: 8px;
  top: 48px;
  z-index: 20;
  min-width: 180px;
  padding: 8px 0;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(44, 36, 28, 0.16);
}

.more-pop a,
.more-pop button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font-size: 15px;
}

.more-wrap {
  position: relative;
}

.history-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--border);
  color: inherit;
}

.history-row strong {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
}

.chapter-heading {
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.9rem, 5vw, 2.35rem);
  font-weight: 600;
  color: var(--accent);
  margin: 8px 0 0;
}

.chapter-sub {
  margin: 4px 0 18px;
  color: var(--accent);
  font-family: Newsreader, Georgia, serif;
  font-size: 1.05rem;
  opacity: 0.85;
}

.chapter-sub:empty {
  display: none;
}

.verses-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 4px 2px 88px;
}

.read-fabs {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar) + 18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(100%, var(--read-col));
  padding: 0 var(--gutter);
  display: none;
  justify-content: space-between;
  pointer-events: none;
  z-index: 12;
  margin: 0;
}

body.is-reading .read-fabs {
  display: flex;
}

body.has-dock .read-fabs {
  display: none;
}

.read-fabs .fab {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #6E645B;
  box-shadow: 0 8px 20px rgba(44, 36, 28, 0.14);
  display: grid;
  place-items: center;
  cursor: pointer;
}

[data-theme="dark"] .read-fabs .fab {
  background: rgba(38, 32, 25, 0.94);
  color: var(--text-muted);
}

.read-fabs .fab:disabled {
  opacity: 0.28;
}

#ch-bookmark[aria-pressed="true"] {
  color: var(--accent);
}

.bottom-tabs {
  box-shadow: 0 -6px 20px rgba(44, 36, 28, 0.04);
}

.bottom-tabs a[aria-current="page"] .icon {
  color: var(--nav-active);
}

@media (max-width: 1099px) {
  .testament-bar {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg);
    padding-top: 4px;
    padding-bottom: 8px;
  }
}

.page-auth {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(196, 160, 122, 0.16), transparent 50%),
    var(--page);
}

.auth-box {
  border: 0;
}

.screen-flush {
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

@media (max-width: 420px) {
  .tile-row.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .tile {
    min-height: 84px;
    font-size: 11px;
  }

  .num-grid a,
  .num-grid button {
    min-height: 48px;
    font-size: 1.05rem;
  }
}

/* Estas reglas van al final: el casco de app no debe pisar tablet ni escritorio. */
@media (min-width: 720px) and (max-width: 1099px) {
  .book-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
  }

  .num-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (min-width: 1100px) {
  .nav {
    display: flex;
  }

  .bottom-tabs {
    display: none !important;
  }

  .topbar {
    display: none;
  }

  #view-home,
  #view-selector,
  #view-favs,
  #view-history,
  #view-search,
  #view-settings,
  #view-quiz,
  #view-create {
    max-width: min(80rem, 100%);
    margin: 0 auto;
    width: 100%;
  }

  body.is-reading #view-chapter {
    max-width: var(--read-col);
    margin: 0 auto;
  }

  .home-ok {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.15fr);
    gap: 8px 40px;
  }

  .book-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    column-gap: 28px;
  }

  .book-row:hover {
    color: var(--accent-strong);
  }

  .search-round {
    width: min(100%, 22rem);
    max-width: 22rem;
  }

  #view-search:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 46rem;
    margin: 0 auto;
    width: 100%;
  }

  #view-search .page-head {
    grid-column: 1 / -1;
  }

  #view-settings:not([hidden]) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    align-items: start;
  }

  #view-settings .page-head,
  #view-settings .sec-title {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  #view-settings .card {
    margin-bottom: 0;
  }

  #history-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 36px;
    width: 100%;
  }

  #history-list > .empty {
    grid-column: 1 / -1;
  }

  .read-fabs {
    left: calc(248px + (100% - 248px) / 2);
    bottom: 28px;
    width: min(42rem, calc(100% - 248px - 72px));
  }

  .page-head a[href="#/inicio"] {
    display: none;
  }

  .testament-bar {
    justify-content: flex-start;
    gap: 28px;
  }

  body.page-perfil {
    overflow: hidden;
    height: 100dvh;
  }

  .acct-app {
    flex-direction: row;
    align-items: stretch;
    height: 100dvh;
    overflow: hidden;
  }

  .acct-top {
    display: none;
  }

  .acct-main {
    max-width: none;
    padding: 28px 40px 48px;
    overflow: auto;
  }

  .acct-hero {
    flex-direction: row;
    align-items: center;
    padding: 22px 24px;
  }

  .acct-hero-copy {
    flex: 1;
    min-width: 0;
  }

  .acct-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }

  .acct-side,
  .acct-actions {
    grid-column: 1 / -1;
  }

  #view-quiz {
    max-width: 44rem;
  }
}

.quiz-lobby .lede {
  margin-bottom: 16px;
}

.quiz-how {
  margin: 0 0 20px;
  padding: 14px 16px 14px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.quiz-how li + li {
  margin-top: 6px;
}

.quiz-opt:disabled {
  cursor: default;
}

.quiz-start:disabled,
#quiz-again:disabled {
  opacity: 0.7;
  cursor: wait;
}

.quiz-best-score {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.2rem;
}

.quiz-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.quiz-cat {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  min-height: 40px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.quiz-cat.is-on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.quiz-start {
  width: 100%;
}

.quiz-progress {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.quiz-track {
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 16px;
}

.quiz-track > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 220ms var(--ease);
}

.quiz-cat-label {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quiz-prompt {
  margin: 0 0 16px;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  font-weight: 600;
  line-height: 1.35;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.quiz-opt {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  border-radius: 14px;
  min-height: 48px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 16px;
}

.quiz-opt:hover:not(:disabled) {
  background: var(--accent-soft);
}

.quiz-opt.is-right {
  border-color: var(--verse-num);
  background: rgba(61, 155, 85, 0.12);
}

.quiz-opt.is-wrong {
  border-color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
}

.quiz-explain {
  margin-bottom: 12px;
}

.quiz-explain .btn {
  margin-top: 8px;
}

.quiz-score {
  margin: 0 0 8px;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 600;
}

#quiz-next {
  width: 100%;
}

.create-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.create-lede {
  max-width: 40rem;
  margin: 0 0 18px;
}

.create-shell {
  display: grid;
  gap: 16px;
}

@media (min-width: 960px) {
  .create-shell {
    grid-template-columns: 248px minmax(0, 1fr);
    align-items: start;
  }
}

.create-rail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}

.create-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
}

@media (min-width: 1100px) {
  .create-workspace {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: start;
  }

  .create-toolbar {
    grid-column: 1 / -1;
  }
}

.create-page:not(.is-cards) #create-share {
  display: none;
}

.create-toolbar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.create-toolbar-head .create-step-title {
  margin: 0;
}

.create-mode {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.create-mode-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  min-height: 36px;
  min-width: 44px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}

.create-mode-btn:hover {
  color: var(--text);
}

.create-mode-btn.is-on {
  background: var(--text);
  color: var(--bg);
}

.create-toolbar,
.create-inspector,
.create-dock #create-tray-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
}

.create-step-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.create-toolbar-row {
  display: grid;
  gap: 10px;
}

@media (min-width: 720px) {
  .create-toolbar-row {
    grid-template-columns: minmax(0, 1.4fr) minmax(200px, 0.8fr);
    align-items: end;
  }
}

.create-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.create-preview-head .create-step-title {
  margin: 0;
}

.create-dock {
  display: grid;
  gap: 14px;
}

.create-inspector-grid {
  display: grid;
  gap: 4px;
}

@media (min-width: 720px) {
  .create-inspector-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 16px;
    align-items: start;
  }
}

.create-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0 0 8px;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.create-tab-hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.create-tab,
.create-chip {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  min-height: 36px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}

.create-tab:hover,
.create-chip:hover {
  color: var(--text);
}

.create-tab.is-on,
.create-chip.is-on {
  background: var(--text);
  color: var(--bg);
}

.create-pick {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 0;
}

@media (min-width: 720px) {
  .create-pick {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.65fr) minmax(0, 0.65fr);
  }

  .create-toolbar.is-range .create-pick {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.55fr) minmax(0, 0.55fr) minmax(0, 0.55fr);
  }
}

#create-range[hidden] {
  display: none !important;
}

.create-pick .create-field {
  margin-bottom: 0;
}

.create-search {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
}

.create-search .input {
  flex: 1;
  border-radius: 999px;
  padding-left: 16px;
}

.create-search .btn {
  flex-shrink: 0;
}

.create-hits {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
  max-height: 12rem;
  overflow: auto;
}

.create-hit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
}

.create-hit {
  appearance: none;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  color: inherit;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.create-hit-add {
  min-height: 44px;
  align-self: center;
}

.create-page.is-cards .create-hit-add {
  display: none;
}

.create-page.is-cards .create-hit-row {
  grid-template-columns: 1fr;
}

.create-hit:hover {
  border-color: var(--accent);
}

.create-hit strong {
  display: block;
  font-size: 13px;
}

.create-picked {
  margin: 10px 0 0;
  padding: 10px 12px;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.45;
  background: var(--accent-soft);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}

.create-field,
.create-caption {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.create-gallery,
.create-side {
  min-width: 0;
}

.create-inspector {
  padding: 16px 18px;
  margin-bottom: 0;
}

.create-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.create-chip {
  border: 1px solid var(--border);
  background: var(--surface);
}

.create-tools {
  display: grid;
  gap: 12px;
}

.create-color-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.create-color {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.create-color-well {
  position: relative;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 3px var(--surface);
}

.create-color-well input {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  padding: 0;
  border: 0;
  cursor: pointer;
  background: none;
}

.create-hint {
  margin: 0;
  font-size: 12px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.create-tray {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 16px;
}

.create-tray-item {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 4.5rem auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.create-toolbar .create-tray-item {
  background: var(--bg);
}

.create-pick-actions {
  margin-top: 10px;
}

.create-verse-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}

.create-vchip {
  appearance: none;
  min-width: 36px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.create-vchip:hover {
  border-color: var(--accent);
}

.create-vchip.is-on {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.create-vchip.is-anchor {
  box-shadow: 0 0 0 2px var(--accent);
}

.create-toolbar #create-tray-wrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  background: transparent;
  border-radius: 0;
}

.create-tray-cite {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  color: inherit;
  cursor: pointer;
  min-height: 44px;
}

.create-tray-item .input {
  min-width: 0;
}

@media (max-width: 720px) {
  .create-tray-item {
    grid-template-columns: 1fr 1fr;
  }
}

.create-preview-wrap {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(196, 160, 122, 0.18), transparent 55%),
    linear-gradient(180deg, #E9DFD2 0%, #D8CDBE 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 16px 26px;
  display: grid;
  place-items: center;
  margin-bottom: 0;
  min-height: 380px;
}

[data-theme="dark"] .create-preview-wrap {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 180, 131, 0.12), transparent 55%),
    linear-gradient(180deg, #2A241C 0%, #1A1612 100%);
}

.create-preview-label {
  position: absolute;
  top: 12px;
  left: 16px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.create-preview-wrap.is-story #create-canvas {
  width: min(100%, 200px);
}

.create-phone {
  display: grid;
  place-items: center;
}

.create-phone.is-on {
  padding: 16px 12px 20px;
  background: #1a1612;
  border-radius: 28px;
  box-shadow: inset 0 0 0 2px #3a322c;
}

.create-phone.is-on #create-canvas {
  width: min(100%, 200px);
  border-radius: 16px;
}

.create-temps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 0;
}

@media (max-width: 959px) {
  .create-temps {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  }
}

.create-temp {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 8px 8px 10px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  display: grid;
  gap: 6px;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}

.create-temp:hover {
  border-color: var(--accent);
}

.create-temp.is-on {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.create-temp-art {
  display: block;
  height: 88px;
  border-radius: 12px;
  background-color: #FFFFFF;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px solid var(--border);
}

.create-temp strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  padding: 0 4px;
}

.create-temp-tag {
  display: block;
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 11px;
}

.create-preview-wrap #create-canvas,
#create-canvas {
  display: block;
  width: min(100%, 640px);
  height: auto;
  border-radius: 4px;
  background: #FFFCFA;
  box-shadow: 0 18px 40px rgba(44, 36, 28, 0.18);
}

.create-actions {
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  .create-temp,
  .create-tab,
  .create-chip,
  .create-mode-btn,
  .create-vchip,
  .create-hit,
  .create-wall-card {
    transition: none;
  }

  .create-wall-card:hover {
    transform: none;
  }
}

.create-wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.create-wall-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease);
}

.create-wall-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(44, 36, 28, 0.1);
}

.create-wall-media {
  background: var(--bg);
}

.create-wall-media.is-empty {
  display: grid;
  place-items: center;
  min-height: 8rem;
  padding: 0.75rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.create-wall-card img,
.create-wall-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #EDE4D4;
}

.create-wall-meta {
  display: grid;
  gap: 6px;
  padding: 12px 12px 14px;
}

.create-wall-meta strong {
  font-size: 14px;
}

.create-wall-caption {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.create-wall-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.create-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.create-status.is-pending {
  background: #F4E4C4;
  color: #6B4F1D;
}

.create-status.is-approved {
  background: #D7E8D4;
  color: #2B5A2A;
}

.create-status.is-rejected {
  background: #F3D6D4;
  color: #7A2A24;
}

.create-board-head {
  margin-bottom: 16px;
}

.create-board-title {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.create-empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 28px 22px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 18px;
  margin-bottom: 16px;
}

.create-empty p {
  margin: 0;
}

.create-theme-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.create-theme {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 0;
  appearance: none;
}

.create-theme.is-on {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text);
}

.create-page.is-cards .create-temp-art {
  height: 110px;
}

.create-temp-art.is-card {
  background-size: cover;
}

.help-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.help-faq {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 0 14px;
}

.help-faq summary {
  cursor: pointer;
  list-style: none;
  min-height: 48px;
  display: flex;
  align-items: center;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.help-faq summary::-webkit-details-marker {
  display: none;
}

.help-faq-body {
  padding: 0 0 14px;
}

.help-faq-body p {
  margin: 0 0 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.help-about {
  margin-top: 8px;
}

.help-tips {
  margin: 0;
  padding: 0 0 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.help-tips li {
  margin-bottom: 8px;
}

.help-tips li:last-child {
  margin-bottom: 0;
}

.soporte-hub-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.support-hub-badge {
  align-self: flex-start;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #C4A07A) 22%, var(--surface));
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.soporte-subnav,
.soporte-filter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
}

.soporte-subnav-link,
.soporte-filter-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.soporte-subnav-link .icon,
.soporte-filter-link .icon {
  width: 16px;
  height: 16px;
}

.soporte-subnav-link:hover,
.soporte-filter-link:hover {
  background: color-mix(in srgb, var(--accent, #C4A07A) 12%, var(--surface));
  color: var(--text);
}

.soporte-subnav-link.is-on,
.soporte-filter-link.is-on {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--text) 18%, transparent);
}

.support-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 720px) {
  .support-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.support-kpi {
  text-align: center;
  padding: 14px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
}

.support-kpi p {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.support-kpi strong {
  font-size: 1.35rem;
}

.support-kpi strong.is-hot {
  color: var(--accent, #C4A07A);
}

.support-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 720px) {
  .support-section-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.support-section-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}

.support-section-card:hover {
  border-color: var(--accent, #C4A07A);
}

.support-section-card strong {
  display: block;
  margin-bottom: 4px;
}

.support-section-card .muted {
  display: block;
  font-size: 0.88rem;
}

.support-section-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--accent, #C4A07A) 22%, var(--surface));
  color: var(--text);
}

.support-section-card__icon.is-ok {
  background: color-mix(in srgb, #22c55e 22%, var(--surface));
}

.support-inbox-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}

.support-inbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.support-inbox-title {
  margin: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-inbox-card .soporte-filter-nav {
  margin: 0;
  padding: 12px 16px 0;
}

.support-inbox-list {
  display: flex;
  flex-direction: column;
}

.support-inbox-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--border);
  border-left: 3px solid transparent;
  background: transparent;
  padding: 14px 16px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: background 150ms var(--ease), border-color 150ms var(--ease);
}

.support-inbox-row:hover {
  background: color-mix(in srgb, var(--accent, #C4A07A) 8%, var(--surface));
  border-left-color: var(--accent, #C4A07A);
}

.support-inbox-row.is-unread {
  border-left-color: var(--accent, #C4A07A);
}

.support-inbox-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.support-inbox-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.support-unread-pill {
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
}

.support-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--text-muted) 18%, var(--surface));
  color: var(--text);
}

.support-status-badge.is-open {
  background: color-mix(in srgb, #22c55e 22%, var(--surface));
}

.support-status-badge.is-answered {
  background: color-mix(in srgb, #38bdf8 22%, var(--surface));
}

.support-status-badge.is-closed {
  background: color-mix(in srgb, var(--text-muted) 16%, var(--surface));
}

.support-empty-state {
  padding: 2.2rem 1.2rem;
  text-align: center;
}

.support-compose-card,
.support-reply-card {
  max-width: 40rem;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
}

.support-compose-card h3,
.support-reply-title {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
}

.support-thread-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
}

.support-thread-head h3 {
  margin: 0 0 4px;
}

.support-crumb {
  margin: 0 0 10px;
}

.support-thread-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 240px;
  max-height: min(55vh, 28rem);
  overflow: auto;
  padding: 16px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 70%, var(--bg));
  scroll-behavior: smooth;
}

.support-msg-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  width: 100%;
}

.support-msg--incoming {
  justify-content: flex-start;
}

.support-msg--outgoing {
  justify-content: flex-end;
  flex-direction: row-reverse;
}

.support-msg-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--accent, #C4A07A) 22%, var(--surface));
  color: var(--text);
  border: 1px solid var(--border);
}

.support-msg-avatar.is-admin {
  background: color-mix(in srgb, #4f46e5 18%, var(--surface));
}

.support-bubble {
  max-width: min(85%, 32rem);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--text) 8%, transparent);
}

.support-msg--outgoing .support-bubble {
  border-bottom-right-radius: 6px;
  background: color-mix(in srgb, var(--accent, #C4A07A) 28%, var(--surface));
}

.support-msg--incoming .support-bubble {
  border-bottom-left-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.support-sender-badge {
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.support-body {
  white-space: pre-wrap;
  line-height: 1.5;
}

.support-msg-time {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

.support-msg-row.is-deleted .support-body {
  font-style: italic;
  opacity: 0.7;
}

.support-poll-hint {
  margin: 0 0 12px;
  font-size: 0.85rem;
}

.support-locked {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text-muted) 12%, var(--surface));
}

.btn-link {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.help-form.is-compose {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: static;
  padding-top: 8px;
  background: transparent;
}

.help-form.is-compose .btn {
  align-self: flex-start;
}

.support-chat {
  display: flex;
  flex-direction: column;
  min-height: min(70vh, 36rem);
  gap: 0;
}

.support-chat .support-thread-panel {
  flex: 1 1 auto;
  min-height: 220px;
  max-height: min(52vh, 28rem);
}

.support-chat-dock {
  position: sticky;
  bottom: calc(var(--tabbar, 64px) + 8px);
  z-index: 8;
  padding-top: 10px;
  background: var(--bg);
}

.support-reply-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.support-reply-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 650;
}

.help-form.is-compose {
  display: grid;
  gap: 10px;
}

.help-form.is-compose textarea.input {
  min-height: 72px;
  resize: vertical;
}

.content:has(#view-help:not([hidden])) {
  display: flex;
  flex-direction: column;
  max-width: none;
  padding: 0;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
}

#view-help:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

#view-help .wa-list-head.page-head {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0;
  min-height: 56px;
  padding: 6px 6px 6px 2px;
  padding-top: max(6px, env(safe-area-inset-top));
  background: #075E54;
  color: #fff;
}

#view-help .wa-list-head .page-title {
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: 0;
  color: #fff;
}

#view-help .wa-list-head .btn-ghost {
  color: #fff;
}

[data-theme="dark"] #view-help .wa-list-head.page-head,
[data-theme="dark"] .wa-hub {
  background: #1f2c34;
}

[data-theme="dark"] .wa-tab.is-on {
  color: #1f2c34;
}

.wa-hub {
  margin: 0;
  padding: 0 10px 10px;
  background: #075E54;
}

.wa-tabs {
  display: flex;
  gap: 8px;
}

.wa-tab {
  appearance: none;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
}

.wa-tab .icon {
  width: 16px;
  height: 16px;
}

.wa-tab.is-on {
  background: #fff;
  color: #075E54;
}

.wa-inbox:not([hidden]),
.wa-faq:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--surface);
}

.wa-faq {
  padding: 12px 16px 24px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.wa-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 10px 12px 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.wa-filters::-webkit-scrollbar {
  display: none;
}

.wa-filters .soporte-filter-link {
  flex-shrink: 0;
}

.wa-chat-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.wa-chat-list .support-empty-state {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 28px 20px;
}

.wa-tab .nav-count {
  margin-left: 4px;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: #052e16;
  font-size: 11px;
  font-weight: 800;
}

.wa-tab .nav-count[hidden] {
  display: none !important;
}

.wa-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.wa-row:hover,
.wa-row:focus-visible {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.wa-row-avatar,
.wa-head-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #128C7E;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.wa-row-main {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
}

.wa-row-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.wa-row-top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.02rem;
}

.wa-row-top time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.wa-row.is-unread .wa-row-top time {
  color: #128C7E;
  font-weight: 700;
}

.wa-row-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.wa-row.is-unread .wa-row-preview {
  color: var(--text);
  font-weight: 600;
}

.wa-unread {
  flex-shrink: 0;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: #052e16;
  font-size: 11px;
  font-weight: 800;
}

.wa-new-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 14px 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(196, 160, 122, 0.12), transparent 40%),
    #ece5dd;
}

[data-theme="dark"] .wa-new-body {
  background:
    radial-gradient(circle at 80% 0, rgba(18, 140, 126, 0.18), transparent 45%),
    #0b141a;
}

.wa-new-hint {
  margin: 0 0 12px;
  color: #54656f;
  font-size: 13px;
}

.wa-new-room .help-form.is-compose {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
}

[data-theme="dark"] .wa-new-room .help-form.is-compose {
  background: #1f2c34;
}

.wa-room:not([hidden]) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.wa-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 6px 8px;
  padding-top: max(6px, env(safe-area-inset-top));
  background: #075E54;
  color: #fff;
}

.wa-head .btn-ghost {
  color: #fff;
}

.wa-head-avatar {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.wa-head-copy {
  min-width: 0;
  flex: 1;
}

.wa-head-copy h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-head-copy .muted {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.wa-head .support-status-badge {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.wa-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background:
    radial-gradient(circle at 20% 10%, rgba(196, 160, 122, 0.12), transparent 40%),
    #ece5dd;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

[data-theme="dark"] .wa-panel {
  background:
    radial-gradient(circle at 80% 0, rgba(18, 140, 126, 0.18), transparent 45%),
    #0b141a;
}

.wa-msg {
  display: flex;
  width: 100%;
}

.wa-msg.is-in {
  justify-content: flex-start;
}

.wa-msg.is-out {
  justify-content: flex-end;
}

.wa-bubble {
  max-width: min(82%, 28rem);
  padding: 6px 8px 4px 10px;
  border-radius: 8px;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

.wa-msg.is-in .wa-bubble {
  background: #fff;
  color: #111b21;
  border-top-left-radius: 0;
}

.wa-msg.is-out .wa-bubble {
  background: #d9fdd3;
  color: #111b21;
  border-top-right-radius: 0;
}

[data-theme="dark"] .wa-msg.is-in .wa-bubble {
  background: #1f2c34;
  color: #e9edef;
}

[data-theme="dark"] .wa-msg.is-out .wa-bubble {
  background: #005c4b;
  color: #e9edef;
}

.wa-bubble-text {
  margin: 0 4px 2px 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.35;
}

.wa-bubble-meta {
  display: block;
  text-align: right;
  font-size: 11px;
  color: #667781;
  margin-top: 2px;
}

[data-theme="dark"] .wa-bubble-meta {
  color: rgba(233, 237, 239, 0.65);
}

.wa-msg.is-deleted .wa-bubble-text {
  font-style: italic;
  opacity: 0.7;
}

.wa-msg-tools {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.wa-msg-tools .btn-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: #667781;
  font-size: 11px;
  cursor: pointer;
  min-height: 24px;
}

.wa-dock {
  flex-shrink: 0;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  background: #f0f2f5;
}

[data-theme="dark"] .wa-dock {
  background: #1d1f20;
}

.wa-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.wa-input {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 22px;
  background: #fff;
  color: #111b21;
  font: inherit;
  font-size: 16px;
  line-height: 1.3;
  resize: none;
}

[data-theme="dark"] .wa-input {
  background: #2a3942;
  color: #e9edef;
}

.wa-send {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #128C7E;
  color: #fff;
  cursor: pointer;
}

.wa-send .icon {
  width: 20px;
  height: 20px;
}

.wa-send:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.wa-dock .support-locked {
  margin: 0 8px 8px;
  color: var(--text-muted);
  font-size: 13px;
}

body.is-help-chat .nav,
body.is-help-chat .topbar,
body.is-help-chat .bottom-tabs {
  display: none !important;
}

body.is-help-chat .app,
body.is-help-chat .main,
body.is-help-chat .content,
body.is-help-chat #view-help.is-chat,
body.is-help-chat #help-thread-view,
body.is-help-chat #help-composer {
  max-width: none;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  padding: 0;
}

body.is-help-chat .content {
  overflow: hidden;
  padding-bottom: 0;
}

body.is-help-chat #view-help.is-chat {
  display: flex;
  flex-direction: column;
}

@media (min-width: 1100px) {
  body.is-help-chat .nav {
    display: flex !important;
  }

  body.is-help-chat .app,
  body.is-help-chat .main,
  body.is-help-chat .content {
    height: auto;
    min-height: 100dvh;
  }

  body.is-help-chat #view-help.is-chat,
  body.is-help-chat #help-thread-view,
  body.is-help-chat #help-composer {
    height: calc(100dvh - 48px);
  }
}

.help-msg-tools {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.help-msg-tools .btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.nav-item .nav-count {
  margin-left: 6px;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent, #C4A07A) 28%, var(--surface));
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.soporte-subnav-link .nav-count {
  margin-left: 4px;
}

.nav-item .nav-count[hidden],
.soporte-subnav-link .nav-count[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .support-thread-panel {
    scroll-behavior: auto;
  }

  .soporte-subnav-link,
  .soporte-filter-link,
  .support-section-card,
  .support-inbox-row {
    transition: none;
  }
}

.content:has(#view-frasco:not([hidden])) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 8px;
}

.content:has(#view-frasco.is-regalo-open) {
  padding-top: 6px;
  padding-bottom: 6px;
}

#view-frasco:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#view-frasco .page-head {
  min-height: 36px;
  margin: 0 0 6px;
}

.regalo-menu[hidden],
.regalo-stage[hidden],
#view-frasco .frasco-frame[hidden] {
  display: none !important;
}

body.is-regalo-gift .nav,
body.is-regalo-gift .topbar,
body.is-regalo-gift .bottom-tabs {
  display: none !important;
}

body.is-regalo-gift .app,
body.is-regalo-gift .main,
body.is-regalo-gift .content,
body.is-regalo-gift #view-frasco {
  max-width: none;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  padding: 0;
}

body.is-regalo-gift .content {
  overflow: hidden;
}

body.is-regalo-gift .regalo-stage {
  position: relative;
  flex: 1;
  height: 100%;
  min-height: 0;
  gap: 0;
}

body.is-regalo-gift #regalo-back {
  position: absolute;
  z-index: 3;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  left: auto;
  background: rgba(255, 250, 248, 0.94);
  border-radius: 999px;
}

body.is-regalo-gift #view-frasco .frasco-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.regalo-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
  min-height: min(72vh, 640px);
  padding: 12px 8px 24px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.7) 0 18%, transparent 52%),
    linear-gradient(180deg, #fdf2f8 0%, #fffaf8 58%, #f7f3ee 100%);
}

.regalo-scene-kicker {
  margin: 0;
  color: #db2777;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.regalo-scene-lead {
  margin: 0 0 8px;
  color: #831843;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.35rem;
  text-align: center;
}

.regalo-stage-3d {
  position: relative;
  width: min(100%, 420px);
  height: 280px;
  perspective: 900px;
}

.regalo-envelope {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 58px;
  width: min(260px, 78vw);
  height: 168px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, 36px) scale(0.86);
  opacity: 0;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.regalo-menu.is-arrived .regalo-envelope {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
}

.regalo-menu.is-open .regalo-envelope {
  transform: translate(-50%, 28px) scale(0.88);
  opacity: 0.28;
  pointer-events: none;
}

.regalo-pocket,
.regalo-front,
.regalo-flap {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

.regalo-pocket {
  border-radius: 6px 6px 14px 14px;
  background: linear-gradient(180deg, #f4c4d2 0%, #de8aa3 100%);
  box-shadow: 0 18px 36px rgba(131, 24, 67, 0.22);
}

.regalo-front {
  top: 42%;
  background:
    linear-gradient(135deg, transparent 49.5%, #d8899c 50%, #d8899c 51%, transparent 51.5%),
    linear-gradient(225deg, transparent 49.5%, #d8899c 50%, #d8899c 51%, transparent 51.5%),
    linear-gradient(180deg, #fff1f5 0%, #ebb0c0 100%);
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 0 14px 14px;
}

.regalo-flap {
  height: 54%;
  transform-origin: top center;
  background: linear-gradient(180deg, #fde8ef 0%, #e397ab 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 4px 8px rgba(131, 24, 67, 0.12));
  transition: transform 0.62s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
}

.regalo-menu.is-opening .regalo-flap,
.regalo-menu.is-open .regalo-flap {
  transform: rotateX(188deg);
}

.regalo-seal {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 46%;
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f5d76e, #ca8a04 62%, #a16207);
  box-shadow: 0 6px 12px rgba(161, 98, 7, 0.28);
  transform: translate(-50%, -50%);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.regalo-menu.is-opening .regalo-seal,
.regalo-menu.is-open .regalo-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
}

.regalo-cards {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: end;
  gap: 12px;
  pointer-events: none;
}

.regalo-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
  min-height: 168px;
  width: 100%;
  padding: 18px 16px;
  border: 1px solid #f0d5dc;
  border-radius: 18px;
  background: #fffaf8;
  color: #4a3038;
  text-align: left;
  box-shadow: 0 16px 32px rgba(131, 24, 67, 0.12);
  cursor: pointer;
  opacity: 0;
  transform: translateY(48px) scale(0.72);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.regalo-menu.is-open .regalo-cards {
  pointer-events: auto;
  z-index: 5;
}

.regalo-menu.is-open .regalo-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.regalo-menu.is-open .regalo-card:first-child {
  transition-delay: 0.08s;
}

.regalo-menu.is-open .regalo-card:last-child {
  transition-delay: 0.18s;
}

.regalo-card:hover,
.regalo-card:focus-visible {
  border-color: #db2777;
  box-shadow: 0 18px 36px rgba(219, 39, 119, 0.16);
}

.regalo-card-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: #fce7ef;
  color: #db2777;
}

.regalo-card-kicker {
  color: #a85a6a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.regalo-card-title {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
  color: #831843;
}

.regalo-card-copy {
  color: #6b4450;
  font-size: 0.88rem;
  line-height: 1.35;
}

.regalo-skip {
  margin-top: 8px;
  min-height: 40px;
  color: #831843;
}

.regalo-skip[hidden] {
  display: none !important;
}

.regalo-envelope:focus-visible {
  outline: 2px solid #ca8a04;
  outline-offset: 6px;
  border-radius: 16px;
}

.regalo-stage {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 8px;
}

#view-frasco.is-regalo-open {
  min-height: 0;
}

#view-frasco.is-regalo-open .page-head,
#view-frasco.is-regalo-open .frasco-admin {
  display: none;
}

#regalo-back {
  align-self: flex-end;
  min-height: 40px;
}

#view-frasco .frasco-frame {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  border: 0;
  border-radius: 16px;
  background: #f7f3ee;
}

@media (min-width: 800px) {
  .regalo-stage-3d {
    width: min(100%, 520px);
    height: 300px;
  }

  .regalo-card {
    min-height: 188px;
    padding: 22px 20px;
  }

  .regalo-card-title {
    font-size: 1.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .regalo-envelope,
  .regalo-flap,
  .regalo-seal,
  .regalo-card {
    transition: none;
  }
}

@media (max-width: 700px) {
  #view-frasco .page-head {
    display: none;
  }

  #view-frasco .frasco-admin > .muted {
    display: none;
  }

  #view-frasco .frasco-admin {
    margin: 0 0 8px;
  }

  #view-frasco .frasco-admin-row select {
    flex: 1 1 8rem;
    min-width: 0;
  }
}

.frasco-admin {
  margin: 0 0 12px;
}

.frasco-admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.frasco-admin-row select {
  min-width: 16rem;
  max-width: 100%;
  background: #fff;
  color: #4a3038;
  border: 1px solid #f0d5dc;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
}
