.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); }

.scores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.score { 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); }
.score.turn { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent), var(--shadow); }
.score .nm { font-weight: 700; font-size: 0.9rem; }
.score .nm small { display: block; font-size: 0.68rem; font-weight: 600; color: var(--muted); }
.score b { margin-left: auto; font-size: 1.6rem; font-variant-numeric: tabular-nums; }

/* tiles: --u is the size of one half */
.tile { --u: 40px; display: inline-flex; flex: none; border-radius: calc(var(--u) * 0.2); background: linear-gradient(160deg, #fffdf6, #e9e1cc); border: 1px solid #a89e86; box-shadow: 0 2px 0 #b5ab92, 0 4px 8px rgba(0, 0, 0, 0.35); position: relative; }
.tile.h { flex-direction: row; width: calc(var(--u) * 2); height: var(--u); }
.tile.v { flex-direction: column; width: var(--u); height: calc(var(--u) * 2); }
.tile .half { width: var(--u); height: var(--u); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: calc(var(--u) * 0.14); box-sizing: border-box; }
.tile .half i { border-radius: 50%; place-self: center; width: 78%; height: 78%; }
.tile .half i.on { background: radial-gradient(circle at 35% 30%, #4b5066, #10121b 70%); }
.tile::after { content: ""; position: absolute; background: rgba(90, 80, 60, 0.45); }
.tile.h::after { left: 50%; top: 14%; width: 2px; height: 72%; transform: translateX(-1px); }
.tile.v::after { top: 50%; left: 14%; height: 2px; width: 72%; transform: translateY(-1px); }
.tile.back { background: linear-gradient(160deg, #3a4a8a, #263063); border-color: #151b3e; box-shadow: 0 2px 0 #151b3e, 0 3px 6px rgba(0, 0, 0, 0.35); }
.tile.back::after { background: rgba(255, 255, 255, 0.25); }
.tile.back .half i { display: none; }

.opp-hand { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; min-height: 40px; margin-bottom: 8px; align-items: flex-end; }
.opp-hand .tile { --u: 20px; }
.opp-hand .yard { margin-left: 12px; align-self: center; color: var(--muted); font-size: 0.8rem; font-weight: 700; }

.dom-board { --u: 32px; background: radial-gradient(ellipse at 50% 30%, #2d8a5c, #1d6b45 75%); border-radius: 18px; padding: 14px 8px; min-height: 140px; box-shadow: inset 0 0 0 6px #4a2e17, inset 0 0 30px rgba(0, 0, 0, 0.4), 0 14px 30px rgba(0, 0, 0, 0.4); display: grid; align-content: center; }
.chain { display: grid; gap: 6px; justify-items: center; }
.chain .row { display: flex; align-items: center; justify-content: center; gap: 3px; flex-wrap: nowrap; }
.chain .tile { --u: var(--u); }
.chain .tile.last { box-shadow: 0 0 0 3px #ffd65a, 0 4px 8px rgba(0, 0, 0, 0.35); animation: land 0.35s ease-out; }
@keyframes land { from { transform: scale(1.35); opacity: 0.4; } }
html[data-saver="on"] .chain .tile.last { animation: none; }
.chain .empty { color: rgba(255, 255, 255, 0.7); font-weight: 700; padding: 30px 0; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 10px; min-height: 42px; }
.choice { display: flex; gap: 8px; }

.my-hand { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 14px 0 4px; min-height: 100px; }
.my-hand .tile { --u: 38px; cursor: pointer; transition: transform 0.12s; }
.my-hand .tile.ok:hover, .my-hand .tile.ok:focus-visible { transform: translateY(-8px); outline: none; }
.my-hand .tile.ok { box-shadow: 0 2px 0 #b5ab92, 0 0 0 3px rgba(255, 214, 90, 0.85), 0 6px 10px rgba(0, 0, 0, 0.35); }
.my-hand .tile.sel { transform: translateY(-12px); box-shadow: 0 2px 0 #b5ab92, 0 0 0 3px #fff, 0 8px 12px rgba(0, 0, 0, 0.4); }
.my-hand .tile:not(.ok) { opacity: 0.55; cursor: default; }
.my-hand.covered .tile { opacity: 1; }

.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; }
