/* Trang công khai: đăng nhập, bảng giá, điều khoản, bảo mật, quản trị — cùng theme với app (css/style.css) */
body.site { margin: 0; background: var(--bg); color: var(--ink); font: calc(15px * var(--fz))/1.6 var(--font-ui); min-height: 100vh; display: flex; flex-direction: column; }
html:has(body.site) { height: auto; overflow-y: auto; overflow-x: hidden; } body.site { height: auto; overflow: visible; overflow-x: clip; } /* trang công khai cuộn bình thường (app khoá cuộn trang); header vẫn dính */
.site a { color: var(--accent-dark); }
.s-top { display: flex; align-items: center; gap: 14px; padding: 14px clamp(16px, 4vw, 48px); background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.s-brand { display: flex; align-items: center; gap: 10px; color: var(--ink) !important; text-decoration: none; font-weight: 800; font-size: calc(17px * var(--fz)); }
.s-brand .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(52, 211, 153, .3); }
.s-top nav { display: flex; gap: 4px; margin-left: 12px; flex-wrap: wrap; }
.s-top nav a { color: var(--ink); text-decoration: none; padding: 6px 12px; border-radius: 9px; font-weight: 600; font-size: calc(14px * var(--fz)); }
.s-top nav a:hover, .s-top nav a.on { background: var(--hover); }
.s-top .sp { flex: 1; }
.s-main { flex: 1; width: min(1180px, 100% - 32px); margin: 0 auto; padding: 40px 0 64px; }
.s-main.narrow { width: min(820px, 100% - 32px); }
.s-hero { text-align: center; margin-bottom: 28px; }
.s-hero h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; margin: 0 0 10px; letter-spacing: -.02em; }
.s-hero p { color: var(--muted); max-width: 680px; margin: 0 auto; font-size: calc(16px * var(--fz)); }
.s-seg { display: inline-flex; background: var(--line); border-radius: 12px; padding: 4px; margin: 20px auto 0; }
.s-seg button { border: 0; background: none; padding: 8px 18px; border-radius: 9px; font: inherit; font-weight: 700; cursor: pointer; color: var(--muted); }
.s-seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 4px rgba(20, 30, 48, .12); }
.s-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 26px; }
.s-plan { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); position: relative; }
.s-plan.pop { border: 2px solid var(--accent); }
.s-plan .tag { position: absolute; top: -12px; left: 22px; background: var(--accent); color: var(--on-accent); font-size: calc(12px * var(--fz)); font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.s-plan h3 { margin: 0; font-size: calc(18px * var(--fz)); }
.s-plan .who { color: var(--muted); font-size: calc(13.5px * var(--fz)); margin: -6px 0 0; }
.s-plan .price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.s-plan .price small { font-size: calc(14px * var(--fz)); color: var(--muted); font-weight: 600; letter-spacing: 0; }
.s-plan ul { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 7px; font-size: calc(14px * var(--fz)); flex: 1; }
.s-plan-note { margin: -2px 0 8px; font-size: calc(12px * var(--fz)); line-height: 1.45; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.s-plan li { display: flex; gap: 8px; align-items: flex-start; }
.s-plan li::before { content: ''; width: 16px; height: 16px; flex: none; margin-top: 3px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a8763' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/11px no-repeat; }
.s-plan li.soon { color: var(--muted); } .s-plan li.soon::before { background: var(--hover); }
.s-plan li.soon::after { content: 'sắp ra mắt'; font-size: calc(11px * var(--fz)); font-weight: 700; background: var(--warn-soft); color: var(--warn-ink); border-radius: 6px; padding: 0 6px; margin-left: 4px; white-space: nowrap; align-self: center; }
.s-plan .btn { width: 100%; padding: 11px; font-size: calc(14.5px * var(--fz)); }
.s-plan.cur { outline: 3px solid var(--accent-soft); }
.s-table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); margin-top: 18px; font-size: calc(14px * var(--fz)); }
.s-table th, .s-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.s-table th:first-child, .s-table td:first-child { text-align: left; }
.s-table thead th { background: var(--hd, var(--panel-2)); font-weight: 800; }
.s-table .y { color: var(--accent-dark); font-weight: 800; } .s-table .n { color: var(--muted-2); }
.s-sec { margin-top: 56px; } .s-sec h2 { font-size: calc(24px * var(--fz)); margin: 0 0 6px; letter-spacing: -.01em; } .s-sec > p { color: var(--muted); margin: 0; }
.s-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
.s-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.s-card b { display: block; margin-bottom: 4px; } .s-card p { margin: 0; color: var(--muted); font-size: calc(14px * var(--fz)); }
.s-faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-top: 10px; }
.s-faq summary { font-weight: 700; cursor: pointer; } .s-faq details p { color: var(--muted); margin: 8px 0 0; }
.s-foot { border-top: 1px solid var(--line); background: var(--panel); padding: 24px clamp(16px, 4vw, 48px); color: var(--muted); font-size: calc(13.5px * var(--fz)); display: flex; flex-wrap: wrap; gap: 8px 24px; }
.s-foot a { color: var(--muted); }
.s-doc h1 { font-size: 32px; margin: 0 0 6px; } .s-doc .upd { color: var(--muted); margin: 0 0 24px; }
.s-doc h2 { font-size: calc(19px * var(--fz)); margin: 28px 0 8px; } .s-doc p, .s-doc li { color: var(--ink-3); } .s-doc ul { padding-left: 22px; }
/* Đăng nhập */
.s-auth { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.s-box { width: min(420px, 100%); background: var(--panel); border-radius: 20px; box-shadow: 0 24px 60px rgba(20, 30, 48, .12); padding: 28px; }
.s-box h1 { font-size: calc(24px * var(--fz)); margin: 0 0 4px; } .s-box > p { color: var(--muted); margin: 0 0 18px; font-size: calc(14px * var(--fz)); }
.s-tabs { display: flex; background: var(--hover); border-radius: 11px; padding: 4px; margin-bottom: 18px; }
.s-tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 8px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.s-tabs button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 30, 48, .12); }
.s-form { display: flex; flex-direction: column; gap: 12px; }
.s-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: calc(13.5px * var(--fz)); }
.s-form input[type="email"], .s-form input[type="password"], .s-form input[type="text"] { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; outline: none; background: var(--panel-2); }
.s-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--panel); }
.s-form .chk { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 500; color: var(--muted); }
.s-form .chk input { margin-top: 4px; accent-color: var(--accent); }
.s-form .btn { padding: 12px; font-size: calc(15px * var(--fz)); }
.s-err { color: var(--danger); background: var(--danger-soft); border-radius: 10px; padding: 8px 12px; font-size: calc(13.5px * var(--fz)); margin: 0; }
.s-err[hidden], .s-ok[hidden] { display: none; }
.s-ok { color: var(--accent-dark); background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; font-size: calc(13.5px * var(--fz)); margin: 0; }
.s-meter { height: 5px; border-radius: 3px; background: var(--hover); overflow: hidden; margin-top: -4px; } .s-meter i { display: block; height: 100%; width: 0; transition: .2s; }
.s-trust { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: calc(12.5px * var(--fz)); margin-top: 14px; }
/* Hộp thanh toán */
.s-modal { position: fixed; inset: 0; background: rgba(20, 30, 48, .45); display: grid; place-items: center; z-index: 20; padding: 16px; }
.s-modal[hidden] { display: none; }
.s-pay { width: min(720px, 100%); background: var(--panel); border-radius: 20px; padding: 24px; display: grid; grid-template-columns: 260px 1fr; gap: 24px; max-height: 92vh; overflow: auto; }
.s-pay img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.s-pay dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0; font-size: calc(14px * var(--fz)); } .s-pay dt { color: var(--muted); } .s-pay dd { margin: 0; font-weight: 700; word-break: break-all; }
.s-pay code { background: var(--warn-soft); padding: 2px 8px; border-radius: 6px; font-size: calc(15px * var(--fz)); }
.s-pay .act { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
@media (max-width: 640px) { .s-pay { grid-template-columns: 1fr; } }
/* Quản trị */
.s-admin table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 14px; overflow: hidden; font-size: calc(13.5px * var(--fz)); box-shadow: var(--shadow); }
.s-admin th, .s-admin td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.s-admin th { background: var(--panel-2); } .s-admin td .btn { padding: 4px 10px; font-size: calc(12.5px * var(--fz)); }
.s-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.s-stats div { background: var(--panel); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); } .s-stats b { display: block; font-size: calc(24px * var(--fz)); } .s-stats small { color: var(--muted); }
.s-badge { font-size: calc(12px * var(--fz)); font-weight: 700; border-radius: 6px; padding: 2px 8px; background: var(--hover); } .s-badge.ok { background: var(--accent-soft); color: var(--accent-dark); } .s-badge.warn { background: var(--warn-soft); color: var(--warn-ink); }
/* Trong app: hộp thoại vượt giới hạn gói, phần Tài khoản */
.pv-limit { position: fixed; inset: 0; z-index: 200; background: rgba(20, 30, 48, .35); display: grid; place-items: center; }
.pv-limit-box { position: relative; width: min(460px, 94vw); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 28px 22px; box-shadow: var(--shadow-2); font: calc(14px * var(--fz))/1.5 var(--font-ui); color: var(--ink); }
.pv-limit-box.wide { width: min(720px, 94vw); }
.pv-limit-box h3 { margin: 0 40px 6px 0; font-size: calc(19px * var(--fz)); font-weight: 600; letter-spacing: -.01em; } .pv-limit-box > p { margin: 0; color: var(--muted); max-width: 60ch; }
.pv-limit-x { position: absolute; top: 14px; right: 14px; }
.pv-limit-act { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; } .pv-limit-act .sp { flex: 1; } .pv-limit-act a { text-decoration: none; }
.h-usage { margin: 10px 0; } .h-usage small { color: var(--muted); }
.h-ubar { height: 8px; border-radius: 4px; background: var(--hover); overflow: hidden; margin-bottom: 4px; } .h-ubar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; } .h-ubar i.warm { background: var(--warn); } .h-ubar i.hot { background: var(--danger); }
.h-plancur { display: flex; align-items: center; gap: 12px; justify-content: space-between; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.h-plancur b { display: block; font-size: calc(17px * var(--fz)); } .h-plancur small { color: var(--muted); } .h-plancur a { text-decoration: none; }
.h-table { width: 100%; border-collapse: collapse; font-size: calc(13.5px * var(--fz)); } .h-table th, .h-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; } .h-table th { color: var(--muted); font-weight: 700; }
.h-badge { font-style: normal; font-size: calc(11.5px * var(--fz)); font-weight: 700; border-radius: 6px; padding: 1px 7px; background: var(--hover); } .h-badge.ok { background: var(--accent-soft); color: var(--accent-dark); } .h-badge.warn { background: var(--warn-soft); color: var(--warn-ink); }
.h-sess { list-style: none; padding: 0; margin: 6px 0; } .h-sess li { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); } .h-sess small { display: block; color: var(--muted); }
.h-panel h4 { margin: 14px 0 4px; }

a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--on-accent); }
.s-plan .price small.pm { display: block; font-size: calc(13px * var(--fz)); margin-top: 2px; }
/* Tệp của tôi: bộ lọc Design / Moodboard / Dieline */
.h-ftype { margin: -4px 0 10px; } .h-ftype .chip { display: inline-flex; align-items: center; gap: 6px; }
.h-thumb.dl { display: grid; place-items: center; padding: 12px; color: var(--ink); background: var(--panel-2); position: relative; }
.h-thumb.dl svg { width: 100%; height: 100%; } .h-thumb.dl img { max-width: 100%; max-height: 100%; object-fit: contain; }
.h-badge2 { position: absolute; left: 8px; top: 8px; font-style: normal; font-size: calc(11px * var(--fz)); font-weight: 800; border-radius: 6px; padding: 2px 8px; background: var(--hover); color: var(--muted); }
.h-badge2.ok { background: var(--accent-soft); color: var(--accent-dark); }
.w-kicker { display: inline-block; background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; font-size: calc(13px * var(--fz)); border-radius: 999px; padding: 4px 12px; margin-bottom: 14px; }
.w-cta { display: flex; gap: 10px; flex-wrap: wrap; } .w-cta .btn { padding: 13px 22px; font-size: calc(15px * var(--fz)); }
.w-win { background: var(--panel); border-radius: 18px; box-shadow: 0 30px 70px rgba(20, 30, 48,.18); overflow: hidden; border: 1px solid var(--line); }
.w-winbar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: calc(12px * var(--fz)); font-weight: 700; }
.w-winbar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); } .w-winbar span { margin-left: 8px; }
.w-win svg { display: block; width: 100%; height: auto; }
.w-sec { padding-top: 24px; padding-bottom: 24px; } .w-sec h2 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 6px; } .w-sub { color: var(--muted); margin: 0 0 18px; }
.w-center { text-align: center; margin-top: 16px; }
.w-final { text-align: center; padding: 56px 16px 72px; background: linear-gradient(180deg, transparent, var(--accent-soft)); } .w-final h2 { font-size: 30px; margin: 0 0 6px; } .w-final p { color: var(--muted); margin: 0 0 18px; } .w-final .btn { padding: 13px 24px; font-size: calc(15px * var(--fz)); }

/* Thanh trên: tài khoản, menu di động */
.s-act { display: flex; align-items: center; gap: 8px; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; }
.s-acct { position: relative; }
.s-av { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; cursor: pointer; font-size: calc(15px * var(--fz)); }
.s-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(20, 30, 48,.16); padding: 6px; display: flex; flex-direction: column; z-index: 20; }
.s-menu[hidden] { display: none; }
.s-menu a, .s-menu button { text-align: left; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; font-size: calc(14px * var(--fz)); cursor: pointer; }
.s-menu a:hover, .s-menu button:hover { background: var(--hover); }
.s-menu button[data-logout] { color: var(--danger); border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; margin-top: 4px; }
.s-mhead { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.s-mhead small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.s-mplan { align-self: flex-start; margin-top: 6px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; font-size: calc(12px * var(--fz)); border-radius: 999px; padding: 2px 10px; }
.s-burger { display: none; width: 40px; height: 40px; border: 1.5px solid var(--line); background: var(--panel); border-radius: 10px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.s-burger i { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.s-top.open .s-burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); } .s-top.open .s-burger i:nth-child(2) { opacity: 0; } .s-top.open .s-burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 900px) {
  .s-top { flex-wrap: wrap; gap: 10px; }
  .s-burger { display: flex; }
  .s-top nav { display: none; order: 9; width: 100%; margin: 0; flex-direction: column; gap: 2px; padding: 6px 0 4px; border-top: 1px solid var(--line); }
  .s-top.open nav { display: flex; } .s-top nav a { padding: 12px 10px; font-size: calc(15px * var(--fz)); }
}
@media (max-width: 520px) { .s-act .btn.ghost { display: none; } .s-act .btn { padding: 8px 12px; font-size: calc(13px * var(--fz)); } .s-brand { font-size: calc(16px * var(--fz)); } }

/* Chân trang */
.s-foot { border-top: 1px solid var(--line); background: var(--panel); padding: 36px clamp(16px, 4vw, 48px) 20px; color: var(--muted); font-size: calc(13.5px * var(--fz)); display: block; }
.s-foot a { color: var(--muted); text-decoration: none; } .s-foot a:hover { color: var(--accent-ink); text-decoration: underline; }
.s-fcols { display: grid; grid-template-columns: 1.5fr repeat(5, 1fr); gap: 24px; width: min(1180px, 100%); margin: 0 auto; }
.s-fcols > div { display: flex; flex-direction: column; gap: 8px; } .s-fcols b { color: var(--ink); font-size: calc(14px * var(--fz)); }
.s-fbrand p { margin: 4px 0 0; max-width: 320px; line-height: 1.55; }
.s-fbrand .s-brand { color: var(--ink) !important; text-decoration: none !important; }
.s-fbar { display: flex; flex-wrap: wrap; gap: 6px 20px; width: min(1180px, 100%); margin: 24px auto 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: calc(12.5px * var(--fz)); }
@media (max-width: 1100px) { .s-fcols { grid-template-columns: repeat(3, 1fr); } .s-fbrand { grid-column: 1 / -1; } }
@media (max-width: 760px) { .s-fcols { grid-template-columns: 1fr 1fr; } .s-fbrand { grid-column: 1 / -1; } }

/* Trang chủ: video, số liệu, hướng dẫn, khối tính năng */
.w-win video, .w-win img { display: block; width: 100%; height: auto; }

.w-tag { display: inline-block; background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; font-size: calc(12px * var(--fz)); border-radius: 999px; padding: 3px 10px; text-transform: uppercase; letter-spacing: .04em; }
.w-ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.w-ticks li { position: relative; padding-left: 26px; color: var(--ink-3); font-size: calc(15px * var(--fz)); line-height: 1.5; }
.w-ticks li::before { content: '✓'; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: calc(11px * var(--fz)); font-weight: 800; display: grid; place-items: center; }

/* 404 */
.s-404 { flex: 1; display: grid; place-items: center; text-align: center; padding: 64px 16px; }
.s-404 b { font-size: 88px; letter-spacing: -.04em; color: var(--accent-ink); line-height: 1; } .s-404 h1 { margin: 10px 0 8px; } .s-404 p { color: var(--muted); margin: 0 0 20px; }
.s-404 .w-cta { justify-content: center; }

/* Form liên hệ */
.s-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-top: 12px; position: relative; }
.s-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: calc(13.5px * var(--fz)); } .s-form .full { grid-column: 1 / -1; }
.s-form input, .s-form select, .s-form textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); }
.s-form textarea { min-height: 130px; resize: vertical; } .s-form input:focus, .s-form select:focus, .s-form textarea:focus { outline: none; border-color: var(--accent); }
.s-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.s-form .row { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.s-form .msg { font-size: calc(14px * var(--fz)); } .s-form .msg.ok { color: var(--accent-dark); font-weight: 700; } .s-form .msg.err { color: var(--danger); }
@media (max-width: 640px) { .s-form { grid-template-columns: 1fr; } }
.ct-msg { max-width: 420px; white-space: pre-wrap; font-size: calc(13.5px * var(--fz)); } tr.muted td { opacity: .6; }
section[id], h2[id] { scroll-margin-top: 84px; }
.s-top nav a.only-m { display: none; } @media (max-width: 520px) { .s-top nav a.only-m { display: block; } }

/* ---------- Theme 2026: bảng màu Mint / Lavender / Coral / Midnight · tiêu đề Reddit Sans 800 (giao-dien.md; Old Standard TT chỉ cho cụm nhấn nghiêng) ---------- */
body.site { background: var(--bg) radial-gradient(1200px 520px at 85% -10%, rgba(106, 164, 255, .14), transparent 60%) no-repeat, radial-gradient(900px 480px at -10% 10%, rgba(52, 211, 153, .12), transparent 60%) no-repeat; }
.s-top { background: color-mix(in srgb, var(--panel) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.s-hero h1, .s-doc h1, .w-sec h2, .w-final h2, .s-404 h1, .s-auth h1 { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.035em; }
.s-hero h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.05; }
.s-doc h1 { font-size: clamp(34px, 4.4vw, 48px); line-height: 1.1; }
.w-sec h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; margin-bottom: 10px; }
.w-final h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.08; }
.w-kicker { background: var(--panel); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); }
.w-kicker::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--grad-mint); margin-right: 8px; vertical-align: 1px; }
.s-plan h3 { font-family: var(--font-ui); font-weight: 800; font-size: 30px; letter-spacing: -.02em; line-height: 1.12; }
.s-plan h3 { font-size: calc(22px * var(--fz)); }
.s-404 b { font-family: var(--font-ui); font-weight: 800; font-size: 140px; background: var(--grad-mint); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
/* Gói: dải màu đầu thẻ */
.s-plan { overflow: hidden; padding-top: 30px; }
.s-plan::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--grad-mint); }
.s-plan:nth-child(2)::before { background: var(--grad-lav); } .s-plan:nth-child(3)::before { background: var(--grad-night); }
.s-plan.pop { border-color: var(--lav); box-shadow: 0 18px 44px rgba(106, 164, 255, .22); }
.s-plan .tag { top: 16px; left: auto; right: 18px; background: var(--grad-lav); color: var(--ink); }
.s-plan .price { font-family: var(--font-ui); font-weight: 800; font-size: 36px; letter-spacing: -.03em; }
/* Khối tính năng & hướng dẫn */
.w-tag { background: var(--lav-soft); color: var(--lav-ink); }
.w-ticks li::before { background: var(--accent-soft); color: var(--accent-ink); }
.w-final { background: var(--grad-night); color: var(--on-dark); border-radius: 32px; width: min(1180px, 100% - 32px); margin: 24px auto 56px; padding: 64px 24px; position: relative; overflow: hidden; }
.w-final::before { content: ''; position: absolute; inset: auto -10% -60% -10%; height: 120%; background: radial-gradient(closest-side, rgba(52, 211, 153, .35), transparent), radial-gradient(closest-side at 70% 50%, rgba(255, 154, 158, .28), transparent); pointer-events: none; }
.w-final > * { position: relative; } .w-final p { color: color-mix(in srgb, var(--on-dark) 75%, transparent); }
.w-win { border-radius: 20px; }
.s-av { background: var(--grad-lav); color: var(--on-accent); border-color: var(--line-strong); }
.s-foot { background: var(--panel); }

/* ---------- Trang khách xem link chia sẻ phương án ---------- */
body.sh { background: var(--bg); }
.sh-top { display: flex; align-items: center; gap: 12px; padding: 12px clamp(16px, 4vw, 40px); background: var(--panel); border-bottom: 1px solid var(--line); }
.sh-meta { color: var(--muted); font-size: calc(13px * var(--fz)); }
.sh-main { width: min(1100px, 100% - 32px); margin: 0 auto; padding: 28px 0 40px; flex: 1; }
.sh-head h1 { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.025em; font-size: clamp(30px, 4vw, 46px); margin: 0 0 6px; line-height: 1.1; }
.sh-head p { color: var(--muted); margin: 0 0 18px; }
.sh-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.sh-tabs button { border: 1.5px solid var(--line); background: var(--panel); border-radius: 12px; padding: 8px 14px; cursor: pointer; text-align: left; display: flex; flex-direction: column; font: inherit; color: var(--ink); }
.sh-tabs button small { color: var(--muted); font-size: calc(12px * var(--fz)); }
.sh-tabs button[aria-selected="true"] { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.sh-seg { display: inline-flex; background: var(--line); border-radius: 10px; padding: 3px; margin-bottom: 10px; }
.sh-seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; color: var(--muted); }
.sh-seg button.on { background: var(--panel); color: var(--ink); }
.sh-fig { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.sh-fig img { display: block; width: 100%; max-height: 72vh; object-fit: contain; background: var(--hover); }
.sh-fig figcaption { padding: 10px 16px; color: var(--muted); font-size: calc(13.5px * var(--fz)); }
.sh-strip { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; }
.sh-strip button { flex: none; width: 140px; border: 1.5px solid var(--line); background: var(--panel); border-radius: 12px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; font-size: calc(12.5px * var(--fz)); color: var(--ink); }
.sh-strip button.on { border-color: var(--accent); }
.sh-strip img { width: 100%; height: 90px; object-fit: contain; background: var(--field); border-radius: 8px; }
.sh-vote { margin-top: 28px; } .sh-vote h2 { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.025em; font-size: 30px; margin: 0; }
.sh-foot { text-align: center; color: var(--muted); font-size: calc(13px * var(--fz)); padding: 20px 16px 28px; }

/* ==================== Ra mắt web (10/2026): trang mới, tài khoản, đăng nhập ==================== */
.s-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--inv); color: var(--on-inv); padding: 10px 16px; border-radius: 12px; font-size: calc(14px * var(--fz)); box-shadow: 0 14px 30px rgba(20, 30, 48, .25); opacity: 0; pointer-events: none; transition: .2s; z-index: 300; max-width: calc(100vw - 32px); }
.s-toast.on { opacity: 1; transform: translate(-50%, 0); }
.s-verify { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: var(--warn-soft); border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); font-size: calc(13.5px * var(--fz)); color: var(--warn-ink); text-align: center; }
.s-hint { color: var(--muted); font-size: calc(13px * var(--fz)); margin: 6px 0 0; display: block; }
/* Đăng nhập */
.s-auth { flex-direction: column; gap: 18px; }
.s-auth-brand { justify-content: center; }
.s-box .s-form { display: flex; flex-direction: column; background: none; border: 0; padding: 0; margin: 0; grid-template-columns: none; }
.s-google { width: 100%; padding: 11px; font-size: calc(14.5px * var(--fz)); gap: 10px; border: 1.5px solid var(--line); background: var(--panel); margin-bottom: 4px; }
.s-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: calc(12.5px * var(--fz)); margin: 12px 0 14px; }
.s-or::before, .s-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.s-forgot { align-self: center; font-size: calc(13px * var(--fz)); margin-top: 2px; }
.s-human:empty { display: none; }
.s-center { text-align: center; } .s-center .w-cta { justify-content: center; margin-top: 18px; }
.s-state { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; font-size: 30px; font-weight: 800; background: var(--hover); color: var(--muted); }
.s-state.ok { background: var(--accent-soft); color: var(--accent-ink); } .s-state.err { background: var(--danger-soft); color: var(--danger); }

/* Trang nội dung (bảo mật, cộng tác viên, mẫu hộp) */
.p-hero { padding-bottom: 8px; } .p-hero .w-kicker { margin-bottom: 16px; }
.p-hero p { font-size: calc(17px * var(--fz)); }
.p-em { font-style: italic; background: linear-gradient(100deg, var(--accent-strong) 0%, var(--lav) 60%, var(--coral) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding: .22em .1em .18em .04em; margin: 0 -.06em 0 -.04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.p-sec { padding-top: 16px; padding-bottom: 24px; }
.p-h2 { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.025em; font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 16px; }
.p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.p-grid article { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.p-grid h2 { font-size: calc(19px * var(--fz)); margin: 8px 0 8px; } .p-grid p, .p-grid li { color: var(--ink-3); font-size: calc(14.5px * var(--fz)); } .p-grid ul { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.p-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); }
@media (max-width: 760px) { .p-grid { grid-template-columns: 1fr; } }
.p-rates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; scroll-margin-top: 90px; }
.p-rate { border-radius: 22px 22px 60px 60px; padding: 22px 22px 30px; min-height: 160px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 14px 34px rgba(20, 30, 48, .12); }
.p-rate > b { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.025em; font-size: 46px; line-height: 1; }
.p-rate span { font-size: calc(14px * var(--fz)); color: rgba(20, 30, 48, .8); }
.p-rate.mint { background: var(--grad-mint); } .p-rate.lav { background: var(--grad-lav); } .p-rate.coral { background: var(--grad-coral); }
.p-rate.night { background: var(--grad-night); color: var(--on-dark); } .p-rate.night span { color: color-mix(in srgb, var(--on-dark) 80%, transparent); }
@media (max-width: 900px) { .p-rates { grid-template-columns: 1fr 1fr; } }
.p-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.p-steps li { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.p-steps li > b { width: 32px; height: 32px; border-radius: 50%; background: var(--grad-mint); display: grid; place-items: center; font-weight: 800; }
.p-steps h3 { font-size: calc(17px * var(--fz)); margin: 12px 0 6px; } .p-steps p { color: var(--muted); font-size: calc(14px * var(--fz)); margin: 0; }
.p-steps code { background: var(--field); border-radius: 6px; padding: 1px 6px; font-size: calc(12.5px * var(--fz)); word-break: break-all; }
@media (max-width: 900px) { .p-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .p-steps { grid-template-columns: 1fr; } }
.p-calc { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.p-calc label { display: grid; grid-template-columns: 1fr 70px; align-items: center; gap: 4px 12px; font-weight: 600; font-size: calc(14px * var(--fz)); }
.p-calc input[type=range] { grid-column: 1; accent-color: var(--accent-dark); width: 100%; }
.p-calc output { grid-row: 1 / span 2; grid-column: 2; font-size: calc(22px * var(--fz)); font-weight: 800; text-align: right; }
.p-calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.p-calc-out div { background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; } .p-calc-out small { color: var(--muted); display: block; } .p-calc-out b { font-size: calc(24px * var(--fz)); letter-spacing: -.01em; }
@media (max-width: 520px) { .p-calc-out { grid-template-columns: 1fr; } }

/* Thư viện mẫu hộp */
.t-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.t-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.t-cats button { border: 1.5px solid var(--line); background: var(--panel); border-radius: 999px; padding: 7px 14px; font-weight: 700; cursor: pointer; color: var(--ink); }
.t-cats button small { color: var(--muted); font-weight: 600; margin-left: 2px; }
.t-cats button[aria-selected="true"] { background: var(--inv); color: var(--on-inv); border-color: var(--ink); } .t-cats button[aria-selected="true"] small { color: var(--on-inv); opacity: .7; }
#tQ { flex: 0 1 300px; min-width: 200px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; font: inherit; background: var(--panel); }
.t-grid, .w-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.t-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .15s, transform .15s; }
.t-card[hidden] { display: none; }
.t-card:hover { box-shadow: 0 18px 40px rgba(20, 30, 48, .12); transform: translateY(-2px); }
.t-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--field); border-radius: 12px; padding: 12px; color: var(--ink); }
.t-thumb svg { width: 100%; height: 100%; }
.t-meta small { color: var(--muted); font-size: calc(12px * var(--fz)); font-weight: 600; } .t-meta h3 { font-size: calc(16px * var(--fz)); margin: 2px 0 4px; }
.t-meta p { color: var(--muted); font-size: calc(13px * var(--fz)); margin: 0 0 6px; line-height: 1.45; }
.t-dim { font-size: calc(12px * var(--fz)); color: var(--accent-ink); font-weight: 700; }
.t-used { display: block; font-size: calc(12px * var(--fz)); color: var(--muted); font-weight: 600; margin-top: 2px; } /* số người đã dùng mẫu (tpl-gallery usersOf, từ 3 người) */
.t-card .btn { margin-top: auto; }
.t-empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* Trang chủ: chia sẻ, bảo mật, cộng tác viên */
.w-sharemock .w-sm-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.w-sm-live { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: calc(12.5px * var(--fz)); border-radius: 999px; padding: 4px 12px; }
.w-sm-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-strong); box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: wPulse 1.8s infinite; }
@keyframes wPulse { 70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.w-sm-tabs { display: flex; gap: 6px; flex-wrap: wrap; } .w-sm-tabs b { font-size: calc(12px * var(--fz)); border: 1.5px solid var(--line); border-radius: 10px; padding: 5px 10px; }
.w-sm-tabs b.on { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.w-sharemock img { border-radius: 12px; aspect-ratio: 16 / 10; object-fit: cover; }
.w-sm-vote { background: var(--field); border-radius: 10px; padding: 10px 12px; font-size: calc(13px * var(--fz)); color: var(--muted); }

 .w-aff .w-tag { background: var(--panel); color: var(--ink); }

/* Tài khoản */
.a-wrap { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.a-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.a-who { display: flex; gap: 12px; align-items: center; } .a-who b { display: block; }
.a-who small { display: block; color: var(--muted); font-size: calc(12.5px * var(--fz)); overflow: hidden; text-overflow: ellipsis; max-width: 170px; } .a-who .s-badge { display: inline-block; margin-top: 4px; }
.a-av { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--grad-lav); display: grid; place-items: center; font-weight: 800; font-size: calc(18px * var(--fz)); border: 1.5px solid var(--ink); }
.a-nav { display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 6px; }
.a-nav a { color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 600; } .a-nav a:hover { background: var(--field); } .a-nav a.on { background: var(--sel-bg); color: var(--sel-ink); }
.a-body { min-width: 0; }
.a-body h1 { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.025em; font-size: clamp(30px, 3.6vw, 42px); margin: 0 0 14px; }
.a-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.a-card h2 { font-size: calc(17px * var(--fz)); margin: 0 0 10px; } .a-card.danger { border-color: color-mix(in srgb, var(--danger) 25%, var(--panel)); }
.a-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 6px; }
.a-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: calc(13.5px * var(--fz)); flex: 1 1 220px; }
.a-form textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel); resize: vertical; }
.a-form input { font: inherit; font-weight: 400; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel); } .a-form input:focus { outline: none; border-color: var(--accent); }
.a-grid2 { display: grid; grid-template-columns: 1fr 1fr; align-items: end; } .a-grid2 .row { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .a-grid2 { grid-template-columns: 1fr; } }
.a-dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 0; font-size: calc(14px * var(--fz)); } .a-dl dt { color: var(--muted); } .a-dl dd { margin: 0; }
.a-plan { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--grad-night); color: var(--on-dark); border: 0; }
.a-plan small { color: color-mix(in srgb, var(--on-dark) 70%, transparent); display: block; } .a-plan b { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.025em; font-size: 32px; display: block; line-height: 1.15; } .a-plan span { color: color-mix(in srgb, var(--on-dark) 80%, transparent); font-size: calc(13.5px * var(--fz)); }
.a-link small { color: var(--muted); font-weight: 600; } .a-linkrow { display: flex; gap: 8px; margin: 6px 0 10px; }
.a-linkrow input { flex: 1; min-width: 0; font: inherit; font-weight: 700; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--field); }
.a-share { display: flex; gap: 8px; flex-wrap: wrap; }
.a-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.a-stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; } .a-stats b { display: block; font-size: calc(18px * var(--fz)); } .a-stats small { color: var(--muted); font-size: calc(12px * var(--fz)); }
.a-stats .hl { background: var(--accent-soft); border-color: transparent; }
@media (max-width: 1100px) { .a-stats { grid-template-columns: repeat(3, 1fr); } }
.a-cap { display: block; width: 100%; text-align: left; border: 1.5px dashed var(--line); background: var(--panel-2); border-radius: 12px; padding: 12px 14px; margin-top: 8px; font: inherit; font-size: calc(13.5px * var(--fz)); cursor: pointer; color: var(--ink); line-height: 1.5; }
.a-cap:hover { border-color: var(--accent); background: var(--panel); }
.a-ref { list-style: none; padding: 0; margin: 0; } .a-ref li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: calc(14px * var(--fz)); } .a-ref small { color: var(--muted); }
.a-scroll { overflow-x: auto; }
@media (max-width: 820px) { .a-wrap { grid-template-columns: 1fr; } .a-side { position: static; } .a-nav { flex-direction: row; overflow-x: auto; } .a-nav a { white-space: nowrap; } .a-stats { grid-template-columns: repeat(2, 1fr); } }
/* Link chia sẻ: trạng thái tự cập nhật */
.sh-badge { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--fz)); font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.sh-badge.live { background: var(--accent-soft); color: var(--accent-ink); } .sh-badge.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-strong); animation: wPulse 1.8s infinite; }
.sh-badge.lock { background: var(--linen); color: var(--ink-2); }
.sh-flash { position: fixed; top: 14px; left: 50%; transform: translate(-50%, -80px); background: var(--inv); color: var(--on-inv); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: calc(14px * var(--fz)); box-shadow: 0 14px 30px rgba(20, 30, 48, .25); transition: transform .3s; z-index: 50; }
.sh-flash.on { transform: translate(-50%, 0); }
.sh-empty { color: var(--muted); text-align: center; padding: 40px 0; }
/* Mẫu hộp v2: ảnh 3D + khuôn nhỏ, thẻ đều nhau, cửa sổ 3D tương tác */
.t-grid, .w-tpls { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); align-items: stretch; }
.t-card { padding: 12px; gap: 8px; }
.t-thumb { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; min-height: 0; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: pointer; background: radial-gradient(circle at 50% 40%, var(--panel) 0%, var(--hover) 70%); font: inherit; color: var(--ink); text-decoration: none; }
.t-thumb .t-3d { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .25s, transform .35s; }
.t-thumb .t-3d img { width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(20, 30, 48, .12)); }
.t-thumb .t-die { position: absolute; left: 8px; bottom: 8px; width: 34%; aspect-ratio: 1; display: grid; place-items: center; padding: 6px; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line); border-radius: 10px; transition: all .3s; }
.t-thumb .t-die svg, .t-mdie svg { width: 100%; height: 100%; max-width: 100%; max-height: 100%; display: block; }
.t-thumb .t-die svg *, .t-mdie svg * { vector-effect: non-scaling-stroke; }
.t-thumb .t-die svg [stroke], .t-mdie svg [stroke] { stroke-width: 1.1px; }
.t-thumb:hover .t-3d, .t-thumb:focus-visible .t-3d { opacity: 0; transform: scale(.96); }
.t-thumb:hover .t-die, .t-thumb:focus-visible .t-die { left: 6%; bottom: 6%; width: 88%; padding: 10px; background: var(--panel); }
/* Thẻ mẫu trong app (Mẫu hộp ở Dieline, Trang chủ app, ngăn Mẫu hộp Studio): rê chuột lên cả thẻ cũng đổi sang khuôn */
:is(.tpl, .h-tpl, .dz-card, .nd-tpl):hover .t-thumb .t-3d { opacity: 0; transform: scale(.96); }
:is(.tpl, .h-tpl, .dz-card, .nd-tpl):hover .t-thumb .t-die { left: 6%; bottom: 6%; width: 88%; padding: 10px; background: var(--panel); }
:is(.tpl, .h-tpl, .dz-card, .nd-tpl) .t-thumb { aspect-ratio: 1; border-radius: 10px; margin-bottom: 4px; }
:is(.tpl, .h-tpl, .dz-card, .nd-tpl) .t-thumb .t-die { width: 38%; padding: 4px; }
.t-thumb.no3d .t-3d { display: none; } .t-thumb.no3d .t-die { left: 6%; bottom: 6%; width: 88%; background: transparent; border: 0; }
.t-hint { position: absolute; right: 8px; top: 8px; font-size: calc(11px * var(--fz)); font-weight: 700; background: var(--inv); color: var(--on-inv); border-radius: 999px; padding: 3px 9px; opacity: 0; transition: opacity .2s; }
.t-thumb:hover .t-hint { opacity: 1; }
.t-meta { flex: 1; } .t-meta p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.t-act { display: flex; gap: 6px; } .t-act .btn { flex: 1; }
.t-card .btn { margin-top: 0; }
.t-modal { position: fixed; inset: 0; z-index: 50; background: rgba(20, 30, 48, .55); display: grid; place-items: center; padding: 16px; }
.t-modal[hidden] { display: none; }
.t-mbox { width: min(1080px, 100%); height: min(680px, 100%); background: var(--panel); border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: 1fr 320px; box-shadow: 0 30px 80px rgba(20, 30, 48, .35); }
.t-mview { position: relative; background: var(--hover); min-height: 0; }
.t-3dview { position: absolute; inset: 0; } .t-3dview canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.t-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 600; background: var(--hover); }
.t-loading[hidden] { display: none; }
.t-mtools { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; box-shadow: var(--shadow); }
.t-mtools input[type=range] { width: 160px; accent-color: var(--accent-dark); }
.t-mhint { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; color: var(--muted); font-size: calc(12px * var(--fz)); }
.t-mside { position: relative; padding: 22px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; border-left: 1px solid var(--line); }
.t-mside > small { color: var(--muted); font-weight: 600; font-size: calc(12px * var(--fz)); } .t-mside h2 { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.025em; font-size: 28px; margin: 0; line-height: 1.15; padding-right: 30px; } .t-mside p { margin: 0; color: var(--muted); font-size: calc(14px * var(--fz)); }
.t-mclose { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: calc(15px * var(--fz)); }
.t-mdims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.t-mdims label { display: flex; flex-direction: column; gap: 4px; font-size: calc(12px * var(--fz)); font-weight: 700; color: var(--muted); }
.t-mdims span { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 8px; background: var(--panel); }
.t-mdims input { width: 100%; min-width: 0; border: 0; padding: 8px 0; font: inherit; font-weight: 700; color: var(--ink); outline: none; background: none; } .t-mdims i { font-style: normal; font-size: calc(11px * var(--fz)); }
.t-mdie { aspect-ratio: 4 / 3; background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; place-items: center; min-height: 0; }
.t-mnote { color: var(--muted); font-size: calc(11.5px * var(--fz)); line-height: 1.4; }
.t-err { padding: 24px; color: var(--danger); }
.t-gen { position: fixed; left: 16px; bottom: 16px; z-index: 60; background: var(--inv); color: var(--on-inv); padding: 10px 14px; border-radius: 10px; font-size: calc(13px * var(--fz)); }
@media (max-width: 820px) { .t-mbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; height: 100%; } .t-mview { min-height: 52vh; } .t-mside { border-left: 0; border-top: 1px solid var(--line); max-height: 44vh; } .t-mdie { display: none; } }

/* Trang chia sẻ: khung xem + cột bình luận bên cạnh (PC / tablet), xếp dọc trên điện thoại */
.sh-main { width: min(1500px, 100% - 32px); padding-top: 18px; }
.sh-head h1 { font-size: clamp(26px, 3vw, 40px); }
.sh-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sh-bar .sp { flex: 1; } .sh-bar .sh-seg { margin: 0; } .sh-bar .sh-tabs { margin: 0; }
.sh-pick { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); background: var(--panel); border-radius: 12px; padding: 7px 12px; cursor: pointer; font-size: calc(14px * var(--fz)); user-select: none; }
.sh-pick input { display: none; } .sh-pick span { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: calc(11.5px * var(--fz)); font-weight: 800; background: var(--hover); color: var(--muted); }
.sh-pick.on { border-color: var(--ink); } .sh-pick.on span { background: var(--accent); color: var(--on-accent, var(--on-accent)); }
.sh-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; height: calc(100vh - 210px); min-height: 520px; }
.sh-stage { display: grid; gap: 12px; min-height: 0; grid-template-columns: 1fr; grid-auto-rows: minmax(0, 1fr); }
.sh-stage.many.n2 { grid-template-columns: 1fr 1fr; } .sh-stage.many.n3 { grid-template-columns: repeat(3, 1fr); }
.sh-stage.many.n4 { grid-template-columns: 1fr 1fr; } .sh-stage.many.n5, .sh-stage.many.n6 { grid-template-columns: repeat(3, 1fr); }
.sh-cell { margin: 0; background: var(--panel); border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; transition: border-color .15s, box-shadow .15s; }
.sh-stage.many .sh-cell { cursor: pointer; } .sh-stage.many .sh-cell.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.sh-cell > header { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); font-size: calc(14px * var(--fz)); }
.sh-cell > header small { color: var(--muted); font-size: calc(12px * var(--fz)); } .sh-cell > header .sp { flex: 1; }
.sh-cbtn { border: 1px solid var(--line); background: var(--field); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: calc(12px * var(--fz)); font-weight: 700; cursor: pointer; color: var(--ink-2, var(--ink)); }
.sh-cbtn:hover { border-color: var(--accent); }
.sh-box { position: relative; flex: 1; min-height: 0; background: var(--hover); display: grid; place-items: center; }
.sh-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; } /* tuyệt đối: % chiều cao trong ô lưới không theo cỡ ảnh → khuôn dọc không bị cắt */
.sh-box.live > canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; touch-action: none; cursor: grab; }
.sh-load { color: var(--muted); font-size: calc(13px * var(--fz)); }
.sh-cell figcaption { display: flex; gap: 8px; padding: 9px 16px; color: var(--muted); font-size: calc(13px * var(--fz)); } .sh-cell figcaption .sp { flex: 1; }
.sh-hint { font-size: calc(12px * var(--fz)); opacity: .8; }
.sh-side { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.sh-side > header { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.sh-side h2 { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.025em; font-size: calc(24px * var(--fz)); margin: 0; }
.sh-for { display: inline-block; margin-top: 4px; font-size: calc(13px * var(--fz)); font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 2px 10px; }
.sh-cmts { list-style: none; margin: 0; padding: 10px 14px; flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.sh-cmts li { background: var(--field); border-radius: 12px; padding: 9px 12px; font-size: calc(14px * var(--fz)); }
.sh-cmts li.pick { background: var(--accent-soft); } .sh-cmts li.none { background: none; color: var(--muted); text-align: center; padding: 30px 0; }
.sh-cmts li > div { display: flex; align-items: baseline; gap: 8px; } .sh-cmts small { color: var(--muted); font-size: calc(12px * var(--fz)); }
.sh-cmts p { margin: 4px 0 0; white-space: pre-wrap; } .sh-pk { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-size: calc(12px * var(--fz)); font-weight: 600; color: var(--accent-ink); }
.sh-cform { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.sh-cform input, .sh-cform textarea { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: calc(14px * var(--fz)); resize: vertical; }
.sh-cform .row { display: flex; align-items: center; gap: 10px; } .sh-pickme { display: flex; align-items: center; gap: 7px; font-size: calc(13.5px * var(--fz)); }
.sh-cform .msg { font-size: calc(13px * var(--fz)); } .sh-cform .msg.err { color: var(--danger); }
@media (max-width: 1080px) { .sh-layout { grid-template-columns: minmax(0, 1fr) 300px; } .sh-stage.many.n3, .sh-stage.many.n5, .sh-stage.many.n6 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .sh-layout { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .sh-stage, .sh-stage.many.n2, .sh-stage.many.n3, .sh-stage.many.n4, .sh-stage.many.n5, .sh-stage.many.n6 { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .sh-box { height: 62vw; min-height: 260px; flex: none; }
  .sh-side { max-height: none; } .sh-cmts { max-height: 50vh; }
}

/* Chữ nghiêng tô gradient: chừa chỗ cho dấu tiếng Việt chồng (ổ, ễ, ộ…) — nền chữ chỉ vẽ trong hộp nên dấu cao bị cắt */
/* Tương tác chuột */
.s-glow { position: fixed; left: 0; top: 0; width: 600px; height: 600px; border-radius: 50%; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .4s; background: radial-gradient(circle, rgba(16, 185, 129, .13), rgba(106, 164, 255, .09) 38%, transparent 68%); mix-blend-mode: multiply; }
.s-glow.on { opacity: 1; }
body.site main, body.site footer { position: relative; z-index: 1; } body.site .s-top { position: sticky; top: 0; z-index: 60; } /* relative ở đây từng làm mất dính → cuộn lên không thấy thanh trên */
.w-win, .s-plan, .s-card { transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; transform-style: preserve-3d; }
.tilt { transform: perspective(900px) rotateX(var(--tx, 0)) rotateY(var(--ty, 0)) translateY(-3px); box-shadow: 0 22px 50px rgba(20, 30, 48, .14); }
.s-card.tilt, .s-plan.tilt { background-image: radial-gradient(260px circle at var(--mx) var(--my), rgba(16, 185, 129, .08), transparent 70%); }
.btn.primary { transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, background .2s; }
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease var(--rv-d, 0ms), transform .6s cubic-bezier(.2, .8, .2, 1) var(--rv-d, 0ms); }
.rv.in { opacity: 1; transform: none; }
.rv.in.tilt { transform: perspective(900px) rotateX(var(--tx, 0)) rotateY(var(--ty, 0)) translateY(-3px); transition-delay: 0ms; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } .s-glow { display: none; } }

/* Thư viện mẫu: thanh nhóm bên trái (theo cấu trúc / mockup sản phẩm / chất liệu) */
.t-lib { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
.t-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; padding-right: 4px; }
.t-side details { margin-bottom: 6px; }
.t-side summary { list-style: none; cursor: pointer; font-weight: 700; padding: 8px 10px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; color: var(--ink); }
.t-side summary::-webkit-details-marker { display: none; }
.t-side summary::after { content: '⌄'; font-size: calc(14px * var(--fz)); transition: transform .15s; }
.t-side details[open] > summary::after { transform: rotate(180deg); }
.t-side summary:hover { background: var(--hover); }
.t-side button { display: flex; width: 100%; align-items: baseline; gap: 6px; text-align: left; border: 1.5px solid transparent; background: none; border-radius: 10px; padding: 7px 12px; cursor: pointer; color: var(--ink); font: inherit; }
.t-side button::before { content: '#'; color: var(--muted); font-weight: 600; }
.t-side button small { color: var(--muted); font-size: calc(11px * var(--fz)); font-weight: 600; }
.t-side button:hover { background: var(--hover); }
.t-side button[aria-current="true"] { border-color: var(--ink); font-weight: 700; box-shadow: 0 2px 0 var(--ink); }
.t-title { margin: 0; font-size: calc(22px * var(--fz)); }
@media (max-width: 900px) {
  .t-lib { grid-template-columns: 1fr; gap: 12px; }
  .t-side { position: static; max-height: none; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
  .t-side details { margin: 0; display: contents; }
  .t-side summary { display: none; }
  .t-side button { white-space: nowrap; width: auto; border-color: var(--line); border-radius: 999px; }
}
/* Khối kêu gọi cuối nền tối: nút phụ giữ chữ tối trên nền sáng */
.w-final .btn:not(.primary) { color: var(--ink); }
/* Hộp thoại nâng cấp dùng chung (cloud.js limitDialog): gói gợi ý theo lý do */
/* Video hướng dẫn thanh toán (Bảng giá, Hỗ trợ) */
.pay-vid { max-width: 720px; margin: 18px auto 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-1); background: var(--grad-night); } .pay-vid video { display: block; width: 100%; aspect-ratio: 16 / 9; }
/* Link duyệt tài liệu thiết kế: dải chọn artboard (js/share.js) */
.sh-pages { display: flex; gap: 6px; overflow-x: auto; max-width: 60vw; }
.sh-pages button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-sm); padding: 4px; cursor: pointer; color: var(--muted); flex: none; }
.sh-pages button img { width: 54px; height: 40px; object-fit: contain; display: block; }
.sh-pages button small { font-size: calc(10.5px * var(--fz)); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-pages button.on { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--accent-line); }
.a-chk { display: flex; gap: 8px; align-items: flex-start; font-size: calc(14px * var(--fz)); line-height: 1.45; margin: 6px 0 12px; cursor: pointer; } .a-chk input { margin-top: 3px; }
.sh-cmts li.owner { background: var(--sel-bg); border-color: var(--accent-line); }
.sh-role { font-size: calc(10.5px * var(--fz)); font-weight: 800; color: var(--accent-ink); background: var(--accent-soft); border-radius: var(--r-pill); padding: 1px 7px; margin-left: 4px; }
.sh-tip { display: block; margin-top: 6px; color: var(--muted); font-size: calc(11.5px * var(--fz)); }

/* ---------- Chữ & khổ trang công khai (17/10/2026) ----------
   Tiêu đề lớn: Old Standard TT (thanh, sang); nhấn ý bằng <em> (Old Standard nghiêng, màu nhấn) hoặc .hl-sans (Reddit Sans mảnh).
   Chữ nhỏ, nút, menu: Reddit Sans 400–600 — không dùng 800 cho chữ thường. Khổ nội dung rộng tới 1440 px trên máy tính. */
body.site { font-weight: 400; }
.s-main { width: min(1440px, 100% - clamp(32px, 6vw, 112px)); }
.s-main.narrow, .s-doc { max-width: 920px; }
.s-hero h1, .s-doc h1, .w-sec h2, .w-final h2, .s-404 h1, .s-auth h1, .sh-head h1, .sh-vote h2, .p-h2, .a-body h1, .t-mside h2, .hp h1, .hp h2, .s-sec > h2 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: -.015em; }
.s-hero h1 { font-size: clamp(38px, 5vw, 72px); line-height: 1.04; }
.s-sec > h2 { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.12; }
.w-final h2 { font-size: clamp(34px, 4.4vw, 64px); }
:is(.s-hero h1, .s-doc h1, .w-sec h2, .w-final h2, .hp h1, .hp h2, .s-sec > h2, .p-h2) em { font-family: var(--font-display); font-style: italic; font-weight: 400; 
  /* nền chữ chuyển sắc chỉ vẽ trong hộp chữ → dấu tiếng Việt (ẩ, ỗ…) và nét nghiêng bị cắt: nới vùng vẽ (padding dọc không đổi bố cục dòng) */
  padding: .22em .1em .18em .04em; margin: 0 -.06em 0 -.04em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(100deg, var(--accent-strong) 0%, var(--lav) 60%, var(--coral) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
/* Ngắt dòng theo nhịp đọc: tiêu đề cân dòng, đoạn văn tránh chữ mồ côi; máy tính giữ cụm nhấn (em) trên một dòng */
.site :is(h1, h2, h3) { text-wrap: balance; } .site :is(p, li, .w-sub, small) { text-wrap: pretty; }
@media (min-width: 761px) { .site :is(h1, h2, h3) em, .site .nw { white-space: nowrap; } }
@media (max-width: 760px) { .site br.pc { display: none; } } /* xuống dòng chỉ cho máy tính */
.hl-sans { font-family: var(--font-ui); font-weight: 300; letter-spacing: -.03em; }
.site h3, .s-plan h3, .s-card b { font-family: var(--font-ui); font-weight: 600; letter-spacing: -.01em; }
.s-plan h3 { font-size: calc(20px * var(--fz)); }
.s-plan .price { font-weight: 600; } .s-plan .tag { font-weight: 600; }
.site .btn { font-weight: 600; }
.s-top nav a { font-weight: 500; } .s-brand { font-weight: 600; }
.w-kicker { font-weight: 600; letter-spacing: .08em; }
.s-faq summary { font-weight: 500; }
.s-plan.pop { border: 2px solid var(--accent); box-shadow: 0 20px 48px color-mix(in srgb, var(--accent) 22%, transparent); }
/* Thanh trên khi đã cuộn + chuyển động mượt (ease-out) */
.s-top { transition: box-shadow .3s ease, background .3s ease, transform .35s cubic-bezier(.16, 1, .3, 1); } .s-top.scrolled { box-shadow: 0 8px 28px rgba(0, 0, 0, .18); }
.s-top.hide { transform: translateY(-100%); box-shadow: none; }
.s-top nav a { transition: color .2s ease, background .2s ease; }
.rv { transform: translateY(26px); transition: opacity .8s cubic-bezier(.16, 1, .3, 1) var(--rv-d, 0ms), transform .9s cubic-bezier(.16, 1, .3, 1) var(--rv-d, 0ms); }
.site .btn { transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s, background .2s, border-color .2s, color .2s; }
.site .btn:not(.primary):hover { transform: translateY(-1px); }
.site .btn.primary:hover { box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 35%, transparent); }
.w-win img, .w-win video { transition: transform .9s cubic-bezier(.16, 1, .3, 1); }
@media (max-width: 680px) { .s-hero h1 { font-size: clamp(32px, 9vw, 44px); } }
/* Mã giảm giá đối tác KOC / KOL (Bảng giá + hộp thanh toán) */
.s-promo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; justify-content: center; margin: 22px auto 0; max-width: 640px; }
.s-promo label { font-weight: 600; font-size: calc(14px * var(--fz)); }
.s-promo small { flex: 1 1 100%; text-align: center; margin: 0; }
.s-promo-row { display: flex; gap: 8px; margin: 8px 0; }
.s-promo-row input { width: 170px; flex: 1 1 auto; text-transform: uppercase; font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); color: var(--ink); }
.s-plan .price s.old { display: block; font-size: calc(15px * var(--fz)); font-weight: 600; color: var(--muted); letter-spacing: 0; }
.s-plan .price .pm.promo { color: var(--accent-ink); font-weight: 700; }
.a-form select { font: inherit; font-weight: 400; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); }
.a-grid2 label:has(textarea) { grid-column: 1 / -1; }

/* Trang khách duyệt (0.17.2): ảnh minh hoạ trong góp ý, trạng thái do nhà thiết kế đánh dấu, round cũ, xem trước của nhà thiết kế */
.sh-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sh-imgs img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); display: block; }
.sh-att { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-att:empty { display: none; }
.sh-att span { position: relative; }
.sh-att img { width: 58px; height: 58px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); display: block; }
.sh-att button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--inv); color: var(--on-inv); display: grid; place-items: center; cursor: pointer; padding: 0; }
.sh-up { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.sh-st { display: inline-block; margin-top: 6px; font-size: calc(11px * var(--fz)); font-weight: 700; padding: 1px 8px; border-radius: var(--r-pill); background: var(--warn-soft); color: var(--warn-ink); }
.sh-st.done { background: var(--accent-soft); color: var(--accent-ink); }
.sh-old { margin: 0 0 8px; font-size: calc(12px * var(--fz)); color: var(--muted); }
.sh-old summary { cursor: pointer; padding: 4px 0; }
.sh-old .sh-cmts { max-height: 240px; opacity: .8; }
body.sh-preview .sh-cform { display: none; }
body.sh-preview .sh-top { display: none; }
/* Xem trước trong trang Duyệt: khung phải của trang Duyệt đã có phản hồi → bỏ cột bình luận trùng, tiêu đề gọn,
   bản xem trước chiếm trọn khung và luôn vừa chiều cao (không bị cắt, không bó thành cột hẹp) */
body.sh-preview { height: 100vh; min-height: 0; overflow: hidden; }
body.sh-preview .sh-main { width: calc(100% - 24px); padding: 10px 0 12px; display: flex; flex-direction: column; min-height: 0; }
body.sh-preview .sh-head h1 { font-size: calc(18px * var(--fz)); margin: 0 0 2px; }
body.sh-preview .sh-head p { margin: 0 0 6px; font-size: calc(13px * var(--fz)); }
body.sh-preview .sh-head p:empty { display: none; }
body.sh-preview .sh-bar { margin-bottom: 8px; }
body.sh-preview .sh-layout { display: grid; flex: 1; height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr); }
body.sh-preview .sh-side { display: none; }
body.sh-preview .sh-stage { grid-auto-rows: minmax(0, 1fr); } /* khung hẹp < 760 px: không dùng bố cục điện thoại (ô ảnh cao cố định) */
body.sh-preview .sh-box { height: auto; min-height: 0; flex: 1; }

/* Lời mời làm thử (js/site.js nudge) — khách chưa có tài khoản */
.s-nudge { position: fixed; right: 20px; top: calc(var(--s-top-h, 64px) + 14px); z-index: 250; width: min(340px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateY(-16px); transition: opacity .35s cubic-bezier(.16, 1, .3, 1), transform .35s cubic-bezier(.16, 1, .3, 1), top .35s cubic-bezier(.16, 1, .3, 1); }
.top-hidden .s-nudge { top: 14px; }
.s-nudge.on { opacity: 1; transform: none; }
.s-nudge > b { font-size: calc(16px * var(--fz)); font-weight: 600; padding-right: 28px; }
.s-nudge p { margin: 0 0 4px; color: var(--muted); font-size: calc(13.5px * var(--fz)); line-height: 1.5; }
.s-nudge .s-google { margin: 0; justify-content: center; }
.s-nudge .btn.block { width: 100%; justify-content: center; }
.s-nudge-x { position: absolute; top: 10px; right: 10px; }
@media (max-width: 760px) { .s-nudge { left: 16px; right: 16px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .s-nudge, .s-top { transition: none; } }
/* Chế độ Sửa trang chủ (js/site-edit.js, chỉ quản trị viên) */
.pv-edit-go { position: fixed; left: 20px; bottom: 20px; z-index: 240; box-shadow: var(--shadow-2); }
.pv-editing [data-e][contenteditable] { outline: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; border-radius: 4px; cursor: text; }
.pv-editing [data-e][contenteditable]:hover, .pv-editing [data-e][contenteditable]:focus { outline: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pv-editing .rv { opacity: 1 !important; transform: none !important; }
.pv-editing main { padding-bottom: 80px; }
.pv-editing section[data-sec] { position: relative; }
.pv-sec { position: absolute; top: 10px; right: 16px; z-index: 30; display: flex; align-items: center; gap: 8px; }
.pv-sec span { font-size: calc(11px * var(--fz)); color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px 8px; }
section.pv-off > :not(.pv-sec) { opacity: .28; filter: grayscale(1); }
.pv-media { position: fixed; z-index: 300; display: flex; gap: 6px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.pv-gal-go { display: flex; margin: 0 auto 18px; }
.pv-ebar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 320; width: min(980px, calc(100vw - 32px)); display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); font-size: calc(13px * var(--fz)); }
.pv-ebar .sp { flex: 1; } .pv-ebar [data-n] { color: var(--muted); } .pv-ebar.dirty [data-n] { color: var(--warn); font-weight: 600; }
.pv-ebar select { width: auto; max-width: 180px; background: var(--field); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 8px; font: inherit; }
.pv-dlg { position: fixed; inset: 0; z-index: 400; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.pv-dbox { width: min(960px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.pv-dhead, .pv-dfoot { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); } .pv-dfoot { border: 0; border-top: 1px solid var(--line); } .pv-dfoot .sp { flex: 1; }
.pv-dhead span { color: var(--muted); font-size: calc(12.5px * var(--fz)); flex: 1; }
.pv-glist { overflow: auto; padding: 8px 16px; display: grid; gap: 10px; }
.pv-gi { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-2); }
.pv-gi img { width: 96px; height: 96px; object-fit: contain; background: var(--hover); border-radius: var(--r-sm); }
.pv-gf { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.pv-gf label { display: grid; gap: 3px; font-size: calc(11.5px * var(--fz)); color: var(--muted); font-weight: 500; }
.pv-gf input, .pv-gf select { background: var(--field); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 8px; font: calc(13px * var(--fz)) var(--font-ui); min-width: 0; }
.pv-ga { display: flex; flex-direction: column; gap: 4px; align-items: stretch; } .pv-ord { display: flex; gap: 4px; } .pv-up svg { transform: rotate(180deg); }
@media (max-width: 700px) { .pv-gi { grid-template-columns: 64px 1fr; } .pv-gi img { width: 64px; height: 64px; } .pv-ga { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } }
/* Mua gói (js/pricing.js): chọn gói → thanh toán → cảm ơn + giới thiệu Affiliate */
.s-paywrap { width: min(720px, 100%); max-height: 92vh; overflow: auto; }
.s-choose, .s-done { background: var(--panel); border-radius: 20px; padding: 24px; }
.s-choose h2, .s-done h2 { margin: 0 0 4px; }
.s-opts { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 10px; }
.s-opt { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.s-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.s-opt.off { opacity: .55; cursor: default; }
.s-opt input { accent-color: var(--accent); width: 18px; height: 18px; }
.s-opt-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .s-opt-t b { font-size: calc(15px * var(--fz)); } .s-opt-t small { color: var(--muted); font-size: calc(12.5px * var(--fz)); }
.s-opt .tag { font-style: normal; font-size: calc(11px * var(--fz)); font-weight: 700; margin-left: 6px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--sel-bg); color: var(--sel-ink); }
.s-opt .pr { text-align: right; white-space: nowrap; } .s-opt .pr b { font-size: calc(17px * var(--fz)); display: block; } .s-opt .pr s { color: var(--muted); font-size: calc(12px * var(--fz)); } .s-opt .pr small { color: var(--muted); font-size: calc(12px * var(--fz)); }
.s-choose .act, .s-done .act { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.s-thanks { text-align: center; padding: 6px 0 18px; } .s-thanks > .ic { color: var(--accent-ink); width: 44px; height: 44px; padding: 8px; border-radius: 50%; background: var(--accent-soft); }
.s-thanks p { color: var(--muted); margin: 6px auto 14px; max-width: 460px; }
.s-aff { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.s-aff-k { margin: 0; font-size: calc(12px * var(--fz)); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); }
.s-aff h3 { margin: 4px 0 6px; font-size: calc(19px * var(--fz)); } .s-aff h3 em { font-style: normal; color: var(--accent-ink); }
.s-aff > p { margin: 0 0 12px; color: var(--muted); font-size: calc(14px * var(--fz)); }
.s-aff-code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; } .s-aff-code span { color: var(--muted); font-size: calc(13px * var(--fz)); }
.s-aff-code code { font-size: calc(16px * var(--fz)); font-weight: 700; padding: 4px 10px; border-radius: var(--r-sm); background: var(--panel); border: 1px dashed var(--line); letter-spacing: .04em; }
.s-aff-ban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-radius: var(--r-md); padding: 12px; background: var(--grad-night); color: var(--on-dark); }
.s-aff-ban div { text-align: center; } .s-aff-ban b { display: block; font-size: calc(20px * var(--fz)); } .s-aff-ban small { font-size: calc(12px * var(--fz)); opacity: .85; }
.s-aff-more { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; font-weight: 600; color: var(--accent-ink); }
.s-plan .who b.hl { color: var(--accent-ink); }
@media (max-width: 640px) { .s-aff-ban { grid-template-columns: 1fr; } .s-opt { grid-template-columns: auto 1fr; } .s-opt .pr { grid-column: 2; text-align: left; } }

/* ---------- Học thiết kế bao bì (/hoc, tools/gen-hoc.mjs): cột đọc 760 px, hình khuôn rộng hơn ---------- */
.hb { width: min(1080px, 100% - 32px); margin: 0 auto; padding: 28px 0 56px; }
.hb-crumb { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: calc(13px * var(--fz)); color: var(--muted); margin-bottom: 18px; }
.hb-crumb a { color: var(--accent-ink); font-weight: 600; } .hb-crumb span::before { content: '›'; margin-right: 10px; }
.hb-art-wrap, .hb-hero { max-width: 760px; margin: 0 auto; }
.hb a.hb-card, .hb a.hb-pg, .hb a.hb-tpl, .hb-crumb a { text-decoration: none; }
.hb h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4.4vw, 50px); line-height: 1.08; letter-spacing: -.01em; margin: 0 0 14px; }
.hb h1 em { font-family: var(--font-display); font-style: italic; background: var(--grad-mint); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hb h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(25px, 2.6vw, 32px); line-height: 1.15; margin: 38px 0 12px; }
.hb-lead { font-size: calc(18px * var(--fz)); line-height: 1.6; color: var(--ink-3); margin: 0 0 18px; }
.hb-body p, .hb-body li, .hb-do li, .hb-box li { font-size: calc(16px * var(--fz)); line-height: 1.7; color: var(--ink-3); }
.hb-body ul, .hb-body ol, .hb-do ol, .hb-box ul { padding-left: 22px; } .hb-body li, .hb-do li { margin: 6px 0; }
.hb-body b, .hb-do b { color: var(--ink); font-weight: 600; }
.hb-learn { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px; box-shadow: var(--shadow-1); }
.hb-learn > b { display: block; font-size: calc(14px * var(--fz)); margin-bottom: 10px; }
.hb-tip { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: var(--r-md); padding: 12px 16px; margin: 18px 0; font-size: calc(15px * var(--fz)); line-height: 1.6; color: var(--ink); }
.hb-fig { margin: 22px 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.hb-fig svg { display: block; width: 100%; height: auto; max-height: 520px; }
.hb-fig figcaption { margin-top: 10px; font-size: calc(14px * var(--fz)); line-height: 1.55; color: var(--muted); }
.hb-fig figcaption b { color: var(--ink); }
.hb-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .hb-grid2 .hb-fig { margin: 8px 0; }
/* Màu khuôn: dao cắt theo chữ, dao cấn đỏ (--danger, như khung Dieline), mặt đang nói tới tô màu nhấn */
.hb-net, .hb-art { color: var(--ink); }
.hb-net .pf, .hb-art .pf { fill: color-mix(in srgb, var(--ink) 4%, transparent); stroke: none; }
.hb-net .pf.hi, .hb-art .pf.hi { fill: color-mix(in srgb, var(--accent) 26%, transparent); }
.hb-net .cut, .hb-art .cut { stroke: currentColor; stroke-width: 1.1; fill: none; vector-effect: non-scaling-stroke; }
.hb-net .cr { stroke: var(--danger); stroke-width: 1; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }
.hb-net .seam { stroke: var(--danger); stroke-width: 3.5; vector-effect: non-scaling-stroke; }
.hb-net .lb, .hb-net .mk { fill: var(--ink); text-anchor: middle; font-family: var(--font-ui); font-weight: 600; }
.hb-art .lb { fill: var(--ink); font-family: var(--font-ui); font-weight: 600; font-size: calc(10px * var(--fz)); } /* đơn vị viewBox của hình */
.hb-art .mk { fill: var(--muted); font-family: var(--font-ui); font-size: calc(9.5px * var(--fz)); }
.hb-art .dim { stroke: var(--muted); stroke-width: 1; }
.hb-art .bleed { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: var(--accent); stroke-dasharray: 4 3; }
.hb-art .safe { fill: none; stroke: var(--ok); stroke-width: 1.2; stroke-dasharray: 6 4; }
.hb-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: -8px 0 18px; font-size: calc(13px * var(--fz)); color: var(--muted); }
.hb-legend i { display: inline-block; width: 22px; height: 0; vertical-align: middle; margin-right: 6px; border-top: 2px solid var(--ink); }
.hb-legend .lg-cr { border-top: 2px dashed var(--danger); } .hb-legend .lg-hi { height: 12px; border: 0; border-radius: 3px; background: color-mix(in srgb, var(--accent) 26%, transparent); }
.hb-tpls { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 18px 0; }
.hb-tpl { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; text-align: center; transition: transform .25s cubic-bezier(.16, 1, .3, 1), border-color .2s; }
.hb-tpl:hover { transform: translateY(-3px); border-color: var(--accent); }
.hb-tpl img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; } .hb-tpl b { font-size: calc(13px * var(--fz)); font-weight: 600; color: var(--ink); }
.hb-do { margin: 40px 0 18px; padding: 22px 24px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--accent-line); box-shadow: var(--shadow-1); }
.hb-do h2 { margin-top: 0; } .hb-do .w-cta { margin-top: 14px; }
.hb-box { margin: 18px 0; } .hb-box h2 { font-size: clamp(22px, 2.2vw, 26px); margin: 26px 0 8px; }
.hb-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 36px; }
.hb-pg { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.hb-pg.next { text-align: right; } .hb-pg small { color: var(--muted); font-size: calc(12px * var(--fz)); } .hb-pg b { color: var(--ink); font-weight: 600; font-size: calc(15px * var(--fz)); }
.hb-pg:hover { border-color: var(--accent); }
/* Mục lục */
.hb-hero { text-align: left; padding: 24px 0 8px; } .hb-hero .w-cta { margin-top: 8px; }
.hb-prog { margin-top: 16px; font-size: calc(15px * var(--fz)); color: var(--ink-3); } .hb-prog a { color: var(--accent-ink); font-weight: 600; margin-left: 6px; }
.hb-level { max-width: 900px; margin: 0 auto; } .hb-cards { display: flex; flex-direction: column; gap: 10px; }
.hb-card { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); transition: transform .25s cubic-bezier(.16, 1, .3, 1), border-color .2s; }
.hb-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.hb-n { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: calc(15px * var(--fz)); }
.hb-card.done .hb-n { background: var(--accent); color: var(--on-accent); } .hb-card.done .hb-n { font-size: 0; } .hb-card.done .hb-n::before { content: '✓'; font-size: calc(16px * var(--fz)); }
.hb-ct { display: flex; flex-direction: column; gap: 4px; } .hb-ct b { color: var(--ink); font-weight: 600; font-size: calc(17px * var(--fz)); }
.hb-ct small { color: var(--muted); font-size: calc(14px * var(--fz)); line-height: 1.5; } .hb-ct em { font-style: normal; color: var(--accent-ink); font-size: calc(12px * var(--fz)); font-weight: 600; }
@media (max-width: 760px) { .hb-grid2, .hb-pager { grid-template-columns: 1fr; } .hb-tpls { grid-template-columns: repeat(2, 1fr); } .hb-pg.next { text-align: left; } .hb-do { padding: 18px 16px; } }
@media (prefers-reduced-motion: reduce) { .hb-tpl, .hb-card { transition: none; } .hb-tpl:hover, .hb-card:hover { transform: none; } }
.hb-date { font-size: calc(13px * var(--fz)); color: var(--muted); margin: -6px 0 18px; }
.hb-figimg { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.pv-editing .pv-secbox { position: relative; outline: 1px dashed var(--line); outline-offset: 6px; border-radius: var(--r-md); }
.pv-editing .hb-sec { padding-top: 34px; }
.hb-seo { width: min(620px, 100%); display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.hb-seo > label, .hb-seo > .hb-cnt, .hb-seo > .hb-serp, .hb-seo > .hb-seo-img, .hb-seo > .hb-seo-tips { margin-left: 18px; margin-right: 18px; }
.hb-seo label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: calc(13px * var(--fz)); margin-top: 10px; }
.hb-seo input, .hb-seo textarea { font: inherit; font-weight: 400; padding: 9px 11px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--field); color: var(--ink); }
.hb-cnt { color: var(--muted); font-size: calc(12px * var(--fz)); } .hb-cnt.ok { color: var(--ok); } .hb-cnt.bad { color: var(--danger); }
.hb-serp { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line); }
.hb-serp small { color: var(--muted); font-size: calc(12px * var(--fz)); } .hb-serp b { display: block; color: var(--accent-ink); font-weight: 500; font-size: calc(17px * var(--fz)); margin: 2px 0; } .hb-serp p { margin: 0; color: var(--ink-3); font-size: calc(13px * var(--fz)); line-height: 1.5; }
.hb-seo-img { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--muted); font-size: calc(13px * var(--fz)); } .hb-seo-img img { width: 120px; height: 63px; object-fit: cover; border-radius: var(--r-sm); }
.hb-seo-tips { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: calc(12px * var(--fz)); line-height: 1.6; }
