/* QUESTION SESSION */
.qs-shell {
  width: min(100vw, 432px);
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  color: var(--green);
  background:
    radial-gradient(circle at 82% 4%, rgba(255,255,255,.24), transparent 25%),
    linear-gradient(180deg, #f6e5d0 0%, #eed7ba 100%);
}

.qs-inner {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: max(18px, env(safe-area-inset-top)) 15px max(12px, env(safe-area-inset-bottom));
}

.qs-header {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 45px minmax(0,1fr) 48px;
  align-items: center;
  gap: 10px;
}

.qs-back {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 50%;
  background: rgba(255,249,241,.54);
  color: var(--green);
  box-shadow: 0 7px 18px rgba(86,60,37,.08), inset 0 1px 0 rgba(255,255,255,.92);
}

.qs-back svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qs-header-copy {
  min-width: 0;
}

.qs-header-copy span,
.qs-header-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qs-header-copy span {
  color: #756f66;
  font-size: 9px;
  font-weight: 750;
}

.qs-header-copy strong {
  margin-top: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.qs-counter {
  justify-self: end;
  min-width: 45px;
  padding: 8px 9px;
  border: 1px solid rgba(11,74,56,.10);
  border-radius: 13px;
  background: rgba(255,249,241,.42);
  text-align: center;
  font-size: 10px;
  font-weight: 900;
}

.qs-progress {
  flex: 0 0 auto;
  height: 5px;
  margin: 12px 2px 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(11,74,56,.10);
}

.qs-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width .25s ease;
}

.qs-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 1px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.qs-content::-webkit-scrollbar { display: none; }

.qs-question-card {
  padding: 17px 17px 18px;
  border: 1px solid rgba(255,255,255,.79);
  border-radius: 25px;
  background: rgba(255,249,241,.56);
  box-shadow: 0 9px 23px rgba(91,62,37,.08), inset 0 1px 0 rgba(255,255,255,.92);
}

.qs-kicker {
  display: block;
  color: #9a711d;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 1.3px;
}

.qs-question-card h1 {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 5.8vw, 27px);
  line-height: 1.12;
  letter-spacing: -.35px;
}

.qs-options {
  display: grid;
  gap: 9px;
  margin-top: 11px;
}

.qs-option {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 9px;
  border: 1px solid rgba(11,74,56,.12);
  border-radius: 20px;
  background: rgba(255,249,241,.54);
  color: var(--green);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.70);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.qs-option:not(:disabled):active { transform: scale(.992); }

.qs-option-marker {
  width: 39px;
  height: 39px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(11,74,56,.15);
  border-radius: 50%;
  background: rgba(255,255,255,.43);
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 800;
}

.qs-option-marker.is-multi { border-radius: 12px; }

.qs-option-marker i {
  display: none;
  width: 100%;
  height: 100%;
  place-items: center;
}

.qs-option-marker i svg,
.qs-feedback-title > span svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qs-option-text {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 680;
}

.qs-option.is-selected {
  border-color: rgba(11,74,56,.42);
  background: rgba(200,215,185,.66);
}

.qs-option.is-selected .qs-option-marker {
  background: rgba(11,74,56,.10);
  border-color: rgba(11,74,56,.30);
}

.qs-option.is-correct {
  border-color: rgba(14,116,78,.42);
  background: rgba(190,221,193,.68);
}

.qs-option.is-correct .qs-option-marker {
  color: #0b6949;
  background: rgba(255,255,255,.55);
}

.qs-option.is-correct .qs-option-marker > span { display: none; }
.qs-option.is-correct .qs-option-marker i { display: grid; }

.qs-option.is-wrong {
  border-color: rgba(164,61,52,.34);
  background: rgba(232,192,183,.58);
  color: #7e352f;
}

.qs-feedback {
  margin-top: 11px;
  padding: 15px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.72);
  background: rgba(255,249,241,.58);
}

.qs-feedback.is-correct { box-shadow: inset 3px 0 0 rgba(14,116,78,.65); }
.qs-feedback.is-wrong { box-shadow: inset 3px 0 0 rgba(164,61,52,.55); }

.qs-feedback-title {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  align-items: center;
  gap: 9px;
}

.qs-feedback-title > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.50);
}

.qs-feedback-title small,
.qs-feedback-title strong {
  display: block;
}

.qs-feedback-title small {
  color: #8b6c2e;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1px;
}

.qs-feedback-title strong {
  margin-top: 2px;
  font-family: Georgia, serif;
  font-size: 16px;
}

.qs-feedback > p,
.qs-memory p {
  margin: 10px 0 0;
  color: #625f58;
  font-size: 11.5px;
  line-height: 1.45;
}

.qs-memory {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 15px;
  background: rgba(229,214,180,.55);
}

.qs-memory small {
  color: #9a711d;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1px;
}

.qs-memory p { margin-top: 4px; color: var(--green); }

.qs-footer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 104px minmax(0,1fr);
  gap: 9px;
  padding-top: 9px;
}

.qs-primary,
.qs-unsure {
  min-height: 52px;
  border-radius: 18px;
  font-weight: 900;
}

.qs-primary {
  border: 0;
  background: linear-gradient(180deg, #08704d 0%, #07583c 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(9,97,63,.16);
}

.qs-primary:disabled {
  opacity: .42;
  box-shadow: none;
}

.qs-primary--wide { grid-column: 1 / -1; }

.qs-unsure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(11,74,56,.15);
  background: rgba(255,249,241,.50);
  color: var(--green);
}

.qs-unsure > span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(11,74,56,.08);
  font-family: Georgia, serif;
}

.qs-unsure.is-active {
  border-color: rgba(185,131,24,.35);
  background: rgba(231,216,180,.70);
  color: #86620f;
}

.qs-submit-error {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: #9b3f36;
  font-size: 9px;
  text-align: center;
}

.qs-loading,
.qs-empty,
.qs-summary {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 13px;
  padding: max(22px, env(safe-area-inset-top)) 24px max(22px, env(safe-area-inset-bottom));
  text-align: center;
}

.qs-loading span {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(11,74,56,.15);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: qs-spin .8s linear infinite;
}

.qs-loading strong {
  font-family: Georgia, serif;
  font-size: 16px;
}

@keyframes qs-spin { to { transform: rotate(360deg); } }

.qs-empty .qs-back {
  position: absolute;
  left: 16px;
  top: max(18px, env(safe-area-inset-top));
}

.qs-empty-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: rgba(255,249,241,.58);
  font-family: Georgia, serif;
  font-size: 37px;
  color: #9a711d;
  box-shadow: 0 8px 22px rgba(91,62,37,.08);
}

.qs-empty h1,
.qs-summary h1 {
  margin: 3px 0 0;
  font-family: Georgia, serif;
  font-size: 29px;
  line-height: 1.05;
}

.qs-empty p {
  max-width: 300px;
  margin: 0 0 6px;
  color: #706a62;
  font-size: 12px;
  line-height: 1.45;
}

.qs-empty .qs-primary,
.qs-summary .qs-primary {
  width: min(100%, 300px);
}

.qs-summary-ring {
  width: 145px;
  height: 145px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--score), rgba(11,74,56,.10) 0);
  box-shadow: 0 10px 28px rgba(77,62,43,.10);
}

.qs-summary-ring::before {
  content: "";
  position: absolute;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: #f2ddc4;
}

.qs-summary-ring > div {
  position: relative;
  z-index: 1;
}

.qs-summary-ring strong,
.qs-summary-ring span {
  display: block;
}

.qs-summary-ring strong {
  font-family: Georgia, serif;
  font-size: 35px;
}

.qs-summary-ring span {
  margin-top: 2px;
  color: #756f66;
  font-size: 9px;
  font-weight: 800;
}

.qs-summary-grid {
  width: min(100%, 330px);
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
}

.qs-summary-grid > div {
  padding: 13px 8px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 18px;
  background: rgba(255,249,241,.50);
}

.qs-summary-grid strong,
.qs-summary-grid span {
  display: block;
}

.qs-summary-grid strong {
  font-family: Georgia, serif;
  font-size: 23px;
}

.qs-summary-grid span {
  margin-top: 3px;
  color: #756f66;
  font-size: 8px;
}

@media (max-height: 760px) {
  .qs-inner { padding-top: max(12px, env(safe-area-inset-top)); }
  .qs-header { grid-template-columns: 40px minmax(0,1fr) 45px; }
  .qs-back { width: 40px; height: 40px; }
  .qs-progress { margin: 9px 2px 10px; }
  .qs-question-card { padding: 14px 15px; border-radius: 22px; }
  .qs-question-card h1 { font-size: clamp(19px, 5.2vw, 24px); }
  .qs-options { gap: 7px; margin-top: 8px; }
  .qs-option { min-height: 54px; border-radius: 17px; }
  .qs-option-marker { width: 35px; height: 35px; }
  .qs-footer { padding-top: 7px; }
  .qs-primary, .qs-unsure { min-height: 48px; }
}


/* QUESTION BOOKMARKS */
.qs-question-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.qs-bookmark{
  width:34px;
  height:34px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  border:1px solid rgba(11,74,56,.13);
  border-radius:12px;
  background:rgba(255,255,255,.36);
  color:var(--green);
}
.qs-bookmark svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.qs-bookmark.is-active{
  color:#936a14;
  border-color:rgba(185,131,24,.34);
  background:rgba(231,216,180,.72);
}
.qs-bookmark.is-active svg{fill:rgba(185,131,24,.22)}
.qs-bookmark:disabled{opacity:.55}


/* QUESTION QUALITY REPORT */
.qs-report-trigger{
  display:flex;
  align-items:center;
  gap:6px;
  margin:12px 0 0;
  padding:0;
  border:0;
  background:transparent;
  color:#746f67;
  font-size:8.5px;
  font-weight:800;
}
.qs-report-trigger svg{
  width:15px;
  height:15px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.qs-report-trigger:disabled{opacity:.65}
.qs-report-trigger.is-reported{color:#0b6949}


/* OPEN TEXT LEARNING */
.qs-open-prompt{
  margin-top:11px;
  padding:15px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:20px;
  background:rgba(255,249,241,.50);
}
.qs-open-prompt strong{
  display:block;
  font-family:Georgia,serif;
  font-size:16px;
}
.qs-open-prompt p{
  margin:5px 0 0;
  color:#706a62;
  font-size:10.5px;
  line-height:1.45;
}
.qs-open-answer{
  margin-top:11px;
  padding:15px;
  border:1px solid rgba(255,255,255,.76);
  border-radius:22px;
  background:rgba(255,249,241,.58);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
}
.qs-open-answer.is-correct{box-shadow:inset 3px 0 0 rgba(14,116,78,.65)}
.qs-open-answer.is-wrong{box-shadow:inset 3px 0 0 rgba(164,61,52,.55)}
.qs-open-answer-text{
  margin:8px 0 0;
  color:var(--green);
  font-family:Georgia,serif;
  font-size:17px;
  line-height:1.35;
}
.qs-open-explanation{
  margin-top:12px;
  padding-top:11px;
  border-top:1px solid rgba(121,86,47,.09);
}
.qs-open-explanation small{
  color:#9a711d;
  font-size:7px;
  font-weight:900;
  letter-spacing:1px;
}
.qs-open-explanation p{
  margin:5px 0 0;
  color:#625f58;
  font-size:11px;
  line-height:1.45;
}
.qs-open-assessed{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:12px;
  padding:10px 11px;
  border-radius:14px;
  background:rgba(255,255,255,.36);
}
.qs-open-assessed>span{
  width:29px;
  height:29px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:rgba(255,255,255,.45);
}
.qs-open-assessed svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.qs-open-assessed strong{
  font-family:Georgia,serif;
  font-size:14px;
}
.qs-footer--open{
  grid-template-columns:1fr 1fr;
}
.qs-self-button{
  min-height:52px;
  border-radius:18px;
  font-weight:900;
}
.qs-self-button--wrong{
  border:1px solid rgba(164,61,52,.24);
  background:rgba(232,192,183,.58);
  color:#843d35;
}
.qs-self-button--right{
  border:1px solid rgba(14,116,78,.24);
  background:rgba(190,221,193,.68);
  color:#0b6949;
}
.qs-self-button:disabled{
  opacity:.55;
}
@media(max-height:760px){
  .qs-open-answer{padding:13px}
  .qs-open-answer-text{font-size:15px}
  .qs-self-button{min-height:48px}
}


/* Phase 6 · Frage ↔ Bibliothek */
.qs-library-links{
  display:grid;
  gap:10px;
  margin-top:12px;
  padding:14px;
  border:1px solid rgba(255,255,255,.76);
  border-radius:18px;
  background:rgba(255,249,241,.58);
  box-shadow:0 8px 20px rgba(72,52,33,.06);
}
.qs-library-links[hidden]{display:none}
.qs-library-links-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.qs-library-links-head>div{display:grid;gap:2px;min-width:0}
.qs-library-links-head small{
  color:#9a711d;
  font-size:7px;
  font-weight:900;
  letter-spacing:1px;
}
.qs-library-links-head strong{
  font-family:Georgia,"Times New Roman",serif;
  font-size:15px;
}
.qs-library-links-head>span{
  padding:6px 8px;
  border-radius:999px;
  background:rgba(11,74,56,.07);
  font-size:7px;
  font-weight:900;
  letter-spacing:.6px;
}
.qs-library-link-list{display:grid;gap:6px}
.qs-library-link-list button{
  width:100%;
  min-height:50px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 20px;
  align-items:center;
  gap:8px;
  padding:9px 10px;
  border:1px solid rgba(11,74,56,.08);
  border-radius:14px;
  background:rgba(255,255,255,.45);
  color:inherit;
  text-align:left;
}
.qs-library-link-list button>span{display:grid;gap:2px;min-width:0}
.qs-library-link-list strong{
  overflow:hidden;
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.qs-library-link-list small{
  display:-webkit-box;
  overflow:hidden;
  color:#746e65;
  font-size:8px;
  line-height:1.3;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.qs-library-link-list i{
  font-family:Georgia,"Times New Roman",serif;
  font-size:22px;
  font-style:normal;
  text-align:center;
}

/* JagdIQ · Erklärungslücke mit kontrolliertem KI-Fallback */
.qs-explanation-gap{
  display:grid;
  gap:7px;
  margin-top:12px;
  padding:11px 12px;
  border:1px solid rgba(154,113,29,.13);
  border-radius:15px;
  background:rgba(229,214,180,.34);
}
.qs-explanation-gap small{
  color:#9a711d;
  font-size:7px;
  font-weight:900;
  letter-spacing:1px;
}
.qs-explanation-gap p{
  margin:0;
  color:#665f57;
  font-size:10px;
  line-height:1.4;
}
.qs-explanation-gap button{
  justify-self:start;
  min-height:34px;
  padding:0 12px;
  border:1px solid rgba(11,74,56,.14);
  border-radius:11px;
  background:rgba(255,255,255,.46);
  color:var(--green);
  font-size:8.5px;
  font-weight:850;
}
.qs-explanation-gap button:disabled{opacity:.55}
