.mass-guides, .mass-guides * { box-sizing: border-box; }
.mass-guides { color: #172c37; padding: 2rem 1rem calc(6rem + env(safe-area-inset-bottom)); }
.mass-guides__container { width: min(100%, 70rem); margin: 0 auto; }
.mass-guides__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.mass-guides h1, .mass-guides h2, .mass-guides h3 { color: var(--azul-petroleo, #385e72); }
.mass-guides h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.4rem); }
.mass-guides h2 { margin: 2rem 0 1rem; }
.mass-eyebrow { margin: 0 0 .25rem; color: #6b7280; font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.mass-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: .6rem .9rem; border: 1px solid #bac8cf; border-radius: 10px; background: #fff; color: #29485b; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.mass-button:hover, .mass-button:focus-visible { background: #edf3f5; color: #29485b; }
.mass-button--primary { border-color: #385e72; background: #385e72; color: #fff; }
.mass-button--danger { border-color: #b53a32; color: #9b2c25; }
.mass-button--danger:hover, .mass-button--danger:focus-visible { background: #fdebea; color: #7f211c; }
.mass-button--danger:disabled { opacity: .45; cursor: default; }
.mass-guide-grid { display: grid; gap: .8rem; }
.mass-guide-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid #dce4e8; border-radius: 14px; background: #fff; }
.mass-guide-card h3, .mass-guide-card p { margin: .15rem 0; }
.mass-guide-card__date { font-size: .9rem; font-weight: 700; }
.mass-guide-card--compact { padding: .75rem 1rem; }
.mass-status { display: inline-block; margin-left: .35rem; padding: .15rem .45rem; border-radius: 999px; background: #fff2c7; font-size: .75rem; font-weight: 800; }
.mass-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.mass-guides__history { margin-top: 2.5rem; }
.mass-guides__empty { padding: 1.5rem; border: 1px dashed #bac8cf; border-radius: 14px; background: #fff; }
.mass-pagination { margin-top: 1rem; display: flex; gap: .5rem; }
.mass-pagination .page-numbers { padding: .4rem .65rem; }
.mass-access { width: min(100%, 28rem); margin: 3rem auto; padding: 1.25rem; border: 1px solid #dce4e8; border-radius: 14px; background: #fff; box-shadow: 0 1rem 2.5rem rgba(23,44,55,.08); }
.mass-access h1 { margin-bottom: .65rem; font-size: clamp(1.8rem, 7vw, 2.5rem); }
.mass-access-form { display: grid; gap: .65rem; margin-top: 1.25rem; }
.mass-access-form label { color: #29485b; font-size: .9rem; font-weight: 700; }
.mass-access-form input { width: 100%; min-height: 48px; padding: .65rem .75rem; border: 1px solid #bac8cf; border-radius: 9px; background: #fff; color: #172c37; font: inherit; }
.mass-access-form .mass-button { margin-top: .35rem; }
.mass-guide-form { display: grid; gap: 1.25rem; }
.mass-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.mass-guide-form label { display: grid; gap: .35rem; color: #29485b; font-size: .9rem; font-weight: 700; }
.mass-guide-form input, .mass-guide-form textarea, .mass-guide-form select { width: 100%; min-height: 44px; padding: .65rem .75rem; border: 1px solid #bac8cf; border-radius: 9px; background: #fff; color: #172c37; font: inherit; }
.mass-guide-form textarea { resize: vertical; }
.mass-songs-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mass-songs-heading h2 { margin: 1rem 0 0; }
.mass-help { margin: -.75rem 0 0; color: #64727a; }
.mass-guide-items { display: grid; gap: .7rem; }
.mass-guide-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .65rem; align-items: center; padding: .8rem; border: 1px solid #dce4e8; border-radius: 12px; background: #fff; }
.mass-guide-item.is-dragging { opacity: .55; }
.mass-guide-item__handle { color: #75838a; font-size: 1.4rem; cursor: grab; }
.mass-guide-item__fields { display: grid; grid-template-columns: minmax(8rem, .7fr) minmax(12rem, 1.4fr); gap: .65rem; min-width: 0; }
.mass-guide-item__actions { display: flex; gap: .25rem; }
.mass-guide-item__actions button { width: 40px; height: 40px; border: 1px solid #c8d2d7; border-radius: 8px; background: #fff; color: #29485b; cursor: pointer; }
.mass-guide-item__actions button:disabled { opacity: .35; }
.mass-song-search { position: relative; display: block; }
.mass-song-results { position: absolute; z-index: 50; top: calc(100% + .25rem); left: 0; right: 0; max-height: 16rem; overflow-y: auto; border: 1px solid #bac8cf; border-radius: 9px; background: #fff; box-shadow: 0 .8rem 2rem rgba(23,44,55,.18); }
.mass-song-results button, .mass-song-results > span { display: block; width: 100%; padding: .7rem; border: 0; border-bottom: 1px solid #edf0f2; background: #fff; color: #172c37; text-align: left; cursor: pointer; }
.mass-song-results button:hover, .mass-song-results button:focus { background: #edf3f5; }
.mass-form-actions { position: sticky; bottom: calc(4.6rem + env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: center; justify-content: flex-end; gap: .65rem; padding: .45rem .55rem; border: 1px solid #dce4e8; border-radius: 12px; background: rgba(255,255,255,.96); box-shadow: 0 -.3rem 1rem rgba(23,44,55,.08); }
.mass-form-actions .js-add-guide-song { margin-right: auto; }
.mass-form-actions .mass-button { min-height: 38px; padding: .4rem .65rem; }
.mass-form-status { display: flex !important; align-items: center; gap: .4rem !important; }
.mass-form-status select { width: auto; min-height: 38px; padding: .35rem .55rem; }
.mass-autosave-status { max-width: 10rem; color: #64727a; font-size: .78rem; line-height: 1.15; text-align: right; }
.mass-autosave-status.is-error { color: #8c2520; }
.mass-notice { margin-bottom: 1rem; padding: .8rem 1rem; border-radius: 9px; }
.mass-notice--success { background: #e7f7ed; color: #176a35; }
.mass-notice--error { background: #fdebea; color: #8c2520; }
.mass-guide-view { width: min(100%, 52rem); margin: 0 auto; }
.mass-guide-view__date { margin: .35rem 0 0; font-size: 1.05rem; }
.mass-guide-notes { margin: 1rem 0; padding: 1rem; border-left: 4px solid #d4b06a; background: #fffaf0; }
.mass-guide-notes p { margin: .4rem 0 0; }
.mass-compact-sequence { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 1.5rem 0; padding: 1rem; border-radius: 12px; background: #edf3f5; font-size: 1.12rem; font-weight: 800; }
.mass-compact-sequence a { color: #29485b; }
.mass-guide-sequence { list-style: none; margin: 0 0 1.5rem; padding: 0; counter-reset: guide-song; }
.mass-guide-sequence li { padding: 1rem 0; border-bottom: 1px solid #dce4e8; }
.mass-guide-sequence__moment { color: #69777e; font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.mass-guide-sequence__song { display: inline-block; margin-top: .2rem; color: #29485b; font-size: 1.25rem; font-weight: 800; }
.mass-guide-sequence__unavailable { display: block; margin-top: .2rem; color: #8c2520; font-weight: 700; }
@media (max-width: 700px) {
    .mass-guides { padding-top: 1.25rem; }
    .mass-guides__header, .mass-guide-card { align-items: flex-start; }
    .mass-guides__header { flex-direction: column; }
    .mass-form-grid { grid-template-columns: 1fr 1fr; }
    .mass-form-grid label:nth-child(n+3) { grid-column: 1 / -1; }
    .mass-guide-item { grid-template-columns: minmax(0, 1fr); }
    .mass-guide-item__handle { display: none; }
    .mass-guide-item__fields { grid-template-columns: 1fr; }
    .mass-guide-item__actions { justify-content: flex-end; }
    .mass-form-actions { gap: .4rem; }
    .mass-form-actions .js-add-guide-song { margin-right: auto; }
    .mass-add-long { display: none; }
    .mass-form-status { font-size: 0 !important; }
    .mass-form-status select { max-width: 7.4rem; font-size: .82rem; }
    .mass-autosave-status { flex: 0 0 5.2rem; max-width: 5.2rem; overflow: hidden; font-size: .72rem; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
}
@media print {
    .header-paroquia, .footer-paroquia, .app-tabbar, .mass-no-print, .mass-compact-sequence { display: none !important; }
    .mass-guides { padding: 0; }
    .mass-guide-view { width: 100%; }
    .mass-guide-sequence li { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: .4rem 0; }
    .mass-guide-sequence__moment::after { content: " ................................................................"; color: #999; }
    .mass-guide-sequence__song { font-size: 0; }
    .mass-guide-sequence__song::after { content: attr(data-number); font-size: 1rem; }
}
