:root { font-family: system-ui, sans-serif; color: #1a2e1a; background: #f2f7f2; }
* { box-sizing: border-box; }
body { margin: 0; }
header { background: #2e5d32; color: #fff; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
header h1 { font-size: 1.2rem; margin: 0; }
header .version { font-size: .7rem; opacity: .75; }
.btn { background: #4c8a50; color: #fff; border: none; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: .9rem; }
.btn.sec { background: #d9e8d9; color: #2e5d32; }
.btn.sec.ok { background: #4c8a50; color: #fff; }
main { max-width: 900px; margin: 0 auto; padding: 20px; }
.card { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 16px; }
label { display: block; font-size: .85rem; color: #4b6b4b; margin-top: 10px; }
input[type=text], select { width: 100%; padding: 8px; border: 1px solid #c4d4c4; border-radius: 8px; font-size: 1rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }
/* Quiz buttons: main button left, Beenden right, natural size (no stretching) */
.btn-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 10px; flex-wrap: wrap; }
.quiz-img { max-width: 100%; max-height: 420px; border-radius: 12px; display: block; margin: 0 auto; }
/* Plant images: single image centered, up to 3 split images side by side, responsive */
.img-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 6px 0; }
.img-grid .quiz-img { max-width: 100%; max-height: 420px; object-fit: contain; }
.hidden { display: none; }
.muted { color: #6b8a6b; font-size: .85rem; }
.pill { display: inline-block; background: #e7f1e7; border-radius: 20px; padding: 3px 10px; font-size: .8rem; margin: 2px; }
.pill input { margin-right: 4px; }
.correct { color: #2e7d32; font-weight: 600; }
.wrong { color: #b3563e; font-weight: 600; }
.big { font-size: 1.1rem; }
.center { text-align: center; }
fieldset { border: 1px solid #c4d4c4; border-radius: 10px; margin: 12px 0; }
.score-bar { height: 10px; background: #e0eae0; border-radius: 5px; overflow: hidden; margin: 10px 0; }
.score-fill { height: 100%; background: #4c8a50; transition: width .3s; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #2e5d32; color: #fff; padding: 10px 20px; border-radius: 20px; display: none; z-index: 10; }
.field-block { margin: 14px 0; padding: 10px; border: 1px solid #e0eae0; border-radius: 10px; }
.field-block .flabel { font-weight: 600; font-size: .9rem; color: #2e5d32; }
.choice-btn { display: block; margin: 6px 0; width: 100%; text-align: left; }
.fact { margin: 4px 0; }
.fact .fact-label { font-weight: 600; color: #2e5d32; font-size: .9rem; }
/* Question blocks: up to 3 per row, responsive via auto-fit */
.ask-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.ask-grid .field-block { margin: 0; }

/* News bell next to the version badge: hover on desktop, tap on touch */
.news-bell { position: relative; display: inline-flex; align-items: center; margin-left: 8px; cursor: pointer; font-size: 1rem; }
.news-dot { position: absolute; top: -2px; right: -4px; width: 9px; height: 9px; background: #e8a13c; border-radius: 50%; border: 1px solid #fff; }
.news-tip { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; min-width: 240px; max-width: 320px; background: #fff; color: #1a2e1a; border: 1px solid #c4d4c4; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.18); padding: 10px 14px; font-size: .85rem; white-space: pre-line; }
.news-bell:hover .news-tip, .news-bell:focus .news-tip, .news-bell.open .news-tip { display: block; }

/* Quiz header: only test name; mode/order shown on hover (desktop) or tap (touch) */
.header-tip { position: relative; cursor: default; }
.header-tip .tip { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; background: #fff; color: #1a2e1a; border: 1px solid #c4d4c4; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.18); padding: 6px 12px; font-size: .85rem; font-weight: 400; white-space: nowrap; }
.header-tip:hover .tip, .header-tip:focus .tip, .header-tip.open .tip { display: block; }

/* Endless checkbox next to the start button */
.start-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.endless-label { margin-top: 0; cursor: pointer; }
