/* Les Trois Pics (TriPeaks) board — same green-baize texture as the other
   Réussites (per-game texture allowed, ARCHITECTURE.md §6), scoped under
   .tp-root. Three overlapping peaks (absolute positioning), stock + waste
   below. Reuses the shared card SVGs. */

.tp-root {
  --felt: #1b6b49; --felt-hi: #2a7f5b; --gold: #d8b65c;
  --line: rgba(253, 252, 247, 0.22);
  --cw: 56px;
  --ch: calc(var(--cw) * 1.45);
  --r: calc(var(--cw) * 0.05);
  position: relative;
  padding: clamp(12px, 3vw, 26px) clamp(6px, 2vw, 18px);
  border-radius: var(--radius-md);
  background: var(--felt);
  background-image: radial-gradient(ellipse 82% 70% at 50% 24%, var(--felt-hi), var(--felt) 74%);
  color: #eaf3ed; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(20, 17, 14, 0.25), var(--shadow-sm);
}
@media (prefers-color-scheme: dark) { .tp-root { --felt: #144d36; --felt-hi: #1d6046; } }
.tp-root.mode-dark { --felt: #144d36; --felt-hi: #1d6046; }

.tp-board { position: relative; margin: 0 auto; max-width: calc(var(--cw) * 10.4); }
.tp-peaks { position: relative; width: 100%; margin: 0 auto; }

.tp-root .card {
  position: absolute; width: var(--cw); height: var(--ch); border-radius: var(--r);
  user-select: none; touch-action: manipulation;
  box-shadow: 0 -1px 0 rgba(20, 17, 14, 0.16), 0 -3px 6px rgba(0, 0, 0, 0.2), 0 2px 3px rgba(0, 0, 0, 0.12);
}
.tp-root .cf { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; object-fit: fill; z-index: 2; border-radius: var(--r); }

/* covered cards (face down) sit dim; free-but-not-playable cards are bright;
   playable cards get a gold ring and a pointer. */
.tp-peaks .card.down { filter: brightness(0.82); }
.tp-peaks .card.free { filter: none; }
.tp-peaks .card.play { cursor: pointer; box-shadow: 0 0 0 2px var(--gold), 0 2px 8px rgba(0, 0, 0, 0.3); }
.tp-peaks .card.play:hover { transform: translateY(-2px); }
.tp-root .card.tp-hint { outline: 3px solid var(--gold); outline-offset: 1px; z-index: 40; animation: tp-hint 0.6s ease-in-out 2; }

.tp-foot { display: flex; align-items: center; gap: clamp(12px, 4vw, 30px); margin-top: clamp(12px, 3vw, 24px); flex-wrap: wrap; }
.tp-slot { position: relative; width: var(--cw); height: var(--ch); border-radius: var(--r); border: 1.5px solid var(--line); }
.tp-stock { cursor: pointer; }
.tp-stock.empty { cursor: default; opacity: 0.5; }
.tp-stock:hover:not(.empty) { border-color: rgba(216, 182, 92, 0.5); }
.tp-stock.tp-hint { outline: 3px solid var(--gold); outline-offset: 2px; animation: tp-hint 0.6s ease-in-out 2; }
.tp-stock .card, .tp-waste .card { position: absolute; inset: 0; }
.tp-count { position: absolute; inset-block-end: 3px; inset-inline-end: 4px; z-index: 5; font-size: calc(var(--cw) * 0.24); font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
.tp-msg { margin-left: auto; font-size: 0.92rem; opacity: 0.9; align-self: center; }

.tp-sound {
  position: absolute; inset-block-start: 4px; inset-inline-end: 4px; z-index: 55;
  inline-size: 30px; block-size: 30px; border-radius: 50%; padding: 0;
  border: 1px solid rgba(253, 252, 247, 0.22); background: rgba(0, 0, 0, 0.18);
  color: #eaf3ed; font-size: 15px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; opacity: 0.65;
}
.tp-sound:hover { opacity: 1; }
.tp-sound.on { background: rgba(216, 182, 92, 0.22); border-color: rgba(216, 182, 92, 0.5); opacity: 1; }

@keyframes tp-hint { 0%, 100% { outline-color: var(--gold); } 50% { outline-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .tp-peaks .card.play:hover { transform: none; } .tp-root .card.tp-hint { animation: none; } }
