/* ===========================================================================
   ui.css — revamp visual (12 Okt 2026).
   Dimuat SETELAH style.css: style.css tetap jadi kerangka (struktur grid,
   komponen chart, panel), berkas ini yang menentukan rasa — warna, jarak,
   hierarki, dan komponen visual baru.

   Arahnya: "almanak Tionghoa yang dicetak bagus". Tetap kertas hangat dan
   aksara kuas, tapi jarak lebih lega, judul lebih tegas, data ditampilkan
   sebagai kartu & angka besar, bukan baris tabel kecil.
   =========================================================================== */

/* ------------------------------------------------------------------ token */
:root {
  --paper:   #f4efe4;
  --paper-2: #efe8d9;
  --card:    #fffdf8;
  --ink:     #17150f;
  --ink-2:   #3c362c;
  --muted:   #7b7366;
  --line:    #e7dfcd;
  --line-2:  #d9cfb8;
  --gold:    #b8862b;
  --gold-2:  #8a6418;
  --vermilion: #c0392b;
  --accent:  #2c6fb5;

  --el-mu: #2f8f5b;  --el-huo: #d1483b;  --el-tu: #7a5230;
  --el-jin: #c9a227; --el-shui: #2c6fb5;

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-full: 999px;
  --sh-1: 0 1px 2px rgba(31, 26, 15, .05);
  --sh-2: 0 4px 16px rgba(31, 26, 15, .07);
  --sh-3: 0 14px 40px rgba(31, 26, 15, .13);
  --wrap: 1200px;
}

body {
  background:
    radial-gradient(1100px 520px at 50% -220px, #fbf7ee 0%, rgba(251, 247, 238, 0) 70%),
    var(--paper);
  font-size: 16.5px;
  line-height: 1.6;
}

.wrap { max-width: var(--wrap); padding: 28px 20px 64px; }

/* ------------------------------------------------------------- topbar/foot */
.topbar {
  position: sticky; top: 0; z-index: 50;
  padding: 0 22px; height: 58px;
  background: rgba(255, 253, 248, .86);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; letter-spacing: .01em; }
.brand-han {
  margin: 0; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--vermilion), #8e2a20);
  color: #fff; border-radius: 9px; font-size: 14px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(192, 57, 43, .28);
}
.langswitch a { border-radius: var(--r-full); font-weight: 600; }
.foot { border-top: 1px solid var(--line); background: var(--card); font-size: 12.5px; padding: 26px 20px; }

/* ------------------------------------------------------------------ kartu */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  margin-bottom: 22px;
  box-shadow: var(--sh-1);
}
h1 { font-family: var(--font-body); font-weight: 700; font-size: 38px; line-height: 1.12; letter-spacing: -.015em; }
h2 { font-family: var(--font-body); font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
h3.sub, .pn-title, .p-title, .dm-title, .toc-title {
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}

/* seksi dengan kepala bernomor: dipakai di halaman depan & laporan */
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.sec-head .n {
  flex: none; width: 27px; height: 27px; border-radius: 50%;
  background: var(--ink); color: #fff; font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.sec-head h2 { margin: 0; font-size: 20px; }
.sec-head .hint-x { font-family: var(--font-ui); font-size: 13px; color: var(--muted); margin-left: auto; }

/* ---------------------------------------------------------------- tombol */
.btn {
  border-radius: var(--r-full); padding: 11px 20px; font-size: 14px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  box-shadow: var(--sh-1); transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: none; }
.btn.primary {
  background: linear-gradient(160deg, #2a251b, var(--ink)); border-color: var(--ink); color: #fff;
  box-shadow: 0 6px 18px rgba(23, 21, 15, .22);
}
.btn.primary:hover { box-shadow: 0 10px 26px rgba(23, 21, 15, .3); }
.btn.ghost { background: transparent; box-shadow: none; border-color: var(--line-2); color: var(--muted); }
.btn.ghost:hover { background: #fff; color: var(--ink); }
.btn.small { padding: 6px 13px; font-size: 12.5px; }
.pill { font-weight: 600; padding: 3px 11px; letter-spacing: .01em; }

/* ----------------------------------------------------------------- form */
.form label { font-size: 13px; letter-spacing: .01em; color: var(--ink-2); }
.form .field { margin-bottom: 20px; }
.form input[type=text], .form input[type=number], .form select, .chat-form textarea {
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 14px;
  background: #fffefb; font-size: 15.5px; transition: border-color .12s, box-shadow .12s;
}
.form input:focus, .form select:focus, .chat-form textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 134, 43, .15);
}
.form input::placeholder { color: #b5ac9c; }
.radios label, .chk {
  border: 1px solid var(--line); border-radius: var(--r-full); padding: 8px 15px; margin: 0 10px 0 0;
  background: #fff; cursor: pointer; font-family: var(--font-ui); font-size: 14px;
}
.radios label:has(input:checked), .chk:has(input:checked) {
  border-color: var(--gold); background: #fdf8ec; box-shadow: 0 0 0 2px rgba(184, 134, 43, .12);
}
.ac-list { border-radius: var(--r-sm); box-shadow: var(--sh-3); border-color: var(--line-2); }
.ac-item { padding: 10px 14px; }

/* --------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1c1a13 0%, #2d2719 55%, #3a3120 100%);
  color: #f6efe0; border-radius: var(--r-lg); padding: 44px 44px 40px; margin-bottom: 24px;
  box-shadow: var(--sh-2);
}
.hero::after {
  content: '八字'; position: absolute; right: 26px; bottom: -36px;
  font-family: var(--font-han); font-size: 190px; font-weight: 900; line-height: .8;
  color: rgba(246, 239, 224, .055); letter-spacing: -.04em; pointer-events: none;
}
.hero h1 { color: #fffdf6; font-size: 42px; margin-bottom: 14px; max-width: 18ch; }
.hero .lead { color: #cfc5ad; max-width: 60ch; font-size: 16.5px; }
.hero .lead b { color: #f3e7cd; font-weight: 600; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-tag {
  font-family: var(--font-ui); font-size: 12.5px; color: #e6dbc2;
  border: 1px solid rgba(246, 239, 224, .22); border-radius: var(--r-full); padding: 6px 14px;
  background: rgba(246, 239, 224, .05);
}
.hero-tag b { color: var(--gold); font-weight: 700; margin-right: 5px; }

/* ------------------------------------------------------------- kartu tier */
.tiers { gap: 14px; }
.tier-box {
  border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 18px 18px 16px;
  box-shadow: var(--sh-1); transition: transform .14s ease, box-shadow .14s ease, border-color .14s;
  position: relative; overflow: hidden;
}
.tier-box::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--tier-c, var(--line-2));
}
.tier-bronze .tier-box { --tier-c: #b07a3c; } .tier-silver .tier-box { --tier-c: #8f9aa6; }
.tier-gold .tier-box { --tier-c: var(--gold); }
.tier:hover .tier-box { transform: translateY(-2px); box-shadow: var(--sh-2); }
.tier input:checked + .tier-box {
  border-color: var(--tier-c); box-shadow: 0 0 0 3px rgba(184, 134, 43, .14), var(--sh-2);
  background: #fffefa;
}
.tier-box b { font-size: 17px; letter-spacing: -.01em; margin-bottom: 6px; }
.tier-box small { font-size: 12.5px; line-height: 1.5; }
.tier-box em {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 11px; font-weight: 700; color: var(--tier-c); letter-spacing: .08em;
}

/* --------------------------------------------------- riwayat jadi kartu */
.rep-list { display: grid; gap: 10px; }
.rep-row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.rep-row:hover { border-color: var(--line-2); box-shadow: var(--sh-2); transform: translateY(-1px); }
.rep-glyph {
  width: 52px; height: 52px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-han); font-size: 27px; font-weight: 900;
  color: var(--el, var(--ink)); background: var(--el-bg, #f3ede1); border: 1px solid var(--line);
}
.rep-name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.rep-meta { font-family: var(--font-ui); font-size: 12.5px; color: var(--muted); margin-top: 3px;
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.rep-act { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* =========================================================== halaman laporan */
.layout { grid-template-columns: 252px minmax(0, 1fr); gap: 30px; }

/* kepala laporan: papan ringkas, bukan judul + deretan tombol */
.rep-hero {
  background: linear-gradient(135deg, #1c1a13 0%, #2e2819 60%, #3b3220 100%);
  color: #f6efe0; border-radius: var(--r-lg); padding: 26px 30px; margin-bottom: 20px;
  box-shadow: var(--sh-2); position: relative; overflow: hidden;
}
.rep-hero .rh-top { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.rep-hero h1 { color: #fffdf6; font-size: 31px; margin: 0 0 6px; }
.rep-hero .rh-sub { font-family: var(--font-ui); font-size: 12.5px; color: #b9ae96; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rep-hero .btn { border-color: rgba(246, 239, 224, .26); background: rgba(246, 239, 224, .08); color: #f6efe0; box-shadow: none; }
.rep-hero .btn:hover { background: rgba(246, 239, 224, .16); }
.rep-hero .btn.primary { background: var(--gold); border-color: var(--gold); color: #231c08; }
.rep-hero .btn.primary:hover { background: #cf9a33; }

/* deret empat pilar versi mini di kepala laporan */
.rh-pillars { display: flex; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.rh-p {
  min-width: 92px; flex: 1; text-align: center; border-radius: var(--r-md); padding: 10px 8px 9px;
  background: rgba(246, 239, 224, .06); border: 1px solid rgba(246, 239, 224, .14);
}
.rh-p.is-day { border-color: var(--gold); background: rgba(184, 134, 43, .16); }
.rh-p-lab { font-family: var(--font-ui); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #a99e86; }
.rh-p-han { font-family: var(--font-han); font-size: 30px; font-weight: 900; line-height: 1.15; margin-top: 4px; }
.rh-p-han .z { display: block; }
.rh-p-sub { font-family: var(--font-ui); font-size: 10.5px; color: #b9ae96; margin-top: 3px; }

/* tiga angka penting di kanan kepala laporan */
.rh-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.rh-stat { background: rgba(246, 239, 224, .07); border: 1px solid rgba(246, 239, 224, .14);
  border-radius: var(--r-md); padding: 9px 15px; min-width: 96px; }
.rh-stat .k { font-family: var(--font-ui); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #a99e86; }
.rh-stat .v { font-size: 21px; font-weight: 700; line-height: 1.25; margin-top: 2px; }
.rh-stat .v small { font-size: 12px; color: #b9ae96; font-weight: 400; }

/* ------------------------------------------------------- daftar isi kiri */
.toc { top: 74px; gap: 2px; max-height: calc(100vh - 92px); padding-right: 4px; }
.toc a { padding: 7px 12px; border-radius: 8px; border-left: 0; font-size: 13.5px; color: var(--ink-2); }
.toc a.toc-h { color: var(--muted); font-size: 13px; }
.toc a:hover { background: #ece5d6; }
.toc a.active, .toc a.toc-h.active {
  background: var(--ink); color: #fdfaf2; font-weight: 600; border-left: 0;
}
.toc-title { margin-bottom: 8px; }
.toc-prog { height: 3px; background: var(--line); border-radius: 3px; margin: 2px 0 12px; overflow: hidden; }
.toc-prog i { display: block; height: 100%; width: var(--p, 0%); background: var(--gold); transition: width .3s ease; }

/* --------------------------------------------------------- kartu chart */
.chart-head { gap: 26px; padding: 4px 0; }
.dm-card { gap: 18px; }
.dm-han {
  width: 86px; height: 86px; border-radius: 22px; display: flex; align-items: center; justify-content: center;
  font-size: 54px; background: var(--el-bg, #f3ede1); border: 1px solid var(--line);
}
.dm-name { font-size: 20px; }
.birth-info { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); }
.birth-info b { color: var(--muted); font-weight: 600; font-family: var(--font-ui); font-size: 12px;
  text-transform: uppercase; letter-spacing: .06em; }

.pillars { gap: 14px; }
.pillar { border-radius: var(--r-md); padding: 16px 12px; border-color: var(--line); box-shadow: var(--sh-1); }
.pillar.is-day { box-shadow: 0 0 0 2px rgba(184, 134, 43, .18), var(--sh-2); }
.p-han { font-size: 52px; }
.hid { border-radius: 7px; padding: 3px 7px; }
.chip { border-radius: var(--r-full); padding: 3px 9px; }

.score-ring { width: 142px; height: 142px; }
.score-ring::before { inset: 13px; }
.score-num { font-size: 46px; font-family: var(--font-ui); letter-spacing: -.03em; }
.score-level { font-size: 27px; }
.bars .bar-row { margin-bottom: 10px; }
.bar { height: 16px; border-radius: 8px; background: #ece5d6; }
.phase { background: #f1ebde; border-radius: var(--r-full); font-weight: 600; }

/* ----------------------------------------------------------- narasi */
.narrative { padding: 30px 34px 34px; }
.md { font-size: 17px; line-height: 1.78; color: var(--ink-2); }
/* Lebar baca dibatasi di paragrafnya saja; kartu, tabel, dan panel tetap boleh
   memakai lebar penuh supaya datanya lega. */
.md > p, .md > ul:not(.cardlist), .md > ol:not(.cardlist), .md > blockquote { max-width: 74ch; }
.md > p { text-align: left; hyphens: manual; }
.md h2 {
  font-family: var(--font-body); font-size: 27px; font-weight: 700; letter-spacing: -.015em;
  color: var(--ink); border-top: 0; padding-top: 0; margin: 46px 0 14px;
  display: flex; align-items: center; gap: 12px;
}
.md h2::before {
  content: ''; flex: none; width: 10px; height: 10px; border-radius: 3px;
  background: var(--gold); transform: rotate(45deg);
}
.md h2 + p { font-size: 18.5px; line-height: 1.7; color: var(--ink-2); }
.md h3 { font-family: var(--font-body); font-size: 20px; text-align: left; color: var(--ink);
  margin: 30px 0 8px; letter-spacing: -.01em; }
.md h3::after { margin: 8px 0 0; width: 34px; }
.md strong { color: var(--ink); font-weight: 600; }
.md mark.hl { background: linear-gradient(transparent 58%, #f8e39c 58%); padding: 0 2px; }
.md p.summary { background: #fbf7ec; border-left: 4px solid var(--gold); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 16px 20px; font-size: 16.5px; }
.md table { width: 100%; font-size: 14.5px; border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; border-collapse: separate; border-spacing: 0; }
.md th { background: #f6f1e5; font-family: var(--font-ui); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
.md td { border: 0; border-bottom: 1px solid #f0ebdf; padding: 10px 12px; }
.md tr:last-child td { border-bottom: 0; }
.md tbody tr:nth-child(even) td { background: #fdfbf5; }

/* kotak "Intinya" jadi kartu ringkas di atas tiap bagian */
.md .intinya {
  background: linear-gradient(180deg, #f7fbf8, #f2f8f4); border: 1px solid #d3e6d9;
  border-left: 4px solid #2f8f5b; border-radius: var(--r-md); padding: 16px 20px 14px; margin: 14px 0 26px;
  max-width: none;
}
.md .intinya-lab { font-size: 11px; letter-spacing: .12em; color: #1e6b3a; }
.md .intinya li { font-size: 15.5px; line-height: 1.6; }

/* ------------------------------------------------------- panel data */
.panel {
  background: linear-gradient(180deg, #fdfbf4, #faf6ec); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 20px 22px; margin: 20px 0 28px; max-width: none;
  box-shadow: var(--sh-1);
}
.pn-title { margin-bottom: 14px; }
.pn-v { font-family: var(--font-ui); font-size: 24px; letter-spacing: -.02em; }
.pn-track, .pn-bar-track { background: #ece5d6; }
.pn-chip { border-radius: var(--r-full); padding: 4px 11px; }
.pn-col { border-radius: var(--r-md); padding: 13px 15px; }
.pn-lk, .pn-tl-item { border-radius: var(--r-sm); }

/* --------------------------------------------------------- chatbot */
.chatbox { border-radius: var(--r-lg); }
.msg { font-size: 16px; border-radius: 16px; }
.msg.user { background: var(--ink); }
.msg.assistant { background: #f4eee1; }

/* ------------------------------------------------------- tanggapan layar */
@media (max-width: 900px) {
  .wrap { padding: 18px 14px 48px; }
  .hero { padding: 30px 24px 28px; }
  .hero h1 { font-size: 31px; }
  .hero::after { font-size: 128px; right: -6px; }
  .card { padding: 20px 18px; border-radius: var(--r-md); }
  .rep-hero { padding: 20px 20px; }
  .rep-hero h1 { font-size: 25px; }
  .rep-row { grid-template-columns: 44px minmax(0, 1fr); }
  .rep-glyph { width: 44px; height: 44px; font-size: 23px; }
  .rep-act { grid-column: 1 / -1; justify-content: flex-start; }
  .narrative { padding: 20px 18px 24px; }
  .md { font-size: 16.5px; }
  .md h2 { font-size: 23px; margin-top: 34px; }
}

/* ------------------------------------------------- papan kepala laporan */
.rh-body {
  display: grid; grid-template-columns: minmax(280px, 1fr) auto; gap: 22px;
  align-items: end; margin-top: 20px;
}
.rh-switch {
  display: inline-flex; gap: 4px; margin-top: 20px; padding: 4px;
  background: rgba(246, 239, 224, .08); border: 1px solid rgba(246, 239, 224, .14); border-radius: var(--r-md);
}
.rh-switch .sw {
  display: flex; flex-direction: column; gap: 1px; padding: 8px 16px; border-radius: var(--r-sm);
  text-decoration: none; font-family: var(--font-ui); font-size: 13.5px; line-height: 1.3; color: #b9ae96;
}
.rh-switch .sw b { color: #e9dfc8; font-weight: 600; }
.rh-switch .sw small { font-size: 11px; }
.rh-switch .sw.on { background: #fffdf8; }
.rh-switch .sw.on b { color: var(--ink); } .rh-switch .sw.on { color: var(--muted); }

@media (max-width: 900px) {
  .rh-body { grid-template-columns: 1fr; align-items: start; }
  .rh-stats { width: 100%; } .rh-stat { flex: 1; }
  .rh-p { min-width: 70px; }
  .rh-p-han { font-size: 25px; }
}

/* ------------------------------------------------- kepala bagian narasi */
.md .rsec-head {
  display: flex; align-items: center; gap: 13px;
  margin: 52px 0 16px; padding-bottom: 13px; border-bottom: 1px solid var(--line);
}
.md .rsec-head:first-child { margin-top: 6px; }
.md .rsec-head h2 { margin: 0; border: 0; padding: 0; display: block; font-size: 26px; }
.md .rsec-head h2::before { display: none; }
.md .rsec-head .ico {
  flex: none; width: 40px; height: 40px; padding: 8px; border-radius: 12px;
  color: var(--gold-2); background: #f8f2e3; border: 1px solid #ecdfc3;
}
.md .rsec-head + p { font-size: 18.5px; line-height: 1.68; color: var(--ink-2); }

/* -------------------------------------- daftar "judul — penjelasan" jadi kartu */
.md .cardlist {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 12px; padding: 0; margin: 16px 0 24px; list-style: none; max-width: none;
}
.md .cardlist > li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 15px 17px; margin: 0; font-size: 15px; line-height: 1.58;
  box-shadow: var(--sh-1);
}
.md .cardlist > li::marker { content: none; }
.md .cardlist > li > p:first-child { margin-top: 0; }
.md .cardlist > li > p:last-child { margin-bottom: 0; }
.md .cardlist > li > strong:first-child,
.md .cardlist > li > p:first-child > strong:first-child {
  display: block; color: var(--gold-2); font-size: 14px; letter-spacing: .01em;
  margin-bottom: 5px; font-weight: 700;
}
.md .cardlist > li ul { margin: 6px 0 0; padding-left: 18px; font-size: 14.5px; }

/* kotak Intinya: poin bernomor supaya terbaca sebagai daftar singkat */
.md .intinya ul { list-style: none; padding: 0; counter-reset: inti; }
.md .intinya li { position: relative; padding-left: 30px; counter-increment: inti; }
.md .intinya li::before {
  content: counter(inti); position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: #2f8f5b; color: #fff;
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.md .intinya li::marker { content: none; }

/* kutipan */
.md blockquote {
  margin: 18px 0; padding: 14px 20px; border-left: 3px solid var(--gold);
  background: #fbf7ec; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic; color: var(--ink-2);
}

/* kartu bernomor (daftar "sepuluh hal penting") */
.md ol.cardlist { counter-reset: kartu; }
.md ol.cardlist > li { counter-increment: kartu; padding-left: 52px; position: relative; }
.md ol.cardlist > li::before {
  content: counter(kartu, decimal-leading-zero); position: absolute; top: 15px; left: 16px;
  width: 25px; height: 25px; border-radius: 8px; background: #f6efdd; border: 1px solid #e9dbbb;
  color: var(--gold-2); font-family: var(--font-ui); font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.md ol.cardlist > li::marker { content: none; }

/* =============================================== papan proses penulisan */
.genboard {
  background: linear-gradient(180deg, #fffdf6, #fdf8ed);
  border: 1px solid #ecdfc3; border-radius: var(--r-md); padding: 18px 20px 16px; margin-bottom: 22px;
}
.gb-head { display: flex; align-items: center; gap: 10px; font-family: var(--font-ui); font-size: 14.5px; }
.gb-head b { font-weight: 600; }
.gb-count { margin-left: auto; color: var(--muted); font-size: 13px; }
.gb-count b { color: var(--gold-2); font-size: 15px; }
.gb-bar { height: 6px; background: #ece2cc; border-radius: 3px; margin: 13px 0 14px; overflow: hidden; }
.gb-bar i { display: block; height: 100%; width: 0%; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), #d9a83f); transition: width .5s ease; }
.gb-steps { display: flex; flex-wrap: wrap; gap: 7px; }
.gb-step {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-ui); font-size: 12.5px;
  padding: 5px 12px; border-radius: var(--r-full); background: #fff; border: 1px solid var(--line);
  color: var(--muted); transition: background .2s, color .2s, border-color .2s;
}
.gb-dot { width: 7px; height: 7px; border-radius: 50%; background: #d6ccb6; flex: none; }
.gb-step.run { border-color: var(--gold); color: var(--gold-2); background: #fdf6e6; font-weight: 600; }
.gb-step.run .gb-dot { background: var(--gold); animation: gb-pulse 1.3s ease-in-out infinite; }
.gb-step.done { border-color: #cfe6d8; background: #f1f9f4; color: #2a6b45; }
.gb-step.done .gb-dot { background: #2f8f5b; }
.gb-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; font-family: var(--font-ui); }
@keyframes gb-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* bagian yang belum jadi: kerangka teks, bukan baris status telanjang */
.narrative .sec-status {
  border: 1px dashed var(--line-2); border-radius: var(--r-md); background: #fdfbf5;
  padding: 16px 18px; margin: 22px 0; font-size: 14px;
}
.sec-skel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sec-skel-head b { color: var(--ink-2); font-size: 15px; font-family: var(--font-body); }
.skel { margin-top: 12px; display: grid; gap: 8px; }
.skel i {
  display: block; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, #efe8d8 25%, #f7f2e6 50%, #efe8d8 75%);
  background-size: 300% 100%; animation: skel 1.6s ease-in-out infinite;
}
.skel i:nth-child(2) { width: 92%; animation-delay: .15s; }
.skel i:nth-child(3) { width: 64%; animation-delay: .3s; }
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .skel i, .gb-step.run .gb-dot { animation: none; }
}

/* ------------------------------------------- cincin sebaran lima elemen */
.el-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.el-wrap .bars { flex: 1; min-width: 260px; }
.el-donut {
  position: relative; width: 148px; height: 148px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 1px rgba(23, 21, 15, .06);
}
.el-donut::before {
  content: ''; position: absolute; inset: 27px; background: var(--card); border-radius: 50%;
  box-shadow: 0 1px 3px rgba(23, 21, 15, .08);
}
.el-donut-mid { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; }
.el-donut-han { font-family: var(--font-han); font-size: 34px; font-weight: 900; line-height: 1; }
.el-donut-pct { font-family: var(--font-ui); font-size: 12px; color: var(--muted); margin-top: 3px; }
@media (max-width: 900px) { .el-donut { width: 120px; height: 120px; } .el-donut::before { inset: 22px; } }

@media (max-width: 560px) {
  .rep-hero .actions { width: 100%; }
  .rep-hero .actions .btn, .rep-hero .actions form { flex: 1 1 auto; }
  .rh-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .rh-stat { min-width: 0; padding: 8px 10px; }
  .rh-stat .v { font-size: 17px; }
  .rh-stat .v small { display: block; font-size: 10.5px; line-height: 1.3; margin-top: 2px; }
  .rh-p { min-width: 0; padding: 8px 4px; }
  .rh-p-lab { font-size: 9px; letter-spacing: .06em; }
  .rh-p-sub { display: none; }
  .sec-head .hint-x { display: none; }
  .hero-tag { font-size: 11.5px; padding: 5px 11px; }
}

/* ===========================================================================
   Love Compatibility (合婚) — 13 Okt 2026.
   Komponen khusus halaman kecocokan dua orang. Memakai token yang sama dengan
   seluruh situs; tidak ada warna baru yang diperkenalkan selain pita band skor.
   =========================================================================== */

/* tab fitur di topbar */
.topbar .tabs { display: flex; gap: 4px; margin-left: 22px; margin-right: auto; }
.topbar .tabs a {
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; color: var(--muted);
  padding: 7px 14px; border-radius: var(--r-full); display: inline-flex; align-items: center; gap: 7px;
  transition: background .12s, color .12s;
}
.topbar .tabs a:hover { background: #ece5d6; color: var(--ink); }
.topbar .tabs a.on { background: var(--ink); color: #fdfaf2; }
.topbar .tabs .tab-han { font-family: var(--font-han); font-size: 12px; opacity: .85; }

/* hero halaman kecocokan: sedikit lebih hangat daripada hero laporan tunggal */
.hero-cp { background: linear-gradient(135deg, #2a1a16 0%, #3d231c 55%, #4a2a20 100%); }
.hero-cp::after { content: '合'; }

/* -------------------------------------------------------- form dua orang */
.two-people { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.person { position: relative; }
.person::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 4px;
  border-radius: var(--r-lg) 0 0 var(--r-lg); background: var(--side-c, var(--gold));
}
.person-a { --side-c: #c0392b; }
.person-b { --side-c: #2c6fb5; }
.person .sec-head .n { background: var(--side-c); border-color: var(--side-c); color: #fff; }

/* -------------------------------------------------------- panel skor */
.score-panel { padding: 26px 28px; }
.sp-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }

/* cincin skor: conic-gradient, tanpa JS dan tanpa gambar */
.score-dial {
  width: 148px; height: 148px; border-radius: 50%; position: relative; flex: none;
  background: conic-gradient(var(--band-c) calc(var(--p) * 3.6deg), #e9e2d4 0);
  display: flex; align-items: center; justify-content: center;
}
.score-dial::after {
  content: ''; position: absolute; inset: 11px; border-radius: 50%;
  background: var(--card); box-shadow: inset 0 1px 3px rgba(31, 26, 15, .07);
}
.score-dial .sd-in { position: relative; z-index: 1; text-align: center; line-height: 1; }
.score-dial .sd-in b { display: block; font-size: 46px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.score-dial .sd-in small { font-family: var(--font-ui); font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }

/* pita band: satu skala warna dipakai di dial, bar, dan pil riwayat */
.band-sangat_mudah { --band-c: #2f8f5b; }
.band-lancar       { --band-c: #5aa05c; }
.band-seimbang     { --band-c: #c9a227; }
.band-menantang    { --band-c: #d98324; }
.band-berat        { --band-c: #d1483b; }
.band-sangat_berat { --band-c: #a32c21; }
/* riwayat: band dihitung dari skor (0-4), karena nama band tidak disimpan di baris */
.band-0, .band-1 { --band-c: #d1483b; }
.band-2 { --band-c: #c9a227; }
.band-3 { --band-c: #5aa05c; }
.band-4, .band-5 { --band-c: #2f8f5b; }

.sp-lab { font-family: var(--font-ui); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.sp-band { font-size: 27px; margin: 4px 0 6px; letter-spacing: -.015em; }
.sp-scale { font-family: var(--font-ui); font-size: 12.5px; color: var(--muted); }
.sp-who { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.cp-name {
  display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600;
  background: #f3ede1; border: 1px solid var(--line); border-radius: var(--r-full); padding: 5px 14px 5px 6px;
}
.cp-name b {
  font-family: var(--font-han); font-size: 19px; font-weight: 900; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--el, var(--ink));
}
.cp-amp { font-size: 16px; color: var(--muted); }

/* enam sub-skor sebagai batang */
.sp-subs { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.sp-subs-lab, .dr-lab, .am-lab {
  font-family: var(--font-ui); font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); margin-bottom: 12px;
}
.subrow { display: grid; grid-template-columns: 210px minmax(0, 1fr) 36px; gap: 14px; align-items: center; margin-bottom: 11px; }
.sr-k { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.sr-k small { display: block; font-family: var(--font-ui); font-size: 11.5px; font-weight: 400; color: var(--muted); line-height: 1.4; }
.sr-bar { height: 11px; background: #ece5d6; border-radius: var(--r-full); overflow: hidden; }
.sr-bar i { display: block; height: 100%; border-radius: var(--r-full); background: var(--band-c, var(--gold)); transition: width .4s ease; }
.sr-v { font-size: 16px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* penyumbang terbesar: dua kolom, naik & turun */
.sp-drivers { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.dr-lab.up { color: #1e6b3a; } .dr-lab.down { color: #8f2318; }
.dr-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.dr-col li { font-size: 13.5px; line-height: 1.5; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; align-items: start; }
.dr-delta {
  font-family: var(--font-ui); font-size: 12px; font-weight: 700; text-align: center;
  border-radius: 7px; padding: 2px 0; font-variant-numeric: tabular-nums;
}
.dr-delta.up { background: #e6f3ec; color: #1e6b3a; }
.dr-delta.down { background: #fbe8e5; color: #8f2318; }
.sp-note { margin-top: 16px; }

/* -------------------------------------------------- dua chart berdampingan */
.cp-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cp-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; background: #fff; }
.cpc-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 14px; }
.cpc-dm {
  width: 58px; height: 58px; border-radius: 15px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-han); font-size: 32px; font-weight: 900; color: #fff;
  background: var(--el, var(--ink));
}
.cpc-name { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.cpc-meta { font-family: var(--font-ui); font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.cpc-pillars { display: flex; gap: 7px; }
.cpc-p { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 4px; background: #fdfbf5; }
.cpc-p.is-day { border-color: var(--gold); background: #fdf6e6; }
.cpc-p-lab { font-family: var(--font-ui); font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cpc-p-han { font-family: var(--font-han); font-size: 25px; font-weight: 900; line-height: 1.12; }
.cpc-p-sub { font-family: var(--font-ui); font-size: 10px; color: var(--muted); }
.cpc-stats { margin-top: 13px; display: grid; gap: 5px; font-size: 13.5px; }
.cpc-stats .k {
  font-family: var(--font-ui); font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); display: inline-block; min-width: 118px;
}
.cpc-stats small { color: var(--muted); font-size: 12px; }
.cpc-els { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; height: 92px; }
.cpc-el { flex: 1; text-align: center; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
/* tinggi batang = persen x 0,9 (lihat template); dibatasi supaya elemen yang
   sangat dominan tidak menjebol kartunya */
.cpc-el i { display: block; width: 100%; border-radius: 4px 4px 0 0; min-height: 2px; max-height: 58px; }
.cpc-el span { font-family: var(--font-han); font-size: 13px; font-weight: 700; margin-top: 3px; }
.cpc-el small { font-family: var(--font-ui); font-size: 10px; color: var(--muted); }

/* -------------------------------------------------- pertemuan dua chart */
.cross-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cross-box { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; background: #fff; }
.cross-box.heavy { border-color: var(--gold); background: #fdf9ef; }
.cross-box.light { background: #faf7f0; }
.cb-lab {
  font-family: var(--font-ui); font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
}
.cb-weight {
  margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 11px;
  background: #ece5d6; border-radius: var(--r-full); padding: 2px 9px; color: var(--ink-2);
}
.cross-box.heavy .cb-weight { background: var(--gold); color: #231c08; font-weight: 600; }
.cb-pair { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 12px 0 10px; }
.cb-han { font-family: var(--font-han); font-size: 44px; font-weight: 900; line-height: 1; }
.cb-animal { font-family: var(--font-han); font-size: 26px; font-weight: 700; }
.cb-arrow { font-size: 20px; color: var(--muted); }
.cb-tags { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; align-items: center; }
.reltag {
  font-family: var(--font-han); font-size: 14px; font-weight: 700; border-radius: var(--r-full);
  padding: 3px 12px; border: 1px solid transparent;
}
.reltag.good { background: #e6f3ec; color: #1e6b3a; border-color: #bfe0cb; }
.reltag.bad { background: #fbe8e5; color: #8f2318; border-color: #e8c7c1; }
.reltag.neutral { background: #ece5d6; color: var(--muted); font-family: var(--font-ui); font-size: 12px; }
.cb-res { font-family: var(--font-han); font-size: 13px; color: var(--muted); }
.cb-rows { margin-top: 12px; display: grid; gap: 4px; font-size: 13px; border-top: 1px solid var(--line); padding-top: 10px; }
.cb-rows small { color: var(--muted); }
.cb-correct { margin-top: 10px; font-family: var(--font-ui); font-size: 12px; color: var(--ink-2);
  background: #fdf6e6; border-left: 3px solid var(--gold); border-radius: 0 7px 7px 0; padding: 7px 11px; }
.sup-row { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); gap: 10px; align-items: center;
  margin-top: 10px; font-size: 13.5px; }
.sup-from, .sup-to { font-weight: 600; }
.sup-arrow { font-size: 19px; color: var(--line-2); }
.sup-arrow.strong { color: #1e6b3a; }
.sup-arrow.ok { color: #5aa05c; }
.sup-arrow.bad { color: #8f2318; }
.sup-note { font-family: var(--font-ui); font-size: 12px; color: var(--ink-2); text-align: right; }
.sup-note small { display: block; color: var(--muted); font-size: 11px; }

/* peta area: gesekan mendarat di mana */
.area-map { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.am-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 9px; }
.am-k { font-size: 14px; font-weight: 600; }
.am-k small { display: block; font-family: var(--font-ui); font-size: 11.5px; font-weight: 400; color: var(--muted); line-height: 1.4; }
.am-bars { display: grid; gap: 4px; }
.am-bar { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 10px; align-items: center; }
.am-bar i { display: block; height: 8px; border-radius: var(--r-full); min-width: 2px; }
.am-bar span { font-family: var(--font-ui); font-size: 11px; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.am-bar.good i { background: #5aa05c; }
.am-bar.bad i { background: #d1483b; }

/* ------------------------------------------- kepala laporan pasangan */
.cp-hero { background: linear-gradient(135deg, #231713 0%, #3a241d 55%, #46281f 100%); }
.cp-rh-body { display: block; }
.cp-face { display: flex; align-items: stretch; gap: 14px; margin: 20px 0 16px; flex-wrap: wrap; }
.cp-face-p {
  flex: 1 1 180px; text-align: center; border-radius: var(--r-md); padding: 12px 10px;
  background: rgba(246, 239, 224, .06); border: 1px solid rgba(246, 239, 224, .14);
}
.cp-face-name { font-family: var(--font-ui); font-size: 12px; color: #d8cdb5; font-weight: 600; }
.cp-face-han { font-family: var(--font-han); font-size: 38px; font-weight: 900; line-height: 1.1; margin: 4px 0 2px; }
.cp-face-han .z { margin-left: 4px; }
.cp-face-sub { font-family: var(--font-ui); font-size: 11px; color: #b9ae96; }
.cp-face-mid { display: flex; flex-direction: column; justify-content: center; gap: 5px; flex: none; }
.cp-face-rel {
  font-family: var(--font-han); font-size: 15px; font-weight: 700; border-radius: var(--r-full);
  padding: 4px 13px; text-align: center;
}
.cp-face-rel.good { background: rgba(90, 160, 92, .22); color: #8fd79b; border: 1px solid rgba(143, 215, 155, .4); }
.cp-face-rel.bad { background: rgba(209, 72, 59, .2); color: #f0a098; border: 1px solid rgba(240, 160, 152, .4); }
.cp-face-rel.neutral { background: rgba(246, 239, 224, .1); color: #b9ae96; font-family: var(--font-ui); font-size: 12px; }

/* pil skor di riwayat & kepala laporan */
.pill.scorepill {
  background: var(--band-c, var(--gold)); color: #fff; font-weight: 700; border: 0;
  font-variant-numeric: tabular-nums;
}
.cp-glyphs { display: flex; align-items: center; gap: 6px; }
.rep-glyph.sm { width: 38px; height: 38px; border-radius: 10px; font-size: 20px; }
.cp-row { grid-template-columns: 96px minmax(0, 1fr) auto; }
.cp-foot { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 14px; }

/* ----------------------------------------------------------- layar sempit */
@media (max-width: 1000px) {
  .two-people, .cp-charts, .cross-grid, .sp-drivers { grid-template-columns: 1fr; }
  .sp-main { grid-template-columns: 1fr; gap: 18px; justify-items: center; text-align: center; }
  .sp-who { justify-content: center; }
  .subrow, .am-row { grid-template-columns: 1fr; gap: 5px; }
  .sr-v { text-align: left; }
  .topbar .tabs { margin-left: 10px; }
  .topbar .tabs a { padding: 6px 10px; font-size: 12.5px; }
}
@media (max-width: 560px) {
  .score-dial { width: 118px; height: 118px; }
  .score-dial .sd-in b { font-size: 36px; }
  .sp-band { font-size: 22px; }
  .cb-han { font-size: 34px; }
  .cp-face-han { font-size: 30px; }
  .cp-row { grid-template-columns: 1fr; }
  .cp-glyphs { justify-content: flex-start; }
  /* di layar sempit dua orangnya bertumpuk, jadi chip relasinya harus berada
     DI ANTARA keduanya, bukan menyempil di samping yang pertama */
  .cp-face { flex-direction: column; }
  .cp-face-mid { flex-direction: row; justify-content: center; }
  .topbar .tabs .tab-han { display: none; }
}

/* ===========================================================================
   Revisi Andy 13 Okt 2026: "jangan mayoritas text doang — mau infografis,
   tabel yang enak dibaca, dan alignment justify."
   =========================================================================== */

/* ------------------------------------------------- teks narasi rata kanan-kiri */
/* print.html sudah justify sejak revisi ke-5; sekarang layar ikut, supaya yang
   dilihat di web sama dengan yang tercetak. Daftar tetap rata kiri karena
   justify pada poin pendek justru merenggangkan kata. */
.narrative .md > p,
.narrative .md li > p { text-align: justify; hyphens: auto; }
.narrative .md li { text-align: left; }
.narrative .md .intinya li,
.narrative .md .cardlist li { text-align: left; }

/* ------------------------------------------------------------- tabel banding */
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.cmp thead th { border-bottom: 2px solid var(--line-2); padding-bottom: 12px; }
.cmp tbody tr:last-child td { border-bottom: 0; }
.cmp tbody tr:nth-child(even) { background: #fbf8f1; }
.cmp-k {
  width: 23%; font-family: var(--font-ui); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); font-weight: 600; white-space: nowrap;
}
.cmp-k small { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11.5px; }
.cmp-who { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; }
.cmp-who b {
  font-family: var(--font-han); font-size: 18px; font-weight: 900; color: #fff;
  width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center;
  justify-content: center; background: var(--el, var(--ink)); flex: none;
}
.cmp-gz { font-family: var(--font-han); font-size: 30px; font-weight: 900; letter-spacing: 2px; line-height: 1.1; }
.cmp-els { display: grid; gap: 4px; }
.cmp-el { display: grid; grid-template-columns: 20px minmax(0, 1fr) 42px; gap: 8px; align-items: center; }
.cmp-el b { font-family: var(--font-han); font-size: 14px; }
.cmp-el i { display: block; height: 7px; background: #ece5d6; border-radius: var(--r-full); overflow: hidden; }
.cmp-el i em { display: block; height: 100%; border-radius: var(--r-full); }
.cmp-el small { font-family: var(--font-ui); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cmp-v { width: 15%; white-space: nowrap; }

/* vonis: satu kata yang bisa dibaca tanpa menafsir angkanya */
.verdict {
  display: inline-block; font-family: var(--font-ui); font-size: 11.5px; font-weight: 700;
  border-radius: var(--r-full); padding: 4px 12px; white-space: nowrap;
}
.verdict.best { background: #1e6b3a; color: #fff; }
.verdict.good { background: #e6f3ec; color: #1e6b3a; border: 1px solid #bfe0cb; }
.verdict.bad { background: #fbe8e5; color: #8f2318; border: 1px solid #e8c7c1; }
.verdict.neutral { background: #ece5d6; color: var(--muted); }

.cross-table { margin-top: 20px; }
.cross-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
.cb-side { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cb-nm { font-family: var(--font-ui); font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cb-say {
  margin-top: 12px; font-family: var(--font-ui); font-size: 12px; color: var(--ink-2);
  border-top: 1px solid var(--line); padding-top: 10px;
}
.sr-v.band-sangat_mudah, .sr-v.band-lancar { color: #1e6b3a; }
.sr-v.band-berat, .sr-v.band-sangat_berat { color: #8f2318; }
.am-row { grid-template-columns: 200px minmax(0, 1fr) 128px; }
.am-v { text-align: right; }

/* kartu orang: kartu 8 huruf standar diberi kepala bernama */
.cp-person { margin-bottom: 20px; }
.cp-person-head { display: flex; align-items: center; gap: 12px; margin: 0 0 12px 2px; }
.cp-person-han {
  width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center;
  justify-content: center; font-family: var(--font-han); font-size: 19px; font-weight: 900; color: #fff;
}
.cp-person-head h2 { margin: 0; font-size: 20px; }
.cp-person-head .hint-x { margin-left: auto; font-family: var(--font-ui); font-size: 13px; color: var(--muted); }
/* chart standar di dalam kartu orang: rapatkan supaya dua orang tidak jadi sangat panjang */
.cp-person .chart-head { display: none; }
.cp-person .card { margin-bottom: 10px; }

@media (max-width: 1000px) {
  .cross-top { grid-template-columns: 1fr; }
  .am-row { grid-template-columns: 1fr; }
  .am-v { text-align: left; }
  .cmp-k { width: auto; white-space: normal; }
  .cmp th, .cmp td { padding: 9px 8px; font-size: 13px; }
}

/* ---------------------------------------- panel khusus laporan pasangan */
/* Memakai kerangka .panel / .pn-* yang sama dengan laporan individual; di sini
   hanya komponen yang memang baru: adu dua orang, aliran suplai, dan garis
   waktu bersama. */
.pn-cmp { margin: 8px 0 4px; font-size: 13.5px; }
.pn-cmp td, .pn-cmp th { padding: 8px 10px; }
.pn-cmp .cmp-k { width: 34%; }
.pn-cmp tbody tr:nth-child(even) { background: rgba(255, 253, 248, .6); }

.pn-vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center;
  margin: 8px 0 12px; }
.pn-vs-side { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.pn-vs-side small { font-family: var(--font-ui); font-size: 11px; color: var(--muted); font-weight: 600; }
.pn-vs-side b { font-family: var(--font-han); font-size: 36px; font-weight: 900; line-height: 1.05; }
.pn-vs-mid { text-align: center; }

.pn-flow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 6px 0;
  font-size: 13.5px; }
.pn-flow > span:first-child, .pn-flow > span:nth-child(3) { font-weight: 600; }
.pn-flow-arrow { font-style: normal; font-size: 17px; color: var(--line-2); }
.pn-flow-arrow.best, .pn-flow-arrow.good { color: #1e6b3a; }
.pn-flow-arrow.bad { color: #8f2318; }
.pn-flow-v { margin-left: 4px; }
.pn-flow small { color: var(--muted); font-family: var(--font-ui); font-size: 11.5px; }

.pn-warn { margin-top: 9px; font-family: var(--font-ui); font-size: 12.5px; line-height: 1.5;
  background: #fdf6e6; border-left: 3px solid var(--gold); border-radius: 0 7px 7px 0; padding: 8px 11px; }

.pn-score-head { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; flex-wrap: wrap; }
.pn-track.inline { display: inline-block; width: 78px; height: 7px; vertical-align: middle;
  margin-right: 6px; border-radius: var(--r-full); }
/* .pn-fill adalah <i> (inline), jadi tanpa display:block tingginya nol */
.pn-track.inline .pn-fill { display: block; height: 100%; border-radius: var(--r-full); }

.pn-area { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 12px;
  align-items: center; margin: 7px 0; }
.pn-area-k { font-size: 13.5px; font-weight: 600; }
.pn-area-k small { display: block; font-family: var(--font-ui); font-size: 11.5px; font-weight: 400;
  color: var(--muted); line-height: 1.4; }
.pn-area-bars { display: grid; gap: 3px; }
.pn-area-bars i { display: block; height: 7px; border-radius: var(--r-full); min-width: 2px; }
.pn-area-bars i.ok { background: #5aa05c; }
.pn-area-bars i.no { background: #d1483b; }

.pn-years { margin-top: 10px; font-size: 13px; }
.pn-years td, .pn-years th { padding: 6px 10px; }
.pn-years .yr-y { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pn-years .yr-y small { display: block; font-family: var(--font-han); font-weight: 400;
  color: var(--muted); font-size: 11.5px; }
.pn-years tr.yr-ok { background: #f2f9f4; }
.pn-years tr.yr-no { background: #fdf4f2; }
.pn-years tr.yr-mid { background: #fdf9ef; }
.pn-years small { color: var(--muted); font-family: var(--font-ui); font-size: 11.5px; }
.pn-dot { display: inline-block; width: 0; height: 0; vertical-align: middle; margin-right: 4px;
  border-left: 5px solid transparent; border-right: 5px solid transparent; }
.pn-dot.up { border-bottom: 8px solid #2f8f5b; }
.pn-dot.down { border-top: 8px solid #d1483b; }
.pn-dot.flat { width: 10px; height: 2px; background: var(--line-2); border: 0; border-radius: 2px; }

.pn-care .pn-k { margin-bottom: 2px; }

@media (max-width: 1000px) {
  .pn-area { grid-template-columns: 1fr; }
  .pn-vs { grid-template-columns: 1fr; gap: 8px; }
  .pn-cmp .cmp-k { width: auto; }
}

/* daftar mini di dalam panel: alasan plus/minus yang ringkas */
.pn-mini { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; }
.pn-mini li { font-family: var(--font-ui); font-size: 12.5px; line-height: 1.5;
  padding: 6px 11px 6px 26px; border-radius: 8px; position: relative; }
.pn-mini li::before { position: absolute; left: 10px; font-weight: 700; }
.pn-mini.ok li { background: #f2f9f4; color: #1e4b2e; }
.pn-mini.ok li::before { content: '+'; color: #1e6b3a; }
.pn-mini.no li { background: #fdf4f2; color: #6b241c; }
.pn-mini.no li::before { content: '\2212'; color: #8f2318; }

/* ------------------------------------------- kartu ringkasan satu halaman */
/* Bisa dibaca 2 menit atau di-screenshot tanpa membuka seluruh laporan.
   Isinya dari engine.compat.summary_card, jadi tidak pernah beda dari laporan. */
.sumcard { border: 2px solid var(--gold); background: linear-gradient(160deg, #fffdf8, #fdf8ec); }
.sum-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center;
  padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.sum-dial { width: 112px; height: 112px; border-radius: 50%; position: relative; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(closest-side, #fffdf8 70%, transparent 71%),
              conic-gradient(var(--band-c) calc(var(--p) * 3.6deg), #e9e2d4 0); }
.sum-dial .sd-in { text-align: center; line-height: 1; }
.sum-dial .sd-in b { display: block; font-size: 38px; font-weight: 700; letter-spacing: -.03em; }
.sum-dial .sd-in small { font-family: var(--font-ui); font-size: 11px; color: var(--muted); }
.sum-lab { font-family: var(--font-ui); font-size: 11px; text-transform: uppercase;
  letter-spacing: .14em; color: var(--gold-2); font-weight: 700; }
.sum-head h2 { margin: 4px 0 10px; font-size: 26px; letter-spacing: -.015em; }
.sum-sub { display: flex; gap: 8px; flex-wrap: wrap; }
.sum-pill { font-family: var(--font-ui); font-size: 12px; font-weight: 600; border-radius: var(--r-full);
  padding: 4px 13px; }
.sum-pill.good { background: #e6f3ec; color: #1e6b3a; }
.sum-pill.bad { background: #fbe8e5; color: #8f2318; }

.sum-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sum-col { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; background: #fff; }
.sum-col.ok { border-color: #bfe0cb; background: #f8fcfa; }
.sum-col.no { border-color: #e8c7c1; background: #fdf8f7; }
.sum-col.act { border-color: var(--gold); background: #fffbf2; }
.sum-col-h { font-family: var(--font-ui); font-size: 11px; text-transform: uppercase;
  letter-spacing: .1em; font-weight: 700; margin-bottom: 10px; }
.sum-col.ok .sum-col-h { color: #1e6b3a; }
.sum-col.no .sum-col-h { color: #8f2318; }
.sum-col.act .sum-col-h { color: var(--gold-2); }
.sum-col ol { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.sum-col li { font-size: 13.5px; line-height: 1.5; }
.sum-col li::marker { font-weight: 700; color: var(--muted); }

.sum-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px;
  border-top: 1px solid var(--line); padding-top: 16px; }
.sum-quick > div { display: flex; flex-direction: column; gap: 2px; }
.sum-quick .k { font-family: var(--font-ui); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); }
.sum-quick b { font-size: 14px; line-height: 1.35; }

@media (max-width: 1000px) {
  .sum-cols, .sum-quick { grid-template-columns: 1fr; }
  .sum-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .sum-sub { justify-content: center; }
}

/* ===========================================================================
   Revisi Andy 14 Okt 2026, dari screenshot bagian "Skor Kecocokan & Apa Artinya"
   =========================================================================== */

/* 1. Batang meter kosong. .pn-fill adalah <i> — elemen inline, jadi height:100%
   tidak berlaku dan batangnya tidak pernah terlihat. Perbaikan sebelumnya cuma
   menyentuh varian .pn-track.inline; panel skor memakai .pn-track biasa. */
.pn-fill { display: block; }
.pn-track { overflow: hidden; }

/* 2. Paragraf berhenti jauh sebelum ujung kanan sementara kotak Intinya dan
   panel di atasnya selebar penuh — selisihnya terbaca seperti rusak, bukan
   seperti disengaja. Ukuran baris dilepas supaya semua blok rata di tepi yang
   sama; perataan kanan-kiri menjaga sisi kanannya tetap lurus. */
.narrative .md > p,
.narrative .md > ul:not(.cardlist),
.narrative .md > ol:not(.cardlist),
.narrative .md > blockquote { max-width: none; }

/* 3. Label tebal di awal poin/paragraf diberi garis bawah emas supaya mata bisa
   melompat ke bagian penting tanpa membaca seluruhnya (permintaan Andy). */
/* Hanya paragraf. Di daftar, tidak semua poin punya label tebal, jadi garis
   bawahnya cuma muncul di sebagian poin dan justru terlihat tidak rapi
   (keluhan Andy 14 Okt 2026: "underline nya cuma di 2 poin"). */
.md > p > strong:first-child {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
/* kotak Intinya & kartu sudah punya penanda sendiri; jangan dobel */
.md .intinya li > strong:first-child,
.md .cardlist > li > strong:first-child,
.md .cardlist > li > p:first-child > strong:first-child { text-decoration: none; }


/* ---- rapihan 15 Okt 2026, dari QC Andy ---- */
/* Tabel panel ikut aturan .md th sehingga nama orang tampil huruf besar dan
   kelewat tebal; di dalam panel ia cuma kepala kolom, bukan judul. */
.pn-cmp th { text-transform: none; letter-spacing: 0; background: transparent; font-size: 13px; }
.pn-cmp .cmp-who { font-size: 13.5px; font-weight: 700; gap: 7px; align-items: center; }
.pn-cmp .cmp-who b { width: 24px; height: 24px; font-size: 14px; border-radius: 7px; }

/* Kartu: lebar minimum dinaikkan supaya tidak pernah lebih dari dua kolom.
   Dengan tiga kolom, baris terakhir sering menyisakan satu kartu yatim di
   sebelah dua kolom kosong — itu yang terbaca "gak rapi". Dua kolom membuat
   deretan ganjil cuma menyisakan satu celah, dan kartu yatim dibuat penuh. */
.md .cardlist { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); align-items: stretch; }
.md .cardlist > li:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Perataan kanan-kiri memecah jarak ANTAR-AKSARA, bukan antar-kata, sehingga
   istilah seperti 日支 tampil renggang-renggang. inter-word menyuruh browser
   hanya melebarkan spasi kata. Dipasang di semua tempat yang dirata. */
.narrative .md > p, .narrative .md li > p, .md .cardlist > li,
.pn-col li, .dr-col li, .md .intinya li { text-justify: inter-word; }
/* Di kolom sempit, perataan justru bikin sungai spasi; kartu dibiarkan rata kiri. */
.md .cardlist > li, .md .cardlist > li > p { text-align: left; }

/* ===========================================================================
   RAMAH HP (30 Okt 2026, permintaan Andy: "di hp tampilan jelek ... bikin smartphone friendly")
   Akar masalah: `.layout { grid-template-columns: 252px … }` di atas tidak dibungkus media query,
   jadi menimpa aturan HP di style.css. Di HP daftar isi disembunyikan, sehingga ISI laporan yang
   jatuh ke kolom 252px — sisi kanan layar kosong. Blok ini sengaja di paling bawah supaya menang.
   =========================================================================== */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 640px) {
  /* topbar satu baris: ikon 八字 saja (tab di sebelahnya sudah menyebut "Laporan BaZi") */
  .topbar { height: auto; min-height: 54px; padding: 8px 10px; gap: 6px; flex-wrap: nowrap; }
  .brand { font-size: 0; gap: 0; flex: none; }
  .brand-han { font-size: 14px; }
  .topbar .tabs { margin-left: 4px; gap: 2px; min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
  .topbar .tabs::-webkit-scrollbar { display: none; }
  .topbar .tabs a { padding: 7px 11px; font-size: 13px; white-space: nowrap; line-height: 1.2; }
  .topbar .tabs .tab-han { display: none; }
  .langswitch { display: flex; gap: 3px; flex: none; }
  .langswitch a { margin-left: 0; padding: 4px 8px; font-size: 12px; }

  /* ruang baca: kartu lebih lega ke tepi, huruf sedikit lebih besar, rata kiri */
  .wrap { padding: 12px 10px 40px; }
  .card { padding: 16px 14px; }
  .narrative { padding: 16px 14px 22px; }
  .md { font-size: 17px; line-height: 1.72; }
  /* desktop tetap justify (keputusan Andy 13 Okt); di kolom HP justify merenggangkan kata → rata kiri */
  .md p, .md li, .md .intinya p, .md .panel p,
  .narrative .md > p, .narrative .md li > p, .narrative .md li {
    text-align: left; hyphens: manual; text-justify: auto;
  }
  /* daftar kartu: satu kolom penuh (minmax 265px+ membuat kartu lebih lebar dari layar & terpotong) */
  .md .cardlist, .narrative .md .cardlist { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .md .cardlist > li { padding: 14px 14px; font-size: 15.5px; min-width: 0; }
  .md ul, .md ol { padding-left: 20px; }
  .md h2 { font-size: 22px; line-height: 1.3; }
  .md h3 { font-size: 18.5px; line-height: 1.35; }
  .md blockquote { margin-left: 0; margin-right: 0; }

  /* apa pun yang lebih lebar dari layar: tabel & blok lebar boleh digeser, bukan meluber */
  .md table, table.cmp { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .md pre { max-width: 100%; overflow-x: auto; }
  /* break-word (bukan anywhere): kata baru dipotong kalau memang tak muat satu baris,
     jadi kolom tabel sempit tidak memecah "Bangsawan" jadi "Bangsawa / n" */
  .content, .narrative, .md { min-width: 0; overflow-wrap: break-word; }
  /* kotak dua orang di kepala laporan pasangan: flex-basis 180px dari baris jadi TINGGI saat kolom */
  .cp-face-p { flex: none; }
}
