/* ============================================================================
 * Pixelius Tools — trang giới thiệu pixelius-tools.html + thẻ "04" trên trang chủ (web 7.9.0, F30)
 * Nạp SAU css/site.css (dùng biến --ink --orange --yellow --green --peach --sand --muted --display).
 * Tách file riêng để không phải đổi site.css (đổi site.css = nâng ?v= ở mọi trang).
 * ========================================================================== */

/* ---------- Khung cửa sổ app quanh ảnh chụp ---------- */
.tl-win { background: var(--white); border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; }
.tl-win-bar { height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; border-bottom: 1.5px solid var(--ink); font-size: 13px; }
.tl-win-bar > span:first-child { display: inline-flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-win-bar img { width: 16px; height: 16px; display: block; }
.tl-dots { display: inline-flex; gap: 6px; }
.tl-dots i { width: 10px; height: 10px; border-radius: 999px; border: 1.5px solid var(--ink); }
.tl-dots i:last-child { background: var(--ink); }
.tl-win > img { display: block; width: 100%; height: auto; }

/* ---------- Hero ---------- */
.tl-hero { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 5vw, 64px); padding-top: clamp(16px, 3vw, 40px); }
.tl-hero-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.tl-h1 { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 4.6vw, 66px); line-height: 1.08; letter-spacing: -.035em; }
.tl-mark { background: var(--yellow); border-radius: .22em; padding: 0 .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tl-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; color: var(--muted); }
.tl-checks span { display: inline-flex; align-items: center; gap: 8px; }
.tl-checks .ic { stroke-width: 2.6; color: var(--ink); }
.tl-hero-vis { flex: 1.3 1 520px; min-width: 0; background: var(--orange); border-radius: clamp(24px, 3vw, 40px); padding: clamp(14px, 3vw, 36px); }

/* ---------- Tiêu đề khối ---------- */
.tl-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 32px; margin-bottom: 36px; }
.tl-head .h2 { flex: 1 1 420px; }
.tl-head .lead { flex: 1 1 360px; }

/* ---------- Lưới 8 công cụ ---------- */
.tl-grid8 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tl-tool { background: var(--white); border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 12px; min-height: 172px; transition: transform .15s ease; }
.tl-tool:hover { transform: translateY(-2px); }
.tl-tool-top { display: flex; align-items: center; justify-content: space-between; }
.tl-num { font-family: var(--display); font-size: 13px; font-weight: 700; }
.tl-ic { width: 44px; height: 44px; border-radius: 999px; background: var(--ink); color: var(--white); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tl-ic-o { background: var(--orange); color: var(--ink); }
.tl-ic-y { background: var(--yellow); color: var(--ink); }
.tl-tool b { font-family: var(--display); font-size: 19px; letter-spacing: -.02em; line-height: 1.2; }
.tl-tool .tl-d { font-size: 15px; color: var(--muted); }

/* ---------- Khối từng công cụ ---------- */
.tl-sec { padding-top: 24px; }
.tl-sec-first { padding-top: clamp(48px, 6vw, 80px); }
.tl-card { background: var(--white); border-radius: clamp(24px, 3vw, 40px); padding: clamp(24px, 4vw, 56px); display: flex; flex-wrap: wrap; align-items: center; gap: clamp(28px, 4vw, 56px); }
.tl-card-rev { flex-wrap: wrap-reverse; }
.tl-card-col { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
.tl-card-ink { background: var(--ink); color: var(--white); }
.tl-card-orange { background: var(--orange); }
.tl-card-line { border: 2px solid var(--ink); }
.tl-text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.tl-kicker { font-family: var(--display); font-size: 14px; font-weight: 700; }
.tl-card-ink .tl-kicker { color: var(--orange); }
.tl-h3 { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 2.8vw, 40px); line-height: 1.12; letter-spacing: -.03em; }
.tl-p { font-size: 17px; color: var(--muted); }
.tl-card-ink .tl-p { color: rgba(255, 255, 255, .82); }
.tl-card-orange .tl-p { color: var(--ink); }
.tl-list { display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.tl-list li { display: flex; gap: 12px; align-items: flex-start; }
.tl-ck { flex-shrink: 0; width: 26px; height: 26px; border-radius: 999px; background: var(--green); color: var(--ink); display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.tl-ck .ic { width: 15px; height: 15px; stroke-width: 3; }
.tl-card-ink .tl-list { color: rgba(255, 255, 255, .92); }
.tl-card-ink .tl-list b { color: var(--white); }
.tl-card-ink .tl-ck { background: var(--orange); }
.tl-vis { flex: 1.2 1 440px; min-width: 0; border-radius: 28px; padding: clamp(14px, 2vw, 24px); }
.tl-vis-col { display: flex; flex-direction: column; gap: 12px; }
.tl-vis-peach { background: var(--peach); }
.tl-vis-sand { background: var(--sand); }
.tl-vis-cream { background: var(--cream); }
.tl-cap { font-size: 13px; color: var(--muted); }
.tl-card-ink .tl-cap { color: rgba(255, 255, 255, .7); }

/* 02 — thẻ cảnh báo độ nét */
.tl-dpi { flex: 1.15 1 440px; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tl-dpi-card { background: var(--white); color: var(--ink); border-radius: 20px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.tl-dpi-ph { aspect-ratio: 2 / 3; border-radius: 12px; background: var(--sand); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.tl-dpi-ph .ic { width: 44px; height: 44px; stroke-width: 1.6; }
.tl-dpi-card > span { font-size: 13px; font-weight: 600; }
.tl-badge { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.tl-b-ok { background: var(--green); }
.tl-b-warn { background: var(--yellow); }
.tl-b-bad { background: #B42318; color: var(--white); }
.tl-dpi .tl-cap { grid-column: 1 / -1; }

/* 03 — tấm ghép tiệc */
.tl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-chip { font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; background: var(--white); }
.tl-chip-on { background: var(--ink); color: var(--white); }
.tl-sheet { width: 100%; max-width: 440px; align-self: center; background: var(--white); border: 2px solid var(--ink); border-radius: 16px; padding: 14px; }
.tl-sheet-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 10px; }
.tl-sheet-top span { font-weight: 700; color: #0F7A3D; }
.tl-sheet-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; border: 1.5px dashed #98928A; padding: 4px; }
.tl-sheet-grid i { aspect-ratio: 12.7 / 18; background: #D9CFBD; }
.tl-sheet-grid i:nth-child(3n) { background: #C4B79F; }
.tl-sheet-grid i:nth-child(4n+1) { background: #CFC3AD; }

/* 04 — ảnh ghép lớn + 4 ô */
.tl-ghep-img { flex: .8 1 320px; min-width: 0; display: flex; justify-content: center; }
.tl-ghep-img .tl-win { width: 100%; max-width: 420px; }
.tl-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tl-mini > div { background: var(--white); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.tl-mini b { font-size: 16px; }
.tl-mini span { font-size: 15px; color: var(--muted); }

/* 05 — tin nhắn khách */
.tl-box { background: var(--white); border: 2px solid var(--ink); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tl-box > b { font-size: 13px; }
.tl-msg { font-size: 15px; line-height: 1.55; background: var(--cream); border-radius: 10px; padding: 12px 14px; }
.tl-code { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--green); }
.tl-code-neg { background: var(--white); border: 1.5px solid #B42318; color: #B42318; text-decoration: line-through; }
.tl-sum { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 600; }
.tl-sum span { padding: 5px 12px; border-radius: 999px; background: var(--sand); }
.tl-sum span:first-child { background: var(--ink); color: var(--white); }

/* 06 — bảng đổi tên */
.tl-rename-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.tl-rename-rule b { padding: 5px 12px; border-radius: 10px; background: var(--white); border: 1.5px solid var(--ink); }
.tl-table { background: var(--white); border-radius: 16px; overflow: hidden; font-size: 14px; }
.tl-row { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1.3fr); gap: 8px; padding: 10px 14px; border-top: 1px solid var(--sand); align-items: center; }
.tl-row > * { min-width: 0; overflow-wrap: anywhere; }
.tl-row-h { background: var(--ink); color: var(--white); font-weight: 600; border-top: 0; }
.tl-row-off { color: #98928A; }
.tl-row-off > span:first-child { text-decoration: line-through; }

/* 07 — convert */
.tl-split { display: flex; flex-wrap: wrap; gap: clamp(24px, 3vw, 40px); align-items: flex-start; }
.tl-split .tl-vis { flex: 1.3 1 460px; }
.tl-stack { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.tl-feat { border: 2px solid var(--ink); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.tl-feat b { font-size: 16px; }
.tl-feat span { font-size: 15px; color: var(--muted); }
.tl-feat-ink { flex-direction: row; gap: 14px; align-items: flex-start; background: var(--ink); color: var(--white); border-color: var(--ink); }
.tl-feat-ink .tl-ic { width: 40px; height: 40px; }
.tl-feat-ink > span { display: flex; flex-direction: column; gap: 4px; color: rgba(255, 255, 255, .82); }
.tl-feat-ink > span b { color: var(--white); }

/* 08 — hộp hỏi tải Google Drive */
.tl-pop-wrap { flex: 1.1 1 420px; min-width: 0; display: flex; justify-content: center; }
.tl-pop { width: 100%; max-width: 520px; background: var(--white); color: var(--ink); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.tl-pop-h { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.tl-pop-h .tl-ic { width: 36px; height: 36px; }
.tl-link { border: 1.5px solid var(--sand); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.tl-link b { font-size: 14px; }
.tl-link span { font-size: 13px; color: var(--muted); }
.tl-link .tl-new { color: #0F7A3D; font-weight: 600; }
.tl-pop-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.tl-pop-btns span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--ink); font-size: 14px; font-weight: 600; }
.tl-pop-btns span:last-child { background: var(--ink); color: var(--white); }
.tl-pop .tl-cap { font-size: 12px; }

/* ---------- Tiện ích chung ---------- */
.tl-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tl-util { background: var(--white); border-radius: 28px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.tl-util b { font-family: var(--display); font-size: 18px; letter-spacing: -.02em; line-height: 1.25; }
.tl-util span:last-child { font-size: 15px; color: var(--muted); }

/* ---------- Tài khoản & hệ sinh thái ---------- */
.tl-acc { background: var(--peach); border-radius: clamp(24px, 3vw, 40px); padding: clamp(24px, 4vw, 56px); display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 56px); }
.tl-acc .tl-ck { background: var(--ink); color: var(--white); }
.tl-eco { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.tl-eco > span { font-size: 14px; font-weight: 600; color: var(--muted); }
.tl-eco a { background: var(--white); border-radius: 22px; padding: 18px 20px; display: flex; align-items: center; gap: 16px; transition: transform .15s ease; }
.tl-eco a:hover { transform: translateX(3px); }
.tl-eco a > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tl-eco a b { font-size: 16px; }
.tl-eco a small { font-size: 14px; color: var(--muted); }
.tl-ic-line { background: var(--white); color: var(--ink); border: 2px solid var(--ink); }

/* ---------- Khối tải về (dẫn sang download.html#tools) ---------- */
.tl-dl { background: var(--ink); color: var(--white); border-radius: clamp(24px, 3vw, 40px); padding: clamp(32px, 5vw, 72px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.tl-dl > div:first-child { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tl-dl h2 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.8vw, 56px); line-height: 1.08; letter-spacing: -.035em; }
.tl-dl h2 span { color: var(--orange); }
.tl-dl p { font-size: 17px; color: rgba(255, 255, 255, .82); }
.tl-dl-act { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.tl-dl-act .btn-go { background: var(--orange); color: var(--ink); }
.tl-dl-act .btn-go:hover { background: #ff7a45; }
.tl-dl-act .btn-go .dot { background: var(--ink); color: var(--orange); }
.tl-dl-act .ul-link { color: var(--white); }
.tl-dl-act .ul-link:hover { color: var(--orange); }

/* ---------- Thẻ "04 · Pixelius Tools" trên trang chủ (khối #tai-app) ---------- */
.tl-home { margin-top: 24px; background: var(--yellow); border-radius: 40px; padding: clamp(28px, 4vw, 48px); display: flex; flex-wrap: wrap; align-items: center; gap: 28px 48px; }
.tl-home-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.tl-home-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tl-home-top > span:first-child { font-family: var(--display); font-size: 15px; font-weight: 700; }
.tl-home-tag { height: 28px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--ink); color: var(--white); font-family: var(--display); font-size: 11px; font-weight: 700; }
.tl-home h3 { font-family: var(--display); font-size: clamp(26px, 3vw, 40px); font-weight: 700; letter-spacing: -.03em; line-height: 1.12; }
.tl-home p { font-size: 17px; max-width: 560px; }
.tl-home-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.tl-home-cta .btn { height: 52px; }
.tl-home .tl-win { flex: 1 1 460px; min-width: 0; }

/* ---------- Màn nhỏ ---------- */
@media (max-width: 1100px) {
  .tl-grid8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .tl-home { border-radius: 28px; padding: 24px; gap: 20px; }
  .tl-home .tl-win { flex-basis: 100%; }
}
@media (max-width: 600px) {
  .tl-grid8, .tl-grid3, .tl-mini { grid-template-columns: 1fr; }
  .tl-tool { min-height: 0; }
  .tl-hero-vis, .tl-vis, .tl-dpi, .tl-ghep-img, .tl-pop-wrap, .tl-text, .tl-stack, .tl-eco { flex-basis: 100%; }
  .tl-dpi { gap: 8px; }
  .tl-dpi-card { padding: 8px; border-radius: 14px; }
  .tl-dpi-card > span { font-size: 12px; }
  .tl-badge { font-size: 11px; padding: 3px 7px; }
}
