.pals-game { --pals-ink:#24483f; --pals-paper:#fffaf0; width:100%; height:100%; min-height:0; display:flex; flex-direction:column; gap:10px; color:var(--pals-ink); font-family:'Trebuchet MS',sans-serif; }
.focus-pals-poster { position:relative; display:inline-block; overflow:hidden; border-radius:24px; background-size:200% 200%; background-position:0 0; }
.focus-pals-friend { position:absolute; bottom:2%; right:2%; width:74%; height:74%; background-size:200% 100%; background-position:0 0; background-repeat:no-repeat; }
.pals-level-links { display:flex; gap:6px; padding:0 16px 14px; }
.pals-level-links button { min-height:44px; flex:1; border:1px solid #bdcdb5; border-radius:13px; color:#245840; background:#fffaf0; font:700 12px 'Trebuchet MS',sans-serif; }
#domGameOverlay > .pals-game { height:100%; padding:0; max-width:none; background:none; border:0; box-shadow:none; }
.pals-game *, .pals-drag-ghost * { box-sizing:border-box; }
.pals-game [hidden] { display:none!important; }
.pals-drop.is-hovered { outline:4px solid #fff5bf; outline-offset:3px; box-shadow:0 0 0 7px #356950a0; }
.pals-lamp-on:before { content:''; position:absolute; inset:-15%; border-radius:50%; background:radial-gradient(ellipse,#ffdd766e,transparent 70%); pointer-events:none; }
.pals-game[data-complete="true"] .pals-room-piece { cursor:pointer; }
.pals-game[data-complete="true"] .pals-drop { border-style:solid; }
.pals-cue { display:flex; align-items:center; flex-wrap:wrap; justify-content:center; gap:12px; padding:8px 12px; background:var(--pals-paper); border:1px solid #d9dfc9; border-radius:20px; flex-shrink:0; }
.pals-picture-cue { display:flex; align-items:center; justify-content:center; gap:6px; }
.pals-target-name { font-size:14px; font-weight:800; text-transform:capitalize; }
.pals-instruction { margin:0!important; font-size:clamp(15px,2.6vw,21px)!important; line-height:1.25!important; font-weight:800; letter-spacing:0!important; }
.pals-steps { display:flex; gap:4px; align-items:center; }
.pals-steps i { width:7px; height:7px; border:1px solid #5c7965; border-radius:50%; background:#fff; }
.pals-steps .is-done { background:#34705b; }
.pals-work { display:flex; flex-direction:column; flex:1; min-height:0; min-width:0; width:100%; align-self:stretch; gap:10px; }
.pals-board { position:relative; min-height:230px; flex:1; overflow:hidden; border-radius:24px; border:2px solid #e1d9bc; background:#d8dfbc; isolation:isolate; }
.pals-backdrop { position:absolute; inset:0; z-index:-1; background-size:200% 200%; background-repeat:no-repeat; }
.pals-scenery,.pals-targets { position:absolute; inset:0; pointer-events:none; }
.pals-targets button { pointer-events:auto; }
.pals-friend { position:absolute; width:clamp(88px,23%,164px); aspect-ratio:1; left:71%; bottom:12%; background-size:200% 100%; background-position:0 0; background-repeat:no-repeat; pointer-events:none; filter:drop-shadow(0 4px 2px #352d2520); transition:left .65s ease-in-out,bottom .65s ease-in-out; }
.pals-friend.pals-offering { background-position:100% 0; }
.pals-sprite { display:inline-block; flex-shrink:0; background-size:400% 400%; background-repeat:no-repeat; vertical-align:middle; pointer-events:none; }
.pals-palette { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; flex-shrink:0; }
.pals-palette[hidden] { display:none; }
.pals-choice { min-width:0; min-height:64px; border:2px solid #cbd8c2; border-radius:18px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; color:var(--pals-ink); background:var(--pals-paper); padding:4px; cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; }
.pals-choice .pals-sprite { max-width:64px; max-height:64px; }
.pals-choice-name { font-size:12px; font-weight:800; line-height:1.25; text-transform:capitalize; }
.pals-choice[aria-pressed="true"] { border-color:#276f58; background:#e5f0d9; }
.pals-choice:focus-visible,.pals-drop:focus-visible,.pals-control:focus-visible,.pals-room-piece:focus-visible { outline:4px solid #18574f; outline-offset:3px; }
.pals-drop { position:absolute; min-width:48px; min-height:48px; display:flex; justify-content:center; align-items:center; border:2px solid transparent; border-radius:18px; background:transparent; touch-action:manipulation; cursor:pointer; }
.pals-drop.is-next { border:3px dashed #fffcde; box-shadow:0 0 0 2px #315c4b,0 0 15px #fff7ba66; background:#fffbea22; }
.pals-drop.is-done { border-color:#fff8cc; }
.pals-drop .pals-sprite { width:min(100%,90px)!important; height:auto!important; aspect-ratio:1; }
.pals-drop .pals-on-stone { position:absolute; top:-15%; width:56%!important; }
.pals-stone-number { position:absolute; font-size:18px; color:#fffdf0; background:#3d6453; border:2px solid #fffdf0; border-radius:50%; min-width:28px; min-height:28px; display:grid; place-items:center; }
.pals-notice { position:absolute; top:2%; left:5%; width:90%; padding:5px 9px; border-radius:12px; background:#fff9edee; text-align:center; font-size:13px; font-weight:700; pointer-events:none; margin:0!important; }
.pals-notice:empty { display:none; }
.pals-packet { position:relative; display:inline-flex; pointer-events:none; }
.pals-packet .pals-stamp { position:absolute; left:27%; top:33%; background-color:#fffdf0dd; border:1px solid #c2b28b; border-radius:7px; }
.pals-packet .pals-stamp { width:43%!important; height:43%!important; }
.pals-choice .pals-packet .pals-stamp { width:43%!important; height:43%!important; }
.pals-train-set { position:absolute; left:6%; bottom:7%; width:auto; max-width:88%; height:var(--pals-train-height,44%); aspect-ratio:2.6; }
.pals-scenery button.pals-train-set { pointer-events:auto; border:0; padding:0; background:none; cursor:pointer; touch-action:manipulation; }
.pals-train-set:focus-visible { outline:4px solid #fff5bf; outline-offset:3px; border-radius:20px; }
.pals-wagon { position:absolute; left:0; bottom:0; width:55%; height:100%; object-fit:contain; }
.pals-engine { position:absolute; left:49%; bottom:0; width:auto!important; height:100%!important; aspect-ratio:1; }
.pals-loaded { position:absolute; bottom:37%; z-index:1; }
.pals-game[data-mode="parcel_pals"] .pals-drop { opacity:.8; }
.pals-controls { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; flex-shrink:0; }
.pals-controls:empty { display:none; }
.pals-control { min-height:48px; padding:10px 15px; border:1px solid #b2c6ad; border-radius:16px; background:#fffaf0; color:#24483f; font:800 15px 'Trebuchet MS',sans-serif; cursor:pointer; }
.pals-control:last-child { background:#245f4b; color:#fffdf1; }
.pals-place-alternative { font-size:13px; }
.pals-room-piece { position:absolute; transform:translate(-50%,-70%); background:none; border:0; min-width:64px; min-height:64px; padding:0; cursor:grab; touch-action:none; }
.pals-room-piece:focus-visible { border-radius:16px; background:#fff8cd77; }
.pals-drag-ghost { position:fixed; z-index:10000; pointer-events:none; opacity:.9; background:#fff8ebd9; color:#24483f; border:2px solid #2a7259; border-radius:18px; display:flex; flex-direction:column; align-items:center; justify-content:center; box-shadow:0 10px 25px #20382d33; transform:rotate(-3deg); }
.pals-seeds-in-soil { position:absolute; width:8px; height:4px; border-radius:60%; background:#ae8048; top:29%; left:46%; box-shadow:11px 3px #ba8953,-9px 2px #b58a57; }
.pals-drop[data-stage="watered"] .pals-seeds-in-soil { box-shadow:11px 3px #80653d,-9px 2px #80653d; background:#80653d; }
.pals-watering:after { content:''; position:absolute; left:var(--pour-x,50%); top:var(--pour-y,50%); width:3px; height:35px; border-radius:50%; background:#a2d6e8; box-shadow:9px 6px #b9e4f1,-7px 4px #a6d6e7; animation:pals-pour .7s ease-out; pointer-events:none; }
.pals-working-tool { position:absolute; left:var(--pour-x); top:var(--pour-y); transform:translate(4px,-70px) rotate(-16deg); animation:pals-tool .8s ease-in-out; }
@keyframes pals-tool { 0%,100% { opacity:0; transform:translate(10px,-80px) rotate(0); } 25%,70% { opacity:1; transform:translate(4px,-70px) rotate(-16deg); } }
.pals-new-day .pals-backdrop { animation:pals-day .8s ease-in-out; }
.pals-sr-only { position:absolute!important; width:1px!important; height:1px!important; overflow:hidden!important; clip-path:inset(50%); }
.pals-game[data-still="true"] * { transition:none!important; animation:none!important; }
@keyframes pals-pour { from { transform:translateY(-25px); opacity:0; } 25% { opacity:.9; } to { transform:translateY(30px); opacity:0; } }
@keyframes pals-day { 50% { filter:brightness(.6) saturate(.7); } }
@media(min-width:720px) { .pals-work { flex-direction:row; } .pals-palette { width:190px; align-content:start; grid-template-columns:repeat(2,minmax(0,1fr)); } .pals-board { min-height:260px; } }
@media(max-height:500px) and (orientation:landscape) {
  .pals-game { gap:5px; } .pals-cue { padding:3px 8px; gap:6px; border-radius:12px; }
  .pals-instruction { font-size:14px!important; } .pals-cue .pals-sprite { width:28px!important; height:28px!important; }
  .pals-work { flex-direction:row; gap:8px; } .pals-board { min-height:190px; border-radius:16px; }
  .pals-palette { width:160px; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:5px; }
  .pals-choice { min-height:48px; padding:2px; border-radius:12px; } .pals-choice .pals-sprite { width:34px!important; height:34px!important; }
  .pals-choice-name { font-size:10px; } .pals-control { min-height:44px; padding:6px 10px; font-size:12px; }
  .pals-friend { width:95px; } .pals-steps i { width:5px; height:5px; }
}
@media(prefers-reduced-motion:reduce) { .pals-game * { animation:none!important; transition:none!important; } }
.focus-story-link { display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 16px;color:#506951;font-size:13px; }
.focus-story-link a { display:inline-flex;align-items:center;min-height:44px;padding:8px 14px;border:1px solid #b9cdb7;border-radius:14px;background:#fffaf0;color:#24583f;font-weight:800;text-decoration:none; }
