/* As qui montent (Aces Up) board — same green baize as the other Réussites,
   scoped under .au-root. Four wide columns, a stock + a discard counter above.
   Reuses the shared card SVGs. Four columns fit portrait, so no rotate prompt. */

.au-root {
  --felt: #1b6b49; --felt-hi: #2a7f5b; --gold: #d8b65c;
  --line: rgba(253, 252, 247, 0.22);
  --cw: 70px; --ch: calc(var(--cw) * 1.45); --gap: 14px; --r: calc(var(--cw) * 0.05);
  position: relative;
  padding: clamp(12px, 3vw, 26px) clamp(8px, 2.5vw, 22px);
  border-radius: var(--radius-md);
  background: var(--felt);
  background-image: radial-gradient(ellipse 80% 72% at 50% 22%, 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) { .au-root { --felt: #144d36; --felt-hi: #1d6046; } }
.au-root.mode-dark { --felt: #144d36; --felt-hi: #1d6046; }

.au-board { position: relative; margin: 0 auto; max-width: calc(var(--cw) * 4 + var(--gap) * 3); }
.au-head { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(12px, 3vw, 22px); }
.au-slot { position: relative; width: var(--cw); height: var(--ch); border-radius: var(--r); border: 1.5px solid var(--line); }
.au-stock { cursor: pointer; }
.au-stock.empty { cursor: default; opacity: 0.5; }
.au-stock:hover:not(.empty) { border-color: rgba(216, 182, 92, 0.5); }
.au-stock.au-hint { outline: 3px solid var(--gold); outline-offset: 2px; animation: au-hint 0.6s ease-in-out 2; }
.au-stock .card { position: absolute; inset: 0; }
.au-count { position: absolute; inset-block-end: 3px; inset-inline-end: 4px; z-index: 5; font-size: calc(var(--cw) * 0.22); font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
.au-discard { display: grid; place-items: center; border-style: dashed; }
.au-dnum { font-size: calc(var(--cw) * 0.4); font-weight: 700; line-height: 1; }
.au-dlab { font-size: calc(var(--cw) * 0.2); opacity: 0.6; }
.au-msg { margin-left: auto; font-size: 0.92rem; opacity: 0.9; }

.au-cols { display: grid; grid-template-columns: repeat(4, var(--cw)); gap: var(--gap); justify-content: center; }
.au-pile { position: relative; min-height: var(--ch); width: var(--cw); cursor: pointer; }
.au-pile > .au-base { position: absolute; inset: 0 0 auto 0; height: var(--ch); border-radius: var(--r); border: 1.5px solid var(--line); }

.au-root .card {
  position: absolute; left: 0; 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);
}
.au-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); }
.au-pile .card:not(.exposed) { filter: brightness(0.9); }
.au-pile .card.exposed { cursor: pointer; }
.au-pile .card.go { box-shadow: 0 0 0 2px var(--gold), 0 2px 8px rgba(0, 0, 0, 0.3); }
.au-pile .card.sel { outline: 3px solid #eaf3ed; outline-offset: 1px; z-index: 20; }
.au-root .card.au-hint { outline: 3px solid var(--gold); outline-offset: 1px; z-index: 40; animation: au-hint 0.6s ease-in-out 2; }

.au-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;
}
.au-sound:hover { opacity: 1; }
.au-sound.on { background: rgba(216, 182, 92, 0.22); border-color: rgba(216, 182, 92, 0.5); opacity: 1; }

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