/* =========================================================================
   HÀNH TRÌNH TỰ VỮNG — Giao diện (mobile-first, nhận diện Tự Vững)
   Thiền phương Đông · tối giản · có khoảng thở · sang trọng · không lòe loẹt.
   Palette khớp brand: kem #F8F7F2 (60%), xanh #87BFEF (30%), navy #1E3A5F,
   đỏ triện #9B1C1C (tiết chế ~10%).
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Cormorant:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap');

:root {
  --kem: #F7F4EC;       /* nền chính — ngà ấm */
  --kem-2: #EFE9DA;     /* nền phụ sâu hơn */
  --kem-3: #FCFBF7;     /* thẻ sáng */
  --navy: #1E3A5F;      /* thương hiệu mid */
  --navy-2: #13243A;
  --ink: #16222E;       /* mực gần đen — tiêu đề */
  --xanh: #8AA6C2;      /* sương xanh dịu */
  --xanh-tint: #E7EEF6; /* nền nhạt */
  --xanh-deep: #5a86ad;
  --do: #9B1C1C;        /* đỏ triện */
  --do-tint: #EFDCDC;
  --vang: #AE8641;      /* vàng cổ */
  --vang-soft: #D9C089;
  --muc: #202E3A;
  --xam: #5C6874;
  --line: #E7E1D3;
  --ok: #3f7d5a;
  --serif: "Cormorant", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 28px 66px -34px rgba(19, 36, 58, .32);
  --shadow-sm: 0 12px 34px -20px rgba(19, 36, 58, .26);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--kem); color: var(--muc);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--serif); color: var(--ink); line-height: 1.12; font-weight: 600; margin: 0 0 .4em; letter-spacing: -.01em; }
h3, h4 { font-family: var(--sans); color: var(--ink); line-height: 1.28; font-weight: 600; margin: 0 0 .4em; }
p { margin: 0 0 .9em; }
a { color: var(--navy); text-decoration: none; }
img { max-width: 100%; display: block; }

/* Cân dòng tiêu đề, dòng thân chảy thoáng */
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }

.tv-skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: var(--kem); padding: 10px 14px; z-index: 100; border-radius: 0 0 8px 0; }
.tv-skip:focus { left: 0; }

/* ---------- Khung chung ---------- */
.tv-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; background: rgba(248, 247, 242, .92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.tv-brand { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.tv-brand img { height: 26px; width: auto; }
.tv-brand b { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--ink); letter-spacing: .02em; }
.tv-topbar-tag { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--xanh-deep); }

.tv-app { width: min(720px, 100%); margin: 0 auto; padding: 0 18px 40px; min-height: 60vh; }

.tv-footer { text-align: center; padding: 34px 18px 44px; color: var(--xam); background: var(--kem-2); border-top: 1px solid var(--line); margin-top: 30px; }
.tv-footer p { font-family: var(--serif); color: var(--navy); margin: 0 0 8px; font-size: 15px; }
.tv-footer-links { font-family: var(--sans) !important; font-size: 13px; }
.tv-footer-links a { color: var(--xanh-deep); }

/* ---------- Thẻ & nút ---------- */
.tv-card { background: var(--kem-3); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow-sm); }
.tv-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--do); margin-bottom: 10px; }

.tv-btn {
  appearance: none; border: 1.5px solid transparent; cursor: pointer;
  font-family: var(--sans); font-size: 16px; font-weight: 700;
  padding: 14px 22px; border-radius: 999px; transition: all .18s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; line-height: 1; width: 100%;
}
.tv-btn-primary { background: var(--ink); color: var(--kem); box-shadow: var(--shadow-sm); }
.tv-btn-primary:hover { background: var(--navy-2); }
.tv-btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.tv-btn-ghost:hover { background: var(--navy); color: var(--kem); }
.tv-btn-soft { background: var(--xanh-tint); color: var(--navy); }
.tv-btn-soft:hover { background: #cfe3f8; }
.tv-btn:disabled { opacity: .45; cursor: not-allowed; }
.tv-btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tv-btn-row .tv-btn { width: auto; flex: 1; min-width: 140px; }

/* fade-in nhẹ, không kích thích */
.tv-screen { animation: tvFade .5s var(--ease); }
@keyframes tvFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tv-screen { animation: none; } }

/* ---------- Landing ---------- */
.tv-hero { text-align: center; padding: 56px 0 18px; }
.tv-hero .tv-moon { font-size: 32px; opacity: .8; }
.tv-hero h1 { font-size: clamp(30px, 7vw, 50px); margin: 16px 0 14px; letter-spacing: -.015em; }
.tv-hero .tv-sub { font-size: 17.5px; color: var(--xam); max-width: 600px; margin: 0 auto 8px; line-height: 1.75; }
.tv-hero .tv-quote { font-family: var(--serif); font-style: italic; color: var(--ink); font-size: 18px; max-width: 620px; margin: 20px auto 26px; padding: 0 8px; }
.tv-philo { background: var(--xanh-tint); border: 1px solid #bcd6f0; border-radius: var(--r); padding: 20px 22px; margin: 22px 0; }
.tv-philo p { color: var(--muc); margin: 7px 0; font-size: 15px; }
.tv-philo b { color: var(--navy); }
.tv-meta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 18px 0; color: var(--xam); font-size: 13.5px; }
.tv-meta-row span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Chọn nhân vật ---------- */
.tv-section-head { text-align: center; padding: 30px 0 6px; }
.tv-section-head h2 { font-size: clamp(22px, 5vw, 30px); }
.tv-section-head p { color: var(--xam); }
.tv-char-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 18px 0; }
.tv-char {
  text-align: left; background: var(--kem-3); border: 1.5px solid var(--line);
  border-radius: var(--r); padding: 18px; cursor: pointer; transition: all .18s var(--ease);
  display: flex; gap: 14px; align-items: flex-start; width: 100%;
}
.tv-char:hover, .tv-char:focus-visible { border-color: var(--xanh-deep); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.tv-char.selected { border-color: var(--navy); background: #fff; box-shadow: var(--shadow); }
.tv-char .tv-emoji { font-size: 30px; line-height: 1; flex: none; width: 46px; height: 46px; display: grid; place-items: center; background: var(--kem-2); border-radius: 12px; }
.tv-char h3 { font-size: 17px; margin: 0 0 4px; }
.tv-char .tv-char-desc { font-size: 13.5px; color: var(--xam); margin: 0 0 8px; }
.tv-char .tv-char-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muc); }
.tv-char .tv-char-stats b { color: var(--navy); }
.tv-chip-risk { display: inline-block; margin-top: 8px; font-size: 11.5px; color: var(--do); background: var(--do-tint); padding: 3px 9px; border-radius: 999px; }

/* ---------- Hướng dẫn ---------- */
.tv-howto-steps { display: grid; gap: 12px; margin: 20px 0; }
.tv-howto-step { display: flex; gap: 14px; align-items: flex-start; background: var(--kem-3); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.tv-howto-step .n { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--kem); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; }
.tv-howto-step p { margin: 0; font-size: 14.5px; }
.tv-howto-step b { color: var(--navy); }

/* ---------- Thanh trạng thái (khi chơi) ---------- */
.tv-status { position: sticky; top: 51px; z-index: 20; background: var(--kem-3); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 14px 0 16px; box-shadow: var(--shadow-sm); }
.tv-status-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tv-month-label { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.tv-season { font-size: 11.5px; color: var(--xanh-deep); font-weight: 700; letter-spacing: .06em; }
.tv-progress { height: 6px; background: var(--kem-2); border-radius: 999px; overflow: hidden; }
.tv-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--xanh-deep), var(--xanh)); border-radius: 999px; transition: width .5s var(--ease); }
.tv-status-cash { font-family: var(--serif); font-size: 20px; color: var(--navy); margin-top: 8px; }
.tv-status-cash small { font-family: var(--sans); font-size: 12px; color: var(--xam); font-weight: 600; }
.tv-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.tv-stat-chip { font-size: 12px; background: var(--kem-2); border-radius: 999px; padding: 5px 10px; color: var(--muc); display: inline-flex; align-items: center; gap: 5px; }
.tv-stat-chip b { color: var(--navy); }
.tv-stat-chip.warn { background: var(--do-tint); color: var(--do); }
.tv-stat-chip.warn b { color: var(--do); }

/* ---------- Khối bước trong tháng ---------- */
.tv-step-tag { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--xanh-deep); margin-bottom: 8px; }
.tv-flow-card { margin: 0 0 16px; }
.tv-cashline { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.tv-cashline:last-child { border-bottom: 0; }
.tv-cashline .v { font-weight: 700; color: var(--navy); }
.tv-cashline .v.neg { color: var(--do); }
.tv-cashline.total { border-top: 2px solid var(--line); border-bottom: 0; margin-top: 4px; padding-top: 12px; font-size: 16px; }

/* ---------- Phân bổ quỹ ---------- */
.tv-alloc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.tv-remaining { font-family: var(--serif); font-size: 19px; color: var(--navy); }
.tv-remaining.over { color: var(--do); }
.tv-alloc-presets { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.tv-preset { font-size: 12.5px; font-weight: 600; border: 1.5px solid var(--line); background: #fff; color: var(--navy); border-radius: 999px; padding: 7px 13px; cursor: pointer; }
.tv-preset:hover { border-color: var(--xanh-deep); }
.tv-fund { padding: 12px 0; border-bottom: 1px solid var(--line); }
.tv-fund:last-child { border-bottom: 0; }
.tv-fund-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tv-fund-name { font-size: 14px; font-weight: 600; color: var(--muc); display: flex; align-items: center; gap: 8px; }
.tv-fund-name .ic { font-size: 18px; }
.tv-fund-name small { display: block; font-weight: 400; color: var(--xam); font-size: 11.5px; }
.tv-fund-val { font-family: var(--serif); font-size: 15px; color: var(--navy); white-space: nowrap; min-width: 84px; text-align: right; }
.tv-fund input[type=range] { width: 100%; margin: 10px 0 0; accent-color: var(--xanh-deep); height: 26px; }
.tv-fund.debt .tv-fund-name { color: var(--do); }
.tv-warn-soft { background: var(--do-tint); color: var(--do); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-top: 10px; }
.tv-note-soft { background: var(--xanh-tint); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-top: 10px; color: var(--muc); }

/* lối sống */
.tv-lifestyle { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.tv-life-btn { font-size: 12.5px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; cursor: pointer; color: var(--muc); }
.tv-life-btn.active { background: var(--navy); color: var(--kem); border-color: var(--navy); }
.tv-life-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Hành động ---------- */
.tv-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.tv-action { text-align: left; background: var(--kem-3); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 13px; cursor: pointer; transition: all .15s var(--ease); }
.tv-action:hover, .tv-action:focus-visible { border-color: var(--xanh-deep); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tv-action.selected { border-color: var(--navy); background: #fff; }
.tv-action .ic { font-size: 22px; }
.tv-action h4 { font-size: 14px; margin: 6px 0 4px; color: var(--navy); }
.tv-action p { font-size: 12px; color: var(--xam); margin: 0; }

/* ---------- Biến cố ---------- */
.tv-event { border-left: 3px solid var(--do); }
.tv-event .tv-cat { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--do); }
.tv-event h3 { font-size: 19px; margin: 8px 0; }
.tv-event .desc { color: var(--muc); font-size: 15px; }
.tv-event .sev { display: inline-block; font-size: 11px; color: var(--xam); margin-top: 4px; }

.tv-choices { display: grid; gap: 11px; margin-top: 6px; }
.tv-choice { text-align: left; background: var(--kem-3); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 15px; cursor: pointer; transition: all .15s var(--ease); }
.tv-choice:hover, .tv-choice:focus-visible { border-color: var(--xanh-deep); box-shadow: var(--shadow-sm); }
.tv-choice .lbl { font-weight: 700; color: var(--navy); font-size: 15px; }
.tv-choice .cdesc { font-size: 13px; color: var(--xam); margin-top: 5px; }

/* ---------- Bài học ---------- */
.tv-lesson { background: var(--kem-2); border-radius: var(--r); padding: 20px 22px; margin: 14px 0; border: 1px solid var(--line); }
.tv-lesson .seal { color: var(--do); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tv-lesson p { font-family: var(--serif); font-size: 16px; color: var(--navy); line-height: 1.7; margin: 8px 0 0; font-style: italic; }

/* thay đổi chỉ số sau biến cố */
.tv-changes { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.tv-delta { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--kem-2); color: var(--muc); }
.tv-delta.up { background: #e3efe7; color: var(--ok); }
.tv-delta.down { background: var(--do-tint); color: var(--do); }
.tv-event-note { font-size: 13.5px; color: var(--muc); background: var(--xanh-tint); border-radius: 10px; padding: 10px 12px; margin: 6px 0; }

/* ---------- Báo cáo ---------- */
.tv-report-hero { text-align: center; padding: 28px 0 8px; }
.tv-score-ring { width: 180px; height: 180px; margin: 8px auto 6px; position: relative; }
.tv-score-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.tv-score-num b { font-family: var(--serif); font-size: 48px; color: var(--navy); line-height: 1; }
.tv-score-num small { font-size: 12px; color: var(--xam); letter-spacing: .1em; text-transform: uppercase; }
.tv-grade { font-family: var(--serif); font-size: 20px; color: var(--navy); margin-top: 6px; }
.tv-grade-tone { color: var(--xam); font-size: 14.5px; max-width: 520px; margin: 8px auto 0; }

.tv-radar-wrap { display: flex; justify-content: center; margin: 18px 0 6px; }
.tv-bars { margin: 16px 0; }
.tv-bar-row { margin: 9px 0; }
.tv-bar-row .bl { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.tv-bar-row .bl b { color: var(--navy); }
.tv-bar-track { height: 8px; background: var(--kem-2); border-radius: 999px; overflow: hidden; }
.tv-bar-fill { height: 100%; border-radius: 999px; transition: width .8s var(--ease); }
.tv-bar-fill.high { background: linear-gradient(90deg, var(--ok), #6fae87); }
.tv-bar-fill.mid { background: linear-gradient(90deg, var(--xanh-deep), var(--xanh)); }
.tv-bar-fill.low { background: linear-gradient(90deg, var(--do), #c75151); }

.tv-list-block { margin: 16px 0; }
.tv-list-block h3 { font-size: 17px; margin-bottom: 8px; }
.tv-li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tv-li:last-child { border-bottom: 0; }
.tv-li .mk { flex: none; }
.tv-li b { color: var(--navy); }

.tv-advice { background: var(--xanh-tint); border: 1px solid #bcd6f0; border-radius: var(--r); padding: 20px; margin: 16px 0; }
.tv-advice .tv-step-tag { color: var(--do); }
.tv-advice p { font-family: var(--serif); font-size: 16px; color: var(--navy); margin: 6px 0 0; }

/* gợi ý khóa học */
.tv-cta { background: var(--ink); color: var(--kem); border-radius: var(--r); padding: 26px; margin: 18px 0; }
.tv-cta .tv-step-tag { color: var(--xanh); }
.tv-cta h3 { color: #fff; font-size: 20px; }
.tv-cta p { color: rgba(248, 247, 242, .86); font-size: 14.5px; }
.tv-cta .tv-btn-soft { margin-top: 8px; }
.tv-path { display: grid; gap: 8px; margin: 12px 0; }
.tv-path-item { background: rgba(255, 255, 255, .08); border-radius: 10px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; }
.tv-path-item .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--xanh); color: var(--navy-2); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.tv-path-item a { color: var(--xanh); font-weight: 700; font-size: 14px; }

/* ---------- Form lead ---------- */
.tv-lead { background: var(--kem-3); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin: 18px 0; }
.tv-lead h3 { font-size: 18px; }
.tv-lead p.sub { color: var(--xam); font-size: 14px; }
.tv-field { margin: 12px 0; }
.tv-field label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 5px; }
.tv-field input { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; font-family: var(--sans); background: #fff; }
.tv-field input:focus { outline: none; border-color: var(--xanh-deep); }
.tv-check { display: flex; gap: 9px; align-items: flex-start; margin: 12px 0; font-size: 13px; color: var(--muc); }
.tv-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--navy); flex: none; }
.tv-lead-ok { background: #e3efe7; color: var(--ok); border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.tv-form-err { color: var(--do); font-size: 13px; margin-top: 6px; }

.tv-share-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.tv-restart { text-align: center; margin: 24px 0 8px; }
.tv-restart button { background: none; border: 0; color: var(--xam); text-decoration: underline; cursor: pointer; font-size: 13.5px; }

/* ---------- Responsive lên ---------- */
@media (min-width: 560px) {
  .tv-char-grid { grid-template-columns: 1fr 1fr; }
  .tv-action-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 720px) {
  .tv-hero { padding: 60px 0 20px; }
}

/* ===== Bản tái thiết kế: 3 tài nguyên · cố vấn · chiến lược · nhân quả ===== */
.tv-river { height: 7px; background: var(--kem-2); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.tv-river i { display: block; height: 100%; background: linear-gradient(90deg, var(--xanh-deep), var(--xanh)); border-radius: 999px; transition: width .5s var(--ease); }
.tv-res-row { display: flex; gap: 12px; margin: 8px 0 2px; }
.tv-res { flex: 1; }
.tv-res .rl { font-size: 11.5px; color: var(--xam); display: block; margin-bottom: 3px; }
.tv-res .rb { height: 6px; background: var(--kem-2); border-radius: 999px; overflow: hidden; }
.tv-res .rb i { display: block; height: 100%; background: #6aa9d8; border-radius: 999px; transition: width .4s var(--ease); }
.tv-res .rb.energy i { background: #c9a24c; }
.tv-stat-chip.pending { background: #efe7d6; color: #8a6d2a; }
.tv-stat-chip.pending b { color: #8a6d2a; }

.tv-karma { background: var(--do-tint); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.tv-karma p { font-size: 13.5px; color: var(--do); margin: 4px 0; }

.tv-advisor { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tv-advisor:last-child { border-bottom: 0; }
.tv-advisor .av-ic { font-size: 20px; flex: none; width: 26px; text-align: center; }
.tv-advisor b { font-size: 13.5px; color: var(--navy); }
.tv-advisor p { font-size: 13.5px; color: var(--muc); margin: 2px 0 0; line-height: 1.5; }

.tv-strat-grid { display: grid; gap: 10px; margin: 10px 0; }
.tv-strat { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--kem-3); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 14px; cursor: pointer; transition: all .15s var(--ease); width: 100%; }
.tv-strat:hover { border-color: var(--xanh-deep); }
.tv-strat.selected { border-color: var(--navy); background: #fff; box-shadow: var(--shadow-sm); }
.tv-strat .ic { font-size: 22px; flex: none; }
.tv-strat b { color: var(--navy); font-size: 15px; }
.tv-strat p { font-size: 12.5px; color: var(--xam); margin: 3px 0 0; }

.tv-budget { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muc); background: var(--kem-2); border-radius: 10px; padding: 9px 12px; margin: 8px 0 12px; }
.tv-budget b { color: var(--navy); }
.tv-action { position: relative; }
.tv-action .cost { display: block; font-size: 11px; color: var(--xanh-deep); margin-top: 6px; font-weight: 600; letter-spacing: .02em; }
.tv-action.selected { border-color: var(--navy); background: #fff; }
.tv-action.disabled { opacity: .5; cursor: not-allowed; }
.tv-action .lock { display: block; font-size: 10.5px; color: var(--do); margin-top: 5px; line-height: 1.35; }

.tv-choice.locked { opacity: .62; cursor: not-allowed; background: var(--kem-2); }
.tv-choice .lockrow { display: block; font-size: 11.5px; color: var(--do); margin-top: 7px; }
.tv-choice .costrow { display: block; font-size: 11px; color: var(--xanh-deep); margin-top: 6px; font-weight: 600; }
.tv-event.temptation { border-left-color: #c9a24c; }
.tv-event.opportunity { border-left-color: var(--ok); }
.tv-event.risk { border-left-color: var(--do); }
.tv-hint-mini { font-size: 12px; color: var(--xam); text-align: center; margin: 12px 0 0; font-style: italic; }

.tv-risk-grid { display: grid; gap: 10px; }
.tv-risk { background: var(--kem-3); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; border-left: 3px solid var(--xam); }
.tv-risk.ok { border-left-color: var(--ok); }
.tv-risk.hole { border-left-color: var(--do); }
.tv-risk .rk-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.tv-risk .rk-top b { font-size: 14px; color: var(--navy); }
.tv-risk .rk-top span { font-size: 11.5px; font-weight: 700; }
.tv-risk.ok .rk-top span { color: var(--ok); }
.tv-risk.hole .rk-top span { color: var(--do); }
.tv-risk p { font-size: 12.5px; color: var(--xam); margin: 7px 0 0; line-height: 1.5; }

.tv-wins { display: grid; gap: 6px; }
.tv-win { font-size: 13px; color: var(--muc); display: flex; gap: 8px; align-items: baseline; }
.tv-win span { flex: none; font-weight: 800; }
.tv-win.y { color: var(--ok); }
.tv-win.n { color: var(--xam); }
.tv-muted { color: var(--xam); }
@media (min-width: 560px) { .tv-strat-grid { grid-template-columns: 1fr 1fr; } .tv-risk-grid { grid-template-columns: 1fr 1fr; } .tv-wins { grid-template-columns: 1fr 1fr; } }

/* ===== Danh hiệu (hài hước) + ảnh chia sẻ ===== */
.tv-persona { margin: 14px auto 8px; max-width: 560px; }
.tv-persona-title { font-size: clamp(22px, 5.5vw, 30px); color: var(--navy); margin: 6px 0 8px; line-height: 1.25; }
.tv-persona-quip { font-family: var(--serif); font-style: italic; color: var(--xam); font-size: 15.5px; line-height: 1.6; margin: 0; }
.tv-share { background: var(--kem-3); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin: 6px 0 16px; box-shadow: var(--shadow-sm); }
.tv-share-head { margin-bottom: 10px; }
.tv-share-loading { text-align: center; color: var(--xam); font-size: 13px; padding: 30px 0; }
.tv-share-img { width: 100%; max-width: 360px; margin: 0 auto 12px; display: block; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.tv-share-btns { display: flex; gap: 9px; flex-wrap: wrap; }
.tv-share-btns .tv-btn { flex: 1; min-width: 120px; font-size: 14.5px; padding: 12px 14px; min-height: 46px; }

/* ===== UX rõ ràng hơn: chỉ dẫn từng bước · mẹo · gập mở ===== */
.tv-stephead { margin: 16px 0 12px; }
.tv-steptop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tv-stepname { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 16px; }
.tv-stepdots { display: flex; gap: 6px; }
.tv-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--kem-2); border: 1.5px solid var(--line); }
.tv-dot.on { background: var(--navy); border-color: var(--navy); transform: scale(1.15); }
.tv-dot.done { background: var(--xanh); border-color: var(--xanh); }
.tv-stepinstr { font-size: 14.5px; color: var(--muc); margin: 7px 0 0; line-height: 1.5; }

.tv-teach { display: flex; gap: 10px; align-items: flex-start; background: var(--xanh-tint); border: 1px solid #bcd6f0; border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.tv-teach .ic { font-size: 18px; flex: none; }
.tv-teach div { font-size: 13.5px; color: var(--muc); line-height: 1.55; }
.tv-teach b { color: var(--navy); }

.tv-collapse-btn { display: block; width: 100%; text-align: left; background: var(--kem-3); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; font-size: 13.5px; font-weight: 600; color: var(--navy); cursor: pointer; font-family: var(--sans); }
.tv-collapse-btn:hover { border-color: var(--xanh-deep); background: #fff; }

.tv-alloc-bar { position: sticky; top: 51px; z-index: 19; display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: var(--kem); border-radius: 12px; padding: 11px 16px; margin: 0 0 12px; box-shadow: var(--shadow-sm); }
.tv-alloc-bar span:first-child { font-size: 13px; opacity: .85; }
.tv-alloc-bar .tv-remaining { font-family: var(--serif); font-size: 20px; color: #fff; }
.tv-alloc-bar .tv-remaining.over { color: #ffb3b3; }

/* slider to hơn, dễ kéo trên mobile */
.tv-fund input[type=range] { height: 30px; }
.tv-fund input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); border: 3px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer; }
.tv-fund input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); border: 3px solid #fff; cursor: pointer; }
.tv-fund-name small { display: block; }

/* ngân sách thời gian/sức ở bước hành động */
.tv-budget { display: flex; gap: 12px; background: var(--kem-2); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.tv-budget-res { flex: 1; }
.tv-budget-res .bl { font-size: 12.5px; color: var(--muc); display: block; margin-bottom: 5px; }
.tv-budget-res .bl b { color: var(--navy); font-size: 15px; }
.tv-budget-res .rb { height: 8px; background: #fff; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.tv-budget-res .rb i { display: block; height: 100%; background: #6aa9d8; border-radius: 999px; transition: width .35s var(--ease); }
.tv-budget-res .rb.energy i { background: #c9a24c; }

.tv-action { position: relative; padding-top: 28px; }
.tv-action-check { position: absolute; top: 8px; right: 10px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; }
.tv-action.selected .tv-action-check { background: var(--ok); border-color: var(--ok); }
.tv-action .cost { background: var(--kem-2); border-radius: 7px; padding: 4px 8px; display: inline-block; }

/* =========================================================================
   NÂNG CẤP — Khiên đời sống · Nhân quả hiện hình · Preset · Nhịp mùa
   ========================================================================= */

/* ---------- Khiên đời sống (9 quỹ hiển thị khi chơi) ---------- */
.tv-shields-toggle {
  width: 100%; margin-top: 10px; border: 1px dashed var(--line); background: var(--kem-2);
  color: var(--navy); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all .15s var(--ease);
}
.tv-shields-toggle:hover { border-color: var(--xanh-deep); }
.tv-shields-toggle b { font-family: var(--serif); }
.tv-shields-toggle.ok b { color: var(--ok); }
.tv-shields-toggle.mid b { color: var(--xanh-deep); }
.tv-shields-toggle.low b { color: var(--do); }
.tv-shields-grid {
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; margin-top: 10px;
  padding: 10px 6px; background: var(--kem-2); border-radius: 12px;
}
.tv-shield { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.tv-shield-ic { font-size: 15px; line-height: 1; filter: grayscale(.4); opacity: .85; }
.tv-shield-bar {
  position: relative; width: 14px; height: 40px; border-radius: 5px;
  background: #e7e2d3; overflow: hidden; display: block;
}
.tv-shield-bar i { position: absolute; left: 0; bottom: 0; width: 100%; border-radius: 5px 5px 0 0; transition: height .5s var(--ease); }
.tv-shield.ok .tv-shield-bar i { background: linear-gradient(180deg, #57a37a, var(--ok)); }
.tv-shield.mid .tv-shield-bar i { background: linear-gradient(180deg, var(--xanh), var(--xanh-deep)); }
.tv-shield.low .tv-shield-bar i { background: linear-gradient(180deg, #cf8a8a, var(--do)); }
.tv-shield.ok .tv-shield-ic { filter: none; opacity: 1; }
.tv-shield-lbl { font-size: 8px; line-height: 1.05; color: var(--xam); text-align: center; max-width: 100%; }
.tv-shields-hint { font-size: 11px; color: var(--xam); margin: 8px 2px 0; line-height: 1.5; }
@media (max-width: 460px) { .tv-shield-lbl { display: none; } .tv-shield-bar { height: 34px; } }

/* ---------- Nhịp mùa: viền màu theo mùa + banner chuyển mùa ---------- */
.tv-status { border-left: 3px solid var(--line); }
.tv-status.season-khoi-dau { border-left-color: #9fc08a; }
.tv-status.season-va-cham  { border-left-color: var(--do); }
.tv-status.season-tich-luy { border-left-color: var(--xanh-deep); }
.tv-status.season-dung-vung{ border-left-color: var(--navy); }

.tv-season-banner {
  display: flex; flex-direction: column; gap: 2px; text-align: center;
  padding: 16px 18px; border-radius: var(--r); margin: 4px 0 16px;
  border: 1px solid var(--line); background: var(--kem-3); animation: tvSeasonIn .6s var(--ease);
}
.tv-season-name { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--navy); letter-spacing: .03em; }
.tv-season-line { font-size: 13.5px; color: var(--xam); font-style: italic; }
.tv-season-banner.season-khoi-dau { background: linear-gradient(180deg, #eef4e8, var(--kem-3)); border-color: #cfe0c2; }
.tv-season-banner.season-va-cham  { background: linear-gradient(180deg, var(--do-tint), var(--kem-3)); border-color: #e2bcbc; }
.tv-season-banner.season-va-cham .tv-season-name { color: var(--do); }
.tv-season-banner.season-tich-luy { background: linear-gradient(180deg, var(--xanh-tint), var(--kem-3)); border-color: #bcd6f0; }
.tv-season-banner.season-dung-vung{ background: linear-gradient(180deg, #e7ecf3, var(--kem-3)); border-color: #c4d2e2; }
@keyframes tvSeasonIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.tv-midpoint {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; margin: 4px 0 16px;
  border-radius: var(--r); background: #fff; border: 1.5px solid var(--navy); box-shadow: var(--shadow-sm);
}
.tv-midpoint .seal { font-size: 22px; color: var(--navy); flex: none; }
.tv-midpoint b { font-family: var(--serif); color: var(--navy); font-size: 16px; }
.tv-midpoint p { font-size: 13.5px; color: var(--muc); margin: 4px 0 0; }

/* ---------- Nhân quả hiện hình ---------- */
.tv-karma-reveal { margin: 4px 0 16px; border-radius: var(--r); overflow: hidden; border: 1px solid #e2bcbc; background: var(--kem-3); animation: tvKarmaIn .55s var(--ease); }
@keyframes tvKarmaIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.tv-karma-head { display: flex; align-items: center; gap: 11px; padding: 13px 16px; background: linear-gradient(180deg, var(--do-tint), transparent); border-bottom: 1px solid var(--line); }
.tv-karma-head .seal { font-size: 22px; color: var(--do); line-height: 1; }
.tv-karma-head b { font-family: var(--serif); color: var(--do); font-size: 16px; display: block; }
.tv-karma-head span { font-size: 12.5px; color: var(--xam); }
.tv-karma-card { padding: 13px 16px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--line); }
.tv-karma-card:last-child { border-bottom: 0; }
.tv-karma-card.bad { border-left-color: var(--do); }
.tv-karma-card.good { border-left-color: var(--ok); }
.tv-karma-card.mixed { border-left-color: var(--xanh-deep); }
.tv-karma-origin { font-size: 12px; font-weight: 700; color: var(--xam); margin-bottom: 5px; }
.tv-karma-msg { font-size: 14px; color: var(--muc); margin: 0 0 8px; line-height: 1.5; }
.tv-karma-deltas { display: flex; gap: 6px; flex-wrap: wrap; }
.tv-kd { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.tv-kd.up { background: #e3efe7; color: var(--ok); }
.tv-kd.down { background: var(--do-tint); color: var(--do); }
@media (prefers-reduced-motion: reduce) { .tv-karma-reveal, .tv-season-banner { animation: none; } }

/* ---------- Preset chia tiền ---------- */
.tv-preset-lead { font-size: 12.5px; color: var(--xam); font-weight: 600; align-self: center; margin-right: 2px; }
.tv-preset-note { font-size: 12px; color: var(--xam); margin: -6px 2px 14px; line-height: 1.5; }
