.yj-wait-game-entry { display:block; margin:8px 0 8px auto; padding:7px 12px; border:1px solid #ddd6ec; border-radius:20px; background:#faf8ff; color:#65547b; font:inherit; font-size:12px; cursor:pointer; }
.yj-wait-game-entry[hidden] { display:none; }
.yj-wait-game { position:fixed; inset:0; margin:auto; width:min(430px, calc(100vw - 32px)); box-sizing:border-box; max-height:calc(100dvh - 32px); overflow:auto; padding:22px; border:1px solid #e6e0ee; border-radius:24px; color:#342b42; background:#faf8fc; box-shadow:0 16px 64px #22123322; }
.yj-wait-game::backdrop { background:#231b384d; }
.yj-wait-game header { display:flex; align-items:center; justify-content:space-between; }
.yj-wait-game h2 { margin:4px 0; font-size:25px; }
.yj-wait-game small,.yj-wait-game p { color:#786c85; font-size:12px; line-height:1.6; }
.yj-wait-game button { cursor:pointer; font-family:inherit; }
.yj-wait-game [data-close] { width:44px; height:44px; border:0; border-radius:50%; background:#eee9f4; color:#65547b; font-size:24px; }
.yj-wait-game-board { position:relative; aspect-ratio:1.18; margin:8px 0; background:#edf1e8; border-radius:18px; }
.yj-stack-card { position:absolute; width:22%; height:22%; border:2px solid #ded4bd; border-radius:12px; background:#fffdf4; box-shadow:0 4px 0 #c5b99f; font-size:28px; padding:0; }
.yj-stack-card:disabled { background:#d8d9ce; filter:brightness(.82); cursor:default; }
.yj-stack-tray { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; padding:8px; background:#e8e1ef; border-radius:12px; }
.yj-stack-tray span { aspect-ratio:1; display:grid; place-items:center; font-size:23px; border-radius:7px; background:#fffdf7; }
.yj-stack-levels,.yj-stack-tools { display:flex; gap:6px; margin:12px 0; }
.yj-stack-levels button,.yj-stack-tools button { flex:1; min-height:42px; border:1px solid #ded5e8; border-radius:10px; background:white; color:#65547b; padding:5px; }
.yj-stack-levels button[aria-pressed="true"] { background:#eae1f4; border-color:#8f73ad; color:#513568; font-weight:600; }
.yj-stack-tools button:disabled { opacity:.45; cursor:default; }
.yj-wait-game button:focus-visible { outline:3px solid #8871b0; outline-offset:2px; }
.yj-wait-game footer { display:flex; gap:8px; }
.yj-wait-game footer button { min-height:44px; flex:1; border:1px solid #ded5e8; border-radius:12px; background:white; color:#65547b; }
.yj-wait-game [data-return] { background:#6e568e; color:white; border-color:#6e568e; }
.yj-wait-game .yj-wait-game-status { margin-bottom:0; text-align:center; }

.yj-stack-piles { display:flex; gap:12px; margin:12px 0; }
.yj-stack-piles[hidden] { display:none; }
.yj-stack-draw { flex:1; min-height:44px; border:2px solid #cdbadd; border-radius:10px; background:#f0e8f7; color:#654a80; box-shadow:3px 3px 0 #d5c6e2; font-size:18px; }
.yj-stack-draw:disabled { opacity:.5; cursor:default; }

.yj-stack-field { position:absolute; inset:0; }
.yj-wait-game-board.has-piles { aspect-ratio:1; }
.yj-wait-game-board.has-piles .yj-stack-field { bottom:64px; }
.yj-stack-piles { position:absolute; bottom:10px; left:12px; right:12px; margin:0; z-index:20; justify-content:center; gap:22px; }
.yj-stack-draw { flex:0 1 120px; min-height:44px; border-color:#ded4bd; background:#fffdf4; color:#65533e; box-shadow:2px 3px 0 #d3c8ae,4px 6px 0 #bfb597; font-size:14px; }

.yj-stack-draw { display:flex; align-items:center; justify-content:center; gap:10px; white-space:nowrap; }
.yj-pile-icon { font-size:26px; }

.yj-wait-game.has-result footer { padding:8px 0; background:#faf8fc; }
.yj-wait-game.has-result .yj-wait-game-status { color:#513568; font-weight:600; }

/* Keep touch targets >=44px even on 320px screens; allow dialog scrolling. */
.yj-wait-game-board { min-height:200px; }
.yj-wait-game-board.has-piles { min-height:264px; }
.yj-wait-game footer { position:static; padding:8px 0; background:#faf8fc; }
.yj-wait-game-board { width:100%; box-sizing:border-box; }

.yj-wait-sound { display:block; margin:4px 0 0 auto; min-height:32px; padding:4px 8px; border:0; border-radius:8px; background:#eee8f4; color:#65547b; font-size:12px; }

/* Each pending card provides the same optional game entry. */
#resultPanel .skeleton-img .yj-wait-game-entry {margin:10px auto 0;padding:6px 14px;min-height:32px;flex-shrink:0;font-size:12px;line-height:1.4;}
