/* ===== /stories – Giấy kem (20/11/2026): bức tường một màn hình giữ nguyên, các nút / nhãn / hộp chữ thành giấy đặc viền mực bo 8px bóng lệch cứng.
   Nạp SAU CÙNG; bỏ viên thuốc + kính mờ. Không đụng stories.css (dùng chung biến cũ). */
:root { --gk-kem: #F7F0DF; --gk-giay: #FBF6EC; --gk-giay2: #FFFDF8; --gk-muc: #121212; --gk-chu: #17222D; --gk-phu: #4A4F5A; --gk-cham: #5E75B8; --gk-cham2: #4A5F9E; --gk-vang: #EFC278; --gk-bong: rgba(24, 38, 65, .28); }
html body.v3-stories { background: var(--gk-kem); color: var(--gk-chu); font-family: "Plus Jakarta Sans", system-ui, sans-serif; }
body.v3-stories #stage { background-color: var(--gk-kem); background-image: radial-gradient(circle, rgba(18, 18, 18, .08) 1.6px, transparent 2.2px); background-size: 20px 20px; }
body.v3-stories #vignette { background: radial-gradient(ellipse 60% 45% at 0% 100%, rgba(247, 240, 223, .8) 0%, rgba(247, 240, 223, .45) 35%, transparent 70%); }

/* nút trên cùng */
body.v3-stories .back-home, body.v3-stories .lang-pill {
  min-height: 44px; padding: 0 16px; border: 2px solid var(--gk-muc); border-radius: 8px; background: var(--gk-giay); color: var(--gk-chu);
  box-shadow: 3px 3px 0 var(--gk-bong); font: 800 14px/1 "Plus Jakarta Sans", system-ui, sans-serif; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.v3-stories .back-home:hover, body.v3-stories .lang-pill:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--gk-bong); background: var(--gk-giay); }
body.v3-stories .lang-pill span { font-family: "Space Mono", monospace; font-weight: 700; letter-spacing: .08em; }
body.v3-stories :is(.back-home, .lang-pill, .icon-btn, .fc-actions a):focus-visible { outline: 3px solid var(--gk-cham); outline-offset: 2px; }

/* hộp tiêu đề góc trái dưới */
body.v3-stories #titleblock { padding: 18px 20px; border: 2px solid var(--gk-muc); border-radius: 8px; background: var(--gk-giay); box-shadow: 4px 4px 0 var(--gk-bong); max-width: 28rem; }
body.v3-stories .eyebrow { display: inline-flex; margin: 0; padding: 5px 9px; border: 2px solid var(--gk-muc); border-radius: 4px; background: var(--gk-vang); color: var(--gk-chu);
  box-shadow: 2px 2px 0 var(--gk-bong); font: 700 12px/1.2 "Space Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
body.v3-stories .eyebrow .rule { display: none; }
body.v3-stories .title { margin-top: 12px; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 900; font-variation-settings: normal; font-size: clamp(2rem, 4.4vw, 3rem); color: var(--gk-chu); }
body.v3-stories .title .accent { color: #4A5F9E; }
body.v3-stories .subtitle { color: var(--gk-phu); font-size: 14px; }

/* nhãn gợi ý + bộ đếm */
body.v3-stories #hint, body.v3-stories #counter { padding: 8px 12px; border: 2px solid var(--gk-muc); border-radius: 4px; background: var(--gk-giay); color: var(--gk-chu);
  box-shadow: 2px 2px 0 var(--gk-bong); font: 700 12px/1.2 "Space Mono", monospace; letter-spacing: .08em; }
body.v3-stories #counter b { color: #4A5F9E; font-size: 13px; }

/* hộp xem chi tiết */
body.v3-stories #backdrop { background: rgba(247, 240, 223, .78); -webkit-backdrop-filter: none; backdrop-filter: none; }
body.v3-stories .fcard-media { border: 2px solid var(--gk-muc); border-radius: 8px; box-shadow: 6px 6px 0 var(--gk-bong); background: var(--gk-giay2); }
body.v3-stories .fcard-caption { padding: 22px 76px 12px 14px; background: linear-gradient(to top, rgba(63, 85, 144, .96), rgba(63, 85, 144, .72) 62%, transparent); }
body.v3-stories .fcard-caption .cat { white-space: nowrap; font: 700 10px/1.2 "Space Mono", monospace; letter-spacing: .08em; opacity: .95; }
body.v3-stories .fcard-caption .ttl { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: clip; font: 800 16px/1.2 "Plus Jakarta Sans", sans-serif; }
body.v3-stories .fcard-caption .score { padding: 4px 9px; border: 2px solid var(--gk-muc); border-radius: 4px; background: var(--gk-vang); color: var(--gk-chu); font: 700 13px/1.2 "Space Mono", monospace; }
body.v3-stories .fc-top .fc-cat { display: inline-block; padding: 4px 8px; border: 2px solid var(--gk-muc); border-radius: 4px; background: var(--gk-vang); color: var(--gk-chu); box-shadow: 2px 2px 0 var(--gk-bong); font: 700 12px/1.2 "Space Mono", monospace; letter-spacing: .08em; }
body.v3-stories .fc-title { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 900; color: var(--gk-chu); }
body.v3-stories .fc-meta { color: var(--gk-phu); font: 700 12px/1.3 "Space Mono", monospace; letter-spacing: .06em; }
body.v3-stories .fc-scores span { padding: 4px 9px; border: 2px solid var(--gk-muc); border-radius: 4px; background: var(--gk-giay); color: var(--gk-chu); font: 700 12px/1.3 "Space Mono", monospace; box-shadow: 2px 2px 0 var(--gk-bong); }
body.v3-stories .fc-scores span.total { background: #4A5F9E; color: #fff; }
body.v3-stories .fc-desc { color: var(--gk-chu); }
body.v3-stories .fc-actions a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 20px; border: 2px solid var(--gk-muc); border-radius: 8px; box-shadow: 3px 3px 0 var(--gk-bong); font-weight: 800; }
body.v3-stories .fc-order { background: var(--gk-vang); color: var(--gk-chu); }
body.v3-stories .fc-inquire { background: var(--gk-giay); color: var(--gk-chu); }
body.v3-stories .fc-actions a:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--gk-bong); }
body.v3-stories .icon-btn { width: 40px; height: 40px; border: 2px solid var(--gk-muc); border-radius: 8px; background: var(--gk-giay); box-shadow: 2px 2px 0 var(--gk-bong); }
body.v3-stories .icon-btn:hover { transform: translate(-1px, -1px); background: var(--gk-giay); box-shadow: 3px 3px 0 var(--gk-bong); }
body.v3-stories .cell { border: 2px solid var(--gk-muc); box-shadow: 3px 3px 0 var(--gk-bong); }

@media (max-width: 767px) {
  body.v3-stories #titleblock { padding: 12px 14px; max-width: calc(100vw - 36px); }
  body.v3-stories .title { font-size: 2rem; }
  body.v3-stories :is(#hint, #counter) { font-size: 10px; }
  body.v3-stories .back-home { padding: 0 12px; }
  body.v3-stories .fc-actions a { padding: 0 14px; }
}
@media (max-width: 767px) { body.v3-stories .fcard-caption .ttl { font-size: 14px; -webkit-line-clamp: 3; } }

/* 20/11 đợt 4: nút "Về trang giới thiệu" vẫn dính kính mờ từ lớp khác -> ép giấy đặc */
html body.v3-stories a.back-home.back-home { background: var(--gk-giay) !important; background-image: none !important; border: 2px solid var(--gk-muc) !important; border-radius: 8px !important; box-shadow: 3px 3px 0 var(--gk-bong) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; color: var(--gk-chu) !important; }
html body.v3-stories a.back-home.back-home:hover { box-shadow: 4px 4px 0 var(--gk-bong) !important; }
html body.v3-stories a.back-home.back-home::before, html body.v3-stories a.back-home.back-home::after { display: none !important; }
html body.v3-stories :is(#hint, #counter, #titleblock, .fcard-media) { background-color: var(--gk-giay) !important; }

/* ===== 20/11 chặng C: UX /stories – vùng chạm, focus, lối xem danh sách, tương phản ===== */
body.v3-stories .icon-btn { width: 44px; height: 44px; }
body.v3-stories .fc-zoom { min-height: 44px; padding: 0 16px; border: 2px solid var(--gk-muc); border-radius: 8px; background: var(--gk-giay); color: var(--gk-chu); box-shadow: 3px 3px 0 var(--gk-bong); font: 800 14px/1 "Plus Jakarta Sans", sans-serif; cursor: pointer; }
body.v3-stories .fc-zoom:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--gk-bong); }
body.v3-stories :is(.fc-zoom, .fc-retry, .fcard-media[role=button], .st-list-btn, .st-chip, .st-card, .st-list-x):focus-visible { outline: 3px solid var(--gk-cham); outline-offset: 3px; }
body.v3-stories .fc-actions { flex-wrap: wrap; }
body.v3-stories .fc-err { position: absolute; inset: auto 8px 8px 8px; padding: 10px; border: 2px solid var(--gk-muc); border-radius: 8px; background: var(--gk-giay); color: var(--gk-chu); font: 700 13px/1.4 "Plus Jakarta Sans", sans-serif; text-align: center; }
body.v3-stories .fc-retry { min-height: 44px; margin-left: 6px; padding: 0 14px; border: 2px solid var(--gk-muc); border-radius: 8px; background: var(--gk-vang); color: var(--gk-chu); font: 800 13px/1 "Plus Jakarta Sans", sans-serif; cursor: pointer; }
/* hint luôn hiện, không bị che bởi bộ đếm */
body.v3-stories #hint { max-width: min(22rem, calc(100vw - 36px)); line-height: 1.4; text-transform: none; letter-spacing: .02em; font-size: 12px; }
/* tâm thư trên điện thoại: hiện trích đoạn dưới ảnh */
@media (max-width: 767px) {
  body.v3-stories .fc-desc { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; font-size: 13px; line-height: 1.45; }
  body.v3-stories .fc-top { margin-bottom: 8px; }
  body.v3-stories .fc-title { font-size: 1.15rem; }
  body.v3-stories .fc-actions { gap: 8px; margin-top: 10px; }
  body.v3-stories #hint { font-size: 11px; }
}
/* nút + lớp xem dạng danh sách */
body.v3-stories .st-list-btn { position: absolute; z-index: 45; right: 22px; bottom: 70px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 2px solid var(--gk-muc); border-radius: 8px; background: var(--gk-vang); color: var(--gk-chu); box-shadow: 3px 3px 0 var(--gk-bong); font: 800 14px/1 "Plus Jakarta Sans", sans-serif; cursor: pointer; }
body.v3-stories .st-list-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--gk-bong); }
@media (max-width: 767px) { body.v3-stories .st-list-btn { right: 18px; top: 172px; bottom: auto; } }
body.v3-stories #stage:has(.fcard.expanded) :is(#hint, #counter, .st-list-btn) { visibility: hidden; }
body.v3-stories .st-list { position: absolute; inset: 0; z-index: 60; overflow-y: auto; background-color: var(--gk-kem); background-image: radial-gradient(circle, rgba(18, 18, 18, .08) 1.6px, transparent 2.2px); background-size: 20px 20px; -webkit-overflow-scrolling: touch; }
body.v3-stories .st-list[hidden] { display: none; }
body.v3-stories .st-list-in { max-width: 1100px; margin: 0 auto; padding: 72px 20px 40px; }
body.v3-stories .st-list-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.v3-stories .st-list h2 { margin: 0; font: 900 clamp(1.5rem, 3.4vw, 2.2rem)/1.1 "Plus Jakarta Sans", sans-serif; color: var(--gk-chu); }
body.v3-stories .st-list-x { width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--gk-muc); border-radius: 8px; background: var(--gk-giay); color: var(--gk-chu); box-shadow: 2px 2px 0 var(--gk-bong); cursor: pointer; }
body.v3-stories .st-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
body.v3-stories .st-chip { min-height: 44px; padding: 0 16px; border: 2px solid var(--gk-muc); border-radius: 8px; background: var(--gk-giay); color: var(--gk-chu); font: 800 14px/1 "Plus Jakarta Sans", sans-serif; cursor: pointer; box-shadow: 2px 2px 0 var(--gk-bong); }
body.v3-stories .st-chip b { font: 700 12px "Space Mono", monospace; margin-left: 4px; }
body.v3-stories .st-chip[aria-pressed="true"] { background: #4A5F9E; color: #fff; }
body.v3-stories .st-note { margin: 12px 0 0; color: var(--gk-phu); font-size: 14px; }
body.v3-stories .st-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
body.v3-stories .st-card { display: flex; gap: 12px; width: 100%; padding: 10px; text-align: left; border: 2px solid var(--gk-muc); border-radius: 8px; background: var(--gk-giay); color: var(--gk-chu); box-shadow: 3px 3px 0 var(--gk-bong); cursor: pointer; font-family: "Plus Jakarta Sans", sans-serif; }
body.v3-stories .st-card:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--gk-bong); }
body.v3-stories .st-card img { width: 84px; height: 105px; flex: none; object-fit: cover; border: 2px solid var(--gk-muc); border-radius: 4px; background: var(--gk-giay2); }
body.v3-stories .st-tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
body.v3-stories .st-tx em { font: 700 11px/1.2 "Space Mono", monospace; letter-spacing: .06em; text-transform: uppercase; font-style: normal; color: var(--gk-phu); }
body.v3-stories .st-tx strong { font-weight: 900; font-size: 16px; line-height: 1.2; }
body.v3-stories .st-sc { align-self: flex-start; padding: 2px 8px; border: 2px solid var(--gk-muc); border-radius: 4px; background: var(--gk-vang); font: 700 14px "Space Mono", monospace; }
body.v3-stories .st-tx small { color: var(--gk-phu); font-size: 12px; }
body.v3-stories .st-q { font-size: 13px; line-height: 1.45; color: var(--gk-chu); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { body.v3-stories :is(.st-card, .st-list-btn, .fc-zoom):hover { transform: none; } }

/* ===== Vòng 2 (20/11): UX /stories ===== */
/* mục đích trang + nút xem danh sách nằm ngay trong khối tiêu đề */
body.v3-stories #titleblock { pointer-events: none; }
body.v3-stories #titleblock::before { content: ""; position: absolute; inset: -34px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(247, 240, 223, .94) 62%, rgba(247, 240, 223, 0) 100%); }
body.v3-stories #titleblock .st-muc { margin: 10px 0 0; font: 800 15px/1.35 "Plus Jakarta Sans", system-ui, sans-serif; color: var(--gk-chu); }
body.v3-stories #titleblock .st-list-btn { position: static; pointer-events: auto; margin-top: 12px; right: auto; top: auto; bottom: auto; background: var(--gk-vang); }
@media (max-width: 767px) {
  body.v3-stories #titleblock .st-list-btn { width: 100%; justify-content: center; }
  body.v3-stories #titleblock::before { inset: -22px; }
}
/* chip đang chọn: nền chàm đặc, chữ trắng ≥ 8:1 trên toàn vùng chữ */
html body.v3-stories .st-chip[aria-pressed="true"] { background: #4A5F9E !important; background-image: none !important; color: #fff !important; }
/* thanh điều khiển dính: nền đặc, nằm dưới dải nút cố định phía trên */
body.v3-stories .st-list::before { content: ""; position: sticky; top: 0; z-index: 4; display: block; height: 64px; margin-bottom: -64px; background: var(--gk-kem); }
body.v3-stories .st-bar { position: sticky; top: 64px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px -20px 0; padding: 10px 20px; background: var(--gk-kem); border-bottom: 2px dashed rgba(18, 18, 18, .2); }
body.v3-stories .st-bar .st-chips { margin-top: 0; flex: 1 1 auto; min-width: 0; }
body.v3-stories .st-list-x { flex: none; min-width: 44px; min-inline-size: 44px; width: 44px; }
body.v3-stories .st-list-top { padding-right: 0; }
body.v3-stories .st-list-in { scroll-padding-top: 140px; }
body.v3-stories .st-card { scroll-margin-top: 150px; }
@media (max-width: 430px) {
  body.v3-stories .st-list-in { padding-top: 76px; }
  body.v3-stories .st-list h2 { font-size: 1.35rem; padding-right: 8px; }
  body.v3-stories .st-bar { margin-inline: -20px; padding-inline: 14px; gap: 8px; }
  body.v3-stories .st-bar .st-chips { gap: 6px; flex-wrap: nowrap; }
  body.v3-stories .st-bar .st-chip { padding: 0 9px; font-size: 13px; white-space: nowrap; }
}
/* phóng to ảnh ngay trên trang */
body.v3-stories .st-zoom, .st-zoom { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; background: rgba(18, 18, 18, .92); }
.st-zoom-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.st-zoom-fit { min-height: 44px; padding: 0 16px; border: 2px solid #121212; border-radius: 8px; background: #FBF6EC; color: #17222D; box-shadow: 3px 3px 0 rgba(24, 38, 65, .4); font: 800 14px/1 "Plus Jakarta Sans", system-ui, sans-serif; cursor: pointer; }
.st-zoom-x { width: 44px; height: 44px; min-width: 44px; border: 2px solid #121212; border-radius: 8px; background: #FBF6EC; color: #17222D; cursor: pointer; display: grid; place-items: center; }
.st-zoom-pan { flex: 1 1 auto; min-height: 0; overflow: auto; touch-action: pan-x pan-y pinch-zoom; display: flex; align-items: flex-start; justify-content: center; padding: 0 14px 16px; overscroll-behavior: contain; }
.st-zoom-pan img { display: block; width: 100%; max-width: 100%; height: auto; max-height: none; border-radius: 6px; background: #fff; }
.st-zoom.big .st-zoom-pan { justify-content: flex-start; }
.st-zoom.big .st-zoom-pan img { width: 240%; max-width: none; flex: none; }
@media (min-width: 900px) { .st-zoom:not(.big) .st-zoom-pan { align-items: center; } .st-zoom:not(.big) .st-zoom-pan img { width: auto; max-height: calc(100vh - 90px); max-width: 100%; } .st-zoom.big .st-zoom-pan img { width: 180%; } }
.st-zoom :is(.st-zoom-fit, .st-zoom-x):focus-visible, .st-zoom-pan:focus-visible { outline: 3px solid #EFC278; outline-offset: 3px; }
html body.v3-stories .st-chip.cx-chon.cx-chon.cx-chon.cx-chon[aria-pressed="true"] { background: #4A5F9E !important; background-image: none !important; color: #fff !important; }
/* vòng 3 (20/11): dòng "Đang tải ảnh…" trong hộp phóng to */
.st-zoom-st { margin: 0; flex: 1 1 auto; min-width: 0; text-align: center; color: #FBF6EC; font: 700 14px/1.3 "Be Vietnam Pro", system-ui, sans-serif; }
