/* Tên Hay Cho Bé – giao diện giấy dó, mực tàu, con dấu son */
:root {
  --giay: #F4ECDF;
  --giay-2: #EADFCB;
  --giay-3: #FBF7F0;
  --muc: #1E1B18;
  --muc-2: #4A433C;
  --muc-3: #847A6F;
  --son: #B23A2B;
  --son-2: #8E2B1F;
  --ngoc: #2F5E55;
  --dong: #A8874E;
  --vien: #D8CBB4;
  --kim: #A0916B; --moc: #4F7A4A; --thuy: #2E5E78; --hoa: #B5452F; --tho: #9A7444;
  --serif: 'Cormorant Garamond', 'Noto Serif', Georgia, serif;
  --sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --han: 'Noto Serif TC', 'Songti TC', 'PMingLiU', 'MingLiU', serif;
  --r: 4px;
}

.tl-wrap, .tl-hero { font-family: var(--sans); color: var(--muc); line-height: 1.65; }
.tl-wrap { max-width: 980px; margin: 0 auto; }
.tl-wrap h2, .tl-wrap h3, .tl-wrap h4, .tl-hero h1 { font-family: var(--serif); color: var(--muc); letter-spacing: .005em; }
.tl-wrap h3 { font-size: 1.55rem; font-weight: 600; margin: 0 0 .6em; }
.tl-wrap h4 { font-size: 1.2rem; font-weight: 600; margin: 1.2em 0 .4em; }
.tl-small { font-size: .86rem; color: var(--muc-3); }
.tl-center { text-align: center; }
.tl-note { background: #FFF6E2; border-left: 3px solid var(--dong); padding: .7em 1em; font-size: .95rem; }
.tl-err { color: var(--son-2); font-weight: 500; }
.tl-lead { font-family: var(--serif); font-size: 1.3rem; font-style: italic; color: var(--muc-2); }

/* ---------- nút ---------- */
.tl-btn, .tl-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font: 600 1rem/1 var(--sans); padding: .9em 1.5em; border-radius: var(--r);
  cursor: pointer; text-decoration: none !important; transition: transform .15s, box-shadow .15s, background .15s;
  border: 1px solid var(--son); min-height: 46px;
}
.tl-btn { background: var(--son); color: #FFF8F0 !important; box-shadow: 0 2px 0 var(--son-2); }
.tl-btn:hover { background: var(--son-2); transform: translateY(-1px); }
.tl-btn:active { transform: translateY(1px); box-shadow: none; }
.tl-btn-ghost { background: transparent; color: var(--son) !important; }
.tl-btn-ghost:hover { background: rgba(178,58,43,.06); }
.tl-btn-lg { font-size: 1.08rem; padding: 1.05em 1.8em; }
.tl-btn[disabled] { opacity: .6; cursor: wait; }
.tl-loading::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tl-spin .8s linear infinite; }
@keyframes tl-spin { to { transform: rotate(360deg); } }

/* ---------- form ---------- */
.tl-form { background: var(--giay-3); border: 1px solid var(--vien); border-radius: var(--r); padding: clamp(18px, 4vw, 34px); position: relative; box-shadow: 0 1px 0 #fff inset, 0 18px 40px -28px rgba(30,27,24,.35); }
.tl-form::before { content: ''; position: absolute; inset: 7px; border: 1px solid rgba(168,135,78,.28); pointer-events: none; border-radius: 2px; }
.tl-form fieldset { border: 0; margin: 0; padding: 0; }
.tl-form legend { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; margin-bottom: .6em; padding: 0; }
.tl-field { display: block; margin: 0 0 1.15em; }
.tl-flabel { display: block; font-weight: 600; font-size: .93rem; margin-bottom: .45em; color: var(--muc-2); }
.tl-hint { display: block; font-size: .82rem; color: var(--muc-3); margin-top: .35em; }
.tl-form input[type=text], .tl-form input[type=date], .tl-form input[type=number], .tl-form input[type=search], .tl-modal input[type=text] {
  width: 100%; box-sizing: border-box; font: 400 1.05rem var(--sans); color: var(--muc);
  background: #fff; border: 1px solid var(--vien); border-radius: var(--r); padding: .75em .9em; min-height: 48px; margin: 0;
  box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.tl-form input:focus { outline: none; border-color: var(--ngoc); box-shadow: 0 0 0 3px rgba(47,94,85,.14); }
.tl-bad { border-color: var(--son) !important; animation: tl-shake .35s; }
@keyframes tl-shake { 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }
.tl-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .tl-row2 { grid-template-columns: 1fr; } }

.tl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-chips input { position: absolute; opacity: 0; pointer-events: none; }
.tl-chips label {
  display: inline-block; padding: .55em 1em; border: 1px solid var(--vien); border-radius: 999px; background: #fff;
  cursor: pointer; font-size: .95rem; user-select: none; transition: all .15s; margin: 0;
}
.tl-chips label:hover { border-color: var(--muc-3); }
.tl-chips input:checked + label { background: var(--muc); border-color: var(--muc); color: var(--giay); }
.tl-chips input:focus-visible + label { box-shadow: 0 0 0 3px rgba(47,94,85,.25); }

.tl-step { display: none; }
.tl-step.on { display: block; animation: tl-in .35s ease; }
@keyframes tl-in { from { opacity: 0; transform: translateY(8px); } }
.tl-stepbar { display: flex; gap: 6px; list-style: none; margin: 0 0 1.4em; padding: 0; counter-reset: s; }
.tl-stepbar li { flex: 1; font-size: .8rem; color: var(--muc-3); border-top: 3px solid var(--vien); padding-top: .5em; counter-increment: s; margin: 0; }
.tl-stepbar li::before { content: counter(s) '. '; }
.tl-stepbar li.on { border-color: var(--son); color: var(--muc); font-weight: 600; }
.tl-nav { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 1.4em; }

/* ---------- chip ngũ hành ---------- */
.tl-chip { display: inline-block; font-size: .8rem; font-weight: 600; padding: .2em .7em; border-radius: 999px; color: #fff; vertical-align: middle; white-space: nowrap; }
.tl-chip.tl-kim { background: var(--kim); } .tl-chip.tl-moc { background: var(--moc); } .tl-chip.tl-thuy { background: var(--thuy); }
.tl-chip.tl-hoa { background: var(--hoa); } .tl-chip.tl-tho { background: var(--tho); }

/* ---------- báo cáo ---------- */
.tl-out:not(:empty) { margin-top: 28px; }
.tl-report { display: grid; gap: 18px; }
.tl-block { background: var(--giay-3); border: 1px solid var(--vien); border-radius: var(--r); padding: clamp(16px, 3.5vw, 30px); }
.tl-dl { display: grid; grid-template-columns: max-content 1fr; gap: .35em 1.2em; margin: 0 0 1em; }
.tl-dl dt { color: var(--muc-3); font-size: .9rem; }
.tl-dl dd { margin: 0; }
.tl-ngu-hanh { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 1em 0; }
.tl-ngu-hanh > div { background: #fff; border: 1px solid var(--vien); border-radius: var(--r); padding: .8em; display: grid; gap: .35em; justify-items: start; }
.tl-ngu-hanh em { font-size: .85rem; color: var(--muc-3); }
@media (max-width: 560px) { .tl-ngu-hanh { grid-template-columns: 1fr; } }
.tl-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.tl-sw { display: inline-flex; align-items: center; gap: .5em; font-size: .9rem; background: #fff; border: 1px solid var(--vien); padding: .35em .8em .35em .35em; border-radius: 999px; }
.tl-sw i { width: 26px; height: 26px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.tl-muted .tl-sw { opacity: .7; }
.tl-big-nums { font-family: var(--serif); font-size: 2rem; letter-spacing: .1em; margin: 0; }
.tl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .tl-two { grid-template-columns: 1fr; } }
.tl-big { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; margin: 0; line-height: 1.2; }
.tl-list { padding-left: 1.1em; } .tl-list li { margin-bottom: .7em; }

/* thẻ tên */
.tl-name { background: #fff; border: 1px solid var(--vien); border-radius: var(--r); margin: 12px 0; overflow: hidden; transition: box-shadow .2s; }
.tl-name:hover { box-shadow: 0 10px 28px -18px rgba(30,27,24,.45); }
.tl-name-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: default; }
.tl-full .tl-name-head { cursor: pointer; }
.tl-rank { font-family: var(--serif); font-size: 1.4rem; color: var(--dong); min-width: 1.4em; }
.tl-name-main { flex: 1; min-width: 0; }
.tl-fullname { font-family: var(--serif) !important; font-size: clamp(1.45rem, 3.4vw, 1.9rem) !important; font-weight: 600 !important; margin: 0 !important; line-height: 1.15; }
.tl-han { font-family: var(--han); font-size: 1.15rem; color: var(--son); letter-spacing: .12em; }
.tl-tv { font-family: var(--sans); font-size: .78rem; letter-spacing: 0; color: var(--ngoc); text-transform: uppercase; }
.tl-score { text-align: center; min-width: 64px; }
.tl-score b { display: block; font-family: var(--serif); font-size: 1.9rem; line-height: 1; color: var(--son); }
.tl-score small { font-size: .72rem; color: var(--muc-3); }
.tl-y { margin: 0 18px 8px; font-style: italic; color: var(--muc-2); font-family: var(--serif); font-size: 1.15rem; }
.tl-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 18px 14px; }
.tl-arrow { color: var(--muc-3); font-size: .9rem; }
.tl-name-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 16px 18px; border-top: 1px dashed var(--vien); background: linear-gradient(#fff, var(--giay-3)); }
@media (max-width: 720px) { .tl-name-body { grid-template-columns: 1fr; } }
.tl-facts p { margin: 0 0 .7em; font-size: .95rem; }
.tl-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ngoc); font-weight: 600; }
.tl-name-foot { padding: 0 18px 16px; background: var(--giay-3); }
.tl-pick { font: 500 .88rem var(--sans); background: none; border: 1px dashed var(--dong); color: var(--muc-2); padding: .5em 1em; border-radius: var(--r); cursor: pointer; }
.tl-pick.on { background: var(--ngoc); color: #fff; border-style: solid; border-color: var(--ngoc); }
.tl-collapsed .tl-name-body, .tl-collapsed .tl-name-foot { display: none; }
.tl-collapsed .tl-name-head::after { content: '+'; font-size: 1.4rem; color: var(--muc-3); }
.tl-sub { border-bottom: 1px solid var(--vien); padding-bottom: .3em; }

/* khóa */
.tl-lock { position: relative; }
.tl-lock-ghost { filter: blur(5px); opacity: .55; pointer-events: none; }
.tl-ghost-card { background: #fff; border: 1px solid var(--vien); height: 92px; margin: 12px 0; border-radius: var(--r); display: flex; gap: 14px; align-items: center; padding: 0 18px; }
.tl-ghost-card span { height: 16px; background: var(--giay-2); border-radius: 8px; flex: 1; } .tl-ghost-card span:first-child { flex: 3; height: 24px; }
.tl-lock-box { background: var(--muc); color: var(--giay); border-radius: var(--r); padding: clamp(20px, 4vw, 34px); position: relative; }
.tl-lock-ghost + .tl-lock-box { margin-top: -150px; }
.tl-lock-box h3 { color: var(--giay) !important; }
.tl-lock-box ul { padding-left: 1.1em; margin: 0 0 1.3em; } .tl-lock-box li { margin-bottom: .35em; }
.tl-lock-box .tl-small { color: #BFB4A5; margin-bottom: 0; }

/* bìa báo cáo đầy đủ */
.tl-cover { text-align: center; padding: 40px 20px 30px; border: 1px solid var(--vien); background: var(--giay-3); position: relative; border-radius: var(--r); }
.tl-cover h2 { font-size: clamp(2rem, 5vw, 2.8rem); margin: .2em 0; }
.tl-seal { display: inline-grid; place-items: center; width: 64px; height: 64px; background: var(--son); color: #FBEDE0; font-family: var(--han); font-size: 2.2rem; border-radius: 6px; transform: rotate(-4deg); box-shadow: inset 0 0 0 3px rgba(255,255,255,.18); }
.tl-toc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tl-toc a { font-size: .9rem; padding: .4em .9em; border: 1px solid var(--vien); border-radius: 999px; text-decoration: none; color: var(--muc-2); background: #fff; }
.tl-table-wrap { overflow-x: auto; }
.tl-table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; }
.tl-table th, .tl-table td { padding: .6em .75em; border-bottom: 1px solid var(--vien); text-align: left; }
.tl-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muc-3); background: var(--giay-3); }
.tl-tags span { display: inline-block; margin: 0 6px 8px 0; padding: .35em .9em; background: #fff; border: 1px solid var(--vien); border-radius: 999px; font-family: var(--serif); font-size: 1.15rem; }
.tl-steps { padding-left: 1.2em; } .tl-steps li { margin-bottom: .7em; }
.tl-verdict { font-family: var(--serif); font-size: 1.3rem; border-left: 3px solid var(--son); padding-left: .8em; }
.tl-keep { text-align: center; font-size: .9rem; color: var(--muc-3); margin: 24px 0; }

/* giấy chứng nhận */
.tl-cert { background: #FBF4E6; padding: 14px; border: 1px solid var(--vien); max-width: 760px; margin: 0 auto; aspect-ratio: 1.414 / 1; box-shadow: 0 30px 60px -40px rgba(30,27,24,.6); }
.tl-cert-in { height: 100%; box-sizing: border-box; border: 2px solid var(--dong); outline: 1px solid var(--dong); outline-offset: -8px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; padding: 24px; }
.tl-cert-top { text-transform: uppercase; letter-spacing: .35em; font-size: .8rem; color: var(--muc-3); margin: 0; }
.tl-cert-han { font-family: var(--han); font-size: clamp(2.4rem, 7vw, 3.6rem); color: var(--son); margin: .1em 0; letter-spacing: .15em; }
.tl-cert-name { font-family: var(--serif); font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 600; margin: 0; line-height: 1.1; }
.tl-cert-y { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--muc-2); max-width: 80%; margin: .6em 0; }
.tl-cert-meta { font-size: .85rem; color: var(--muc-3); margin: 0; }
.tl-cert-sign { position: absolute; bottom: 30px; right: 48px; font-family: var(--serif); font-style: italic; margin: 0; }
.tl-cert-seal { position: absolute; bottom: 26px; left: 44px; width: 54px; height: 54px; display: grid; place-items: center; background: var(--son); color: #FBEDE0; font-family: var(--han); font-size: 1.7rem; border-radius: 5px; transform: rotate(6deg); opacity: .92; }

/* ---------- thanh toán ---------- */
.tl-noscroll { overflow: hidden; }
.tl-modal { position: fixed; inset: 0; z-index: 99999; background: rgba(30,27,24,.55); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(2px); }
.tl-modal[hidden] { display: none; }
.tl-modal-card { background: var(--giay-3); width: min(460px, 100%); max-height: 92vh; overflow: auto; border-radius: 8px; padding: 26px 22px; position: relative; font-family: var(--sans); color: var(--muc); animation: tl-pop .25s ease; }
@keyframes tl-pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.tl-modal-card h3 { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 .5em; }
.tl-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muc-3); }
.tl-pay { text-align: center; }
.tl-qr { display: block; margin: 8px auto 14px; width: 240px; height: 240px; border: 8px solid #fff; box-shadow: 0 0 0 1px var(--vien); }
.tl-paydl { text-align: left; background: #fff; border: 1px solid var(--vien); padding: 12px 14px; border-radius: var(--r); }
.tl-code { font-size: 1.15rem; letter-spacing: .08em; color: var(--son); }
.tl-copy { font-size: .75rem; padding: .25em .6em; margin-left: 4px; border: 1px solid var(--vien); background: var(--giay-3); border-radius: 3px; cursor: pointer; }
.tl-wait { display: flex; align-items: center; gap: .6em; justify-content: center; font-size: .92rem; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ngoc); animation: tl-pulse 1.2s infinite; }
@keyframes tl-pulse { 50% { opacity: .25; transform: scale(.7); } }
.tl-pay-inline { max-width: 460px; margin: 0 auto; background: var(--giay-3); border: 1px solid var(--vien); padding: 22px; border-radius: 8px; }

/* ---------- hero 3D ---------- */
.tl-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; padding: clamp(28px, 6vw, 70px) 0; }
@media (max-width: 860px) { .tl-hero { grid-template-columns: 1fr; } .tl-stage { order: -1; } }
.tl-kicker { text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; color: var(--son); font-weight: 600; margin: 0 0 .8em; }
.tl-hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); line-height: 1.05; font-weight: 600; margin: 0 0 .4em; }
.tl-hero-sub { font-size: 1.08rem; color: var(--muc-2); max-width: 34em; }
.tl-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.4em; }
@media (max-width: 480px) { .tl-hero-cta a { flex: 1 1 100%; } }
.tl-stage { --rx: 0deg; --ry: 0deg; position: relative; height: clamp(300px, 46vw, 440px); perspective: 1100px; display: grid; place-items: center; }
.tl-orbit { position: absolute; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(calc(-14deg + var(--rx))) rotateY(var(--ry)); transition: transform .35s ease-out; }
.tl-orbit::before { content: ''; position: absolute; left: 50%; top: 50%; width: 82%; aspect-ratio: 1; border: 1px dashed rgba(168,135,78,.5); border-radius: 50%; transform: translate(-50%, -50%) rotateX(90deg); }
.tl-face {
  --a: calc(var(--i) * 72deg);
  position: absolute; left: 50%; top: 50%; width: 118px; height: 150px; margin: -75px 0 0 -59px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  color: #FFF8EE; border-radius: 6px; backface-visibility: visible;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 20px 30px -18px rgba(0,0,0,.5);
  animation: tl-orbit 22s linear infinite;
}
.tl-face b { font-family: var(--serif); font-size: 2rem; font-weight: 600; }
.tl-face small { font-size: .72rem; opacity: .85; padding: 0 8px; }
.tl-face.tl-kim { background: linear-gradient(160deg, #B9A983, #8C7D57); }
.tl-face.tl-moc { background: linear-gradient(160deg, #5F8B58, #3D6338); }
.tl-face.tl-thuy { background: linear-gradient(160deg, #3A7090, #224A60); }
.tl-face.tl-hoa { background: linear-gradient(160deg, #C65A41, #94351F); }
.tl-face.tl-tho { background: linear-gradient(160deg, #AF8853, #7F5F36); }
@keyframes tl-orbit {
  from { transform: rotateY(var(--a)) translateZ(clamp(130px, 19vw, 190px)) rotateY(calc(-1 * var(--a))); }
  to   { transform: rotateY(calc(var(--a) + 360deg)) translateZ(clamp(130px, 19vw, 190px)) rotateY(calc(-1 * var(--a) - 360deg)); }
}
.tl-core { position: relative; z-index: 2; display: grid; place-items: center; gap: 6px; transform: translateZ(0); }
.tl-core-han { width: 104px; height: 104px; display: grid; place-items: center; background: var(--son); color: #FBEDE0; font-family: var(--han); font-size: 3.4rem; border-radius: 10px; transform: rotate(-5deg); box-shadow: 0 18px 40px -16px rgba(142,43,31,.7), inset 0 0 0 4px rgba(255,255,255,.15); }
.tl-core-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; background: var(--giay-3); padding: .1em .7em; border: 1px solid var(--vien); border-radius: 999px; transition: opacity .35s, transform .35s; }
.tl-core-name.out { opacity: 0; transform: translateY(6px); }
@media (max-width: 600px) {
  .tl-stage { height: 270px; }
  .tl-face { width: 78px; height: 100px; margin: -50px 0 0 -39px; }
  .tl-face b { font-size: 1.35rem; } .tl-face small { display: none; }
  .tl-face { animation-name: tl-orbit-s; }
  .tl-core-han { width: 76px; height: 76px; font-size: 2.5rem; }
  .tl-core-name { font-size: 1.25rem; }
}
@keyframes tl-orbit-s {
  from { transform: rotateY(var(--a)) translateZ(112px) rotateY(calc(-1 * var(--a))); }
  to   { transform: rotateY(calc(var(--a) + 360deg)) translateZ(112px) rotateY(calc(-1 * var(--a) - 360deg)); }
}
@media (prefers-reduced-motion: reduce) { .tl-face { animation: none; transform: rotateY(var(--a)) translateZ(170px) rotateY(calc(-1 * var(--a))); } }

/* ---------- kho tên: thẻ lật ---------- */
.tl-kho-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.tl-kho-filter button { font: 500 .92rem var(--sans); padding: .5em 1em; border: 1px solid var(--vien); border-radius: 999px; background: #fff; cursor: pointer; color: var(--muc); }
.tl-kho-filter button.on { background: var(--muc); color: var(--giay); border-color: var(--muc); }
.tl-kho-q { flex: 1; min-width: 160px; font: 400 1rem var(--sans); padding: .55em .9em; border: 1px solid var(--vien); border-radius: 999px; }
.tl-kho-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
.tl-flip { perspective: 900px; height: 200px; cursor: pointer; outline: none; }
.tl-flip-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.tl-flip.on .tl-flip-in, .tl-flip:focus-visible .tl-flip-in { transform: rotateY(180deg); }
@media (hover: hover) { .tl-flip:hover .tl-flip-in { transform: rotateY(180deg); } }
.tl-flip-front, .tl-flip-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 6px; padding: 14px; box-sizing: border-box; }
.tl-flip-front { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--vien); border-top: 4px solid var(--c, var(--dong)); }
.tl-flip-front.tl-kim { --c: var(--kim); } .tl-flip-front.tl-moc { --c: var(--moc); } .tl-flip-front.tl-thuy { --c: var(--thuy); } .tl-flip-front.tl-hoa { --c: var(--hoa); } .tl-flip-front.tl-tho { --c: var(--tho); }
.tl-flip-han { font-family: var(--han); font-size: 2.4rem; color: var(--c); line-height: 1; }
.tl-flip-tv { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--c); border: 1px solid var(--c); padding: .2em .6em; border-radius: 999px; }
.tl-flip-front h3 { font-size: 1.7rem !important; margin: .15em 0 !important; }
.tl-flip-front small { font-size: .75rem; color: var(--muc-3); }
.tl-flip-back { transform: rotateY(180deg); background: var(--muc); color: var(--giay); font-size: .86rem; line-height: 1.5; overflow: auto; }
.tl-flip-back p { margin: 0 0 .5em; } .tl-flip-back small { color: #BFB4A5; font-size: .75rem; }

/* ---------- bảng giá ---------- */
.tl-pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: stretch; }
@media (max-width: 960px) { .tl-pricing { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tl-pricing { grid-template-columns: 1fr; } }
.tl-pricing > .tl-small { grid-column: 1 / -1; }
.tl-price { background: var(--giay-3); border: 1px solid var(--vien); border-radius: 6px; padding: 24px 20px; display: flex; flex-direction: column; position: relative; transition: transform .2s ease-out; will-change: transform; }
.tl-price h3 { font-size: 1.35rem !important; margin: 0 !important; }
.tl-amount { font-family: var(--serif); font-size: 2.3rem; font-weight: 600; margin: .2em 0 .4em; }
.tl-price ul { padding-left: 1.1em; flex: 1; font-size: .93rem; } .tl-price li { margin-bottom: .4em; }
.tl-hot { background: var(--muc); color: var(--giay); border-color: var(--muc); }
.tl-hot h3 { color: var(--giay) !important; }
.tl-ribbon { position: absolute; top: -12px; left: 20px; background: var(--son); color: #fff; font-size: .75rem; font-weight: 600; padding: .3em .8em; border-radius: 3px; }

/* ---------- công cụ chăm bé ---------- */
.tl-growth-out { margin-top: 16px; }
.tl-z-ok td:last-child { color: var(--ngoc); }
.tl-z-thap td:last-child, .tl-z-cao td:last-child { color: #9A6A14; }
.tl-z-rat-thap td:last-child, .tl-z-rat-cao td:last-child { color: var(--son-2); font-weight: 600; }
.tl-moc-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.tl-moc-tabs button { flex: 0 0 auto; font: 500 .92rem var(--sans); padding: .55em 1em; border: 1px solid var(--vien); background: #fff; border-radius: 999px; cursor: pointer; color: var(--muc); }
.tl-moc-tabs button.on { background: var(--ngoc); color: #fff; border-color: var(--ngoc); }
.tl-moc-pane { display: none; background: var(--giay-3); border: 1px solid var(--vien); padding: 20px; border-radius: var(--r); }
.tl-moc-pane.on { display: block; }
.tl-check { list-style: none; padding: 0; margin: 0; }
.tl-check li { padding: .5em 0; border-bottom: 1px dashed var(--vien); }
.tl-check input { width: 18px; height: 18px; vertical-align: -3px; margin-right: .5em; accent-color: var(--ngoc); }

/* ---------- in ---------- */
@media print {
  .tl-btn, .tl-btn-ghost, .tl-pick, .tl-toc, .tl-keep, .tl-modal { display: none !important; }
  .tl-name-body, .tl-name-foot { display: grid !important; }
  .tl-name { break-inside: avoid; }
  .tl-block { border: 0; padding: 0; }
  html.tl-print-cert body * { visibility: hidden; }
  html.tl-print-cert #tl-cert-card, html.tl-print-cert #tl-cert-card * { visibility: visible; }
  html.tl-print-cert #tl-cert-card { position: fixed; inset: 0; margin: 0; max-width: none; box-shadow: none; border: 0; }
  @page { margin: 12mm; }
}
