
/* Rediseño móvil integral (2026-10-17):
   1) Inicio (#inicio)
   2) Planificación (#presupuestos)
   3) En Paciente: Ventana de Recetas (.fx-ov .rx-wide)
   4) En Paciente: Adjuntos y Fotos (#patientAttachmentsModal y tira Rx en #patientDetail)
   5) En Paciente / Rx: Visor Lightbox de Radiografías (#rxLightboxModal) */
@media (max-width: 834px) {
  /* ===== 1. INICIO (#inicio) ===== */
  html body #inicio .ini-top {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
  }
  html body #inicio .ini-greet {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
  html body #inicio .ini-greet .panel-title {
    font-size: 1.05rem !important;
    margin: 0 !important;
  }
  html body #inicio .ini-sub {
    font-size: .72rem !important;
    margin: 0 !important;
  }
  html body #inicio .ini-qa {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    width: 100% !important;
  }
  html body #inicio .ini-qa-btn,
  html body #inicio .ini-qa-btn:not(.main),
  html body #inicio .ini-qa-btn.main,
  html body #inicio .ini-qa-btn.ini-qa-cfg {
    width: 100% !important;
    min-height: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    font-size: .68rem !important;
    border-radius: 8px !important;
    gap: 4px !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  html body #inicio .ini-qa-btn .ic {
    width: 18px !important;
    height: 18px !important;
    border-radius: 5px !important;
    flex: 0 0 18px !important;
  }
  html body #inicio .ini-qa-btn .ic svg {
    width: 11px !important;
    height: 11px !important;
  }
  html body #inicio .summary {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin-bottom: 8px !important;
  }
  html body #inicio .summary .mini-card {
    padding: 6px 4px !important;
    min-height: 0 !important;
    height: auto !important;
    flex-direction: column !important;
    gap: 2px !important;
    border-radius: 10px !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  html body #inicio .summary .mini-card .mi-ic {
    width: 20px !important;
    height: 20px !important;
    border-radius: 6px !important;
    flex: 0 0 20px !important;
  }
  html body #inicio .summary .mini-card .mi-ic svg {
    width: 12px !important;
    height: 12px !important;
  }
  html body #inicio .summary .mini-card .mi-tx {
    display: flex !important;
    flex-direction: column-reverse !important;
    align-items: center !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  html body #inicio .summary .mini-card .mi-tx span {
    font-size: .54rem !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }
  html body #inicio .summary .mini-card .mi-tx strong {
    font-size: .92rem !important;
    line-height: 1.1 !important;
  }
  html body #inicio .ini-card {
    padding: 8px 10px !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
  }
  html body #inicio .ini-card > h2 {
    font-size: .88rem !important;
    margin: 0 0 5px !important;
  }
  html body #inicio .today-schedule-head {
    padding: 0 0 5px !important;
    margin-bottom: 5px !important;
    font-size: .72rem !important;
  }
  html body #inicio .timeline-v-point.start,
  html body #inicio .timeline-v-point.end,
  html body #inicio .timeline-v-node,
  html body #inicio .timeline-v-duration-badge,
  html body #inicio .today-v-timeline::before {
    display: none !important;
  }
  html body #inicio .today-v-timeline {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  html body #inicio .timeline-v-item {
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) !important;
    gap: 6px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: stretch !important;
  }
  html body #inicio .timeline-v-col-time {
    width: auto !important;
    min-width: 0 !important;
    padding: 4px 3px !important;
    background: var(--card-2, #f8fafc) !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px !important;
    text-align: center !important;
  }
  html body #inicio .v-time-start {
    font-size: .7rem !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
  }
  html body #inicio .v-time-end {
    font-size: .59rem !important;
    color: var(--muted) !important;
    line-height: 1.1 !important;
  }
  html body #inicio .today-duration-pill {
    font-size: .56rem !important;
    padding: 1px 4px !important;
    margin-top: 1px !important;
  }
  html body #inicio .timeline-v-card {
    padding: 6px 9px !important;
    border-radius: 9px !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin: 0 !important;
  }
  html body #inicio .timeline-v-card > div:first-child {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  html body #inicio .timeline-v-patient {
    font-size: .8rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
    line-height: 1.15 !important;
  }
  html body #inicio .timeline-v-med-badge {
    font-size: .56rem !important;
    padding: 1px 5px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    line-height: 1.15 !important;
  }
  html body #inicio .timeline-v-proc {
    font-size: .7rem !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 1px !important;
  }
  html body #inicio .timeline-v-condition-tags {
    margin-top: 2px !important;
    gap: 3px !important;
    display: flex !important;
    flex-wrap: wrap !important;
  }
  html body #inicio .timeline-v-condition-tag {
    font-size: .58rem !important;
    padding: 1px 5px !important;
    line-height: 1.15 !important;
  }
  html body #inicio .timeline-v-footer {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }
  html body #inicio .timeline-v-status-badge {
    font-size: .62rem !important;
    padding: 2px 6px !important;
  }
  html body #inicio .timeline-v-edit {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ===== 2. PLANIFICACIÓN (#presupuestos) ===== */
  html body #presupuestos .panel-title {
    font-size: 1.04rem !important;
    margin: 0 0 6px !important;
  }
  html body #presupuestos .pl-seg {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    gap: 4px !important;
    padding: 3px !important;
    background: var(--card-2, #f1f5f9) !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    border-radius: 10px !important;
    margin: 0 0 8px !important;
  }
  html body #presupuestos .pl-seg button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 7px !important;
    font-size: .72rem !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
  html body #presupuestos .pl-head {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
  }
  html body #presupuestos .pl-stats {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
  }
  html body #presupuestos .pl-stat {
    min-width: 0 !important;
    padding: 5px 6px !important;
    border-radius: 9px !important;
    text-align: center !important;
  }
  html body #presupuestos .pl-stat b {
    font-size: .98rem !important;
    line-height: 1.1 !important;
  }
  html body #presupuestos .pl-stat span {
    font-size: .62rem !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  html body #presupuestos .pl-head > div:last-child,
  html body #presupuestos .pl-head > span:last-child {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
  }
  html body #presupuestos .pl-head > div:last-child button,
  html body #presupuestos .pl-head > span:last-child button {
    min-height: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    font-size: .73rem !important;
    padding: 0 8px !important;
    width: 100% !important;
    justify-content: center !important;
  }
  html body #presupuestos .pl-tools {
    display: grid !important;
    grid-template-columns: 1.2fr 1fr !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
  }
  html body #presupuestos .pl-tools input,
  html body #presupuestos .pl-tools select {
    min-height: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    font-size: .75rem !important;
    padding: 0 8px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  html body #presupuestos .pl-chips {
    display: none !important;
  }
  html body #presupuestos #bpTabs.bp-tabs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4px !important;
    padding: 3px !important;
    margin-bottom: 6px !important;
  }
  html body #presupuestos #bpTabs.bp-tabs button {
    min-height: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    font-size: .74rem !important;
    padding: 0 8px !important;
    width: 100% !important;
  }
  html body #presupuestos .bp-card {
    padding: 9px 11px !important;
    border-radius: 12px !important;
    margin-bottom: 6px !important;
  }
  html body #presupuestos #bpCard1 .bp-row3 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 5px 8px !important;
  }
  html body #presupuestos #bpCard1 .bp-row3 > .bp-f:first-child,
  html body #presupuestos #bpCard1 .bp-row3 > .bp-f:last-child {
    grid-column: span 2 !important;
  }
  html body #presupuestos .bp-f input,
  html body #presupuestos .bp-f select {
    min-height: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    font-size: .78rem !important;
  }
  html body #presupuestos .budget-estado-btns label span {
    min-height: 28px !important;
    height: 28px !important;
    font-size: .72rem !important;
    padding: 0 6px !important;
  }
  html body #presupuestos .bp-arm button {
    min-height: 30px !important;
    height: 30px !important;
    font-size: .74rem !important;
    width: 100% !important;
    justify-content: center !important;
    margin: 4px 0 0 !important;
  }
  html body #presupuestos #bpAdd .budget-add-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 5px 8px !important;
  }
  html body #presupuestos #bpAdd .budget-add-row .bar-proc {
    grid-column: span 2 !important;
  }
  html body #presupuestos #bpAdd .budget-add-row .bar-f input,
  html body #presupuestos #bpAdd .budget-add-row .bar-f select {
    width: 100% !important;
    min-height: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    font-size: .76rem !important;
    text-align: left !important;
  }
  html body #presupuestos #budgetAddItemBtn {
    grid-column: span 2 !important;
    min-height: 32px !important;
    height: 32px !important;
    font-size: .76rem !important;
    margin: 2px 0 0 !important;
  }
  html body #presupuestos #budgetSaved .bp-sv-head {
    gap: 5px !important;
    margin-bottom: 6px !important;
  }
  html body #presupuestos #budgetSearchInput {
    min-height: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    font-size: .76rem !important;
  }
  html body #presupuestos #bpEstadoChips {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
  }
  html body #presupuestos #bpEstadoChips .pt-chip {
    min-height: 26px !important;
    height: 26px !important;
    margin: 0 !important;
    padding: 0 4px !important;
    font-size: .68rem !important;
    justify-content: center !important;
  }
  html body #presupuestos .bp-pc {
    padding: 9px 11px !important;
    border-radius: 11px !important;
    gap: 5px !important;
  }
  html body #presupuestos .bp-pc-act button {
    min-height: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    font-size: .72rem !important;
    padding: 0 8px !important;
  }

  /* ===== 3. EN PACIENTE: VENTANA DE RECETAS (.fx-ov .rx-wide) ===== */
  html body .fx-ov {
    padding: 6px !important;
    align-items: center !important;
  }
  html body .fx-ov .fx-card,
  html body .fx-ov .fx-card.rx-wide {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 12px) !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
  }
  html body .fx-ov .fx-card h2 {
    font-size: .95rem !important;
    margin: 0 !important;
  }
  html body .fx-ov .fx-card > p {
    font-size: .69rem !important;
    margin: 0 0 4px !important;
    line-height: 1.2 !important;
  }
  html body .fx-ov .fx-card h3 {
    font-size: .78rem !important;
    margin: 5px 0 3px !important;
  }
  html body .fx-ov #fxRxPat,
  html body .fx-ov #fxRxDx {
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 8px !important;
    font-size: .78rem !important;
    margin: 2px 0 4px !important;
  }
  html body .fx-ov #fxRxAlert {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin: 2px 0 4px !important;
  }
  html body .fx-ov #fxRxAlert > div {
    padding: 5px 8px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    font-size: .7rem !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }
  html body .fx-ov #fxRxAlert > div strong,
  html body .fx-ov #fxRxAlert > div b {
    font-size: .71rem !important;
  }
  html body .fx-ov .rx-med {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 4px 6px !important;
    padding: 7px 8px !important;
    margin-bottom: 5px !important;
    border-radius: 9px !important;
  }
  html body .fx-ov .rx-med .rx-f {
    font-size: .68rem !important;
    gap: 1px !important;
  }
  html body .fx-ov .rx-med .rx-f input {
    min-height: 28px !important;
    height: 28px !important;
    padding: 0 7px !important;
    font-size: .76rem !important;
    border-radius: 6px !important;
    margin: 0 !important;
  }
  html body .fx-ov .rx-med .rx-n { grid-column: span 12 !important; }
  html body .fx-ov .rx-med .rx-d { grid-column: span 6 !important; }
  html body .fx-ov .rx-med .rx-m { grid-column: span 6 !important; }
  html body .fx-ov .rx-med .rx-f2 { grid-column: span 6 !important; }
  html body .fx-ov .rx-med .rx-u { grid-column: span 6 !important; }
  html body .fx-ov .rx-med .rx-q { grid-column: span 8 !important; }
  html body .fx-ov .rx-med .fx-del {
    grid-column: span 4 !important;
    min-height: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    font-size: .72rem !important;
    border-radius: 6px !important;
    align-self: end !important;
  }
  html body .fx-ov #fxRxAdd {
    min-height: 28px !important;
    height: 28px !important;
    margin: 0 0 4px !important;
    font-size: .73rem !important;
    padding: 0 10px !important;
  }
  html body .fx-ov #fxRxDxChips {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    gap: 4px !important;
    margin: 2px 0 4px !important;
    padding-bottom: 2px !important;
  }
  html body .fx-ov #fxRxDxChips button {
    flex: 0 0 auto !important;
    min-height: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    font-size: .68rem !important;
  }
  html body .fx-ov .rx-wide #fxRxInd {
    min-height: 40px !important;
    height: 40px !important;
    padding: 4px 8px !important;
    font-size: .75rem !important;
    margin: 2px 0 4px !important;
  }
  html body .fx-ov label:has(#fxRxAddMeds) {
    min-height: 0 !important;
    margin-top: 2px !important;
    gap: 6px !important;
  }
  html body .fx-ov label:has(#fxRxAddMeds) span {
    font-size: .7rem !important;
    line-height: 1.15 !important;
  }
  html body .fx-ov .fx-ok {
    padding: 4px 8px !important;
    font-size: .64rem !important;
    line-height: 1.2 !important;
    margin-top: 4px !important;
  }
  html body .fx-ov .fx-foot {
    position: sticky !important;
    bottom: -10px !important;
    background: var(--card, #fff) !important;
    padding: 6px 0 2px !important;
    margin-top: 6px !important;
    border-top: 1px solid var(--line, #e2e8f0) !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 5px !important;
  }
  html body .fx-ov .fx-foot button {
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 4px !important;
    font-size: .7rem !important;
    margin: 0 !important;
    width: 100% !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }
  html body .fx-ov .fx-foot #fxRxPrint {
    grid-column: span 3 !important;
    order: -1 !important;
    min-height: 34px !important;
    height: 34px !important;
    font-size: .8rem !important;
  }

  /* ===== 4. EN PACIENTE: ADJUNTOS Y FOTOS (#patientAttachmentsModal + #patientDetail) ===== */
  /* El modal de adjuntos se estiliza ahora en 06-responsive-pass.css (bloque «Archivos adjuntos estilo Nueva atención») */
  html body #patientDetail .pd-sec-head .pd-sec-actions button {
    min-height: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    font-size: .72rem !important;
  }

  /* ===== 5. VISOR LIGHTBOX DE RADIOGRAFÍAS (#rxLightboxModal) ===== */
  html body #rxLightboxModal {
    padding: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }
  html body #rxLightboxModal .rx-lightbox-window {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
  }
  html body #rxLightboxModal .rx-lightbox-topbar {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 5px !important;
    padding: 6px 8px !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  html body #rxLightboxModal .rx-lightbox-info {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding-right: 36px !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
  html body #rxLightboxModal .rx-lightbox-info svg {
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 15px !important;
  }
  html body #rxLightboxModal .rx-lightbox-title {
    font-size: .78rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
  }
  html body #rxLightboxModal .rx-lightbox-badge {
    display: inline-flex !important;
    align-items: center !important;
    font-size: .64rem !important;
    padding: 2px 6px !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
  html body #rxLightboxModal .rx-lightbox-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 3px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }
  html body #rxLightboxModal .rx-grp {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    flex: 0 0 auto !important;
  }
  html body #rxLightboxModal .rx-grp + .rx-grp {
    margin-left: 1px !important;
    padding-left: 3px !important;
  }
  html body #rxLightboxModal .rx-lightbox-topbar .rx-ctrl-btn:not(.rx-menu *):not(#rxMobileAnnotToggle):not(#rxZoomResetBtn) {
    min-height: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    margin: 0 !important;
    padding: 0 5px !important;
    font-size: 0 !important;
    gap: 0 !important;
    border-radius: 6px !important;
  }
  html body #rxLightboxModal #rxMobileAnnotToggle {
    min-height: 28px !important;
    height: 28px !important;
    margin: 0 0 0 auto !important;
    padding: 0 8px !important;
    font-size: .68rem !important;
    font-weight: 700 !important;
    gap: 4px !important;
    border-radius: 6px !important;
    background: rgba(56, 189, 248, 0.16) !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    color: #bae6fd !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
  }
  html body #rxLightboxModal .rx-lightbox-topbar .rx-ctrl-btn svg {
    width: 15px !important;
    height: 15px !important;
  }
  html body #rxLightboxModal #rxZoomResetBtn {
    min-height: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    font-size: .68rem !important;
    min-width: 38px !important;
    padding: 0 4px !important;
    border-radius: 6px !important;
  }
  html body #rxLightboxModal #rxLightboxCloseBtn {
    position: fixed !important;
    top: 5px !important;
    right: 8px !important;
    width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    min-width: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 7px !important;
    background: rgba(239, 68, 68, 0.22) !important;
    border: 1px solid rgba(248, 113, 113, 0.45) !important;
    color: #fecaca !important;
    z-index: 30 !important;
  }
  html body #rxLightboxModal #rxAnnotBar:not(.mob-annot-open) {
    display: none !important;
  }
  html body #rxLightboxModal #rxAnnotBar.mob-annot-open {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 4px 6px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-width: 100vw !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
  }
  html body #rxLightboxModal #rxAnnotBar .rx-annot-tool:not(.rx-annot-save):not(.rx-menu *) {
    min-height: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    width: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
    gap: 0 !important;
    border-radius: 6px !important;
  }
  html body #rxLightboxModal #rxAnnotBar .rx-annot-tool svg {
    width: 14px !important;
    height: 14px !important;
  }
  html body #rxLightboxModal #rxAnnotBar .rx-annot-colors {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 0 1px !important;
  }
  html body #rxLightboxModal #rxAnnotBar .rx-annot-color {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    max-width: 15px !important;
    min-height: 15px !important;
    max-height: 15px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    flex: 0 0 15px !important;
  }
  html body #rxLightboxModal #rxAnnotBar .rx-annot-save {
    min-height: 24px !important;
    height: 24px !important;
    padding: 0 6px !important;
    font-size: .68rem !important;
    gap: 3px !important;
    margin: 0 0 0 auto !important;
    flex: 0 0 auto !important;
  }
  html body #rxLightboxModal .rx-lightbox-viewport {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  html body #rxLightboxModal .rx-lightbox-img {
    max-width: calc(100vw - 12px);
    max-height: calc(100dvh - 120px);
  }
  html body #rxLightboxModal .rx-nav-arrow {
    top: auto !important;
    bottom: 14px !important;
    transform: none !important;
    width: auto !important;
    min-width: 112px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.94) !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    color: #f8fafc !important;
    font-size: .76rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    z-index: 25 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
  }
  html body #rxLightboxModal .rx-nav-arrow.hidden {
    display: none !important;
  }
  html body #rxLightboxModal #rxPrevBtn {
    left: 14px !important;
  }
  html body #rxLightboxModal #rxPrevBtn::after {
    content: "Anterior";
  }
  html body #rxLightboxModal #rxNextBtn {
    right: 14px !important;
  }
  html body #rxLightboxModal #rxNextBtn::before {
    content: "Siguiente";
  }
  html body #rxLightboxModal .rx-nav-arrow svg {
    width: 16px !important;
    height: 16px !important;
  }
}
@media (min-width: 835px) {
  #rxMobileAnnotToggle { display: none !important; }
}

/* Inicio móvil: al deslizar el dedo por las tarjetas de citas no se selecciona el texto (azul intenso con letras blancas ilegibles) */
@media (max-width: 620px) {
  #inicio .today-schedule-box, #inicio .today-schedule-box * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
  #inicio ::selection { background: rgba(29, 78, 216, .18); color: inherit; }
}
