body:has(.fridge-game){margin:0;background:#fffaf0}
.fridge-game{--ink:#294a40;--muted:#566c61;--mint:#aecab8;--cream:#fffaf0;color:var(--ink);max-width:880px;padding:20px 18px 40px;margin:auto;font-family:system-ui,'Segoe UI','Microsoft JhengHei',sans-serif}.fridge-game *{box-sizing:border-box}.fridge-game [hidden]{display:none!important}.fridge-game button{font:inherit;cursor:pointer;color:inherit;touch-action:manipulation}.fridge-game button:disabled{opacity:.48;cursor:default}.fridge-game button:focus-visible,.fridge-game a:focus-visible,.fridge-game summary:focus-visible{outline:3px solid #267395;outline-offset:3px}.fridge-skip{position:fixed;top:-100px;z-index:1000;background:#fff;padding:12px}.fridge-skip:focus{top:6px}.ff-top{display:flex;justify-content:space-between;gap:10px;font-size:13px;margin-bottom:16px}.ff-top a{color:var(--ink);text-underline-offset:4px}.ff-top b{font-size:17px}.ff-heading h1{font-size:clamp(26px,5vw,36px);margin:4px 0 20px;line-height:1.15;letter-spacing:-.03em}.ff-eyebrow{font-size:11px;letter-spacing:.12em;color:var(--muted);margin:0}.ff-ready{max-width:440px;margin:auto;text-align:center}.ff-ready img{width:100%;height:auto;max-height:280px;object-fit:contain}.ff-opening{margin:10px 0 18px;font-size:14px;line-height:1.7}.ff-opening p{margin:0}.ff-primary{display:flex;align-items:center;justify-content:center;gap:16px;background:#315b49;border:1px solid #234538;border-bottom:4px solid #1f3f32;color:#fffaf0!important;border-radius:15px;min-height:52px;width:100%;font-weight:700!important;font-size:18px!important;padding:8px 14px}.ff-primary:hover{background:#3f6b57}.ff-note{font-size:12px;line-height:1.6;color:var(--muted);text-align:center}.ff-hud{display:flex;align-items:center;justify-content:space-between;padding:0 0 12px;font-size:14px}.ff-hud ol{display:flex;gap:8px;padding:0;margin:0;list-style:none}.ff-hud li{border:1px solid #a6b5a5;border-radius:50%;width:28px;height:28px;display:grid;place-items:center;background:#fffdf7;font-size:13px}.ff-hud li[aria-current]{background:#315b49;color:#fff;border-color:#315b49;box-shadow:0 0 0 3px #e0e9db}.ff-hud li.is-done{background:#e4ebd6}.ff-level-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}.ff-level-heading h2{font-size:16px;margin:0;font-weight:650}.ff-level-heading>span{font-size:13px;white-space:nowrap}.ff-workspace{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:28px;align-items:center}.ff-fridge{background:linear-gradient(100deg,#c4d9c5,#a9c9b7);border:2px solid #54735f;border-radius:28px 28px 20px 20px;padding:0 16px;box-shadow:inset 3px 0 0 #e2ead3,inset -4px 0 0 #90b19a,0 5px 0 #d9d6bf;width:100%;max-width:410px;margin:auto}.ff-fridge-cap{height:38px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:9px;letter-spacing:.14em;color:#3a5e4d}.ff-lamp{height:7px;width:28px;border-radius:8px;background:#fffae1;box-shadow:0 0 6px #fff6d4}.ff-fridge-cap i{width:12px;height:5px;border-radius:4px;background:#517c63}.ff-fridge-base{height:18px;display:flex;justify-content:space-between;align-items:center;padding:0 16px}.ff-fridge-base i{height:3px;background:#658d73;width:30px;border-radius:5px}#ff-board{position:relative;display:grid;grid-template-columns:repeat(var(--cols),1fr);grid-template-rows:repeat(var(--rows),1fr);background:#f6f2dc;border:2px solid #6d8974;border-radius:9px;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none}.ff-cell{background:transparent;border:0;border-right:1px solid #bac7b155;border-bottom:1px solid #bac7b155;border-radius:0;min-width:0;padding:0;touch-action:none!important}.ff-cell:focus-visible{outline-offset:-4px!important}.ff-ice{padding:3px;min-width:0;min-height:0;display:grid;place-items:center}.ff-ice svg{width:100%;height:100%}.ff-piece-slot{position:absolute;padding:1px;pointer-events:none}.ff-item{border:1px solid #c3c9b6;border-bottom:3px solid #c3c9b6;border-radius:14px;position:relative;background:#fffcf3;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:4px;min-height:76px;min-width:0;touch-action:none!important;user-select:none;-webkit-user-select:none}.ff-item:hover{background:#f3f0e2}.ff-placed{width:100%;height:100%;min-height:0;border:0;background:none!important;pointer-events:auto;padding:0;border-radius:12px}.ff-object{width:100%;height:68px;display:flex;align-items:center;justify-content:center;pointer-events:none}.ff-object svg{display:block;max-width:100%;max-height:100%;width:100%;height:100%;pointer-events:none}.ff-placed .ff-object{height:100%}.ff-item-name{font-size:11px;line-height:1.4;margin-top:3px}.ff-check{display:none;position:absolute;right:2px;top:2px;border-radius:50%;width:20px;height:20px;background:#285d4d;color:white;border:2px solid #fffcf3;font-size:12px;line-height:16px}.ff-item.is-selected{outline:3px solid #315f50;outline-offset:1px;background:#e4edda}.ff-item.is-selected .ff-check{display:block}.ff-item.is-held{opacity:.72}.ff-tray-title{display:flex;justify-content:space-between;font-size:11px;letter-spacing:.06em;margin:0 0 8px;color:var(--muted)}#ff-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;touch-action:none}.ff-empty{border:1px dashed #b7c1af;border-radius:14px;display:grid;place-items:center;min-height:76px;color:#536e5d;background:#eeeddf;font-size:12px;text-align:center;line-height:1.8}.ff-selection{font-size:13px;min-height:20px;margin:12px 0 8px}.ff-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.ff-tools button{background:#fffdf5;border:1px solid #94a58f;border-bottom:3px solid #94a58f;border-radius:10px;min-height:44px;padding:5px;font-size:13px;white-space:nowrap}.ff-tools button:hover:not(:disabled){background:#e6eddb}.ff-tools button span{font-size:18px;vertical-align:middle}.ff-feedback{font-size:12px;line-height:1.5;min-height:36px;margin:10px 0 0;color:var(--muted)}#ff-preview{position:absolute;border:3px dashed #315e48;background:#71a16c33;pointer-events:none;z-index:5;border-radius:10px}#ff-preview[data-valid=false]{border-color:#a3473b;background:#c96c5029}#ff-ghost{position:fixed;left:0;top:0;z-index:1000;pointer-events:none;opacity:.85;will-change:transform;filter:drop-shadow(0 5px 4px #19352755)}#ff-ghost svg{width:100%;height:100%}#ff-ghost[data-valid=false]{opacity:.55}.ff-complete{text-align:center;padding:20px 0 0;max-width:410px;margin:auto}.ff-complete h2{font-size:24px;margin:6px 0}.ff-complete p{font-size:14px}.ff-complete .ff-stars{font-size:32px;color:#996c22;letter-spacing:6px;margin:6px}.ff-results{max-width:420px;margin:30px auto;text-align:center}.ff-results h2{font-size:30px;margin:8px 0}.ff-total{display:flex;gap:12px;align-items:baseline;justify-content:center;color:#315f50;margin:10px}.ff-total b{font-size:70px;line-height:1.2}.ff-total span{font-size:22px}.ff-results ol{list-style:none;padding:0;margin:18px 0;border-top:1px solid #c3c9b6}.ff-results li{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #c3c9b6;font-size:14px}.ff-results li b{color:#92661c;letter-spacing:3px}.ff-rules{border-top:1px solid #c8cebc;margin-top:24px;padding-top:14px;font-size:13px;color:var(--muted);line-height:1.7}.ff-rules summary{cursor:pointer;min-height:32px;color:var(--ink)}.ff-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#fridge-app[data-phase=complete] .ff-workspace{display:block}#fridge-app[data-phase=complete] .ff-fridge{max-width:280px}#fridge-app[data-phase=playing] .ff-heading h1,#fridge-app[data-phase=complete] .ff-heading h1{font-size:28px;margin-bottom:14px}#fridge-app[data-phase=playing] .ff-eyebrow,#fridge-app[data-phase=complete] .ff-heading .ff-eyebrow{display:none}
@media(max-width:650px){.fridge-game{max-width:460px;padding:14px 12px 28px}.ff-top{margin-bottom:10px}.ff-heading h1{margin-bottom:12px}.ff-workspace{display:block}.ff-fridge{max-width:344px;padding:0 12px;border-radius:24px 24px 17px 17px}.ff-fridge-cap{height:28px}.ff-fridge-base{height:12px}.ff-side{margin-top:14px}.ff-tray-title{margin-bottom:6px;font-size:10px}#ff-tray{grid-template-columns:repeat(var(--pieces),minmax(0,1fr));gap:4px}.ff-item{border-radius:9px;min-height:65px;padding:3px}.ff-placed{padding:0;min-height:0}.ff-object{height:40px}.ff-item-name{font-size:9px;white-space:nowrap}.ff-empty{min-height:65px;border-radius:9px}.ff-selection{margin:8px 0 6px;font-size:12px}.ff-feedback{min-height:30px;margin-top:7px}.ff-tools button{min-height:44px}.ff-hud{padding-bottom:8px}.ff-level-heading h2{font-size:14px}.ff-level-heading{margin-bottom:8px}.ff-rules{margin-top:16px}.ff-ready img{max-height:240px}.ff-opening{font-size:13px;margin:6px 0 14px}.ff-complete{padding-top:16px}}
@media(max-width:650px) and (max-height:720px){.ff-fridge{max-width:274px;padding:0 10px}.ff-fridge-cap{height:23px}.ff-fridge-base{height:10px}.ff-side{margin-top:9px}.ff-hud li{height:24px;width:24px}.ff-top{font-size:12px}.ff-ready img{max-height:196px}.ff-opening{font-size:12px}.ff-hud{padding-bottom:6px}.ff-feedback{margin-top:5px}.ff-tray-title{display:none}.ff-selection{margin:5px 0}.ff-item,.ff-empty{min-height:59px}.ff-object{height:34px}.ff-placed{min-height:0}.ff-placed .ff-object{height:100%}}
@media(prefers-reduced-motion:no-preference){.ff-primary,.ff-tools button{transition:background-color .12s}.ff-complete{animation:ff-appear .18s ease-out}@keyframes ff-appear{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}}

#ff-carry{display:block;margin:8px auto 0;border:1px solid #819e89;background:#f0f4e6;border-radius:12px;padding:8px 16px;min-height:44px}
.ff-hud ol{gap:5px}
.ff-hud>span{white-space:nowrap}
@media(max-width:450px){.ff-hud ol{gap:3px}.ff-hud li{height:21px;width:21px;font-size:11px}}
