/* Purpose: shared physical tile surfaces and readable hand sizing. Inputs: tile artwork and selected/drawn/disabled states. Outputs: ivory faces, warm back edges and restrained interaction feedback across every tile context. Boundaries: no page theme replacement or game-rule changes. */
.tile{
 --tile-depth:5px;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 position:relative;
 flex-shrink:0;
 width:48px;
 height:68px;
 padding:3px 3px 5px;
 border:1px solid #a5aaa7;
 border-top:3px solid #d3a24e;
 border-bottom:var(--tile-depth) solid #c7c9c2;
 border-radius:5px;
 background:linear-gradient(105deg,#fffefb 15%,#f7f7ef 75%,#e9ebe4);
 box-shadow:inset 1px 0 0 #fff, inset -1px 0 0 #dfe1d9,0 2px 2px #10292324;
 line-height:1;
 vertical-align:middle;
 isolation:isolate;
}
.tile .tile-face{
 display:block;
 width:100%;
 height:100%;
 min-width:0;
 object-fit:contain;
 pointer-events:none;
 user-select:none;
 -webkit-user-drag:none;
}
.tile.large{--tile-depth:6px;width:68px;height:94px;padding:4px 4px 6px;border-radius:6px}
.river-tile{--tile-depth:2px;width:25px;height:34px;padding:1px 1px 2px;border-top-width:2px;border-radius:3px;box-shadow:0 1px 1px #10292330}
.discard-pool{display:flex;flex-direction:column;min-height:0}
.discard-pool>small{flex-shrink:0}
.discard-pool>div{flex:1;min-height:0;max-height:none;gap:3px;padding-bottom:2px}
.player-hand{
 display:grid;
 grid-template-columns:repeat(13,minmax(0,1fr)) 10px minmax(0,1fr);
 align-items:end;
 gap:3px;
 max-width:850px;
 padding-top:6px;
 margin:0 auto 24px;
}
.player-hand .tile{
 width:100%;
 max-width:none;
 min-width:0;
 height:auto;
 aspect-ratio:3 / 4.25;
 padding:3px 2px 4px;
 transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.player-hand .tile.drawn{grid-column:15;margin-left:0;border-color:#c2a366;border-bottom-color:#c7c9c2;box-shadow:inset 0 0 0 1px #ead49b,0 2px 2px #10292324}
.player-hand .tile.selected{transform:translateY(-10px);background:#fff9dd;border-color:#b88730;border-bottom-color:#c6a566;box-shadow:0 0 0 2px #e4bd63,0 8px 10px #213b362e;z-index:1}
.player-hand .tile:focus-visible{outline:3px solid #987126;outline-offset:3px;z-index:2}
.player-hand .tile:disabled{opacity:1;filter:saturate(.7);cursor:default}
@media(hover:hover){
 .player-hand .tile:hover:not(:disabled):not(.selected){transform:translateY(-5px);box-shadow:0 4px 8px #213b3629}
 .player-hand .tile.selected:hover:not(:disabled){transform:translateY(-10px)}
}
@media(max-width:1050px){
 .game-layout{grid-template-columns:minmax(0,1fr)}
 .game-guide{padding-top:12px;max-width:720px}
}
@media(max-width:767px){
 .tile{--tile-depth:4px;padding:2px 2px 3px}
 .tile.large{--tile-depth:5px;width:53px;height:75px;padding:3px}
 .river-tile{--tile-depth:2px;width:23px;height:32px;padding:1px;border-top-width:2px}
 .lesson-tiles .tile{width:28px;height:42px;padding:1px;--tile-depth:3px}
 .group-examples .tile,.flow-steps .tile{width:27px;height:40px;padding:1px;--tile-depth:3px}
 .wait-groups .tile{width:28px;height:42px;padding:1px;--tile-depth:3px}
 .result-groups .tile{width:33px;height:46px;padding:1px;--tile-depth:3px}
 .player-hand{grid-template-columns:repeat(7,minmax(0,1fr));gap:12px 4px;max-width:400px;padding-top:4px}
 .player-hand .tile{height:auto;aspect-ratio:3 / 4.25;padding:2px;min-height:44px}
 .player-hand .tile.drawn{grid-column:auto;margin-left:0;box-shadow:inset 0 0 0 1px #ceaa56,0 2px 2px #10292324}
 .player-hand .tile.selected{transform:translateY(-6px);box-shadow:0 0 0 2px #d8ae4e,0 5px 7px #213b362e}
}
@media(prefers-reduced-motion:reduce){.player-hand .tile{transition:none}}
@media(max-width:380px){
 .lesson-tiles{flex-wrap:wrap;gap:8px;max-width:220px;margin-inline:auto}
 .lesson-tiles .tile{width:32px;height:47px}
 .group-examples,.flow-steps{grid-template-columns:minmax(0,1fr);gap:20px}
 .group-examples .tile,.flow-steps .tile{width:34px;height:48px}
}

/* Quiz choices reuse the same faces as the teaching diagrams; the whole row is the answer target. */
.quiz-options .quiz-option-tiles{display:flex;align-items:center;gap:6px;margin:0;min-width:0;flex-shrink:0}
.quiz-option-tiles .tile{width:48px;height:68px;pointer-events:none}
.quiz-options .quiz-option-feedback{margin-left:auto;min-width:0;flex-shrink:1;text-align:right;overflow-wrap:anywhere}
@media(max-width:767px){
 .quiz-options button{gap:10px;flex-wrap:wrap}
 .quiz-options .quiz-option-tiles{gap:5px}
 .quiz-option-tiles .tile{width:38px;height:54px;padding:2px}
 .quiz-options .quiz-option-feedback{font-size:11px}
}
