/* NatureDex Vergleichsübersicht V2 – mobile-only, source-of-truth is cloudGuessCell.
   Inspired by the approved forest-green mockup; no sideways scroll, no invented values. */
.ndxv2-launcher,.ndxv2-preview,.ndxv2-backdrop,.ndxv2-sheet,
.ndxv2-info-backdrop,.ndxv2-info{display:none}
.ndxv2-backdrop[hidden],.ndxv2-sheet[hidden],.ndxv2-info-backdrop[hidden],
.ndxv2-info[hidden],.ndxv2-preview[hidden],.ndxv2-photo-fallback[hidden]{display:none!important}
@media(max-width:680px){
  body.ndxv2-ready #gameView .guess-table-card{display:none!important}
  #gameView.active-view .ndxv2-launcher[data-has-guesses="true"]{
    display:flex;position:fixed;left:12px;right:82px;
    bottom:calc(78px + env(safe-area-inset-bottom,0px));
    z-index:78;height:52px;gap:8px;align-items:center;justify-content:center;
    border-radius:15px;border:1px solid #9cce71;
    background:linear-gradient(145deg,#276f42,#16472c);
    color:#f4ffe9;box-shadow:0 8px 20px #06201285;
    font:800 14px/1.2 system-ui,-apple-system,sans-serif;
    cursor:pointer;touch-action:manipulation
  }
  #gameView .ndxv2-launcher small{color:#c9ecab;font-size:12px}
  #gameView .ndxv2-launcher.ndxv2-new{box-shadow:0 0 0 3px #a5e56555,0 8px 20px #06201285}
  body.hint-center-open #gameView .ndxv2-launcher,
  body.ndxv2-open #gameView .ndxv2-launcher,
  body.ndxv2-open #gameView .hint-fab,
  body:has(.modal:not(.hidden)) #gameView .ndxv2-launcher{display:none!important}
  #gameView .ndxv2-preview:not([hidden]){
    display:grid;gap:7px;width:min(100%,720px);margin:10px auto 12px;
    padding:11px 12px;border-radius:13px;border:1px solid #9cbd95;
    background:#f2f5e9;color:#244631;
  }
  #gameView .ndxv2-preview-label{font:800 13px/1.35 system-ui,sans-serif}
  #gameView .ndxv2-preview-button{
    padding:4px 0;justify-self:start;border:0;background:transparent;
    color:#1e6743;font:800 13px/1.3 system-ui,sans-serif;text-decoration:underline;cursor:pointer
  }
  .ndxv2-backdrop:not([hidden]){
    display:block;position:fixed;inset:0;z-index:1098;
    background:#06120bd9;backdrop-filter:blur(6px)
  }
  .ndxv2-sheet:not([hidden]){
    display:flex;flex-direction:column;position:fixed;inset:0;z-index:1099;
    box-sizing:border-box;width:100%;height:100dvh;max-height:100dvh;
    padding-top:max(24px,env(safe-area-inset-top,0px));
    color:#ecf6e7;background:
       radial-gradient(ellipse 110% 45% at 12% -12%,#4b793b6a,transparent 80%),
       radial-gradient(ellipse 140% 90% at 125% 80%,#113f2b90,transparent 72%),
       linear-gradient(168deg,#102f1c,#061f14 75%);
    border:1px solid #426a3c;overflow:hidden;
    font-family:system-ui,-apple-system,Segoe UI,sans-serif
  }
  body.ndxv2-open{overflow:hidden}
  .ndxv2-head{
    display:flex;flex:0 0 auto;gap:10px;align-items:center;
    padding:12px 15px 13px;border-bottom:1px solid #355b39;
    background:#0c2a1d99
  }
  .ndxv2-brand{font-size:27px;display:grid;place-items:center;width:39px;height:39px;border-radius:50%;background:#1a4a2f}
  .ndxv2-head-copy{flex:1;min-width:0}
  .ndxv2-head h2{margin:0;color:#f7fff3;font-weight:850;font-size:clamp(20px,5.6vw,27px);line-height:1.13;letter-spacing:-.025em}
  .ndxv2-head p{margin:4px 0 0;color:#bfd5b9;font-size:11px;line-height:1.35}
  .ndxv2-close{
    display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;
    background:#143d2a;color:#f1ffe8;border:1px solid #779970;
    border-radius:50%;font-size:29px;line-height:1;cursor:pointer
  }
  .ndxv2-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 12px 24px;scrollbar-width:thin;scrollbar-color:#46734d transparent}
  .ndxv2-guess{
    display:block;min-width:0;margin:0 0 9px;border:1px solid #3f6840;
    border-radius:15px;background:#123a25;overflow:hidden;
    box-shadow:inset 0 1px #ffffff12
  }
  .ndxv2-latest{
    border-color:#79c248;
    background:linear-gradient(145deg,#173e26,#0c301e);
    box-shadow:0 0 0 1px #80cf421f,0 7px 16px #04180d60
  }
  .ndxv2-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;
    padding:12px 11px;cursor:pointer;list-style:none;min-height:45px;
    color:#f3f9ef;font-size:13px;font-weight:800;line-height:1.3}
  .ndxv2-summary::-webkit-details-marker{display:none}
  .ndxv2-summary::marker{content:''}
  .ndxv2-summary-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .ndxv2-summary-right{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
  .ndxv2-score{
    padding:6px 9px;border-radius:30px;border:1px solid #668c3d;
    color:#d2f9a9;background:#325a2e;font-size:10px;white-space:nowrap
  }
  .ndxv2-chevron{flex:0 0 auto;font-size:21px;line-height:1;transition:transform .15s ease}
  .ndxv2-guess[open] .ndxv2-chevron{transform:rotate(180deg)}
  .ndxv2-guess-content{padding:0 9px 12px}
  .ndxv2-feature-layout{display:grid;gap:10px;grid-template-columns:1fr}
  .ndxv2-photo{position:relative;overflow:hidden;margin:0;width:100%;height:146px;
    border-radius:12px;background:radial-gradient(circle at 50% 40%,#396842,#153c25);
    border:1px solid #54784b}
  .ndxv2-photo>img{display:block;width:100%;height:100%;object-fit:cover}
  .ndxv2-photo-fallback{position:absolute;inset:0;display:grid;place-items:center;font-size:58px}
  .ndxv2-photo-credit{
    position:absolute;bottom:0;left:0;right:0;max-height:34px;overflow:hidden;
    color:#f2f9ec;font:500 9px/1.2 system-ui,sans-serif;
    padding:4px 8px;background:#06190cb5
  }
  .ndxv2-traits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .ndxv2-trait{
    display:flex;align-items:center;text-align:left;gap:7px;min-width:0;min-height:63px;
    padding:7px;border:1px solid #376c3c;border-radius:11px;
    background:#153b29;color:#f1f8ec;cursor:pointer
  }
  .ndxv2-trait-icon{flex:0 0 24px;font-size:18px;text-align:center}
  .ndxv2-trait-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
  .ndxv2-trait-label{font-size:10px;color:#c3dac2;line-height:1.2}
  .ndxv2-trait-value{font-size:11px;color:#f4ffe7;line-height:1.32;overflow:hidden;
    display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow-wrap:anywhere}
  .ndxv2-trait-status{
    display:grid;place-items:center;flex:0 0 21px;width:21px;height:21px;
    border-radius:50%;font:850 15px/1 system-ui,sans-serif
  }
  .ndxv2-trait.ndxv2-correct{border-color:#4a8b4d;background:#1d472d}
  .ndxv2-trait.ndxv2-correct .ndxv2-trait-status{background:#67bf43;color:#09220f}
  .ndxv2-trait.ndxv2-near{border-color:#9b802f;background:#40391e}
  .ndxv2-trait.ndxv2-near .ndxv2-trait-status{background:#e6c64a;color:#34240b}
  .ndxv2-trait.ndxv2-wrong{border-color:#914640;background:#442925}
  .ndxv2-trait.ndxv2-wrong .ndxv2-trait-status{background:#e26659;color:#2f1010}
  .ndxv2-trait.ndxv2-neutral{border-color:#607468;background:#29403a}
  .ndxv2-trait.ndxv2-neutral .ndxv2-trait-status{background:#8c9b93;color:#10241c}
  .ndxv2-evidence{margin:9px 2px 0;color:#b5cbb5;font-size:10px;line-height:1.4}
  .ndxv2-guide{
    padding:11px 10px;margin:12px 0 14px;border:1px solid #6aa045;border-radius:14px;
    background:#113620;box-shadow:0 3px 12px #05190a4d
  }
  .ndxv2-guide-top{display:flex;justify-content:space-between;align-items:baseline;
    flex-wrap:wrap;gap:5px;margin-bottom:11px}
  .ndxv2-guide h3{margin:0;font-size:16px;font-weight:850;color:#f5fff0}
  .ndxv2-guide-top p{margin:0;font-size:10px;color:#c1d7b5}
  .ndxv2-guide-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(65px,1fr));gap:6px}
  .ndxv2-guide-item{
    position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;
    min-width:0;gap:4px;min-height:74px;padding:8px 3px 5px;
    border:1px solid #557c46;border-radius:10px;background:#1c452c;color:#f4ffe9
  }
  .ndxv2-guide-num{
    position:absolute;top:-7px;left:5px;display:grid;place-items:center;
    height:20px;min-width:20px;border-radius:50%;padding:0 3px;
    background:#a1df5c;color:#122917;font:850 11px/1 system-ui,sans-serif
  }
  .ndxv2-guide-icon{font-size:20px;line-height:1.2}
  .ndxv2-guide-label{font-size:10px;font-weight:750;text-align:center;line-height:1.2;
    overflow-wrap:anywhere}
  .ndxv2-color-bar{display:grid;grid-template-columns:repeat(var(--ndxv2-count),minmax(0,1fr));
    gap:3px;min-width:0;width:100%;max-width:210px}
  .ndxv2-swatch{min-width:0;height:20px;display:grid;place-items:center;border-radius:5px;
    font-size:9px;font-weight:850;text-shadow:0 1px 2px #07170b88}
  .ndxv2-swatch.ndxv2-correct,.ndxv2-legend-swatch.ndxv2-correct{background:#61bb35;color:#fff}
  .ndxv2-swatch.ndxv2-near,.ndxv2-legend-swatch.ndxv2-near{background:#e4c443;color:#372d08}
  .ndxv2-swatch.ndxv2-wrong,.ndxv2-legend-swatch.ndxv2-wrong{background:#d85e51;color:#fff}
  .ndxv2-swatch.ndxv2-neutral,.ndxv2-legend-swatch.ndxv2-neutral{background:#87968a;color:#132b1c}
  .ndxv2-guess:not(.ndxv2-latest) .ndxv2-summary{
    display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}
  .ndxv2-guess:not(.ndxv2-latest) .ndxv2-summary-right{max-width:min(55vw,240px)}
  .ndxv2-guess:not(.ndxv2-latest) .ndxv2-guess-content{padding-top:8px}
  .ndxv2-legend{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 8px;
    margin:13px 0;padding:12px;background:#1a3b27;border:1px solid #476f39;border-radius:13px
  }
  .ndxv2-legend-item{display:flex;align-items:center;gap:6px;min-width:0;
    font:650 11px/1.25 system-ui,sans-serif;color:#e1efd6}
  .ndxv2-legend-swatch{display:block;flex:0 0 21px;height:19px;border-radius:5px}
  .ndxv2-foot{flex:0 0 auto;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));
    background:#092516;border-top:1px solid #426f37}
  .ndxv2-next{display:block;width:100%;min-height:54px;
    background:linear-gradient(145deg,#b7f775,#74d53e);color:#102c15;
    border:1px solid #bdff78;border-radius:15px;
    font:900 18px/1.2 system-ui,sans-serif;cursor:pointer}
  .ndxv2-info-backdrop:not([hidden]){
    position:fixed;inset:0;display:block;z-index:1205;background:#04180bdc}
  .ndxv2-info:not([hidden]){
    position:fixed;z-index:1206;display:flex;flex-direction:column;gap:12px;
    top:50%;left:50%;transform:translate(-50%,-50%);
    width:min(420px,calc(100vw - 26px));max-height:80dvh;overflow-y:auto;
    box-sizing:border-box;padding:18px;border-radius:17px;
    color:#eef8e8;background:#123a26;border:1px solid #83ba66;box-shadow:0 18px 50px #030e088a
  }
  .ndxv2-info h3{margin:0;color:#fff;font-size:19px}
  .ndxv2-info p{margin:0;overflow-wrap:anywhere;font-size:13px;line-height:1.45}
  .ndxv2-info-animal{color:#c7ddc0}
  .ndxv2-info-value{font-weight:750}
  .ndxv2-info-status{font-weight:800}
  .ndxv2-info-status.ndxv2-correct{color:#b5fa8e}
  .ndxv2-info-status.ndxv2-near{color:#f8db68}
  .ndxv2-info-status.ndxv2-wrong{color:#ffaca1}
  .ndxv2-info-status.ndxv2-neutral{color:#ced6ce}
  .ndxv2-info-signal,.ndxv2-info-note{color:#c4d6c2}
  .ndxv2-info-close{min-height:42px;border-radius:9px;background:#92da5b;color:#163417;border:0;font-weight:800}
  .ndxv2-close:focus-visible,.ndxv2-next:focus-visible,.ndxv2-trait:focus-visible,
  .ndxv2-info button:focus-visible,.ndxv2-summary:focus-visible,
  #gameView .ndxv2-launcher:focus-visible{outline:3px solid #ffdb5e;outline-offset:2px}
  @media(min-width:500px){
    .ndxv2-sheet:not([hidden]){left:50%;transform:translateX(-50%);width:min(100%,530px);border-radius:20px 20px 0 0}
    .ndxv2-feature-layout{grid-template-columns:35% 1fr}
    .ndxv2-photo{height:auto;min-height:183px}
  }
  @media(max-width:365px){
    .ndxv2-scroll{padding-inline:8px}
    .ndxv2-summary{font-size:12px}
    .ndxv2-trait{padding:6px 5px;gap:4px;min-height:62px}
    .ndxv2-trait-icon{flex-basis:20px;font-size:15px}
    .ndxv2-trait-status{flex-basis:19px;width:19px;height:19px}
    .ndxv2-guess:not(.ndxv2-latest) .ndxv2-summary-right{max-width:52vw}
    .ndxv2-swatch{height:18px}
  }
}
@media(prefers-reduced-motion:reduce){
 .ndxv2-chevron{transition:none!important}
}

/* V2.1 — Real-device 411px correction (13 Nov 2026).
   9 comparison columns CANNOT share one line with long animal names on phones:
   two-line summaries give each color enough room. No numerals inside color chips.
   The numbered key uses a compact 3-column legend rather than huge icon cards. */
@media(max-width:680px){
  .ndxv2-scroll{
    padding:10px 12px 22px;
    scrollbar-gutter:stable;
  }
  .ndxv2-guess{border-radius:14px;margin-bottom:8px}
  .ndxv2-summary{min-height:40px;padding:10px 12px}
  .ndxv2-summary-name{font-size:14px;line-height:1.3}
  .ndxv2-summary-right{min-width:0}
  .ndxv2-guess:not(.ndxv2-latest) .ndxv2-summary{
    display:grid;
    grid-template-columns:minmax(0,1fr) 25px;
    grid-template-rows:auto 25px;
    gap:7px 5px;
    padding:10px 13px 12px;
  }
  .ndxv2-guess:not(.ndxv2-latest) .ndxv2-summary-name{
    grid-column:1;grid-row:1;min-width:0;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  .ndxv2-guess:not(.ndxv2-latest) .ndxv2-summary-right{
    display:contents;max-width:none;
  }
  .ndxv2-guess:not(.ndxv2-latest) .ndxv2-summary .ndxv2-chevron{
    grid-column:2;grid-row:1;justify-self:center;
    font-size:24px;
  }
  .ndxv2-guess:not(.ndxv2-latest) .ndxv2-color-bar{
    grid-column:1 / -1;grid-row:2;
    max-width:none;width:100%;gap:5px;
  }
  .ndxv2-color-bar{
    width:100%;max-width:none;gap:5px;
  }
  .ndxv2-swatch{
    height:25px;min-width:0;min-height:0;
    border-radius:6px;font-size:0;
    color:transparent!important;text-shadow:none;
    box-shadow:inset 0 1px 0 #ffffff30,0 1px 0 #07180d40;
  }
  .ndxv2-guide{
    margin:10px 0 13px;padding:12px 10px 11px;
    border-radius:13px;
  }
  .ndxv2-guide-top{margin:0 0 10px;align-items:center}
  .ndxv2-guide h3{font-size:15px;letter-spacing:-.01em}
  .ndxv2-guide-top p{font-size:10px;line-height:1.35}
  .ndxv2-guide-grid{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;
  }
  .ndxv2-guide-item{
    display:flex;flex-direction:row;
    justify-content:flex-start;align-items:center;
    min-height:41px;gap:4px;
    padding:6px 5px;
    border-radius:9px;
    background:#1b422b;
  }
  .ndxv2-guide-num{
    position:static;flex:0 0 19px;min-width:19px;height:19px;
    padding:0;margin:0;
    font-size:11px;background:#a0e365;
  }
  .ndxv2-guide-icon{
    flex:0 0 15px;width:15px;text-align:center;font-size:15px;
    line-height:1.1;
  }
  .ndxv2-guide-label{
    flex:1;min-width:0;text-align:left;font-size:10.5px;
    line-height:1.18;font-weight:750;overflow-wrap:anywhere;
  }
  /* A small photograph beside a short explanation, NEVER a huge full-width photo.
     The detail grid below keeps two readable equal columns. */
  .ndxv2-feature-layout{
    display:flex;flex-direction:column;gap:10px;
  }
  .ndxv2-photo-intro{display:flex;align-items:center;gap:12px;min-width:0}
  .ndxv2-photo{
    box-sizing:border-box;flex:0 0 96px;
    width:96px;height:88px;min-height:0;
    border-radius:10px;
  }
  .ndxv2-photo-fallback{font-size:38px}
  .ndxv2-photo-credit{font-size:8px;padding:3px 5px}
  .ndxv2-photo-copy{
    display:flex;flex:1;min-width:0;flex-direction:column;
    justify-content:center;gap:6px;
  }
  .ndxv2-photo-kicker{
    font-size:13px;color:#e7f9dd;font-weight:850;
  }
  .ndxv2-photo-instruction{
    font-size:11px;line-height:1.4;color:#b8d3b6;
  }
  .ndxv2-traits{width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .ndxv2-trait{
    box-sizing:border-box;gap:7px;min-height:59px;
    padding:8px;overflow:hidden;
  }
  .ndxv2-trait-icon{flex:0 0 20px;font-size:16px}
  .ndxv2-trait-label{font-size:11px}
  .ndxv2-trait-value{font-size:12px}
  .ndxv2-score{padding:5px 8px;font-size:10px}
  .ndxv2-evidence{font-size:10px;margin:9px 0 0}
  .ndxv2-legend{margin:11px 0;padding:10px}
}
@media(max-width:350px){
  .ndxv2-guide-item{gap:3px;padding-inline:4px}
  .ndxv2-guide-icon{flex-basis:12px;width:12px;font-size:13px}
  .ndxv2-guide-num{flex-basis:17px;min-width:17px;height:17px;font-size:10px}
  .ndxv2-guide-label{font-size:9px}
  .ndxv2-guess:not(.ndxv2-latest) .ndxv2-color-bar{gap:3px}
  .ndxv2-trait{padding:5px;gap:4px}
  .ndxv2-trait-value{font-size:11px}
}
/* Restore readable photo layout on tablet desktop-sized mobile window. */
@media(min-width:500px) and (max-width:680px){
  .ndxv2-photo{width:114px;height:106px;flex-basis:114px}
  .ndxv2-guide-item{min-height:41px}
  .ndxv2-trait{min-height:62px}
}

/* V2.2: Prevent the in-page preview from widening narrow Android WebViews.
   width:100% plus padding formerly caused viewport shrink and clipped close buttons. */
@media(max-width:680px){
  #gameView .ndxv2-preview:not([hidden]){
    box-sizing:border-box;
    max-width:100%;
  }
}

/* Alpha-Test 14.11.2026 (Emulator Pixel 9):
   • Die Leiste „Vergleiche ansehen“ lag mit z-index 87 über dem „Mehr“-Menü (79)
     und verdeckte dessen Einträge → jetzt z-index 78 (oben) und im Menü ausgeblendet.
   • Sie verdeckte außerdem das Ende des Spielbereichs (u. a. „Hinweise“) → mehr Abstand unten. */
/* • Kachelwerte: 3 statt 2 Zeilen, damit „↓ Gesuchtes Tier ist leichter/schwerer“
     nicht abgeschnitten wird – das ist der wichtigste Hinweis der Kachel. */
@media(max-width:680px){
  body:has(#ndMobileMoreMenu:not([hidden])) #gameView .ndxv2-launcher{display:none!important}
  body.ndxv2-ready #gameView.active-view:has(.ndxv2-launcher[data-has-guesses="true"]),
  body.ndxv2-ready #gameView.nd89-wordle-mobile:has(.ndxv2-launcher[data-has-guesses="true"]){
    padding-bottom:calc(150px + max(env(safe-area-inset-bottom,0px),var(--safe-area-inset-bottom,0px)))!important
  }
}

/* Keep complete comparison values readable at narrow widths and large text sizes. */
@media(max-width:680px){
  .ndxv2-trait-value{display:block;overflow:visible;-webkit-line-clamp:unset;overflow-wrap:normal;word-break:normal;hyphens:auto}
}
@media(max-width:350px){.ndxv2-traits{grid-template-columns:minmax(0,1fr)}}
