:root{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans",sans-serif;color:#2a2328;background:#e7e9e7;color-scheme:light;-webkit-text-size-adjust:100%}*{box-sizing:border-box}body{margin:0}button{font:inherit;color:inherit;background:#f3f4f6;border:1px solid #d7dadd;border-radius:8px;min-height:44px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.45}button:focus-visible,a:focus-visible{outline:3px solid #b08a39;outline-offset:-3px}[hidden]{display:none!important}.shell{max-width:450px;margin:auto;padding:2px 5px max(5px,env(safe-area-inset-bottom));height:calc(100svh - var(--nav-height,88px));height:calc(100dvh - var(--nav-height,88px));min-height:0;display:flex;flex-direction:column;gap:4px;background:#fffdf8}.hud{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:12px;min-height:44px;font-variant-numeric:tabular-nums}.hud button{padding:0 10px}.table{flex:1;min-height:160px;overflow-y:auto;background:#e5ecee;border:1px solid #a4b4ba;border-radius:12px;padding:7px 3px;color:#304d68;--card-h:72px;--step:32px;--back:#304d68;--pattern:repeating-linear-gradient(45deg,transparent 0 5px,#ffffff24 5px 7px)}.top{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;margin-bottom:12px}.columns{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;min-height:180px}.slot,.card{width:100%;height:var(--card-h);min-height:0;padding:3px 1px;text-align:left;border-radius:5px;font-size:15px;line-height:20px;font-weight:700;position:relative}.slot{border:1px dashed #879ba7;background:#ffffff30;text-align:center;font-size:21px}.stock{background:var(--pattern),var(--back);color:white;border:2px solid #fffcf6;text-align:center;font-size:12px}.stock.empty{background:#ffffff30;color:#304d68;border:1px dashed #879ba7}.card{background:#fffcf6;border:1px solid #b8c2c4;color:#273e53;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;box-shadow:0 1px 1px #253f5520}.card .lower{align-self:flex-end;transform:rotate(180deg)}.card.red{color:#aa394d}.card.back{background:var(--pattern),var(--back);border:2px solid #fffcf6}.card.back::after{content:attr(data-motif);align-self:center;margin:auto;color:#fff;font-size:20px}.column{position:relative;min-height:var(--card-h)}.column .card,.column .slot{position:absolute;top:calc(var(--at,0) * var(--step));left:0}.column .card:not(.last){height:var(--step);border-bottom:0;border-radius:5px 5px 0 0;box-shadow:none;justify-content:flex-start}.column .card:not(.last) .lower{display:none}.card[aria-pressed=true]{background:#fff0c9;outline:3px solid #b08a39;outline-offset:-3px}.card.back[aria-pressed=true]{background:var(--pattern),var(--back)}.destination{outline:3px dashed #526e84;outline-offset:-3px}.instruction{margin:0;font-size:12px;min-height:32px;line-height:16px;display:flex;align-items:center;color:#526779}.tools{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;font-size:13px}.companion{display:flex;align-items:center;gap:8px;min-height:70px}.companion img{object-fit:contain;align-self:flex-end;flex:none}.companion div{min-width:0}.companion span{font-size:11px;color:#526779}.companion p{font-size:12px;line-height:1.5;margin:3px 0}.save-note{font-size:11px;margin:0;color:#8b3f3f}dialog{width:calc(100% - 24px);max-width:420px;max-height:85dvh;padding:18px;border:1px solid #b4c1c5;border-radius:12px;background:#fff;color:#2a2328;overflow:auto}dialog::backdrop{background:#263f5770}dialog h2{font-size:19px;margin:0 0 10px}dialog p,dialog details{font-size:13px;line-height:1.65}dialog button{padding:8px}.primary{width:100%;background:#304d68;color:#fff;font-weight:700}fieldset{border:0;padding:0;margin:16px 0}legend{font-size:13px;font-weight:700;margin-bottom:8px}.choices,.skins{display:flex;gap:6px}.choices button{flex:1;font-size:11px;padding:4px}.choices img{display:block;width:62px;height:62px;object-fit:contain;margin:auto}.choices button[aria-pressed=true],.skins button[aria-pressed=true]{border:2px solid #526e84;background:#eef0f3}.skins{flex-wrap:wrap}.skins button{flex:1 0 42%;text-align:left;font-size:12px}.skin-sample{display:inline-grid;place-items:center;width:28px;height:38px;border-radius:4px;color:white;margin-right:5px}.new-actions{display:flex;gap:6px;margin-top:16px}.new-actions button{flex:1;font-size:12px}#confirm{padding:8px;background:#eef0f3;margin-top:10px;border-radius:8px}#records{font-size:12px;line-height:1.7;margin:10px 0}summary{min-height:44px;display:flex;align-items:center;text-decoration:underline;touch-action:manipulation}.game-title-accessible{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media(max-width:350px){.table{--card-h:64px;--step:30px}.card{font-size:13px}.slot{font-size:17px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Empty targets explain the ordering without adding a separate heading. */
.slot small{display:block;font-size:10px;font-weight:400;line-height:16px}.stock{white-space:pre-line}

/* Keep rank and suit inside the exposed strip of an overlapping card. */
.column .card:not(.last){padding-top:5px}.card.red.slot{color:#aa394d}.instruction{overflow-wrap:anywhere}.destination{background-color:#edf3f5}

/* Scroll only the table on short screens; keep draw and foundation targets visible. */
.hud,.instruction,.tools,.companion,.save-note{flex-shrink:0}.top{position:sticky;top:-7px;z-index:3;padding-top:4px;padding-bottom:6px;background:#e5ecee}.table{scroll-padding-top:94px;overscroll-behavior:contain}.columns{padding-bottom:5px}.companion p{min-height:36px}
