/* Reading app - reading-only styles; generic ones live in /shared/learn.css */
.r1 { background: #ff6b6b; } .r2 { background: #4dabf7; } .r3 { background: #9775fa; } .r4 { background: #51cf66; }

/* long text choices (story questions, word meanings) */
.choices.long { grid-template-columns: 1fr; }
.choices.long .choice { font-size: 1.2rem; min-height: 60px; padding: 10px 14px; line-height: 1.25; }

/* story list */
.story-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.story-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 112px; padding: 10px 8px; border: 3px solid #ffe066; border-radius: 20px; background: #fff9db;
  font: inherit; color: var(--ink); cursor: pointer; touch-action: manipulation; box-shadow: 0 4px 0 rgba(0,0,0,.08);
}
.story-btn:active { transform: translateY(2px); }
.story-btn .emoji { font-size: 2.2rem; line-height: 1; }
.st-title { font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.st-stars { font-size: .9rem; color: #868e96; }

/* reader */
.reader { text-align: left; }
.reader h2 { text-align: center; }
.btn-back { background: #868e96; min-height: 48px; font-size: 1rem; align-self: flex-start; padding: 8px 16px; }
.story-emoji { font-size: 4rem; text-align: center; line-height: 1; }
.tip { margin: 0; text-align: center; font-size: .95rem; color: #868e96; }
.story-text { font-size: 1.45rem; line-height: 1.85; letter-spacing: .01em; }
.story-text p { margin: 0 0 .8em; }
.sent { border-radius: 8px; transition: background .2s; padding: 2px 0; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sent.hl { background: #fff3bf; box-shadow: 0 0 0 4px #fff3bf; }
.w { cursor: pointer; border-radius: 6px; }
.w.tapped { background: #a5d8ff; }

/* quiz question */
.problem.rq { font-size: 1.45rem; white-space: normal; text-align: left; line-height: 1.35; }
.rq-q { margin: 0 0 8px; }
.lookback { font-size: 1.05rem; font-weight: 400; line-height: 1.6; background: #f8f9fa; border-radius: 12px; padding: 4px 12px; }
.lookback summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; color: #1971c2; cursor: pointer; }
.lookback p { margin: 0 0 .6em; }
.evidence { background: #e7f5ff; border-radius: 14px; padding: 10px 14px; text-align: left; }
.ev-label { margin: 0; font-weight: 700; color: #1971c2; }
.ev-quote { margin: 4px 0 0; font-size: 1.2rem; font-style: italic; }

/* word builder */
.problem.wb { font-size: clamp(2.4rem, 12vw, 3.6rem); white-space: normal; }
.problem.wb .snd { display: inline-block; padding: 0 12px; background: #e7f5ff; border-radius: 14px; color: #1971c2; }
.problem.wb .fam { color: #e8590c; }
.problem.wb .aff { color: #e8590c; text-decoration: underline; text-decoration-thickness: 4px; }
.fam-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.fam-w { padding: 6px 12px; background: #f1f3f5; border-radius: 999px; font-size: 1.2rem; font-weight: 700; }
.fam-w.hl { background: #fff3bf; color: #e8590c; }
.pt-sub { margin: 8px 0 0; font-weight: 700; }

/* sentence prompts (vocabulary, grammar) */
.problem.gs { font-size: clamp(1.4rem, 6.5vw, 1.9rem); white-space: normal; line-height: 1.35; }
.problem.gs .key-w { color: #e8590c; text-decoration: underline; text-decoration-thickness: 3px; }
.pos { padding: 0 8px; border-radius: 10px; color: #fff; }
.pos-n { background: #4dabf7; } .pos-v { background: #ff6b6b; } .pos-a { background: #9775fa; }
.problem.abc-hint { font-size: 1.4rem; color: #868e96; letter-spacing: .1em; }
.problem.gs .blank.mark { min-width: .8em; }

/* Homophones */
.r5 { background: #f59f00; grid-column: 1 / -1; }
.hp-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp-mod { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 76px; padding: 8px; background: #4dabf7; }
.hp-mod.prio { grid-column: 1 / -1; background: #f76707; min-height: 92px; border: 4px solid #ffd43b; }
.hp-mod.mix { grid-column: 1 / -1; background: #9775fa; }
.hp-name { font-size: 1.2rem; font-weight: 800; line-height: 1.2; }
.hp-mod.prio .hp-name { font-size: 1.5rem; }
.hp-mod .st-stars { color: #fff; opacity: .9; }
.hp-badge { background: #ffd43b; color: #5c3d00; font-size: .85rem; font-weight: 800; border-radius: 999px; padding: 2px 10px; }
.problem.hp .hp-blank { display: inline-block; min-width: 3.2em; border-bottom: 4px solid #495057; margin: 0 .1em; }
.hp-tips { display: grid; gap: 8px; text-align: left; }
.hp-tip { background: #f1f3f5; border-radius: 14px; padding: 8px 12px; font-size: 1rem; line-height: 1.35; }
.hp-tip.main { background: #fff3bf; font-size: 1.15rem; border: 3px solid #fab005; }
.hp-w { font-weight: 800; margin-right: 6px; color: #e8590c; }
.problem.hp ~ div .choices { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }
.problem.hp ~ div .choice { font-size: clamp(1.4rem, 6.4vw, 1.9rem); padding: 8px 4px; }

/* Open & Closed Syllables */
.r6 { background: #20c997; grid-column: 1 / -1; }
.btn-learn { background: #ff6b6b; font-size: 1.3rem; min-height: 64px; }
.problem.syl { font-size: clamp(2.8rem, 15vw, 4.2rem); font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.syl-a { background: #ffe066; border-radius: 12px; padding: 0 8px; color: #c92a2a; }
.syl-dot { color: #adb5bd; margin: 0 .18em; }
.syl-face { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 1.6rem; font-weight: 800; }
.syl-ico { font-size: 2.6rem; line-height: 1.1; }
.syl-why { font-size: 1.2rem; }
/* -tion Words */
.r7 { background: #e8590c; grid-column: 1 / -1; }
.r8 { background: #7048e8; grid-column: 1 / -1; }
.problem.tion { font-size: clamp(2.2rem, 11vw, 3.4rem); font-weight: 800; }
.tion-word { white-space: nowrap; }
.tion-end { color: #e8590c; background: #fff0e0; border-radius: 10px; padding: 0 6px; }
.tion-gap { display: inline-block; min-width: 1.6em; border-bottom: 5px dashed #adb5bd; color: #adb5bd; text-align: center; }
.tion-ear { font-size: 3.4rem; }
.tion-sent { white-space: normal; overflow-wrap: break-word; font-size: 1.45rem; font-weight: 600; line-height: 1.5; margin: 0; }
.tion-blank { color: #adb5bd; letter-spacing: .05em; }
.tion-show { font-size: 2rem; font-weight: 800; }
.tion-toggle { display: block; margin: 10px 0; font-size: 1rem; }
.tion-toggle input { width: 22px; height: 22px; vertical-align: middle; }
.problem.tion ~ div .choices { grid-template-columns: 1fr; gap: 10px; }
.problem.tion ~ div .choice { min-height: 58px; font-size: clamp(1.4rem, 7vw, 1.8rem); min-width: 0; overflow-wrap: anywhere; }
.tion-note { font-size: 1.1rem; font-weight: 700; color: #e8590c; margin: 6px 0 0; white-space: normal; }
