/* RGate — cổng thanh toán RANA. Cùng hệ màu với Tài khoản RANA: mực #1D1F23, xanh lá #8CCB72. */
:root {
  --bg: #eef0f3;
  --card: #ffffff;
  --text: #1d1f23;
  --muted: #5b6069;
  --faint: #8a9099;
  --line: #d9dce3;
  --soft: #f4f5f7;
  --hover: #eceef2;
  --primary: #1d1f23;
  --on-primary: #ffffff;
  --green: #8ccb72;
  --link: #2f6b12;
  --chip: #e7f4df;
  --chip-text: #2f5a16;
  --warn: #8a5a00;
  --warn-soft: #fff4dc;
  --danger: #c2362b;
  --danger-soft: #fdecea;
  --focus: #5a9e3f;
  --shadow: 0 1px 2px rgba(20, 22, 26, .05), 0 12px 40px rgba(20, 22, 26, .06);
  color-scheme: light;
}
/* Chế độ tối theo máy, trừ trang đặt data-theme="light" (trang thanh toán luôn nền trắng). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1113;
    --card: #1a1d21;
    --text: #e8eaed;
    --muted: #a6abb3;
    --faint: #80868f;
    --line: #353a41;
    --soft: #22262b;
    --hover: #272b31;
    --primary: #e8eaed;
    --on-primary: #14161a;
    --link: #9fd884;
    --chip: #24331d;
    --chip-text: #b6e3a0;
    --warn: #ffcf70;
    --warn-soft: #3a2e14;
    --danger: #ff8a80;
    --danger-soft: #3a1f1d;
    --focus: #8ccb72;
    --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -.2px; }
.svg { display: contents; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--green); animation: spin .8s linear infinite; display: inline-block; }
.spin.sm { width: 18px; height: 18px; border-width: 2px; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; }
.grow { flex: 1; }

/* ---------- Khung trang ---------- */
.top {
  position: sticky; top: 0; z-index: 5; height: 64px; display: flex; align-items: center; gap: 12px;
  padding: 0 20px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; color: var(--text); font-weight: 500; }
.brand b { font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.topnav { display: flex; gap: 4px; margin-left: 12px; }
.topnav a { color: var(--muted); font-weight: 500; padding: 8px 14px; border-radius: 999px; }
.topnav a:hover { background: var(--hover); text-decoration: none; }
.topnav a.on { background: var(--chip); color: var(--chip-text); font-weight: 600; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.who .name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.avatar {
  flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--green); color: #1d1f23; font-weight: 700; font-size: 14px; text-transform: uppercase;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 64px; }
.wrap.narrow { max-width: 760px; }
.pagehead { margin: 4px 0 22px; }
.pagehead h1 { font-size: 28px; }
.pagehead p { color: var(--muted); margin: 8px 0 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; margin-bottom: 18px; }
.panel > h2 { font-size: 19px; margin-bottom: 4px; }
.panel > .sub { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.panelhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panelhead h2 { font-size: 19px; }
.empty { color: var(--muted); padding: 10px 0; }
.foot { text-align: center; color: var(--faint); font-size: 13px; padding: 8px 20px 32px; }
.foot a { color: var(--faint); font-weight: 400; }

/* ---------- Nút, nhãn ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 20px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.btn:hover { filter: brightness(1.15); text-decoration: none; }
.btn.block { width: 100%; height: 50px; font-size: 15px; }
.btn.green { background: var(--green); color: #1d1f23; }
.btn.outline { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.outline:hover { background: var(--hover); filter: none; }
.btn.ghost { background: transparent; color: var(--link); padding: 0 12px; }
.btn.ghost:hover { background: var(--chip); filter: none; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions.end { justify-content: flex-end; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--chip); color: var(--chip-text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.grey { background: var(--soft); color: var(--muted); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.notice { border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; font-size: 14px; background: var(--soft); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--danger-soft); color: var(--danger); }
.notice.ok { background: var(--chip); color: var(--chip-text); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; max-width: calc(100% - 32px);
  background: #1d1f23; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #e8eaed; color: #14161a; } }

/* ---------- Trang chào (chưa đăng nhập) ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; background: #1d1f23; color: #fff; padding: 44px;
  margin-bottom: 22px; box-shadow: var(--shadow);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero { background: #0b0c0e; border: 1px solid var(--line); } }
.hero h1 { font-size: 32px; line-height: 1.25; letter-spacing: -.4px; max-width: 560px; }
.hero h1 b { color: var(--green); font-weight: 600; }
.hero p { color: #b9bec6; margin: 14px 0 26px; max-width: 560px; }
.hero .wm { position: absolute; right: -60px; bottom: -80px; opacity: .08; color: #fff; pointer-events: none; }
.hero .btn { background: var(--green); color: #1d1f23; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.feature b { display: block; margin: 10px 0 4px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.feature .svg svg { color: var(--link); }

/* ---------- Bảng giá ---------- */
.switch { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 18px; }
.switch button { border: 0; background: none; padding: 7px 18px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--muted); }
.switch button.on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 26px 0 12px; font-weight: 600; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.plan {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; box-shadow: var(--shadow);
}
.plan.best { border: 2px solid var(--green); padding: 21px; }
.plan h3 { font-size: 18px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plan .desc { color: var(--muted); font-size: 14px; margin: 6px 0 14px; min-height: 21px; }
.plan .amount { font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.plan .per { color: var(--muted); font-size: 14px; margin-left: 4px; font-weight: 400; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 20px; flex: 1; }
.plan li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 4px 0; }
.plan li .svg svg { color: var(--link); flex: none; margin-top: 2px; }
.plan .btn { width: 100%; }
.plan .has { font-size: 13px; color: var(--chip-text); text-align: center; margin-top: 8px; }

/* ---------- Trang thanh toán ---------- */
.pay { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--card); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); max-width: 900px; margin: 0 auto; }
/* Khối tóm tắt nền sáng, tách khung thanh toán bằng một đường viền mảnh. */
.pay .summary { background: var(--soft); color: var(--text); border-right: 1px solid var(--line); padding: 36px; display: flex; flex-direction: column; gap: 6px; }
.pay .summary .lbl { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .4px; }
.pay .summary h1 { font-size: 26px; margin-top: 6px; }
.pay .summary .amount { font-size: 36px; font-weight: 700; margin: 18px 0 4px; letter-spacing: -.5px; }
.pay .summary .amount .per { font-size: 15px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.pay .summary ul { list-style: none; padding: 0; margin: 14px 0 0; }
.pay .summary li { display: flex; gap: 8px; font-size: 14px; color: var(--text); padding: 3px 0; }
.pay .summary li .svg svg { color: var(--link); flex: none; margin-top: 2px; }
.pay .summary .by { margin-top: auto; padding-top: 28px; font-size: 13px; color: var(--muted); }
.pay .action { padding: 36px; display: flex; flex-direction: column; gap: 14px; justify-content: center; min-height: 380px; }
.pay .action h2 { font-size: 22px; }
.pay .action p { margin: 0; color: var(--muted); }
.big-ok { width: 64px; height: 64px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; color: var(--chip-text); }
.big-ok.bad { background: var(--danger-soft); color: var(--danger); }
.secure { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }

/* ---------- Gói của tôi ---------- */
.product { border-top: 1px solid var(--line); padding: 16px 0; }
.product:first-of-type { border-top: 0; }
.product h3 { font-size: 17px; font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 6px 16px; margin-top: 10px; font-size: 14px; }
.kv > span:nth-child(odd) { color: var(--muted); }
.credits { font-size: 22px; font-weight: 700; }

/* ---------- Bảng ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--soft); }
.table .num { text-align: right; white-space: nowrap; }
.scroll { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }

/* ---------- Quản trị ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 12px 16px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--green); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.stat b { display: block; font-size: 24px; font-weight: 600; }
.stat span { color: var(--muted); font-size: 13px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.checklist li:first-child { border-top: 0; }
.checklist .dot { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 1px; }
.checklist .dot.ok { background: var(--chip); color: var(--chip-text); }
.checklist .dot.no { background: var(--warn-soft); color: var(--warn); }
.search { display: flex; gap: 10px; margin-bottom: 14px; }
.input, .search input, dialog input, dialog select, dialog textarea {
  width: 100%; height: 42px; padding: 0 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; outline: none;
}
dialog textarea { height: 76px; padding: 10px 14px; resize: vertical; }
.input:focus, .search input:focus, dialog input:focus, dialog select:focus, dialog textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
dialog {
  width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: 22px; padding: 24px;
  background: var(--card); color: var(--text);
}
dialog::backdrop { background: rgba(10, 12, 15, .45); }
dialog h2 { font-size: 21px; margin-bottom: 14px; }
dialog .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
dialog .grid .full { grid-column: 1 / -1; }
dialog label { display: block; font-size: 13px; color: var(--muted); }
dialog label > span { display: block; margin-bottom: 4px; font-weight: 500; }
dialog label small { display: block; margin-top: 3px; color: var(--faint); }
dialog .checkline { display: flex; gap: 10px; align-items: center; color: var(--text); font-size: 14px; }
dialog .checkline input { width: 18px; height: 18px; accent-color: var(--primary); }
dialog .actions { margin-top: 20px; }
dialog .err { color: var(--danger); font-size: 14px; margin-top: 12px; }
.keybox { background: var(--soft); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0 14px; }
.prices-head { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; }
.prices-head b { font-size: 14px; }

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: 1fr; }
  .pay { grid-template-columns: 1fr; border-radius: 18px; }
  .pay .summary, .pay .action { padding: 26px 22px; }
  .pay .action { min-height: 0; }
}
@media (max-width: 640px) {
  .top { padding: 0 12px; gap: 6px; }
  .topnav { margin-left: 0; }
  .topnav a { padding: 6px 10px; font-size: 14px; }
  .brand small, .who .name { display: none; }
  .wrap { padding: 20px 16px 48px; }
  .hero { padding: 28px 22px; border-radius: 18px; }
  .hero h1 { font-size: 24px; }
  .panel { padding: 16px 18px; }
  .scroll { margin: 0 -18px; padding: 0 18px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv > span:nth-child(even) { margin-bottom: 8px; }
  dialog .grid { grid-template-columns: 1fr; }
}
dialog.wide { width: min(720px, calc(100% - 32px)); }
.mb { margin-bottom: 16px; }
.m0 { margin: 0; }
.pay .summary .muted { color: var(--muted); }
.topnav a { white-space: nowrap; }
@media (max-width: 640px) {
  .brand > span:last-child { display: none; }
  .who .btn.ghost { padding: 0 8px; }
}

/* Trang thanh toán với khung Paddle nhúng: tóm tắt bên trái, khung Paddle bên phải. */
.pay.inline { max-width: 1040px; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: stretch; }
.pay.inline .action { justify-content: flex-start; gap: 12px; padding: 32px 32px 24px; }
.pay.inline .action h2 { font-size: 20px; }
.pay.inline .action .notice { margin: 0; }
.rgate-checkout { position: relative; min-height: 450px; margin: 0 -8px; }
.frame-loading { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.pay.inline .secure { justify-content: center; padding-top: 4px; }
@media (max-width: 860px) {
  .pay.inline { grid-template-columns: 1fr; }
  .pay.inline .summary ul, .pay.inline .summary .by { display: none; }
  .pay.inline .summary .amount { margin: 8px 0 0; font-size: 30px; }
  .pay.inline .action { padding: 22px 16px 18px; }
  .rgate-checkout { margin: 0 -4px; }
}
@media (max-width: 860px) { .pay .summary { border-right: 0; border-bottom: 1px solid var(--line); } }

/* Trang thanh toán: khung lớn hơn và nằm giữa màn hình theo chiều dọc (chủ dự án 24/10/2026). */
#root { min-height: 100vh; display: flex; flex-direction: column; }
#root > main { flex: 1 0 auto; width: 100%; }
.wrap.center { display: flex; flex-direction: column; justify-content: center; padding-top: 40px; padding-bottom: 40px; }
.wrap.center > .boot { min-height: 0; }
.pay.inline { max-width: 1180px; width: 100%; min-height: 560px; border-radius: 28px; }
.pay.inline .summary { padding: 48px 48px 40px; gap: 8px; }
.pay.inline .summary .lbl { font-size: 14px; }
.pay.inline .summary h1 { font-size: 32px; }
.pay.inline .summary .muted { font-size: 16px; }
.pay.inline .summary .amount { font-size: 46px; margin: 24px 0 6px; }
.pay.inline .summary .amount .per { font-size: 17px; }
.pay.inline .summary li { font-size: 16px; padding: 5px 0; }
.pay.inline .summary .by { font-size: 14px; }
.pay.inline .action { padding: 48px 52px 40px; gap: 16px; }
.pay.inline .action h2 { font-size: 26px; }
.pay.inline .action p { font-size: 16px; }
.pay.inline .big-ok { width: 76px; height: 76px; }
.pay.inline .action .btn.block, .pay.inline .action .btn.outline { height: 52px; font-size: 16px; }
@media (max-width: 860px) {
  .wrap.center { justify-content: center; padding-top: 16px; padding-bottom: 16px; }
  .pay.inline { min-height: 0; border-radius: 18px; }
  .pay.inline .summary { padding: 24px 20px; }
  .pay.inline .summary h1 { font-size: 24px; }
  .pay.inline .summary .amount { font-size: 32px; margin: 10px 0 0; }
  .pay.inline .action { padding: 24px 18px 20px; }
  .pay.inline .action h2 { font-size: 21px; }
}
.pay.inline .action:has(.big-ok) { justify-content: center; }
.wrap.center { max-width: 1240px; }
/* Điện thoại: khung thanh toán nằm giữa màn hình như trên máy tính; trang "Thanh toán thành công" căn giữa nội dung. */
@media (max-width: 860px) {
  .pay.inline .action:has(.big-ok) { align-items: center; text-align: center; padding: 32px 20px 28px; }
  .pay.inline .action:has(.big-ok) .btn { width: 100%; }
  .pay.inline .summary:has(+ .action .big-ok) ul { display: block; margin-top: 10px; }
}

/* ---------- Rà soát giao diện máy tính / điện thoại (chủ dự án 24/10/2026) ---------- */
/* 1. Bảng giá: thẻ gói nằm giữa, rộng vừa phải thay vì dồn sang trái. */
.pagehead.centered { text-align: center; }
.pagehead.centered p { max-width: 640px; margin-left: auto; margin-right: auto; }
.center-row { display: flex; justify-content: center; }
.plans { grid-template-columns: repeat(auto-fit, minmax(280px, 360px)); justify-content: center; }
.section-title { text-align: center; }
/* 2. Trang lỗi, không tìm thấy: nằm giữa màn hình. */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 40px 16px; }
.empty-state h1 { font-size: 26px; }
.empty-state p { margin: 0; color: var(--muted); }
.big-ok.grey { background: var(--soft); color: var(--muted); font-weight: 700; font-size: 18px; }
@media (max-width: 640px) {
  /* 3. Thẻ quản trị: hiện đủ 4 thẻ dạng lưới 2 x 2 thay vì phải vuốt ngang. */
  .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-bottom: 0; overflow: visible; }
  .tabs button { border: 1px solid var(--line); border-radius: 10px; margin: 0; padding: 10px 8px; background: var(--card); }
  .tabs button.on { border-color: var(--green); background: var(--chip); color: var(--chip-text); }
  /* 4–7. Bảng thành danh sách thẻ: mỗi dòng một thẻ, mỗi ô một hàng "nhãn: giá trị". */
  .scroll { margin: 0; padding: 0; overflow: visible; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack thead { display: none; }
  .table.stack tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: var(--card); }
  .table.stack tr.click:hover td { background: none; }
  .table.stack td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0; padding: 5px 0; text-align: right; }
  .table.stack td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; text-align: left; }
  .table.stack td:not([data-label])::before { content: none; }
  .table.stack td:empty { display: none; }
  .table.stack td.mono { overflow-wrap: anywhere; min-width: 0; }
  .table.stack td:has(> div) { flex-wrap: wrap; }
  .table.stack td > div { flex: 1 1 100%; text-align: right; }
  .table.stack td:has(> div)::before { flex: 1 1 100%; }
  /* 6. Dòng giới thiệu và nút "+ Thêm sản phẩm" xếp chồng. */
  .actions.mb > p { flex: 1 1 100%; }
  .actions.mb > .btn { width: 100%; }
  .panelhead > .btn { flex: 1 1 auto; }
  /* 7. Hộp thoại chiếm toàn màn hình trên điện thoại. */
  dialog, dialog.wide { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .search input { min-width: 0; }
}
