/* A flashcards: direct manipulation, with keyboard and assistive fallbacks. */
html[data-design=nebula] .n-card-stage{position:relative;isolation:isolate;perspective:1000px}
html[data-design=nebula] .n-card-stage:before{content:'';position:absolute;inset:7px 5px -5px;border:1px solid #7ed8dc25;border-radius:23px;background:linear-gradient(125deg,#193148,#211e37);z-index:-1;pointer-events:none}
html[data-design=nebula] .n-flashcard[data-gestures=enabled]{touch-action:pan-y pinch-zoom;position:relative;transform:translate3d(var(--card-drag-x,0px),0,0) rotate(var(--card-drag-tilt,0deg));transform-origin:50% 72%;will-change:transform;outline-offset:5px}
html[data-design=nebula] .n-flashcard[data-gestures=enabled]:focus-visible{outline:2px solid #9debe4}
html[data-design=nebula] .n-flashcard.is-dragging{animation:none!important;transition:none!important;user-select:none;-webkit-user-select:none;cursor:grabbing;box-shadow:inset 0 0 0 2px #7ddfd519,0 18px 38px #0005}
html[data-design=nebula] .n-flashcard.is-settling{animation:none!important;transition:transform 260ms cubic-bezier(.18,.88,.25,1.15),opacity 180ms}
html[data-design=nebula] .n-flashcard.is-leaving{animation:none!important;pointer-events:none;opacity:0;transition:transform 180ms cubic-bezier(.3,.5,.65,1),opacity 180ms ease-out}
html[data-design=nebula] .n-flashcard.is-swipe-armed{border-color:#a2f3e1;box-shadow:0 0 0 1px #a2f3e126,0 18px 38px #0005}
html[data-design=nebula] .n-recall .n-flashcard.is-swipe-armed[data-swipe-direction=left]{border-color:#c0a7ee;box-shadow:0 0 0 1px #c0a7ee26,0 18px 38px #0005}
html[data-design=nebula] .n-swipe-feedback{position:absolute;z-index:4;top:15px;max-width:calc(100% - 84px);padding:7px 12px;border-radius:20px;font-size:13px;font-weight:700;line-height:1.35;letter-spacing:.03em;pointer-events:none;opacity:0;transform:translateY(4px);background:#b5f8e9;color:#0d2836;box-shadow:0 5px 16px #031b2a55}
html[data-design=nebula] .n-swipe-feedback-left{left:15px}
html[data-design=nebula] .n-swipe-feedback-right{right:57px;background:#c7b4f7;color:#211e36}
html[data-design=nebula] .n-flashcard[data-swipe-direction=left] .n-swipe-feedback-left,html[data-design=nebula] .n-flashcard[data-swipe-direction=right] .n-swipe-feedback-right{opacity:var(--card-drag-progress,0);transform:none}
html[data-design=nebula] .n-recall .n-swipe-feedback-left{background:#c7b4f7;color:#211e36}
html[data-design=nebula] .n-recall .n-swipe-feedback-right{background:#b5f8e9;color:#0d2836}
html[data-design=nebula] .n-swipe-hint{font-size:13px;line-height:1.65;text-align:center;color:#a2b9ce;letter-spacing:.1px;margin:5px 0 18px;min-height:17px}
html[data-design=nebula] .n-recall .n-swipe-hint{margin:18px 0 0;color:#c4dddf}
html[data-design=nebula] .n-recall .n-recall-actions{margin-top:18px}
html[data-design=nebula] .n-card-controls{position:relative;min-height:40px}
html[data-design=nebula] .n-card-controls>span{font-variant-numeric:tabular-nums}
@keyframes n-swipe-arrive-next{from{opacity:.35;transform:translate3d(60px,0,0) rotate(2deg)}to{opacity:1;transform:translate3d(0,0,0) rotate(0)}}
@keyframes n-swipe-arrive-previous{from{opacity:.35;transform:translate3d(-60px,0,0) rotate(-2deg)}to{opacity:1;transform:translate3d(0,0,0) rotate(0)}}
@keyframes n-swipe-reveal{from{opacity:.3;transform:perspective(1000px) rotateY(-70deg)}to{opacity:1;transform:perspective(1000px) rotateY(0)}}
html[data-design=nebula] .n-flashcard.n-swipe-enter[data-arrival=next]{animation:n-swipe-arrive-next 330ms cubic-bezier(.2,.85,.25,1) both}
html[data-design=nebula] .n-flashcard.n-swipe-enter[data-arrival=previous]{animation:n-swipe-arrive-previous 330ms cubic-bezier(.2,.85,.25,1) both}
html[data-design=nebula] .n-flashcard.n-swipe-enter[data-arrival=reveal]{animation:n-swipe-reveal 360ms cubic-bezier(.2,.85,.25,1) both;backface-visibility:hidden}
/* Touch users see the card, count and swipe hint. The buttons stay in the accessibility
   tree and become visible when reached with a keyboard. No display:none fallback. */
@media(max-width:600px),(hover:none) and (pointer:coarse){
 html[data-design=nebula] .n-card-controls.gesture-enabled{justify-content:center;min-height:27px;margin-block:16px 0}
 html[data-design=nebula] .n-card-controls.gesture-enabled .iconbtn:not(:focus-visible){position:absolute;width:1px;height:1px;min-width:0;min-height:0;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 html[data-design=nebula] .n-card-controls.gesture-enabled .iconbtn:focus-visible{position:relative;width:40px;height:40px;clip-path:none;margin-inline:18px}
 html[data-design=nebula] .n-card-controls.gesture-enabled+ .n-swipe-hint{margin-top:1px}
}
html.calm .n-flashcard.n-swipe-enter,html.static .n-flashcard.n-swipe-enter{animation:none!important}
html.calm .n-flashcard.is-settling,html.calm .n-flashcard.is-leaving,html.static .n-flashcard.is-settling,html.static .n-flashcard.is-leaving{transition:none!important}
@media(prefers-reduced-motion:reduce){html:not([data-motion=full]) .n-flashcard.n-swipe-enter{animation:none!important}html:not([data-motion=full]) .n-flashcard.is-settling,html:not([data-motion=full]) .n-flashcard.is-leaving{transition:none!important}}

