/* Visible progress (pack 2): level, "My shelf", badges, cover progress, "5 words of the day". Home palette, Journey chrome. */
.koa-xp-star{display:block;width:20px;height:20px;flex:none}
.koa-medal{display:block;width:54px;height:auto}
.koa-medal.is-small{width:26px}
.koa-level-bar{display:block;height:10px;border:2px solid #3d3054;border-radius:999px;background:#eee5f5;overflow:hidden}
.koa-level-bar>span{display:block;height:100%;background:#ffd166}

/* Inside the streak card of the header */
.koa-panel-level{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:8px;margin:14px 0 10px;padding-top:12px;border-top:1px solid #e2d6c6;color:#3d3054;font-size:.9rem}
.koa-panel-shelf{width:100%;min-height:42px;border:2px solid #3d3054;border-radius:14px;background:#efe6f7;box-shadow:0 3px 0 #3d3054;color:#3d3054;font:900 .92rem "Segoe UI",Arial,sans-serif;cursor:pointer}
.koa-panel-shelf:active{transform:translateY(2px);box-shadow:0 1px 0 #3d3054}

/* "My shelf": full screen like the setup and the end test */
.koa-shelf{position:fixed;inset:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;background:#faf5ea;color:#29202b;font-family:"Segoe UI",Inter,Arial,sans-serif;overflow:hidden}
.koa-shelf[open]{display:flex;flex-direction:column;align-items:center}
.koa-shelf::backdrop{background:#faf5ea}
.koa-shelf:focus,.koa-shelf :focus:not(:focus-visible){outline:none}
.koa-shelf-head{display:grid;grid-template-columns:42px 1fr 42px;align-items:center;gap:8px;width:100%;max-width:560px;padding:14px 16px 4px}
.koa-shelf .koa-shelf-close{display:grid;place-items:center;width:42px;height:42px;padding:0;border:0;background:transparent;color:#3d3054;font:900 36px/1 "Arial Black",Arial,sans-serif;text-shadow:1px 1px 0 #c8afea;cursor:pointer}
.koa-shelf-title{margin:0;text-align:center;font:700 1.6rem/1.2 Georgia,serif}
.koa-shelf-body{flex:1;width:100%;max-width:560px;overflow-y:auto;padding:12px 18px calc(28px + env(safe-area-inset-bottom))}
.koa-level{padding:16px 18px;border:2px solid #3d3054;border-radius:18px;background:#fffdf9;box-shadow:0 4px 0 #3d3054}
.koa-level-top{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.koa-level-top .koa-xp-star{width:28px;height:28px}
.koa-level-top strong{font:700 1.5rem/1 Georgia,serif}
.koa-level-top span{margin-left:auto;color:#6f6170;font-weight:800}
.koa-level p{margin:8px 0 0;color:#6f6170;font-size:.88rem}
.koa-shelf-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0 22px}
.koa-shelf-stat{display:grid;gap:2px;padding:12px 6px;border:2px solid #3d3054;border-radius:16px;background:#fffdf9;box-shadow:0 4px 0 #3d3054;text-align:center}
.koa-shelf-stat b{display:flex;align-items:center;justify-content:center;gap:5px;font:900 1.6rem/1 "Segoe UI",Arial,sans-serif;color:#3d3054}
.koa-shelf-stat b .koa-flame{width:17px}
.koa-shelf-stat span{color:#6f6170;font-size:.76rem;font-weight:700}
.koa-badges-title{margin:0 0 12px;font:700 1.25rem/1.2 Georgia,serif}
.koa-badges{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 10px;margin:0;padding:0;list-style:none}
.koa-badges li{display:grid;justify-items:center;gap:4px;text-align:center}
.koa-badges li strong{font-size:.86rem;line-height:1.2;color:#29202b}
.koa-badges li span{font-size:.74rem;line-height:1.3;color:#6f6170}
.koa-badges li.is-locked strong{color:#8a7f8c}
.koa-badges li.is-locked .koa-medal{opacity:.85}

/* Covers on the home page: progress bar, or "Read" with the test stars */
.koa-cover-bar{position:absolute;left:8px;right:8px;bottom:8px;z-index:2;height:7px;border-radius:999px;background:#fffdf9d9;box-shadow:0 0 0 1px #29202b26;overflow:hidden}
.koa-cover-bar span{display:block;height:100%;border-radius:999px;background:#9f7bd0}
.koa-cover-done{position:absolute;left:8px;bottom:8px;z-index:2;display:inline-flex;align-items:center;gap:5px;padding:4px 9px 4px 5px;border:1.5px solid #3d3054;border-radius:999px;background:#fffdf9;color:#3d3054;font:900 .74rem "Segoe UI",Arial,sans-serif;box-shadow:0 2px 0 #3d3054}
.koa-cover-done b{display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#7bc96f;color:#fff;font-size:.7rem}
.koa-cover-done i{font-style:normal;color:#e0a100;letter-spacing:-.05em}

/* In the picks, the big 1-2-3 sits on the left of the cover: the tags go to the right. */
.pick .koa-cover-done{left:auto;right:8px}
.pick .koa-cover-bar{left:auto;width:58%}

/* "Your 5 words of the day" card on the home page */
.koa-words-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:14px;width:100%;margin-top:14px;padding:12px 14px;border:2px solid #3d3054;border-radius:18px;background:#efe6f7;box-shadow:0 4px 0 #3d3054;color:#29202b;font-family:"Segoe UI",Inter,Arial,sans-serif;text-align:left;cursor:pointer}
.koa-words-card:active{transform:translateY(3px);box-shadow:0 1px 0 #3d3054}
.koa-words-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#fffdf9;border:2px solid #3d3054}
.koa-words-icon svg{width:26px;height:26px}
.koa-words-text{display:grid;gap:2px}
.koa-words-text strong{font:700 1.1rem/1.2 Georgia,serif}
.koa-words-text span{color:#4b3a5c;font-size:.86rem;line-height:1.35}
.koa-words-go{display:inline-flex;align-items:center;min-height:40px;padding:0 16px;border:2px solid #3d3054;border-radius:14px;background:linear-gradient(180deg,#cdb4ec,#b48fe0);box-shadow:0 3px 0 #3d3054;font-weight:900;font-size:.92rem;color:#21162e}
@media(max-width:520px){.koa-words-card{grid-template-columns:44px minmax(0,1fr)}.koa-words-icon{width:44px;height:44px}.koa-words-go{grid-column:1 / -1;justify-content:center}}

/* The review itself: Journey cross, bar and count, the word in the middle */
.koa-review{position:fixed;inset:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;background:#faf5ea;color:#29202b;font-family:"Segoe UI",Inter,Arial,sans-serif;overflow:hidden}
.koa-review[open]{display:flex;flex-direction:column;align-items:center}
.koa-review::backdrop{background:#faf5ea}
.koa-review:focus,.koa-review :focus:not(:focus-visible){outline:none}
.koa-review-head{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:12px;width:100%;max-width:560px;padding:14px 16px 6px}
.koa-review .koa-review-close{display:grid;place-items:center;width:42px;height:42px;padding:0;border:0;background:transparent;color:#3d3054;font:900 36px/1 "Arial Black",Arial,sans-serif;text-shadow:1px 1px 0 #c8afea;cursor:pointer}
.koa-review-bar{height:10px;border:2px solid #3d3054;border-radius:999px;background:#eee5f5;box-shadow:0 2px 0 #3d3054;overflow:hidden}
.koa-review-bar span{display:block;height:100%;background:#c39ae6;transition:width .35s ease}
.koa-review-count{font:800 .95rem "Segoe UI",Arial,sans-serif;color:#3d3054;white-space:nowrap}
.koa-review-body{flex:1;display:flex;flex-direction:column;align-items:center;width:100%;max-width:560px;overflow-y:auto;padding:18px 20px}
.koa-review .koa-review-word{margin:10px 0 4px;padding:6px 14px;border:0;border-radius:14px;background:none;color:#29202b;font:500 3rem/1.3 "Noto Sans Thai Looped","Noto Sans Thai",Tahoma,sans-serif;cursor:pointer}
.koa-review .koa-review-word.is-roman{font:800 2.4rem/1.3 Andika,"Segoe UI",Arial,sans-serif}
.koa-review-sub{margin:0 0 18px;color:#6f6170;font-size:1.05rem}
.koa-review-question{margin:0 0 14px;font-weight:800;color:#3d3054}
.koa-review-choices{display:grid;gap:12px;width:100%}
.koa-review .koa-review-choice{min-height:54px;padding:10px 14px;border:2px solid #3d3054;border-radius:16px;background:#fffdf9;box-shadow:0 4px 0 #3d3054;color:#29202b;font:800 1.05rem "Segoe UI",Arial,sans-serif;cursor:pointer}
.koa-review .koa-review-choice:active{transform:translateY(3px);box-shadow:0 1px 0 #3d3054}
.koa-review .koa-review-choice.is-good{background:#dff3d8;border-color:#2d6b3f;box-shadow:0 4px 0 #2d6b3f;color:#1f4d2c}
.koa-review .koa-review-choice.is-bad{background:#ffe1e6;border-color:#b5465d;box-shadow:0 4px 0 #b5465d;color:#8a2e43}
.koa-review .koa-review-choice:disabled{cursor:default}
.koa-review-foot{display:grid;gap:10px;width:100%;max-width:560px;padding:12px 20px calc(18px + env(safe-area-inset-bottom))}
.koa-review-feedback{margin:0;min-height:1.4em;text-align:center;font-weight:800}
.koa-review-feedback.is-good{color:#2d6b3f}.koa-review-feedback.is-bad{color:#8a2e43}
.koa-review .koa-review-next{min-height:56px;border:2px solid #3d3054;border-radius:18px;background:linear-gradient(180deg,#cdb4ec,#b48fe0);box-shadow:0 5px 0 #3d3054;color:#21162e;font:900 1.05rem "Segoe UI",Arial,sans-serif;cursor:pointer}
.koa-review-body.is-done{justify-content:center;text-align:center}
.koa-review-done .koa-xp-star{width:84px;height:84px;margin:0 auto 6px}
.koa-review-title{margin:0;font:700 1.8rem/1.2 Georgia,serif}
.koa-review-score{margin:6px 0 0;color:#6f6170;font-size:1.05rem}
.koa-review-xp{margin:10px 0 0;font:900 1.3rem "Segoe UI",Arial,sans-serif;color:#b07a00}

/* XP line in the end celebration and on the test result */
.koa-done-xp,.koa-quiz-xp{display:inline-flex;align-items:center;gap:8px;margin:0 0 6px;padding:6px 14px;border-radius:999px;background:#fff4d1;color:#7a5600;font-size:.95rem}
.koa-done-xp b,.koa-quiz-xp b{font-weight:900}
.koa-quiz-xp{margin-top:12px}
@media(prefers-reduced-motion:reduce){.koa-review-bar span{transition:none}}

/* ---------- Pack 3: "My week" (league, challenges, freezes), share button, home strip ---------- */
.koa-ice{display:block;width:16px;height:16px}
.koa-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:0 0 18px;padding:5px;border:2px solid #3d3054;border-radius:16px;background:#fffdf9}
.koa-shelf .koa-tab{min-height:42px;border:0;border-radius:11px;background:none;color:#6f6170;font:900 .95rem "Segoe UI",Arial,sans-serif;cursor:pointer}
.koa-shelf .koa-tab[aria-selected="true"]{background:#efe6f7;color:#3d3054;box-shadow:inset 0 0 0 2px #bda1e2}
.koa-section-title{margin:0 0 4px;font:700 1.25rem/1.2 Georgia,serif}
.koa-section-sub{margin:0 0 12px;color:#6f6170;font-size:.88rem;line-height:1.45}
.koa-league,.koa-challenges,.koa-freezes{margin-bottom:24px}
.koa-league-box{padding:14px;border:2px solid #3d3054;border-radius:18px;background:#fffdf9;box-shadow:0 4px 0 #3d3054}
.koa-league-intro{margin:0 0 12px;color:#4b3a5c;line-height:1.45}
.koa-pseudo-label{display:block;color:#76518e;font-size:.74rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase}
.koa-pseudo{display:block;margin:2px 0 10px;font:700 1.5rem/1.2 Georgia,serif;color:#29202b}
.koa-shelf .koa-pseudo-dice{min-height:38px;margin-bottom:12px;padding:0 14px;border:2px solid #3d3054;border-radius:12px;background:#efe6f7;color:#3d3054;font:800 .88rem "Segoe UI",Arial,sans-serif;cursor:pointer}
.koa-shelf .koa-join{display:block;width:100%;min-height:52px;border:2px solid #3d3054;border-radius:16px;background:linear-gradient(180deg,#cdb4ec,#b48fe0);box-shadow:0 4px 0 #3d3054;color:#21162e;font:900 1rem "Segoe UI",Arial,sans-serif;cursor:pointer}
.koa-shelf .koa-join:active{transform:translateY(3px);box-shadow:0 1px 0 #3d3054}
.koa-league-note{margin:10px 0 0;color:#6f6170;font-size:.8rem;line-height:1.4}
.koa-ranking{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.koa-ranking li{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:44px;padding:4px 10px;border-radius:12px}
.koa-ranking li.is-me{background:#efe6f7;box-shadow:inset 0 0 0 2px #bda1e2}
.koa-ranking li.is-far{margin-top:8px}
.koa-rank{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#f3eef5;color:#3d3054;font-weight:900;font-size:.88rem}
.koa-ranking li.is-top1 .koa-rank{background:#ffd166;box-shadow:0 0 0 2px #3d3054}
.koa-ranking li.is-top2 .koa-rank{background:#dfe3ea;box-shadow:0 0 0 2px #3d3054}
.koa-ranking li.is-top3 .koa-rank{background:#f0b88a;box-shadow:0 0 0 2px #3d3054}
.koa-player{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
.koa-ranking b{color:#3d3054}
.koa-challenge{display:grid;gap:8px;margin-bottom:10px;padding:12px 14px;border:2px solid #3d3054;border-radius:16px;background:#fffdf9;box-shadow:0 3px 0 #3d3054}
.koa-challenge.is-done{background:#eef8ea}
.koa-challenge-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.koa-challenge-top strong{font-size:.98rem}
.koa-challenge-count{color:#3d3054;font-weight:900;white-space:nowrap}
.koa-challenge.is-done .koa-challenge-count{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#7bc96f;color:#fff}
.koa-challenge-bar{display:block;height:10px;border:2px solid #3d3054;border-radius:999px;background:#eee5f5;overflow:hidden}
.koa-challenge-bar span{display:block;height:100%;background:#c39ae6}
.koa-challenge.is-done .koa-challenge-bar span{background:#7bc96f}
.koa-challenge-reward{display:flex;align-items:center;gap:5px;color:#7a5600;font-size:.8rem;font-weight:800}
.koa-challenge-reward .koa-xp-star{width:16px;height:16px}
.koa-ice-inline{display:inline-grid;color:#3a86c8}
.koa-ice-inline .koa-ice{width:14px;height:14px}
.koa-freeze-icons{display:flex;gap:10px;margin:8px 0}
.koa-freeze-icons>span{display:grid;place-items:center;width:44px;height:44px;border:2px solid #3d3054;border-radius:12px;background:#f1eef3;color:#c9bfce}
.koa-freeze-icons>span.is-on{background:#dcefff;color:#3a86c8;box-shadow:0 3px 0 #3d3054}
.koa-freeze-icons .koa-ice{width:24px;height:24px}

/* Share button (end celebration and test result) */
.koa-share{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 18px;border:2px solid #3d3054;border-radius:14px;background:#fffdf9;box-shadow:0 3px 0 #3d3054;color:#3d3054;font:900 .95rem "Segoe UI",Arial,sans-serif;cursor:pointer}
.koa-share svg{width:20px;height:20px}
.koa-share:active{transform:translateY(2px);box-shadow:0 1px 0 #3d3054}
.quiz-done .koa-share{margin-top:12px}

/* Home: "My week" strip */
.koa-week-strip{display:grid;grid-template-columns:28px minmax(0,1fr) auto auto;align-items:center;gap:12px;width:100%;margin-top:12px;padding:10px 14px;border:2px solid #3d3054;border-radius:16px;background:#fffdf9;box-shadow:0 3px 0 #3d3054;color:#29202b;font-family:"Segoe UI",Inter,Arial,sans-serif;text-align:left;cursor:pointer}
.koa-week-strip:active{transform:translateY(2px);box-shadow:0 1px 0 #3d3054}
.koa-week-strip .koa-xp-star{width:26px;height:26px}
.koa-week-strip-text{display:grid;gap:1px;min-width:0}
.koa-week-strip-text strong{font:700 1.05rem/1.2 Georgia,serif}
.koa-week-strip-text span{color:#6f6170;font-size:.82rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.koa-week-strip-ice{display:inline-flex;align-items:center;gap:3px;padding:4px 8px;border-radius:999px;background:#dcefff;color:#2a6aa3;font-weight:900;font-size:.85rem}
.koa-week-strip-ice .koa-ice{width:14px;height:14px}
.koa-week-strip-go{font-size:1.6rem;line-height:1;color:#76518e}

/* ---------- Leagues of the Journey as the reader's rank (Bronze -> Master) ---------- */
.koa-tier{margin-bottom:18px;padding:16px;border:2px solid #3d3054;border-radius:20px;background:#fffdf9;box-shadow:0 4px 0 #3d3054}
.koa-tier-top{display:flex;align-items:center;gap:14px;margin-bottom:12px}
.koa-tier-hero{width:88px;height:88px;flex:none;filter:drop-shadow(0 6px 10px #29202b33)}
.koa-tier-text{display:grid;gap:2px;min-width:0}
.koa-tier-kicker{color:#76518e;font-size:.72rem;font-weight:900;letter-spacing:.07em;text-transform:uppercase}
.koa-tier-text strong{font:700 1.6rem/1.1 Georgia,serif;color:#29202b}
.koa-tier-text>span:last-child{color:#6f6170;font-weight:700;font-size:.9rem}
.koa-tier-next{display:flex;align-items:center;gap:8px;margin:8px 0 14px;color:#4b3a5c;font-size:.88rem;font-weight:700}
.koa-tier-mini{width:26px;height:26px;flex:none}
.koa-tier-row{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin:0;padding:12px 0 0;border-top:1px solid #e2d6c6;list-style:none;text-align:center}
.koa-tier-row li{display:grid;justify-items:center;gap:1px}
.koa-tier-step{width:40px;height:40px}
.koa-tier-row span{font-size:.68rem;font-weight:900;color:#3d3054;line-height:1.1}
.koa-tier-row small{font-size:.6rem;color:#8a7f8c}
.koa-tier-row li.is-locked .koa-tier-step{filter:grayscale(1);opacity:.4}
.koa-tier-row li.is-locked span{color:#8a7f8c}
.koa-tier-row li.is-current .koa-tier-step{width:46px;height:46px;margin-top:-3px;filter:drop-shadow(0 3px 0 #3d305455)}
.koa-tier-toast{width:30px;height:30px;flex:none}
.koa-panel-level .koa-tier-mini{width:24px;height:24px}
/* Phones: the six emblems shrink with the width and never touch; on very small screens, two rows of three. */
.koa-tier-row li{min-width:0}
.koa-tier-row .koa-tier-step{width:100%;max-width:40px;height:auto;aspect-ratio:1}
.koa-tier-row li.is-current .koa-tier-step{width:100%;max-width:46px;height:auto;margin-top:-3px}
.koa-tier-row span{max-width:100%;font-size:clamp(.56rem,2.3vw,.68rem);overflow-wrap:anywhere}
.koa-tier-row small{max-width:100%;font-size:clamp(.52rem,2vw,.6rem)}
@media(max-width:359px){.koa-tier-row{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:12px}}

/* Finished comic (15/11, interface review): a small "✓ Read" tag in the bottom right corner instead of the
   ribbon across the top, which covered the title of the cover. The stars of the test stay bottom left. */
.book-art{overflow:hidden}
.koa-cover-ribbon{position:absolute;z-index:3;right:8px;bottom:8px;padding:5px 10px 4px;border-radius:999px;background:#2d6b3f;color:#fff;font:900 .7rem/1 "Segoe UI",Arial,sans-serif;letter-spacing:.06em;text-transform:uppercase;box-shadow:0 2px 6px #29202b40;pointer-events:none}
.koa-cover-ribbon::before{content:"✓ "}
.pick .koa-cover-ribbon{right:auto;left:8px}
.koa-cover-done{padding:4px 8px}
