/* Oráculo I Ching — laca china imperial roja con líneas yang/yin doradas */
.ic-page { padding: 2rem 0 4rem; }
.ic-page .wrap { max-width: 880px; margin: 0 auto; padding: 0 1rem; }
.ic-header { text-align: center; margin-bottom: 2rem; }
.ic-header h1 { margin: 0 0 0.5rem; font-size: 2rem; color: #c8362e; }
.ic-intro { color: #555; line-height: 1.5; }

.ic-app {
  background: linear-gradient(160deg, #fff8ee 0%, #fdebd2 100%);
  border: 2px solid #c8362e;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 8px 24px rgba(80, 10, 10, 0.18);
}

.ic-stage { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: center; }
@media (min-width: 600px) {
  .ic-stage { grid-template-columns: 1fr 1fr; }
}

.ic-instruction { margin: 0 0 1rem; color: #6a2010; font-style: italic; text-align: center; }

/* Coin tray */
.ic-coin-area { text-align: center; }
.ic-counter { display: inline-block; padding: 0.35rem 0.9rem; background: #c8362e; color: #f5d088; border-radius: 999px; font-weight: bold; margin-bottom: 1rem; }
.ic-coins { display: flex; justify-content: center; gap: 0.6rem; min-height: 70px; align-items: center; margin-bottom: 1rem; }
.ic-coin {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5d088 0%, #c89244 100%);
  border: 2px solid #8a5a20;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; color: #4a2810;
  box-shadow: 0 3px 8px rgba(80, 30, 5, 0.4);
}
.ic-coin-spin { animation: ic-spin 0.6s linear infinite; }
@keyframes ic-spin {
  0%   { transform: rotateY(0deg) scale(1); }
  50%  { transform: rotateY(180deg) scale(0.85); background: linear-gradient(135deg, #c89244 0%, #f5d088 100%); }
  100% { transform: rotateY(360deg) scale(1); }
}

.ic-tirar-btn {
  background: #c8362e;
  color: #f5d088;
  border: 2px solid #8a5a20;
  border-radius: 8px;
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.2s, transform 0.1s;
}
.ic-tirar-btn:hover:not(:disabled) { background: #a82a22; transform: translateY(-1px); }
.ic-tirar-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Building hexagram (live) */
.ic-hex-build {
  display: flex; flex-direction: column; gap: 0.45rem;
  padding: 1rem; background: rgba(255, 245, 220, 0.5);
  border: 1px dashed rgba(138, 90, 32, 0.4);
  border-radius: 8px;
  min-height: 220px;
}
.ic-line-slot {
  display: flex; align-items: center; gap: 0.8rem;
  height: 24px;
}
.ic-line-num {
  width: 24px; text-align: center;
  font-size: 0.85rem; color: rgba(138, 90, 32, 0.6); font-weight: bold;
}
.ic-line-slot:not(.ic-filled) .ic-line-fig::before {
  content: ''; display: block; width: 100%; height: 4px;
  border-bottom: 2px dotted rgba(138, 90, 32, 0.3);
}
.ic-line-fig {
  flex: 1; display: flex; align-items: center; gap: 6px;
  height: 18px;
}
.ic-line-fig .ic-bar {
  flex: 1; height: 12px;
  background: linear-gradient(180deg, #6a2010 0%, #c8362e 50%, #6a2010 100%);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 200, 150, 0.4);
}
.ic-line-fig .ic-gap {
  width: 18px;
}
.ic-line-mutable .ic-bar {
  background: linear-gradient(180deg, #5a0808 0%, #ff2020 50%, #5a0808 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 6px rgba(255, 50, 50, 0.6);
  position: relative;
}
.ic-line-mutable::after {
  content: '✱';
  margin-left: 6px;
  color: #ff2020;
  font-size: 1.2rem;
  font-weight: bold;
}

/* Result */
.ic-result {
  margin-top: 2rem;
  display: flex; flex-direction: column; gap: 2rem;
}
.ic-hex-section {
  background: rgba(255, 250, 235, 0.7);
  border: 1px solid rgba(138, 90, 32, 0.3);
  border-radius: 10px;
  padding: 1.5rem;
}
.ic-hex-section h2 { margin: 0 0 0.5rem; color: #6a2010; font-size: 1.5rem; }
.ic-hex-section h3 { margin: 1rem 0 0.5rem; color: #6a2010; }
.ic-hex-mutation { border-left: 4px solid #ff2020; }
.ic-symbolism { color: #888; margin: 0 0 1rem; font-size: 1.05rem; }
.ic-hex-figure {
  display: flex; flex-direction: column; gap: 0.45rem;
  padding: 1rem; margin: 0 auto 1rem;
  max-width: 280px;
  background: rgba(200, 54, 46, 0.06);
  border-radius: 6px;
}
.ic-hex-figure .ic-line-fig { height: 18px; }
.ic-interpretation {
  line-height: 1.6;
  white-space: pre-wrap;
  color: #333;
  margin: 0;
}

.ic-lineas-section {
  background: rgba(255, 240, 200, 0.4);
  border-left: 4px solid #c8362e;
  padding: 1.2rem 1.5rem;
  border-radius: 6px;
}
.ic-lineas-section h3 { margin: 0 0 0.8rem; color: #6a2010; }
.ic-linea {
  padding: 0.7rem 0;
  border-bottom: 1px dotted rgba(138, 90, 32, 0.25);
  line-height: 1.55;
  color: #2a1408;
}
.ic-linea:last-child { border-bottom: none; }
.ic-linea strong { color: #c8362e; margin-right: 0.4rem; }
.ic-linea span { color: #2a1408; }

/* Force readable selection across the whole I Ching app */
.ic-app ::selection { background: #ffd966; color: #2a1408; }
.ic-app ::-moz-selection { background: #ffd966; color: #2a1408; }

.ic-restart {
  align-self: center;
  margin-top: 1rem;
  background: #c8362e;
  color: #f5d088;
  border: 2px solid #8a5a20;
  border-radius: 8px;
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}
.ic-restart:hover { background: #a82a22; }

.ic-error {
  margin-top: 1rem;
  padding: 0.8rem;
  background: #fee;
  border: 1px solid #c00;
  color: #900;
  border-radius: 6px;
  text-align: center;
}
