
  :root{
    --red-deep:#7a1616;   /* theo file mẫu xinxam-thiet-ke-giao-dien.html */
    --red:#9c1f1f;
    --red-light:#b93636;  /* mới — dùng cho gradient nút "Gieo quẻ" trên nền sáng */
    --gold:#d4af37;
    --gold-light:#f1d98b;
    --gold-dark:#a5811f;  /* mới — vế đậm của gradient vàng (nút, icon) */
    --cream:#fbf3e1;
    --cream-2:#f6e9c9;    /* mới — nền khối phụ (panel nhấn nhẹ, chữ trên nền tối) */
    --wood:#3b2314;       /* mới — nâu gỗ, dùng cho vài chữ tiêu đề đậm nếu cần */
    --ink:#2a1a12;
    --paper:#fffaf0;      /* nền thẻ/card — kem nhạt như bản mẫu (thay vì trắng tinh) */
    --line:#e6d6a8;       /* viền vàng nhạt như bản mẫu (thay vì xám) */
    --muted:#6b5541;      /* = --ink-soft trong bản mẫu, dùng cho chữ phụ */
  }
  *{box-sizing:border-box;margin:0;padding:0;}
  body{
    font-family:'Be Vietnam Pro',sans-serif;
    background:var(--cream);
    color:var(--ink);
    line-height:1.6;
  }
  h1,h2,h3,.serif{font-family:'Noto Serif',serif;}
  a{color:inherit;text-decoration:none;}
  img{max-width:100%;display:block;}

  /* ---------- Header ---------- */
  header{
    background:linear-gradient(180deg,var(--red-deep),var(--red));
    color:var(--gold-light);
    position:sticky;top:0;z-index:50;
    border-bottom:3px solid var(--gold);
    box-shadow:0 4px 16px rgba(0,0,0,.25);
  }
  .nav-wrap{
    max-width:1100px;margin:0 auto;padding:14px 20px;
    display:flex;align-items:center;justify-content:space-between;
  }
  .logo{
    display:flex;align-items:center;gap:10px;
    font-family:'Noto Serif',serif;font-weight:700;font-size:22px;color:var(--gold-light);
  }
  .logo .mark{
    width:36px;height:36px;border-radius:50%;
    background:radial-gradient(circle at 35% 30%,var(--gold-light),var(--gold-dark) 70%);
    display:flex;align-items:center;justify-content:center;
    font-size:18px;color:var(--red-deep);font-weight:700;
  }
  nav ul{display:flex;gap:26px;list-style:none;}
  nav a{font-size:15px;font-weight:500;opacity:.9;transition:opacity .2s,color .2s;}
  nav a:hover{opacity:1;color:#fff;text-decoration:underline;text-underline-offset:4px;}
  .nav-toggle{display:none;background:none;border:none;color:var(--gold-light);font-size:24px;cursor:pointer;}
  .header-cta{
    background:linear-gradient(180deg,var(--gold-light),var(--gold-dark));
    color:var(--red-deep);font-weight:700;font-size:13.5px;
    padding:10px 20px;border-radius:20px;white-space:nowrap;
    box-shadow:0 3px 0 #7a5c10;transition:transform .1s;
  }
  .header-cta:hover{transform:translateY(1px);box-shadow:0 2px 0 #7a5c10;text-decoration:none;}

  /* ---------- Hero ---------- */
  .hero{
    position:relative;
    padding:70px 20px 60px;
    text-align:center;
    background:
      radial-gradient(circle at 15% 20%,rgba(212,175,55,.18),transparent 40%),
      radial-gradient(circle at 85% 80%,rgba(212,175,55,.15),transparent 45%),
      linear-gradient(160deg,var(--red-deep) 0%,var(--red) 55%,var(--red-light) 100%);
    overflow:hidden;
  }
  .hero::before,.hero::after{
    content:"";position:absolute;width:180px;height:180px;border-radius:50%;
    border:3px solid rgba(212,175,55,.35);pointer-events:none;top:-40px;
  }
  .hero::before{left:-60px;}
  .hero::after{right:-60px;top:auto;bottom:-70px;}
  .hero-tag{
    display:inline-block;padding:6px 16px;border:1px solid var(--gold);
    border-radius:20px;color:var(--gold-light);font-size:13px;letter-spacing:1px;
    margin-bottom:18px;background:rgba(0,0,0,.18);position:relative;z-index:1;
  }
  .hero h1{
    font-size:clamp(28px,4.6vw,44px);color:#fff8e6;margin-bottom:14px;font-weight:700;
    text-shadow:0 2px 6px rgba(0,0,0,.3);
    position:relative;z-index:1;
  }
  .hero h1 .accent{color:var(--gold-light);}
  .hero p.lead{
    max-width:560px;margin:0 auto 34px;color:var(--cream-2);opacity:.9;font-size:16px;
    position:relative;z-index:1;
  }
  .hero-stats{
    display:flex;justify-content:center;gap:48px;flex-wrap:wrap;margin-top:6px;
    position:relative;z-index:1;
  }
  .hero-stats .stat{text-align:center;}
  .hero-stats .stat .num{
    font-family:'Noto Serif',serif;font-weight:700;font-size:26px;color:var(--gold-light);
  }
  .hero-stats .stat .label{font-size:12.5px;color:var(--cream-2);opacity:.8;margin-top:2px;}

  /* ---------- Ống xăm ---------- */
  .xam-stage{
    max-width:340px;margin:0 auto;position:relative;height:230px;
  }
  .tube{
    width:120px;height:170px;margin:0 auto;position:relative;
    background:linear-gradient(180deg,#8a5a2b,#6b3f1c);
    border-radius:14px 14px 26px 26px;
    box-shadow:inset -8px 0 16px rgba(0,0,0,.35), 0 10px 20px rgba(0,0,0,.25);
    border:2px solid #4d2c12;
  }
  .tube::before{
    content:"";position:absolute;top:-10px;left:-4px;right:-4px;height:22px;
    background:linear-gradient(180deg,#a9743b,#7a4c22);
    border-radius:12px 12px 0 0;border:2px solid #4d2c12;border-bottom:none;
  }
  .stick{
    position:absolute;bottom:20px;left:50%;
    width:6px;height:130px;background:linear-gradient(180deg,#f0d99a,#c99a3f);
    border-radius:3px;transform-origin:bottom center;
  }
  .tube.shaking{animation:shake .5s infinite;}
  @keyframes shake{
    0%,100%{transform:rotate(-4deg);}
    50%{transform:rotate(4deg);}
  }
  .popped-stick{
    position:absolute;bottom:180px;left:50%;width:26px;height:130px;
    background:linear-gradient(180deg,var(--gold-light),var(--gold));
    border-radius:4px;
    transform:translate(-50%,0) rotate(0deg);
    opacity:0;pointer-events:none;
    box-shadow:0 3px 8px rgba(0,0,0,.3);
  }
  .popped-stick #stickNum{
    position:absolute;top:8px;left:50%;transform:translateX(-50%);
    width:18px;height:18px;border-radius:3px;
    background:var(--red-deep);color:var(--gold-light);
    display:flex;align-items:center;justify-content:center;
    font-family:'Noto Serif',serif;font-size:10px;font-weight:700;
  }
  .popped-stick.fly{
    animation:popfly 1s ease-out forwards;
  }
  @keyframes popfly{
    0%{opacity:1;transform:translate(-50%,0) rotate(0deg) translateY(0);}
    100%{opacity:1;transform:translate(-50%,-90px) rotate(-8deg) translateY(-40px);}
  }

  .draw-btn{
    margin-top:22px;
    background:linear-gradient(180deg,var(--red-light),var(--red-deep));
    color:#fff8e6;border:1px solid var(--gold);
    padding:14px 38px;border-radius:30px;font-size:16px;font-weight:700;
    cursor:pointer;letter-spacing:.3px;
    box-shadow:0 3px 0 #4d0f0f;
    transition:transform .1s;
  }
  .draw-btn:hover{transform:translateY(1px);box-shadow:0 2px 0 #4d0f0f;}
  .draw-btn:disabled{opacity:.45;cursor:not-allowed;box-shadow:none;transform:none;}

  /* Trong hero (nền đỏ đậm), nút chính đổi sang gradient vàng để tương phản
     rõ, đúng như file thiết kế mẫu (.btn-primary). */
  .hero .home-cta{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-bottom:30px;position:relative;z-index:1;}
  .hero .draw-btn{
    background:linear-gradient(180deg,var(--gold-light),var(--gold-dark));
    color:var(--red-deep);border:none;box-shadow:0 4px 0 #7a5c10;
  }
  .hero .draw-btn:hover{box-shadow:0 3px 0 #7a5c10;}
  .hero-btn-outline{
    display:inline-flex;align-items:center;justify-content:center;
    margin-top:22px;padding:13px 30px;border-radius:30px;font-size:15px;font-weight:600;
    color:var(--gold-light);border:1.5px solid var(--gold-light);background:transparent;
    transition:background .15s;
  }
  .hero-btn-outline:hover{background:rgba(255,255,255,.1);}

  .bo-select{
    display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-bottom:26px;
  }
  .bo-chip{
    padding:8px 16px;border-radius:20px;border:1px solid var(--line);
    background:var(--paper);font-size:13px;cursor:pointer;color:var(--muted);transition:.2s;
  }
  .bo-chip.active{background:var(--red-deep);color:#fff;border-color:var(--red-deep);}

  /* ---------- Khấn nguyện ---------- */
  .khan-panel{
    max-width:480px;margin:0 auto 28px;text-align:left;
    background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:18px 20px;
  }
  .khan-label{font-size:12.5px;color:var(--red-deep);font-weight:600;margin-bottom:10px;letter-spacing:.3px;}
  .khan-row{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:10px;}
  .khan-row input, .khan-row select, .khan-other{
    flex:1;min-width:160px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;
    font-family:'Be Vietnam Pro',sans-serif;font-size:13.5px;background:var(--cream);color:var(--ink);
  }
  .khan-other{width:100%;display:none;margin-bottom:10px;}
  .loi-khan-box{
    display:none;margin-top:6px;background:var(--cream);border:1px solid var(--line);
    border-radius:10px;padding:14px 16px;
  }
  .loi-khan-label{font-size:12px;color:var(--red-deep);font-weight:600;margin-bottom:6px;}
  .loi-khan-box p{font-size:13.5px;color:var(--ink);font-style:italic;line-height:1.7;margin-bottom:10px;}
  .mini-btn{
    font-size:12.5px;padding:6px 12px;border-radius:8px;border:1px solid var(--line);
    background:var(--paper);cursor:pointer;color:var(--muted);
  }
  .mini-btn:hover{background:var(--gold-light);}

  .suggest-box{display:none;margin-bottom:12px;}
  .suggest-label{font-size:12px;color:var(--muted);margin-bottom:8px;}
  .suggest-chips{display:flex;gap:8px;flex-wrap:wrap;}
  .suggest-chip{
    padding:6px 12px;border-radius:16px;font-size:12.5px;cursor:pointer;
    background:var(--gold-light);
    color:var(--red-deep);font-weight:600;border:1px solid var(--line);transition:.15s;
  }
  .suggest-chip:hover{transform:translateY(-1px);}
  .suggest-chip.picked{background:var(--red-deep);color:#fff;}

  /* ---------- Result Card ---------- */
  .result-wrap{max-width:640px;margin:36px auto 0;min-height:10px;}
  .result-card{
    background:var(--paper);
    border:2px solid var(--gold);
    border-radius:16px;
    text-align:left;
    box-shadow:0 10px 30px rgba(122,22,22,.08);
    display:none;
    position:relative;
    overflow:hidden;
  }
  .result-card.show{display:block;animation:fadein .5s ease;}
  @keyframes fadein{from{opacity:0;transform:translateY(14px);}to{opacity:1;transform:translateY(0);}}
  .share-capture{position:relative;overflow:hidden;padding:32px 32px 22px;}
  .watermark-grid{
    position:absolute;inset:0;display:grid;
    grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,1fr);
    pointer-events:none;z-index:0;
  }
  .watermark-grid span{
    display:flex;align-items:center;justify-content:center;
    transform:rotate(-24deg);color:var(--ink);opacity:.04;
    font-size:13px;font-weight:700;letter-spacing:1px;white-space:nowrap;
  }
  .share-content{position:relative;z-index:1;}
  .share-brand{
    font-family:'Noto Serif',serif;font-weight:700;font-size:15px;
    color:var(--red-deep);margin-bottom:16px;letter-spacing:.3px;
    display:flex;align-items:center;gap:6px;
  }
  .share-brand .accent{color:var(--gold);}
  .brand-icon{width:20px;height:20px;border-radius:5px;vertical-align:middle;display:inline-block;}
  .qr-modal-title{display:flex;align-items:center;justify-content:center;gap:6px;}
  .share-footer{
    display:flex;justify-content:space-between;align-items:center;gap:12px;
    margin-top:22px;padding-top:14px;border-top:1px dashed var(--line);
    font-size:12px;color:var(--muted);letter-spacing:.2px;text-align:left;
  }
  .share-footer .accent{color:var(--red-deep);font-weight:700;}
  .sf-qr{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:9px;color:var(--muted);flex-shrink:0;}
  .sf-qr #qrEmbed{width:52px;height:52px;background:#fff;border:1px solid var(--line);border-radius:6px;padding:2px;}
  .sf-qr #qrEmbed img, .sf-qr #qrEmbed canvas{display:block;width:100%;height:100%;}

  /* ---------- Nút & modal chia sẻ QR ---------- */
  .qr-fab{
    position:fixed;bottom:22px;right:22px;z-index:210;
    width:52px;height:52px;border-radius:50%;
    background:var(--red-deep);color:#fff;border:none;
    font-weight:700;font-size:11px;letter-spacing:.3px;cursor:pointer;
    box-shadow:0 6px 16px rgba(33,28,23,.22);
    display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1;
  }
  .qr-fab span{font-size:16px;}
  .qr-modal{
    display:none;position:fixed;inset:0;z-index:300;
    background:rgba(20,10,6,.6);align-items:center;justify-content:center;padding:20px;
  }
  .qr-modal.show{display:flex;}
  .qr-modal-card{
    position:relative;background:var(--paper);border:1px solid var(--line);border-radius:16px;
    padding:28px 24px 24px;max-width:300px;width:100%;text-align:center;
    box-shadow:0 20px 50px rgba(0,0,0,.25);
  }
  .qr-modal-close{
    position:absolute;top:10px;right:12px;background:none;border:none;
    font-size:18px;cursor:pointer;color:var(--muted);
  }
  .qr-modal-title{font-family:'Noto Serif',serif;color:var(--red-deep);font-weight:700;font-size:16px;margin-bottom:16px;}
  .qr-modal-code{display:flex;justify-content:center;margin-bottom:14px;}
  .qr-modal-code img, .qr-modal-code canvas{border-radius:8px;border:1px solid var(--line);}
  .qr-modal-url{font-size:11px;color:var(--muted);word-break:break-all;margin-bottom:14px;}
  .result-head{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:10px;margin-bottom:10px;}
  .result-head .num{font-family:'Noto Serif',serif;font-size:22px;color:var(--ink);font-weight:700;}
  .quality-badge{
    padding:5px 14px;border-radius:16px;font-size:13px;font-weight:600;color:#fff;
  }
  .q-dai-cat{background:#2f7d43;}
  .q-cat{background:#4a8fc9;}
  .q-trung-binh{background:#c98a2f;}
  .q-hxa{background:#9c1f2e;}
  .poem{
    font-family:'Noto Serif',serif;font-style:italic;color:var(--ink);
    font-size:17px;line-height:1.9;border-left:3px solid var(--gold);
    padding-left:16px;margin:16px 0 20px;
  }
  .focus-callout{
    background:var(--gold-light);border:1px solid var(--line);
    border-radius:12px;padding:16px 18px;margin-bottom:18px;display:none;
  }
  .focus-callout .fc-label{font-size:12px;color:var(--red-deep);font-weight:700;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px;}
  .focus-callout p{font-size:14.5px;color:var(--ink);}
  .tong-quan{
    font-size:14px;color:var(--ink);background:var(--paper);border:1px solid var(--line);
    border-radius:10px;padding:14px 16px;margin-bottom:18px;
  }
  .tong-quan h4{font-size:13px;color:var(--red-deep);text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px;}
  .loi-khuyen{font-size:13.5px;color:var(--muted);margin-bottom:18px;padding-left:14px;border-left:3px solid var(--gold);}
  .interp-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
  .interp-item{border-radius:8px;padding:4px;}
  .interp-item h4{font-size:13px;color:var(--red-deep);text-transform:uppercase;letter-spacing:.5px;margin-bottom:4px;}
  .interp-item p{font-size:14px;color:var(--ink);}
  .interp-item.matched{background:rgba(176,141,87,.12);outline:1px solid var(--gold);}
  .interp-item.matched h4::after{content:" ★";}
  .result-note{
    margin:8px 32px 22px;font-size:12.5px;color:var(--muted);border-top:1px dashed var(--line);padding-top:12px;
  }
  .result-teaser{font-size:13.5px;color:var(--muted);margin-bottom:4px;}
  .result-actions{display:flex;gap:10px;margin:16px 32px 0;flex-wrap:wrap;}
  .result-actions button{
    font-size:13px;padding:8px 14px;border-radius:8px;border:1px solid var(--line);
    background:var(--paper);cursor:pointer;color:var(--muted);
  }
  .result-actions button.primary-action{
    background:var(--red-deep);color:#fff;border-color:var(--red-deep);font-weight:600;
  }

  /* ---------- Trang riêng: Diễn giải chi tiết ---------- */
  .detail-page{
    display:none;position:fixed;inset:0;z-index:200;
    background:var(--cream);overflow-y:auto;
  }
  .detail-page.show{display:block;animation:fadein .3s ease;}
  .detail-header{
    position:sticky;top:0;z-index:5;
    background:var(--paper);
    color:var(--ink);padding:16px 20px;
    display:flex;align-items:center;gap:16px;
    border-bottom:1px solid var(--line);
    box-shadow:0 1px 2px rgba(0,0,0,.03);
  }
  .back-btn{
    background:var(--cream);border:1px solid var(--line);color:var(--ink);
    padding:8px 14px;border-radius:8px;font-size:13px;cursor:pointer;white-space:nowrap;
  }
  .back-btn:hover{background:var(--gold-light);}
  .detail-header-title{font-family:'Noto Serif',serif;font-size:17px;}
  .detail-body{max-width:680px;margin:32px auto 60px;padding:0 20px;text-align:left;}
  .detail-top{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:10px;margin-bottom:6px;}
  .detail-top .num{font-family:'Noto Serif',serif;font-size:24px;color:var(--ink);font-weight:700;}
  .que-ten{font-family:'Noto Serif',serif;font-style:italic;color:var(--gold);font-size:14.5px;margin-bottom:2px;}
  .mo-rong{
    background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:14px 16px;margin-bottom:16px;
  }
  .mo-rong h4{font-size:13px;color:var(--red-deep);text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px;}
  .mo-rong p{font-size:13.5px;color:var(--ink);line-height:1.8;}
  .tich-co-box{margin-bottom:18px;}
  .tich-co-content{
    display:none;margin-top:12px;background:var(--gold-light);border:1px solid var(--line);
    border-radius:10px;padding:16px 18px;
  }
  .tich-co-content.open{display:block;}
  .tich-co-content h4{font-family:'Noto Serif',serif;font-size:15px;color:var(--red-deep);margin-bottom:8px;}
  .tich-co-content p{font-size:13.5px;color:var(--ink);line-height:1.85;margin-bottom:10px;text-align:justify;}

  /* ---------- Sections ---------- */
  section{padding:64px 20px;}
  .section-inner{max-width:1100px;margin:0 auto;}
  .section-title{text-align:center;margin-bottom:8px;color:var(--ink);font-size:28px;font-weight:700;}
  .section-sub{text-align:center;color:var(--muted);margin-bottom:40px;font-size:14px;}

  .bo-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:22px;}
  .bo-card{
    background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:24px;
    text-align:center;transition:.2s;
  }
  .bo-card:hover{transform:translateY(-4px);box-shadow:0 10px 24px rgba(33,28,23,.07);border-color:var(--gold);}
  .bo-card .icon{
    width:56px;height:56px;border-radius:50%;margin:0 auto 14px;
    background:linear-gradient(180deg,var(--gold-light),var(--gold-dark));
    display:flex;align-items:center;justify-content:center;font-size:26px;
  }
  .bo-card h3{font-size:17px;color:var(--ink);margin-bottom:6px;}
  .bo-card p{font-size:13px;color:var(--muted);}

  .how-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:24px;}
  .step{background:var(--paper);border-radius:14px;padding:26px;border:1px solid var(--line);}
  .step .n{
    display:inline-flex;align-items:center;justify-content:center;
    width:34px;height:34px;border-radius:50%;background:var(--red-deep);color:var(--gold-light);
    font-weight:700;margin-bottom:12px;font-family:'Noto Serif',serif;
  }
  .step h4{font-size:15px;color:var(--ink);margin-bottom:6px;}
  .step p{font-size:13.5px;color:var(--muted);}

  .history-list{max-width:640px;margin:0 auto;display:flex;flex-direction:column;gap:10px;}
  .history-item{
    background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:12px 16px;
    display:flex;justify-content:space-between;align-items:center;font-size:14px;
  }
  .history-empty{text-align:center;color:var(--muted);font-size:14px;}

  .about-box{
    max-width:760px;margin:0 auto;background:var(--paper);border:1px solid var(--line);
    border-radius:16px;padding:32px;color:var(--ink);font-size:14.5px;
  }
  .about-box p{margin-bottom:12px;}
  .disclaimer{
    margin-top:16px;padding:14px 16px;background:var(--gold-light);border-radius:10px;
    font-size:12.5px;color:var(--muted);border-left:3px solid var(--gold);
  }

  footer{
    background:var(--red-deep);color:var(--cream-2);padding:36px 20px;text-align:center;
    border-top:1px solid rgba(212,175,55,.25);
  }
  footer .fnav{display:flex;justify-content:center;gap:22px;margin-bottom:14px;flex-wrap:wrap;font-size:13px;}
  footer .fnav a{opacity:.85;} footer .fnav a:hover{opacity:1;text-decoration:underline;}
  footer small{opacity:.7;font-size:12px;}

  /* ---------- Responsive: mobile ---------- */
  @media(max-width:720px){
    .nav-wrap{padding:12px 16px;position:relative;}
    .logo{font-size:19px;}
    .logo .mark{width:32px;height:32px;font-size:16px;}
    .nav-toggle{display:block;}
    .header-cta{display:none;}
    nav{width:auto;}
    nav ul{
      display:none;flex-direction:column;gap:0;
      position:absolute;top:100%;left:0;right:0;
      background:var(--paper);padding:6px 16px;
      border-bottom:1px solid var(--line);
      box-shadow:0 8px 20px rgba(33,28,23,.15);
    }
    nav ul.open{display:flex;}
    nav li{border-bottom:1px solid var(--line);}
    nav li:last-child{border-bottom:none;}
    nav ul a{color:var(--ink);opacity:1;}
    nav ul a:hover{color:var(--red-deep);}
    nav a{display:block;padding:13px 4px;font-size:15px;}

    .hero{padding:40px 16px 56px;}
    .hero-tag{font-size:11.5px;padding:5px 12px;}
    .hero h1{font-size:26px;line-height:1.3;}
    .hero p.lead{font-size:14.5px;margin-bottom:26px;}

    .xam-stage{max-width:100%;height:210px;}
    .tube{width:100px;height:150px;}
    .draw-btn{width:100%;max-width:340px;padding:14px 20px;font-size:15px;}

    .khan-panel{padding:14px 16px;max-width:100%;}
    .khan-row select{font-size:14px;padding:11px 12px;}
    .suggest-chip{font-size:12px;padding:6px 10px;}

    .result-wrap{max-width:100%;margin-top:26px;}
    .share-capture{padding:22px 18px 16px;}
    .share-brand{font-size:14px;margin-bottom:12px;}
    .result-head .num{font-size:19px;}
    .quality-badge{font-size:12px;padding:4px 12px;}
    .poem{font-size:15px;padding-left:12px;margin:12px 0 16px;}
    .result-teaser{font-size:13px;}
    .result-note{margin:8px 18px 18px;font-size:12px;}
    .result-actions{margin:14px 18px 0;flex-direction:column;}
    .result-actions button{width:100%;text-align:center;padding:11px 14px;font-size:13.5px;}

    .detail-header{padding:12px 14px;gap:10px;}
    .detail-header-title{font-size:14.5px;}
    .back-btn{padding:7px 11px;font-size:12.5px;flex-shrink:0;}
    .detail-body{padding:0 16px;margin:22px auto 50px;}
    .detail-top .num{font-size:21px;}
    .mo-rong,.tich-co-content{padding:12px 14px;}
    .interp-grid{grid-template-columns:1fr;}

    section{padding:44px 16px;}
    .section-title{font-size:22px;}
    .section-sub{font-size:13px;margin-bottom:28px;}
    .bo-cards{grid-template-columns:repeat(2,1fr);gap:12px;}
    .bo-card{padding:16px 12px;}
    .bo-card .icon{width:44px;height:44px;font-size:20px;margin-bottom:10px;}
    .bo-card h3{font-size:14px;}
    .bo-card p{font-size:12px;}

    .how-steps{grid-template-columns:1fr;gap:14px;}
    .step{padding:18px;}

    .history-item{flex-wrap:wrap;gap:4px;font-size:13px;}
    .about-box{padding:20px;font-size:13.5px;}
    footer{padding:28px 16px;}
    footer .fnav{gap:14px;font-size:12.5px;}
  }

  @media(max-width:720px){
    .share-footer{flex-direction:column;align-items:center;text-align:center;gap:10px;}
    .sf-qr{flex-direction:row;gap:8px;}
    .qr-fab{width:46px;height:46px;font-size:9.5px;bottom:16px;right:16px;}
    .qr-fab span{font-size:14px;}
    .qr-modal-card{padding:22px 18px 18px;max-width:260px;}
    .other-bo-chips a{font-size:11.5px;padding:6px 11px;}
    .home-cta{margin-top:4px;}
  }


  /* ---------- Quảng cáo ---------- */
  .ad-slot{max-width:1100px;margin:0 auto;padding:0 20px 34px;text-align:center;}
  .ad-slot .ad-label{
    max-width:728px;margin:0 auto 6px;text-align:left;
    font-size:10px;letter-spacing:1.2px;text-transform:uppercase;color:var(--muted);
  }
  .ad-slot-box{
    max-width:728px;margin:0 auto;min-height:90px;
    background:var(--cream);
    border:1px dashed var(--line);border-radius:10px;
    display:flex;align-items:center;justify-content:center;gap:8px;
    color:var(--muted);font-size:13px;font-weight:600;
  }

  .ad-interstitial{
    display:none;position:fixed;inset:0;z-index:400;
    background:rgba(20,10,6,.75);align-items:center;justify-content:center;padding:20px;
  }
  .ad-interstitial.show{display:flex;}
  .ad-card{
    background:var(--paper);border:1px solid var(--line);border-radius:16px;
    padding:22px 22px 18px;max-width:340px;width:100%;text-align:center;
    box-shadow:0 20px 50px rgba(0,0,0,.25);
  }
  .ad-label{font-size:10.5px;letter-spacing:1.2px;text-transform:uppercase;color:var(--muted);margin-bottom:10px;text-align:left;}
  .ad-creative{margin-bottom:14px;}
  .ad-placeholder{
    background:var(--cream);
    border:1px dashed var(--line);border-radius:10px;padding:32px 12px;color:var(--muted);
  }
  .ad-ph-icon{font-size:28px;margin-bottom:8px;}
  .ad-ph-text{font-size:12.5px;font-weight:600;}
  .ad-message{font-size:13.5px;color:var(--ink);margin-bottom:12px;}
  .ad-progress{height:6px;background:var(--line);border-radius:4px;overflow:hidden;margin-bottom:8px;}
  .ad-progress-bar{height:100%;width:0%;background:var(--red-deep);transition:width .1s linear;}
  .ad-count{font-size:11px;color:var(--muted);}

  @media(max-width:720px){
    .ad-slot-box{min-height:72px;font-size:12px;}
    .ad-card{padding:18px 16px 16px;max-width:280px;}
    .ad-placeholder{padding:24px 10px;}
  }

  @media(max-width:380px){
    .bo-cards{grid-template-columns:1fr;}
    .hero h1{font-size:23px;}
    .khan-row select{min-width:0;}
  }

  /* ---------- Bổ sung cho cấu trúc nhiều trang ---------- */
  .suggest-chip.picked{cursor:default;}
  .breadcrumb{font-size:12.5px;color:var(--muted);max-width:1100px;margin:14px auto 0;padding:0 20px;}
  .breadcrumb a{color:var(--red-deep);}
  .breadcrumb a:hover{text-decoration:underline;}
  .bo-intro{
    max-width:640px;margin:0 auto 30px;text-align:left;color:var(--ink);font-size:14.5px;
    background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:18px 20px;
    display:flex;gap:14px;align-items:flex-start;
  }
  .bo-intro .bi-icon{font-size:30px;line-height:1;flex-shrink:0;}
  .bo-intro .bi-text p{margin:0;}
  .bo-intro .bi-text .bi-than{font-family:'Noto Serif',serif;color:var(--red-deep);font-weight:700;font-size:14.5px;margin-bottom:4px;}
  .other-bo{max-width:1100px;margin:0 auto;padding:0 20px;}
  .other-bo-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;}
  .other-bo-chips a{
    padding:7px 14px;border-radius:16px;border:1px solid var(--line);background:var(--paper);
    font-size:12.5px;color:var(--muted);transition:.15s;
  }
  .other-bo-chips a:hover{background:var(--red-deep);color:#fff;border-color:var(--red-deep);}
  .history-actions{text-align:center;margin-top:14px;}
  .history-actions button{
    font-size:12.5px;padding:7px 14px;border-radius:8px;border:1px solid var(--line);
    background:var(--paper);cursor:pointer;color:var(--red-deep);
  }
  .home-cta{text-align:center;margin-top:8px;}

  @media(max-width:720px){
    .bo-intro{flex-direction:column;padding:16px;}
    .breadcrumb{padding:0 16px;font-size:11.5px;}
  }

/* ---------------- Lịch âm / Ngày tốt xấu (2.3.0) ---------------- */
.xinxam-lunar-box, .xinxam-lunar-cal {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 20px 22px;
	margin: 24px 0;
	max-width: 640px;
}
.xinxam-lunar-title { margin: 0 0 14px; font-size: 1.15rem; color: var(--red-deep); }
.xinxam-lunar-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.xinxam-lunar-form label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: 4px; }
.xinxam-lunar-form input { width: 84px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.xinxam-lunar-form button {
	background: var(--red-deep); color: #fff; border: none; border-radius: 6px;
	padding: 8px 16px; cursor: pointer; font-weight: 600;
}
.xinxam-lunar-form button:hover { background: var(--red); }
.xinxam-lunar-result > div { margin: 6px 0; }
.xinxam-lunar-truc { padding: 10px 12px; border-radius: 8px; margin-top: 10px; }
.xinxam-lunar-truc.is-tot { background: #eaf6ea; color: #256b25; }
.xinxam-lunar-truc.is-xau { background: #fbeaea; color: #9a2626; }
.xinxam-lunar-y-nghia { margin: 6px 0 0; font-size: .88rem; opacity: .85; }
.xinxam-lunar-note { font-size: .78rem; color: var(--muted); margin-top: 14px; }

.xinxam-lunar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}
.xinxam-lunar-grid-head { text-align: center; font-weight: 600; font-size: .78rem; color: var(--muted); padding: 4px 0; }
.xinxam-lunar-grid-empty { }
.xinxam-lunar-day {
	border-radius: 6px;
	padding: 6px 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	font-size: .72rem;
	line-height: 1.25;
	cursor: default;
}
.xinxam-lunar-day .d { font-size: 1rem; font-weight: 700; }
.xinxam-lunar-day .al { opacity: .7; }
.xinxam-lunar-day .tr { opacity: .8; }
.xinxam-lunar-day.is-tot { background: #eaf6ea; color: #256b25; }
.xinxam-lunar-day.is-xau { background: #fbeaea; color: #9a2626; }

@media (max-width: 480px) {
	.xinxam-lunar-box, .xinxam-lunar-cal { padding: 14px; }
	.xinxam-lunar-form input { width: 64px; }
}

/* ---------------- Mệnh theo năm sinh (2.3.0) ---------------- */
.xinxam-menh-box {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 20px 22px;
	margin: 24px 0;
	max-width: 640px;
}
.xinxam-menh-result > div { margin: 8px 0; }
.xinxam-menh-mota { font-size: .92rem; line-height: 1.6; color: var(--ink); }
.xinxam-menh-quanhe { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); margin-top: 10px; }
.xinxam-menh-quanhe .sinh strong { color: #256b25; }
.xinxam-menh-quanhe .khac strong { color: #9a2626; }

/* ---------------- Số phong thủy 00-99 (2.5.0) ---------------- */
.xinxam-sopt-box {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 20px 22px;
	margin: 24px 0;
	max-width: 680px;
}
.xinxam-sopt-tong { font-size: .95rem; margin-bottom: 14px; color: var(--ink); }
.xinxam-sopt-pairs { display: flex; flex-direction: column; gap: 12px; }
.xinxam-sopt-pair { border-left: 3px solid var(--gold); padding: 6px 12px; background: var(--cream); border-radius: 0 8px 8px 0; }
.xinxam-sopt-pair-head { font-size: .95rem; margin-bottom: 4px; }
.xinxam-sopt-pair-head .pos { font-size: .75rem; color: var(--muted); margin-left: 6px; }
.xinxam-sopt-y-nghia { margin: 2px 0; font-size: .88rem; color: var(--ink); }
.xinxam-sopt-diem-rieng { margin: 4px 0 0; font-size: .82rem; color: var(--red-deep); font-style: italic; }

/* ---------------- Giải mã giấc mơ (2.6.0) ---------------- */
.xinxam-giaimong-box {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 20px 22px;
	margin: 24px 0;
	max-width: 700px;
}
.xinxam-giaimong-box .xinxam-lunar-form input[type="text"] { width: 220px; }
.xinxam-giaimong-results { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.xinxam-giaimong-item { border-left: 3px solid var(--gold); padding: 8px 14px; background: var(--cream); border-radius: 0 8px 8px 0; }
.xinxam-giaimong-item-head { margin-bottom: 4px; }
.xinxam-giaimong-item-head .cat { font-size: .72rem; color: var(--muted); margin-left: 8px; border: 1px solid var(--gold); border-radius: 999px; padding: 1px 8px; }
.xinxam-giaimong-item p { margin: 4px 0 0; font-size: .9rem; line-height: 1.6; color: var(--ink); }
.xinxam-giaimong-goiy { margin-top: 18px; font-size: .82rem; color: var(--muted); }
.xinxam-giaimong-goiy-title { font-weight: 600; margin-bottom: 6px; }
.xinxam-giaimong-cat { margin: 4px 0; }
.xinxam-giaimong-cat a { color: var(--red-deep); text-decoration: none; }
.xinxam-giaimong-cat a:hover { text-decoration: underline; }

/* ---------------- Bộ đếm lượt xin quẻ (2.7.0) ---------------- */
.xinxam-luot-xin {
	text-align: center;
	font-size: .9rem;
	color: var(--red-deep);
	background: var(--gold-light);
	border-radius: 999px;
	padding: 8px 16px;
	margin: 12px auto;
	display: inline-block;
}
.xinxam-luot-xin strong { color: var(--red-deep); }

/* ---------------- Nội dung SEO riêng theo bộ xăm (2.11.0) ---------------- */
.bo-seo-content{background:var(--paper);border-top:1px solid var(--line);border-bottom:1px solid var(--line);}
.bo-seo-inner{max-width:760px;}
.bo-seo-inner h2{font-size:22px;color:var(--wood);margin-bottom:16px;}
.bo-seo-inner p{font-size:14.5px;color:var(--ink);line-height:1.85;margin-bottom:14px;}
.bo-seo-inner .bo-seo-luuy{font-size:13px;color:var(--muted);font-style:italic;border-left:3px solid var(--gold);padding-left:14px;margin-bottom:0;}

@media(max-width:720px){
  .bo-seo-inner h2{font-size:19px;}
  .bo-seo-inner p{font-size:13.5px;}
}

/* ---------------- Footer: hàng link công cụ phụ (2.11.0) ---------------- */
footer .fnav-tools{margin-top:-4px;margin-bottom:14px;font-size:12px;}
footer .fnav-tools a{opacity:.65;}
footer .fnav-tools a:hover{opacity:1;text-decoration:underline;}

/* ===== Chia sẻ nhanh (Facebook/Zalo) — inc/social-share.php ===== */
.quick-share{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  margin-top:10px;padding-top:10px;border-top:1px dashed var(--line);
}
.qs-label{font-size:12px;color:var(--muted);}
.qs-btn{
  display:inline-flex;align-items:center;gap:5px;font-size:12.5px;font-weight:600;
  padding:6px 12px;border-radius:8px;text-decoration:none;color:#fff;
  border:1px solid transparent;
}
.qs-btn.qs-fb{background:#1877f2;}
.qs-btn.qs-fb:hover{background:#1461c9;}
.quick-share .zalo-share-button{transform:scale(.92);transform-origin:left center;}

/* ===== FAQ từng bộ xăm (inc/structured-data.php) ===== */
.bo-faq{padding:36px 0;}
.bo-faq-inner{max-width:760px;margin:0 auto;padding:0 20px;}
.bo-faq-item{
  background:var(--paper);border:1px solid var(--line);border-radius:10px;
  padding:14px 18px;margin-bottom:10px;
}
.bo-faq-item summary{
  cursor:pointer;font-weight:600;color:var(--ink);list-style:none;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.bo-faq-item summary::-webkit-details-marker{display:none;}
.bo-faq-item summary::after{content:'+';font-size:20px;color:var(--gold-dark);flex-shrink:0;}
.bo-faq-item[open] summary::after{content:'−';}
.bo-faq-item p{margin-top:10px;color:var(--muted);font-size:14.5px;line-height:1.6;}
