/* ==========================================================================
   Destiny Hub — «Таро-Пасьянс» на сайте (games_tarot_solitaire.css)
   Классы ts-* сознательно совпадают с Mini App (templates/components/head/
   91_tarot_solitaire_styles.html), чтобы карты выглядели одинаково. Баннер
   гостя оформлен как games_durak.css/.durak-guest-banner для консистентности.
   ========================================================================== */

:root {
  --ts-card-w: clamp(46px, 12vw, 66px);
}

.tarot-guest-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(226, 184, 83, 0.06);
  border: 1px solid rgba(226, 184, 83, 0.15);
  border-radius: 16px;
  padding: 14px 18px;
  width: min(100%, 520px);
  margin: 0 0 4px;
  box-sizing: border-box;
}

.tarot-guest-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.tarot-guest-text {
  flex: 1;
  min-width: 160px;
}

#tarot-stats {
  margin: 0;
  color: var(--text, #edf2f7);
  font-size: 0.82rem;
  line-height: 1.4;
}

.tarot-guest-login {
  white-space: nowrap;
}

#tarot-section {
  width: 100%;
  max-width: 520px;
  gap: 14px;
}

.ts-guide {
  width: 100%;
  min-height: 20px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.22));
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted, rgba(255, 255, 255, 0.72));
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.ts-board-wrapper {
  position: relative;
  width: 100%;
  background: rgba(10, 8, 20, 0.6);
  border: 2px solid var(--border, rgba(255, 255, 255, 0.22));
  border-radius: var(--radius, 18px);
  padding: 14px 8px 18px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
}

.ts-pyramid {
  position: relative;
  min-height: max(230px, calc(var(--ts-card-w) * 5.55));
  max-width: 420px;
  margin: 0 auto;
}

.ts-card {
  position: absolute;
  width: var(--ts-card-w);
  aspect-ratio: 0.625;
  padding: 0;
  overflow: hidden;
  transform: translateX(-50%);
  border: 1px solid rgba(226, 184, 83, 0.55);
  border-radius: 6px;
  background: #100d1d;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.ts-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ts-card[disabled] {
  cursor: default;
  filter: saturate(0.35) brightness(0.45);
  border-color: rgba(255, 255, 255, 0.14);
}

.ts-card:not([disabled]):hover {
  transform: translateX(-50%) translateY(-3px) scale(1.04);
}

.ts-card.is-available {
  border-color: var(--gold, #e2b853);
  box-shadow: 0 0 0 1px rgba(226, 184, 83, 0.3), 0 3px 10px rgba(0, 0, 0, 0.5);
}

.ts-card.is-selected {
  outline: 2px solid var(--gold, #e2b853);
  outline-offset: 2px;
  transform: translateX(-50%) translateY(-6px) scale(1.06);
  box-shadow: 0 0 20px rgba(226, 184, 83, 0.6);
  z-index: 30 !important;
}

.ts-card.is-hinted {
  animation: tsHintPulse 0.7s ease-in-out infinite;
  z-index: 25 !important;
}

.ts-card-value {
  position: absolute;
  top: 2px;
  left: 3px;
  min-width: 15px;
  padding: 1px 2px;
  border-radius: 3px;
  background: rgba(5, 8, 18, 0.78);
  color: #fff4c7;
  font-size: 0.55rem;
  font-weight: 900;
  line-height: 1.15;
}

@keyframes tsHintPulse {
  50% { filter: brightness(1.5); box-shadow: 0 0 18px var(--gold, #e2b853); }
}

.ts-tray {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.ts-stock,
.ts-waste {
  position: relative;
  width: 66px;
  height: 92px;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(226, 184, 83, 0.55);
  border-radius: 8px;
  background: #100d1d;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  color: var(--text, #fff);
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ts-stock:disabled {
  cursor: default;
  opacity: 0.5;
}

.ts-waste img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ts-waste.is-selected {
  outline: 2px solid var(--gold, #e2b853);
  outline-offset: 2px;
}

.ts-spark {
  position: absolute;
  z-index: 50;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold, #e2b853);
  box-shadow: 0 0 10px var(--gold, #e2b853);
  pointer-events: none;
  animation: tsSpark 0.55s ease-out forwards;
}

@keyframes tsSpark {
  to { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.15); }
}

@media (max-width: 480px) {
  :root { --ts-card-w: 44px; }
  .ts-stock, .ts-waste { width: 54px; height: 76px; }
  .tarot-guest-banner { padding: 12px 14px; }
}
