/* Bảng tính giá King Park (/tinh-gia/) — cùng bộ màu với site.css */
:root {
  --paper: #f6f4ee; --surface: #fff; --ink: #15231f; --ink-2: #3a4a45; --muted: #62716c;
  --line: #e2ddd0; --line-2: #ece8dd;
  --teal: #0e8077; --teal-700: #0b675f; --teal-900: #073f3a; --teal-50: #e8f4f2; --teal-100: #cfe8e4;
  --gold: #99702a; --gold-50: #f7efe0; --red: #a3402b; --red-50: #f8ebe6; --green: #2f7a45;
  --radius: 18px; --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(21,35,31,.05), 0 10px 30px rgba(21,35,31,.07);
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--teal-700); text-underline-offset: 3px; }
h1, h2 { margin: 0; line-height: 1.22; text-wrap: balance; }
p { margin: 0 0 .8em; text-wrap: pretty; }
small { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }

.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: rgba(246,244,238,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-2); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 650; line-height: 1.2; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand small { font-size: .75rem; }
.bar-zalo { font-size: .88rem; font-weight: 600; text-decoration: none; padding: 7px 12px; border-radius: 999px; background: var(--teal-50); white-space: nowrap; }

.wrap { max-width: 680px; margin: 0 auto; padding: 20px 16px 40px; }
.hero { padding: 8px 0 18px; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--teal-700); margin-bottom: 8px; }
h1 { font-size: 1.7rem; letter-spacing: -.015em; margin-bottom: 12px; }
@media (min-width: 700px) { h1 { font-size: 2.15rem; } }
.lead { font-size: 1.05rem; color: var(--ink-2); }
.warn { font-size: .9rem; background: var(--gold-50); border-left: 3px solid var(--gold); padding: 10px 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-2); margin: 0; }

.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 16px; margin-bottom: 16px; }
@media (min-width: 700px) { .card { padding: 24px; } }
.card h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; font-size: .9rem; display: grid; place-items: center; }
.muted { color: var(--muted); font-size: .94rem; }
.label { font-weight: 600; margin: 16px 0 8px; }

/* Nút chọn */
.seg, .chips, .ways { display: grid; gap: 8px; }
.seg { grid-template-columns: 1fr 1fr; }
.chips { grid-template-columns: repeat(4, 1fr); }
.seg label, .chips label, .ways label { position: relative; cursor: pointer; }
.seg input, .chips input, .ways input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .chips span, .ways span { display: block; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface); transition: border-color .15s, background .15s; }
.seg span { font-weight: 650; }
.chips span { text-align: center; font-weight: 600; padding: 9px 4px; }
.ways span { color: var(--muted); font-size: .9rem; }
.ways b { display: block; color: var(--ink); font-size: 1rem; }
.seg input:checked + span, .chips input:checked + span, .ways input:checked + span { border-color: var(--teal); background: var(--teal-50); box-shadow: inset 0 0 0 1px var(--teal); }
.seg input:checked + span small { color: var(--teal-700); }
.seg input:focus-visible + span, .chips input:focus-visible + span, .ways input:focus-visible + span { outline: 2px solid var(--teal-700); outline-offset: 2px; }
@media (min-width: 600px) { .ways { grid-template-columns: repeat(3, 1fr); } }

.dt-khac { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: .92rem; color: var(--muted); }
.dt-input { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.dt-input input { width: 84px; font: inherit; font-size: 16px; padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 9px; text-align: right; }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; min-height: 1.3em; }
.hint.is-error { color: var(--red); }

.out { margin-top: 16px; background: var(--teal-900); color: #fff; border-radius: var(--radius-sm); padding: 14px 16px; }
.out-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; }
.out-row + .out-row { border-top: 1px solid rgba(255,255,255,.14); }
.out-row span small { color: #a9cfc9; }
.out-row strong { font-size: 1.2rem; white-space: nowrap; }
.out-main strong { font-size: 1.5rem; color: #ffd98a; }
.out .fine { font-size: .8rem; color: #a9cfc9; margin: 8px 0 0; }

/* Phần khoá: mờ cho tới khi để Zalo */
.lock { position: relative; margin-top: 14px; }
.lock:not(.is-open) { cursor: pointer; }
.lock:not(.is-open) .locked-body { filter: blur(6px); user-select: none; pointer-events: none; opacity: .75; }
.lock:not(.is-open)::after { content: "🔒 Để lại Zalo ở dưới để xem"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--ink); color: #fff; font-weight: 600; font-size: .9rem; padding: 9px 16px; border-radius: 999px; white-space: nowrap; box-shadow: var(--shadow); }

.dot { width: 100%; border-collapse: collapse; font-size: .94rem; }
.dot th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 0 0 6px; border-bottom: 1px solid var(--line); }
.dot th:last-child, .dot td:last-child { text-align: right; white-space: nowrap; }
.dot td { padding: 9px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.dot td:last-child { font-weight: 650; padding-left: 10px; }
.dot tr.tong td { border-bottom: 0; font-weight: 700; color: var(--teal-900); }

.von { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.von input { flex: 1; accent-color: var(--teal); height: 28px; }
.von output { min-width: 76px; text-align: right; font-weight: 700; font-size: 1.25rem; color: var(--teal-900); }
.tran { margin: 0 0 10px; }
.lots { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lots li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: .92rem; border: 1px solid var(--line-2); }
.lot-ten { font-weight: 600; }
.lot-ghi { text-align: right; font-size: .84rem; font-weight: 600; }
.m-vua { background: #eaf5ec; border-color: #cfe6d4; } .m-vua .lot-ghi { color: var(--green); }
.m-sat { background: var(--gold-50); border-color: #ecdcbc; } .m-sat .lot-ghi { color: var(--gold); }
.m-chua { color: var(--muted); } .m-chua .lot-ten { font-weight: 500; }

/* Form */
.form-card { border: 2px solid var(--teal); }
.form-agent { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.form-agent img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.form-agent span { display: block; font-size: .85rem; color: var(--muted); }
form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 12px; }
form input:not(.trap) { display: block; width: 100%; margin-top: 5px; font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
form input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-100); }
form input[aria-invalid="true"] { border-color: var(--red); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn { display: block; width: 100%; text-align: center; font: inherit; font-weight: 650; font-size: 1.02rem; color: #fff; background: var(--teal); border: 0; border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--teal-700); color: #fff; }
.btn:disabled { opacity: .7; cursor: wait; }
.form-msg { font-size: .9rem; margin: 10px 0 0; }
.form-msg:empty { display: none; }
.form-msg.is-error { color: var(--red); }
.consent { font-size: .78rem; color: var(--muted); margin: 10px 0 0; }
.done strong { display: block; font-size: 1.1rem; margin-bottom: 6px; }

.notes { padding: 8px 4px; }
.notes h2 { font-size: 1.05rem; margin-bottom: 8px; }
.notes ul { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: .93rem; }
.notes li { margin-bottom: 6px; }

.foot { text-align: center; font-size: .82rem; color: var(--muted); padding: 20px 16px 100px; border-top: 1px solid var(--line-2); }
.foot p { margin: 0 0 4px; }

.sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--paper) 70%, rgba(246,244,238,0)); }
.sticky .btn { max-width: 648px; margin: 0 auto; box-shadow: 0 6px 20px rgba(7,63,58,.25); }
[hidden] { display: none !important; }
