/* Fonts are hosted on this site, so no request goes to Google or anyone else. */
@font-face { font-family: 'Baloo 2'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/baloo-2-devanagari-400-normal.woff2) format('woff2'); unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09; }
@font-face { font-family: 'Baloo 2'; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/baloo-2-devanagari-700-normal.woff2) format('woff2'); unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09; }
@font-face { font-family: 'Baloo 2'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/baloo-2-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Baloo 2'; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/baloo-2-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Noto Sans Devanagari'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/noto-sans-devanagari-devanagari-400-normal.woff2) format('woff2'); unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09; }
@font-face { font-family: 'Noto Sans Devanagari'; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/noto-sans-devanagari-devanagari-700-normal.woff2) format('woff2'); unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09; }
@font-face { font-family: 'Noto Sans Devanagari'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/noto-sans-devanagari-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Noto Sans Devanagari'; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/noto-sans-devanagari-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  --bg: #fffaf0;
  --ink: #2b2d42;
  --muted: #5c5f73;
  --card: #ffffff;
  --line: #e9dfc9;
  --accent: #e76f51;
  --accent-ink: #ffffff;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Baloo 2", "Noto Sans Devanagari", "Mukta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

a { color: inherit; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }

header.top { border-bottom: 2px solid var(--line); background: #fff3d6; }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { font-size: 26px; font-weight: 700; text-decoration: none; }

.topright { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.byline { font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px dotted var(--muted); }
.byline:hover, .byline:focus-visible { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 560px) { .topright { align-items: flex-start; } }
@media print { .byline { display: none; } }
.langs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.langs span { font-size: 15px; color: var(--muted); }
.langs button {
  font: inherit; font-size: 16px;
  padding: 4px 14px; border-radius: 999px;
  border: 2px solid var(--ink); background: #fff; color: var(--ink);
  cursor: pointer;
}
.langs button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.hero { padding: 36px 0 12px; }
.hero h1 { margin: 0 0 6px; font-size: 38px; line-height: 1.2; }
.hero p { margin: 0; color: var(--muted); font-size: 20px; }

h2.section { font-size: 26px; margin: 28px 0 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; padding-bottom: 20px; }

.card {
  display: flex; flex-direction: column;
  background: var(--card); border: 2px solid var(--ink); border-radius: 16px;
  text-decoration: none; overflow: hidden;
}
.card .thumb { height: 170px; display: flex; align-items: center; justify-content: center; border-bottom: 2px solid var(--ink); font-size: 44px; overflow: hidden; }
.card .thumb.art { padding: 0; display: block; }
.card .body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .tag { font-size: 14px; color: var(--muted); }
.card .tag .num { color: var(--ink); background: #ffe66d; border: 2px solid var(--ink); border-radius: 999px; padding: 0 8px; font-size: 13px; }
.card .name { font-size: 20px; font-weight: 700; line-height: 1.3; }
.card .meta { font-size: 14px; color: var(--muted); margin-top: auto; }
.card.soon { opacity: 0.75; border-style: dashed; }
.pill { display: inline-block; align-self: flex-start; padding: 2px 12px; border-radius: 999px; font-size: 14px; background: var(--accent); color: var(--accent-ink); }
.pill.grey { background: #d9d4c7; color: var(--ink); }

footer { border-top: 2px solid var(--line); margin-top: 30px; padding: 20px 0 40px; color: var(--muted); font-size: 15px; }


/* Home page refinements */
.hero2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: center; padding: 30px 0 8px; }
.hero2 h1 { margin: 0 0 8px; font-size: 46px; line-height: 1.1; }
.hero2 p { margin: 0 0 10px; font-size: 21px; color: var(--muted); }
.hero2 .count { font-size: 16px; font-weight: 700; color: var(--ink); }
.heroart { aspect-ratio: 1 / 1; max-width: 360px; width: 100%; justify-self: center; border: 3px solid var(--ink); border-radius: 22px; overflow: hidden; }
.how { margin-top: 6px; }
.steps { list-style: none; padding: 0; margin: 0 0 6px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 2px solid var(--line); border-radius: 14px; font-size: 18px; line-height: 1.35; }
.steps b { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chips button { font: inherit; font-size: 16px; padding: 3px 16px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.about { margin: 10px 0 0; padding: 18px 20px; background: #fff3d6; border: 2px solid var(--ink); border-radius: 16px; }
.about h2 { margin: 0 0 6px; font-size: 24px; }
.about p { margin: 0; font-size: 18px; }
.endcap { text-align: center; padding: 6px 0 24px; }
.card:focus-visible, .btn:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 4px solid #3a86ff; outline-offset: 2px; }
.card { transition: none; }
@media (max-width: 700px) {
  .hero2 { grid-template-columns: 1fr; }
  .hero2 h1 { font-size: 36px; }
  .heroart { max-width: 300px; }
  .steps { grid-template-columns: 1fr; }
}

/* Book reader */
.bookbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 0; }
.btn {
  font: inherit; font-size: 16px; text-decoration: none; cursor: pointer;
  padding: 6px 16px; border-radius: 999px; border: 2px solid var(--ink);
  background: #fff; color: var(--ink); display: inline-block;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }

.pg {
  background: var(--card); border: 3px solid var(--ink); border-radius: 18px;
  padding: 22px; display: flex; flex-direction: column; justify-content: center;
  min-height: 340px; position: relative;
}
.pg .pn { position: absolute; bottom: 8px; right: 14px; font-size: 14px; color: var(--muted); }
.spread { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 22px; }
.pg.text p { font-size: 22px; line-height: 1.7; margin: 0; }
.pg.art { padding: 0; overflow: hidden; background: #fff3d6; aspect-ratio: 1 / 1; min-height: 0; }
.placeholder { padding: 24px; text-align: center; color: var(--muted); font-size: 16px; }
.placeholder strong { display: block; font-size: 20px; color: var(--ink); margin-bottom: 6px; }

.pg.cover { text-align: center; margin-bottom: 22px; min-height: 420px; }
.pg.cover h1 { font-size: 40px; line-height: 1.2; margin: 10px 0 4px; }
.pg.cover .sub { font-size: 24px; margin: 0 0 14px; }
.pg.cover .coverart { margin: 10px auto 0; width: 100%; max-width: 440px; aspect-ratio: 1 / 1; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; }
.pg.cover .starring { margin: 0; font-size: 20px; font-weight: 700; }

.pg.recap { margin-bottom: 22px; justify-content: flex-start; }
.pg.recap h2 { margin: 0 0 8px; font-size: 24px; }
.pg.recap ul { margin: 0 0 18px; padding-left: 22px; font-size: 22px; }

.disclaimer { font-size: 15px; color: var(--muted); margin: 8px 0 0; }

@media (max-width: 700px) {
  body { font-size: 17px; }
  .trail span { font-size: 12px; }
  .spread { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .pg.cover h1 { font-size: 32px; }
  .pg.text p { font-size: 20px; }
}


/* Setup screen */
.pg.setup { max-width: 560px; margin: 10px auto 30px; text-align: center; gap: 10px; align-items: stretch; }
.pg.setup h1 { margin: 0; font-size: 30px; line-height: 1.25; }
.pg.setup p { margin: 0 0 6px; color: var(--muted); }
.pg.setup label { text-align: left; font-weight: 700; display: block; }
.hf-name { font-weight: 400 !important; margin-top: 4px; }
.pg.setup input { font: inherit; font-size: 22px; padding: 8px 14px; border: 3px solid var(--ink); border-radius: 12px; width: 100%; }
.pick { display: flex; justify-content: center; gap: 16px; margin: 8px 0; }
.avatar { font: inherit; font-size: 18px; background: #fff; border: 3px solid var(--line); border-radius: 16px; padding: 8px 18px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; color: var(--ink); }
.avatar[aria-pressed="true"] { border-color: var(--ink); background: #fff3d6; }
.btn.big { font-size: 20px; padding: 8px 20px; }
.hint { color: #b00020 !important; min-height: 1.4em; }
[hidden] { display: none !important; }

/* Journey trail */
.trail { list-style: none; margin: 0 0 18px; padding: 0; display: flex; justify-content: space-between; position: relative; }
.trail::before { content: ""; position: absolute; left: 12%; right: 12%; top: 9px; border-top: 3px dashed var(--line); }
.trail li { position: relative; flex: 1; text-align: center; font-size: 13px; color: var(--muted); }
.trail li i { display: block; width: 18px; height: 18px; margin: 0 auto 4px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; position: relative; }
.trail li.done i { background: var(--ink); }
.trail li.now i { background: var(--accent); }
.trail li.now { color: var(--ink); font-weight: 700; }


/* Quizzes */
.qsec { margin: 4px 0 16px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fffdf7; }
.qsec h2 { display: inline-block; margin: 0 10px 8px 0 !important; font-size: 21px !important; }
.score { font-size: 15px; color: var(--muted); }
.bank { margin: 0 0 10px; font-size: 16px; }
.bank span { display: inline-block; margin: 2px 4px; padding: 1px 10px; border: 2px solid var(--ink); border-radius: 999px; background: #fff3d6; }
.frow { margin: 8px 0; font-size: 19px; line-height: 2; }
.frow select { font: inherit; font-size: 17px; margin: 0 6px; padding: 2px 6px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; max-width: 150px; }
.frow select.ok { background: #d9f5d0; border-color: #2e7d32; }
.frow select.bad { background: #ffe0e0; border-color: #c62828; }
.bl { display: none; }
.mark { font-size: 15px; margin-left: 6px; font-weight: 700; }
.mark.good { color: #2e7d32; }
.mark.no { color: #c62828; }
.crow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 19px; }
.crow:first-of-type { border-top: 0; }
.clabel { display: flex; align-items: center; gap: 10px; flex: 1 1 200px; min-width: 0; }
.copts { display: flex; gap: 8px; flex-wrap: wrap; }
.opt { font: inherit; font-size: 17px; padding: 3px 16px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; }
.opt.ok { background: #d9f5d0; border-color: #2e7d32; }
.opt.bad { background: #ffe0e0; border-color: #c62828; }
.key { display: none; }

/* Promise */
.promise { margin-top: 8px; padding: 14px; border: 3px dashed var(--ink); border-radius: 14px; background: #fff8e1; }
.promise h2 { margin: 0 0 4px !important; font-size: 22px !important; }
.promise p { margin: 0; font-size: 20px; }
.promise .sig { margin-top: 10px; font-size: 16px; color: var(--muted); }

/* Print: every page of the book becomes one printed page (10 in total). */
@page { size: A5 portrait; margin: 10mm; }
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; font-size: 15pt; }
  header.top, .bookbar, footer, .no-print { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .spread { display: block; margin: 0; }
  .pg { border-width: 2px; min-height: 0; height: 175mm; page-break-after: always; break-after: page; margin: 0; }
  .pg.text p { font-size: 17pt; }
  .pg.art { height: 175mm; aspect-ratio: auto; display: flex; align-items: center; }
  .pg.recap { font-size: 14pt; padding: 14px; justify-content: flex-start; }
  .qsec { border: 0; background: none; padding: 2px 0; margin: 0 0 6px; }
  .qsec h2 { font-size: 16pt !important; margin-bottom: 6px !important; }
  .bank { font-size: 12.5pt; margin-bottom: 8px; }
  .bank span { padding: 0 9px; }
  .frow { font-size: 14pt; margin: 6px 0; line-height: 1.8; }
  .frow select, .mark, .score { display: none !important; }
  .bl { display: inline !important; }
  .crow { font-size: 14pt; padding: 7px 0; gap: 2px 12px; }
  .crow svg { width: 40px !important; height: 40px !important; }
  .opt { border: 0 !important; background: none !important; padding: 0 7px; font-size: 14pt; color: inherit; }
  .opt::before { content: "\25CB  "; }
  .key { display: block !important; margin: 10px 0 0; font-size: 10.5pt; color: #555; line-height: 1.5; }
  .pg.recap h2 { font-size: 16pt; }
  .pg.recap ul { font-size: 14pt; margin-bottom: 12px; }
    .promise { padding: 12px; margin-top: 8px; }
  .promise h2 { font-size: 16pt !important; }
  .promise p { font-size: 14pt; }
  .pg.cover .coverart { max-width: 100%; }
  .trail li { font-size: 9pt; }
  .pg.cover, .pg.recap { margin: 0; }
      }

/* Your hero: a small button everywhere, and a pop-up to change it */
.chipwrap { margin: 4px 0 12px; }
.herochip { font: inherit; display: inline-flex; align-items: center; gap: 10px; padding: 4px 16px 4px 6px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; }
.herochip .face { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #fff3d6; border: 2px solid var(--ink); flex: none; }
.herochip .who { display: flex; flex-direction: column; line-height: 1.15; }
.herochip .who small { font-size: 12px; color: var(--muted); }
.herochip .who b { font-size: 18px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.herochip .edit { font-size: 14px; color: var(--accent); font-weight: 700; margin-left: 4px; }
.herochip .edit::before { content: "\270E "; }
.herochip.empty { background: var(--accent); border-color: var(--accent); color: #fff; padding-right: 20px; }
.herochip.empty .who b { max-width: none; font-size: 18px; }
.bookbar .herochip { padding: 2px 12px 2px 4px; }
.bookbar .herochip .face { width: 34px; height: 34px; }
.bookbar .herochip .face svg { width: 34px !important; height: 34px !important; }
.overlay { position: fixed; inset: 0; background: rgba(43, 45, 66, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; overflow-y: auto; }
.modal { position: relative; background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 22px 22px 18px; width: 100%; max-width: 440px; text-align: center; margin: auto; }
.modal h2 { margin: 0 24px 8px; font-size: 24px; line-height: 1.25; }
.modal .x { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; font: inherit; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); }
.modal label, .pg.setup label { display: block; text-align: left; font-weight: 700; }
.modal input { font: inherit; font-size: 22px; padding: 8px 14px; border: 3px solid var(--ink); border-radius: 12px; width: 100%; margin-top: 4px; }
.modal .btn.big, .pg.setup .btn.big { width: 100%; margin-top: 4px; }
.linkbtn { font: inherit; font-size: 16px; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 6px 4px; }
.fine { font-size: 14px; color: var(--muted); margin: 6px 0 0 !important; line-height: 1.4; }
body.noscroll { overflow: hidden; }
.nextline { margin: 0 0 6px; color: var(--muted); font-size: 16px; }
.endcap .btn.big { max-width: 100%; white-space: normal; }
.endcap p { margin: 0 0 10px; }
.endcap { padding-top: 14px; }
@media (max-width: 700px) {
  .herochip .who b { max-width: 110px; }
  .card .thumb { height: 150px; }
}
@media print {
  .overlay, .herochip { display: none !important; }
  /* Tighter quiz pages so every book stays at 12 printed pages, in any language */
  .pg.recap { font-size: 12.5pt; padding: 12px; }
  .pg.recap ul { font-size: 13pt; margin-bottom: 8px; }
  .pg.recap ul li { line-height: 1.45; }
  .qsec { margin: 0 0 4px; }
  .qsec h2 { font-size: 14.5pt !important; margin-bottom: 3px !important; }
  .frow { font-size: 12.5pt; margin: 3px 0; line-height: 1.7; }
  .bank { font-size: 11.5pt; margin-bottom: 4px; }
  .crow { font-size: 12.5pt; padding: 3px 0; gap: 0 10px; line-height: 1.35; }
  .crow svg { width: 30px !important; height: 30px !important; }
  .clabel { flex: 1 1 150px; gap: 8px; }
  .opt { font-size: 12.5pt; padding: 0 5px; }
  .promise { padding: 8px 10px; margin-top: 4px; }
  .promise h2 { font-size: 14pt !important; }
  .promise p { font-size: 12.5pt; }
  .promise .sig { margin-top: 6px; font-size: 11pt; }
  .key { font-size: 9pt; line-height: 1.35; margin-top: 6px; }
}

/* Search, start button, stamps, skip link, worksheet print, about page */
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.searchrow { margin: 0 0 10px; }
.searchrow input { font: inherit; font-size: 18px; width: 100%; max-width: 420px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); }
.none { font-size: 18px; color: var(--muted); padding: 20px 4px; grid-column: 1 / -1; }
.order { margin: 2px 0 8px; color: var(--muted); font-size: 16px; }
.startrow { margin: 6px 0 12px; }
.startrow .btn { display: inline-block; text-decoration: none; }
.pill.done { background: #2a9d8f; color: #fff; }
.stampsbar { margin: 14px 0 6px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.stampsbar .dots { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.stampsbar .dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; display: inline-block; }
.stampsbar .dots i.on { background: #ffd23f; }
.stampsbar small { color: var(--muted); font-size: 13px; flex-basis: 100%; }
.stampmsg { display: none; margin: 12px 0 0; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 14px; background: #fff3d6; font-weight: 700; text-align: center; }
.stampmsg.show { display: block; }
.stampmsg .stamp { display: inline-block; width: 30px; height: 30px; line-height: 26px; border-radius: 50%; border: 3px solid #e76f51; color: #e76f51; vertical-align: middle; margin-right: 6px; transform: rotate(-12deg); }
footer a { color: inherit; }
.aboutpage { max-width: 760px; margin: 0 auto; padding: 8px 0 30px; }
.aboutpage h1 { margin: 8px 0 14px; }
.aboutpage h2 { margin: 22px 0 6px; font-size: 22px; }
.aboutpage p { margin: 0; font-size: 18px; line-height: 1.55; }
@media print {
  .skip, .stampmsg, .stampsbar { display: none !important; }
  body.print-ws .pg.cover, body.print-ws .spread { display: none !important; }
}

/* Creator credit */
.byline { margin: 4px 0 12px; font-size: 16px; font-weight: 700; color: var(--muted); }
.byline:empty { display: none; }
.pg .by { margin: 10px 0 0; text-align: center; font-size: 14px; color: var(--muted); line-height: 1.4; }
.pg.recap .by { margin-top: 14px; }
@media print { .pg .by { font-size: 9pt; } }

.pg.cover .time { margin: 10px 0 0; text-align: center; font-size: 17px; font-weight: 700; }
@media print { .pg.cover .time { font-size: 11pt; } }

/* Main menu */
header.top nav.mainnav .wrap { justify-content: flex-start; gap: 8px; padding-top: 0; padding-bottom: 12px; }
.mainnav a { font-size: 17px; text-decoration: none; color: var(--ink); padding: 3px 16px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; }
.mainnav a[aria-current="page"] { background: var(--ink); color: #fff; }
.mainnav a.me { margin-left: auto; border-style: dashed; }
.mainnav a.me .tok { font-weight: 700; }
@media print { .mainnav { display: none; } }

/* Accounts */
.acctpage h1, #play h1, .stage h1 { font-size: 32px; line-height: 1.2; margin: 18px 0 6px; }
.acctpage h2, #play h2 { font-size: 22px; margin: 22px 0 8px; }
.lead { font-size: 19px; margin: 0 0 10px; }
.note { font-size: 16px; color: var(--muted); margin: 6px 0 10px; }
.note.warn { background: #fff3d6; border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px; color: var(--ink); }
.note.good { color: #1f7a4d; font-weight: 700; }
.formerr { color: #b3261e; font-weight: 700; min-height: 1.4em; margin: 6px 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px; }
.tabs button, .bchips button, .pertabs button { font: inherit; font-size: 16px; padding: 6px 16px; min-height: 44px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; }
.tabs button[aria-selected="true"], .bchips button[aria-pressed="true"], .pertabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.nickrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.nickrow label, .lbl { display: flex; flex-direction: column; font-size: 15px; color: var(--muted); gap: 2px; margin: 8px 0; }
.acctpage select, .acctpage input[type="text"], .acctpage input[type="password"] { font: inherit; font-size: 19px; padding: 8px 12px; border: 3px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); min-height: 46px; max-width: 100%; }
.lbl input { width: 100%; max-width: 360px; }
.nickbig { font-size: 30px; font-weight: 700; margin: 10px 0 2px; word-break: break-all; }
.avs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 460px; }
.av { font-size: 30px; padding: 6px 0; border-radius: 14px; border: 3px solid var(--line); background: #fff; cursor: pointer; min-height: 52px; }
.av[aria-pressed="true"] { border-color: var(--ink); background: #fff3d6; }
.consent { margin: 22px 0 8px; padding: 14px 16px; background: #fff3d6; border: 2px solid var(--ink); border-radius: 16px; }
.consent h2 { margin-top: 0; }
.consent p { font-size: 16px; }
.radios { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 8px 0; }
.radios label, .chk { display: flex; align-items: flex-start; gap: 8px; font-size: 17px; }
.radios input, .chk input { width: 22px; height: 22px; margin-top: 4px; flex: none; }
.profile { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.bigav { font-size: 64px; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; background: #fff3d6; border: 3px solid var(--ink); border-radius: 24px; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0; font-size: 17px; }
.meter { height: 16px; background: #fff; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; margin: 12px 0 4px; max-width: 460px; }
.meter i { display: block; height: 100%; background: var(--accent); }
.reading { display: grid; gap: 8px; }
.rrow { display: flex; flex-direction: column; text-decoration: none; padding: 10px 14px; background: #fff; border: 2px solid var(--line); border-radius: 12px; }
.rrow span { font-size: 15px; color: var(--muted); }
details.danger { margin: 28px 0; padding: 10px 14px; border: 2px dashed #b3261e; border-radius: 12px; }
details.danger summary { cursor: pointer; font-weight: 700; color: #b3261e; min-height: 32px; }

/* Games */
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin: 14px 0 8px; }
.gcard { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; cursor: pointer; color: var(--ink); }
.gcard:hover, .gcard:focus-visible { background: #fff3d6; }
.gcard .gi { font-size: 34px; line-height: 1; }
.gcard b { font-size: 20px; }
.gcard span:not(.gi) { font-size: 15px; color: var(--muted); line-height: 1.35; }
.gcard em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--accent); }
.stage { text-align: center; padding: 10px 0 24px; }
.gi.big { font-size: 64px; margin: 0; line-height: 1.1; }
.bigscore { font-size: 28px; margin: 8px 0; }
.hud { display: flex; justify-content: space-between; font-size: 22px; font-weight: 700; margin: 12px 0; }
.qbox { background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 18px 16px; text-align: center; min-height: 130px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.qtext { font-size: 22px; margin: 0; line-height: 1.4; }
.qtext .big { font-size: 34px; font-weight: 700; }
.bubble { display: inline-block; background: #e6f4ff; border: 2px solid var(--ink); border-radius: 18px 18px 18px 4px; padding: 10px 16px; font-size: 20px; text-align: left; }
.moneysvg { width: 100%; max-width: 340px; margin: 0 auto; }
.qopts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.qopts.wide { grid-template-columns: 1fr; }
.qopt { font: inherit; font-size: 20px; min-height: 64px; padding: 10px 12px; border-radius: 16px; border: 3px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; line-height: 1.3; }
.qopt:not(:disabled):hover, .qopt:not(:disabled):focus-visible { background: #fff3d6; }
.qopt.ok { background: #c8f0d4; border-color: #1f7a4d; }
.qopt.bad { background: #ffd6d2; border-color: #b3261e; }
.qopt:disabled { cursor: default; }
.fb { text-align: center; font-size: 20px; font-weight: 700; min-height: 1.6em; margin: 4px 0; }
.boards, .hall { margin-top: 30px; }
.bchips, .pertabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.rows { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.rows li { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #fff; border: 2px solid var(--line); border-radius: 14px; font-size: 18px; }
.rows li.me { border-color: var(--ink); background: #fff3d6; }
.rows li.none { color: var(--muted); justify-content: center; }
.rows .rk { min-width: 34px; font-size: 22px; text-align: center; }
.rows .av { font-size: 24px; }
.rows b { overflow-wrap: anywhere; }
.rows .sc { margin-left: auto; font-weight: 700; }
.hweek h3 { margin: 12px 0 4px; font-size: 18px; }
.hweek ul { margin: 0; padding-left: 20px; font-size: 16px; }
.hweek li { margin: 4px 0; }
@media (max-width: 480px) { .qopts { grid-template-columns: 1fr; } .avs { grid-template-columns: repeat(4, 1fr); } .qtext .big { font-size: 28px; } }
@media print { .acctpage, #play { display: none; } }

/* Admin */
.adminpage h1 { font-size: 30px; margin: 18px 0 8px; }
.adminpage h2 { font-size: 22px; margin: 22px 0 8px; }
.adminpage h3 { font-size: 18px; margin: 16px 0 6px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.tiles div { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; }
.tiles b { font-size: 30px; line-height: 1.1; }
.tiles span { font-size: 14px; color: var(--muted); }
.adminpage input[type="search"], .adminpage input[type="text"], .adminpage input[type="password"] { font: inherit; font-size: 16px; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 10px; min-height: 40px; max-width: 100%; }
.tablewrap { overflow-x: auto; margin: 8px 0; }
table.adm { border-collapse: collapse; width: 100%; font-size: 15px; background: #fff; }
table.adm th, table.adm td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.adm tbody tr[data-u] { cursor: pointer; }
table.adm tbody tr[data-u]:hover, table.adm tbody tr[data-u]:focus-visible { background: #fff3d6; }
.sortb { font: inherit; font-weight: 700; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); text-align: left; }
.sortb[aria-pressed="true"] { text-decoration: underline; }
.btn.small { font-size: 14px; padding: 2px 10px; }
.adm-detail { margin-top: 20px; padding: 12px 16px; background: #fffdf7; border: 2px solid var(--ink); border-radius: 16px; }
.adm-detail .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---- Big idea, jump bar, listen ---- */
.intro { margin: 0 0 18px; }
.bigidea { margin: 0 0 10px; padding: 12px 16px; border: 2px solid var(--ink); border-radius: 14px; background: #fff3d6; font-size: 18px; line-height: 1.45; }
.jump { display: flex; gap: 8px; flex-wrap: wrap; }
.jump button { font: inherit; font-weight: 700; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; }
.jump button:hover, .jump button:focus-visible { background: #ffe66d; }
.btn.listen { margin-top: 12px; font-size: 16px; padding: 6px 14px; }
.btn.listen.on { background: #ffe66d; }

/* ---- Finish screen ---- */
.finish { max-width: 560px; margin: 8px auto 0; padding: 20px 16px 26px; border: 3px solid var(--ink); border-radius: 20px; background: #fffaf0; }
.finish h2 { margin: 6px 0 2px; font-size: 32px; }
.finish .well { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.finish .fst { margin: 0 0 14px; color: var(--muted); }
.bigstamp { width: 84px; height: 84px; line-height: 74px; margin: 0 auto; font-size: 44px; border-radius: 50%; border: 5px solid #bbb; color: #bbb; transform: rotate(-10deg); }
.bigstamp.got { border-color: #e76f51; color: #e76f51; background: #fff3d6; }
.sharebox { margin-top: 22px; padding-top: 14px; border-top: 2px dashed #d9c9a3; }
.sharebox h3 { margin: 0 0 10px; font-size: 18px; }
.sharerow { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.qr { display: block; margin: 14px auto 4px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 4px; }
.qrnote, .copied { margin: 0; font-size: 14px; color: var(--muted); min-height: 1.2em; }

/* ---- Learning path groups, level dots, previews ---- */
h3.grp { grid-column: 1 / -1; margin: 12px 0 0; font-size: 22px; }
h3.grp:first-child { margin-top: 0; }
.lvl { letter-spacing: 1px; color: #e76f51; white-space: nowrap; }
.peekrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.peek figure { margin: 0; text-align: center; }
.peek img { width: 100%; height: auto; border: 2px solid var(--ink); border-radius: 12px; background: #fff; }
.peek figcaption { margin-top: 6px; font-weight: 700; }
.certlink { margin-top: 8px; }

/* ---- Certificate and flyer ---- */
.certactions { margin-top: 18px; }
.certificate { max-width: 860px; margin: 10px auto; padding: 12px; border: 6px double #e76f51; border-radius: 12px; background: #fffaf0; }
.certificate .cin { padding: 26px 22px; text-align: center; border: 2px solid var(--ink); border-radius: 8px; }
.certificate h1 { margin: 6px 0 2px; font-size: 38px; }
.cseal { width: 72px; height: 72px; line-height: 64px; margin: 0 auto; font-size: 38px; border-radius: 50%; border: 4px solid #e76f51; color: #e76f51; }
.ctier { margin: 4px 0 14px; font-size: 22px; font-weight: 700; color: #e76f51; }
.cthis { margin: 0; }
.cname { margin: 6px 0 10px; font-size: 44px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.ctext { max-width: 560px; margin: 0 auto 14px; font-size: 20px; }
.cdate { margin: 0 0 4px; }
.cby { margin: 0; color: var(--muted); font-size: 14px; }
.flyer { max-width: 640px; margin: 10px auto; padding: 22px; text-align: center; border: 4px solid var(--ink); border-radius: 18px; background: #fffaf0; }
.fbrand { font-size: 28px; font-weight: 700; margin-bottom: 10px; }
.fblock h1 { font-size: 26px; margin: 12px 0 2px; }
.fblock p { margin: 0 0 6px; font-size: 18px; }
.fqr { display: block; margin: 16px auto 6px; background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 6px; }
.fscan { margin: 0; font-weight: 700; }
.furl { margin: 6px 0; font-size: 20px; font-weight: 700; }
.fby { margin: 0; color: var(--muted); }
@media print {
  .certpage, .flyerpage { background: #fff; }
  .certpage .wrap, .flyerpage .wrap { max-width: none; padding: 0; }
  .certificate, .flyer { margin: 0 auto; }
}
@page certsize { size: A4 landscape; margin: 12mm; }
.certificate { page: certsize; }
@page flyersize { size: A4 portrait; margin: 12mm; }
.flyer { page: flyersize; }
.pg.text .btn.listen { display: block; width: auto; margin: 14px auto 0; }
@media print {
  .flyer { padding: 14mm; }
  .fbrand { font-size: 24pt; }
  .fblock h1 { font-size: 19pt; }
  .fblock p { font-size: 12pt; }
  .fqr { width: 70mm; height: 70mm; }
  .fscan { font-size: 11pt; }
  .furl { font-size: 16pt; }
  .fby { font-size: 11pt; }
  .certificate h1 { font-size: 32pt; }
  .cname { font-size: 38pt; }
  .ctext { font-size: 15pt; }
  .ctier { font-size: 18pt; }
  .cthis, .cdate { font-size: 13pt; }
  .certificate .cin { padding: 14mm 10mm; }
}

.hero2 .monthline { display: inline-block; font-size: 18px; font-weight: 700; color: var(--ink); background: #ffe66d; border: 2px solid var(--ink); border-radius: 14px; padding: 4px 14px; margin: 0 0 12px; }

.pdfrow { margin: 0 0 12px; font-size: 16px; color: var(--muted); }
.pdfrow .btn.small { padding: 4px 14px; font-size: 16px; min-height: 0; margin: 0 2px; }
.pdfrow .pdfhint { font-size: 14px; }
@media print { .pdfrow { display: none !important; } }

.tr1 { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.views { display: inline-flex; align-items: center; gap: 6px; color: #8d99ae; font-size: 15px; }
.views[hidden] { display: none; }
.views b { font-weight: 700; }
@media (max-width: 560px) { .tr1 { justify-content: flex-start; } }
