/* Destination previews are inert; the previous card returns from the left. */
.flash-deck{position:relative;flex:1;min-height:0;isolation:isolate}
.flash-deck>.flash-card,.flash-deck>.flash-underlay{position:absolute;inset:0;width:100%;height:100%;margin:0;box-sizing:border-box}
.flash-deck>.flash-card{z-index:2;transform-origin:50% 50%}
.flash-deck>.flash-underlay{z-index:1;border:1px solid var(--line);box-shadow:0 5px 20px #293b3209;pointer-events:none;visibility:hidden;opacity:0;transform:translateY(12px) scale(.96)}
.flash-deck[data-swipe]>.flash-underlay{visibility:visible;opacity:calc(.7 + var(--deck-progress,0)*.3);transform:translateY(calc(12px*(1 - var(--deck-progress,0)))) scale(calc(.96 + var(--deck-progress,0)*.04))}
.flash-deck[data-swipe="previous"]>.flash-underlay{z-index:3;opacity:1;transform:translateX(calc(-105%*(1 - var(--deck-progress,0))))}
.flash-deck[data-settling]>.flash-underlay{transition:transform .3s ease-out,opacity .3s ease-out}
.flash-preview-end{margin:auto;color:var(--muted);font-size:18px}
.flash-screen .flash-actions{min-height:48px;gap:8px;margin-top:3px}
.flash-screen .flash-actions>button{min-height:48px;border:1px solid var(--line);border-radius:14px;background:#fffefb;font-size:15px;font-weight:500;touch-action:manipulation}
.flash-screen .flash-actions .rating-fuzzy{color:#a16f3f;background:#faf3e9}
.flash-screen .flash-actions .rating-known{color:#416650;background:#eaf2e9}
.flash-screen .flash-actions .flash-previous{padding:8px;color:#6b7a88}
.flash-screen .flash-actions>button:disabled{opacity:.4;cursor:default}
.flash-screen .flash-swipe-cue{inset:12px 12px auto auto;font-size:17px;padding:5px 11px;pointer-events:none}
.flash-screen .flash-done{position:relative;white-space:nowrap}
.flash-screen .flash-header{position:relative;z-index:3}
.flash-screen.is-collecting .flash-done:after{content:'✓ 已记住';position:absolute;inset:-5px -7px;display:grid;place-items:center;border:1px solid #abc5ac;border-radius:20px;background:#e1eedf;color:#416650;font-size:12px;white-space:nowrap;box-shadow:0 0 0 5px #eaf2e94d}
@media(max-width:350px){.flash-screen .flash-actions,.flash-screen .flash-actions>button{min-height:44px}.flash-screen .flash-actions>button{font-size:14px}}
@media(prefers-reduced-motion:reduce){.flash-deck>.flash-card,.flash-deck>.flash-underlay{will-change:auto!important;transition:none!important}}

/* One fixed interaction throughout the card: horizontal rating, native vertical reading. */
.flash-screen .flash-card,.flash-screen .flash-card .flash-word,.flash-screen .flash-headword,.flash-screen .flash-recall,.flash-screen .flash-reading-scroll{touch-action:pan-y pinch-zoom}
.flash-screen .flash-card .flash-word{cursor:grab}
.flash-screen .flash-swipe-cue{inset:14px 14px auto auto}
.flash-screen .flash-card[data-direction="known"] .flash-swipe-cue{inset:14px auto auto 14px}
.flash-screen .flash-counts{align-items:center;min-height:34px}
.flash-previous-control{margin-left:auto;flex:none;min-height:32px;padding:4px 10px;border:1px solid #dce2d5;border-radius:9px;background:#fffefb;color:#5d715f;font:inherit;font-size:12px;line-height:1.4;cursor:pointer;touch-action:manipulation}
.flash-previous-control:disabled{opacity:.4;cursor:default}
.flash-previous-control:focus-visible{outline:2px solid #6d8e73;outline-offset:2px}
.flash-desk-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
