/* 八字风格大运/流年条：紫微 / 奇门 / 阴盘共用 */
.luck-page-card {
  padding-bottom: 8px;
}
.luck-page-card .luck-qiyun-box {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  background: #fafafa;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.luck-page-card .luck-qiyun-main {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  line-height: 1.55;
  color: #444;
}
.luck-page-card .luck-qiyun-side {
  flex-shrink: 0;
  text-align: right;
  font-size: 11px;
  line-height: 1.55;
  color: #333;
  font-weight: 600;
}
.luck-page-card .luck-picker {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.luck-page-card .row-container {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 0;
  border: 1px solid #e5e5e5;
  background: #fff;
}
.luck-page-card .row-title {
  width: 24px;
  flex-shrink: 0;
  border: none;
  border-right: 1px solid #e5e5e5;
  border-radius: 0;
  background: #f3f0ea;
  display: flex;
  align-items: center;
  justify-content: center;
}
.luck-page-card .row-title-wrapper {
  font-size: 12px;
  line-height: 1.25;
  color: #666;
  font-weight: 700;
  text-align: center;
}
.luck-page-card .row-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 48px;
  grid-template-columns: none;
  justify-content: start;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x;
  border: none;
  border-radius: 0;
  background: #fff;
  width: 100%;
}
.luck-page-card .row-scroll::-webkit-scrollbar { display: none; }
.luck-page-card .row-item {
  min-height: 86px;
  border: none;
  border-right: 1px solid #efefef;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  color: #333;
}
.luck-page-card .row-item:last-child { border-right: none; }
.luck-page-card .row-item.selected {
  background: #ececec;
  box-shadow: none;
  border-color: transparent;
}
.luck-page-card .row-item.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #b0b0b0;
}
.luck-page-card .row-item-wrapper {
  min-height: 100%;
  padding: 6px 2px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}
.luck-page-card .row-item-top {
  width: 100%;
  font-size: 12px;
  line-height: 1.2;
  color: #333;
  font-weight: 700;
  white-space: nowrap;
}
.luck-page-card .row-item-subtop {
  width: 100%;
  font-size: 10px;
  line-height: 1.2;
  margin-top: 1px;
  color: #888;
  white-space: nowrap;
}
.luck-page-card .row-item-ss {
  font-size: 10px;
  line-height: 1.1;
  color: #888;
  flex-shrink: 0;
}
.luck-page-card .row-item-gzline {
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1;
  width: 100%;
}
.luck-page-card .row-item-gz {
  font-size: 17px;
  line-height: 1.05;
  font-weight: 700;
  color: #222;
}
.luck-page-card .row-item.selected .row-item-top { font-weight: 800; }
.luck-page-card .woodColor { color: #00a050; }
.luck-page-card .fireColor { color: #c00000; }
.luck-page-card .soilColor { color: #8a5a2b; }
.luck-page-card .goldColor { color: #b8860b; }
.luck-page-card .waterColor { color: #0070c0; }
.luck-page-card .row-item-plain {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}
.luck-page-card .row-item-bottom {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #555;
  line-height: 1.2;
}
.luck-page-card .luck-wuxing-bar {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid #e5e5e5;
  overflow: hidden;
  border-radius: 2px;
}
.luck-page-card .luck-wuxing-item {
  padding: 7px 2px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.luck-page-card .luck-wuxing-item.wx-mu { background: #6a8f3d; }
.luck-page-card .luck-wuxing-item.wx-huo { background: #c45a3a; }
.luck-page-card .luck-wuxing-item.wx-tu { background: #a67c52; }
.luck-page-card .luck-wuxing-item.wx-jin { background: #c4a35a; color: #3a2f12; }
.luck-page-card .luck-wuxing-item.wx-shui { background: #5a6a7a; }

.pan-luck-section.luck-page-card,
.ziwei-luck-section.luck-page-card {
  margin: 0 8px 8px;
  padding: 4px 2px 2px;
}

/* 紫微 / 奇门 / 阴盘：一栏铺满，仅大运+流年两行（无起运框、无五行条） */
.ziwei-luck-section.luck-page-card,
.pan-luck-section.luck-page-card {
  --zw-luck-ink: #2f463c;
  --zw-luck-ink-soft: #3d5a4c;
  --zw-luck-line: #e6eaef;
  --zw-luck-paper: #f7f8fa;
  --zw-luck-selected: #eef5f1;
  margin: 10px 0 0;
  padding: 8px 6px 6px;
  border: 1px solid var(--zw-luck-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 41, 51, 0.04);
}
.ziwei-luck-section .luck-section-head,
.pan-luck-section .luck-section-head,
.ziwei-luck-section .luck-qiyun-box,
.pan-luck-section .luck-qiyun-box,
.ziwei-luck-section .luck-wuxing-bar,
.pan-luck-section .luck-wuxing-bar {
  display: none !important;
}
.ziwei-luck-section .luck-picker,
.pan-luck-section .luck-picker {
  margin-top: 0;
  gap: 8px;
}
.ziwei-luck-section .row-container,
.pan-luck-section .row-container {
  border: none;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--zw-luck-line);
}
.ziwei-luck-section .row-title,
.pan-luck-section .row-title {
  width: 26px;
  border-right: 1px solid var(--zw-luck-line);
  background: #f3f0ea;
}
.ziwei-luck-section .row-title-wrapper,
.pan-luck-section .row-title-wrapper {
  color: #555;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
}
.ziwei-luck-section .row-scroll,
.pan-luck-section .row-scroll {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: stretch;
  grid-auto-flow: unset;
  grid-auto-columns: unset !important;
  grid-template-columns: unset;
  gap: 0;
  overflow: hidden !important;
  width: 100%;
  min-width: 0;
  background: var(--zw-luck-paper);
  touch-action: manipulation;
}
.ziwei-luck-section .row-item,
.pan-luck-section .row-item {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 86px;
  border-right-color: #e8ecf0;
  background: transparent;
  transition: background-color 0.15s ease;
}
.ziwei-luck-section .row-item:active,
.pan-luck-section .row-item:active {
  background: rgba(61, 90, 76, 0.06);
}
.ziwei-luck-section .row-item.selected,
.pan-luck-section .row-item.selected {
  background: var(--zw-luck-selected);
}
.ziwei-luck-section .row-item.selected::before,
.pan-luck-section .row-item.selected::before {
  left: 0;
  right: 0;
  top: 0;
  bottom: auto;
  width: auto;
  height: 2px;
  background: var(--zw-luck-ink-soft);
}
.ziwei-luck-section .row-item-wrapper,
.pan-luck-section .row-item-wrapper {
  padding: 6px 0 6px;
  overflow: hidden;
}
.ziwei-luck-section .row-item-top,
.pan-luck-section .row-item-top {
  font-size: 10px;
  color: #2a323a;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.ziwei-luck-section .row-item.selected .row-item-top,
.pan-luck-section .row-item.selected .row-item-top {
  color: var(--zw-luck-ink);
}
.ziwei-luck-section .row-item-subtop,
.pan-luck-section .row-item-subtop {
  color: #8b939e;
  font-size: 9px;
  letter-spacing: -0.04em;
}
.ziwei-luck-section .row-item-gzline,
.pan-luck-section .row-item-gzline {
  margin-top: 2px;
  gap: 0;
}
.ziwei-luck-section .row-item-gz,
.pan-luck-section .row-item-gz {
  font-size: 14px;
  letter-spacing: 0;
}
.ziwei-luck-section .row-item.selected .row-item-gz,
.pan-luck-section .row-item.selected .row-item-gz {
  color: #1a2a22;
}
.ziwei-luck-section .row-item-ss,
.pan-luck-section .row-item-ss {
  color: #9aa3ad;
  font-size: 9px;
}
.ziwei-luck-section .row-item-plain,
.pan-luck-section .row-item-plain {
  margin-top: 10px;
  font-size: 12px;
  color: var(--zw-luck-ink);
}
.ziwei-luck-section .row-item-bottom,
.pan-luck-section .row-item-bottom {
  margin-top: 2px;
  font-size: 9px;
  color: #6b7580;
}

@media (max-width: 440px) {
  .ziwei-luck-section.luck-page-card,
  .pan-luck-section.luck-page-card {
    margin-top: 8px;
    padding: 8px 4px 6px;
    border-radius: 8px;
  }
  .ziwei-luck-section .row-title,
  .pan-luck-section .row-title {
    width: 22px;
  }
  .ziwei-luck-section .row-item,
  .pan-luck-section .row-item {
    min-height: 82px;
  }
  .ziwei-luck-section .row-item-top,
  .pan-luck-section .row-item-top {
    font-size: 9px;
  }
  .ziwei-luck-section .row-item-gz,
  .pan-luck-section .row-item-gz {
    font-size: 13px;
  }
}
