:root {
  --bg: #f2f3f5;
  --card: #ffffff;
  --line: #e8eaee;
  --line-strong: #d6dce3;
  --text: #333842;
  --muted: #7b818c;
  --blue: #1295d8;
  --blue-dark: #087bad;
  --cyan: #168daa;
  --wood: #22986f;
  --fire: #ef202f;
  --earth: #8d7140;
  --metal: #f39b21;
  --water: #2f86df;
  --deep-blue: #0c3a5c;
  --soft-row: #f7f8fa;
  /* 第一性原理引擎卡片与大运流年共用的浅色主题变量（app.js 内联样式通过 var() 引用） */
  --text-color: #333842;
  --text-bright: #1c1917;
  --dim-text: #7b818c;
  --accent-color: #6d28d9;
  --gold-color: #b45309;
  --good-color: #2f855a;
  --warn-color: #c53030;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

html,
body,
.phone,
.app-shell {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.phone::-webkit-scrollbar,
.app-shell::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 414px);
  align-items: start;
  justify-content: center;
  min-height: 100vh;
  padding: 22px;
}

.compact-chart-form {
  position: relative;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.pillar-match-card p {
  margin: 0;
  padding: 4px 8px 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.pillar-popover {
  width: max-content;
  max-width: calc(100vw - 32px);
  max-height: min(92vh, 720px);
  overflow: auto;
  border: 1px solid #d6e0e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(16, 31, 45, 0.25);
}

.pillar-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 10px 0;
}

.pillar-slot strong {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 12px;
}

.pillar-slot em {
  color: var(--blue-dark);
  font-style: normal;
  font-weight: 600;
}

.pillar-gan,
.pillar-zhi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.pillar-zhi {
  margin-top: 4px;
}

.pillar-slot button {
  min-height: 26px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.pillar-slot button.is-selected {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.pillar-slot button:disabled {
  color: #c5ccd3;
  background: var(--soft-row);
  cursor: default;
}

.pillar-dialog-status {
  margin: 0;
  padding: 8px 12px 4px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.pillar-date-choices {
  display: grid;
  gap: 6px;
  padding: 4px 12px 10px;
}

.pillar-date-choices button {
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.pillar-date-choices button.is-selected {
  border-color: var(--blue);
  background: #eef8ff;
  color: var(--text);
}

.calendar-confirm:disabled {
  border-color: var(--line-strong);
  background: var(--soft-row);
  color: var(--muted);
  cursor: default;
}

.compact-field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 66px minmax(0, 1.03fr) minmax(0, 1.02fr);
  grid-template-areas:
    "name gender place longitude"
    "birthday birthday calendar submit";
  gap: 3px;
  padding: 5px 7px;
}

[hidden] {
  display: none !important;
}

.compact-field {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 3px;
  min-height: 30px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.compact-field > span {
  flex: 0 0 auto;
  overflow: hidden;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-name { grid-area: name; }
.field-gender {
  position: relative;
  z-index: 5;
  grid-area: gender;
}
.field-place { grid-area: place; }
.field-longitude { grid-area: longitude; }
.field-birthday { grid-area: birthday; }
.field-calendar { grid-area: calendar; }
.compact-submit { grid-area: submit; }

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--text);
  background: #fff;
  outline: none;
}

input[type="checkbox"],
input[type="radio"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
}

.compact-field input,
.compact-field select,
.calendar-trigger {
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  min-height: 30px;
  height: 30px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.1;
}

.field-gender select {
  flex: 0 0 auto;
  width: 3.2em;
  padding-left: 2px;
  padding-right: 1px;
}

.calendar-entry {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.compact-field > .calendar-entry {
  flex: 1 1 auto;
  overflow: hidden;
}

.field-calendar {
  position: relative;
  z-index: 4;
  background: #fff;
}

.field-calendar > span {
  flex: 1 1 33.333%;
}

.field-calendar select {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
}

.compact-menu {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.compact-field > .compact-menu,
.field-calendar > .compact-menu {
  flex: 0 0 auto;
  overflow: visible;
}

.compact-menu > select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.compact-menu-toggle {
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: 1.4em;
  min-height: 0;
  margin: 0;
  padding: 0 14px 0 0;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  white-space: nowrap;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23333842' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 10px 6px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.compact-field .compact-menu-toggle {
  height: 30px;
  min-height: 30px;
  padding: 0 16px 0 6px;
  font-size: 12px;
  background-color: #fff;
  background-position: right 4px center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.picker-form .compact-menu-toggle {
  padding-right: 12px;
  background-position: right center;
}

.compact-menu-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 2px);
  left: 0;
  width: max-content;
  min-width: 100%;
  max-height: 200px;
  margin: 0;
  padding: 2px 0;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(25, 41, 66, 0.12);
}

.compact-menu-panel[hidden] {
  display: none;
}

.compact-menu-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 4px 8px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.compact-menu-item.is-on {
  color: #fff;
  background: var(--blue);
}

.main-birth-segments {
  position: relative;
  display: grid;
  grid-template-columns: 31px 3px minmax(14px, 1fr) 3px minmax(14px, 1fr) 2px minmax(14px, 1fr) 3px minmax(14px, 1fr);
  align-items: center;
  gap: 1px;
  padding-right: 25px;
  min-height: 30px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
}

.main-birth-segments.is-leap-month {
  grid-template-columns: 31px 3px 16px minmax(14px, 1fr) 3px minmax(14px, 1fr) 2px minmax(14px, 1fr) 3px minmax(14px, 1fr);
}

.main-lunar-leap-badge {
  display: none;
  width: 16px;
  min-width: 16px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  color: #8a939d;
  background: transparent;
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

.main-lunar-leap-badge.is-available {
  display: block;
  color: #c4cbd1;
  background: #f8f9fa;
  cursor: pointer;
}

.main-lunar-leap-badge.is-visible {
  color: #fff;
  background: #b85f38;
}

.compact-field .main-birth-segment {
  width: 100%;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.compact-field .main-birth-segment:focus {
  border: 0;
  background: #eef8fc;
  box-shadow: none;
}

.main-birth-segments i {
  color: #77818c;
  font-style: normal;
  text-align: center;
  font-size: 11px;
}

.calendar-entry .calendar-trigger {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 25px;
  min-width: 25px;
  height: 100%;
  display: grid;
  place-items: center;
  margin-left: 0;
  border: 0;
  border-left: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--text);
  background: #f7f9fb;
  text-align: center;
  cursor: pointer;
}

input:focus,
select:focus,
.calendar-trigger:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 149, 216, 0.12);
}

.primary-action {
  border: 0;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
}

.compact-submit {
  align-self: stretch;
  width: 100%;
  min-height: 30px;
  height: 30px;
  margin: 0;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.compact-submit:disabled {
  opacity: 0.75;
  cursor: wait;
}

.secondary-action {
  align-self: end;
  min-height: 38px;
  border: 1px solid #9acfe5;
  border-radius: 999px;
  color: var(--blue-dark);
  background: #eef8ff;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.calendar-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(20, 30, 42, 0.38);
}

.dual-calendar-popover {
  width: max-content;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  border: 1px solid #d6e0e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(16, 31, 45, 0.25);
}

.dual-calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.dual-calendar-head > div {
  display: grid;
  gap: 3px;
}

.dual-calendar-head strong {
  color: #26313c;
  font-size: 16px;
}

.dual-calendar-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.calendar-close {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #607080;
  background: #f1f4f6;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.dual-calendar-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 10px 14px 0;
}

.dual-calendar-tabs button {
  min-height: 32px;
  border: 1px solid #d9e1e7;
  border-radius: 5px;
  color: #68737e;
  background: #f8fafb;
  font-size: 13px;
  cursor: pointer;
}

.dual-calendar-tabs button.is-active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.calendar-layer-stack {
  display: grid;
  grid-template-areas: "calendar-layer";
  min-height: 58px;
}

.calendar-panel {
  grid-area: calendar-layer;
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.solar-segmented-picker {
  position: relative;
  display: grid;
  grid-template-columns: 3.6em auto 2em auto 2em auto 2em auto 2em 28px;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.solar-segmented-picker i {
  color: #7a858f;
  font-style: normal;
  text-align: center;
}

.calendar-dialog-field .solar-date-segment {
  width: 100%;
  min-width: 0;
  padding-inline: 4px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.solar-segmented-picker button {
  min-height: 34px;
  border: 1px solid #d7dee5;
  border-radius: 5px;
  background: #f7f9fb;
  color: var(--blue);
  cursor: pointer;
}

.native-calendar-proxy {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.calendar-dialog-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: #5f6974;
  font-size: 13px;
}

.solar-calendar-field {
  grid-template-columns: minmax(0, 1fr);
}

.calendar-dialog-field input,
.calendar-dialog-field select {
  min-width: 0;
  min-height: 34px;
  height: 34px;
  padding: 4px 7px;
  font-size: 13px;
}

.lunar-calendar-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.lunar-calendar-fields .calendar-dialog-field {
  display: flex;
  flex: 0 0 auto;
  width: auto;
  gap: 3px;
}

.lunar-calendar-fields .calendar-dialog-field select,
.lunar-calendar-fields #lunarTime {
  flex: 0 0 auto;
  width: auto;
}

.lunar-calendar-fields #lunarTime {
  width: 6.4em;
}

#lunarTime {
  padding-inline: 2px;
}

.calendar-leap-field {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: #5f6974;
  font-size: 13px;
}

.calendar-leap-field input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--blue);
}

.calendar-conversion {
  display: block;
  min-height: 35px;
  padding: 8px 9px;
  border-radius: 5px;
  color: #3e6375;
  background: #eef8fc;
  font-size: 12px;
  line-height: 1.45;
}

.dual-calendar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 0 14px 14px;
}

.dual-calendar-actions button {
  min-height: 33px;
  padding: 4px 12px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
}

.calendar-now {
  border: 1px solid #9acfe5;
  color: var(--blue-dark);
  background: #eef8ff;
}

.calendar-cancel {
  border: 1px solid #d9e1e7;
  color: #68737e;
  background: #fff;
}

.calendar-confirm {
  border: 1px solid var(--blue);
  color: #fff;
  background: var(--blue);
}

.phone {
  width: 100%;
  max-width: 414px;
  min-height: calc(100vh - 44px);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid #dde2e8;
  box-shadow: 0 18px 42px rgba(25, 41, 66, 0.12);
}

.tabbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  height: 47px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  border: 0;
  padding: 0 2px;
  color: #888;
  background: transparent;
  font-size: 12.5px;
  white-space: nowrap;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  color: var(--cyan);
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: var(--blue);
  transform: translateX(-50%);
}

.notice {
  margin: 10px;
  padding: 9px 11px;
  border-radius: 6px;
  color: #8a5a00;
  background: #fff6df;
  font-size: 13px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.profile-card,
.white-card,
.section-block {
  background: #fff;
}

.profile-card {
  margin: 12px 10px 8px;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 6px 18px rgba(24, 45, 68, 0.05);
}

.profile-top {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: start;
}

.avatar {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #222;
  background: linear-gradient(145deg, #fff, #f0f3f5);
  font-size: 28px;
}

.person-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 21px;
  font-weight: 700;
  color: #252a31;
}

.name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
}

.tag-wood {
  color: var(--wood);
}

.tag-water {
  color: var(--water);
}

.profile-lines {
  display: grid;
  gap: 4px;
  margin-top: 5px;
  color: #686e77;
  font-size: 15px;
  line-height: 1.42;
}

.profile-actions {
  display: flex;
  gap: 12px;
  color: #4f9eb8;
  font-size: 21px;
}

.basic-rows {
  margin: 8px 10px;
  overflow: hidden;
  border-radius: 7px;
}

.info-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  min-height: 32px;
  align-items: center;
  padding: 5px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  color: #5c626b;
  font-size: 15px;
  line-height: 1.3;
}

.info-row:nth-child(2n) {
  background: var(--soft-row);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row .full {
  grid-column: 1 / -1;
}

.blue-text {
  color: var(--cyan);
  font-weight: 600;
}

.duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 8px 10px;
  overflow: hidden;
  border-radius: 7px;
  background: #fff;
}

.duo-grid .info-row {
  margin: 0;
  border-radius: 0;
}

.ratio-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 8px 14px 12px;
  background: #fff;
  color: #6c727c;
  font-size: 15px;
}

.ratio-bar {
  display: grid;
  grid-template-columns: var(--same, 50%) 1fr;
  height: 17px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e7eb;
}

.ratio-same {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  color: #fff;
  background: #f31824;
  font-size: 12px;
}

.ratio-other {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  color: #fff;
  background: #5ca1e8;
  font-size: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 13px 14px 8px;
  color: #303640;
  font-size: 17px;
  font-weight: 700;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: var(--blue);
}

.section-title.plain::before {
  display: none;
}

.reading-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-right: 12px;
}

.reading-head .section-title {
  padding-right: 0;
}

.feedback-export {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #9acfe5;
  border-radius: 999px;
  color: var(--blue-dark);
  background: #eef8ff;
  font-size: 12px;
  cursor: pointer;
}

.natal-strength,
.natal-hits p {
  margin: 0 14px 8px;
  color: #333d47;
  font-size: 14px;
  line-height: 1.45;
}

.force-card,
.text-card {
  margin: 8px 10px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.force-list {
  display: grid;
  gap: 10px;
  padding: 8px 14px 14px;
}

.force-item {
  display: grid;
  grid-template-columns: 24px 1fr 86px;
  gap: 10px;
  align-items: center;
  color: #606773;
  font-size: 15px;
}

.force-track {
  display: block;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eaed;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.force-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #b7bdc6;
}

.force-item.wood .force-fill { background: var(--wood); }
.force-item.fire .force-fill { background: var(--fire); }
.force-item.earth .force-fill { background: var(--earth); }
.force-item.metal .force-fill { background: var(--metal); }
.force-item.water .force-fill { background: var(--water); }

.force-label {
  text-align: right;
  white-space: nowrap;
}

.element-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 28px;
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.element-strip span {
  display: grid;
  place-items: center;
}

.wood {
  color: var(--wood);
}

.fire {
  color: var(--fire);
}

.earth {
  color: var(--earth);
}

.metal {
  color: var(--metal);
}

.water {
  color: var(--water);
}

.bg-wood {
  background: var(--wood);
}

.bg-fire {
  background: var(--fire);
}

.bg-earth {
  background: var(--earth);
}

.bg-metal {
  background: var(--metal);
}

.bg-water {
  background: var(--water);
}

.poem {
  padding: 8px 18px 20px;
  color: #343a43;
  font-size: 15px;
  line-height: 1.85;
}

.muted-line {
  color: #8b929d;
  font-size: 13px;
  text-align: center;
}

.chart-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 14px 10px;
  background: #fff;
}

.chart-name {
  font-size: 20px;
  font-weight: 700;
}

.chart-meta {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  color: #5e6570;
  font-size: 14px;
}

.time-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6d727a;
  font-size: 13px;
}

.round-btn {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  padding: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.pillar-table {
  display: grid;
  grid-template-columns: 56px repeat(4, minmax(0, 1fr));
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pillar-table.pro {
  grid-template-columns: 32px repeat(9, minmax(0, 1fr));
  font-size: 11px;
}

.cell {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 38px;
  padding: 7px 4px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  line-height: 1.35;
  word-break: keep-all;
}

.cell.row-head {
  color: #59616d;
  background: #fff;
}

.cell.header {
  color: #5a606b;
  background: #f4f5f7;
}

.big-stem,
.big-branch {
  display: block;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
}

.pro .big-stem,
.pro .big-branch {
  font-size: 17px;
}

.pillar-table.pro .cell {
  min-height: 29px;
  min-width: 0;
  padding: 3px 1px;
  line-height: 1.18;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.pillar-table.pro .hidden-pair,
.pillar-table.pro .big-stem,
.pillar-table.pro .big-branch {
  word-break: keep-all;
  overflow-wrap: normal;
  white-space: nowrap;
}

.pillar-table.pro .cell.row-stars {
  padding: 2px 0;
  overflow: hidden;
}

.pillar-table.pro .cell.row-stars .minor-list {
  width: 100%;
  gap: 1px;
}

.pillar-table.pro .minor-star {
  display: block;
  width: 100%;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  text-align: center;
  font-size: 11px;
  line-height: 1.25;
}

.pillar-table.pro .minor-star.tight {
  width: 100%;
  margin: 0 auto;
  display: block;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.pillar-table.pro .minor-star.tight span {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: -0.2px;
  transform: scaleX(0.92);
  transform-origin: center center;
}

@media (max-width: 420px) {
  .pillar-table.pro .minor-star,
  .pillar-table.pro .minor-star.tight span {
    font-size: 9px;
    letter-spacing: -0.4px;
    transform: scaleX(0.84);
  }
}

.pillar-table.pro .cell.row-compact {
  min-height: 20px;
  padding: 2px 1px;
  font-size: 10.5px;
  line-height: 1.05;
}

.pillar-table.pro .cell.row-stem,
.pillar-table.pro .cell.row-branch {
  min-height: 25px;
  padding: 2px 1px;
}

.pillar-table.pro .hidden-list {
  gap: 0;
  font-size: 10px;
  line-height: 1.18;
}

.pillar-table.pro .minor-list {
  gap: 0;
  font-size: 11px;
  line-height: 1.2;
}

.hidden-list,
.minor-list {
  display: grid;
  gap: 2px;
  justify-items: center;
  align-content: start;
  color: #6b727c;
  font-size: 12px;
}

.hidden-pair {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  white-space: nowrap;
}

.hidden-god {
  color: #6b727c;
}

.cell.row-hidden,
.cell.row-stars {
  align-items: start;
  align-content: start;
}

.minor-list {
  line-height: 1.45;
}

.minor-star {
  display: block;
  white-space: nowrap;
}

.minor-star.tight {
  width: 3em;
  margin: 0 auto;
}

.minor-star.tight span {
  display: inline-block;
  width: calc(var(--chars) * 1em);
  transform: scaleX(var(--scale));
  transform-origin: left center;
}

.pill-note {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 8px;
  margin: 9px 14px;
  align-items: start;
  color: #3f4650;
  font-size: 15px;
  line-height: 1.45;
}

.pill-note strong {
  display: inline-flex;
  justify-content: center;
  min-width: 70px;
  padding: 3px 8px;
  border: 1px solid #32a8ca;
  border-radius: 999px;
  color: var(--cyan);
  font-size: 13px;
  white-space: nowrap;
}

.relation-panel {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.relation-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px 5px;
  color: #303640;
}

.relation-head b {
  font-size: 15px;
}

.relation-head span {
  color: #7b838d;
  font-size: 11px;
}

.relation-group {
  border-top: 1px solid #eef0f3;
}

.relation-group h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 12px 4px;
  color: #4b5562;
  font-size: 12px;
  font-weight: 700;
}

.relation-group h3 span {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #eef6fb;
  color: var(--blue);
  font-size: 10px;
  text-align: center;
}

.relation-list {
  display: grid;
  gap: 5px;
  max-height: 220px;
  overflow-y: auto;
  padding: 0 10px 8px;
}

.relation-item {
  padding: 6px 8px;
  border: 1px solid #edf0f4;
  border-radius: 6px;
  background: #fbfcfd;
  color: #4b545f;
  font-size: 11px;
  line-height: 1.42;
}

.relation-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.relation-line b {
  color: #242b35;
  font-size: 12px;
}

.relation-line span {
  flex: none;
  color: var(--cyan);
  font-size: 10px;
}

.relation-detail {
  color: #66707c;
}

.relation-empty {
  padding: 6px 2px 8px;
  color: #858c96;
  font-size: 11px;
}

.book-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  padding: 10px 8px 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  cursor: grab;
  touch-action: pan-x;
  user-select: none;
}

.book-strip.is-dragging {
  cursor: grabbing;
}

.book-strip::-webkit-scrollbar {
  display: none;
}

.book {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 108px;
  border: 1px solid #e1ded6;
  background: linear-gradient(90deg, #fffaf0 0 7px, #fff 7px);
  color: #8c764c;
  writing-mode: vertical-rl;
  letter-spacing: 1px;
  line-height: 1.15;
  font-size: 13px;
  cursor: pointer;
}

.book-strip.is-dragging .book {
  cursor: grabbing;
}

.book.selected {
  border-color: var(--blue);
  color: var(--blue-dark);
  background: linear-gradient(90deg, #e8f6ff 0 7px, #fff 7px);
  box-shadow: inset 0 0 0 1px rgba(18, 149, 216, 0.18);
}

.book span {
  pointer-events: none;
}

.classic-text {
  padding: 9px 14px 16px;
  color: #2f353e;
  font-size: 15px;
  line-height: 1.75;
}

.classic-title {
  margin-bottom: 6px;
  color: #202630;
  font-weight: 700;
}

.classic-title span {
  margin-left: 6px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
}

.classic-text p {
  margin: 6px 0;
}

.classic-book {
  white-space: pre-wrap;
  margin: 0;
  color: #2f353e;
  font-size: 15px;
  line-height: 1.75;
}

.classic-book-pdf {
  display: block;
  width: 100%;
  height: 70vh;
  border: 0;
  background: #fff;
}

.classic-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.classic-cell {
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  background: #e7f4fb;
  color: var(--deep-blue);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}

.classic-cell.selected {
  background: var(--blue);
  color: #fff;
}

.classic-layer-name {
  font-weight: 700;
}

.luck-panel,
.gods-panel {
  background: #fff;
  border-top: 1px solid var(--line);
}

.luck-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px 8px;
  color: #555d68;
  font-size: 11px;
  line-height: 1.28;
}

.meta-top {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 26px;
}

.meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 4px;
  align-items: center;
}

.meta-cmd,
.meta-age {
  justify-self: end;
  white-space: nowrap;
  line-height: 1.2;
  color: #3c434d;
}

.meta-cal {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 100%;
  color: #e6a317;
}

.luck-meta .meta-line {
  display: flex;
  flex-wrap: nowrap;
  gap: 0 8px;
  white-space: nowrap;
}

.luck-meta .meta-line > span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.luck-meta .meta-line-top {
  min-width: 0;
}

.luck-meta .meta-line > span.meta-pattern {
  white-space: nowrap;
}

.luck-meta .meta-line-luck {
  flex-wrap: wrap;
  gap: 2px 4px;
  font-size: 10px;
  white-space: normal;
}

.luck-meta .meta-line-luck .meta-date {
  margin-left: auto;
}

.luck-meta .meta-line-palaces {
  flex-wrap: wrap;
  white-space: normal;
}

.luck-meta .meta-term {
  margin: 1px 0 0;
  color: #555d68;
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
}

.chart-read {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 2px;
}

.chart-read > p {
  margin: 0 14px 6px;
  color: #333d47;
  font-size: 14px;
  line-height: 1.45;
}

.month-strength-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 8px;
  margin: 0 14px 6px;
  color: #333d47;
  font-size: 14px;
  line-height: 1.45;
}

.month-strength-main {
  flex: 0 0 auto;
  text-align: left;
  white-space: nowrap;
}

.month-strength-grade {
  flex: 1 1 12em;
  min-width: 0;
  margin-left: auto;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

.shi-mark {
  display: inline-block;
  box-sizing: border-box;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--deep-blue);
  color: #fff;
  font: inherit;
  line-height: 1;
  vertical-align: baseline;
  cursor: pointer;
  appearance: none;
}

.shi-note {
  margin: 0 14px 6px;
  color: #5c626b;
  font-size: 13px;
  line-height: 1.45;
  text-indent: 2em;
}

.chart-read .ratio-row {
  padding-top: 2px;
  padding-bottom: 8px;
}

.chart-read .force-card {
  margin: 0;
  border-radius: 0;
}

.chart-read .force-card .section-title {
  padding-top: 4px;
}

.luck-board {
  border-top: 1px solid var(--line);
  background: #fff;
}

.luck-row,
.luck-year-row {
  display: grid;
  grid-template-columns: 34px repeat(10, minmax(0, 1fr));
}

.luck-year-row {
  border-top: 1px solid var(--line);
}

.luck-year-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
}

.luck-year-row::before {
  content: "流年";
  display: grid;
  place-items: center;
  color: #565e69;
  background: #fafafa;
  font-size: 12px;
  font-weight: 650;
  writing-mode: vertical-rl;
  letter-spacing: 1px;
}

.luck-year {
  display: grid;
  justify-items: center;
  gap: 1px;
  width: 100%;
  margin: 0;
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: #535b66;
  cursor: pointer;
}

.luck-year b {
  color: #8d929a;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.1;
}

.luck-year .gz-pair b {
  font-size: 12px;
}

.luck-year.selected {
  background: #eef8ff;
}

.luck-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  writing-mode: horizontal-tb;
}

.luck-side > span {
  writing-mode: vertical-rl;
  letter-spacing: 1px;
}

.luck-switch {
  position: relative;
  width: 26px;
  height: 15px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d5d8de;
  cursor: pointer;
}

.luck-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
}

.luck-switch.is-on {
  background: var(--blue);
}

.luck-switch.is-on::after {
  left: 13px;
}

.luck-card {
  min-width: 0;
  min-height: 48px;
  border: 0;
  padding: 3px 1px;
  text-align: center;
  border-right: 1px solid var(--line);
  color: #535b66;
  background: #fff;
  font-size: 12px;
  line-height: 1.15;
  cursor: pointer;
}

.luck-card.active {
  background: #fff8df;
}

.luck-card.selected {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
  background: #eef8ff;
}

.luck-card .start,
.luck-card .age {
  color: #8d929a;
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
}

.gz-stack {
  display: inline-grid;
  gap: 1px;
  justify-items: center;
  align-content: center;
  min-width: 0;
  overflow: visible;
  white-space: normal;
}

.gz-pair {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  line-height: 1;
}

.gz-pair b {
  font-size: 14px;
  line-height: 1;
}

.gz-pair em {
  color: #697483;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.flow-table {
  display: grid;
  grid-template-columns: 34px repeat(10, minmax(0, 1fr));
  overflow: hidden;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.flow-table.months {
  grid-template-columns: 34px repeat(12, minmax(0, 1fr));
}

.flow-table.hours {
  grid-template-columns: 34px repeat(12, minmax(0, 1fr));
}

.flow-table.days {
  grid-template-columns: 34px;
  grid-auto-flow: column;
  grid-auto-columns: 42px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.flow-table.days.dragging {
  cursor: grabbing;
}

.flow-table.days::-webkit-scrollbar {
  display: none;
}

.flow-cell {
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  min-width: 0;
  min-height: 43px;
  border: 0;
  padding: 3px 1px;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #535b66;
  background: #fff;
  line-height: 1.35;
  cursor: pointer;
}

.flow-table.months .flow-cell,
.flow-table.hours .flow-cell {
  font-size: 9px;
}

.flow-cell div {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.flow-cell .gz-stack,
.flow-cell .gz-pair,
.luck-card .gz-stack,
.luck-card .gz-pair {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.flow-cell.head {
  place-items: center;
  position: sticky;
  left: 0;
  z-index: 3;
  color: #565e69;
  background: #fafafa;
  font-size: 13px;
  font-stretch: condensed;
  font-weight: 650;
  cursor: default;
  writing-mode: vertical-rl;
  letter-spacing: 0;
  line-height: 1;
}

.luck-row .flow-cell.head {
  min-height: 48px;
  padding: 2px 1px;
  border-bottom: 0;
}

.luck-row .luck-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  writing-mode: horizontal-tb;
  cursor: default;
}

.luck-card .gz-stack,
.flow-cell .gz-stack {
  margin: 1px auto;
}

.flow-cell .small-luck {
  color: #777f8a;
  font-size: 9px;
  line-height: 1.1;
  transform: scale(0.92);
}

.flow-table.years .flow-cell {
  min-height: 56px;
}

.flow-cell.active {
  background: #fff8df;
}

.flow-cell.selected {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
  background: #eef8ff;
}

.god-lines {
  display: grid;
  gap: 7px;
  padding: 8px 14px 15px;
  color: #4e5661;
  font-size: 14px;
  line-height: 1.55;
}

.god-lines h3 {
  margin: 4px 0 0;
  padding-left: 8px;
  border-left: 4px solid var(--blue);
  color: #252b33;
  font-size: 15px;
  line-height: 1.3;
}

.flow-gods-title {
  flex-wrap: wrap;
}

.flow-gods-switches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.flow-gods-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.flow-gods-more {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.flow-gods-more summary {
  cursor: pointer;
  color: #3d4651;
  font-size: 13px;
  font-weight: 700;
}

.god-lines b {
  color: #2e343c;
}

.reading-section {
  margin-top: 8px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.natal-assertion-page {
  min-height: calc(100vh - 47px);
  padding-bottom: 20px;
  background: #f5f6f8;
}

.natal-page-head,
.natal-realization-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.natal-page-head {
  padding: 16px 14px 8px;
  background: #fff;
}

.natal-page-head span,
.natal-realization-section > header span {
  color: #7a818c;
  font-size: 11px;
}

.natal-page-head h1,
.natal-realization-section h2 {
  margin: 2px 0 0;
  color: #222831;
  font-size: 20px;
  line-height: 1.2;
}

.natal-page-head strong,
.natal-realization-section > header strong {
  padding: 4px 8px;
  border-radius: 999px;
  color: #17658a;
  background: #eaf7fc;
  font-size: 12px;
}

.natal-page-principle {
  margin: 0;
  padding: 0 14px 14px;
  color: #66707d;
  background: #fff;
  font-size: 12px;
}

.natal-release-banner {
  display: grid;
  gap: 2px;
  margin: 0 12px 8px;
  border: 1px solid #d7dde5;
  border-radius: 7px;
  padding: 8px 10px;
  color: #4f5965;
  background: #fff;
  font-size: 11px;
}

.natal-release-banner b {
  color: #28323d;
  font-size: 12px;
}

.natal-release-banner.is-shadow {
  border-color: #e4d3a8;
  background: #fffaf0;
}

.natal-release-banner.is-personal {
  border-color: #b7d7c2;
  background: #f3fbf6;
}

.natal-release-banner.is-canary {
  border-color: #a9d6e8;
  background: #effaff;
}

.natal-release-banner.is-stable {
  border-color: #a9ddc1;
  background: #f0fbf5;
}

.natal-release-banner.is-fallback,
.natal-release-banner.is-unavailable {
  border-color: #e5b9b9;
  background: #fff4f4;
}

.natal-chain-error,
.natal-empty-state,
.natal-realization-empty {
  margin: 10px 12px 0;
  border: 1px solid #ead8b5;
  border-radius: 7px;
  padding: 10px 11px;
  color: #74551d;
  background: #fffaf0;
  font-size: 13px;
}

.natal-chain-error {
  display: grid;
  gap: 3px;
}

.natal-demo-fixture-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 12px 0;
  padding: 6px 10px;
  border: 1px dashed #c9b8a0;
  border-radius: 7px;
  background: #faf7f2;
  color: #6b5a45;
  font-size: 12.5px;
  cursor: pointer;
  user-select: none;
}

.natal-demo-fixture-toggle input {
  accent-color: #8a6d3b;
}

.natal-demo-fixture-badge {
  margin-left: 4px;
  color: #8a6d3b;
  font-style: normal;
  font-weight: 600;
}

.natal-assertion-groups {
  display: grid;
  gap: 9px;
  padding: 10px 12px 0;
}

.natal-personal-assertions {
  overflow: hidden;
  margin: 0 12px 10px;
  border: 1px solid #cde4d6;
  border-radius: 9px;
  background: #fff;
}

.natal-personal-assertions > .natal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px 8px;
  border-bottom: 1px solid #edf3ef;
}

.natal-personal-assertions > .natal-section-head span {
  color: #5c8a6c;
  font-size: 11px;
}

.natal-personal-assertions > .natal-section-head h2 {
  margin: 2px 0 0;
  color: #27352d;
  font-size: 17px;
}

.natal-personal-assertions > .natal-section-head strong {
  padding: 4px 8px;
  border-radius: 999px;
  color: #23714d;
  background: #eaf8ef;
  font-size: 11px;
}

.natal-personal-assertions > .natal-page-principle {
  padding: 8px 12px 1px;
  color: #66756c;
  background: transparent;
}

.natal-personal-composition-groups {
  padding: 9px 12px 12px;
}

.natal-personal-composition-card {
  border-color: #cfe5d7;
}

.natal-personal-auxiliaries {
  margin: 0 10px 9px;
  border-top: 1px solid #eef3ef;
  padding-top: 7px;
}

.natal-personal-auxiliaries b {
  color: #52635a;
  font-size: 11px;
}

.natal-personal-auxiliaries ul {
  display: grid;
  gap: 4px;
  margin: 5px 0 0;
  padding-left: 18px;
  color: #53605a;
  font-size: 12px;
  line-height: 1.5;
}

.natal-raw-assertion-audit,
.natal-v1-evidence,
.natal-legacy-topic-audit {
  margin: 0 12px 10px;
}

.natal-domain-section {
  min-width: 0;
}

.natal-domain-section > summary,
.natal-headline-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 6px;
}

.natal-domain-section > summary h2,
.natal-headline-section > header h2 {
  margin: 0;
  color: #303741;
  font-size: 14px;
}

.natal-domain-section > summary span,
.natal-headline-section > header span {
  color: #8a919b;
  font-size: 11px;
}

.natal-headline-section {
  display: grid;
  gap: 8px;
  padding: 10px 12px 14px;
  margin: 0 0 6px;
  background: #fff;
  border-radius: 0 0 10px 10px;
}

/* Section Header & Status Pill */
.natal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  background: #fff;
  border-bottom: 1px solid #edf0f5;
}

.natal-section-header span {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.natal-section-header h2 {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.natal-status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.natal-status-pill.status-ready {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.natal-status-pill.status-logic {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.natal-status-pill.status-pending {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fef08a;
}

/* Stepper UI */
.natal-logic-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin: 10px 12px 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  overflow-x: auto;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  transition: all 0.2s ease;
  min-width: 0;
}

.stepper-item.step-completed,
.stepper-item.step-active {
  opacity: 1;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.stepper-item.step-completed .step-num {
  background: #38bdf8;
  color: #0f172a;
}

.stepper-item.step-active .step-num {
  background: #10b981;
  color: #fff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.step-text {
  display: flex;
  flex-direction: column;
}

.step-title {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.step-desc {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}

.stepper-arrow {
  color: #475569;
  font-size: 12px;
  user-select: none;
}

/* V1 Structured Card Grid */
.natal-v1-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  padding: 12px;
}

.natal-v1-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.natal-v1-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.natal-v1-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

.natal-v1-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.natal-v1-icon {
  font-size: 16px;
}

.natal-v1-card-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.natal-v1-main-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.natal-v1-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.natal-v1-dominant-box {
  background: #f8fafc;
  border-left: 3px solid #0284c7;
  padding: 8px 10px;
  border-radius: 0 6px 6px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.natal-v1-label {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
}

.natal-v1-dominant-box strong {
  font-size: 13px;
  color: #0f172a;
}

.natal-v1-line {
  display: flex;
  gap: 8px;
  line-height: 1.45;
}

.natal-v1-sublabel {
  color: #64748b;
  font-weight: 600;
  min-width: 54px;
  font-size: 11px;
}

.natal-v1-val {
  color: #334155;
  flex: 1;
}

.natal-v1-line.muted .natal-v1-val {
  color: #94a3b8;
}

.natal-v1-boundary-fold {
  margin-top: 4px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 4px;
}

.natal-v1-boundary-fold summary {
  font-size: 10px;
  color: #94a3b8;
  cursor: pointer;
}

.natal-v1-boundary-fold p {
  margin: 4px 0 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

/* Domain Themed Cards & Badges */
.natal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafafa;
}

.natal-domain-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.natal-domain-icon {
  font-size: 16px;
}

.natal-domain-name {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.natal-pill-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 10.5px;
  font-weight: 600;
}

.natal-pill-badge.status-primary {
  background: #dbeafe;
  color: #1d4ed8;
}

.natal-confidence-badge {
  padding: 2px 6px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 10px;
  font-weight: 600;
}

.natal-card-body {
  padding: 12px;
}

.natal-domain-section {
  overflow: hidden;
  border: 1px solid #e1e5ea;
  border-radius: 8px;
  background: #fff;
}

.natal-domain-section > summary {
  cursor: pointer;
  padding: 10px;
  list-style: none;
}

.natal-domain-section > summary::-webkit-details-marker {
  display: none;
}

.natal-domain-section[open] > summary {
  border-bottom: 1px solid #edf0f3;
}

.natal-domain-section > .natal-domain-cards {
  padding: 8px;
}

.natal-domain-category-groups {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.natal-assertion-category-group {
  min-width: 0;
}

.natal-assertion-category-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 2px 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.natal-assertion-category-label small {
  color: #8a919b;
  font-size: 11px;
  font-weight: 400;
}

.natal-assertion-category-group > .natal-domain-cards {
  padding: 0;
}

.natal-domain-cards {
  display: grid;
  gap: 12px;
}

.natal-domain-flat-section {
  margin-top: 4px;
}

.natal-domain-flat-section:first-child {
  margin-top: 0;
}

.natal-domain-flat-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 6px;
  border-bottom: 1px solid #edf0f3;
  margin-bottom: 8px;
}

.natal-domain-flat-header h3 {
  margin: 0;
  color: #303741;
  font-size: 14px;
  font-weight: 700;
  flex: 1;
}

.natal-domain-flat-count {
  color: #8a919b;
  font-size: 11px;
  white-space: nowrap;
}

.natal-direct-card {
  overflow: hidden;
  border: 1px solid #e1e5ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(26, 42, 60, 0.035);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.natal-direct-card:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.natal-direct-card.domain-career,
.natal-direct-card.domain-career_rule {
  border-left: 4px solid #2563eb;
}

.natal-direct-card.domain-finance,
.natal-direct-card.domain-finance_resource {
  border-left: 4px solid #d97706;
}

.natal-direct-card.domain-marriage {
  border-left: 4px solid #e11d48;
}

.natal-direct-card.domain-health {
  border-left: 4px solid #059669;
}

.natal-direct-card.domain-portrait {
  border-left: 4px solid #7c3aed;
}

.natal-action-advice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.advice-item {
  font-size: 12px;
  line-height: 1.5;
}

.advice-do {
  color: #166534;
}

.advice-avoid {
  color: #991b1b;
}

.natal-direct-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 0;
  color: #59626e;
  font-size: 12px;
}

.natal-assertion-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
}

.natal-assertion-badges em {
  padding: 2px 5px;
  border-radius: 999px;
  color: #606a76;
  background: #f0f2f5;
  font-size: 10px;
  font-style: normal;
  line-height: 1.3;
}

.natal-assertion-badges .direction-favorable {
  color: #157454;
  background: #e9f8f2;
}

.natal-assertion-badges .direction-unfavorable {
  color: #a03e3e;
  background: #fff0f0;
}

.natal-direct-conclusion {
  margin: 0;
  padding: 8px 10px 10px;
  color: #20262e;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
}

.natal-direct-meaning {
  margin: -3px 10px 10px;
  padding: 8px 9px;
  border-radius: 6px;
  color: #505a66;
  background: #f6f8fa;
  font-size: 12px;
  line-height: 1.55;
}

.natal-direct-meaning b {
  color: #2d3742;
}

.natal-assertion-trace {
  border-top: 1px solid #edf0f3;
}

.natal-assertion-trace summary,
.natal-not-asserted summary {
  cursor: pointer;
  padding: 7px 10px;
  color: #727b87;
  font-size: 11px;
}

.natal-assertion-trace dl {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0 10px 10px;
}

.natal-assertion-trace dl > div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 7px;
  font-size: 11px;
  line-height: 1.5;
}

.natal-assertion-trace dt {
  color: #8a919b;
}

.natal-assertion-trace dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #5a6470;
}

.natal-feedback-action {
  display: inline-block;
  border: 1px solid #d7dee6;
  border-radius: 5px;
  padding: 4px 10px;
  margin: 6px 10px 10px;
  color: #5b8ba0;
  background: #f8fbfc;
  font-size: 10.5px;
  cursor: pointer;
}

.natal-feedback-action:hover {
  color: #0c709f;
  background: #edf6fa;
  border-color: #a8cde0;
}

.natal-not-asserted {
  margin: 10px 12px 0;
  border: 1px solid #e0e4e9;
  border-radius: 7px;
  background: #fff;
}

.natal-not-asserted ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0 12px 10px 28px;
  color: #68717c;
  font-size: 12px;
}

.natal-not-asserted b {
  color: #434c57;
}

.natal-coverage-groups {
  display: grid;
  gap: 6px;
  padding: 0 8px 8px;
}

.natal-coverage-subject {
  border: 1px solid #edf0f3;
  border-radius: 6px;
  background: #fbfcfd;
}

.natal-coverage-subject > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
}

.natal-coverage-subject > summary span {
  color: #7b8490;
}

.natal-coverage-topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 7px;
  padding: 0 7px 7px;
}

.natal-coverage-topic {
  min-width: 0;
  border-top: 1px solid #e8ecef;
  padding-top: 5px;
}

.natal-coverage-topic h4 {
  margin: 0 0 4px;
  color: #46515d;
  font-size: 12px;
}

.natal-coverage-topic h4 small {
  color: #8a929c;
  font-weight: 400;
}

.natal-coverage-topic ul,
.natal-compiler-diagnostics ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.natal-coverage-topic li {
  display: grid;
  grid-template-columns: minmax(82px, 0.35fr) minmax(0, 1fr);
  gap: 2px 7px;
  padding: 4px 5px;
  border-radius: 4px;
  background: #fff;
  color: #68717c;
  font-size: 11px;
  line-height: 1.45;
}

.natal-coverage-topic li > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.natal-coverage-topic li > small {
  grid-column: 2;
  color: #9a7b65;
  font-size: 10px;
}

.natal-compiler-diagnostics {
  margin: 0 8px 8px;
  border-top: 1px solid #e5e9ed;
}

.natal-compiler-diagnostics ul {
  padding: 0 12px 9px 22px;
  list-style: disc;
}

.natal-realization-section {
  margin: 12px 12px 0;
  border-top: 2px solid #d9e2e9;
  padding-top: 11px;
}

.natal-realization-section > header {
  margin-bottom: 7px;
  padding: 0 2px;
}

.natal-realization-section h2 {
  font-size: 16px;
}

.natal-realization-empty {
  margin: 0;
  border-color: #e1e5ea;
  color: #707986;
  background: #fff;
}

.natal-realization-fold {
  overflow: hidden;
  border: 1px solid #e1e5ea;
  border-radius: 8px;
  background: #fff;
}

.natal-realization-fold > summary {
  cursor: pointer;
  padding: 10px;
  color: #5d6875;
  font-size: 12px;
}

.natal-realization-fold > .natal-domain-cards {
  max-height: 70vh;
  overflow: auto;
  padding: 8px;
  border-top: 1px solid #edf0f3;
}

.realization-card.status-realized {
  border-left: 3px solid #b77817;
}

.natal-watch-signals {
  margin-top: 8px;
  border: 1px solid #e1e5ea;
  border-radius: 7px;
  background: #fff;
}

.natal-watch-signals > summary {
  cursor: pointer;
  padding: 8px 10px;
  color: #6f7884;
  font-size: 12px;
}

.natal-watch-signals > div {
  display: grid;
  gap: 6px;
  padding: 0 8px 8px;
}

.natal-watch-card {
  border-left: 3px solid #aab2bc;
  padding: 7px 9px;
  background: #f7f8fa;
}

.natal-watch-card b,
.natal-watch-card p,
.natal-watch-card small {
  display: block;
  margin: 0;
}

.natal-watch-card b {
  color: #4f5864;
  font-size: 12px;
}

.natal-watch-card p {
  margin-top: 3px;
  color: #646e7a;
  font-size: 12px;
  line-height: 1.5;
}

.natal-watch-card small {
  margin-top: 4px;
  color: #8a929c;
  font-size: 10px;
  line-height: 1.45;
}

.judgement-grid {
  display: grid;
  gap: 8px;
  padding: 8px 14px 18px;
}

.judgement-grid.report-grid {
  gap: 10px;
}

.judge-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

.judge-card h3 {
  margin: 0 0 6px;
  color: #252b33;
  font-size: 15px;
}

.judge-card p {
  margin: 0;
  color: #555d68;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

.judge-card.structured {
  display: grid;
  gap: 8px;
}

.assertion-report {
  display: grid;
  gap: 12px;
  padding: 0;
  overflow: hidden;
  border-color: #dfe5ec;
}

.assertion-hero {
  display: grid;
  gap: 10px;
  padding: 13px 13px 12px;
  background: linear-gradient(180deg, #fffaf0 0%, #fff 100%);
  border-bottom: 1px solid #edf0f3;
}

.report-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #6d7480;
  font-size: 12px;
  line-height: 1.2;
}

.report-kicker span {
  font-weight: 700;
  color: #303743;
}

.report-kicker em {
  min-width: 0;
  padding: 3px 7px;
  border-radius: 999px;
  color: #8a5a00;
  background: #fff0c7;
  font-style: normal;
  font-weight: 700;
}

.report-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.report-title-row strong {
  padding: 5px 9px;
  border-radius: 6px;
  color: #fff;
  background: #b26a00;
  font-size: 18px;
  line-height: 1.2;
}

.report-title-row span {
  color: #4d5663;
  font-size: 15px;
  font-weight: 700;
}

.report-meta {
  display: grid;
  gap: 6px;
}

.report-meta div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.report-meta b {
  color: #8a5a00;
  font-size: 12px;
  line-height: 1.5;
}

.report-meta span {
  min-width: 0;
  color: #555f6d;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.report-summary {
  margin: 1px 0 0;
  padding-top: 10px;
  border-top: 1px solid #eadfc8;
  color: #222831;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
}

.report-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
}

.report-subhead h3 {
  margin: 0;
  color: #252b33;
  font-size: 14px;
}

.report-subhead span {
  color: #8b929c;
  font-size: 12px;
}

.assertion-path {
  display: grid;
  gap: 8px;
}

.assertion-path ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 12px;
  list-style: none;
}

.assertion-path li {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 34px;
  gap: 8px;
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid #edf1f5;
}

.assertion-path li:first-child {
  border-top: 0;
}

.path-index {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #607080;
  background: #eef3f7;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.path-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.path-copy b {
  color: #26313d;
  font-size: 13px;
  line-height: 1.25;
}

.path-copy p {
  margin: 0;
  color: #586171;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.path-short {
  justify-self: end;
  align-self: start;
  padding-top: 3px;
  color: #9aa2ad;
  font-size: 12px;
  font-weight: 700;
}

.assertion-path li.is-trigger .path-index {
  color: #fff;
  background: #b26a00;
}

.assertion-path li.is-trigger .path-copy b,
.assertion-path li.is-final .path-copy b {
  color: #9a5c00;
}

.assertion-path li.is-final {
  border-bottom: 1px solid #edf1f5;
}

.assertion-actions {
  display: grid;
  gap: 8px;
  padding: 0 12px;
}

.action-panel {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 6px;
  background: #fbfcfd;
  border: 1px solid #e9eef3;
  border-left-width: 4px;
}

.action-panel.can-do {
  border-left-color: #22986f;
}

.action-panel.avoid-do {
  border-left-color: #d34a4a;
}

.action-panel h3 {
  margin: 0;
  color: #252b33;
  font-size: 14px;
}

.action-panel ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 17px;
  color: #586171;
  font-size: 13px;
  line-height: 1.55;
}

.action-panel li {
  padding-left: 1px;
}

.assertion-more {
  margin: 0 12px 12px;
  border-top: 1px solid #edf1f5;
}

.assertion-more summary,
.judge-details summary {
  cursor: pointer;
  color: #4e5966;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.assertion-more summary {
  padding: 10px 0 0;
}

.assertion-more-body {
  display: grid;
  gap: 7px;
  padding-top: 8px;
}

.assertion-more-body p {
  margin: 0;
  color: #5b6470;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.assertion-more-body p b {
  margin-right: 6px;
  color: #2f3742;
}

.professional-chain {
  color: #707986 !important;
  font-size: 12px !important;
}

.judge-details {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.judge-details summary {
  display: grid;
  gap: 3px;
  padding: 10px;
  list-style-position: inside;
}

.judge-details summary span {
  color: #252b33;
}

.judge-details summary small {
  color: #8b929c;
  font-size: 12px;
  font-weight: 400;
}

.diagnostic-grid {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.diagnostic-card {
  padding: 8px;
  background: #fbfcfe;
}

.assertion-block {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid #e1e6ee;
  border-radius: 6px;
  background: #fbfcfe;
}

.assertion-block.archive {
  background: #fff;
}

.assertion-block.node {
  margin-top: 0;
  background: #fff;
}

.assertion-block.assertion-debug {
  background: #fff;
}

.assertion-head {
  color: #202630;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

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

.assertion-report .structure-fields {
  padding: 10px 12px 12px;
}

.assertion-field {
  min-width: 0;
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 6px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #edf1f5;
}

.assertion-field.wide {
  grid-column: 1 / -1;
}

.assertion-field.reasoning-step {
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  background: #f7fafc;
  border-color: #dce6ef;
}

.assertion-field.reasoning-step b {
  color: #1f4b6e;
}

.assertion-field.reasoning-final {
  background: #fffaf1;
  border-color: #ead9b5;
}

.assertion-field b {
  color: #2d3440;
  font-size: 12px;
  line-height: 1.2;
}

.assertion-field span {
  color: #586171;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.natal-marriage-card {
  display: grid;
  gap: 12px;
  padding: 0;
  overflow: hidden;
  border-color: #d9e2eb;
}

.natal-marriage-card.is-boundary {
  border-color: #e2d4b8;
}

.natal-learning-career-card {
  border-color: #d7e4dd;
}

.natal-learning-career-card.is-boundary {
  border-color: #e2d4b8;
}

.marriage-head {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: #f7fafc;
  border-bottom: 1px solid #e8eef4;
}

.natal-marriage-card.is-boundary .marriage-head {
  background: #fff9ed;
}

.natal-learning-career-card .marriage-head {
  background: #f6fbf8;
}

.natal-learning-career-card.is-boundary .marriage-head {
  background: #fff9ed;
}

.marriage-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #667381;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.marriage-head h3 {
  margin: 0;
  color: #202833;
  font-size: 17px;
  line-height: 1.25;
}

.marriage-decision {
  min-width: 0;
  color: #25313d;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.marriage-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px;
}

.marriage-metric {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 8px;
  border: 1px solid #e5ebf1;
  border-radius: 6px;
  background: #fff;
}

.marriage-metric b {
  color: #2d3743;
  font-size: 12px;
  line-height: 1.2;
}

.marriage-metric span {
  min-width: 0;
  color: #586271;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.marriage-metric.is-risk {
  border-color: #efd0d0;
  background: #fff8f8;
}

.marriage-metric.is-good {
  border-color: #cce6da;
  background: #f7fcf9;
}

.marriage-metric.is-boundary {
  border-color: #eadab8;
  background: #fffaf0;
}

.marriage-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px;
}

.marriage-section {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid #edf1f5;
}

.natal-marriage-card > .marriage-section {
  margin: 0 12px;
}

.marriage-section h4 {
  margin: 0;
  color: #252c35;
  font-size: 14px;
  line-height: 1.3;
}

.marriage-section p,
.marriage-empty,
.marriage-boundary-note {
  margin: 0;
  color: #586171;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.marriage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.marriage-chips span {
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 999px;
  color: #4b5968;
  background: #eef3f7;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.marriage-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 17px;
  color: #586171;
  font-size: 13px;
  line-height: 1.55;
}

.marriage-list li {
  padding-left: 1px;
  overflow-wrap: anywhere;
}

.marriage-candidates {
  display: grid;
  gap: 8px;
}

.marriage-candidate-row {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid #edf1f5;
}

.marriage-candidate-row:first-child {
  border-top: 0;
}

.marriage-candidate-row.is-primary {
  padding-left: 8px;
  border-left: 4px solid #2f855a;
}

.marriage-candidate-row.is-empty {
  padding: 8px 0 0;
}

.marriage-candidate-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.marriage-candidate-main b {
  color: #24303b;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.marriage-candidate-main span {
  color: #697483;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.marriage-boundary {
  margin: 0 12px 12px;
  padding-top: 10px;
  border-top: 1px solid #edf1f5;
}

.marriage-boundary summary {
  cursor: pointer;
  color: #4e5966;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.marriage-boundary .marriage-list,
.marriage-boundary .marriage-empty {
  margin-top: 8px;
}

.natal-structure-card {
  border-color: #e5e9f0;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.natal-structure-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 14px 6px;
}

.natal-structure-tabs {
  display: flex;
  flex: 1;
  min-width: 0;
  background: #f1f2f5;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.natal-structure-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  color: #333d47;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.natal-structure-tab {
  flex: 1;
  min-width: 0;
  min-height: 34px;
  border: none;
  border-radius: 8px;
  color: #333d47;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.natal-structure-tab.is-active {
  background: #ffffff;
  color: #111827;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.natal-structure-canvas {
  min-width: 0;
  padding: 4px 6px 6px;
  overflow: hidden;
}

.natal-structure-panel {
  display: none;
}

.natal-structure-panel.is-active {
  display: block;
}

.ganzhi-map-svg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.nsm-node-circle {
  fill: #ffffff;
  stroke: #d0d4dc;
  stroke-width: 1;
}

.nsm-node-text {
  fill: #4e5664;
  font-size: 13px;
  font-weight: 500;
  text-anchor: middle;
  dominant-baseline: central;
}

.nsm-capsule-rect {
  fill: #ffffff;
  stroke: #d0d4dc;
  stroke-width: 1;
  rx: 12px;
}

.nsm-capsule-text {
  fill: #4e5664;
  font-size: 12px;
  font-weight: 500;
  text-anchor: middle;
  dominant-baseline: central;
}

.nsm-edge-line {
  stroke: #e2e6ec;
  stroke-width: 1;
}

.nsm-edge-text {
  fill: #606a78;
  font-size: 12px;
  font-weight: 500;
  text-anchor: middle;
  dominant-baseline: central;
  paint-order: stroke fill;
  stroke: #ffffff;
  stroke-width: 6px;
  stroke-linejoin: round;
}

.nsm-edge-text.is-fuyin {
  fill: #a87834;
  font-weight: 600;
}

.nsm-pillar-head {
  fill: #737882;
  font-size: 14px;
  font-weight: 400;
  text-anchor: middle;
  dominant-baseline: central;
}

.nsm-pillar-stem,
.nsm-pillar-branch {
  font-size: 32px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.nsm-pillar-stem.nsm-el-wood,
.nsm-pillar-branch.nsm-el-wood {
  fill: #2ea44f;
}

.nsm-pillar-stem.nsm-el-fire,
.nsm-pillar-branch.nsm-el-fire {
  fill: #d9363e;
}

.nsm-pillar-stem.nsm-el-earth,
.nsm-pillar-branch.nsm-el-earth {
  fill: #8c6843;
}

.nsm-pillar-stem.nsm-el-metal,
.nsm-pillar-branch.nsm-el-metal {
  fill: #c98d0c;
}

.nsm-pillar-stem.nsm-el-water,
.nsm-pillar-branch.nsm-el-water {
  fill: #1976d2;
}

.nsm-pillar-vertical {
  fill: #8c6843;
  font-size: 12px;
  font-weight: 500;
  text-anchor: middle;
  dominant-baseline: central;
}

.natal-structure-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 4px 14px 10px;
}

.ganzhi-settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: #555e6d;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.ganzhi-settings-btn:hover {
  color: #1a202c;
  background: #f1f2f5;
}

.ganzhi-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ganzhi-modal-overlay[hidden] {
  display: none;
}

.ganzhi-modal-dialog {
  background: #ffffff;
  border-radius: 14px;
  width: max-content;
  max-width: min(100%, 300px);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.ganzhi-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px 10px;
  border-bottom: 1px solid #f0f0f2;
}

.ganzhi-modal-header h4 {
  margin: 0;
  font-size: 16px;
  color: #1a202c;
}

.ganzhi-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #8c939f;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.ganzhi-modal-body {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ganzhi-setting-group h5 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #718096;
  font-weight: 600;
}

.ganzhi-setting-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ganzhi-setting-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #2d3748;
  cursor: pointer;
}

.ganzhi-setting-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #075f87;
  cursor: pointer;
}

.ganzhi-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #f0f0f2;
  background: #fbfbfd;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

.ganzhi-btn-secondary {
  background: #edf2f7;
  border: 1px solid #e2e8f0;
  color: #4a5568;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.ganzhi-btn-primary {
  background: #075f87;
  border: none;
  color: #ffffff;
  padding: 6px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* Circulation (流通) View Styles */
.flow-view-container {
  padding: 6px 8px 14px;
}

.flow-svg-card {
  background: #fbfcfd;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  padding: 8px 4px;
  margin-bottom: 12px;
}

.flow-diagram-svg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.flow-col-label {
  fill: #64748b;
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

.flow-col-gz {
  fill: #1e293b;
  font-size: 15px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

.flow-stem-god,
.flow-branch-god {
  fill: #64748b;
  font-size: 11px;
  font-weight: 500;
  text-anchor: middle;
  dominant-baseline: central;
}

.flow-circle {
  stroke-width: 1.6;
}

.flow-node-char {
  fill: #1e293b;
  font-size: 21px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.flow-link-gen {
  stroke: #10b981;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.flow-link-block {
  stroke: #f59e0b;
  stroke-width: 1.6;
  fill: none;
  stroke-dasharray: 4 3;
  stroke-linecap: round;
}

.flow-badge-bg-gen {
  fill: #10b981;
}

.flow-badge-text-gen {
  fill: #ffffff;
  font-size: 10px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

.flow-badge-bg-block {
  fill: #f59e0b;
}

.flow-badge-text-block {
  fill: #ffffff;
  font-size: 10px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

.flow-summary-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flow-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.flow-rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  border-radius: 6px;
  padding: 4px 10px;
  font-weight: 600;
}

.flow-rating-pill.is-excellent {
  color: #047857;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
}

.flow-rating-pill.is-good {
  color: #065f46;
  background: #e6f4ea;
  border: 1px solid #bbf7d0;
}

.flow-rating-pill.is-warning {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
}

.flow-rating-pill.is-danger {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.flow-source-sink-pills {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #64748b;
}

.flow-source-sink-pills b {
  color: #0f172a;
}

.flow-paths-box {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  padding: 10px 12px;
}

.flow-paths-header {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 8px;
}

.flow-chips-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flow-path-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.flow-path-chip.is-gen {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #dcfce7;
}

.flow-path-chip.is-block {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fef3c7;
}

.flow-path-chip.is-neutral {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.flow-path-chip b {
  font-weight: 600;
}

.flow-path-chip i {
  font-style: normal;
  font-size: 11px;
  opacity: 0.85;
}

.flow-principle-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.flow-principle-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #087bad;
  margin-bottom: 6px;
}

.flow-principle-desc {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.65;
  color: #475569;
}

.flow-diagnosis-box {
  background: #ffffff;
  border-left: 3px solid #087bad;
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  line-height: 1.65;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.natal-structure-map {
  display: block;
  width: 100%;
  height: auto;
}

.pro-structure-card {
  margin-top: 8px;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

.pro-structure-card .marriage-head {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  padding: 9px 12px;
}

.pro-structure-card .marriage-head h3 {
  font-size: 15px;
}

.pro-structure-card .marriage-decision {
  font-size: 13px;
  line-height: 1.45;
}

.pro-structure-card .natal-structure-tabs {
  padding: 8px 10px 0;
}

.pro-structure-card .natal-structure-tab {
  min-height: 30px;
  font-size: 12px;
}

.pro-structure-card .natal-structure-canvas {
  padding: 3px 8px 10px;
}

.natal-structure-map text {
  font-family: inherit;
  text-anchor: middle;
  letter-spacing: 0;
}

.nsm-layer {
  display: none;
}

.nsm-layer.is-active {
  display: block;
}

.nsm-axis,
.nsm-column-line {
  stroke: #d9e0e8;
  stroke-width: 1;
}

.nsm-column-line {
  stroke-dasharray: 3 5;
}

.nsm-pillar-label {
  fill: #6d7784;
  font-size: 12px;
  font-weight: 700;
}

.nsm-gz {
  fill: #222a34;
  font-size: 15px;
  font-weight: 700;
}

.nsm-node circle {
  stroke-width: 1.4;
}

.nsm-char {
  fill: #18212b;
  font-size: 25px;
  font-weight: 700;
}

.nsm-node-note {
  fill: #687483;
  font-size: 10px;
  font-weight: 700;
}

.nsm-el-wood circle {
  fill: rgba(34, 152, 111, 0.12);
  stroke: rgba(34, 152, 111, 0.62);
}

.nsm-el-fire circle {
  fill: rgba(239, 32, 47, 0.11);
  stroke: rgba(239, 32, 47, 0.58);
}

.nsm-el-earth circle {
  fill: rgba(141, 113, 64, 0.12);
  stroke: rgba(141, 113, 64, 0.6);
}

.nsm-el-metal circle {
  fill: rgba(243, 155, 33, 0.14);
  stroke: rgba(207, 123, 16, 0.62);
}

.nsm-el-water circle {
  fill: rgba(47, 134, 223, 0.12);
  stroke: rgba(47, 134, 223, 0.62);
}

.nsm-relation-edge,
.nsm-flow-guide,
.nsm-flow-cycle,
.nsm-kin-line {
  color: #74808d;
}

.nsm-relation-edge.is-risk {
  color: #a65656;
}

.nsm-relation-edge.is-bind {
  color: #2d7b61;
}

.nsm-link,
.nsm-flow-guide,
.nsm-flow-cycle,
.nsm-palace-guide,
.nsm-kin-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
}

.nsm-flow-guide,
.nsm-palace-guide,
.nsm-kin-line {
  stroke-opacity: 0.5;
}

.nsm-dot,
.nsm-kin-dot {
  fill: currentColor;
  stroke: #fff;
  stroke-width: 1;
}

.nsm-dot.target {
  r: 3.6px;
}

.nsm-edge-label,
.nsm-impact-label {
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
  fill: currentColor;
  font-size: 11px;
  font-weight: 700;
}

.nsm-impact-label {
  font-size: 10px;
}

.nsm-layer-note {
  fill: #7c8794;
  font-size: 11px;
  font-weight: 700;
}

.nsm-flow-cycle {
  color: #3e7b93;
  stroke-width: 1;
  stroke-opacity: 0.75;
}

.nsm-flow-guide {
  color: #80909d;
  stroke-dasharray: 4 4;
}

.nsm-flow-element circle {
  stroke-width: 1.2;
}

.nsm-flow-element.is-missing circle {
  fill: #f3f5f7;
  stroke: #cfd7df;
}

.nsm-flow-element-name {
  fill: #25313d;
  font-size: 12px;
  font-weight: 700;
}

.nsm-flow-element-value {
  fill: #747f8c;
  font-size: 10px;
  font-weight: 700;
}

.nsm-palace-col rect {
  fill: #fbfcfd;
  stroke: #dce4ec;
  stroke-width: 1;
}

.nsm-palace-col.is-day rect {
  fill: #fff9ee;
  stroke: #e3c88f;
}

.nsm-palace-guide {
  color: #9aa5b1;
}

.nsm-palace-main {
  fill: #26313d;
  font-size: 12px;
  font-weight: 700;
}

.nsm-palace-sub {
  fill: #687483;
  font-size: 10px;
  font-weight: 700;
}

.nsm-kin-ring {
  fill: none;
  stroke: #d8e1e9;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.nsm-kin-role rect {
  fill: #fff;
  stroke: #d9e2ea;
  stroke-width: 1;
}

.nsm-kin-role.is-present {
  color: #2d7b61;
}

.nsm-kin-role.is-missing {
  color: #8a96a3;
}

.nsm-kin-role.is-present rect {
  fill: #f6fbf8;
  stroke: #b9dbc9;
}

.nsm-kin-role.is-missing rect {
  fill: #f7f8fa;
  stroke: #d7dee6;
}

.nsm-kin-main {
  fill: #25313d;
  font-size: 10px;
  font-weight: 700;
}

.nsm-kin-sub {
  fill: #687483;
  font-size: 9px;
  font-weight: 700;
}

@media (max-width: 520px) {
  .assertion-fields {
    grid-template-columns: 1fr;
  }

  .assertion-field.reasoning-step {
    grid-template-columns: 1fr;
  }

  .marriage-head,
  .marriage-metrics,
  .marriage-two-col {
    grid-template-columns: 1fr;
  }
}

.case-library {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.library-note,
.external-case-card,
.case-empty {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.library-note {
  display: grid;
  gap: 4px;
  padding: 10px;
  color: #555d68;
  font-size: 13px;
  line-height: 1.5;
}

.library-note b {
  color: #252b33;
  font-size: 15px;
}

.external-case-card {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.external-case-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}

.external-case-head h3 {
  margin: 0;
  color: #202630;
  font-size: 16px;
}

.external-case-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.case-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #8a5a00;
  background: #fff6df;
  font-size: 12px;
  white-space: nowrap;
}

.case-status.safe {
  color: #18724f;
  background: #eaf8f1;
}

.case-birth {
  padding: 7px 9px;
  border-radius: 6px;
  color: #43505c;
  background: #f7f8fa;
  font-size: 13px;
  line-height: 1.45;
}

.case-chart {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  align-items: center;
}

.case-chart span {
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe8ef;
  border-radius: 6px;
  color: var(--blue-dark);
  background: #f3fbff;
  font-weight: 700;
  font-size: 14px;
}

.case-chart em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.case-chart small {
  grid-column: 1 / -1;
  color: #6b727c;
  font-size: 12px;
}

.case-chart.missing {
  display: block;
  padding: 8px 9px;
  color: #8a5a00;
  background: #fff6df;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.theory-match {
  display: grid;
  gap: 5px;
  padding: 9px;
  border-left: 3px solid var(--blue);
  background: #f7fbfe;
  color: #3f4650;
  font-size: 13px;
  line-height: 1.5;
}

.theory-match ul,
.archive-list ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.theory-match li,
.archive-list li {
  margin: 3px 0;
}

.event-archive {
  display: grid;
  gap: 8px;
}

.event-archive h4 {
  margin: 0;
  color: #252b33;
  font-size: 15px;
}

.event-chain {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.event-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  color: #252b33;
  font-size: 13px;
  font-weight: 700;
}

.event-head em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.archive-list {
  color: #555d68;
  font-size: 12px;
  line-height: 1.5;
}

.archive-list b {
  color: #303842;
}

.archive-list p {
  margin: 0;
}

.archive-details {
  border-top: 1px solid #e5eaf1;
  padding-top: 5px;
}

.archive-details summary {
  cursor: pointer;
  color: #303842;
  font-size: 12px;
  font-weight: 700;
  list-style-position: inside;
}

.archive-details .archive-list {
  display: grid;
  gap: 4px;
  margin-top: 5px;
}

.case-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.case-actions .secondary-action {
  margin: 0;
  padding: 0 12px;
  border-radius: 6px;
}

.case-actions .secondary-action:disabled {
  color: #9aa1aa;
  background: #f3f4f6;
  border-color: #dfe3e8;
  cursor: not-allowed;
}

.case-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
    padding: 0;
  }

  .phone {
    max-width: none;
    min-height: auto;
    border: 0;
    box-shadow: none;
  }
}

@media (max-width: 380px) {
  .profile-top {
    grid-template-columns: 46px 1fr auto;
    gap: 9px;
  }

  .avatar {
    width: 44px;
    height: 44px;
  }

  .pillar-table {
    grid-template-columns: 48px repeat(4, minmax(0, 1fr));
  }

  .pillar-table.pro {
    grid-template-columns: 30px repeat(9, minmax(0, 1fr));
    font-size: 10.5px;
  }

  .pillar-table.pro .hidden-list {
    font-size: 9.5px;
  }

  .cell {
    padding-left: 2px;
    padding-right: 2px;
  }
}

.natal-personal-composition-card.is-primary-focus {
  border-left: 4px solid #d97706;
  background: #fffcf8;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.08);
}

.natal-personal-composition-card.is-primary-focus .natal-direct-conclusion {
  color: #1c1917;
  font-weight: 700;
}

.natal-domain-section {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 8px;
  overflow: hidden;
}

.natal-domain-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.natal-domain-section summary span {
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
}

.natal-domain-section[open] summary {
  border-bottom: 1px solid #edf2f7;
}

.natal-domain-section .natal-domain-cards {
  padding: 10px;
}

.natal-audit-section {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-strong, #e1e6eb);
}

.natal-audit-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.natal-audit-section-header h2 {
  margin: 0;
  color: #2b333e;
  font-size: 16px;
  font-weight: 700;
}

.natal-audit-section-header span {
  color: #727b86;
  font-size: 12px;
}

.natal-v1-boundary-box {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 4px;
  color: #5a6472;
  background: #f4f6f8;
  font-size: 12px;
  line-height: 1.4;
}

.natal-v1-boundary-box .natal-v1-sublabel {
  font-weight: 700;
  color: #3b4450;
  margin-right: 6px;
}

.natal-compiler-diagnostics-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.natal-compiler-diagnostics-box h4 {
  margin: 0 0 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.natal-compiler-diagnostics-box ul {
  margin: 0;
  padding-left: 18px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

/* ========================================================
   全新通俗易懂【流通】视图样式 (五行周流循环与能量卡片)
   ======================================================== */
.flow-clear-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 2px;
  font-family: inherit;
}

/* 顶部大白话总结横幅与评分 */
.flow-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.flow-hero-banner.level-high {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #6ee7b7;
}

.flow-hero-banner.level-good {
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
  border-color: #bae6fd;
}

.flow-hero-banner.level-medium {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
}

.flow-hero-banner.level-low {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #fed7aa;
}

.flow-hero-left {
  flex: 1;
  min-width: 0;
}

.flow-hero-subtitle {
  display: block;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.flow-hero-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.flow-hero-summary {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}

.flow-hero-score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  min-width: 60px;
}

.flow-score-num {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: #059669;
  font-variant-numeric: tabular-nums;
}

.flow-hero-banner.level-medium .flow-score-num {
  color: #d97706;
}

.flow-hero-banner.level-low .flow-score-num {
  color: #dc2626;
}

.flow-score-label {
  font-size: 10px;
  color: #64748b;
  margin-top: 3px;
  font-weight: 600;
}

/* 核心图表卡片 */
.flow-chart-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.flow-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.flow-chart-header h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #1e293b;
}

.flow-chart-header-score {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flow-header-score-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.flow-header-score-num {
  font-size: 17px;
  font-weight: 800;
  color: #dc2626;
  line-height: 1;
}

.flow-header-score-num.level-high {
  color: #16a34a;
}

.flow-header-score-num.level-mid {
  color: #d97706;
}

.flow-header-score-num.level-low {
  color: #dc2626;
}

.flow-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: #64748b;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-line {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.legend-line.green {
  background: #10b981;
}

.legend-line.amber-dash {
  background: repeating-linear-gradient(90deg, #f59e0b, #f59e0b 3px, transparent 3px, transparent 6px);
  height: 2px;
}

.legend-line.dashed {
  background: repeating-linear-gradient(90deg, #94a3b8, #94a3b8 3px, transparent 3px, transparent 6px);
  height: 2px;
}

.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-dot.green {
  background: #059669;
}

.legend-dot.blue {
  background: #2563eb;
}

.legend-dot.purple {
  background: #3b82f6;
  border: 1px solid #1d4ed8;
}

.flow-ring-svg-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px 0;
}

.flow-ring-svg {
  width: 100%;
  max-width: 440px;
  height: auto;
  overflow: visible;
}

/* 能量关键驿站统计 (4列) */
.flow-key-stations {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  width: 100%;
  box-sizing: border-box;
}

.station-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 2px;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.station-col.is-source {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
}

.station-col.is-bridge {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.station-col.is-control {
  background: #fffbeb;
  border: 1px solid #fef3c7;
}

.station-col.is-sink {
  background: #eff6ff;
  border: 1px solid #dbeafe;
}

.station-label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 2px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-val {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-tip {
  font-size: 8.5px;
  color: #94a3b8;
  margin-top: 3px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

@media (max-width: 380px) {
  .flow-key-stations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .station-col {
    padding: 8px 4px;
  }
  .station-tip {
    font-size: 9.5px;
    letter-spacing: normal;
  }
}

/* 通俗路径与阻隔卡片组 */
.flow-cards-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.flow-section-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flow-block-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.title-bar {
  width: 3px;
  height: 13px;
  border-radius: 2px;
}

.title-bar.green {
  background: #10b981;
}

.title-bar.amber {
  background: #f59e0b;
}

.flow-card-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flow-simple-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.flow-simple-card.is-success {
  background: #fcfdfd;
  border-left: 3px solid #10b981;
}

.flow-simple-card.is-control {
  background: #fffdfa;
  border-left: 3px solid #f59e0b;
}

.flow-simple-card.is-warning {
  background: #fffdfa;
  border-left: 3px solid #f59e0b;
}

.flow-simple-card.is-danger {
  background: #fefcfc;
  border-left: 3px solid #ef4444;
}

.flow-simple-card.is-clean {
  background: #f8fafc;
  border-left: 3px solid #64748b;
}

.flow-card-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.flow-card-badge.is-green {
  color: #065f46;
  background: #d1fae5;
}

.flow-card-badge.is-amber {
  color: #92400e;
  background: #fef3c7;
}

.flow-card-badge.is-red {
  color: #991b1b;
  background: #fee2e2;
}

.flow-card-main {
  flex: 1;
  min-width: 0;
}

.flow-card-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.flow-card-desc {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
  margin-top: 1px;
}

/* 八字五行流通要义卡片 */
.flow-principle-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}

.flow-principle-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: #0369a1;
  font-size: 12px;
}

.flow-principle-content {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #334155;
  text-align: justify;
}

/* ==========================================================================
   八字宫位解析视图样式 (Palace View)
   ========================================================================== */
.palace-view-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.palace-chart-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.palace-chart-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.palace-chart-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.palace-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.palace-legend-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
}



.palace-svg-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px 0;
}

.palace-svg {
  width: 100%;
  max-width: 440px;
  height: auto;
  overflow: visible;
}

.palace-fused-svg {
  max-width: 440px;
}

/* 顶部时间胶囊 */
.palace-time-pill {
  fill: #eff6ff;
  stroke: #bfdbfe;
  stroke-width: 1px;
}

.palace-time-text {
  text-anchor: middle;
  font-size: 9.5px;
  font-weight: 700;
  fill: #1d4ed8;
}

.palace-svg-col.is-day-pillar .palace-time-pill {
  fill: #fef3c7;
  stroke: #fde68a;
}

.palace-svg-col.is-day-pillar .palace-time-text {
  fill: #92400e;
}

.palace-svg-pillar-label {
  text-anchor: middle;
  font-size: 11.5px;
  font-weight: 700;
  fill: #64748b;
}

.palace-svg-gz {
  text-anchor: middle;
  font-size: 14.5px;
  font-weight: 800;
  fill: #0f172a;
}

.palace-svg-axis-line {
  stroke: #e2e8f0;
  stroke-width: 1.2;
  stroke-dasharray: 3,3;
}

.palace-svg-god {
  text-anchor: middle;
  font-size: 10px;
  font-weight: 600;
  fill: #64748b;
}

.palace-svg-col.is-day-pillar .palace-svg-pillar-label {
  fill: #d97706;
}

.palace-svg-col.is-day-pillar .palace-svg-axis-line {
  stroke: #fcd34d;
}

.palace-svg-node {
  cursor: default;
}

.palace-node-circle {
  stroke-width: 2.2px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.palace-node-text {
  text-anchor: middle;
  font-size: 15.5px;
  font-weight: 800;
  fill: #1e293b;
}

/* 融合卡片 (六亲·空间·身体) */
.palace-fused-card {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.03));
}

.palace-card-bg {
  fill: #ffffff;
  stroke: #e2e8f0;
  stroke-width: 1px;
}

.palace-svg-col.is-day-pillar .palace-card-bg {
  fill: #fffdf9;
  stroke: #f59e0b;
  stroke-width: 1.5px;
}

.palace-field-label {
  font-size: 8.5px;
  font-weight: 700;
  fill: #94a3b8;
}

.palace-field-val {
  font-size: 9.5px;
  font-weight: 700;
  fill: #334155;
}

.palace-field-val.is-highlight {
  fill: #d97706;
  font-weight: 800;
}

/* 宫位推断原则说明卡 */
.palace-principle-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.palace-principle-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: #1d4ed8;
  font-size: 12px;
}

.palace-principle-content {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #334155;
  text-align: justify;
}

/* ==========================================================================
   八字六亲推导视图样式 (Kinship View) - 干支各十神细化对照六亲
   ========================================================================== */
.kin-view-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.kin-chart-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.kin-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.kin-chart-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kin-chart-header h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #1e293b;
}

.kin-chart-subtitle {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 500;
}

.kin-gender-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.kin-gender-badge.is-female {
  background: #fdf2f8;
  color: #be185d;
  border: 1px solid #fbcfe8;
}

.kin-gender-badge.is-male {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* 视觉图例说明条 */
.kin-visual-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 4px 0 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-box {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-box.dewei {
  background: #dcfce7;
  border: 1.5px solid #16a34a;
}

.legend-box.yigong {
  background: #fff7ed;
  border: 1.5px solid #ea580c;
}

.legend-box.self {
  background: #fffbeb;
  border: 1.5px solid #d97706;
}

.legend-text {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}

.kin-svg-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2px 0 6px;
}

.kin-svg.kin-matrix-svg {
  width: 100%;
  max-width: 440px;
  height: auto;
  overflow: visible;
}

/* SVG 柱位内部细化样式 */
.kin-col-header-bg {
  fill: #f8fafc;
  stroke: #cbd5e1;
  stroke-width: 1.2;
}

.kin-col-header-bg.is-day {
  fill: #fffdf7;
  stroke: #f59e0b;
  stroke-width: 1.8;
}

.kin-col-header-text {
  font-size: 11px;
  font-weight: 800;
  fill: #334155;
  text-anchor: middle;
}

.kin-col-header-text.is-day {
  fill: #b45309;
}

.kin-palace-label {
  font-size: 9px;
  font-weight: 700;
  fill: #64748b;
  text-anchor: middle;
}

.kin-palace-label.is-day {
  fill: #ea580c;
}

/* 四柱极简排布样式 (天干上星位下宫位，地支上宫位下星位) */
.kin-clean-axis {
  stroke: #e2e8f0;
  stroke-width: 1.2;
  stroke-dasharray: 2, 2;
}

.kin-clean-col.is-day .kin-clean-axis {
  stroke: #fde68a;
}

.kin-clean-pillar-lbl {
  font-size: 11.5px;
  font-weight: 800;
  fill: #0f172a; /* 默认黑色 */
  text-anchor: middle;
}

.kin-clean-gz-lbl {
  font-size: 14.5px;
  font-weight: 800;
  fill: #0f172a;
  text-anchor: middle;
}

.kin-clean-gz-lbl.is-day {
  fill: #b45309;
}

/* 十神 ➔ 星位 胶囊小标 (天干上方 / 地支下方) */
.kin-clean-tag-bg {
  fill: #f8fafc;
  stroke: #e2e8f0;
  stroke-width: 1;
}

.kin-clean-tag-bg.is-dewei {
  fill: #f0fdf4;
  stroke: #86efac;
}

.kin-clean-tag-bg.is-self {
  fill: #fffdf5;
  stroke: #fcd34d;
}

.kin-clean-tag-text {
  font-size: 9.5px;
  font-weight: 800;
  fill: #334155;
}

.kin-clean-tag-text.is-dewei {
  fill: #15803d;
}

.kin-clean-tag-text.is-self {
  fill: #b45309;
}

/* 宫位 胶囊小标 (天干下方 / 地支上方) */
.kin-clean-palace-bg {
  fill: #ffffff;
  stroke: #cbd5e1;
  stroke-width: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.02));
}

.kin-clean-palace-bg.is-day {
  fill: #fffdf9;
  stroke: #f59e0b;
  stroke-width: 1.5;
}

.kin-clean-palace-text {
  font-size: 10px;
  font-weight: 700;
  fill: #475569;
}

.kin-clean-palace-text.is-day {
  fill: #d97706;
  font-weight: 800;
}

/* 纯文字无边框宫位标 */
.kin-clean-palace-text-plain {
  font-size: 11.5px;
  font-weight: 700;
  fill: #0f172a; /* 纯黑/近纯黑 */
  letter-spacing: 0.2px;
}

/* 天干地支纯文字展示（去掉圆框，直接展示五行色） */
.kin-clean-char {
  font-size: 20px;
  font-weight: 900;
  font-family: inherit;
}

.kin-clean-char.kin-el-wood {
  fill: #16a34a; /* 木 绿 */
}

.kin-clean-char.kin-el-fire {
  fill: #dc2626; /* 火 红 */
}

.kin-clean-char.kin-el-earth {
  fill: #854d0e; /* 土 棕黄/土褐 */
}

.kin-clean-char.kin-el-metal {
  fill: #d97706; /* 金 金黄/琥珀金 */
}

.kin-clean-char.kin-el-water {
  fill: #2563eb; /* 水 蓝 */
}

.kin-clean-hidden-sub {
  font-size: 8px;
  fill: #94a3b8;
  font-weight: 500;
}

/* 藏干/天干独立卡片条: 默认黑色文字与中性边框，得位时边框与文字显示对应五行颜色 */
.kin-row-bg {
  fill: #ffffff;
  stroke: #cbd5e1;
  stroke-width: 1.2;
}

.kin-row-char {
  font-size: 11px;
  font-weight: 900;
  fill: #0f172a; /* 默认黑色 */
}

.kin-row-char.kin-el-wood { fill: #16a34a; }
.kin-row-char.kin-el-fire { fill: #dc2626; }
.kin-row-char.kin-el-earth { fill: #854d0e; }
.kin-row-char.kin-el-metal { fill: #d97706; }
.kin-row-char.kin-el-water { fill: #2563eb; }

.kin-row-god {
  font-size: 8.5px;
  font-weight: 700;
  fill: #0f172a; /* 默认黑色 */
}

.kin-row-arrow {
  font-size: 8px;
  fill: #94a3b8;
}

.kin-row-kin {
  font-size: 9.5px;
  font-weight: 800;
  fill: #0f172a; /* 默认黑色 */
}

/* 得位 (is-dewei) 时：边框和文字（字、十神、箭头、六亲）跟着五行颜色同步变化 */
/* 木 */
.kin-row-bg.is-dewei.el-wood {
  fill: #f0fdf4;
  stroke: #16a34a;
}
.kin-row-char.is-dewei.el-wood,
.kin-row-god.is-dewei.el-wood,
.kin-row-arrow.is-dewei.el-wood,
.kin-row-kin.is-dewei.el-wood {
  fill: #16a34a;
}

/* 火 */
.kin-row-bg.is-dewei.el-fire {
  fill: #fef2f2;
  stroke: #dc2626;
}
.kin-row-char.is-dewei.el-fire,
.kin-row-god.is-dewei.el-fire,
.kin-row-arrow.is-dewei.el-fire,
.kin-row-kin.is-dewei.el-fire {
  fill: #dc2626;
}

/* 土 */
.kin-row-bg.is-dewei.el-earth {
  fill: #fefce8;
  stroke: #854d0e;
}
.kin-row-char.is-dewei.el-earth,
.kin-row-god.is-dewei.el-earth,
.kin-row-arrow.is-dewei.el-earth,
.kin-row-kin.is-dewei.el-earth {
  fill: #854d0e;
}

/* 金 */
.kin-row-bg.is-dewei.el-metal {
  fill: #fffbeb;
  stroke: #d97706;
}
.kin-row-char.is-dewei.el-metal,
.kin-row-god.is-dewei.el-metal,
.kin-row-arrow.is-dewei.el-metal,
.kin-row-kin.is-dewei.el-metal {
  fill: #d97706;
}

/* 水 */
.kin-row-bg.is-dewei.el-water {
  fill: #eff6ff;
  stroke: #2563eb;
}
.kin-row-char.is-dewei.el-water,
.kin-row-god.is-dewei.el-water,
.kin-row-arrow.is-dewei.el-water,
.kin-row-kin.is-dewei.el-water {
  fill: #2563eb;
}

/* 列表与卡片部分 */
.kin-list-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kin-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.title-bar.purple {
  background: #8b5cf6;
  width: 4px;
  height: 12px;
  border-radius: 2px;
}

.kin-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 每个十神对照六亲的详细卡片 */
.kin-detailed-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kin-detailed-card.is-present {
  border-color: #cbd5e1;
  background: #ffffff;
}

.kin-detailed-card.is-absent {
  border-color: #f1f5f9;
  background: #fafafa;
  opacity: 0.85;
}

.kin-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kin-card-name-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.kin-god-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: #1e293b;
  color: #ffffff;
}

.kin-role-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.kin-category-lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 3px;
}

.kin-tag-found {
  font-size: 10px;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 1px 6px;
  border-radius: 3px;
}

.kin-tag-missing {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 3px;
}

.kin-card-mid-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.kin-mid-palace {
  display: flex;
  align-items: center;
  gap: 4px;
}

.kin-val-palace {
  font-weight: 700;
  color: #475569;
}

.kin-mid-locations {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: wrap;
}

.kin-locations-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.kin-loc-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid transparent;
}

.kin-loc-tag.is-dewei {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.kin-loc-tag.is-yigong {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.kin-none-text {
  font-size: 10.5px;
  color: #94a3b8;
  font-style: italic;
}

/* 六亲推导原则说明卡片 */
.kin-principle-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.kin-principle-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: #059669;
  font-size: 12px;
}

.kin-principle-content {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #334155;
  text-align: justify;
}

/* ========================================================
   婚姻断言引擎四阶闭环样式
   ======================================================== */
.natal-marriage-engine-fold {
  margin-top: 14px;
  border: 1px solid #e0e7ff;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.06);
}

.natal-marriage-engine-fold summary {
  background: #f5f3ff;
  color: #4338ca;
  font-weight: 700;
}

.natal-marriage-engine-fold summary span {
  background: #e0e7ff;
  color: #4338ca;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.marriage-engine-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.marriage-engine-star,
.marriage-engine-physique,
.marriage-engine-timeline {
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.marriage-engine-star h4,
.marriage-engine-physique h4,
.marriage-engine-timeline h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.marriage-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.marriage-metric {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.marriage-metric b {
  font-size: 11px;
  color: #64748b;
  font-weight: normal;
}

.marriage-metric span {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.marriage-metric.is-good {
  border-color: #86efac;
  background: #f0fdf4;
}
.marriage-metric.is-good span {
  color: #166534;
}

.marriage-metric.is-risk {
  border-color: #fca5a5;
  background: #fef2f2;
}
.marriage-metric.is-risk span {
  color: #991b1b;
}

.marriage-note {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
}

.marriage-candidate-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
}

.marriage-candidate-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}

.marriage-candidate-meta strong {
  font-size: 13px;
  color: #1e293b;
}

.marriage-candidate-meta span {
  font-size: 11px;
  color: #64748b;
}

/* ───────────── 逐年流年实弹大事记总看板（独立 Tab：大运流年） ───────────── */
.milestone-board-page {
  min-height: calc(100vh - 47px);
  padding-bottom: 32px;
  background: var(--bg);
}

.timeline-deck {
  display: grid;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  background: var(--card);
}

.timeline-deck > * {
  min-width: 0;
  max-width: 100%;
}

.luck-pass-card {
  margin: 0;
  padding: 12px 14px 4px;
  background: var(--card);
  border-top: 1px solid var(--line);
  color: var(--text);
}

.luck-pass-card h2 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

.luck-pass-card .luck-pass-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.luck-pass-card .luck-pass-verdict > span {
  flex: 0 0 auto;
}

.luck-pass-card .luck-pass-pillar {
  margin-left: auto;
  font-size: 18px;
  font-weight: 700;
}

.luck-pass-card .luck-pass-yun {
  font-size: 18px;
  font-weight: 700;
}

.luck-pass-card .luck-pass-dot {
  font-size: 15px;
}

.luck-pass-card .luck-pass-date {
  margin-right: 6px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.luck-pass-kicker {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.luck-pass-card .luck-pass-seat {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.luck-pass-seat b {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--muted);
}

.luck-sides {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 6px;
}

.luck-pass-card .luck-pass-side {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  writing-mode: horizontal-tb;
}

.luck-pass-side b {
  flex: 0 0 1.2em;
  font-weight: 700;
  color: var(--muted);
}

.luck-pass-side em {
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 700;
  writing-mode: horizontal-tb;
}

.luck-pass-side em.is-like {
  color: var(--wood);
}

.luck-pass-side em.is-dislike {
  color: var(--fire);
}

.luck-pass-side .luck-pass-pack {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.luck-pass-side .luck-pass-track {
  flex: 0 0 84px;
  align-self: center;
}

.luck-pass-side .luck-pass-fact {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  writing-mode: horizontal-tb;
  letter-spacing: 0;
}

.luck-pass-verdict .is-like,
.luck-pass-verdict.is-like {
  color: var(--wood);
}

.luck-pass-verdict .is-dislike,
.luck-pass-verdict.is-dislike {
  color: var(--fire);
}

.luck-pass-verdict .is-hold,
.luck-pass-verdict .is-open,
.luck-pass-verdict.is-hold,
.luck-pass-verdict.is-open {
  color: var(--text);
}

.luck-pass-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 2px 0 8px;
}

.luck-pass-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1;
  color: var(--text);
}

.luck-pass-bar b {
  width: 1.2em;
  font-weight: 700;
  color: var(--muted);
}

.luck-pass-track {
  box-sizing: border-box;
  width: 84px;
  height: 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
}

.luck-pass-fill {
  display: block;
  height: 100%;
}

.luck-pass-fill.is-full {
  width: 100%;
}

.luck-pass-fill.is-short {
  width: 62%;
}

.luck-pass-fill.is-like {
  background: var(--wood);
}

.luck-pass-fill.is-dislike {
  background: var(--fire);
}

.luck-pass-fill.is-pending {
  background: var(--muted);
}

.luck-pass-bar em {
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.luck-pass-bar em.is-like {
  color: var(--wood);
}

.luck-pass-bar em.is-dislike {
  color: var(--fire);
}

.luck-pass-reason {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.luck-pass-card p,
.luck-pass-empty {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
}

.luck-pass-line {
  display: grid;
  grid-template-columns: 2.5em 1fr;
  gap: 8px;
  align-items: baseline;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.luck-pass-line b {
  color: var(--muted);
  font-weight: 600;
}

.luck-pass-meet {
  margin: 0 0 8px 2.5em;
  padding-left: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.yun-line {
  margin: 4px 0 8px;
}

.yun-line h3 {
  margin: 8px 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.yun-years {
  margin: 0;
  padding: 0 14px 4px;
  list-style: none;
}

.luck-pass-card .yun-years {
  padding-left: 0;
  padding-right: 0;
}

.yun-row,
.yun-year,
.yun-quiet {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.yun-line1 {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.yun-when {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.yun-year-toggle {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--deep-blue);
  font: inherit;
  font-weight: 700;
  line-height: inherit;
  cursor: pointer;
}

.yun-year-toggle[aria-expanded="true"] {
  text-decoration: underline;
}

.yun-detail {
  font-size: 12px;
  font-weight: 400;
}

.yun-detail .yun-chip,
.yun-detail .fac-more,
.yun-detail .yun-word.has-note,
.yun-detail .yun-note.has-note,
.yun-detail .yun-pick.has-note {
  font-weight: 400;
}

.yun-detail .yun-word.has-note,
.yun-detail .yun-note.has-note,
.yun-detail .yun-pick.has-note {
  background: #3d6d8c;
}

.yun-detail-count {
  margin: 2px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}

.yun-detail-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}

.yun-chips {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.yun-chip-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px;
}

.yun-row b,
.yun-chip {
  flex: 0 0 auto;
  font-weight: 700;
  white-space: nowrap;
}

.yun-chip .is-like {
  color: var(--wood);
}

.yun-chip .is-dislike {
  color: var(--fire);
}

.yun-chip .is-grade {
  color: #b4b8c0;
}

.yun-note.has-note,
.yun-pick.has-note,
.yun-word.has-note {
  display: inline-block;
  box-sizing: content-box;
  width: auto;
  min-width: 1.25em;
  padding: 0 0.2em;
  border: 0;
  border-radius: 4px;
  background: var(--deep-blue);
  color: #f4f7fa;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  overflow: visible;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  vertical-align: baseline;
}

.yun-drop {
  position: relative;
  display: inline-block;
}

.yun-choices {
  position: fixed;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: max-content;
  min-width: 1.8em;
  margin: 0;
  padding: 2px 0;
  border: 1px solid var(--deep-blue);
  border-radius: 4px;
  background: var(--deep-blue);
  box-shadow: 0 4px 12px rgba(25, 41, 66, 0.12);
}

.yun-choices[hidden] {
  display: none;
}

.yun-choice,
.yun-choice.is-like,
.yun-choice.is-dislike {
  box-sizing: content-box;
  width: auto;
  min-width: 1.25em;
  margin: 0;
  padding: 1px 0.35em;
  border: 0;
  background: transparent;
  color: #f4f7fa;
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.yun-pick.has-note.is-like,
.yun-note.has-note .is-like {
  color: var(--wood);
}

.yun-pick.has-note.is-dislike,
.yun-note.has-note .is-dislike {
  color: var(--fire);
}

.yun-sep {
  display: inline-block;
  width: 0.5em;
  height: 0.7em;
  position: relative;
  vertical-align: -0.05em;
  font-style: normal;
}

.yun-sep::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.16em;
  height: 0.16em;
  margin-left: -0.08em;
  margin-top: -0.08em;
  border-radius: 50%;
  background: currentColor;
}

.yun-chev {
  display: inline-block;
  width: 1em;
  min-width: 1em;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  vertical-align: baseline;
}

.yun-chev[aria-expanded="true"] {
  color: var(--text);
}

.yun-chev.has-note,
.yun-chev.has-note[aria-expanded="true"] {
  width: auto;
  min-width: 1.25em;
  padding: 0 0.12em;
  line-height: 1.25;
  overflow: visible;
  background: var(--deep-blue);
  color: #f4f7fa;
}

.yun-dialog {
  margin: 4px 0 2px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  white-space: normal;
}

.fac-compare {
  margin-top: 4px;
}

.fac-year {
  margin: 0 0 14px;
}

.fac-year .yun-years {
  padding-left: 0;
  padding-right: 0;
}

.fac-year h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.fac-card-quote {
  margin: 0 0 6px;
  line-height: 1.55;
}

.fac-card-quote b {
  display: inline-block;
  margin-right: 6px;
}

.fac-lines {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fac-more {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  vertical-align: baseline;
}

.fac-more[aria-expanded="true"] {
  color: var(--text);
}

.fac-row {
  margin: 0 0 4px;
}

.fac-row .yun-dialog {
  margin-top: 2px;
}

.fac-sheet {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  line-height: 1.45;
}

.fac-sheet th,
.fac-sheet td {
  box-sizing: content-box;
  border: 1px solid var(--line);
  padding: 4px 0;
  vertical-align: top;
  text-align: left;
  background: var(--card);
  color: var(--text);
  font-weight: 400;
  word-break: break-all;
}

.fac-sheet thead th {
  background: var(--bg);
  font-weight: 700;
}

.fac-sheet thead th:nth-child(1),
.fac-sheet thead th:nth-child(2),
.fac-sheet tbody th,
.fac-sheet td:nth-child(2) {
  width: 2em;
}

.fac-sheet thead th:nth-child(3),
.fac-sheet td:nth-child(3) {
  width: 8em;
}

.fac-sheet tbody th {
  font-weight: 700;
}

.fac-luck-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.fac-luck-bar button {
  margin: 0;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.fac-luck-bar button.is-on {
  border-color: var(--blue-dark);
  color: var(--blue-dark);
  font-weight: 700;
}

.fac-chip {
  font-weight: 700;
  white-space: nowrap;
}

.fac-chip .is-like,
.fac-note.is-like {
  color: var(--wood);
}

.fac-chip .is-dislike,
.fac-note.is-dislike {
  color: var(--fire);
}

.fac-note {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}

.fac-quiet {
  color: var(--muted);
  font-weight: 400;
}

.fac-dialog {
  margin: 4px 0 2px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  white-space: normal;
}

.yun-row b {
  font-weight: 700;
}

.yun-read em {
  font-style: normal;
  font-weight: 700;
}

.yun-read em.is-like {
  color: var(--wood);
}

.yun-read em.is-dislike {
  color: var(--fire);
}

.yun-record {
  color: var(--muted);
}

.yun-quiet {
  color: var(--muted);
}

.luck-pass-note {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.luck-pass-legend {
  margin: 6px 0 0;
}

.luck-pass-legend summary {
  cursor: pointer;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.luck-pass-legend summary::-webkit-details-marker {
  display: none;
}

@media (max-width: 720px) {
  .yun-year {
    grid-template-columns: 1fr;
  }
}

.timeline-fold {
  margin: 0;
  background: var(--card);
  border-top: 1px solid var(--line);
}

.timeline-fold > summary {
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}

.luck-pass-card .timeline-fold > summary {
  padding-left: 0;
  padding-right: 0;
}

.timeline-fold > p {
  margin: 0;
  padding: 0 14px 8px;
  font-size: 14px;
}

.luck-pass-card .timeline-fold > p {
  padding-left: 0;
  padding-right: 0;
}

.milestone-board {
  display: grid;
  gap: 8px;
  padding: 0;
}

.milestone-board-head {
  padding: 12px 14px;
  border-radius: 0;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  color: #fff;
}

.milestone-board-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.milestone-board-head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.milestone-board-meta {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.82);
}

.milestone-compact-toggle {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  backdrop-filter: blur(4px);
}

.milestone-compact-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}

.milestone-compact-toggle.is-active {
  background: #fff;
  border-color: #fff;
  color: #312e81;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* 枢纽与待件优雅折叠框 */
.milestone-hub-box {
  margin: 0 0 2px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.milestone-hub-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  color: #334155;
}

.milestone-hub-box summary::-webkit-details-marker {
  display: none;
}

.milestone-hub-sum-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #1e293b;
}

.milestone-hub-sum-tip {
  font-size: 11px;
  color: #64748b;
}

.milestone-hub-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.milestone-hub-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  background: #f1f5f9;
  color: #334155;
}

.milestone-hub-pill i {
  font-style: normal;
}

.milestone-hub-pill.hub-tag-hub {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.milestone-hub-pill.hub-tag-guard {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.milestone-hub-pill.hub-tag-wait {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* 筛选面板现代胶囊化 */
.milestone-board-stats-wrap {
  margin: 2px 0;
}

.milestone-board-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.milestone-board-stats .milestone-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 11.5px;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.milestone-board-stats .milestone-stat b {
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
}

.milestone-board-stats .milestone-stat:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.milestone-board-stats .milestone-stat.is-on {
  border-color: #4338ca;
  background: #eef2ff;
  color: #3730a3;
  box-shadow: 0 0 0 2px rgba(67, 56, 202, 0.12);
}

.milestone-board-stats .milestone-stat[data-milestone-filter="xiong"] b { color: #dc2626; }
.milestone-board-stats .milestone-stat[data-milestone-filter="xiong"].is-on {
  border-color: #ef4444;
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.milestone-board-stats .milestone-stat[data-milestone-filter="ji"] b { color: #16a34a; }
.milestone-board-stats .milestone-stat[data-milestone-filter="ji"].is-on {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #15803d;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.milestone-board-stats .milestone-stat[data-milestone-filter="gate"] b { color: #7c3aed; }
.milestone-board-stats .milestone-stat[data-milestone-filter="gate"].is-on {
  border-color: #8b5cf6;
  background: #f5f3ff;
  color: #6d28d9;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

.milestone-more-filters {
  display: inline-block;
  font-size: 11px;
}

.milestone-more-filters summary {
  padding: 4px 8px;
  cursor: pointer;
  color: #64748b;
  font-size: 11px;
  list-style: none;
}

.milestone-more-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  padding: 6px;
  border-radius: 8px;
  background: #f1f5f9;
}

/* 筛选显示与隐藏规则 */
.milestone-board[data-filter="ji"] .milestone-year:not([data-year-kinds~="ji"]),
.milestone-board[data-filter="xiong"] .milestone-year:not([data-year-kinds~="xiong"]),
.milestone-board[data-filter="gate"] .milestone-year:not([data-year-kinds~="gate"]),
.milestone-board[data-filter="jin"] .milestone-year:not([data-year-kinds~="jin"]),
.milestone-board[data-filter="jiying"] .milestone-year:not([data-year-kinds~="jiying"]),
.milestone-board[data-filter="silent"] .milestone-year:not([data-year-kinds~="silent"]),
.milestone-board[data-filter="time"] .milestone-year:not([data-year-kinds~="time"]),
.milestone-board[data-filter="climate"] .milestone-year:not([data-year-kinds~="climate"]),
.milestone-board[data-filter="xian"] .milestone-year:not([data-year-kinds~="xian"]),
.milestone-board[data-filter="noyear"] .milestone-year:not([data-year-kinds~="noyear"]) {
  display: none;
}

.milestone-board[data-filter="ji"] .milestone-luck-group:not(:has([data-year-kinds~="ji"])),
.milestone-board[data-filter="xiong"] .milestone-luck-group:not(:has([data-year-kinds~="xiong"])),
.milestone-board[data-filter="gate"] .milestone-luck-group:not(:has([data-year-kinds~="gate"])),
.milestone-board[data-filter="jin"] .milestone-luck-group:not(:has([data-year-kinds~="jin"])),
.milestone-board[data-filter="jiying"] .milestone-luck-group:not(:has([data-year-kinds~="jiying"])),
.milestone-board[data-filter="silent"] .milestone-luck-group:not(:has([data-year-kinds~="silent"])),
.milestone-board[data-filter="time"] .milestone-luck-group:not(:has([data-year-kinds~="time"])),
.milestone-board[data-filter="climate"] .milestone-luck-group:not(:has([data-year-kinds~="climate"])),
.milestone-board[data-filter="xian"] .milestone-luck-group:not(:has([data-year-kinds~="xian"])),
.milestone-board[data-filter="noyear"] .milestone-luck-group:not(:has([data-year-kinds~="noyear"])) {
  display: none;
}

/* 宏观元运单行水平滚动胶囊 */
.milestone-epoch-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.milestone-epoch-label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.milestone-epoch-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.milestone-epoch-chip {
  flex: 0 0 auto;
  padding: 3px 9px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  font-size: 11px;
  color: #9a3412;
  white-space: nowrap;
}

.milestone-epoch-chip.is-current {
  background: #ffedd5;
  border-color: #f97316;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.15);
}

.milestone-key-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.milestone-key-label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.milestone-key-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.milestone-key-chip {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

.milestone-key-chip.is-current {
  background: #4338ca;
  color: #fff;
  border-color: #4338ca;
}

.milestone-key-chip.is-reversal {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #ddd6fe;
}

.milestone-key-chip.is-gate {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

/* 治理准则与账本折叠箱 */
.milestone-rule-accordion {
  margin: 4px 0;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fafafa;
  font-size: 12px;
}

.milestone-rule-accordion summary {
  padding: 8px 12px;
  cursor: pointer;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
  list-style: none;
}

.milestone-rule-accordion summary::-webkit-details-marker {
  display: none;
}

.milestone-rule-accordion summary::after {
  content: " ▸";
  font-size: 10px;
}

.milestone-rule-accordion[open] summary::after {
  content: " ▾";
}

.milestone-rule-body {
  padding: 0 12px 10px;
  border-top: 1px dashed #e2e8f0;
}

.milestone-board-legend,
.milestone-board-empty {
  margin: 8px 0 4px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 11.5px;
  line-height: 1.55;
  color: #64748b;
}

.milestone-board-none {
  margin: 0 0 6px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  font-size: 12.5px;
  line-height: 1.55;
}

.milestone-quiet-why {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: #64748b;
}

.milestone-quiet-why summary {
  cursor: pointer;
  color: #64748b;
}

.milestone-luck-group {
  background: #fff;
}

.milestone-luck-group.is-active > h3 {
  background: #f5f3ff;
}

.milestone-luck-group > h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12.5px;
  color: #334155;
}

.milestone-luck-group > h3 > span:not(.milestone-luck-gz) {
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
}

.milestone-luck-gz {
  font-size: 14px;
  font-weight: 800;
  color: #4338ca;
}

.milestone-years {
  list-style: none;
  margin: 0;
  padding: 0;
}

.milestone-year {
  display: block;
}

.milestone-year-axis {
  position: relative;
}

.milestone-year-axis::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 2px;
  background: #e2e8f0;
}

.milestone-year-axis span {
  position: absolute;
  top: 12px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #94a3b8;
}

.milestone-year.is-reversal .milestone-year-axis span {
  border-color: #7c3aed;
  background: #ede9fe;
}

.milestone-year.is-gate .milestone-year-axis span {
  border-color: #dc2626;
  background: #fee2e2;
}

.milestone-year.is-current .milestone-year-axis span {
  border-color: #0284c7;
  background: #e0f2fe;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.milestone-year-body {
  padding: 0 0 6px;
}

/* ───────────── 紧凑平年行样式 ───────────── */
.milestone-year.is-compact-row {
  align-items: center;
}

.milestone-year.is-compact-row .milestone-year-body {
  padding: 0 0 1px;
}

.milestone-year-card.is-compact-card {
  padding: 3px 12px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.milestone-year-card.is-compact-card:hover {
  background: #f8fafc;
}

.compact-row-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 6px;
}

.compact-row-lead {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
}

.compact-row-year {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.compact-row-age {
  font-size: 11px;
  color: #64748b;
}

.compact-row-gz {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
}

.milestone-badge.is-quiet-pill {
  padding: 0 5px;
  font-size: 10px;
  background: #f1f5f9;
  color: #94a3b8;
  border-radius: 4px;
}

.compact-row-verdict {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11.5px;
  color: #64748b;
  white-space: normal;
  overflow: visible;
  text-align: left;
  line-height: 1.3;
  padding: 0;
}

.compact-row-expand {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 0;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.compact-row-expand:hover {
  background: #cbd5e1;
  color: #1e293b;
}

.compact-row-expanded-area {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.milestone-year-axis span.compact-dot {
  width: 6px;
  height: 6px;
  left: 6px;
  top: 10px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #94a3b8;
}

.milestone-year-card {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 12px;
}

.milestone-year-card.is-board,
.milestone-year-card.is-idle,
.milestone-year-card.is-background,
.milestone-year-card.is-plain {
  border-left: 0;
}

.milestone-year.is-current .milestone-year-card {
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.18);
}

.milestone-year-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.milestone-year-head strong {
  font-size: 15px;
  color: #0f172a;
}

.milestone-year-head > span {
  font-size: 11.5px;
  color: var(--dim-text);
}

.milestone-badge {
  padding: 1px 7px;
  border-radius: 999px;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
}

.milestone-badge.is-current {
  background: #e0f2fe;
  color: #0369a1;
}

.milestone-badge.is-reversal {
  background: #ede9fe;
  color: #5b21b6;
}

.milestone-badge.is-gate {
  background: #fee2e2;
  color: #b91c1c;
}

.milestone-badge.is-window-shift {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.milestone-badge.is-wording-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.milestone-badge.is-garrison {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
}

.milestone-badge.is-handover {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.wording-pending-ledger {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  background: #fffbeb;
  color: var(--text);
}

.wording-pending-ledger header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.wording-pending-ledger header strong {
  font-size: 13px;
  color: var(--text-bright);
}

.wording-pending-ledger p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text);
}

.wording-pending-ledger table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.wording-pending-ledger th,
.wording-pending-ledger td {
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid #fde68a;
  color: var(--text);
}

.wording-pending-ledger th {
  color: var(--dim-text);
  font-weight: 600;
}

.wording-pending-ledger tr.is-danger-high td {
  color: #9a3412;
  font-weight: 600;
}

.office-pipe {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
}

.office-pipe header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.office-pipe header strong {
  font-size: 13px;
  color: var(--text-bright);
}

.office-pipe header span {
  font-size: 12px;
  color: var(--dim-text);
}

.office-pipe-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.office-pipe-flow li {
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft-row);
}

.office-pipe-flow b {
  display: block;
  font-size: 13px;
  color: var(--text-bright);
}

.office-pipe-flow span,
.office-pipe-flow em {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-style: normal;
  color: var(--dim-text);
}

.office-pipe p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text);
}

.office-pipe-flow li.is-lit {
  border-color: var(--blue);
  background: #e8f4fb;
}

.office-pipe-flow li.is-dim {
  border-color: var(--line);
  background: var(--card);
}

.office-pipe-flow li.is-dim b,
.office-pipe-flow li.is-dim span {
  color: var(--dim-text);
}

.office-pipe-flow li.is-flagged {
  border-color: #7c3aed;
  background: #f5f3ff;
}

.office-pipe-flow li.is-dim.is-flagged b,
.office-pipe-flow li.is-dim.is-flagged span {
  color: var(--text-bright);
}

.office-pipe-hang p.is-flagged {
  padding: 4px 6px;
  border-radius: 4px;
  background: #f5f3ff;
  outline: 1px solid #c4b5fd;
}

.office-pipe-flow .milestone-badge {
  display: inline-block;
  margin: 4px 4px 0 0;
}

.office-pipe-empty {
  color: var(--dim-text);
  font-style: normal;
}

.office-pipe-hang {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.office-pipe-hang b {
  display: block;
  font-size: 12px;
  color: var(--text-bright);
}

.office-pipe-hang p {
  margin: 4px 0 0;
}

.office-pipe-hang i {
  display: inline-block;
  min-width: 2.5em;
  margin-right: 6px;
  font-style: normal;
  color: var(--dim-text);
}

.milestone-badge.is-pattern-shift {
  background: #f5f3ff;
  color: #5b21b6;
  border: 1px solid #c4b5fd;
}

.milestone-badge.is-pipe-point {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.milestone-year.is-picked .milestone-year-card {
  outline: 1px solid var(--blue);
}

.milestone-year-card[data-timeline-pick] {
  cursor: pointer;
}

@media (max-width: 640px) {
  .office-pipe-flow {
    grid-template-columns: 1fr 1fr;
  }
}

.milestone-badge.is-quiet {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.milestone-year.is-background .milestone-badge.is-quiet {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.milestone-year.is-idle .milestone-badge.is-quiet {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

.milestone-year.is-quiet .milestone-year-axis span {
  width: 8px;
  height: 8px;
  left: 5px;
  top: 14px;
  border-width: 2px;
  border-color: #cbd5e1;
}

.milestone-year.is-quiet .milestone-year-head strong {
  color: #0f172a;
}

.milestone-year-line,
.milestone-quiet {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #1e293b;
}

.milestone-domain.is-loss .milestone-domain-headline b {
  color: #b91c1c;
}

.milestone-domain.is-gain .milestone-domain-headline b {
  color: #15803d;
}

.milestone-battle {
  margin: 4px 0 6px;
  padding: 6px 9px;
  border-radius: 6px;
  background: #f0fdf4;
  border-left: 3px solid #16a34a;
  font-size: 12px;
  line-height: 1.55;
  color: #14532d;
}

.milestone-domains {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}

.milestone-domain {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: start;
}

.milestone-domain-chip {
  margin-top: 2px;
  padding: 2px 0;
  border-radius: 4px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  background: #64748b;
}

.milestone-domain.is-education .milestone-domain-chip { background: #2563eb; }
.milestone-domain.is-career .milestone-domain-chip { background: #7c3aed; }
.milestone-domain.is-wealth .milestone-domain-chip { background: #d97706; }
.milestone-domain.is-health .milestone-domain-chip { background: #dc2626; }
.milestone-domain.is-kinship .milestone-domain-chip { background: #16a34a; }
.milestone-domain.is-longevity .milestone-domain-chip { background: #0d9488; }

.milestone-domain-body {
  min-width: 0;
}

.milestone-domain-headline {
  font-size: 12.5px;
  line-height: 1.5;
  color: #1e293b;
}

.milestone-domain-headline b {
  margin-right: 3px;
  color: var(--accent-color);
}

.milestone-domain-body small {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--dim-text);
}

/* 原局断言页顶部的总看板入口 */
.milestone-entry-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2b1a5e 0%, #6d28d9 100%);
  color: #fff;
}

.milestone-entry-banner strong {
  display: block;
  font-size: 14px;
}

.milestone-entry-banner span {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.82);
}

.milestone-entry-button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #4c1d95;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.method-law,
.method-entry,
.method-board {
  margin: 8px 0;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
}

.method-board summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.method-board summary::-webkit-details-marker {
  display: none;
}

.method-board summary::before {
  content: "▸";
  color: var(--muted);
  font-size: 12px;
}

.method-board[open] summary::before {
  content: "▾";
}

.method-board summary strong {
  font-size: 15px;
  color: var(--text-bright);
}

.method-board summary span {
  font-size: 12px;
  color: var(--muted);
}

.method-board[open] summary {
  margin-bottom: 8px;
}

.method-law header,
.method-entry header,
.method-board header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.method-law header strong,
.method-entry header strong,
.method-board header strong {
  font-size: 15px;
  color: var(--text-bright);
}

.method-law header span,
.method-entry header span,
.method-board header span {
  font-size: 12px;
  color: var(--muted);
}

.method-law-outline {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.55;
}

.method-law-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.method-law-grid article {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft-row);
}

.method-law-grid h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.method-law-grid ol,
.method-law-grid ul,
.method-board-checks {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.5;
}

.method-law-keep,
.method-entry p,
.method-board p {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.method-law-wide {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft-row);
}

.method-law-wide h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.method-law-wide p,
.method-law-wide ul,
.method-law-wide ol {
  margin: 0 0 6px;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.5;
}

.method-law-wide p {
  padding-left: 0;
}

.method-defs {
  margin: 0;
  display: grid;
  gap: 6px;
}

.method-defs div {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.method-defs dt {
  font-weight: 700;
  color: var(--text-bright);
}

.method-defs dd {
  margin: 0;
  color: var(--text);
}

.method-dir-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: var(--card);
}

.method-dir-table th,
.method-dir-table td {
  border: 1px solid var(--line);
  padding: 4px 6px;
  text-align: left;
  color: var(--text);
}

.method-dir-table th {
  background: var(--soft-row);
  color: var(--text-bright);
}

.verdict-entry {
  margin: 4px 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.method-board-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

.method-board-checks li {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--soft-row);
  border: 1px solid var(--line);
}

.method-board-checks li.is-done {
  color: var(--good-color);
  border-color: #c6e6d4;
}

.method-board-checks li.is-miss {
  color: var(--warn-color);
}

.method-board-facts {
  margin: 0 0 10px;
}

.method-board-facts div {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 6px;
  padding: 3px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.4;
}

.method-board-facts dt {
  color: var(--muted);
}

.method-board-facts dd {
  margin: 0;
}

.climate-ill {
  margin: 4px 0 0;
  padding-left: 16px;
  list-style: disc;
}

.climate-ill li {
  margin: 2px 0;
}

.climate-ill li.is-hurt {
  color: var(--warn-color);
}

.climate-ill li.is-cured {
  color: var(--muted);
}

.method-board h3 {
  margin: 8px 0 6px;
  font-size: 13px;
}

.method-hit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.method-hit-table th,
.method-hit-table td {
  border: 1px solid var(--line);
  padding: 5px 8px;
  text-align: left;
  vertical-align: top;
}

.method-hit-table th {
  width: 6.5em;
  color: var(--muted);
  background: var(--soft-row);
  font-weight: 600;
}

.verdict-four {
  margin: 0 0 4px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--soft-row);
}

.verdict-four strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-bright);
}

.verdict-four span,
.verdict-four small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.verdict-four ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.verdict-four li {
  display: grid;
  grid-template-columns: 3em 1fr;
  gap: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.verdict-four li i {
  font-style: normal;
  color: var(--muted);
}

.verdict-four.is-shipped {
  border-color: #c6e6d4;
  background: #f3faf6;
  border-left: 3px solid #10b981;
}

.verdict-four.is-silent {
  border-color: var(--line);
  background: #f8fafc;
}

.method-year-hits {
  margin: 4px 0 6px;
  font-size: 12px;
}

.method-year-hits summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11.5px;
}

.method-hit-empty-note {
  padding: 4px 6px;
  color: #94a3b8;
  font-size: 11px;
}

.milestone-badge.is-factory-shipped {
  background: #e8f6ee;
  color: var(--good-color);
}

.milestone-badge.is-factory-shipped.is-ji {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.milestone-badge.is-factory-shipped.is-xiong {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.milestone-badge.is-factory-silent {
  background: var(--soft-row);
  color: var(--muted);
}

@media (max-width: 420px) {
  .method-law-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   智能选盘 (Smart Chart Selector) 占位模块样式
   ======================================================== */
.smart-picker-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 10px 4px 30px;
  font-family: inherit;
}

.picker-hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #f0f4ff 50%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 20px 16px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
}

.picker-hero-card::before {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.picker-hero-badge-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.picker-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  animation: pickerPulse 2s infinite;
}

@keyframes pickerPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.picker-hero-badge {
  font-size: 11px;
  font-weight: 700;
  color: #1d4ed8;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.picker-hero-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.picker-hero-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #475569;
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.picker-feature-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 14px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.picker-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.picker-feature-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.picker-feature-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.picker-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.picker-tag.tag-purple {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.picker-tag.tag-blue {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.picker-tag.tag-amber {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.picker-tag.tag-emerald {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.picker-feature-desc {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
}

.picker-feature-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed #f1f5f9;
  padding-top: 8px;
  font-size: 11px;
  color: #94a3b8;
}

.picker-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

/* 路线进度卡片 */
.picker-roadmap-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.picker-roadmap-title {
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.picker-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  position: relative;
}

.picker-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 6px;
  border: 1px solid #e2e8f0;
}

.picker-step.is-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.picker-step.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
  box-shadow: 0 0 0 1px #3b82f6;
}

.picker-step-num {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
}

.picker-step.is-done .picker-step-num {
  color: #16a34a;
}

.picker-step.is-active .picker-step-num {
  color: #2563eb;
}

.picker-step.is-pending .picker-step-num {
  color: #94a3b8;
}

.picker-step-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
}

.picker-step-sub {
  font-size: 9.5px;
  color: #64748b;
}

@media (max-width: 480px) {
  .picker-steps {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .picker-step {
    flex-direction: row;
    justify-content: space-between;
    padding: 8px 12px;
    text-align: left;
  }
}

.picker-board {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.picker-lead,
.picker-note,
.picker-error {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.picker-lead {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.picker-filters {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.picker-filters label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.picker-note {
  color: var(--muted);
}

.picker-error {
  color: var(--warn-color);
}

.picker-pile {
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.picker-pile h3 {
  margin: 0;
  color: var(--deep-blue);
  font-size: 15px;
}

.picker-ticket-group {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.picker-ticket .picker-hit b {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.picker-hit {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.picker-hit-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.picker-seats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.picker-card-legend {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.picker-tagbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
}

.picker-tag-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 13px;
}

.picker-tag-pick select {
  width: auto;
  max-width: 100%;
  height: 28px;
  min-height: 0;
}

.picker-page {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.picker-page button {
  height: 28px;
  padding: 0 10px;
  color: var(--deep-blue);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

.picker-page button:disabled {
  color: var(--muted);
  cursor: default;
}

button.picker-tag {
  margin: 0;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

button.picker-tag b {
  margin-left: 4px;
  font-weight: 600;
}

button.picker-tag.is-on {
  color: #fff;
  background: var(--blue);
}

.picker-source p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.picker-tag-hold,
i.picker-tag.is-off {
  color: var(--muted);
  background: var(--line);
}

i.picker-tag.is-on {
  color: #fff;
  background: var(--blue);
}

.picker-hit b {
  font-size: 14px;
}

.picker-cast,
.picker-take {
  flex: 0 0 auto;
  height: 24px;
  margin-left: auto;
  padding: 0 8px;
  color: #fff;
  font-size: 12px;
  line-height: 24px;
  background: var(--blue);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.picker-tag {
  display: inline-block;
  margin: 0 0 0 4px;
  padding: 0 4px;
  color: var(--deep-blue);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
  background: var(--soft-row);
  border-radius: 4px;
}


.picker-hit span,
.picker-empty {
  color: var(--muted);
}

.picker-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.picker-act,
.picker-act-main,
.picker-act-end {
  display: flex;
  align-items: center;
  min-width: 0;
}

.picker-act {
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 14px;
  line-height: 1.4;
}

.picker-act-main {
  gap: 8px;
}

.picker-act-end {
  gap: 4px;
  margin-left: auto;
}

.picker-rest {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
}

.picker-form .picker-rest .picker-checks {
  flex-wrap: nowrap;
}

.picker-form .picker-act label,
.picker-form .picker-rest label {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  width: auto;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}

.picker-form input[type="radio"],
.picker-form input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
}

.picker-form .picker-act select,
.picker-form .picker-rest select,
.picker-form .picker-doors select {
  width: auto;
  height: 22px;
  min-height: 0;
  max-height: 22px;
  margin: 0;
  padding: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 22px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.picker-form .picker-act select,
.picker-form .picker-rest select,
.picker-form .picker-doors select {
  padding: 0 0 0 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23333842' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 10px 6px;
  appearance: none;
  cursor: pointer;
}

.picker-form .picker-act .picker-range {
  color: var(--text);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  letter-spacing: 0;
  white-space: nowrap;
}

.picker-ymd-line {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 14px;
  line-height: 1.4;
}

.picker-form .picker-act button.picker-ymd {
  width: 21ch;
  min-width: 21ch;
  max-width: 21ch;
  height: 1.4em;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.picker-cal {
  position: absolute;
  z-index: 40;
  top: 100%;
  right: 0;
  width: 252px;
  margin-top: 4px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(25, 41, 66, 0.08);
}

.picker-cal[hidden] {
  display: none;
}

.picker-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.picker-cal-nav {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.picker-cal-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.picker-cal-head b {
  font-weight: 600;
}

.picker-cal-head button {
  width: 22px;
  height: 24px;
  padding: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.picker-form .picker-cal input.picker-cal-year {
  width: 4.4ch;
  min-width: 4.4ch;
  max-width: 4.4ch;
  height: 1.4em;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
  background: transparent;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
}

.picker-form .picker-cal input.picker-cal-year:focus {
  outline: none;
  background: #e7f3fb;
}

.picker-cal-hint {
  margin: 2px 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.picker-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.picker-cal-grid > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 24px;
}

.picker-cal-day {
  height: 28px;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 28px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.picker-cal-day.is-in {
  background: #e7f3fb;
}

.picker-cal-day.is-edge {
  color: #fff;
  background: var(--blue);
}

.picker-form .picker-act select:focus,
.picker-form .picker-rest select:focus,
.picker-form .picker-doors select:focus,
.picker-form .picker-act button.picker-ymd:focus {
  outline: none;
  border-color: transparent;
  box-shadow: none;
}

.picker-act .primary-action {
  flex: 0 0 auto;
  height: 28px;
  margin-left: 4px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
}

.picker-form label {
  display: grid;
  gap: 4px;
  color: var(--text);
  font-size: 13px;
}

.picker-form select,
.picker-form input[type="date"] {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.picker-checks {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--text);
  font-size: 14px;
}

.picker-form .picker-checks label {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.picker-doors {
  flex-wrap: nowrap;
  align-items: center;
  font-size: 14px;
  line-height: 1.4;
}

.picker-form .picker-doors > label,
.picker-doors > span {
  font-size: 14px;
  line-height: 1.4;
}

.picker-form .picker-doors .picker-main {
  display: flex;
  flex: 0 1 auto;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}

.picker-main-cap {
  flex: 0 0 auto;
}

.picker-pop {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.picker-pop-toggle {
  display: block;
  width: auto;
  max-width: 100%;
  height: 1.4em;
  margin: 0;
  padding: 0 14px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23333842' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 10px 6px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.picker-pop-toggle:focus {
  outline: none;
}

.picker-pop-panel {
  position: absolute;
  z-index: 30;
  top: 100%;
  right: 0;
  width: max-content;
  min-width: 100%;
  max-width: max-content;
  max-height: 240px;
  margin: 4px 0 0;
  padding: 4px 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(25, 41, 66, 0.08);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.picker-pop-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.picker-pop-panel[hidden] {
  display: none;
}

.picker-pop-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 6px 14px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.picker-pop-item.is-on {
  color: #fff;
  background: var(--blue);
}

.picker-scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 4px;
  align-items: center;
}

.picker-scene-left {
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 2;
  row-gap: 4px;
  align-content: center;
  min-width: 0;
}

.picker-scene .picker-person {
  gap: 4px;
  min-width: 0;
}

.picker-scene > .picker-person {
  grid-column: 2;
  grid-row: 2;
}

.picker-person-head {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.picker-person-clock {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  color: var(--text);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  line-height: 1.4;
}

.picker-time-open {
  width: 12px;
  height: 1.4em;
  margin: 0;
  padding: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23333842' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 6px;
  border: 0;
  cursor: pointer;
}

.picker-time {
  position: absolute;
  z-index: 40;
  top: 100%;
  left: 0;
  display: flex;
  gap: 4px;
  height: 168px;
  margin-top: 4px;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(25, 41, 66, 0.08);
}

.picker-time[hidden] {
  display: none;
}

.picker-scene > .picker-person .picker-time {
  right: 0;
  left: auto;
}

.picker-time-col {
  width: 44px;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.picker-time-col::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.picker-time-item {
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 28px;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.picker-time-item.is-on {
  color: #fff;
  background: var(--blue);
}

.picker-person-clock i {
  width: 1ch;
  font-style: normal;
  text-align: center;
}

.picker-form .picker-scene .picker-person select[name$="Gender"] {
  min-width: 0;
}

.picker-also {
  position: relative;
  display: flex;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.picker-also .primary-action {
  flex: 0 0 auto;
  height: 1.4em;
  margin: 0;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
}

.picker-also-toggle {
  width: auto;
  height: 1.4em;
  margin: 0;
  padding: 0 0 0 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  white-space: nowrap;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23333842' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 10px 6px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.picker-also-toggle:focus {
  outline: none;
}

.picker-also-panel {
  position: absolute;
  z-index: 30;
  top: 100%;
  right: 0;
  left: auto;
  width: max-content;
  max-width: 240px;
  max-height: 200px;
  margin-top: 4px;
  padding: 8px;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(25, 41, 66, 0.08);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.picker-also-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.picker-also-panel[hidden] {
  display: none;
}

.picker-doors > span {
  color: var(--text);
  font-size: 14px;
}

.picker-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.picker-person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.picker-person-name {
  flex: 0 0 auto;
  color: var(--deep-blue);
  font-size: 14px;
  line-height: 1.4;
}

.picker-form .picker-person label {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  width: auto;
  font-size: 14px;
  line-height: 1.4;
}

.picker-person-ymd {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  width: auto;
  min-width: 0;
  color: var(--text);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.picker-person-ymd i {
  width: 1ch;
  color: var(--text);
  font-style: normal;
  text-align: center;
}

.picker-person-open {
  width: 12px;
  height: 1.4em;
  margin: 0;
  padding: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23333842' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 6px;
  border: 0;
  cursor: pointer;
}

.picker-scene-left .picker-cal {
  right: auto;
  left: 0;
}

.picker-form .picker-person select,
.picker-form .picker-person input.picker-seg {
  width: auto;
  height: 1.4em;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.picker-form .picker-person select {
  min-width: 0;
  height: 22px;
  max-height: 22px;
  padding: 0 12px 0 0;
  line-height: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23333842' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 10px 6px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.picker-form .picker-person input.picker-seg {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-align: center;
}

.picker-form .picker-person input.picker-seg-year {
  width: 4ch;
  min-width: 4ch;
  max-width: 4ch;
}

.picker-form .picker-person input.picker-seg-month,
.picker-form .picker-person input.picker-seg-day,
.picker-form .picker-person input.picker-clock {
  width: 2ch;
  min-width: 2ch;
  max-width: 2ch;
}

.picker-form .picker-person select:focus,
.picker-form .picker-person input.picker-seg:focus,
.picker-person-open:focus,
.picker-also-toggle:focus {
  outline: none;
  border-color: transparent;
  box-shadow: none;
}





.picker-age {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.picker-age i {
  font-style: normal;
}

.picker-form .picker-person input.picker-age-num {
  width: 3ch;
  min-width: 3ch;
  max-width: 3ch;
}

.picker-also-head {
  display: block;
  margin-top: 6px;
  color: var(--deep-blue);
  font-size: 13px;
}
