/* Physical numbered cards: unknown backs stay covered; used faces remain visible. */
.fd-number-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}
.fd-back{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:184px;padding:14px 8px;border:1px solid #e4c084;border-radius:13px;background:#102033 url('art/card-back-v1.webp') center/100% 100% no-repeat;color:#f9d69b;box-shadow:0 7px 16px #0005,inset 0 0 0 2px #f7db9d26;touch-action:manipulation;transition:transform .16s,box-shadow .16s}
.fd-back>span{font-size:2.6rem;font-weight:850;line-height:1.2;text-shadow:0 3px 5px #0009;filter:drop-shadow(0 1px #ffe9b0)}
.fd-back:not(:disabled):hover{transform:translateY(-3px);box-shadow:0 11px 24px #0007,0 0 0 2px #d9b37055}
.fd-back:not(:disabled):active{transform:translateY(0) scale(.98)}
.fd-back:focus-visible{outline:3px solid #ffd68a;outline-offset:3px}
.fd-back.fd-used{opacity:1;cursor:default;justify-content:flex-start;gap:0;padding:0;background:#fff;color:#141e2c;border-color:#d2b27b;overflow:hidden;box-shadow:0 6px 16px #0005,inset 0 1px #fff}
.fd-used .fd-used-number{position:absolute;z-index:1;top:7px;inset-inline-start:7px;display:grid;place-items:center;width:23px;height:25px;border:1px solid #ecd093ad;border-radius:7px;color:#ffe2a8;background:#0c1628a8;font-size:.74rem;font-weight:700}
.fd-used strong{padding:8px 5px 1px;font-size:.93rem;font-weight:850;line-height:1.7;text-align:center;overflow-wrap:anywhere;color:#121e2d}
.fd-used .fd-used-status{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:1px 4px 8px;font-size:.65rem;font-weight:650;color:#8a682e}
.fd-used .fd-used-status::before{content:'✓';width:13px;height:13px;display:grid;place-items:center;border-radius:50%;background:#b88a42;color:#fff;font:700 9px/1 Arial,sans-serif}
.fd-count{margin:2px 0 12px;text-align:center;color:#ead0a0;font-size:.95rem;font-weight:700;line-height:1.8}
.fd-emblem{--card-accent:#e6bd73;--card-well:#482237;display:grid;place-items:center;flex-shrink:0;width:150px;height:140px;margin:auto;position:relative;color:var(--card-accent)}
.fd-emblem img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 7px 6px #0005)}
.fd-emblem svg{display:block;width:72px;height:72px}
.fd-emblem[data-fd-art="identity_disclosure"]{--card-accent:#99dbe3;--card-well:#183e56}
.fd-emblem[data-fd-art="silence_of_lambs"]{--card-accent:#d2b9f5;--card-well:#382b58}
.fd-emblem[data-fd-art="handcuffs"]{--card-accent:#9dcaff;--card-well:#1c385d}
.fd-emblem[data-fd-art="beautiful_mind"]{--card-accent:#8bdbc8;--card-well:#164743}
.fd-emblem[data-fd-art="custom"]{--card-well:#324358}
.fd-used .fd-emblem{width:100%;height:118px;padding:6px 14px;border-bottom:1px solid #e8ca8a88;background:radial-gradient(ellipse at 50% 55%,var(--card-well),#0c1725 100%)}
.fd-used .fd-emblem img{max-width:128px;filter:drop-shadow(0 5px 4px #0006)}
.fd-revealed{padding:18px;border:1px solid #c09c63aa;border-radius:18px;background:radial-gradient(ellipse at 50% 0,#314258,#132133 72%);box-shadow:0 12px 35px #02081155,inset 0 1px #f4d6a01c;animation:fdFlip .28s ease-out}
.fd-card-face{display:flex;flex-direction:column;align-items:center;text-align:center;gap:9px}
.fd-card-number{font-size:.73rem;font-weight:600;color:#d0b98d}
.fd-revealed .fd-card-face h3{margin:0;font-size:clamp(1.7rem,7vw,2.4rem);font-weight:850;line-height:1.5;color:#fff1d4;text-shadow:0 2px 8px #0004;overflow-wrap:anywhere;max-width:100%}
.fd-revealed .fd-card-description{margin:14px 0 12px;padding-top:12px;border-top:1px solid #e8c68a26;font-size:.9rem;line-height:1.9;color:#dbe2ed;text-align:right;overflow-wrap:anywhere}
.fd-revealed>.privacy-note{margin:0 0 12px;font-size:.7rem;line-height:1.7;text-align:center;color:#b6c3d3}
.fd-revealed>.primary{min-height:48px}
.fd-tools{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.fd-tools button,.fd-editor button,.fd-preset-choices button{min-height:44px}
.fd-editor>div{padding:12px 0;border-bottom:1px solid #ffffff20}
.fd-preset-choices{display:grid;gap:10px}
.fd-advanced{margin:10px 0;border-top:1px solid #d9b37020}
.fd-advanced summary{display:flex;align-items:center;min-height:44px;cursor:pointer;color:#bbc7d6;font-size:.8rem;gap:7px}
.fd-advanced summary::after{content:'⌄';margin-inline-start:auto;color:#d9b370;font-size:18px}
.fd-advanced[open] summary::after{transform:rotate(180deg)}
.fd-revealed>.fd-advanced{margin-bottom:0}
.fd-empty{text-align:center;padding:16px;color:#d2b98c}
.fd-direct-face .fd-card-face{gap:6px}
.fd-direct-face .fd-emblem{width:115px;height:105px}
.fd-direct-face .fd-card-face h3{font-size:1.7rem}
.fd-direct-face .fd-card-description{margin:0 0 6px;padding-top:8px;text-align:center;font-size:.8rem;line-height:1.7}
.fd-direct-face .field{margin:8px 0;gap:4px}
.fd-direct-face .field>span{font-size:.8rem}
.fd-direct-face .field select{min-height:46px;width:100%;font-size:.9rem}
.fd-direct-face>#dfApply{margin-top:10px}
.fd-direct-face>#dfClose{margin-top:7px;min-height:46px}
@keyframes fdFlip{from{transform:rotateY(70deg);opacity:0}to{transform:rotateY(0);opacity:1}}
@media(max-width:480px){.fd-number-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.fd-number-grid>.fd-back:last-child:nth-child(odd){grid-column:1/-1;justify-self:center;width:calc((100% - 10px)/2)}.fd-back{min-height:184px}.fd-revealed{padding:15px}.fd-card-face{gap:7px}}
@media(max-width:350px){.fd-used .fd-emblem{height:104px;padding:5px 10px}.fd-back{min-height:170px}.fd-used strong{font-size:.83rem}.fd-used .fd-used-status{font-size:.6rem}.fd-direct-face .fd-emblem{width:100px;height:94px}.fd-direct-face .fd-card-face h3{font-size:1.5rem}}
@media(prefers-reduced-motion:reduce){.fd-revealed{animation:none}.fd-back{transition:none}.fd-back:not(:disabled):hover,.fd-back:not(:disabled):active{transform:none}}
