/* ============================================================
   TTRPG STEED & MOUNT GENERATOR — tool-specific styles
   ============================================================ */

/* Ambient mood — earthy/stable warmth */
body::after {
  background:
    radial-gradient(ellipse 130% 55% at 50% -8%,  rgba(160,100,30,0.18) 0%,  transparent 60%),
    radial-gradient(ellipse 55%  45% at  4% 95%,  rgba(100,60,20,0.12)  0%,  transparent 55%),
    radial-gradient(ellipse 45%  40% at 96% 88%,  rgba(80,50,150,0.07)  0%,  transparent 55%),
    radial-gradient(ellipse 70%  35% at 50% 110%, rgba(160,120,40,0.07) 0%,  transparent 50%);
}

/* ---- Tool section wrapper ---- */
.tool-section { width: 100%; padding: 0; }

/* ---- Steed grid ---- */
.steed-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
  padding: 0 10px;
}

/* ---- Steed card ---- */
.steed-card {
  width: clamp(280px, 24vw, 440px);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 6px 28px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.055),
    inset 0 -1px 0 rgba(0,0,0,.3);
  transition: transform .38s cubic-bezier(.34,1.56,.64,1), box-shadow .28s ease;
  position: relative;
  font-size: clamp(13px, 0.85vw, 20px);
  display: flex;
  flex-direction: column;
}
.steed-card:hover {
  transform: translateY(-12px) scale(1.018);
  box-shadow:
    0 24px 60px rgba(0,0,0,.7),
    0 0 0 1.5px var(--steed-accent),
    0 0 30px color-mix(in srgb, var(--steed-accent) 25%, transparent),
    inset 0 1px 0 rgba(255,255,255,.07);
}
/* Tier-colored top accent bar */
.steed-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--steed-accent);
  z-index: 2;
  box-shadow: 0 0 14px var(--steed-accent), 0 0 4px rgba(255,255,255,.4);
}

/* Canvas area */
.steed-canvas-wrap {
  width: 100%;
  background: #0a0806;
  position: relative;
  overflow: hidden;
}
.steed-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- Info area ---- */
.steed-info {
  padding: 0.9em 1.1em 1.15em;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
  background: inherit;
}

/* Header */
.steed-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
}
.steed-name {
  font-family: var(--font-d);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
}
.steed-tier-badge {
  flex-shrink: 0;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .18rem .55rem;
  border-radius: 20px;
  border: 1px solid currentColor;
  white-space: nowrap;
  margin-top: 2px;
  line-height: 1.4;
  color: var(--steed-accent);
}

.steed-species-line {
  font-size: .8rem;
  color: var(--text2);
  font-style: italic;
}

.steed-coat-line {
  font-size: .78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.steed-coat-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.2);
}

.steed-bloodline {
  font-size: .72rem;
  color: var(--steed-accent);
  font-style: italic;
  opacity: 0.85;
}

/* Price */
.steed-price {
  font-size: .95rem;
  font-weight: 700;
  color: var(--steed-accent);
}

/* Sections */
.steed-section {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .55rem .7rem;
}
.steed-section-label {
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .3rem;
  font-weight: 700;
}
.steed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
}
.steed-tag {
  font-size: .7rem;
  padding: .15rem .4rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--text2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.steed-tag.temperament { border-color: rgba(160,120,255,0.3); color: #b89cff; }
.steed-tag.skill       { border-color: rgba(80,200,120,0.3);  color: #6ec48a; }
.steed-tag.quirk       { border-color: rgba(255,180,60,0.3);  color: #ffc46a; }

.steed-text-row {
  font-size: .78rem;
  color: var(--text2);
  line-height: 1.5;
}

/* Special rows */
.steed-special-row {
  font-size: .78rem;
  line-height: 1.5;
  border-radius: 4px;
  padding: .2rem .4rem;
  margin: 0 -.4rem;
}
.steed-special-row.rumor    { background: rgba(100,120,180,0.10); color: #a0b0e0; }
.steed-special-row.mystery  { background: rgba(120,60,200,0.10);  color: #c090ff; }
.steed-special-row.blessing { background: rgba(212,175,55,0.10);  color: #fde68a; }
.steed-special-row.curse    { background: rgba(220,38,38,0.10);   color: #f87171; }
.steed-special-row.condition{ background: rgba(100,80,40,0.12);   color: #c8a870; }

/* Owners */
.steed-owners {
  font-size: .72rem;
  color: var(--muted);
  font-style: italic;
}

/* Age / health row */
.steed-meta-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}
.steed-meta-pill {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  padding: .15rem .45rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.07);
  color: var(--text2);
  border: 1px solid var(--border);
}
.steed-meta-pill.health-excellent { color: #6ec48a; border-color: rgba(80,200,120,0.3); }
.steed-meta-pill.health-good      { color: #a0c880; border-color: rgba(140,200,80,0.25); }
.steed-meta-pill.health-fair      { color: #c8b060; border-color: rgba(200,160,60,0.25); }
.steed-meta-pill.health-poor      { color: #e08060; border-color: rgba(220,100,60,0.25); }
.steed-meta-pill.health-recovering{ color: #b090e0; border-color: rgba(170,130,220,0.3); }

/* ---- Card entrance animation ---- */
@keyframes steedIn {
  from { opacity: 0; transform: translateY(22px) scale(.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
.steed-card.anim { animation: steedIn .48s cubic-bezier(.34,1.56,.64,1) both; }

/* ---- Print ---- */
@media print {
  .steed-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    justify-content: unset !important;
  }
  .steed-card {
    background: #fff !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .steed-name, .steed-text-row, .steed-tag { color: #000 !important; }
  .steed-price { color: #7a5a00 !important; }
  .steed-section { background: #f8f8f0 !important; border-color: #ccc !important; }
  .steed-special-row { background: #f0f0f0 !important; color: #333 !important; }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .steed-grid { flex-direction: column; align-items: center; }
  .steed-card { width: 90vw; max-width: 400px; font-size: 14px; }
}
