/* Main campaign only: leave the home, duels and result panels independent. */
.app.poku-game .recipe-score{align-self:stretch;display:flex;align-items:center;justify-content:center;flex:0 0 auto;max-width:31%;min-width:52px;padding-left:8px;border-left:1px solid #dcc8a6;color:var(--green)}
.app.poku-game .recipe-score #score{font:700 14px/1.2 var(--body);text-align:center;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.app.poku-game .remaining-moves{white-space:nowrap;color:var(--green)}
.app.poku-game .remaining-moves #moves{font:700 13px/1.2 var(--body);font-variant-numeric:tabular-nums}
.app.poku-game .game-status{align-items:baseline;margin:4px 0 0}
.app.poku-game #progress{margin-top:4px}
@media(max-width:600px){
  .tablecloth:has(.app.poku-game.playing){
    /* The common navigation already owns the top safe area, including when
       it lives in the parent portal. Do not reserve that space twice. */
    padding-top:4px;
    padding-bottom:calc(6px + env(safe-area-inset-bottom,0px));
    height:auto;
    overflow:visible;
  }
  .app.poku-game.playing{min-height:0;height:auto;max-height:none;padding:4px 8px}
  /* The fitter reserves the real HUD and helpers first, then keeps cells
     square within the remaining visible height. */
  .app.poku-game.playing .board{width:min(100%,var(--game-board-width,100%));max-width:none}
  /* One combined control row makes room for the original full-width advert. */
  .app.poku-game.playing .sponsor.sponsor-banner{max-width:100%;width:100%}
  .app.poku-game.playing > .poku-game-topbar{margin-bottom:6px}
  .app.poku-game.playing .recipe{padding:4px 8px}
  .app.poku-game.playing .recipe h2{font-size:16px;line-height:1.1;margin-bottom:2px}
  .app.poku-game.playing .goal .food-sprite{width:24px;height:24px}
  .app.poku-game.playing .game-status{min-height:0;gap:8px;margin:4px 0 0}
  .app.poku-game.playing progress{height:4px}
  .app.poku-game.playing .sound-status:empty{display:none}
  /* Navigation, the live move counter and essential actions share one row. */
  .app.poku-game.playing.compact-game-tools .masthead{display:none}
  .app.poku-game.playing.compact-game-tools .game-top{gap:6px;min-height:44px}
  .app.poku-game.playing.compact-game-tools .game-top .masthead-actions{display:flex;gap:6px;flex:none}
  .app.poku-game.playing.compact-game-tools .game-top .masthead-actions :is(.profile-btn,.icon-btn){position:static;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0;border-radius:11px}
  .app.poku-game.playing.compact-game-tools .game-top :is(#back-home,#restart){position:relative;display:grid;place-items:center;flex:none;width:44px;min-width:44px;height:44px;min-height:44px;padding:0}
  .app.poku-game.playing.compact-game-tools .game-top .control-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .app.poku-game.playing.compact-game-tools .game-top .game-control-icon{display:block;width:22px;height:22px}
  .app.poku-game.playing.compact-game-tools .recipe>div:first-child{min-width:0}
  .app.poku-game.playing.compact-game-tools .recipe-context{display:flex;align-items:center;flex-wrap:nowrap;gap:2px 8px;margin:0 0 2px}
  .app.poku-game.playing.compact-game-tools .recipe-context #level-label{flex:none;margin:0;color:var(--green);font:700 11px/1.1 var(--body);white-space:nowrap}
  .app.poku-game.playing.compact-game-tools .recipe-context #recipe-chapter{flex:1;min-width:0;margin:0;font-size:9px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  .tablecloth:has(.app.poku-game.playing.inline-game-navigation){padding-top:calc(4px + env(safe-area-inset-top,0px))}
  .app.poku-game.inline-game-navigation > .poku-game-topbar{display:none}
  .app.poku-game.inline-game-navigation .game-top{position:relative;gap:4px;justify-content:space-between;margin-top:2px}
  .app.poku-game.inline-game-navigation .game-top > .masthead-actions[hidden]{display:none!important}
  .app.poku-game.inline-game-navigation .game-top :is([data-game-home],[data-game-calm],#sound,.game-more-tools>summary){box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;position:static;flex:none;min-width:44px;min-height:44px;margin:0;padding:6px 8px;border:1px solid #cbb38b;border-radius:11px;background:linear-gradient(#fffdf5,#f6ead1);box-shadow:0 3px 0 #b79768;color:var(--green);font:700 12px/1.2 var(--body);white-space:nowrap;text-decoration:none;cursor:pointer}
  .app.poku-game.inline-game-navigation .game-top #sound{width:44px;height:44px;padding:0;font-size:24px}
  .app.poku-game.inline-game-navigation .game-more-tools{position:relative;flex:none;z-index:20}
  .app.poku-game.inline-game-navigation .game-more-tools>summary{width:44px;height:44px;padding:0;list-style:none;font-size:18px}
  .app.poku-game.inline-game-navigation .game-more-tools>summary::-webkit-details-marker{display:none}
  .app.poku-game.inline-game-navigation .game-more-panel{position:absolute;right:0;top:calc(100% + 8px);display:grid;gap:6px;min-width:180px;padding:8px;border:1px solid #cbb38b;border-radius:14px;background:#fff8e9;box-shadow:0 8px 24px #392a1a33}
  .app.poku-game.playing.inline-game-navigation .game-top .game-more-panel :is(#restart,#back-home,#invite-friends,#player-account){position:static;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;width:100%;min-width:0;height:44px;min-height:44px;padding:6px 10px;border-radius:9px;font-size:13px;text-decoration:none}
  .app.poku-game.inline-game-navigation .game-more-panel :is(#restart,#back-home) .control-label{position:static;width:auto;height:auto;padding:0;margin:0;clip-path:none;overflow:visible;white-space:normal}
  .app.poku-game.inline-game-navigation .game-more-panel :is(#invite-friends,#player-account)>span{display:inline;font-size:13px}
  .app.poku-game.inline-game-navigation :is([data-game-home],[data-game-calm],.game-more-tools>summary):focus-visible{outline:3px solid #214c2e;outline-offset:2px}
}
.game-control-icon{display:none}

/* The dish name has its own full-width line; goals and score read together. */
.app.poku-game .recipe{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 10px}
.app.poku-game .recipe>div:first-child{display:contents}
.app.poku-game .recipe :is(.recipe-context,#recipe-chapter){grid-column:1/-1;grid-row:1}
.app.poku-game .recipe h2{grid-column:1/-1;grid-row:2;min-width:0;margin:0;line-height:1.2}
.app.poku-game .recipe .goals{grid-column:1;grid-row:3;min-width:0;display:flex;flex-wrap:wrap;gap:5px}
.app.poku-game .recipe .goal{gap:4px;padding:3px 5px;border:1px solid #d9c5a34d;border-radius:8px;background:#fffdf5a6}
.app.poku-game .recipe .goal strong{white-space:nowrap;font-variant-numeric:tabular-nums}
.app.poku-game .recipe .goal.complete{border-color:#52804f66;background:#e5efdb}
.app.poku-game .recipe .recipe-score{grid-column:2;grid-row:3;align-self:center;min-width:0;max-width:none;padding:6px 9px;border:1px solid #c9b58d;border-radius:9px;background:#eee2c8;text-align:center}
.app.poku-game .recipe-score #score{font:750 16px/1.15 var(--body);white-space:nowrap;overflow-wrap:normal;font-variant-numeric:tabular-nums}
.app.poku-game .game-top>.remaining-moves{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:58px;min-height:44px;padding:3px 7px;border:1px solid #335b3e;border-radius:11px;background:linear-gradient(#3c6247,#284c35);box-shadow:0 3px 0 #1d3b28;color:#fff5d9}
.app.poku-game .remaining-moves-label{font:700 9px/1.1 var(--body);text-transform:uppercase;letter-spacing:.09em;color:#efe1b8}
.app.poku-game .game-top .remaining-moves #moves{font:800 24px/1.05 var(--body);font-variant-numeric:tabular-nums}
.app.poku-game .game-status #live-status{flex:1;text-align:center}
@media(max-width:600px){
  .app.poku-game.playing .recipe{padding:6px 7px;gap:3px 6px;margin-bottom:6px}
  .app.poku-game.playing .recipe h2{font-size:18px;line-height:1.15}
  .app.poku-game.playing .recipe .goal{gap:3px;padding:2px 4px}
  .app.poku-game.playing .recipe .goal .food-sprite{width:24px;height:24px;flex:none}
  .app.poku-game.playing .recipe .goal strong{font-size:13px}
  .app.poku-game.playing .recipe .recipe-score{padding:6px 7px}
  .app.poku-game.playing .recipe-score #score{font-size:14px}
  .app.poku-game.playing.inline-game-navigation .game-top{display:grid;grid-template-columns:auto auto minmax(50px,1fr) 44px 44px;align-items:center;gap:5px}
  .app.poku-game.playing.inline-game-navigation .game-top>.remaining-moves{justify-self:center;min-width:58px;min-height:44px;padding:3px 7px}
  .app.poku-game.playing.inline-game-navigation .game-top .game-more-panel #restart .game-control-icon{display:block;width:22px;height:22px;flex:none}
  .app.poku-game.playing .game-status{min-height:14px}
}
@media(max-width:370px){
  .app.poku-game.playing.inline-game-navigation .game-top{gap:4px}
  .app.poku-game.inline-game-navigation .game-top :is([data-game-home],[data-game-calm]){padding-inline:6px;font-size:11px}
  .app.poku-game.playing .recipe{gap:3px 5px}
  .app.poku-game.playing .recipe .goals{gap:3px}
  .app.poku-game.playing .recipe .goal{padding:2px 3px;gap:2px}
  .app.poku-game.playing .recipe .goal strong{font-size:12px}
  .app.poku-game.playing .recipe .recipe-score{padding:6px}
  .app.poku-game.playing .recipe-score #score{font-size:13px}
}
