/* Nature Idle V86 – calmer mobile gameplay and unobtrusive founder tools. */
.nd86-founder-at-end {
  margin: 30px auto 14px;
  max-width: 1000px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid #9bb98f;
  background: #e8f1de;
  color: #245238;
}
.nd86-founder-at-end[hidden] { display: none !important; }
.nd86-founder-at-end > summary {
  cursor: pointer;
  font-weight: 850;
  padding: 6px 0;
  font-size: 14px;
}
.nd86-founder-at-end .v38-founder-dock {
  background: #f3f8ec;
  border-color: #a5bd94;
  color: #2a5035;
  box-shadow: none;
}
.nd86-founder-at-end .v38-founder-dock h3 { color: #2a5035; }
.nd86-founder-at-end .v38-founder-dock button {
  border-color: #a4c09a; background: #e1eed7; color: #245338;
}
.nd86-founder-at-end .v38-founder-dock button:hover { background: #d4e6c6; }
body.n30-dark .nd86-founder-at-end { background: #1e3527; border-color: #618669; color: #e3eddc; }
body.n30-dark .nd86-founder-at-end .v38-founder-dock { background: #24412f; color: #e3eddc; }
body.n30-dark .nd86-founder-at-end .v38-founder-dock h3 { color: #d5edca; }
#nd86QuickPlay { display: none; }
@media (max-width: 680px) {
  #gameView #hintCenterToggle { display: none !important; }
  #nd86QuickPlay:not([hidden]) {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    bottom: calc(89px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: min(370px, calc(100% - 30px));
    padding: 7px;
    z-index: 18;
    border: 1px solid #c4b57b;
    background: #faf7eb;
    border-radius: 16px;
    box-shadow: 0 7px 25px #183b2c35;
  }
  #nd86QuickPlay button {
    min-height: 43px;
    border-radius: 11px;
    border: 1px solid #c7dac0;
    background: #e7f1df;
    color: #23573a;
    font: 800 13px/1.3 system-ui, sans-serif;
    padding: 8px 10px;
    cursor: pointer;
  }
  #nd86QuickPlay button:first-child { background: #f8e7ba; border-color: #d4b86c; color: #5a451f; }
  #nd86QuickPlay button:disabled { opacity: .52; cursor: default; }
  #gameView .guess-table-card { scroll-margin-top: 12px; }
  #gameView { padding-bottom: 165px; }
  #gameView .nd86-founder-at-end { margin-top: 26px; }
}


/* Nature Idle V89 – no horizontal scrolling for Wordle comparisons on phones.
   Desktop retains the compact original table; phone displays every guess as an
   accessible expandable two-column layout with full-detail Quick-Info buttons. */
.nd89-guess-board {display:none;}
@media (max-width: 680px) {
  #gameView.nd89-wordle-mobile .guess-table-card {
    display:block !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
  }
  #gameView.nd89-wordle-mobile .guess-table-card > .table-scroll,
  #gameView.nd89-wordle-mobile .guess-table-card > .nw-guide {
    display:none !important;
  }
  #gameView.nd89-wordle-mobile .guess-table-card > .nd89-guess-board {
    display:block !important;
    min-width:0;
    padding: 8px 10px 13px;
    overflow-x:hidden;
    background:#142e22;
    scroll-margin-top:12px;
  }
  #gameView .nd89-mobile-tip {
    margin:0 2px 11px;
    padding:0;
    color:#c6d6c5;
    font:500 12px/1.4 system-ui,sans-serif;
  }
  #gameView .nd89-guess {
    min-width:0;
    margin:0 0 8px;
    padding:0;
    border:1px solid #507159;
    background:#193a2b;
    border-radius:11px;
    overflow:hidden;
  }
  #gameView .nd89-guess:last-child {margin-bottom:0;}
  #gameView .nd89-guess-head {
    display:flex; align-items:center; gap:9px;
    min-height:50px; padding:10px 12px;
    list-style:none;
    color:#f3eed9; cursor:pointer;
    font:750 13px/1.35 system-ui,sans-serif;
  }
  #gameView .nd89-guess-head::-webkit-details-marker {display:none;}
  #gameView .nd89-guess[open] .nd89-guess-head {border-bottom:1px solid #41634a;}
  #gameView .nd89-guess-no {
    flex:0 0 24px;display:grid;place-items:center;
    width:24px;height:24px;border-radius:50%;
    background:#3f7250;color:#fff;font-size:12px;
  }
  #gameView .nd89-guess-name {flex:1;min-width:0;overflow-wrap:anywhere;}
  #gameView .nd89-chevron {font-size:21px;line-height:1;transform:rotate(0);transition:transform .15s;}
  #gameView .nd89-guess[open] .nd89-chevron {transform:rotate(180deg);}
  #gameView .nd89-fields {
    display:grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap:8px;
    padding:10px;
    min-width:0;
  }
  #gameView .nd89-field {
    display:flex;
    flex-direction:column;
    align-items:stretch;
    min-width:0;
    background:#183828;
    border:1px solid #547058;
    border-radius:9px;
    padding:8px;
    gap:5px;
  }
  #gameView .nd89-field-label {
    display:block;
    color:#d3dfcf;
    font:650 10px/1.25 system-ui,sans-serif;
    letter-spacing:.01em;
    overflow-wrap:anywhere;
  }
  #gameView .nd89-field-value {
    display:flex;
    justify-content:center;
    align-items:center;
    width:100%;min-width:0;
    min-height:64px;
    padding:8px 7px;
    border:1px solid transparent;
    border-radius:8px;
    background:#697f70;
    color:#fff;
    font:750 12px/1.3 system-ui,sans-serif;
    text-align:center;
    overflow-wrap:anywhere;
    word-break:normal;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  #gameView .nd89-correct .nd89-field-value {background:#34764e;color:#fff;border-color:#428e5b;}
  #gameView .nd89-near .nd89-field-value {background:#e7c86f;color:#433216;border-color:#d8b758;}
  #gameView .nd89-wrong .nd89-field-value {background:#d78a81;color:#461f20;border-color:#c87973;}
  #gameView .nd89-neutral .nd89-field-value {background:#647c6e;color:#f8f7eb;border-color:#84998b;}
  #gameView .nd89-field-value:focus-visible,
  #gameView .nd89-guess-head:focus-visible {outline:3px solid #f4c965;outline-offset:2px;}
  /* Avoid an additional old bottom-sheet comparison controller when Wordle is active. */
  #gameView.nd89-wordle-mobile .nd86-last-preview,
  #gameView.nd89-wordle-mobile .nd86-comparison-launcher {display:none!important;}
}
@media (max-width:360px) {
  #gameView .nd89-fields {gap:6px;padding:7px;}
  #gameView .nd89-field {padding:6px;}
  #gameView .nd89-field-value {font-size:11px;min-height:65px;}
}
@media (prefers-reduced-motion:reduce) {
  #gameView .nd89-chevron {transition:none;}
}


/* V90 | More compact Wordle values; hints remain accessible without a
   two-button overlay hiding half the current row. */
@media (max-width:680px) {
  #gameView.nd89-wordle-mobile .guess-table-card > .nd89-guess-board {
    padding: 8px 8px 11px;
  }
  #gameView .nd89-mobile-tip {
    font-size: 11px;
    margin-bottom: 8px;
  }
  #gameView .nd89-guess {
    margin-bottom: 7px;
    border-radius: 10px;
  }
  #gameView .nd89-guess-head {
    min-height: 43px;
    padding: 8px 10px;
    font-size: 12px;
    gap: 7px;
  }
  #gameView .nd89-guess-no {
    width: 23px;
    height: 23px;
    flex-basis:23px;
  }
  #gameView .nd89-fields {
    gap: 6px;
    padding: 7px;
  }
  #gameView .nd89-field {
    padding: 6px;
    gap: 4px;
    border-radius: 8px;
  }
  #gameView .nd89-field-label {
    font-size: 10px;
    line-height: 1.2;
  }
  #gameView .nd89-field-value {
    min-height: 44px;
    padding: 7px 5px;
    font-size: 11px;
    line-height: 1.25;
    border-radius: 7px;
  }
  /* The guesses already appear below the input: no redundant floating
     "Versuche" button, just a small, unobtrusive hint shortcut. */
  #gameView.nd89-wordle-mobile #nd86QuickPlay:not([hidden]) {
    display: flex !important;
    position: fixed;
    flex-direction: row;
    justify-content: flex-end;
    width: auto;
    min-width: 0;
    left: auto;
    right: max(11px,env(safe-area-inset-right));
    bottom: calc(89px + env(safe-area-inset-bottom, 0px));
    transform: none;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    z-index: 77;
    pointer-events: none;
  }
  #gameView.nd89-wordle-mobile #nd86QuickHints {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 42px;
    max-width: min(47vw,172px);
    padding: 9px 13px;
    border: 1px solid #d3bc7c;
    background: #f2dfa9;
    color: #52401d;
    box-shadow: 0 3px 10px #1025164a;
    border-radius: 12px;
    font-size: 12px;
    pointer-events: auto;
  }
  #gameView.nd89-wordle-mobile #nd86QuickCompare {
    display: none !important;
  }
  /* Footer/nav remain usable while every guess can be fully scrolled into view. */
  #gameView.nd89-wordle-mobile { padding-bottom: 128px !important; }
}
