/* ==========================================================================
 * lich-chuan.css . He sinh thai Lich Chuan Am Duong & 24 Tiet Khi UK MASTER
 * Bang mau Hoang Lich Chinh Tong ket hop Ngu Hanh & Tu Thoi Thien Van:
 * - Hoang Dao / Chu Sa: #9E1F14 / #7A140C
 * - Hoang Kim / Diem nhan: #C8922A / #EAB308
 * - Huyen Thien Tinh Ban (Vong Tiet Khi): #1B141E / #261714
 * - Ngu Hanh: Moc (#15803D), Hoa (#B91C1C), Tho (#B45309), Kim (#334155), Thuy (#1D4ED8)
 * - Ho tro in A4 (@media print), khong dich chuyen bo cuc (Zero CLS)
 * ========================================================================== */

:root {
  --lc-bg: #f8f1e3;
  --lc-bg-alt: #f0e4cc;
  --lc-card: #fffdf9;
  --lc-ink: #1f1a17;
  --lc-ink-soft: #5c4d3e;
  --lc-ink-muted: #847360;
  --lc-line: #decda8;
  --lc-line-strong: #c7ae7e;

  --lc-vermilion: #9e1f14;
  --lc-vermilion-deep: #6e0e0a;
  --lc-vermilion-bg: #feeceb;
  --lc-vermilion-border: #f3a69e;

  --lc-charcoal: #293241;
  --lc-charcoal-bg: #e9eef5;
  --lc-charcoal-border: #b8c4d4;

  --lc-gold: #c8922a;
  --lc-gold-deep: #8f6110;
  --lc-gold-bg: #fef5dc;

  --lc-jade: #0f7647;
  --lc-jade-bg: #dcfce7;
  --lc-jade-border: #86efac;

  --lc-sapphire: #1e40af;
  --lc-sapphire-bg: #dbeafe;
  --lc-sapphire-border: #93c5fd;

  --lc-shadow: 0 4px 14px rgba(52, 30, 12, 0.07), 0 12px 32px rgba(52, 30, 12, 0.05);
  --lc-radius: 15px;

  --hanh-kim: #293548;
  --hanh-moc: #0f6a3c;
  --hanh-thuy: #1d4ed8;
  --hanh-hoa: #a61b1b;
  --hanh-tho: #9a5806;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.lc-body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1100px 420px at 50% 0%, rgba(200, 146, 42, 0.14), transparent 72%),
    var(--lc-bg);
  color: var(--lc-ink);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.serif { font-family: "Noto Serif", Georgia, serif; }
.tabular { font-variant-numeric: tabular-nums; }

.lc-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Royal Celestial Header Banner ── */
.lc-hero-head {
  position: relative;
  background:
    radial-gradient(760px 280px at 50% 0%, rgba(234, 179, 8, 0.22), transparent 70%),
    linear-gradient(135deg, #211210 0%, #5c130d 50%, #1e1318 100%);
  border-bottom: 3px solid #d4a23a;
  padding: 22px 20px 26px;
  color: #fff8ec;
  box-shadow: 0 8px 26px rgba(33, 18, 16, 0.18);
}
.lc-breadcrumb {
  max-width: 1200px;
  margin: 0 auto 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #e4d2b4;
}
.lc-breadcrumb a {
  color: #fde68a;
  text-decoration: none;
  font-weight: 600;
}
.lc-breadcrumb a:hover { text-decoration: underline; }
.lc-breadcrumb .sep { color: rgba(253, 230, 138, 0.55); }

.lc-title-wrap {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.lc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #2c1804;
  background: linear-gradient(135deg, #fae094 0%, #d49a2a 100%);
  border: 1px solid #fde68a;
  padding: 4px 15px;
  border-radius: 999px;
  margin-bottom: 11px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}
.lc-hero-head h1 {
  font-family: "Noto Serif", Georgia, serif;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.25;
  color: #fff9ed;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.lc-subtitle {
  max-width: 840px;
  margin: 0 auto;
  font-size: 14px;
  color: #ebdDC4;
}
.lc-cluster-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.lc-cluster-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 248, 235, 0.1);
  border: 1px solid rgba(243, 211, 130, 0.42);
  color: #fff6e5;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.16s ease;
}
.lc-cluster-pill:hover, .lc-cluster-pill.active, .lc-cluster-pill-gold {
  background: linear-gradient(135deg, #f7d881 0%, #cf9524 100%);
  border-color: #fde68a;
  color: #281504;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* ── Main Layout ── */
main.lc-main {
  padding: 22px 0 68px;
}

/* ── AI Answer Capsule (GEO / Speakable) ── */
.lc-capsule {
  background: linear-gradient(135deg, #fffdf9 0%, #fbf0d8 100%);
  border: 1px solid #dfc590;
  border-left: 5px solid var(--lc-vermilion);
  border-radius: 13px;
  padding: 15px 19px;
  margin-bottom: 18px;
  box-shadow: var(--lc-shadow);
}
.lc-capsule-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.lc-capsule-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #fff8ec;
  background: linear-gradient(135deg, #a92216, #78120b);
  padding: 3px 10px;
  border-radius: 999px;
}
.lc-capsule-std {
  font-size: 12px;
  font-weight: 700;
  color: var(--lc-gold-deep);
  background: #fff8e6;
  border: 1px solid #e7cf96;
  padding: 2px 9px;
  border-radius: 999px;
}
.lc-capsule p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--lc-ink);
}

/* ── Command Bar (Date/Time + Global True Solar Time + Share/Export) ── */
.lc-cmd-bar {
  background: var(--lc-card);
  border: 1.5px solid var(--lc-line-strong);
  border-radius: var(--lc-radius);
  box-shadow: var(--lc-shadow);
  margin-bottom: 22px;
  overflow: hidden;
}
.lc-cmd-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--lc-line);
  background: linear-gradient(90deg, #fffdf9 0%, #fcf4e3 100%);
}
.lc-day-Controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.lc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 9px;
  border: 1px solid var(--lc-line-strong);
  background: #fff;
  color: var(--lc-ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.lc-btn:hover {
  border-color: var(--lc-vermilion);
  color: var(--lc-vermilion);
  background: var(--lc-vermilion-bg);
}
.lc-btn-primary {
  background: linear-gradient(135deg, #ab2317 0%, #78120b 100%);
  border-color: #78120b;
  color: #fff9ed;
  box-shadow: 0 2px 8px rgba(158, 31, 20, 0.25);
}
.lc-btn-primary:hover {
  background: linear-gradient(135deg, #8e1b11 0%, #5e0c07 100%);
  border-color: #5e0c07;
  color: #fff;
}
#btnDownloadPng {
  background: linear-gradient(135deg, #cf911d 0%, #9a660c 100%);
  border-color: #9a660c;
  color: #fffaf0;
}
#btnDownloadPng:hover {
  background: linear-gradient(135deg, #b57c14 0%, #7e5208 100%);
  color: #fff;
}
#btnCopyLink {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e40af;
}
#btnCopyLink:hover {
  background: #dbeafe;
  border-color: #3b82f6;
}
#btnPrintA4 {
  border-color: #f3a69e;
  background: #fff5f4;
  color: #9e1f14;
}
#btnPrintA4:hover {
  background: #fee2e2;
}
.lc-input-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1.5px solid #d4b982;
  border-radius: 9px;
  background: #fffdf8;
}
.lc-input-chip svg {
  width: 16px;
  height: 16px;
  color: var(--lc-vermilion);
  flex-shrink: 0;
}
.lc-input-chip input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--lc-ink);
}

.lc-live-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lc-clock {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fde047;
  background: linear-gradient(135deg, #251512, #3b1914);
  border: 1px solid #d4a23a;
  padding: 4px 12px;
  border-radius: 9px;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}
.lc-clock.paused {
  color: #e2e8f0;
  background: #334155;
  border-color: #64748b;
}
.lc-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  padding: 4px 11px;
  border-radius: 999px;
}
.lc-live-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.24);
}
.lc-live-dot.paused {
  color: #334155;
  background: #e2e8f0;
  border-color: #cbd5e1;
}
.lc-live-dot.paused::before {
  background: #64748b;
  box-shadow: none;
}

.lc-cmd-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 18px;
  background: linear-gradient(90deg, #f6ebd6 0%, #efe0c2 100%);
  font-size: 13px;
}
.lc-tst-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.lc-tst-group label {
  font-weight: 700;
  color: var(--lc-vermilion-deep);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.lc-select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #c7aa74;
  background: #fff;
  color: var(--lc-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
}
.lc-tst-readout {
  color: var(--lc-ink-soft);
  font-variant-numeric: tabular-nums;
}
.lc-tst-readout b {
  color: #1e40af;
  background: #dbeafe;
  padding: 2px 7px;
  border-radius: 6px;
}
.lc-tst-shift {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--lc-vermilion-bg);
  border: 1px solid var(--lc-vermilion-border);
  color: var(--lc-vermilion-deep);
  font-weight: 700;
  font-size: 12px;
}
.lc-share-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* ── 2-Column Hero Grid: Luxury Tear-Off Bloc + Celestial Solar Wheel ── */
.lc-hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
  margin-bottom: 24px;
  align-items: stretch;
}
@media (max-width: 960px) {
  .lc-hero-grid { grid-template-columns: 1fr; }
}

/* Luxury Tear-Off Lịch Bloc Card */
.lc-almanac-sheet {
  background: linear-gradient(180deg, #b82518 0%, #7c130d 100%);
  border: 2px solid #7c130d;
  border-radius: 18px;
  padding: 6px;
  box-shadow: 0 14px 36px rgba(110, 14, 10, 0.16);
  display: flex;
  flex-direction: column;
}
.lc-sheet-inner {
  border: 1.5px solid #e3b34c;
  border-radius: 13px;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 50% 28%, rgba(234, 179, 8, 0.14) 0%, transparent 62%),
    linear-gradient(180deg, #fffdf9 0%, #fbf2de 100%);
}
.lc-sheet-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #9e1f14 0%, #680d09 100%);
  border-bottom: 3px solid #d4a23a;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #fff8eb;
}
.lc-sheet-jdn {
  font-size: 11.5px;
  font-weight: 700;
  color: #fde68a;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(253, 230, 138, 0.45);
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0.3px;
}
.lc-sheet-center {
  text-align: center;
  padding: 20px 18px 14px;
}
.lc-sheet-wday {
  display: inline-block;
  font-family: "Noto Serif", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: #7c170e;
  background: #fef3c7;
  border: 1px solid #f3cc74;
  padding: 2px 16px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.lc-sheet-solar-num {
  font-family: "Noto Serif", Georgia, serif;
  font-size: clamp(74px, 8.6vw, 104px);
  font-weight: 700;
  line-height: 1;
  color: #a91d15;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 12px;
  text-shadow: 0 3px 0 #f6d58e, 0 8px 20px rgba(158, 31, 20, 0.18);
}
.lc-sheet-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.lc-seal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}
.lc-seal-tot {
  background: linear-gradient(135deg, #be1e15 0%, #7f120c 100%);
  border: 1.5px solid #fbbf24;
  color: #fffbeb;
}
.lc-seal-binh {
  background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
  border: 1.5px solid #fde68a;
  color: #fffbeb;
}
.lc-seal-xau {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  border: 1.5px solid #94a3b8;
  color: #f8fafc;
}
.lc-holiday-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #d97706;
  color: #7c2d12;
  font-size: 12.5px;
  font-weight: 800;
}

.lc-sheet-lunar-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 18px 14px;
}
@media (max-width: 520px) {
  .lc-sheet-lunar-band { grid-template-columns: 1fr; }
}
.lc-lunar-box {
  text-align: center;
  padding: 12px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf8 0%, #f7ebd2 100%);
  border: 1.5px solid #dec28a;
}
.lc-lunar-box + .lc-lunar-box {
  background: linear-gradient(180deg, #fff8f6 0%, #fde8e3 100%);
  border-color: #efb2a8;
}
.lc-lunar-lbl {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: #7c5826;
}
.lc-lunar-box + .lc-lunar-box .lc-lunar-lbl {
  color: #8c1f14;
}
.lc-lunar-big {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 27px;
  font-weight: 700;
  color: #0f6a3c;
  line-height: 1.2;
  margin-top: 3px;
}
.lc-lunar-box + .lc-lunar-box .lc-lunar-big {
  color: #9e1f14;
}
.lc-lunar-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lc-ink-soft);
  margin-top: 3px;
}

.lc-sheet-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  font-size: 13.5px;
  background: rgba(255, 253, 248, 0.78);
  border-top: 1.5px dashed #d6bc88;
  padding: 14px 20px 16px;
}
@media (max-width: 560px) {
  .lc-sheet-meta { grid-template-columns: 1fr; }
}
.lc-meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dotted #e3d3b3;
}
.lc-meta-k {
  color: var(--lc-ink-soft);
  font-weight: 600;
}
.lc-meta-v {
  color: var(--lc-ink);
  font-weight: 700;
  text-align: right;
}
.lc-meta-v.cat {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12.5px;
}
.lc-meta-v.safe {
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12.5px;
}
.lc-meta-v.hung {
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid #fdba74;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12.5px;
}

/* Right Column: Celestial 24 Solar Terms Astrolabe + Meridian Card */
.lc-astro-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lc-wheel-card {
  background:
    radial-gradient(380px 260px at 50% 38%, rgba(234, 179, 8, 0.14), transparent 72%),
    linear-gradient(155deg, #1d1522 0%, #2b1714 52%, #141c2b 100%);
  border: 2px solid #c89632;
  border-radius: var(--lc-radius);
  padding: 16px 18px;
  color: #fff8eb;
  box-shadow: 0 12px 30px rgba(24, 16, 28, 0.22);
}
.lc-wheel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.lc-wheel-head h2 {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 18.5px;
  color: #fde68a;
  margin: 0;
}
.lc-wheel-deg {
  font-size: 13px;
  font-weight: 800;
  color: #241505;
  background: linear-gradient(135deg, #fde68a, #eab308);
  padding: 3px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.lc-wheel-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 8px;
  max-width: 306px;
}
.lc-wheel-wrap svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}
.lc-wheel-seasons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 2px 0 10px;
  font-size: 11.5px;
  font-weight: 700;
}
.lc-wheel-seasons span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8efe0;
}
.lc-wheel-seasons i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.lc-wheel-seasons .ws-sp i { background: #22c55e; }
.lc-wheel-seasons .ws-su i { background: #f87171; }
.lc-wheel-seasons .ws-au i { background: #fbbf24; }
.lc-wheel-seasons .ws-wi i { background: #60a5fa; }

.lc-wheel-foot {
  font-size: 13px;
  color: #efe3cb;
  background: rgba(255, 248, 235, 0.09);
  border: 1px solid rgba(212, 162, 58, 0.35);
  border-radius: 10px;
  padding: 9px 12px;
  line-height: 1.55;
}
.lc-wheel-foot b { color: #fde047; }

.lc-meridian-card {
  background: var(--lc-card);
  border: 1.5px solid var(--lc-line-strong);
  border-radius: var(--lc-radius);
  padding: 16px 18px;
  box-shadow: var(--lc-shadow);
}
.lc-meridian-card h3 {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 16px;
  color: var(--lc-vermilion-deep);
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lc-tz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 9px;
}
.lc-tz-box {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #93c5fd;
  background: linear-gradient(180deg, #f8fbff 0%, #e6f0fd 100%);
  font-size: 13px;
}
.lc-tz-box.vn {
  border-color: #f39c93;
  background: linear-gradient(180deg, #fff8f7 0%, #fde6e3 100%);
}
.lc-tz-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #1e40af;
}
.lc-tz-box.vn .lc-tz-title { color: #991b1b; }
.lc-tz-val {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: #1e3a8a;
  margin-top: 2px;
}
.lc-tz-box.vn .lc-tz-val { color: #8c1f14; }
.lc-meridian-note {
  font-size: 12.5px;
  color: var(--lc-ink-soft);
  line-height: 1.55;
}

/* ── Generic Card Section ── */
.lc-section {
  background: var(--lc-card);
  border: 1.5px solid var(--lc-line);
  border-top: 4px solid var(--lc-vermilion);
  border-radius: var(--lc-radius);
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: var(--lc-shadow);
}
#tu-tru.lc-section { border-top-color: #15803d; }
#phi-tinh.lc-section { border-top-color: #b45309; }
#doi-ngay.lc-section { border-top-color: #1d4ed8; }
#tiet-khi.lc-section { border-top-color: #7c3aed; }

.lc-sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.lc-section h2 {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 21px;
  color: var(--lc-vermilion-deep);
  margin: 0;
}
.lc-sec-desc {
  font-size: 13.5px;
  color: var(--lc-ink-soft);
  margin: 0 0 14px;
}
.lc-src-bar {
  font-size: 12.5px;
  color: #5c4928;
  background: linear-gradient(90deg, #fef6e0 0%, #faeed0 100%);
  border: 1px solid #ead196;
  border-left: 4px solid var(--lc-gold);
  padding: 8px 13px;
  border-radius: 0 8px 8px 0;
  margin: 10px 0 15px;
  line-height: 1.55;
}
.lc-src-bar b { color: var(--lc-vermilion-deep); }

/* ── 12 Hours & Solar Terms Semantic Tables ── */
.lc-table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--lc-line-strong);
  border-radius: 11px;
}
table.lc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: #fff;
}
table.lc-table th {
  background: linear-gradient(90deg, #7f170f 0%, #a12218 100%);
  color: #fff8eb;
  font-weight: 700;
  text-align: left;
  padding: 11px 13px;
  border-bottom: 2px solid #d4a23a;
  white-space: nowrap;
}
table.lc-table td {
  padding: 9px 13px;
  border-bottom: 1px solid #eee3cc;
  vertical-align: middle;
}
table.lc-table tr:nth-child(even) { background: #fffdf8; }
table.lc-table tr:last-child td { border-bottom: none; }
table.lc-table tr.row-hd {
  background: #fff3f1;
}
table.lc-table tr.row-hd td:first-child b {
  color: #9e1f14;
}
table.lc-table tr.row-cur {
  outline: 2px solid #d97706;
  background: #fef3c7 !important;
}
.lc-tag-hd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #be1e15, #8c1911);
  color: #fff9ed;
  border: 1px solid #f59e0b;
}
.lc-tag-hac {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  border: 1px solid #cbd5e1;
}

/* ── 6 Jewel-Toned Ecosystem Bridge Cards ── */
.lc-eco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}
@media (max-width: 860px) { .lc-eco-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .lc-eco-grid { grid-template-columns: 1fr; } }

.lc-eco-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px 17px;
  border-radius: 12px;
  border: 1px solid var(--lc-line-strong);
  border-top: 4px solid var(--lc-vermilion);
  background: linear-gradient(180deg, #ffffff 0%, #f9f1e1 100%);
  text-decoration: none;
  color: var(--lc-ink);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.lc-eco-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(31, 26, 23, 0.12);
}
#ecoTuVi { border-top-color: #7c3aed; background: linear-gradient(180deg, #ffffff 0%, #f5f0ff 100%); border-color: #d8b4fe; border-top-width: 4px; }
#ecoTuVi .lc-eco-title, #ecoTuVi .lc-eco-cta { color: #5b21b6; }

#ecoBatTu { border-top-color: #16a34a; background: linear-gradient(180deg, #ffffff 0%, #ecfdf3 100%); border-color: #86efac; border-top-width: 4px; }
#ecoBatTu .lc-eco-title, #ecoBatTu .lc-eco-cta { color: #166534; }

#ecoHaLac { border-top-color: #2563eb; background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%); border-color: #93c5fd; border-top-width: 4px; }
#ecoHaLac .lc-eco-title, #ecoHaLac .lc-eco-cta { color: #1e40af; }

#ecoKyMon { border-top-color: #d97706; background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%); border-color: #fcd34d; border-top-width: 4px; }
#ecoKyMon .lc-eco-title, #ecoKyMon .lc-eco-cta { color: #92400e; }

#ecoLaBan { border-top-color: #dc2626; background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%); border-color: #fca5a5; border-top-width: 4px; }
#ecoLaBan .lc-eco-title, #ecoLaBan .lc-eco-cta { color: #991b1b; }

#ecoTst { border-top-color: #0d9488; background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%); border-color: #5eead4; border-top-width: 4px; }
#ecoTst .lc-eco-title, #ecoTst .lc-eco-cta { color: #115e59; }

.lc-eco-title {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--lc-vermilion-deep);
  margin-bottom: 4px;
}
.lc-eco-sub {
  font-size: 12.5px;
  color: var(--lc-ink-soft);
  margin-bottom: 10px;
}
.lc-eco-cta {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--lc-vermilion);
}

/* ── Four Pillars of Destiny (Vibrant Five-Element BaZi Tiles) ── */
.lc-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 12px;
}
@media (max-width: 680px) {
  .lc-pillars-grid { grid-template-columns: repeat(2, 1fr); }
}
.tutu-pillar {
  background: linear-gradient(180deg, #fffdf9 0%, #f8efdc 100%);
  border: 1.5px solid #d5bc88;
  border-radius: 14px;
  padding: 0 12px 14px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(60, 40, 10, 0.06);
}
.tutu-pillar-label {
  margin: 0 -12px 10px;
  padding: 8px 10px;
  background: linear-gradient(135deg, #2b1915 0%, #581710 100%);
  border-bottom: 2px solid #d4a23a;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #fde68a;
}
.tutu-can, .tutu-chi {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.22;
  padding: 9px 8px;
  border-radius: 10px;
  margin: 6px 0;
  word-break: break-word;
  border: 1.5px solid transparent;
}
.tutu-elem {
  display: block;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  opacity: 0.92;
  margin-top: 2px;
}
.can-moc, .chi-moc {
  color: #0b5d34;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #4ade80;
}
.can-hoa, .chi-hoa {
  color: #991b1b;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #f87171;
}
.can-tho, .chi-tho {
  color: #854d0e;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #fbbf24;
}
.can-kim, .chi-kim {
  color: #1e293b;
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  border-color: #94a3b8;
}
.can-thuy, .chi-thuy {
  color: #1e3a8a;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #60a5fa;
}
.tutu-can-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lc-ink-soft);
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px dashed #d8c298;
  line-height: 1.45;
}
.tutu-can-sub b { color: var(--lc-vermilion); }

/* ── Nine-Palace Lo Shu Flying Stars Grid (Element-Colored 9 Palaces) ── */
.hkpt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.hkpt-orient-btns {
  display: inline-flex;
  border: 1.5px solid var(--lc-line-strong);
  border-radius: 9px;
  overflow: hidden;
}
.hkpt-orient-btns button {
  border: none;
  background: #fff;
  padding: 7px 13px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--lc-ink-soft);
  cursor: pointer;
}
.hkpt-orient-btns button.active {
  background: linear-gradient(135deg, #9e1f14, #6e0e0a);
  color: #fff8eb;
}
.hkpt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}
.hkpt-cell {
  background: #fffdf9;
  border: 1.5px solid var(--lc-line-strong);
  border-top-width: 4px;
  border-radius: 12px;
  padding: 12px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 3px 10px rgba(31, 26, 23, 0.05);
}
/* Authentic Lo Shu 9-Palace Five-Element Colors */
.hkpt-cell[data-palace="4"], .hkpt-cell[data-palace="3"] {
  border-color: #86efac; border-top-color: #16a34a;
  background: linear-gradient(180deg, #f3fef7 0%, #fffdf9 100%);
}
.hkpt-cell[data-palace="4"] .hkpt-cell-head, .hkpt-cell[data-palace="3"] .hkpt-cell-head { color: #166534; }

.hkpt-cell[data-palace="9"] {
  border-color: #fca5a5; border-top-color: #dc2626;
  background: linear-gradient(180deg, #fff4f4 0%, #fffdf9 100%);
}
.hkpt-cell[data-palace="9"] .hkpt-cell-head { color: #991b1b; }

.hkpt-cell[data-palace="2"], .hkpt-cell[data-palace="8"] {
  border-color: #fcd34d; border-top-color: #d97706;
  background: linear-gradient(180deg, #fffbeb 0%, #fffdf9 100%);
}
.hkpt-cell[data-palace="2"] .hkpt-cell-head, .hkpt-cell[data-palace="8"] .hkpt-cell-head { color: #92400e; }

.hkpt-cell.center-palace, .hkpt-cell[data-palace="5"] {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #d97706;
  border-top-width: 4px;
}
.hkpt-cell.center-palace .hkpt-cell-head { color: #78350f; }

.hkpt-cell[data-palace="7"], .hkpt-cell[data-palace="6"] {
  border-color: #cbd5e1; border-top-color: #475569;
  background: linear-gradient(180deg, #f4f7fb 0%, #fffdf9 100%);
}
.hkpt-cell[data-palace="7"] .hkpt-cell-head, .hkpt-cell[data-palace="6"] .hkpt-cell-head { color: #334155; }

.hkpt-cell[data-palace="1"] {
  border-color: #93c5fd; border-top-color: #2563eb;
  background: linear-gradient(180deg, #eff6ff 0%, #fffdf9 100%);
}
.hkpt-cell[data-palace="1"] .hkpt-cell-head { color: #1e40af; }

.hkpt-cell-head {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--lc-ink-soft);
  border-bottom: 1px dashed rgba(140, 110, 60, 0.28);
  padding-bottom: 5px;
}
.hkpt-stars-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 8px;
}
.hkpt-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}
.hkpt-badge b { font-size: 14px; font-weight: 800; }
.hkpt-badge.s-year  { color: #991b1b; background: #fee2e2; border-color: #fca5a5; }
.hkpt-badge.s-month { color: #1e40af; background: #dbeafe; border-color: #93c5fd; }
.hkpt-badge.s-day   { color: #065f46; background: #d1fae5; border-color: #6ee7b7; }
.hkpt-badge.s-hour  { color: #6b21a8; background: #f3e8ff; border-color: #d8b4fe; }

/* ── Bidirectional Converter & 10-Year Ancestral / Anniversary Lookup ── */
.lc-conv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 780px) { .lc-conv-grid { grid-template-columns: 1fr; } }

.lc-conv-box {
  background: linear-gradient(180deg, #fffdf9 0%, #f9f1df 100%);
  border: 1.5px solid #dcc596;
  border-radius: 12px;
  padding: 16px;
}
.lc-conv-box h3 {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 16.5px;
  color: var(--lc-vermilion-deep);
  margin: 0 0 10px;
}
.lc-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}
.lc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lc-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--lc-ink-soft);
}
.lc-field input[type="number"], .lc-field select {
  padding: 7px 9px;
  border: 1px solid var(--lc-line-strong);
  border-radius: 7px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  width: 86px;
}
.lc-conv-out {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid #dec692;
  border-left: 4px solid #1d4ed8;
  font-size: 13.5px;
  min-height: 44px;
}

/* ── Stem & Branch Compatibility Grids ── */
.tuoi-sub-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--lc-vermilion-deep);
  margin: 14px 0 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.tuoi-can-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.tuoi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 720px) {
  .tuoi-can-grid { grid-template-columns: repeat(2, 1fr); }
  .tuoi-grid { grid-template-columns: repeat(2, 1fr); }
}
.tuoi-card {
  padding: 10px 11px;
  border-radius: 9px;
  border: 1px solid var(--lc-line);
  background: #fffcf6;
  font-size: 13px;
}
.tuoi-card.hop {
  border: 1.5px solid #4ade80;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
}
.tuoi-card.ky {
  border: 1.5px solid #fdba74;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: #9a3412;
}

/* ── Harmonize Classical Hoang Lich & Monthly Grid (lichvn-hoangle.js) ── */
.lc-body .hl-card {
  background: linear-gradient(180deg, #fffdf9 0%, #fbf4e6 100%);
  border: 1px solid #dfc89b;
  box-shadow: 0 3px 10px rgba(52, 30, 12, 0.04);
}
.lc-body .hl-h3 {
  color: #7c160e;
  border-bottom: 1px dashed #e2cfa8;
  padding-bottom: 6px;
}
.lc-body .hl-gio-hd {
  background: linear-gradient(135deg, #b91c1c 0%, #83150e 100%) !important;
  border-color: #f59e0b !important;
  color: #fff9ed !important;
}
.lc-body .hl-gio-hd .hl-gio-rg { color: #fde68a !important; }
.lc-body .hl-mcell.hl-mq-tot {
  background: linear-gradient(180deg, #fff5f4 0%, #fee2e2 100%) !important;
  border-color: #f87171 !important;
}
.lc-body .hl-mcell.hl-mq-tot .hl-msolar { color: #b91c1c !important; font-weight: 800; }
.lc-body .hl-mcell.hl-msel {
  outline: 3px solid #eab308 !important;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

/* ── FAQ & Wiki Accordion ── */
.lc-faq-list details {
  border: 1px solid #dcc698;
  border-left: 4px solid var(--lc-gold);
  border-radius: 10px;
  background: #fffdf9;
  margin-bottom: 10px;
  padding: 13px 16px;
}
.lc-faq-list details[open] {
  border-left-color: var(--lc-vermilion);
  background: #fffaf0;
}
.lc-faq-list summary {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--lc-ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.lc-faq-list summary::-webkit-details-marker { display: none; }
.lc-faq-list summary::after {
  content: "+";
  color: var(--lc-vermilion);
  font-size: 20px;
  font-weight: 800;
}
.lc-faq-list details[open] summary::after { content: "-"; }
.lc-faq-list details p {
  margin: 10px 0 2px;
  font-size: 14px;
  color: var(--lc-ink-soft);
  line-height: 1.65;
}

/* ── Year & Month Cluster Grid (lich-nam.php & tiet-khi-nam.php) ── */
.lc-year-months-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 980px) { .lc-year-months-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .lc-year-months-grid { grid-template-columns: 1fr; } }

.lc-mini-month {
  background: #fffdf9;
  border: 1.5px solid #d8c090;
  border-radius: 13px;
  padding: 0 12px 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(52, 30, 12, 0.05);
}
.lc-mini-month h3 {
  margin: 0 -12px 10px;
  padding: 9px 14px;
  background: linear-gradient(135deg, #991b1b 0%, #680d09 100%);
  border-bottom: 2px solid #d4a23a;
  font-family: "Noto Serif", Georgia, serif;
  font-size: 15.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff8eb;
}
.lc-mini-month h3 a {
  color: #fff8eb;
  text-decoration: none;
}
.lc-mini-month h3 a:hover { color: #fde68a; text-decoration: underline; }
.lc-cal-7 {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  text-align: center;
  font-size: 12px;
}
.lc-cal-7 .dow {
  font-weight: 800;
  color: #7c2d12;
  background: #fef3c7;
  border-radius: 5px;
  padding: 4px 0;
  font-size: 11px;
}
.lc-cal-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 2px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--lc-ink);
  border: 1px solid transparent;
  min-height: 40px;
}
.lc-cal-cell:hover {
  border-color: var(--lc-vermilion);
  background: var(--lc-vermilion-bg);
}
.lc-cal-cell .sd { font-weight: 700; font-size: 13px; line-height: 1.1; }
.lc-cal-cell .ld { font-size: 10px; color: var(--lc-ink-muted); line-height: 1.1; margin-top: 2px; }
.lc-cal-cell.mung1ram {
  background: linear-gradient(180deg, #fff5f4 0%, #fee2e2 100%);
  border-color: #fca5a5;
}
.lc-cal-cell.mung1ram .sd,
.lc-cal-cell.mung1ram .ld { color: #b91c1c; font-weight: 800; }

/* Code snippet box */
.lc-code-box {
  background: #1e1917;
  color: #fde68a;
  border: 1px solid #b45309;
  padding: 12px 14px;
  border-radius: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  overflow-x: auto;
  margin: 8px 0;
}

/* Personalization & Mobile Month Calendar Save Studio */
.lc-per-section {
  background: linear-gradient(180deg, #fffdf8 0%, #fbf3df 100%);
  border: 2px solid #d4a23a;
  border-top: 5px solid #8c1f14;
}
.lc-per-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: #991b1b;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.lc-per-studio {
  background: #ffffff;
  border: 1.5px solid #e2c992;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(84, 42, 12, 0.06);
}
.lc-per-form-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr 0.9fr;
  gap: 12px;
  align-items: end;
}
@media (max-width: 960px) {
  .lc-per-form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lc-per-field-name {
    grid-column: 1 / -1;
  }
}
@media (max-width: 520px) {
  .lc-per-studio {
    padding: 14px 12px;
  }
  .lc-per-form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}
.lc-per-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.lc-per-field label {
  font-size: 12.5px;
  font-weight: 700;
  color: #5b4328;
}
.lc-per-field input,
.lc-per-field select {
  min-height: 46px;
  padding: 9px 12px;
  border: 1.5px solid #d4b87c;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #1f1b18;
  background: #fffdf9;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.lc-per-field input:focus,
.lc-per-field select:focus {
  outline: none;
  border-color: #991b1b;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.15);
}
.lc-input-alert {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.25) !important;
  background: #fef2f2 !important;
}

.lc-per-quick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e7d5af;
}
.lc-per-quick-lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: #6b5538;
  margin-right: 2px;
}
.lc-per-chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #d8c08d;
  background: #fdf6e6;
  color: #5a3e1b;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-height: 34px;
  transition: all 0.15s ease;
}
.lc-per-chip:hover {
  background: #991b1b;
  border-color: #991b1b;
  color: #ffffff;
}
.lc-per-chip-reset {
  background: #fff1f2;
  border-color: #fda4af;
  color: #9f1239;
  margin-left: auto;
}
@media (max-width: 640px) {
  .lc-per-chip-reset {
    margin-left: 0;
  }
}

.lc-per-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  align-items: stretch;
}
.lc-per-btn-check,
.lc-per-btn-save,
.lc-per-btn-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}
.lc-per-btn-check {
  background: linear-gradient(135deg, #991b1b 0%, #680d09 100%);
  border: 1.5px solid #7f1d1d;
  color: #fff8eb;
}
.lc-per-btn-check:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
  color: #ffffff;
}
.lc-per-btn-save {
  flex: 1 1 300px;
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  border: 1.5px solid #92400e;
  color: #ffffff;
  font-size: 15px;
  box-shadow: 0 5px 15px rgba(180, 83, 9, 0.28);
}
.lc-per-btn-save:hover {
  background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
  color: #ffffff;
  transform: translateY(-1px);
}
.lc-per-btn-dl {
  background: #fff8eb;
  border: 1.5px solid #d4a23a;
  color: #78350f;
}
@media (max-width: 680px) {
  .lc-per-actions {
    flex-direction: column;
  }
  .lc-per-btn-save {
    order: -1;
    flex: none;
    width: 100%;
    min-height: 52px;
    font-size: 15.5px;
  }
  .lc-per-btn-check,
  .lc-per-btn-dl {
    width: 100%;
  }
}

.lc-per-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
}
.lc-per-status.ok {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}
.lc-per-status.warn {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.lc-per-result {
  margin-top: 16px;
}
.lc-per-empty {
  padding: 14px 16px;
  border-radius: 11px;
  background: #fdf8ec;
  border: 1px dashed #d4b475;
  color: #5c482c;
  font-size: 14px;
  line-height: 1.6;
}
.lc-per-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 820px) {
  .lc-per-grid {
    grid-template-columns: 1fr;
  }
}
.lc-per-card {
  border-radius: 12px;
  padding: 15px 16px;
  border: 1.5px solid #e4d2ad;
  background: #fffdf9;
}
.lc-per-card h3 {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 16px;
  color: #7f170f;
  margin: 0 0 10px;
}
.lc-per-card-profile {
  border-top: 4px solid #b45309;
  background: linear-gradient(180deg, #fffdf7 0%, #fef6e4 100%);
}
.lc-per-card-day {
  border-top: 4px solid #8c1f14;
}
.lc-per-card-best {
  border-top: 4px solid #16a34a;
  background: linear-gradient(180deg, #f8fffb 0%, #ecfdf5 100%);
  border-color: #a7f3d0;
}
.lc-per-card-best h3 { color: #15803d; }
.lc-per-card-clash {
  border-top: 4px solid #dc2626;
  background: linear-gradient(180deg, #fffafa 0%, #fef2f2 100%);
  border-color: #fecaca;
}
.lc-per-card-clash h3 { color: #b91c1c; }

.lc-per-owner-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: #8c1f14;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.lc-per-kv {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 13.5px;
  padding: 5px 0;
  border-bottom: 1px dashed #ead8b3;
}
.lc-per-kv span { color: #6b573b; }
.lc-per-kv b { color: #1f1b18; }
.lc-per-dirs-wrap { margin-top: 10px; }
.lc-per-dirs-lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 6px;
}
.lc-per-dirs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lc-per-dir-tag {
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  color: #92400e;
}

.lc-per-day-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.lc-per-day-top h3 { margin: 0; }
.lc-per-verdict-pill {
  font-size: 12.5px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
}
.lc-per-verdict-pill.daicat { background: #15803d; color: #ffffff; }
.lc-per-verdict-pill.hop { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.lc-per-verdict-pill.binh { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.lc-per-verdict-pill.ky { background: #dc2626; color: #ffffff; }

.lc-per-ul {
  margin: 8px 0 10px;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #2f261e;
}
.lc-per-hours-box {
  font-size: 13px;
  padding: 8px 11px;
  border-radius: 8px;
  background: #fdf6e7;
  border: 1px solid #e6cfa0;
  color: #3f2e1b;
  line-height: 1.5;
}
.lc-per-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.lc-per-day-pill {
  padding: 6px 10px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease;
}
.lc-per-day-pill small {
  font-weight: 500;
  opacity: 0.88;
}
.lc-per-day-pill:hover {
  transform: translateY(-1px);
}
.lc-per-day-pill.hop {
  background: #ffffff;
  border-color: #34d399;
  color: #065f46;
}
.lc-per-day-pill.ky {
  background: #ffffff;
  border-color: #fca5a5;
  color: #991b1b;
}
.lc-per-muted {
  font-size: 13px;
  color: #5b4d3c;
}
.lc-per-foot-hint {
  margin-top: 10px;
  font-size: 12.5px;
  color: #6b583e;
  text-align: center;
}

.lc-month-sec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
@media (max-width: 640px) {
  .lc-month-sec-actions {
    width: 100%;
  }
  .lc-month-sec-actions .lc-btn {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
    min-height: 44px;
  }
}

/* ── Print A4 Stylesheet (@media print) ── */
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  #site-nav, #site-footer, .lc-cmd-bar, .lc-cluster-nav, .lc-eco-grid,
  #chonNgayBox, #congCuBox, #icsBox, .lc-no-print {
    display: none !important;
  }
  body.lc-body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }
  .lc-container { max-width: 100%; padding: 0; }
  .lc-hero-head { background: #fff !important; color: #000 !important; padding: 0 0 10px; border-bottom: 2px solid #8C1F14; box-shadow: none !important; }
  .lc-hero-head h1 { color: #6e0e0a !important; text-shadow: none !important; }
  .lc-subtitle, .lc-breadcrumb { color: #333 !important; }
  .lc-hero-grid { grid-template-columns: 1fr 1fr; gap: 12px; page-break-inside: avoid; }
  .lc-section, .lc-almanac-sheet, .lc-wheel-card, .lc-meridian-card, .lc-capsule {
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 12px;
  }
}
