/* ============================================================
   ENgage — giao diện chung
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--c-blue); }

/* Khung ứng dụng: trên điện thoại chiếm toàn màn hình,
   trên máy tính thu về giữa cho giống khung điện thoại. */
#app {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--c-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 520px) {
  body { background: #E9EBF6; }
  #app { box-shadow: var(--sh-lg); }
}

.screen {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: screenIn .26s ease both;
}
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }

.scroll { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Nền navy có sóng ---------- */
.deep {
  background: linear-gradient(170deg, var(--c-deep) 0%, var(--c-deep-2) 100%);
  color: #fff;
  position: relative;
}
.deep__wave {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 90px;
  pointer-events: none; opacity: .5;
}
/* width:100% là bắt buộc: SVG có tỉ lệ riêng, nếu để width tự động thì nó rộng
   đúng 420px theo viewBox và làm cả màn hình trượt ngang khi bấm vào ô nhập. */

/* Dải chữ chạy "EVERY NATION · EVERY HEART" */
.marquee { overflow: hidden; white-space: nowrap; padding: 10px 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: inline-block; animation: marq 26s linear infinite; }
.marquee span {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .28em;
  color: var(--c-marigold); opacity: .85; padding-right: 26px;
}
@keyframes marq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex; align-items: baseline;
  background: #fff; border-radius: 12px; padding: 7px 14px 9px;
  box-shadow: var(--sh-sm);
}
.logo__en   { font-family: var(--f-display); font-weight: 800; font-size: 26px; color: var(--c-blue); letter-spacing: -.02em; }
.logo__gage { font-family: var(--f-serif); font-style: italic; font-size: 27px; color: var(--c-marigold); margin-left: 1px; }
.logo--sm { padding: 5px 11px 6px; border-radius: 10px; }
.logo--sm .logo__en { font-size: 19px; }
.logo--sm .logo__gage { font-size: 20px; }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 14px 20px;
  border-radius: var(--r-pill);
  font-family: var(--f-display); font-weight: 700; font-size: 16px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: scale(.978); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--gold  { background: var(--c-marigold); color: var(--c-ink); box-shadow: 0 4px 14px rgba(248,190,44,.35); }
.btn--gold:hover:not(:disabled)  { background: var(--c-marigold-d); }
.btn--blue  { background: var(--c-blue); color: #fff; box-shadow: 0 4px 14px rgba(42,78,224,.3); }
.btn--blue:hover:not(:disabled)  { background: var(--c-blue-ink); }
.btn--ghost { background: transparent; color: var(--c-muted); font-weight: 600; min-height: 44px; box-shadow: none; }
.btn--line  { background: #fff; color: var(--c-ink); border: 1.5px solid var(--c-line); }
.btn--sm    { min-height: 42px; font-size: 14px; padding: 10px 18px; width: auto; }

/* ---------- Ô nhập ---------- */
.field { margin-bottom: 16px; }
.field > label { display: block; margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%; background: #fff; border: 1.5px solid var(--c-line);
  border-radius: var(--r-md); padding: 13px 15px; font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--c-muted-2); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(42,78,224,.12);
}
.input[aria-invalid="true"] { border-color: var(--c-coral); }
.textarea { resize: none; line-height: 1.5; }
.input--code { font-family: var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }

/* Ô tick */
.check { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 13px; cursor: pointer; }
.check input { width: 21px; height: 21px; margin: 1px 0 0; accent-color: var(--c-blue); flex: none; }
.check span { font-size: 13.5px; line-height: 1.45; color: #3A3F52; }

/* ---------- Thẻ & hộp thông báo ---------- */
.card { background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 18px; }
.note {
  background: var(--c-amber-bg); border: 1px solid var(--c-amber-line);
  border-radius: var(--r-md); padding: 13px 15px; font-size: 13.5px; color: var(--c-amber-ink);
}
.note--paper { background: var(--c-paper); border-color: #E3DCCB; color: #5A4000; }
.alert { border-radius: var(--r-md); padding: 12px 15px; font-size: 13.5px; margin-bottom: 14px; }
.alert--bad  { background: var(--c-red-bg);   color: #A3231B; }
.alert--good { background: var(--c-green-bg); color: #04693F; }

/* Thẻ nhỏ (chip) */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-pill);
  background: #fff; border: 1.5px solid var(--c-line);
  font-size: 13.5px; font-weight: 600; color: #3A3F52;
  transition: all .12s ease;
}
.chip[aria-pressed="true"] { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

/* Huy hiệu xác minh */
.badge-verified {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(255,255,255,.9); color: var(--c-deep);
  padding: 5px 10px; border-radius: var(--r-pill); backdrop-filter: blur(6px);
}

/* ---------- Thanh tiến trình ---------- */
.progress { height: 4px; background: rgba(255,255,255,.22); border-radius: 2px; overflow: hidden; }
.progress__bar { height: 100%; background: var(--c-marigold); border-radius: 2px; transition: width .32s cubic-bezier(.4,0,.2,1); }

/* ---------- Tấm trắng trượt lên (onboarding) ---------- */
.sheet {
  background: #fff; color: var(--c-ink);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 26px var(--gutter) calc(22px + var(--safe-b));
  box-shadow: var(--sh-up);
  animation: sheetUp .34s cubic-bezier(.22,1,.36,1) both;
}
@keyframes sheetUp { from { transform: translateY(22px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }

.dots { display: flex; gap: 6px; margin-bottom: 18px; }
.dots i { height: 4px; width: 8px; border-radius: 2px; background: var(--c-line); transition: width .3s ease, background .3s ease; }
.dots i.on { width: 22px; background: var(--c-blue); }

/* ---------- Tiện ích ---------- */
.pad { padding: 0 var(--gutter); }
.stack > * + * { margin-top: 12px; }
.center { text-align: center; }
.muted { color: var(--c-muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.spacer { flex: 1 1 auto; }
.row { display: flex; align-items: center; gap: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Vòng xoay chờ */
.spinner { width: 17px; height: 17px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn--gold .spinner { border-color: rgba(0,0,0,.2); border-top-color: var(--c-ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Màn hình chờ toàn trang */
.boot { display: grid; place-items: center; min-height: 100dvh; gap: 18px; }

/* ============================================================
   Màn hình chọn ngôn ngữ
   ============================================================ */
.opt {
  width: 100%; display: flex; align-items: center; gap: 13px;
  background: #fff; border-radius: var(--r-md); padding: 14px 16px;
  text-align: left; box-shadow: var(--sh-sm);
  transition: transform .12s ease, box-shadow .12s ease;
}
.opt:active { transform: scale(.985); }
.opt[data-lang="en"] { background: var(--c-marigold); }
.opt__flag { font-size: 22px; line-height: 1; flex: none; }
.opt__text { flex: 1 1 auto; min-width: 0; }
.opt__text b { display: block; font-family: var(--f-display); font-weight: 700; font-size: 16px; color: var(--c-ink); }
.opt__text i { display: block; font-style: normal; font-size: 12px; color: var(--c-muted); margin-top: 1px; }
.opt[data-lang="en"] .opt__text i { color: #7A5E00; }
.opt__dot { flex: none; width: 21px; height: 21px; border-radius: 50%; border: 2px solid var(--c-line); position: relative; }
.opt[data-lang="vi"] .opt__dot { border-color: var(--c-blue); }
.opt[data-lang="en"] .opt__dot { border-color: var(--c-ink); }
.opt__dot::after {
  content: ''; position: absolute; inset: 3.5px; border-radius: 50%;
  background: var(--c-blue);
}
.opt[data-lang="en"] .opt__dot::after { background: var(--c-ink); }

/* ============================================================
   Hình minh hoạ 3 slide giới thiệu
   ============================================================ */
.art { position: relative; width: 100%; height: 230px; display: grid; place-items: center; }

.art__ring {
  position: absolute; width: 200px; height: 200px; border-radius: 50%;
  border: 1.5px dashed rgba(248,190,44,.35);
  animation: slowSpin 26s linear infinite;
}
@keyframes slowSpin { to { transform: rotate(360deg); } }

.art__avatars { position: relative; width: 210px; height: 180px; }
.art__av { position: absolute; width: 56px; height: 56px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.9); box-shadow: var(--sh-md); animation: floaty 4.4s ease-in-out infinite; }
.art__av--0 { top: 4px;  left: 14px;  animation-delay: 0s; }
.art__av--1 { top: 0;    right: 8px;  animation-delay: .5s; width: 62px; height: 62px; }
.art__av--2 { bottom: 8px; left: 0;   animation-delay: 1s; }
.art__av--3 { bottom: 0;  right: 22px; animation-delay: 1.5s; width: 60px; height: 60px; }
.art__heart {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 56px; height: 56px; border-radius: 50%; background: var(--c-coral); color: #fff;
  display: grid; place-items: center; font-size: 24px;
  box-shadow: 0 6px 20px rgba(240,83,63,.5); animation: beat 1.9s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes beat { 0%,100% { transform: translate(-50%,-50%) scale(1); } 45% { transform: translate(-50%,-50%) scale(1.09); } }

.art__globe { font-size: 74px; animation: floaty 5s ease-in-out infinite; }
.art__flag {
  position: absolute; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 18px;
  animation: floaty 4s ease-in-out infinite;
}
.art__flag--0 { top: 18px;  left: 50%; margin-left: -19px; animation-delay: .1s; }
.art__flag--1 { top: 62px;  right: 32px; animation-delay: .5s; }
.art__flag--2 { bottom: 54px; right: 26px; animation-delay: .9s; }
.art__flag--3 { bottom: 18px; left: 50%; margin-left: -19px; animation-delay: 1.3s; }
.art__flag--4 { bottom: 54px; left: 26px; animation-delay: 1.7s; }
.art__flag--5 { top: 62px;  left: 32px; animation-delay: 2.1s; }

.art__cross { font-size: 56px; color: #fff; opacity: .95; margin-bottom: 96px; }
.art__verse {
  position: absolute; bottom: 6px; left: 14px; right: 14px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-md); padding: 14px 16px; backdrop-filter: blur(4px);
}

/* ============================================================
   Trình tạo hồ sơ 8 bước
   ============================================================ */

/* Công tắc bật/tắt */
.switch {
  flex: none; width: 50px; height: 30px; border-radius: var(--r-pill);
  background: var(--c-line); position: relative; transition: background .2s ease;
}
.switch[aria-checked="true"] { background: var(--c-blue); }
.switch i {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: var(--sh-sm);
  transition: transform .2s cubic-bezier(.22,1,.36,1);
}
.switch[aria-checked="true"] i { transform: translateX(20px); }

/* Lưới ảnh */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-cell {
  position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-md);
  overflow: hidden; background: var(--c-fill);
}
.photo-cell.empty {
  border: 1.5px dashed var(--c-line); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; color: var(--c-muted-2);
  transition: border-color .15s ease, background .15s ease;
}
.photo-cell.empty:hover { border-color: var(--c-blue); background: #fff; }
.photo-cell.empty span { font-size: 22px; line-height: 1; }
.photo-cell.empty i { font-style: normal; font-size: 10.5px; font-family: var(--f-mono); letter-spacing: .06em; }
.photo-cell.busy { opacity: .55; }
.photo-cell.busy::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px;
  border: 2.5px solid rgba(42,78,224,.25); border-top-color: var(--c-blue);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.photo-cell.has img { width: 100%; height: 100%; object-fit: cover; }
.photo-main {
  position: absolute; left: 6px; bottom: 6px;
  font-family: var(--f-mono); font-size: 8.5px; letter-spacing: .1em;
  background: rgba(255,255,255,.92); color: var(--c-deep);
  padding: 3px 7px; border-radius: var(--r-pill);
}
.photo-del {
  position: absolute; top: 5px; right: 5px; width: 24px; height: 24px;
  border-radius: 50%; background: rgba(21,23,31,.62); color: #fff;
  font-size: 12px; line-height: 1; display: grid; place-items: center;
  backdrop-filter: blur(4px);
}

/* Thẻ xem trước hồ sơ */
.pcard { background: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-md); }
.pcard__img {
  position: relative; aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, #C8D0E8, #E8EAF4);
  background-size: cover; background-position: center;
}
.pcard__img .badge-verified { position: absolute; top: 12px; left: 12px; max-width: calc(100% - 24px); }
.pcard__ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--c-muted); font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em;
}
.pcard__body { padding: 16px; }
.pcard__verse {
  margin: 10px 0 0; padding: 11px 13px; font-size: 14px;
  background: var(--c-paper); border-radius: var(--r-sm); color: #5A4000;
}

/* Thanh chân màn hình có nút Tiếp tục */
.foot { box-shadow: 0 -2px 10px rgba(15,31,140,.05); }

/* ============================================================
   Khung có thanh tab dưới cùng
   ============================================================ */
.shell { display: flex; flex-direction: column; height: 100dvh; background: var(--c-bg); }
.shell__head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: calc(10px + var(--safe-t)) var(--gutter) 10px;
  background: #fff; border-bottom: 1px solid var(--c-line-soft);
}
.shell__body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; }
.tabbar {
  flex: none; display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--c-line-soft);
  padding-bottom: var(--safe-b); box-shadow: var(--sh-up);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; height: var(--tabbar-h); color: var(--c-icon); font-size: 10.5px;
  font-family: var(--f-body); font-weight: 600; letter-spacing: .01em; position: relative;
}
.tabbar button span { font-size: 19px; line-height: 1; }
.tabbar button[aria-current="page"] { color: var(--c-blue); }
.tabbar button[aria-current="page"]::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--c-blue);
}
.tabbar .dot {
  position: absolute; top: 9px; margin-left: 17px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--c-coral); border: 1.5px solid #fff;
}

/* ============================================================
   Chồng thẻ hồ sơ (Discover)
   ============================================================ */
/* Màn Khám phá lấp đầy đúng một màn hình: thẻ co lại, nút luôn thấy được */
.shell__body--fixed { overflow: hidden; display: flex; }
.disc { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; width: 100%; }
.disc > div { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.stackwrap { position: relative; padding: 10px var(--gutter) 4px; flex: 1 1 auto; min-height: 0; }
.stackwrap__inner { position: relative; height: 100%; }
.swipe {
  background: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-lg);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  display: flex; flex-direction: column; height: 100%;
}
.swipe--under { position: absolute; inset: 0; z-index: 0; transform: scale(.955) translateY(12px); opacity: .7; pointer-events: none; }
.swipe--top { position: relative; z-index: 2; will-change: transform; }
.swipe--gone { transition: transform .32s ease, opacity .32s ease; opacity: 0; }
.swipe__img {
  position: relative; flex: 1 1 auto; min-height: 150px;
  background: var(--c-fill-2) center/cover no-repeat;
}
.swipe__img::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 58%;
  background: linear-gradient(to top, rgba(8,12,40,.86), rgba(8,12,40,0));
}
.swipe__name {
  position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; color: #fff;
}
.swipe__name h2 { font-family: var(--f-display); font-weight: 800; font-size: 24px; margin: 0; letter-spacing: -.02em; }
.swipe__name p { margin: 3px 0 0; font-size: 13.5px; color: rgba(255,255,255,.86); }
.swipe__badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  background: rgba(255,255,255,.94); color: var(--c-blue); border-radius: var(--r-pill);
  padding: 5px 11px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em;
  display: inline-flex; align-items: center; gap: 5px; backdrop-filter: blur(6px);
}
.swipe__count {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  background: rgba(8,12,40,.55); color: #fff; border-radius: var(--r-pill);
  padding: 4px 9px; font-family: var(--f-mono); font-size: 10px; backdrop-filter: blur(6px);
}
.swipe__body {
  padding: 14px 16px 16px; flex: 0 1 auto; min-height: 0; overflow-y: auto;
  max-height: 42%; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.swipe__sec + .swipe__sec { margin-top: 14px; }
.swipe__sec p { margin: 5px 0 0; font-size: 14px; line-height: 1.5; }
.swipe__more { width: 100%; margin-top: 12px; font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .08em; color: var(--c-blue); padding: 8px; }
.swipe__hint {
  position: absolute; top: 22px; z-index: 3; padding: 7px 14px; border-radius: var(--r-sm);
  font-family: var(--f-display); font-weight: 800; font-size: 16px; letter-spacing: .04em;
  border: 2.5px solid; opacity: 0; transition: opacity .12s linear; pointer-events: none;
}
.swipe__hint--like { right: 18px; color: var(--c-green); border-color: var(--c-green);
  background: rgba(220,252,231,.92); transform: rotate(11deg); }
.swipe__hint--pass { left: 18px; color: var(--c-coral); border-color: var(--c-coral);
  background: rgba(254,226,226,.92); transform: rotate(-11deg); }
.swipe__hint--save { left: 50%; margin-left: -52px; color: var(--c-amber-ink);
  border-color: var(--c-marigold); background: rgba(255,251,240,.94); }

/* Ba nút hành động */
.acts { flex: none; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 0 14px; }
.act {
  width: 58px; height: 58px; border-radius: 50%; background: #fff; box-shadow: var(--sh-md);
  display: grid; place-items: center; font-size: 22px; transition: transform .12s ease;
  border: 1.5px solid var(--c-line-soft);
}
.act:active { transform: scale(.9); }
.act:disabled { opacity: .45; }
.act--pass { color: var(--c-coral); }
.act--save { width: 48px; height: 48px; font-size: 18px; color: var(--c-marigold-d); }
.act--like { color: #fff; background: var(--c-coral); border-color: var(--c-coral);
  box-shadow: 0 6px 18px rgba(240,83,63,.4); }

/* ============================================================
   Màn hình thành đôi
   ============================================================ */
.matchover {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: linear-gradient(165deg, var(--c-deep), var(--c-deep-2));
  padding: 0 var(--gutter); text-align: center; animation: fadein .25s ease;
}
.matchover__pair { display: flex; justify-content: center; align-items: center; margin-bottom: 22px; }
.matchover__pair img, .matchover__pair div.ph {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--c-marigold); background: var(--c-fill-2);
}
.matchover__pair > :last-child { margin-left: -18px; }
.matchover h1 { font-family: var(--f-display); font-weight: 800; font-size: 30px; color: #fff; margin: 0 0 8px; }

/* ============================================================
   Danh sách (Đã lưu / Kết nối)
   ============================================================ */
.plist { display: flex; flex-direction: column; gap: 10px; }
.prow {
  display: flex; gap: 12px; align-items: center; background: #fff; border-radius: var(--r-md);
  padding: 10px; box-shadow: var(--sh-sm); text-align: left; width: 100%;
}
.prow img, .prow .ph {
  width: 58px; height: 58px; border-radius: 14px; object-fit: cover; flex: none; background: var(--c-fill-2);
}
.prow__main { flex: 1 1 auto; min-width: 0; }
.prow__main b { font-family: var(--f-display); font-weight: 700; font-size: 15.5px; display: block; }
.prow__main p { margin: 2px 0 0; font-size: 12.5px; color: var(--c-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill {
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .06em; padding: 3px 8px;
  border-radius: var(--r-pill); background: var(--c-fill); color: var(--c-muted); flex: none;
}
.pill--turn { background: var(--c-coral); color: #fff; }
.pill--warn { background: var(--c-amber-bg); color: var(--c-amber-ink); }

.empty { text-align: center; padding: 52px 10px; }
.empty__icon { font-size: 40px; margin-bottom: 10px; }

@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }

/* ============================================================
   Hội thoại
   ============================================================ */
.convo__head {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) 12px 10px;
  background: linear-gradient(135deg, var(--c-deep), var(--c-deep-2));
  box-shadow: var(--sh-md);
}
.convo__back, .convo__menu {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-size: 19px; line-height: 1;
  color: #fff; background: rgba(255,255,255,.12);
}
.convo__back:active, .convo__menu:active { background: rgba(255,255,255,.22); }
.convo__who { flex: 1 1 auto; min-width: 0; }
.convo__av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; background: var(--c-fill-2); }

.convo__body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px var(--gutter) 10px;
  display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain;
}
.convo__foot { flex: none; background: #fff; border-top: 1px solid var(--c-line-soft); padding-bottom: var(--safe-b); }
.convo__bar { display: flex; align-items: flex-end; gap: 8px; padding: 9px 12px; }
.convo__input {
  flex: 1 1 auto; min-width: 0; resize: none; border: 1.5px solid var(--c-line);
  border-radius: 18px; padding: 10px 14px; font-size: 15px; line-height: 1.4;
  max-height: 120px; background: var(--c-fill);
}
.convo__input:focus { outline: none; border-color: var(--c-blue); background: #fff; }
.convo__send {
  flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--c-blue);
  color: #fff; font-size: 17px; display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(42,78,224,.3);
}
.convo__send:disabled { opacity: .5; }
.convo__note { margin: 0; padding: 16px var(--gutter) calc(16px + var(--safe-b));
  text-align: center; font-size: 13.5px; color: var(--c-muted); }
.convo__more { align-self: center; font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .06em; color: var(--c-blue); padding: 6px 12px; }
.convo__intro {
  background: var(--c-paper); border-radius: var(--r-md); padding: 14px 16px;
  color: #5A4000; font-size: 14px; line-height: 1.5; margin: 4px 0 6px;
}

.msg { display: flex; flex-direction: column; max-width: 78%; }
.msg--me   { align-self: flex-end; align-items: flex-end; }
.msg--them { align-self: flex-start; align-items: flex-start; }
.msg__bubble {
  padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word;
}
.msg--me .msg__bubble   { background: var(--c-blue); color: #fff; border-bottom-right-radius: 5px; }
.msg--them .msg__bubble { background: #fff; color: var(--c-ink); border-bottom-left-radius: 5px; box-shadow: var(--sh-sm); }
.msg__meta { font-size: 10.5px; color: var(--c-muted-2); margin-top: 3px; padding: 0 4px; }
.msg__day {
  align-self: center; font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--c-muted); background: var(--c-fill-2);
  padding: 3px 10px; border-radius: var(--r-pill); margin: 6px 0 2px;
}

/* Hộp xác nhận */
.modal {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(10,14,40,.55); padding: var(--gutter); animation: fadein .18s ease;
}
.modal__box { background: #fff; border-radius: var(--r-lg); padding: 20px; max-width: 340px; width: 100%; box-shadow: var(--sh-lg); }
.btn.danger { background: var(--c-coral); color: #fff; }

/* ============================================================
   Trang quản trị
   ============================================================ */
.subtabs {
  flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 10px var(--gutter);
  background: linear-gradient(135deg, var(--c-deep), var(--c-deep-2));
  scrollbar-width: none;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtab {
  flex: none; padding: 7px 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.72); background: rgba(255,255,255,.12); white-space: nowrap;
}
.subtab.on { background: var(--c-marigold); color: var(--c-ink); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile {
  background: #fff; border-radius: var(--r-md); padding: 14px; box-shadow: var(--sh-sm);
  display: flex; flex-direction: column; gap: 2px;
}
.tile b { font-family: var(--f-display); font-weight: 800; font-size: 26px; line-height: 1.1; }
.tile span { font-size: 12.5px; color: var(--c-muted); }
.tile--warn { background: var(--c-amber-bg); border: 1px solid var(--c-amber-line); }
.tile--warn b { color: var(--c-amber-ink); }

.adm__photos { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 2px; }
.adm__photo { flex: none; width: 92px; height: 115px; object-fit: cover; border-radius: var(--r-sm); }

.logbox { display: flex; flex-direction: column; gap: 6px; }
.logrow {
  background: #fff; border-radius: var(--r-sm); padding: 9px 12px; box-shadow: var(--sh-sm);
  display: grid; gap: 1px;
}
.logrow__t { font-family: var(--f-mono); font-size: 10px; color: var(--c-muted-2); }
.logrow__a { font-weight: 600; font-size: 13px; }
.logrow__w { font-size: 12px; color: var(--c-muted); word-break: break-all; }

.swipe__flag { margin-top: 14px; font-size: 12px; color: var(--c-muted); padding: 6px 0; }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%);
  z-index: 80; max-width: 340px; width: calc(100% - 40px);
  background: rgba(21,23,31,.94); color: #fff; padding: 12px 16px; border-radius: var(--r-md);
  font-size: 14px; line-height: 1.45; box-shadow: var(--sh-lg); animation: fadein .2s ease;
}

/* ============================================================
   Tab Kinh Thánh
   ============================================================ */
.versecard {
  background: linear-gradient(150deg, var(--c-deep), var(--c-deep-2));
  border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-md); position: relative; overflow: hidden;
}
.versecard::after {
  content: '✝'; position: absolute; right: 14px; bottom: 2px;
  font-size: 66px; color: rgba(255,255,255,.07); line-height: 1;
}
.contentcard { text-align: left; width: 100%; }
.read__body p { margin: 0 0 12px; font-size: 15px; line-height: 1.65; }
.read__body p:last-child { margin-bottom: 0; }
.read__body--light p { color: rgba(255,255,255,.88); }
.read__day {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em;
  color: var(--c-blue); margin-top: 22px !important; margin-bottom: 4px !important;
}
.read__ref {
  font-size: 13.5px !important; color: var(--c-muted); margin-bottom: 8px !important;
}
.read__quote {
  background: var(--c-paper); border-radius: var(--r-sm); padding: 12px 14px;
  color: #5A4000; font-size: 15px;
}
.read__body--light .read__quote { background: rgba(255,255,255,.1); color: #fff; }
.read__body--light .read__day, .read__body--light .read__ref { color: var(--c-marigold); }

.me__thumb { width: 42px; height: 52px; border-radius: 8px; object-fit: cover; }
