/* =====================================================================================================
   v1.6.71 — TĨNH TÂM: giao diện của quý Cha (dùng chung cho trang quét mã QR phòng và mục "Tĩnh tâm"
   trong app). Mọi luật đều nằm dưới lớp gốc `.rt` và dùng biến riêng `--rt-*`, nên không đụng tới
   giao diện của ứng dụng và trông y hệt nhau ở cả hai nơi.

   Hiệu ứng chỉ dùng transform / opacity (trình duyệt vẽ bằng GPU, không tính lại bố cục) để máy cũ vẫn
   mượt; máy bật "giảm chuyển động" thì mọi hiệu ứng tự tắt (xem cuối tệp).
   ===================================================================================================== */
.rt {
  --rt-ink: #f4f8ff; --rt-ink2: #cfdcf2; --rt-ink3: #9fb3d3;
  --rt-navy: #0e2347; --rt-navy2: #16356a; --rt-deep: #081630;
  --rt-gold: #f2c14e; --rt-gold2: #ffe3a1; --rt-gold3: #b9871a;
  --rt-glass: rgba(255, 255, 255, .09); --rt-glass2: rgba(255, 255, 255, .15); --rt-line: rgba(196, 218, 250, .22);
  --rt-ok: #3fd79a; --rt-warn: #ffb347; --rt-red: #ff8f86;
  --rt-shadow: 0 14px 34px rgba(3, 12, 30, .46), 0 2px 6px rgba(3, 12, 30, .3);
  --rt-bg-op: .26;
  position: relative; isolation: isolate; color: var(--rt-ink); min-height: 100%;
  font-family: Nunito, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 16px; line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
.rt *, .rt *::before, .rt *::after { box-sizing: border-box; }
.rt button { font-family: inherit; font-size: inherit; line-height: inherit; color: inherit; }
/* thuộc tính hidden phải thắng mọi luật display của các lớp bên dưới (vd huy hiệu số tin chưa đọc) */
.rt [hidden] { display: none !important; }
.rt svg { display: block; }

/* ------------------------------------------------ nền: ảnh Nhà thờ Chánh Tòa mờ + lớp màu đêm
   Lớp ảnh "dính" vào khung nhìn (sticky) rồi kéo lề âm cho nội dung trôi đè lên — giống nền cố định
   nhưng vẫn nằm gọn trong khung của ứng dụng, không tràn ra thanh menu. */
.rt-bg {
  position: sticky; top: 0; height: 100vh; height: 100dvh; margin-bottom: -100vh; margin-bottom: -100dvh;
  z-index: -1; pointer-events: none; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #1b4179 0%, #10284f 46%, #081630 100%);
}
.rt-bg::before {
  content: ""; position: absolute; inset: 0; opacity: var(--rt-bg-op);
  background: url("../img/retreat-bg-820.jpg") center 22% / cover no-repeat;
  transform: scale(1.04);
}
@media (min-width: 900px) { .rt-bg::before { background-image: url("../img/retreat-bg-1600.jpg"); } }
/* lớp tối dần xuống đáy để chữ luôn đọc rõ dù Văn phòng kéo ảnh nền sáng tới đâu */
.rt-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 22, 48, .30) 0%, rgba(8, 22, 48, .62) 55%, rgba(8, 22, 48, .88) 100%);
}

.rt-wrap { position: relative; max-width: 860px; margin: 0 auto; padding: 16px 14px 40px; }
.rt-standalone .rt-wrap { padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(44px + env(safe-area-inset-bottom)); }

/* ------------------------------------------------ kính aero dùng chung */
.rt-glass {
  position: relative; border-radius: 22px; border: 1px solid var(--rt-line);
  background: linear-gradient(160deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .06) 46%, rgba(255, 255, 255, .09) 100%);
  box-shadow: var(--rt-shadow), inset 0 1px 0 rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(10px) saturate(1.25); backdrop-filter: blur(10px) saturate(1.25);
  overflow: hidden;
}
/* hoa văn aero: sóng và thánh giá nhỏ chìm trong kính */
.rt-pat::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='92'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='1.2'%3E%3Cpath d='M0 60 Q23 46 46 60 T92 60'/%3E%3Cpath d='M0 78 Q23 64 46 78 T92 78'/%3E%3C/g%3E%3Cpath d='M44.6 12h2.8v6h5.6v2.8h-5.6V34h-2.8V20.8H39V18h5.6z' fill='%23ffffff' fill-opacity='.07'/%3E%3C/svg%3E") 0 0 / 92px 92px;
}

/* ------------------------------------------------ đầu trang */
.rt-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.rt-badge {
  flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 28%, #fff 0%, var(--rt-gold2) 42%, var(--rt-gold) 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35), inset 0 -3px 6px rgba(120, 80, 0, .35), inset 0 2px 3px rgba(255, 255, 255, .8);
}
.rt-badge svg { width: 26px; height: 26px; color: #8a5a00; }
.rt-top h1 { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.rt-top p { margin: 2px 0 0; font-size: 12.5px; color: var(--rt-ink2); font-weight: 600; }

/* ------------------------------------------------ lời chào + phòng */
.rt-hello { margin-top: 12px; padding: 16px 18px; }
.rt-hello .k { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--rt-gold); }
.rt-hello h2 { margin: 4px 0 0; font-size: 21px; line-height: 1.3; font-weight: 800; }
.rt-hello h2 b { color: var(--rt-gold2); }
.rt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rt-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 15px; font-size: 13px; font-weight: 800; line-height: 1.35;
  background: rgba(255, 255, 255, .12); border: 1px solid var(--rt-line);
}
.rt-chip.gold { background: linear-gradient(180deg, rgba(242, 193, 78, .32), rgba(242, 193, 78, .16)); border-color: rgba(242, 193, 78, .6); color: var(--rt-gold2); }
.rt-chip svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------ việc TIẾP THEO + đếm ngược */
.rt-next { margin-top: 12px; padding: 16px 18px 18px; }
/* v1.6.72 — đồng hồ đếm ngược nằm trên cùng, cả khối canh giữa */
.rt-nextwrap { text-align: center; }
.rt-nextwrap .rt-count { justify-content: center; margin: 2px 0 14px; }
.rt-nextwrap .lbl, .rt-nextwrap .rt-nowline { justify-content: center; }
.rt-nextwrap .note { display: inline-block; text-align: left; max-width: 100%; }
/* số phòng: một huy hiệu lớn, canh giữa thẻ chào */
.rt-room { display: flex; justify-content: center; margin-top: 12px; }
.rt-room .rt-chip { font-size: 15px; padding: 7px 16px; }
.rt-room .rt-chip b { font-size: 18px; font-weight: 800; color: #fff; }
.rt-top p.d { color: var(--rt-gold2); font-variant-numeric: tabular-nums; }
.rt-next .lbl { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--rt-gold); }
/* v1.6.75 — CHẤM ĐỨNG YÊN. Trước đây chấm toả vòng sáng bằng cách đổi box-shadow liên tục; trên điện thoại,
   thẻ kính (backdrop-filter) phải vẽ lại cả khối theo từng khung hình nên khối này NHÁY. Nay bỏ hẳn chuyển động. */
.rt-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--rt-gold); box-shadow: 0 0 0 3px rgba(242, 193, 78, .22); }
.rt-dot.ok { background: var(--rt-ok); box-shadow: 0 0 0 3px rgba(63, 215, 154, .22); }
.rt-next h3 { margin: 6px 0 0; font-size: 22px; line-height: 1.28; font-weight: 800; }
.rt-next .when { margin-top: 4px; font-size: 14.5px; font-weight: 700; color: var(--rt-ink2); }
.rt-next .when b { color: var(--rt-gold2); font-size: 16px; }
/* v1.6.75 — ô ghi chú (nơi chốn, lễ phục…): bỏ vạch vàng bên trái — bo góc làm vạch cong lại thành một VỆT VÀNG
   trông như lỗi hiển thị. Nay là một ô viền mảnh đều bốn phía. */
.rt-next .note { margin-top: 8px; padding: 8px 14px; border-radius: 12px; font-size: 14px; background: rgba(255, 255, 255, .09); border: 1px solid var(--rt-line); color: var(--rt-ink); }
.rt-count { display: flex; align-items: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.rt-tile {
  min-width: 62px; padding: 8px 8px 6px; border-radius: 14px; text-align: center;
  background: linear-gradient(180deg, #1e4a8c 0%, #12305f 50%, #0c2247 51%, #153a72 100%);
  border: 1px solid rgba(160, 196, 255, .34);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -2px 4px rgba(0, 0, 0, .3);
}
.rt-tile b { display: block; font-size: 30px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.rt-tile span { display: block; margin-top: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--rt-ink3); }
/* v1.6.75 — hai dấu chấm giữa các ô số KHÔNG nhấp nháy nữa (cùng lý do với chấm ở trên) */
.rt-count .sep { font-size: 26px; font-weight: 800; color: var(--rt-gold); padding-bottom: 20px; }
.rt-bar { margin-top: 14px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .13); overflow: hidden; }
.rt-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--rt-gold3), var(--rt-gold), var(--rt-gold2)); transform-origin: left center; transition: transform .9s linear; }
.rt-nowline { margin-top: 12px; display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 700; color: var(--rt-ink2); }
.rt-nowline b { color: #fff; }

/* ------------------------------------------------ lưới ô chức năng (3D) */
.rt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; perspective: 900px; }
@media (min-width: 640px) { .rt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
.rt-w {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left;
  min-height: 132px; padding: 16px 16px 14px; border-radius: 22px; cursor: pointer; overflow: hidden;
  border: 1px solid var(--rt-line);
  background: linear-gradient(155deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, .05) 52%, rgba(255, 255, 255, .1) 100%);
  box-shadow: 0 16px 30px rgba(3, 12, 30, .5), 0 3px 0 rgba(255, 255, 255, .06) inset, inset 0 1px 0 rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(9px) saturate(1.2); backdrop-filter: blur(9px) saturate(1.2);
  transform: translateZ(0); transform-style: preserve-3d;
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s ease, border-color .22s ease;
  animation: rt-rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
.rt-w:nth-child(2) { animation-delay: .05s; } .rt-w:nth-child(3) { animation-delay: .1s; }
.rt-w:nth-child(4) { animation-delay: .15s; } .rt-w:nth-child(5) { animation-delay: .2s; } .rt-w:nth-child(6) { animation-delay: .25s; }
@keyframes rt-rise { from { opacity: 0; transform: translateY(18px) rotateX(-10deg); } to { opacity: 1; transform: none; } }
/* vệt sáng lướt qua mặt kính */
.rt-w::after {
  content: ""; position: absolute; top: -40%; bottom: -40%; left: -60%; width: 46%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent);
  transform: translateX(0) rotate(8deg); opacity: 0;
}
.rt-w:hover, .rt-w:focus-visible { transform: translateY(-5px) rotateX(5deg) rotateY(-3deg); border-color: rgba(242, 193, 78, .6); box-shadow: 0 24px 40px rgba(3, 12, 30, .6), inset 0 1px 0 rgba(255, 255, 255, .4); outline: none; }
.rt-w:hover::after, .rt-w:focus-visible::after { animation: rt-shine .9s ease-out; }
.rt-w:active { transform: translateY(1px) scale(.975); transition-duration: .08s; }
@keyframes rt-shine { 0% { transform: translateX(0) rotate(8deg); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateX(520%) rotate(8deg); opacity: 0; } }
.rt-ico {
  flex: none; width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; transform: translateZ(26px);
  background: linear-gradient(145deg, var(--c2, #7fb2ef), var(--c1, #2a78d6));
  box-shadow: 0 10px 18px rgba(0, 0, 0, .38), inset 0 2px 2px rgba(255, 255, 255, .55), inset 0 -4px 7px rgba(0, 0, 0, .28);
}
.rt-ico svg { width: 27px; height: 27px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.rt-w .t { font-size: 17px; font-weight: 800; line-height: 1.2; transform: translateZ(14px); }
.rt-w .s { font-size: 12.5px; font-weight: 600; color: var(--rt-ink2); line-height: 1.35; margin-top: -4px; }
.rt-w .n {
  position: absolute; top: 12px; right: 12px; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 800; background: rgba(255, 255, 255, .16); border: 1px solid var(--rt-line);
}
/* v1.6.75 — số đỏ ở ô Hỗ trợ cũng đứng yên (vòng toả bằng box-shadow làm thẻ kính nháy trên điện thoại) */
.rt-w .n.hot { background: linear-gradient(180deg, #ff7a59, #e2452a); border-color: transparent; color: #fff; box-shadow: 0 0 0 3px rgba(255, 122, 89, .28); }

/* v1.6.72 — hộp thư hỗ trợ: ảnh đính kèm */
.rt-btn.rt-attach { flex: none; padding: 0; width: 44px; height: 44px; justify-content: center; }
.rt-btn.rt-attach svg { width: 22px; height: 22px; flex: none; }
.rt-pend { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--rt-line); background: rgba(242, 193, 78, .1); }
.rt-pend[hidden] { display: none; }
.rt-pend img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; border: 1px solid var(--rt-line); flex: none; }
.rt-pend div { flex: 1; min-width: 0; } .rt-pend b { display: block; font-size: 14px; } .rt-pend span { font-size: 12px; color: var(--rt-ink2); }
.rt-pend .rt-btn { padding: 0; width: 36px; height: 36px; justify-content: center; flex: none; }
.rt-msg.has-img { padding: 6px 6px 8px; } .rt-msg.has-img small, .rt-msg.has-img b.who { padding: 0 7px; }
.rt-mimg { display: block; width: auto; height: auto; max-width: 100%; max-height: 300px; border-radius: 12px; margin-bottom: 5px; cursor: zoom-in; background: rgba(255, 255, 255, .08); object-fit: contain; }
.rt-zoom { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 12px; background: rgba(3, 10, 24, .94); cursor: zoom-out; animation: rt-pop .18s ease-out both; }
.rt-zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; object-fit: contain; }
.rt-zoom .rt-btn { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; padding: 0; width: 42px; height: 42px; justify-content: center; }
/* trang mã QR Chương trình: tiêu đề từng ngày */
.rt-dayhead { display: flex; align-items: baseline; gap: 10px; margin: 16px 4px 8px; }
.rt-dayhead b { font-size: 17px; font-weight: 800; color: var(--rt-gold2); }
.rt-dayhead span { font-size: 13.5px; font-weight: 700; color: var(--rt-ink2); font-variant-numeric: tabular-nums; }
.rt-dayhead i { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 9px; border-radius: 99px; background: var(--rt-ok); color: #06301f; }

/* ô con trong mục Kinh (mỗi ô một giờ kinh) và mục Hát (mỗi ô một bài) */
.rt-sub { margin-top: 12px; }
.rt-w-sm { min-height: 112px; gap: 8px; }
.rt-w-sm .rt-ico { width: 44px; height: 44px; border-radius: 14px; } .rt-w-sm .rt-ico svg { width: 22px; height: 22px; }
.rt-w-sm .t { font-size: 16px; }
.rt-w-sm .s { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: -2px; }
.rt-read + .rt-read { margin-top: 12px; }

.rt-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--rt-ink3); }

/* ------------------------------------------------ các trang con (trượt lên) */
.rt-view { animation: rt-in .28s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rt-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rt-vh { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 12px; position: sticky; top: 8px; z-index: 5; }
.rt-standalone .rt-vh { top: calc(8px + env(safe-area-inset-top)); }
.rt-back {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px 9px 10px; border-radius: 14px; cursor: pointer; font-weight: 800; font-size: 14.5px;
  background: rgba(255, 255, 255, .14); border: 1px solid var(--rt-line); transition: transform .15s ease, background .15s ease;
}
.rt-back:hover { background: rgba(255, 255, 255, .22); } .rt-back:active { transform: scale(.96); }
@media (max-width: 480px) { .rt-back { padding: 9px 11px; } .rt-back span { display: none; } }
.rt-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rt-vh h2 { margin: 0; font-size: 18px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-vh .ico { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, var(--c2, #7fb2ef), var(--c1, #2a78d6)); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5); }
.rt-vh .ico svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rt-card { padding: 16px 18px; margin-bottom: 12px; }
.rt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 14px; cursor: pointer; font-weight: 800; font-size: 14.5px;
  background: rgba(255, 255, 255, .13); border: 1px solid var(--rt-line); transition: transform .15s ease, background .15s ease; text-decoration: none; color: inherit;
}
.rt-btn:hover { background: rgba(255, 255, 255, .22); } .rt-btn:active { transform: scale(.97); }
.rt-btn.gold { background: linear-gradient(180deg, #ffd978, #e8ae2b); border-color: transparent; color: #3a2600; box-shadow: 0 6px 14px rgba(232, 174, 43, .35), inset 0 1px 0 rgba(255, 255, 255, .6); }
.rt-btn.gold:hover { background: linear-gradient(180deg, #ffe39a, #f0b93a); }
.rt-btn[disabled] { opacity: .55; cursor: default; }
.rt-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rt-empty { padding: 26px 16px; text-align: center; color: var(--rt-ink2); font-weight: 600; }
.rt-muted { color: var(--rt-ink2); } .rt-small { font-size: 13px; }

/* nội dung soạn bằng trình soạn thảo (Hướng dẫn, xem nhanh tệp Office) */
.rt-rich { font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.rt-rich h1, .rt-rich h2, .rt-rich h3 { margin: 16px 0 6px; font-size: 17.5px; font-weight: 800; color: var(--rt-gold2); }
.rt-rich h1:first-child, .rt-rich h2:first-child, .rt-rich h3:first-child { margin-top: 0; }
.rt-rich p { margin: 8px 0; } .rt-rich ul, .rt-rich ol { margin: 8px 0; padding-left: 22px; } .rt-rich li { margin: 5px 0; }
.rt-rich a { color: var(--rt-gold2); } .rt-rich img { max-width: 100%; height: auto; border-radius: 12px; }
.rt-rich table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.rt-rich td, .rt-rich th { border: 1px solid var(--rt-line); padding: 5px 8px; font-size: 14px; }

/* ------------------------------------------------ chương trình */
.rt-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.rt-tab { flex: 1; padding: 10px 12px; border-radius: 14px; cursor: pointer; font-weight: 800; font-size: 14.5px; text-align: center; background: rgba(255, 255, 255, .09); border: 1px solid var(--rt-line); transition: background .15s ease; }
.rt-tab.on { background: linear-gradient(180deg, #ffd978, #e8ae2b); color: #3a2600; border-color: transparent; box-shadow: 0 6px 14px rgba(232, 174, 43, .3); }
.rt-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rt-days::-webkit-scrollbar { display: none; }
.rt-day { flex: none; min-width: 66px; padding: 8px 10px; border-radius: 16px; cursor: pointer; text-align: center; background: rgba(255, 255, 255, .09); border: 1px solid var(--rt-line); transition: transform .15s ease, background .15s ease; }
.rt-day small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rt-ink3); }
.rt-day b { display: block; font-size: 20px; line-height: 1.15; font-weight: 800; }
.rt-day i { display: block; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--rt-ink3); }
.rt-day.on { background: linear-gradient(170deg, #2a66bd, #17407e); border-color: rgba(160, 196, 255, .6); transform: translateY(-2px); box-shadow: 0 10px 18px rgba(0, 0, 0, .35); }
.rt-day.on small, .rt-day.on i { color: var(--rt-gold2); }
.rt-day.today::after { content: "hôm nay"; display: block; font-size: 9.5px; font-weight: 800; color: var(--rt-ok); letter-spacing: .04em; }
.rt-tl { position: relative; padding: 4px 0 4px 0; }
.rt-it { position: relative; display: grid; grid-template-columns: 62px 1fr; gap: 12px; padding: 10px 0; }
.rt-it + .rt-it { border-top: 1px dashed rgba(196, 218, 250, .16); }
.rt-it .h { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--rt-gold2); padding-top: 1px; }
.rt-it .b { min-width: 0; }
.rt-it .b b { display: block; font-size: 16px; font-weight: 800; line-height: 1.35; }
.rt-it .b span { display: block; margin-top: 3px; font-size: 13.5px; color: var(--rt-ink2); line-height: 1.45; }
.rt-it.past { opacity: .5; }
.rt-it.now { margin: 2px -10px; padding: 12px 10px; border-radius: 16px; border: 1px solid rgba(63, 215, 154, .5); background: linear-gradient(90deg, rgba(63, 215, 154, .2), rgba(63, 215, 154, .05)); }
.rt-it.next { margin: 2px -10px; padding: 12px 10px; border-radius: 16px; border: 1px solid rgba(242, 193, 78, .55); background: linear-gradient(90deg, rgba(242, 193, 78, .2), rgba(242, 193, 78, .05)); }
.rt-it.now + .rt-it, .rt-it.next + .rt-it, .rt-it.now, .rt-it.next { border-top-style: solid; }
.rt-tag, .rt-it .b .rt-tag { display: inline-block; width: auto; margin: 0 0 4px; color: inherit; padding: 1px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.rt-it .b .rt-tag.now, .rt-tag.now { background: var(--rt-ok); color: #06301f; } .rt-it .b .rt-tag.next, .rt-tag.next { background: var(--rt-gold); color: #3a2600; }
.rt-duty { padding: 14px 16px; margin-bottom: 10px; }
.rt-duty h4 { margin: 0 0 6px; display: flex; gap: 10px; align-items: center; font-size: 15.5px; font-weight: 800; color: var(--rt-gold2); text-transform: uppercase; letter-spacing: .02em; }
.rt-duty h4 i { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; background: linear-gradient(145deg, #2a66bd, #17407e); color: #fff; border: 1px solid rgba(160, 196, 255, .5); }
.rt-duty p { margin: 4px 0; font-size: 15px; } .rt-duty p.hd { font-weight: 800; margin-top: 9px; }
.rt-duty ul { margin: 2px 0 4px; padding-left: 20px; } .rt-duty li { margin: 3px 0; font-size: 15px; } .rt-duty li::marker { color: var(--rt-gold); }

/* ------------------------------------------------ kinh · hát */
.rt-grp { margin: 14px 2px 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--rt-gold); }
.rt-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .rt-list { grid-template-columns: 1fr 1fr; } }
.rt-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 18px; cursor: pointer; text-align: left; width: 100%;
  border: 1px solid var(--rt-line); background: linear-gradient(155deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .06));
  box-shadow: 0 8px 18px rgba(3, 12, 30, .34), inset 0 1px 0 rgba(255, 255, 255, .24);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), border-color .18s ease;
}
.rt-row:hover { transform: translateY(-3px); border-color: rgba(242, 193, 78, .55); } .rt-row:active { transform: scale(.98); }
.rt-row .i { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(145deg, var(--c2, #7fb2ef), var(--c1, #2a78d6)); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5), 0 5px 10px rgba(0, 0, 0, .3); }
.rt-row .i svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rt-row .i b { font-size: 12px; font-weight: 800; color: #fff; letter-spacing: .03em; }
.rt-row .tx { flex: 1; min-width: 0; } .rt-row .tx b { display: block; font-size: 15.5px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.rt-row .tx span { display: block; font-size: 12.5px; color: var(--rt-ink2); margin-top: 1px; }
.rt-row > svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--rt-ink3); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rt-row .acts { flex: none; display: flex; gap: 6px; }
.rt-read { padding: 20px 20px 26px; }
.rt-read h3 { margin: 0 0 4px; font-size: 22px; font-weight: 800; line-height: 1.25; color: var(--rt-gold2); }
.rt-read .g { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--rt-ink3); margin-bottom: 12px; }
.rt-read .body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--rt-fs, 18px); line-height: 1.7; }
.rt-fs { display: flex; gap: 6px; }
.rt-fs button { width: 40px; height: 36px; border-radius: 12px; cursor: pointer; font-weight: 800; background: rgba(255, 255, 255, .14); border: 1px solid var(--rt-line); }

/* ------------------------------------------------ hỗ trợ (hội thoại) */
.rt-chat { display: flex; flex-direction: column; gap: 9px; padding: 14px; min-height: 240px; max-height: 56vh; max-height: 56dvh; overflow-y: auto; overscroll-behavior: contain; }
.rt-msg { max-width: 84%; padding: 9px 13px; border-radius: 17px; font-size: 15.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; animation: rt-pop .22s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rt-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.rt-msg small { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; opacity: .72; }
.rt-msg.me { align-self: flex-end; border-bottom-right-radius: 6px; background: linear-gradient(170deg, #2f72cf, #1c4c96); border: 1px solid rgba(160, 196, 255, .45); }
.rt-msg.them { align-self: flex-start; border-bottom-left-radius: 6px; background: linear-gradient(170deg, rgba(242, 193, 78, .3), rgba(242, 193, 78, .14)); border: 1px solid rgba(242, 193, 78, .5); }
.rt-msg.them b.who { display: block; font-size: 11.5px; color: var(--rt-gold2); margin-bottom: 2px; }
.rt-send { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--rt-line); background: rgba(8, 22, 48, .35); }
.rt-send textarea {
  flex: 1; min-height: 46px; max-height: 140px; resize: none; padding: 11px 13px; border-radius: 15px; font: inherit; font-size: 16px; color: #fff;
  background: rgba(255, 255, 255, .1); border: 1px solid var(--rt-line); outline: none;
}
.rt-send textarea:focus { border-color: var(--rt-gold); box-shadow: 0 0 0 3px rgba(242, 193, 78, .2); }
.rt-send textarea::placeholder { color: var(--rt-ink3); }
.rt-who { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rt-who button { padding: 8px 13px; border-radius: 13px; cursor: pointer; font-weight: 800; font-size: 14px; background: rgba(255, 255, 255, .1); border: 1px solid var(--rt-line); }
.rt-who button.on { background: linear-gradient(180deg, #ffd978, #e8ae2b); color: #3a2600; border-color: transparent; }

/* ------------------------------------------------ xem tài liệu ngay trên màn hình */
.rt-doc { padding: 10px; }
.rt-doc canvas, .rt-doc img { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; margin: 0 auto 10px; box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }
.rt-doc .rt-rich { background: #fff; color: #1d2a3a; border-radius: 12px; padding: 16px; }
.rt-doc .rt-rich h1, .rt-doc .rt-rich h2, .rt-doc .rt-rich h3 { color: #123a6b; } .rt-doc .rt-rich a { color: #1f6fd1; }
.rt-doc .rt-rich td, .rt-doc .rt-rich th { border-color: #cfd9e6; }
.rt-spin { width: 34px; height: 34px; margin: 26px auto; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--rt-gold); animation: rt-spin .8s linear infinite; }
@keyframes rt-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------ màn hình báo (đã kết thúc / mã sai / lỗi mạng) */
.rt-msgbox { max-width: 460px; margin: 12vh auto 0; padding: 30px 24px; text-align: center; }
.rt-msgbox .rt-badge { margin: 0 auto 14px; width: 64px; height: 64px; }
.rt-msgbox h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.rt-msgbox p { margin: 0; color: var(--rt-ink2); font-size: 15.5px; line-height: 1.55; }
.rt-msgbox .rt-btn { margin-top: 18px; }
/* v1.6.75 — mã QR phòng khi chức năng tắt: chỉ một lời chào */
.rt-welcome { margin-top: 20vh; padding: 38px 24px 34px; }
.rt-welcome h2 { margin: 0; font-size: 26px; line-height: 1.3; letter-spacing: -.01em; }

/* trong ứng dụng: khung nội dung của app đã có lề riêng → kéo nền ra sát mép khung */
.rt-inapp { margin: -16px; border-radius: 0; }
@media (max-width: 760px) { .rt-inapp { margin: -12px; } }
.rt-inapp .rt-bg { height: calc(100vh - 56px); margin-bottom: calc(56px - 100vh); }

@media (max-width: 380px) {
  .rt-top h1 { font-size: 18px; } .rt-hello h2 { font-size: 19px; } .rt-next h3 { font-size: 20px; }
  .rt-tile { min-width: 54px; } .rt-tile b { font-size: 26px; } .rt-w { min-height: 122px; padding: 14px; } .rt-w .t { font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .rt *, .rt *::before, .rt *::after { animation: none !important; transition: none !important; }
}
@media print {
  .rt-bg, .rt-vh .rt-back, .rt-send, .rt-fs { display: none !important; }
  .rt { color: #000; } .rt-glass { background: #fff; border-color: #bbb; box-shadow: none; }
}

/* =====================================================================================================
   TRANG QUẢN TRỊ "Tĩnh tâm" (#/a/retreat) — tiền tố .rta-, dùng biến màu của giao diện chung (aero.css)
   ===================================================================================================== */
.rta-head { padding-bottom: 12px; }
.rta-headrow { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.rta-sel { flex: 1 1 280px; max-width: 460px; }
.rta-state { padding-bottom: 7px; }
.rta-live i { animation: rta-blink 1.6s ease-in-out infinite; }
@keyframes rta-blink { 50% { opacity: .25; } }
.rta-note { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-sunken); color: var(--text-2); }
.rta-pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.rta-pill { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-strong); }
.rta-pill svg { width: 20px; height: 20px; color: var(--primary); flex: none; }
.rta-pill b { font-size: 20px; font-weight: 900; line-height: 1; }
.rta-pill span { font-size: 12.5px; font-weight: 700; color: var(--text-2); line-height: 1.2; }
.rta-pill small { display: block; font-size: 11px; color: var(--text-3); font-weight: 700; }

/* công tắc bật / tắt kỳ */
.rta-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 800; font-size: 13.5px; padding-bottom: 6px; user-select: none; }
.rta-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rta-switch i { position: relative; width: 50px; height: 28px; border-radius: 999px; background: #b9c2d0; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .22); transition: background .2s; flex: none; }
.rta-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(#fff, #e8edf5); box-shadow: 0 2px 5px rgba(0, 0, 0, .3); transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
.rta-switch input:checked + i { background: linear-gradient(#35c07a, #1c9a5b); }
.rta-switch input:checked + i::after { transform: translateX(22px); }
.rta-switch input:focus-visible + i { outline: 3px solid var(--primary-soft); outline-offset: 2px; }

.rta-tabs button { white-space: nowrap; }
.rta-n { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-size: 11px; line-height: 18px; text-align: center; }
.rta-n.hot { background: #d64545; color: #fff; }
.rta-2col { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.rta-2col.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1080px) { .rta-2col, .rta-2col.even { grid-template-columns: minmax(0, 1fr); } }
.rta-box { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-sunken); }
.rta-chk { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 13.5px; margin-top: 6px; cursor: pointer; }
.rta-chk input { width: 17px; height: 17px; flex: none; }
.rta-ul { margin: 6px 0 0; padding-left: 18px; } .rta-ul li { margin: 3px 0; }
.rta-pre { white-space: normal; margin-top: 4px; color: var(--text-2); }
.rta-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rta-rot { transform: rotate(90deg); }

/* người dự + phòng */
.rta-gt { max-height: 62vh; overflow-y: auto; }
.rta-room { width: 98px; height: 32px; text-align: center; font-weight: 900; font-size: 14.5px; padding: 0 4px; }
.rta-room:not(:placeholder-shown) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-2, var(--primary)); }
.rta-gnote { height: 32px; min-width: 110px; font-size: 13px; background: transparent; border-color: transparent; padding: 0 6px; }
.rta-gnote:hover, .rta-gnote:focus { border-color: var(--line); background: var(--surface-strong); }
.rta-rooms { display: flex; flex-direction: column; gap: 6px; max-height: 62vh; overflow-y: auto; padding-right: 2px; }
.rta-roomrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-strong); }
.rta-roomrow.empty { opacity: .78; }
.rta-no { min-width: 52px; padding: 5px 8px; border-radius: 10px; text-align: center; font-weight: 900; font-size: 15px; color: #fff;
  background: linear-gradient(160deg, #2f72cf, #1c4c96); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 8px -3px rgba(18, 58, 107, .6); }
.rta-roomrow.empty .rta-no { background: linear-gradient(160deg, #9aa7ba, #74819a); box-shadow: none; }
.rta-qrbase { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; padding: 7px 10px; border-radius: 10px; background: var(--surface-sunken); font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.rta-qrbase svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--primary); }
.rta-qrbase.warn { background: rgba(229, 154, 11, .14); border: 1px solid rgba(229, 154, 11, .45); color: inherit; }
.rta-qrbase.warn svg { color: #b96a16; }
.rta-qr { display: inline-block; padding: 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); min-width: 240px; min-height: 240px; }
.rta-qr img { display: block; }
.rta-url { padding: 6px 10px; border-radius: 10px; background: var(--surface-sunken); overflow-wrap: anywhere; font-size: 12.5px; }

/* hộp chọn linh mục */
.rta-pick { position: relative; }
/* danh sách kết quả nằm NGAY TRONG dòng chảy của hộp thoại (không nổi) — nổi lên thì bị mép hộp thoại cắt mất */
.rta-drop { margin-top: 6px; max-height: 264px; overflow-y: auto; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-strong); }
.rta-opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; padding: 7px 12px; cursor: pointer; color: inherit; }
.rta-opt:last-child { border-bottom: 0; }
.rta-opt:hover:not(:disabled) { background: var(--primary-soft); }
.rta-opt b { font-weight: 800; } .rta-opt span { grid-column: 1; font-size: 12px; color: var(--text-2); }
.rta-opt i { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--text-3); }
.rta-opt.off { opacity: .55; cursor: default; }
.rta-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 34px; align-items: center; }
.rta-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 11px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-2, var(--primary)); font-weight: 800; font-size: 13px; }
.rta-chip button { border: 0; background: none; padding: 2px; cursor: pointer; color: inherit; display: inline-flex; border-radius: 50%; }
.rta-chip button:hover { background: rgba(0, 0, 0, .1); } .rta-chip svg { width: 14px; height: 14px; }
.rta-dean { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* chương trình */
.rta-days { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.rta-day { flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 84px; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-strong); font: inherit; cursor: pointer; color: inherit; }
.rta-day b { font-weight: 900; font-size: 13.5px; } .rta-day small { font-size: 11px; color: var(--text-3); font-weight: 700; }
.rta-day.on { border-color: var(--primary); background: linear-gradient(160deg, #2f72cf, #1c4c96); color: #fff; box-shadow: 0 6px 14px -6px rgba(28, 76, 150, .7); }
.rta-day.on small { color: rgba(255, 255, 255, .8); }
.rta-day.add { border-style: dashed; color: var(--text-2); } .rta-day.add svg { width: 17px; height: 17px; }
.rta-items { display: flex; flex-direction: column; gap: 5px; }
.rta-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-strong); }
.rta-time { flex: none; min-width: 58px; padding: 4px 8px; border-radius: 9px; text-align: center; font-weight: 900; font-variant-numeric: tabular-nums; background: var(--primary-soft); color: var(--primary-2, var(--primary)); }
.rta-add { display: grid; grid-template-columns: 84px minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; padding: 10px; border-radius: 12px; border: 1px dashed var(--line); background: var(--surface-sunken); }
@media (max-width: 760px) { .rta-add { grid-template-columns: 84px minmax(0, 1fr); } .rta-add [name="note"] { grid-column: 1 / -1; } .rta-add button { grid-column: 1 / -1; } }
.rta-blocks { display: flex; flex-direction: column; gap: 8px; }
.rta-block { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-strong); }
.rta-grp { margin: 10px 0 2px; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); }
.rta-grp:first-child { margin-top: 0; }
.rta-lyrics { font-size: 15px; line-height: 1.55; min-height: 300px; }

/* tài liệu */
.rta-ext { flex: none; min-width: 46px; padding: 6px 4px; border-radius: 9px; text-align: center; font-weight: 900; font-size: 11.5px; color: #fff; background: linear-gradient(160deg, #e0913a, #b96a16); }
.rta-drophere { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; padding: 14px; border-radius: 12px; border: 2px dashed var(--line); color: var(--text-2); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: background .15s, border-color .15s; }
.rta-drophere svg { width: 18px; height: 18px; }
.rta-drophere.on, .rta-drophere:hover { border-color: var(--primary); background: var(--primary-soft); }
.rta-up { display: flex; gap: 10px; padding: 6px 10px; margin-bottom: 5px; border-radius: 10px; background: var(--primary-soft); font-size: 13px; font-weight: 700; }
.rta-up.err { background: rgba(214, 69, 69, .12); color: #b83636; }

/* hỗ trợ */
.rta-sup { display: grid; grid-template-columns: minmax(230px, 320px) minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; min-height: 460px; }
.rta-sup-l { padding: 12px; border-right: 1px solid var(--line); max-height: 70vh; overflow-y: auto; }
.rta-sup-r { display: flex; flex-direction: column; min-width: 0; max-height: 70vh; }
.rta-sup-empty { margin: auto; }
.rta-sup-h { padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-sunken); }
.rta-th { display: block; width: 100%; text-align: left; border: 1px solid transparent; border-radius: 12px; background: none; font: inherit; color: inherit; padding: 8px 10px; margin-bottom: 4px; cursor: pointer; }
.rta-th:hover { background: var(--surface-sunken); }
.rta-th.on { background: var(--primary-soft); border-color: var(--primary); }
.rta-th.new b { color: #b83636; }
.rta-dot { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #d64545; color: #fff; font-style: normal; font-size: 11.5px; font-weight: 900; line-height: 20px; text-align: center; }
.rta-chat { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px; overflow-y: auto; min-height: 240px; }
.rta-msg { max-width: 82%; padding: 8px 12px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.rta-msg .who { display: block; font-size: 11.5px; font-weight: 800; margin-bottom: 2px; opacity: .8; }
.rta-msg small { display: block; margin-top: 3px; font-size: 11px; opacity: .65; }
.rta-msg.them { align-self: flex-start; border-bottom-left-radius: 5px; background: var(--surface-sunken); border: 1px solid var(--line); }
.rta-msg.me { align-self: flex-end; border-bottom-right-radius: 5px; color: #fff; background: linear-gradient(170deg, #2f72cf, #1c4c96); }
.rta-mimg { display: block; width: auto; height: auto; max-width: min(100%, 320px); max-height: 260px; border-radius: 10px; margin: 2px 0 5px; cursor: zoom-in; object-fit: contain; background: rgba(0, 0, 0, .06); }
.rta-pend { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--primary-soft); }
.rta-pend[hidden] { display: none; }
.rta-pend img { width: 46px; height: 46px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.rta-reply { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface-sunken); }
.rta-reply textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; }
@media (max-width: 820px) { .rta-sup { grid-template-columns: minmax(0, 1fr); } .rta-sup-l { border-right: 0; border-bottom: 1px solid var(--line); max-height: 240px; } }

/* báo cáo */
.rta-xgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; }
.rta-x { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.rta-x-i { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #2f72cf, #1c4c96); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 5px 12px -5px rgba(18, 58, 107, .6); }
.rta-x-i svg { width: 22px; height: 22px; }
.rta-x .btn svg { width: 15px; height: 15px; }

/* thiết lập: xem thử độ rõ ảnh nền */
.rta-bgprev { position: relative; height: 210px; border-radius: 16px; overflow: hidden; background: linear-gradient(170deg, #0b2247, #123a6b 55%, #0a1c3c); display: grid; place-items: center; }
.rta-bgimg { position: absolute; inset: 0; background: url('../img/retreat-bg-820.jpg') center 30% / cover no-repeat; }
.rta-bgcard { position: relative; padding: 12px 18px; border-radius: 16px; color: #fff; text-align: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.rta-bgcard b { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #f6d27a; }
.rta-bgcard span { font-size: 17px; font-weight: 800; }
.rta-range { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.rta-range input { flex: 1; } .rta-range b { min-width: 46px; text-align: right; font-weight: 900; }

/* v1.6.74 — loại kỳ: tĩnh tâm / thường huấn */
.rta-kind { align-self: flex-start; }
.rta-kind button { padding: 6px 16px; }
.rta-kindchip { gap: 5px; font-weight: 800; }
.rta-kindchip svg { width: 14px; height: 14px; }
.rta-kindchip.retreat { background: rgba(242, 193, 78, .22); color: #8a5a00; border-color: rgba(214, 150, 20, .5); }
.rta-kindchip.formation { background: rgba(31, 111, 209, .14); color: #1c4c96; border-color: rgba(31, 111, 209, .4); }

/* v1.6.76 — tiêu đề từng NHÀ trong danh sách phòng */
.rta-house { display: flex; align-items: center; gap: 6px; margin: 8px 2px 0; font-size: 12.5px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); }
.rta-house:first-child { margin-top: 0; }
.rta-house svg { width: 15px; height: 15px; }
.rta-house .faint { text-transform: none; letter-spacing: 0; font-weight: 700; }

/* v1.6.77 — hộp Nhập từ Excel */
.rta-imp { display: flex; flex-direction: column; gap: 14px; }
.rta-imp-step { display: flex; gap: 12px; align-items: flex-start; }
.rta-imp-step > .grow { min-width: 0; }
@media (max-width: 640px) { .rta-imp-step { gap: 8px; } .rta-imp-n { width: 24px; height: 24px; font-size: 12.5px; } }
/* đầu thẻ có nhiều nút: tên thẻ giữ một dòng, nút tự xuống hàng */
.rta-wraph { flex-wrap: wrap; row-gap: 8px; }
.rta-wraph h3 { white-space: nowrap; }
.rta-imp-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; color: #fff; background: linear-gradient(160deg, var(--primary), var(--primary-2, var(--primary))); box-shadow: 0 4px 10px -3px rgba(31, 111, 209, .5); }
.rta-imp-sum { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rta-imp-t { max-height: 46vh; overflow: auto; }
.rta-imp-t table.t td { vertical-align: top; }
.rta-imp-t tr.rta-imp-error td { background: rgba(229, 72, 77, .07); }
.rta-imp-t tr.rta-imp-outside td { background: rgba(245, 158, 11, .08); }
.rta-imp-warn { margin-top: 3px; color: #a15c00; display: flex; gap: 5px; align-items: flex-start; }
.rta-imp-warn svg { flex: none; width: 13px; height: 13px; margin-top: 2px; }
.chip.rta-chip-err { background: rgba(214, 69, 69, .14); color: #a8261f; } .chip.rta-chip-err i { --dot: #d64545; }

/* =====================================================================================================
   v1.6.78 — CHỌN PHÒNG (hai khung) · SƠ ĐỒ PHÒNG · hộp chi tiết một phòng
   Ba tình trạng: s0 = trống (kính xanh lá) · s1 = có một vị (xanh dương) · s2 = ở ghép (tím)
   ===================================================================================================== */
.rta-roombtn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 126px; max-width: 100%; min-height: 36px; padding: 3px 8px; border-radius: 10px;
  font: inherit; font-weight: 800; font-size: 12.5px; line-height: 1.15; cursor: pointer; color: var(--text-3); background: transparent; border: 1.5px dashed var(--line-strong, #cbd5e1);
  transition: background .15s, border-color .15s, color .15s, transform .12s; overflow: hidden;
}
.rta-roombtn svg { width: 13px; height: 13px; }
.rta-roombtn:not(.on) { flex-direction: row; gap: 5px; }
.rta-roombtn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.rta-roombtn:active { transform: scale(.97); }
.rta-roombtn.on { border-style: solid; border-color: var(--primary); background: var(--primary-soft); color: var(--primary-2, var(--primary)); }
.rta-roombtn.ro { cursor: default; }
/* v1.6.79 — tên nhà một dòng chữ nhỏ ở trên, số phòng ở dưới; dài quá thì thu chữ rồi mới cắt bằng dấu … */
.rb-h { display: block; max-width: 100%; font-size: 10px; font-weight: 700; letter-spacing: .01em; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-n { display: block; max-width: 100%; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-n.fz1 { font-size: 14.5px; } .rb-n.fz2 { font-size: 13.5px; } .rb-n.fz3 { font-size: 12px; } .rb-n.fz4 { font-size: 10.5px; }

.rm-dot { display: inline-block; width: 11px; height: 11px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.rm-dot.s0 { background: linear-gradient(160deg, #e9fbf1, #bdeed4); border: 1px solid #62c796; }
.rm-dot.s1 { background: linear-gradient(160deg, #6fb2ff, #2a78d6); }
.rm-dot.s2 { background: linear-gradient(160deg, #b99cff, #7a4fe0); }

.rm-room {
  --c1: #2a78d6; --c2: #7dbbff; --sh: rgba(42, 120, 214, .55); --ink: #fff;
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 62px; padding: 8px 6px 7px;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, .7); cursor: pointer; font: inherit; color: var(--ink); overflow: hidden; isolation: isolate;
  background: linear-gradient(165deg, var(--c2) 0%, var(--c1) 100%);
  box-shadow: 0 9px 16px -8px var(--sh), inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -3px 6px rgba(0, 0, 0, .12);
  transition: transform .16s cubic-bezier(.2, .8, .2, 1), box-shadow .16s ease, filter .16s ease;
}
/* mặt kính bóng phía trên + vệt sáng lướt qua khi rê chuột */
.rm-room::before { content: ""; position: absolute; inset: 0 0 52% 0; border-radius: 15px 15px 60% 60% / 15px 15px 22% 22%; background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .08)); z-index: -1; pointer-events: none; }
.rm-room::after { content: ""; position: absolute; top: -30%; bottom: -30%; left: -70%; width: 46%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: rotate(10deg); opacity: 0; pointer-events: none; }
.rm-room:hover, .rm-room:focus-visible { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 22px -8px var(--sh), inset 0 1px 0 rgba(255, 255, 255, .7); outline: none; filter: saturate(1.08); }
.rm-room:hover::after, .rm-room:focus-visible::after { animation: rm-shine .7s ease-out; }
.rm-room:active { transform: translateY(0) scale(.97); transition-duration: .06s; }
@keyframes rm-shine { 0% { left: -70%; opacity: 0; } 25% { opacity: 1; } 100% { left: 130%; opacity: 0; } }
.rm-room b { font-size: 16px; line-height: 1.12; font-weight: 900; letter-spacing: .01em; text-shadow: 0 1px 2px rgba(0, 0, 0, .28); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v1.6.79 — SỐ PHÒNG thu chữ dần theo độ dài (fz1 ≤ 4 ký tự … fz4 ≥ 10 ký tự); rất dài thì cho xuống hai dòng */
.rm-room b.fz1 { font-size: 16px; } .rm-room b.fz2 { font-size: 14px; } .rm-room b.fz3 { font-size: 12px; letter-spacing: 0; }
.rm-room b.fz4 { font-size: 10.5px; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* dòng phụ (tên người ở / tầng / tên nhà): chữ nhỏ, tối đa HAI dòng rồi mới cắt */
.rm-room span { font-size: 9.5px; line-height: 1.2; font-weight: 700; opacity: .94; max-width: 100%; overflow: hidden; white-space: normal; overflow-wrap: anywhere; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rm-room span.fz3 { font-size: 9px; } .rm-room span.fz4 { font-size: 8.5px; letter-spacing: -.01em; }
.rm-room.s0 { --c1: #c5efd9; --c2: #f0fdf6; --sh: rgba(52, 168, 110, .38); --ink: #136a41; border-color: #7fd2a6; }
.rm-room.s0 b { text-shadow: none; }
.rm-room.s2 { --c1: #7a4fe0; --c2: #b99cff; --sh: rgba(122, 79, 224, .55); }
/* phòng ở ghép có con số ở góc phải trên → số phòng thu hẹp lại cho khỏi đè lên con số */
.rm-room.s2 b { max-width: calc(100% - 30px); }
.rm-room.cur { outline: 3px solid #f2a13c; outline-offset: 2px; }
.rm-n { position: absolute; top: 4px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 900; color: #5b34c4; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }

/* ---- thẻ Sơ đồ phòng */
.rm-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 12px; }
.rm-seg { flex-wrap: wrap; }
.rm-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; color: var(--text-2); }
.rm-house + .rm-house { margin-top: 18px; }
.rm-househ { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--primary); }
.rm-househ svg { width: 16px; height: 16px; align-self: center; }
.rm-househ b { font-size: 15px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.rm-househ span { font-size: 12.5px; color: var(--text-3); font-weight: 700; }
.rm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
@media (prefers-reduced-motion: no-preference) {
  .rm-grid .rm-room { animation: rm-in .32s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 9ms); }
}
@keyframes rm-in { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .rm-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; } .rm-room { min-height: 56px; border-radius: 14px; } }

/* ---- hộp chọn phòng: khung trái dãy nhà · khung phải các phòng */
.rp { display: flex; flex-direction: column; gap: 10px; }
.rp-top { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.rp-top .search { min-width: min(240px, 100%); }
.rp-all { margin: 0; }
.rp-cur { padding: 6px 10px; border-radius: 10px; background: var(--primary-soft); }
.rp-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; align-items: start; }
.rp-houses { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; padding: 2px; }
.rp-house { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-strong); font: inherit; text-align: left; cursor: pointer; transition: background .15s, border-color .15s, transform .12s; }
.rp-house b { font-size: 13.5px; font-weight: 900; }
.rp-house span { font-size: 11.5px; color: var(--text-3); font-weight: 700; }
.rp-house:hover { border-color: var(--primary); }
.rp-house.on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--primary), var(--primary-2, var(--primary))); box-shadow: 0 6px 14px -5px rgba(34, 128, 216, .5), inset 0 1px 0 rgba(255, 255, 255, .4); }
.rp-house.on span { color: rgba(255, 255, 255, .88); }
.rp-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; align-content: start; max-height: 50vh; min-height: 120px; overflow-y: auto; padding: 4px 4px 8px; }
.rp-rooms .rm-room { min-height: 54px; border-radius: 13px; }
.rp-empty { grid-column: 1 / -1; padding: 22px 14px; text-align: center; color: var(--text-3); font-size: 13.5px; border: 1.5px dashed var(--line); border-radius: 14px; }
.rp-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.rp-glist { display: flex; flex-direction: column; gap: 6px; max-height: 54vh; overflow-y: auto; padding: 2px; }
.rp-g { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-strong); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.rp-g b { font-size: 14px; font-weight: 800; }
.rp-g span { font-size: 12px; color: var(--text-3); }
.rp-g:hover { border-color: var(--primary); background: var(--primary-soft); }
/* v1.6.80 — hộp "Thêm người vào phòng": tìm trong cả danh sách linh mục, mỗi dòng ghi rõ tình trạng */
.rp-hint { margin: 8px 2px 6px; line-height: 1.45; }
.rp-sub { font-size: 11.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); padding: 2px 4px; }
.rp-all.off { opacity: .4; pointer-events: none; }
.rp-g { width: 100%; min-width: 0; }
.rp-g b, .rp-g span { max-width: 100%; overflow-wrap: anywhere; }
.rp-g:disabled { cursor: default; opacity: .6; }
.rp-g:disabled:hover { border-color: var(--line); background: var(--surface-strong); }
.rp-ap { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 999px; background: rgba(120, 120, 140, .16); color: var(--text-3); vertical-align: 1px; white-space: nowrap; }
.rp-tag { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-top: 3px; max-width: 100%; overflow-wrap: anywhere; }
.rp-tag.new { background: rgba(46, 160, 90, .15); color: #1f8a4c; }
.rp-tag.in { background: rgba(34, 128, 216, .14); color: var(--primary); }
.rp-tag.other { background: rgba(224, 150, 20, .18); color: #a86a00; }
.rp-tag.here { background: rgba(120, 120, 140, .18); color: var(--text-3); }
.rp-newguest { flex-direction: row; align-items: center; gap: 10px; border-style: dashed; border-width: 1.5px; }
.rp-newguest svg { width: 20px; height: 20px; flex: none; color: var(--primary); }
.rp-newguest > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
[data-theme="dark"] .rp-tag.new { color: #6fdc9c; }
[data-theme="dark"] .rp-tag.other { color: #f2c063; }

@media (max-width: 640px) {
  .rp-body { grid-template-columns: minmax(0, 1fr); }
  .rp-houses { flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .rp-house { flex: none; }
  .rp-rooms { max-height: 44vh; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); }
}

/* ---- hộp chi tiết một phòng */
.rmp-head { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-strong); flex-wrap: wrap; }
.rmp-no { flex: none; min-width: 64px; padding: 10px 12px; border-radius: 14px; text-align: center; font-size: 24px; font-weight: 900; color: #fff; background: linear-gradient(165deg, #7dbbff, #2a78d6); box-shadow: 0 8px 16px -8px rgba(42, 120, 214, .6), inset 0 1px 0 rgba(255, 255, 255, .6); text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.rmp-head.s0 .rmp-no { color: #136a41; background: linear-gradient(165deg, #f0fdf6, #c5efd9); box-shadow: 0 8px 16px -8px rgba(52, 168, 110, .45), inset 0 1px 0 #fff; text-shadow: none; }
.rmp-head.s2 .rmp-no { background: linear-gradient(165deg, #b99cff, #7a4fe0); box-shadow: 0 8px 16px -8px rgba(122, 79, 224, .6), inset 0 1px 0 rgba(255, 255, 255, .6); }
.chip.rmp-st.s0 { background: rgba(52, 168, 110, .14); color: #136a41; } .chip.rmp-st.s0 i { --dot: #34a86e; }
.chip.rmp-st.s1 { background: rgba(42, 120, 214, .13); color: #1c4c96; } .chip.rmp-st.s1 i { --dot: #2a78d6; }
.chip.rmp-st.s2 { background: rgba(122, 79, 224, .14); color: #5b34c4; } .chip.rmp-st.s2 i { --dot: #7a4fe0; }
.rmp-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.rmp-g { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface-strong); }
.rmp-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 10px; color: var(--text-3); border: 1.5px dashed var(--line); border-radius: 14px; }
.rmp-empty svg { width: 26px; height: 26px; opacity: .6; }
.rmp-add { width: 100%; margin-top: 12px; justify-content: center; }
.rmp-no { max-width: 46%; overflow-wrap: anywhere; line-height: 1.1; }
.rmp-no.fz2 { font-size: 20px; } .rmp-no.fz3 { font-size: 16px; } .rmp-no.fz4 { font-size: 13px; }
.rta-no { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rta-no.fz2 { font-size: 13.5px; } .rta-no.fz3 { font-size: 12px; } .rta-no.fz4 { font-size: 10.5px; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }
