/* Foodle (/foodle): replaces /vars/foodle/foodle.css, scoped to #game so the site header is untouched.
 * Home look: white bordered rounded tiles, light rounded keys, backspace left / ENTER right, green/yellow/grey states.
 * Keep the tile transform transition and the alert opacity transition: foodle.js waits for their transitionend. */
#game{
  --color-tone-1:#14181f;--color-tone-2:#94a3b8;--color-tone-3:#55606f;--color-tone-4:#dbe1ee;--color-tone-5:#eef1f7;--color-tone-6:#f7f8fa;--color-tone-7:#fff;
  --color-correct:#16a34a;--color-present:#eab308;--color-absent:#94a3b8;
  display:flex;flex-direction:column;align-items:center;width:100%;max-width:650px;margin:0 auto;padding:4px 0 8px;font-family:Nunito,sans-serif;color:#14181f;box-sizing:border-box}
#game *,#game *::before,#game *::after{box-sizing:border-box}
body.colorblind #game{--color-correct:#f5793a;--color-present:#85c0f9}

#game > header{display:flex;align-items:center;justify-content:space-between;width:100%;max-width:500px;height:52px;padding:0 4px;border:0;background:none}
#game > header .menu{display:flex;gap:6px;min-width:84px}
#game > header .menu:last-child{justify-content:flex-end}
#game .logof{display:block;width:auto;height:48px;max-width:46%;object-fit:contain;filter:invert(1) hue-rotate(180deg)}
#game button.icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:1px solid #dbe1ee;border-radius:10px;background:#fff;cursor:pointer;opacity:1;transition:opacity .3s}
#game button.icon:hover{background:#eef1f7}
#game button.icon svg{width:22px;height:22px;pointer-events:none}
#game button.icon path{fill:#55606f}
#game button.disabled-button{opacity:0;pointer-events:none}

.guess-grid{display:grid;justify-content:center;grid-template-columns:repeat(5,58px);grid-template-rows:repeat(6,58px);gap:6px;margin:4px auto 14px}
.guess-grid .tile,#help-modal .tile{display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;border:2px solid var(--color-tone-4);border-radius:12px;background:#fff;color:#14181f;font-size:30px;font-weight:800;line-height:1;text-transform:uppercase;user-select:none;transition:transform 250ms linear}
.guess-grid .tile[data-state=active],#help-modal .tile[data-state=example]{border-color:#b7c0d6;animation:wp-pop .1s}
.guess-grid .tile[data-state=correct],#help-modal .tile[data-state=correct]{border-color:var(--color-correct);background:var(--color-correct);color:#fff}
.guess-grid .tile[data-state=present],#help-modal .tile[data-state=present]{border-color:var(--color-present);background:var(--color-present);color:#fff}
.guess-grid .tile[data-state=absent],#help-modal .tile[data-state=absent]{border-color:var(--color-absent);background:var(--color-absent);color:#fff}
.guess-grid .tile.flip{transform:rotateX(90deg)}
.guess-grid .tile.shake-horizontal{animation:shake-horizontal .8s cubic-bezier(.455,.03,.515,.955) both}
.guess-grid .tile.dance{animation:dance 1s}
@keyframes wp-pop{50%{transform:scale(1.06)}}
@keyframes shake-horizontal{0%,100%{transform:translateX(0)}10%,30%,50%,70%{transform:translateX(-10px)}20%,40%,60%{transform:translateX(10px)}80%{transform:translateX(8px)}90%{transform:translateX(-8px)}}
@keyframes dance{0%,20%,100%{transform:translateY(0)}40%{transform:translateY(-30px)}50%{transform:translateY(5px)}60%{transform:translateY(-15px)}80%{transform:translateY(2px)}}

#keyboard{width:100%;max-width:650px;margin:0 auto;padding:0 4px;user-select:none}
#keyboard .row{display:flex;width:100%;margin:0 auto 8px;touch-action:manipulation}
#keyboard .spacer{flex:.5}
#keyboard button{flex:1;display:flex;align-items:center;justify-content:center;height:48px;margin:0 6px 0 0;padding:0;border:0;border-radius:10px;background:#e7ebf3;box-shadow:0 2px 0 rgba(15,23,42,.10);color:#000;font-family:inherit;font-size:17px;font-weight:800;text-transform:uppercase;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background-color .1s,color .1s}
#keyboard button:last-of-type{margin:0}
#keyboard button:focus{outline:none}
#keyboard button.large{flex:1.6;background:#d7e3f6;font-size:13px}
#keyboard button.large svg{pointer-events:none}
#keyboard button.large path{fill:#14181f}
#keyboard .key.correct{background:var(--color-correct);color:#fff}
#keyboard .key.present{background:var(--color-present);color:#fff}
#keyboard .key.absent{background:var(--color-absent);color:#fff}

.alert-container{position:fixed;top:12vh;left:50vw;z-index:20;display:flex;flex-direction:column;align-items:center;transform:translateX(-50%)}
.alert{margin-bottom:.5em;padding:10px 16px;border-radius:12px;background:#14181f;color:#fff;font-family:Nunito,sans-serif;font-weight:800;opacity:1;pointer-events:none;transition:opacity .5s ease-in-out}
.alert:last-child{margin-bottom:0}
.alert.hide{opacity:0}

#game .overlay{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(15,23,42,.55)}
#game .overlay .content{width:100%;max-width:440px;max-height:90vh;overflow-y:auto;padding:16px 18px;border-radius:18px;background:#fff;color:#14181f;box-shadow:0 18px 50px rgba(15,23,42,.25)}
#game .overlay header{display:flex;align-items:center;justify-content:space-between;height:auto;margin-bottom:8px;border:0}
#game .overlay .modal-title{font-size:20px;font-weight:900;text-transform:none}
#game .overlay button.icon{width:34px;height:34px;border:0;background:#e7ebf3}
#help-modal .instructions{font-size:15px;color:#14181f}
#help-modal .examples{border-top:1px solid #dbe1ee;border-bottom:1px solid #dbe1ee}
#help-modal .example{margin:18px 0}
#help-modal .example-grid{display:grid;justify-content:center;grid-template-columns:repeat(5,44px);grid-template-rows:44px;gap:5px;margin-bottom:8px}
#help-modal .example-grid .tile{font-size:22px;border-radius:10px}
#help-modal section{padding:0 4px 8px}
#settings-modal .setting{display:flex;align-items:center;justify-content:space-between;padding:14px 0}
#settings-modal .title{font-size:17px;font-weight:800}
#settings-modal .description{font-size:13px;color:#55606f}
#settings-modal .container{display:flex;pointer-events:none}
#settings-modal .control{cursor:pointer}
#settings-modal .switch{position:relative;display:block;width:36px;height:22px;border-radius:999px;background:#b7c0d6;pointer-events:none}
#settings-modal .control[checked] .switch{background:#16a34a}
#settings-modal .knob{position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .3s;pointer-events:none}
#settings-modal .control[checked] .knob{transform:translateX(14px)}
#nn_skinl,#nn_skinr{display:none}
#nn_mobile_lb1{text-align:center}

@media (max-width:600px){
  .guess-grid{grid-template-columns:repeat(5,50px);grid-template-rows:repeat(6,50px);gap:6px}
  .guess-grid .tile{font-size:26px;border-radius:10px}
  #keyboard{padding:0 3px}
  #keyboard .row{margin-bottom:7px}
  #keyboard button{height:52px;margin-right:4px;border-radius:8px}
}
@media (max-height:640px){
  .guess-grid{grid-template-columns:repeat(5,42px);grid-template-rows:repeat(6,42px)}
  .guess-grid .tile{font-size:22px}
  #keyboard button{height:44px}
}
