.fdb-app{--ink:#2f1716;--red:#991f18;--rust:#c43b1d;--gold:#ffac29;--edge:#edd9c8;max-width:1100px;margin:1.25rem auto;color:var(--ink);font-family:system-ui,-apple-system,'Segoe UI',Arial,sans-serif}
.fdb-app *{box-sizing:border-box}
.fdb-header{text-align:center;padding:1.6rem 1rem 1.3rem;background:linear-gradient(115deg,#a1281b,#c94721);border-radius:14px 14px 3px 3px;color:white;margin-bottom:16px}
.fdb-kicker{font-size:.75rem;letter-spacing:.17em;font-weight:700;margin:0 0 .5rem}
.fdb-title{color:white!important;font-size:clamp(1.8rem,6vw,2.8rem);margin:.1em 0;font-weight:900;line-height:1.12}
.fdb-subtitle{margin:.35rem 0 0;font-size:1rem;opacity:.97}
.fdb-panel{border:1px solid var(--edge);border-radius:12px;padding:18px;margin:0 0 14px;background:#fffdfa;box-shadow:0 3px 15px rgba(73,33,20,.06)}
.fdb-panel h3{margin:0 0 .55rem;color:#7f221b;font-size:1.18rem}
.fdb-muted{font-size:.89rem;color:#645956;margin:.2rem 0 .65rem}
.fdb-label{font-size:.86rem;font-weight:700;display:block;margin:0 0 4px}
.fdb-field{margin:12px 0}
.fdb-input{display:block;width:100%;padding:12px;border:1px solid #bda89c;border-radius:9px;background:#fff;color:#2a1710;font-size:1rem}
.fdb-input:focus,.fdb-btn:focus-visible,.fdb-tile:focus-visible{outline:3px solid #3976d4;outline-offset:2px}
.fdb-btn{border:1px solid #b79c91;background:#fff9f5;color:var(--ink);border-radius:9px;cursor:pointer;font-weight:700;line-height:1.3;padding:.7rem 1rem;font:inherit;min-height:44px}
.fdb-btn:not(:disabled):hover{filter:brightness(.96)}.fdb-btn:disabled{opacity:.5;cursor:not-allowed}
.fdb-primary{background:var(--red);color:white;border-color:var(--red)}.fdb-danger{background:#fff0f0;border-color:#ab3232;color:#842525}
.fdb-small{font-size:.88rem;padding:.4rem .75rem;margin:.15rem}
.fdb-editions{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;margin-top:14px}
.fdb-edition{border:1px solid #e7d6ca;border-radius:12px;background:#fff6eb;padding:14px;display:flex;flex-direction:column;gap:8px}.fdb-edition .fdb-btn{margin-top:auto}
.fdb-note{padding:12px 14px;background:#fff3df;border-left:4px solid #e29b35;margin:12px 0;border-radius:5px;font-size:.9rem}
.fdb-banner{padding:12px 14px;border-radius:8px;background:#eaf3ff;color:#163964;font-weight:700;margin:10px 0}.fdb-error{background:#ffeded;color:#962121}
.fdb-room{display:grid;grid-template-columns:minmax(210px,320px) minmax(300px,1fr);gap:16px;align-items:start}
.fdb-actions{display:flex;flex-wrap:wrap;gap:7px;margin:1rem 0}
.fdb-room-code{font-size:1.7rem;letter-spacing:.16em;font-weight:900;text-align:center;border:2px dashed #bd5127;border-radius:11px;padding:15px;margin:12px 0;background:#fff6e9;user-select:all;font-variant-numeric:tabular-nums}
.fdb-people{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.fdb-person{background:#f5e9da;border-radius:100px;padding:5px 10px;font-size:.86rem}.fdb-person-won{background:#d4efce}
.fdb-winner{background:#e3f4db;border:1px solid #71aa72;border-radius:8px;padding:12px;font-weight:800}
.fdb-board-panel{text-align:center}.fdb-board-title{font-size:1.12rem!important}.fdb-board-stage{position:relative;width:100%;aspect-ratio:612/792;max-width:670px;margin:10px auto 0;background:#fee8be;box-shadow:0 3px 14px #0002}
.fdb-art{width:100%;height:100%;position:absolute;top:0;left:0;display:block;object-fit:fill;pointer-events:none;user-select:none}
.fdb-tile{position:absolute;z-index:1;border:1px solid transparent;background:transparent;color:transparent;padding:0;cursor:pointer;border-radius:2px;touch-action:manipulation}
.fdb-tile:hover:not(:disabled){background:rgba(24,93,178,.13);border-color:rgba(24,93,178,.42)}.fdb-tile:disabled{cursor:default}
.fdb-tile.is-marked{background:rgba(42,126,214,.23);border:2px solid #165b98}
.fdb-tile.is-marked::after{content:'✓';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:clamp(1.2rem,6.5vw,2.9rem);font-weight:900;color:#1261a4;line-height:1;text-shadow:0 0 4px white}
.fdb-square-detail{min-height:2.2rem;font-weight:700;margin:.6rem 0;color:#6e2920}
.fdb-rooms{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin:1rem 0}.fdb-rooms h4{margin:.3rem 0}
.fdb-leave{margin:8px 0}
@media(max-width:800px){.fdb-room{grid-template-columns:1fr}.fdb-board-panel{padding:9px}.fdb-board-stage{max-width:100%}.fdb-room-code{font-size:1.3rem}}
@media(prefers-reduced-motion:reduce){.fdb-app *{scroll-behavior:auto!important;transition:none!important}}
.fdb-rules{margin:18px 0;padding:10px;border-radius:8px;background:#fff7eb;text-align:left;font-size:.9rem}.fdb-rules summary{cursor:pointer;font-weight:800}.fdb-rules p{margin:7px 0}.fdb-rules strong{display:block;margin-top:12px}

/* v0.2.10: preserve original square artwork while moving it with the deal. */
#du-fdb-game button.fdb-tile{min-width:0;min-height:0;max-width:none;margin:0;padding:0;line-height:1;box-shadow:none;transform:none;opacity:1;overflow:hidden;border:0}
.fdb-tile-face{position:absolute;inset:0;display:block;pointer-events:none;background-repeat:no-repeat;z-index:-1}
.fdb-tile.is-marked::before,.fdb-tile:hover:not(:disabled)::before{content:'';position:absolute;inset:0;background:rgba(42,126,214,.2);pointer-events:none}
#du-fdb-game{font-size:16px;line-height:1.5}
#du-fdb-game .fdb-kicker{font-size:12px}
#du-fdb-game .fdb-title{font-size:clamp(28px,6vw,44px)}
#du-fdb-game .fdb-subtitle,#du-fdb-game .fdb-input,#du-fdb-game .fdb-square-detail{font-size:16px}
#du-fdb-game .fdb-muted,#du-fdb-game .fdb-label,#du-fdb-game .fdb-small,#du-fdb-game .fdb-rules{font-size:14px}
#du-fdb-game .fdb-panel h3{font-size:19px}
#du-fdb-game .fdb-board-title{font-size:18px!important}
#du-fdb-game .fdb-room-code{font-size:24px}

/* v0.2.13: viewport celebration stays visible even when the player is at the card bottom. */
#du-fdb-game .fdb-celebration{position:fixed;inset:0;z-index:99990;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(20,13,8,.72);overflow:auto}
#du-fdb-game .fdb-celebration-card{box-sizing:border-box;width:100%;max-width:460px;max-height:calc(100dvh - 40px);overflow:auto;background:#fff9e9;color:#321b1a;border:3px solid #d5a023;border-radius:20px;padding:24px;text-align:center;box-shadow:0 12px 60px #0005}
#du-fdb-game .fdb-celebration-card h2{font-size:clamp(32px,9vw,48px);line-height:1.1;margin:12px 0;color:#9c281e}
#du-fdb-game .fdb-celebration-icon{font-size:36px;margin:0}
#du-fdb-game .fdb-celebration-result{font-size:22px;font-weight:800;overflow-wrap:anywhere}
#du-fdb-game .fdb-celebration-card .fdb-btn{display:block;width:100%;margin-top:12px;white-space:normal}
/* v0.2.15 phone fixes */
#du-fdb-game .fdb-tile.is-marked::after{content:'✓';top:auto;bottom:2px;right:2px;left:auto;transform:none;font-size:clamp(.58rem,2.5vw,1rem);line-height:1;padding:.12em .2em;border-radius:999px;background:rgba(22,91,152,.88);color:#fff;text-shadow:none;box-shadow:0 1px 2px #0003}
#du-fdb-game button.fdb-tile.is-marked{box-shadow:inset 0 0 0 3px #165b98}
#du-fdb-game .fdb-tile.is-marked::before{background:rgba(42,126,214,.16)}
@media (hover:none){#du-fdb-game .fdb-tile:not(.is-marked):hover{background:transparent;border-color:transparent}#du-fdb-game .fdb-tile:not(.is-marked):hover::before{background:transparent}}
.fdb-square-detail.fdb-detail-error{color:#a3261c;font-weight:700}
@media(max-width:800px){.fdb-room-guest .fdb-board-panel{order:-1}}
