/**
 * @format
 *
 * YUKHYO ORACLE — the timeline's Celestial card (jsmodules)
 *
 * 2026-10-31 (owner note #11): extracted VERBATIM from main.css so the
 * standalone page can render the SAME card the Fortune Timeline renders.
 * The old standalone shipped its own 1132-line Yukhyo.js with a different
 * design (Debug/Sample buttons, "Enhanced astronomical data not available");
 * both are gone — one source, one look.
 *
 * Pillar 1: @imported by main.css (main.css?v bump required).
 * The standalone links this file directly.
 * ============================================================ */

/* ========================================
   YUKHYO ORACLE STYLES
   ======================================== */

.yukhyo-oracle-container {
  width: 100%;
  margin: 20px 0;
  display: none;
}

.yukhyo-oracle-container.active {
  display: block;
}

.yukhyo-card-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.yukhyo-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
  border: 2px solid var(--imperial-gold);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 
    0 8px 32px rgba(255, 215, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.yukhyo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--imperial-gold) 20%, 
    var(--shadow-purple) 50%, 
    var(--imperial-gold) 80%, 
    transparent 100%);
}

.yukhyo-card-header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  padding-bottom: 20px;
}

.yukhyo-card-header h3 {
  /* 2026-08-28 pass 2 (owner): the classical Korean serif — its Latin
     glyphs carry the same refined East-Asian cut as the Hangul/Hanja. */
  font-family: 'Noto Serif KR', 'Nanum Myeongjo', serif;
  font-size: 1.8em;
  font-weight: 700;
  color: var(--imperial-gold);
  margin: 0 0 10px 0;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  letter-spacing: 2px;
}

.yukhyo-card-subtitle {
  font-family: 'Quintessential', cursive;
  font-size: 1.1em;
  color: var(--shadow-purple);
  opacity: 0.9;
  letter-spacing: 1px;
}

.yukhyo-content {
  display: grid;
  /* 2026-08-26: minmax(0, 1fr) prevents grid blowout — the sections were
     sizing to their inner content and sticking out the card's right edge
     (the "dropdowns to the right" the owner saw on the phone). */
  grid-template-columns: minmax(0, 1fr);
  gap: 25px;
}

.yukhyo-section {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  padding: 20px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto; /* wide inner content scrolls inside the section */
}

.yukhyo-section h4 {
  font-family: 'Noto Serif KR', 'Nanum Myeongjo', serif;
  font-size: 1.3em;
  color: var(--imperial-gold);
  margin: 0 0 15px 0;
  text-align: center;
  letter-spacing: 1px;
}

/* Birth Information */
.birth-info {
  text-align: center;
}

.birth-display {
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.birth-date, .birth-time {
  font-family: 'Orbitron', monospace;
  font-size: 1.5em;
  color: var(--shadow-purple);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(180, 120, 255, 0.6);
}

.time-source {
  font-family: 'Orbitron', monospace;
  font-size: 0.8em;
  color: #ff6b6b;
  font-style: italic;
  margin-left: 10px;
  opacity: 0.8;
}

/* Four Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.pillar {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
}

.pillar-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.9em;
  color: var(--imperial-gold);
  margin-bottom: 8px;
  font-weight: 600;
}

.pillar-ganzhi {
  font-family: 'Orbitron', monospace;
  font-size: 1.2em;
  color: #ffffff;
  margin-bottom: 5px;
  font-weight: 700;
}

.pillar-element {
  font-family: 'Quintessential', cursive;
  font-size: 1em;
  color: var(--shadow-purple);
}

.pillar-element.day-master {
  color: var(--imperial-gold);
  font-weight: 700;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* Wu Xing Analysis */
.wuxing-grid {
  display: grid;
  gap: 12px;
}

.wuxing-element {
  display: grid;
  grid-template-columns: 80px 1fr 60px auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}

.element-name {
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  text-align: center;
}

.element-bar {
  background: rgba(0, 0, 0, 0.5);
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.element-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

.element-score {
  font-family: 'Orbitron', monospace;
  font-size: 0.9em;
  font-weight: 600;
  text-align: center;
}

.element-sources {
  font-size: 0.8em;
  opacity: 0.7;
  font-style: italic;
}

/* Element colors */
.wuxing-element.wood .element-name, .wuxing-element.wood .element-score {
  color: #4CAF50;
}
.wuxing-element.wood .element-fill {
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.wuxing-element.fire .element-name, .wuxing-element.fire .element-score {
  color: #F44336;
}
.wuxing-element.fire .element-fill {
  background: linear-gradient(90deg, #F44336, #FF9800);
}

.wuxing-element.earth .element-name, .wuxing-element.earth .element-score {
  color: #FF9800;
}
.wuxing-element.earth .element-fill {
  background: linear-gradient(90deg, #FF9800, #FFC107);
}

.wuxing-element.metal .element-name, .wuxing-element.metal .element-score {
  color: #9E9E9E;
}
.wuxing-element.metal .element-fill {
  background: linear-gradient(90deg, #9E9E9E, #CFD8DC);
}

.wuxing-element.water .element-name, .wuxing-element.water .element-score {
  color: #2196F3;
}
.wuxing-element.water .element-fill {
  background: linear-gradient(90deg, #2196F3, #03DAC6);
}

/* Trigram Section */
.trigram-display {
  text-align: center;
}

.trigram-name {
  font-family: 'Orbitron', monospace;
  font-size: 2em;
  color: var(--imperial-gold);
  font-weight: 700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
  margin-bottom: 10px;
}

.trigram-note {
  font-size: 0.9em;
  color: var(--shadow-purple);
  font-style: italic;
}

/* Hexagram Section */
.hexagram-info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
}

.hexagram-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hex-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Orbitron', monospace;
  font-size: 1.2em;
  color: #ffffff;
}

.hex-line.changing {
  color: var(--imperial-gold);
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.line-value {
  font-size: 0.8em;
  opacity: 0.7;
  min-width: 20px;
}

.hexagram-details {
  padding-left: 20px;
  border-left: 2px solid rgba(255, 215, 0, 0.3);
}

.changing-lines {
  font-family: 'Orbitron', monospace;
  color: var(--shadow-purple);
}

/* Summary Section */
.summary-content {
  line-height: 1.6;
}

.summary-content > div {
  margin-bottom: 10px;
}

.day-master, .dominant-element {
  font-family: 'Orbitron', monospace;
  color: var(--imperial-gold);
}

.destiny-note {
  margin-top: 15px;
  padding: 15px;
  background: rgba(180, 120, 255, 0.1);
  border: 1px solid rgba(180, 120, 255, 0.3);
  border-radius: 8px;
  font-style: italic;
  color: var(--shadow-purple);
  line-height: 1.7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .yukhyo-card {
    padding: 20px 15px;
  }
  
  .yukhyo-card-header h3 {
    font-size: 1.5em;
  }
  
  .pillars-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  
  .hexagram-info {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hexagram-details {
    padding-left: 0;
    padding-top: 15px;
    border-left: none;
    border-top: 2px solid rgba(255, 215, 0, 0.3);
  }
  
  .birth-display {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  /* 2026-08-26: reclaim the horizontal room for phones. */
  .yukhyo-card-container {
    padding: 0 8px;
  }

  .yukhyo-card {
    padding: 16px 10px;
  }

  .yukhyo-section {
    padding: 14px 10px;
  }

  .wuxing-element {
    grid-template-columns: 60px 1fr 45px;
    gap: 8px;
  }
  
  .element-sources {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 5px;
  }
  
  .yukhyo-card-header h3 {
    font-size: 1.3em;
  }
  
  .trigram-name {
    font-size: 1.5em;
  }
}

/* =======================
   YUKHYO EXPANDABLE SECTIONS & WU XING DIAGRAM
   ======================= */

/* Expandable Section Styles */
.expandable-section {
  transition: all 0.3s ease;
}

.expandable-section .section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.expandable-section.expanded .section-content {
  max-height: 2000px; /* Large enough to accommodate content */
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 15px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

.section-header:hover {
  background: rgba(255, 215, 0, 0.15);
  transform: translateY(-1px);
}

.section-icon {
  font-size: 1.2em;
}

.section-header h4 {
  margin: 0;
  flex: 1;
}

.expand-arrow {
  font-size: 0.8em;
  color: var(--shadow-purple);
  transition: transform 0.3s ease;
}

.expandable-section.expanded .expand-arrow {
  transform: rotate(180deg);
}

/* Subsection Styles */
.subsection {
  margin: 20px 0;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--shadow-purple);
  border-radius: 5px;
}

.subsection h5 {
  font-family: 'Orbitron', monospace;
  color: var(--imperial-gold);
  margin: 0 0 15px 0;
  font-size: 1em;
  letter-spacing: 1px;
}

/* Temporal Grid */
.temporal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
}

.temporal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.temporal-label {
  font-size: 0.9em;
  color: var(--shadow-purple);
  margin-bottom: 5px;
}

.temporal-value {
  font-family: 'Orbitron', monospace;
  color: var(--imperial-gold);
  font-weight: bold;
  font-size: 1.1em;
}

/* Trigram Grid */
.trigram-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
}

.trigram-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.trigram-label {
  font-family: 'Orbitron', monospace;
  color: var(--imperial-gold);
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 5px;
}

.trigram-desc {
  font-size: 0.9em;
  color: var(--shadow-purple);
}

/* Elements Harmony */
.elements-harmony {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.element-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.element {
  padding: 8px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9em;
}

.element.wood { background: rgba(76, 175, 80, 0.3); color: #4CAF50; }
.element.fire { background: rgba(244, 67, 54, 0.3); color: #F44336; }
.element.earth { background: rgba(255, 152, 0, 0.3); color: #FF9800; }
.element.metal { background: rgba(158, 158, 158, 0.3); color: #9E9E9E; }
.element.water { background: rgba(33, 150, 243, 0.3); color: #2196F3; }

.flow-arrow {
  color: var(--shadow-purple);
  font-weight: bold;
}

.dominance-info {
  display: flex;
  gap: 30px;
  justify-content: center;
}

.dominance-header, .needs-header {
  font-family: 'Orbitron', monospace;
  color: var(--imperial-gold);
  font-weight: bold;
}

/* Element Strength Grid */
.element-strength-grid {
  display: grid;
  gap: 10px;
}

.element-strength {
  display: flex;
  align-items: center;
  gap: 15px;
}

.element-name {
  width: 60px;
  font-size: 0.9em;
  font-weight: bold;
}

.strength-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.element-strength.wood .strength-fill { background: #4CAF50; }
.element-strength.fire .strength-fill { background: #F44336; }
.element-strength.earth .strength-fill { background: #FF9800; }
.element-strength.metal .strength-fill { background: #9E9E9E; }
.element-strength.water .strength-fill { background: #2196F3; }

/* Hexagram Lines */
.hexagram-info {
  display: flex;
  justify-content: center;
}

.hexagram-details {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hexagram-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hexagram-line {
  height: 8px;
  width: 60px;
  position: relative;
}

.hexagram-line.changing {
  opacity: 0.7;
}

.line-solid {
  height: 100%;
  background: var(--imperial-gold);
  border-radius: 2px;
}

.line-broken {
  height: 100%;
  display: flex;
  gap: 8px;
}

.line-broken span {
  flex: 1;
  background: var(--imperial-gold);
  border-radius: 2px;
}

.hexagram-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hexagram-names {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chinese-name {
  font-size: 1.8em;
  color: var(--imperial-gold);
}

.english-name {
  font-size: 1.1em;
  color: var(--shadow-purple);
}

.hexagram-trigrams {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trigram-symbol {
  font-size: 1.2em;
  color: var(--imperial-gold);
}

/* Wu Xing Diagram — MOVED to jsmodules/Yukhyo.css?v=7c59aaa6 (2026-08-28, owner
   ruling: the Ohaeng wheel is replaced by the two-phase trigram layout —
   pillar 1, the module CSS is @imported at the top of this file). */


.verdict-conclusion {
  font-family: 'Orbitron', monospace;
  color: var(--imperial-gold);
  font-weight: bold;
}

/* Narrative Section */
.narrative-section {
  border: none;
  background: rgba(180, 120, 255, 0.1);
}

.narrative-content {
  line-height: 1.7;
  font-size: 1.1em;
  color: #e0e0e0;
}

.narrative-content p {
  margin-bottom: 15px;
}

/* Responsive Design for New Elements */
@media (max-width: 768px) {
  .temporal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .trigram-grid {
    flex-direction: column;
    gap: 15px;
  }
  
  .element-flow {
    justify-content: flex-start;
    gap: 5px;
  }
  
  .element {
    font-size: 0.8em;
    padding: 6px 10px;
  }
  
  .dominance-info {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .hexagram-details {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .temporal-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    padding: 12px;
  }
  
  .subsection {
    padding: 12px;
  }
}
