* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: #f7f5ee; }
.app-context { max-width: 1080px; margin: 0 auto; padding: 8px 20px; color: #6f6258; font-size: .88rem; }
.app-shell { width: min(1080px, calc(100% - 32px)); margin: 24px auto; }
.panel { max-width: 780px; margin: 0 auto; padding: clamp(24px, 4vw, 48px); border-radius: 24px; background: #fff; box-shadow: var(--linest-shadow); }
h1 { margin: 6px 0 20px; font-family: var(--linest-heading-font); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.4; }
.eyebrow { margin: 0; color: #257836; font-weight: 700; }
body.linest-themed button, body.linest-themed input { font: inherit; }
body.linest-themed button { min-height: 56px; border: 2px solid #d6cdbe; border-radius: 14px; padding: 12px 22px; background: #fff; color: #3e2f23; font-weight: 700; cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible + span { outline: 4px solid #d97c4b; outline-offset: 3px; }
button:disabled { cursor: default; }
body.linest-themed .primary { background: #257836; border-color: #257836; color: #fff; font-size: 1.3rem; }
fieldset { margin: 24px 0; padding: 0; border: 0; }
legend { margin-bottom: 10px; font-weight: 700; font-size: 1.15rem; }
.settings-options { display: flex; flex-wrap: wrap; gap: 10px; }
.settings-options label { flex: 1; min-width: 100px; position: relative; cursor: pointer; }
.settings-options input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.settings-options span { display: block; padding: 14px 12px; border: 2px solid #ddd5c8; border-radius: 14px; text-align: center; font-weight: 700; }
.settings-options input:checked + span { border-color: #257836; background: #edf6e9; color: #1d5e2a; box-shadow: inset 0 0 0 1px #257836; }
#start { width: 100%; margin-top: 10px; }
.helper { margin-top: 24px; font-size: .85rem; color: #6f6258; }
.level-description { margin: 10px 0 0; font-size: .9rem; color: #6f6258; }
.game-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
#progress { margin: 0; font-size: 1.2rem; font-weight: 700; }
body.linest-themed .quiet { min-height: 48px; padding: 8px 18px; font-size: .95rem; }
.picture-panel { position: relative; display: grid; place-items: center; height: clamp(220px, 37vh, 430px); background: #fff; border: 1px solid #e7dfd1; border-radius: 20px; padding: 8px; overflow: hidden; }
#scene-image { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
#scene-image.loading { visibility: hidden; }
#image-status { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: #fff; padding: 20px; text-align: center; }
.instruction { margin: 16px 0 12px; font-size: 1.2rem; }
#answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
body.linest-themed .answer { min-height: 76px; padding: 14px 18px; text-align: left; font-size: clamp(1.1rem, 2.4vw, 1.5rem); line-height: 1.6; background: #fff; overflow-wrap: anywhere; }
body.linest-themed .answer:not(:disabled):hover { border-color: #257836; background: #f1f7ed; }
body.linest-themed .answer:disabled { opacity: 1; color: #6f6258; background: #f7f5f0; }
body.linest-themed .answer.correct { border-color: #257836; background: #e9f6e5; color: #1d5e2a; }
body.linest-themed .answer.incorrect { border-color: #9c5230; background: #fff0e7; color: #7e4227; }
.feedback { margin-top: 16px; padding: 16px 20px; background: #fff; border-left: 6px solid #257836; border-radius: 10px; font-size: 1.18rem; }
.feedback strong { display: block; margin-bottom: 4px; }
#next { display: block; width: min(420px, 100%); margin: 14px auto 0; }
.result-count { font-size: 2rem; font-weight: 700; margin: 24px 0 0; }
.result-rate { font-size: 3rem; color: #257836; font-weight: 700; margin: 0; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.result-actions button { flex: 1; }
footer:not(.linest-app-footer) { margin: 28px 16px 18px; text-align: center; color: #6f6258; font-size: .75rem; }
#leave-dialog { width: min(540px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; padding: clamp(24px, 4vw, 36px); border: 2px solid #e7dfd1; border-radius: 22px; color: #3e2f23; background: #fff; box-shadow: var(--linest-shadow); }
#leave-dialog::backdrop { background: rgba(45, 34, 25, .58); }
#leave-dialog h2 { margin: 0 0 12px; font-size: 1.5rem; }
.dialog-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.dialog-actions button { width: 100%; }
body[data-mode="adult"] #title { font-size: clamp(1.9rem, 4vw, 2.8rem); }
@media (max-width: 600px) { .app-shell { width: calc(100% - 24px); margin-top: 14px; } #answers { grid-template-columns: 1fr; gap: 10px; } body.linest-themed .answer { min-height: 66px; font-size: 1.14rem; } .picture-panel { height: 31vh; min-height: 210px; } }
@media (min-width: 601px) and (orientation: landscape) and (max-height: 850px) { .app-shell { margin-top: 12px; } .picture-panel { height: 33vh; min-height: 210px; } body.linest-themed .answer { min-height: 68px; padding: 10px 16px; font-size: 1.2rem; } .instruction { margin-top: 10px; } }
