.qg-app{--qg-accent:#2563eb;--qg-dark:#172033;--qg-soft:#eef4ff;--qg-success:#16a34a;--qg-error:#dc2626;--qg-card-bg:#fff;--qg-answer-bg:#fff;--qg-answer-text:#172033;--qg-answer-border:#dce3ef;--qg-answer-hover:#eef4ff;--qg-answer-selected:#dbeafe;--qg-button-radius:16px;max-width:760px;margin:32px auto;font-family:Arial,"Noto Sans","DejaVu Sans","Liberation Sans","Segoe UI",sans-serif;color:var(--qg-dark)}
.qg-app *{box-sizing:border-box}.qg-screen[hidden]{display:none!important}.qg-card{background:var(--qg-card-bg);border:1px solid #dce3ef;border-radius:24px;padding:clamp(24px,5vw,48px);box-shadow:0 18px 50px rgba(23,32,51,.1);text-align:center}.qg-eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:.8rem;font-weight:800;color:var(--qg-accent);margin:0 0 8px}.qg-card h2{font-size:clamp(1.6rem,4vw,2.4rem);line-height:1.2;margin:0 0 14px}.qg-knowledge-level-options{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:28px 0}.qg-choice,.qg-answer,.qg-primary-button{font:inherit;cursor:pointer}.qg-choice{border:2px solid #d8e0ed;background:#fff;border-radius:14px;padding:14px;font-weight:700}.qg-choice.is-selected{border-color:var(--qg-accent);background:var(--qg-soft);color:var(--qg-accent)}.qg-primary-button{border:0;border-radius:var(--qg-button-radius);background:var(--qg-accent);color:#fff;padding:15px 24px;min-height:52px;font-weight:800;font-size:1.05rem}.qg-primary-button:disabled{opacity:.55;cursor:wait}.qg-message{min-height:24px;margin:16px 0 0;color:#b42318}.qg-question-card{text-align:left}.qg-topbar{display:flex;justify-content:space-between;gap:20px;font-size:.95rem;font-weight:700;margin-bottom:12px}.qg-progress{height:9px;border-radius:999px;background:#e8edf5;overflow:hidden;margin-bottom:28px}.qg-progress span{display:block;height:100%;width:0;background:var(--qg-accent);transition:width .25s ease}.qg-question-image{margin:0 0 24px;text-align:center}.qg-question-image img{display:block;max-width:100%;max-height:320px;margin:auto;border-radius:16px;object-fit:contain}.qg-question-text{font-size:clamp(1.35rem,3vw,2rem)!important;margin-bottom:24px!important}.qg-answers{display:grid;gap:12px}.qg-answer{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:16px;border:2px solid var(--qg-answer-border);background:var(--qg-answer-bg);color:var(--qg-answer-text);border-radius:var(--qg-button-radius);font-weight:650;transition:.15s ease}.qg-answer:hover:not(:disabled){border-color:var(--qg-accent);background:var(--qg-answer-hover);transform:translateY(-1px)}.qg-answer:focus-visible{background:var(--qg-answer-hover)}.qg-answer.is-selected{border-color:var(--qg-accent);background:var(--qg-answer-selected)}.qg-answer-letter{display:grid;place-items:center;flex:0 0 36px;height:36px;border-radius:50%;background:#edf2f9;font-weight:900}.qg-answer.is-correct{border-color:var(--qg-success);background:#ecfdf3}.qg-answer.is-incorrect{border-color:var(--qg-error);background:#fff1f2}.qg-feedback{margin:18px 0 0;padding:16px;border-radius:14px}.qg-feedback.is-correct{background:#ecfdf3;color:#166534}.qg-feedback.is-incorrect{background:#fff1f2;color:#991b1b}.qg-feedback div{margin-top:7px;font-weight:500}.qg-next-button{display:block;margin:20px 0 0 auto}.qg-results-card{min-height:420px;display:flex;flex-direction:column;align-items:center;justify-content:center}.qg-medal{display:grid;place-items:center;width:110px;height:110px;border-radius:50%;font-size:3.3rem;margin-bottom:22px;background:#e5e7eb}.qg-medal.is-gold{background:linear-gradient(145deg,#fff1a8,#e6ad16)}.qg-medal.is-silver{background:linear-gradient(145deg,#f8fafc,#aeb7c4)}.qg-medal.is-bronze{background:linear-gradient(145deg,#f4c49c,#a85d25)}.qg-medal.is-complete{background:#dbeafe;color:#1d4ed8}.qg-result-score{font-size:2.4rem;margin:8px 0}.qg-results-card .qg-primary-button{margin-top:18px}@media(max-width:560px){.qg-app{margin:12px}.qg-card{border-radius:18px;padding:22px}.qg-knowledge-level-options{grid-template-columns:1fr}.qg-topbar{font-size:.86rem}.qg-answer{padding:14px}.qg-next-button{width:100%}}
.qg-mode-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:28px}.qg-mode-card{appearance:none;border:2px solid #dce3ef;background:#fff;border-radius:18px;padding:24px;text-align:left;cursor:pointer;transition:.18s ease;color:var(--qg-dark)}.qg-mode-card:hover,.qg-mode-card:focus-visible{border-color:var(--qg-accent);background:var(--qg-soft);transform:translateY(-2px)}.qg-mode-card strong{display:block;font-size:1.25rem;margin-bottom:8px}.qg-mode-card span{display:block;line-height:1.5;color:#526078}.qg-back-button{display:block;border:0;background:transparent;color:var(--qg-accent);font:inherit;font-weight:700;cursor:pointer;margin:0 0 20px;padding:0}.qg-category-field{text-align:left;margin:-8px 0 24px}.qg-category-field label{display:block;font-weight:750;margin-bottom:8px}.qg-category-field select{width:100%;min-height:50px;border:2px solid #d8e0ed;border-radius:14px;background:#fff;padding:10px 14px;font:inherit;color:var(--qg-dark)}.qg-feedback-detail{margin-top:9px}.qg-explanation{margin-top:12px;padding-top:12px;border-top:1px solid currentColor;opacity:.92}.qg-secondary-button{border:0;background:transparent;color:var(--qg-accent);padding:12px 20px;font:inherit;font-weight:800;cursor:pointer}.qg-medal.is-practice{background:#dcfce7;color:#15803d}.qg-result-note{font-weight:650;color:#526078}.qg-answer:active,.qg-primary-button:active,.qg-mode-card:active{transform:scale(.985)}@media(max-width:560px){.qg-mode-options{grid-template-columns:1fr}.qg-mode-card{padding:20px}}
/* v0.9.0 mode hub and Category Challenge */
.qg-mode-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.qg-mode-card{position:relative;min-height:190px;display:flex;flex-direction:column;justify-content:flex-end;overflow:hidden}
.qg-mode-icon{display:grid;place-items:center;width:48px;height:48px;margin-bottom:auto;border-radius:15px;background:var(--qg-soft);color:var(--qg-accent);font-size:1.45rem;font-weight:900}
.qg-coming-soon{position:absolute;top:16px;right:16px;padding:5px 9px;border-radius:999px;background:#eef1f6;color:#667085;font-size:.72rem;font-weight:850;text-transform:uppercase;letter-spacing:.06em}
.qg-mode-card.is-coming-soon{cursor:default;opacity:.68;background:#f8fafc}
.qg-mode-card.is-coming-soon:hover{border-color:#dce3ef;background:#f8fafc;transform:none}
.qg-mode-card.is-coming-soon .qg-mode-icon{filter:grayscale(1)}
.qg-mode-card:focus-visible,.qg-choice:focus-visible,.qg-answer:focus-visible,.qg-primary-button:focus-visible,.qg-secondary-button:focus-visible,.qg-back-button:focus-visible{outline:3px solid rgba(37,99,235,.3);outline-offset:3px}
@media(max-width:560px){.qg-mode-card{min-height:160px}}

/* v0.10.0 Image Challenge */
.qg-app.is-image-mode .qg-question-image{margin-bottom:28px;padding:10px;border:1px solid #e1e7f0;border-radius:20px;background:#f8fafc}
.qg-app.is-image-mode .qg-question-image img{width:100%;max-height:430px;border-radius:14px;object-fit:contain}
.qg-app.is-image-mode .qg-question-text{text-align:center}
@media(max-width:560px){.qg-app.is-image-mode .qg-question-image img{max-height:300px}}

/* v0.11.0 Time Attack */
.qg-timer{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border-radius:999px;background:#eef4ff;color:#1d4ed8;font-variant-numeric:tabular-nums;transition:.2s ease}
.qg-timer.is-warning{background:#fff7ed;color:#c2410c}
.qg-timer.is-critical{background:#fff1f2;color:#be123c;animation:qg-timer-pulse .8s ease-in-out infinite alternate}
.qg-app.is-time-mode .qg-feedback{padding:12px 16px;margin-top:14px}
.qg-app.is-time-mode .qg-answer{min-height:58px}
@keyframes qg-timer-pulse{from{transform:scale(1)}to{transform:scale(1.045)}}
@media(prefers-reduced-motion:reduce){.qg-timer.is-critical{animation:none}.qg-answer,.qg-mode-card,.qg-primary-button{transition:none}}
@media(max-width:560px){.qg-topbar{flex-wrap:wrap}.qg-timer{margin-left:auto}}


/* v0.12.0 Design System */
.qg-app [hidden]{display:none!important}
.qg-primary-button,.qg-secondary-button,.qg-choice,.qg-answer,.qg-mode-card{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.qg-primary-button{display:inline-flex!important;align-items:center;justify-content:center;gap:10px;width:auto!important;min-width:180px;max-width:100%;white-space:normal;line-height:1.2}
.qg-next-button{min-width:220px!important;min-height:60px!important;padding:16px 26px!important;color:#fff!important;font-size:1rem!important;visibility:visible}
.qg-next-button[hidden]{display:none!important}
.qg-animations-off *{animation:none!important;transition:none!important}
.qg-animations-enhanced .qg-answer.is-correct{animation:qg-success-pop .35s ease}
.qg-animations-enhanced .qg-answer.is-incorrect{animation:qg-error-shake .32s ease}
.qg-animations-enhanced .qg-card{animation:qg-card-enter .3s ease}
@keyframes qg-success-pop{50%{transform:scale(1.025)}}
@keyframes qg-error-shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
@keyframes qg-card-enter{from{opacity:.75;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:560px){.qg-primary-button,.qg-next-button{width:100%!important;min-width:0!important}}


/* v1.2.0 Achievements - mobile-first PWA experience */
.qg-achievements-entry{display:flex;align-items:center;gap:14px;width:100%;min-height:68px;margin-top:20px;padding:12px 16px;border:1px solid #dce3ef;border-radius:18px;background:var(--qg-card-bg);color:var(--qg-dark);font:inherit;text-align:left;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:.18s ease}
.qg-achievements-entry:hover,.qg-achievements-entry:focus-visible{border-color:var(--qg-accent);background:var(--qg-soft);transform:translateY(-1px)}
.qg-achievements-entry-icon{display:grid;place-items:center;flex:0 0 44px;height:44px;border-radius:14px;background:#fff7d6;font-size:1.55rem}
.qg-achievements-entry>span:nth-child(2){display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}.qg-achievements-entry strong{font-size:1rem}.qg-achievements-entry small{overflow:hidden;color:#667085;text-overflow:ellipsis;white-space:nowrap}.qg-achievements-entry-arrow{font-size:2rem;color:var(--qg-accent)}
.qg-achievements-screen .qg-card{text-align:left}.qg-achievements-screen h2{text-align:center}.qg-achievements-screen .qg-eyebrow,.qg-achievements-intro{text-align:center}.qg-achievements-intro{margin:0 0 24px;color:#667085}
.qg-achievement-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.qg-achievement-card{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;min-height:104px;padding:16px;border:1px solid #e1e7f0;border-radius:18px;background:#f8fafc}.qg-achievement-card>span{grid-row:1/3;display:grid;place-items:center;width:48px;height:48px;border-radius:50%;font-size:1.55rem}.qg-achievement-card strong{font-size:1.7rem;line-height:1}.qg-achievement-card small{color:#667085;font-weight:700}.qg-achievement-card.is-bronze>span{background:linear-gradient(145deg,#f4c49c,#a85d25);color:#fff}.qg-achievement-card.is-silver>span{background:linear-gradient(145deg,#f8fafc,#aeb7c4);color:#53606f}.qg-achievement-card.is-gold>span{background:linear-gradient(145deg,#fff1a8,#e6ad16);color:#7a5200}.qg-achievement-card.is-trophy>span{background:#fff7d6}
.qg-trophy-progress{margin-top:18px;padding:18px;border-radius:18px;background:var(--qg-soft)}.qg-trophy-progress-head{display:flex;justify-content:space-between;gap:12px}.qg-trophy-progress-head span{font-weight:850;color:var(--qg-accent)}.qg-trophy-progress-track{height:12px;margin:13px 0 10px;border-radius:999px;background:#dbe5f5;overflow:hidden}.qg-trophy-progress-track span{display:block;width:0;height:100%;border-radius:inherit;background:var(--qg-accent);transition:width .35s ease}.qg-trophy-progress p{margin:0;color:#526078;font-size:.9rem}
.qg-recent-achievement{display:flex;align-items:center;gap:12px;margin-top:16px;padding:15px 17px;border:1px solid #f6d889;border-radius:16px;background:#fffaf0}.qg-recent-achievement>span{font-size:1.5rem}.qg-recent-achievement div{display:flex;flex-direction:column}.qg-recent-achievement small{color:#7a5b12}.qg-new-achievement{margin:12px 0 2px;padding:10px 14px;border-radius:999px;background:#fff7d6;color:#775400;font-weight:850}.qg-result-actions{display:flex;flex-direction:column;align-items:center;width:100%;max-width:360px;margin-top:8px}.qg-results-card .qg-result-actions .qg-primary-button{margin-top:10px}.qg-achievements-button{font-weight:850}
@media(max-width:560px){.qg-app{max-width:none;margin:0;padding:10px}.qg-card{min-height:calc(100dvh - 20px);border-radius:20px;padding:22px 18px;box-shadow:0 8px 30px rgba(23,32,51,.08)}.qg-mode-options{gap:12px}.qg-mode-card{min-height:142px;padding:17px}.qg-achievement-grid{grid-template-columns:1fr 1fr;gap:10px}.qg-achievement-card{grid-template-columns:1fr;grid-template-rows:auto auto auto;text-align:center;justify-items:center;padding:13px 8px}.qg-achievement-card>span{grid-row:auto;width:42px;height:42px;margin-bottom:7px}.qg-achievement-card strong{font-size:1.5rem}.qg-trophy-progress-head{font-size:.9rem}.qg-result-actions,.qg-result-actions .qg-primary-button,.qg-result-actions .qg-secondary-button{width:100%}.qg-result-actions .qg-secondary-button{min-height:50px}}
@media(prefers-reduced-motion:reduce){.qg-achievements-entry,.qg-trophy-progress-track span{transition:none}}

/* v1.3.0 Theme & Branding System - mobile-first PWA home screen */
.qg-home-card{padding:0!important;overflow:hidden;background:#f8fbff!important}
.qg-home-header{position:relative;min-height:210px;background-position:center;background-size:cover;background-repeat:no-repeat;color:#fff}
.qg-home-header.has-no-image{background:radial-gradient(circle at 50% 70%,#1748bd 0,#071b58 54%,#020a2a 100%)}
.qg-home-header-overlay{display:flex;min-height:210px;flex-direction:column;align-items:center;justify-content:center;padding:34px 24px;text-align:center;background:linear-gradient(180deg,rgba(2,10,42,.16),rgba(2,10,42,.54))}
.qg-home-header h1{margin:0;color:#fff;font-size:clamp(2.4rem,8vw,4.9rem);font-weight:950;letter-spacing:.055em;line-height:.95;text-transform:uppercase;text-shadow:0 5px 0 rgba(0,0,0,.28),0 0 30px rgba(70,133,255,.8)}
.qg-home-header p{margin:24px 0 0;color:#67e8f9;font-size:clamp(1.1rem,3.3vw,1.8rem);font-weight:850;letter-spacing:.02em}
.qg-home-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:0;padding:24px}
.qg-home-tile{--qg-tile-bg:#fff;--qg-tile-accent:var(--qg-accent);--qg-tile-image:none;isolation:isolate;min-height:245px;align-items:center;justify-content:flex-start!important;padding:28px 20px!important;border:1.5px solid color-mix(in srgb,var(--qg-tile-accent) 70%,white)!important;background:linear-gradient(145deg,#fff 0,var(--qg-tile-bg) 100%)!important;text-align:center!important;box-shadow:0 12px 22px rgba(19,44,92,.11)}
.qg-home-tile:hover,.qg-home-tile:focus-visible{border-color:var(--qg-tile-accent)!important;background:linear-gradient(145deg,#fff 0,var(--qg-tile-bg) 100%)!important;box-shadow:0 16px 28px color-mix(in srgb,var(--qg-tile-accent) 18%,transparent)}
.qg-home-tile .qg-tile-watermark{position:absolute;z-index:-1;inset:0;background-image:var(--qg-tile-image);background-position:var(--qg-tile-image-x,92%) var(--qg-tile-image-y,92%);background-size:var(--qg-tile-image-size,55%) auto;background-repeat:no-repeat;opacity:var(--qg-tile-image-opacity,.18);pointer-events:none}
.qg-home-tile .qg-mode-icon{z-index:1;width:72px;height:72px;margin:0 0 26px;border-radius:50%;background:linear-gradient(145deg,color-mix(in srgb,var(--qg-tile-accent) 72%,white),var(--qg-tile-accent));color:#fff;font-size:2rem;box-shadow:0 8px 15px color-mix(in srgb,var(--qg-tile-accent) 32%,transparent),inset 0 1px rgba(255,255,255,.55)}
.qg-home-tile .qg-mode-icon img{width:58%;height:58%;object-fit:contain;filter:drop-shadow(0 1px 1px rgba(0,0,0,.12))}
.qg-home-tile strong{z-index:1;margin:0 0 12px!important;color:#0b1d5b;font-size:1.35rem!important;line-height:1.15}
.qg-home-tile .qg-mode-description{z-index:1;color:#24376e!important;font-size:1rem;line-height:1.52}
.qg-achievements-tile{margin:0!important;width:auto!important;min-height:245px!important}
.qg-achievements-tile .qg-mode-description{white-space:normal!important}
@supports not (color:color-mix(in srgb,black,white)){.qg-home-tile{border-color:#c9d7ef!important}.qg-home-tile .qg-mode-icon{background:var(--qg-tile-accent)}.qg-home-tile:hover{box-shadow:0 16px 28px rgba(19,44,92,.16)}}
@media(max-width:560px){.qg-home-card{min-height:calc(100dvh - 20px)!important}.qg-home-header,.qg-home-header-overlay{min-height:174px}.qg-home-header h1{font-size:2.65rem}.qg-home-header p{margin-top:16px;font-size:1.16rem}.qg-home-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px}.qg-home-tile,.qg-achievements-tile{min-height:178px!important;padding:16px 10px!important;border-radius:18px!important}.qg-home-tile .qg-mode-icon{width:52px;height:52px;margin-bottom:15px;font-size:1.45rem}.qg-home-tile strong{font-size:1rem!important}.qg-home-tile .qg-mode-description{font-size:.78rem;line-height:1.35}.qg-home-tile .qg-tile-watermark{width:55%;height:50%}}
@media(max-width:360px){.qg-home-grid{grid-template-columns:1fr}.qg-home-tile,.qg-achievements-tile{min-height:160px!important}}


/* v1.3.1 Mode icon alignment and contextual mode header */
.qg-home-tile .qg-mode-icon{display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;line-height:1!important;text-align:center!important}
.qg-home-tile .qg-mode-icon-content{display:flex!important;align-items:center;justify-content:center;width:100%;height:100%;line-height:1;color:#fff!important}
.qg-home-tile .qg-mode-icon-content img{display:block;width:58%;height:58%;margin:auto;object-fit:contain}
.qg-mode-setup-card{padding:0!important;overflow:hidden;text-align:center}
.qg-selected-mode-banner{--qg-mode-bg:#eff6ff;--qg-mode-accent:#3b82f6;position:relative;display:flex;align-items:center;justify-content:center;min-height:132px;padding:28px 64px;background:linear-gradient(135deg,#fff 0,var(--qg-mode-bg) 100%);border-bottom:2px solid color-mix(in srgb,var(--qg-mode-accent) 55%,white);color:#0b1d5b}
.qg-selected-mode-banner:after{content:"";position:absolute;inset:auto 8% 0;height:5px;border-radius:999px 999px 0 0;background:var(--qg-mode-accent);opacity:.9}
.qg-selected-mode-banner h1{margin:0;font-size:clamp(1.65rem,5vw,2.65rem);font-weight:900;line-height:1.1;color:#0b1d5b}
.qg-mode-banner-back{position:absolute;left:22px;top:50%;display:grid;place-items:center;width:44px;height:44px;transform:translateY(-50%);border:1.5px solid color-mix(in srgb,var(--qg-mode-accent) 50%,white);border-radius:50%;background:#fff;color:var(--qg-mode-accent);font:inherit;font-size:1.45rem;font-weight:900;cursor:pointer}
.qg-mode-banner-back:hover,.qg-mode-banner-back:focus-visible{background:var(--qg-mode-bg);outline:none}
.qg-mode-setup-content{padding:clamp(24px,5vw,48px)}
@supports not (color:color-mix(in srgb,black,white)){.qg-selected-mode-banner{border-bottom-color:var(--qg-mode-accent)}.qg-mode-banner-back{border-color:var(--qg-mode-accent)}}
@media(max-width:560px){.qg-selected-mode-banner{min-height:104px;padding:22px 54px}.qg-mode-banner-back{left:14px;width:40px;height:40px}.qg-mode-setup-content{padding:24px 18px}}


/* v1.3.3 Mobile tile background responsiveness */
@media(max-width:560px){
  .qg-home-tile,.qg-achievements-tile{
    min-height:205px!important;
    padding:18px 12px 16px!important;
  }
  .qg-home-tile .qg-tile-watermark{
    inset:0!important;
    width:auto!important;
    height:auto!important;
    background-size:calc(var(--qg-tile-image-size,55%) * .72) auto!important;
    background-position:var(--qg-tile-image-x,92%) var(--qg-tile-image-y,92%)!important;
  }
  .qg-home-tile .qg-mode-icon{
    flex:0 0 54px;
    width:54px;
    height:54px;
    margin-bottom:16px;
  }
  .qg-home-tile strong{
    max-width:100%;
    overflow-wrap:anywhere;
    font-size:1.02rem!important;
    line-height:1.18;
  }
  .qg-home-tile .qg-mode-description{
    max-width:100%;
    overflow-wrap:anywhere;
    font-size:.8rem;
    line-height:1.38;
  }
}
@media(max-width:390px){
  .qg-home-grid{gap:8px;padding:10px}
  .qg-home-tile,.qg-achievements-tile{min-height:196px!important;padding:16px 8px 14px!important}
  .qg-home-tile .qg-tile-watermark{background-size:calc(var(--qg-tile-image-size,55%) * .62) auto!important}
  .qg-home-tile .qg-mode-icon{flex-basis:50px;width:50px;height:50px;margin-bottom:13px}
  .qg-home-tile strong{font-size:.94rem!important}
  .qg-home-tile .qg-mode-description{font-size:.74rem;line-height:1.34}
}
@media(max-width:330px){
  .qg-home-grid{grid-template-columns:1fr}
  .qg-home-tile,.qg-achievements-tile{min-height:174px!important}
  .qg-home-tile .qg-tile-watermark{background-size:calc(var(--qg-tile-image-size,55%) * .7) auto!important}
}


/* v1.4.0 kiosk viewport, award reset and adaptive question fitting */
.qg-danger-button{border:1px solid #fecaca;border-radius:var(--qg-button-radius);background:#fff7f7;color:#b42318;padding:11px 18px;font:inherit;font-weight:800;cursor:pointer;touch-action:manipulation}
.qg-danger-button:hover,.qg-danger-button:focus-visible{border-color:#ef4444;background:#fef2f2;outline:none}
.qg-reset-awards-button{display:block;margin:22px auto 0}
.qg-screen[data-qg-screen="quiz"]{height:min(900px,calc(100dvh - 64px));min-height:520px}
.qg-question-card{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;padding:clamp(18px,3.2vh,34px)}
.qg-question-card .qg-topbar{flex:0 0 auto;margin-bottom:8px}
.qg-question-card .qg-progress{flex:0 0 auto;margin-bottom:clamp(12px,2vh,22px)}
.qg-question-card .qg-question-image{flex:1 1 26%;min-height:0;margin-bottom:clamp(10px,1.8vh,20px)}
.qg-question-card .qg-question-image img{width:100%;height:100%;max-height:min(30vh,280px);object-fit:contain}
.qg-question-card .qg-question-text{flex:0 1 auto;margin:0 0 clamp(10px,1.8vh,20px)!important;font-size:clamp(1.15rem,2.5vh,1.8rem)!important;line-height:1.18}
.qg-question-card .qg-answers{flex:0 1 auto;gap:clamp(7px,1.15vh,11px);min-height:0}
.qg-question-card .qg-answer{min-height:0;padding:clamp(9px,1.35vh,14px);line-height:1.2}
.qg-question-card .qg-answer-letter{flex-basis:32px;height:32px}
.qg-question-card .qg-feedback{flex:0 1 auto;margin-top:10px;padding:11px 14px;font-size:.94rem;line-height:1.25}
.qg-question-card .qg-next-button{flex:0 0 auto;min-height:48px!important;margin-top:10px!important;padding:11px 20px!important}
.qg-question-card.is-compact{padding:16px 20px}.qg-question-card.is-compact .qg-progress{margin-bottom:10px}.qg-question-card.is-compact .qg-question-image img{max-height:22vh}.qg-question-card.is-compact .qg-question-text{font-size:1.08rem!important;margin-bottom:9px!important}.qg-question-card.is-compact .qg-answers{gap:6px}.qg-question-card.is-compact .qg-answer{padding:8px 10px;font-size:.92rem}.qg-question-card.is-compact .qg-feedback{padding:8px 10px;font-size:.84rem}.qg-question-card.is-compact .qg-next-button{min-height:42px!important;margin-top:7px!important}
.qg-question-card.is-extra-compact{padding:12px 16px}.qg-question-card.is-extra-compact .qg-topbar{font-size:.78rem;margin-bottom:5px}.qg-question-card.is-extra-compact .qg-progress{height:6px;margin-bottom:7px}.qg-question-card.is-extra-compact .qg-question-image{margin-bottom:6px}.qg-question-card.is-extra-compact .qg-question-image img{max-height:16vh}.qg-question-card.is-extra-compact .qg-question-text{font-size:.98rem!important;line-height:1.12;margin-bottom:6px!important}.qg-question-card.is-extra-compact .qg-answers{gap:4px}.qg-question-card.is-extra-compact .qg-answer{gap:8px;padding:6px 8px;font-size:.82rem;line-height:1.1}.qg-question-card.is-extra-compact .qg-answer-letter{flex-basis:26px;height:26px;font-size:.78rem}.qg-question-card.is-extra-compact .qg-feedback{margin-top:6px;padding:6px 8px;font-size:.76rem}.qg-question-card.is-extra-compact .qg-next-button{min-height:38px!important;margin-top:5px!important;padding:7px 12px!important;font-size:.86rem!important}
@media(max-width:560px){.qg-screen[data-qg-screen="quiz"]{height:calc(100dvh - 20px);min-height:480px}.qg-question-card{border-radius:20px}.qg-result-actions .qg-danger-button{width:100%}}

/* v1.4.1 responsive viewport profiles: mobile, tablet, laptop and portrait kiosk */
.qg-app{
  --qg-available-height:calc(100dvh - 24px);
  --qg-screen-gap:0px;
}
.qg-app .qg-screen[data-qg-screen="quiz"]{
  height:var(--qg-available-height);
  min-height:440px;
}
.qg-app .qg-question-card{
  height:100%;
}

/* Mobile portrait */
.qg-app.qg-profile-mobile{
  width:auto;
  max-width:none;
  margin:10px;
}
.qg-app.qg-profile-mobile .qg-screen[data-qg-screen="quiz"]{
  min-height:420px;
}

/* Tablet portrait and compact landscape */
.qg-app.qg-profile-tablet{
  width:min(94vw,820px);
  max-width:820px;
  margin:16px auto;
}
.qg-app.qg-profile-tablet .qg-question-card{
  padding:clamp(20px,2.5vh,30px);
}
.qg-app.qg-profile-tablet .qg-question-text{
  font-size:clamp(1.3rem,2.3vh,1.8rem)!important;
}

/* 16-inch laptop / desktop preview, normally landscape */
.qg-app.qg-profile-laptop{
  width:min(92vw,980px);
  max-width:980px;
  margin:18px auto 0;
}
.qg-app.qg-profile-laptop .qg-screen[data-qg-screen="quiz"]{
  min-height:500px;
}
.qg-app.qg-profile-laptop .qg-question-card{
  padding:clamp(18px,2.2vh,30px) clamp(24px,3vw,42px);
}
.qg-app.qg-profile-laptop .qg-question-image img{
  max-height:min(28vh,260px);
}
.qg-app.qg-profile-laptop .qg-answer{
  min-height:52px;
}

/* Main deployment target: 1080 x 1920 portrait touch kiosk */
.qg-app.qg-profile-kiosk{
  width:min(100%,1080px);
  max-width:1080px;
  height:var(--qg-available-height);
  margin:0 auto;
  padding:0;
}
.qg-app.qg-profile-kiosk > .qg-screen:not([hidden]){
  height:var(--qg-available-height);
  min-height:0;
}
.qg-app.qg-profile-kiosk > .qg-screen:not([hidden]) > .qg-card{
  height:100%;
  border-radius:0;
  border-top:0;
  border-bottom:0;
}
.qg-app.qg-profile-kiosk .qg-question-card{
  padding:clamp(30px,2.6vh,50px) clamp(42px,5vw,72px);
}
.qg-app.qg-profile-kiosk .qg-topbar{
  font-size:clamp(1.05rem,1.5vw,1.35rem);
  margin-bottom:clamp(12px,1.2vh,22px);
}
.qg-app.qg-profile-kiosk .qg-progress{
  height:12px;
  margin-bottom:clamp(18px,1.8vh,32px);
}
.qg-app.qg-profile-kiosk .qg-question-image{
  flex:1 1 30%;
  min-height:0;
}
.qg-app.qg-profile-kiosk .qg-question-image img{
  max-height:min(34vh,620px);
}
.qg-app.qg-profile-kiosk .qg-question-text{
  font-size:clamp(2rem,2.65vw,3rem)!important;
  line-height:1.16;
  margin-bottom:clamp(20px,2vh,34px)!important;
}
.qg-app.qg-profile-kiosk .qg-answers{
  flex:1 1 36%;
  grid-template-rows:repeat(4,minmax(72px,1fr));
  gap:clamp(14px,1.35vh,24px);
}
.qg-app.qg-profile-kiosk .qg-answer{
  min-height:72px;
  padding:clamp(18px,1.6vh,28px) clamp(22px,2.2vw,34px);
  border-width:3px;
  font-size:clamp(1.35rem,1.8vw,1.85rem);
  line-height:1.2;
}
.qg-app.qg-profile-kiosk .qg-answer-letter{
  flex-basis:52px;
  height:52px;
  font-size:1.25rem;
}
.qg-app.qg-profile-kiosk .qg-feedback{
  font-size:clamp(1.1rem,1.35vw,1.4rem);
  padding:16px 22px;
}
.qg-app.qg-profile-kiosk .qg-next-button{
  min-width:280px!important;
  min-height:66px!important;
  font-size:1.25rem!important;
}
.qg-app.qg-profile-kiosk .qg-results-card{
  justify-content:center;
}
.qg-app.qg-profile-kiosk .qg-home-card{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.qg-app.qg-profile-kiosk .qg-home-header{
  flex:0 0 clamp(220px,20vh,360px);
}
.qg-app.qg-profile-kiosk .qg-home-grid{
  flex:1 1 auto;
  min-height:0;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(3,minmax(0,1fr));
  padding:clamp(20px,2vh,34px);
  gap:clamp(16px,1.5vh,26px);
}
.qg-app.qg-profile-kiosk .qg-home-tile,
.qg-app.qg-profile-kiosk .qg-achievements-tile{
  min-height:0!important;
  height:100%;
}

/* Kiosk compaction preserves full-height layout for unusually long content. */
.qg-app.qg-profile-kiosk .qg-question-card.is-compact .qg-question-image img{max-height:25vh}
.qg-app.qg-profile-kiosk .qg-question-card.is-compact .qg-question-text{font-size:1.65rem!important}
.qg-app.qg-profile-kiosk .qg-question-card.is-compact .qg-answer{font-size:1.15rem;padding:12px 18px}
.qg-app.qg-profile-kiosk .qg-question-card.is-extra-compact .qg-question-image img{max-height:18vh}
.qg-app.qg-profile-kiosk .qg-question-card.is-extra-compact .qg-question-text{font-size:1.35rem!important}
.qg-app.qg-profile-kiosk .qg-question-card.is-extra-compact .qg-answer{font-size:1rem;padding:9px 14px}

@media (orientation:portrait) and (min-width:800px) and (min-height:1200px){
  html,body{overscroll-behavior:none}
}

/* v1.4.2 plugin-provided fullscreen page template */
html:has(body.qg-fullscreen-template),
body.qg-fullscreen-template{
  width:100%;
  min-width:0;
  height:100%;
  min-height:100%;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#f5f7fb;
}
body.qg-fullscreen-template{
  min-height:100vh;
  min-height:100dvh;
}
body.qg-fullscreen-template .qg-fullscreen-main{
  box-sizing:border-box;
  width:100%;
  height:100vh;
  height:100dvh;
  min-height:0;
  margin:0;
  padding:0;
  display:grid;
  place-items:center;
  overflow:hidden;
}
body.qg-fullscreen-template .qg-fullscreen-main > *{
  min-width:0;
  max-width:none;
  margin-block:0;
}
body.qg-fullscreen-template .qg-app{
  box-sizing:border-box;
  margin:0 auto;
}
body.qg-fullscreen-template .qg-app.qg-profile-laptop,
body.qg-fullscreen-template .qg-app.qg-profile-tablet{
  margin:0 auto;
}
body.qg-fullscreen-template .qg-app.qg-profile-kiosk{
  width:min(100vw,1080px);
}
body.qg-fullscreen-template .qg-app.qg-profile-mobile{
  width:100%;
  margin:0;
  padding:8px;
}
@supports not selector(:has(*)){
  html{height:100%}
}

/* v1.4.6: fullscreen overflow and compact preview profiles */
html.qg-viewport-mobile,
html.qg-viewport-tablet,
html.qg-viewport-laptop,
body.qg-fullscreen-template.qg-viewport-mobile,
body.qg-fullscreen-template.qg-viewport-tablet,
body.qg-fullscreen-template.qg-viewport-laptop{
  height:auto!important;
  min-height:100%;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto;
}
body.qg-fullscreen-template.qg-viewport-mobile .qg-fullscreen-main,
body.qg-fullscreen-template.qg-viewport-tablet .qg-fullscreen-main,
body.qg-fullscreen-template.qg-viewport-laptop .qg-fullscreen-main{
  width:100%;
  height:auto!important;
  min-height:100vh;
  min-height:100dvh;
  overflow:visible!important;
  display:flex;
  align-items:flex-start;
  justify-content:center;
}
body.qg-fullscreen-template.qg-viewport-mobile .qg-app,
body.qg-fullscreen-template.qg-viewport-tablet .qg-app,
body.qg-fullscreen-template.qg-viewport-laptop .qg-app{
  flex:0 0 auto;
}
html.qg-viewport-kiosk,
body.qg-fullscreen-template.qg-viewport-kiosk{
  width:100%;
  height:100%;
  overflow:hidden!important;
}
body.qg-fullscreen-template.qg-viewport-kiosk .qg-fullscreen-main{
  height:100vh;
  height:100dvh;
  overflow:hidden!important;
}

/* A phone may scroll, but the home screen remains compact enough for common portrait heights. */
.qg-app.qg-profile-mobile .qg-home-header,
.qg-app.qg-profile-mobile .qg-home-header-overlay{min-height:128px}
.qg-app.qg-profile-mobile .qg-home-header-overlay{padding:18px 12px}
.qg-app.qg-profile-mobile .qg-home-header h1{font-size:2.2rem}
.qg-app.qg-profile-mobile .qg-home-header p{margin-top:10px;font-size:1rem}
.qg-app.qg-profile-mobile .qg-home-grid{gap:8px;padding:10px}
.qg-app.qg-profile-mobile .qg-home-tile,
.qg-app.qg-profile-mobile .qg-achievements-tile{min-height:138px!important;padding:12px 8px!important}
.qg-app.qg-profile-mobile .qg-home-tile .qg-mode-icon{width:44px;height:44px;margin-bottom:9px;font-size:1.2rem}
.qg-app.qg-profile-mobile .qg-home-tile strong{margin-bottom:6px!important;font-size:.92rem!important}
.qg-app.qg-profile-mobile .qg-home-tile .qg-mode-description{font-size:.7rem;line-height:1.25}

/* A normal 16-inch development laptop should usually show the complete home menu at 100% zoom. */
@media (orientation:landscape) and (min-width:961px) and (max-height:950px){
  .qg-app.qg-profile-laptop{width:min(88vw,850px)}
  .qg-app.qg-profile-laptop .qg-home-header,
  .qg-app.qg-profile-laptop .qg-home-header-overlay{min-height:150px}
  .qg-app.qg-profile-laptop .qg-home-header-overlay{padding:20px}
  .qg-app.qg-profile-laptop .qg-home-header h1{font-size:3.1rem}
  .qg-app.qg-profile-laptop .qg-home-header p{margin-top:14px;font-size:1.15rem}
  .qg-app.qg-profile-laptop .qg-home-grid{gap:12px;padding:16px}
  .qg-app.qg-profile-laptop .qg-home-tile,
  .qg-app.qg-profile-laptop .qg-achievements-tile{min-height:178px!important;padding:16px 12px!important}
  .qg-app.qg-profile-laptop .qg-home-tile .qg-mode-icon{width:52px;height:52px;margin-bottom:12px;font-size:1.45rem}
  .qg-app.qg-profile-laptop .qg-home-tile strong{margin-bottom:7px!important;font-size:1.05rem!important}
  .qg-app.qg-profile-laptop .qg-home-tile .qg-mode-description{font-size:.82rem;line-height:1.3}
}



/* v1.4.7: smartphone-first home menu refinement */
.qg-app.qg-profile-mobile{
  width:100%;
  max-width:560px;
  margin:0 auto;
  padding:8px;
}
.qg-app.qg-profile-mobile .qg-home-card{
  min-height:0!important;
  border-radius:20px;
  overflow:hidden;
}
.qg-app.qg-profile-mobile .qg-home-header,
.qg-app.qg-profile-mobile .qg-home-header-overlay{
  min-height:112px;
}
.qg-app.qg-profile-mobile .qg-home-header-overlay{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:16px 12px;
  text-align:center;
}
.qg-app.qg-profile-mobile .qg-home-header h1{
  margin:0;
  font-size:clamp(1.8rem,8vw,2.35rem);
  line-height:1;
}
.qg-app.qg-profile-mobile .qg-home-header p{
  margin:9px 0 0;
  font-size:.92rem;
  line-height:1.2;
}
.qg-app.qg-profile-mobile .qg-home-grid{
  grid-template-columns:1fr!important;
  gap:12px!important;
  padding:12px!important;
}
.qg-app.qg-profile-mobile .qg-home-tile,
.qg-app.qg-profile-mobile .qg-achievements-tile{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%;
  min-height:126px!important;
  padding:14px 18px!important;
  border-radius:16px!important;
  text-align:center!important;
}
.qg-app.qg-profile-mobile .qg-home-tile .qg-mode-icon{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 42px;
  width:42px;
  height:42px;
  margin:0 0 9px!important;
  font-size:1.15rem;
  line-height:1;
}
.qg-app.qg-profile-mobile .qg-home-tile strong{
  display:block;
  width:100%;
  margin:0 0 5px!important;
  font-size:1rem!important;
  line-height:1.2!important;
  text-align:center!important;
}
.qg-app.qg-profile-mobile .qg-home-tile .qg-mode-description{
  display:block;
  width:min(100%,390px);
  margin:0 auto;
  font-size:.76rem;
  line-height:1.35;
  text-align:center!important;
}
.qg-app.qg-profile-mobile .qg-home-tile .qg-tile-watermark{
  background-position:center!important;
  background-size:min(52%,190px) auto!important;
  opacity:calc(var(--qg-tile-image-opacity,.18) * .72)!important;
}
@media (max-width:390px){
  .qg-app.qg-profile-mobile{padding:6px}
  .qg-app.qg-profile-mobile .qg-home-grid{gap:10px!important;padding:10px!important}
  .qg-app.qg-profile-mobile .qg-home-tile,
  .qg-app.qg-profile-mobile .qg-achievements-tile{min-height:118px!important;padding:12px 14px!important}
  .qg-app.qg-profile-mobile .qg-home-tile .qg-mode-icon{flex-basis:40px;width:40px;height:40px;margin-bottom:8px!important}
  .qg-app.qg-profile-mobile .qg-home-tile strong{font-size:.96rem!important}
  .qg-app.qg-profile-mobile .qg-home-tile .qg-mode-description{font-size:.72rem}
}

/* v1.4.8: no-scroll adaptive home dashboard (1-6 enabled tiles) */
html.qg-home-active,
body.qg-fullscreen-template.qg-home-active{
  width:100%;
  height:100%;
  min-height:100%;
  overflow:hidden!important;
  overscroll-behavior:none;
}
body.qg-fullscreen-template.qg-home-active .qg-fullscreen-main{
  width:100%;
  height:100vh!important;
  height:100dvh!important;
  min-height:0!important;
  overflow:hidden!important;
  display:grid;
  place-items:center;
}
body.qg-fullscreen-template.qg-home-active .qg-app{
  height:var(--qg-available-height);
  min-height:0;
  margin:0 auto!important;
  padding:0;
}
body.qg-fullscreen-template.qg-home-active .qg-screen[data-qg-screen="mode"]{
  width:100%;
  height:var(--qg-available-height);
  min-height:0;
  overflow:hidden;
}
.qg-app .qg-home-card{
  display:flex;
  flex-direction:column;
  width:100%;
  height:100%;
  min-height:0!important;
  overflow:hidden;
}
.qg-app .qg-home-header,
.qg-app .qg-home-header-overlay{
  min-height:0!important;
}
.qg-app .qg-home-header{
  flex:0 0 clamp(104px,17.5vh,230px);
}
.qg-app .qg-home-header-overlay{
  height:100%;
  padding:clamp(12px,2.2vh,28px) clamp(12px,2.5vw,30px);
}
.qg-app .qg-home-header h1{
  font-size:clamp(1.75rem,5.2vw,4.35rem);
}
.qg-app .qg-home-header p{
  margin-top:clamp(7px,1.4vh,18px);
  font-size:clamp(.78rem,1.8vw,1.45rem);
}
.qg-app .qg-home-grid{
  flex:1 1 auto;
  min-height:0;
  height:auto;
  margin:0;
  padding:clamp(8px,1.5vh,22px);
  gap:clamp(7px,1.15vh,18px);
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-flow:row;
  align-items:stretch;
}
.qg-app .qg-home-grid.qg-home-count-1{grid-template-columns:1fr!important;grid-template-rows:minmax(0,1fr)}
.qg-app .qg-home-grid.qg-home-count-2{grid-template-rows:minmax(0,1fr)}
.qg-app .qg-home-grid.qg-home-count-3,
.qg-app .qg-home-grid.qg-home-count-4{grid-template-rows:repeat(2,minmax(0,1fr))}
.qg-app .qg-home-grid.qg-home-count-5,
.qg-app .qg-home-grid.qg-home-count-6{grid-template-rows:repeat(3,minmax(0,1fr))}
.qg-app .qg-home-grid.qg-home-count-3 > :last-child,
.qg-app .qg-home-grid.qg-home-count-5 > :last-child{grid-column:1 / -1}
.qg-app .qg-home-tile,
.qg-app .qg-achievements-tile{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:100%!important;
  min-width:0;
  min-height:0!important;
  margin:0!important;
  padding:clamp(7px,1.25vh,18px) clamp(7px,1.4vw,18px)!important;
  border-radius:clamp(12px,1.6vw,22px)!important;
  text-align:center!important;
  overflow:hidden;
}
.qg-app .qg-home-tile .qg-mode-icon{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 clamp(34px,5.2vh,68px);
  width:clamp(34px,5.2vh,68px);
  height:clamp(34px,5.2vh,68px);
  margin:0 0 clamp(5px,.85vh,12px)!important;
  font-size:clamp(.95rem,2.2vh,1.75rem);
}
.qg-app .qg-home-tile strong{
  display:block;
  width:100%;
  margin:0 0 clamp(3px,.55vh,8px)!important;
  font-size:clamp(.76rem,1.75vh,1.3rem)!important;
  line-height:1.12!important;
  text-align:center!important;
  overflow-wrap:anywhere;
}
.qg-app .qg-home-tile .qg-mode-description{
  display:-webkit-box;
  width:100%;
  margin:0 auto;
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  color:#24376e!important;
  font-size:clamp(.54rem,1.12vh,.93rem);
  line-height:1.22;
  text-align:center!important;
  overflow-wrap:anywhere;
}
.qg-app .qg-home-tile .qg-tile-watermark{
  background-position:center!important;
  background-size:min(var(--qg-tile-image-size,55%),62%) auto!important;
}

/* Phone: always a compact 2-column dashboard, never a scrolling list. */
.qg-app.qg-profile-mobile{
  width:100%;
  max-width:560px;
  height:var(--qg-available-height);
  min-height:0;
  margin:0 auto!important;
  padding:clamp(5px,1vw,8px);
}
.qg-app.qg-profile-mobile .qg-home-card{border-radius:clamp(14px,4vw,20px)}
.qg-app.qg-profile-mobile .qg-home-header{flex-basis:clamp(96px,16vh,126px)}
.qg-app.qg-profile-mobile .qg-home-header-overlay{padding:10px}
.qg-app.qg-profile-mobile .qg-home-header h1{font-size:clamp(1.65rem,8.8vw,2.45rem)}
.qg-app.qg-profile-mobile .qg-home-header p{margin-top:7px;font-size:clamp(.72rem,3.7vw,.95rem)}
.qg-app.qg-profile-mobile .qg-home-grid{padding:8px!important;gap:8px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
.qg-app.qg-profile-mobile .qg-home-grid.qg-home-count-1{grid-template-columns:1fr!important}
.qg-app.qg-profile-mobile .qg-home-tile,
.qg-app.qg-profile-mobile .qg-achievements-tile{padding:7px 6px!important;border-radius:14px!important}
.qg-app.qg-profile-mobile .qg-home-tile .qg-mode-icon{flex-basis:clamp(32px,5.1vh,43px);width:clamp(32px,5.1vh,43px);height:clamp(32px,5.1vh,43px);margin-bottom:5px!important;font-size:clamp(.88rem,2.2vh,1.15rem)}
.qg-app.qg-profile-mobile .qg-home-tile strong{margin-bottom:3px!important;font-size:clamp(.7rem,1.7vh,.93rem)!important}
.qg-app.qg-profile-mobile .qg-home-tile .qg-mode-description{font-size:clamp(.48rem,1.05vh,.67rem);line-height:1.16}
.qg-app.qg-profile-mobile .qg-home-tile .qg-tile-watermark{background-size:min(58%,150px) auto!important;opacity:calc(var(--qg-tile-image-opacity,.18) * .72)!important}

/* Laptop presentation keeps the established balanced proportions. */
.qg-app.qg-profile-laptop .qg-home-header{flex-basis:clamp(138px,18.5vh,205px)}
.qg-app.qg-profile-laptop .qg-home-tile .qg-mode-icon{transform:translateY(-5px)}
.qg-app.qg-profile-laptop .qg-home-tile strong{transform:translateY(-3px)}
.qg-app.qg-profile-laptop .qg-home-tile .qg-mode-description{transform:translateY(-2px)}

/* Large portrait touch screens use the full height with larger touch targets. */
.qg-app.qg-profile-kiosk .qg-home-header{flex-basis:clamp(170px,17vh,300px)}
.qg-app.qg-profile-kiosk .qg-home-grid{padding:clamp(14px,1.5vh,28px);gap:clamp(12px,1.25vh,22px)}
.qg-app.qg-profile-kiosk .qg-home-tile .qg-mode-icon{flex-basis:clamp(52px,5.4vh,88px);width:clamp(52px,5.4vh,88px);height:clamp(52px,5.4vh,88px)}
.qg-app.qg-profile-kiosk .qg-home-tile strong{font-size:clamp(1rem,1.55vh,1.65rem)!important}
.qg-app.qg-profile-kiosk .qg-home-tile .qg-mode-description{font-size:clamp(.72rem,1.05vh,1.15rem)}

/* Category Challenge 1.5.0 */
.qg-category-field{margin:4px 0 22px;text-align:left}.qg-category-field-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:12px}.qg-category-field-head strong{font-size:1rem}.qg-category-field-head span{font-size:.82rem;color:#64748b;text-align:right}.qg-category-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:min(34vh,300px);overflow:auto;padding:2px}.qg-category-choice{appearance:none;display:flex;align-items:center;gap:11px;width:100%;min-height:64px;border:2px solid #d8e0ed;border-radius:14px;background:#fff;color:var(--qg-dark);padding:10px 12px;text-align:left;font:inherit;cursor:pointer;transition:.15s ease}.qg-category-choice:hover:not(:disabled),.qg-category-choice:focus-visible:not(:disabled){border-color:var(--qg-accent);background:var(--qg-soft)}.qg-category-choice.is-selected{border-color:var(--qg-accent);background:var(--qg-soft);box-shadow:0 0 0 2px color-mix(in srgb,var(--qg-accent) 16%,transparent)}.qg-category-choice.is-unavailable{opacity:.42;cursor:not-allowed;filter:grayscale(.35)}.qg-category-choice-icon{display:grid;place-items:center;flex:0 0 38px;height:38px;border-radius:50%;background:#f1efff;color:#7c3aed;font-weight:900}.qg-category-choice-text{min-width:0}.qg-category-choice-text strong,.qg-category-choice-text small{display:block}.qg-category-choice-text strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.93rem}.qg-category-choice-text small{margin-top:3px;color:#64748b;font-size:.76rem}.qg-category-choice.is-all .qg-category-choice-icon{background:#eef2ff;color:#4f46e5}@media(max-width:560px){.qg-category-grid{grid-template-columns:1fr;max-height:29vh}.qg-category-field-head{align-items:flex-start;flex-direction:column;gap:3px}.qg-category-field-head span{text-align:left}.qg-category-choice{min-height:56px;padding:8px 10px}.qg-category-choice-icon{flex-basis:34px;height:34px}}

/* 1.5.1 results-screen typography and action-grid refinement. */
.qg-results-card .qg-eyebrow{
	text-transform:none;
	letter-spacing:.06em;
}
.qg-result-score,
.qg-result-score strong{
	font-weight:800;
}
.qg-result-actions{
	display:grid;
	grid-template-columns:repeat(2,minmax(0,1fr));
	gap:12px;
	width:100%;
	max-width:620px;
	margin-top:16px;
}
.qg-results-card .qg-result-actions .qg-primary-button,
.qg-results-card .qg-result-actions .qg-secondary-button,
.qg-results-card .qg-result-actions .qg-danger-button{
	display:flex;
	align-items:center;
	justify-content:center;
	width:100%;
	min-height:54px;
	margin:0;
	padding:12px 16px;
	border-radius:var(--qg-button-radius);
	font:inherit;
	font-weight:800;
	line-height:1.2;
	text-align:center;
}
.qg-results-card .qg-result-actions .qg-secondary-button{
	border:2px solid var(--qg-accent);
	background:#fff;
	color:var(--qg-accent);
}
.qg-results-card .qg-result-actions .qg-secondary-button:hover,
.qg-results-card .qg-result-actions .qg-secondary-button:focus-visible{
	background:var(--qg-soft);
}
.qg-results-card .qg-result-actions .qg-danger-button{
	border:2px solid #ef4444;
	background:#fff7f7;
	color:#b42318;
}
@media(max-width:560px){
	.qg-result-actions{gap:9px;max-width:none;}
	.qg-results-card .qg-result-actions .qg-primary-button,
	.qg-results-card .qg-result-actions .qg-secondary-button,
	.qg-results-card .qg-result-actions .qg-danger-button{
		min-height:50px;
		padding:10px 8px;
		font-size:.88rem;
	}
}


/* 1.5.2: Preserve Greek accents and sentence case in all eyebrow labels. */
.qg-eyebrow{
	text-transform:none;
	letter-spacing:.06em;
}

/* 1.5.3: per-tile watermark fitting. These rules intentionally follow responsive overrides. */
.qg-home-tile[style*="--qg-tile-image-fit:cover"] .qg-tile-watermark{background-size:cover!important}
.qg-home-tile[style*="--qg-tile-image-fit:contain"] .qg-tile-watermark{background-size:contain!important}
.qg-home-tile[style*="--qg-tile-image-fit:custom"] .qg-tile-watermark{background-size:var(--qg-tile-image-size,55%) auto!important}


/* 1.5.4: configurable, perfectly circular main mode icons. */
.qg-app .qg-home-tile{
	--qg-icon-profile-max:120px;
}
.qg-app .qg-home-tile .qg-mode-icon{
	display:grid!important;
	place-items:center!important;
	box-sizing:border-box!important;
	flex-grow:0!important;
	flex-shrink:0!important;
	flex-basis:min(var(--qg-icon-circle-size,76px),var(--qg-icon-profile-max))!important;
	width:min(var(--qg-icon-circle-size,76px),var(--qg-icon-profile-max))!important;
	height:min(var(--qg-icon-circle-size,76px),var(--qg-icon-profile-max))!important;
	min-width:min(var(--qg-icon-circle-size,76px),var(--qg-icon-profile-max))!important;
	min-height:min(var(--qg-icon-circle-size,76px),var(--qg-icon-profile-max))!important;
	max-width:min(var(--qg-icon-circle-size,76px),var(--qg-icon-profile-max))!important;
	max-height:min(var(--qg-icon-circle-size,76px),var(--qg-icon-profile-max))!important;
	aspect-ratio:1 / 1!important;
	border-radius:50%!important;
	overflow:hidden;
}
.qg-app .qg-home-tile .qg-mode-icon-content{
	display:grid!important;
	place-items:center!important;
	width:100%!important;
	height:100%!important;
	min-width:0;
	min-height:0;
}
.qg-app .qg-home-tile .qg-mode-icon-content img{
	display:block!important;
	width:min(var(--qg-icon-image-size,42px),78%)!important;
	height:min(var(--qg-icon-image-size,42px),78%)!important;
	max-width:78%!important;
	max-height:78%!important;
	margin:0!important;
	object-fit:contain!important;
}
.qg-app.qg-profile-mobile .qg-home-tile{--qg-icon-profile-max:52px}
.qg-app.qg-profile-tablet .qg-home-tile{--qg-icon-profile-max:72px}
.qg-app.qg-profile-laptop .qg-home-tile{--qg-icon-profile-max:82px}
.qg-app.qg-profile-kiosk .qg-home-tile{--qg-icon-profile-max:110px}


/* v1.7.1 splash actions and install assistant */
.qg-splash{position:fixed;inset:0;z-index:2147482000;display:grid;place-items:center;overflow:hidden;background:#03133f;opacity:1;transition:opacity .4s ease;touch-action:manipulation}
.qg-splash[hidden]{display:none!important}.qg-splash.is-loading{visibility:hidden}.qg-splash.is-closing{opacity:0;pointer-events:none}
.qg-splash-video{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;background:#03133f;object-position:center center}
.qg-splash-fit-contain .qg-splash-video{object-fit:contain}.qg-splash-fit-cover .qg-splash-video{object-fit:cover}.qg-splash-fit-adaptive .qg-splash-video{object-fit:contain}
@media(orientation:portrait){.qg-splash-fit-adaptive .qg-splash-video{object-fit:cover}}@media(orientation:landscape){.qg-splash-fit-adaptive .qg-splash-video{object-fit:contain}}
.qg-splash-actions{position:relative;z-index:3;display:flex;flex-direction:column;align-items:stretch;gap:12px;width:min(310px,calc(100vw - 36px));padding:18px;border:1px solid rgba(103,232,249,.62);border-radius:26px;background:rgba(3,19,63,.76);box-shadow:0 18px 55px rgba(0,0,0,.38),0 0 34px rgba(34,211,238,.24);backdrop-filter:blur(12px)}
.qg-splash-start{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:64px;padding:10px 18px;border:0;border-radius:18px;background:#22d3ee;color:#03133f;font:inherit;cursor:pointer;box-shadow:0 0 26px rgba(34,211,238,.4)}
.qg-splash-start span{display:grid;place-items:center;width:38px;height:38px;padding-left:3px;border-radius:50%;background:#03133f;color:#22d3ee;font-size:1.05rem}.qg-splash-start strong{font-size:clamp(1rem,2.7vw,1.18rem)}
.qg-splash-skip{position:static;width:100%;min-height:48px;padding:10px 16px;border:1px solid rgba(255,255,255,.5);border-radius:16px;background:rgba(255,255,255,.08);color:#fff;font:inherit;font-weight:700;cursor:pointer}
.qg-splash-start:hover,.qg-splash-start:focus-visible{filter:brightness(1.06);outline:2px solid #fff;outline-offset:3px}.qg-splash-skip:hover,.qg-splash-skip:focus-visible{background:rgba(255,255,255,.16);outline:2px solid #67e8f9;outline-offset:2px}
.qg-splash.is-playing .qg-splash-actions{display:none}
.qg-install-assistant{position:fixed;z-index:2147481000;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));display:grid;grid-template-columns:auto 1fr;gap:14px;width:min(410px,calc(100vw - 32px));padding:18px 44px 18px 18px;border:1px solid rgba(103,232,249,.48);border-radius:20px;background:rgba(3,19,63,.96);box-shadow:0 18px 55px rgba(0,0,0,.38);color:#fff;backdrop-filter:blur(14px)}
.qg-install-assistant[hidden]{display:none!important}.qg-install-assistant-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:#22d3ee;color:#03133f;font-size:1.35rem;font-weight:900}.qg-install-assistant strong{display:block;font-size:1.04rem}.qg-install-assistant p{margin:5px 0 12px;color:#dbeafe;font-size:.9rem;line-height:1.4}.qg-install-assistant-actions{display:flex;gap:9px;flex-wrap:wrap}.qg-install-assistant-actions button{min-height:40px;padding:8px 15px;border-radius:999px;font:inherit;font-weight:800;cursor:pointer}.qg-install-primary{border:0;background:#22d3ee;color:#03133f}.qg-install-guide{border:1px solid #67e8f9;background:rgba(103,232,249,.1);color:#e6fbff}.qg-install-later{border:1px solid rgba(255,255,255,.45);background:transparent;color:#fff}.qg-install-assistant-close{position:absolute;top:8px;right:10px;border:0;background:transparent;color:#fff;font-size:1.5rem;cursor:pointer}.qg-install-assistant.is-instructions .qg-install-primary{display:none}
@media(max-width:560px){.qg-splash-actions{width:min(280px,calc(100vw - 28px));padding:14px;border-radius:22px}.qg-splash-start{min-height:58px}.qg-install-assistant{left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));width:auto}}
@media(prefers-reduced-motion:reduce){.qg-splash{transition:none}}

/* 1.6.2: carry each mode's visual identity through setup and gameplay. */
.qg-app{
  --qg-current-mode-bg:#eff6ff;
  --qg-current-mode-accent:#3b82f6;
}
.qg-mode-setup-card{
  background:linear-gradient(180deg,#fff 0%,color-mix(in srgb,var(--qg-current-mode-bg) 74%,#fff) 100%)!important;
}
.qg-mode-setup-content{
  background:linear-gradient(180deg,color-mix(in srgb,var(--qg-current-mode-bg) 38%,#fff),color-mix(in srgb,var(--qg-current-mode-bg) 70%,#fff));
}
.qg-mode-setup-content .qg-eyebrow{color:var(--qg-current-mode-accent)!important}
.qg-mode-setup-content .qg-choice.is-selected,
.qg-mode-setup-content .qg-category-choice.is-selected{
  border-color:var(--qg-current-mode-accent)!important;
  background:color-mix(in srgb,var(--qg-current-mode-bg) 82%,#fff)!important;
  color:color-mix(in srgb,var(--qg-current-mode-accent) 85%,#081b4d)!important;
}
.qg-mode-setup-content .qg-primary-button{background:var(--qg-current-mode-accent)!important}
.qg-question-card{
  position:relative;
  border:1px solid color-mix(in srgb,var(--qg-current-mode-accent) 28%,#dbe4f2)!important;
  background:linear-gradient(180deg,color-mix(in srgb,var(--qg-current-mode-bg) 68%,#fff) 0%,color-mix(in srgb,var(--qg-current-mode-bg) 42%,#fff) 100%)!important;
}
.qg-question-mode-badge{
  align-self:flex-start;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:30px;
  margin:0 0 10px;
  padding:5px 13px;
  border:1px solid color-mix(in srgb,var(--qg-current-mode-accent) 38%,#fff);
  border-radius:999px;
  background:color-mix(in srgb,var(--qg-current-mode-bg) 74%,#fff);
  color:color-mix(in srgb,var(--qg-current-mode-accent) 82%,#071a4b);
  font-size:.86rem;
  font-weight:900;
  line-height:1;
}
.qg-question-card .qg-progress{background:color-mix(in srgb,var(--qg-current-mode-accent) 15%,#e5ebf4)!important}
.qg-question-card .qg-progress>span{background:var(--qg-current-mode-accent)!important}
.qg-question-card .qg-answer{
  background:color-mix(in srgb,var(--qg-answer-bg) 92%,#fff)!important;
}
.qg-question-card.is-compact .qg-question-mode-badge{min-height:25px;margin-bottom:7px;padding:4px 10px;font-size:.75rem}
.qg-question-card.is-extra-compact .qg-question-mode-badge{min-height:22px;margin-bottom:5px;padding:3px 9px;font-size:.68rem}
@supports not (color:color-mix(in srgb,black,white)){
  .qg-mode-setup-card,.qg-mode-setup-content,.qg-question-card{background:var(--qg-current-mode-bg)!important}
  .qg-question-mode-badge{border-color:var(--qg-current-mode-accent);background:#fff;color:var(--qg-current-mode-accent)}
}
@media(max-width:560px){
  .qg-question-mode-badge{min-height:25px;margin-bottom:7px;padding:4px 10px;font-size:.76rem}
}


/* 1.6.3: unified compact mode identity header. */
.qg-app{
  --qg-current-icon-circle-size:64px;
  --qg-current-icon-image-size:34px;
}
.qg-mode-identity{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(12px,1.8vw,20px);
  min-width:0;
  text-align:center;
}
.qg-mode-identity-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 var(--qg-current-icon-circle-size);
  width:var(--qg-current-icon-circle-size);
  height:var(--qg-current-icon-circle-size);
  aspect-ratio:1/1;
  border-radius:50%;
  background:linear-gradient(145deg,color-mix(in srgb,var(--qg-current-mode-accent) 72%,white),var(--qg-current-mode-accent));
  color:#fff;
  box-shadow:0 8px 16px color-mix(in srgb,var(--qg-current-mode-accent) 28%,transparent),inset 0 1px rgba(255,255,255,.55);
  font-size:clamp(1.3rem,2.4vw,2rem);
  line-height:1;
  overflow:hidden;
}
.qg-mode-identity-icon>[data-qg-mode-icon-content]{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  line-height:1;
}
.qg-mode-identity-icon img{
  display:block;
  width:var(--qg-current-icon-image-size);
  height:var(--qg-current-icon-image-size);
  max-width:72%;
  max-height:72%;
  object-fit:contain;
}
.qg-mode-banner-identity h1,
.qg-question-mode-title{
  margin:0;
  color:#0b1d5b;
  font-weight:900;
  line-height:1.05;
}
.qg-mode-banner-identity h1{font-size:clamp(2rem,5vw,3.5rem)}
.qg-question-mode-identity{
  flex:0 0 auto;
  margin:0 0 clamp(10px,1.5vh,16px);
}
.qg-question-mode-title{font-size:clamp(1.7rem,3.8vw,2.65rem)}
.qg-selected-mode-banner{
  min-height:112px;
  padding:20px 72px;
}
.qg-mode-setup-content{padding-top:clamp(22px,4vw,38px)}
.qg-question-mode-badge{display:none!important}
.qg-question-card.is-compact .qg-question-mode-identity{margin-bottom:8px}
.qg-question-card.is-compact .qg-question-mode-title{font-size:1.45rem}
.qg-question-card.is-compact .qg-mode-identity-icon{transform:scale(.82)}
.qg-question-card.is-extra-compact .qg-question-mode-identity{margin-bottom:5px;gap:8px}
.qg-question-card.is-extra-compact .qg-question-mode-title{font-size:1.18rem}
.qg-question-card.is-extra-compact .qg-mode-identity-icon{transform:scale(.7)}
@supports not (color:color-mix(in srgb,black,white)){
  .qg-mode-identity-icon{background:var(--qg-current-mode-accent)}
}
@media(max-width:560px){
  .qg-app{--qg-current-icon-circle-size:48px;--qg-current-icon-image-size:27px}
  .qg-selected-mode-banner{min-height:84px;padding:14px 56px}
  .qg-mode-banner-identity{gap:10px}
  .qg-mode-banner-identity h1{font-size:clamp(1.75rem,8vw,2.35rem)}
  .qg-question-mode-identity{margin-bottom:8px;gap:9px}
  .qg-question-mode-title{font-size:clamp(1.35rem,6.5vw,1.8rem)}
}


/* v1.6.6 Achievements podium and completed challenge */
.qg-achievements-card{padding:0!important;overflow:hidden;background:#fffdf4!important}
.qg-achievements-banner{--qg-mode-bg:#fff8d8;--qg-mode-accent:#eab308}
.qg-achievements-header-icon{display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:linear-gradient(145deg,#fff4b8,#f4c430);font-size:2rem;box-shadow:0 8px 16px rgba(202,138,4,.22)}
.qg-achievements-content{padding:28px 32px 32px;background:linear-gradient(180deg,#fffdf4 0,#fffaf0 100%)}
.qg-achievements-screen .qg-eyebrow{margin:0 0 4px;text-align:center}.qg-achievements-intro{margin:0 0 28px;text-align:center}
.qg-medal-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:end;max-width:760px;margin:0 auto 22px}
.qg-medal-podium .qg-achievement-card{display:flex;min-height:150px;flex-direction:column;justify-content:center;gap:8px;text-align:center}
.qg-medal-podium .qg-achievement-card.is-gold{min-height:184px;transform:translateY(-12px);border-color:#e8bf35;background:linear-gradient(180deg,#fffdf1,#fff5c7);box-shadow:0 12px 24px rgba(202,138,4,.16)}
.qg-medal-podium .qg-achievement-card>span{grid-row:auto;width:64px;height:64px;margin:0 auto;font-size:2rem}
.qg-medal-podium .qg-achievement-card.is-gold>span{width:76px;height:76px;font-size:2.35rem}
.qg-medal-podium .qg-achievement-card strong{font-size:2rem}.qg-medal-podium .qg-achievement-card small{font-size:1rem}
.qg-trophy-showcase{display:flex;align-items:center;justify-content:center;gap:24px;max-width:760px;min-height:154px;margin:0 auto 20px;border-color:#f1cd5b;background:linear-gradient(135deg,#fffdf3,#fff1b8);text-align:left;box-shadow:0 10px 24px rgba(202,138,4,.12)}
.qg-trophy-showcase>span{grid-row:auto!important;width:96px!important;height:96px!important;background:linear-gradient(145deg,#fff8d8,#ffd45a)!important;font-size:4rem!important;box-shadow:0 10px 20px rgba(202,138,4,.2)}
.qg-trophy-showcase>div{display:flex;flex-direction:column}.qg-trophy-showcase strong{font-size:2.5rem}.qg-trophy-showcase small{font-size:1.05rem}
.qg-trophy-progress[hidden]{display:none!important}
@media(max-width:560px){.qg-achievements-content{padding:20px 14px 24px}.qg-achievements-banner{min-height:116px;padding:20px 54px}.qg-achievements-header-icon{width:48px;height:48px;font-size:1.6rem}.qg-medal-podium{gap:8px;margin-bottom:14px}.qg-medal-podium .qg-achievement-card{min-height:132px;padding:12px 6px}.qg-medal-podium .qg-achievement-card.is-gold{min-height:158px;transform:translateY(-8px)}.qg-medal-podium .qg-achievement-card>span{width:48px;height:48px;font-size:1.5rem}.qg-medal-podium .qg-achievement-card.is-gold>span{width:58px;height:58px;font-size:1.8rem}.qg-medal-podium .qg-achievement-card strong{font-size:1.55rem}.qg-medal-podium .qg-achievement-card small{font-size:.8rem}.qg-trophy-showcase{min-height:126px;gap:16px;padding:14px}.qg-trophy-showcase>span{width:76px!important;height:76px!important;font-size:3rem!important}.qg-trophy-showcase strong{font-size:2rem}.qg-trophy-showcase small{font-size:.9rem}}


/* v1.6.7 touch-friendly achievement reset modal and toast */
.qg-reset-awards-button{display:inline-flex!important;align-items:center;justify-content:center;min-height:48px;margin:22px auto 0!important;padding:10px 20px!important;border:1px solid #cbd5e1!important;border-radius:16px!important;background:#fff!important;color:#64748b!important;font-size:.95rem!important;font-weight:750!important;box-shadow:none!important}
.qg-reset-awards-button::before{content:"↺";margin-right:8px;color:#dc2626;font-size:1.15em;font-weight:900}
.qg-reset-awards-button:hover,.qg-reset-awards-button:focus-visible{border-color:#ef4444!important;background:#fff7f7!important;color:#b91c1c!important;outline:3px solid rgba(239,68,68,.16);outline-offset:2px}
.qg-confirm-overlay{position:absolute;z-index:1000;inset:0;display:grid;place-items:center;padding:24px;background:rgba(6,18,48,.58);backdrop-filter:blur(7px);opacity:0;transition:opacity .18s ease}
.qg-confirm-overlay[hidden]{display:none!important}
.qg-confirm-overlay.is-visible{opacity:1}
.qg-confirm-dialog{width:min(92vw,540px);padding:30px;border:1px solid rgba(255,255,255,.72);border-radius:28px;background:linear-gradient(180deg,#fff,#fffaf0);box-shadow:0 28px 80px rgba(5,18,48,.34);text-align:center;transform:translateY(14px) scale(.97);transition:transform .18s ease}
.qg-confirm-overlay.is-visible .qg-confirm-dialog{transform:translateY(0) scale(1)}
.qg-confirm-icon{display:grid;place-items:center;width:82px;height:82px;margin:0 auto 16px;border-radius:50%;background:linear-gradient(145deg,#fff7ca,#ffd34f);font-size:2.8rem;box-shadow:0 12px 26px rgba(202,138,4,.2)}
.qg-confirm-dialog h2{margin:0 0 12px;color:#0b1d5b;font-size:clamp(1.55rem,4vw,2rem);line-height:1.12}
.qg-confirm-dialog p{max-width:440px;margin:0 auto 10px;color:#526078;font-size:1rem;line-height:1.5}
.qg-confirm-dialog .qg-confirm-warning{color:#b45309;font-size:.9rem;font-weight:800}
.qg-confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:24px}
.qg-confirm-actions button{min-height:58px;border-radius:17px;font:inherit;font-weight:900;cursor:pointer;touch-action:manipulation}
.qg-confirm-reset-button{border:1px solid #dc2626;background:linear-gradient(180deg,#ef4444,#dc2626);color:#fff;box-shadow:0 10px 22px rgba(220,38,38,.22)}
.qg-confirm-reset-button:hover,.qg-confirm-reset-button:focus-visible{background:#b91c1c;outline:3px solid rgba(239,68,68,.22);outline-offset:2px}
.qg-toast{position:absolute;z-index:1100;left:50%;bottom:max(24px,env(safe-area-inset-bottom));width:max-content;max-width:calc(100% - 32px);padding:14px 20px;border:1px solid #86efac;border-radius:16px;background:#f0fdf4;color:#166534;box-shadow:0 16px 40px rgba(5,18,48,.2);font-weight:850;text-align:center;opacity:0;transform:translate(-50%,18px);transition:opacity .22s ease,transform .22s ease}
.qg-toast[hidden]{display:none!important}
.qg-toast.is-visible{opacity:1;transform:translate(-50%,0)}
@media(max-width:560px){.qg-confirm-overlay{padding:16px}.qg-confirm-dialog{padding:24px 18px;border-radius:24px}.qg-confirm-icon{width:68px;height:68px;font-size:2.25rem}.qg-confirm-actions{grid-template-columns:1fr;gap:10px}.qg-confirm-actions button{min-height:56px}.qg-confirm-reset-button{order:-1}.qg-toast{font-size:.9rem}}
@media(prefers-reduced-motion:reduce){.qg-confirm-overlay,.qg-confirm-dialog,.qg-toast{transition:none}}

/* Application status */
.qg-development-badge{position:fixed;z-index:9999;top:14px;right:14px;padding:8px 13px;border:1px solid rgba(255,255,255,.55);border-radius:999px;background:#b45309;color:#fff;box-shadow:0 8px 24px rgba(0,0,0,.2);font:800 12px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.08em;pointer-events:none}
@media(max-width:600px){.qg-development-badge{top:8px;right:8px;padding:7px 10px;font-size:10px}}


/* v1.7.2 install/uninstall help */
.qg-home-tools{display:flex;justify-content:center;padding:0 16px 16px;background:#f8fbff}
.qg-install-help-button{display:inline-flex;align-items:center;gap:10px;min-height:46px;padding:9px 18px;border:1px solid #70d8f0;border-radius:999px;background:#eefcff;color:#0b1d5b;font:inherit;cursor:pointer;box-shadow:0 7px 18px rgba(14,116,144,.12)}
.qg-install-help-button:hover,.qg-install-help-button:focus-visible{background:#dff8ff;outline:3px solid rgba(34,211,238,.22);outline-offset:2px}.qg-install-help-button span{font-size:1.2rem}.qg-install-help-button strong{font-size:.94rem}
.qg-install-help-overlay{position:absolute;z-index:2147482000;inset:0;display:grid;place-items:center;padding:18px;background:rgba(2,10,42,.68);backdrop-filter:blur(8px);opacity:0;transition:opacity .18s ease}.qg-install-help-overlay[hidden]{display:none!important}.qg-install-help-overlay.is-visible{opacity:1}
.qg-install-help-dialog{position:relative;width:min(760px,96vw);max-height:min(88dvh,820px);overflow:auto;padding:28px;border:1px solid rgba(255,255,255,.65);border-radius:28px;background:#fff;box-shadow:0 28px 80px rgba(0,0,0,.38);color:#1e293b}
.qg-install-help-dialog header{display:flex;align-items:center;gap:15px;padding-right:36px}.qg-install-help-icon{display:grid;place-items:center;flex:0 0 56px;width:56px;height:56px;border-radius:17px;background:#22d3ee;color:#03133f;font-size:1.8rem;font-weight:900}.qg-install-help-dialog h2{margin:0;color:#0b1d5b;font-size:clamp(1.45rem,4vw,2rem)}.qg-install-help-dialog header p{margin:5px 0 0;color:#64748b}
.qg-install-help-close{position:absolute;top:12px;right:14px;border:0;background:transparent;color:#475569;font-size:1.8rem;cursor:pointer}.qg-install-help-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:22px 0}.qg-install-help-tabs button{min-height:48px;border:1px solid #cbd5e1;border-radius:14px;background:#f8fafc;color:#334155;font:inherit;font-weight:850;cursor:pointer}.qg-install-help-tabs button.is-active{border-color:#0891b2;background:#ecfeff;color:#0e7490}
.qg-install-help-content h3{margin:20px 0 8px;color:#0b1d5b}.qg-install-help-content ol{margin:0;padding-left:1.3rem}.qg-install-help-content li{margin:7px 0;line-height:1.5}.qg-install-cookie-warning{margin-top:22px;padding:16px 18px;border:1px solid #f59e0b;border-radius:16px;background:#fffbeb;color:#78350f}.qg-install-cookie-warning strong{display:block;margin-bottom:6px}.qg-install-cookie-warning p{margin:0;line-height:1.48}
.qg-install-help-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:22px}.qg-install-help-actions button{min-height:46px;padding:9px 17px;border-radius:999px;font:inherit;font-weight:850;cursor:pointer}.qg-install-help-primary{border:0;background:#0e7490;color:#fff}.qg-install-help-secondary{border:1px solid #cbd5e1;background:#fff;color:#334155}
@media(max-width:560px){.qg-home-tools{padding:0 10px 10px}.qg-install-help-button{width:100%;justify-content:center;min-height:42px;padding:7px 12px}.qg-install-help-button strong{font-size:.82rem}.qg-install-help-overlay{padding:10px}.qg-install-help-dialog{width:100%;max-height:94dvh;padding:22px 16px;border-radius:22px}.qg-install-help-tabs{grid-template-columns:1fr}.qg-install-help-actions{display:grid;grid-template-columns:1fr}.qg-install-help-actions button{width:100%}}
@media(prefers-reduced-motion:reduce){.qg-install-help-overlay{transition:none}}

/* v1.8.0 unified application management */
.qg-app-help-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.qg-app-help-grid article{padding:15px;border:1px solid #dbe4ee;border-radius:16px;background:#f8fafc}.qg-app-help-grid strong{display:block;margin-bottom:7px;color:#0b1d5b}.qg-app-help-grid p{margin:0;line-height:1.5}.qg-help-note{padding:12px 14px;border-radius:13px;background:#eefcff;color:#155e75}.qg-reset-warning{margin:15px 0;padding:12px 14px;border:1px solid #f59e0b;border-radius:13px;background:#fffbeb;color:#78350f}.qg-reset-data-button{min-height:46px;padding:9px 18px;border:0;border-radius:999px;background:#b91c1c;color:#fff;font:inherit;font-weight:850;cursor:pointer}.qg-reset-data-button:disabled{opacity:.55;cursor:wait}.qg-reset-status{min-height:1.4em;margin:10px 0 0;color:#0f766e;font-weight:700}
@media(max-width:760px){.qg-app-help-grid{grid-template-columns:1fr}}

/* v1.8.2: clearer and more tactile home buttons on mobile screens. */
.qg-app.qg-profile-mobile .qg-home-grid{
  gap:clamp(12px,2vh,18px)!important;
  padding:clamp(10px,1.7vh,15px)!important;
  align-items:center!important;
}
.qg-app.qg-profile-mobile .qg-home-tile,
.qg-app.qg-profile-mobile .qg-achievements-tile{
  width:92%!important;
  height:88%!important;
  justify-self:center!important;
  align-self:center!important;
  border-width:1.5px!important;
  border-radius:16px!important;
  box-shadow:
    0 10px 22px rgba(15,35,80,.17),
    0 3px 7px rgba(15,35,80,.12),
    inset 0 1px 0 rgba(255,255,255,.94)!important;
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease!important;
}
.qg-app.qg-profile-mobile .qg-home-tile:active,
.qg-app.qg-profile-mobile .qg-achievements-tile:active{
  transform:translateY(2px) scale(.985)!important;
  box-shadow:
    0 5px 12px rgba(15,35,80,.15),
    inset 0 1px 0 rgba(255,255,255,.9)!important;
}
.qg-app.qg-profile-mobile .qg-home-tile .qg-mode-description{
  font-size:clamp(.68rem,1.42vh,.84rem)!important;
  line-height:1.28!important;
  font-weight:500;
  color:#18346f!important;
  -webkit-line-clamp:3;
}
.qg-app.qg-profile-mobile .qg-home-tile .qg-tile-watermark{
  inset:0!important;
  background-size:cover!important;
  background-position:center!important;
  opacity:clamp(.24,calc(var(--qg-tile-image-opacity,.18) * 1.45),.48)!important;
}
@media(max-width:390px){
  .qg-app.qg-profile-mobile .qg-home-grid{
    gap:11px!important;
    padding:9px!important;
  }
  .qg-app.qg-profile-mobile .qg-home-tile,
  .qg-app.qg-profile-mobile .qg-achievements-tile{
    width:93%!important;
    height:90%!important;
  }
  .qg-app.qg-profile-mobile .qg-home-tile .qg-mode-description{
    font-size:clamp(.64rem,1.35vh,.78rem)!important;
  }
}


/* 1.8.3: always-available, touch-friendly return control during a quiz. */
.qg-question-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.qg-question-header .qg-question-mode-identity{margin:0;min-width:0}
.qg-quiz-exit-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:0 0 auto;min-height:42px;padding:8px 13px;border:1px solid color-mix(in srgb,var(--qg-current-mode-accent,var(--qg-accent)) 48%,#cbd5e1);border-radius:999px;background:#fff;color:var(--qg-current-mode-accent,var(--qg-accent));font:inherit;font-weight:800;cursor:pointer;box-shadow:0 5px 14px rgba(15,23,42,.10);touch-action:manipulation}
.qg-quiz-exit-button:hover,.qg-quiz-exit-button:focus-visible{background:var(--qg-soft);transform:translateY(-1px);outline:3px solid color-mix(in srgb,var(--qg-current-mode-accent,var(--qg-accent)) 22%,transparent);outline-offset:2px}
.qg-quiz-exit-button:active{transform:scale(.98)}
.qg-quiz-exit-button span{font-size:1.2em;line-height:1}
.qg-quiz-exit-dialog{width:min(480px,calc(100vw - 28px))}
.qg-quiz-exit-actions{display:grid;gap:10px;margin-top:20px}
.qg-quiz-exit-actions .qg-primary-button,.qg-quiz-exit-actions .qg-secondary-button{width:100%;min-height:48px;border-radius:14px}
.qg-quiz-exit-actions .qg-secondary-button{border:1px solid #cbd5e1;background:#fff}
@media(max-width:560px){
 .qg-question-header{align-items:flex-start;margin-bottom:8px}
 .qg-quiz-exit-button{min-height:40px;width:42px;padding:7px}
 .qg-quiz-exit-button strong{display:none}
 .qg-question-header .qg-question-mode-identity{justify-content:flex-end;text-align:right}
 .qg-question-header .qg-mode-identity-icon{width:38px;height:38px;flex-basis:38px}
 .qg-question-header .qg-question-mode-title{font-size:.86rem}
}
@media(max-width:370px){.qg-quiz-exit-button strong{display:none}.qg-quiz-exit-button{width:42px;padding:7px}}


/* Fullscreen controls */
.qg-splash-fullscreen{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:48px;padding:10px 16px;border:1px solid rgba(103,232,249,.75);border-radius:16px;background:rgba(34,211,238,.12);color:#fff;font:inherit;font-weight:800;cursor:pointer}
.qg-splash-fullscreen:hover,.qg-splash-fullscreen:focus-visible{background:rgba(34,211,238,.24);outline:2px solid #67e8f9;outline-offset:2px}.qg-splash-fullscreen.is-active{background:#22d3ee;color:#03133f}
.qg-fullscreen-help{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;padding:15px 17px;border:1px solid #67e8f9;border-radius:17px;background:#ecfeff}.qg-fullscreen-help strong{color:#0b1d5b}.qg-fullscreen-help p{margin:4px 0 0;color:#475569;line-height:1.45}
.qg-fullscreen-button{flex:0 0 auto;min-height:46px;padding:9px 16px;border:0;border-radius:999px;background:#0e7490;color:#fff;font:inherit;font-weight:850;cursor:pointer;box-shadow:0 8px 18px rgba(14,116,144,.22)}.qg-fullscreen-button.is-active{background:#334155}.qg-fullscreen-button:hover,.qg-fullscreen-button:focus-visible{filter:brightness(1.08);outline:3px solid rgba(34,211,238,.3);outline-offset:2px}
@media(max-width:560px){.qg-fullscreen-help{align-items:stretch;flex-direction:column}.qg-fullscreen-button{width:100%}}


/* 1.8.6: persistent fullscreen recovery control after the user exits fullscreen. */
.qg-fullscreen-floating{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:max(18px,calc(env(safe-area-inset-bottom) + 14px));z-index:10020;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:10px 16px;border:1px solid rgba(103,232,249,.9);border-radius:999px;background:linear-gradient(135deg,#0e7490,#075985);color:#fff;font:inherit;font-weight:850;cursor:pointer;box-shadow:0 12px 28px rgba(2,8,23,.34),0 0 0 4px rgba(34,211,238,.12);touch-action:manipulation;animation:qgFullscreenFloatIn .24s ease-out}
.qg-fullscreen-floating[hidden]{display:none!important}
.qg-fullscreen-floating:hover,.qg-fullscreen-floating:focus-visible{filter:brightness(1.1);transform:translateY(-2px);outline:3px solid rgba(34,211,238,.28);outline-offset:2px}
.qg-fullscreen-floating:active{transform:scale(.96)}
.qg-fullscreen-floating>span:first-child{font-size:1.3em;line-height:1}
.qg-fullscreen-toast{position:fixed;left:50%;bottom:max(82px,calc(env(safe-area-inset-bottom) + 76px));z-index:10019;display:flex;align-items:center;gap:9px;width:max-content;max-width:calc(100vw - 28px);padding:11px 15px;border:1px solid rgba(103,232,249,.55);border-radius:14px;background:rgba(3,19,63,.94);color:#fff;font-size:.9rem;font-weight:700;line-height:1.35;box-shadow:0 12px 30px rgba(2,8,23,.35);opacity:0;transform:translate(-50%,10px);transition:opacity .2s ease,transform .2s ease;pointer-events:none}
.qg-fullscreen-toast[hidden]{display:none!important}.qg-fullscreen-toast.is-visible{opacity:1;transform:translate(-50%,0)}
@keyframes qgFullscreenFloatIn{from{opacity:0;transform:translateY(10px) scale(.94)}to{opacity:1;transform:none}}
@media(max-width:560px){.qg-fullscreen-floating{right:max(10px,env(safe-area-inset-right));bottom:max(12px,calc(env(safe-area-inset-bottom) + 10px));width:52px;height:52px;min-height:52px;padding:0;border-radius:50%}.qg-fullscreen-floating span[data-qg-fullscreen-label]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.qg-fullscreen-toast{bottom:max(76px,calc(env(safe-area-inset-bottom) + 70px));font-size:.82rem}}

/* 1.8.29: selected category title above the question in Category mode. */
.qg-question-category-title{
  flex:0 0 auto;
  margin:0 0 clamp(9px,1.35vh,15px);
  color:var(--qg-current-mode-accent,var(--qg-accent));
  font-size:clamp(1.5rem,3.3vh,2.25rem);
  font-weight:800;
  line-height:1.2;
  letter-spacing:-.02em;
}
.qg-question-category-title[hidden]{display:none!important}
.qg-question-card.is-compact .qg-question-category-title{margin-bottom:7px;font-size:1.34rem}
.qg-question-card.is-extra-compact .qg-question-category-title{margin-bottom:5px;font-size:1.16rem}
@media(max-width:560px){
  .qg-question-category-title{margin-bottom:10px;font-size:clamp(1.48rem,6.7vw,1.9rem)}
}


/* 1.8.7: clearer quiz hierarchy and compact game identity. */
.qg-question-card .qg-question-mode-title{
  font-size:clamp(1.4rem,3.1vw,2.15rem)!important;
  font-weight:700!important;
  letter-spacing:-.02em;
}
.qg-question-card .qg-question-mode-identity .qg-mode-identity-icon{
  width:calc(var(--qg-current-icon-circle-size,64px) * .8)!important;
  height:calc(var(--qg-current-icon-circle-size,64px) * .8)!important;
  flex-basis:calc(var(--qg-current-icon-circle-size,64px) * .8)!important;
}
.qg-question-card .qg-question-mode-identity .qg-mode-identity-icon img{
  width:calc(var(--qg-current-icon-image-size,34px) * .8)!important;
  height:calc(var(--qg-current-icon-image-size,34px) * .8)!important;
}
.qg-question-card .qg-question-text{
  font-size:clamp(1.38rem,3vh,2.05rem)!important;
  font-weight:500!important;
  line-height:1.38!important;
}
.qg-question-card.is-compact .qg-question-text{
  font-size:1.22rem!important;
  line-height:1.32!important;
}
.qg-question-card.is-extra-compact .qg-question-text{
  font-size:1.08rem!important;
  line-height:1.26!important;
}
@media(max-width:560px){
  .qg-question-header .qg-question-mode-title{font-size:.8rem!important;font-weight:700!important}
  .qg-question-header .qg-question-mode-identity .qg-mode-identity-icon{width:31px!important;height:31px!important;flex-basis:31px!important}
  .qg-question-card .qg-question-text{font-size:clamp(1.32rem,6vw,1.72rem)!important;line-height:1.36!important}
}


/* 1.8.7 refinement: mode-colored divider and more breathing room before the question. */
.qg-question-card .qg-mode-divider{
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  margin:2px 0 18px;
  color:var(--qg-current-mode-accent,var(--qg-accent));
}
.qg-question-card .qg-mode-divider::before,
.qg-question-card .qg-mode-divider::after{
  content:"";
  flex:1 1 auto;
  height:1px;
  background:currentColor;
  opacity:.9;
}
.qg-question-card .qg-mode-divider>span{
  display:block;
  flex:0 0 9px;
  width:9px;
  height:9px;
  border-radius:50%;
  background:currentColor;
  box-shadow:0 2px 7px color-mix(in srgb,currentColor 35%,transparent);
}
.qg-question-card .qg-progress{
  margin-bottom:clamp(30px,4.2vh,46px)!important;
}
.qg-question-card.is-compact .qg-mode-divider{margin:0 0 10px;gap:10px}
.qg-question-card.is-compact .qg-mode-divider>span{flex-basis:7px;width:7px;height:7px}
.qg-question-card.is-compact .qg-progress{margin-bottom:20px!important}
.qg-question-card.is-extra-compact .qg-mode-divider{margin:0 0 6px;gap:8px}
.qg-question-card.is-extra-compact .qg-mode-divider>span{flex-basis:6px;width:6px;height:6px}
.qg-question-card.is-extra-compact .qg-progress{margin-bottom:12px!important}
@media(max-width:560px){
  .qg-question-card .qg-mode-divider{margin:0 0 12px;gap:10px}
  .qg-question-card .qg-mode-divider>span{flex-basis:7px;width:7px;height:7px}
  .qg-question-card .qg-progress{margin-bottom:clamp(24px,4vh,34px)!important}
}

/* 1.8.9: stronger mobile mode identity and improved vertical rhythm. */
@media(max-width:560px){
  .qg-question-card{
    padding-top:max(42px,calc(28px + env(safe-area-inset-top)))!important;
  }
  .qg-question-card .qg-question-header{
    margin-bottom:14px!important;
  }
  .qg-question-card .qg-question-header .qg-question-mode-identity{
    gap:10px!important;
  }
  .qg-question-card .qg-question-header .qg-question-mode-title,
  .qg-question-card.is-compact .qg-question-header .qg-question-mode-title,
  .qg-question-card.is-extra-compact .qg-question-header .qg-question-mode-title{
    font-size:clamp(1.35rem,6.2vw,1.8rem)!important;
    font-weight:700!important;
    line-height:1.08!important;
  }
  .qg-question-card .qg-question-header .qg-mode-identity-icon,
  .qg-question-card.is-compact .qg-question-header .qg-mode-identity-icon,
  .qg-question-card.is-extra-compact .qg-question-header .qg-mode-identity-icon{
    width:38px!important;
    height:38px!important;
    flex-basis:38px!important;
    transform:none!important;
  }
  .qg-question-card .qg-progress,
  .qg-question-card.is-compact .qg-progress,
  .qg-question-card.is-extra-compact .qg-progress{
    margin-bottom:clamp(42px,7vh,58px)!important;
  }
}

/* 1.8.10: align the knowledge-level screen mode identity with the quiz header. */
.qg-mode-setup-card .qg-selected-mode-banner{
  min-height:96px;
  padding:18px 72px;
}
.qg-mode-setup-card .qg-mode-banner-identity{
  gap:clamp(10px,1.4vw,14px);
}
.qg-mode-setup-card .qg-mode-banner-identity .qg-mode-identity-icon{
  width:calc(var(--qg-current-icon-circle-size,64px) * .8)!important;
  height:calc(var(--qg-current-icon-circle-size,64px) * .8)!important;
  flex-basis:calc(var(--qg-current-icon-circle-size,64px) * .8)!important;
}
.qg-mode-setup-card .qg-mode-banner-identity .qg-mode-identity-icon img{
  width:calc(var(--qg-current-icon-image-size,34px) * .8)!important;
  height:calc(var(--qg-current-icon-image-size,34px) * .8)!important;
}
.qg-mode-setup-card .qg-mode-banner-identity h1{
  font-size:clamp(1.4rem,3.1vw,2.15rem)!important;
  font-weight:700!important;
  line-height:1.08!important;
  letter-spacing:-.02em;
}
@media(max-width:560px){
  .qg-mode-setup-card .qg-selected-mode-banner{
    min-height:78px;
    padding:12px 54px;
  }
  .qg-mode-setup-card .qg-mode-banner-identity{
    gap:10px!important;
  }
  .qg-mode-setup-card .qg-mode-banner-identity .qg-mode-identity-icon{
    width:38px!important;
    height:38px!important;
    flex-basis:38px!important;
    transform:none!important;
  }
  .qg-mode-setup-card .qg-mode-banner-identity h1{
    font-size:clamp(1.35rem,6.2vw,1.8rem)!important;
    font-weight:700!important;
    line-height:1.08!important;
  }
}

/* 1.8.11: tighter mobile quiz spacing while preserving desktop/laptop layouts. */
@media(max-width:560px){
  .qg-question-card{
    padding-top:max(34px,calc(22px + env(safe-area-inset-top)))!important;
  }
  .qg-question-card .qg-progress,
  .qg-question-card.is-compact .qg-progress,
  .qg-question-card.is-extra-compact .qg-progress{
    margin-bottom:clamp(29px,4.9vh,41px)!important;
  }
}


/* v1.8.12: laptop home-grid spacing and installation-help separation. */
.qg-home-tools{
  flex:0 0 auto;
  position:relative;
  z-index:2;
}
.qg-app.qg-profile-laptop .qg-home-grid{
  gap:clamp(14px,1.7vh,22px)!important;
  padding:clamp(16px,1.9vh,24px)!important;
  padding-bottom:clamp(18px,2.2vh,28px)!important;
}
.qg-app.qg-profile-laptop .qg-home-tile,
.qg-app.qg-profile-laptop .qg-achievements-tile{
  height:calc(100% - 2px)!important;
}
.qg-app.qg-profile-laptop .qg-home-tools{
  padding:clamp(10px,1.25vh,16px) 18px clamp(14px,1.7vh,22px);
  border-top:1px solid rgba(112,216,240,.18);
}
.qg-app.qg-profile-laptop .qg-install-help-button{
  max-width:min(100%,520px);
  white-space:normal;
  text-align:center;
  line-height:1.2;
}

/* v1.8.13: prevent laptop home tiles and install-help controls from touching. */
.qg-app.qg-profile-laptop .qg-home-card{
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.qg-app.qg-profile-laptop .qg-home-grid{
  flex:0 0 auto!important;
  height:auto!important;
  min-height:auto!important;
  grid-template-rows:repeat(3,minmax(190px,auto))!important;
  row-gap:18px!important;
  column-gap:18px!important;
  padding:18px 20px 22px!important;
  align-items:stretch!important;
}
.qg-app.qg-profile-laptop .qg-home-tile,
.qg-app.qg-profile-laptop .qg-achievements-tile{
  height:auto!important;
  min-height:190px!important;
  margin:0!important;
}
.qg-app.qg-profile-laptop .qg-home-tools{
  flex:0 0 auto!important;
  margin-top:0!important;
  padding:18px 20px 22px!important;
  border-top:1px solid rgba(112,216,240,.28);
  background:#f8fbff;
}


/* v1.8.14 Sportsmanship reward message */
.qg-sportsmanship-message{
  display:flex;
  align-items:flex-start;
  gap:12px;
  width:min(100%,680px);
  margin:18px auto;
  padding:16px 18px;
  border:1px solid color-mix(in srgb,var(--qg-accent) 38%,#d8e2f0);
  border-radius:18px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--qg-soft) 72%,#fff),#fff);
  color:var(--qg-dark);
  text-align:left;
  box-shadow:0 8px 24px rgba(15,33,77,.06);
}
.qg-sportsmanship-message-icon{
  display:grid;
  place-items:center;
  flex:0 0 36px;
  width:36px;
  height:36px;
  border-radius:50%;
  background:var(--qg-accent);
  color:#fff;
  font-size:1.05rem;
  box-shadow:0 6px 16px color-mix(in srgb,var(--qg-accent) 30%,transparent);
}
.qg-sportsmanship-message p{
  margin:0;
  font-size:clamp(1rem,1.7vw,1.16rem);
  font-weight:700;
  line-height:1.55;
}
.qg-achievements-message{margin:0 auto 22px;}
.qg-results-message{margin-top:14px;margin-bottom:10px;}
@media(max-width:560px){
  .qg-sportsmanship-message{gap:10px;padding:14px 15px;border-radius:16px;}
  .qg-sportsmanship-message-icon{flex-basis:32px;width:32px;height:32px;}
  .qg-sportsmanship-message p{font-size:.98rem;line-height:1.5;}
}


/* v1.8.15 Unified results screen */
.qg-results-card{
  justify-content:flex-start;
  gap:0;
  padding-top:clamp(22px,4vh,42px);
}
.qg-results-card .qg-medal{
  width:82px;
  height:82px;
  margin:0 0 18px;
  font-size:3.3rem;
}
.qg-result-title{
  margin:0 0 12px!important;
  font-size:clamp(1.55rem,3vw,2rem)!important;
  font-weight:650!important;
  line-height:1.25!important;
}
.qg-result-score{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:.32em;
  margin:0 0 10px;
  font-size:clamp(1.35rem,2.6vw,1.75rem);
  font-weight:600!important;
  line-height:1.25;
}
.qg-result-score span{font:inherit;font-weight:inherit!important;}
.qg-result-note{
  margin:0 0 8px;
  font-size:clamp(.95rem,1.7vw,1.05rem);
  font-weight:550;
}
.qg-new-achievement{
  margin:8px 0 12px;
  padding:0;
  border-radius:0;
  background:transparent;
  color:#775400;
  font-size:clamp(1rem,1.9vw,1.15rem);
  font-weight:650;
}
.qg-results-message{margin:4px auto 16px;}
.qg-results-card .qg-result-actions{
  gap:12px;
  margin-top:0;
}
.qg-results-card .qg-result-actions .qg-primary-button,
.qg-results-card .qg-result-actions .qg-secondary-button,
.qg-results-card .qg-result-actions .qg-danger-button{
  min-height:54px;
  padding:12px 14px;
  font-size:1rem;
  font-weight:700;
}
@media(max-width:560px){
  .qg-results-card{padding-top:18px;}
  .qg-results-card .qg-medal{width:72px;height:72px;font-size:3.3rem;margin-bottom:14px;}
  .qg-result-title{font-size:1.45rem!important;margin-bottom:10px!important;}
  .qg-result-score{font-size:1.25rem;margin-bottom:8px;}
  .qg-results-message{margin-bottom:14px;}
  .qg-results-card .qg-result-actions{gap:9px;}
  .qg-results-card .qg-result-actions .qg-primary-button,
  .qg-results-card .qg-result-actions .qg-secondary-button,
  .qg-results-card .qg-result-actions .qg-danger-button{font-size:.9rem;min-height:50px;}
}

/* v1.8.16 Mobile awards screen refinement */
.qg-kotinos-icon svg{width:68%;height:68%;display:block}
.qg-trophy-showcase .qg-kotinos-icon{color:#8a6300}

@media(max-width:560px){
  .qg-achievements-banner{
    min-height:92px!important;
    padding:16px 54px!important;
  }
  .qg-achievements-banner .qg-mode-banner-identity{
    gap:12px!important;
    flex-direction:row!important;
    min-width:0;
  }
  .qg-achievements-header-icon{
    flex:0 0 44px!important;
    width:44px!important;
    height:44px!important;
    aspect-ratio:1/1!important;
    border-radius:50%!important;
    font-size:1.35rem!important;
  }
  .qg-achievements-banner .qg-mode-banner-identity h1{
    margin:0!important;
    font-size:1.65rem!important;
    font-weight:700!important;
    line-height:1.12!important;
    white-space:nowrap;
  }
  .qg-achievements-content{padding:20px 14px 24px!important}
  .qg-achievements-screen .qg-eyebrow{
    margin:4px 0 18px!important;
    font-size:1.15rem!important;
    font-weight:750!important;
  }
  .qg-achievements-message{
    margin:0 auto 22px!important;
    border-width:1.5px;
  }
  .qg-achievements-message p{
    font-size:1.02rem!important;
    font-weight:700!important;
    line-height:1.5!important;
  }
  .qg-medal-podium{
    align-items:stretch!important;
    gap:8px!important;
    margin:0 auto 16px!important;
  }
  .qg-medal-podium .qg-achievement-card,
  .qg-medal-podium .qg-achievement-card.is-gold{
    min-height:118px!important;
    padding:10px 5px!important;
    transform:none!important;
    gap:5px!important;
  }
  .qg-medal-podium .qg-achievement-card>span,
  .qg-medal-podium .qg-achievement-card.is-gold>span{
    width:46px!important;
    height:46px!important;
    font-size:1.45rem!important;
    margin-bottom:2px!important;
  }
  .qg-medal-podium .qg-achievement-card strong{font-size:1.4rem!important}
  .qg-medal-podium .qg-achievement-card small{font-size:.78rem!important}
  .qg-trophy-showcase{
    min-height:108px!important;
    gap:14px!important;
    padding:12px 16px!important;
    margin-bottom:16px!important;
  }
  .qg-trophy-showcase>span{
    width:66px!important;
    height:66px!important;
    font-size:0!important;
  }
  .qg-trophy-showcase strong{font-size:1.75rem!important}
  .qg-trophy-showcase small{font-size:1rem!important;font-weight:750!important}
  .qg-recent-achievement{margin-top:14px!important}
  .qg-reset-awards-button{margin-top:18px!important}
}

@media(max-width:380px){
  .qg-achievements-banner .qg-mode-banner-identity h1{font-size:1.45rem!important}
  .qg-achievements-header-icon{width:40px!important;height:40px!important;flex-basis:40px!important}
}


/* v1.8.17 Mobile achievements header refinement */
@media(max-width:560px){
  .qg-achievements-banner .qg-mode-banner-identity h1{
    font-size:1.32rem!important;
    font-weight:650!important;
    line-height:1.15!important;
    letter-spacing:-.01em;
  }
  .qg-achievements-header-icon{
    width:38px!important;
    height:38px!important;
    flex-basis:38px!important;
    font-size:1.15rem!important;
  }
}
@media(max-width:380px){
  .qg-achievements-banner .qg-mode-banner-identity h1{font-size:1.18rem!important;}
  .qg-achievements-header-icon{width:36px!important;height:36px!important;flex-basis:36px!important;}
}


/* v1.8.20 Achievements Appearance icon unification + calmer desktop heading */
.qg-achievements-appearance-icon img{
  display:block;
  width:68%;
  height:68%;
  max-width:68%;
  max-height:68%;
  object-fit:contain;
  object-position:center;
}
.qg-achievements-header-icon.qg-achievements-appearance-icon img{width:66%;height:66%;max-width:66%;max-height:66%}
.qg-trophy-showcase .qg-achievements-appearance-icon img{width:70%;height:70%;max-width:70%;max-height:70%}
@media(min-width:561px){
  .qg-achievements-banner .qg-mode-banner-identity h1{
    font-size:clamp(2.5rem,3.2vw,2.875rem)!important;
    font-weight:700!important;
    line-height:1.08!important;
    letter-spacing:-.018em;
  }
}
@media(max-width:560px){
  .qg-achievements-banner .qg-mode-banner-identity{max-width:100%;}
  .qg-achievements-banner .qg-mode-banner-identity h1{
    white-space:nowrap!important;
    overflow:visible;
  }
}


/* v1.8.21 Achievements accent-driven icon backgrounds + laptop header refinement */
.qg-achievements-banner{
  --qg-mode-accent:var(--qg-achievements-accent,#eab308)!important;
}
.qg-achievements-header-icon.qg-achievements-appearance-icon,
.qg-trophy-showcase .qg-achievements-appearance-icon{
  box-sizing:border-box!important;
  flex-shrink:0!important;
  aspect-ratio:1/1!important;
  border-radius:50%!important;
  background:var(--qg-achievements-accent,#eab308)!important;
  color:#fff!important;
  overflow:hidden!important;
  box-shadow:0 8px 18px color-mix(in srgb,var(--qg-achievements-accent,#eab308) 30%,transparent)!important;
}
.qg-achievements-header-icon.qg-achievements-appearance-icon{
  flex:0 0 58px!important;
  width:58px!important;
  min-width:58px!important;
  max-width:58px!important;
  height:58px!important;
  min-height:58px!important;
  max-height:58px!important;
}
.qg-trophy-showcase .qg-achievements-appearance-icon{
  flex:0 0 96px!important;
  width:96px!important;
  min-width:96px!important;
  max-width:96px!important;
  height:96px!important;
  min-height:96px!important;
  max-height:96px!important;
}
.qg-achievements-header-icon.qg-achievements-appearance-icon img,
.qg-trophy-showcase .qg-achievements-appearance-icon img{
  display:block!important;
  width:68%!important;
  height:68%!important;
  max-width:68%!important;
  max-height:68%!important;
  object-fit:contain!important;
  object-position:center!important;
}
@media(min-width:561px){
  .qg-achievements-banner .qg-mode-banner-identity h1{
    font-size:clamp(2.15rem,2.8vw,2.5rem)!important;
    font-weight:600!important;
    line-height:1.05!important;
    letter-spacing:-.015em!important;
    white-space:nowrap!important;
  }
}
.qg-app.qg-profile-laptop .qg-achievements-banner .qg-mode-banner-identity{
  gap:14px!important;
  max-width:calc(100% - 110px)!important;
}
.qg-app.qg-profile-laptop .qg-achievements-banner .qg-mode-banner-identity h1{
  font-size:clamp(2rem,2.6vw,2.25rem)!important;
  font-weight:600!important;
  white-space:nowrap!important;
}
@media(max-width:560px){
  .qg-achievements-header-icon.qg-achievements-appearance-icon{
    flex:0 0 38px!important;
    width:38px!important;
    min-width:38px!important;
    max-width:38px!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
  }
  .qg-trophy-showcase .qg-achievements-appearance-icon{
    flex:0 0 66px!important;
    width:66px!important;
    min-width:66px!important;
    max-width:66px!important;
    height:66px!important;
    min-height:66px!important;
    max-height:66px!important;
  }
}
@media(max-width:380px){
  .qg-achievements-header-icon.qg-achievements-appearance-icon{
    flex-basis:36px!important;
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
  }
}
@supports not (color:color-mix(in srgb,black,white)){
  .qg-achievements-header-icon.qg-achievements-appearance-icon,
  .qg-trophy-showcase .qg-achievements-appearance-icon{
    box-shadow:0 8px 18px rgba(15,23,42,.18)!important;
  }
}


/* v1.8.23 Achievements responsive hierarchy and dark-brown support colour */
.qg-achievements-screen{
  --qg-achievements-support:#65451f;
  --qg-achievements-support-soft:#f7f0e6;
  --qg-achievements-support-border:#b99a72;
}
.qg-achievements-message{
  margin:0 auto 0!important;
  border-color:var(--qg-achievements-support-border)!important;
  background:linear-gradient(135deg,var(--qg-achievements-support-soft),#fffdf8)!important;
  box-shadow:0 10px 26px rgba(101,69,31,.10)!important;
}
.qg-achievements-message .qg-sportsmanship-message-icon{
  background:var(--qg-achievements-support)!important;
  color:#fff!important;
  box-shadow:0 6px 16px rgba(101,69,31,.24)!important;
}
.qg-achievements-screen .qg-eyebrow{
  position:relative;
  z-index:2;
  display:block;
  margin:22px 0 34px!important;
  color:var(--qg-achievements-support)!important;
  font-weight:750!important;
}
.qg-achievements-screen .qg-trophy-progress{
  background:var(--qg-achievements-support-soft)!important;
}
.qg-achievements-screen .qg-trophy-progress-head span{
  color:var(--qg-achievements-support)!important;
}
.qg-achievements-screen .qg-trophy-progress-track{
  background:#e7dac9!important;
}
.qg-achievements-screen .qg-trophy-progress-track span{
  background:var(--qg-achievements-support)!important;
}
.qg-achievements-screen .qg-trophy-progress p{
  color:#6d5842!important;
}
.qg-medal-podium{
  align-items:end!important;
}
.qg-medal-podium .qg-achievement-card.is-gold{
  transform:translateY(-12px)!important;
}
.qg-trophy-showcase .qg-kotinos-count{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:.35em!important;
  white-space:nowrap!important;
  min-width:0;
}
.qg-trophy-showcase .qg-kotinos-count strong,
.qg-trophy-showcase .qg-kotinos-count small{
  display:inline!important;
  margin:0!important;
  padding:0!important;
  font-family:inherit!important;
  font-size:1.5rem!important;
  font-weight:650!important;
  line-height:1.1!important;
  color:inherit!important;
  white-space:nowrap!important;
}
.qg-app.qg-profile-laptop .qg-achievements-screen .qg-eyebrow{
  margin-top:24px!important;
  margin-bottom:38px!important;
}
@media(max-width:560px){
  .qg-achievements-message{
    margin-bottom:0!important;
  }
  .qg-achievements-screen .qg-eyebrow{
    margin:24px 0 30px!important;
    color:var(--qg-achievements-support)!important;
  }
  .qg-medal-podium{
    align-items:end!important;
    overflow:visible!important;
  }
  .qg-medal-podium .qg-achievement-card.is-gold{
    min-height:124px!important;
    transform:translateY(-10px)!important;
  }
  .qg-trophy-showcase{
    flex-wrap:nowrap!important;
  }
  .qg-trophy-showcase .qg-kotinos-count{
    flex:0 1 auto!important;
    flex-direction:row!important;
    align-items:center!important;
    gap:.3em!important;
    white-space:nowrap!important;
  }
  .qg-trophy-showcase .qg-kotinos-count strong,
  .qg-trophy-showcase .qg-kotinos-count small{
    font-size:1.2rem!important;
    font-weight:650!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
}
@media(max-width:380px){
  .qg-achievements-screen .qg-eyebrow{
    margin:22px 0 28px!important;
  }
  .qg-medal-podium .qg-achievement-card.is-gold{
    transform:translateY(-8px)!important;
  }
  .qg-trophy-showcase .qg-kotinos-count strong,
  .qg-trophy-showcase .qg-kotinos-count small{
    font-size:1.08rem!important;
  }
}

/* v1.8.24 category icons */
.qg-category-choice-icon{font-size:1.35rem;line-height:1;overflow:hidden}.qg-category-choice.is-unavailable .qg-category-choice-icon{filter:none}.qg-category-choice.is-unavailable{filter:none}.qg-category-choice.is-unavailable .qg-category-choice-text{opacity:.55}


/* v1.8.30: logo splash transition when a game mode is selected. */
.qg-mode-splash{position:fixed;z-index:2147483000;inset:0;display:grid;place-items:center;padding:24px;background:#fff;opacity:0;pointer-events:auto}
.qg-mode-splash[hidden]{display:none!important}
.qg-mode-splash.is-active{animation:qg-mode-logo-splash 2.2s ease-in-out forwards}
.qg-mode-splash img{display:block;width:min(82vw,760px);max-height:72vh;height:auto;object-fit:contain}
@keyframes qg-mode-logo-splash{0%{opacity:0}18%{opacity:1}72%{opacity:1}100%{opacity:0}}
.qg-animations-off .qg-mode-splash.is-active{animation:qg-mode-logo-splash 2.2s ease-in-out forwards!important}
@media(max-width:560px){.qg-mode-splash{padding:18px}.qg-mode-splash img{width:min(92vw,520px)}}
@media(prefers-reduced-motion:reduce){.qg-mode-splash.is-active,.qg-animations-off .qg-mode-splash.is-active{animation:qg-mode-logo-splash-reduced 1.1s linear forwards!important}@keyframes qg-mode-logo-splash-reduced{0%,85%{opacity:1}100%{opacity:0}}}

/* v1.8.33 - Credits: larger kiosk-first logos */
.qg-credits-link-wrap{display:flex;justify-content:center;margin-top:22px}
.qg-credits-link{padding:7px 10px;border:0;background:transparent;color:#667085;font:inherit;font-size:.9rem;font-weight:700;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.qg-credits-link:hover,.qg-credits-link:focus-visible{color:var(--qg-dark)}
.qg-credits-card{padding:0!important;overflow:hidden;background:#fff!important}
.qg-credits-banner{min-height:92px}
.qg-credits-content{max-width:1100px;margin:0 auto;padding:34px 42px 44px;text-align:center}
.qg-credits-content h2{margin:0;font-size:1.9rem;letter-spacing:.04em;color:var(--qg-dark)}
.qg-credits-tagline{margin:7px 0 28px;color:#667085;font-size:1.15rem;font-weight:700}
.qg-credits-logos{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;justify-items:center;gap:42px;margin:2px auto 34px;width:100%}
.qg-credits-logos img{display:block;width:100%;height:auto;object-fit:contain}
.qg-credits-logos img:first-child{max-width:460px;max-height:270px}
.qg-credits-logos img:last-child{max-width:460px;max-height:230px}
.qg-credits-lead{margin:0 auto 30px;max-width:900px;color:#344054;font-size:1.08rem;line-height:1.7}
.qg-credits-roles{display:grid;grid-template-columns:1fr 1fr;gap:18px;text-align:left}
.qg-credits-roles>div{padding:22px;border:1px solid #e4e7ec;border-radius:16px;background:#f9fafb}
.qg-credits-roles strong{display:block;margin-bottom:9px;color:var(--qg-dark);font-size:1.02rem}
.qg-credits-roles p{margin:0;color:#667085;font-size:.98rem;line-height:1.55}
@media(min-width:800px) and (orientation:portrait){
.qg-credits-content{padding:40px 46px 50px}
.qg-credits-logos{gap:34px;margin-bottom:38px}
.qg-credits-logos img:first-child{max-width:470px}
.qg-credits-logos img:last-child{max-width:470px}
.qg-credits-lead{font-size:1.14rem}
}
@media(max-width:700px){
.qg-credits-content{padding:24px 18px 30px}
.qg-credits-content h2{font-size:1.4rem}
.qg-credits-tagline{font-size:1rem;margin-bottom:22px}
.qg-credits-logos{grid-template-columns:1fr;gap:18px;margin-bottom:24px}
.qg-credits-logos img:first-child{max-width:330px;max-height:190px}
.qg-credits-logos img:last-child{max-width:330px;max-height:170px}
.qg-credits-lead{font-size:.94rem;line-height:1.58}
.qg-credits-roles{grid-template-columns:1fr}
.qg-credits-roles>div{padding:16px}
}

/* v1.8.35 - Home header logo: contained, responsive layout */
.qg-home-header-overlay{
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  overflow:hidden;
}
.qg-home-brand{
  display:grid;
  grid-template-columns:minmax(120px,30%) minmax(0,1fr);
  align-items:center;
  width:100%;
  max-width:1180px;
  gap:clamp(18px,3vw,50px);
  margin:0 auto;
}
.qg-home-brand-logo{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  overflow:hidden;
}
.qg-home-brand-logo img{
  display:block;
  width:100%;
  height:auto;
  max-width:330px;
  max-height:150px;
  object-fit:contain;
}
.qg-home-brand-copy{
  min-width:0;
  text-align:center;
}
.qg-home-brand-copy h1{margin:0!important}
.qg-home-brand-copy p{margin-left:0!important;margin-right:0!important}

.qg-app.qg-profile-kiosk .qg-home-brand{
  grid-template-columns:minmax(220px,34%) minmax(0,1fr);
  gap:clamp(28px,3vw,58px);
}
.qg-app.qg-profile-kiosk .qg-home-brand-logo img{
  max-width:400px;
  max-height:190px;
}
.qg-app.qg-profile-laptop .qg-home-brand{
  grid-template-columns:minmax(150px,29%) minmax(0,1fr);
}
.qg-app.qg-profile-laptop .qg-home-brand-logo img{
  max-width:280px;
  max-height:125px;
}
@media(max-width:560px){
  .qg-app .qg-home-header-overlay{padding:10px 12px!important}
  .qg-app .qg-home-brand{
    grid-template-columns:minmax(86px,31%) minmax(0,1fr);
    gap:10px;
  }
  .qg-app .qg-home-brand-logo img{
    max-width:135px;
    max-height:78px;
  }
  .qg-app.qg-profile-mobile .qg-home-brand-copy h1{
    font-size:clamp(1.15rem,6vw,1.85rem)!important;
    line-height:.98!important;
  }
  .qg-app.qg-profile-mobile .qg-home-brand-copy p{
    margin-top:6px!important;
    font-size:clamp(.62rem,2.9vw,.82rem)!important;
    line-height:1.15!important;
  }
}

/* v1.8.36 - transparent Vikelas logo + larger mobile header branding */
.qg-home-brand-logo img{
  object-fit:contain;
}

/* Slightly more presence on kiosk and laptop with the transparent artwork. */
.qg-app.qg-profile-kiosk .qg-home-brand{
  grid-template-columns:minmax(250px,36%) minmax(0,1fr);
}
.qg-app.qg-profile-kiosk .qg-home-brand-logo img{
  max-width:440px;
  max-height:205px;
}
.qg-app.qg-profile-laptop .qg-home-brand{
  grid-template-columns:minmax(180px,31%) minmax(0,1fr);
}
.qg-app.qg-profile-laptop .qg-home-brand-logo img{
  max-width:315px;
  max-height:145px;
}

/* Mobile: larger transparent logo and larger title/subtitle. */
@media(max-width:560px){
  .qg-app .qg-home-header-overlay{
    padding:10px 10px!important;
  }
  .qg-app .qg-home-brand{
    grid-template-columns:minmax(118px,36%) minmax(0,1fr);
    gap:12px;
  }
  .qg-app .qg-home-brand-logo img{
    width:100%;
    max-width:175px;
    max-height:96px;
  }
  .qg-app.qg-profile-mobile .qg-home-brand-copy h1{
    font-size:clamp(1.4rem,7vw,2.15rem)!important;
    line-height:.98!important;
    letter-spacing:.035em!important;
  }
  .qg-app.qg-profile-mobile .qg-home-brand-copy p{
    margin-top:8px!important;
    font-size:clamp(.78rem,3.5vw,1rem)!important;
    line-height:1.15!important;
  }
}

/* v1.8.37 - header branding balance */
.qg-home-brand-copy h1{
  font-size:90%!important;
  font-weight:850!important;
}
.qg-home-brand-logo img{
  width:120%;
  max-width:396px;
  max-height:calc(100% - 20px);
}
.qg-app.qg-profile-kiosk .qg-home-brand-logo img{
  max-width:528px;
  max-height:calc(100% - 24px);
}
.qg-app.qg-profile-laptop .qg-home-brand-logo img{
  max-width:378px;
  max-height:calc(100% - 20px);
}
@media(max-width:560px){
  .qg-app .qg-home-brand-logo img{
    width:120%;
    max-width:210px;
    max-height:calc(100% - 16px);
  }
  .qg-app.qg-profile-mobile .qg-home-brand-copy h1{
    font-size:clamp(1.26rem,6.3vw,1.94rem)!important;
    font-weight:850!important;
  }
}


/* v1.8.38 - laptop-only header scale adjustment */
.qg-app.qg-profile-laptop .qg-home-brand{
  grid-template-columns:minmax(215px,35%) minmax(0,1fr);
}
.qg-app.qg-profile-laptop .qg-home-brand-logo img{
  width:144%;
  max-width:454px;
  max-height:calc(100% - 16px);
}
.qg-app.qg-profile-laptop .qg-home-brand-copy h1{
  font-size:clamp(2.35rem,4.2vw,4rem)!important;
  font-weight:850!important;
  line-height:.96!important;
}


/* v1.8.41 - laptop title balance */
.qg-app.qg-profile-laptop .qg-home-brand-copy h1{
  font-size:clamp(1.9rem,3.25vw,3.1rem)!important;
  font-weight:850!important;
  line-height:1.02!important;
}


/* v1.8.47 - Chromium Greek glyph compatibility */
.qg-app,
.qg-app button,
.qg-app input,
.qg-app select,
.qg-app textarea{font-family:Arial,"Noto Sans","DejaVu Sans","Liberation Sans","Segoe UI",sans-serif;}


/* v1.8.67 - forced Greek-capable webfont for Chromium kiosk */
.qg-app,
.qg-app *,
.qg-app button,
.qg-app input,
.qg-app select,
.qg-app textarea{
  font-family:"Noto Sans",Arial,"DejaVu Sans",sans-serif!important;
}

/* v1.8.67 diagnostic build */
.qg-message{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.78rem;line-height:1.35;text-align:left;max-height:260px;overflow:auto}

/* v1.8.67 - PWA / nonce self repair */
.qg-home-version{display:block;margin-top:7px;color:#98a2b3;font-size:.72rem;text-align:center}.qg-app-version{margin:16px 0;padding:12px 14px;border:1px solid #e4e7ec;border-radius:12px;background:#f9fafb;color:#475467}.qg-refresh-app-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:10px 18px;border:0;border-radius:14px;background:#2563eb;color:#fff;font:inherit;font-weight:800;cursor:pointer}.qg-refresh-app-button:disabled{opacity:.65;cursor:wait}


/* v1.8.67 - Laptop home layout when Application Management is disabled.
   Mobile and kiosk profiles intentionally remain unchanged. */
.qg-app.qg-profile-laptop .qg-home-card.qg-home-no-tools{
  overflow:hidden!important;
}
.qg-app.qg-profile-laptop .qg-home-card.qg-home-no-tools .qg-home-grid{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  grid-template-rows:repeat(3,minmax(0,1fr))!important;
  row-gap:18px!important;
  column-gap:18px!important;
  padding:18px 20px 22px!important;
}
.qg-app.qg-profile-laptop .qg-home-card.qg-home-no-tools .qg-home-tile,
.qg-app.qg-profile-laptop .qg-home-card.qg-home-no-tools .qg-achievements-tile{
  height:100%!important;
  min-height:0!important;
}


/* v1.8.67 - strict laptop viewport fit when Application Management is disabled. */
html.qg-home-active.qg-viewport-laptop,
body.qg-home-active.qg-viewport-laptop{
  overflow:hidden!important;
}
.qg-app.qg-profile-laptop.qg-app-no-tools{
  height:var(--qg-available-height)!important;
  min-height:0!important;
  max-height:var(--qg-available-height)!important;
}
.qg-app.qg-profile-laptop.qg-app-no-tools .qg-screen[data-qg-screen="mode"]{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
.qg-app.qg-profile-laptop.qg-app-no-tools .qg-home-card{
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  overflow:hidden!important;
}
.qg-app.qg-profile-laptop.qg-app-no-tools .qg-home-grid{
  flex:1 1 0!important;
  min-height:0!important;
  height:0!important;
  overflow:hidden!important;
  grid-template-rows:repeat(3,minmax(0,1fr))!important;
}
.qg-app.qg-profile-laptop.qg-app-no-tools .qg-home-tile,
.qg-app.qg-profile-laptop.qg-app-no-tools .qg-achievements-tile{
  min-height:0!important;
  height:100%!important;
}


/* v1.8.67 - Kiosk Screensaver */
.qg-screensaver{
	position:fixed;
	inset:0;
	z-index:2147483000;
	overflow:hidden;
	background:#eef6fb;
	cursor:pointer;
	touch-action:manipulation;
	opacity:0;
	visibility:hidden;
	transition:opacity .65s ease,visibility .65s ease;
}
.qg-screensaver.is-visible{
	opacity:1;
	visibility:visible;
}
.qg-screensaver[hidden]{display:none!important}
.qg-screensaver-slide{
	position:absolute;
	inset:0;
	display:block;
	width:100%;
	height:100%;
	object-fit:cover;
	object-position:center center;
	opacity:0;
	transform:scale(1.005);
	transition:opacity .9s ease-in-out;
	user-select:none;
	-webkit-user-select:none;
	pointer-events:none;
}
.qg-screensaver-slide.is-active{opacity:1}
@media (prefers-reduced-motion:reduce){
	.qg-screensaver,.qg-screensaver-slide{transition-duration:.15s!important}
}

/* v1.8.67 - Screensaver Responsive Fit */
@media (orientation:landscape){
  .qg-screensaver-slide{
    object-fit:contain;
    transform:none;
  }
}
@media (orientation:portrait){
  .qg-screensaver-slide{
    object-fit:cover;
  }
}


/* v1.8.75: slightly smaller adaptive mobile question typography. */
@media(max-width:767px){
  .qg-question-card{
    --qg-mobile-question-font:24px;
    --qg-mobile-answer-font:16px;
  }
  .qg-question-card .qg-question-text,
  .qg-question-card.is-compact .qg-question-text,
  .qg-question-card.is-extra-compact .qg-question-text{
    font-size:var(--qg-mobile-question-font)!important;
    font-weight:500!important;
    line-height:1.34!important;
    overflow-wrap:anywhere;
  }
  .qg-question-card .qg-answers,
  .qg-question-card.is-compact .qg-answers,
  .qg-question-card.is-extra-compact .qg-answers{
    flex:0 0 auto;
    grid-auto-rows:auto;
    min-height:0;
  }
  .qg-question-card .qg-answer,
  .qg-question-card.is-compact .qg-answer,
  .qg-question-card.is-extra-compact .qg-answer{
    height:auto!important;
    min-height:0!important;
    font-size:var(--qg-mobile-answer-font)!important;
    font-weight:650!important;
    line-height:1.20!important;
    white-space:normal!important;
    overflow:visible!important;
  }
  .qg-question-card .qg-answer>span:last-child{
    min-width:0;
    overflow-wrap:anywhere;
    word-break:normal;
    white-space:normal;
  }
  .qg-question-card.qg-needs-scroll{
    height:auto!important;
    min-height:var(--qg-available-height,100dvh)!important;
    overflow:visible!important;
  }
  .qg-screen[data-qg-screen="quiz"]:has(.qg-question-card.qg-needs-scroll){
    height:auto!important;
    min-height:var(--qg-available-height,100dvh)!important;
    overflow:visible!important;
  }
}
