﻿.huangli-main-panel {
  padding: 24px;
  display: grid;
  gap: 20px;
}

.huangli-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
}

.date-picker-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(188, 47, 63, 0.18);
  background: linear-gradient(180deg, #fffaf4 0%, #fff5ea 100%);
  border-radius: 18px;
}

.date-picker-wrap select {
  min-width: 88px;
  padding: 9px 12px;
  border: 1px solid #ead7bf;
  border-radius: 12px;
  background: #fff;
  color: #46301e;
  font-size: 14px;
}

.date-sep {
  color: #7a5843;
  font-weight: 600;
}

.nav-arrow {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #bc2f3f 0%, #dd5a48 100%);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(188, 47, 63, 0.22);
}

.nav-arrow:hover {
  transform: translateY(-1px);
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #bc2f3f 0%, #d74d43 100%);
  color: #fff;
  box-shadow: 0 12px 22px rgba(188, 47, 63, 0.16);
}

.btn-secondary {
  background: #fff8f1;
  border-color: #edd9c0;
  color: #6f4b33;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

.huangli-overview {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.45fr) minmax(220px, 1fr);
  gap: 18px;
}

.pillar-stack {
  display: grid;
  gap: 16px;
}

.pillar-card,
.detail-card,
.yiji-box,
.time-section {
  border: 1px solid #f1dcc4;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdfa 0%, #fff7ef 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.pillar-card {
  padding: 18px 18px 16px;
}

.pillar-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(188, 47, 63, 0.1);
  color: #a52839;
  font-size: 13px;
  font-weight: 700;
}

.pillar-card strong {
  display: block;
  margin-top: 14px;
  color: #a9282d;
  font-size: 28px;
  line-height: 1.1;
}

.pillar-card dl {
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.pillar-card dl.wide {
  gap: 12px;
}

.pillar-card dl div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
}

.pillar-card dt {
  color: #8a6c56;
  font-size: 12px;
}

.pillar-card dd {
  margin: 0;
  color: #38261a;
  font-size: 14px;
  font-weight: 600;
}

.date-hero {
  padding: 24px 26px;
  border: 1px solid #f1dcc4;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(247, 208, 123, 0.28), transparent 38%),
    radial-gradient(circle at bottom right, rgba(188, 47, 63, 0.12), transparent 42%),
    linear-gradient(180deg, #fffdfa 0%, #fff8f0 100%);
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
}

.solar-caption,
.lunar-caption {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.solar-caption span:first-child {
  color: #7e6149;
  font-weight: 600;
}

.solar-caption span:not(:first-child) {
  color: #8d6b54;
  font-size: 14px;
}

.big-day-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 28% 28%, #fff 0%, #ffe7d2 35%, #ffd1b5 100%);
  border: 8px solid rgba(188, 47, 63, 0.08);
  box-shadow: 0 20px 40px rgba(188, 47, 63, 0.12);
}

#big-day {
  color: #c5252d;
  font-size: 84px;
  line-height: 1;
  font-weight: 800;
}

.lunar-caption strong {
  color: #5b2f28;
  font-size: 24px;
}

.lunar-caption span {
  color: #9b6230;
  font-size: 14px;
}

.term-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.term-strip div,
.position-grid div,
.detail-list div {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(241, 220, 196, 0.85);
}

.term-strip span,
.position-grid span,
.detail-list span {
  display: block;
  color: #92745c;
  font-size: 12px;
  margin-bottom: 6px;
}

.term-strip strong,
.position-grid strong,
.detail-list strong {
  color: #412c20;
  font-size: 14px;
  line-height: 1.6;
}

.time-luck-brief {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.time-luck-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f5eee8;
  color: #6b5545;
  font-size: 13px;
  font-weight: 700;
}

.time-luck-chip.is-good {
  background: #e8f5e7;
  color: #22744a;
}

.time-luck-chip.is-bad {
  background: #fde8e7;
  color: #c5352d;
}

.time-luck-chip.is-empty {
  background: #f5f1ea;
  color: #9b8a79;
}

.yiji-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.yiji-box {
  padding: 18px;
}

.yiji-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.yiji-header strong {
  color: #5d3c29;
  font-size: 18px;
}

.yiji-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.yi-icon {
  background: linear-gradient(135deg, #2da66b 0%, #46be7d 100%);
}

.ji-icon {
  background: linear-gradient(135deg, #d6473e 0%, #e86c55 100%);
}

.yiji-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hl-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
}

.hl-tag.is-yi {
  color: #1f834f;
  background: #e8f7ef;
  border-color: #cde9d9;
}

.hl-tag.is-ji {
  color: #bc2f3f;
  background: #fceced;
  border-color: #f3cfd2;
}

.hl-tag.is-empty {
  color: #8d7e70;
  background: #f7f2ed;
  border-color: #ede2d5;
}

.huangli-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.detail-card {
  padding: 18px;
}

.detail-card h2,
.time-section h2 {
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(247, 208, 123, 0.22) 0%, rgba(247, 208, 123, 0.12) 100%);
  color: #7a521d;
  font-size: 17px;
}

.detail-list {
  display: grid;
  gap: 12px;
}

.position-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.position-grid div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.time-section {
  padding: 18px;
}

.section-title-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.section-title-row p {
  margin: 0;
  color: #8e735e;
  font-size: 13px;
}

.time-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.time-card {
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #f1dcc4;
}

.time-card.empty {
  color: #8f8276;
  text-align: center;
}

.time-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3e4d5;
}

.time-card-title {
  display: grid;
  gap: 6px;
}

.time-card-head h3 {
  margin: 0;
  color: #532c22;
  font-size: 20px;
  font-weight: 700;
}

.time-card-head p {
  margin: 0;
  color: #8d7461;
  font-size: 13px;
}

.time-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.time-meta-grid div,
.time-tags-box {
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff8f0;
}

.time-meta-grid span,
.time-tags-box label {
  display: block;
  color: #93755b;
  font-size: 12px;
  margin-bottom: 6px;
}

.time-meta-grid strong {
  color: #38261a;
  font-size: 14px;
}

.time-tags-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.time-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.time-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e8f5e7;
  color: #2d8053;
}

.time-tags-box.is-ji .time-tag {
  background: #fde8e7;
  color: #c13e36;
}

.time-tag.is-empty {
  background: #f4efe8;
  color: #8b786a;
}

.tool-tip {
  min-height: 24px;
  padding: 2px 4px 0;
  color: #357a4d;
  font-size: 13px;
}

.tool-tip.error {
  color: #b33b37;
}

.panel-related,
.panel-comments {
  display: block;
}

@media (max-width: 1180px) {
  .huangli-toolbar {
    grid-template-columns: auto 1fr auto;
  }

  .action-bar {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .huangli-overview {
    grid-template-columns: 1fr;
  }

  .pillar-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .huangli-main-panel {
    padding: 18px;
  }

  .yiji-main,
  .huangli-detail-grid,
  .time-list {
    grid-template-columns: 1fr;
  }

  .term-strip,
  .time-tags-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .huangli-toolbar {
    grid-template-columns: 1fr;
  }

  .date-picker-wrap {
    justify-content: center;
  }

  .nav-arrow {
    width: 100%;
    height: 42px;
    border-radius: 12px;
  }

  .action-bar {
    width: 100%;
  }

  .action-bar button {
    flex: 1 1 calc(50% - 10px);
  }

  .pillar-stack,
  .position-grid,
  .time-meta-grid {
    grid-template-columns: 1fr;
  }

  .date-hero {
    padding: 20px 16px;
  }

  .big-day-wrap {
    width: 148px;
    height: 148px;
  }

  #big-day {
    font-size: 68px;
  }
}

@media (max-width: 480px) {
  .huangli-main-panel {
    padding: 14px;
    gap: 16px;
  }

  .date-picker-wrap {
    padding: 10px;
  }

  .date-picker-wrap select {
    min-width: 74px;
    font-size: 13px;
  }

  .action-bar button {
    flex-basis: 100%;
  }

  .yiji-header {
    margin-bottom: 14px;
  }

  .detail-card,
  .time-section,
  .yiji-box,
  .pillar-card {
    padding: 14px;
  }
}
