/* Yams / Yahtzee — plateau family (design/Jeu - Yams). Ivory dice on a dark mat,
   beside a paper scorecard, the whole thing on the warm leather surface, the same
   in light and dark. Held dice lift off the mat; the sheet previews what the
   current dice would score in each free line. Scoped under .yams-root. */

.yams-root { display: flex; flex-direction: column; align-items: stretch; inline-size: 100%; color: var(--color-text); }

.yams-surface {
  inline-size: 100%; box-sizing: border-box;
  background: #43302b; border-block: 1px solid #2c1f1b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  padding: var(--space-6) 0; color: #f4ece5;
}
.yams-inner { max-inline-size: 1060px; margin-inline: auto; padding-inline: var(--space-4); box-sizing: border-box; display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: flex-start; justify-content: center; }
.yams-main { flex: 0 1 auto; display: flex; flex-direction: column; gap: var(--space-4); align-items: center; }

/* The mat: green felt; dice roll here, held dice lift off it. */
.yams-tapis { padding: 28px 30px 34px; border-radius: var(--radius-md); background: radial-gradient(120% 90% at 50% 0%, #24543f 0%, #1e4739 55%, #163529 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -3px 10px rgba(0, 0, 0, 0.42), 0 18px 34px rgba(0, 0, 0, 0.38); }
.yams-dice { display: flex; gap: 16px; justify-content: center; }
.yams-cadre { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.yams-mention { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(244, 236, 229, 0.78); min-block-size: 1em; }
.yams-mention.kept { color: #e1ad66; }
.yams-die {
  --pip: #23201c;
  inline-size: clamp(44px, 12vw, 56px); aspect-ratio: 1; padding: 8px; min-inline-size: 0; box-sizing: border-box;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 3px;
  border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(158deg, #fffdf7 0%, #f7f1e4 46%, #e2d7c2 100%);
  box-shadow: 0 4px 7px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 4px rgba(0, 0, 0, 0.12);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.yams-die:disabled { cursor: default; }
.yams-die.empty { background: rgba(244, 236, 229, 0.16); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4); }
.yams-die.held { box-shadow: 0 10px 14px rgba(0, 0, 0, 0.5), 0 0 0 2px var(--color-accent-400), inset 0 2px 0 rgba(255, 255, 255, 0.6); transform: translateY(-8px); }
.yams-die:not(:disabled):hover { filter: brightness(1.04); }
.yams-pip { border-radius: 50%; background: transparent; }
.yams-pip.on { background: radial-gradient(circle at 38% 32%, #4a463f, var(--pip) 75%); box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.4); }
@keyframes yams-roll { 0% { transform: rotate(0) scale(1); } 30% { transform: rotate(-16deg) scale(1.08); } 60% { transform: rotate(12deg) scale(1.04); } 100% { transform: rotate(0) scale(1); } }
.yams-die.rolling { animation: yams-roll 0.4s ease; }

/* Actions + message, on the leather. */
.yams-actions { display: flex; align-items: center; justify-content: center; gap: var(--space-3); }
.yams-roll { font-family: var(--font-heading); font-weight: 600; font-size: 15px; min-block-size: 46px; padding: 0 22px; cursor: pointer; color: #2c1f1b; background: var(--color-accent-400); border: 1px solid var(--color-accent-400); border-radius: var(--radius-md); }
.yams-roll:hover:not(:disabled) { filter: brightness(1.04); }
.yams-roll:active:not(:disabled) { transform: translateY(1px); }
.yams-roll:disabled { opacity: 0.4; cursor: default; }
.yams-rolls { font-size: 12.5px; color: rgba(244, 236, 229, 0.86); font-variant-numeric: tabular-nums; }
.yams-msg { text-align: center; min-block-size: 1.4em; margin: 0; font-size: 12.5px; line-height: 1.6; color: rgba(244, 236, 229, 0.78); max-inline-size: 40ch; }

/* The sheet: a paper scorecard (light in both themes, on the leather). */
.yams-feuille { flex: 0 1 330px; min-inline-size: 300px; }
.yams-card { border: 1px solid var(--color-neutral-400); border-radius: var(--radius-sm); overflow: hidden; background: #f8f4f4; color: #2a2620; box-shadow: var(--shadow-sm); }
.yams-section { font-family: var(--font-heading); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent-700); padding: 8px 14px; background: #eae7e7; border-block-end: 1px solid #d7d3d3; }
.yams-row, .yams-total { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); inline-size: 100%; box-sizing: border-box; padding: 8px 14px; text-align: start; border: none; border-block-start: 1px solid #eae7e7; background: transparent; color: #2a2620; font-family: var(--font-body); font-size: 14px; }
.yams-row:first-of-type { border-block-start: none; }
.yams-row { cursor: pointer; }
.yams-row:disabled { cursor: default; }
.yams-name { flex: 1 1 auto; }
.yams-val { flex: 0 0 auto; min-inline-size: 2.4em; text-align: end; font-variant-numeric: tabular-nums; font-weight: 600; }
.yams-row.preview:not(:disabled):hover { background: rgba(182, 130, 53, 0.14); }
.yams-row.preview .yams-val { color: var(--color-accent-700); }
.yams-row.preview.zero .yams-val { color: #9b9797; }
.yams-row.scored { background: #eae7e7; }
.yams-row.scored .yams-name { color: #7d7979; }
.yams-total { font-weight: 600; background: #eae7e7; }
.yams-total.sub { font-size: 13px; color: #565251; }
.yams-total.grand { font-family: var(--font-heading); font-size: 17px; border-block-start: 2px solid var(--color-accent); color: var(--color-accent-700); }
.yams-total.grand .yams-val { color: var(--color-accent-700); }

/* New game + hint below the surface, on the page ground (theme-following). */
.yams-foot { text-align: center; margin-block-start: var(--space-4); }
.yams-new { font-family: var(--font-heading); font-weight: 600; font-size: 14px; min-block-size: 44px; cursor: pointer; padding: 0 20px; color: var(--color-neutral-800); background: transparent; border: 1px solid var(--color-neutral-400); border-radius: var(--radius-md); }
.yams-new:hover { border-color: var(--color-accent); color: var(--color-accent-700); }
:root[data-theme="dark"] .yams-new { color: #d7d3d3; border-color: #56514b; }
.yams-hint { text-align: center; font-size: 12px; color: var(--color-neutral-600); max-inline-size: 560px; margin-inline: auto; padding-block-start: var(--space-3); }
.lz-variants.yams-inline-chips { margin: 0; }

.yams-root.no-motion .yams-die.rolling { animation: none; }
@media (prefers-reduced-motion: reduce) { .yams-die.rolling { animation: none; } }
