/* Gộp tự động từ ui/tokens.css, style.css, qimen.css, workbench.css, brand.css, refinement.css, learning.css, research.css, quick-access.css, mobile-polish.css, polish-548.css, ui/site.css, ui/app-fix.css, ui/giay-do.css, ui/trang-chu.css, ui/chuyen-dong.css, ui/kieu-the.css, ui/noi-mem.css */
/* ui/tokens.css */
/* ui/tokens.css · Huyền Chân Quán · hướng "Giấy · Son · Lục"
   Nguồn quyết định: DESIGN.md ở gốc dự án. Viết 11/11/2026 từ CSS đang chạy bản 8.26.
   Tiền tố --ds- là mới, không trùng --hcq-*, --p-*, --hqq-*, --wb-* cũ,
   nên nạp file này vào không làm giao diện hiện tại thay đổi.
   Trang mới dùng tên token, không viết mã màu trực tiếp. */

:root {
  /* Giấy: nền và viền */
  --ds-bg: #ffffff;            /* nền trang, menu bên */
  --ds-surface: #faf8f4;       /* khối phụ, chân trang, ô giờ động tâm */
  --ds-field: #fdfcfa;         /* ô nhập */
  --ds-paper: #f6efe0;         /* tab chưa chọn, nhãn */
  --ds-paper-deep: #efe5d0;    /* giấy đậm, ô tròn chờ ảnh */
  --ds-card: #fbf6ea;          /* thẻ giấy */
  --ds-chip: #f6f3ee;          /* thẻ gợi ý câu hỏi */
  --ds-line: #e3dccf;          /* viền ô nhập, thẻ */
  --ds-line-soft: #efe8dc;     /* viền khung lớn */
  --ds-line-strong: #dccdae;   /* viền tab, đường kẻ giấy */

  /* Mực: chữ (tương phản trên nền trắng) */
  --ds-ink: #1c1a17;           /* chữ chính 17.4 */
  --ds-ink-warm: #2b2219;      /* tiêu đề serif 15.6 */
  --ds-text-2: #5a4b39;        /* chữ phụ đậm, tab chưa chọn 8.4 */
  --ds-muted: #6d5f4b;         /* chữ phụ 6.2 */
  --ds-subtle: #7a6c57;        /* chú thích, gợi ý ô nhập, nhãn nhóm 5.1 */

  /* Son: hành động. Mỗi màn hình một nút son đặc */
  --ds-action: #a8392a;        /* nút chính, tab đang chọn, link hành động 6.4 */
  --ds-action-strong: #8e2418; /* chữ son trên nền nhạt, mục menu đang chọn */
  --ds-action-deep: #7e2318;   /* cuối dải màu nút chính, di chuột */
  --ds-action-tint: #f8ebe7;   /* nền mục menu đang chọn */
  --ds-on-action: #ffffff;     /* chữ trên nút chính */
  --ds-on-action-soft: #f7e9d2;/* chữ kem trên tab son 5.3 */

  /* Lục: thương hiệu, đọc thêm, focus */
  --ds-brand: #4a6337;         /* logo, theme-color, huy hiệu Khóa, link đọc thêm 8.7 */
  --ds-brand-deep: #3a5027;    /* di chuột trên nền lục */
  --ds-brand-ink: #35422a;     /* chữ lục trên nền lục nhạt 8.7 */
  --ds-brand-tint: #eef3e9;    /* nền nút phụ */
  --ds-brand-line: #a8afa1;    /* viền nút phụ */

  /* Kim: chỉ để kẻ và trang trí, không dùng cho chữ (3.2) */
  --ds-gold: #b08a57;

  /* Trạng thái */
  --ds-success: #35422a;       --ds-success-tint: #eef3e9;  /* cát, thành công */
  --ds-warning: #8a6420;       --ds-warning-tint: #fff7e5;  /* lưu ý 5.0 */
  --ds-danger: #a02c26;        --ds-danger-tint: #fbecea;   /* lỗi, hung 6.3. Luôn kèm biểu tượng và chữ */
  --ds-disabled-bg: #f4f3ed;   --ds-disabled-ink: #5f6359;  --ds-disabled-line: #d9dcd3; /* 5.5 */

  /* Chữ */
  --ds-font-ui: "Inter","Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --ds-font-serif: "Noto Serif", "HCQ Viet", Georgia, "Times New Roman", serif;
  --ds-font-han: "Noto Serif TC", "Noto Serif CJK TC", "Source Han Serif TC", "PingFang TC", "Microsoft JhengHei", serif;

  --ds-fs-caption: 12px;       /* cỡ nhỏ nhất: chú thích, huy hiệu */
  --ds-fs-label: 13px;         /* nhãn phụ, chữ chạy trên tiêu đề */
  --ds-fs-ui: 14.5px;          /* mục menu, thẻ gợi ý, nút phụ, tab */
  --ds-fs-body: 16px;          /* thân bài, ô nhập */
  --ds-fs-lead: 18px;          /* đoạn dẫn, tiêu đề nhỏ */
  --ds-fs-h2: 21px;            /* tiêu đề khung, serif */
  --ds-fs-h1: 26px;            /* tiêu đề trang con */
  --ds-fs-display: 31px;       /* câu lớn đầu trang */

  --ds-lh-body: 1.6;
  --ds-lh-ui: 1.45;
  --ds-lh-heading: 1.3;
  --ds-fw-regular: 400;  --ds-fw-medium: 500;  --ds-fw-semibold: 600;  --ds-fw-bold: 700;
  --ds-tracking-eyebrow: .24em;
  --ds-tracking-heading: .04em;
  --ds-tracking-cta: .06em;

  /* Khoảng cách: bước 4px */
  --ds-space-1: 4px;   --ds-space-2: 8px;   --ds-space-3: 12px;  --ds-space-4: 16px;
  --ds-space-5: 20px;  --ds-space-6: 24px;  --ds-space-8: 32px;  --ds-space-10: 40px;
  --ds-space-14: 56px; --ds-space-18: 72px;
  --ds-section: 40px;          /* giữa các khối, điện thoại 32px */
  --ds-content: 720px;         /* bề rộng vùng nội dung */
  --ds-measure: 680px;         /* dòng đọc tối đa, khoảng 70 ký tự */
  --ds-sidebar: 256px;         /* menu bên trên máy tính */
  /* Điểm ngắt (dùng trong @media, CSS không đọc được biến ở đó): 700px, 900px, 1120px */

  /* Bo góc */
  --ds-r-sm: 6px;
  --ds-r-md: 10px;             /* mục menu, nút phụ */
  --ds-r-lg: 12px;             /* ô nhập, thẻ, nút chính */
  --ds-r-xl: 14px;             /* khung luận giải */
  --ds-r-pill: 999px;          /* tab, huy hiệu, nút tròn */

  /* Đổ bóng: chỉ hai loại */
  --ds-shadow-cta: 0 10px 22px -12px #7e2318;
  --ds-shadow-paper: 0 1px 0 #fff8 inset, 0 10px 24px -18px #5a3a1a66;

  /* Viền focus: một kiểu cho toàn web */
  --ds-focus-ring: 3px solid #4a6337;
  --ds-focus-offset: 3px;

  /* Chuyển động */
  --ds-dur-fast: 150ms;
  --ds-dur-base: 220ms;
  --ds-ease-out: cubic-bezier(.2, .7, .3, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root { --ds-dur-fast: 0ms; --ds-dur-base: 0ms; }
}

@media (max-width: 700px) {
  :root { --ds-section: 32px; }
}

/* style.css */
@font-face{font-family:"HCQ Viet";font-weight:400;font-style:normal;src:local("Cambria"),local("Times New Roman"),local("TimesNewRomanPSMT");unicode-range:U+1EA4-1EAB,U+1EAE-1EB5,U+1EBE-1EC5,U+1ED0-1ED7}@font-face{font-family:"HCQ Viet";font-weight:700;font-style:normal;src:local("Cambria Bold"),local("Times New Roman Bold"),local("TimesNewRomanPS-BoldMT");unicode-range:U+1EA4-1EAB,U+1EAE-1EB5,U+1EBE-1EC5,U+1ED0-1ED7}@font-face{font-family:"HCQ Viet";font-weight:400;font-style:italic;src:local("Cambria Italic"),local("Times New Roman Italic"),local("TimesNewRomanPS-ItalicMT");unicode-range:U+1EA4-1EAB,U+1EAE-1EB5,U+1EBE-1EC5,U+1ED0-1ED7}@font-face{font-family:"HCQ Viet";font-weight:700;font-style:italic;src:local("Cambria Bold Italic"),local("Times New Roman Bold Italic"),local("TimesNewRomanPS-BoldItalicMT");unicode-range:U+1EA4-1EAB,U+1EAE-1EB5,U+1EBE-1EC5,U+1ED0-1ED7}
@font-face{font-family:'Noto Sans';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/noto-sans-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Noto Sans';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/noto-sans-vietnamese-400-normal.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Noto Sans';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/noto-sans-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Noto Sans';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/noto-sans-vietnamese-700-normal.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
:root{--ink:#292822;--red:#7f2925;--gold:#b39154;--cream:#faf3df;--line:#d9cdb0;--muted:#767065}*{box-sizing:border-box}body{margin:0;color:var(--ink);font:15px/1.6 Arial,system-ui,-apple-system,sans-serif;background:#eee9df url('../landscape.svg') center top/cover fixed no-repeat}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:3px}button:disabled{cursor:default;opacity:.55}[hidden]{display:none!important}.topbar{height:91px;background:#fff8e9ed;border-bottom:1px solid #dfd0ad;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:25px;padding:14px max(26px,calc((100vw - 1180px)/2));box-shadow:0 2px 9px #6756340c}.brand{color:var(--red);display:flex;gap:12px;align-items:center;text-decoration:none;font-family:"HCQ Viet",Georgia,serif;font-weight:bold;letter-spacing:2px;font-size:22px;white-space:nowrap}.brand-seal{display:grid;place-items:center;border:2px solid #a5864e;outline:1px solid #dac797;outline-offset:3px;width:45px;height:45px;border-radius:50%;font-size:29px}.brand small{display:block;font:11px Arial,sans-serif;letter-spacing:.5px;color:#79684c;margin-top:3px}.tool-title{font-weight:bold;letter-spacing:1.5px;font-size:14px;color:#6f332b}.plain-button{justify-self:end;background:transparent;border:1px solid #cfbd99;border-radius:5px;color:#76603e;padding:9px 13px}.plain-button span{padding-left:5px}.paper{width:min(1050px,calc(100% - 48px));margin:35px auto;background:#fffdf7ee;border:1px solid #dfd6c0;border-radius:15px;padding:30px 32px 0;box-shadow:0 12px 40px #645b3c12}.page-title{text-align:center;padding:0 0 23px}.page-title>p{font:12px "HCQ Viet",Georgia,serif;letter-spacing:4px;color:#9d7f4c;margin:0 0 8px}h1{font-size:29px;line-height:1.3;margin:0 0 8px}.page-title>span{color:var(--muted);font-size:13px}.mode-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;max-width:820px;margin:0 auto 27px}.mode-tabs button{border:1px solid #dcc9a2;border-radius:5px;background:#fff9eb;color:#695a43;min-height:46px;padding:10px 8px;font-size:13px}.mode-tabs button[aria-selected=true]{background:var(--red);color:#fff0c9;border-color:var(--red)}.cast-form{max-width:600px;margin:0 auto 32px;padding:26px 28px;background:linear-gradient(145deg,#fcf5dd,#f6eed3);border:1px solid #e4d5ad;border-radius:11px;box-shadow:0 5px 15px #6d592524}.form-title{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e2d5b6;padding-bottom:15px;margin-bottom:21px}.form-title h2{font-size:26px;line-height:1.35;margin:0}.form-title span{font-size:10px;color:#8e7a51;border:1px solid #d8c89f;border-radius:4px;padding:2px 6px}label{display:block;font-size:14px;margin-bottom:7px}input,select,textarea{width:100%;background:#fffdf7;border:1px solid #d6c9a8;border-radius:5px;color:#2a2822;padding:10px 11px;min-height:44px}textarea{resize:vertical}#question{margin-bottom:20px}.date-caption{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.date-caption label{margin:0}.text-button{background:none;border:0;color:#8c6437;font-size:12px;text-decoration:underline;padding:5px 0}.date-row{display:grid;grid-template-columns:1fr 1.4fr 1.3fr;gap:10px;margin-bottom:15px}.clock-row{display:grid;grid-template-columns:1fr auto 1fr auto;gap:12px;align-items:center;margin-bottom:15px}.clock-row span{font-size:13px}.calendar-choice{display:flex;gap:20px;flex-wrap:wrap;margin:17px 0}.calendar-choice label{display:flex;align-items:center;gap:8px;font-size:13px;margin:0}input[type=checkbox],input[type=radio]{width:17px;height:17px;min-height:17px;margin:0;accent-color:var(--red)}.row{display:grid;grid-template-columns:1fr 1fr;gap:13px}.row select{margin-top:6px;font-size:12px}.calendar-summary{font-size:12px;color:#75644a;border-top:1px solid #e5d7b5;border-bottom:1px solid #e5d7b5;margin:14px 0 20px;padding:11px 0}.help{font-size:12px;color:#7b705d;line-height:1.8;margin:9px 0 17px}.subtabs{display:flex;gap:7px;margin-bottom:17px}.subtabs button{border:1px solid #d5c49a;background:#fff8e6;border-radius:4px;padding:9px 12px;color:#66533b;font-size:13px;flex:1}.subtabs button.active{background:#a78244;border-color:#a78244;color:white}.preview{display:flex;align-items:center;justify-content:center;gap:28px;padding:20px;background:#fffaf0;border:1px solid #e3d7bb;border-radius:5px;margin:16px 0}.preview p{font-size:12px;margin:5px 0;color:#7d6a4a}.preview h3{font-size:17px;margin:0;color:var(--red)}.manual-inputs{display:grid;gap:7px;margin:15px 0}.manual-line{display:grid;grid-template-columns:66px 1fr 60px;align-items:center;gap:12px;border-bottom:1px solid #e6d9b9;padding:7px 0}.manual-line label{margin:0;font-size:12px}.manual-line select{font-size:13px;min-height:39px;padding:7px 8px}.small-yao{width:48px;height:7px;background:var(--red);display:block}.small-yao.yin{background:linear-gradient(to right,var(--red) 42%,transparent 42%,transparent 58%,var(--red) 58%)}.coin-list{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.coin-list label{font-size:12px}.coin-list select{font-size:12px;margin-top:5px}.coins-stage{text-align:center;padding:17px;border:1px solid #ddc895;border-radius:7px;background:#fff8e8}.coin-faces{display:flex;justify-content:center;gap:14px;margin:15px 0}.coin-face{width:52px;height:52px;border:3px double #9b742e;outline:1px solid #d3b978;border-radius:50%;background:radial-gradient(#fcf1cc,#d5ac54);color:#694821;display:grid;place-items:center;font:bold 22px "HCQ Viet",Georgia,serif}.coin-progress{font-size:13px;margin:12px 0}.coin-status{font-size:13px;color:#817453;margin:13px 0}.coin-status strong{color:var(--red)}.form-actions{display:flex;gap:10px;align-items:stretch;margin-top:20px}.cast-button{flex:1;border:3px double #b19057;border-radius:6px;background:var(--red);color:#ffe7a8;font-size:17px;font-weight:bold;padding:11px 15px;letter-spacing:1px;box-shadow:0 3px 8px #7023231c}.secondary{background:#fff9e9;border:1px solid #cbb894;border-radius:5px;padding:10px 15px;color:#745c3b;font-size:13px}.error{font-size:13px;color:#a02c26;margin:10px 0;overflow-wrap:anywhere}.muted{font-size:12px;color:var(--muted)}.result-sheet{border:1px solid #bbafa0;border-radius:6px;background:#fffef9;overflow:hidden;margin:auto;max-width:900px}.sheet-heading{padding:22px 21px 14px;border-bottom:1px solid #d9cfbc}.sheet-heading>h2{text-align:center;font-size:20px;letter-spacing:2px;color:#7c2d24;margin:0 0 16px}.sheet-heading p{margin:5px 0;font-size:13px;color:#3e3b32}.sheet-heading .question{color:#9a2e27;font-weight:bold;overflow-wrap:anywhere}.sheet-meta{display:grid;grid-template-columns:1fr 1fr;gap:2px 14px}.method-caption{font-size:12px;color:#7b663f;padding:8px 21px 0}.hexagrams{display:grid;grid-template-columns:repeat(3,1fr);padding:18px 10px 20px;gap:12px}.hexagrams.two{grid-template-columns:repeat(2,1fr)}.hexcard{text-align:center;min-width:0;border-right:1px solid #eadfca;padding:8px 7px}.hexcard:last-child{border:0}.hex-role{color:#9b2d26;font-size:12px;font-weight:bold}.hex-number{color:#9d8762;font-size:10px;display:block;margin-top:2px}.hexcard h3{font-size:17px;line-height:1.5;color:var(--red);margin:13px 0 7px;overflow-wrap:anywhere}.hexcard>p{font-size:11px;color:#746f63;margin:3px 0}.lines{width:94px;display:grid;gap:7px;margin:18px auto;flex-shrink:0}.line{height:9px;display:flex;gap:12px;position:relative}.line i{flex:1;height:9px;background:#2f3431}.line.moving i{background:var(--red)}.line em{position:absolute;right:-23px;top:-8px;font-style:normal;font-size:17px;color:var(--red)}.line span{position:absolute;left:-18px;font-size:9px;top:-3px;color:#958978}.body-use{padding:15px 20px;background:#f9f2df;border-top:1px solid #ded1b4;display:flex;justify-content:space-around;align-items:center;gap:12px}.body-use p{margin:0;font-size:13px}.body-use strong{font-size:14px;color:#7f2925}.body-use small{display:block;color:#8f7f62;font-size:10px;letter-spacing:1px}.sheet-notice{padding:12px 20px;font-size:11px;color:#827865;margin:0;border-top:1px solid #e3d9c4;overflow-wrap:anywhere}.sheet-table-wrap{overflow-x:auto;width:100%;padding:0 12px 15px}.sheet-table{border-collapse:collapse;font-size:12px;width:100%;min-width:800px}.sheet-table th{color:#564731;background:#faf5e9;text-align:left;padding:9px 6px;border-bottom:1px solid #c9bda2;font-size:11px}.sheet-table td{padding:9px 6px;border-bottom:1px solid #e1dacc;white-space:nowrap}.sheet-table .active-row{color:#a12c25;font-weight:bold}.row-yao{display:inline-block;width:27px;height:5px;background:currentColor;vertical-align:middle;margin-right:4px}.row-yao.yin{background:linear-gradient(to right,currentColor 42%,transparent 42%,transparent 58%,currentColor 58%)}.static-label{font-size:10px;color:#978a73}.scroll-note{padding:0 20px;font-size:11px;color:#8f7a50;margin:0 0 10px}.result-controls{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;padding:20px;background:#faf3df;border:1px solid #e1d3b2;border-radius:6px;margin:16px auto 25px;max-width:900px}.result-controls button,.image-actions a,.image-actions button,.dialog-heading button,.history-toolbar button,.file-button{background:#fffdf7;border:1px solid #cdbb94;border-radius:5px;color:#695538;padding:10px 14px;font-size:13px;text-decoration:none;cursor:pointer}.result-controls .red-button{background:var(--red);color:#ffedc8;border-color:var(--red)}.details-panel{border-top:1px solid #e6dbc5;padding:0 0 30px;margin-top:15px}.detail-tabs{display:flex;gap:24px;border-bottom:1px solid #e6dbc5;overflow-x:auto}.detail-tabs button{border:0;border-bottom:2px solid transparent;background:none;color:#7b6c53;padding:14px 0;font-size:14px;white-space:nowrap}.detail-tabs button[aria-selected=true]{border-color:var(--red);color:var(--red);font-weight:bold}#detailContent{padding:22px 8px 0;font-size:14px;color:#575044}#detailContent h2{font-size:21px;color:#302820;margin:0 0 17px}#detailContent h3{font-size:16px;margin:20px 0 8px}#detailContent p{line-height:1.85}#detailContent ol{padding-left:22px;line-height:1.9}#detailContent a{color:#8e3329}#detailContent .data-table{width:100%;border-collapse:collapse;font-size:13px}#detailContent .data-table td,#detailContent .data-table th{padding:9px;border-bottom:1px solid #e1d7c0;text-align:left}#notesField{min-height:170px;margin-bottom:15px}footer{border-top:1px solid #e6dbc5;color:#8a7c65;font-size:11px;text-align:center;padding:23px 0;display:flex;gap:20px;justify-content:center}footer a{color:#8b6941}dialog{width:min(98vw,1060px);max-height:93dvh;overflow:auto;padding:24px;border:1px solid #cab58b;border-radius:11px;background:#fffdf5;color:#302a20}dialog::backdrop{background:#231e16aa}.dialog-heading{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:15px}.dialog-heading h2{font-size:20px;margin:0}.image-actions{display:flex;gap:10px;flex-wrap:wrap;margin:15px 0}#imagePreview{width:100%;display:block;height:auto;-webkit-touch-callout:default}#imageDialog>p{font-size:13px;color:#736549}.history-toolbar{display:flex;gap:10px;align-items:center;margin:20px 0}.history-toolbar input{flex:1;min-width:0}.file-button{white-space:nowrap;margin:0}.record-card{padding:18px;border:1px solid #ddcfb3;margin-bottom:12px;border-radius:7px}.record-card h3{font-size:16px;margin:0 0 7px;color:#7f2925;overflow-wrap:anywhere}.record-card p{font-size:12px;margin:5px 0;color:#867459}.record-card textarea{margin:10px 0}.record-buttons{display:flex;gap:10px;flex-wrap:wrap}.record-buttons button{background:#fff7e5;border:1px solid #cab58b;padding:8px 12px;border-radius:4px;color:#7a5e32;font-size:12px}#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#663128;color:#fff0d0;padding:12px 20px;border-radius:7px;font-size:13px;max-width:90vw;z-index:20}body:has(dialog[open]){overflow:hidden}@media(max-width:700px){.topbar{height:auto;min-height:77px;padding:14px 17px;grid-template-columns:1fr auto;gap:8px}.brand{font-size:19px;gap:10px;letter-spacing:1px}.brand-seal{width:36px;height:36px;font-size:25px}.brand small{font-size:9px}.tool-title{display:none}.plain-button{font-size:12px;padding:8px}.paper{width:calc(100% - 18px);margin:18px auto;padding:23px 12px 0;border-radius:10px}.page-title{padding-bottom:21px}h1{font-size:25px}.page-title>span{font-size:12px}.mode-tabs{gap:6px;margin-bottom:20px}.mode-tabs button{font-size:11px;padding:8px 4px;min-height:50px}.cast-form{padding:20px 15px;margin-bottom:26px}.form-title h2{font-size:23px}.row{gap:10px}.row select{font-size:11px;padding:10px 7px}.date-row{gap:8px}.clock-row{gap:10px}.form-actions{gap:8px}.cast-button{font-size:16px}.secondary{padding:10px}.hexagrams{gap:2px;padding:13px 2px}.hexcard{padding:7px 2px}.hexcard h3{font-size:13px;min-height:39px;margin:12px 0 4px}.hexcard>p{font-size:9px}.hex-role{font-size:10px}.lines{width:64px;gap:6px;margin:17px auto}.line,.line i{height:7px}.line{gap:9px}.line em{right:-15px;font-size:13px;top:-7px}.line span{left:-12px;font-size:8px}.sheet-heading{padding:19px 12px 12px}.sheet-heading>h2{font-size:17px}.sheet-heading p{font-size:11px}.sheet-meta{grid-template-columns:1fr;gap:0}.method-caption{padding:8px 12px 0;font-size:11px}.body-use{padding:13px 9px;gap:8px}.body-use p,.body-use strong{font-size:11px}.body-use small{font-size:9px}.sheet-notice{padding:10px 12px;font-size:10px}.result-controls{padding:14px 9px;gap:7px}.result-controls button{font-size:12px;padding:10px}.detail-tabs{gap:18px}.detail-tabs button{font-size:13px}#detailContent{padding:20px 2px 0;font-size:13px}.manual-line{grid-template-columns:58px 1fr 45px;gap:8px}.small-yao{width:40px}.preview{gap:23px;padding:15px}.preview h3{font-size:15px}footer{font-size:10px;gap:10px;flex-wrap:wrap}.history-toolbar{flex-wrap:wrap}.history-toolbar input{flex-basis:100%}dialog{padding:16px}.dialog-heading h2{font-size:18px}.calendar-choice{gap:15px}}@media print{body{background:#fff}.topbar,.page-title,.mode-tabs,.cast-form,.details-panel,.result-controls,footer,dialog,#toast{display:none!important}.paper{width:100%;padding:0;border:0;margin:0}.sheet-table-wrap{overflow:visible}.sheet-table{min-width:0;font-size:9px}.sheet-table th,.sheet-table td{padding:4px}.scroll-note{display:none}.result-sheet{border:1px solid #aaa}*{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
.line-panel-heading{padding:15px 18px;border-top:1px solid #d9c8a7;background:#fcf6e8}.line-panel-heading h3{font-size:16px;color:#7f2925;margin:0 0 7px}.line-panel-heading p{font-size:12px;color:#6d5b3e;margin:5px 0}.hao-mobile{display:none}.hao-mobile-row{padding:14px 13px;border-bottom:1px solid #dccbad;background:#fffdf7}.hao-mobile-row.active-row{background:#fff8ee;border-left:3px solid #9a3027}.hao-mobile-top{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;margin-bottom:12px;color:#5c492d}.active-row .hao-mobile-top{color:#942b25}.hao-mobile-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px}.hao-mobile-columns>div{min-width:0}.hao-mobile-columns small{display:block;font-size:9px;color:#99815b;margin-bottom:5px;letter-spacing:1px}.hao-mobile-columns strong{display:block;font-size:14px;color:#5b332c}.hao-mobile-columns p{font-size:12px;margin:5px 0;color:#68583f}.hao-beast{font-size:12px;padding-top:10px;margin:7px 0 0;color:#705a35;border-top:1px dashed #e7d8bb}.hao-beast strong{color:#7f2925}@media(max-width:700px){.sheet-table-wrap{display:none}.hao-mobile{display:block}.line-panel-heading{padding:13px}.line-panel-heading h3{font-size:15px}}@media print{.hao-mobile{display:none!important}.sheet-table-wrap{display:block!important}}
/* Centered traditional layout, based on the supplied reference. */
.topbar{height:65px;background:#fbf4dd;box-shadow:none;padding:8px 19px;grid-template-columns:1fr auto 1fr}.brand-logo{width:46px;height:46px;object-fit:contain;mix-blend-mode:multiply}.brand{font-size:20px;letter-spacing:1px;gap:8px}.brand small{font-size:9px}.tool-title{color:#211d17;font-size:15px;letter-spacing:0}.paper{width:min(1440px,calc(100% - 32px));margin:24px auto;border:0;border-radius:27px;padding:25px 20px 0;background:linear-gradient(#fffffff0,#ffffffe3),url('../landscape.svg') center top/cover no-repeat;box-shadow:none}.page-title{display:none}.mode-tabs{max-width:850px;gap:0;border-bottom:1px solid #ddcdac;margin:0 auto 23px}.mode-tabs button{border:0;border-bottom:3px solid transparent;border-radius:0;background:#fbf5e4;color:#675c49;min-height:40px;font-size:12px;padding:8px}.mode-tabs button[aria-selected=true]{background:#fff9e9;border-color:#55703f;color:#8b2d24;font-weight:bold}.cast-form{padding:19px 16px 23px;max-width:600px;background:linear-gradient(#fbf4dedf,#fbf4deed),url('../landscape.svg') center/cover;border:1px solid #efe3bd;border-radius:15px;box-shadow:0 3px 10px #77653326}.form-title{padding:0 0 15px;margin-bottom:20px}.form-title h2{font-size:29px;color:#191812}.form-title span{display:none}input,select,textarea{border-radius:10px;background:#fffaf24d;border-color:#ccc4ad}#question{min-height:43px;height:44px;max-height:130px;margin-bottom:17px}.date-row{grid-template-columns:repeat(3,1fr)}.clock-row{grid-template-columns:1fr auto 1fr auto}.advanced-calendar{margin:10px 0 13px;color:#796c51}.advanced-calendar summary{font-size:12px;cursor:pointer}.advanced-calendar .row{margin-top:10px}.advanced-calendar .calendar-summary{margin-bottom:0}.calendar-choice{margin:13px 0}.cast-form #modeFields>.help{font-size:11px;margin:9px 0 11px}.form-actions{justify-content:center;position:relative}.cast-button{flex:0 1 370px;font-size:29px;padding:9px 15px;color:#ffe6a0;background:linear-gradient(#46602f,#55703f,#46602f);border:4px double #b79a66;border-radius:6px;text-shadow:1px 2px 2px #652115;box-shadow:0 1px 4px #794b3280}.secondary{background:#fff9e9}.details-panel{background:#fbf4dddb;border:0;border-radius:15px;padding:22px 16px;margin-top:22px}.detail-tabs{background:#f4f3f1;border-bottom:0;gap:0}.detail-tabs button{padding:13px 20px;border:1px solid transparent;border-bottom:0}.detail-tabs button[aria-selected=true]{background:#fff;border:1px solid #e5dbc4;color:#8e251e}.result-sheet{position:relative;isolation:isolate;border-radius:4px;background:#fffefb}.result-sheet::before{content:"";position:absolute;width:min(72%,650px);aspect-ratio:1;top:47%;left:50%;transform:translate(-50%,-50%);background:url('../logo-wm.webp') center/contain no-repeat;opacity:.065;mix-blend-mode:multiply;z-index:0;pointer-events:none}.result-sheet>div,.result-sheet>p{position:relative;z-index:1}.sheet-heading{padding-right:115px;min-height:115px}.sheet-logo{position:absolute;right:15px;top:13px;width:90px;height:90px;object-fit:contain;mix-blend-mode:multiply}.line-panel-heading{background:#fcf6e8b8}.hao-mobile-row{background:#fffdf7bd}.hao-mobile-row.active-row{background:#fff8eedb}.hexcard .line i{background:#111}.hexcard .line.moving i{background:#b42b25}.hexcard .line em{color:#b42b25}.result-controls{max-width:900px;background:#fbf4dbe6}.body-use{background:#f9f2dfc9}@media(min-width:900px){.mode-tabs{grid-template-columns:repeat(6,1fr)}}@media(max-width:700px){.topbar{height:64px;grid-template-columns:1fr auto;padding:9px 12px}.brand{font-size:18px}.brand-logo{width:39px;height:39px}.paper{width:calc(100% - 16px);margin:15px auto;border-radius:19px;padding:17px 10px 0}.cast-form{padding:19px 13px}.form-title h2{font-size:25px}.mode-tabs button{font-size:10px;min-height:43px;padding:7px 3px}.cast-button{font-size:24px;flex:1}.form-actions .secondary{font-size:11px;padding:8px}.details-panel{padding:14px 10px}.detail-tabs button{font-size:12px;padding:11px 12px}.sheet-logo{width:61px;height:61px;right:10px;top:10px}.sheet-heading{padding-right:82px}.sheet-heading>h2{text-align:left;font-size:17px;letter-spacing:1px}.result-sheet::before{width:85%;top:45%}}@media print{.paper{background:white;margin:0;padding:0;width:100%}.result-sheet::before{display:block}.sheet-logo{display:block}.advanced-calendar{display:none}}
/* Keep the scenery visible inside the page, rather than behind opaque white. */
body{background:#e5e2d9 url('../landscape.svg') center top/100% auto fixed no-repeat}.paper{background:linear-gradient(#ffffff70,#ffffff90),url('../landscape.svg') center top/100% auto no-repeat;padding-top:17px}.mode-tabs{margin-bottom:13px;max-width:980px}.mode-tabs button{font-size:11px;min-height:36px;padding:6px 8px}.cast-form{background:linear-gradient(#fcf4ddd9,#fcf4dde3),url('../landscape.svg') center/cover no-repeat}.cast-form #modeFields>.help{display:none}.cast-form:has(#coinString) #modeFields>.help,.cast-form:has(#serial) #modeFields>.help,.cast-form:has(#randomSystem) #modeFields>.help{display:block}.result-sheet{background:#fffef9f5}@media(max-width:700px){.paper{background:linear-gradient(#ffffff65,#ffffff98),url('../landscape.svg') center top/auto 760px no-repeat}.mode-tabs button{font-size:10px;min-height:41px;padding:5px 3px}.mode-tabs{margin-bottom:13px}}
.cast-form:has(#throwCoins) #modeFields>.help{display:block}
#resultArea{max-width:950px;margin:0 auto 28px}.result-sheet{border:0;background:transparent;overflow:visible;border-radius:0}.result-sheet::before{display:none}.compact-result-image{width:100%;height:auto;display:block;border-radius:3px;background:white}.compact-placeholder{padding:35px;text-align:center;font-size:13px;color:#7f6e50;background:#fffdf6;border:1px solid #d9c7a0}.accessible-result{margin-top:10px;font-size:12px}.accessible-result>summary{cursor:pointer;color:#82704d;text-align:center;padding:9px}.accessible-result[open]{background:#fffdf7;border:1px solid #d8c7a4;border-radius:6px}.result-controls{margin:15px auto 0;padding:17px;justify-content:flex-end;border-radius:12px;background:#fbf4dc}.result-controls .red-button{background:white;color:#222;border:1px solid #d5d0c3;font-size:16px;padding:13px 23px}.result-controls #copyButton{background:#2353dc;color:white;border:0}.result-controls #saveButton{font-size:12px}.cast-form{margin-top:20px}@media(max-width:700px){.paper{padding:15px 7px 0}.mode-tabs{margin-bottom:15px}#resultArea{margin-bottom:22px}.result-controls{justify-content:center;padding:12px 9px;gap:9px}.result-controls .red-button{font-size:14px;padding:11px 16px}.accessible-result>summary{font-size:11px}.compact-result-image{border-radius:2px}}@media print{.compact-result-image{display:block!important}.accessible-result{display:none!important}}
.marker-panel{padding:15px;border-top:1px solid #d8c9ad;background:#fffdf4}.marker-panel h3{font-size:14px;color:#7e2b24}.marker-panel h4{font-size:12px;color:#8d764d;margin:14px 0 5px}.marker-scroll{overflow-x:auto}.marker-table{width:100%;border-collapse:collapse;font-size:12px;min-width:560px}.marker-table td,.marker-table th{text-align:left;border-bottom:1px solid #e1d4bb;padding:8px 5px}.hex-number{display:none}

.community-footer{margin:32px auto 20px;text-align:center;border-top:1px solid #aaa394;padding-top:20px}.community-footer h2{font-size:22px;color:#7c2923}.community-footer img{display:block;width:min(100%,760px);height:auto;margin:16px auto;border-radius:8px}.trigram-total{margin-left:auto;color:#7c2923}.body-use{flex-wrap:wrap}

.compact-image-wrap{position:relative}.image-direct-download{position:absolute;right:12px;top:12px;background:#812d27;color:#fff7de;padding:10px 16px;border-radius:8px;font-weight:700;text-decoration:none;box-shadow:0 2px 8px #0002;z-index:1}.image-direct-download:focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:3px}@media(max-width:600px){.image-direct-download{right:6px;top:6px;padding:8px 10px;font-size:13px}}

.liu-line-heading,.liu-line-inputs .manual-line{display:grid;grid-template-columns:1fr 1.35fr 64px;align-items:center;gap:12px}.liu-line-heading{margin:24px 0 12px}.liu-line-inputs .manual-line>label{margin:0;font-size:18px}.liu-line-inputs .manual-line>label:last-child{display:flex;justify-content:center}.liu-line-inputs input[type=checkbox]{width:28px;height:28px}.liu-line-inputs select{width:100%;min-width:0;font-size:19px}.liu-line-inputs .manual-line{padding:8px 0;border:0}@media(max-width:600px){.liu-line-heading,.liu-line-inputs .manual-line{grid-template-columns:1fr 1.35fr 48px;gap:8px}.liu-line-inputs .manual-line>label{font-size:17px}}

#destinyTools{margin:40px auto;border-top:2px solid #a68a55;padding-top:24px}.destiny-tabs{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.destiny-tabs .active{background:#852e25;color:#fff6db}.destiny-result{background:#fffdf6;padding:24px;margin:24px auto;border-radius:12px}.destiny-result:empty{display:none}.four-pillars{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.four-pillars article,.ziwei-grid article{border:1px solid #bcb19b;padding:16px}.four-pillars strong{font-size:26px;color:#8c2922}.ziwei-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.ziwei-grid h3{color:#912a22}.major-stars{color:#b22524;font-size:20px;font-weight:700}.day-hours{width:100%;border-collapse:collapse;font-size:18px}.day-hours td,.day-hours th{padding:12px;border-bottom:1px solid #ccc}.auspicious{color:#983126}.inauspicious{color:#555}.relation-columns{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;font-weight:700;color:#902c26}.sheet-table{font-size:19px!important}@media(max-width:700px){.four-pillars,.ziwei-grid{grid-template-columns:repeat(2,1fr)}.destiny-result{padding:12px}.relation-columns{font-size:15px}}

.service-nav{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:20px 0}.service-nav a{padding:12px 16px;background:#f5e9ce;border:1px solid #cdb884;border-radius:8px;color:#8d2b23;font-weight:700;text-decoration:none}

.luck-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.luck-grid p{border:1px solid #c6b899;padding:10px}.luck-grid strong{color:#942e27}@media(max-width:600px){.luck-grid{grid-template-columns:repeat(2,1fr)}}

#destinyTools{border-top:0;margin:0;padding:0}#destinyTools[hidden],#ichingPanel[hidden]{display:none!important}

.destiny-sheet-preview img{display:block;width:100%;height:auto}.destiny-readable{overflow:auto}.ziwei-sheet-grid{display:grid;grid-template-columns:repeat(4,minmax(260px,1fr));grid-template-rows:repeat(4,minmax(260px,auto));min-width:1100px;background:#fff}.ziwei-palace,.ziwei-center{border:1px solid #444;padding:12px}.ziwei-palace h3{color:#1263a0;font-size:20px}.palace-stars{display:grid;grid-template-columns:1fr 1fr;gap:5px;font-size:15px}.tough-star{color:#c6232c}.soft-star{color:#46612e}.ziwei-center{grid-row:2/span 2;grid-column:2/span 2;background:#f9f8f1;text-align:center}.ziwei-center img{width:110px}.bazi-sheet-header{display:flex;gap:24px;align-items:center}.bazi-sheet-header img{width:110px}.bazi-sheet-table{width:100%;min-width:800px;border-collapse:collapse;background:#fff}.bazi-sheet-table th,.bazi-sheet-table td{padding:15px;border:1px solid #aabfdf;text-align:center;vertical-align:top}.bazi-sheet-table td strong{display:block;font-size:30px;margin:8px}.bazi-luck-sheet{display:grid;grid-template-columns:repeat(4,1fr);min-width:800px;gap:16px}.bazi-luck-sheet h3{color:#ab2424}.destiny-result{padding:12px}

.compact-image-wrap{border-radius:16px;overflow:hidden}.sheet-table{font-size:21px!important}.sheet-table td,.sheet-table th{padding:13px 12px!important}.hao-mobile-row{font-size:19px}.accessible-result summary{font-size:19px;font-weight:700}

.palace-stars span{display:block;margin:5px 0}.major-stars{text-align:center}.neutral-stars{color:#555;font-size:14px}.bazi-sheet-table{background:transparent}.almanac{background:#fffdf7;padding:16px}.almanac-nav{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.almanac-nav input{max-width:200px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin:20px 0}.calendar-grid>strong{text-align:center;padding:8px}.calendar-date{position:relative;padding:12px 5px!important;text-align:center;border:1px solid #d5cbb5!important;border-radius:6px!important;background:#fff!important;min-width:0}.calendar-date b{display:block;font-size:24px;color:#28231e}.calendar-date small{font-size:15px;color:#786a55}.calendar-date em{display:block;font-style:normal;font-size:12px}.calendar-date.selected{box-shadow:inset 0 0 0 2px #942c25;background:#fff3dc!important}.calendar-caution b{color:#ae2626}.calendar-good{color:#a07800}.calendar-bad{color:#555}.calendar-legend{font-size:15px;padding:10px 0}.calendar-day{border-top:2px solid #bc9b55;padding-top:20px}.calendar-day-heading{display:grid;grid-template-columns:140px 1fr;gap:20px}.calendar-day-heading strong{font-size:64px;display:block;color:#9b2b23}.calendar-details{display:grid;grid-template-columns:1fr 1fr;gap:18px}.calendar-hours{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.calendar-hours article{border:1px solid #d6cbb5;border-radius:6px;padding:12px}.calendar-hours span,.calendar-hours small{display:block}.calendar-warning{color:#a32727;font-weight:700}.calendar-note{font-size:14px;color:#665d4f}.bazi-luck-sheet strong{font-weight:700}@media(max-width:600px){.calendar-day-heading{grid-template-columns:100px 1fr;gap:10px}.calendar-details{grid-template-columns:1fr}.calendar-hours{grid-template-columns:repeat(2,1fr)}.calendar-date b{font-size:21px}.calendar-date em{display:none}.almanac{padding:6px}}
.birth-wheels{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;background:#fff9e8;padding:12px;border-radius:14px}.birth-wheels label{text-align:center}.birth-wheels select{width:100%;height:174px;padding:0;overflow-y:auto;font-size:20px}.birth-wheels option{padding:8px;text-align:center}.birth-wheels option:checked{background:#872c25;color:#fff}
.void-badge{display:inline-block;background:#111;color:#fff!important;padding:3px 9px;margin:4px;font-size:16px}
.ziwei-sheet-grid{position:relative}.void-between{position:absolute;transform:translate(-50%,-50%);z-index:2;background:#111;color:white;padding:4px 12px;font-size:18px;white-space:nowrap}
.birth-date-wheels{grid-template-columns:repeat(3,minmax(0,1fr))}.birth-time-wheels{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:14px}.birth-wheels select{font-size:22px}

.tool-hero{padding:32px 12px 38px;background:linear-gradient(#ffffff95,#e6eef4ab),url('../landscape.svg') center/cover;border-radius:20px}.tool-hero .hero-logo{display:block;width:100px;height:100px;object-fit:contain;margin:0 auto 18px;mix-blend-mode:multiply}.tool-hero h1{display:inline-block;background:linear-gradient(#ce2720,#85140f);color:#ffe8a2;border:3px solid #d4ac60;border-radius:18px;padding:16px 22px;box-shadow:0 0 0 4px #e8d2a7,0 6px 14px #502c2333;font-size:clamp(21px,3vw,32px)}.mode-tabs{gap:12px;background:transparent;padding:20px 0}.mode-tabs button{border:1px solid #d6c5a3;border-radius:14px;background:#fff8e9;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:116px;font-size:15px}.mode-tabs button::before{content:'☯';display:grid;place-items:center;width:48px;height:48px;border:3px solid #55703f;border-radius:50%;color:#a62720;background:#fff3d0;font-size:32px}.mode-tabs button[data-destiny]::before{content:'✦'}.mode-tabs button[aria-selected=true]{background:#fff0cd;border-color:#55703f;color:#81211c;font-weight:bold}@media(min-width:900px){.mode-tabs{grid-template-columns:repeat(5,1fr)}}@media(max-width:700px){.mode-tabs{grid-template-columns:repeat(2,1fr)}.mode-tabs button{font-size:14px;min-height:110px}}

.zi-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.zi-options label{display:flex;align-items:center;gap:8px}#ziViewOptions{border:1px solid #cab793;border-radius:12px;padding:16px}#ziViewOptions legend{font-weight:bold;color:#812b23}

.classical-reading{margin:22px 0;padding:18px;background:#fffdf4;border:1px solid #d8c7a9;border-radius:14px}.classical-reading p{font-size:18px;line-height:1.65;color:#171717}.classical-reading .original{font-size:16px;color:#625644}.classical-line{padding:12px 0;border-top:1px solid #e0d8c5}.classical-line.moving{border-left:4px solid #b32420;padding-left:12px;background:#fff3ed}.classical-reading h3{color:#912922}

.mode-tabs button::before,.mode-tabs button[data-destiny]::before{content:none;display:none}.mode-tabs .tool-icon{display:block;width:92px;height:92px;object-fit:contain;filter:drop-shadow(0 5px 4px #6d302326);margin-bottom:5px}.mode-tabs{max-width:970px;gap:16px}.mode-tabs button{min-height:160px;padding:18px 10px;font-size:16px;line-height:1.4;border-radius:19px}.mode-tabs button[aria-selected=true]{box-shadow:0 0 0 1px #55703f inset}.mode-tabs button:focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:4px}@media(min-width:900px){.mode-tabs{grid-template-columns:repeat(4,1fr)}}@media(max-width:700px){.mode-tabs{gap:12px}.mode-tabs .tool-icon{width:86px;height:86px}.mode-tabs button{min-height:154px;font-size:15px;padding:15px 7px}.mode-tabs button:last-child{grid-column:1 / -1;justify-self:center;width:calc(50% - 6px)}}

.mode-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scroll-padding:8px;max-width:100%;gap:8px;padding:8px 2px 12px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}.mode-tabs button,.mode-tabs button:last-child{flex:0 0 116px;width:116px;min-height:108px;max-height:132px;padding:9px 6px;font-size:12px;line-height:1.3;border-radius:12px;scroll-snap-align:center;justify-self:auto;grid-column:auto;gap:4px}.mode-tabs .tool-icon{width:48px;height:48px;margin:0;filter:drop-shadow(0 2px 2px #6d302322)}@media(max-width:700px){.paper{padding-top:12px}.mode-tabs button,.mode-tabs button:last-child{flex-basis:98px;width:98px;min-height:104px;font-size:11px}.mode-tabs .tool-icon{width:45px;height:45px}.topbar{height:60px}.brand{font-size:17px}.brand-logo{width:38px;height:38px}}
.calendar-view-tabs{display:flex;gap:6px;overflow:auto;margin:14px 0}.calendar-view-tabs button{flex:1;min-width:90px;border:1px solid #cbb991;border-radius:9px;background:#fff8e7;padding:10px;color:#503d29}.calendar-view-tabs button[aria-selected=true]{background:#46602f;color:white}.calendar-day-nav{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;gap:8px;margin:14px auto;max-width:460px}.calendar-day-nav button{font-size:26px;background:#fff7e5;border:1px solid #c6ad7d;border-radius:8px}.calendar-day-nav input{margin:0}.calendar-section{margin:10px 0;border:1px solid #d7c8ac;border-radius:11px;background:#fffdfa;padding:12px}.calendar-section summary{font-size:16px;font-weight:bold;color:#7c3027;cursor:pointer}.calendar-section p{line-height:1.7;color:#25231f}.calendar-section h3{font-size:16px;margin:14px 0 6px}.calendar-quick{padding:14px;background:#fffcf2;border:1px solid #e1d5b9;border-radius:12px}.calendar-advice-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}.calendar-advice-columns h3{color:#3b5028}.calendar-advice-columns section:last-child h3{color:#a52625}.calendar-holiday{display:inline-block;padding:5px 8px;background:#f8e3ad;color:#8c271e;border-radius:6px;font-size:13px;margin:6px 0}#calendarFilters{background:#fff9e9;border:1px solid #d2b886;border-radius:12px;padding:14px}#calendarFilters p{font-size:13px;line-height:1.6}.calendar-match-links{display:flex;flex-wrap:wrap;gap:7px}.calendar-match-links button{border:1px solid #929c89;border-radius:6px;padding:6px 10px;background:#edf8e7;color:#3e502f}.calendar-date.filter-match{box-shadow:0 0 0 2px #556845 inset}.calendar-date.filter-avoid{background:#fff1ed}.day-assessment{padding:12px;border-radius:9px;background:#fff5df;margin:12px 0}.day-assessment.match{background:#eef2eb}.day-assessment.avoid{background:#fff0ed}.calendar-converter{max-width:480px;margin:auto;padding:18px;background:#fff9eb;border:1px solid #d9c398;border-radius:12px}.calendar-day-heading strong{color:#ae2e25}.calendar-day-heading p{margin:7px 0}@media(max-width:700px){.calendar-advice-columns{grid-template-columns:1fr;gap:6px}.almanac{padding:12px}.calendar-grid{gap:3px}.calendar-date{padding:7px 2px;min-width:0}.calendar-date em{font-size:8px}.calendar-day-heading{gap:12px}.calendar-day-heading strong{font-size:65px}.calendar-day-heading p{font-size:13px}}

.bazi-overview{padding:15px;border:1px solid #d2c09a;background:#fffaf0;border-radius:12px;margin:16px 0}.bazi-element-counts{display:flex;gap:9px;flex-wrap:wrap}.bazi-element-counts span{padding:7px 12px;border:2px solid;border-radius:8px;font-weight:bold}

/* Compact mobile form and two-row navigation. */
.mode-tabs{display:grid;grid-template-rows:repeat(2,auto);grid-auto-flow:column;grid-auto-columns:116px;grid-template-columns:none;gap:8px;align-items:stretch}.mode-tabs button,.mode-tabs button:last-child{width:100%;height:100%;min-height:96px;max-height:none}.birth-wheels{padding:0;background:transparent;gap:10px;border-radius:0;margin:14px 0}.birth-date-wheels,.birth-time-wheels{grid-template-columns:repeat(3,minmax(0,1fr))}.birth-wheels label{text-align:left;font-size:14px;font-weight:600;margin:0}.birth-wheels select{height:46px;min-height:46px;padding:8px;font-size:16px;margin-top:6px;background:#fffdf8;border-radius:8px}.birth-wheels option{color:#242424;background:#fff}.birth-wheels option:checked{color:#242424;background:#f8e9cc}#destinyForm{padding:20px;max-width:560px}#destinyForm h2{font-size:24px;text-align:center;color:#fff5dd;background:#852f28;padding:10px;border-radius:10px;margin:0 0 18px}#destinyForm input:not([type=checkbox]),#destinyForm select{min-height:44px;font-size:16px}#destinyForm .row{gap:10px}#destinyForm .row select{margin-top:6px}#ziViewOptions{padding:12px;margin:14px 0}#ziViewOptions .row{grid-template-columns:1fr}#destinyForm>label{margin-top:10px}#resultArea>.result-controls{display:flex;justify-content:center;padding:14px}#resultArea>.result-controls button{max-width:320px;flex:1}@media(max-width:700px){.mode-tabs{grid-auto-columns:100px}.mode-tabs button,.mode-tabs button:last-child{min-height:92px}.mode-tabs .tool-icon{width:42px;height:42px}#destinyForm{padding:16px}.birth-wheels{gap:8px}#destinyForm h2{font-size:21px}.birth-wheels select{padding:7px 4px}#destinyForm .row{grid-template-columns:repeat(2,minmax(0,1fr))}}

.manual-cast-preview{padding:12px 0}.manual-summary{text-align:center}.manual-summary p{margin:5px;font-size:16px}.manual-summary strong{color:#892b25}.manual-line-caption{text-align:center;font-size:13px;color:#71634f;margin:12px 0 6px}.manual-yao-picker{display:grid;gap:5px;max-width:290px;margin:0 auto}.manual-yao-picker button{position:relative;display:flex;align-items:center;justify-content:center;min-height:38px;background:transparent;border:0;border-radius:7px;padding:10px 26px}.manual-yao-picker button:hover{background:#f2e6cc}.manual-yao{display:block;width:180px;height:10px;background:#285f91}.manual-yao.yin{background:linear-gradient(to right,#285f91 43%,transparent 43%,transparent 57%,#285f91 57%)}.manual-yao-picker button[aria-pressed=true] .manual-yao{background:#b42b25}.manual-yao-picker button[aria-pressed=true] .manual-yao.yin{background:linear-gradient(to right,#b42b25 43%,transparent 43%,transparent 57%,#b42b25 57%)}.manual-yao-picker small{position:absolute;right:8px;color:#786950}.manual-moving-select{display:none}.manual-trigrams select{font-size:16px!important}.manual-trigrams label{font-weight:600}#directFields>label{font-size:14px}#directFields .help{display:none}

.mode-tabs img[src*="pinterest"]{border-radius:50%;border:2px solid #9f3028;object-fit:cover}

.mode-tabs img[src*="ziwei-constellation"]{border-radius:50%;border:2px solid #9f3028;object-fit:cover;object-position:center top}

#resultSheet .hexcard h3,#resultSheet .hex-role,#resultSheet .active-row,#resultSheet .question,#resultSheet .relation-columns p,#resultSheet .body-use strong{color:#f01818}

.brand{color:#4a6337}.brand small{color:#4a6337;letter-spacing:0}.tool-hero .hero-logo{border:2px solid #b39154;border-radius:50%;padding:6px;background:#fff9e9}.brand-domain{display:block;color:#4a6337;font-weight:700;font-size:clamp(18px,3vw,25px);letter-spacing:1px;margin:18px auto 9px;text-decoration:none}.tool-hero>p{color:#765526;font-size:13px;letter-spacing:1px}.sheet-stars{display:none}.sheet-table th{font-size:11px;vertical-align:middle}.sheet-table td{vertical-align:middle}

#question{height:auto;min-height:64px;max-height:none;resize:none;overflow:hidden;line-height:1.5}.tool-hero h1{overflow-wrap:anywhere}

.tool-hero h1{ text-transform:none}.mode-tabs{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:auto;grid-auto-flow:row;grid-auto-columns:auto;overflow:visible;gap:8px;width:100%;padding:8px 0 12px}.mode-tabs button,.mode-tabs button:last-child{width:100%;min-width:0;min-height:94px;padding:8px 4px;font-size:12px;grid-column:auto}.mode-tabs .tool-icon{width:42px;height:42px}@media(max-width:700px){.mode-tabs{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,auto);grid-auto-flow:column;gap:6px}.mode-tabs button,.mode-tabs button:last-child{min-height:80px;padding:6px 3px;font-size:10px;line-height:1.3}.mode-tabs .tool-icon{width:34px;height:34px}.tool-hero h1{font-size:20px}}

.tool-hero h1{color:#4a6337}.tool-hero>span{display:block;max-width:740px;margin:8px auto;line-height:1.6;text-align:center}

.brand{letter-spacing:1px}@media(max-width:700px){.brand{font-size:15px;gap:8px;letter-spacing:.4px}.brand small{font-size:10px}}

.mode-tabs img[src*="hvl"],.mode-tabs img[src*="random-numbers"],.mode-tabs img[src*="iphone18"],.mode-tabs img[src*="usd2"]{border-radius:50%;border:2px solid #9f3028;object-fit:cover}.mode-tabs img[src*="ziwei-hvl"]{object-fit:contain;background:#fff7e5}.mode-tabs img[src*="iphone18"]{object-fit:contain;background:#050505}#chartKindTabs button{flex:1}#generateDigits{margin:8px 0 14px}
.mode-tabs img[src*="serial-usd2"]{object-fit:contain;background:#fff7e5}.mode-tabs img[src*="random-numbers"]{object-position:center 62%}

.brand{font-family:Arial,Helvetica,sans-serif;letter-spacing:0;font-weight:700;line-height:1.25}.brand>span{min-width:0}.header-banner{width:220px;height:120px;object-fit:contain;border-radius:8px}.mode-tabs img[src*="phone-user"]{object-fit:cover;object-position:center 55%;border-radius:50%;border:2px solid #9f3028}@media(min-width:701px){.topbar{grid-template-columns:minmax(0,1fr) auto auto;gap:18px;height:132px;padding:6px max(20px,calc((100vw - 1180px)/2))}.brand{font-size:clamp(18px,2.1vw,26px)}.brand-logo{width:54px;height:54px}.brand small{font-size:12px;margin-top:5px}}@media(max-width:900px) and (min-width:701px){.header-banner{width:150px;height:85px}.topbar{height:100px}.brand{font-size:18px}}@media(max-width:700px){.header-banner{display:none}.brand{font-size:15px}}

@media(min-width:901px){.topbar{position:relative;grid-template-columns:minmax(0,1fr) auto;height:100px}.topbar .brand{max-width:none;font-size:clamp(14px,1.6vw,22px)}.topbar .brand-logo{width:46px;height:46px}.desktop-heading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:clamp(340px,36vw,420px);text-align:center;font:600 16px/1.4 Arial,Helvetica,sans-serif;color:#4a6337;letter-spacing:0}.topbar .plain-button{grid-column:2}}@media(min-width:701px) and (max-width:900px){.topbar{grid-template-columns:minmax(0,1fr) auto;height:100px}.desktop-heading{grid-row:2;grid-column:1 / -1;text-align:center;font-size:15px;letter-spacing:0;color:#4a6337}.topbar .plain-button{grid-column:2;grid-row:1}}@media(max-width:700px){.desktop-heading{display:none}}

/* Lục Hào: bảng chọn hào trên cùng, gieo xu Khai Nguyên Thông Bảo */
#preDateFields:empty{display:none}
#preDateFields{margin:6px 0 18px}
.liu-cast-heading,.liu-cast-lines .manual-line{grid-template-columns:1fr 1.25fr 52px 92px}
.line-coins{display:flex;align-items:center;gap:2px;min-height:28px;justify-content:flex-start}
.line-coins b{margin-left:5px;font-size:15px;color:var(--red)}
.kaiyuan-coin{width:92px;height:92px;filter:drop-shadow(0 3px 3px rgba(70,45,10,.35))}
.kaiyuan-coin.small{width:22px;height:22px;filter:none}
.kaiyuan-coin.idle{opacity:.55}
.kaiyuan-coin text{font:700 25px "KaiTi","STKaiti","Kaiti SC","Noto Serif SC","Noto Serif CJK SC","SimSun",serif;fill:#3f290a}
.kaiyuan-coin path[fill-rule]{fill-opacity:1}
.kaiyuan-stage .coin-faces{gap:18px;margin:16px 0 8px;perspective:600px}
.kaiyuan-coin.flip{animation:kaiyuan-flip .7s ease-out}
@keyframes kaiyuan-flip{0%{transform:rotateY(0) translateY(0)}45%{transform:rotateY(540deg) translateY(-18px)}100%{transform:rotateY(1080deg) translateY(0)}}
@media (prefers-reduced-motion:reduce){.kaiyuan-coin.flip{animation:none}}
.coin-rule{font-size:13px;color:#7b705d;line-height:1.6;margin:0 0 4px}
.coin-buttons{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:14px}
.coin-buttons #throwCoins{min-width:220px;font-size:17px;font-weight:700}
.liuhao-form .coins-stage{margin-top:18px}
@media(max-width:600px){.liu-cast-heading,.liu-cast-lines .manual-line{grid-template-columns:1fr 1.2fr 40px 78px;gap:6px}.kaiyuan-coin{width:76px;height:76px}.kaiyuan-coin.small{width:19px;height:19px}.line-coins b{font-size:14px;margin-left:3px}}

/* Lịch: 12 giờ chi tiết */
.calendar-hour-table{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.calendar-hour-table article{border:1px solid #e3d5b4;border-radius:8px;padding:10px 12px;background:#fffaf0}
.calendar-hour-table article.calendar-good{border-color:#c9b27a;background:#fff8e3}
.calendar-hour-table article.calendar-bad{background:#faf6ee;opacity:.95}
.calendar-hour-table header{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;margin-bottom:4px}
.calendar-hour-table header em{font-style:normal;font-size:13px}
.calendar-hour-table p{margin:3px 0;font-size:14px;line-height:1.5}

/* Lịch: xem theo tuổi */
.age-match{border:1px solid #e0cf9f;border-radius:10px;background:#fffaf0;padding:12px 14px;margin:12px 0}
.age-match h3{margin:0 0 8px}
.age-match label{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.age-match input{max-width:140px}
.age-match p{margin:5px 0;line-height:1.5}
.age-verdict{font-size:18px}

/* Đầu trang máy tính: logo Huyền Chân Quán với chữ uốn vòng cung */
.header-emblem{display:block;text-decoration:none;line-height:0}
.header-emblem svg{display:block;height:98px;width:auto;overflow:visible}
.header-emblem .emblem-text{font:700 19px "HCQ Viet",Georgia,"Times New Roman",serif;letter-spacing:1.6px;fill:#4a6337}
.header-emblem .emblem-logo{mix-blend-mode:multiply}
@media(min-width:901px){.desktop-heading.header-emblem{width:auto;top:50%;transform:translate(-50%,-50%)}}
@media(max-width:900px){.header-emblem{display:none!important}}
.taboo-table{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px;margin:10px 0}.taboo-table article{border:1px solid #e1d4bb;border-radius:8px;padding:8px 10px;display:grid;grid-template-columns:1fr auto;gap:2px 8px;background:#fffdf7}.taboo-table article.calendar-bad{border-color:#e7a19a;background:#fff3f1}.taboo-table b{font-size:14px}.taboo-table span{font-size:13px;font-weight:700}.taboo-table article.calendar-bad span{color:#b3261e}.taboo-table small{grid-column:1/-1;color:#5d5345;font-size:12px;line-height:1.45}
.tbl-page{display:grid;gap:14px}.tbl-head{text-align:center;border-bottom:2px solid #b0362c;padding-bottom:10px}.tbl-head h3{font-size:28px;letter-spacing:6px;color:#9b241c;margin:0}.tbl-date{font-size:18px;font-weight:700}.tbl-page section>h3{color:#7e2b24;border-left:4px solid #b0362c;padding-left:8px;margin:6px 0}.tbl-table{width:100%;border-collapse:collapse;font-size:14px}.tbl-table th,.tbl-table td{border-bottom:1px solid #e1d4bb;padding:7px 6px;text-align:left;vertical-align:top}.tbl-table th{font-size:12px;color:#8d764d}.tbl-han{font-size:17px;font-weight:700;color:#5b1a14;white-space:nowrap;width:34%}.tbl-table small{display:block;color:#5d5345;font-size:12.5px;margin-top:2px;line-height:1.45}.tbl-yiji{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tbl-chips{display:flex;flex-wrap:wrap;gap:6px}.tbl-chips span{border:1px solid #e1d4bb;border-radius:6px;padding:4px 8px;background:#fffdf7;font-size:13px}.tbl-chips b{margin-right:5px;color:#5b1a14}.tbl-yiji>div:first-child .tbl-chips span{border-color:#b2bfa6}.tbl-yiji>div:last-child .tbl-chips span{border-color:#e7a19a}.tbl-song{font-size:17px;line-height:1.8;color:#3a1410;background:#fff8ec;border:1px solid #e9d7b4;border-radius:8px;padding:10px 12px}.tbl-hours{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px}.tbl-hours article{border:1px solid #e1d4bb;border-radius:8px;padding:8px 10px;background:#fffdf7;font-size:13px}.tbl-hours article.tbl-good{border-color:#b5c4a2;border-top:4px solid #5d7b47}.tbl-hours article.tbl-bad{border-color:#e7a19a;border-top:4px solid #b3261e}.tbl-hours header{display:flex;justify-content:space-between;gap:6px;margin-bottom:4px}.tbl-hours header b{font-size:17px;color:#5b1a14}.tbl-hours p{margin:3px 0;line-height:1.45}.tbl-hours small{color:#8d764d}@media (max-width:640px){.tbl-yiji{grid-template-columns:1fr}.tbl-han{white-space:normal;width:38%}}

.taboo-more{margin:8px 0}.taboo-more summary{cursor:pointer;color:#7c3027;font-weight:bold}.taboo-more .taboo-table article{opacity:.8}
/* 4.76: chữ thư pháp hai dòng "Kinh Dịch Hội / Huyền Chân Quán" cạnh logo (ảnh nền trong suốt) */
.brand-text{display:flex;flex-direction:column;align-items:flex-start}
.brand-wordmark{display:block;height:60px!important;width:auto!important;max-width:55vw}
.brand-text small{margin-top:0}
@media(max-width:700px){.brand-wordmark{height:46px!important}.brand-text small{display:none}}
/* 4.78: biểu tượng Facebook dẫn tới nhóm Kinh Dịch Hội */
.compact-image-wrap{position:relative}
.sheet-facebook-link{position:absolute;display:block;border-radius:6px}
.sheet-facebook-link:focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:2px}
.facebook-group{display:inline-flex;align-items:center;gap:8px;margin-top:6px;padding:8px 14px;border-radius:8px;background:#1877f2;color:#fff;text-decoration:none;font-weight:700;font-size:15px}
.facebook-group:hover{background:#1466d8}

/* 4.86: Lịch tháng Tụ Bảo Lâu */
.tbl-grid>strong small{display:block;font-size:12px;color:#9b241c;font-weight:normal}
.tbl-grid .tbl-date-cell{display:flex;flex-direction:column;gap:3px;align-items:stretch;padding:7px 6px!important;text-align:left;min-height:118px;background:#fffdf7!important}
.tbl-grid .tbl-date-cell.tbl-day-good{background:#fff8ea!important}
.tbl-grid .tbl-date-cell.selected{background:#fff0d6!important;box-shadow:inset 0 0 0 2px #9b241c}
.tbl-cell-top{display:flex;justify-content:space-between;align-items:baseline;gap:4px}
.tbl-cell-top b{font-size:22px;color:#28231e;display:inline}
.tbl-cell-top small{font-size:13px;color:#9b241c}
.tbl-cell-gz{font-size:17px;color:#2b2620;letter-spacing:1px}
.tbl-cell-vi{font-size:11px;color:#7d6f5a;line-height:1.3}
.tbl-cell-tags{display:flex;flex-wrap:wrap;gap:3px;margin-top:auto}
.tbl-cell-tags i{font-style:normal;font-size:13px;border:1px solid #b0362c;color:#9b241c;border-radius:3px;padding:0 3px;line-height:18px}
.tbl-cell-tags em{display:inline!important;font-style:normal;font-size:12px;line-height:18px;padding:0 3px;border-radius:3px}
.tbl-good-dot{color:#2e7d32;background:#e3f1dc}
.tbl-bad-dot{color:#c62828;background:#fbe4e1}
.calendar-legend .tbl-good-dot,.calendar-legend .tbl-bad-dot{padding:0 4px;border-radius:3px}
@media(max-width:700px){.tbl-grid .tbl-date-cell{min-height:96px;padding:5px 3px!important;gap:2px}.tbl-cell-top{flex-direction:column;gap:0}.tbl-cell-top b{font-size:17px}.tbl-cell-top small{font-size:10px}.tbl-cell-gz{font-size:13px;letter-spacing:0}.tbl-cell-vi{display:none}.tbl-cell-tags{gap:2px}.tbl-cell-tags i{font-size:11px;line-height:15px;padding:0 2px}.tbl-cell-tags em{font-size:9px;line-height:15px;padding:0 1px}}
/* v4.85: live, readable jade wordmark and supplied calendar artwork. */
.topbar .brand-text{color:#4a6337;letter-spacing:0;line-height:1.22;min-width:0}
.topbar .brand-name{font-family:"HCQ Viet",Georgia,'Times New Roman',serif;font-size:28px;font-weight:700;white-space:nowrap;letter-spacing:.3px}
.topbar .brand-subtitle{font-family:"HCQ Viet",Georgia,'Times New Roman',serif;font-size:17px;font-weight:400;font-style:italic;white-space:nowrap;margin-top:3px}
.topbar .brand-text small{color:#4a6337;letter-spacing:0;margin-top:4px}
.mode-tabs [data-destiny="days"] .tool-icon{object-fit:contain;background:#fff1cb}
@media(max-width:700px){.topbar .brand-name{font-size:clamp(17px,4.7vw,25px)}.topbar .brand-subtitle{font-size:clamp(12px,3.2vw,17px)}.topbar .brand{gap:8px}}

/* v4.86: retain the original calligraphy, change its ink color only. */
.topbar .original-wordmark{display:block;background:#4a6337;width:176px!important;height:60px!important;max-width:55vw;mask:url('../thuong-hieu-kdh-v477.webp') center/contain no-repeat;-webkit-mask:url('../thuong-hieu-kdh-v477.webp') center/contain no-repeat}
@media(max-width:700px){.topbar .original-wordmark{width:135px!important;height:46px!important}}

/* v4.88: calendar fills the same circular red rim as the other tools. */
.mode-tabs [data-destiny="days"] .tool-icon{object-fit:cover;object-position:56% 44%;border-radius:50%;border:2px solid #a32d29;background:#f8eed8;aspect-ratio:1;overflow:hidden}

/* v4.92: khối mời vào nhóm ngay dưới nút lập quẻ và nút lập lá số. Chữ thư pháp lấy đúng ảnh logo đầu trang. */
.group-invite{margin-top:16px;padding-top:14px;border-top:1px dashed #d9c79a;text-align:center}
.group-invite-link{display:inline-flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px 16px;text-decoration:none;color:inherit}
.group-wordmark{display:block;background:#4a6337;width:176px;height:60px;mask:url('../thuong-hieu-kdh-v477.webp') center/contain no-repeat;-webkit-mask:url('../thuong-hieu-kdh-v477.webp') center/contain no-repeat}
.group-invite .facebook-group{margin-top:0}
.group-invite-link:hover .facebook-group{background:#1466d8}
@media(max-width:700px){.group-invite-link{gap:8px 10px}.group-wordmark{width:132px;height:45px}.group-invite .facebook-group{padding:8px 12px}}


/* v4.98: allow readable fallback when image generation fails. */
@media print {.accessible-result[open]{display:block!important}}

/* v4.99: destiny sheets precede the input form. */
#destinyResult{scroll-margin-top:20px}
#destinyResult[hidden]{display:none!important}

/* v5.03: compact casting form, preserving touch target sizes. */
#castForm{max-width:560px;padding:14px 16px;margin-top:12px;margin-bottom:20px}
#castForm .form-title{padding-bottom:9px;margin-bottom:12px}
#castForm .form-title h2{font-size:24px;line-height:1.3}
#castForm>label{margin-bottom:4px}
#castForm input:not([type=checkbox]):not([type=radio]),#castForm select,#castForm textarea{padding:8px 10px;min-height:44px}
#castForm #question{min-height:44px;height:44px;margin-bottom:10px}
#castForm .date-caption{margin-bottom:5px}
#castForm .date-row,#castForm .clock-row{gap:8px;margin-bottom:8px}
#castForm .calendar-choice{gap:8px 14px;margin:9px 0}
#castForm .calendar-choice label{min-height:32px}
#castForm .form-actions{margin-top:12px;gap:8px}
#castForm .error:empty{margin:0}
#castForm .group-invite{margin-top:10px;padding-top:10px}
@media(max-width:700px){#castForm{padding:12px;margin-top:10px}#castForm .form-title h2{font-size:22px}}

/* v5.05: four traditional calculation tools. */
.mode-tabs [data-metaphysics][aria-selected=true]{background:var(--red);color:#fff0c9;border-color:var(--red)}
.met-result{max-width:900px;margin:0 auto 24px;padding:16px;background:#fffdf7;border:1px solid var(--line);border-radius:10px;scroll-margin-top:16px}
.met-result h2{margin-top:0;color:var(--red);font-size:23px}.met-result p{overflow-wrap:anywhere}
.met-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line)}
.met-grid article{min-width:0;padding:12px 8px;border:1px solid var(--line);text-align:center}.met-grid h3{font-size:14px;margin:0 0 8px;color:var(--red)}.met-grid p{font-size:13px;margin:6px 0}
.met-pair{display:flex;justify-content:space-around;gap:8px;font-size:12px}.met-pair b{display:block;font-size:25px;color:#4a6337}.met-number{font-size:32px;color:#4a6337}
.met-six{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.met-six span{padding:12px;border:1px solid var(--line);text-align:center}.met-six .selected{background:var(--red);color:#fff;font-weight:bold;border:3px double var(--gold)}
#metForm label{margin-top:12px}#metForm h2{font-size:23px}#metForm p,#metForm details,.tbl-source-note{font-size:14px}.tbl-source-note{margin-top:16px}.tbl-source-note summary{cursor:pointer;font-weight:bold;color:var(--red)}
@media(max-width:400px){.met-result{padding:10px}.met-grid article{padding:8px 4px}.met-grid p{font-size:11px}.met-grid h3{font-size:12px}.met-pair{gap:4px;font-size:10px}.met-pair b{font-size:23px}}
@media print{body.printing-metaphysics .topbar,body.printing-metaphysics .mode-tabs,body.printing-metaphysics #metForm,body.printing-metaphysics #metPrint{display:none!important}body.printing-metaphysics .met-result{display:block!important;border:0}body.printing-metaphysics .met-grid article{break-inside:avoid}}

/* Twelve tools keep equal widths without implicit mobile columns. */
.mode-tabs{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:auto;grid-auto-flow:row;grid-auto-columns:auto}
@media(max-width:700px){.mode-tabs{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:auto;grid-auto-flow:row}.mode-tabs button{overflow-wrap:anywhere}}

/* v5.06: tools grouped under Days. */
.mode-tabs{grid-template-columns:repeat(8,minmax(0,1fr))}
.met-hub-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:0 0 20px;overflow:visible}
.met-hub-nav button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;min-width:0;padding:10px 6px;border:1px solid var(--line);background:#fff9eb;color:#695a43;border-radius:6px;font-size:13px;line-height:1.4}
.met-hub-nav .tool-icon{width:40px;height:40px}.met-hub-nav [aria-selected=true]{background:var(--red);color:#fff0c9;border-color:var(--red)}
@media(max-width:700px){.mode-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}.met-hub-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.met-hub-nav button{font-size:13px}.met-hub-nav button:first-child{grid-column:1/-1;min-height:44px}}
@media print{.met-hub-nav{display:none!important}}

/* v5.07: sourced almanac lookups */
.almanac-table{overflow-x:auto;margin:12px 0}.almanac-table table{border-collapse:collapse;width:100%;font-size:15px}.almanac-table th,.almanac-table td{padding:10px 12px;border-bottom:1px solid #d5c9ae;text-align:left;vertical-align:top}.almanac-table th{color:#74502c;background:#f9f1da}.almanac-day,.almanac-guide{padding:14px;margin:12px 0;border:1px solid #d9cba7;border-radius:12px;background:#fffcf4}.almanac-day>summary,.almanac-guide>summary{cursor:pointer;font-weight:700;min-height:44px;padding:10px 0}.almanac-note{padding:14px;background:#f5efdf;border-left:4px solid #98754b}.met-hub-nav button[data-almanac]{min-height:52px;padding:12px}.almanac-table td:first-child{min-width:110px}@media(max-width:560px){.almanac-table th,.almanac-table td{padding:8px;font-size:14px}.almanac-day,.almanac-guide{padding:10px}}
@media print{body.printing-metaphysics .almanac-guide,body.printing-metaphysics .met-hub-nav,body.printing-metaphysics #almanacPrint{display:none!important}.almanac-table{overflow:visible}.almanac-table tr{break-inside:avoid}.almanac-day{border:0;border-radius:0}}

/* v5.08: explicit Vietnamese date/time controls for the bereavement form. */
#metForm .almanac-datetime{margin:14px 0 10px;padding:12px;border:1px solid #d9cba7;border-radius:10px;min-width:0}#metForm .almanac-datetime legend{font-size:15px;padding:0 5px;font-weight:700}#metForm .almanac-date-row{display:grid;grid-template-columns:1fr 1fr 1.35fr;gap:6px 10px}#metForm .almanac-time-row{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;max-width:260px;margin-top:12px}#metForm .almanac-datetime label{margin:0;font-size:14px}#metForm .almanac-datetime select{width:100%;min-width:0;min-height:44px;margin:0;padding:8px;font-size:16px}#metForm .almanac-datetime select:focus-visible{outline:2px solid var(--ds-brand,#4a6337);outline-offset:2px}@media(max-width:400px){#metForm .almanac-datetime{padding:10px 8px}#metForm .almanac-date-row{gap:6px}#metForm .almanac-datetime legend{font-size:14px}}

/* v5.09: explanations below each calculate button. */
.method-guide{max-width:900px;margin:18px auto;padding:14px 16px;border:1px solid #d9cba7;border-radius:10px;background:#fffdf5;color:#443c2e;font-size:15px;line-height:1.7}.method-guide h3{margin:0 0 6px;font-size:19px;color:#812d27}.method-guide-intro{color:#746448;margin:6px 0 12px}.method-guide summary{cursor:pointer;font-weight:700;min-height:44px;padding:8px 0}.method-guide ol{padding-left:23px}.method-guide li{margin:10px 0}.method-guide p{margin:10px 0}.method-guide a{color:#812d27;text-decoration:underline}.method-guide-status{font-size:13px;color:#746448;border-top:1px solid #e1d5bd;padding-top:10px}.method-guide details details{border-top:1px dashed #ddcba9;margin-top:12px}#metForm .method-guide{padding:12px;margin-top:16px}#metForm .method-guide p{font-size:15px}@media(max-width:400px){.method-guide{padding:12px 10px;font-size:14px}.method-guide h3{font-size:18px}#metForm .method-guide{padding:10px}#metForm .method-guide p{font-size:14px}}@media print{.method-guide,#calendarMethodGuide{display:none!important}}

/* v5.10: consistent icon size for every Days tool. */
.met-hub-nav .tool-icon{display:block;flex-shrink:0;object-fit:contain}.met-hub-nav button[data-almanac]{padding:10px 6px}

/* v5.11: equal activity and birth-year controls. */
#calendarFilters>.row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:end}#calendarFilters>.row>label{display:flex;flex-direction:column;gap:7px;min-width:0;margin:0;font-size:15px;line-height:1.5}#calendarFilters #calendarActivity,#calendarFilters #calendarBirthYear{display:block;box-sizing:border-box;width:100%;min-width:0;height:46px;min-height:46px;margin:0;padding:9px 12px;font-family:inherit;font-size:16px;line-height:1.4;border:1px solid #ccc4ad;border-radius:10px;background:#fffaf2}#calendarFilters>.calendar-activity-help{margin:10px 0;color:#6d5b3e}@media(max-width:560px){#calendarFilters>.row{grid-template-columns:1fr;gap:12px}#calendarFilters{padding:12px}#calendarFilters>.row>label{font-size:14px}}

/* v5.12: house orientation and position fields remain visually separate. */
.house-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;align-items:end}.house-fields>label{display:flex;flex-direction:column;gap:6px;min-width:0}#metForm .house-fields input,#metForm .house-fields select{width:100%;min-width:0;min-height:44px;box-sizing:border-box;margin:0;font-size:16px}.house-fieldset{padding:12px;margin:16px 0;border:1px solid #d9cba7;border-radius:10px;min-width:0}.house-fieldset legend{font-size:15px;font-weight:700;padding:0 5px}.house-star{font-weight:700}.house-favorable{color:#445635}.house-unfavorable{color:#9b2d26}#houseExample{display:block;margin-top:10px}@media(max-width:560px){.house-fields{grid-template-columns:1fr}.house-fieldset{padding:10px}}@media print{#housePrint{display:none!important}}

/* 9.82 · Bảng bài ca Tiểu Lục Nhâm */
.lnh-ca{border-collapse:collapse;margin:6px 0 10px;font-size:14px}.lnh-ca td{padding:3px 12px 3px 0;vertical-align:top}.lnh-ca td:first-child{font-size:16px;color:#4a6337;white-space:nowrap}.lnh-ghi{font-size:12.5px;color:#5a4e3e}

/* qimen.css */
/* Không ảnh hưởng màu và bố cục của các phương pháp khác. */
.qm-app{--qm-bg:var(--hcq-c07131f,#07131f);--qm-panel:#102231;--qm-line:#38505a;--qm-gold:var(--hcq-cdfc78a,#dfc78a);--qm-text:#edf1e8;--qm-muted:#b3c4c8;--qm-jade:var(--hcq-c87d0ba,#aac097);background:radial-gradient(ellipse at 50% 35%,#153b40 0,transparent 48%),var(--qm-bg);color:var(--qm-text);border:1px solid var(--qm-line);border-radius:16px;padding:24px;font-size:14px;line-height:1.6;color-scheme:dark;max-width:1600px;margin:12px auto;text-align:left}
.qm-app *{box-sizing:border-box}.qm-app button,.qm-app input,.qm-app select{font:inherit}.qm-app h2,.qm-app h3,.qm-app h4,.qm-app p{margin:0}.qm-app h2{font-size:30px;color:var(--qm-gold);line-height:1.3}.qm-app h3{font-size:18px;color:var(--qm-gold)}.qm-app h4{font-size:15px;color:var(--qm-jade);margin-top:16px}.qm-eyebrow{display:block;font-size:10px;letter-spacing:1.8px;color:var(--qm-muted)}.qm-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--qm-line);padding-bottom:18px;margin-bottom:20px}.qm-heading p{color:var(--qm-muted);font-size:12px;margin-top:5px}.qm-app .qm-calm{display:flex;align-items:center;gap:8px;width:auto;white-space:nowrap;border:1px solid var(--qm-line);border-radius:24px;padding:8px 12px}.qm-calm input{width:16px!important;height:16px!important;min-height:0!important}.qm-layout{display:grid;grid-template-columns:minmax(215px,.8fr) minmax(360px,1.8fr) minmax(235px,.95fr);gap:20px;align-items:start}.qm-card{background:linear-gradient(135deg,#112736,#0d1c2a);border:1px solid var(--qm-line);padding:18px;border-radius:4px;position:relative}.qm-card:before,.qm-card:after{content:'';position:absolute;width:15px;height:15px;pointer-events:none;border-color:var(--qm-gold);opacity:.6}.qm-card:before{top:4px;left:4px;border-left:1px solid;border-top:1px solid}.qm-card:after{bottom:4px;right:4px;border-right:1px solid;border-bottom:1px solid}.qm-settings{display:flex;flex-direction:column;gap:12px;margin:0;max-width:none;width:100%;box-shadow:none}.qm-app label{display:flex;flex-direction:column;gap:4px;margin:0;color:var(--qm-muted);font-size:12px;min-width:0}.qm-app label[hidden]{display:none}.qm-app input,.qm-app select{width:100%;height:40px;min-height:40px;padding:7px 9px;border:1px solid #506674;border-radius:4px;background:#081724;color:var(--qm-text);margin:0;max-width:100%;font-size:13px}.qm-app input[type=checkbox]{width:30px;height:18px;min-height:18px;accent-color:var(--hcq-c87d0ba,#aac097);cursor:pointer}.qm-input-row{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:8px}.qm-zone{font-size:12px;color:var(--qm-jade)}.qm-app button{cursor:pointer;border:1px solid #536b76;border-radius:4px;background:#172e3f;color:var(--qm-text);padding:8px 12px;min-height:40px;margin:0;line-height:1.4;box-shadow:none;text-shadow:none}.qm-app button:hover{border-color:var(--qm-gold);background:#213d4a}.qm-app :focus-visible{outline:3px solid var(--qm-jade);outline-offset:3px}.qm-app .qm-primary{background:linear-gradient(135deg,#e4d5a7,#a78949);color:#14232a;border:1px solid #f6df9b;box-shadow:inset 0 0 0 3px #bda36c;font-weight:700;letter-spacing:1px;min-height:48px}.qm-app .qm-primary:hover{background:#ead39a;color:var(--hcq-c07131f,#07131f)}.qm-app .qm-secondary{background:transparent;color:var(--qm-jade);font-size:12px}.qm-section-heading{display:flex;align-items:center;justify-content:space-between;gap:4px;border-top:1px solid var(--qm-line);padding-top:10px}.qm-section-heading h3{font-size:15px}.qm-app .qm-link{border:none;background:transparent;color:var(--qm-gold);padding:4px;font-size:11px}.qm-switches{display:grid;grid-template-columns:1fr 1fr;gap:12px 10px}.qm-app .qm-switches label{display:flex;flex-direction:row;align-items:center;justify-content:space-between;color:var(--qm-text);font-size:11px;gap:4px}.qm-app .qm-hint{color:var(--qm-muted);font-size:11px;line-height:1.7}.qm-error{color:var(--hcq-cffb6a5,#ffb6a5);font-size:12px;overflow-wrap:anywhere}.qm-error:empty{display:none}.qm-workspace{min-width:0;padding-top:2px}.qm-datetime{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12px;margin-bottom:8px}.qm-datetime span{font-size:11px;color:var(--qm-muted)}.qm-pillars{display:grid;grid-template-columns:repeat(4,1fr);padding:10px 4px;background:#102534;border:1px solid var(--qm-line);border-radius:4px}.qm-pillars>div{display:flex;flex-direction:column;text-align:center;border-right:1px solid var(--qm-line)}.qm-pillars>div:last-child{border:0}.qm-pillars small{color:var(--qm-muted);font-size:10px}.qm-pillars strong{font-size:18px;color:var(--qm-gold)}.qm-ju{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;border:1px solid var(--qm-line);border-radius:3px;padding:5px;margin-top:6px!important;font-size:11px}.qm-ju b{color:var(--qm-gold)}.qm-conventions{text-align:center;font-size:10px;color:var(--qm-muted);margin-top:5px!important}.qm-orbit{padding:34px 24px;position:relative;margin:8px 0}.qm-orbit:before{content:'';position:absolute;inset:16px 6px;border:1px solid #9a8b534a;border-radius:50%;pointer-events:none}.qm-orbit:after{content:'';position:absolute;inset:0 20px;border:1px solid #9a8b5338;border-radius:50%;pointer-events:none;transform:rotate(-30deg)}.qm-compass{position:absolute;left:0;width:100%;text-align:center;color:var(--qm-gold);font-size:10px;letter-spacing:4px}.qm-south{top:4px}.qm-north{bottom:4px}.qm-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--hcq-ca99d6c,#a99d6c);border-left:1px solid var(--hcq-ca99d6c,#a99d6c);position:relative;z-index:1}.qm-app .qm-palace{display:flex;flex-direction:column;text-align:left;position:relative;padding:8px;border-radius:0;border:none;border-right:1px solid var(--hcq-ca99d6c,#a99d6c);border-bottom:1px solid var(--hcq-ca99d6c,#a99d6c);background:#122b36;min-height:164px;min-width:0;width:100%;gap:2px;color:var(--qm-text);font-weight:400;justify-content:flex-start}.qm-app .qm-palace:hover{background:#1e4047}.qm-app .qm-selected{background:#27464a;outline:2px solid var(--qm-gold);outline-offset:-3px;box-shadow:inset 0 0 22px #d8c77c14}.qm-palace-top{display:flex;justify-content:space-between;gap:4px;font-size:10px;color:var(--qm-muted);width:100%}.qm-palace-top>span:last-child{color:var(--qm-gold)}.qm-palace-badges{display:flex;flex-wrap:wrap;gap:3px;font-size:8px;min-height:16px;color:var(--qm-jade);width:100%}.qm-palace-badges>span{border:1px solid #8a9c7b77;border-radius:3px;padding:0 2px}.qm-god{font-size:11px;color:var(--qm-muted)}.qm-star{font-size:13px;line-height:1.3;letter-spacing:0}.qm-door{font-size:17px;color:var(--qm-gold);line-height:1.5}.qm-can-line{display:flex;gap:4px;align-items:baseline;justify-content:space-between;font-size:11px;width:100%;line-height:1.6}.qm-can-line small{font-size:9px;color:var(--qm-muted)}.qm-can-line i{font-size:8px;color:var(--qm-jade);font-style:normal}.qm-center{align-items:center;justify-content:center!important;background:radial-gradient(circle,#203e45,#0b2533)!important}.qm-center .qm-palace-top{position:absolute;top:8px;left:8px;width:calc(100% - 16px)}.qm-center-number{font-size:36px;color:var(--qm-gold);font-weight:400;line-height:1}.qm-center-stem{font-size:22px;color:var(--qm-gold)}.qm-center small{font-size:9px;color:var(--qm-muted)}.qm-hour-nav{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px}.qm-hour-nav>span{text-align:center;display:flex;flex-direction:column;min-width:80px}.qm-hour-nav strong{font-size:14px;color:var(--qm-gold)}.qm-hour-nav small{font-size:9px;color:var(--qm-muted)}.qm-hour-nav button{font-size:12px}.qm-markers{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;margin:12px 0;font-size:10px}.qm-markers>span{border:1px solid var(--qm-line);padding:3px 6px;border-radius:3px}.qm-markers b{color:var(--qm-gold);padding-left:4px}.qm-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.qm-actions button{font-size:11px}.qm-status{font-size:10px;color:var(--qm-muted);text-align:center;min-height:32px;margin-top:10px!important}.qm-detail{min-width:0}.qm-detail>h3{font-size:28px;letter-spacing:3px;margin:10px 0}.qm-detail>p{color:var(--qm-muted);font-size:12px}.qm-detail-tabs{display:flex;gap:8px;margin:18px 0 8px;border-bottom:1px solid var(--qm-line)}.qm-app .qm-detail-tabs button{border:0;background:transparent;border-bottom:2px solid transparent;font-size:11px;border-radius:0;color:var(--qm-muted);padding:8px 0;flex:1}.qm-app .qm-detail-tabs button[aria-pressed=true]{border-bottom-color:var(--qm-gold);color:var(--qm-gold)}.qm-detail-body{max-height:650px;overflow-y:auto;scrollbar-width:thin;padding:0 3px 0 0;overscroll-behavior:contain}.qm-facts{margin:0}.qm-facts>div{display:grid;grid-template-columns:60px 1fr;gap:8px;padding:12px 0;border-bottom:1px solid var(--qm-line);align-items:baseline}.qm-facts dt{font-size:11px;color:var(--qm-muted)}.qm-facts dd{font-size:13px;margin:0;text-align:right}.qm-facts dd>span{display:block}.qm-facts small{display:block;color:var(--qm-muted);font-size:10px}.qm-tag{font-size:9px;border:1px solid var(--qm-gold);padding:1px 3px;color:var(--qm-gold);display:inline-block}.qm-extension{border-bottom:1px solid var(--qm-line);padding:10px 0}.qm-extension summary{cursor:pointer;font-size:13px;color:var(--qm-gold);line-height:1.7}.qm-extension summary small{font-size:9px;color:var(--qm-muted);float:right}.qm-extension>p{font-size:12px;margin:8px 0}.qm-annotations{list-style:none;margin:8px 0;padding:0}.qm-annotations li{display:flex;flex-direction:column;padding:7px 0;border-bottom:1px dashed #36505b;font-size:11px;gap:3px}.qm-annotations b{color:var(--qm-jade);font-size:11px;font-weight:400}.qm-annotations em{color:#f5bd98;font-style:normal}.qm-table-wrap{overflow-x:auto}.qm-app table{border-collapse:collapse;width:100%;margin:10px 0;font-size:10px}.qm-app th,.qm-app td{padding:5px 3px;border-bottom:1px solid var(--qm-line);color:var(--qm-text);background:transparent;text-align:left;white-space:normal}.qm-app th{color:var(--qm-muted)}.qm-guide{margin-top:18px;border-top:1px solid var(--qm-line);padding-top:12px}.qm-guide summary{cursor:pointer;color:var(--qm-gold);font-size:14px;min-height:36px}.qm-guide-content{max-width:960px;padding:12px 8px;color:var(--qm-text);font-size:13px}.qm-guide-content p{margin:10px 0;line-height:1.8}.qm-guide-content ol{padding-left:24px}.qm-app a{color:var(--qm-jade)}.qm-motion .qm-orbit:after{animation:qm-orbit-pulse 6s ease-in-out infinite}@keyframes qm-orbit-pulse{50%{opacity:.3}}@media(prefers-reduced-motion:reduce){.qm-motion .qm-orbit:after{animation:none}}
@media(max-width:1200px){.qm-app{padding:16px}.qm-layout{grid-template-columns:minmax(205px,.75fr) minmax(345px,1.5fr);gap:16px}.qm-detail{grid-column:1/-1}.qm-detail-body{max-height:none}.qm-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px}.qm-detail-tabs{max-width:400px}.qm-orbit{padding:34px 12px}.qm-palace-badges{font-size:8px}}
@media(max-width:700px){.qm-app{padding:14px 10px;border-radius:8px;margin:8px 0}.qm-heading{align-items:flex-start;gap:6px}.qm-app h2{font-size:24px}.qm-eyebrow{font-size:8px;letter-spacing:1px}.qm-app .qm-calm{padding:5px 6px;font-size:10px}.qm-layout{grid-template-columns:minmax(0,1fr)}.qm-settings{padding:14px}.qm-input-row{grid-template-columns:1.3fr 1fr}.qm-switches{grid-template-columns:repeat(2,minmax(0,1fr))}.qm-app .qm-switches label{font-size:12px}.qm-app .qm-palace{min-height:164px;padding:6px;gap:2px}.qm-palace-top{font-size:9px}.qm-star{font-size:11px}.qm-door{font-size:15px}.qm-god{font-size:10px}.qm-can-line{font-size:10px}.qm-orbit{padding:30px 0}.qm-orbit:before{inset:10px 0}.qm-orbit:after{inset:2px 4px}.qm-facts{display:block}.qm-pillars strong{font-size:16px}.qm-detail{grid-column:auto}.qm-hour-nav{gap:5px}.qm-hour-nav button{padding:8px 4px;font-size:11px}.qm-detail-body{max-height:none}.qm-palace-badges{font-size:7px}.qm-center .qm-palace-top{left:6px;top:6px;width:calc(100% - 12px)}}
@media print{body.printing-qimen{background:white!important}body.printing-qimen #ichingPanel,body.printing-qimen header,body.printing-qimen footer,body.printing-qimen .met-hub-nav,body.printing-qimen #destinyForm,body.printing-qimen .qm-settings,body.printing-qimen .qm-heading,body.printing-qimen .qm-actions,body.printing-qimen .qm-hour-nav,body.printing-qimen .qm-guide,body.printing-qimen .qm-status{display:none!important}body.printing-qimen .qm-app{--qm-text:#111;--qm-muted:#444;--qm-gold:#55401a;--qm-jade:#364b24;--qm-line:#777;background:white!important;color:#111;padding:5px;border:0}body.printing-qimen .qm-layout{display:block}body.printing-qimen .qm-workspace{max-width:680px;margin:auto}body.printing-qimen .qm-palace,body.printing-qimen .qm-pillars,body.printing-qimen .qm-card{background:white!important;color:#111}body.printing-qimen .qm-detail{break-before:page}body.printing-qimen .qm-detail-body{max-height:none;overflow:visible}body.printing-qimen .qm-detail-tabs{display:none}body.printing-qimen .qm-orbit:before,body.printing-qimen .qm-orbit:after{display:none}}

.qm-leaders{text-align:center;font-size:11px;color:var(--qm-muted);margin-top:6px!important}.qm-leaders b{color:var(--qm-gold);font-weight:400}.qm-app .qm-calm{flex-direction:row}.qm-settings .qm-switches input{flex-shrink:0}

.qm-export{font-size:11px;border:1px solid var(--qm-line);border-radius:4px;padding:10px;margin-top:10px}.qm-export[hidden]{display:none}.qm-export summary{cursor:pointer;color:var(--qm-gold)}.qm-export textarea{width:100%;margin-top:6px;background:var(--hcq-c07131f,#07131f);color:var(--qm-text);border:1px solid var(--qm-line);padding:8px;font:11px monospace;resize:vertical}.qm-export a{display:inline-block;margin-top:8px}.qm-export a[hidden]{display:none}@media print{.qm-export{display:none!important}}

/* 9.83 · Tên cách khắc ứng và cát hung trong ô cung */
.qm-cach{display:block;margin-top:4px;font-size:11.5px;line-height:1.3;color:#4a3f30}.qm-cach b{display:block;font-size:11px}.qm-cach.qm-tot b{color:#2e7d32}.qm-cach.qm-xau b{color:#c62828}.qm-cach.qm-binh b{color:#a87a12}
.qm-khac-ung{margin:0 0 12px;padding:10px 12px;border-radius:12px;background:#fbf9f5;box-shadow:inset 0 0 0 1px #e3d9c3}.qm-khac-ung h4{margin:0 0 6px;font-size:15px;color:#4a6337}.qm-khac-ung ul{margin:0;padding-left:18px}.qm-khac-ung li{margin:3px 0;line-height:1.5}

/* 9.84 · Khung luận theo việc */
.qm-luan{margin-top:14px;padding:14px 16px}.qm-luan h3{margin:0 0 8px}.qm-luan h4{margin:12px 0 4px;color:#4a6337;font-size:15px}.qm-luan ul{margin:0;padding-left:20px}.qm-luan li{margin:3px 0;line-height:1.55}.qm-luan label{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.qm-luan select{font:inherit;padding:4px 8px;max-width:100%;min-width:0}
/* 9.85 · Quân thấy ô năm lòi ra ngoài khung Thời điểm khởi cục. Ô ngày giờ đã đổi thành ba ô chọn (ngày, tháng, năm) và hai ô (giờ, phút),
   đặt cạnh nhau thì không đủ chỗ: ngày một hàng, giờ một hàng, mỗi hàng rộng hết khung. */
.qm-settings .qm-input-row{grid-template-columns:minmax(0,1fr)!important}

/* workbench.css */
:root{--wb-ink:#36412d;--wb-gold:#b18a43;--wb-line:#d7ccaf;--wb-paper:#fffdf4}.wb-panel{background:var(--wb-paper);border:1px solid var(--wb-line);border-radius:12px;padding:20px;margin:20px 0;color:var(--hcq-c292d27,#292d27);text-align:left}.wb-panel h2,.wb-panel h3{color:var(--wb-ink);margin:0 0 12px}.wb-panel p{line-height:1.7;margin:10px 0}.wb-panel label,.wb-form label,.wb-dialog label{display:flex;flex-direction:column;gap:6px;font-size:14px;margin:10px 0}.wb-panel input,.wb-panel select,.wb-panel textarea,.wb-form input,.wb-form select,.wb-form textarea,.wb-dialog input,.wb-dialog select,.wb-dialog textarea{width:100%;max-width:100%;min-width:0;min-height:42px;padding:8px 10px;border:1px solid var(--wb-line);border-radius:6px;background:var(--hcq-cfffef9,#fffef9);color:var(--hcq-c292d27,#292d27);font:inherit}.wb-panel button,.wb-dialog button{min-height:42px;padding:8px 12px;border:1px solid var(--wb-line);border-radius:6px;background:#f8f2df;color:var(--wb-ink);font:inherit;cursor:pointer}.wb-panel button:hover,.wb-dialog button:hover{border-color:var(--wb-gold)}.wb-panel button[aria-pressed=true]{background:var(--wb-ink);color:white}.wb-panel :focus-visible,.wb-dialog :focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:3px}.wb-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.wb-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.wb-line-buttons{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0}.wb-line-buttons button{flex:1;white-space:nowrap}.wb-facts{display:grid;grid-template-columns:120px 1fr;gap:10px 16px}.wb-facts dt{font-weight:700;color:var(--wb-ink)}.wb-facts dd{margin:0;line-height:1.7}.wb-panel blockquote{border-left:3px solid var(--wb-gold);padding:12px 16px;margin:16px 0;background:var(--hcq-cfaf6e8,#faf6e8);font-size:19px}.wb-dialog{width:min(850px,calc(100vw - 24px));max-height:90vh;border:1px solid var(--wb-line);border-radius:12px;padding:20px;color:var(--hcq-c292d27,#292d27);background:var(--wb-paper)}.wb-dialog::backdrop{background:#21271c66}.wb-dialog .error{color:#9a2b22}.wb-record{padding:16px 0;border-bottom:1px solid var(--wb-line)}.wb-form[hidden],.wb-panel[hidden]{display:none}.wb-form{max-width:620px}.wb-note{font-size:12px;color:#5e6055}.wb-panel .wb-scroll{overflow-x:auto}.wb-panel table{width:100%;border-collapse:collapse;font-size:13px}.wb-panel td,.wb-panel th{border-bottom:1px solid var(--wb-line);padding:8px;text-align:left}.wb-profile{padding:10px;background:#f7f2e3;border:1px solid var(--wb-line);border-radius:6px;margin:12px 0;font-size:12px}.wb-profile summary{cursor:pointer;font-weight:700}.wb-profile select,.wb-profile input{width:100%;min-height:36px;font-size:12px}.wb-profile button{font-size:12px;min-height:36px;margin:4px}.wb-profile p{font-size:12px}.wb-profile .error{color:#a12b21}@media(max-width:600px){.wb-panel{padding:14px}.wb-facts{grid-template-columns:1fr;gap:4px}.wb-facts dd{margin-bottom:10px}.wb-dialog{padding:12px}.wb-line-buttons button{flex:0 1 calc(33.33% - 6px);font-size:12px}.topbar{flex-wrap:wrap}.wb-fields{grid-template-columns:1fr 1fr}}@media print{.wb-profile,.wb-panel button{display:none}.wb-panel{break-inside:avoid}}

.wb-checks{display:flex;gap:14px;flex-wrap:wrap}.wb-checks label{display:flex;flex-direction:row;align-items:center;font-size:13px}.wb-checks input{width:18px;min-height:18px;accent-color:var(--wb-ink)}.wb-zi-map{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(4,minmax(135px,1fr));position:relative;max-width:900px;margin:16px auto;border-top:1px solid var(--wb-line);border-left:1px solid var(--wb-line)}.wb-panel .wb-zi-palace{display:flex;flex-direction:column;text-align:left;gap:6px;justify-content:flex-start;border-radius:0;background:#fffef7;border-right:1px solid var(--wb-line);border-bottom:1px solid var(--wb-line);border-left:0;border-top:0;z-index:1;font-size:13px;overflow-wrap:anywhere}.wb-zi-palace small{font-size:10px;color:#686858}.wb-panel .wb-zi-linked{background:#f2f0d7}.wb-panel .wb-zi-palace[aria-pressed=true]{background:#dfe4da;color:#28351c;outline:2px solid #516540;outline-offset:-3px}.wb-zi-palace em{font-size:12px;color:#8e381d;font-style:normal}.wb-zi-center{grid-column:2/4;grid-row:2/4;align-self:center;text-align:center;padding:12px;color:var(--wb-ink)}.wb-zi-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2;opacity:.45}.wb-zi-lines line{stroke:#a07b2f;stroke-width:1;stroke-dasharray:5 4}.wb-star-list{display:flex;flex-wrap:wrap;gap:8px}.wb-star-list span{padding:5px 8px;border:1px solid var(--wb-line);border-radius:4px;font-size:13px}.wb-luck,.wb-months{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:16px 0}.wb-luck button,.wb-months button{display:flex;flex-direction:column;gap:4px}.wb-luck small,.wb-months small{font-size:11px}.wb-luck button{font-size:13px}@media(max-width:600px){.wb-zi-map{grid-template-rows:repeat(4,minmax(120px,1fr))}.wb-panel .wb-zi-palace{padding:6px;font-size:10px;gap:4px}.wb-zi-palace small{font-size:9px}.wb-zi-center{font-size:12px;padding:8px}.wb-luck,.wb-months{grid-template-columns:repeat(2,minmax(0,1fr))}}

.fp-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px}.fp-controls{padding:12px;background:var(--hcq-cfaf6e8,#faf6e8);border:1px solid var(--wb-line);border-radius:8px}.fp-controls label{font-size:12px}.fp-controls button{font-size:12px;padding:7px 9px}.fp-controls details{margin:14px 0}.fp-controls summary{cursor:pointer;color:var(--wb-ink);font-weight:700}.fp-work{min-width:0}.fp-scroll{overflow:auto;max-height:760px;border:1px solid var(--wb-line);background:#eeeadd}.fp-scroll svg{width:100%;height:auto;display:block;cursor:crosshair}.fp-empty{padding:80px 20px;text-align:center}.fp-app #fpDownload{display:block;padding:10px;overflow-wrap:anywhere}.fp-app #fpDownload[hidden]{display:none}#fpReport{border-top:2px solid var(--wb-gold);padding-top:20px;margin-top:20px}#fpReport svg{width:100%;height:auto;max-height:900px}@media(max-width:850px){.fp-layout{grid-template-columns:1fr}.fp-controls{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px}.fp-controls .wb-fields,.fp-controls details,.fp-controls .wb-toolbar,.fp-controls #fpDownload{grid-column:1/-1}.fp-scroll{max-height:650px}}@media print{body.printing-floorplan *{visibility:hidden}body.printing-floorplan #fpReport,body.printing-floorplan #fpReport *{visibility:visible}body.printing-floorplan #fpReport{position:absolute;left:0;top:0;width:100%;background:white}body.printing-floorplan #fpReport button{display:none}}

.wb-compare-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin:20px 0}.wb-compare-cards>article{border:1px solid var(--wb-line);padding:14px;border-radius:6px;min-width:0}.wb-compare-cards h4{color:var(--wb-ink);border-top:1px solid var(--wb-line);padding-top:10px}.wb-panel #dateCompareRows input[type=checkbox]{width:18px;min-height:18px}#dateCompareRows td{min-width:90px}

.qm-app .wb-profile{background:#0b1e2a;color:#e4eadf;border-color:#45616b}.qm-app .wb-profile summary{color:var(--hcq-cdfc78a,#dfc78a)}.qm-app .wb-profile .error{color:var(--hcq-cffb6a5,#ffb6a5)}

/* brand.css */
/* Dấu chìm là nhận diện nhẹ, không phải dữ liệu tính toán. */
.hqq-branded-sheet{position:relative;isolation:isolate}
.hqq-branded-sheet::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:2;background:url('../logo-wm.webp') center 140px/min(58%,380px) auto no-repeat;opacity:.045;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.hqq-sheet-brand{display:flex;align-items:center;gap:12px;padding:12px 0;margin-bottom:16px;border-bottom:1px solid #b3915466;color:#4a6337;break-inside:avoid}
.hqq-sheet-brand img{width:48px;height:48px;object-fit:contain;border-radius:50%;flex-shrink:0}
.hqq-sheet-brand strong{display:block;font:700 15px/1.5 Arial,sans-serif;letter-spacing:.5px}
.hqq-sheet-brand a{display:block;font:12px/1.5 Arial,sans-serif;color:inherit;text-decoration:none}
.qm-app .hqq-sheet-brand{color:#e3d0a0;border-color:#c5a96655}
@media(max-width:480px){.hqq-sheet-brand{gap:8px}.hqq-sheet-brand strong{font-size:13px}.hqq-sheet-brand img{width:40px;height:40px}}
@media print{.hqq-sheet-brand,.qm-app .hqq-sheet-brand{display:flex!important;color:#4a6337!important}.hqq-sheet-brand img{display:block!important}.hqq-branded-sheet::after{opacity:.045!important}}
/* 6.10 · Hai câu thơ thư pháp trên header máy tính: Thiệu Khang Tiết, Quan Dịch ngâm. Phông cắt gọn, giấy phép OFL trong fonts/. */
@font-face{font-family:"HCQ Tho";src:url("../fonts/charm-tho.woff2") format("woff2");font-display:swap}@font-face{font-family:"HCQ Brush";src:url("../fonts/brush-tho.woff2") format("woff2");font-display:swap}
@font-face{font-family:"HCQ Han";src:url("../fonts/han-tho.woff2") format("woff2");font-display:swap}
.header-poem{display:none}
@media(min-width:1100px){.topbar{position:relative}.header-poem{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:22px;pointer-events:none;color:#4a6337;white-space:nowrap}.header-poem .poem-viet{display:flex;flex-direction:column;font:400 31px/1.12 "HCQ Brush","HCQ Tho","HCQ Viet",Georgia,serif;letter-spacing:.3px;-webkit-text-stroke:.45px #4a6337}.header-poem .poem-viet span:last-of-type{padding-left:2.2em}.header-poem .poem-viet small{align-self:flex-end;font:700 13px/1.3 "HCQ Tho",serif;color:#8a6d3b;letter-spacing:.4px;margin-top:2px}.header-poem .poem-han{display:flex;flex-direction:row-reverse;gap:5px;font:700 12px/1 "HCQ Han",serif;color:#9a7b45;padding-left:16px;border-left:1px solid #d9c9a0;height:84px;align-items:center}.header-poem .poem-han span{writing-mode:vertical-rl;letter-spacing:1px}}
@media print{.header-poem{display:none!important}}
/* 6.15 · Hai câu thơ là ảnh SVG vẽ từ font HL Ông Đồ; chữ thật ẩn đi nhưng vẫn còn cho Google và máy đọc. */
.header-poem .poem-viet span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.header-poem .poem-art{display:block;height:84px;width:auto}
.header-poem .poem-viet small{margin-top:-10px}
/* 6.17 · Câu thơ viết bằng font Fz Thư pháp Đại tự (Thái Hiếu, fontzin.com) theo ảnh Quân gửi; ảnh WebP nét gấp đôi (đường nét font rất chi tiết, SVG nặng 460KB). */

/* refinement.css */
/* 5.17: tinh chỉnh lớp trình bày, giữ nguyên lịch và quy tắc. */
:root{--hqq-ink:#2a3520;--hqq-muted:#58645b;--hqq-line:#d7d9cd;--hqq-gold:#aa884d;--hqq-surface:#fffef9;--hqq-soft:#f4f5ee;--wb-ink:var(--hqq-ink);--wb-line:var(--hqq-line);--wb-paper:var(--hqq-surface)}
.paper:has(#destinyTools:not([hidden])){max-width:1540px;width:calc(100% - 40px);padding:24px}
.met-hub-nav{gap:8px;margin-bottom:24px;padding-bottom:20px;border-bottom:1px solid var(--hqq-line)}
.met-hub-nav button,.met-hub-nav button[data-almanac]{flex-direction:row;justify-content:flex-start;gap:10px;min-height:64px;padding:12px;border-radius:6px;background:#fffef8;border-color:var(--hqq-line);color:var(--hqq-ink);font-size:13px;font-weight:500;box-shadow:none;text-shadow:none;transition:background .15s,border-color .15s}
.met-hub-nav .tool-icon{width:30px;height:30px}.met-hub-nav [aria-selected=true]{background:#eceeea;color:#314123;border-color:#647456;box-shadow:inset 0 -2px #647456}.met-hub-nav button:hover{background:#f1f4eb;border-color:#969f8f}
.wb-panel,.met-result{background:var(--hqq-surface);color:#2d3228;border:1px solid var(--hqq-line);border-radius:8px;padding:24px;box-shadow:0 2px 12px #2f362810;margin:20px 0;max-width:none;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:1.65}
.wb-panel h2,.met-result h2{font-size:23px;line-height:1.4;font-weight:600;color:var(--hqq-ink);letter-spacing:-.3px;margin:0 0 16px}.wb-panel h3,.met-result h3{font-size:17px;line-height:1.45;font-weight:600;color:var(--hqq-ink)}.wb-panel p{line-height:1.75}.wb-note{color:var(--hqq-muted)}
:is(.wb-panel,.wb-form,.wb-dialog,#destinyForm,#metForm) :is(input,select,textarea){box-sizing:border-box;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:1.4;border:1px solid #bfcbbf;border-radius:5px;background:#fffefb;color:#2d3228;min-height:42px;padding:10px 12px;box-shadow:none}
:is(.wb-panel,.wb-form,.wb-dialog,#destinyForm,#metForm) label{font-size:12px;color:#4d5d52;font-weight:500;line-height:1.5;gap:6px}
:is(.wb-panel,.wb-form,.wb-dialog,#destinyForm,#metForm) :is(input,select,textarea):focus{border-color:#516440;outline:2px solid #51644022;outline-offset:1px}
:is(.wb-panel,.wb-dialog) button{font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:1.5;min-height:40px;padding:9px 14px;border-radius:5px;border-color:#c5cebf;background:#f4f6ed;color:#4a6337;text-shadow:none;box-shadow:none}
.wb-panel button:hover{background:#eaf0e6;border-color:#828c79}.wb-panel button[aria-pressed=true]{background:#4a6337;border-color:#4a6337;color:#fff}.wb-panel button[type=submit],.wb-panel [data-fp=apply]{background:#4a6337;border-color:#4a6337;color:white;font-weight:600}
.wb-panel .wb-toolbar{gap:8px;margin:12px 0}.wb-fields{align-items:end;gap:12px 16px}.wb-profile{background:#f5f6ef;border-color:#d7dccc;border-radius:5px;padding:12px}.wb-profile summary{color:#526149;font-size:12px}.wb-panel summary{cursor:pointer;line-height:1.6}.wb-panel details[open]>summary{margin-bottom:12px}
.wb-panel table,.met-result table{font-size:13px;line-height:1.6;border-collapse:collapse;width:100%}.wb-panel th,.met-result th{color:#4a5d4e;font-weight:600;background:#f0f3e9;text-align:left}.wb-panel td,.wb-panel th,.met-result td,.met-result th{padding:10px 12px;border-bottom:1px solid #dde2d5}.wb-panel tbody tr:nth-child(even),.met-result tbody tr:nth-child(even){background:#fafbf6}.wb-panel tbody tr:has(input:checked){background:#ebeee9}
.wb-line-buttons{padding:4px;background:#f2f4eb;border:1px solid var(--hqq-line);border-radius:6px;gap:4px}.wb-line-buttons button{border-color:transparent;background:transparent}.wb-facts{grid-template-columns:136px 1fr;gap:0;margin:16px 0;border-top:1px solid var(--hqq-line)}.wb-facts dt,.wb-facts dd{padding:12px 0;border-bottom:1px solid #e2e6da}.wb-facts dt{font-size:12px;color:#5b6b5c}.wb-facts dd{font-size:14px}.wb-panel blockquote{font-family:"HCQ Viet",Georgia,'Times New Roman',serif;font-size:21px;background:#f7f5eb;color:#40463a;border-left:2px solid var(--hqq-gold);border-radius:0;padding:16px 20px}
.wb-zi-map{max-width:1100px;border-color:#bfcbbd;grid-template-rows:repeat(4,minmax(156px,1fr));margin:24px auto}.wb-panel .wb-zi-palace{padding:12px;gap:6px;border-color:#ced2ca;background:#fffffc;line-height:1.5;font-size:13px}.wb-zi-palace strong{font-size:15px;font-weight:600}.wb-zi-palace small{color:#5f715e;font-size:11px}.wb-panel .wb-zi-linked{background:#f4f3e4}.wb-panel .wb-zi-palace[aria-pressed=true]{background:#f0f3ee;color:#2a3620;outline:2px solid #5c6f4b;outline-offset:-2px}.wb-zi-center{background:radial-gradient(ellipse,#f4f5e9,transparent 75%);line-height:1.8;padding:20px}.wb-zi-lines{opacity:.65}.wb-zi-lines line{stroke:#92763d;stroke-width:1;stroke-dasharray:4 5}.wb-star-list{gap:6px}.wb-star-list span{background:#f6f8ef;border-color:#d7dece;color:#4c5544;padding:5px 10px;border-radius:4px}
.wb-luck,.wb-months{gap:8px;border:1px solid var(--hqq-line);padding:8px;border-radius:6px;background:#f5f6ee}.wb-luck button,.wb-months button{border-color:transparent;background:white;align-items:center;padding:12px 8px}.wb-luck button strong,.wb-months button strong{font-size:16px}.wb-luck small,.wb-months small{font-size:11px}.wb-luck button[aria-pressed=true],.wb-months button[aria-pressed=true]{box-shadow:inset 0 -3px #c5a662;background:#4a6337}
.fp-layout{grid-template-columns:280px minmax(0,1fr);gap:24px}.fp-controls{background:#f5f6ee;border:1px solid #d7dece;padding:16px;border-radius:6px}.fp-controls label{font-size:12px}.fp-controls .wb-toolbar{gap:6px}.fp-controls button{font-size:12px;padding:8px 10px}.fp-work #fpStatus{font-size:12px;color:#52634f;margin:0 0 12px}.fp-scroll{background:#e9ece4;border:1px solid #c0c5bc;border-radius:4px;max-height:800px;box-shadow:inset 0 0 0 4px #fff8}.fp-scroll svg,#fpReport svg{shape-rendering:geometricPrecision}.fp-work #fpLegend{padding:16px 0 12px;border-bottom:1px solid var(--hqq-line);margin-bottom:16px}.fp-work #fpLegend h3{font-size:16px}.fp-work #fpLegend p{font-size:12px;color:#52634f}.wb-compare-cards>article{padding:20px;border-color:#cbd6c4;background:#fffef9;border-radius:6px}.wb-compare-cards>article h3{font-size:18px}.wb-compare-cards ul{padding-left:20px}.wb-compare-cards li{margin:6px 0}
.hqq-sheet-brand{gap:10px;padding:0 0 12px;margin-bottom:20px;border-color:#d9dfcf}.hqq-sheet-brand img{width:40px;height:40px}.hqq-sheet-brand strong{font-size:13px;letter-spacing:1px}.hqq-sheet-brand a{font-size:11px}.hqq-branded-sheet::after{background-size:min(54%,340px);opacity:.035}
/* Bàn Kỳ Môn: rõ ba vùng thao tác như trang nguồn, chữ Việt không bị nén. */
.qm-app{--qm-bg:#07131e;--qm-panel:#102331;--qm-line:#3d5360;--qm-gold:#e7d49b;--qm-text:#eef0ed;--qm-muted:#bbcbd0;--qm-jade:#b7cca4;border-radius:6px;padding:20px;background:radial-gradient(ellipse at 45% 48%,#173c3d66,transparent 56%),#07131e;font-family:Arial,Helvetica,sans-serif;font-size:13px;box-shadow:0 8px 32px #20271920}
.qm-app h2{font-size:25px;font-weight:500;letter-spacing:.3px}.qm-heading{margin-bottom:20px;padding-bottom:16px}.qm-heading p{font-size:12px}.qm-eyebrow{font-size:10px;letter-spacing:1.5px;color:#b9c9c8}.qm-card{background:linear-gradient(150deg,#112634,#0c1c2a);border-color:#41545e;border-radius:3px;padding:16px}.qm-settings{gap:12px}.qm-app input,.qm-app select{height:40px;font-size:13px;background:#0a1926;border-color:#506573}.qm-app .qm-primary{border-radius:3px;min-height:44px;letter-spacing:.5px}.qm-app .qm-switches label{font-size:12px}.qm-app .qm-switches input[type=checkbox]{appearance:none;width:30px;height:18px;min-height:18px;padding:0;border:1px solid #68828a;border-radius:12px;background:#243b49;position:relative;cursor:pointer}.qm-app .qm-switches input[type=checkbox]::after{content:'';position:absolute;width:12px;height:12px;left:2px;top:2px;border-radius:50%;background:#c6d2ce;transition:transform .15s}.qm-app .qm-switches input:checked{background:#556b42;border-color:#abbd9b}.qm-app .qm-switches input:checked::after{transform:translateX(12px);background:#e8eee2}.qm-workspace>.hqq-sheet-brand{padding:0 0 10px;margin:0 0 12px;border-color:#3d5360}.qm-workspace>.hqq-sheet-brand img{width:30px;height:30px}.qm-workspace>.hqq-sheet-brand strong{font-size:11px}.qm-workspace>.hqq-sheet-brand a{font-size:10px}.qm-workspace.hqq-branded-sheet::after{opacity:.025;background-position:center 260px}.qm-pillars{padding:12px 4px;background:#102735}.qm-pillars strong{font-family:"HCQ Viet",Georgia,'Times New Roman',serif;font-size:21px;font-weight:500;line-height:1.8}.qm-pillars small{font-size:10px}.qm-ju{padding:6px;gap:10px}.qm-orbit{padding:32px 16px;margin:12px 0}.qm-orbit::before{inset:12px 0;border-color:#b7a57040}.qm-orbit::after{border-color:#b7a5702b}.qm-board{border-color:#9c956f}.qm-app .qm-palace{min-height:160px;background:#112b36;border-color:#9c956f;padding:10px;gap:3px;line-height:1.5}.qm-app .qm-selected{background:#25434a;outline:1px solid #f2d68c;outline-offset:-3px;box-shadow:inset 0 0 18px #d7b97514}.qm-palace-top{font-size:10px;line-height:1.5}.qm-god{font-size:12px;color:#c6cfbf}.qm-star{font-size:14px;font-weight:500}.qm-door{font-family:"HCQ Viet",Georgia,'Times New Roman',serif;font-size:19px;line-height:1.5}.qm-can-line{font-size:12px}.qm-palace-badges{font-size:9px;min-height:14px}.qm-palace-badges>span{border-radius:2px;border-color:#77876966}.qm-center{background:radial-gradient(circle,#3a4432,#102735)!important}.qm-center-number{font-family:"HCQ Viet",Georgia,'Times New Roman',serif;font-size:38px}.qm-center-stem{font-family:"HCQ Viet",Georgia,'Times New Roman',serif}.qm-app .qm-detail>h3{font-size:26px;letter-spacing:1px;margin:16px 0 10px}.qm-facts>div{padding:13px 0}.qm-facts dt{font-size:12px}.qm-facts dd{font-size:14px}.qm-detail-body{max-height:720px}.qm-app .qm-detail-tabs button{font-size:12px}.qm-hour-nav button{font-size:12px;min-height:40px}.qm-markers{font-size:11px;gap:8px}.qm-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.qm-actions button{font-size:12px}.qm-status{font-size:11px}.qm-app .wb-profile{background:#0a1a27;border-color:#41545e}.qm-app .wb-profile input,.qm-app .wb-profile select{background:#0a1926;color:#eef0ed;border-color:#506573}.qm-app .wb-profile button{background:#193443;color:#eef0ed;border-color:#506573}
@media(min-width:1120px){.qm-layout{grid-template-columns:224px minmax(0,1fr) 244px;gap:20px}.qm-detail{grid-column:auto}.qm-facts{display:block}.qm-detail-body{max-height:740px}.qm-app .qm-palace{min-height:156px}}
@media(min-width:1440px){.qm-layout{grid-template-columns:256px minmax(0,1fr) 280px;gap:24px}.qm-app .qm-palace{min-height:180px;padding:12px}.qm-star{font-size:16px}.qm-door{font-size:22px}.qm-can-line{font-size:13px}.qm-god{font-size:13px}}
@media(min-width:701px) and (max-width:1119px){.qm-layout{grid-template-columns:240px minmax(0,1fr);gap:16px}.qm-detail{grid-column:1/-1}.qm-facts{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}.qm-orbit{padding:32px 4px}.qm-app .qm-palace{padding:8px;min-height:156px}.qm-door{font-size:17px}}
@media(max-width:900px){.paper:has(#destinyTools:not([hidden])){width:calc(100% - 24px);padding:16px}.fp-layout{grid-template-columns:1fr}.fp-controls{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px}.fp-controls>.wb-fields,.fp-controls>details,.fp-controls>.wb-toolbar{grid-column:1/-1}.wb-zi-map{grid-template-rows:repeat(4,minmax(140px,1fr))}.wb-panel .wb-zi-palace{padding:8px;font-size:12px}}
@media(max-width:700px){.paper:has(#destinyTools:not([hidden])){width:calc(100% - 16px);padding:12px}.met-hub-nav{grid-template-columns:1fr 1fr;gap:6px}.met-hub-nav button,.met-hub-nav button[data-almanac]{min-height:56px;padding:8px;font-size:12px}.met-hub-nav button:first-child{grid-column:1/-1}.met-hub-nav .tool-icon{width:28px;height:28px}.wb-panel,.met-result{padding:16px;margin:16px 0}.wb-panel h2,.met-result h2{font-size:20px}.wb-facts{grid-template-columns:1fr;gap:0}.wb-facts dt{padding:12px 0 2px;border-bottom:0}.wb-facts dd{padding:0 0 12px;margin:0}.wb-zi-map{grid-template-rows:repeat(4,minmax(130px,1fr));margin:16px -4px}.wb-panel .wb-zi-palace{padding:6px;font-size:10px;gap:4px}.wb-zi-palace strong{font-size:11px}.wb-zi-palace small{font-size:9px}.wb-zi-center{font-size:11px;padding:8px}.wb-luck,.wb-months{grid-template-columns:1fr 1fr}.wb-panel .wb-toolbar{align-items:stretch}.wb-checks{gap:8px 12px}.wb-checks label{font-size:12px}.qm-app{padding:16px 10px}.qm-layout{grid-template-columns:minmax(0,1fr);gap:16px}.qm-heading{align-items:flex-start}.qm-app h2{font-size:22px}.qm-app .qm-palace{min-height:158px;padding:7px 5px;gap:3px}.qm-star{font-size:12px}.qm-door{font-size:16px}.qm-can-line{font-size:11px}.qm-palace-top{font-size:9px}.qm-god{font-size:11px}.qm-palace-badges{font-size:8px}.qm-orbit{padding:30px 0}.qm-detail{grid-column:auto}.qm-facts{display:block}.qm-center-number{font-size:30px}.qm-center .qm-palace-top{left:5px;top:7px;width:calc(100% - 10px)}.qm-workspace>.hqq-sheet-brand{margin-top:4px}.qm-app .qm-calm{font-size:10px}.hqq-sheet-brand strong{font-size:12px}}
@media(max-width:380px){.fp-controls{grid-template-columns:1fr}.fp-controls>*{grid-column:1!important}.wb-fields{grid-template-columns:1fr}.wb-panel .wb-zi-palace{padding:4px;font-size:9px}.wb-zi-palace strong{font-size:10px}.wb-zi-palace small{font-size:8px}.qm-palace-badges{font-size:7px}.qm-door{font-size:14px}.qm-star{font-size:11px}.qm-can-line{font-size:10px}.qm-app .qm-palace{min-height:150px}}
@media(prefers-reduced-motion:reduce){.qm-app .qm-switches input::after,.met-hub-nav button{transition:none}}
@media print{.wb-panel,.met-result{box-shadow:none;background:white;padding:12px}.qm-app{background:white!important;box-shadow:none;--qm-muted:#465248;--qm-line:#8f988d;--qm-gold:#5b4b23;--qm-text:#1b2017}.qm-app .qm-palace,.qm-app .qm-pillars,.qm-app .qm-card{background:white!important}.qm-workspace>.hqq-sheet-brand{color:#4a6337}.paper:has(#destinyTools:not([hidden])){width:100%;padding:0}.hqq-branded-sheet::after{opacity:.035!important}}

/* Giữ nhãn được chọn có độ tương phản trên nền sáng. */
.met-hub-nav button[aria-selected=true],.met-hub-nav button[aria-selected=true] span{color:#314123!important}
@media(min-width:1120px){.mode-tabs{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:8px;overflow:visible}.mode-tabs button,.mode-tabs button:last-child{width:100%;min-width:0;min-height:92px;max-height:none;padding:10px 6px;grid-column:auto;flex:none;font-size:11px;line-height:1.4}.mode-tabs .tool-icon{width:38px;height:38px}.topbar{grid-template-columns:minmax(0,1fr) auto auto!important}.topbar .plain-button{grid-column:auto!important;grid-row:1;white-space:nowrap}}
.qm-pillars strong,.qm-door,.qm-center-stem{font-family:Arial,Helvetica,sans-serif;letter-spacing:0}.qm-pillars strong{font-size:19px;font-weight:600}.qm-door{font-size:18px;font-weight:500}

/* Biểu mẫu lá số: nhãn gọn và các ô nhập cân đối. */
#destinyForm:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px;max-width:880px;width:100%;margin:24px auto;background:#fffef8;border:1px solid #d2dccb;border-radius:8px;padding:28px;box-shadow:0 4px 24px #343e2b0c}
#destinyForm>h2,#destinyForm>#chartKindTabs,#destinyForm>#birthWheel,#destinyForm>.row,#destinyForm>fieldset,#destinyForm>p,#destinyForm>#destinySubmit,#destinyForm>.group-invite,#destinyForm>.wb-profile{grid-column:1/-1}
#destinyForm>h2{font-size:23px;color:#36432a;margin:4px 0 8px;line-height:1.4}#destinyForm label{margin:0}#destinyForm>.row{gap:20px}#destinyForm #birthWheel{background:#f5f7ed;border:1px solid #dde3d5;border-radius:6px;padding:16px;margin:0}#destinyForm fieldset{border:1px solid #d4ddcd;border-radius:5px;padding:16px;margin:0}#destinyForm legend{font-size:12px;color:#565d50;padding:0 8px}#destinyForm>p{font-size:12px;line-height:1.6;margin:0;color:#5a6954}#destinyForm>#destinySubmit{min-height:46px;background:#4a6337;border:1px solid #4a6337;border-radius:5px;color:white;box-shadow:none;text-shadow:none;font:600 14px/1.4 Arial,sans-serif;padding:12px}#destinyForm .subtabs{background:#f2f5e9;border:1px solid #d7decc;border-radius:5px;padding:4px;gap:4px;margin:0}#destinyForm .subtabs button{border:0;border-radius:3px;min-height:38px;font:14px Arial,sans-serif;background:transparent;color:#565d50}#destinyForm .subtabs button[aria-selected=true],#destinyForm .subtabs button[aria-checked=true]{background:#4a6337;color:white}
:is(.wb-panel,.wb-form,.wb-dialog,#destinyForm,#metForm) input[type=checkbox]{width:18px;height:18px;min-height:18px;padding:0;flex-shrink:0;accent-color:#4a6337}:is(.wb-panel,.wb-form,.wb-dialog,#destinyForm,#metForm) label:has(>input[type=checkbox]){flex-direction:row;align-items:center;gap:8px}
@media(max-width:600px){#destinyForm:not([hidden]){padding:16px;gap:12px}#destinyForm #birthWheel{padding:10px}#destinyForm>h2{font-size:20px}#destinyForm>.row{gap:12px}}
@media(max-width:380px){#destinyForm:not([hidden]){grid-template-columns:1fr}#destinyForm>*{grid-column:1!important}}

/* Cắt phần vòng trang trí xoay vượt khung, tránh kéo ngang màn hình nhỏ. */
.qm-orbit{overflow:hidden}.qm-app .qm-palace:focus-visible{outline-offset:-3px}
@media(max-width:380px){.qm-app{padding:12px 6px}.paper:has(.qm-app){padding:8px;width:calc(100% - 8px)}.qm-app .qm-palace{padding:6px 4px}.qm-app .qm-door{font-size:14px}.qm-app .qm-switches{gap:12px 8px}}

/* 5.18: header chứa đủ logo và hai nút, không cố định chiều cao trên điện thoại. */
@media screen and (max-width:700px){
 .topbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto auto;height:auto;min-height:0;gap:10px 8px;padding:12px 16px;align-items:center}
 .topbar .brand{grid-column:1/-1;grid-row:1;min-width:0;max-width:100%;justify-self:start}
 .topbar .plain-button{position:static;grid-row:2;grid-column:auto!important;width:100%;min-width:0;min-height:40px;margin:0;padding:8px 10px;font-size:13px;line-height:1.4;white-space:normal;transform:none;box-sizing:border-box}
 .topbar #historyButton{grid-column:1!important}.topbar #reviewJournal{grid-column:2!important}
 .topbar .desktop-heading{display:none}
}
@media screen and (min-width:701px) and (max-width:1119px){.topbar{grid-template-columns:minmax(0,1fr) auto auto!important;height:auto;min-height:100px}.topbar .plain-button{grid-row:1;grid-column:auto!important}.topbar .desktop-heading{display:none}}

/* 5.19: gom hai cách nhập tay vào cùng một mục, menu chính còn tám ô. */
.manual-method-tabs{display:flex;gap:8px;max-width:880px;margin:16px auto;padding:6px;border:1px solid #d7decc;background:#fffdf4;border-radius:8px}.manual-method-tabs[hidden]{display:none}.manual-method-tabs button{display:flex;flex:1;align-items:center;justify-content:center;gap:10px;min-width:0;min-height:56px;padding:10px 12px;border:1px solid transparent;background:transparent;color:#565d50;border-radius:5px;font:14px/1.4 Arial,sans-serif;cursor:pointer}.manual-method-tabs button img,.manual-method-tabs .tool-icon{width:32px;height:32px;object-fit:contain;flex-shrink:0}.manual-method-tabs button[aria-selected=true]{background:#eaeee7;border-color:#7e8975;color:#37462a;font-weight:600}.manual-method-tabs button:focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:2px}@media(min-width:1120px){.mode-tabs{grid-template-columns:repeat(8,minmax(0,1fr))}}@media(max-width:480px){.manual-method-tabs{margin:12px 0;gap:4px;padding:4px}.manual-method-tabs button{font-size:12px;gap:6px;padding:8px 6px}.manual-method-tabs button img,.manual-method-tabs .tool-icon{width:28px;height:28px}}

.manual-method-tabs button img,.manual-method-tabs .tool-icon{border-radius:50%;border:1px solid #55703f;object-fit:cover;background:#fff6e4}
/* 5.88: form Ngũ Linh và Mai Hoa hai / ba số gọn như form lập quẻ chính (bỏ khoảng trống kép giữa các ô). */
:is(#nguLinhForm,#numberCastForm) label{margin:0 0 12px;gap:4px}:is(#nguLinhForm,#numberCastForm) .wb-fields{gap:12px 14px;margin:0 0 14px}:is(#nguLinhForm,#numberCastForm) .wb-fields label{margin:0}:is(#nguLinhForm,#numberCastForm) :is(input,select){height:44px}:is(#nguLinhForm,#numberCastForm) textarea{min-height:44px;height:44px;resize:vertical}
@media(min-width:701px){#nguLinhForm .wb-fields{grid-template-columns:1.6fr 1fr 1.4fr}}

/* 6.99 · Tam phương trong khung giữa: tam hợp tím, xung chiếu đỏ, như lá số chính. */
.wb-zi-lines line.wb-zi-trine{stroke:#65489c;stroke-width:1.4;stroke-dasharray:6 5}.wb-zi-lines line.wb-zi-opposite{stroke:#ca442f;stroke-width:1.4;stroke-dasharray:6 5}
/* 6.99 · Hàng công cụ có ô nhập (Năm xem, Lớp vận hạn…): nút thẳng hàng với ô nhập ở dưới nhãn, không nhô lên trên. */
.wb-panel .wb-toolbar:has(>label){align-items:flex-end}
.wb-panel .wb-toolbar:has(>label)>label{margin-bottom:0}
.wb-panel .wb-toolbar:has(>label)>button{min-height:42px;padding-top:0;padding-bottom:0;margin-bottom:0;align-self:flex-end}
/* 6.99 · Rà lỗi hiển thị. Hàng chọn tháng của Lịch Vạn Niên: nút ‹ › Hôm nay cao bằng ô tháng, thẳng hàng. */
.almanac-nav{align-items:center}
.almanac-nav>button,.almanac-nav>input{height:44px;box-sizing:border-box;margin:0;vertical-align:middle}
.almanac-nav>button{min-width:44px;padding:0 14px;border:1px solid #d8c7a9;border-radius:10px;background:#fffdf6;color:#2d3626;font-size:16px;line-height:1;cursor:pointer}
.almanac-nav>button:hover{background:#f3ead4}
/* Dòng khu riêng trên cùng: không tách đôi chữ "Đăng xuất", "Về lập quẻ" khi xuống dòng trên điện thoại. */
.owner-tools-banner a{white-space:nowrap}
/* So sánh ngày giờ trên điện thoại: mỗi ngày là một thẻ, không còn bảng 6 cột hẹp phải kéo ngang, hàng cao trống. */
@media(max-width:900px){
 #dateCompareRows .wb-scroll{overflow:visible}
 #dateCompareRows table,#dateCompareRows tbody,#dateCompareRows tr,#dateCompareRows td{display:block;width:auto}
 #dateCompareRows thead{display:none}
 #dateCompareRows tr{margin:0 0 10px;padding:10px 12px;border:1px solid #e3d6b8;border-radius:12px;background:#fffdf6}
 #dateCompareRows td{padding:3px 0;border:0;text-align:left}
 #dateCompareRows td[data-label]::before{content:attr(data-label) ": ";font-weight:700;color:#4a6337}
 #dateCompareRows td[data-label="Đối chiếu"]::before{content:none}
}
/* Lịch Vạn Niên trên điện thoại: hàng ‹ tháng › Hôm nay gọn một dòng. */
@media(max-width:640px){
 .almanac-nav{flex-wrap:nowrap}
 .almanac-nav>input{flex:1 1 auto;min-width:0;max-width:none;padding:0 8px}
 .almanac-nav>button{min-width:40px;padding:0 10px}
}
/* Ô câu hỏi xem ngày: đủ cao để đọc hết câu gợi ý. */
.reading-question textarea{min-height:72px}
/* Bảng chọn ngày (Kim Oanh Ký) trên điện thoại: mỗi ngày một thẻ, đủ cột, không bị giấu cột bên phải. */
@media(max-width:900px){
 .almanac-table table:has(td[data-label]),.almanac-table table:has(td[data-label]) tbody,.almanac-table table:has(td[data-label]) tr,.almanac-table td[data-label]{display:block;width:auto}
 .almanac-table table:has(td[data-label]) thead{display:none}
 .almanac-table table:has(td[data-label]) tr{margin:0 0 10px;padding:8px 12px;border:1px solid #e3d6b8;border-radius:12px;background:#fffdf6}
 .almanac-table td[data-label]{padding:3px 0;border:0;min-width:0}
 .almanac-table td[data-label]::before{content:attr(data-label) ": ";font-weight:700;color:#74502c}
}
/* Kỳ Môn · "Bàn theo phái khác": khung nền sáng nhưng chữ lấy màu sáng của bàn tối nên gần như không đọc được. */
.qm-guide.fx-extra .qm-guide-content,.qm-guide.fx-extra .qm-guide-content label,.qm-guide.fx-extra .met-grid article,.qm-guide.fx-extra .met-grid p{color:#2d3328}
.qm-guide.fx-extra .met-grid h3{color:#8a2a22}
.qm-guide.fx-extra .fx-note{color:#5d6b62}
/* Ô chọn tệp, thanh trượt, ô đánh dấu theo màu thương hiệu thay cho kiểu mặc định của trình duyệt. */
input[type=file]{max-width:100%;font-size:14px}
input[type=file]::file-selector-button{margin-right:8px;padding:8px 12px;border:1px solid #d8c7a9;border-radius:10px;background:#fffdf6;color:#2d3626;font:inherit;cursor:pointer}
input[type=range],input[type=checkbox],input[type=radio]{accent-color:#4a6337}
/* An quẻ bằng tay: hào màu đen như trên lá phiếu (hào động vẫn đỏ). */
.manual-yao{background:#3f5530}
.manual-yao.yin{background:linear-gradient(to right,#3f5530 43%,transparent 43%,transparent 57%,#3f5530 57%)}
/* Bảng phân tích bổ sung (Thể Dụng, …) trên điện thoại: bảng ít cột vừa khung, không bị cắt cột phải. */
@media(max-width:640px){
 .cast-analysis .ca-table:not(:has(th:nth-child(5))){min-width:0;table-layout:auto}
 .cast-analysis .ca-table:not(:has(th:nth-child(5))) td,.cast-analysis .ca-table:not(:has(th:nth-child(5))) th{overflow-wrap:anywhere}
}
/* Lục Hào nhập tay trên điện thoại: ô "Chọn hào" đủ rộng để đọc hết chữ. */
@media(max-width:600px){
 .liu-line-heading,.liu-line-inputs .manual-line{grid-template-columns:96px minmax(0,1fr) 44px}
 .liu-line-inputs .manual-line select{width:100%;font-size:16px;padding:7px 8px}
 .liu-line-inputs .manual-line>label{font-size:16px}
}
/* Nền hoa văn trong khung chính và form: trước đây ảnh nền chỉ phủ phần trên (cỡ 100% auto) nên giữa trang lộ một đường đổi màu ngang.
   Nay ảnh phủ kín khung (cover), máy tính giữ ảnh đứng yên theo màn hình. */
html body main.paper,html body .paper{background-size:100% 100%,cover!important;background-attachment:scroll,fixed!important;background-position:0 0,center top!important}
html body .cast-form,html body #castForm,html body .tool-hero{background-size:100% 100%,cover!important;background-position:0 0,center center!important}
@media(max-width:900px),(hover:none){html body main.paper,html body .paper{background-attachment:scroll,scroll!important}}
/* Đổi âm dương: ô chọn ngày, tháng cùng cỡ chữ với ô năm; nút có kiểu thống nhất; ô "Tháng nhuận" có khoảng cách. */
.calendar-converter select,.calendar-converter input[type=number]{font-size:16px;min-height:44px;box-sizing:border-box}
.calendar-converter label:has(>#convertLeap){display:flex;align-items:center;gap:8px;margin:10px 0}
.calendar-converter #convertLeap{width:18px;height:18px;margin:0}
.calendar-converter button[type=submit]{display:block;min-height:46px;padding:0 22px;margin:8px 0 12px;border:1px solid #4a6337;border-radius:12px;background:#4a6337;color:#fff;font-weight:700;letter-spacing:.5px;cursor:pointer;opacity:1}
.calendar-converter #convertOpen{min-height:42px;padding:0 16px;border:1px solid #d8c7a9;border-radius:10px;background:#fffdf6;color:#2d3626;cursor:pointer}
/* Tìm ngày: khung "Tìm ngày theo công việc" cách hàng chọn tháng, tiêu đề khung không dính sát nút. */
#calendarFilters{margin-top:18px}
#calendarFilters>legend{padding:0 6px}
.almanac-nav{margin-bottom:6px}
/* 6.99 · Thanh đi nhanh trong cột hẹp (Kỳ Môn) tự xuống hàng, không dựng chữ dọc. Kết quả Hoàng Tuyền cách nút. */
.quick-access .quick-access-buttons{flex-wrap:wrap}
.quick-access .quick-access-buttons button{flex:1 1 90px}
#metResult.hqq-branded-sheet,.cast-form .cast-button+section{margin-top:18px}
/* Kỳ Môn: cột nhập hẹp, ô ngày và ô giờ xếp hai dòng để hiện đủ "11/05/2026" và "15:10". */
@media(min-width:700px){#qmForm .qm-input-row{grid-template-columns:minmax(0,1fr)}}
/* So sánh ngày giờ: nút TRA VÀ SO SÁNH cách ô chọn phía trên. */
#dateCompareForm button[type=submit],#dateCompareForm>button{margin-top:14px}
/* 7.13 · Vòng 24 sơn trong Hoàng Tuyền */
.hq-ring{display:block;width:min(100%,340px);margin:12px auto}.hq-ring .hq-cell path{fill:#f4f1e8;stroke:#4a6337;stroke-width:.8}.hq-ring .hq-cell text{font-size:10px;fill:#23281f}.hq-ring .hq-bad path{fill:#f3c4bd}.hq-ring .hq-facing path{fill:#d0dbc7}.hq-ring .hq-sitting path{fill:#d9d2b4}.hq-ring .hq-door path,.hq-ring .hq-water path{stroke:#b3261e;stroke-width:2.2}.hq-ring .hq-mid{font-size:13px;fill:#4a6337}
@media (prefers-color-scheme:dark){.hq-ring .hq-cell path{fill:#242721}.hq-ring .hq-cell text{fill:#ebedea}.hq-ring .hq-bad path{fill:#6b2a25}.hq-ring .hq-facing path{fill:#3f4f31}.hq-ring .hq-sitting path{fill:#4a4630}.hq-ring .hq-mid{fill:#b9c8ab}}
/* 10.41 · Quân: mọi vạch quẻ đen đổi ô liu, hào động giữ đỏ. */
.line:not(.moving) i,.hexcard .line:not(.moving) i{background:#3f5530}

/* learning.css */
/* Công cụ học dùng cùng kiểu chữ và nhịp phiếu hiện có. */
.learning-tools{margin-top:24px;padding-top:20px;border-top:1px solid #ced3c9}.learning-source-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.learning-source-tabs button{border:1px solid #c9d4c2;border-radius:5px;padding:8px 12px;background:#f4f7ed;color:var(--hcq-c245442,#4a6337);cursor:pointer;min-height:40px}.learning-source-tabs button[aria-pressed=true]{background:var(--hcq-c245442,#4a6337);color:white;border-color:var(--hcq-c245442,#4a6337)}.learning-references{margin:20px 0}.learning-references>label{display:flex;flex-direction:column;gap:6px;max-width:480px}.learning-source-card{padding:20px;border:1px solid #d6decd;background:#fcfdf7;border-radius:6px}.learning-source-card h4{font-size:15px;color:var(--hcq-c245442,#4a6337);margin:16px 0 8px}.learning-source-card [lang=zh]{font:21px/1.8 "HCQ Viet",Georgia,'Times New Roman',serif}.learning-limit{padding:12px;border-left:3px solid #b99b5b;background:#f6f2e3;font-size:13px;line-height:1.7}.learning-dialog{width:min(900px,calc(100vw - 24px));font:14px/1.65 Arial,sans-serif}.learning-dialog pre{font:13px/1.8 'Noto Sans',Arial,sans-serif;white-space:pre-wrap;overflow-wrap:anywhere;background:#f4f6ed;border:1px solid #d7decd;padding:14px;border-radius:5px}.learning-dialog textarea{font:13px/1.7 'Noto Sans',Arial,sans-serif;resize:vertical}.learning-dialog .learning-check{display:flex;flex-direction:row;gap:8px;align-items:center}.learning-dialog input[type=checkbox]{width:18px;height:18px;min-height:18px;accent-color:var(--hcq-c245442,#4a6337)}.learning-dialog a[data-txt]{display:inline-flex;align-items:center;min-height:40px;padding:8px 12px;border:1px solid var(--hcq-ccbd6c3,#cbd6c3);border-radius:5px;color:var(--hcq-c245442,#4a6337);text-decoration:none;background:#f5f7ee}.learning-dialog .dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.learning-dialog h3,.learning-dialog h4{color:var(--hcq-c245442,#4a6337)}.learning-dialog :focus-visible,.learning-source-tabs :focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:3px}.learning-tools [hidden]{display:none!important}@media(max-width:600px){.learning-dialog{padding:14px}.learning-source-card{padding:14px}.learning-dialog .dialog-heading h2{font-size:18px}.learning-dialog .wb-toolbar{align-items:stretch}.learning-source-tabs{gap:6px}.learning-source-tabs button{font-size:12px;padding:8px 10px}}

/* research.css */
/* Các phần nghiên cứu bổ sung, không tác động phiếu tính gốc. */
.quick-liuhao{max-width:880px;margin:20px auto}.quick-liuhao[hidden]{display:none}.quick-liuhao>summary{font-weight:600;font-size:17px;color:var(--hcq-c245442,#4a6337);cursor:pointer}.quick-liuhao form>details{padding:12px;border:1px solid var(--hcq-cd7decc,#d7decc);border-radius:5px;margin:14px 0}.quick-liuhao [data-preview]{font-size:12px;color:#596052;line-height:1.7}.quick-liuhao button[type=submit]{margin-top:16px}.reading-dialog{width:min(1100px,calc(100vw - 24px));font:14px/1.65 Arial,sans-serif}.reading-dialog .dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.reading-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.reading-dialog .reading-check{display:flex;flex-direction:row;align-items:center;gap:8px}.reading-dialog input[type=checkbox]{width:18px;min-height:18px;height:18px;accent-color:var(--hcq-c245442,#4a6337)}.reading-layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:24px;margin-top:20px}.reading-layout>nav{max-height:65vh;overflow:auto;display:flex;flex-direction:column;gap:6px;align-self:start}.reading-layout nav button{text-align:left;display:flex;flex-direction:column;gap:6px;background:#f6f8ef;min-width:0}.reading-layout nav button small{font-size:11px;color:#5b6d51;line-height:1.6}.reading-layout nav button[aria-pressed=true]{border-color:#657458;background:#e8f0e3;color:var(--hcq-c245442,#4a6337)}.reading-layout article{min-width:0}.reading-layout h3,.reading-layout h4{color:var(--hcq-c245442,#4a6337)}.reading-layout [lang=zh]{font:21px/1.8 "HCQ Viet",Georgia,serif}.reading-dialog [data-message]{overflow-wrap:anywhere;color:#565d50}.reading-dialog :focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:2px}.bazi-notes{border-top:1px solid var(--hcq-ccbd6c3,#cbd6c3);padding-top:20px;margin-top:24px}.bazi-notes textarea{resize:vertical}.bazi-notes [data-luck-message]{font-size:12px;overflow-wrap:anywhere}.bazi-notes button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:700px){.reading-dialog{padding:14px}.reading-layout{grid-template-columns:1fr;gap:16px}.reading-layout>nav{max-height:220px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}.reading-layout nav button{font-size:12px}.reading-filters{grid-template-columns:1fr}.reading-dialog .dialog-heading h2{font-size:19px}.quick-liuhao{padding:16px}.quick-liuhao>summary{font-size:15px}.quick-liuhao .wb-fields{grid-template-columns:1fr}.reading-dialog .wb-facts{grid-template-columns:1fr;gap:0}.reading-dialog .wb-facts dd{margin:0 0 12px}}

/* quick-access.css */
/* Phiếu → tải ảnh → nhập dữ liệu → nghiên cứu. Không dùng CSS order đảo thứ tự đọc. */
#ichingPanel:has(#resultArea[hidden])>#castStudy,#destinyTools:has(#destinyResult[hidden])>#destinyStudy,#destinyTools:has(#destinyForm[hidden])>#destinyStudy{display:none}
.quick-access{position:static;box-sizing:border-box;width:100%;min-width:0;margin:12px 0 20px;padding:10px 12px;background:#fffdf5f5;border:1px solid #d8dcd4;border-radius:8px;box-shadow:0 2px 10px #2a352010;overflow-wrap:break-word}
.quick-access-buttons{display:flex;gap:8px}.quick-access-buttons button{flex:1;min-width:0;min-height:44px;padding:9px 12px;background:#eef3e9;border:1px solid #a8afa1;border-radius:var(--ds-r-md,10px);color:#35422a;font:600 14px/1.35 "Inter","Be Vietnam Pro","Segoe UI",system-ui,-apple-system,sans-serif;cursor:pointer}.quick-access-buttons button:hover{background:#e3e7e0}.quick-access-buttons button:focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:2px}.quick-access-buttons button:disabled{background:#f4f3ed;color:#777b71;border-color:#d9dcd3;cursor:default}.quick-access p{display:inline-block;margin:7px 16px 0 0;font:12px/1.5 Arial,sans-serif;color:#56614f}.quick-access>a{font:12px/1.5 "Inter","Be Vietnam Pro","Segoe UI",system-ui,-apple-system,sans-serif;color:var(--hcq-c245442,#4a6337)}
:is(#castForm,#numberCastForm,#quickLiuHao,#destinyForm,#qmForm,#metForm,#castStudy,#destinyStudy,#resultArea,#destinyResult,#metResult,#qmDetail,.qm-workspace,.method-guide){scroll-margin-top:20px}
#castStudy,#destinyStudy{margin-top:24px}#resultArea>.result-controls{margin-bottom:0}#castForm{margin-top:16px}
@media(max-width:600px){.quick-access{padding:8px;margin:10px 0 14px}.quick-access-buttons{gap:5px}.quick-access-buttons button{font-size:12px;padding:8px 5px}.quick-access p{display:block;margin:7px 0 2px}.quick-access>a{font-size:12px}}
@media print{.quick-access{display:none}}

.quick-access .teacher-entry{display:inline-block;margin-left:14px;font-weight:600;color:#384a29}@media(max-width:600px){.quick-access .teacher-entry{display:block;margin:7px 0 0;padding-top:7px;border-top:1px solid #dde4d5;min-height:32px}}

.reading-entry-note{display:block;flex-basis:100%;font-size:12px;line-height:1.5;color:var(--hcq-c586b54,#5f6659);overflow-wrap:anywhere}.teacher-entry{min-height:44px;display:inline-flex;align-items:center}

.reading-question{display:block;flex-basis:100%;width:100%;min-width:0;margin:0 0 12px}.reading-question textarea{display:block;box-sizing:border-box;width:100%;max-width:100%;min-height:64px;margin:6px 0;font:inherit;font-size:16px;padding:10px;border:1px solid var(--hcq-cb5c8b2,#bdc3b7);border-radius:6px;background:var(--hcq-cfffef9,#fffef9);color:var(--hcq-c243c31,#303729)}.reading-question small{display:block;font-weight:normal;font-size:12px;line-height:1.5}.sheet-question{padding:12px 16px;border-left:3px solid var(--hcq-cb79c5e,#b79c5e);background:var(--hcq-cfff9e8,#fff9e8);color:var(--hcq-c174e37,#314223);font-weight:bold;white-space:pre-wrap;overflow-wrap:anywhere}.reading-question[hidden]{display:none!important}

.quick-access{display:block!important;grid-column:1/-1;flex:0 0 100%;max-width:100%;float:none}.quick-access .reading-question{max-width:100%}

/* mobile-polish.css */
/* 5.23: chặn kích thước nội tại của ô ngày giờ đẩy sang cột bên cạnh. */
#destinyForm,#destinyForm :is(fieldset,.row,label,.birth-date-wheels,.birth-time-wheels){min-width:0;max-width:100%}
#destinyForm .row{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
#destinyForm :is(input:not([type=checkbox]):not([type=radio]),select,textarea){display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0}
#destinyForm :is(input[type=date],input[type=datetime-local],input[type=time]){min-inline-size:0;max-inline-size:100%;inline-size:100%;text-align:left}
#destinyForm input::-webkit-date-and-time-value{min-width:0;text-align:left}
#destinyForm input::-webkit-datetime-edit{min-width:0;padding:0}
#ziViewOptions{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
#ziViewOptions>.row{grid-template-columns:minmax(0,1fr);gap:14px}
#ziViewOptions :is(label,p){margin:0}#ziViewOptions .zi-options{margin:0}
#destinyForm label:has(>input[type=checkbox]){display:flex;align-items:flex-start;gap:10px;line-height:1.5}
#destinyForm input[type=checkbox]{margin-top:3px;flex:0 0 20px;width:20px;height:20px;min-height:20px}
/* Nhận diện giữ rồng và chữ gốc, tăng độ rõ trong một khung thống nhất. */
.topbar .brand{gap:12px;min-height:60px;max-width:100%}
.topbar .brand-logo{width:56px;height:56px;flex:0 0 56px;padding:3px;object-fit:contain;border-radius:50%;border:1px solid #bda56c;background:#fffef6;box-shadow:0 0 0 3px #e9eee0;mix-blend-mode:normal}
.topbar .original-wordmark{width:188px!important;height:64px!important;max-width:calc(100vw - 110px);background:#334721}
.topbar .brand-text small{display:block;font:10px/1.4 Arial,sans-serif;letter-spacing:.45px;margin:0;color:#45523a}
.mode-tabs button[aria-selected=true]{border-color:#55703f;background:#edf3e4;color:#3f5530;box-shadow:inset 0 -3px #b99b5e}
.mode-tabs button[aria-selected=true] .tool-icon{box-shadow:0 0 0 2px #b79a58;border-radius:50%}
@media(max-width:700px){
 #destinyForm:not([hidden]){grid-template-columns:minmax(0,1fr);gap:14px;padding:16px}
 #destinyForm>*,#destinyForm>.row{grid-column:1/-1}
 #destinyForm .row{grid-template-columns:minmax(0,1fr);gap:14px}
 #destinyForm :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px;line-height:1.45;min-height:46px;padding:10px 12px}
 #destinyForm label{font-size:13px;line-height:1.5}
 #destinyForm #birthWheel{padding:10px}#destinyForm .birth-wheels select{padding:8px 5px}
 #destinyForm .row:has(#birthKind){grid-template-columns:repeat(2,minmax(0,1fr))}
 #destinyForm fieldset{padding:14px 12px}#destinyForm legend{font-size:13px}
 #destinyForm #destinySubmit{min-height:50px;font-size:16px}
 #destinyForm .subtabs button{min-height:44px;font-size:15px}
 .quick-access{position:static;backdrop-filter:none;box-shadow:none}
 .topbar{padding-top:calc(12px + env(safe-area-inset-top,0px));gap:12px 8px}
 .topbar .brand{gap:12px}.topbar .brand-logo{width:52px;height:52px;flex-basis:52px}
 .topbar .original-wordmark{width:176px!important;height:60px!important}
 .topbar .plain-button{min-height:44px;font-size:14px}
 .mode-tabs button{min-height:100px;line-height:1.45}.mode-tabs .tool-icon{width:46px;height:46px}
 #destinyForm :is(input,select,textarea):focus-visible{outline:2px solid var(--ds-brand,#4a6337);outline-offset:2px}
}
@media(max-width:360px){#destinyForm:not([hidden]){padding:12px}#destinyForm fieldset{padding:12px 10px}.topbar .brand-logo{width:48px;height:48px;flex-basis:48px}.topbar .original-wordmark{width:164px!important;height:56px!important}}
@media print{.topbar .brand-logo{box-shadow:none}}

#ziViewOptions .zi-options{display:flex;flex-direction:column;gap:8px}#ziViewOptions .zi-options>label{width:100%;min-height:32px}

.house-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.house-choice-grid label{display:flex;align-items:center;gap:8px;min-height:44px;min-width:0}.house-choice-grid input[type=checkbox]{width:20px;min-width:20px;flex:0 0 20px}.house-fieldset details{padding:8px 0}.house-fieldset summary{cursor:pointer;min-height:44px;padding:10px 0;line-height:1.5;overflow-wrap:anywhere}

.house-confirm{display:flex;align-items:flex-start;gap:10px;min-height:44px}.house-confirm input[type=checkbox],.house-choice-grid input[type=checkbox]{width:20px;height:20px;min-height:20px;min-width:20px;flex:0 0 20px;margin-top:3px}

/* Hai hệ phong thủy độc lập, giữ nhãn đọc được trên màn hình nhỏ. */
.met-hub-nav .feng-method-group{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;min-width:0;padding:12px;border:1px solid #c1c7bc;border-radius:14px;background:#f4f7ee;box-sizing:border-box}.feng-group-title{grid-column:1/-1;color:var(--hcq-c205542,#46602f)}.met-hub-nav .feng-method-group>button{width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere}.feng-compass-guide{grid-column:1/-1;border:1px solid #ced3ca;border-radius:12px;padding:12px;margin:8px 0 18px;background:#fafbf5}.feng-compass-guide>summary{cursor:pointer;font-weight:600;color:var(--hcq-c205542,#46602f);min-height:36px;line-height:1.5}.feng-guide-layout{display:grid;grid-template-columns:minmax(150px,220px) minmax(0,1fr);gap:20px;align-items:start}.feng-guide-layout figure{margin:12px 0;min-width:0}.feng-guide-layout svg{display:block;width:100%;height:auto}.feng-guide-layout figcaption{font-size:.85rem;line-height:1.5;color:#596958}.feng-guide-layout p,.feng-guide-layout li{overflow-wrap:anywhere;line-height:1.65}.feng-guide-layout ol{padding-left:1.4em}@media(max-width:600px){.feng-guide-layout{grid-template-columns:minmax(0,1fr);gap:0}.feng-guide-layout figure{max-width:210px;justify-self:center}.met-hub-nav .feng-method-group{padding:10px;gap:8px}.feng-compass-guide{padding:10px}}

.met-hub-nav .feng-method-group>button[aria-selected="true"]{color:var(--hcq-cfffaf0,#fffaf0)}.met-hub-nav .feng-method-group>button[aria-selected="true"] span{color:inherit}

.owner-tools-banner{padding:10px 16px;margin:0;background:#edf5e8;color:var(--hcq-c205542,#46602f);text-align:center;line-height:1.6;overflow-wrap:anywhere}.owner-tools-banner a{color:var(--hcq-c205542,#46602f);text-decoration:underline}

/* Khôi phục vị trí nhận diện v5.00, ghi rõ cột để không bị tự xếp sau các nút. */
@media(min-width:701px){.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto!important;align-items:center;height:auto;min-height:100px}.topbar>.brand{grid-column:1!important;grid-row:1!important;justify-self:start;min-width:0}.topbar>#historyButton{grid-column:2!important;grid-row:1!important}.topbar>#reviewJournal{grid-column:3!important;grid-row:1!important}.topbar .brand-logo{width:46px;height:46px;flex-basis:46px;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;mix-blend-mode:multiply}.topbar .original-wordmark{width:176px!important;height:60px!important;max-width:55vw}}
@media(max-width:700px){.topbar>.brand{grid-column:1/-1!important;grid-row:1!important;justify-self:start}.topbar>#historyButton{grid-column:1!important;grid-row:2!important}.topbar>#reviewJournal{grid-column:2!important;grid-row:2!important}.topbar .brand-logo{width:46px;height:46px;flex-basis:46px;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;mix-blend-mode:multiply}.topbar .original-wordmark{width:135px!important;height:46px!important}.topbar .brand-text small{display:none}}

/* 5.36: hàng nhập ngày giờ có cùng cột, không để nội dung đẩy rộng lưới. */
#birthWheel .birth-wheels{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px;margin:10px 0}#birthWheel label,#destinyForm .row>label{min-width:0;margin:0}#birthWheel select,#destinyForm select,#destinyForm input:not([type=checkbox]){box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:48px;font-size:16px}#destinyForm>.row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#destinyForm .zi-options{min-width:0}#chartKindTabs{display:none!important}#destinyResult>.result-controls,#destinyResult>.destiny-download-bar{display:flex!important;justify-content:center;align-items:center;width:auto;max-width:100%;margin:8px 0;padding:8px;background:transparent;border:0;min-height:0;box-shadow:none}#destinyDownload{width:auto;max-width:100%;margin:0;padding:12px 22px;min-height:44px}#destinySheetPreview{width:100%;min-width:0}#destinySheetPreview img,.compact-result-image{display:block;max-width:100%;height:auto;cursor:pointer}.ziwei-sheet-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(4,minmax(220px,auto));align-items:stretch}.ziwei-palace{min-width:0;overflow-wrap:anywhere}.wb-zi-map{grid-template-columns:repeat(4,minmax(0,1fr))!important;min-width:0}.wb-zi-map button{min-width:0;overflow-wrap:anywhere}.mode-tabs [data-destiny=days] .tool-icon,.mode-tabs [data-owner-tools] .tool-icon,.met-hub-nav .tool-icon{box-sizing:border-box;width:48px;height:48px;min-width:48px;object-fit:cover;border-radius:50%;border:2px solid #a32d29;background:#fff6e4}.met-hub-nav button{min-height:78px;gap:10px;align-items:center}.met-hub-nav button[aria-selected=true]{color:var(--hcq-cfffaf0,#fffaf0)}.mode-tabs [data-destiny=bazi] .tool-icon{border-radius:50%;object-fit:cover}@media(min-width:1120px){.mode-tabs{grid-template-columns:repeat(9,minmax(0,1fr))!important}}@media(max-width:600px){#birthWheel .birth-wheels{gap:8px}#birthWheel select{padding:8px 4px;font-size:16px}#destinyForm>.row{gap:10px}.met-hub-nav .tool-icon{width:40px;height:40px;min-width:40px}.ziwei-sheet-grid{min-width:660px}.destiny-readable{overflow-x:auto}}

.topbar:not(:has(#reviewJournal)){grid-template-columns:minmax(0,1fr) auto!important}.topbar:not(:has(#reviewJournal))>#historyButton{grid-column:2!important;grid-row:1!important}@media(max-width:700px){.topbar:not(:has(#reviewJournal))>#historyButton{grid-column:1/-1!important;grid-row:2!important;justify-self:stretch}.topbar:not(:has(#reviewJournal)){grid-template-columns:minmax(0,1fr)!important}}

/* Chỉ còn nhận diện ở đầu trang, tám ô phương pháp chia đều. */
.topbar{grid-template-columns:minmax(0,1fr)!important}.topbar>.brand{grid-column:1!important;grid-row:1!important}.mode-tabs{grid-template-columns:repeat(4,minmax(0,1fr))!important;align-items:stretch}.mode-tabs>button{min-width:0;width:100%;height:100%;box-sizing:border-box;overflow-wrap:anywhere}.serial-method-tabs{display:flex;gap:10px;padding:8px;margin:12px auto;max-width:880px;border:1px solid var(--hcq-cd7decc,#d7decc);border-radius:10px;background:var(--hcq-cfffaf0,#fffaf0)}.serial-method-tabs[hidden]{display:none!important}.serial-method-tabs>button{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:10px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--hcq-c205542,#46602f)}.serial-method-tabs>button[aria-selected=true]{background:var(--hcq-ce6eee1,#e6eee1);border-color:#9ca495;font-weight:700}.serial-method-tabs img{width:32px;height:32px;object-fit:cover;border-radius:50%;border:1px solid #9d3b2d}.sheet-image-download{display:block;line-height:0;max-width:100%}.sheet-image-download:focus-visible{outline:3px solid var(--ds-brand,#4a6337)}.image-share{margin-left:8px;min-height:44px}#pngButton:disabled,#destinyDownload:disabled{opacity:.65}.compact-result-image{touch-action:manipulation}@media(min-width:1120px){.mode-tabs{grid-template-columns:repeat(8,minmax(0,1fr))!important}}

.topbar:not(:has(#reviewJournal)){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto!important;row-gap:0}.image-share[hidden]{display:none!important}

/* Ba cột cân nhau để chín phương pháp trên điện thoại thành ba hàng gọn. */
.mode-tabs{grid-auto-rows:1fr}
.topbar>#historyButton{display:none!important}
@media(max-width:700px){.mode-tabs{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:700px){.met-hub-nav>button[data-almanac="trungtang"],.feng-method-group>button[data-huangquan]{grid-column:1/-1;width:calc(50% - 3px);justify-self:center}}
.site-search{position:relative;z-index:10;max-width:1200px;margin:10px auto 0;padding:10px 16px;border:1px solid #d7c89f;border-radius:12px;background:var(--hcq-cfffaf0,#fffaf0);box-shadow:0 2px 8px #3d4b3514}.site-search form{display:grid;gap:6px}.site-search label{font-weight:600;color:var(--hcq-c205542,#46602f)}.site-search-row{display:flex;gap:8px}.site-search input{flex:1;min-width:0;min-height:44px;padding:9px 12px;border:1px solid #c9c3b4;border-radius:8px;background:var(--hcq-cfffefa,#fffefa);font:inherit}.site-search-row button{min-width:72px;min-height:44px;border:1px solid var(--hcq-c205542,#46602f);border-radius:8px;background:var(--hcq-c205542,#46602f);color:#fff;font:inherit}.site-search-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px}.site-search-result{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;padding:9px 11px;border:1px solid #d8d4c6;border-radius:8px;background:var(--hcq-cfffefa,#fffefa);color:#36412d;text-align:left;overflow-wrap:anywhere}.site-search-result small,.site-search-status{color:#6b6a5e;font-size:.85rem}.site-search-status{margin:4px 0 0;min-height:1em}@media(max-width:600px){.site-search{margin:8px 12px 0;padding:10px}.site-search-results{grid-template-columns:minmax(0,1fr)}.site-search-result{min-height:44px}}
/* Lưới logo có số cột cố định và hàng cuối được căn giữa trên mọi màn hình. */
@media(min-width:701px){.mode-tabs{grid-template-columns:repeat(8,minmax(0,1fr))}.mode-tabs>button:nth-child(9){grid-column-start:2}}
@media(max-width:700px){.mode-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}.mode-tabs>button:last-child{grid-column:2/span 2}}

/* 5.38: từng lựa chọn là một thẻ riêng, hai cột bằng nhau. */
.serial-method-tabs,.manual-method-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding:0!important;border:0!important;background:transparent!important;box-sizing:border-box;align-items:stretch}
.serial-method-tabs[hidden],.manual-method-tabs[hidden]{display:none!important}
.serial-method-tabs>button,.manual-method-tabs>button{display:flex!important;justify-content:center;align-items:center;gap:10px;box-sizing:border-box;min-width:0;width:100%!important;min-height:64px;height:100%;margin:0!important;padding:12px!important;border:1px solid #b7c6ae!important;border-radius:10px!important;background:var(--hcq-cfffaf0,#fffaf0);color:var(--hcq-c205542,#46602f);font-size:16px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
.serial-method-tabs>button[aria-selected=true],.manual-method-tabs>button[aria-selected=true]{background:var(--hcq-ce6eee1,#e6eee1);border-color:var(--hcq-c779c7e,#89947f)!important;box-shadow:inset 0 -2px var(--hcq-c779c7e,#89947f);font-weight:700}
.serial-method-tabs img,.manual-method-tabs img{width:32px!important;height:32px!important;min-width:32px;object-fit:cover;border-radius:50%}
#destinyForm{column-gap:12px!important;row-gap:14px!important}#destinyForm>label{min-width:0;margin:0!important;align-self:stretch}#destinyForm>label:has(#birthLeap){display:flex;align-items:center;gap:8px;min-height:74px}#destinyForm select,#destinyForm input:not([type=checkbox]){height:48px;min-height:48px;margin-top:6px}#destinyForm>.row{gap:12px!important}#destinyForm>label:has(#birthLeap) input{flex:0 0 auto;width:22px;height:22px;margin:0}#destinyForm>label:has(#birthLeap){grid-column:auto!important}
@media(max-width:600px){.serial-method-tabs,.manual-method-tabs{gap:8px!important}.serial-method-tabs>button,.manual-method-tabs>button{padding:10px 6px!important;font-size:14px;gap:6px}#destinyForm{column-gap:10px!important}}

/* 5.45: các thẻ công cụ dùng cùng chiều rộng; ô lẻ và Tụ Bảo Lâu được căn giữa. */
.met-hub-nav{grid-auto-rows:1fr;align-items:stretch}
.met-hub-nav>button{box-sizing:border-box;min-width:0;width:100%;height:100%;min-height:78px;overflow-wrap:anywhere}
@media(max-width:700px){.met-hub-nav>button[data-owner-tools],.met-hub-nav>button[data-almanac="trungtang"],.feng-method-group>button[data-huangquan]{grid-column:1/-1!important;width:calc(50% - 4px)!important;justify-self:center!important}.met-hub-nav>button[data-owner-tools]{min-height:78px}}
/* Một ô cuối chiếm đúng một cột; nếu có phương pháp thứ chín thì đặt giữa hàng. */
.mode-tabs>button:last-child{grid-column:auto!important}
@media(min-width:701px){.mode-tabs>button:nth-child(9){grid-column-start:4!important}}
@media(max-width:700px){.mode-tabs>button:nth-child(9){grid-column:2!important}}
/* 6.53: trên điện thoại nút LẬP QUẺ nổi dính đáy màn hình khi cuộn trong form. */
@media(max-width:700px){#castForm .form-actions{position:sticky;bottom:0;z-index:5;margin:12px -12px 0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:linear-gradient(#fbf4de00,#fbf4def2 30%);border-radius:0 0 12px 12px}}
@media(max-width:700px){#castForm .form-actions .cast-button{min-height:56px;height:56px;font-size:26px}#castForm .form-actions .secondary{font-size:14px;padding:8px 14px;min-width:96px;height:56px}}

/* polish-548.css */
/* 5.48 · Thẻ công cụ khu riêng cùng cỡ với thẻ công cụ chính, bỏ nền đỏ, cuộn mượt hơn. */
:root{--hqq-sel-bg:#edf3e4;--hqq-sel-ink:#3f5530;--hqq-sel-line:#55703f;--hqq-sel-gold:#b99b5e}

/* Ảnh nền núi: tách thành lớp riêng để khi cuộn trình duyệt không phải vẽ lại cả trang. */
body{background-image:none!important;background-attachment:scroll!important}
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:url("../landscape.svg") no-repeat 50% 0/100% auto;transform:translateZ(0)}

/* Mục đang chọn: cùng màu xanh như thẻ "Lập quẻ bằng tay", thay cho nền đỏ chữ xanh khó đọc. */
.calendar-view-tabs button[aria-selected=true],.met-hub-nav.calendar-view-tabs button[type][aria-selected=true]{background:var(--hqq-sel-bg)!important;color:var(--hqq-sel-ink)!important;border-color:var(--hqq-sel-line)!important;box-shadow:inset 0 -3px var(--hqq-sel-gold)!important;font-weight:700!important}
.calendar-view-tabs button[aria-selected=true] span{color:inherit!important}
#destinyTitle{background:var(--hqq-sel-bg)!important;color:var(--hqq-sel-ink)!important;border:1px solid var(--hqq-sel-line)!important;box-shadow:inset 0 -3px var(--hqq-sel-gold)!important}

/* Thẻ công cụ Tụ Bảo Lâu: cùng kích thước, bố cục và màu với hàng thẻ công cụ chính phía trên.
   Không đặt display ở đây để không phá lệnh ẩn thanh công cụ khi chuyển sang trang khác. */
.met-hub-nav.calendar-view-tabs{grid-template-columns:repeat(8,minmax(0,1fr))!important;grid-auto-rows:auto!important;grid-auto-flow:row dense!important;align-items:stretch!important;gap:8px!important;overflow:visible!important}
.met-hub-nav.calendar-view-tabs>button[type],.met-hub-nav.calendar-view-tabs .feng-method-group>button[type]{grid-column:auto!important;justify-self:stretch!important;box-sizing:border-box!important;width:100%!important;height:auto!important;min-width:0!important;min-height:92px!important;margin:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;padding:10px 6px!important;border:1px solid #d6c5a3!important;border-radius:12px!important;background:#fff8e9!important;color:#675c49!important;font-size:11px!important;font-weight:400!important;line-height:1.35!important;text-align:center!important;white-space:normal!important;overflow-wrap:anywhere;box-shadow:none!important}
.met-hub-nav.calendar-view-tabs>button[type]:not([aria-selected=true]):hover,.met-hub-nav.calendar-view-tabs .feng-method-group>button[type]:not([aria-selected=true]):hover{background:#fff3dc!important;border-color:#c8ae7c!important}
.met-hub-nav.calendar-view-tabs button[type] span{color:inherit!important;font:inherit!important}
.met-hub-nav.calendar-view-tabs .tool-icon{box-sizing:border-box!important;width:38px!important;height:38px!important;min-width:38px!important;margin:0!important;object-fit:cover!important;border-radius:50%!important;border:2px solid #a32d29!important;background:#fff6e4!important}
.met-hub-nav.calendar-view-tabs .feng-method-group{grid-column:span 3!important;width:auto!important;justify-self:stretch!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;align-content:start;gap:8px!important;padding:8px!important;border:1px solid #c1c7bc!important;border-radius:12px!important;background:#f4f7ee!important;box-sizing:border-box}
.met-hub-nav.calendar-view-tabs .feng-group-title{grid-column:1/-1;margin:0;font-size:12px;line-height:1.2;color:#3f5530}
/* 6.61 · Nhóm Phong thủy nằm riêng một hàng, ở giữa khung, ô vẫn rộng bằng ô hàng trên. */
.met-hub-nav.calendar-view-tabs .feng-method-group{grid-column:1/-1!important;justify-self:center!important;width:calc((100% - 56px)*3/8 + 16px)!important}
@media (max-width:1100px){.met-hub-nav.calendar-view-tabs{grid-template-columns:repeat(4,minmax(0,1fr))!important}.met-hub-nav.calendar-view-tabs .feng-method-group{width:calc((100% - 24px)*3/4 + 16px)!important}}
/* Điện thoại: 3 cột như hàng thẻ chính, nhóm Phong thủy chiếm trọn một hàng. */
@media (max-width:640px){
 .met-hub-nav.calendar-view-tabs{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
 .met-hub-nav.calendar-view-tabs>button[type],.met-hub-nav.calendar-view-tabs .feng-method-group>button[type]{min-height:100px!important;padding:6px 3px!important;font-size:10px!important}
 .met-hub-nav.calendar-view-tabs .tool-icon{width:40px!important;height:40px!important;min-width:40px!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group{grid-column:1/-1!important;width:auto!important;justify-self:stretch!important;gap:6px!important;padding:6px!important}
}

/* 5.49 · Bảng phân tích hào Lục Hào và Thể Dụng Mai Hoa dưới phiếu quẻ. */
.cast-analysis{margin:14px 0 6px;padding:10px 14px;border:1px solid #c1c7bc;border-radius:12px;background:#fbfcf6;color:#2d3328}
.cast-analysis>summary{cursor:pointer;font-weight:700;color:#3f5530}
.cast-analysis h3{margin:10px 0 4px;font-size:16px;color:#3f5530}
.cast-analysis .ca-meta{margin:0 0 6px;font-size:13px}
.cast-analysis .ca-scroll{overflow-x:auto}
.cast-analysis .ca-table{width:100%;border-collapse:collapse;font-size:13px;min-width:560px}
.cast-analysis .ca-table th,.cast-analysis .ca-table td{border:1px solid #dcdfd9;padding:5px 7px;text-align:left;vertical-align:top}
.cast-analysis .ca-table th{background:#edf3e4;color:#3f5530}
.cast-analysis .ca-table small{display:block;color:#5d6b62;font-size:11.5px;margin-top:2px}
.cast-analysis tr.ca-moving td:first-child{font-weight:700}
.cast-analysis .ca-chip{display:inline-block;margin:1px 2px 1px 0;padding:1px 6px;border-radius:9px;background:#f1efe6;font-size:12px;white-space:nowrap}
.cast-analysis .ca-chip.good{background:#e3f1dc;color:#2e7d32}
.cast-analysis .ca-chip.bad{background:#fbe4e1;color:#c62828}
.cast-analysis .ca-tsd{display:block;margin-top:3px}
.cast-analysis .ca-chip.ca-ts{background:#fff;border:1px solid #cfd5c4;color:#3f5530}
.cast-analysis .ca-state{display:inline-block;padding:1px 7px;border-radius:9px;font-size:12px;font-weight:700;background:#f1efe6}
.cast-analysis .ca-v,.cast-analysis .ca-t{background:#e3f1dc;color:#2e7d32}
.cast-analysis .ca-tu{background:#fbe4e1;color:#c62828}
.cast-analysis .ca-h{background:#fdf3d0;color:#a87a12}
.cast-analysis .ca-help{margin:6px 0 0;font-size:12px;color:#5d6b62}
@media (max-width:640px){.cast-analysis{padding:8px 10px}.cast-analysis .ca-table.ca-liuhao{min-width:0}.cast-analysis .ca-liuhao thead{display:none}.cast-analysis .ca-liuhao,.cast-analysis .ca-liuhao tbody,.cast-analysis .ca-liuhao tr,.cast-analysis .ca-liuhao td{display:block;width:auto}.cast-analysis .ca-liuhao tr{border:1px solid #dcdfd9;border-radius:10px;margin:0 0 8px;padding:4px 8px;background:#fff}.cast-analysis .ca-liuhao td{border:0;padding:3px 0 3px 90px;position:relative;min-height:20px}.cast-analysis .ca-liuhao td::before{content:attr(data-label);position:absolute;left:0;top:4px;width:84px;color:#5d6b62;font-size:12px;font-weight:400}.cast-analysis .ca-liuhao td:first-child{font-weight:700;color:#3f5530}.cast-analysis .ca-chip{white-space:normal}}

/* 5.51 · Màn hình hẹp (dưới 1120px): 8 thẻ công cụ chính xếp thẳng 2 hàng ngang, mỗi hàng 4 thẻ, biểu tượng nhỏ lại. */
@media (max-width:1119px){
 .mode-tabs{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-flow:row!important;grid-auto-columns:auto!important;gap:6px!important;max-width:none!important;width:100%!important}
 .mode-tabs>button,.mode-tabs>button:last-child,.mode-tabs>button:nth-child(9){grid-column:auto!important;grid-row:auto!important;width:100%!important;min-width:0!important;min-height:0!important;height:auto!important;padding:8px 4px!important;gap:4px!important;font-size:12px!important;line-height:1.3!important;white-space:normal!important;overflow-wrap:anywhere}
 .mode-tabs .tool-icon,.mode-tabs button[aria-selected=true] .tool-icon,.mode-tabs [data-destiny=days] .tool-icon,.mode-tabs [data-owner-tools] .tool-icon{width:34px!important;height:34px!important;min-width:34px!important;margin:0 auto!important}
 .met-hub-nav.calendar-view-tabs{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important}
 .met-hub-nav.calendar-view-tabs>button[type],.met-hub-nav.calendar-view-tabs .feng-method-group>button[type]{min-height:0!important;padding:8px 4px!important;font-size:12px!important}
 .met-hub-nav.calendar-view-tabs .tool-icon{width:34px!important;height:34px!important;min-width:34px!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group{grid-column:1/-1!important;width:calc((100% - 18px)*3/4 + 12px)!important}
}
@media (max-width:640px){.met-hub-nav.calendar-view-tabs .feng-method-group{width:auto!important;justify-self:stretch!important}}
/* 6.70 · Xếp ô theo dòng, canh giữa: hàng cuối (ô lẻ + nhóm Phong thủy) nằm chung một hàng ở giữa, ô vẫn rộng bằng ô hàng trên.
   Chữ "Phong thủy" nằm trên viền khung để khung chỉ cao hơn ô một chút. */
@media screen{
 .met-hub-nav.calendar-view-tabs:not([hidden]){--hub-cols:8;--hub-gap:8px;display:flex!important;flex-wrap:wrap!important;justify-content:center!important;align-items:stretch!important;gap:var(--hub-gap)!important;row-gap:calc(var(--hub-gap) + 6px)!important}
 .met-hub-nav.calendar-view-tabs>button[type]{flex:0 0 calc((100% - (var(--hub-cols) - 1)*var(--hub-gap))/var(--hub-cols))!important;width:auto!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group{order:1;position:relative;flex:0 0 calc((100% - (var(--hub-cols) - 1)*var(--hub-gap))*3/var(--hub-cols) + 2*var(--hub-gap))!important;width:auto!important;padding:6px!important;gap:6px!important;align-content:stretch!important}
 .met-hub-nav.calendar-view-tabs .feng-group-title{position:absolute;top:-9px;left:12px;padding:0 6px;border:1px solid #c1c7bc;border-radius:8px;background:#f4f7ee;font-size:11px;line-height:16px}
}
@media screen{.met-hub-nav.calendar-view-tabs .feng-method-group.bat-mon-group{order:2;flex:0 0 calc((100% - (var(--hub-cols) - 1)*var(--hub-gap))*var(--n,1)/var(--hub-cols) + (var(--n,1) - 1)*var(--hub-gap) + 14px)!important;grid-template-columns:repeat(var(--n,1),minmax(0,1fr))!important}}
/* 6.75 · Form Kim Oanh Ký: hai ô mỗi hàng, đều nhau; ô tích nằm cùng dòng với chữ. */
.ko-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end}
.ko-row label{margin:0}
.ko-row[hidden]{display:none}
.ko-check{display:flex!important;align-items:center;gap:8px;margin:10px 0!important}
.ko-check input{width:18px!important;height:18px!important;min-height:0!important;margin:0!important;flex:0 0 auto}
@media screen and (max-width:1119px){.met-hub-nav.calendar-view-tabs:not([hidden]){--hub-cols:4;--hub-gap:6px}}
@media screen and (max-width:640px){.met-hub-nav.calendar-view-tabs:not([hidden]){--hub-cols:3}.met-hub-nav.calendar-view-tabs .feng-method-group{flex-basis:100%!important}}
@media (max-width:480px){
 .mode-tabs{gap:4px!important}
 .mode-tabs>button,.mode-tabs>button:last-child,.mode-tabs>button:nth-child(9),.met-hub-nav.calendar-view-tabs>button[type],.met-hub-nav.calendar-view-tabs .feng-method-group>button[type]{padding:6px 2px!important;font-size:10.5px!important}
 .mode-tabs .tool-icon,.mode-tabs button[aria-selected=true] .tool-icon,.mode-tabs [data-destiny=days] .tool-icon,.mode-tabs [data-owner-tools] .tool-icon,.met-hub-nav.calendar-view-tabs .tool-icon{width:28px!important;height:28px!important;min-width:28px!important}
}

/* 7.91 · Ô lấy số còn nằm trên thanh chính (mã gom chưa chạy kịp) thì ẩn, tránh nháy 12 ô. */
.mode-tabs>button[data-mode=phone],.mode-tabs>button[data-mode=random]{display:none!important}

/* 5.54 · Phân tích bổ sung Huyền Không, Bát Trạch, Lịch ngày. */
.fx-extra{margin:16px 0 4px;padding:10px 14px;border:1px solid #c1c7bc;border-radius:12px;background:#fbfcf6;color:#2d3328}
.fx-extra>summary{cursor:pointer;font-weight:700;color:#3f5530}
.fx-extra h3{margin:12px 0 6px;font-size:17px;color:#3f5530}
.fx-extra h4{margin:14px 0 6px;font-size:15px;color:#3f5530}
.fx-extra p{margin:6px 0}
.fx-extra .fx-note{font-size:12.5px;color:#5d6b62}
.fx-tag{display:inline-block;margin:1px 2px;padding:1px 7px;border-radius:9px;background:#f1efe6;font-size:12.5px;font-weight:600}
.fx-tag.good{background:#e3f1dc;color:#2e7d32}
.fx-tag.bad{background:#f8e3df;color:#8a2a20}
.fx-scroll{overflow-x:auto}
.fx-table{width:100%;border-collapse:collapse;font-size:13px;min-width:520px}
.fx-table th,.fx-table td{border:1px solid #dcdfd9;padding:5px 7px;text-align:left;vertical-align:top}
.fx-table th{background:#edf3e4;color:#3f5530}
.fx-table small{color:#5d6b62}
.fx-grid article p{font-size:12px;margin:4px 0}
.fx-controls{display:flex;flex-wrap:wrap;gap:10px;margin:6px 0 10px}
.fx-controls label{display:grid;gap:4px;font-size:13px;min-width:160px}
.fx-list{margin:6px 0;padding-left:18px}.fx-list li{margin:4px 0}

/* 5.56 · Chống giật và trắng màn hình trên điện thoại (iPhone):
   ảnh nền núi trước đây là SVG có hiệu ứng mờ (blur), bị phóng theo chiều cao form rất dài nên máy phải vẽ lại ảnh cực lớn khi cuộn.
   Nay dùng ảnh JPG dựng sẵn (landscape-bg.jpg, 40 KB), chỉ đặt ở phần đầu khung, không phóng theo chiều cao. */
body::before{inset:auto!important;top:0!important;left:0!important;right:0!important;height:100vh!important;background-image:url("../landscape-bg.jpg")!important}
.paper{background-image:linear-gradient(#ffffff70,#ffffff90),url("../landscape-bg.jpg")!important;background-size:100% 100%,100% auto!important;background-position:0 0,center top!important;background-repeat:no-repeat!important;background-color:#f4f2ea!important}
.cast-form{background-image:linear-gradient(#fcf4ddd9,#fcf4dde3),url("../landscape-bg.jpg")!important;background-size:100% 100%,100% auto!important;background-position:0 0,center top!important;background-repeat:no-repeat!important;background-color:#eef0ea!important}
.tool-hero{background-image:linear-gradient(#ffffff95,#e6eef4ab),url("../landscape-bg.jpg")!important;background-size:100% 100%,100% auto!important;background-position:0 0,center top!important;background-repeat:no-repeat!important}
@media (max-width:700px){.paper{background-image:linear-gradient(#ffffff65,#ffffff98),url("../landscape-bg.jpg")!important}}

/* 5.59 · Phiếu quẻ cuộn mượt hơn trên iPhone: logo chìm phía sau phiếu không dùng chế độ hòa trộn màu (mix-blend-mode),
   vốn bắt máy tính lại cả vùng phiếu ở mỗi khung hình khi cuộn. Độ mờ giữ nguyên nên nhìn gần như không đổi. */
.result-sheet::before,.hqq-branded-sheet::after{mix-blend-mode:normal!important}
.compact-result-image{content-visibility:visible}

/* 6.06 · Logo công cụ to hơn khoảng một phần tư: máy tính 48px, máy tính bảng 42px, điện thoại 36px. */
.mode-tabs .tool-icon,.mode-tabs button[aria-selected=true] .tool-icon,.mode-tabs [data-destiny=days] .tool-icon,.mode-tabs [data-owner-tools] .tool-icon,.met-hub-nav .tool-icon,.met-hub-nav.calendar-view-tabs .tool-icon{width:48px!important;height:48px!important;min-width:48px!important}
@media (max-width:1119px){.mode-tabs .tool-icon,.mode-tabs button[aria-selected=true] .tool-icon,.mode-tabs [data-destiny=days] .tool-icon,.mode-tabs [data-owner-tools] .tool-icon,.met-hub-nav .tool-icon,.met-hub-nav.calendar-view-tabs .tool-icon{width:30px!important;height:30px!important;min-width:30px!important}}
@media (max-width:480px){.mode-tabs .tool-icon,.mode-tabs button[aria-selected=true] .tool-icon,.mode-tabs [data-destiny=days] .tool-icon,.mode-tabs [data-owner-tools] .tool-icon,.met-hub-nav .tool-icon,.met-hub-nav.calendar-view-tabs .tool-icon{width:30px!important;height:30px!important;min-width:30px!important}}
/* 6.07 · Nền trang sáng hơn: ngà ấm thay xám be; tranh sơn thủy chỉ còn mờ nhẹ phía sau. */
body{background-color:#fdf8ec!important;background-image:radial-gradient(ellipse at 50% 0%,#fffefa 0%,#fdf7e8 55%,#f8edd6 100%)!important;background-attachment:fixed!important}
.topbar{background-color:#fffbf1!important}
main.paper{background-color:#fffdf7!important;background-image:linear-gradient(#ffffffd1,#fffdf7eb),url("../landscape-bg.jpg")!important}
#castForm{background-color:#fffcf4!important;background-image:linear-gradient(#fffdf6e8,#fffaf0f2),url("../landscape-bg.jpg")!important}/* 6.08 · Nền trang là logo rồng – thái cực chìm mờ, cố định giữa màn hình; bỏ tranh sơn thủy. */
body::before{content:""!important;position:fixed!important;inset:0!important;z-index:-1!important;pointer-events:none!important;background:url("../logo-wm.webp") center 55%/min(80vw,560px) auto no-repeat!important;opacity:.1!important;filter:none!important;transform:none!important}
main.paper{background-color:#fffdf785!important;background-image:none!important}
#castForm{background-color:#fffcf480!important;background-image:none!important}/* 6.08 · Nền ô công cụ trắng sáng, logo có bóng nhẹ để nổi lên trên nền ngà; ô đang chọn giữ nền ngọc. */
.mode-tabs button:not([aria-selected=true]),.met-hub-nav button:not([aria-selected=true]){background:#ffffff!important;border-color:#e3cf9f!important;box-shadow:0 1px 3px #6d302324!important}
.mode-tabs .tool-icon,.met-hub-nav .tool-icon{filter:drop-shadow(0 2px 3px rgba(90,40,20,.38))!important}
/* 6.93 · Ô đang chọn trong khung vẫn tô xanh: luật nền ô trong khung (dòng 16) cùng độ ưu tiên nên đè mất luật chọn; luật này ưu tiên cao hơn nên đặt trước mục 6.14. */
.met-hub-nav.calendar-view-tabs .feng-method-group>button[type][aria-selected=true]{background:var(--hqq-sel-bg)!important;color:var(--hqq-sel-ink)!important;border-color:var(--hqq-sel-line)!important;box-shadow:inset 0 -3px var(--hqq-sel-gold)!important;font-weight:700!important}
/* 6.14 · Cùng một tông nền kem cho mọi ô công cụ chưa chọn (trước đây hàng trên nền trắng, hàng phụ nền kem). */
.mode-tabs button:not([aria-selected=true]),.met-hub-nav button:not([aria-selected=true]),.met-hub-nav.calendar-view-tabs>button[type]:not([aria-selected=true]),.met-hub-nav.calendar-view-tabs .feng-method-group>button[type]:not([aria-selected=true]){background:#fff8e9!important;border-color:#dcc9a2!important;box-shadow:0 1px 3px #6d30231f!important}
.mode-tabs button:not([aria-selected=true]):hover,.met-hub-nav button:not([aria-selected=true]):hover,.met-hub-nav.calendar-view-tabs>button[type]:not([aria-selected=true]):hover,.met-hub-nav.calendar-view-tabs .feng-method-group>button[type]:not([aria-selected=true]):hover{background:#fff3dc!important;border-color:#c8ae7c!important}
/* 6.16 · mobile-polish.css còn quy tắc cũ ép ô thứ 9 (Trạch Nhật) bắt đầu ở cột 4: khi một ô bị ẩn (Số điện thoại / Dãy số ngẫu nhiên) hàng trên hụt một ô và hàng dưới trống 3 ô đầu. Cho xếp tự động. */
@media(min-width:1120px){.mode-tabs>button:nth-child(9){grid-column:auto!important;grid-row:auto!important}}
/* 6.17 · Nền mọi ô công cụ và nền sau logo đổi sang trắng (Quân muốn trắng hết); ô đang chọn giữ nền xanh nhạt. */
.mode-tabs button:not([aria-selected=true]),.met-hub-nav button:not([aria-selected=true]),.met-hub-nav.calendar-view-tabs>button[type]:not([aria-selected=true]),.met-hub-nav.calendar-view-tabs .feng-method-group>button[type]:not([aria-selected=true]){background:#ffffff!important}
.mode-tabs button:not([aria-selected=true]):hover,.met-hub-nav button:not([aria-selected=true]):hover,.met-hub-nav.calendar-view-tabs>button[type]:not([aria-selected=true]):hover,.met-hub-nav.calendar-view-tabs .feng-method-group>button[type]:not([aria-selected=true]):hover{background:#fffaf0!important}
/* 6.18 · Logo có khung tròn vẽ sẵn, ngoài khung trong suốt: nền sau logo để trong suốt, nếu tô trắng thì bóng đổ thành ô vuông trắng quanh logo. */
.mode-tabs .tool-icon,.met-hub-nav .tool-icon{background:transparent!important}
/* 6.35 · Tab Tụ Bảo Lâu đứng đầu hàng tab lịch; thứ tự gốc nằm trong app.js đã đóng gói. */
.calendar-view-tabs>[data-calendar-view=tbl]{order:-1}
/* 6.82 · Khung Kim Oanh Ký không tràn hai bên khi màn hình hẹp: ô nhiều hơn số cột thì xuống hàng, hàng cuối canh giữa, ô rộng bằng ô hàng trên. */
@media screen and (max-width:1119px){
 .met-hub-nav.calendar-view-tabs .feng-method-group.bat-mon-group{flex:0 0 100%!important;display:flex!important;flex-wrap:wrap!important;justify-content:center!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group.bat-mon-group>button[type]{flex:0 0 calc((100% - (var(--hub-cols) - 1)*var(--hub-gap))/var(--hub-cols))!important}
}
/* 6.83 · Điện thoại: hàng ô Tụ Bảo Lâu 4 ô một hàng như hàng thẻ chính, ô gọn lại. Nhóm Phong thủy chiếm 3 ô, nằm cùng hàng với ô lẻ như máy tính bảng. */
@media screen and (max-width:640px){
 .met-hub-nav.calendar-view-tabs:not([hidden]){--hub-cols:4}
 .met-hub-nav.calendar-view-tabs .feng-method-group:not(.bat-mon-group){flex-basis:calc((100% - (var(--hub-cols) - 1)*var(--hub-gap))*3/var(--hub-cols) + 2*var(--hub-gap))!important}
 .met-hub-nav.calendar-view-tabs>button[type],.met-hub-nav.calendar-view-tabs .feng-method-group>button[type]{min-height:0!important;padding:6px 2px!important;font-size:10.5px!important;line-height:1.25!important}
}
/* 6.84 · Khung Phong thủy và Kim Oanh Ký không tô nền, cùng màu nền trang với các ô khác. Giữ viền mảnh và nhãn tên nhóm. */
.met-hub-nav.calendar-view-tabs .feng-method-group{background:transparent!important}
.met-hub-nav.calendar-view-tabs .feng-group-title{background:#fdf8ec!important}
/* 6.87 · Thẻ So sánh ngày giờ trong hàng Lịch Vạn Niên: khi chọn thì ẩn phần lịch, chỉ hiện công cụ so sánh. */
.almanac.dc-active>:not(h2):not(.calendar-view-tabs):not(#dateCompareView){display:none!important}
#dateCompareView[hidden]{display:none!important}
/* 6.89 · Form So sánh ngày giờ: nhãn dài xuống dòng thì ô nhập vẫn thẳng hàng ở đáy (Safari iPhone không theo align-items:end). Ô Bản Đổng Công rộng hết hàng để không cắt chữ. */
#dateCompareForm .wb-fields{display:grid!important;align-items:stretch!important;gap:12px 14px!important}
#dateCompareForm .wb-fields>label{display:flex!important;flex-direction:column!important;justify-content:flex-end!important;gap:4px!important;margin:0!important;min-width:0}
#dateCompareForm .wb-fields>label>:is(input,select){box-sizing:border-box;width:100%;height:44px;margin:0}
#dateCompareForm .wb-fields>label:last-child{grid-column:1/-1}
/* 6.90 · Hàng ô Tụ Bảo Lâu xếp lưới đều: điện thoại, máy tính bảng 4 ô một hàng, máy tính 8 ô. Bỏ khung nhóm Phong thủy và Kim Oanh Ký
   (khung chỉ còn là nhóm cho trình đọc màn hình), ô trong nhóm nằm chung lưới, theo thứ tự: ô lịch, Phong thủy, Kim Oanh Ký. */
@media screen{
 .met-hub-nav.calendar-view-tabs:not([hidden]){display:grid!important;grid-template-columns:repeat(var(--hub-cols),minmax(0,1fr))!important;gap:var(--hub-gap)!important;row-gap:var(--hub-gap)!important;align-items:stretch!important}
 .met-hub-nav.calendar-view-tabs>button[type],.met-hub-nav.calendar-view-tabs .feng-method-group>button[type]{flex:none!important;width:auto!important;height:auto!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group,.met-hub-nav.calendar-view-tabs .feng-method-group.bat-mon-group{display:contents!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group:not(.bat-mon-group)>button[type]{order:1}
 .met-hub-nav.calendar-view-tabs .feng-method-group.bat-mon-group>button[type]{order:2}
 .met-hub-nav.calendar-view-tabs .feng-group-title{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important}
}
/* 6.92 · Bát Trạch Minh Cảnh: mỗi hướng một thẻ thay bảng 4 cột. Điện thoại 1 cột, màn rộng 2 cột. */
.bt-cards{display:grid;grid-template-columns:1fr;gap:10px;margin:8px 0 16px}
@media (min-width:700px){.bt-cards{grid-template-columns:1fr 1fr}}
.bt-card{border:1px solid #e3d6b8;border-left:5px solid #b9a77e;border-radius:10px;background:#fffdf6;padding:10px 12px}
.bt-card.good{border-left-color:#5d7b47}.bt-card.bad{border-left-color:#a32d29}
.bt-card h4{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0;font-size:16px}
.bt-card .bt-dir{font-weight:700;color:#2b2a24}
.bt-card .bt-meta{margin:2px 0 6px;font-size:13px;color:#6b665a}
.bt-card ul{margin:0;padding-left:18px}.bt-card li{margin:3px 0;line-height:1.45}
.bt-card li b{color:#3d4a40;font-weight:600}
/* 6.93 · Khu riêng chia hàng ô thành từng khung xếp chồng có tên: Ngày giờ · chọn ngày, Phong thủy, Độn số · bấm quẻ, Xem tuổi.
   Mỗi khung là lưới đều theo --hub-cols (điện thoại, máy tính bảng 4; máy tính 8). */
@media screen{
 .met-hub-nav.calendar-view-tabs:not([hidden]){display:block!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group.hub-sec{display:grid!important;grid-template-columns:repeat(var(--hub-cols),minmax(0,1fr))!important;gap:var(--hub-gap)!important;width:auto!important;margin:0 0 16px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;position:static!important;flex:none!important;justify-self:stretch!important}
 .met-hub-nav.calendar-view-tabs .hub-sec>.hub-sec-title{grid-column:1/-1;display:block;margin:2px 0 0;padding:0 0 4px;border-bottom:1px solid #e3d6b8;color:#4a6337;font-size:14px;font-weight:700;line-height:1.3}
 .met-hub-nav.calendar-view-tabs .hub-sec>button[type]{order:0!important}
}
.hh-verdict{font-size:17px;margin:6px 0 10px}
/* 6.95 · Liền một lưới (Quân chọn): không chia khung, các ô nối tiếp theo thứ tự môn (Ngày giờ, Phong thủy, Độn số, Xem tuổi).
   Máy tính 6 ô một hàng, điện thoại và máy tính bảng 4 ô; hàng cuối thiếu ô thì canh giữa. Tên khung chỉ còn cho trình đọc màn hình. */
@media screen{
 .met-hub-nav.calendar-view-tabs:not([hidden]){display:flex!important;flex-wrap:wrap!important;justify-content:center!important;align-items:stretch!important;gap:var(--hub-gap)!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group.hub-sec{display:contents!important}
 .met-hub-nav.calendar-view-tabs .hub-sec>.hub-sec-title{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important}
 .met-hub-nav.calendar-view-tabs .hub-sec>button[type]{flex:0 0 calc((100% - (var(--hub-cols) - 1)*var(--hub-gap))/var(--hub-cols))!important;min-width:0!important}
}
/* 6.96 · Lưới ô khu riêng y hệt hàng thẻ chính phía trên (Quân dặn): máy tính 8 cột, máy tính bảng và điện thoại 4 cột;
   khoảng cách như hàng chính: 8px máy tính, 6px máy tính bảng, 4px điện thoại nhỏ. Hàng cuối thiếu ô thì canh giữa. */
@media screen and (max-width:480px){.met-hub-nav.calendar-view-tabs:not([hidden]){--hub-gap:4px}}
/* 7.30 · Hiện lại tên từng khung trong khu riêng (Quân dặn): Ngày giờ, Phong thủy, Độn số, Xem tuổi, kèm đường kẻ ngăn.
   Lưới ô vẫn liền như 6.95, chỉ thêm dòng tên chiếm cả hàng trước mỗi nhóm. */
@media screen{
 .met-hub-nav.calendar-view-tabs .hub-sec>.hub-sec-title{position:static!important;width:auto!important;height:auto!important;clip:auto!important;overflow:visible!important;white-space:normal!important;flex:0 0 100%!important;box-sizing:border-box!important;margin:14px 0 2px!important;padding:6px 2px 4px!important;border:0!important;border-bottom:1px solid #e3d6b8!important;color:#4a6337!important;font-size:15px!important;font-weight:700!important;line-height:1.3!important;text-align:left!important}
 .met-hub-nav.calendar-view-tabs .hub-sec[data-sec="ngaygio"]>.hub-sec-title{margin-top:4px!important}
}
/* 7.41 · Khu riêng gọn diện tích (Quân dặn): ô nối tiếp nhau, cột và khoảng cách y hệt hàng thẻ chính phía trên
   (máy tính 8 cột cách 8px, máy tính bảng 4 cột cách 6px, điện thoại 4 cột cách 4px), hàng cuối thiếu ô thì canh giữa.
   Logo cùng cỡ logo hàng trên. Mỗi nhóm môn một màu riêng, ô đầu nhóm mang nhãn tên nhóm trên viền. */
@media screen{
 .met-hub-nav.calendar-view-tabs:not([hidden]){--cols:8;--g:8px;display:flex!important;flex-wrap:wrap!important;justify-content:center!important;align-items:stretch!important;gap:14px var(--g)!important;padding-top:10px!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group.hub-sec{display:contents!important}
 .met-hub-nav.calendar-view-tabs .hub-sec[data-sec="ngaygio"]{--c:#d2b06a;--bg:#fbf4e2;--ink:#875a0c;--name:"Ngày giờ"}
 .met-hub-nav.calendar-view-tabs .hub-sec[data-sec="phongthuy"]{--c:#a1ac98;--bg:#f1f3ef;--ink:#4a6337;--name:"Phong thủy"}
 .met-hub-nav.calendar-view-tabs .hub-sec[data-sec="donso"]{--c:#98a6c8;--bg:#eef1f8;--ink:#2f4373;--name:"Độn số"}
 .met-hub-nav.calendar-view-tabs .hub-sec[data-sec="xemtuoi"]{--c:#cf9a90;--bg:#fbefec;--ink:#8e2b23;--name:"Xem tuổi"}
 .met-hub-nav.calendar-view-tabs .hub-sec>.hub-sec-title{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group.hub-sec>button[type]{position:relative!important;order:0!important;flex:0 0 calc((100% - (var(--cols) - 1)*var(--g))/var(--cols))!important;width:auto!important;max-width:none!important;min-width:0!important;min-height:0!important;margin:0!important;padding:8px 3px 6px!important;gap:3px!important;font-size:var(--fs,11px)!important;line-height:1.25!important;border-radius:9px!important;border-width:1.5px!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group.hub-sec>button[type]:not([aria-selected=true]){background:var(--bg)!important;border-color:var(--c)!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group.hub-sec>button[type]:not([aria-selected=true]):hover{background:#fff!important}
 .met-hub-nav.calendar-view-tabs .hub-sec>button[type]:first-of-type::before{content:var(--name);position:absolute;top:-9px;left:6px;max-width:calc(100% - 12px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 7px;border:1.5px solid var(--c);border-radius:999px;background:var(--bg);color:var(--ink);font-size:10.5px;font-weight:700;line-height:14px;text-align:left}
}
@media screen and (max-width:1119px){.met-hub-nav.calendar-view-tabs:not([hidden]){--cols:4;--g:6px;--fs:12px}}
@media screen and (max-width:640px){
 .met-hub-nav.calendar-view-tabs:not([hidden]){--g:4px;--fs:10.5px;row-gap:13px!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group.hub-sec>button[type]{padding:8px 2px 5px!important}
}

/* 7.61 · Quân dặn bỏ vòng tròn đỏ cho logo to hơn: ảnh logo đã cắt sát mép, không thêm viền. */
.mode-tabs .tool-icon,.met-hub-nav .tool-icon,.met-hub-nav.calendar-view-tabs .tool-icon,.manual-method-tabs button img,.manual-method-tabs .tool-icon{border:0!important}
/* 7.73 · Vòng đỏ quanh logo các ô như ảnh Quân gửi (kiểu 7.60), không phát sáng. */
.mode-tabs .tool-icon,.met-hub-nav .tool-icon,.manual-method-tabs button img,.manual-method-tabs .tool-icon{border-radius:50%!important;box-shadow:0 0 0 2px #fff,0 0 0 4px #46602f!important;filter:none!important}
/* 7.74–7.75 · Nền trắng cho mọi ô từng môn, từ khu chính tới khu riêng; ô đang chọn giữ màu xanh nhạt cũ; logo nhỏ lại 36px, điện thoại 30px (Quân dặn). */
.mode-tabs button:not([aria-selected=true]),.met-hub-nav button:not([aria-selected=true]),.calendar-view-tabs button:not([aria-selected=true]),.manual-method-tabs button:not([aria-selected=true]),.serial-method-tabs button:not([aria-selected=true]),.met-hub-nav.calendar-view-tabs .feng-method-group.hub-sec>button[type]:not([aria-selected=true]){background:#fff!important}
.mode-tabs .tool-icon,.met-hub-nav .tool-icon,.mode-tabs button[aria-selected=true] .tool-icon,.met-hub-nav button[aria-selected=true] .tool-icon,.mode-tabs [data-destiny=days] .tool-icon,.mode-tabs [data-owner-tools] .tool-icon,.met-hub-nav.calendar-view-tabs .tool-icon,.met-hub-nav.calendar-view-tabs button[aria-selected=true] .tool-icon{width:36px!important;height:36px!important;min-width:36px!important}
@media (max-width:480px){.mode-tabs .tool-icon,.met-hub-nav .tool-icon,.mode-tabs button[aria-selected=true] .tool-icon,.met-hub-nav button[aria-selected=true] .tool-icon,.mode-tabs [data-destiny=days] .tool-icon,.mode-tabs [data-owner-tools] .tool-icon,.met-hub-nav.calendar-view-tabs .tool-icon,.met-hub-nav.calendar-view-tabs button[aria-selected=true] .tool-icon{width:30px!important;height:30px!important;min-width:30px!important}}
/* 7.81 · Khu riêng giản lược cho thông thoáng như hàng ô chính (Quân dặn): lưới 8 ô liền, ô cùng cỡ, cùng viền, cùng khoảng cách với ô chính; bỏ khung màu nhóm và nhãn tên nhóm. */
@media screen{
 .met-hub-nav.calendar-view-tabs:not([hidden]){gap:8px var(--g)!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group.hub-sec>button[type]{min-height:92px!important;padding:10px 3px!important;gap:4px!important;line-height:1.4!important;border-radius:12px!important}
 .met-hub-nav.calendar-view-tabs .feng-method-group.hub-sec>button[type]:not([aria-selected=true]){border:1px solid #dcc9a2!important}
 .met-hub-nav.calendar-view-tabs .hub-sec>button[type]:first-of-type::before{content:none!important;display:none!important}
}

/* 7.92 · Tử Vi một ô trên thanh chính, hàng ô con Nam Phái, Bắc Phái (serial-tools-ui.mjs); ô chọn trong form ẩn. */
#ziAlgorithmLabel{display:none!important}
/* 7.85 · Máy tính: thanh ô chính hai hàng bằng nhau, số cột --tab-cols do serial-tools-ui.mjs tính (nửa số ô). */
@media(min-width:1120px){.mode-tabs.mode-tabs{grid-template-columns:repeat(var(--tab-cols,6),minmax(0,1fr))!important}}
/* 7.88 · Khu riêng: ô to bằng ô chính (Quân dặn), cùng số cột --tab-cols mà serial-tools-ui.mjs đặt trên :root; hàng cuối thiếu ô thì canh giữa. */
@media screen and (min-width:1120px){.met-hub-nav.calendar-view-tabs:not([hidden]){--cols:var(--tab-cols,6)}}
/* 10.10 · Bát Trạch xem sâu: danh sách 35 điều Dương trạch lục sát */
.bts-sat{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:6px 14px;margin:8px 0}
.bts-sat label{display:flex;gap:6px;align-items:flex-start;font-size:13.5px;line-height:1.45}
.bts-sat input{margin-top:3px;accent-color:#55703f;flex:none}
.bts-dem{font-weight:600;color:#46602f}

/* ui/site.css */
/* 7.94 · Phần dùng chung cho mọi trang công khai: biến màu, link bỏ qua, thanh điều hướng, chữ Hán. Xem design-system/MASTER.md. */
:root{--hcq-primary:#4a6337;--hcq-primary-dark:#3a5027;--hcq-on-primary:#ffffff;--hcq-accent:#a92717;--hcq-on-accent:#ffe6a0;--hcq-surface:#fffdf7;--hcq-background:#fdf8ec;--hcq-ink:#292822;--hcq-muted:#5f5849;--hcq-border:#d9cdb0;--hcq-gold:#b39154;--hcq-focus:#4a6337;--hcq-danger:#a02c26;--hcq-dur-fast:150ms;--hcq-dur-base:220ms;--hcq-ease-out:cubic-bezier(.2,.7,.3,1)}
.skip-link{position:absolute;left:8px;top:-80px;z-index:1000;background:var(--hcq-primary);color:var(--hcq-on-primary)!important;padding:12px 18px;border-radius:6px;font:700 16px/1.3 Arial,system-ui,sans-serif;text-decoration:none}
.skip-link:focus{top:8px;outline:3px solid var(--ds-brand,#4a6337);outline-offset:2px}
.site-nav{display:flex;flex-wrap:wrap;gap:4px 6px;align-items:center;font:500 14px/1.3 Arial,system-ui,sans-serif}
.site-nav a{display:inline-flex;align-items:center;min-height:44px;padding:0 12px;border-radius:6px;color:var(--hcq-primary);text-decoration:none;transition:background-color var(--hcq-dur-fast) ease-out,color var(--hcq-dur-fast) ease-out}
.site-nav a:hover{background:#4a633714}
.site-nav a[aria-current=page]{background:var(--hcq-primary);color:var(--hcq-on-primary)}
.site-nav a:focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:2px}
.site-nav-bar{max-width:820px;margin:0 auto;padding:6px 12px;border-bottom:1px solid var(--hcq-border);background:var(--hcq-surface)}
/* Chữ Hán: ưu tiên nét phồn thể có sẵn trên máy, không tải thêm phông. */
[lang^=zh]{font-family:"Noto Serif TC","Noto Serif CJK TC","Source Han Serif TC","PingFang TC","Microsoft JhengHei","Noto Sans CJK TC",serif}
.pw-wrap{display:flex;gap:6px;align-items:stretch}.pw-wrap input{flex:1;min-width:0}
.pw-toggle{min-height:44px;min-width:64px;padding:0 12px;border:1px solid var(--hcq-border);border-radius:6px;background:var(--hcq-surface);color:var(--hcq-ink);font:14px Arial,system-ui,sans-serif;cursor:pointer}
@media (prefers-reduced-motion:reduce){.site-nav a{transition:none}}
/* Trang quẻ, 64 quẻ, trang phụ: vùng bấm đủ 44px, dòng chữ không quá dài. */
nav.dd a,.lien a{display:inline-flex;align-items:center;min-height:44px}
.teacher-main p,.teacher-main li,.method-guide p,.method-guide li,.about p{max-width:75ch}
/* 7.97 · Mã màu lặp từ 2 lần trở lên trong 7 file CSS công cụ, đặt thành biến (giá trị giữ nguyên). */
:root{--hcq-c07131f:#07131f;--hcq-cdfc78a:#dfc78a;--hcq-c87d0ba:#aac097;--hcq-cffb6a5:#ffb6a5;--hcq-ca99d6c:#a99d6c;--hcq-c292d27:#292d27;--hcq-cfffef9:#fffef9;--hcq-cfaf6e8:#faf6e8;--hcq-c245442:#4a6337;--hcq-cd7decc:#d7decc;--hcq-ccbd6c3:#cbd6c3;--hcq-c32725a:#516440;--hcq-c586b54:#5f6659;--hcq-cb5c8b2:#bdc3b7;--hcq-c243c31:#303729;--hcq-cb79c5e:#b79c5e;--hcq-cfff9e8:#fff9e8;--hcq-c174e37:#314223;--hcq-c205542:#46602f;--hcq-cfffaf0:#fffaf0;--hcq-ce6eee1:#e6eee1;--hcq-cfffefa:#fffefa;--hcq-c779c7e:#89947f;--hcq-c245b40:#3e4f30;--hcq-cd3deca:#d3deca}
/* 8.10 · Phông chữ: nạp Be Vietnam Pro (chữ thường) và Noto Serif (tiêu đề, có chân) từ Google Fonts, đủ dấu tiếng Việt.
   Trước đây giao diện gọi tên hai phông này nhưng không trang nào nạp, máy Windows phải ghép Georgia với Cambria nên dấu chữ lệch nhau. */
:root{--hcq-sans:"Inter","Be Vietnam Pro","Segoe UI",system-ui,-apple-system,Arial,sans-serif;--hcq-serif:"Noto Serif","HCQ Viet",Georgia,"Times New Roman",serif;--hcq-tieu-de:"Playfair Display","Noto Serif","HCQ Viet",Georgia,serif}
body{font-family:var(--hcq-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
h1,h2{font-family:var(--hcq-tieu-de)}
[lang^=zh]{font-family:"Noto Serif TC","Noto Serif CJK TC","Source Han Serif TC","PingFang TC","Microsoft JhengHei",serif}

/* 10.28 · Bảng bài viết không tràn khung (chữ to trên điện thoại vẫn xuống dòng trong ô). */
main table.bang:not(.nam):not(.tong){table-layout:fixed;max-width:100%}main table.bang td,main table.bang th{overflow-wrap:anywhere}

/* ui/app-fix.css */
/* 7.94 · Sửa theo đợt rà UI/UX: nạp sau polish-548.css nên thắng các khai báo cũ. */
/* h1 vẫn có cho máy đọc và Google, chỉ ẩn khỏi mắt (trước đây display:none nên mất luôn). */
.page-title{display:block!important;position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;padding:0!important;margin:-1px!important;border:0!important}
body{font-size:16px}
#detailContent p,#detailContent li,#detailContent ol,#detailContent ul{max-width:72ch}
/* Thanh điều hướng trên đầu trang chủ. */
.topbar .site-nav{justify-self:end;grid-column:3}
@media(max-width:1099px){.topbar .site-nav{font-size:13px}.topbar .site-nav a{padding:0 9px}}
@media(max-width:700px){.topbar{height:auto!important;row-gap:2px}.topbar .site-nav{grid-column:1/-1;justify-self:stretch;justify-content:space-between;border-top:1px solid #e6d9bb;padding-top:2px}.topbar .site-nav a{padding:0 6px;font-size:14px}}
/* Chân trang: thay style viết trong thẻ. */
.brand-about{margin:24px auto;padding:16px;text-align:center;border:0}
.brand-about a{display:inline-flex;align-items:center;min-height:44px;padding:0 8px;font-size:14px}
/* Tương phản. */
.facebook-group{background:#1466d8}.facebook-group:hover{background:#0f55b8}
.quick-access-buttons button:disabled{color:#5f6359}
.header-poem .poem-han{color:#7a5f30}
/* Nhóm ngày giờ động tâm. */
.dt-group{border:0;margin:0;padding:0;min-width:0}
/* Lịch sử: nhãn ô tìm. */
.history-search-label{flex-basis:100%;margin:0 0 -4px;font-size:14px}
.file-button:focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:2px}
/* Ô Tụ Bảo Lâu: báo trước là khu riêng. */
.owner-lock{display:inline-flex;align-items:center;gap:3px;margin-top:3px;padding:1px 6px;border-radius:9px;background:#4a6337;color:#fff;font:700 11px/1.5 Arial,system-ui,sans-serif;letter-spacing:0}
.owner-lock svg{width:11px;height:11px}
/* Bảng Thể Dụng: không bẻ chữ giữa từ (Hà/nh, Thủ/y). */
.ca-table th,.ca-table td{overflow-wrap:normal!important;word-break:normal!important;hyphens:none}
.ca-table th:nth-child(2),.ca-table td:nth-child(2){white-space:nowrap}
.cast-analysis{overflow-x:auto}
/* Phiếu quẻ dạng chữ (bản điện thoại hiện ảnh). */
.sheet-text-copy{margin:12px auto 0;max-width:900px}
.sheet-text-copy>summary{min-height:44px;display:flex;align-items:center;padding:0 14px;border:1px solid #cdbb94;border-radius:6px;background:#fffdf7;color:#4a6337;font-weight:700;cursor:pointer;list-style:none}
.sheet-text-copy>summary::-webkit-details-marker{display:none}
.sheet-text-copy>summary::before{content:"";width:0;height:0;margin-right:8px;border:5px solid transparent;border-left:7px solid currentColor;transition:transform var(--hcq-dur-fast) ease-out}
.sheet-text-copy[open]>summary::before{transform:rotate(90deg) translateX(2px)}
.sheet-text-copy .result-sheet{margin-top:10px}
/* Chuyển động: đổi màu nút có thời lượng chung, không đổi tức thì. */
button,.secondary,.mode-tabs button,.detail-tabs button,.text-button,a{transition:background-color var(--hcq-dur-fast) ease-out,color var(--hcq-dur-fast) ease-out,border-color var(--hcq-dur-fast) ease-out,box-shadow var(--hcq-dur-fast) ease-out}
@media (prefers-reduced-motion:reduce){button,.secondary,a,.sheet-text-copy>summary::before{transition:none!important}}
/* Vùng chạm trên màn cảm ứng. */
.paper summary{padding-top:12px;padding-bottom:12px;line-height:20px}
#nowButton{min-height:44px;padding:10px 4px}
@media (pointer:coarse){.paper button,.paper .secondary,dialog button,.file-button{min-height:44px}.calendar-choice label{min-height:44px}.calendar-choice input[type=radio],.paper input[type=checkbox]{width:22px;height:22px;min-height:22px}}
/* Điện thoại: ô nhập 16px để iPhone không tự phóng to; chữ không nhỏ hơn 12px. */
@media(max-width:700px){
.paper input:not([type=checkbox]):not([type=radio]):not([type=range]),.paper select,.paper textarea,dialog input:not([type=checkbox]):not([type=radio]),dialog select,dialog textarea{font-size:16px!important}
.mode-tabs button{font-size:12px!important}
.form-actions .secondary{font-size:13px!important}
.brand small{font-size:11px!important}
.detail-tabs{flex-wrap:wrap;overflow-x:visible}
.details-panel a{font-size:13px}
}
@media(max-width:700px){.date-row{grid-template-columns:1fr 1.3fr 1.15fr!important}.date-row select,.clock-row select{padding-left:8px!important;padding-right:2px!important}}
.field-error{margin:6px 0 10px;padding:6px 10px;border-left:3px solid var(--hcq-danger,#a02c26);background:#fbecea;color:#7a1f1a;font-size:14px;line-height:1.5;border-radius:3px}.gender-field{margin:0 0 14px}.gender-field select{width:100%}.gender-field .help{display:block!important;margin:6px 0 0}
[aria-invalid=true]{border-color:var(--hcq-danger,#a02c26)!important}
/* 7.99+ · Link cuối khung hướng dẫn đủ cỡ chạm; nhãn Khóa và ô Tụ Bảo Lâu không nhỏ hơn 12px. */
.details-panel a,.teacher-entry{display:inline-block;padding:12px 0;min-height:44px;font-size:14px!important;line-height:20px}
.owner-lock{font-size:12px!important}
.mode-tabs button[data-owner-tools],.mode-tabs button[data-owner-tools] *:not(svg):not(img){font-size:12px!important}
/* 8.08 · Lục Hào gieo xu: bảng có 4 cột (Hào, Âm Dương, Động, Xu); luật 600px cũ của refinement.css chỉ cho 3 cột nên cột Xu rớt xuống dòng dưới, mỗi hào cao gấp đôi. */
@media(max-width:600px){
 .liu-line-heading.liu-cast-heading,.liu-line-inputs.liu-cast-lines .manual-line{grid-template-columns:62px minmax(0,1fr) 36px 74px;gap:6px}
 .liu-cast-lines .manual-line>label{font-size:15px}
 .liu-cast-lines .manual-line select{padding:7px 6px}
}
/* Gieo xu đứng ngay dưới ô Việc cần xem: gieo trước, bảng sáu hào tự điền ở dưới. */
#castForm:has(#modeFields .coins-stage){display:flex;flex-direction:column}
#castForm:has(#modeFields .coins-stage)>*{order:4}
#castForm:has(#modeFields .coins-stage)>.form-title,#castForm:has(#modeFields .coins-stage)>#numberSourceFields,#castForm:has(#modeFields .coins-stage)>#numberCastFields{order:1}
/* 8.87 · Lục Hào: ô câu hỏi xuống dưới bảng hào, ngay trên Ngày giờ động tâm (Quân dặn). */
#castForm:has(#modeFields .coins-stage)>#preDateFields{order:2}
#castForm:has(#modeFields .coins-stage)>label:first-of-type,#castForm:has(#modeFields .coins-stage)>#question{order:3}
#castForm:has(#modeFields .coins-stage)>.hh-goiy-nhan,#castForm:has(#modeFields .coins-stage)>.hh-goiy{order:3}
#castForm:has(#modeFields .coins-stage)>#question{margin-bottom:10px}
#castForm:has(#modeFields .coins-stage)>#modeFields{order:1}
#castForm:has(#modeFields .coins-stage) #modeFields .coins-stage{margin-top:6px}
.gmt-box{margin-top:8px;padding:8px 10px;border:1px dashed #4a6337;border-radius:8px;display:grid;gap:6px}
.gmt-box[hidden]{display:none}
/* 9.07 · Ảnh phiếu lá số của app.js ẩn tới khi phiếu vẽ lại xong (image-download.mjs gắn data-phieu), hết thấy phiếu cũ nháy qua. Quá 6 giây vẫn tự hiện. */
#destinySheetPreview img:not([data-phieu]){visibility:hidden;animation:hcqHienPhieu 0s 6s forwards}
@keyframes hcqHienPhieu{to{visibility:visible}}
#destinySheetPreview:has(img:not([data-phieu])){position:relative}
#destinySheetPreview:has(img:not([data-phieu]))::before{content:"Đang vẽ phiếu lá số…";position:absolute;top:24px;left:0;right:0;text-align:center;color:#7a6c57;font-size:15px}

/* ui/giay-do.css */
/* 8.04 · Giao diện "Giấy dó": nền giấy vàng nhạt, chữ có chân, điểm nhấn đỏ son, nút tròn kiểu ứng dụng.
   Thay matcha.css (8.03). Phiếu quẻ (.result-sheet) giữ nguyên bên trong, chỉ đổi khung bao ngoài. Tự thiết kế. */
:root{--p-paper:#efe5d0;--p-paper2:#f6efe0;--p-card:#fbf6ea;--p-ink:#2b2219;--p-mute:#7a6c57;--p-son:#8e2418;--p-son2:#a8301f;--p-line:#dccdae;--p-gold:#b08a57;
 --p-serif:"Noto Serif","HCQ Viet",Georgia,"Times New Roman",serif;--p-sans:"Inter","Be Vietnam Pro","Segoe UI",system-ui,-apple-system,Arial,sans-serif;
 --p-sh:0 1px 0 #fff8 inset,0 10px 24px -18px #5a3a1a66}
html{background:var(--p-paper)}
body{background:var(--p-paper)!important;background-image:radial-gradient(ellipse at 50% 0,#f8f1e2 0,transparent 60%)!important;background-attachment:fixed!important;color:var(--p-ink)!important}

/* Thanh đầu */
.topbar{background:#f3e9d4f0!important;background-image:none!important;backdrop-filter:blur(10px)!important;-webkit-backdrop-filter:blur(10px)!important;border:0!important;border-bottom:1px solid #e0d2b4!important;box-shadow:none!important}
.topbar::after{content:none!important}
.topbar .original-wordmark,.topbar .brand-wordmark{background:#4a6337!important}
.topbar .brand-logo{mix-blend-mode:multiply}
.topbar .brand small{color:var(--p-mute)!important}
.header-poem .poem-viet small{color:var(--p-mute)!important}
.header-poem .poem-han{color:var(--p-son)!important;border-left-color:var(--p-line)!important}
.site-nav{gap:6px!important}
.site-nav a{color:#5a4b39!important;border:1px solid var(--p-line)!important;border-radius:999px!important;background:var(--p-paper2)!important;box-shadow:none!important;font-family:var(--p-sans);font-weight:500;letter-spacing:.04em}
.site-nav a:hover{border-color:var(--p-son)!important;color:var(--p-son)!important}
.site-nav a[aria-current=page]{background:var(--p-son)!important;border-color:var(--p-son)!important;color:#f7e9d2!important}
.site-nav a:focus-visible{outline:3px solid var(--ds-brand,#4a6337)!important;outline-offset:2px}
#historyButton{border:1px solid var(--p-line)!important;border-radius:999px!important;background:var(--p-paper2)!important;color:var(--p-mute)!important;font-family:var(--p-sans)}

/* Khung chính, tiêu đề gọn */
.paper,main.paper#noi-dung,body main.paper{background:transparent!important;background-color:transparent!important;border:0!important;box-shadow:none!important;padding-top:0!important;margin-top:0!important;overflow:visible!important}
.page-title.tool-hero{position:relative!important;width:auto!important;height:auto!important;overflow:visible!important;clip:auto!important;clip-path:none!important;white-space:normal!important;display:flex!important;flex-direction:column;align-items:center;text-align:center;
 margin:0!important;padding:26px 16px 14px!important;border:0!important;box-shadow:none!important;border-radius:0!important;background:none!important}
.page-title.tool-hero .hero-logo,.page-title.tool-hero .brand-domain,.page-title.tool-hero>span{display:none!important}
.page-title.tool-hero h1{background:none!important;border:0!important;padding:0!important;box-shadow:none!important;margin:0!important;border-radius:0!important;text-shadow:none!important;
 font:600 clamp(22px,3.6vw,32px)/1.3 var(--p-sans)!important;letter-spacing:.08em!important;color:var(--p-ink)!important}
.page-title.tool-hero>p{font:400 12.5px/1.5 var(--p-sans)!important;letter-spacing:.32em!important;text-transform:none!important;color:var(--p-mute)!important;margin:8px 0 0!important}

/* Các cách lập: nút tròn như viên thuốc, đang chọn đỏ son */
.mode-tabs{margin:6px auto 20px!important;max-width:1060px!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:4px!important;gap:8px!important}
.mode-tabs>button,.mode-tabs button,.mode-tabs button:not([aria-selected=true]),.met-hub-nav button:not([aria-selected=true]),.met-hub-nav.calendar-view-tabs>button[type]:not([aria-selected=true]),.met-hub-nav.calendar-view-tabs .feng-method-group>button[type]:not([aria-selected=true]){
 background:var(--p-paper2)!important;border:1px solid var(--p-line)!important;border-radius:18px!important;box-shadow:none!important;color:#5a4b39!important;font-family:var(--p-sans)!important;font-weight:500!important}
.met-hub-nav.calendar-view-tabs .feng-method-group.hub-sec>button[type]:not([aria-selected=true]){border:1px solid var(--p-line)!important}
.mode-tabs>button,.mode-tabs button{flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;text-align:center!important;transition:background-color 160ms,border-color 160ms,transform 200ms!important;animation:none!important}
.mode-tabs button:not([aria-selected=true]):hover,.met-hub-nav button:not([aria-selected=true]):hover{border-color:#c4ae84!important;transform:translateY(-2px)}
.mode-tabs button[aria-selected=true],.met-hub-nav button[aria-selected=true]{background:var(--p-son)!important;border-color:var(--p-son)!important;color:#f7e9d2!important;box-shadow:0 10px 20px -12px #46602f!important}
.mode-tabs .tool-icon{box-shadow:0 0 0 2px var(--p-card),0 0 0 3px var(--p-line)!important;filter:sepia(.25)!important}
.mode-tabs button[aria-selected=true] .tool-icon{box-shadow:0 0 0 2px var(--p-son),0 0 0 3px #f7e9d2aa!important;filter:none!important}
.mode-tabs button:focus-visible{outline:3px solid var(--ds-brand,#4a6337)!important;outline-offset:3px!important}
.mode-tabs [data-owner-tools] *{color:inherit}
@media(min-width:701px){
.mode-tabs .tool-icon,.mode-tabs button[aria-selected=true] .tool-icon,.mode-tabs [data-destiny=days] .tool-icon,.mode-tabs [data-owner-tools] .tool-icon{width:50px!important;height:50px!important;min-width:50px!important}
.mode-tabs>button,.mode-tabs button{padding:12px 6px 10px!important;font-size:13px!important;gap:8px!important;display:flex!important}
}

/* Khung lập quẻ: thẻ giấy */
.cast-form,#castForm{background:var(--p-card)!important;background-image:none!important;border:1px solid var(--p-line)!important;border-radius:16px!important;box-shadow:var(--p-sh)!important;padding:4px 22px 24px!important;animation:none!important}
.cast-form .form-title{margin:0 0 12px!important;padding:16px 0 10px!important;background:none!important;border:0!important;border-bottom:1px solid #e5d8bc!important;text-align:center}
.cast-form .form-title::after{content:none!important}
.form-title h2{color:var(--p-ink)!important;font:600 20px/1.3 var(--kt-tieu-de,var(--p-serif))!important;letter-spacing:.14em}
.cast-form label{color:#6d5f4b!important;font-weight:500}
.cast-form input,.cast-form select,.cast-form textarea{background:#fffdf7!important;border:1px solid var(--p-line)!important;border-radius:12px!important;color:var(--p-ink)!important;font-family:var(--p-sans)}
.cast-form input:focus,.cast-form select:focus,.cast-form textarea:focus{outline:none!important;border-color:var(--p-son)!important;box-shadow:0 0 0 3px #8e24181a!important}
.cast-form input[type=radio],.cast-form input[type=checkbox]{accent-color:var(--p-son)}
#castForm .wb-profile,.cast-form .wb-profile{background:var(--p-paper2)!important;border:1px dashed var(--p-line)!important;border-radius:12px!important}
.text-button,#nowButton,.advanced-calendar summary{color:var(--p-son)!important;font-weight:500}

/* Sân gieo xu Lục Hào */
.coins-stage,.kaiyuan-stage{background:radial-gradient(ellipse at 50% 40%,#fbf4e4,#efe3c8)!important;border:1px solid var(--p-line)!important;border-radius:14px!important}
.coin-progress,.coin-rule{color:var(--p-mute)!important;font-family:var(--p-sans)}
.coin-buttons button{border-radius:999px!important}

/* Nút LẬP QUẺ: dải đỏ son, chữ giãn */
.cast-button{background:linear-gradient(#55703f,#46602f)!important;border:0!important;border-radius:6px!important;color:#f7e9d2!important;text-shadow:none!important;letter-spacing:.32em!important;font-family:var(--p-sans)!important;font-weight:600!important;
 box-shadow:0 14px 26px -14px #46602f,inset 0 0 0 1px #f7e9d233!important;transition:transform 150ms,filter 150ms!important}
.cast-button:hover{filter:brightness(1.07);transform:translateY(-1px)}
.cast-button:active{transform:scale(.98)}
.secondary{background:var(--p-paper2)!important;border:1px solid var(--p-line)!important;border-radius:999px!important;color:#5a4b39!important;font-family:var(--p-sans)}
.secondary:hover{border-color:var(--p-son)!important;color:var(--p-son)!important}
.group-invite{margin-top:18px;padding-top:16px;border-top:1px solid #e5d8bc}
.group-wordmark{background:#4a6337!important}
.facebook-group{border-radius:999px!important}

/* Phiếu: chỉ đổi bóng và bo góc khung ngoài, bên trong giữ nguyên */
.result-sheet{border-radius:10px!important;box-shadow:0 0 0 1px var(--p-line),0 24px 40px -26px #5a3a1a88!important}
.result-controls{background:var(--p-card)!important;border:1px solid var(--p-line)!important;border-radius:16px!important;box-shadow:none!important}
.result-controls .red-button{background:var(--p-son)!important;border-color:var(--p-son)!important;color:#f7e9d2!important;border-radius:999px!important}
.result-controls button{border-radius:999px!important}
.sheet-text-copy>summary{border-radius:12px!important;border:1px solid var(--p-line)!important;background:var(--p-card)!important}

/* Khung hướng dẫn */
.details-panel{background:var(--p-card)!important;border:1px solid var(--p-line)!important;border-radius:16px!important;box-shadow:var(--p-sh)!important;padding:20px 22px!important}
.detail-tabs{background:transparent!important;border:0!important;padding:0!important;gap:8px!important;flex-wrap:wrap}
.detail-tabs button{background:var(--p-paper2)!important;border:1px solid var(--p-line)!important;border-radius:999px!important;color:#5a4b39!important;padding:8px 16px!important;font-family:var(--p-sans);font-weight:500;box-shadow:none!important}
.detail-tabs button[aria-selected=true]{background:var(--p-son)!important;border-color:var(--p-son)!important;color:#f7e9d2!important}
#detailContent h2,#detailContent h3{font-family:var(--kt-tieu-de,var(--p-serif));color:var(--p-ink);letter-spacing:.04em}
#detailContent h2{border:0!important;padding-bottom:0}
#detailContent a{color:var(--p-son)!important}

/* Chân trang */
.brand-about{background:#e6d9bd!important;background-image:none!important;color:#5a4b39!important;margin:32px 0 0!important;padding:22px 16px!important;max-width:none!important;border-top:1px solid var(--p-line)}
.brand-about a{color:var(--p-son)!important;border-bottom:1px solid #8e241855!important;text-decoration:none}

@media(max-width:700px){
.page-title.tool-hero{padding:18px 12px 10px!important}
.page-title.tool-hero h1{font-size:21px!important}
.page-title.tool-hero>p{font-size:11px!important;letter-spacing:.18em!important}
.mode-tabs{gap:6px!important;padding:2px!important}
.mode-tabs>button,.mode-tabs button{border-radius:14px!important;padding:8px 2px!important;font-size:11.5px!important;overflow-wrap:normal!important;word-break:keep-all!important;hyphens:none!important}
.mode-tabs [data-owner-tools]{font-size:12px!important}
.cast-form,#castForm{padding:2px 14px 18px!important}
.details-panel{padding:14px 12px!important}
}
@media (prefers-reduced-motion:reduce){.mode-tabs button,.cast-button{transition:none!important}.mode-tabs button:hover,.cast-button:hover{transform:none!important}}
@media print{.page-title.tool-hero,.brand-about{display:none!important}}

/* 8.06 · Dải "Mới" dưới các ô công cụ: lối vào trang Tiện ích */
.moi-strip{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:center;max-width:1060px;margin:-8px auto 18px;padding:0 4px}
.moi-strip span{font:600 12px var(--p-sans);letter-spacing:.14em;text-transform:uppercase;color:#f7e9d2;background:var(--p-son);border-radius:999px;padding:4px 10px}
.moi-strip a{display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border:1px solid var(--p-line);border-radius:999px;background:var(--p-paper2);color:#5a4b39;text-decoration:none;font-family:var(--p-sans);font-size:14px}
.moi-strip a:hover{border-color:var(--p-son);color:var(--p-son)}
.moi-strip a:focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:2px}
/* 8.10 · Nhãn Khóa của Tụ Bảo Lâu: chữ trắng trên nền xanh (trước bị luật màu nút đè thành chữ nâu, không đọc được). */
.mode-tabs .owner-lock,.mode-tabs .owner-lock svg{color:#fff!important}
.mode-tabs .owner-lock{font-family:var(--p-sans)!important;font-weight:600!important;letter-spacing:.02em}
/* 8.10 · Đầu trang máy tính: logo | thơ | nút điều hướng xếp ba cột, không còn cột chữ Hán của câu thơ nằm dưới nút Lập quẻ. */
@media(min-width:1100px){
 .topbar{grid-template-columns:auto minmax(0,1fr) auto!important;column-gap:24px!important}
 .topbar .brand{grid-column:1;grid-row:1}
 .topbar .header-poem{position:static!important;transform:none!important;grid-column:2;grid-row:1;justify-self:center;min-width:0;overflow:hidden}
 .topbar .site-nav{grid-column:3!important;grid-row:1;justify-self:end}
 .topbar #historyButton{grid-column:3!important;grid-row:2;justify-self:end}
 .site-nav a{font-family:var(--p-sans)!important;font-size:14px!important;letter-spacing:0!important;padding:0 14px!important;min-height:40px!important}
}
@media(min-width:1100px) and (max-width:1299px){.topbar .header-poem .poem-han{display:none}.topbar .header-poem .poem-art{height:66px}}

/* ui/trang-chu.css */
/* 8.19 · Trang chủ theo bố cục 6yao.ai: danh mục bên trái (ui/sidebar.mjs), đồng xu và câu mở đầu, câu hỏi gợi ý, Ba bước, Công cụ chính.
   Nạp sau giay-do.css. Không đụng bên trong lá phiếu quẻ. */

/* Đầu khung lập quẻ */
.hh-hero{text-align:center;margin:8px auto 14px;max-width:640px}
.hh-kicker{font:500 12.5px/1.4 var(--p-sans,"Inter","Be Vietnam Pro",system-ui,sans-serif);letter-spacing:.14em;text-transform:uppercase;color:var(--ds-subtle,#7a6c57);margin:0}
.hh-title{font:600 clamp(24px,3.4vw,34px)/1.3 var(--p-serif,"Noto Serif",Georgia,serif);color:#2b2219;margin:8px 0 14px;letter-spacing:.02em}
.hh-xu{width:96px;height:96px;display:block;margin:0 auto;filter:drop-shadow(0 14px 16px #3a2a1440) drop-shadow(0 2px 3px #3a2a1433);transition:transform .7s cubic-bezier(.2,.8,.2,1)}
.hh-hero:hover .hh-xu{transform:rotate(-14deg)}

/* Khung lập quẻ gọn giữa trang như 6yao */
#ichingPanel>#castForm,#ichingPanel .cast-form{max-width:640px;margin-left:auto!important;margin-right:auto!important}
#castForm #question{min-height:84px;font-size:16px!important;line-height:1.55}

/* Câu hỏi gợi ý */
.hh-goiy{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:10px 0 4px}
.hh-goiy span{font:500 12.5px var(--p-sans,system-ui);color:var(--ds-subtle,#7a6c57);margin-right:2px}
.hh-goiy button{border:1px solid #e3d6ba;background:#fffdf7;border-radius:999px;padding:7px 12px;font:400 13px/1.3 var(--p-sans,system-ui);color:#5a4b39;cursor:pointer;min-height:34px;text-align:left}
.hh-goiy button:hover{border-color:#46602f;color:#8e2418}
.hh-goiy button:focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:2px}

/* Ba bước và Công cụ chính */
.hh-them{max-width:960px;margin:34px auto 0;padding:0 16px}
.hh-them h2{font:600 22px/1.3 var(--p-serif,"Noto Serif",serif);text-align:center;color:#2b2219;margin:26px 0 14px}
.hh-buoc{list-style:none;padding:0;margin:0;display:grid;gap:10px;grid-template-columns:repeat(3,1fr)}
.hh-buoc li{background:#fbf6ea;border:1px solid #e3d6ba;border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:4px}
.hh-buoc b{font:600 13px var(--p-sans,system-ui);color:#8e2418;letter-spacing:.1em}
.hh-buoc strong{font:600 17px var(--p-serif,serif);color:#2b2219}
.hh-buoc span{font:400 13.5px/1.55 var(--p-sans,system-ui);color:#6d5f4b}
.hh-tools{display:grid;gap:10px;grid-template-columns:repeat(3,1fr)}
.hh-tools a{display:grid;grid-template-columns:48px 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;background:#fbf6ea;border:1px solid #e3d6ba;border-radius:14px;padding:14px;text-decoration:none;transition:border-color .15s,transform .15s}
.hh-tools a:hover{border-color:#c4ae84;transform:translateY(-2px)}
.hh-tools .hh-p{grid-row:1/3;width:48px;height:48px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px #e3d6ba,0 3px 8px #3a2a1430}
.hh-tools .hh-p[src*="/logo/"]{width:52px;height:52px;border-radius:0;object-fit:contain;box-shadow:none}
.hh-tools i{grid-row:1/3;width:44px;height:44px;border-radius:50%;background:#f6efe0;border:1px solid #e3d6ba;display:grid;place-items:center;font:700 19px "Noto Serif TC","Noto Serif",serif;font-style:normal;color:#8e2418}
.hh-tools strong{font:600 16px var(--p-serif,serif);color:#2b2219}
.hh-tools span{font:400 13px/1.45 var(--p-sans,system-ui);color:#6d5f4b}
.hh-tools a:focus-visible,.hh-all a:focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:2px}
.hh-all{text-align:center;margin:14px 0 6px}
.hh-all a{color:#8e2418;font:600 14px var(--p-sans,system-ui);text-decoration:none;display:inline-block;padding:10px}

/* Máy tính: danh mục bên trái thay hàng ô công cụ và dải Mới; tiêu đề trang gọn lại */
@media(min-width:1024px){
 body.has-side .mode-tabs,body.has-side .moi-strip{display:none!important}
 body.has-side .page-title.tool-hero{padding:18px 16px 4px!important}
 body.has-side .page-title.tool-hero h1{font-size:15px!important;letter-spacing:.12em!important;color:var(--ds-subtle,#7a6c57)!important;font-weight:500!important;font-family:var(--p-sans,system-ui)!important}
 body.has-side .page-title.tool-hero>p{display:none!important}
}
/* Điện thoại và máy tính bảng: hàng ô công cụ thành một dải trượt ngang gọn, dải Mới nằm trong danh mục */
@media(max-width:1023px){
 .topbar{display:flex!important;align-items:center;gap:10px}
 body.has-side .moi-strip{display:none!important}
 body.has-side .page-title.tool-hero{padding:10px 12px 0!important}
 body.has-side .page-title.tool-hero h1{font-size:13px!important;letter-spacing:.1em!important;color:var(--ds-subtle,#7a6c57)!important;font-weight:500!important}
 body.has-side .page-title.tool-hero>p{display:none!important}
 body.has-side .mode-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;gap:6px!important;padding:4px 12px 8px!important;margin:4px 0 6px!important;scroll-snap-type:x proximity;grid-template-columns:none!important}
 body.has-side .mode-tabs::-webkit-scrollbar{display:none}
 body.has-side .mode-tabs>button,body.has-side .mode-tabs button{flex:none!important;flex-direction:row!important;width:auto!important;min-height:38px!important;padding:6px 12px!important;border-radius:999px!important;font-size:13px!important;white-space:nowrap!important;scroll-snap-align:start;gap:6px!important}
 body.has-side .mode-tabs .tool-icon{width:22px!important;height:22px!important;min-width:22px!important}
 .hh-buoc,.hh-tools{grid-template-columns:1fr}
 .hh-title{font-size:22px}
 .hh-goiy button:nth-of-type(n+5){display:none}
 .hh-xu{width:76px;height:76px}
}
@media(min-width:700px) and (max-width:1023px){.hh-tools{grid-template-columns:1fr 1fr}.hh-buoc{grid-template-columns:repeat(3,1fr)}}
@media (prefers-reduced-motion:reduce){.hh-xu,.hh-tools a{transition:none}}
@media print{.hh-hero,.hh-goiy,.hh-them{display:none!important}}


/* 8.23 · Toàn trang theo kiểu 6yao.ai (Quân chốt 11/11/2026): một chủ đề sáng nền trắng, chữ không chân, một cột giữa thoáng,
   vật thật ở đầu khung (cành mai cho Mai Hoa, đồng xu 3D cho Lục Hào), ô hỏi lớn, nút đỏ rộng có mũi tên, câu hỏi gợi ý dạng thẻ trượt.
   Chỉ giữ dấu nhận biết Kinh Dịch Hội · Huyền Chân Quán: logo rồng, chữ thư pháp, lá phiếu quẻ và lá số (không đổi). */
html,body.has-side{background:#fff!important;background-image:none!important}
body.has-side{color:#1c1a17!important;font-family:"Inter","Be Vietnam Pro","Segoe UI",system-ui,-apple-system,Arial,sans-serif}
body.has-side .paper,body.has-side main.paper{background:#fff!important}
/* tiêu đề cũ: giữ cho Google đọc, ẩn khỏi màn hình */
body.has-side .page-title.tool-hero{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;padding:0!important;margin:-1px!important}
body.has-side .mode-tabs,body.has-side .moi-strip{display:none!important}
/* đầu khung */
.hh-hero{max-width:690px;margin:44px auto 26px;text-align:center}
.hh-kicker{display:block;font:500 12.5px/1.4 "Inter","Be Vietnam Pro",system-ui,sans-serif!important;letter-spacing:.24em!important;text-transform:none!important;color:var(--ds-subtle,#7a6c57)!important;margin:0 0 12px!important}
.hh-title{font:500 clamp(24px,3vw,38px)/1.35 "Inter","Be Vietnam Pro",system-ui,sans-serif!important;letter-spacing:.01em!important;color:#1c1a17!important;margin:0 0 22px!important}
.hh-vat{height:250px;display:grid;place-items:center;position:relative}
.hh-vat>*{grid-area:1/1}
.hh-mai{width:auto;height:250px;max-width:100%;object-fit:contain;filter:drop-shadow(0 10px 14px #3a2a1426);transition:opacity .5s,transform .8s cubic-bezier(.2,.8,.2,1)}
.hh-hero[data-loai=luchao] .hh-mai{opacity:0;transform:scale(.92);pointer-events:none}
.hh-xu3{position:relative;width:104px;height:150px;perspective:600px;transition:opacity .5s}
.hh-hero:not([data-loai=luchao]) .hh-xu3{opacity:0;pointer-events:none}
.hh-xu3-xoay{position:absolute;left:0;top:10px;width:104px;height:104px;transform-style:preserve-3d;animation:hhXoay 7s linear infinite}
.hh-xu3-xoay img{position:absolute;inset:0;width:104px;height:104px;border-radius:50%;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.hh-xu3-mt{transform:translateZ(3.5px)}
.hh-xu3-ms{transform:rotateY(180deg) translateZ(3.5px)}
.hh-xu3-canh{position:absolute;inset:0;transform-style:preserve-3d}
.hh-xu3-canh i{position:absolute;left:48.3px;top:48.5px;width:7.4px;height:7px;background-image:repeating-linear-gradient(90deg,#0000003d 0 .6px,#ffffff1f .6px 1.4px,#0000 1.4px 2.6px),linear-gradient(#000000a6,#0000 30%,#ffffff47 50%,#0000 68%,#00000080)}
/* 8.85 · Mép xu dày 14 px (8.87: mỏng còn 7 px theo lời Quân), đồng thau sẫm có vân dọc và sáng tối theo hướng đèn như ảnh mẫu; thêm bốn thành lỗ vuông. */
.hh-xu3-canh s{position:absolute;left:41.2px;top:47.2px;width:21.6px;height:7px;background-image:linear-gradient(#00000080,#0000 40%,#ffffff26 50%,#0000 60%,#00000080)}
.hh-xu3-bong{position:absolute;left:12px;right:12px;bottom:12px;height:12px;border-radius:50%;background:radial-gradient(closest-side,#2a1a0c40,#2a1a0c00);animation:hhBong 7s linear infinite}
@keyframes hhXoay{to{transform:rotateY(360deg)}}
@keyframes hhBong{0%,50%,100%{transform:scaleX(1)}25%,75%{transform:scaleX(.55)}}
/* khung lập quẻ: không viền, một cột */
body.has-side #ichingPanel{max-width:690px;margin:0 auto!important}
body.has-side #castForm{background:#fff!important;background-image:none!important;border:0!important;box-shadow:none!important;border-radius:0!important;padding:0 16px 18px!important;max-width:690px!important;margin:0 auto!important}
body.has-side #castForm .form-title{display:none!important}
body.has-side #castForm label,body.has-side #castForm legend{font:500 15px/1.4 "Inter","Be Vietnam Pro",system-ui,sans-serif!important;color:#2b2219!important;letter-spacing:0!important}
body.has-side #castForm input:not([type=radio]):not([type=checkbox]),body.has-side #castForm select,body.has-side #castForm textarea{border-radius:12px!important;border:1px solid #e3dccf!important;background:#fdfcfa!important;font:400 16px "Inter","Be Vietnam Pro",system-ui,sans-serif!important;color:#1c1a17!important;min-height:46px;box-shadow:none!important}
body.has-side #castForm input:focus,body.has-side #castForm select:focus,body.has-side #castForm textarea:focus{border-color:#55703f!important;box-shadow:0 0 0 3px #a8392a1f!important;outline:none!important;background:#fff!important}
body.has-side #castForm #question{min-height:118px!important;padding:14px 16px!important;line-height:1.55}
body.has-side #castForm #question::placeholder{color:#a69a88}
body.has-side .cast-button{flex:none!important;width:100%!important;height:54px!important;min-height:54px!important;border:0!important;border-radius:12px!important;font:600 17px "Inter","Be Vietnam Pro",system-ui,sans-serif!important;letter-spacing:.06em!important;color:#fff!important;background:linear-gradient(135deg,#55703f,#3f5530)!important;box-shadow:0 10px 22px -12px #3f5530!important;text-shadow:none!important;position:relative}
body.has-side .cast-button::after{content:"\2192";position:absolute;right:20px;top:50%;transform:translateY(-50%);font-weight:400;letter-spacing:0}
body.has-side .cast-button:hover{filter:brightness(1.06)}
body.has-side #castForm .form-actions{display:flex;flex-direction:column;gap:8px;background:transparent!important;position:static!important;margin:18px 0 0!important;padding:0!important}
body.has-side #castForm .secondary,body.has-side #resetButton{border:0!important;background:transparent!important;color:var(--ds-subtle,#7a6c57)!important;font:500 14px "Inter","Be Vietnam Pro",system-ui,sans-serif!important;min-height:40px;box-shadow:none!important}
.hh-mien{text-align:center;font:400 13px "Inter","Be Vietnam Pro",system-ui,sans-serif;color:var(--ds-subtle,#7a6c57);margin:2px 0 0}
body.has-side .group-invite,body.has-side .wb-profile{display:none!important}
/* ngày giờ thu gọn */
.hh-gio{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:48px;margin:14px 0 4px;padding:10px 14px;border:1px solid #ece4d6;border-radius:12px;background:#faf8f4;font:400 14px/1.4 "Inter","Be Vietnam Pro",system-ui,sans-serif;color:#5a4b39;cursor:pointer;text-align:left}
.hh-gio b{font-weight:600;color:#1c1a17}
.hh-gio span:last-child{color:#a8392a;font-weight:600;white-space:nowrap}
#castForm.hh-gon .date-caption,#castForm.hh-gon .dt-group,#castForm.hh-gon .calendar-choice,#castForm.hh-gon .advanced-calendar{display:none!important}
/* câu hỏi gợi ý: thẻ trượt ngang */
.hh-goiy{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;gap:10px;margin:14px -16px 0;padding:22px 16px 6px;position:relative}
.hh-goiy::-webkit-scrollbar{display:none}
.hh-goiy span{position:absolute;left:16px;top:0;font:400 13px "Inter","Be Vietnam Pro",system-ui,sans-serif!important;color:var(--ds-subtle,#7a6c57)!important}
.hh-goiy button,.hh-goiy button:nth-of-type(n+5){display:flex!important;flex:none;align-items:center;justify-content:space-between;gap:12px;width:280px;min-height:56px;padding:14px 16px!important;border:0!important;border-radius:12px!important;background:#f6f3ee!important;font:400 14.5px/1.4 "Inter","Be Vietnam Pro",system-ui,sans-serif!important;color:#2b2219!important;text-align:left;scroll-snap-align:start}
.hh-goiy button::after{content:"\2192";color:var(--ds-subtle,#7a6c57);flex:none}
.hh-goiy button:hover{background:#efe9df!important}
/* phần dưới */
body.has-side .result-controls,body.has-side .details-panel{background:#fff!important;border:1px solid #efe8dc!important;box-shadow:none!important;border-radius:14px!important}
body.has-side .detail-tabs button[aria-selected=true]{background:#55703f!important;border-color:#55703f!important}
.hh-them{max-width:690px}
.hh-them h2{font:500 22px/1.3 "Inter","Be Vietnam Pro",system-ui,sans-serif!important}
.hh-buoc li,.hh-tools a{background:#faf8f4!important;border:1px solid #efe8dc!important}
.hh-buoc strong,.hh-tools strong{font-family:"Inter","Be Vietnam Pro",system-ui,sans-serif!important;font-weight:600}
body.has-side .brand-about{background:#faf8f4!important;border-top:1px solid #efe8dc!important;color:var(--ds-subtle,#7a6c57)!important}
.hh-doi{display:none}
@media(max-width:1023px){
 body.has-side .topbar{position:sticky!important;top:0;z-index:50;height:56px!important;min-height:56px!important;padding:0 10px!important;display:grid!important;grid-template-columns:44px 1fr auto!important;align-items:center;gap:6px;background:#fffffff2!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:0!important;border-bottom:1px solid #eee9e1!important;box-shadow:none!important}
 body.has-side .topbar .hcq-burger{border:0;background:transparent;width:44px;height:44px}
 body.has-side .topbar .brand{justify-self:center;display:flex!important;align-items:center;gap:4px;margin:0!important}
 body.has-side .topbar .brand-logo{width:34px!important;height:34px!important}
 body.has-side .topbar .original-wordmark{width:118px!important;height:40px!important;max-width:40vw}
 body.has-side .topbar .brand small,body.has-side .topbar .header-poem,body.has-side .topbar .site-nav{display:none!important}
 body.has-side .topbar .hh-phai{display:flex;gap:8px;align-items:center}
 body.has-side .topbar #historyButton,body.has-side .topbar .hh-tron{width:38px!important;height:38px!important;min-width:38px;padding:0!important;border-radius:50%!important;border:1px solid #efe4d2!important;background:#fbf6ec!important;display:grid!important;place-items:center;font-size:0!important;color:transparent!important;position:relative}
 body.has-side .topbar #historyButton::before{content:"";width:20px;height:20px;background:#6d5a3c;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 12a8 8 0 1 0 2.4-5.7L4 8.5'/%3E%3Cpath d='M4 4v4.5h4.5M12 8v4l3 2'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 12a8 8 0 1 0 2.4-5.7L4 8.5'/%3E%3Cpath d='M4 4v4.5h4.5M12 8v4l3 2'/%3E%3C/svg%3E") center/contain no-repeat}
 body.has-side .topbar #historyCount{position:absolute;top:-4px;right:-4px;min-width:16px;height:16px;border-radius:8px;background:#8e2418;color:#fff;font:600 10px/16px system-ui;text-align:center}
 body.has-side .topbar .hh-tron svg{width:20px;height:20px;stroke:#6d5a3c;fill:none;stroke-width:1.8}
 body.has-side .hcq-tabbar{display:none!important}
 body.has-side.has-tabbar{padding-bottom:0!important}
 .hh-hero{margin:26px auto 16px;padding:0 16px}
 .hh-title{font-size:23px!important}
 .hh-vat{height:210px}
 .hh-mai{height:210px}
 .hh-doi{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:46px;margin:18px 0 0;padding:10px 14px;border:1px solid #ece4d6;border-radius:12px;background:#faf8f4;font:400 14px/1.3 "Inter","Be Vietnam Pro",system-ui,sans-serif;color:#5a4b39;cursor:pointer;text-align:left}
 .hh-doi b{font-weight:600;color:#1c1a17}
 .hh-doi span:last-child{color:#a8392a;font-weight:600;white-space:nowrap}
 .hh-goiy button,.hh-goiy button:nth-of-type(n+5){width:250px}
}
@media (prefers-reduced-motion:reduce){.hh-xu3-xoay,.hh-xu3-bong{animation:none}}
body.has-side .kaiyuan-stage,body.has-side .coins-stage{background:#faf8f4!important;border:1px solid #efe8dc!important;border-radius:14px!important;box-shadow:none!important}
body.has-side .kaiyuan-stage .coin-rule,body.has-side .coin-progress{font-family:"Inter","Be Vietnam Pro",system-ui,sans-serif!important;color:#6d5f4b!important}
body.has-side #throwCoins{min-height:48px!important;border-radius:12px!important;background:#fff!important;border:1px solid #e3dccf!important;color:#1c1a17!important;font:600 15px "Inter","Be Vietnam Pro",system-ui,sans-serif!important}
@media(max-width:1023px){
 html body.has-side header.topbar{grid-template-columns:44px minmax(0,1fr) auto!important;grid-template-rows:56px!important;grid-template-areas:none!important}
 html body.has-side header.topbar>.hcq-burger{grid-area:1/1!important}
 html body.has-side header.topbar>.brand{grid-area:1/2!important;justify-self:center!important}
 html body.has-side header.topbar>.hh-phai{grid-area:1/3!important}
}
@media(max-width:1023px){html body.has-side header.topbar #historyCount{display:none!important}}

/* 8.27 · Hình đầu khung dựng 3D: đồng logo có cạnh dày, xấp tiền có bề dày */
.hh-logo{position:relative;transition:opacity .5s,transform .8s cubic-bezier(.2,.8,.2,1);perspective:700px}
.hh-hero .hh-logo{opacity:0;transform:scale(.9);pointer-events:none}
.hh-hero[data-loai=seri] .hh-logo-seri,.hh-hero[data-loai=sodt] .hh-logo-sodt,.hh-hero[data-loai=tay] .hh-logo-tay,.hh-hero[data-loai=ngaunhien] .hh-logo-ngaunhien,.hh-hero[data-loai=haiba] .hh-logo-haiba,.hh-hero[data-loai=ngulinh] .hh-logo-ngulinh{opacity:1;transform:none}
.hh-m3{width:156px;height:180px}
.hh-m3-xoay{position:absolute;left:0;top:6px;width:156px;height:156px;transform-style:preserve-3d;animation:hhLac 6s ease-in-out infinite}
.hh-m3-xoay img{position:absolute;inset:0;width:156px;height:156px;border-radius:50%;object-fit:cover;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.hh-m3-f{transform:translateZ(5px)}
.hh-m3-b{transform:rotateY(180deg) translateZ(5px);filter:brightness(.85)}
.hh-m3-canh{position:absolute;inset:0;transform-style:preserve-3d}
.hh-m3-canh i{position:absolute;left:72.9px;top:73px;width:10.2px;height:10px;background-image:repeating-linear-gradient(90deg,#00000033 0 .6px,#ffffff1c .6px 1.4px,#0000 1.4px 2.6px),linear-gradient(#00000099,#0000 30%,#ffffff40 50%,#0000 68%,#00000073)}
.hh-m3::after,.hh-h3::after{content:"";position:absolute;left:18%;right:18%;bottom:0;height:12px;border-radius:50%;background:radial-gradient(closest-side,#2a1a0c40,#2a1a0c00)}
.hh-h3{--w:300px;--h:236px;--d:16px;width:var(--w);height:calc(var(--h) + 30px)}
.hh-h3-xoay{position:absolute;left:0;top:4px;width:var(--w);height:var(--h);transform-style:preserve-3d;animation:hhLac2 7s ease-in-out infinite}
.hh-h3-xoay>*{position:absolute;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.hh-h3-f,.hh-h3-b{left:0;top:0;width:var(--w);height:var(--h);object-fit:cover;border-radius:6px}
.hh-h3-f{transform:translateZ(calc(var(--d)/2))}
.hh-h3-b{transform:rotateY(180deg) translateZ(calc(var(--d)/2));filter:brightness(.7) sepia(.3)}
.hh-h3-l,.hh-h3-r{top:0;left:calc(50% - var(--d)/2);width:var(--d);height:var(--h);background:repeating-linear-gradient(90deg,#efe9d6 0 1px,#b9c7a8 1px 2px,#dfe6cf 2px 3px)}
.hh-h3-l{transform:rotateY(-90deg) translateZ(calc(var(--w)/2))}
.hh-h3-r{transform:rotateY(90deg) translateZ(calc(var(--w)/2))}
.hh-h3-t,.hh-h3-d{left:0;top:calc(50% - var(--d)/2);width:var(--w);height:var(--d);background:repeating-linear-gradient(0deg,#efe9d6 0 1px,#b9c7a8 1px 2px,#dfe6cf 2px 3px)}
.hh-h3-t{transform:rotateX(90deg) translateZ(calc(var(--h)/2))}
.hh-h3-d{transform:rotateX(-90deg) translateZ(calc(var(--h)/2))}
@keyframes hhLac{0%,100%{transform:rotateX(10deg) rotateY(-38deg)}50%{transform:rotateX(4deg) rotateY(38deg) translateY(-6px)}}
@keyframes hhLac2{0%,100%{transform:rotateX(16deg) rotateY(-22deg) rotateZ(-2deg)}50%{transform:rotateX(10deg) rotateY(20deg) rotateZ(1deg) translateY(-6px)}}
@media (prefers-reduced-motion:reduce){.hh-m3-xoay,.hh-h3-xoay{animation:none;transform:rotateX(10deg) rotateY(-20deg)}}
@media (max-width:640px){.hh-h3{--w:250px;--h:197px}.hh-hero .hh-m3{transform:scale(.9)}}
/* 8.26 · Phiếu quẻ ngay dưới nút LẬP QUẺ */
#resultArea.hh-kq{scroll-margin-top:72px;margin-top:14px}
@media (min-width:1024px){#resultArea.hh-kq{scroll-margin-top:16px}}

/* 8.27 · Câu hỏi gợi ý chạy ngang, mờ hai mép */
.hh-goiy{-webkit-mask:linear-gradient(90deg,transparent,#000 18px,#000 calc(100% - 28px),transparent);mask:linear-gradient(90deg,transparent,#000 18px,#000 calc(100% - 28px),transparent);touch-action:pan-x pan-y}
.hh-goiy{padding-top:6px!important;margin-top:4px!important}
.hh-goiy-nhan{margin:14px 0 0;font:400 13px "Inter","Be Vietnam Pro",system-ui,sans-serif;color:var(--ds-subtle,#7a6c57)}
@media print{.hh-goiy-nhan{display:none}}
/* 8.27 · Ngày giờ động tâm mở sẵn */
.hh-gio{display:none!important}
/* 8.28 · Các cách lấy số đã có dòng riêng trong danh mục: bỏ hàng ô con trên trang chủ */
.serial-method-tabs,.manual-method-tabs{display:none!important}
/* 8.28 · Khu riêng: bỏ lưới ô Tụ Bảo Lâu, các môn mở từ danh mục bên trái (Quân dặn) */
html body .met-hub-nav,html body .met-hub-nav.calendar-view-tabs,html body .met-hub-nav.calendar-view-tabs:not([hidden]){display:none!important}

/* 8.30 · Đưa ý từ bản thử vào khung 8.29 (DESIGN.md, Giấy · Son · Lục). Tự vẽ, không lấy hình hay mã của trang khác.
   Tiêu đề chữ có chân, ấn son trên nút Lập quẻ, số chữ Hán trên ô Công cụ chính, núi mực mờ dưới ảnh đầu trang, hàng 64 quẻ. Không đụng lá phiếu. */
.hh-vat{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 690 120' preserveAspectRatio='none'%3E%3Cpath d='M0 120L0 112C60 104 100 96 150 80C200 64 240 78 290 60C340 42 380 66 430 54C490 40 540 70 600 88C640 100 670 108 690 112L690 120Z' fill='%2314563a' fill-opacity='.07'/%3E%3Cpath d='M0 120L0 116C90 110 150 100 220 92C300 82 350 98 420 90C500 82 580 100 690 116L690 120Z' fill='%232b2219' fill-opacity='.05'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:center bottom;background-size:100% 120px}
.hh-title{font:600 clamp(26px,3.2vw,40px)/1.3 var(--ds-font-serif,"Noto Serif","HCQ Viet",Georgia,serif)!important;letter-spacing:.01em!important;color:var(--ds-ink-warm,#2b2219)!important}
.hh-them h2{font:700 23px/1.3 var(--ds-font-serif,"Noto Serif","HCQ Viet",Georgia,serif)!important;letter-spacing:.02em}
.hh-buoc strong,.hh-tools strong{font-family:var(--ds-font-serif,"Noto Serif","HCQ Viet",Georgia,serif)!important}
.hh-buoc b{font:700 18px var(--ds-font-serif,"Noto Serif",Georgia,serif);letter-spacing:.04em;color:var(--ds-action,#a8392a)}
body.has-side .cast-button::before{content:"卦";position:absolute;left:12px;top:50%;transform:translateY(-50%);width:32px;height:32px;box-sizing:border-box;display:grid;place-items:center;border:1.5px solid #f7e9d2;border-radius:6px;font:700 18px/1 var(--ds-font-han,"Noto Serif TC",serif);letter-spacing:0;color:#f7e9d2}
.hh-tools a{position:relative;padding-right:36px}
.hh-tools a::after{position:absolute;top:10px;right:12px;font:700 15px/1 var(--ds-font-han,"Noto Serif TC",serif);color:var(--ds-action,#a8392a)}
.hh-tools a:nth-child(1)::after{content:"壹"}
.hh-tools a:nth-child(2)::after{content:"貳"}
.hh-tools a:nth-child(3)::after{content:"參"}
.hh-tools a:nth-child(4)::after{content:"肆"}
.hh-tools a:nth-child(5)::after{content:"伍"}
.hh-tools a:nth-child(6)::after{content:"陸"}
.hh-tools a:nth-child(7)::after{content:"柒"}
.hh-tools a:nth-child(8)::after{content:"捌"}
.hh-64{display:flex;align-items:center;gap:16px;margin:26px 0 6px;padding:18px 4px;border-top:1px solid var(--ds-line-strong,#dccdae);border-bottom:1px solid var(--ds-line-strong,#dccdae);color:var(--ds-ink,#1c1a17);text-decoration:none}
.hh-64-q{flex:none}
.hh-64-c{flex:1;display:flex;flex-direction:column;gap:2px;text-align:left}
.hh-64-c strong{font:700 19px/1.3 var(--ds-font-serif,"Noto Serif","HCQ Viet",Georgia,serif);color:var(--ds-ink-warm,#2b2219)}
.hh-64-c span{font:400 14px/1.5 var(--ds-font-ui,"Inter","Be Vietnam Pro",system-ui,sans-serif);color:var(--ds-text-2,#5a4b39)}
.hh-64 b{flex:none;font-weight:400;font-size:20px;color:var(--ds-text-2,#5a4b39)}
.hh-64:hover{border-color:var(--ds-gold,#b08a57)}
.hh-64:focus-visible{outline:3px solid var(--ds-brand,#4a6337);outline-offset:3px}
@media(max-width:1023px){.hh-title{font-size:26px!important}.hh-vat{background-size:100% 96px}.hh-64-c strong{font-size:17.5px}}
@media print{.hh-64{display:none}.hh-vat{background-image:none}}
/* 8.31 · Hàng lưới hình đầu khung cao đúng bằng khung (trước đây khối ẩn cao 266px đẩy cành mai đè lên ô Cách lập). Dải gợi ý kéo được bằng chuột. */
.hh-vat{grid-template-rows:minmax(0,100%);overflow:visible}
.hh-vat>*{align-self:center;justify-self:center}
@media (hover:hover) and (pointer:fine){.hh-goiy{cursor:grab}.hh-goiy.dang-keo{cursor:grabbing;user-select:none}.hh-goiy.dang-keo button{pointer-events:none}}
/* 8.39 · Nút thẻ Hướng dẫn, Cách tính, Thông tin quẻ, Ghi chú dùng chữ không chân như các nút khác; điện thoại giữ một hàng, thiếu chỗ thì lướt ngang */
.detail-tabs button{font-family:var(--ds-font-sans,"Inter","Be Vietnam Pro",system-ui,sans-serif)!important;font-size:13.5px!important;letter-spacing:0!important}
@media (max-width:600px){.detail-tabs{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;gap:6px!important}.detail-tabs::-webkit-scrollbar{display:none}.detail-tabs button{flex:none;white-space:nowrap;padding:7px 13px!important}}
/* 8.39 · Công cụ chính trên laptop: hai cột để tên và mô tả không bị bóp xuống năm dòng */
@media (min-width:1024px){.hh-tools{grid-template-columns:1fr 1fr}}
/* 8.39 · Đầu trang trên điện thoại: luật cũ ".topbar:not(:has(#reviewJournal))" mạnh hơn nên dồn logo sát nút Lịch sử, iPhone bị đè lên nhau.
   Ép lại ba cột cân hai bên: ☰ | logo giữa (tự co khi máy hẹp) | hai nút tròn. */
@media(max-width:1023px){
 html body.has-side header.topbar:not(#hcq-x){grid-template-columns:84px minmax(0,1fr) 84px!important}
 html body.has-side header.topbar:not(#hcq-x)>.hcq-burger{justify-self:start}
 html body.has-side header.topbar:not(#hcq-x)>.brand{min-width:0;max-width:100%;overflow:hidden}
 html body.has-side header.topbar:not(#hcq-x) .brand-logo{flex:0 0 34px!important;padding:0!important}
 html body.has-side header.topbar:not(#hcq-x) .brand-text{min-width:0;flex:0 1 auto}
 html body.has-side header.topbar:not(#hcq-x) .original-wordmark{max-width:100%!important}
 html body.has-side header.topbar:not(#hcq-x) #historyButton{min-height:38px!important;max-height:38px}
}


/* 8.40 · Gọn một màn hình: Lục Hào thấy đủ đồng xu hiện và ba đồng gieo; mọi môn Mai Hoa dùng cành mai; ô câu hỏi thấp, gợi ý một hàng nhỏ */
body.has-side .hh-hero{margin:14px auto 12px!important}
body.has-side .hh-hero .hh-kicker{margin:0!important;font-size:12px!important}
body.has-side .hh-hero .hh-title{margin:2px 0 4px!important;font-size:28px!important;line-height:1.15!important}
body.has-side .hh-vat{height:176px!important}
body.has-side .hh-mai{height:176px!important}
body.has-side .hh-hero[data-loai=luchao] .hh-vat{height:120px!important}
body.has-side .hh-hero[data-loai=luchao] .hh-xu3{transform:scale(.8);transform-origin:center 45%}
body.has-side .hh-hero:not([data-loai=luchao]) .hh-mai{opacity:1!important;transform:none!important;pointer-events:auto!important}
body.has-side .hh-hero .hh-logo{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
body.has-side #castForm #question{min-height:60px!important;height:60px;padding:10px 14px!important}
body.has-side #castForm label:first-of-type{margin-bottom:2px}
body.has-side .hh-goiy-nhan{margin:8px 0 0!important}
body.has-side .hh-goiy{margin-top:2px!important;padding-bottom:2px!important}
body.has-side .hh-goiy button,body.has-side .hh-goiy button:nth-of-type(n+5){width:236px!important;min-height:44px!important;padding:8px 14px!important;font-size:13px!important;line-height:1.3!important}
body.has-side .coins-stage .coin-faces{margin:4px 0 0!important;gap:20px!important;height:132px!important;min-height:0!important}
body.has-side .coins-stage .coin-rule{margin:0 0 4px!important}
body.has-side .coins-stage .coin-progress{margin:0!important}
@media (max-width:700px){body.has-side .hh-title{font-size:22px!important}body.has-side .hh-vat,body.has-side .hh-mai{height:140px!important}body.has-side .hh-hero[data-loai=luchao] .hh-vat{height:100px!important}}

/* 8.43 · Biểu tượng nét 2D trên thanh danh mục: nền tròn nhạt, nét xanh thương hiệu; mục đang mở đỏ son; mục khóa màu đất */
.hs-i .hs-ic,.hs-k .hs-ic{flex:0 0 30px!important;width:30px!important;height:30px!important;min-width:0!important;padding:0!important;border-radius:50%;display:grid!important;place-items:center;background:#f0f2ef;box-shadow:inset 0 0 0 1px #dadfd6}
.hs-i .hs-ic svg{width:19px!important;height:19px!important;stroke:#4a6337!important;stroke-width:1.6!important;fill:none}
.hs-i[aria-current=page] .hs-ic{background:#fff;box-shadow:inset 0 0 0 1.5px #8e2418}
.hs-i[aria-current=page] .hs-ic svg{stroke:#8e2418!important}
.hs-k .hs-ic{background:#f3eee4;box-shadow:inset 0 0 0 1px #e3d6ba}
.hs-k .hs-ic svg{stroke:#7d6a4c!important}
.hs-foot .hs-ic{background:transparent;box-shadow:none}
.hs-foot .hs-ic svg{stroke:#8b7d68!important}

/* 8.44–8.45 · Khung lập quẻ và câu thơ thành một cụm cân giữa vùng nội dung; lề trái do ui/cau-tho.mjs tính */
@media (min-width:1024px){body.has-side main.paper>#ichingPanel{margin-right:auto!important}}

/* 8.47 · Biểu tượng danh mục nổi hơn: nền tròn đặc xanh thương hiệu, nét trắng dày; mục đang mở đỏ son; mục khóa nâu đất */
html body .hs-i .hs-ic,html body .hs-k .hs-ic{flex:0 0 32px!important;width:32px!important;height:32px!important;background:#4a6337!important;box-shadow:0 1px 2px #4a633740,inset 0 0 0 1px #ffffff26!important}
html body .hs-i .hs-ic svg{width:19px!important;height:19px!important;stroke:#fff!important;stroke-width:1.9!important}
html body .hs-i[aria-current=page] .hs-ic{background:#8e2418!important;box-shadow:0 0 0 3px #8e241826!important}
html body .hs-i[aria-current=page] .hs-ic svg{stroke:#fff!important}
html body .hs-k .hs-ic{background:#8b7355!important}
html body .hs-k .hs-ic svg{stroke:#fff!important}
html body .hs-i:hover .hs-ic{background:#4a6532!important}
html body .hs-foot .hs-ic{background:#efe7d6!important;box-shadow:none!important}
html body .hs-foot .hs-ic svg{stroke:#6f604a!important}

/* 9.56 · Tụ Bảo Lâu ba màu: tốt (hoàng đạo) ô liu, xấu (hắc đạo) đen, trung trắng. Ô ngày tô màu trong ui/mau-tot-xau.mjs. */
html body .tbl-good-dot{color:#fff!important;background:#2e8540!important}
html body .tbl-bad-dot{color:#fff!important;background:#c8372d!important}
html body .tbl-cell-tags i{border-color:#a99a82!important;color:#3a3128!important;background:#fff!important}
html body .tbl-grid .tbl-date-cell{background:#fff!important;border-color:#cfc8bd!important}
html body .tbl-hours article.tbl-good{border-color:#9fcf9a!important;border-top:4px solid #2e8540!important;background:#e3f1dc!important}
html body .tbl-hours article.tbl-bad{border-color:#e3a59f!important;border-top:4px solid #c8372d!important;background:#fbe4e1!important}
html body .fx-extra .fx-tag.good{color:#fff!important;background:#2e8540!important}
html body .fx-extra .fx-tag.bad{color:#fff!important;background:#c8372d!important}
html body .fx-extra .fx-tag:not(.good):not(.bad){color:#3a2c08!important;background:#f2c94c!important;box-shadow:none}
html body .calendar-good{color:#2e7d32!important}
html body .calendar-bad{color:#c62828!important}
html body .calendar-hour-table article.calendar-good{border-color:#9fcf9a!important;border-top:4px solid #2e8540!important;background:#e3f1dc!important}
html body .calendar-hour-table article.calendar-bad{border-color:#e3a59f!important;border-top:4px solid #c8372d!important;background:#fbe4e1!important;opacity:1!important}

/* 8.52 · Nút "Gieo hào" Lục Hào: nút nhỏ, màu son nhạt, đủ để nhận ra là nút mà không chói (trước nền trắng, trông như dòng chữ) */
html body #castForm #throwCoins.secondary{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;min-width:0!important;width:auto!important;min-height:34px!important;padding:5px 14px!important;background:#f7ece7!important;border:1px solid #e6cdc4!important;border-radius:999px!important;color:#9a4a3e!important;font:500 14px "Inter","Be Vietnam Pro",system-ui,sans-serif!important;letter-spacing:0!important;box-shadow:none!important;cursor:pointer}
html body #castForm #throwCoins.secondary::before{content:"";width:11px;height:11px;flex:none;border-radius:50%;background:radial-gradient(circle,transparent 0 2.5px,#d9b77a 2.5px 100%);box-shadow:inset 0 0 0 1px #b08a57;opacity:.85}
html body #castForm #throwCoins.secondary::after{content:"›";font-size:16px;line-height:1;opacity:.7}
html body #castForm #throwCoins.secondary:hover{background:#f2e0d8!important;border-color:#d9b0a3!important;color:#8e2418!important}
html body #castForm #throwCoins.secondary:active{transform:translateY(1px)}
html body #castForm #throwCoins.secondary:focus-visible{outline:2px solid #d9b77a!important;outline-offset:2px}
html body #castForm #throwCoins.secondary:disabled{background:transparent!important;border-color:#e3dccf!important;color:#a99d8a!important;cursor:default}
html body #castForm #throwCoins.secondary:disabled::before,html body #castForm #throwCoins.secondary:disabled::after{display:none}

/* 8.54 · Danh mục bên trái tinh giản: ô biểu tượng nhỏ màu nhạt, nét xanh mảnh (thay vòng tròn xanh đặc), dòng thấp, nhãn một dòng. Mỗi môn giữ biểu tượng riêng. */
html body .hcq-side .hs-nav{padding:4px 10px 10px}
html body .hcq-side .hs-g{margin:18px 10px 4px;font-size:11.5px;letter-spacing:.1em}
html body .hcq-side .hs-nav>.hs-g:first-child{margin-top:10px}
html body .hcq-side .hs-i{min-height:38px;gap:11px;padding:0 10px;border-radius:9px;font-size:14.5px;color:#3b3127}
html body .hcq-side .hs-i:not(.hs-k)>span:not(.hs-ic){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .hcq-side .hs-i .hs-ic,html body .hcq-side .hs-k .hs-ic{flex:0 0 28px!important;width:28px!important;height:28px!important;border-radius:8px!important;background:#eff2ea!important;box-shadow:none!important}
html body .hcq-side .hs-i .hs-ic svg{width:18px!important;height:18px!important;stroke:#4a6337!important;stroke-width:1.6!important}
html body .hcq-side .hs-i:hover{background:#f6f3ee}
html body .hcq-side .hs-i:hover .hs-ic{background:#e7ebe4!important}
html body .hcq-side .hs-i[aria-current=page]{background:#f9eeea;color:#8e2418;font-weight:600}
html body .hcq-side .hs-i[aria-current=page] .hs-ic{background:#8e2418!important;box-shadow:none!important}
html body .hcq-side .hs-i[aria-current=page] .hs-ic svg{stroke:#fff!important}
html body .hcq-side .hs-k .hs-ic{background:#f3eee4!important}
html body .hcq-side .hs-k .hs-ic svg{stroke:#8b7355!important}
html body .hcq-side .hs-foot .hs-ic{background:transparent!important}
html body .hcq-side .hs-foot .hs-ic svg{stroke:#7d705c!important}
html body .hcq-side .hs-i .hs-pre{font-weight:400;color:#8b7d68}
html body .hcq-side .hs-i[aria-current=page] .hs-pre{color:#b8645a}

/* 8.56 · Ô tháng nhuận đứng cuối khung nhập ngày sinh, trọn một hàng (ui/thang-nhuan.mjs) */
html body #destinyForm>label.o-thang-nhuan:has(#birthLeap),html body form .o-thang-nhuan{grid-column:1/-1!important}

/* 8.81 · Cành mai đỏ của Quân thay tranh thủy mặc (bản trước bị rối). Nền trắng của ảnh đã tách thành trong suốt.
   Máy tính: cành nằm sát mép phải và mép trên, rộng 36% màn hình (từ 360 đến 620 px, không phóng quá cỡ gốc 1125 px), đứng yên khi cuộn trang. Cột thơ đặt ngay dưới cành, cũng đứng yên (ui/cau-tho.mjs). Điện thoại: nền giấy trơn.
   8.67 · Ảnh nền tranh sơn thủy thay logo chìm. */
html,body{background-color:#f5f5f3!important}
body::before{content:""!important;position:fixed!important;inset:0!important;height:auto!important;z-index:-1!important;pointer-events:none!important;opacity:1!important;filter:none!important;
 background:#f5f5f3!important;transform:translateZ(0)}
@media (max-width:760px){body::before{background:#f5f5f3!important}}
@media print{body::before{display:none!important}}
html body.has-side,html body{background:transparent!important;background-image:none!important}
html body.has-side #castForm{background:rgba(255,255,255,.66)!important;border-radius:18px!important}
html body .hh-vat{background-image:none!important}html body .hh-vat img{mix-blend-mode:multiply}
/* 8.85 · Ảnh trong khối xu 3D và logo 3D không được hòa trộn: Chrome thấy mix-blend-mode thì ép phẳng cả khối 3D, mép xu biến mất. */
html body .hh-vat .hh-xu3 img,html body .hh-vat .hh-logo img{mix-blend-mode:normal!important}
@media (min-width:761px){body::before{position:fixed!important;inset:0 0 auto auto!important;width:clamp(360px,36vw,620px)!important;height:auto!important;aspect-ratio:1125/724;transform:none;background:url("../nen-canh-mai.webp") right top/100% auto no-repeat!important}}
/* 8.82 · Khung lập quẻ, phiếu kết quả và các ô "Ba bước", "Công cụ chính" để nền trong bớt, cành mai phía sau hiện rõ liền một dải (trước đó khung trắng che làm cành đậm nhạt hai mảng). */
@media (min-width:761px){html body #ichingPanel #castForm.cast-form{background:rgba(255,255,255,.2)!important}html body #ichingPanel #castForm nav.quick-access{background:rgba(255,253,245,.35)!important}html body #ichingPanel>section.details-panel{background:rgba(255,255,255,.2)!important}html body .hh-them .hh-buoc>li,html body .hh-them .hh-tools>a{background:rgba(250,248,244,.15)!important}}
/* Cột thư pháp nằm trên tranh: lót quầng giấy mờ cho chữ rõ. */
.hcq-tho{background:radial-gradient(closest-side,rgba(252,250,244,.82),rgba(252,250,244,.55) 70%,rgba(252,250,244,0));border-radius:40px;padding:10px 6px}
/* 8.73 · Bình mai 3D: hai lớp ảnh giữ màu thật (không nhân màu với nền), bóng đổ mềm dưới chậu. */
html body .hh-vat img.hh-mai{mix-blend-mode:normal!important;will-change:transform;backface-visibility:hidden}
html body .hh-vat img.hh-mai:not(.hh-mai-hoa){filter:drop-shadow(0 10px 10px #2a201633)!important}
html body .hh-vat img.hh-mai-hoa{filter:drop-shadow(0 6px 6px #2a20161f)!important}
/* 8.75 · Bình mai đầu trang: lớn hơn, bóng đổ dưới chậu, quầng sáng ấm sau tán, vài cánh hoa rơi. */
html body .hh-hero .hh-vat{height:206px!important;position:relative;isolation:isolate}
html body .hh-hero .hh-vat img.hh-mai{height:206px!important}
html body .hh-vat::before{content:"";position:absolute;z-index:-1;left:50%;top:2%;width:250px;height:150px;transform:translateX(-50%);pointer-events:none;
 background:radial-gradient(closest-side,rgba(255,214,200,.55),rgba(255,236,226,.28) 55%,rgba(255,255,255,0));filter:blur(2px)}
html body .hh-vat::after{content:"";position:absolute;z-index:-1;left:50%;bottom:-4px;width:150px;height:16px;transform:translateX(-50%);pointer-events:none;
 background:radial-gradient(closest-side,rgba(40,28,20,.32),rgba(40,28,20,0));}
.hh-hero[data-loai=luchao] .hh-vat::before,.hh-hero[data-loai=luchao] .hh-vat::after,.hh-hero[data-loai=luchao] .bm-roi{display:none}
.bm-roi{position:absolute;inset:0;pointer-events:none;overflow:visible;z-index:2}
.bm-roi i{position:absolute;top:28%;width:9px;height:7px;border-radius:70% 0 70% 0;background:linear-gradient(135deg,#ffd9d2,#f2708a);opacity:0;animation:bmRoi 9s linear infinite}
@keyframes bmRoi{0%{opacity:0;transform:translate(0,0) rotate(0)}8%{opacity:.95}70%{opacity:.85}100%{opacity:0;transform:translate(var(--dx),118px) rotate(var(--r))}}
@media (max-width:760px){html body .hh-hero .hh-vat,html body .hh-hero .hh-vat img.hh-mai{height:170px!important}html body .hh-vat::before{width:200px;height:120px}html body .hh-vat::after{width:122px}}
@media (prefers-reduced-motion:reduce){.bm-roi{display:none}}
/* 8.85 · Logo vẽ mới cho từng môn: để trần (không khung tròn), cao 34 px, tự có bóng đổ. */
html body .hcq-side .hs-i .hs-ic.hs-logo,html body .hcq-side .hs-k .hs-ic.hs-logo,.hs-i .hs-ic.hs-logo{flex:0 0 34px!important;width:34px!important;height:34px!important;padding:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible}
.hs-ic.hs-logo img{display:block;width:100%;height:100%;object-fit:contain;transition:transform .2s}
html body .hcq-side .hs-i:hover .hs-ic.hs-logo img{transform:scale(1.12) translateY(-1px)}
html body .hcq-side .hs-i[aria-current=page] .hs-ic.hs-logo img{transform:scale(1.1);filter:drop-shadow(0 0 3px #8e241866)}
html body .hcq-side .hs-k .hs-ic.hs-logo img{filter:saturate(.85)}
/* 8.86 · Giữa trang chỉ còn bình mai (mọi cách lập Mai Hoa, Ngũ Linh, Thủ công) và đồng xu (Lục Hào). */

/* 8.87 · Máy tính: vẫn một hàng thẳng (hình trên, ô lập quẻ dưới), thu gọn hình và khoảng cách để cả cụm nằm gọn trong một màn hình (Quân dặn). */
@media (min-width:1024px){
 html body.has-side .hh-hero{margin:6px auto 4px!important}
 html body.has-side .hh-hero .hh-title{font-size:26px!important;margin:0 0 2px!important}
 html body.has-side .hh-hero .hh-vat{height:150px!important}
 html body.has-side .hh-hero .hh-vat img.hh-mai{height:150px!important}
 html body.has-side .hh-hero[data-loai=luchao] .hh-vat{height:104px!important}
 html body.has-side .hh-vat .hh-xu3{transform:scale(.72)!important;transform-origin:center 40%}
 html body.has-side #castForm{padding-bottom:6px!important}
 html body.has-side #castForm #question{min-height:46px!important;height:46px;padding:10px 14px!important}
 html body.has-side #castForm .hh-goiy-nhan{display:none!important}
 html body.has-side #castForm .hh-goiy{margin-top:6px!important;margin-bottom:0!important}
 html body.has-side #castForm .date-caption{margin-top:6px!important;margin-bottom:4px!important;min-height:0!important}
 html body.has-side #castForm .dt-group{gap:8px!important}
 html body.has-side #castForm .dt-group select,html body.has-side #castForm .dt-group input{min-height:42px!important;height:42px!important}
 html body.has-side #castForm .advanced-calendar{margin-top:2px!important}
 html body.has-side #castForm .date-caption{height:auto!important}
 html body.has-side #castForm .date-caption>*{min-height:0!important;height:auto!important;padding-top:0!important;padding-bottom:0!important}
 html body.has-side #castForm .advanced-calendar>summary{padding-top:4px!important;padding-bottom:4px!important;min-height:0!important;height:auto!important}
 html body.has-side #castForm .hh-goiy>*{min-height:38px!important;padding-top:4px!important;padding-bottom:4px!important}
 html body.has-side #castForm .calendar-choice{margin-top:4px!important;margin-bottom:2px!important}
 html body.has-side #castForm .form-actions{margin-top:8px!important;gap:2px!important}
 html body.has-side .cast-button{height:48px!important;min-height:48px!important}
 html body.has-side #castForm .form-actions .secondary,html body.has-side #resetButton{min-height:30px!important}
}

/* 9.10 · Trang chủ thanh thoát (Quân duyệt bản thử 16/11).
   Cành mai chỉ nằm ở đầu trang, cuộn xuống thì trôi đi theo trang, không đè lên các thẻ bên dưới (trước đây ghim cố định). */
@media (min-width:761px){html body::before{position:absolute!important}}
/* Sáu nhóm "Bạn muốn xem gì?": thẻ trắng, viền mảnh, tên nhóm là đường dẫn, các công cụ con xếp một hàng gọn. */
html body .hh-them{max-width:960px}
html body .hh-them h2{font:600 24px/1.3 var(--ds-font-serif,"Noto Serif","HCQ Viet",Georgia,serif)!important;letter-spacing:0;text-align:left;margin:34px 0 4px}
.hh-dan{margin:0 0 18px;font:400 15px/1.55 var(--p-sans,"Inter","Be Vietnam Pro",system-ui,sans-serif);color:#7a6a5e}
.hh-nhom{display:grid;gap:14px;grid-template-columns:repeat(3,1fr)}
html body .hh-them .hh-the{display:flex;flex-direction:column;background:#fff!important;border:1px solid #ece3d6;border-radius:14px;padding:18px;transition:border-color .15s,box-shadow .15s}
.hh-the:hover{border-color:#dcc4b8;box-shadow:0 6px 24px rgba(60,40,20,.06)}
.hh-the-dau{display:flex;align-items:center;gap:12px;text-decoration:none;color:#2b211c}
.hh-the-dau .hh-p{flex:none;width:44px;height:44px;object-fit:contain}
.hh-the-dau strong{font:600 18px/1.3 var(--ds-font-serif,"Noto Serif","HCQ Viet",Georgia,serif)}
.hh-the-dau:hover strong{color:#a33a2c}
.hh-the>p{margin:8px 0 12px;font:400 14.5px/1.5 var(--p-sans,"Inter","Be Vietnam Pro",system-ui,sans-serif);color:#7a6a5e}
.hh-the ul{list-style:none;margin:auto 0 0;padding:10px 0 0;border-top:1px solid #f2ebe1;display:flex;flex-wrap:wrap;gap:4px 14px;font:400 14px/1.6 var(--p-sans,"Inter","Be Vietnam Pro",system-ui,sans-serif)}
.hh-the li a{color:#5d4f45;text-decoration:none}
.hh-the li a:hover{color:#a33a2c;text-decoration:underline}
.hh-the li.hh-khoa{width:100%;font-size:12px;color:#a99a8e}
.hh-the a:focus-visible{outline:3px solid #a33a2c;outline-offset:2px;border-radius:6px}
html body .hh-them .hh-buoc>li{background:transparent!important;border:0!important;padding:4px 0 0 48px;position:relative}
html body .hh-buoc b{position:absolute;left:0;top:2px;width:34px;height:34px;border-radius:50%;background:#f6e9e4;color:#a33a2c;font:600 16px/34px var(--ds-font-serif,"Noto Serif",Georgia,serif);text-align:center;letter-spacing:0}
@media (min-width:700px) and (max-width:1023px){.hh-nhom{grid-template-columns:1fr 1fr}}
@media (max-width:699px){.hh-nhom,html body .hh-buoc{grid-template-columns:1fr}html body .hh-them h2{font-size:22px!important}}
/* Hàng nút dưới khung lập quẻ và dòng Nhờ nhóm: bỏ xanh lá, về tông giấy và nâu cho cùng một màu với trang. */
html body .quick-access{border-color:#ece3d6!important;box-shadow:none!important}
html body .quick-access-buttons button{background:#faf6ef!important;border-color:#e3d6c6!important;color:#4a3d35!important}
html body .quick-access-buttons button:hover{background:#f3ece1!important}
html body .quick-access-buttons button:disabled{background:transparent!important;color:#a99a8e!important;border-color:#efe8dc!important}
html body .quick-access>a,html body .quick-access a{color:#8a2f23!important}
/* 9.13 · Trang chủ gọn cho người mới: chưa lập quẻ thì ẩn hàng nút Nhập/Xem kết quả/Giải thích và khối Hướng dẫn dài
   (lớp hh-chua-que do trang-chu.mjs gắn vào #ichingPanel theo #resultArea). Có quẻ rồi thì hiện lại như cũ. */
#ichingPanel.hh-chua-que .quick-access,#ichingPanel.hh-chua-que .details-panel{display:none!important}

/* 9.67 · Bảng chọn cách lập trên điện thoại (nút Đổi ›): trượt từ dưới lên, kiểu nổi mềm màu giấy như menu mới. */
.hh-bang-doi{position:fixed;inset:0;z-index:400;display:flex;align-items:flex-end;background:#1d1a1680}
.hh-bang-doi[hidden]{display:none!important}
.hh-bd-than{width:100%;max-height:78vh;display:flex;flex-direction:column;background:#e9e8e4;border-radius:22px 22px 0 0;padding:12px 14px calc(14px + env(safe-area-inset-bottom,0px));box-shadow:0 -10px 30px #0004;animation:hhBdLen .25s ease-out}
@keyframes hhBdLen{from{transform:translateY(40px);opacity:.4}}
.hh-bd-dau{display:flex;align-items:center;justify-content:space-between;padding:2px 4px 10px;font:600 15px/1.3 Inter,system-ui,sans-serif;color:#2f2c26}
.hh-bd-dong{width:36px;height:36px;border:0;border-radius:50%;background:#e9e8e4;box-shadow:3px 3px 7px #c8c4ba,-3px -3px 7px #fff;font-size:22px;line-height:1;color:#2f2c26}
.hh-bd-ds{display:grid;grid-template-columns:1fr 1fr;gap:10px;overflow:auto;padding:4px 4px 6px}
.hh-bd-muc{display:flex;align-items:center;gap:8px;min-height:52px;padding:8px 10px;border:0;border-radius:16px;background:#e9e8e4;box-shadow:4px 4px 9px #c8c4bacc,-4px -4px 9px #fff;font:500 13.5px/1.25 Inter,system-ui,sans-serif;color:#2f2c26;text-align:left}
.hh-bd-muc:active{box-shadow:inset 2px 2px 5px #cfcbc1,inset -2px -2px 5px #fff}
.hh-bd-muc[aria-current]{background:linear-gradient(135deg,#7d8640,#4f5a2c);color:#fff}
.hh-bd-muc .hs-ic{flex:none;width:32px;height:32px;border-radius:50%;background:#efeeea;display:grid;place-items:center;overflow:hidden}
.hh-bd-muc .hs-ic img{width:26px;height:26px;object-fit:contain}
.hh-bd-muc .hs-ic svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6}
.hh-bd-muc .hs-pre{font-weight:500;opacity:.75}
body.hh-bd-mo{overflow:hidden}

/* 10.29 · Quân: chuyển môn hình nhảy. Đầu khung Lục Hào thấp hơn các cách lập khác nên cả form bên dưới giật lên giật xuống. Cho cùng chiều cao. */
html body.has-side .hh-hero[data-loai=luchao] .hh-vat:is(div,#nm){height:206px!important}
@media (max-width:700px){html body.has-side .hh-hero[data-loai=luchao] .hh-vat:is(div,#nm){height:170px!important}}
@media (min-width:1024px){html body.has-side .hh-hero[data-loai=luchao] .hh-vat:is(div,#nm){height:150px!important}}

/* ui/chuyen-dong.css */
/* 9.40 · Chuyển động nhẹ: khối hiện dần khi cuộn tới, phiếu quẻ hiện mượt, khung công cụ mở êm, nút có độ nhún.
   Dùng opacity, translate, scale (thuộc tính riêng) để không đè transform của hiệu ứng rê chuột có sẵn.
   Người đặt máy "giảm chuyển động" thì không có gì chạy. */
@media screen and (prefers-reduced-motion:no-preference){
 .cd-an{opacity:0}
 .cd-hien{animation:cdLen .6s cubic-bezier(.2,.8,.2,1) var(--cd-tre,0s) backwards}
 @keyframes cdLen{from{opacity:0;translate:0 16px}to{opacity:1;translate:0 0}}

 /* Đầu khung lập quẻ: dòng nhỏ rồi tiêu đề nối nhau hiện lên, chạy lại khi đổi môn */
 .hh-hero .hh-kicker{animation:cdLen .5s cubic-bezier(.2,.8,.2,1) .05s backwards}
 .hh-hero .hh-title{animation:cdLen .6s cubic-bezier(.2,.8,.2,1) .14s backwards}

 /* Phiếu quẻ vừa lập */
 #resultSheet>.compact-image-wrap{animation:cdPhieu .55s cubic-bezier(.2,.8,.2,1) backwards}
 @keyframes cdPhieu{from{opacity:0;scale:.97;translate:0 12px}to{opacity:1;scale:1;translate:0 0}}

 /* Khung công cụ vừa mở từ menu: chỉ mờ dần, không dịch chỗ */
 #ichingPanel,#metaphysicsTools,#destinyTools,#congCuMo,#destinyResult{animation:cdMo .32s ease-out backwards}
 @keyframes cdMo{from{opacity:0}to{opacity:1}}

 /* Nút bấm nhún nhẹ */
 #castForm .cast-button,.hh-goiy button,.mode-tabs button,.result-controls button{transition-property:background-color,color,border-color,box-shadow,scale;transition-duration:.15s}
 #castForm .cast-button:active,.hh-goiy button:active,.mode-tabs button:active,.result-controls button:active{scale:.97}
}

/* 9.51 · Quân: chuyển động theo lối Ember (keepember.com), tự viết lại cho web mình.
   Hai kiểu nhịp: êm (trồi lên chậm dần) và nảy (hơi vượt rồi về, như lò xo).
   Đầu khung: chữ trồi lên lần lượt, hình chính nảy ra rồi "thở" chậm, quầng sáng phía sau phập phồng.
   Ô công cụ hiện dần khi cuộn tới; rê chuột thì ô nhấc lên, logo nảy to. Chỉ dùng translate, scale, rotate. */
:root{--cd-em:cubic-bezier(.2,.7,.2,1);--cd-nay:cubic-bezier(.34,1.4,.5,1)}
@media screen and (prefers-reduced-motion:no-preference){
 @keyframes cdTroi{from{opacity:.4;translate:0 14px}to{opacity:1;translate:none}}
 /* 9.55: cdNay chỉ đổi cỡ. Bản 9.51 có cả opacity nên trong giây đầu mọi hình đầu khung đang ẩn (opacity 0) hiện chồng lên nhau. */
 @keyframes cdNay{from{scale:.6}to{scale:1}}
 @keyframes cdTho{0%,100%{rotate:0deg;scale:1}50%{rotate:-2.5deg;scale:1.04}}
 @keyframes cdNoi{0%,100%{translate:0 0}50%{translate:0 -8px}}
 @keyframes cdSang{0%,100%{opacity:.75;scale:1}50%{opacity:1;scale:1.12}}
 @keyframes cdRise{from{opacity:0;translate:0 26px}to{opacity:1;translate:none}}

 .hh-hero .hh-kicker{animation:cdTroi .9s var(--cd-em) .05s backwards}
 .hh-hero .hh-title{animation:cdTroi .9s var(--cd-em) .17s backwards}
 .hh-hero .hh-vat{animation:cdNoi 8s ease-in-out .9s infinite}
 .hh-hero .hh-vat>.hh-ve,.hh-hero .hh-vat>.hh-xu3{animation:cdNay .8s var(--cd-nay) .2s backwards,cdTho 6s ease-in-out 1s infinite}

 /* Khối hiện khi cuộn: trồi 26px, chậm dần như Ember */
 .cd-hien{animation:cdRise .9s var(--cd-em) var(--cd-tre,0s) backwards}

 /* Ô công cụ trang chủ: nhấc lên mềm, logo nảy */
 section.hh-them a.hh-o{transition-property:translate,box-shadow,background-color;transition-duration:.5s;transition-timing-function:var(--cd-em)}
 section.hh-them a.hh-o img{transition:scale .35s var(--cd-nay),rotate .35s var(--cd-nay)}
 section.hh-them a.hh-o:hover{translate:0 -4px}
 section.hh-them a.hh-o:hover img,section.hh-them a.hh-o:focus-visible img{scale:1.12;rotate:-4deg}

 /* Logo trong menu và thẻ Quẻ hôm nay nảy nhẹ khi rê chuột */
 #hcqSide .hs-ic{transition:scale .35s var(--cd-nay)}
 #hcqSide :is(.hs-i,.hs-k,.hs-mc,.hs-chip):hover .hs-ic{scale:1.12}
 section.hn .hn-the{transition:translate .5s var(--cd-em),box-shadow .5s var(--cd-em)}
 section.hn .hn-the:hover{translate:0 -4px}

 /* Nút lập quẻ: nhấc nhẹ khi rê, nhún khi bấm */
 #castForm .cast-button{transition-property:background-color,color,border-color,box-shadow,scale,translate;transition-duration:.35s;transition-timing-function:var(--cd-nay)}
 #castForm .cast-button:hover{translate:0 -2px}
}

/* ui/kieu-the.css */
/* 9.14 · Kiểu thẻ hiện đại: giữ nguyên màu của web (giấy trắng, đỏ son, xanh thương hiệu),
   chỉ đổi hình khối: nhãn nhỏ viết hoa giãn chữ, tiêu đề hai tông, thẻ bo tròn viền mảnh, nút dạng viên,
   biểu tượng trong vòng tròn nhạt, thanh tab nổi. Học cách trình bày của các app hiện đại, tự thiết kế. Nạp sau cùng. */
:root{--kt-son:var(--ds-action,#a8392a);--kt-son2:var(--ds-action-strong,#8e2418);--kt-tint:var(--ds-action-tint,#f8ebe7);
 --kt-ink:var(--ds-ink-warm,#2b2219);--kt-mute:var(--ds-muted,#6d5f4b);--kt-line:var(--ds-line,#e3dccf);--kt-soft:var(--ds-line-soft,#efe8dc);
 --kt-field:var(--ds-surface,#faf8f4);--kt-sans:"Inter","Be Vietnam Pro","Segoe UI",system-ui,-apple-system,Arial,sans-serif;
 --kt-sh:0 1px 2px #3c28140a,0 12px 32px -16px #3c281426}

/* Đầu khung: nhãn son viết hoa giãn chữ, tiêu đề có chân hai tông */
html body .hh-kicker{color:var(--kt-son)!important;font:600 11.5px/1.4 var(--kt-sans)!important;letter-spacing:.3em!important;text-transform:uppercase!important}
html body .hh-title{color:var(--kt-ink)!important;letter-spacing:-.01em}
html body .hh-title em{font-style:normal;color:var(--kt-son)}

/* Khung lập quẻ: một thẻ trắng bo tròn, viền mảnh, bóng mềm */
html body #noi-dung #ichingPanel #castForm.cast-form{background:#fff!important;padding-top:22px!important;border:1px solid var(--kt-soft)!important;border-radius:24px!important;box-shadow:var(--kt-sh)!important}
/* Nhãn mục trong khung: chữ nhỏ viết hoa màu son */
html body #noi-dung #castForm label[for=question],html body #noi-dung #castForm #dtCaption{color:var(--kt-son)!important;font:600 11.5px/1.4 var(--kt-sans)!important;letter-spacing:.18em!important;text-transform:uppercase}
html body #noi-dung #castForm input:not([type=radio]):not([type=checkbox]),html body #noi-dung #castForm select,html body #noi-dung #castForm textarea{background:var(--kt-field)!important;border:1px solid var(--kt-line)!important;border-radius:14px!important;box-shadow:none!important}
html body #noi-dung #castForm input:not([type=radio]):not([type=checkbox]):focus,html body #noi-dung #castForm select:focus,html body #noi-dung #castForm textarea:focus{background:#fff!important;border-color:var(--kt-son)!important;box-shadow:0 0 0 3px #a8392a1f!important;outline:0!important}
html body #noi-dung #castForm input[type=radio],html body #noi-dung #castForm input[type=checkbox]{accent-color:var(--kt-son)}
/* Câu hỏi gợi ý: ô bo góc kiểu thẻ nhỏ */
html body #noi-dung .hh-goiy button{background:var(--kt-field)!important;border:1px solid var(--kt-soft)!important;border-radius:14px!important;transition:border-color .15s,background .15s}
html body #noi-dung .hh-goiy button:hover{background:#fff!important;border-color:var(--kt-son)!important;color:var(--kt-son2)!important}

/* Nút chính dạng viên, bóng son mềm. Giữ màu son như cũ. */
html body #noi-dung #castForm .cast-button{border-radius:999px!important;box-shadow:0 12px 26px -12px #8e2418aa,inset 0 1px 0 #ffffff33!important;letter-spacing:.16em!important}
html body #noi-dung #castForm .cast-button:hover{transform:translateY(-1px)}
html body #noi-dung #castForm #resetButton,html body #noi-dung #castForm .form-actions .secondary{border-radius:999px!important}

/* Menu bên: tên nhóm chữ nhỏ viết hoa màu son, mục bo tròn, nút cách lập dạng viên */
html body #hcqSide .hs-d>summary.hs-g{color:var(--kt-son2)!important;font:600 11px/1.3 var(--kt-sans)!important;letter-spacing:.16em!important;text-transform:uppercase}
html body #hcqSide .hs-d-khoa>summary.hs-g{color:var(--ds-brand,#4a6337)!important}
html body #hcqSide .hs-tim{border-radius:999px!important}
html body #hcqSide .hs-i,html body #hcqSide .hs-k{border-radius:12px!important}
html body #hcqSide .hs-d2,html body #hcqSide .hs-d2[open]{border-radius:16px!important}
html body #hcqSide .hs-chip{border-radius:999px!important}

/* "Bạn muốn xem gì?": nhãn nhỏ phía trên, thẻ công cụ bo tròn, biểu tượng trong vòng tròn son nhạt */
html body section.hh-them h2::before{content:"Công cụ";display:block;margin-bottom:6px;color:var(--kt-son);font:600 11.5px/1.4 var(--kt-sans);letter-spacing:.3em;text-transform:uppercase}
html body section.hh-them .hh-the{border:1px solid var(--kt-soft)!important;border-radius:22px!important;padding:20px 20px 18px!important;box-shadow:var(--kt-sh)!important;transition:border-color .15s,box-shadow .15s,transform .15s}
html body section.hh-them .hh-the:hover{border-color:#dcc4b8!important;box-shadow:0 18px 40px -20px #3c281440!important;transform:translateY(-2px)}
/* 9.15 · Logo kiểu huy hiệu: vòng tròn son nhạt, nét logo tô màu son bằng mặt nạ (ảnh gốc trong suốt, nét xám).
   Rê chuột: huy hiệu son đậm, nét trắng. Ảnh gốc giữ trong thẻ để giữ chỗ, chỉ ẩn đi. */
html body section.hh-them .hh-vong{flex:none;position:relative;width:52px;height:52px;border-radius:50%;background:var(--kt-tint);box-shadow:inset 0 0 0 1px #a8392a14;transition:background .2s}
html body section.hh-them .hh-vong::before{content:"";position:absolute;inset:11px;background:var(--kt-son);-webkit-mask:var(--lg) center/contain no-repeat;mask:var(--lg) center/contain no-repeat;transition:background .2s}
html body section.hh-them .hh-vong .hh-p{opacity:0;width:100%!important;height:100%!important}
html body section.hh-them .hh-the-dau:hover .hh-vong{background:var(--kt-son)}
html body section.hh-them .hh-the-dau:hover .hh-vong::before{background:#fff}
html body #hcqSide .hs-ic.hs-logo[style*="--lg"]{position:relative;flex:0 0 32px!important;width:32px!important;height:32px!important;border-radius:50%!important;background:var(--kt-tint)!important;transition:background .2s}
html body #hcqSide .hs-ic.hs-logo[style*="--lg"]::before{content:"";position:absolute;inset:6px;background:var(--kt-son);-webkit-mask:var(--lg) center/contain no-repeat;mask:var(--lg) center/contain no-repeat;transition:background .2s}
html body #hcqSide .hs-ic.hs-logo[style*="--lg"] img{opacity:0!important;filter:none!important;transform:none!important}
html body #hcqSide .hs-i:hover .hs-ic.hs-logo[style*="--lg"],html body #hcqSide .hs-k:hover .hs-ic.hs-logo[style*="--lg"]{background:#f3d9d2!important}
html body #hcqSide .hs-i[aria-current=page] .hs-ic.hs-logo[style*="--lg"],html body #hcqSide .hs-d2[open]>summary .hs-ic.hs-logo[style*="--lg"]{background:var(--kt-son)!important}
html body #hcqSide .hs-i[aria-current=page] .hs-ic.hs-logo[style*="--lg"]::before,html body #hcqSide .hs-d2[open]>summary .hs-ic.hs-logo[style*="--lg"]::before{background:#fff}
html body #hcqSide .hs-k .hs-ic.hs-logo[style*="--lg"]{opacity:.75}
html body section.hh-them .hh-the ul{border-top-color:var(--kt-soft)!important}
html body section.hh-them .hh-the li:not(.hh-khoa) a{display:inline-block;padding:3px 10px;margin:2px 0;border:1px solid var(--kt-soft);border-radius:999px;background:var(--kt-field);font-size:13.5px}
html body section.hh-them .hh-the li:not(.hh-khoa) a:hover{border-color:var(--kt-son);color:var(--kt-son2);text-decoration:none}

/* Phiếu kết quả bo góc */
html body #resultSheet{border-radius:18px!important;overflow:hidden}
html body .details-panel{border-radius:20px!important}

/* Thanh tab dưới (điện thoại, trang chưa có menu bên): nổi, bo tròn, mục đang mở là viên son nhạt */
@media(max-width:700px){
 html body .hcq-tabbar{left:12px!important;right:12px!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;border:1px solid var(--kt-line)!important;border-radius:22px!important;padding:6px 4px!important;box-shadow:0 14px 34px -14px #3c281455!important}
 html body .hcq-tabbar a[aria-current=page]::before{top:5px!important;width:48px!important;height:28px!important;border-radius:999px!important;background:var(--kt-tint)!important;z-index:-1}
 html body section.hh-them .hh-the{border-radius:18px!important}
}
@media (prefers-reduced-motion:reduce){html body section.hh-them .hh-the:hover,html body #noi-dung #castForm .cast-button:hover{transform:none}}

/* 9.16 · Khối "Hôm nay" kiểu màn hình đầu của app: ngày + lời chào, thẻ Quẻ hôm nay có vẽ quẻ, hai ô lối tắt */
section.hn{max-width:960px;margin:34px auto 0;padding:0 16px;box-sizing:border-box;font-family:var(--kt-sans)}
section.hn .hn-dau{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
section.hn .hn-ngay{margin:0 0 2px;color:var(--kt-son);font:600 11.5px/1.4 var(--kt-sans);letter-spacing:.24em;text-transform:uppercase}
section.hn .hn-chao{margin:0!important;font:700 26px/1.25 "Noto Serif","HCQ Viet",Georgia,serif!important;color:var(--kt-ink)!important;letter-spacing:-.01em}
section.hn .hn-chao::before{content:none!important}
section.hn .hn-am{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border:1px solid var(--kt-soft);border-radius:999px;background:#fff;color:var(--kt-mute);font-size:13px;box-shadow:var(--kt-sh)}
section.hn .hn-am::before{content:"";width:12px;height:12px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff 0 30%,#d9c7a8 31%);box-shadow:inset -3px 0 0 #b9a27f}
section.hn .hn-the{display:flex;gap:22px;align-items:center;justify-content:space-between;padding:22px 24px;background:#fff;border:1px solid var(--kt-soft);border-radius:24px;box-shadow:var(--kt-sh);text-decoration:none;color:inherit;transition:border-color .15s,box-shadow .15s,transform .15s}
section.hn .hn-the:hover{border-color:#dcc4b8;box-shadow:0 18px 40px -20px #3c281440;transform:translateY(-2px)}
section.hn .hn-chu{min-width:0}
section.hn .hn-nhan{margin:0 0 6px;color:var(--kt-son);font:600 11.5px/1.4 var(--kt-sans);letter-spacing:.24em;text-transform:uppercase}
section.hn .hn-ten{margin:0;font:700 24px/1.25 "Noto Serif","HCQ Viet",Georgia,serif;color:var(--kt-son2)}
section.hn .hn-so{margin:4px 0 10px;font-size:13px;color:var(--kt-mute);letter-spacing:.02em}
section.hn .hn-han{margin:0 0 4px;font:400 15px/1.6 "Noto Serif TC","Noto Serif",serif;color:var(--kt-ink)}
section.hn .hn-dich{margin:0;font-size:14.5px;line-height:1.6;color:#4a3d30}
section.hn .hn-ghi{margin:10px 0 0;font-size:12.5px;color:var(--ds-subtle,#7a6c57)}
section.hn .hn-ghi b{color:var(--kt-son);font-weight:600;white-space:nowrap}
section.hn .hn-que{flex:none;fill:var(--kt-son);padding:16px;border-radius:20px;background:var(--kt-tint);width:84px;height:83px;box-sizing:content-box}
section.hn .hn-oo{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
section.hn .hn-o{display:flex;align-items:center;gap:12px;padding:14px 16px;background:#fff;border:1px solid var(--kt-soft);border-radius:20px;box-shadow:var(--kt-sh);text-decoration:none;color:var(--kt-ink);transition:border-color .15s}
section.hn .hn-o:hover{border-color:var(--kt-son)}
section.hn .hn-o strong{display:block;font:600 15.5px/1.3 var(--kt-sans)}
section.hn .hn-o small{display:block;font-size:12.5px;color:var(--kt-mute);margin-top:2px}
section.hn .hh-vong{flex:none;position:relative;width:44px;height:44px;border-radius:50%;background:var(--kt-tint)}
section.hn .hh-vong::before{content:"";position:absolute;inset:9px;background:var(--kt-son);-webkit-mask:var(--lg) center/contain no-repeat;mask:var(--lg) center/contain no-repeat}
section.hn .hn-o:hover .hh-vong{background:var(--kt-son)}
section.hn .hn-o:hover .hh-vong::before{background:#fff}
@media(max-width:600px){
 section.hn .hn-the{flex-direction:column-reverse;align-items:flex-start;padding:18px}
 section.hn .hn-que{padding:12px;width:64px;height:63px}
 section.hn .hn-chao{font-size:22px!important}
 section.hn .hn-o{padding:12px;gap:10px}
 section.hn .hn-o small{display:none}
}
@media print{section.hn{display:none!important}}
@media (prefers-reduced-motion:reduce){section.hn .hn-the:hover{transform:none}}

/* 9.19 · Phối màu và menu học từ Ember (keepember.com), dùng hai màu của web:
   nền kem ấm có quầng xanh ngọc nhạt bên trái và quầng son nhạt góc trên phải; nhãn nhỏ màu xanh ngọc,
   nút và chữ nhấn màu son, chữ tiêu đề tô chuyển xanh ngọc → son; menu dạng viên nổi trong mờ. */
:root{--kt-ngoc:#4a6337;--kt-kem:#fbf9f5;--kt-be:#e5ddcc;--kt-be2:#d9cfb8}
html body.has-side{background:transparent!important}
html:has(body.has-side){background-color:var(--kt-kem)!important;background-image:radial-gradient(30% 32% at 2% 66%,#4a633714,transparent 72%),radial-gradient(34% 34% at 96% 10%,#a8392a12,transparent 72%),linear-gradient(var(--kt-kem),#f6f1e7)!important;background-attachment:fixed!important}
html body .hh-title em{background:linear-gradient(90deg,var(--kt-ngoc) 10%,var(--kt-son) 90%);-webkit-background-clip:text;background-clip:text;color:transparent}
html body .hh-kicker,html body section.hn .hn-ngay,html body section.hn .hn-nhan,html body section.hh-them h2::before,html body #noi-dung #castForm label[for=question],html body #noi-dung #castForm #dtCaption{color:var(--kt-ngoc)!important}
/* Menu bên: nền kem trong mờ, mục chữ đậm vừa, rê chuột là viên xanh ngọc nhạt, mục đang mở là viên son nhạt */
html body #hcqSide{background:#fbf9f5e6!important;-webkit-backdrop-filter:saturate(1.6) blur(14px);backdrop-filter:saturate(1.6) blur(14px);border-right:1px solid var(--kt-be)!important}
html body #hcqSide .hs-top{background:var(--kt-kem)!important;border-bottom-color:var(--kt-be)!important}
html body #hcqSide .hs-tim{background:#fff!important;border:1px solid var(--kt-be)!important}
html body #hcqSide .hs-d>summary.hs-g{color:var(--kt-ngoc)!important}
html body #hcqSide .hs-i,html body #hcqSide .hs-k{border-radius:999px!important;color:#3c3833!important;font-weight:500}
html body #hcqSide .hs-i:hover,html body #hcqSide .hs-k:hover{background:#4a633712!important;color:var(--kt-ngoc)!important}
html body #hcqSide .hs-i[aria-current=page]{background:#a8392a14!important;color:var(--kt-son2)!important;font-weight:600}
html body #hcqSide .hs-d2,html body #hcqSide .hs-d2[open]{background:#ffffffb3!important;border-color:var(--kt-be)!important}
html body #hcqSide .hs-chip{background:#fff!important;border-color:var(--kt-be)!important;color:#3c3833!important}
html body #hcqSide .hs-chip:hover{border-color:var(--kt-ngoc)!important;color:var(--kt-ngoc)!important}
html body #hcqSide .hs-chip[aria-current=page]{background:var(--kt-son)!important;border-color:var(--kt-son)!important;color:#fff!important}
html body #hcqSide .hs-foot{border-top-color:var(--kt-be)!important}
/* Thanh đầu trên điện thoại: viên nổi trong mờ cách mép 10px */
@media(max-width:1023px){
 html body.has-side .topbar{top:10px!important;margin:10px 10px 0!important;border-radius:999px!important;background:#fbf9f5c7!important;-webkit-backdrop-filter:saturate(1.6) blur(14px)!important;backdrop-filter:saturate(1.6) blur(14px)!important;border:1px solid #d9cfb8b3!important;box-shadow:0 10px 30px -18px #1a181659!important}
 html body.has-side .topbar #historyButton,html body.has-side .topbar .hh-tron{background:#fff!important;border:1px solid var(--kt-be)!important}
}

/* 9.19 · Logo màu vẽ tay (kiểu hình của Ember): bỏ tô son bằng mặt nạ, hiện nguyên màu ảnh trong vòng tròn trắng bóng mềm.
   Mục đang mở: vòng son mảnh bao quanh. Ảnh ở tool-photos/logo/*.webp (vẽ bằng Gemini 17/11, cắt bằng tools/logo-3d/cat-to.py). */
html body #hcqSide .hs-ic.hs-logo[style*="--lg"],html body section.hh-them .hh-vong,html body section.hn .hh-vong{background:#fff!important;box-shadow:0 6px 14px -8px #3c281459,0 0 0 1px #e5ddcc!important}
html body #hcqSide .hs-ic.hs-logo[style*="--lg"]::before,html body section.hh-them .hh-vong::before,html body section.hn .hh-vong::before{background:var(--lg) center/contain no-repeat!important;-webkit-mask:none!important;mask:none!important}
html body #hcqSide .hs-ic.hs-logo[style*="--lg"]::before{inset:4px!important}
html body section.hh-them .hh-vong::before{inset:7px!important}
html body section.hn .hh-vong::before{inset:6px!important}
html body #hcqSide .hs-i:hover .hs-ic.hs-logo[style*="--lg"],html body #hcqSide .hs-k:hover .hs-ic.hs-logo[style*="--lg"],html body section.hh-them .hh-the-dau:hover .hh-vong,html body section.hn .hn-o:hover .hh-vong{background:#fff!important;transform:scale(1.06);box-shadow:0 8px 18px -8px #3c281466,0 0 0 1px #d9cfb8!important}
html body #hcqSide .hs-i[aria-current=page] .hs-ic.hs-logo[style*="--lg"],html body #hcqSide .hs-d2[open]>summary .hs-ic.hs-logo[style*="--lg"]{background:#fff!important;box-shadow:0 0 0 2px var(--kt-son),0 6px 14px -8px #8e241866!important}
html body #hcqSide .hs-k .hs-ic.hs-logo[style*="--lg"]{opacity:1}
html body #hcqSide .hs-ic.hs-logo[style*="--lg"]{transition:transform .2s,box-shadow .2s}

/* 9.19 · "Bạn muốn xem gì?" thành lưới ô nền phấn loang kiểu Ember (ảnh Quân gửi 17/11):
   bỏ khung thẻ trắng của nhóm, mỗi công cụ một ô bo tròn màu phấn (tím, lam, hồng, cam, lục, kem xoay vòng),
   logo màu ở giữa, tên chữ đậm. Tiêu đề vế sau màu xanh ngọc. */
html body section.hh-them h2 em{font-style:normal;color:var(--kt-ngoc)}
html body section.hh-them .hh-nhom{display:block!important}
html body section.hh-them .hh-the{display:block!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0 0 26px!important;border-radius:0!important}
html body section.hh-them .hh-the:hover{transform:none!important;box-shadow:none!important}
html body section.hh-them .hh-the-dau{display:inline-flex!important;align-items:center;gap:10px}
html body section.hh-them .hh-the-dau strong{font:700 17px/1.3 var(--kt-sans)!important;color:#1a1816!important}
html body section.hh-them .hh-the-dau::after{content:"Xem tất cả →";font:500 12.5px/1 var(--kt-sans);color:var(--kt-mute);margin-left:4px}
html body section.hh-them .hh-the-dau:hover::after{color:var(--kt-ngoc)}
html body section.hh-them .hh-vong{width:38px!important;height:38px!important}
html body section.hh-them .hh-the>p{margin:2px 0 12px!important;font-size:13.5px!important;color:var(--kt-mute)!important}
html body section.hh-them ul.hh-o-luoi{display:grid!important;grid-template-columns:repeat(4,1fr);gap:12px!important;margin:0!important;padding:0!important;border:0!important;list-style:none}
html body section.hh-them ul.hh-o-luoi li.hh-khoa{grid-column:1/-1;font-size:12px;color:var(--ds-subtle,#7a6c57);margin-top:-2px}
html body section.hh-them a.hh-o{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:148px;padding:18px 10px 14px!important;border-radius:22px!important;border:1px solid #ffffffd9!important;box-shadow:0 1px 2px #3c28140a,0 12px 26px -18px #3c281433;text-decoration:none!important;color:#1a1816!important;text-align:center;transition:transform .18s,box-shadow .18s}
html body section.hh-them a.hh-o:hover{transform:translateY(-2px);box-shadow:0 2px 4px #3c28140f,0 18px 34px -18px #3c281455}
html body section.hh-them a.hh-o:focus-visible{outline:3px solid var(--kt-ngoc);outline-offset:3px}
html body section.hh-them a.hh-o img{width:64px;height:64px;object-fit:contain;filter:drop-shadow(0 4px 6px #3c28141f)}
html body section.hh-them a.hh-o span{font:700 15px/1.3 var(--kt-sans)}
html body section.hh-them a.hh-o small{margin-top:-6px;font:600 10px/1.2 var(--kt-sans);letter-spacing:.14em;text-transform:uppercase;color:var(--kt-son)}
html body section.hh-them a.hh-tim{background:radial-gradient(90% 70% at 22% 12%,#ffffffbf,transparent 62%),radial-gradient(80% 80% at 88% 92%,#d9cdea73,transparent 70%),#f3eff8!important}
html body section.hh-them a.hh-lam{background:radial-gradient(90% 70% at 22% 12%,#ffffffbf,transparent 62%),radial-gradient(80% 80% at 88% 92%,#c9dcea73,transparent 70%),#edf3f8!important}
html body section.hh-them a.hh-hong{background:radial-gradient(90% 70% at 22% 12%,#ffffffbf,transparent 62%),radial-gradient(80% 80% at 88% 92%,#efcfd673,transparent 70%),#f9eef0!important}
html body section.hh-them a.hh-cam{background:radial-gradient(90% 70% at 22% 12%,#ffffffbf,transparent 62%),radial-gradient(80% 80% at 88% 92%,#f2d6bd73,transparent 70%),#fbf0e6!important}
html body section.hh-them a.hh-luc{background:radial-gradient(90% 70% at 22% 12%,#ffffffbf,transparent 62%),radial-gradient(80% 80% at 88% 92%,#d5dbd073,transparent 70%),#f0f2ee!important}
html body section.hh-them a.hh-kem{background:radial-gradient(90% 70% at 22% 12%,#ffffffbf,transparent 62%),radial-gradient(80% 80% at 88% 92%,#efe2bb73,transparent 70%),#fbf6e6!important}
@media(max-width:600px){
 html body section.hh-them ul.hh-o-luoi{grid-template-columns:repeat(2,1fr);gap:10px!important}
 html body section.hh-them a.hh-o{min-height:128px;border-radius:20px!important}
 html body section.hh-them a.hh-o img{width:56px;height:56px}
 html body section.hh-them a.hh-o span{font-size:14px}
}
@media (prefers-reduced-motion:reduce){html body section.hh-them a.hh-o:hover{transform:none}}

/* 9.21 · Lục Hào trả lại đồng xu Ung Chính 3D xoay như bản trước (Quân dặn).
   9.20 · Hình đầu khung theo từng cách lập, vẽ màu bột (tool-photos/dau-khung/): ẩn bình mai, đồng xu 3D và hình cũ,
   chỉ hiện hình khớp data-loai, đổi mờ dần. */
html body .hh-hero .hh-vat>*:not(.hh-ve):not(.hh-xu3){display:none!important}
html body .hh-hero .hh-ve-luchao{display:none!important}
html body .hh-hero .hh-ve{height:100%;width:auto;max-width:100%;object-fit:contain;opacity:0;transform:scale(.94);transition:opacity .45s,transform .6s cubic-bezier(.2,.8,.2,1);filter:drop-shadow(0 10px 14px #3c28141f);pointer-events:none}
html body .hh-hero[data-loai=maihoa] .hh-ve-maihoa,html body .hh-hero[data-loai=seri] .hh-ve-seri,html body .hh-hero[data-loai=sodt] .hh-ve-sodt,html body .hh-hero[data-loai=tay] .hh-ve-tay,html body .hh-hero[data-loai=ngaunhien] .hh-ve-ngaunhien,html body .hh-hero[data-loai=haiba] .hh-ve-haiba,html body .hh-hero[data-loai=ngulinh] .hh-ve-ngulinh{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){html body .hh-hero .hh-ve{transition:none}}
/* 9.26 · Hình đầu khung là ảnh thật đã tách nền: bỏ vệt bóng dưới chân, bỏ đổ bóng và hòa trộn màu để ảnh giữ đúng màu thật. */
html body .hh-hero .hh-vat::after{display:none!important}
html body .hh-hero .hh-ve{filter:none!important;mix-blend-mode:normal!important}

/* 9.33 · Quân: bỏ chữ 3D. Tên nhóm nằm trên khung nền nổi như trên mây; rê chuột vào dòng nào thì cả dòng nhấc lên, logo bồng bềnh như lướt trên mây. */
html body #hcqSide .hs-d>summary.hs-g{margin:10px 2px 6px;padding:10px 14px;border-radius:16px;background:linear-gradient(180deg,#fff,#fbf8f3)!important;color:var(--kt-ngoc)!important;font:700 12px/1.3 var(--kt-sans)!important;letter-spacing:.14em!important;text-shadow:none;box-shadow:0 0 0 1px #f1ebe1,0 10px 22px -14px #5a3c1e59,0 3px 8px -4px #5a3c1e1f,0 -2px 10px 0 #ffffffd9;transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s}
html body #hcqSide .hs-d>summary.hs-g:hover{transform:translateY(-5px);box-shadow:0 0 0 1px #efe7da,0 22px 34px -14px #5a3c1e70,0 8px 16px -8px #5a3c1e2e,0 -4px 18px 2px #ffffff}
html body #hcqSide .hs-d-khoa>summary.hs-g{color:var(--kt-ngoc)!important}
@keyframes ktMay{0%,100%{transform:translateY(-3px) rotate(0)}25%{transform:translateY(-10px) rotate(-13deg) scale(1.08)}50%{transform:translateY(-4px) rotate(9deg) scale(1.04)}75%{transform:translateY(-9px) rotate(-6deg) scale(1.07)}}
html body #hcqSide .hs-i,html body #hcqSide .hs-k,html body #hcqSide .hs-d2>summary,html body #hcqSide .hs-mc{transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s,background .25s}
html body #hcqSide .hs-i:hover,html body #hcqSide .hs-k:hover,html body #hcqSide .hs-d2>summary:hover,html body #hcqSide .hs-mc:hover{transform:translateY(-5px);box-shadow:0 0 0 1px #f0e9de,0 20px 32px -14px #5a3c1e6b,0 6px 14px -8px #5a3c1e2e,0 0 22px 4px #ffffffe6}
html body #hcqSide .hs-i:not([aria-current=page]):hover,html body #hcqSide .hs-k:hover,html body #hcqSide .hs-d2>summary:hover{background:#fff!important}
html body #hcqSide .hs-i:hover .hs-ic.hs-logo,html body #hcqSide .hs-mc:hover .hs-ic.hs-logo,html body #hcqSide .hs-d2>summary:hover .hs-ic.hs-logo,html body #hcqSide .hs-k:hover .hs-ic.hs-logo{animation:ktMay 1.7s ease-in-out infinite;transform-origin:50% 75%;box-shadow:0 0 0 1px #e5ddcc,0 9px 14px -6px #5a3c1e47,0 0 12px 2px #ffffff!important}
@media (prefers-reduced-motion:reduce){html body #hcqSide .hs-ic.hs-logo{animation:none!important}html body #hcqSide .hs-i:hover,html body #hcqSide .hs-k:hover,html body #hcqSide .hs-d2>summary:hover,html body #hcqSide .hs-mc:hover,html body #hcqSide .hs-d>summary.hs-g:hover{transform:none}}
/* 9.34 · Quân: trắng sáng quá, phối màu như Ember: mỗi nhóm một màu phấn dịu, khung tên nhóm và dòng đang rê lấy màu của nhóm, bóng mềm không quầng trắng. */
html body #hcqSide .hs-nav>details.hs-d:nth-of-type(1){--may:#fbf1ee;--may2:#f5e2dc;--mayb:#ead0c8}
html body #hcqSide .hs-nav>details.hs-d:nth-of-type(2),html body #hcqSide .hs-nav>details.hs-d:nth-of-type(2)+.hs-mai-chay{--may:#f5f1f9;--may2:#ebe3f4;--mayb:#dacfea}
html body #hcqSide .hs-nav>details.hs-d:nth-of-type(3),html body #hcqSide .hs-nav>details.hs-d:nth-of-type(3)+.hs-mai-chay{--may:#fcf4ea;--may2:#f6e6d3;--mayb:#e9d3b9}
html body #hcqSide .hs-nav>details.hs-d:nth-of-type(4),html body #hcqSide .hs-nav>details.hs-d:nth-of-type(4)+.hs-mai-chay{--may:#eff5f9;--may2:#e0eaf3;--mayb:#cddbe8}
html body #hcqSide .hs-nav>details.hs-d-khoa{--may:#f2f4f0;--may2:#e4e8e0;--mayb:#d2d9cb}
html body #hcqSide .hs-d>summary.hs-g{background:linear-gradient(180deg,var(--may,#fbf8f3),var(--may2,#f5efe6))!important;box-shadow:0 0 0 1px var(--mayb,#ece4d8),0 10px 22px -16px #5a3c1e59,0 2px 6px -3px #5a3c1e1a}
html body #hcqSide .hs-d>summary.hs-g:hover{box-shadow:0 0 0 1px var(--mayb,#ece4d8),0 18px 30px -16px #5a3c1e66,0 6px 12px -8px #5a3c1e26}
html body #hcqSide .hs-i:hover,html body #hcqSide .hs-k:hover,html body #hcqSide .hs-d2>summary:hover,html body #hcqSide .hs-mc:hover{box-shadow:0 0 0 1px var(--mayb,#ece4d8),0 16px 26px -16px #5a3c1e5c,0 4px 10px -6px #5a3c1e1f}
html body #hcqSide .hs-i:not([aria-current=page]):hover,html body #hcqSide .hs-k:hover,html body #hcqSide .hs-d2>summary:hover,html body #hcqSide .hs-mc:hover{background:var(--may2,#f5efe6)!important;color:#2f261e!important}
html body #hcqSide .hs-i:hover .hs-ic.hs-logo,html body #hcqSide .hs-mc:hover .hs-ic.hs-logo,html body #hcqSide .hs-d2>summary:hover .hs-ic.hs-logo,html body #hcqSide .hs-k:hover .hs-ic.hs-logo{box-shadow:0 0 0 1px var(--mayb,#e5ddcc),0 8px 12px -6px #5a3c1e47!important}
html body #hcqSide .hs-mc{background:var(--may,#fffdf9);box-shadow:0 0 0 1px var(--mayb,#ece5da)}

/* 9.35 · Quân: mỗi ô một màu phấn nhẹ (hồng, cam, kem, lục, lam, tím xoay vòng); rê chuột thì dòng hiện màu riêng của nó, viên trong dải chạy mang sẵn màu. */
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:nth-child(6n+1),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k:nth-child(6n+1),html body #hcqSide .hs-chips>.hs-chip:nth-child(6n+1),html body #hcqSide .hs-mc-ray>.hs-mc:nth-child(6n+1){--o:#fcf0f2;--ob:#efd8dd}
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:nth-child(6n+2),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k:nth-child(6n+2),html body #hcqSide .hs-chips>.hs-chip:nth-child(6n+2),html body #hcqSide .hs-mc-ray>.hs-mc:nth-child(6n+2){--o:#fdf3e9;--ob:#ecdac6}
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:nth-child(6n+3),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k:nth-child(6n+3),html body #hcqSide .hs-chips>.hs-chip:nth-child(6n+3),html body #hcqSide .hs-mc-ray>.hs-mc:nth-child(6n+3){--o:#fcf7e7;--ob:#ebe0bd}
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:nth-child(6n+4),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k:nth-child(6n+4),html body #hcqSide .hs-chips>.hs-chip:nth-child(6n+4),html body #hcqSide .hs-mc-ray>.hs-mc:nth-child(6n+4){--o:#f2f4f0;--ob:#d9dfd4}
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:nth-child(6n+5),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k:nth-child(6n+5),html body #hcqSide .hs-chips>.hs-chip:nth-child(6n+5),html body #hcqSide .hs-mc-ray>.hs-mc:nth-child(6n+5){--o:#eef4fa;--ob:#d1dfeb}
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:nth-child(6n+6),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k:nth-child(6n+6),html body #hcqSide .hs-chips>.hs-chip:nth-child(6n+6),html body #hcqSide .hs-mc-ray>.hs-mc:nth-child(6n+6){--o:#f5f1fa;--ob:#dfd6ed}
html body #hcqSide .hs-i:not([aria-current=page]):hover,html body #hcqSide .hs-k:hover,html body #hcqSide .hs-mc:hover{background:var(--o,var(--may2,#f5efe6))!important}
html body #hcqSide .hs-i:hover,html body #hcqSide .hs-k:hover,html body #hcqSide .hs-mc:hover{box-shadow:0 0 0 1px var(--ob,var(--mayb,#ece4d8)),0 16px 26px -16px #5a3c1e52,0 4px 10px -6px #5a3c1e1a}
html body #hcqSide .hs-i:hover .hs-ic.hs-logo,html body #hcqSide .hs-mc:hover .hs-ic.hs-logo,html body #hcqSide .hs-k:hover .hs-ic.hs-logo{box-shadow:0 0 0 1px var(--ob,var(--mayb,#e5ddcc)),0 8px 12px -6px #5a3c1e40!important}
html body #hcqSide .hs-mc{background:var(--o,var(--may,#fffdf9));box-shadow:0 0 0 1px var(--ob,var(--mayb,#ece5da))}
/* 9.35 · Quân: khung Mai Hoa bỏ nền trắng, đổi hồng đào nhạt như cánh hoa mai. */
html body #hcqSide .hs-d2,html body #hcqSide .hs-d2[open]{background:linear-gradient(180deg,#fdf4f2,#fbede9)!important;box-shadow:0 0 0 1px #f0dad4,0 8px 18px -14px #5a3c1e40!important}
/* 9.36 · Quân: đồng bộ với nhau, không dùng khung nữa: khung Mai Hoa, khung tên nhóm và viền viên dải chạy về nền trong. Màu riêng và nổi lên khi rê chuột vẫn giữ. */
html body #hcqSide .hs-d2,html body #hcqSide .hs-d2[open]{background:transparent!important;box-shadow:none!important;border:0!important}
html body #hcqSide .hs-d>summary.hs-g,html body #hcqSide .hs-d>summary.hs-g:hover{margin:14px 4px 4px;padding:6px 10px;background:transparent!important;box-shadow:none!important;transform:none}
html body #hcqSide .hs-mc{box-shadow:none}
html body #hcqSide .hs-chip:not([aria-current=page]){background:transparent!important;border-color:transparent!important;color:#3a3129!important}
html body #hcqSide .hs-chip:not([aria-current=page]):hover{color:#2f261e!important}
/* 9.36 · Quân: từng ô mang sẵn màu như dải chạy (không chờ rê chuột), bo tròn, không viền. */
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:not([aria-current=page]),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k,html body #hcqSide .hs-chips>.hs-chip:not([aria-current=page]){background:var(--o,transparent)!important;border-radius:999px!important;margin:3px 0}
/* 9.37 · Quân: tên nhóm bị chìm, làm nổi bật không dùng khung: chữ to, đậm, xanh ngọc đậm, vạch màu nhỏ phía trước. */
html body #hcqSide .hs-d>summary.hs-g,html body #hcqSide .hs-d>summary.hs-g:hover{position:relative;margin:18px 4px 6px;padding:6px 10px 6px 20px;font:800 14.5px/1.3 var(--kt-sans)!important;letter-spacing:.09em!important;color:#2d3f1d!important;text-shadow:0 1px 0 #fff}
html body #hcqSide .hs-d>summary.hs-g::before{content:"";position:absolute;left:6px;top:50%;width:5px;height:18px;margin-top:-9px;border-radius:3px;background:linear-gradient(180deg,#628246,#4a6337)}
html body #hcqSide .hs-d-khoa>summary.hs-g::before{display:none}
/* 9.38 · Quân: tên nhóm vẫn có khung riêng, chữ phối bảy màu chuyển dần như tiêu đề chính phần lập quẻ (ngọc sang son). */
html body #hcqSide .hs-d>summary.hs-g,html body #hcqSide .hs-d>summary.hs-g:hover{margin:16px 2px 6px;padding:10px 14px 10px 24px;border-radius:14px;background:linear-gradient(180deg,#fffdf9,#f7f1e7)!important;box-shadow:0 0 0 1px #ebe1d1,0 10px 20px -14px #5a3c1e66,0 2px 5px -3px #5a3c1e1f!important;text-shadow:none}
html body #hcqSide .hs-d>summary.hs-g:hover{transform:translateY(-2px)}
html body #hcqSide .hs-gt{background:linear-gradient(90deg,#4a6337 0%,#5a7543 17%,#6b8a34 33%,#b0862c 50%,#c4652e 67%,#a8392a 83%,#7c2f4c 100%);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
html body #hcqSide .hs-d>summary.hs-g::before{left:10px;background:linear-gradient(180deg,#5a7543,#b0862c 50%,#a8392a)}

/* 9.41 · Quân: phối màu theo ảnh mẫu. Nền kem, nút và mục đang chọn xanh ô liu, thẻ phấn bốn tông
   (xanh lá xô thơm, xanh lam nhạt, vàng bơ, be), chữ nâu đen ấm, chữ phụ nâu xám. */
:root{--ds-action:#55703f;--ds-action-strong:#46602f;--ds-action-deep:#3a5027;--ds-action-tint:#e6ecdb;
 --ds-brand:#4a6337;--ds-brand-deep:#3a5027;--ds-brand-ink:#3f5530;--ds-brand-line:#b5c4a2;--ds-brand-tint:#e8eedf;
 --ds-focus-ring:3px solid #55703f;--ds-gold:#b08d3c;
 --ds-paper:#fbf9f5;--ds-paper-deep:#f4f0e6;--ds-card:#fefdfb;--ds-field:#fdfbf6;--ds-chip:#f1ece1;
 --ds-ink-warm:#2e2a22;--ds-muted:#857b69;--ds-line:#e5ddcc;--ds-line-soft:#eee9de;--ds-line-strong:#d9cfb8;
 --kt-ngoc:#4a6337;--kt-kem:#fefdfb;--kt-be:#eee8dc;--kt-be2:#e0d8c6;--kt-field:#fdfbf6;
 --kt-sage:#eaeee7;--kt-lam:#e3f2f7;--kt-bo:#fbf0e1;--kt-bes:#fbe6ee;
 --kt-sh:0 1px 2px #1a18160a,0 12px 30px -18px #1a181633}
html,html body{background:#fbf9f5!important}
html body #hcqSide{background:#fbf9f5f2!important;border-right-color:#e5ddcc!important}
html body #noi-dung #castForm,html body section.hn .hn-the,html body section.hn .hn-o,html body .method-guide{background:#fefdfb!important;border-color:#e5ddcc!important}
html body #noi-dung #castForm .cast-button{background:linear-gradient(135deg,#62804a,#46602f)!important;box-shadow:0 12px 26px -12px #3a5027aa,inset 0 1px 0 #ffffff33!important}
html body .hh-title em{background:linear-gradient(90deg,#4a6337 10%,#9a7b2e 90%);-webkit-background-clip:text;background-clip:text;color:transparent}
html body .hh-kicker{color:#5d7b47!important}

/* Tên nhóm menu: chữ chuyển màu trong bảng mới (ô liu, xô thơm, vàng bơ đậm, lam) */
html body #hcqSide .hs-gt{background:linear-gradient(90deg,#3f5a2e 0%,#6f8f52 35%,#a88a3a 65%,#6574a8 100%);-webkit-background-clip:text;background-clip:text}
html body #hcqSide .hs-d>summary.hs-g::before{background:linear-gradient(180deg,#6f8f52,#a88a3a 50%,#6574a8)}
html body #hcqSide .hs-d>summary.hs-g,html body #hcqSide .hs-d>summary.hs-g:hover{background:linear-gradient(180deg,#fdfbf6,#f6f2ea)!important;box-shadow:0 0 0 1px #e5ddcc,0 10px 20px -14px #1a181655!important}

/* Mỗi dòng menu một tông phấn của ảnh mẫu */
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:nth-child(6n+1),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k:nth-child(6n+1),html body #hcqSide .hs-chips>.hs-chip:nth-child(6n+1),html body #hcqSide .hs-mc-ray>.hs-mc:nth-child(6n+1){--o:#edf0ea;--ob:#d1d9ca}
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:nth-child(6n+2),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k:nth-child(6n+2),html body #hcqSide .hs-chips>.hs-chip:nth-child(6n+2),html body #hcqSide .hs-mc-ray>.hs-mc:nth-child(6n+2){--o:#e4f2f7;--ob:#b9dfe9}
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:nth-child(6n+3),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k:nth-child(6n+3),html body #hcqSide .hs-chips>.hs-chip:nth-child(6n+3),html body #hcqSide .hs-mc-ray>.hs-mc:nth-child(6n+3){--o:#fcf2e2;--ob:#ecd3a8}
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:nth-child(6n+4),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k:nth-child(6n+4),html body #hcqSide .hs-chips>.hs-chip:nth-child(6n+4),html body #hcqSide .hs-mc-ray>.hs-mc:nth-child(6n+4){--o:#fbe9f0;--ob:#efc4d5}
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:nth-child(6n+5),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k:nth-child(6n+5),html body #hcqSide .hs-chips>.hs-chip:nth-child(6n+5),html body #hcqSide .hs-mc-ray>.hs-mc:nth-child(6n+5){--o:#ece9f7;--ob:#cfc8ec}
html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-i:nth-child(6n+6),html body #hcqSide :is(.hs-dn,.hs-hang)>.hs-k:nth-child(6n+6),html body #hcqSide .hs-chips>.hs-chip:nth-child(6n+6),html body #hcqSide .hs-mc-ray>.hs-mc:nth-child(6n+6){--o:#f9f0e9;--ob:#e8d2c0}

/* Thẻ công cụ trang chủ: bốn tông phấn của ảnh mẫu */
html body section.hh-them a.hh-luc{background:radial-gradient(90% 70% at 22% 12%,#ffffffb3,transparent 62%),#eaeee7!important}
html body section.hh-them a.hh-lam{background:radial-gradient(90% 70% at 22% 12%,#ffffffb3,transparent 62%),#e3f2f7!important}
html body section.hh-them a.hh-kem{background:radial-gradient(90% 70% at 22% 12%,#ffffffb3,transparent 62%),#fbf0e1!important}
html body section.hh-them a.hh-cam{background:radial-gradient(90% 70% at 22% 12%,#ffffffb3,transparent 62%),#fbe6ee!important}
html body section.hh-them a.hh-tim{background:radial-gradient(90% 70% at 22% 12%,#ffffffb3,transparent 62%),#ece8f6!important}
html body section.hh-them a.hh-hong{background:radial-gradient(90% 70% at 22% 12%,#ffffffb3,transparent 62%),#f9ecf1!important}

/* 9.41 · Các chỗ đỏ son viết cứng trong file cũ đổi sang ô liu. Thông báo lỗi vẫn giữ màu đỏ. */
:root{--red:#4a6337}
html:has(body.has-side){background:#fbf9f5!important}
html body #noi-dung #castForm input:not([type=radio]):not([type=checkbox]):focus,html body #noi-dung #castForm select:focus,html body #noi-dung #castForm textarea:focus{border-color:#7d9a62!important;box-shadow:0 0 0 3px #55703f24!important}
html body #hcqSide .hs-i[aria-current=page]:not(.hs-chip){background:#55703f1a!important}
html body #hcqSide .hs-i[aria-current=page]::before,html body .hcq-tabbar a[aria-current=page]::before{background:#55703f}
html body .hcq-tabbar a[aria-current=page]::before{background:var(--kt-tint)!important}
html body #hcqSide .hs-i[aria-current=page] .hs-ic{box-shadow:inset 0 0 0 1.5px #55703f}
html body section.hh-them .hh-vong{box-shadow:inset 0 0 0 1px #55703f1f}
html body #nowButton,html body .advanced-calendar summary,html body .brand-about a,html body .hh-all a,html body .hh-gio span:last-child,html body .hh-doi span:last-child{color:#4a6337!important}
html body .method-guide h3,html body .method-guide a{color:#4a6337}
html body .hh-buoc b{color:#55703f}
html body .hh-goiy button:hover{border-color:#55703f!important;color:#3f5530!important}
html body .hh-the-dau:hover strong,html body .hh-the li a:hover{color:#55703f}
html body .hh-the a:focus-visible{outline-color:#55703f}
html body.has-side .topbar #historyCount{background:#55703f}
html body.has-side .detail-tabs button[aria-selected=true]{background:#55703f!important;border-color:#55703f!important}

/* 9.42 · Quân: font tiêu đề như ảnh mẫu, Playfair Display (có dấu tiếng Việt). Chỉ đổi chữ tiêu đề, chữ đọc giữ nguyên. */
:root{--kt-tieu-de:"Playfair Display","Noto Serif","HCQ Viet",Georgia,serif;--ds-font-serif:var(--kt-tieu-de)}
html body .hh-title,html body .hh-title em,html body section.hh-them h2,html body section.hh-them h2 em,html body section.hn .hn-chao,html body section.hn .hn-ten,html body .hh-buoc strong,html body .hh-buoc b,html body .method-guide h2,html body .method-guide h3{font-family:var(--kt-tieu-de)!important}
html body .hh-title{letter-spacing:-.005em}

/* 9.45 · Quân: trên điện thoại vẫn còn chữ đỏ. Phần đọc quẻ dưới phiếu còn đỏ son và xanh ngọc cũ viết cứng trong style.css,
   đổi sang ô liu. Vạch hào động, chữ hàng hào động giữ đỏ như trên phiếu. */
html body .sheet-heading>h2{color:#4a6337}
html body .sheet-heading .question{color:#55703f}
html body .hex-role,html body .relation-columns{color:#55703f}
html body .body-use strong,html body .record-card h3,html body .line-panel-heading h3,html body .marker-panel h3,html body .preview h3{color:#4a6337}
html body .tbl-page section>h3{color:#4a6337;border-left-color:#7d9a62}
html body .result-controls .red-button{background:linear-gradient(135deg,#62804a,#46602f)!important;border-color:#46602f!important;color:#fff!important}
html body #hcqSide .hs-i[aria-current=page] .hs-ic.hs-logo[style*="--lg"],html body #hcqSide .hs-d2[open]>summary .hs-ic.hs-logo[style*="--lg"]{box-shadow:0 0 0 2px #55703f,0 6px 14px -8px #3a502766!important}
html body .hcq-side .hs-i[aria-current=page] .hs-ic.hs-logo img{filter:drop-shadow(0 0 3px #3a502766)}
html body .hao-beast strong{color:#4a6337}
html body .sheet-text-copy>summary,html body #chuGiaiLapQue summary,html body #chuGiaiLapQue .cgq-nhan,html body .advanced-calendar summary{color:#4a6337}
html body #hcqSide .hs-d>summary.hs-g,html body #hcqSide .hs-d-khoa>summary.hs-g{color:#3f5530!important}

/* 9.45 · Quân: bỏ hai nút Lịch sử quẻ và Tiện ích ở đầu trang (đã có trong menu bên trái), đỡ chật trên điện thoại.
   Chỉ ẩn, không xóa: app.js vẫn cần nút lịch sử để chạy. */
html body.has-side .topbar #historyButton,html body.has-side .topbar a.hh-tron,html body .topbar #historyButton,html body .topbar a.hh-tron{display:none!important}
/* 9.45 · Các biến xanh ngọc cũ (nút chọn hào, thẻ học, tab nguồn) đổi sang tông ô liu tương ứng. */
:root{--hcq-c245442:#4a6337;--hcq-c205542:#46602f;--hcq-c174e37:#3f5530;--hcq-c245b40:#4f6a3c;--hcq-c32725a:#6f8f52;--hcq-c779c7e:#8aa06f}
/* 9.45 · refinement.css viết cứng xanh ngọc (nút chọn hào, nút gửi, tab lá số): phủ cùng selector, chỉ đổi màu. */
html body :is(.wb-panel,.wb-dialog) button{color:#4a6337}
html body .wb-panel button[aria-pressed=true]{background:#4a6337;border-color:#4a6337}
html body .wb-panel button[type=submit],html body .wb-panel [data-fp=apply]{background:#4a6337;border-color:#4a6337}
html body .wb-luck button[aria-pressed=true],html body .wb-months button[aria-pressed=true]{background:#4a6337}
html body #destinyForm>#destinySubmit{background:#4a6337;border:1px solid #4a6337}
html body #destinyForm .subtabs button[aria-selected=true],html body #destinyForm .subtabs button[aria-checked=true]{background:#4a6337}
html body :is(.wb-panel,.wb-form,.wb-dialog,#destinyForm,#metForm) input[type=checkbox]{accent-color:#4a6337}

/* 9.47 · Quân: trên iPhone giữ tay lên ảnh phiếu hay ra bảng chép chữ (iPhone nhận chữ trong ảnh), mất thời gian.
   Tắt bôi chọn trên ảnh phiếu quẻ và ảnh lá số để giữ tay chỉ ra bảng Lưu vào Ảnh; chạm nhẹ vào ảnh đã mở bảng chia sẻ có Lưu hình ảnh. */
html body #resultSheet,html body #resultSheet *,html body #destinySheetPreview,html body #destinySheetPreview *{-webkit-user-select:none;user-select:none}
/* 9.49 · Quân: chạm nhẹ giữ như cũ; giữ tay lên chữ trong ảnh phải ra bảng Lưu vào Ảnh như giữ vào vùng trắng.
   9.48 tắt bảng giữ tay của iPhone, tự mở bảng chia sẻ: không đúng ý, bỏ. Safari chỉ tắt việc nhận chữ trong ảnh (Live Text)
   khi chính thẻ ảnh có -webkit-user-select:none (phải có tiền tố) và cursor:default (theo stackoverflow.com/questions/75653885). */
html body #resultSheet img,html body #destinySheetPreview img{-webkit-user-select:none;user-select:none;cursor:default;-webkit-touch-callout:default}
/* Dòng nhắc chỉ hiện trên iPhone, iPad (chỉ Safari iOS hiểu -webkit-touch-callout). */
@supports (-webkit-touch-callout:none){
 html body #resultSheet .compact-image-wrap::after{content:"Chạm hoặc giữ vào ảnh để lưu vào máy";display:block;margin-top:8px;text-align:center;font:600 13px/1.4 var(--kt-sans);color:#857b69;letter-spacing:.01em}
}
/* 9.52 · Quân: mọi chỗ 9.50 đang màu ô liu (hào, tên, nút, mục đang chọn, viền chọn) giữ ô liu. Chỉ các chi tiết khác theo Ember.
   9.51 · Quân: phối màu chi tiết theo Ember (keepember.com): nền trắng ngà,
   thẻ phấn hồng, lam, xô thơm, vàng, quầng hồng và xanh lá nhạt sau đầu trang. Màu chữ và màu hào giữ như 9.50 (ô liu),
   phiếu quẻ không đổi màu. Đổi bằng công cụ trên bảng 9.41 nên các dòng 9.41–9.45 đã mang màu mới. */
/* Nền thân trang trong suốt (giữ cành mai), nên quầng đặt trên lớp nền gốc :root */
:root:root{background:radial-gradient(34% 30% at 98% 4%,#ee9db824,transparent 72%),radial-gradient(30% 34% at 0% 60%,#8da07d1f,transparent 72%),#fbf9f5!important;background-attachment:fixed!important}
html body section.hh-them a.hh-o{border-color:#e5ddcc!important}
html body section.hh-them a.hh-o:hover{box-shadow:0 30px 50px -30px #55703f61!important}
@media screen and (prefers-reduced-motion:no-preference){
 html body section.hh-them a.hh-o:hover{transform:none}
 /* Quầng sáng hồng, lam sau hình đầu khung, phập phồng chậm */
 html body .hh-hero .hh-vat::after{display:block!important;content:"";position:absolute;inset:14% 24%;z-index:-1;border-radius:50%;pointer-events:none;
  background:radial-gradient(closest-side,#f2a9c266,#5ebdd426 60%,transparent);filter:blur(22px);animation:cdSang 9s ease-in-out infinite}
}
/* 9.51 · Quân: chữ thường toàn web đồng bộ một font Inter (như Ember), nét gọn và sắc; tiêu đề vẫn Playfair Display.
   Be Vietnam Pro chỉ còn làm font dự phòng. Phiếu quẻ, lá số (ảnh canvas) giữ font cũ. */
html body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-optical-sizing:auto}
/* 9.53 · Quân: đồng bộ mọi môn. Màu chính ô liu (họ màu xanh ngọc cũ của logo trong CSS các công cụ đã đổi sang ô liu,
   màu xanh mang nghĩa tốt, cát, Mộc giữ nguyên). Tiêu đề trang và tiêu đề trong khung công cụ là Playfair, chữ thường Inter. */
html body .page-title h1,html body #noi-dung h1,html body #noi-dung :is(.wb-panel,.qm-app,.fp-app,.destiny-result,#destinyTools,#metaphysicsTools,#congCuMo) :is(h2,h3){font-family:var(--kt-tieu-de)!important}

/* 9.56 · Kỳ Môn bỏ nền xanh đêm, đồng bộ với các môn: nền trắng ngà, chữ Inter, tiêu đề Playfair, nút lập ô liu.
   Ô cung tốt xấu theo ba màu chung (tốt ô liu, xấu đen, trung trắng) trong ui/mau-tot-xau.mjs. */
html body .qm-app{--qm-bg:#fbf6ea;--qm-panel:#fffdf7;--qm-line:#dccdae;--qm-gold:#55703f;--qm-text:#1c1a17;--qm-muted:#6d5f4b;--qm-jade:#55703f;background:#fbf6ea!important;background-image:none!important;color:#1c1a17!important;border:1px solid #dccdae!important;border-radius:16px!important;box-shadow:none!important;font-family:"Inter","Be Vietnam Pro",system-ui,sans-serif!important}
html body .qm-app :is(h2,h3,h4,summary,strong,b,dt,.qm-eyebrow,.qm-compass,.qm-center-number,.qm-center-stem,.qm-door){color:#2b2219!important}
html body .qm-app :is(h2,h3){color:#55703f!important}
html body .qm-app :is(p,span,dd,li,label,small,.qm-god,.qm-star,.qm-hint,.qm-status,.qm-zone,.qm-conventions,.qm-leaders,.qm-calm){color:inherit}
html body .qm-app :is(.qm-eyebrow,.qm-hint,.qm-status,.qm-conventions,.qm-leaders,.qm-calm,label,small,dt){color:#6d5f4b!important}
html body .qm-app :is(input,select,textarea){background:#fdfbf6!important;color:#1c1a17!important;border:1px solid #e5ddcc!important;border-radius:12px!important}
html body .qm-app button{background:#fffdf7!important;color:#2b2219!important;border:1px solid #dccdae!important;border-radius:12px!important}
html body .qm-app button:hover{border-color:#55703f!important}
html body .qm-app :is(.qm-link,.qm-secondary){color:#55703f!important}
html body .qm-app a{color:#55703f!important}
html body .qm-app button.qm-primary{background:linear-gradient(135deg,#62804a,#46602f)!important;color:#fff!important;border:0!important;border-radius:999px!important;font:600 17px "Inter","Be Vietnam Pro",system-ui,sans-serif!important;letter-spacing:.02em!important}
html body .qm-app .qm-pillars{background:#fffdf7!important;border-color:#dccdae!important}
html body .qm-app button.qm-palace{background:#fffdf7!important;border-radius:0!important;border-color:#cfc3a6!important;color:#1c1a17!important}
html body .qm-app button.qm-palace.qm-selected{background:#eef2e6!important;box-shadow:inset 0 0 0 2px #55703f!important}
html body .qm-app .qm-palace-badges{color:#55703f!important}
html body .qm-app .qm-palace-badges>span{border-color:#a99a82!important}
html body .qm-app :is(th,td){border-color:#e3d6ba!important;color:#1c1a17!important}
html body .qm-app .qm-export textarea,html body .qm-app .wb-profile{background:#fffdf7!important;color:#1c1a17!important;border-color:#dccdae!important}
html body .qm-app .wb-profile summary{color:#55703f!important}
html body .qm-app :is(input[type=checkbox],input[role=switch]){accent-color:#55703f}
html body .qm-app .qm-card{background:#fff!important;background-image:none!important;border:1px solid #e3d6ba!important;border-radius:16px!important;box-shadow:none!important;color:#1c1a17!important}
html body .qm-app .qm-card::before,html body .qm-app .qm-card::after{border-color:#cfc3a6!important}
html body .qm-app button.qm-primary{box-shadow:0 4px 12px #46602f33!important}

/* 9.57 · Điện thoại: thanh đầu trang nổi có viền giấy phía trên, nội dung cuộn qua không còn lộ ra ở khe trên thanh. */
@media(max-width:1023px){html body.has-side header.topbar:not(#hcq-x)::after{content:""!important;display:block!important;position:absolute;left:-12px;right:-12px;top:-12px;bottom:auto;height:12px;background:#fbf9f5!important;pointer-events:none}}

/* ui/noi-mem.css */
/* 9.59 · Theme "nổi mềm" (neumorphism) theo ảnh mẫu Quân gửi 20/11/2026. Chỉ học kiểu khối: khối cùng màu nền, nổi lên nhờ
   hai bóng (sáng phía trên trái, tối phía dưới phải), ô nhập lõm vào, bấm thì lún. Giữ nguyên màu đã chốt của web:
   nền ngà, nút lập quẻ ô liu, ô phấn từng môn, ba màu tốt xấu. Không dùng mã, ảnh hay biểu tượng của mẫu.
   Nạp sau kieu-the.css (trang chủ); sidebar.mjs tự nạp file này cho các trang khác. */
:root{
 --nm-nen:#f3efe8;
 --nm-sang:#ffffff;
 --nm-toi:#d9d1c3;
 --nm-noi:8px 8px 18px #d6cdbdcc,-8px -8px 18px #ffffffe6;
 --nm-noi-nho:4px 4px 10px #d6cdbdb3,-4px -4px 10px #fffffff2;
 --nm-lom:inset 4px 4px 9px #dad2c4,inset -4px -4px 9px #ffffff;
 --nm-lom-nho:inset 2px 2px 5px #dad2c4,inset -2px -2px 5px #ffffff;
}
html:root,html:root:has(body.has-side),html body{background-color:var(--nm-nen)!important}
html body::before{background-color:var(--nm-nen)!important}
html body{--ds-paper:#f3efe8;--ds-card:#f3efe8}

/* Thanh đầu trang và nút ☰: khối nổi, không viền */
html body.has-side header.topbar:not(#hcq-x){background:var(--nm-nen)!important;border:0!important;box-shadow:var(--nm-noi)!important;-webkit-backdrop-filter:none;backdrop-filter:none}
html body.has-side header.topbar:not(#hcq-x)::after{background:var(--nm-nen)!important}
html body .hcq-burger{border:0!important;border-radius:50%!important;background:var(--nm-nen)!important;box-shadow:var(--nm-noi-nho)!important}
html body .hcq-burger:active{box-shadow:var(--nm-lom-nho)!important}

/* Khung lập quẻ: một khối nổi lớn; ô nhập, ô chọn lõm vào */
html body #castForm#castForm#castForm.cast-form{background:var(--nm-nen)!important;background-image:none!important;border:0!important;border-radius:28px!important;box-shadow:var(--nm-noi)!important}
html body #noi-dung #castForm :is(textarea,select,input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button])){background:var(--nm-nen)!important;border:0!important;border-radius:16px!important;box-shadow:var(--nm-lom)!important}
html body #noi-dung #castForm :is(textarea,select,input:not([type=radio]):not([type=checkbox])):focus{box-shadow:var(--nm-lom),0 0 0 2px #55703f66!important}
html body #noi-dung #castForm input[type=radio]{appearance:none;-webkit-appearance:none;flex:none;width:20px;height:20px;margin:0 4px 0 0;padding:0;border:0!important;border-radius:50%!important;background:var(--nm-nen)!important;box-shadow:var(--nm-lom-nho)!important;vertical-align:middle;cursor:pointer}
html body #noi-dung #castForm input[type=radio]:checked{background:radial-gradient(circle,#55703f 0 4.5px,transparent 5.5px),var(--nm-nen)!important}
html body #noi-dung #castForm .cast-button{box-shadow:6px 6px 14px #b9b39f,-6px -6px 14px #ffffff,inset 0 1px 0 #ffffff33!important}
html body #noi-dung #castForm .cast-button:active{box-shadow:inset 4px 4px 10px #2f421f99,inset -3px -3px 8px #7d9c6266!important}

/* Nút gợi ý câu hỏi, nút đổi cách lập: nổi nhỏ, bấm thì lún */
html body #castForm#castForm .hh-goiy button,html body .hh-goiy button,html body .hh-doi{background:var(--nm-nen)!important;border:0!important;box-shadow:var(--nm-noi-nho)!important}
html body #castForm#castForm .hh-goiy button:active,html body .hh-goiy button:active,html body .hh-doi:active{box-shadow:var(--nm-lom-nho)!important}

/* Thẻ chú giải, thẻ hôm nay, ô công cụ trang chủ: bỏ viền, nổi mềm. Ô công cụ giữ màu phấn đã chốt. */
html body .method-guide,html body section.hn .hn-the,html body section.hn .hn-o{background:var(--nm-nen)!important;border:0!important;border-radius:24px!important;box-shadow:var(--nm-noi)!important}
html body .method-guide .cgq-muc{border-color:#e4dccd!important}
html body section.hh-them a.hh-o{border:0!important;border-radius:24px!important;box-shadow:var(--nm-noi)!important}
html body section.hh-them a.hh-o:active,html body section.hn .hn-o:active{box-shadow:var(--nm-lom)!important;transform:none!important}
html body section.hh-them .hh-vong,html body section.hn .hh-vong{background:var(--nm-nen)!important;box-shadow:var(--nm-noi-nho)!important}
html body .brand-about{background:var(--nm-nen)!important;border:0!important}

/* Menu: nền cùng màu, nhóm và ô nổi mềm (ô giữ màu phấn), mục đang chọn ô liu, nút đóng tròn nổi. */
html body aside#hcqSide.hcq-side{background:var(--nm-nen)!important;border-right:0!important;-webkit-backdrop-filter:none;backdrop-filter:none}
html body aside#hcqSide.hcq-side .hs-top{background:var(--nm-nen)!important;border-bottom:0!important;box-shadow:0 8px 14px -12px #cfc6b5}
html body aside#hcqSide.hcq-side .hs-close{background:var(--nm-nen)!important;box-shadow:var(--nm-noi-nho)}
html body aside#hcqSide.hcq-side .hs-close:active{box-shadow:var(--nm-lom-nho)}
html body aside#hcqSide.hcq-side .hs-d>summary.hs-g,html body aside#hcqSide.hcq-side .hs-d>summary.hs-g:hover{background:var(--nm-nen)!important;box-shadow:var(--nm-noi-nho)!important;border:0!important}
html body aside#hcqSide.hcq-side .hs-d[open]>summary.hs-g{box-shadow:var(--nm-lom-nho)!important}
html body aside#hcqSide.hcq-side .hs-d-khoa{border-top:0!important}
html body aside#hcqSide.hcq-side :is(.hs-hang,.hs-dn)>.hs-i:not([aria-current=page]),html body aside#hcqSide.hcq-side .hs-chips>.hs-chip:not([aria-current=page]),html body aside#hcqSide.hcq-side .hs-con .hs-hang>.hs-k{box-shadow:var(--nm-noi-nho)!important}
html body aside#hcqSide.hcq-side .hs-con .hs-hang>.hs-k{background:var(--nm-nen)!important}
html body aside#hcqSide.hcq-side :is(.hs-hang,.hs-dn)>.hs-i:active,html body aside#hcqSide.hcq-side .hs-chips>.hs-chip:active,html body aside#hcqSide.hcq-side .hs-hang>.hs-k:active{box-shadow:var(--nm-lom-nho)!important}
html body aside#hcqSide.hcq-side .hs-i[aria-current=page]:not(.hs-chip),html body aside#hcqSide.hcq-side .hs-chip[aria-current=page]{box-shadow:inset 3px 3px 8px #3a502780,inset -3px -3px 8px #7d9c6255!important}
html body aside#hcqSide.hcq-side .hs-ic.hs-logo[style*="--lg"]{box-shadow:3px 3px 7px #d0c7b6,-3px -3px 7px #ffffff!important}
html body aside#hcqSide.hcq-side .hs-foot .hs-i:not([aria-current=page]){background:transparent!important;box-shadow:none!important}
html body .hcq-scrim{background:#3b33294d}
html body section.hn .hn-am{background:var(--nm-nen)!important;border:0!important;box-shadow:var(--nm-noi-nho)!important}

/* 9.59 · Quân: thanh ngang dài, không dùng ô vuông. Điện thoại: ô công cụ trang chủ thành thanh bo tròn dài một cột, logo trái, tên phải. */
@media(max-width:767px){
 html body section.hh-them :is(ul,ol,div):has(>li>a.hh-o){display:grid!important;grid-template-columns:1fr!important;gap:14px!important}
 html body section.hh-them a.hh-o{flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;gap:14px!important;min-height:66px!important;height:auto!important;aspect-ratio:auto!important;padding:8px 22px 8px 10px!important;border-radius:999px!important;text-align:left!important}
 html body section.hh-them a.hh-o>img{flex:none!important;width:48px!important;height:48px!important;margin:0!important}
 html body section.hh-them a.hh-o>span{flex:1;min-width:0;margin:0!important;font-size:16px!important;text-align:left!important}
 html body section.hh-them a.hh-o>span::after{content:"›";float:right;color:#9a8d78;font-size:20px;line-height:1}
}

/* 9.61 · Phần kết quả sau khi lập quẻ theo cùng kiểu nổi mềm: thẻ bỏ viền cứng, nút nổi, chọn hào thành lưới đều, thẻ nội dung quẻ không tràn. */
html body #resultArea summary{background:var(--nm-nen)!important;border:0!important;border-radius:20px!important;box-shadow:var(--nm-noi-nho)!important}
html body #resultArea details[open]>summary{box-shadow:var(--nm-lom-nho)!important}
html body .result-controls.result-controls,html body section.details-panel.details-panel.details-panel,html body #castStudy.wb-panel{background:var(--nm-nen)!important;border:0!important;border-radius:24px!important;box-shadow:var(--nm-noi)!important}
html body #pngButton{border:0!important;box-shadow:6px 6px 14px #b9b39f,-6px -6px 14px #ffffff!important}
html body #pngButton:active{box-shadow:inset 4px 4px 10px #2f421f99,inset -3px -3px 8px #7d9c6266!important}
html body #castStudy .wb-line-buttons{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px!important;background:var(--nm-nen)!important;border:0!important;border-radius:18px!important;box-shadow:var(--nm-lom)!important}
html body #castStudy .wb-line-buttons button{min-height:44px;margin:0!important;border:0!important;border-radius:14px!important;background:var(--nm-nen)!important;color:#4a6337!important;box-shadow:var(--nm-noi-nho)!important;font-weight:600}
html body #castStudy .wb-line-buttons button[aria-pressed=true]{background:#55703f!important;color:#fff!important;box-shadow:inset 3px 3px 8px #3a502780,inset -3px -3px 8px #7d9c6255!important}
html body #reviewThisCast{border:0!important;border-radius:999px!important;background:var(--nm-nen)!important;box-shadow:var(--nm-noi-nho)!important;color:#4a6337!important;padding-inline:18px!important}
html body #reviewThisCast:active{box-shadow:var(--nm-lom-nho)!important}
html body #castStudy a:not([class]),html body section.details-panel a:not([class]){color:#4a6337!important;text-decoration-color:#4a633766}
html body section.details-panel .detail-tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;overflow:visible!important}
html body section.details-panel .detail-tabs [role=tab]{min-width:0;min-height:42px;margin:0!important;padding:0 6px!important;border:0!important;border-radius:999px!important;background:var(--nm-nen)!important;color:#4a4036!important;box-shadow:var(--nm-noi-nho)!important;font-size:13.5px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body section.details-panel .detail-tabs [role=tab][aria-selected=true]{background:#55703f!important;color:#fff!important;box-shadow:inset 3px 3px 8px #3a502780,inset -3px -3px 8px #7d9c6255!important}
@media(max-width:767px){html body section.details-panel .detail-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* 9.61 · Trang phụ: thanh đầu trang và thanh dưới cùng cùng màu nền nổi mềm. */
html body .hs-mbar,html body header.top{background:var(--nm-nen)!important;border-bottom:0!important;box-shadow:0 8px 16px -12px #cfc6b5}
html body .hcq-tabbar{background:#f3efe8f2!important;border-top:0!important;box-shadow:0 -8px 18px -12px #cfc6b5}

/* 9.63 · Quân thử trên iPhone: ô chọn ngày, tháng, năm, giờ, phút hiện kiểu mặc định của máy, lệch với khung. Bỏ kiểu của máy
   (appearance:none), tự vẽ mũi tên, ô lõm bo tròn như ảnh mẫu Quân gửi; chữ 16px để iPhone không tự phóng to khi bấm. */
html body #noi-dung #castForm select:not([multiple]):not([data-a]):not([data-b]):not([data-c]){-webkit-appearance:none!important;appearance:none!important;min-height:52px;padding:0 38px 0 18px!important;border:0!important;border-radius:999px!important;background:var(--nm-nen) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%233b3127' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center/14px 14px!important;box-shadow:var(--nm-lom)!important;color:#2e2a22!important;-webkit-text-fill-color:#2e2a22;font-size:16px!important;line-height:52px;text-overflow:ellipsis;cursor:pointer}
html body #noi-dung #castForm select::-ms-expand{display:none}
html body #noi-dung #castForm :is(textarea,input:not([type=radio]):not([type=checkbox])){-webkit-appearance:none;appearance:none;font-size:16px!important}
@media(max-width:767px){html body #noi-dung #castForm select:not([multiple]):not([data-a]):not([data-b]):not([data-c]){padding-left:14px!important;padding-right:26px!important;background-position:right 10px center!important;background-size:12px 12px!important}}

/* 9.67 · Menu kiểu nổi mềm theo ảnh màn hình điện thoại Quân gửi 20/11/2026, phối màu theo bản đồ địa hình Việt Nam Quân gửi:
   nền giấy xám ngà, ô cùng màu nền nổi lên nhờ bóng tối dưới phải và bóng sáng trên trái; chữ nâu đen; dải màu độ cao
   (ô liu đồng bằng, vàng cát, nâu đồi, đỏ thẫm đỉnh núi) cho tiêu đề nhóm; mục đang chọn ô liu đậm. Bỏ màu phấn từng ô. */
:root{--bd-nen:#e9e8e4;--bd-nen2:#efeeea;--bd-toi:#c8c4ba;--bd-sang:#ffffff;--bd-oliu:#6b7638;--bd-oliu2:#4f5a2c;--bd-cat:#c2b27a;--bd-nau:#8c6a3f;--bd-tham:#7a3a3c;--bd-chu:#2f2c26;--bd-chu2:#7a7569;
 --bd-doc:linear-gradient(90deg,#4f5a2c 0%,#7d8640 28%,#b3a35f 52%,#9a6e3c 76%,#7a3a3c 100%);
 --bd-noi:6px 6px 14px #c8c4ba,-6px -6px 14px #ffffff;--bd-noi-nho:4px 4px 9px #c8c4bacc,-4px -4px 9px #ffffff;
 --bd-lom:inset 4px 4px 9px #cfcbc1,inset -4px -4px 9px #ffffff;--bd-lom-nho:inset 2px 2px 5px #cfcbc1,inset -2px -2px 5px #ffffff}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side{background:linear-gradient(#e9e8e459,#e9e8e459),url(/ui/ban-do-dia-hinh.jpg) 8px calc(50vh - 186px)/240px auto no-repeat fixed,var(--bd-nen)!important;scrollbar-width:thin;scrollbar-color:var(--bd-cat) transparent}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-top{background:var(--bd-nen)!important;box-shadow:0 8px 14px -12px var(--bd-toi)!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-close{background:var(--bd-nen)!important;box-shadow:var(--bd-noi-nho)!important;color:var(--bd-chu)!important}
/* Tiêu đề nhóm: khối nổi bo tròn, chữ tô dải màu độ cao, vạch trái cùng dải màu; ngăn đang mở thì lún xuống */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d>summary.hs-g{background:var(--bd-nen)!important;border:0!important;border-radius:18px!important;box-shadow:var(--bd-noi-nho)!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d[open]>summary.hs-g{box-shadow:var(--bd-lom-nho)!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-gt{background:var(--bd-doc)!important;-webkit-background-clip:text!important;background-clip:text!important;color:transparent!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d>summary.hs-g::before{background:linear-gradient(180deg,#4f5a2c,#b3a35f 50%,#7a3a3c)!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d-khoa>summary.hs-g{color:var(--bd-tham)!important}
/* Ô môn: cùng màu nền, nổi mềm, chữ nâu đen; bỏ màu phấn và viền */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-mc,.hs-d2>summary){--o:var(--bd-nen)!important;--ob:transparent!important;--may:var(--bd-nen)!important;--may2:var(--bd-nen2)!important;--mayb:transparent!important;color:var(--bd-chu)!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-hang,.hs-dn)>.hs-i:not([aria-current=page]),html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-chips>.hs-chip:not([aria-current=page]),html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-hang>.hs-k,html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d2>summary,html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-mc{background:var(--bd-nen)!important;border:0!important;border-radius:16px!important;box-shadow:var(--bd-noi-nho)!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-mc,.hs-d2>summary):not([aria-current=page]):hover{background:var(--bd-nen2)!important;transform:translateY(-2px)!important;box-shadow:6px 7px 14px #c8c4ba,-5px -5px 12px #ffffff!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-mc,.hs-d2>summary):active{transform:none!important;box-shadow:var(--bd-lom-nho)!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-pre{color:var(--bd-nau)!important;font-weight:500!important}
/* Ngăn Mai Hoa: khay lõm chứa bảy cách lập */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d2,html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d2[open]{background:var(--bd-nen)!important;border:0!important;border-radius:20px!important;box-shadow:var(--bd-lom)!important;padding:6px!important}
/* Mục đang chọn: ô liu đậm theo màu đồng bằng trên bản đồ, chữ trắng */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-i[aria-current=page],html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-chip[aria-current=page]{background:linear-gradient(135deg,#7d8640,#4f5a2c)!important;color:#fff!important;border:0!important;box-shadow:5px 5px 12px #b7b2a5,-4px -4px 10px #ffffff,inset 0 1px 0 #ffffff33!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-i[aria-current=page] .hs-pre{color:#f0ead8!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-i[aria-current=page]::before{background:var(--bd-oliu2)!important}
/* Vòng logo: khối tròn nổi nhỏ màu giấy, mục đang chọn thì viền vàng cát */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-ic.hs-logo[style*="--lg"]{background:var(--bd-nen2)!important;box-shadow:3px 3px 6px #c8c4ba,-3px -3px 6px #ffffff!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-i[aria-current=page] .hs-ic.hs-logo[style*="--lg"],html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d2[open]>summary .hs-ic.hs-logo[style*="--lg"]{background:var(--bd-nen2)!important;box-shadow:0 0 0 2px var(--bd-cat),0 4px 8px #0003!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-i[aria-current=page] .hs-ic.hs-logo[style*="--lg"]::before,html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d2[open]>summary .hs-ic.hs-logo[style*="--lg"]::before{background:var(--lg) center/contain no-repeat!important;-webkit-mask:none!important;mask:none!important}
/* Ổ khóa Tụ Bảo Lâu đỏ thẫm, hàng chân menu phẳng */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-khoa,.hs-i>em){color:var(--bd-tham)!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-foot{background:var(--bd-nen)!important;border-top:0!important;box-shadow:0 -8px 14px -12px var(--bd-toi)}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-foot .hs-i:not([aria-current=page]){background:transparent!important;box-shadow:none!important;color:var(--bd-chu2)!important}

/* 9.67 · Quân: ghi đè ảnh bản đồ địa hình lên các ô. Menu: bản đồ trọn (cả Hoàng Sa, Trường Sa) vừa bề ngang menu,
   đứng yên giữa màn hình sau menu, mỗi ô là một ô cửa nhìn thấy khúc bản đồ phía sau; lớp giấy mờ phủ trên cho chữ dễ đọc. Mục đang chọn giữ ô liu. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-hang,.hs-dn)>.hs-i:not([aria-current=page]),html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-chips>.hs-chip:not([aria-current=page]),html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-hang>.hs-k,html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d2>summary{background:linear-gradient(#e9e8e4a3,#e9e8e4a3),url(/ui/ban-do-dia-hinh.jpg) 8px calc(50vh - 186px)/240px auto no-repeat fixed,var(--bd-nen)!important;text-shadow:0 1px 0 #ffffffb3}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-d2>summary):not([aria-current=page]):hover{background:linear-gradient(#efeeea80,#efeeea80),url(/ui/ban-do-dia-hinh.jpg) 8px calc(50vh - 186px)/240px auto no-repeat fixed,var(--bd-nen2)!important}

/* 9.67 · Ô công cụ trang chủ đổi theo menu: bỏ màu phấn, nền giấy xám ngà nổi mềm, mỗi ô phủ một khúc bản đồ địa hình phóng to
   (ô lần lượt từ núi Tây Bắc, đồng bằng sông Hồng, miền Trung, Tây Nguyên tới đồng bằng sông Cửu Long), lớp giấy mờ cho chữ rõ. */
html body section.hh-them ul.hh-o-luoi>li>a.hh-o.hh-o{--bdx:18%;--bdy:12%;background:linear-gradient(#e9e8e4b3,#e9e8e4b3),url(/ui/ban-do-dia-hinh.jpg) var(--bdx) var(--bdy)/300% auto no-repeat,var(--bd-nen)!important;border:0!important;border-radius:24px!important;box-shadow:var(--bd-noi)!important;color:var(--bd-chu)!important;text-shadow:0 1px 0 #ffffffb3}
html body section.hh-them ul.hh-o-luoi>li>a.hh-o.hh-o:hover{background:linear-gradient(#efeeea8c,#efeeea8c),url(/ui/ban-do-dia-hinh.jpg) var(--bdx) var(--bdy)/300% auto no-repeat,var(--bd-nen2)!important;box-shadow:9px 10px 20px #c8c4ba,-7px -7px 16px #ffffff!important}
html body section.hh-them ul.hh-o-luoi>li>a.hh-o.hh-o:active{box-shadow:var(--bd-lom)!important}
html body section.hh-them ul.hh-o-luoi>li:nth-child(10n+2)>a.hh-o{--bdx:45%;--bdy:17%}
html body section.hh-them ul.hh-o-luoi>li:nth-child(10n+3)>a.hh-o{--bdx:30%;--bdy:28%}
html body section.hh-them ul.hh-o-luoi>li:nth-child(10n+4)>a.hh-o{--bdx:52%;--bdy:46%}
html body section.hh-them ul.hh-o-luoi>li:nth-child(10n+5)>a.hh-o{--bdx:60%;--bdy:54%}
html body section.hh-them ul.hh-o-luoi>li:nth-child(10n+6)>a.hh-o{--bdx:66%;--bdy:64%}
html body section.hh-them ul.hh-o-luoi>li:nth-child(10n+7)>a.hh-o{--bdx:60%;--bdy:73%}
html body section.hh-them ul.hh-o-luoi>li:nth-child(10n+8)>a.hh-o{--bdx:48%;--bdy:79%}
html body section.hh-them ul.hh-o-luoi>li:nth-child(10n+9)>a.hh-o{--bdx:38%;--bdy:85%}
html body section.hh-them ul.hh-o-luoi>li:nth-child(10n+10)>a.hh-o{--bdx:30%;--bdy:91%}
html body section.hh-them .hh-vong{background:var(--bd-nen2)!important;box-shadow:3px 3px 7px #c8c4ba,-3px -3px 7px #ffffff!important}

/* 9.67 · Quân: kéo ô menu dài ra bên phải, sửa gọn. Ẩn thanh cuộn (vẫn cuộn bằng chuột, bàn rê), lề hai bên 8px và 6px,
   khay Mai Hoa bỏ lề thừa để ô bên trong rộng bằng ô ngoài, ô và tiêu đề nhóm sát nhau hơn. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side{scrollbar-width:none!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side::-webkit-scrollbar{display:none}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-nav{padding:0 6px 10px 8px!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d>summary.hs-g{margin:10px 0 4px!important;min-height:34px!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-nav>details:first-child>summary.hs-g{margin-top:8px!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-hang,.hs-dn)>.hs-i,html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-chips>.hs-chip,html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-hang>.hs-k{margin:2px 0!important;min-height:34px!important;padding-top:4px!important;padding-bottom:4px!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d2,html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d2[open]{padding:4px!important;margin:2px 0 4px!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d2 .hs-chips{padding:0!important;margin:2px 0 0!important;gap:0!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-chips>.hs-chip{margin:2px 0!important;min-height:34px!important;width:100%!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-mai-chay{margin:2px 0 4px!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d2>.hs-dn{padding:0!important;margin:0!important}

/* 9.67 · Quân thấy ô chói khi rê chuột: rê chuột thì nền ô sậm đi chút (không sáng lên), nhích 1px, bóng trắng nhạt; logo không phóng to. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-d2>summary):not([aria-current=page]):hover{background:linear-gradient(#e2e0d9ad,#e2e0d9ad),url(/ui/ban-do-dia-hinh.jpg) 8px calc(50vh - 186px)/240px auto no-repeat fixed,#e2e0d9!important;transform:translateY(-1px)!important;box-shadow:4px 5px 10px #bfbab0,-3px -3px 8px #ffffffa6!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-mc:hover{background:#e2e0d9!important;transform:translateY(-1px)!important;box-shadow:4px 5px 10px #bfbab0,-3px -3px 8px #ffffffa6!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-mc,.hs-d2>summary):hover .hs-ic.hs-logo{animation:none!important;transform:none!important;box-shadow:3px 3px 6px #c8c4ba,-3px -3px 6px #ffffff!important}

/* 9.67 · Quân: bản đồ nổi 3D trên nút menu. Ảnh ban-do-noi.webp là đất liền và đảo đã tách khỏi nền giấy, có bóng đổ nướng sẵn
   phía dưới phải, nên trên mặt nút đất hiện đủ màu như khối nổi lên. Khe giữa các nút vẫn thấy bản đồ mờ. Chữ trên nút có quầng
   sáng cho dễ đọc. Rê chuột không dịch nút (nền đứng yên theo màn hình sẽ lệch nếu nút dịch), chỉ đổi bóng. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side{background:linear-gradient(#e9e8e4a6,#e9e8e4a6),url(/ui/ban-do-noi.webp) 8px calc(50vh - 186px)/240px auto no-repeat fixed,var(--bd-nen)!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-hang,.hs-dn)>.hs-i:not([aria-current=page]),html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-chips>.hs-chip:not([aria-current=page]),html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-hang>.hs-k,html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d2>summary{background:url(/ui/ban-do-noi.webp) 8px calc(50vh - 186px)/240px auto no-repeat fixed,var(--bd-nen)!important;text-shadow:0 0 2px #f1efea,0 0 5px #f1efea,0 1px 0 #ffffff!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-d2>summary):not([aria-current=page]):hover{background:url(/ui/ban-do-noi.webp) 8px calc(50vh - 186px)/240px auto no-repeat fixed,#e2e0d9!important;transform:none!important;box-shadow:5px 6px 12px #bdb8ad,-3px -3px 8px #ffffffa6!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-mc,.hs-d2>summary):hover{transform:none!important}

/* 9.67 · Quân: mọi ô ứng dụng môn đồng bộ giao diện mới (nền giấy xám ngà nổi mềm, phủ một khúc bản đồ địa hình, bỏ màu phấn,
   chữ nâu đen, rê chuột thì sậm nhẹ). Áp cho: ô Tiện ích, 64 quẻ, thẻ môn (Các môn, Lớp học Bát Tự, 60 nhật trụ, Thập dực),
   Xem quẻ theo việc, thẻ hôm nay và ô 64 quẻ trang chủ, ô ứng dụng màn hình chính điện thoại. Khúc bản đồ đổi theo thứ tự ô,
   chạy từ núi Tây Bắc xuống đồng bằng sông Cửu Long. */
html body :is(.ti-luoi,.luoi,.the-mon,.muc,.mhc-luoi,.mhc-dock,.hn-oo)>:nth-child(10n+1){--bdx:18%;--bdy:12%}
html body :is(.ti-luoi,.luoi,.the-mon,.muc,.mhc-luoi,.mhc-dock,.hn-oo)>:nth-child(10n+2){--bdx:45%;--bdy:17%}
html body :is(.ti-luoi,.luoi,.the-mon,.muc,.mhc-luoi,.mhc-dock,.hn-oo)>:nth-child(10n+3){--bdx:30%;--bdy:28%}
html body :is(.ti-luoi,.luoi,.the-mon,.muc,.mhc-luoi,.mhc-dock,.hn-oo)>:nth-child(10n+4){--bdx:52%;--bdy:46%}
html body :is(.ti-luoi,.luoi,.the-mon,.muc,.mhc-luoi,.mhc-dock,.hn-oo)>:nth-child(10n+5){--bdx:60%;--bdy:54%}
html body :is(.ti-luoi,.luoi,.the-mon,.muc,.mhc-luoi,.mhc-dock,.hn-oo)>:nth-child(10n+6){--bdx:66%;--bdy:64%}
html body :is(.ti-luoi,.luoi,.the-mon,.muc,.mhc-luoi,.mhc-dock,.hn-oo)>:nth-child(10n+7){--bdx:60%;--bdy:73%}
html body :is(.ti-luoi,.luoi,.the-mon,.muc,.mhc-luoi,.mhc-dock,.hn-oo)>:nth-child(10n+8){--bdx:48%;--bdy:79%}
html body :is(.ti-luoi,.luoi,.the-mon,.muc,.mhc-luoi,.mhc-dock,.hn-oo)>:nth-child(10n+9){--bdx:38%;--bdy:85%}
html body :is(.ti-luoi,.luoi,.the-mon,.muc,.mhc-luoi,.mhc-dock,.hn-oo)>:nth-child(10n+10){--bdx:30%;--bdy:91%}
/* Ô lớn có chữ: Tiện ích, 64 quẻ, thẻ môn, Xem quẻ theo việc, thẻ hôm nay, ô 64 quẻ trang chủ */
html body :is(.ti-luoi>a.ti-o,.luoi>a.o,.the-mon>a,.muc>a,section.hn .hn-the,section.hn .hn-o,section.hh-them a.hh-64){background:linear-gradient(#e9e8e4bf,#e9e8e4bf),url(/ui/ban-do-dia-hinh.jpg) var(--bdx,40%) var(--bdy,40%)/300% auto no-repeat,var(--bd-nen)!important;border:0!important;border-radius:20px!important;box-shadow:var(--bd-noi)!important;color:var(--bd-chu)!important;text-shadow:0 1px 0 #ffffffb3;transition:box-shadow .2s,background .2s}
html body :is(.ti-luoi>a.ti-o,.luoi>a.o,.the-mon>a,.muc>a,section.hn .hn-the,section.hn .hn-o,section.hh-them a.hh-64):hover{background:linear-gradient(#e2e0d9c7,#e2e0d9c7),url(/ui/ban-do-dia-hinh.jpg) var(--bdx,40%) var(--bdy,40%)/300% auto no-repeat,#e2e0d9!important;transform:none!important;box-shadow:5px 6px 12px #bdb8ad,-4px -4px 10px #ffffffa6!important}
html body :is(.ti-luoi>a.ti-o,.luoi>a.o,.the-mon>a,.muc>a,section.hn .hn-the,section.hn .hn-o,section.hh-them a.hh-64):active{box-shadow:var(--bd-lom)!important}
html body .luoi>a.o{border-radius:16px!important}
html body :is(.ti-luoi>a.ti-o,.luoi>a.o,.the-mon>a) :is(b,strong,h2,h3){color:var(--bd-chu)!important}
html body :is(.ti-luoi>a.ti-o,.the-mon>a,.luoi>a.o) :is(span,small,p,em){color:var(--bd-chu2)!important}
/* Chip liên kết nhỏ (Các môn khác): nền giấy nổi mềm, không phủ bản đồ */
html body .lien>a{background:var(--bd-nen)!important;border:0!important;border-radius:999px!important;box-shadow:var(--bd-noi-nho)!important;color:var(--bd-chu)!important}
html body .lien>a:hover{background:#e2e0d9!important;box-shadow:3px 4px 8px #bdb8ad,-3px -3px 7px #ffffffa6!important}
/* Màn hình chính điện thoại: nền giấy để khối nổi mềm đúng màu; ô vuông logo phủ khúc bản đồ, thanh dưới lõm */
html body .mhc{background:var(--bd-nen)!important}
html body .mhc .mhc-ic{background:linear-gradient(#e9e8e4a6,#e9e8e4a6),url(/ui/ban-do-dia-hinh.jpg) var(--bdx,40%) var(--bdy,40%)/420% auto no-repeat,var(--bd-nen)!important;box-shadow:5px 5px 11px #c8c4bacc,-5px -5px 11px #ffffff!important}
html body .mhc .mhc-app:active .mhc-ic{box-shadow:var(--bd-lom-nho)!important}
html body .mhc .mhc-dock{background:#e9e8e4d9!important;box-shadow:var(--bd-lom-nho)!important}
html body .mhc .mhc-ten{color:var(--bd-chu)!important}
html body .mhc .mhc-dau{background:linear-gradient(#e9e8e4c7,#e9e8e4c7),url(/ui/ban-do-dia-hinh.jpg) 45% 20%/240% auto no-repeat,var(--bd-nen)!important;box-shadow:var(--bd-noi)!important}
html body .mhc :is(.mhc-dong,.mhc-cham button,.mhc-vao){background:var(--bd-nen)!important;box-shadow:var(--bd-noi-nho)!important}
/* Thẻ nhiều chữ (thẻ môn, Xem quẻ theo việc): lớp giấy dày hơn cho chữ nhỏ dễ đọc */
html body :is(.the-mon.the-mon.the-mon>a,.muc.muc.muc>a){background:linear-gradient(#e9e8e4e0,#e9e8e4e0),url(/ui/ban-do-dia-hinh.jpg) var(--bdx,40%) var(--bdy,40%)/300% auto no-repeat,var(--bd-nen)!important}
html body :is(.the-mon.the-mon.the-mon>a,.muc.muc.muc>a):hover{background:linear-gradient(#e2e0d9e6,#e2e0d9e6),url(/ui/ban-do-dia-hinh.jpg) var(--bdx,40%) var(--bdy,40%)/300% auto no-repeat,#e2e0d9!important}
/* Tiêu đề nhóm trong menu giống trang chủ ở mọi trang (trang khác không nạp kieu-the.css) */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d>summary.hs-g{padding:10px 14px 10px 24px!important;font:800 14.5px/1.3 Inter,"Be Vietnam Pro","Segoe UI",system-ui,sans-serif!important;letter-spacing:.09em!important;text-transform:uppercase!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-gt{font:inherit!important;letter-spacing:inherit!important;text-transform:inherit!important}

/* 9.67 · Quân: ô ngoài menu không phủ bản đồ, làm kiểu nổi mềm "ẩn chìm" như ảnh màn hình điện thoại neumorphism:
   ô cùng màu nền trang, nổi lên như khối 3D nhờ bóng sáng trên trái, bóng tối dưới phải và một vệt sáng mảnh ở mép;
   rê chuột thì nổi cao thêm chút, bấm thì lún xuống. Nền cả trang đổi sang màu giấy xám ngà của ô, phẳng, bỏ quầng màu. */
:root{--nm-nen:#e9e8e4;--nm-sang:#ffffff;--nm-toi:#c8c4ba;
 --nm-noi:9px 9px 18px #c3bfb5,-9px -9px 18px #ffffff;--nm-noi-nho:5px 5px 11px #c8c4bacc,-5px -5px 11px #ffffff;
 --nm-lom:inset 5px 5px 10px #cdc9bf,inset -5px -5px 10px #ffffff;--nm-lom-nho:inset 3px 3px 6px #cdc9bf,inset -3px -3px 6px #ffffff;
 --bd-3d:9px 9px 18px #c3bfb5,-9px -9px 18px #ffffff,inset 1px 1px 0 #ffffffb3,inset -1px -1px 0 #d6d2c880;
 --bd-3d-cao:12px 12px 24px #bdb9ae,-10px -10px 22px #ffffff,inset 1px 1px 0 #ffffffb3,inset -1px -1px 0 #d6d2c880;
 --bd-3d-lun:inset 6px 6px 12px #c8c4ba,inset -6px -6px 12px #ffffff}
html:root,html:root:has(body.has-side),html body{background:var(--nm-nen)!important}
html body::before{background:var(--nm-nen)!important}
html body{--ds-paper:#e9e8e4;--ds-card:#e9e8e4}
/* Các ô ngoài menu: bỏ bản đồ, cùng màu nền, khối nổi 3D */
html body section.hh-them ul.hh-o-luoi>li>a.hh-o.hh-o,html body section.hh-them ul.hh-o-luoi>li>a.hh-o.hh-o:hover,
html body :is(.ti-luoi>a.ti-o,.luoi>a.o,.the-mon>a,.muc>a,section.hn .hn-the,section.hn .hn-o,section.hh-them a.hh-64),
html body :is(.the-mon.the-mon.the-mon>a,.muc.muc.muc>a){background:var(--nm-nen)!important;border:0!important;box-shadow:var(--bd-3d)!important;text-shadow:none!important;transition:box-shadow .25s,transform .25s!important}
html body section.hh-them ul.hh-o-luoi>li>a.hh-o.hh-o:hover,
html body :is(.ti-luoi>a.ti-o,.luoi>a.o,.the-mon>a,.muc>a,section.hn .hn-the,section.hn .hn-o,section.hh-them a.hh-64):hover,
html body :is(.the-mon.the-mon.the-mon>a,.muc.muc.muc>a):hover{background:var(--nm-nen)!important;box-shadow:var(--bd-3d-cao)!important;transform:translateY(-2px)!important}
html body section.hh-them ul.hh-o-luoi>li>a.hh-o.hh-o:active,
html body :is(.ti-luoi>a.ti-o,.luoi>a.o,.the-mon>a,.muc>a,section.hn .hn-the,section.hn .hn-o,section.hh-them a.hh-64):active,
html body :is(.the-mon.the-mon.the-mon>a,.muc.muc.muc>a):active{box-shadow:var(--bd-3d-lun)!important;transform:none!important}
html body section.hh-them ul.hh-o-luoi>li>a.hh-o.hh-o{border-radius:26px!important}
/* Vòng logo trong ô: đĩa tròn nổi như khung ảnh đại diện trong ảnh mẫu */
html body section.hh-them .hh-vong,html body section.hn .hh-vong{background:var(--nm-nen)!important;box-shadow:6px 6px 12px #c3bfb5,-6px -6px 12px #ffffff,inset 1px 1px 0 #ffffffb3!important}
html body .lien>a{box-shadow:var(--nm-noi-nho)!important}
html body .lien>a:hover{background:var(--nm-nen)!important;box-shadow:7px 7px 14px #c3bfb5,-6px -6px 12px #ffffff!important}
html body .lien>a:active{box-shadow:var(--nm-lom-nho)!important}
/* Màn hình chính điện thoại: ô vuông logo khối nổi 3D cùng màu nền, không bản đồ; thẻ chào nổi, thanh dưới lõm */
html body .mhc .mhc-ic{background:var(--nm-nen)!important;box-shadow:6px 6px 13px #c3bfb5,-6px -6px 13px #ffffff,inset 1px 1px 0 #ffffffb3!important}
html body .mhc .mhc-app:active .mhc-ic{box-shadow:var(--nm-lom-nho)!important}
html body .mhc .mhc-dau{background:var(--nm-nen)!important;box-shadow:var(--bd-3d)!important}
html body .mhc .mhc-dock{background:var(--nm-nen)!important;box-shadow:var(--nm-lom)!important}
/* Chấm chuyển trang màn hình chính: chấm thường lõm, chấm đang đứng ô liu nổi */
html body .mhc .mhc-cham button{background:var(--nm-nen)!important;box-shadow:inset 2px 2px 4px #c3bfb5,inset -2px -2px 4px #ffffff!important}
html body .mhc .mhc-cham button[aria-selected=true]{background:linear-gradient(135deg,#7d8640,#4f5a2c)!important;box-shadow:2px 2px 5px #b7b2a5,-2px -2px 5px #ffffff!important}

/* 9.67 · Đồng bộ toàn web (ui/dong-bo-noi-mem.mjs gắn data-nm theo màu nền thật). Dùng :is(...,#nm#nm#nm#nm) để thắng các kiểu
   cũ viết bằng id. Khung sáng rộng thành nền phẳng; thẻ có viền thành khối nổi; nút, tab nổi nhỏ, đang chọn thì lún, chữ ô liu;
   nút ô liu, đen giữ màu thêm bóng; ô nhập, ô chọn lõm. Lưới ô ngày và lá số giữ màu tốt xấu, không đụng. */
html body [data-nm=phang]:is([data-nm],#nm#nm#nm#nm){background-color:var(--nm-nen)!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important}
html body [data-nm=the]:is([data-nm],#nm#nm#nm#nm){background-color:var(--nm-nen)!important;background-image:none!important;border-color:transparent!important;border-style:solid!important;box-shadow:var(--bd-3d)!important;border-radius:20px!important}
html body [data-nm=nut]:is([data-nm],#nm#nm#nm#nm){background-color:var(--nm-nen)!important;background-image:none!important;border-color:transparent!important;box-shadow:6px 6px 12px #c3bfb5,-6px -6px 12px #ffffff,inset 1px 1px 0 #ffffffb3!important;border-radius:16px!important;transition:box-shadow .2s,transform .2s,color .2s!important}
html body [data-nm=nut]:is([data-nm],#nm#nm#nm#nm):hover{box-shadow:9px 9px 18px #bdb9ae,-8px -8px 16px #ffffff,inset 1px 1px 0 #ffffffb3!important;transform:translateY(-1px)}
html body [data-nm=nut]:is([data-nm],#nm#nm#nm#nm):active,html body [data-nm=nut]:is([aria-selected=true],[aria-pressed=true],[aria-current]:not([aria-current=false]),.active,.is-active,.selected,.on,.current,[open]):is([data-nm],#nm#nm#nm#nm){box-shadow:var(--bd-3d-lun)!important;transform:none;color:#4f5a2c!important;font-weight:700!important}
html body [data-nm=dam]:is([data-nm],#nm#nm#nm#nm){border-color:transparent!important;box-shadow:6px 6px 12px #bdb9ae,-6px -6px 12px #ffffff,inset 0 1px 0 #ffffff33!important;border-radius:16px!important}
html body [data-nm=dam]:is([data-nm],#nm#nm#nm#nm):active{box-shadow:inset 4px 4px 9px #00000040,inset -3px -3px 7px #ffffff22!important}
html body :is(input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=color]):not([type=file]):not([type=submit]):not([type=button]):not([type=reset]),select,textarea):not(#hcqSide *):not(.sat-compass *):not(.mhc *):is(input,select,textarea,#nm#nm#nm#nm){background-color:var(--nm-nen)!important;background-image:none!important;border-color:transparent!important;box-shadow:var(--nm-lom-nho)!important;border-radius:14px!important}
html body select:not(#hcqSide *):not(.sat-compass *):is(select,#nm#nm#nm#nm){background-image:linear-gradient(45deg,transparent 50%,#6b665c 50%),linear-gradient(135deg,#6b665c 50%,transparent 50%)!important;background-position:calc(100% - 13px) 50%,calc(100% - 9px) 50%!important;background-size:4px 4px,4px 4px!important;background-repeat:no-repeat!important;-webkit-appearance:none;appearance:none;padding-right:20px!important}
html body :is(input,select,textarea):not(#hcqSide *):not(.sat-compass *):focus:is(input,select,textarea,#nm#nm#nm#nm){box-shadow:var(--nm-lom-nho),0 0 0 2px #55703f66!important;outline:0!important}

/* 9.67 · Quân: chữ trong menu khó thấy khi nằm trên đất của bản đồ. Chữ nâu đen đậm, dày hơn, viền sáng màu giấy quanh nét
   (paint-order cho nét viền nằm dưới chữ) và quầng sáng dày, đọc rõ trên cả nền giấy lẫn nền đất. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,small,em){color:#1c1814!important;font-weight:600!important;-webkit-text-stroke:3px #f4f2ec;paint-order:stroke fill;text-shadow:0 0 2px #f4f2ec,0 0 4px #f4f2ec,0 0 7px #f4f2ecd9!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) .hs-pre{color:#6b4a22!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) small{color:#4a4238!important;font-weight:500!important}
/* 9.67 · Quân: chữ menu nổi bật hơn bản đồ. Chữ trắng ngà viền nâu đen dày (kiểu chữ ghi trên bản đồ), bóng đổ nhẹ;
   tiền tố (Lục Hào ·, Tử Vi ·) vàng cát; dòng phụ "· 7 cách lập" trắng ngà mờ. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,small,em){color:#fffdf6!important;font-weight:700!important;-webkit-text-stroke:3.5px #2a2118;paint-order:stroke fill;text-shadow:0 2px 3px #00000059!important;letter-spacing:.01em}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) .hs-pre{color:#f3d98c!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) small{color:#efe8d8!important;font-weight:600!important;-webkit-text-stroke:3px #2a2118}
/* Thanh tab dưới cùng trên điện thoại: màu giấy, bóng nổi hắt lên */
html body .hcq-tabbar:is(.hcq-tabbar,#nm#nm#nm#nm){background:var(--nm-nen)!important;border-top:0!important;box-shadow:0 -6px 16px #c8c4ba99,0 -1px 0 #ffffff!important;-webkit-backdrop-filter:none;backdrop-filter:none}

/* 9.67 · Quân: tắt ô chạy ngang (dải logo tự chạy dưới ngăn đóng) và chữ menu vẫn khó thấy trên bản đồ. Chữ nâu đen đậm đặt
   trên miếng nền giấy mờ ôm vừa chữ, bản đồ vẫn thấy ở phần còn lại của ô; tiền tố nâu đất, dòng phụ nâu xám. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-mai-chay{display:none!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,small,em){color:#1c1814!important;font-weight:600!important;-webkit-text-stroke:0!important;text-shadow:none!important;letter-spacing:0}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page])>span:not(.hs-ic){flex:0 1 auto!important;width:auto!important;padding:3px 10px!important;border-radius:10px!important;background:#f5f3edeb!important;box-shadow:0 1px 3px #00000024,inset 0 1px 0 #ffffff!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) .hs-pre{color:#7a4f1c!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) small{color:#5e554a!important;font-weight:500!important}
/* 9.67 · Quân: thử chữ menu màu ô liu (vẫn trên miếng nền giấy mờ); tiền tố nâu đất, dòng phụ ô liu nhạt. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,em){color:#4f5a2c!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) .hs-pre{color:#7a4f1c!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) small{color:#6f7a4c!important}
/* 9.67 · Quân: thử bỏ miếng nền giấy sau chữ menu. Chữ ô liu đậm nằm thẳng trên bản đồ, quầng sáng màu giấy quanh nét
   (paint-order: viền sáng nằm dưới chữ) để chữ không chìm vào phần đất. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page])>span:not(.hs-ic){background:none!important;box-shadow:none!important;padding:0!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,small,em){font-weight:700!important;-webkit-text-stroke:3px #f5f3ed!important;paint-order:stroke fill;text-shadow:0 0 3px #f5f3ed,0 0 6px #f5f3ede6,0 0 10px #f5f3edb3!important}
/* 9.67 · Quân: viền chữ menu màu đen, ô liu đậm hơn chút. Chữ ô liu #44502a viền đen mảnh (nét viền nằm dưới chữ),
   quầng sáng màu giấy mờ phía ngoài để tách chữ khỏi phần đất. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,em){color:#44502a!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,small,em){-webkit-text-stroke:1.1px #000000!important;paint-order:stroke fill;text-shadow:0 0 3px #f5f3ed,0 0 6px #f5f3ede6,0 0 10px #f5f3edb3!important}
/* 9.67 · Quân chọn màu chữ menu #1E242B (xám than đậm); viền đen mảnh và quầng sáng giữ nguyên. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,em){color:#1e242b!important}
/* 9.67 · Quân thử màu chữ menu #991B1B (đỏ thẫm); viền đen mảnh và quầng sáng giữ nguyên. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,em){color:#991b1b!important}
/* 9.67 · Quân chọn màu chữ menu #1D3557 (xanh chàm đậm); viền đen mảnh và quầng sáng giữ nguyên. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,em){color:#1d3557!important}
/* 9.67 · Quân: bỏ quầng sáng quanh chữ menu, chỉ còn chữ xanh chàm viền đen mảnh. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,small,em){text-shadow:none!important}
/* 9.67 · Quân: bản đồ dời sang bên phải (khung nổi mềm thay chỗ hai câu thơ, ui/cau-tho.mjs), menu trái thôi phủ bản đồ.
   Ô menu nổi mềm cùng màu nền, chữ ô liu như trước, tắt hẳn quầng sáng, viền chữ, bóng chữ. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side{background:var(--bd-nen)!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-hang,.hs-dn)>.hs-i:not([aria-current=page]),html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-chips>.hs-chip:not([aria-current=page]),html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-hang>.hs-k,html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-d2>summary{background:var(--bd-nen)!important;box-shadow:var(--bd-noi-nho)!important;text-shadow:none!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-d2>summary):not([aria-current=page]):hover{background:var(--bd-nen2)!important;box-shadow:5px 6px 12px #bdb8ad,-4px -4px 10px #ffffff!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary) :is(span,b,small,em,i){text-shadow:none!important;-webkit-text-stroke:0!important;filter:none!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,em){color:#4f5a2c!important;font-weight:600!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) .hs-pre{color:#7a4f1c!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) small{color:#6f7a4c!important;font-weight:500!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-i,.hs-k,.hs-chip,.hs-d2>summary):not([aria-current=page]) :is(span:not(.hs-ic),b,small,em){-webkit-text-stroke:0!important;text-shadow:none!important;paint-order:normal}
/* 9.67 · Quân: phiếu, lá số, ô ngày giờ của mọi môn cũng nổi mềm. Ảnh phiếu web vẽ ra (data-nm=phieu) là tấm phiếu bo góc nổi trên
   nền giấy; khung chứa phiếu bỏ viền be, thôi cắt mép để bóng hiện đủ. Ô lưới (ô ngày lịch, cung lá số, cửu cung; data-nm=luoi)
   giữ nguyên màu tốt, xấu, trung, chỉ bo góc và nổi bằng bóng, khung lưới giãn khe cho thấy bóng. */
html body :is(#resultSheet,#destinySheetPreview,.compact-image-wrap,.hl-phieu,.nk-phieu,.sheet-image-download):is(div,a,section,#nm#nm#nm#nm){overflow:visible!important;box-shadow:none!important;border-color:transparent!important;background-color:transparent!important}
html body :is(#resultSheet,#destinySheetPreview):is(div,#nm#nm#nm#nm){padding:14px 6px 22px!important}
html body img[data-nm=phieu]:is([data-nm],#nm#nm#nm#nm){border-radius:16px!important;box-shadow:var(--bd-3d)!important;transition:box-shadow .2s!important}
html body img[data-nm=phieu]:is([data-nm],#nm#nm#nm#nm):hover{box-shadow:var(--bd-3d-cao)!important}
html body [data-nm=luoi]:not(:is(.ti-luoi,.luoi,.the-mon,.muc,.hh-o-luoi,.hn,.mhc)>*):is([data-nm],#nm#nm#nm#nm){border-radius:12px!important;box-shadow:4px 4px 9px #c3bfb5,-4px -4px 9px #ffffff,inset 1px 1px 0 #ffffff80!important}
html body :has(>[data-nm=luoi]):not(:is(.ti-luoi,.luoi,.the-mon,.muc,.hh-o-luoi,.hn,.mhc)):is(div,ul,ol,section,#nm#nm#nm#nm){gap:max(6px,var(--nm-khe,0px))!important}
html body :is(.sheet-table-wrap,.bazi-sheet-header,.bazi-luck-sheet,.ziwei-sheet-grid):is(div,section,#nm#nm#nm#nm){border-radius:20px!important;box-shadow:var(--bd-3d)!important;border-color:transparent!important}
/* 9.67 · Trang đăng nhập khu riêng (dang-nhap-ngay-gio.html, không có menu nên không chạy module dò): nền giấy, thanh trang nổi,
   thẻ đăng nhập khối nổi, ô mật khẩu lõm, nút ô liu nổi, nút Hiện nổi nhỏ. */
html body .site-nav-bar:is(div,#nm#nm#nm#nm){background:var(--nm-nen)!important;border:0!important;box-shadow:0 6px 16px #c8c4ba99,0 1px 0 #ffffff!important}
html body .teacher-main .teacher-card:is(section,#nm#nm#nm#nm){background:var(--nm-nen)!important;border-color:transparent!important;box-shadow:var(--bd-3d)!important;border-radius:22px!important}
html body .teacher-main .teacher-button:is(button,#nm#nm#nm#nm){background:#55703f!important;color:#fff!important;border:0!important;border-radius:16px!important;box-shadow:6px 6px 12px #bdb9ae,-6px -6px 12px #ffffff,inset 0 1px 0 #ffffff33!important}
html body .teacher-main .teacher-card button:not(.teacher-button):is(button,#nm#nm#nm#nm){background:var(--nm-nen)!important;border:0!important;border-radius:14px!important;box-shadow:5px 5px 10px #c3bfb5,-5px -5px 10px #ffffff!important}
/* 9.67 · Quân: ô từng ngày của các môn lịch nổi mềm. Ô bo góc nổi bằng bóng sáng trên trái, tối dưới phải; giữ nguyên ba màu
   tốt ô liu, xấu đen, trung trắng (ui/mau-tot-xau.mjs); ô lịch thường không tô màu thì cùng màu nền giấy. Ô đang chọn lún xuống,
   viền ô liu; rê chuột nổi cao. Lưới giãn khe để thấy bóng. */
html body .calendar-grid:is(div,#nm#nm#nm#nm){gap:9px!important;padding:6px 4px!important}
html body .calendar-grid>.calendar-date:is(button,#nm#nm#nm#nm){border-color:transparent!important;border-radius:14px!important;box-shadow:5px 5px 10px #c3bfb5,-5px -5px 10px #ffffff,inset 1px 1px 0 #ffffff80!important;transition:box-shadow .2s,transform .2s!important}
html body .calendar-grid>.calendar-date:not(.tbl-date-cell):not(.filter-avoid):not([class*="-lv-"]):is(button,#nm#nm#nm#nm){background:var(--nm-nen)!important}
html body .calendar-grid>.calendar-date:is(button,#nm#nm#nm#nm):hover{box-shadow:7px 7px 14px #bdb9ae,-6px -6px 12px #ffffff,inset 1px 1px 0 #ffffff80!important;transform:translateY(-1px)}
html body .calendar-grid>.calendar-date.selected:is(button,#nm#nm#nm#nm){box-shadow:inset 4px 4px 9px #00000033,inset -3px -3px 8px #ffffffb3,0 0 0 2px #55703f!important;transform:none}
html body .calendar-grid>.calendar-date.filter-match:is(button,#nm#nm#nm#nm){box-shadow:5px 5px 10px #c3bfb5,-5px -5px 10px #ffffff,inset 0 0 0 2px #55703f!important}
@media(max-width:700px){html body .calendar-grid:is(div,#nm#nm#nm#nm){gap:5px!important;padding:4px 2px!important}html body .calendar-grid>.calendar-date:is(button,#nm#nm#nm#nm){border-radius:10px!important;box-shadow:3px 3px 6px #c3bfb5,-3px -3px 6px #ffffff!important}}
/* 10.71 · Quân thấy lịch Tam Tông Miếu mờ và chói: quầng trắng nhòe 10px toả quanh ô, đè lên mép ô ô liu và ô xám than. Ô lịch bỏ quầng trắng, chỉ giữ bóng mảnh một phía, viền 1px rõ nét. */
html body .calendar-grid>.calendar-date.tbl-date-cell:not(.selected):not(.filter-match):is(button,#nm#nm#nm#nm#nm){border:1px solid #ddd6ca!important;box-shadow:0 1px 2px #3a312814,0 2px 6px #3a31280f!important}
html body .calendar-grid>.calendar-date.tbl-date-cell:not(.selected):not(.filter-match):is(button,#nm#nm#nm#nm#nm):hover{box-shadow:0 2px 4px #3a31281a,0 4px 10px #3a312814!important}
/* 9.67 · Quân thấy thao tác trên điện thoại hơi khó: chạm ô nhập, ô chọn, nhãn, mục mở rộng ăn ngay (không chờ, không phóng to khi
   chạm hai lần liền); vẫn phóng to bằng hai ngón được. */
@media(max-width:767px){html body :is(input,select,textarea,label,summary,[role=tab],[role=button]){touch-action:manipulation}}
/* 10.08 · Quân: thẻ "Hôm nay với lá số của bạn" (ui/hom-nay-ban.mjs) đồng bộ nền, bóng nổi mềm với các thẻ trang chủ; giữ ba màu tốt ô liu, xấu đen, trung trắng. */
html body section.hnb,html body .hnb{background:var(--nm-nen)!important;border:0!important;border-radius:24px!important;box-shadow:var(--nm-noi)!important}
html body .hnb :is(input,select){background:var(--nm-nen)!important;border:0!important;border-radius:12px!important;box-shadow:var(--nm-lom-nho)!important}
html body .hnb .trung{background:var(--nm-nen)!important;box-shadow:var(--nm-noi-nho)!important}
/* 10.16 · Quân: mọi ô menu trái cách đều nhau bằng khoảng giữa Thủ công và Lục Hào (12px), ở mọi khổ màn hình.
   Trước mỗi khổ một kiểu: ô trong ngăn Mai Hoa 24px, chỗ nối hai khối 10px, máy tính bảng các ô dưới dính 2px. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-hang,.hs-chips){display:flex!important;flex-direction:column!important;gap:12px!important;padding:0!important;margin:0!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-hang,.hs-chips)>:is(.hs-i,.hs-chip,.hs-k){margin:0!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(.hs-mai,.hs-hang)+:is(.hs-hang,.hs-mai){margin-top:12px!important}
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-mai>.hs-dn{padding:0!important;margin:0!important}
/* 10.15 · Điện thoại lướt khựng: nền cố định (background-attachment:fixed) và lớp kính mờ (backdrop-filter) bắt máy vẽ lại cả màn hình
   ở mỗi khung hình khi cuộn. Trên điện thoại và máy cảm ứng: nền cuộn theo trang, bỏ kính mờ, thay bằng nền gần đặc cùng màu. */
@media (max-width:900px),(hover:none){
 html,html:has(body.has-side),html body{background-attachment:scroll!important}
 html body *,html body *::before,html body *::after{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
 html body.has-side .topbar{background:#fbf9f5f5!important}
 html body #hcqSide{background:#fbf9f5!important}
 html body aside#hcqSide.hcq-side.hcq-side.hcq-side{background-attachment:scroll!important}
}
/* Các khối dài phía dưới trang chủ chỉ dựng khi sắp cuộn tới. */
html body section.hh-them,html body footer.brand-about{content-visibility:auto;contain-intrinsic-size:auto 600px}
/* 10.16 · Chuyển giữa trang chính và khu riêng mờ dần như đổi phương pháp lập quẻ (trình duyệt hỗ trợ thì dùng, không thì thôi). */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.22s}
@media (prefers-reduced-motion:reduce){@view-transition{navigation:none}}
/* 10.17 · Dòng nhập mật khẩu Tụ Bảo Lâu trong menu trái. */
html body :is(aside#hcqSide,#manHinhChinh,#destinyResult) .hs-mk .pw-wrap{display:flex!important;align-items:center;gap:2px;min-width:0;position:relative}
html body :is(aside#hcqSide,#manHinhChinh,#destinyResult) .hs-mk{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center;margin:2px 0 12px}
html body :is(aside#hcqSide,#manHinhChinh,#destinyResult) .hs-mk .pw-toggle{position:static!important;flex:none;height:42px;padding:0 10px;border:0;border-radius:999px;background:transparent;color:#55703f;font:600 12.5px Inter,"Be Vietnam Pro",sans-serif;box-shadow:none;cursor:pointer}
html body :is(aside#hcqSide,#manHinhChinh,#destinyResult) .hs-mk input{width:100%;min-width:0;height:42px;padding:0 14px;border:0;border-radius:999px;background:#f1efe9;box-shadow:inset 3px 3px 6px #d4d1c8,inset -3px -3px 6px #fff;font:500 14px Inter,"Be Vietnam Pro",sans-serif;color:#2b2621}
html body :is(aside#hcqSide,#manHinhChinh,#destinyResult) .hs-mk input:focus{outline:2px solid #55703f;outline-offset:1px}
html body :is(aside#hcqSide,#manHinhChinh,#destinyResult) .hs-mk button[type=submit]{height:42px;padding:0 16px;border:0;border-radius:999px;background:#55703f;color:#fff;font:600 14px Inter,"Be Vietnam Pro",sans-serif;box-shadow:3px 3px 7px #c9c6bd,-3px -3px 7px #fff;cursor:pointer}
html body :is(aside#hcqSide,#manHinhChinh,#destinyResult) .hs-mk button[type=submit]:disabled{opacity:.6}
html body :is(aside#hcqSide,#manHinhChinh,#destinyResult) .hs-mk-tb{grid-column:1/-1;margin:0 6px;font-size:12.5px;color:#8f2614;min-height:0}
html body :is(aside#hcqSide,#manHinhChinh,#destinyResult) .hs-mk-tb:empty{display:none}
/* 10.18 · Ô mật khẩu trên màn hình chính điện thoại; nút Khóa lại, Bản công khai khi đã mở. */
html body #manHinhChinh .hs-mk{margin:0 18px 12px}
html body :is(aside#hcqSide,#manHinhChinh,#destinyResult) .hs-mk-da{display:flex;gap:8px;margin:2px 0 12px}
html body #manHinhChinh .hs-mk-da{margin:0 18px 12px}
html body :is(aside#hcqSide,#manHinhChinh,#destinyResult) .hs-mk-da a{flex:1;display:grid;place-items:center;height:38px;border-radius:999px;background:#f1efe9;box-shadow:3px 3px 7px #d0cdc4,-3px -3px 7px #fff;color:#55703f;font:600 13px Inter,"Be Vietnam Pro",sans-serif;text-decoration:none}
/* 10.23 · Nút Tụ Bảo Lâu ở hàng lập quẻ khi chưa mở khóa: ô mật khẩu ngay trong khung. */
html body #destinyResult .almanac-khoa{max-width:520px;margin:12px auto;padding:18px}
html body #destinyResult .almanac-khoa h2{margin:0 0 6px}
html body #destinyResult .almanac-khoa p{margin:0 0 12px;color:#4a4036}

/* 10.26 · Quân: phóng to lá số mà không vuốt ngang được — khung xem lá số phải cuộn được (rule trên ép overflow:visible). */
html body #destinySheetPreview:is(div,#nm#nm#nm#nm#nm){overflow:auto!important;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y pinch-zoom;max-width:100%}

/* 10.28 · Ô chọn Ngày/Tháng/Năm hẹp: bớt đệm hai bên để chữ "Ngày" không bị cắt thành "Ng". */
html body .nv-chon.nv-chon select.nv-o,html body .nv-chon.nv-chon select{padding-left:10px!important;padding-right:6px!important;text-overflow:clip!important}
/* 10.28 · Khung fieldset (Hoàng Tuyền, Bát Sát…) bỏ viền xám mặc định của trình duyệt, theo kiểu thẻ nổi mềm. */
html body :is(main,#noi-dung,#metaphysicsTools) fieldset:not([class]){border:1px solid #e4dccd!important;border-radius:16px!important;padding:12px 18px 16px!important;margin:16px 0!important;min-width:0;background:transparent}
html body :is(main,#noi-dung,#metaphysicsTools) fieldset:not([class])>legend{padding:0 8px;font:600 15px/1.3 Inter,system-ui,sans-serif;color:#55703f}
/* 10.28 · Quân: vạch nhỏ thừa bên trái ô menu đang chọn (ô đã tô ô liu, không cần vạch). */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side .hs-i[aria-current=page]::before{display:none!important}
/* 10.28 · "Tụ Bảo Lâu · 20 môn" không rớt chữ MÔN xuống dòng. */
html body aside#hcqSide.hcq-side summary.hs-g-khoa>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;letter-spacing:.04em}html body aside#hcqSide.hcq-side summary.hs-g-khoa small{letter-spacing:.02em}
/* 10.29 · Quân: góc nút tab bị cắt vuông. Hàng tab cuộn ngang (overflow) cắt mất bóng nổi mềm của nút ở mép trên, dưới; chừa chỗ cho bóng. */
html body .calendar-view-tabs:is(div,#nm#nm#nm#nm){padding-top:10px!important;padding-bottom:14px!important;padding-left:10px!important;padding-right:10px!important;box-sizing:border-box}
html body [data-nm-cuon]:is([data-nm-cuon],#nm#nm#nm#nm){padding-top:10px!important;padding-bottom:14px!important;padding-left:10px!important;padding-right:10px!important;box-sizing:border-box}
/* 10.30 · bỏ hiệu ứng mờ vào khi đổi môn (Quân vẫn thấy giật) */
/* 10.30 · Che phần lập quẻ khi mở thẳng một môn, hiện lại mềm. */
html.cho-mon :is(main,#noi-dung){opacity:0!important}html.cho-mon-xong :is(main,#noi-dung){transition:opacity .2s ease-out}
/* 10.31 · Quân: chọn môn Tụ Bảo Lâu không tô ô liu (nền xám, chữ trắng nên còn mất chữ). Mọi ô menu đang chọn đều ô liu. */
html body aside#hcqSide.hcq-side.hcq-side.hcq-side :is(a.hs-i,a.hs-k,.hs-chip)[aria-current=page]:is(a,#nm#nm#nm#nm#nm){background:linear-gradient(135deg,#7d8640,#4f5a2c)!important;color:#fff!important;opacity:1!important}
/* 10.32 · Đo trên máy giả chậm 4 lần: mỗi lần dựng lại bố cục mất 0,3 giây vì trang có gần 9.500 thẻ (riêng phần Tụ Bảo Lâu 6.000). Các khối nằm ngoài màn hình để trình duyệt bỏ qua cho tới khi cuộn tới (content-visibility). Trừ khối chứa La Kinh vệ tinh (toàn màn hình cần thoát khỏi khung). */
html body :is(#destinyResult,#metaphysicsTools,#destinyTools,main)>:is(section,details,article,div,footer):not(:first-child):not(:has(.sat-compass)):not(.mhc){content-visibility:auto;contain-intrinsic-size:auto 600px}

/* 10.40 · Quân: form lập lá số có lúc còn nền kem, tiêu đề xanh, khung ngày giờ xanh nhạt (module dò nền chạy khi form còn ẩn). Đặt màu sẵn cho cả ba môn. */
html body #destinyForm:is(form,#nm#nm#nm#nm){background:#e9e8e4!important;border-color:transparent!important}
html body #destinyForm:is(form,#nm#nm#nm#nm) :is(#destinyTitle,.hss,#birthWheel){background:#e9e8e4!important;border:1px solid transparent!important;border-radius:20px!important;box-shadow:8px 8px 18px #c8c4ba,-8px -8px 18px #fff!important}
html body #destinyForm:is(form,#nm#nm#nm#nm) .hss button.secondary{background:#e9e8e4!important;border-color:transparent!important;box-shadow:5px 5px 11px #c8c4ba,-5px -5px 11px #fff!important}
/* 10.40 · Ảnh lá số các môn cùng bo góc và bóng; nút đang chọn trên thanh lá số tô ô liu. */
html body :is(#destinySheetPreview,.hl-anh) img:is(img,#nm#nm#nm#nm#nm){border-radius:16px!important;box-shadow:8px 8px 18px #c8c4ba,-8px -8px 18px #fff!important}
html body .sheet-zoom-bar button[aria-pressed=true]:is(button,#nm#nm#nm#nm#nm){background:linear-gradient(135deg,#7d8640,#4f5a2c)!important;color:#fff!important}

