/* liuyao-deep.css — 六爻深度断卦卡片视觉
 * 出处：《卜筮正宗》《增删卜易》《易冒》《海底眼》
 * 组件：
 *   1. .ly-power-*      —— 旺相休囚死 力量条
 *   2. .ly-yjc-*        —— 元神/忌神/仇神 三色 chip
 *   3. .ly-zhi-wheel    —— 应期地支轮（十二生肖圆环）
 *   4. .ly-che-flow     —— 六冲六合流转箭头
 *   5. .ly-var-*        —— 互卦/错卦/综卦 三列
 *   6. .ly-she-*        —— 三合局 印章
 *   7. .ly-gs-*         —— 卦身 印章
 * 依赖颜色 token：--ll-ink/--ll-green/--ll-cinnabar/--ll-gold-2/--ll-brown/--ll-silk
 * 五行底色借用 pages.css 已有 .wx-木/.wx-火/.wx-土/.wx-金/.wx-水
 */

/* ========== 深度卡片外壳 ========== */
.ly-deep-card {
  background:
    linear-gradient(180deg, rgba(255,253,247,.98), rgba(248,241,227,.94));
  border: 1px solid rgba(184,68,46,.18);
  border-radius: 14px;
  box-shadow: var(--ll-shadow-soft);
  position: relative;
  overflow: hidden;
}
.ly-deep-card::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ll-cinnabar), var(--ll-gold-2), var(--ll-green));
}
.ly-deep-block {
  padding: 14px 12px 12px;
  margin: 10px 0;
  background: linear-gradient(180deg, rgba(253,248,238,.7), rgba(248,241,227,.35));
  border: 1px solid rgba(94,71,51,.10);
  border-left: 3px solid var(--ll-green-2);
  border-radius: 10px;
}
.ly-deep-block + .ly-deep-block { margin-top: 12px; }
.ly-deep-label {
  color: var(--ll-cinnabar);
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 8px;
  font-size: 14.5px;
}

/* 区块主题色变体 */
.ly-deep-ws  { border-left-color: var(--ll-gold-2); }
.ly-deep-yjc { border-left-color: #b8442e; }
.ly-deep-yq  { border-left-color: #3a7a55; }
.ly-deep-gs  { border-left-color: #6a5b8a; }
.ly-deep-che { border-left-color: #b8860b; }
.ly-deep-var { border-left-color: #4a6c7c; }
.ly-deep-she { border-left-color: #7c5a3a; }

/* ========== 1. 旺相休囚死 力量条 ========== */
.ly-power-wrap {
  margin: 8px 0 6px;
  user-select: none;
}
.ly-power-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ll-brown-2);
  padding: 0 2px 4px;
  letter-spacing: 2px;
}
.ly-power-track {
  position: relative;
  height: 14px;
  background:
    linear-gradient(90deg,
      #7a2a1e 0%,
      #b8442e 20%,
      #d4a24a 45%,
      #f2e7c8 50%,
      #a7c99b 55%,
      #3a7a55 80%,
      #1f5a3a 100%);
  border-radius: 7px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.15);
}
.ly-power-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: rgba(0,0,0,0);
  border-right: 3px solid #fff;
  box-shadow: 2px 0 6px rgba(0,0,0,.25);
  transition: width .6s cubic-bezier(.4,.2,.2,1);
}
.ly-power-mark {
  position: absolute; top: -3px; bottom: -3px;
  width: 2px;
  background: rgba(94,71,51,.6);
  transform: translateX(-50%);
}
.ly-power-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
}
.ly-power-lv {
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  color: #fff;
  letter-spacing: 1px;
}
.ly-pw-strong  { background: linear-gradient(135deg, #1f5a3a, #3a7a55); }
.ly-pw-mid     { background: linear-gradient(135deg, #b8860b, #d4a24a); }
.ly-pw-neutral { background: linear-gradient(135deg, #8a7554, #b0997a); }
.ly-pw-weak    { background: linear-gradient(135deg, #7a5a3a, #a07a5a); }
.ly-pw-broken  { background: linear-gradient(135deg, #7a2a1e, #b8442e); }
.ly-power-score {
  color: var(--ll-brown);
  font-size: 12px;
}

/* ========== 2. 元神/忌神/仇神 三色 chip ========== */
.ly-yjc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0;
}
.ly-yjc-chip {
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  border: 1.5px solid transparent;
  background: #fdf8ee;
  transition: transform .2s, box-shadow .2s;
}
.ly-yjc-chip.ly-yjc-active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(94,71,51,.18);
}
.ly-yjc-yuan {
  background: linear-gradient(180deg, rgba(58,122,85,.14), rgba(58,122,85,.05));
  border-color: rgba(58,122,85,.35);
}
.ly-yjc-yuan .ly-yjc-role  { color: #2e5a3c; }
.ly-yjc-yuan .ly-yjc-name  { color: #1f5a3a; }
.ly-yjc-ji {
  background: linear-gradient(180deg, rgba(184,68,46,.14), rgba(184,68,46,.05));
  border-color: rgba(184,68,46,.35);
}
.ly-yjc-ji .ly-yjc-role  { color: #b8442e; }
.ly-yjc-ji .ly-yjc-name  { color: #7a2a1e; }
.ly-yjc-chou {
  background: linear-gradient(180deg, rgba(184,134,11,.14), rgba(184,134,11,.05));
  border-color: rgba(184,134,11,.4);
}
.ly-yjc-chou .ly-yjc-role  { color: #8a6d0e; }
.ly-yjc-chou .ly-yjc-name  { color: #6a5308; }
.ly-yjc-role {
  font-size: 11px;
  letter-spacing: 1px;
  opacity: .85;
  margin-bottom: 4px;
}
.ly-yjc-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}
.ly-yjc-info {
  font-size: 11px;
  color: var(--ll-brown);
  margin-bottom: 3px;
}
.ly-yjc-state {
  font-size: 11px;
  color: var(--ll-brown-2);
  font-style: italic;
}

/* ========== 3. 应期地支轮 ========== */
.ly-yq-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ly-yq-type {
  background: var(--ll-green);
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  letter-spacing: 1px;
}
.ly-yq-zhi { color: var(--ll-brown); font-size: 13px; }
.ly-yq-zhi strong { color: var(--ll-cinnabar); }
.ly-zhi-wheel {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 12px auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(253,248,238,.9), rgba(248,241,227,.5) 70%, rgba(184,134,11,.10));
  border: 1.5px solid rgba(184,134,11,.30);
  box-shadow: inset 0 0 24px rgba(94,71,51,.10);
}
.ly-zhi-cell {
  --r: 96px;   /* 半径 */
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  opacity: .70;
  transform: rotate(var(--ang)) translate(var(--r)) rotate(calc(-1 * var(--ang)));
  box-shadow: 0 2px 5px rgba(0,0,0,.15);
  transition: transform .3s, opacity .3s, box-shadow .3s;
}
.ly-zhi-cell .ly-zhi-name { font-size: 15px; line-height: 1; }
.ly-zhi-cell .ly-zhi-wx   { font-size: 9px; opacity: .8; margin-top: 2px; }
.ly-zhi-hit {
  opacity: 1;
  box-shadow:
    0 0 0 3px rgba(255,255,255,.9),
    0 0 0 5px var(--ll-cinnabar),
    0 4px 14px rgba(184,68,46,.45);
  z-index: 3;
  transform: rotate(var(--ang)) translate(var(--r)) rotate(calc(-1 * var(--ang))) scale(1.15);
}
.ly-zhi-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 68px; height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ll-cinnabar), var(--ll-gold-2));
  color: #fff;
  font-weight: 800;
  letter-spacing: 3px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(184,68,46,.35);
  font-size: 16px;
}

/* ========== 4. 卦身印章 ========== */
.ly-gs-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 4px;
}
.ly-gs-seal {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.20);
  letter-spacing: 0;
  position: relative;
  border: 3px double rgba(255,255,255,.4);
}
.ly-gs-info { flex: 1 1 auto; }
.ly-gs-line { font-size: 13px; color: var(--ll-brown); margin-bottom: 4px; }
.ly-gs-line strong { color: var(--ll-cinnabar); }
.ly-gs-desc { color: var(--ll-brown-2); font-size: 12px; line-height: 1.55; margin-top: 4px; }

/* ========== 5. 六冲六合流转箭头 ========== */
.ly-che-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 6px;
  flex-wrap: wrap;
}
.ly-che-badge {
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  letter-spacing: 1px;
  box-shadow: 0 3px 10px rgba(0,0,0,.15);
}
.ly-che-chong  { background: linear-gradient(135deg, #b8442e, #d55d47); }
.ly-che-he     { background: linear-gradient(135deg, #2e5a3c, #3a7a55); }
.ly-che-normal { background: linear-gradient(135deg, #8a7554, #b0997a); }
.ly-che-arrow {
  font-size: 22px;
  color: var(--ll-gold-2);
  font-weight: 800;
  animation: ly-che-pulse 2s ease-in-out infinite;
}
@keyframes ly-che-pulse {
  0%,100% { transform: translateX(0); opacity: .6; }
  50%     { transform: translateX(4px); opacity: 1; }
}
.ly-che-trans {
  width: 100%;
  text-align: center;
  color: var(--ll-cinnabar);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* ========== 6. 互卦/错卦/综卦 三列 ========== */
.ly-var-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0;
}
.ly-var-box {
  padding: 10px 8px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid rgba(94,71,51,.15);
}
.ly-var-hu   { background: linear-gradient(180deg, rgba(74,108,124,.14), rgba(74,108,124,.05)); }
.ly-var-cuo  { background: linear-gradient(180deg, rgba(184,68,46,.10),  rgba(184,68,46,.03)); }
.ly-var-zong { background: linear-gradient(180deg, rgba(58,122,85,.14),  rgba(58,122,85,.05)); }
.ly-var-role {
  font-size: 11px;
  color: var(--ll-brown-2);
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.ly-var-hex {
  font-size: 15px;
  font-weight: 700;
  color: var(--ll-ink);
  margin-bottom: 4px;
}
.ly-var-sep { color: var(--ll-gold-2); font-weight: 400; }
.ly-var-mean {
  font-size: 11px;
  color: var(--ll-brown);
  line-height: 1.5;
}

/* ========== 7. 三合局 ========== */
.ly-she-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px;
}
.ly-she-seal {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff;
  border: 2px double rgba(255,255,255,.5);
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
}
.ly-she-info { flex: 1 1 auto; }
.ly-she-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ll-ink);
  margin-bottom: 4px;
}
.ly-she-elems {
  display: flex; gap: 6px; margin-bottom: 4px; flex-wrap: wrap;
}
.ly-she-zhi {
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 12px;
  color: #fff;
  font-weight: 700;
}

/* ========== 移动端适配 ========== */
@media (max-width: 480px) {
  .ly-yjc-grid { grid-template-columns: 1fr; gap: 6px; }
  .ly-var-grid { grid-template-columns: 1fr; gap: 6px; }
  .ly-zhi-wheel { width: 200px; height: 200px; }
  .ly-zhi-cell  { --r: 78px; width: 34px; height: 34px; margin: -17px 0 0 -17px; }
  .ly-zhi-cell .ly-zhi-name { font-size: 13px; }
  .ly-zhi-cell .ly-zhi-wx   { font-size: 8px; }
  .ly-zhi-center { width: 56px; height: 56px; font-size: 13px; }
  .ly-che-badge { padding: 6px 12px; font-size: 13px; }
  .ly-gs-seal   { width: 54px; height: 54px; font-size: 24px; }
}

/* ========================================================================
   手动起卦（六爻） —— 出处：《卜筮正宗·成卦章》《增删卜易·首卷》
   ------------------------------------------------------------------------
   少阳 ─  / 少阴 ‖ / 老阳 ○ (动变阴) / 老阴 × (动变阳)
   ======================================================================== */

.ly-manual-tips {
  background: linear-gradient(180deg, rgba(255, 244, 224, 0.55), rgba(255, 238, 210, 0.28));
  border: 1px solid rgba(180, 140, 80, 0.28);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 8px 0 14px;
  font-size: 13px;
  color: #5b4a2f;
}
.ly-manual-tips-title {
  font-weight: 600;
  color: #7a5a2d;
  margin-bottom: 8px;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.ly-manual-tips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  flex-wrap: wrap;
}
.ly-manual-tips-hint {
  color: #7a6a4f;
  font-size: 12px;
  line-height: 1.55;
}

/* ---- 通用小标签（少阳/少阴/老阳/老阴） ---- */
.ly-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.ly-tag-yang {
  background: rgba(214, 90, 40, 0.14);
  color: #a44417;
  border-color: rgba(214, 90, 40, 0.36);
}
.ly-tag-yin {
  background: rgba(70, 100, 150, 0.14);
  color: #2f4d7a;
  border-color: rgba(70, 100, 150, 0.36);
}
.ly-tag-old-yang {
  background: rgba(214, 90, 40, 0.18);
  color: #8c3512;
  border: 1px dashed rgba(214, 90, 40, 0.65);
}
.ly-tag-old-yin {
  background: rgba(70, 100, 150, 0.18);
  color: #223c66;
  border: 1px dashed rgba(70, 100, 150, 0.65);
}

/* ---- 爻位行 ---- */
.ly-manual-yao-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.ly-manual-yao-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(180, 140, 80, 0.22);
  border-radius: 10px;
  background: rgba(255, 250, 240, 0.55);
}
.ly-manual-yao-name {
  min-width: 42px;
  font-size: 13px;
  font-weight: 600;
  color: #6b502a;
  letter-spacing: 1px;
  text-align: center;
}
.ly-manual-yao-btns {
  display: flex;
  gap: 6px;
  flex: 1;
  flex-wrap: wrap;
}

/* ---- 爻位按钮 ---- */
.ly-yao-btn {
  flex: 1 1 auto;
  min-width: 62px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid rgba(160, 130, 80, 0.32);
  border-radius: 8px;
  background: #fff;
  color: #5b4a2f;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s ease, background 0.15s ease;
  user-select: none;
  font-family: inherit;
}
.ly-yao-btn:hover {
  border-color: rgba(214, 154, 60, 0.7);
  background: rgba(255, 244, 220, 0.9);
}
.ly-yao-btn:active { transform: translateY(1px); }
.ly-yao-btn-sym {
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  color: #7a5a2d;
}
.ly-yao-btn-lbl {
  font-size: 11px;
  color: #6b5a3a;
  letter-spacing: 0.5px;
}
.ly-yao-btn.active {
  background: linear-gradient(180deg, #ffe8bf, #f6c477);
  border-color: #b47a2a;
  box-shadow: inset 0 0 0 1px rgba(180, 122, 42, 0.35);
}
.ly-yao-btn.active .ly-yao-btn-sym,
.ly-yao-btn.active .ly-yao-btn-lbl {
  color: #5c3a0f;
}

/* ---- 操作按钮 ---- */
.ly-manual-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(160, 130, 80, 0.4);
  color: #6b502a;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-ghost:hover {
  background: rgba(255, 244, 220, 0.7);
  border-color: rgba(180, 122, 42, 0.6);
}

/* ---- 移动端适配 ---- */
@media (max-width: 640px) {
  .ly-manual-yao-row { flex-wrap: wrap; }
  .ly-manual-yao-name { min-width: 36px; font-size: 12px; }
  .ly-yao-btn { min-width: 54px; padding: 5px 6px; }
  .ly-yao-btn-sym { font-size: 14px; }
  .ly-yao-btn-lbl { font-size: 10px; }
  .ly-manual-tips { font-size: 12px; padding: 10px 12px; }
}
