.setup { display: grid; gap: 10px; margin-bottom: 14px; }
.opt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lbl { width: 60px; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pbars { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.pbar { flex: 1 1 140px; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); }
.pbar.turn { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent), var(--shadow); }
.pbar .nm { font-weight: 700; font-size: 0.9rem; }
.pbar .nm small { display: block; font-size: 0.68rem; font-weight: 600; color: var(--muted); }
.pbar b { margin-left: auto; font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.tray { padding-top: 32px; display: grid; gap: 14px; justify-items: center; margin-bottom: 6px; background: radial-gradient(ellipse at 50% 20%, #2d8a5c, #1d6b45 80%); border: 0; box-shadow: inset 0 0 0 5px #4a2e17, inset 0 0 30px rgba(0, 0, 0, 0.4), 0 12px 26px rgba(0, 0, 0, 0.35); color: #fff; }
.dice { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.die { --u: 62px; position: relative; width: var(--u); height: var(--u); border-radius: calc(var(--u) * 0.2); border: 0; padding: calc(var(--u) * 0.13); cursor: default; background: linear-gradient(150deg, #fff, #e3dcc8); box-shadow: 0 3px 0 #b9ae93, 0 6px 12px rgba(0, 0, 0, 0.4); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); transition: transform 0.14s, box-shadow 0.14s; font: inherit; }
.die i { border-radius: 50%; place-self: center; width: 72%; height: 72%; }
.die i.on { background: radial-gradient(circle at 35% 30%, #4b5066, #10121b 70%); }
.die[data-v="1"] i.on { background: radial-gradient(circle at 35% 30%, #ff7b7b, #c4242b 70%); }
.die.can { cursor: pointer; }
.die.can:hover, .die.can:focus-visible { transform: translateY(-4px); outline: none; }
.die.held { transform: translateY(-12px); box-shadow: 0 3px 0 #b9ae93, 0 0 0 4px #ffd65a, 0 10px 16px rgba(0, 0, 0, 0.45); }
.die.held::after { content: "KEPT"; position: absolute; left: 0; right: 0; bottom: -20px; text-align: center; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; color: #ffd65a; }
.die.rolling { animation: shake 0.42s ease-in-out; }
@keyframes shake { 20% { transform: translate(-3px, -6px) rotate(-14deg); } 45% { transform: translate(3px, 2px) rotate(12deg); } 70% { transform: translate(-2px, -3px) rotate(-8deg); } }
html[data-saver="on"] .die.rolling { animation: none; }
.die.blank { opacity: 0.5; }
.tray-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; margin-top: 10px; }
.tip { font-size: 0.85rem; font-weight: 700; opacity: 0.92; }

.card-wrap { overflow-x: auto; margin-top: 10px; }
.sheet { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); font-size: 0.92rem; }
.sheet th, .sheet td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.sheet th:first-child, .sheet td:first-child { text-align: left; }
.sheet thead th { background: var(--surface-2); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.sheet thead th.turn { color: var(--ink); box-shadow: inset 0 -3px 0 var(--gold); }
.sheet td.cat small { display: block; font-size: 0.68rem; color: var(--muted); font-weight: 500; }
.sheet td.val { font-weight: 800; font-variant-numeric: tabular-nums; }
.sheet td.col-turn { background: color-mix(in srgb, var(--gold) 10%, transparent); }
.sheet tr.sub td { background: var(--surface-2); font-weight: 700; font-size: 0.82rem; color: var(--muted); }
.sheet tr.total td { font-weight: 900; font-size: 1.05rem; border-bottom: 0; }
.sheet button.pick { font: inherit; font-weight: 800; min-width: 44px; padding: 4px 10px; border-radius: 999px; cursor: pointer; color: var(--ink); background: color-mix(in srgb, var(--green) 20%, var(--surface)); border: 1.5px dashed color-mix(in srgb, var(--green) 70%, transparent); }
.sheet button.pick:hover, .sheet button.pick:focus-visible { background: var(--green); color: #fff; border-style: solid; outline: none; }
.sheet button.pick.zero { background: transparent; border-color: var(--line-strong); color: var(--muted); }
.rules { margin: 18px 0 0; }
.rules summary { cursor: pointer; font-weight: 800; }
.rules ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.6; }
@media (max-width: 560px) { .die { --u: 52px; } .dice { gap: 9px; } .sheet th, .sheet td { padding: 7px 6px; font-size: 0.85rem; } }
