@font-face{font-family:"Unifont Pixel";src:url("assets/fonts/unifont-dianzhenhei-mini-game.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
.fd-launcher{position:fixed;left:18px;bottom:18px;z-index:90;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid #52654b;border-radius:999px;background:#eafdbd;color:#182015;font:800 11px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.06em;box-shadow:0 6px 20px #0b0e0a52;cursor:pointer;isolation:isolate;animation:fd-launcher-float 3.2s ease-in-out infinite;transition:background .18s ease,box-shadow .18s ease,scale .18s ease}.fd-launcher:hover{background:#a0fb82;box-shadow:0 8px 24px #8eff6a38;scale:1.05}.fd-launcher:active{scale:.96;box-shadow:0 3px 10px #0b0e0a66}.fd-launcher:focus-visible{outline:3px solid #ffb548;outline-offset:4px}.fd-launcher-icon{font-size:18px;line-height:1}.fd-invite{position:fixed;left:18px;bottom:78px;z-index:92;display:grid;grid-template-columns:auto 1fr;gap:12px;width:min(330px,calc(100vw - 24px));padding:16px;border:2px solid #a0fb82;border-radius:18px;background:#182015;color:#f3f3d5;box-shadow:0 14px 38px #050704a6;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;animation:fd-invite-in .28s cubic-bezier(.2,.8,.2,1)}.fd-invite[hidden]{display:none}.fd-invite-icon{font-size:25px}.fd-invite strong{display:block;color:#a0fb82;font-size:13px}.fd-invite p{margin:5px 24px 4px 0;color:#fff;font-size:12px;line-height:1.4}.fd-invite-countdown{display:block;color:#aebca8;font-size:9px}.fd-invite-actions{display:flex;gap:8px;margin-top:11px}.fd-invite-actions button{min-height:36px;padding:7px 10px;border:1px solid #6e8167;border-radius:10px;background:#263322;color:#f3f3d5;font:800 9px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.fd-invite-actions .fd-invite-play{border-color:#a0fb82;background:#a0fb82;color:#182015}.fd-invite-actions button:hover{translate:0 -1px;filter:brightness(1.08)}.fd-invite-close{position:absolute;top:8px;right:9px;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:transparent;color:#b9c5b4;font-size:20px;line-height:1}.fd-invite-close:hover{background:#263322;color:#fff}
.fd-game{margin:auto;padding:0;border:0;width:min(820px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);overflow:visible;background:transparent;color:#f3f3d5;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-synthesis:none}.fd-game::backdrop{background:#10150fe3;backdrop-filter:none}.fd-game[open]{animation:fd-boot .18s steps(3,end)}
.fd-window{position:relative;max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;border:4px solid #eafdbd;background:#182015;box-shadow:8px 8px 0 #7ccf64,-4px -4px 0 #263322;image-rendering:pixelated}.fd-topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:3px solid #eafdbd;background:#263322}.fd-game .fd-title{margin:0;color:#a0fb82;font:800 clamp(17px,3vw,24px)/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.08em;text-transform:uppercase;text-shadow:2px 2px 0 #0b0e0a}.fd-top-actions{display:flex;align-items:center;gap:8px}.fd-sound-toggle{display:grid;place-items:center;width:36px;height:36px;padding:0;border:2px solid #819477;background:#182015;color:#f3f3d5;font-size:17px;line-height:1;box-shadow:3px 3px 0 #0b0e0a}.fd-sound-toggle:hover{border-color:#a0fb82;background:#30422d}.fd-sound-toggle:active{translate:2px 2px;box-shadow:1px 1px 0 #0b0e0a}.fd-sound-toggle[aria-pressed="false"]{color:#91a08c;filter:saturate(.2)}.fd-sound-toggle:focus-visible{outline:2px solid #ffcf66;outline-offset:2px}.fd-close{width:40px;height:36px;padding:0;border:2px solid #f3f3d5;background:#182015;color:#f3f3d5;font:800 20px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;box-shadow:3px 3px 0 #0b0e0a}.fd-close:hover{background:#ef784d;color:#182015}.fd-close:active{translate:2px 2px;box-shadow:1px 1px 0 #0b0e0a}
.fd-content{padding:14px}.fd-subtitle{margin:0 0 12px;color:#cdd7c7;font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.02em}.fd-main{position:relative}.fd-hud{display:grid;grid-template-columns:1fr 112px;gap:14px;margin-bottom:12px}.fd-stats{display:grid;gap:8px}.fd-stat{display:grid;grid-template-columns:92px 1fr 36px;align-items:center;gap:8px;font-size:11px}.fd-stat-name{color:#f3f3d5}.fd-stat-value{text-align:right;color:#a0fb82}.fd-meter{height:16px;padding:2px;border:2px solid #8da084;background:#0e120d}.fd-meter-fill{display:block;width:var(--fd-value,50%);height:100%;background:repeating-linear-gradient(90deg,var(--fd-bar,#a0fb82) 0 8px,#182015 8px 10px);transition:width .18s steps(5,end),background-color .18s}.fd-timer{display:grid;place-content:center;text-align:center;border:3px solid #eafdbd;background:#0e120d;box-shadow:4px 4px 0 #35452f}.fd-timer-label{color:#9cac96;font-size:9px;letter-spacing:.12em}.fd-timer-value{color:#ffcf66;font-size:38px;line-height:1;font-weight:900;font-variant-numeric:tabular-nums}
.fd-stage{position:relative;height:370px;border:3px dashed #52654b;background-color:#11170f;background-image:linear-gradient(45deg,#192218 25%,transparent 25%),linear-gradient(-45deg,#192218 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#192218 75%),linear-gradient(-45deg,transparent 75%,#192218 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0;overflow:hidden;contain:layout paint}.fd-stage:after{content:"";position:absolute;left:0;right:0;bottom:0;height:34px;border-top:3px solid #52654b;background:linear-gradient(90deg,#243320 50%,#1d2a1b 50%);background-size:18px 18px;opacity:.9}
.fd-reaction{position:absolute;left:50%;bottom:142px;z-index:8;max-width:calc(100% - 24px);translate:-50% 0;padding:7px 10px;border:2px solid #eafdbd;background:#263322;color:#fff;font-size:11px;line-height:1.3;text-align:center;box-shadow:3px 3px 0 #0b0e0a;opacity:0;transform:translateY(5px);transition:opacity .08s steps(1,end),transform .12s steps(2,end);pointer-events:none;white-space:nowrap}.fd-reaction.is-visible{opacity:1;transform:none}.fd-reaction:after{content:"";position:absolute;left:50%;bottom:-8px;width:8px;height:8px;border-right:2px solid #eafdbd;border-bottom:2px solid #eafdbd;background:#263322;transform:translateX(-50%) rotate(45deg)}
.fd-player{position:absolute;left:50%;bottom:20px;z-index:6;width:100px;height:118px;translate:-50% 0;will-change:left}.fd-player-sprite{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(4px 4px 0 #050704);pointer-events:none}.fd-player.is-happy .fd-player-sprite{animation:fd-bounce .42s steps(4,end)}.fd-player.is-unhappy .fd-player-sprite{animation:fd-shake .38s steps(5,end)}
.fd-falling{position:absolute;z-index:4;display:flex;flex-direction:column;align-items:center;justify-content:center;width:88px;height:58px;color:#a0fb82;will-change:transform;pointer-events:none;text-align:center}.fd-falling.is-negative{color:#ff8a68}.fd-falling-icon{font-family:"Apple Color Emoji","Segoe UI Emoji",sans-serif;font-size:31px;line-height:1}.fd-falling-label{display:block;max-width:100%;margin-top:3px;color:#f3f3d5;font:800 8px/1.1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;text-shadow:2px 2px 0 #0b0e0a;white-space:normal}.fd-falling:before{content:"";position:absolute;left:50%;bottom:100%;width:2px;height:12px;background:currentColor;box-shadow:-5px 4px 0 currentColor,5px 6px 0 currentColor;opacity:.6}
.fd-float{position:absolute;z-index:9;color:#a0fb82;font-size:23px;font-weight:900;text-shadow:2px 2px 0 #0b0e0a;pointer-events:none;animation:fd-float .8s steps(6,end) forwards}.fd-float.is-negative{color:#ff805c}
.fd-controls{display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 0 0}.fd-move{display:grid;place-items:center;width:54px;height:44px;padding:0;border:3px solid #819477;background:#263322;color:#fff;font:900 20px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;box-shadow:3px 3px 0 #0b0e0a;touch-action:none;user-select:none}.fd-move:hover:not(:disabled){border-color:#a0fb82;background:#30422d}.fd-move:active:not(:disabled),.fd-move.is-held{translate:2px 2px;box-shadow:1px 1px 0 #0b0e0a;background:#a0fb82;color:#182015}.fd-move:disabled{opacity:.4;cursor:not-allowed}.fd-control-copy{min-width:132px;text-align:center}.fd-control-title{display:block;color:#eafdbd;font-size:10px;letter-spacing:.12em}.fd-control-hint{display:block;margin-top:4px;color:#8fa089;font-size:8px;letter-spacing:.08em}
.fd-cover{position:absolute;inset:0;z-index:15;display:grid;place-items:center;padding:20px;background:#182015f5;text-align:center}.fd-cover[hidden]{display:none}.fd-cover-box{width:min(560px,100%);padding:22px 16px;border:3px solid #eafdbd;background:#202b1e;box-shadow:6px 6px 0 #0b0e0a}.fd-start .fd-cover-box{width:min(700px,100%);padding:12px 4px;border:0;background:transparent;box-shadow:none}.fd-cover-kicker{margin:0 0 8px;color:#a0fb82;font-size:10px;letter-spacing:.16em}.fd-cover h3{margin:0 0 10px;color:#fff;font:900 21px/1.25 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.04em}.fd-start h3{font-size:27px}.fd-cover p{margin:0 0 14px;color:#bdc9b8;font:11px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:0}.fd-start p{font-size:13px}.fd-legend{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin:22px 0 24px;text-align:left}.fd-legend-group>strong{display:block;margin-bottom:10px;color:#a0fb82;font-size:13px}.fd-legend-group:last-child{padding-left:14px;border-left:3px solid #ff8a68}.fd-legend-group:last-child>strong{color:#ff8a68;animation:fd-warning-pulse 1.8s ease-in-out infinite}.fd-legend-group:last-child>strong:before{content:"⚠ ";color:#ffcf66}.fd-legend-items{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.fd-legend-items i{display:flex;min-width:0;flex-direction:column;align-items:center;gap:5px;color:#dbe4d6;font-style:normal;text-align:center}.fd-legend-group:last-child .fd-legend-items small{color:#ffb29c}.fd-legend-items b{font:400 29px/1 "Apple Color Emoji","Segoe UI Emoji",sans-serif}.fd-legend-items small{font:700 9px/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:normal}.fd-score{display:block;margin:10px 0;color:#ffcf66;font-size:13px}.fd-final-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:12px 0 16px}.fd-final-stats span{padding:8px 3px;border:2px solid #52654b;background:#182015;color:#a0fb82;font-size:10px;line-height:1.5}.fd-final-stats b{display:block;color:#fff;font-size:13px}.fd-pixel-button{min-height:44px;padding:10px 16px;border:3px solid #182015;background:#a0fb82;color:#182015;font:900 12px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.08em;box-shadow:4px 4px 0 #eafdbd;text-transform:uppercase}.fd-pixel-button:hover{background:#ffcf66}.fd-pixel-button:active{translate:3px 3px;box-shadow:1px 1px 0 #eafdbd}
@keyframes fd-boot{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:none}}@keyframes fd-bounce{0%,100%{transform:translateY(0)}45%{transform:translateY(-12px)}70%{transform:translateY(3px)}}@keyframes fd-shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-8px)}40%{transform:translateX(8px)}60%{transform:translateX(-5px)}80%{transform:translateX(5px)}}@keyframes fd-float{0%{opacity:0;transform:translate(-50%,8px) scale(.7)}20%{opacity:1}100%{opacity:0;transform:translate(-50%,-52px) scale(1.15)}}@keyframes fd-launcher-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}@keyframes fd-invite-in{from{opacity:0;transform:translateY(10px) scale(.96)}to{opacity:1;transform:none}}@keyframes fd-warning-pulse{0%,100%{opacity:1}50%{opacity:.62}}
@media(max-width:560px){.fd-launcher{left:10px;bottom:12px;min-height:40px;padding:8px 12px;font-size:9px}.fd-launcher-icon{font-size:16px}.fd-invite{left:8px;bottom:64px;width:calc(100vw - 16px);padding:13px;border-radius:15px}.fd-game{width:calc(100vw - 14px);max-height:calc(100dvh - 14px)}.fd-window{max-height:calc(100dvh - 14px);box-shadow:4px 4px 0 #7ccf64}.fd-content{padding:9px}.fd-topbar{padding:10px}.fd-subtitle{font-size:10px;margin-bottom:9px}.fd-hud{grid-template-columns:1fr 76px;gap:7px;margin-bottom:8px}.fd-stat{grid-template-columns:70px 1fr 27px;gap:4px;font-size:8px}.fd-meter{height:14px}.fd-timer-value{font-size:27px}.fd-stage{height:min(360px,48dvh);min-height:300px}.fd-player{width:84px;height:100px;bottom:20px}.fd-reaction{bottom:124px;font-size:9px}.fd-falling{width:72px;height:52px}.fd-falling-icon{font-size:28px}.fd-falling-label{font-size:7px}.fd-controls{padding-top:7px}.fd-move{width:58px;height:46px}.fd-control-copy{min-width:110px}.fd-cover{padding:9px}.fd-cover-box{padding:16px 11px}.fd-start .fd-cover-box{padding:8px 0}.fd-cover h3,.fd-start h3{font-size:21px}.fd-start p{font-size:10px}.fd-legend{gap:12px;margin:16px 0 18px}.fd-legend-group:last-child{padding-left:8px}.fd-legend-items{gap:3px}.fd-legend-items b{font-size:23px}.fd-legend-items small{font-size:6px}.fd-final-stats span{font-size:8px}}
/* Approved rounded Retro Window direction. */
.fd-launcher{gap:7px;min-height:40px;padding:8px 14px;border:2px solid #eafdbd;background:#263322;color:#fff;box-shadow:4px 4px 0 #0b0e0a;font-size:10px}
.fd-launcher:hover{background:#30422d;box-shadow:4px 4px 0 #0b0e0a,0 0 18px #a0fb8240}
.fd-launcher-icon{display:block;width:30px;height:30px;object-fit:contain;image-rendering:pixelated;scale:1.6}
.fd-invite{border-radius:24px}
.fd-invite-icon{display:block;width:42px;height:42px;object-fit:contain;image-rendering:pixelated}
.fd-invite-actions button,.fd-invite-close{border-radius:999px}
.fd-window{border-radius:28px}
.fd-game .fd-title{text-transform:none}
.fd-topbar{border-radius:24px 24px 0 0}
.fd-sound-toggle,.fd-close{border-radius:50%}
.fd-stage{touch-action:none}
.fd-legend{grid-template-columns:1fr;gap:12px;margin:18px 0 20px}
.fd-legend-group{padding:12px 14px;border-radius:20px;background:#26372280}
.fd-legend-group:last-child{padding:12px 14px;border:0;background:#3b241f80}
.fd-legend-group>strong{margin-bottom:8px}
.fd-legend-items img{display:block;width:42px;height:42px;object-fit:contain;image-rendering:pixelated}
.fd-legend-items small{font-size:10px}
.fd-falling{height:70px}
.fd-falling-icon{display:block;width:44px;height:44px;object-fit:contain;image-rendering:pixelated}
.fd-pixel-button,.fd-move{border-radius:999px}
.fd-start-button{min-height:49px;padding:11px 18px;font-size:13px}
@media(max-width:560px){.fd-launcher{min-height:36px;padding:7px 11px;font-size:8px}.fd-launcher-icon{width:28px;height:28px}.fd-window{border-radius:20px}.fd-topbar{border-radius:16px 16px 0 0}.fd-legend{grid-template-columns:1fr;gap:8px;margin:12px 0 14px}.fd-legend-group,.fd-legend-group:last-child{padding:8px 7px;border-radius:15px}.fd-legend-items img{width:38px;height:38px}.fd-legend-items small{font-size:7px}.fd-falling{height:62px}.fd-falling-icon{width:40px;height:40px}.fd-start-button{min-height:48px;padding:11px 17px;font-size:12px}}

/* Consistent 8px spacing rhythm and centered invitation toast. */
.fd-top-actions{gap:8px}
.fd-sound-toggle,.fd-close{width:40px;height:40px;padding:0;border:2px solid #eafdbd;background:#182015;box-shadow:3px 3px 0 #0b0e0a;font-size:20px;line-height:1}
.fd-content{padding:16px}
.fd-subtitle{margin-bottom:16px}
.fd-hud{gap:16px;margin-bottom:16px}
.fd-controls{gap:16px;padding-top:16px}
.fd-cover{padding:16px}
.fd-cover-box{padding:24px;border-radius:24px}
.fd-cover-kicker{margin-bottom:8px}
.fd-cover h3{margin-bottom:12px}
.fd-cover p{margin-bottom:16px}
.fd-score{margin:12px 0}
.fd-final-stats{gap:12px;margin:16px 0}
.fd-final-stats span{padding:10px 6px;border-radius:14px}
.fd-invite{z-index:110;left:50%;top:50%;bottom:auto;width:min(380px,calc(100vw - 24px));padding:18px;gap:16px;translate:-50% -50%;border-radius:24px;box-shadow:0 22px 70px #050704cc,0 0 24px #a0fb8230}
.fd-invite-actions{gap:8px;margin-top:16px}
.fd-invite-actions button{min-height:40px;padding:8px 14px}
@media(max-width:560px){.fd-content{padding:12px}.fd-topbar{padding:12px}.fd-subtitle{margin-bottom:12px}.fd-hud{gap:8px;margin-bottom:12px}.fd-controls{gap:12px;padding-top:12px}.fd-cover{padding:12px}.fd-cover-box{padding:16px;border-radius:18px}.fd-final-stats{gap:8px;margin:12px 0}.fd-invite{left:50%;top:50%;bottom:auto;width:calc(100vw - 24px);padding:16px;gap:12px;translate:-50% -50%;border-radius:20px}.fd-invite-actions{margin-top:12px}}

/* Light mode keeps the retro identity without dropping a dark panel onto the page. */
:root[data-theme=light] .fd-launcher{border-color:#75a96a;background:#f7fceF;color:#243421;box-shadow:4px 4px 0 #b8d8ae,0 8px 24px #50694b24}
:root[data-theme=light] .fd-launcher:hover{background:#e4f8da;box-shadow:4px 4px 0 #9fc994,0 0 20px #79d65d45}
:root[data-theme=light] .fd-invite{border-color:#68cf50;background:#fbfdf9;color:#233020;box-shadow:0 22px 70px #5d71552e,0 0 24px #72cf5840}
:root[data-theme=light] .fd-invite strong{color:#2e7926}
:root[data-theme=light] .fd-invite p{color:#233020}
:root[data-theme=light] .fd-invite-countdown{color:#667260}
:root[data-theme=light] .fd-invite-close{color:#52614e}
:root[data-theme=light] .fd-invite-close:hover{background:#e6efE1;color:#1e2a1c}
:root[data-theme=light] .fd-invite-actions button{border-color:#91a98a;background:#fff;color:#33412f}
:root[data-theme=light] .fd-invite-actions .fd-invite-play{border-color:#58b943;background:#94ee78;color:#173312}
:root[data-theme=light] .fd-game{color:#233020}
:root[data-theme=light] .fd-game::backdrop{background:#1f291e8c;backdrop-filter:blur(3px)}
:root[data-theme=light] .fd-window{border-color:#6f9565;background:#f8fbf5;box-shadow:8px 8px 0 #a7dc92,-4px -4px 0 #e5f0df}
:root[data-theme=light] .fd-topbar{border-bottom-color:#769b6b;background:#e9f4e4}
:root[data-theme=light] .fd-game .fd-title{color:#357a2f;text-shadow:2px 2px 0 #c7e5bb}
:root[data-theme=light] .fd-sound-toggle,:root[data-theme=light] .fd-close{border-color:#769b6b;background:#f9fcf7;color:#263523;box-shadow:3px 3px 0 #bfd5b8}
:root[data-theme=light] .fd-sound-toggle:hover{border-color:#55b63f;background:#e3f5dd}
:root[data-theme=light] .fd-close:hover{background:#ffd9cf;color:#7a2d20}
:root[data-theme=light] .fd-subtitle{color:#586653}
:root[data-theme=light] .fd-stat-name{color:#2c3828}
:root[data-theme=light] .fd-stat-value{color:#357a2f}
:root[data-theme=light] .fd-meter{border-color:#82987c;background:#fff}
:root[data-theme=light] .fd-meter-fill{background:repeating-linear-gradient(90deg,var(--fd-bar,#72ce59) 0 8px,#eff6eb 8px 10px)}
:root[data-theme=light] .fd-timer{border-color:#769b6b;background:#fff;box-shadow:4px 4px 0 #c9dbc3}
:root[data-theme=light] .fd-timer-label{color:#667360}
:root[data-theme=light] .fd-timer-value{color:#9a6500}
:root[data-theme=light] .fd-stage{border-color:#91a98a;background-color:#f5f9f2;background-image:linear-gradient(45deg,#e8f1e3 25%,transparent 25%),linear-gradient(-45deg,#e8f1e3 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e8f1e3 75%),linear-gradient(-45deg,transparent 75%,#e8f1e3 75%)}
:root[data-theme=light] .fd-stage:after{border-top-color:#91a98a;background:linear-gradient(90deg,#dfead9 50%,#edf4e9 50%)}
:root[data-theme=light] .fd-reaction{border-color:#6f9565;background:#fff;color:#233020;box-shadow:3px 3px 0 #c0d5b9}
:root[data-theme=light] .fd-reaction:after{border-color:#6f9565;background:#fff}
:root[data-theme=light] .fd-player-sprite{filter:drop-shadow(4px 4px 0 #bfd5b8)}
:root[data-theme=light] .fd-falling-label{color:#243421;text-shadow:1px 1px 0 #fff}
:root[data-theme=light] .fd-float{color:#2f8b28;text-shadow:1px 1px 0 #fff}
:root[data-theme=light] .fd-float.is-negative{color:#b44530}
:root[data-theme=light] .fd-move{border-color:#82987c;background:#fff;color:#263523;box-shadow:3px 3px 0 #c0d5b9}
:root[data-theme=light] .fd-move:hover:not(:disabled){border-color:#55b63f;background:#e3f5dd}
:root[data-theme=light] .fd-move:active:not(:disabled),:root[data-theme=light] .fd-move.is-held{background:#94ee78;color:#173312}
:root[data-theme=light] .fd-control-title{color:#385134}
:root[data-theme=light] .fd-control-hint{color:#6c7868}
:root[data-theme=light] .fd-cover{background:#f8fbf5f2}
:root[data-theme=light] .fd-cover-box{border-color:#769b6b;background:#fff;box-shadow:6px 6px 0 #c0d5b9}
:root[data-theme=light] .fd-cover-kicker{color:#357a2f}
:root[data-theme=light] .fd-cover h3{color:#1f2b1d}
:root[data-theme=light] .fd-cover p{color:#5b6857}
:root[data-theme=light] .fd-legend-group{background:#e6f3e180}
:root[data-theme=light] .fd-legend-group:last-child{background:#ffe7df99}
:root[data-theme=light] .fd-legend-group>strong{color:#357a2f}
:root[data-theme=light] .fd-legend-group:last-child>strong,:root[data-theme=light] .fd-legend-group:last-child .fd-legend-items small{color:#a43e2c}
:root[data-theme=light] .fd-legend-items small{color:#354331}
:root[data-theme=light] .fd-score{color:#8c5b00}
:root[data-theme=light] .fd-final-stats span{border-color:#9bb194;background:#f5f9f2;color:#357a2f}
:root[data-theme=light] .fd-final-stats b{color:#233020}
:root[data-theme=light] .fd-pixel-button{border-color:#527d49;background:#94ee78;color:#173312;box-shadow:4px 4px 0 #b6d9aa}
:root[data-theme=light] .fd-pixel-button:hover{background:#ffe08b}

/* Pixel controls and score-based result personality. */
.fd-sound-icon{display:block;width:25px;height:25px;image-rendering:pixelated}
.fd-sound-toggle[aria-pressed="false"]{filter:saturate(.45)}
.fd-legend-group:last-child>strong{display:flex;align-items:center;gap:8px}
.fd-legend-group:last-child>strong:before{content:none}
.fd-warning-icon{display:block;width:24px;height:24px;image-rendering:pixelated;filter:drop-shadow(2px 2px 0 #0b0e0a)}
.fd-result .fd-cover-box{width:min(620px,100%)}
.fd-result-hero{display:grid;grid-template-columns:116px 1fr;align-items:center;gap:18px;text-align:left}
.fd-result-character{display:block;width:116px;height:132px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(4px 4px 0 #0b0e0a)}
.fd-result-copy h3{margin-bottom:8px}
.fd-result-comment{min-height:2.8em;margin:0!important;color:#dbe4d6!important;font-size:11px!important}
:root[data-theme=light] .fd-warning-icon{filter:drop-shadow(2px 2px 0 #d6b570)}
:root[data-theme=light] .fd-result-character{filter:drop-shadow(4px 4px 0 #bfd5b8)}
:root[data-theme=light] .fd-result-comment{color:#52614e!important}
@media(max-width:560px){.fd-warning-icon{width:22px;height:22px}.fd-result-hero{grid-template-columns:86px 1fr;gap:10px}.fd-result-character{width:86px;height:104px}.fd-result-comment{font-size:9px!important}}

/* Two-family game type system, countdown warning and open result scene. */
.fd-game,.fd-invite,.fd-launcher{--fd-font-ui:"Unifont Pixel",monospace;--fd-font-pixel:"Unifont Pixel",monospace;font-family:var(--fd-font-ui)}
.fd-game *,.fd-invite *,.fd-launcher *{font-family:"Unifont Pixel",monospace}
.fd-game .fd-title,.fd-timer-value,.fd-cover h3,.fd-legend-group>strong,.fd-legend-items small,.fd-falling-label,.fd-control-title,.fd-control-hint,.fd-pixel-button,.fd-final-stats,.fd-score,.fd-invite strong,.fd-launcher{font-family:var(--fd-font-pixel)}
.fd-timer-value.is-warning{color:#ff4d43!important;animation:fd-timer-alert .46s steps(2,end) infinite;text-shadow:2px 2px 0 #53120d}
.fd-result{grid-template-rows:minmax(112px,150px) auto;align-content:center;gap:0}
.fd-result-scene{display:grid;grid-template-columns:42% 58%;align-items:end;width:min(560px,100%);height:150px;margin:0 auto;text-align:left}
.fd-result-character-crop{display:grid;align-items:start;justify-items:center;align-self:end;height:138px;overflow:hidden}
.fd-result-character{width:128px;height:160px;transform:scale(1.1);transform-origin:center top}
.fd-result-comment{position:relative;align-self:center;min-height:auto;margin:0 8px 18px 0!important;padding:12px 14px;border:3px solid #eafdbd;background:#263322;color:#f3f3d5!important;box-shadow:5px 5px 0 #0b0e0a;font-family:var(--fd-font-pixel)!important;font-size:11px!important;line-height:1.5}
.fd-result-comment:before{content:"";position:absolute;left:-11px;bottom:20px;width:16px;height:16px;border-left:3px solid #eafdbd;border-bottom:3px solid #eafdbd;background:#263322;transform:rotate(45deg)}
.fd-result .fd-cover-box{width:min(560px,100%)}
:root[data-theme=light] .fd-result-comment{border-color:#769b6b;background:#fff;color:#33412f!important;box-shadow:5px 5px 0 #bfd5b8}
:root[data-theme=light] .fd-result-comment:before{border-color:#769b6b;background:#fff}
@keyframes fd-timer-alert{0%,100%{transform:translateX(0) rotate(0)}25%{transform:translateX(-2px) rotate(-1deg)}75%{transform:translateX(2px) rotate(1deg)}}
@media(max-width:560px){.fd-controls{display:none}.fd-result{grid-template-rows:105px auto;padding:10px}.fd-result-scene{grid-template-columns:38% 62%;height:105px}.fd-result-character-crop{height:100px}.fd-result-character{width:96px;height:122px;transform:scale(1.1)}.fd-result-comment{margin:0 4px 10px 0!important;padding:9px 10px;font-size:8px!important}.fd-result .fd-cover-box{padding:13px}.fd-result .fd-cover-box h3{font-size:18px}}

/* Softer result copy and a low-contrast pixel office playfield. */
.fd-result-character-crop{height:148px}
.fd-result-character{width:154px;height:190px;transform:scale(1.1)}
.fd-result-comment{margin:0 6px 20px 0!important;padding:0;border:0;background:transparent;color:#eafdbd!important;box-shadow:none;font-size:14.4px!important;line-height:1.6;text-shadow:2px 2px 0 #0b0e0a}
.fd-result-comment:before{content:none}
:root[data-theme=light] .fd-result-comment{border:0;background:transparent;color:#385134!important;box-shadow:none;text-shadow:1px 1px 0 #fff}
@media(max-width:560px){.fd-result-character-crop{height:105px}.fd-result-character{width:116px;height:145px}.fd-result-comment{margin:0 2px 12px 0!important;padding:0;font-size:10.8px!important}}

/* Mobile onboarding, collision feedback and accessible focus states. */
.fd-stage:focus-visible{outline:3px solid #ffcf66;outline-offset:3px}
.fd-swipe-hint{display:none}
.fd-stage.is-positive-hit{animation:fd-stage-positive .38s steps(3,end)}
.fd-stage.is-negative-hit{animation:fd-stage-negative .38s steps(3,end)}
.fd-stat.is-positive-hit,.fd-stat.is-negative-hit{animation:fd-stat-hit .4s steps(3,end)}
.fd-stat.is-positive-hit .fd-stat-name,.fd-stat.is-positive-hit .fd-stat-value{color:#a0fb82}
.fd-stat.is-negative-hit .fd-stat-name,.fd-stat.is-negative-hit .fd-stat-value{color:#ff8068}
.fd-stat.is-positive-hit .fd-meter{border-color:#a0fb82;box-shadow:0 0 0 3px #a0fb823d}
.fd-stat.is-negative-hit .fd-meter{border-color:#ff8068;box-shadow:0 0 0 3px #ff80683d}
:root[data-theme=light] .fd-timer-value.is-warning{color:#b42318!important;text-shadow:1px 1px 0 #ffd7d2}
:root[data-theme=light] .fd-stat.is-positive-hit .fd-stat-name,:root[data-theme=light] .fd-stat.is-positive-hit .fd-stat-value{color:#26751f}
:root[data-theme=light] .fd-stat.is-negative-hit .fd-stat-name,:root[data-theme=light] .fd-stat.is-negative-hit .fd-stat-value{color:#a52f22}
@keyframes fd-stage-positive{50%{border-color:#a0fb82;box-shadow:inset 0 0 0 5px #a0fb8238}}
@keyframes fd-stage-negative{25%,75%{translate:-2px 0;border-color:#ff8068;box-shadow:inset 0 0 0 5px #ff80682e}50%{translate:2px 0}}
@keyframes fd-stat-hit{50%{transform:scale(1.025)}}
@keyframes fd-swipe-guide{0%{opacity:0;transform:translate(-50%,8px)}20%,75%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-4px)}}
@media(max-width:560px){.fd-swipe-hint.is-visible{position:absolute;z-index:12;top:16px;left:50%;display:block;width:max-content;max-width:calc(100% - 24px);padding:8px 11px;border:2px solid #eafdbd;border-radius:999px;background:#263322e8;color:#fff;font-family:var(--fd-font-pixel);font-size:9px;line-height:1.35;text-align:center;box-shadow:3px 3px 0 #0b0e0a;pointer-events:none;animation:fd-swipe-guide 2.2s ease both}:root[data-theme=light] .fd-swipe-hint.is-visible{border-color:#769b6b;background:#fffffff0;color:#263523;box-shadow:3px 3px 0 #bfd5b8}}
@media(prefers-reduced-motion:reduce){.fd-game[open],.fd-player-sprite,.fd-float,.fd-launcher,.fd-invite,.fd-legend-group:last-child>strong,.fd-timer-value,.fd-stage,.fd-stat,.fd-swipe-hint{animation:none!important}.fd-meter-fill,.fd-reaction,.fd-launcher{transition:none!important}}

/* Mobile reading comfort: an in-flow game entry never covers portfolio content. */
.fd-launcher-slot{display:contents}
@media(max-width:560px){
 .fd-launcher-slot{display:flex;justify-content:center;padding:12px 20px 32px}
 .fd-launcher-slot .fd-launcher{position:static;animation:none;min-height:48px;padding:10px 20px;font-size:14px}
 .fd-subtitle{font-size:12px;line-height:1.5}
 .fd-stat{grid-template-columns:78px minmax(0,1fr) 26px;font-size:12px;line-height:1.3}
 .fd-hud{grid-template-columns:minmax(0,1fr) 62px}
 .fd-timer-label{font-size:11px}
 .fd-falling-label,.fd-legend-items small{font-size:11px;line-height:1.25}
 .fd-falling{height:72px}
 .fd-start p,.fd-final-stats span,.fd-score{font-size:12px;line-height:1.4}
 .fd-result-comment{font-size:12px!important;line-height:1.5}
 .fd-reaction,.fd-swipe-hint.is-visible{font-size:12px;white-space:normal}
 .fd-sound-toggle,.fd-close{min-width:44px;min-height:44px}
}
