/* ==========================================================
   Class 6 ICT · Section 4 · ওয়ার্ড প্রসেসিং
   Theme: "ছাপাখানার প্রুফ টেবিল" — an old letterpress print
   shop where lead type meets the screen. Newsprint page with
   galley rules, proof-sheet cards with crop marks and a
   vermilion "প্রুফ" tab, ink-black press-bed hero/player with
   brass rails. Vermilion = mistakes/corrections, ink blue =
   cursor/selection, sage = saved/ok. Band কৌতূহলী (11–12).
   ========================================================== */
:root {
  --bg: #f4efe3;
  --card: #fffdf8;
  --ink: #1c1d22;
  --ink-2: #565049;
  --press: #1c1d22;
  --press-2: #2c2e35;
  --brass: #c9972b;
  --brass-d: #8f6a17;
  --brass-s: #f7ecd2;
  --red: #d2412a;
  --red-d: #9e2c19;
  --red-s: #fbe4dd;
  --blue: #2350a8;
  --blue-s: #e3ebfa;
  --sage: #3f8f6a;
  --sage-s: #e2f2ea;
  --line: #ddd3c0;
  --ok: #2f7d57;
  --no: #b5321f;
}
* { box-sizing: border-box; }
body {
  color: var(--ink);
  background:
    repeating-linear-gradient(180deg, transparent 0 33px, rgba(35, 80, 168, .055) 33px 34px),
    var(--bg);
}
::selection { background: rgba(35, 80, 168, .25); }
a { color: var(--blue); }
strong { color: var(--red-d); }
.muted { color: var(--ink-2); }
.small { font-size: var(--fs-sm); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 2000; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--content-w); margin-inline: auto; padding-inline: var(--gutter); }
main, .wrap, .lesson-part > *, .row-ctrl > *, .wp-grid > *, .cycle-grid > *, .hero-grid > * { min-width: 0; }

/* topbar + composing stick */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap; padding: .45rem var(--gutter); background: rgba(28, 29, 34, .96); color: #ece6d8; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-size: var(--fs-sm); border-bottom: 4px solid var(--brass); }
.crumbs { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.crumbs a { color: #d9d1bf; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: var(--brass); font-weight: 700; }
.level { display: flex; align-items: center; gap: .5rem; font-weight: 800; }
.stick { display: inline-flex; gap: 2px; padding: 2px 4px; border: 2px solid var(--brass); border-radius: 3px; background: #3a3c44; min-height: 1.5rem; align-items: stretch; }
.stick i { display: block; width: .62rem; height: 1.15rem; border-radius: 1px; background: #55585f; }
.stick i.on { background: linear-gradient(180deg, #b9bcc4, #8c9099); box-shadow: inset 0 -3px 0 #6c7078; }
.stick i.new { animation: drop .5s ease-out; }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* hero */
.hero { padding: clamp(2rem, 5vw, 4rem) 0 2.4rem; background: radial-gradient(circle at 85% 10%, rgba(201, 151, 43, .25), transparent 40%), linear-gradient(170deg, var(--press), #26282f 70%, #31333b); color: #f1ebdd; }
.hero-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.eyebrow { display: inline-block; color: var(--press); background: var(--brass); font-weight: 800; padding: .1rem .9rem; border-radius: 4px; font-size: var(--fs-sm); }
h1 { font-size: var(--fs-3xl); line-height: 1.25; margin: .7rem 0 1rem; }
.hero strong { color: #f3c45a; }
.lede { font-size: var(--fs-lg); line-height: 1.75; }
.hint { color: #d9d1bf; border-left: 4px solid var(--red); padding-left: .8rem; }
.press-card { margin: 0; border-radius: 10px; overflow: hidden; background: #efe8d8; border: 3px solid var(--brass); box-shadow: 0 0 0 6px #2a2c33, 0 18px 40px rgba(0, 0, 0, .45); }
.press-card > svg { display: block; width: 100%; height: auto; }
.hero-read { margin: 0; padding: .45rem 1rem; background: var(--press-2); color: #f3c45a; font-weight: 800; letter-spacing: .02em; }

/* blocks */
.block { padding-block: clamp(1.6rem, 4vw, 3rem); }
.sec-title, .lesson-part h2, #video h2, #compare h2, #quiz h2, .story h2 { font-size: var(--fs-2xl); line-height: 1.35; margin: .2rem 0 1rem; color: var(--press); }
.story h2 { font-size: var(--fs-xl); }
.sub-title { font-size: var(--fs-xl); margin: 2rem 0 .8rem; color: var(--red-d); display: flex; align-items: center; gap: .6rem; }
.sub-title::before { content: ''; flex: none; width: .9rem; height: 1.3rem; background: linear-gradient(180deg, #b9bcc4, #8c9099); border-radius: 2px; box-shadow: inset 0 -4px 0 #6c7078; }
.part-tag { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-weight: 800; color: #fff; background: var(--press); padding: .05rem .9rem; border-radius: 3px; font-size: var(--fs-sm); border-left: 6px solid var(--red); }
.goals { display: grid; gap: .6rem; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); }
.goals li { background: var(--card); border-radius: 6px; padding: .7rem 1rem .7rem 2.8rem; border: 1.5px solid var(--line); position: relative; }
.goals li::before { content: ''; position: absolute; left: 1rem; top: 1rem; width: 2px; height: 1.3rem; background: var(--blue); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* proof-sheet cards with crop marks */
.card { position: relative; background: var(--card); border-radius: 4px; padding: clamp(1.1rem, 3vw, 1.7rem); border: 1px solid var(--line); box-shadow: 0 1px 0 #fff inset, 0 10px 24px rgba(28, 29, 34, .08), 0 2px 0 rgba(28, 29, 34, .06); overflow: hidden;
  background-image:
    linear-gradient(var(--ink-2), var(--ink-2)), linear-gradient(var(--ink-2), var(--ink-2)),
    linear-gradient(var(--ink-2), var(--ink-2)), linear-gradient(var(--ink-2), var(--ink-2)),
    linear-gradient(var(--ink-2), var(--ink-2)), linear-gradient(var(--ink-2), var(--ink-2)),
    linear-gradient(var(--ink-2), var(--ink-2)), linear-gradient(var(--ink-2), var(--ink-2));
  background-size: 14px 1px, 1px 14px, 14px 1px, 1px 14px, 14px 1px, 1px 14px, 14px 1px, 1px 14px;
  background-position: 4px 10px, 10px 4px, calc(100% - 4px) 10px, calc(100% - 10px) 4px, 4px calc(100% - 10px), 10px calc(100% - 4px), calc(100% - 4px) calc(100% - 10px), calc(100% - 10px) calc(100% - 4px);
  background-repeat: no-repeat; }
.card::after { content: 'প্রুফ'; position: absolute; top: 0; right: 1.6rem; background: var(--red); color: #fff; font-size: .78rem; font-weight: 800; padding: .05rem .5rem .15rem; border-radius: 0 0 4px 4px; letter-spacing: .05em; }
.card h3 { margin: 0 0 .5rem; font-size: var(--fs-lg); display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; color: var(--press); padding-right: 3.5rem; }
.widget { margin: 1.6rem 0; }
.def { margin: 1rem 0; background: var(--brass-s); border-left: 6px solid var(--brass); border-radius: 4px; padding: .8rem 1rem; }
.def b:first-child { color: var(--red-d); }
.remember { margin: 1.4rem 0 .4rem; background: var(--sage-s); border-radius: 6px; padding: .9rem 1rem; border: 2px dashed var(--sage); }
.remember > b:first-child { display: inline-block; background: var(--sage); color: #fff; padding: 0 .6rem; border-radius: 3px; margin-right: .4rem; }
.newwords { margin: 1.2rem 0; padding: .6rem 1rem; background: #fff; border: 1.5px solid var(--blue); border-radius: 6px; }
.newwords b { color: var(--blue); }
.note-bn { display: flex; gap: .6rem; align-items: flex-start; background: var(--blue-s); border-radius: 6px; padding: .7rem 1rem; }
.note-bn .ic { flex: none; margin-top: .3rem; }
.rules { padding-left: 1.8rem; }
.rules li { margin: .45rem 0; padding: .3rem .7rem; background: var(--card); border-radius: 4px; border-left: 4px solid var(--blue); }
.rules li::marker { color: var(--red); font-weight: 800; }
.fig { display: block; width: 100%; height: auto; }

/* controls */
.row-ctrl { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin: .7rem 0; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.chips button, .seg button { border: 2px solid var(--press-2); background: #fff; color: var(--press); border-radius: 4px; padding: .05rem .8rem; font: inherit; font-size: var(--fs-sm); cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.chips button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--press-2); color: #fff; }
.chips button.done, .seg button.done { box-shadow: inset 0 -3px 0 var(--brass); }
.seg { display: inline-flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0; }
.slider { display: flex; align-items: center; gap: .5rem; font-weight: 700; flex-wrap: wrap; margin: .5rem 0; }
.slider > span:first-child { min-width: 7rem; }
.slider input { accent-color: var(--red); width: 10rem; max-width: 100%; }
.slider.wide input { flex: 1 1 12rem; }
.btn { font: inherit; font-weight: 800; border: 2px solid var(--press); background: var(--press-2); color: #fff; padding: .3rem 1.1rem; border-radius: 4px; cursor: pointer; box-shadow: 0 3px 0 var(--brass-d); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--brass-d); }
.btn.ghost { background: #fff; color: var(--press); }
.btn[disabled] { opacity: .5; cursor: default; }
.msg { min-height: 1.8em; font-weight: 700; margin: .5rem 0; }
.msg.ok { color: var(--ok); } .msg.no { color: var(--no); }
.turns { font-weight: 700; color: var(--ink-2); }
.tool-txt { font-weight: 600; min-height: 3.4em; }
.chart-box { position: relative; height: 240px; margin: .6rem 0; }
details.think { background: var(--card); border-left: 5px solid var(--blue); border-radius: 4px; padding: .6rem .9rem; margin: .8rem 0; }
details.think summary { cursor: pointer; font-weight: 700; }
.steps { padding-left: 1.5rem; font-size: var(--fs-sm); margin: .5rem 0; }
.steps li { margin: .25rem 0; color: var(--ink-2); }
.steps li.now { color: var(--ink); font-weight: 700; }
.steps li.done { color: var(--ok); }
.steps li::marker { font-weight: 800; color: var(--red); }

/* word tiles */
.tiles, .line-out { display: flex; flex-wrap: wrap; gap: .45rem; min-height: 2.8rem; margin: .5rem 0; }
.line-out { border-bottom: 2px solid var(--press); padding: .3rem 0; align-items: center; }
.tiles button, .line-out span { font: inherit; font-weight: 700; padding: .15rem .8rem; border-radius: 3px; border: 2px solid #6c7078; background: linear-gradient(180deg, #d4d6dc, #aeb2ba); color: var(--press); cursor: pointer; box-shadow: inset 0 -3px 0 #8c9099; }
.line-out span { background: #fff; border-color: var(--sage); box-shadow: none; animation: drop .35s ease-out; }
.line-out span.k { background: var(--brass-s); border-color: var(--brass); }
.tiles button.bad { animation: shake .4s; border-color: var(--red); }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* fix the mistake */
.fix-page { background: #fff; border: 1.5px solid var(--line); border-radius: 4px; padding: .8rem 1rem; line-height: 2.1; min-height: 7.5rem; position: relative; overflow: hidden; }
.fix-page.hand { font-style: italic; line-height: 38px; background: repeating-linear-gradient(180deg, #fff 0 37px, #c7d6f0 37px 38px) 0 calc(.8rem + 4px) / 100% 38px; border-left: 3px solid #e7a4a4; }
.fix-page.tw { font-family: var(--bn-font); letter-spacing: .02em; background: #fbf7ec; }
.fix-page .err { text-decoration: underline wavy var(--red); text-underline-offset: 4px; }
.fix-page .cut { text-decoration: line-through 2px var(--red); color: #8a7f74; }
.fix-page .ins { color: var(--blue); font-weight: 700; }
.fix-page .ok-w { background: var(--sage-s); border-radius: 3px; padding: 0 .2rem; }
.fix-page .retype { opacity: .25; }
.fix-page .retype.on { opacity: 1; transition: opacity .2s; }

/* storage / sorters */
.sort-list { display: grid; gap: .5rem; margin: .6rem 0; }
.sort-row { display: flex; align-items: center; justify-content: space-between; gap: .4rem .8rem; flex-wrap: wrap; background: #faf6ec; border: 1.5px solid var(--line); border-radius: 4px; padding: .4rem .7rem; }
.sort-row > span { flex: 1 1 14rem; }
.sort-row .chips { margin: 0; }
.sort-row.right { border-color: var(--ok); background: #eaf5ee; }
.sort-row .chips button.right { background: var(--ok); border-color: var(--ok); color: #fff; }
.sort-row .chips button.wrong { background: var(--red-s); border-color: var(--no); color: var(--no); animation: shake .4s; }
.vote { border-top: 1px dashed var(--line); margin-top: .6rem; padding-top: .4rem; }
.pool { display: flex; flex-wrap: wrap; gap: .45rem; margin: .6rem 0; min-height: 2.6rem; }
.pool button { font: inherit; font-size: var(--fs-sm); border: 2px solid var(--press-2); background: #fff; color: var(--ink); border-radius: 4px; padding: .2rem .8rem; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.pool button[aria-pressed="true"] { background: var(--brass-s); box-shadow: 0 0 0 3px rgba(201, 151, 43, .45); }
.pool button.bad { animation: shake .4s; background: var(--red-s); }
.bins { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); }
.bin { font: inherit; text-align: left; border: 2px solid var(--press-2); border-top-width: 8px; border-radius: 4px; background: #faf6ec; padding: .5rem .7rem; min-height: 6rem; cursor: pointer; color: var(--ink); }
.bin b { display: block; color: var(--press); letter-spacing: .06em; }
.bin small { color: var(--ink-2); }
.bin ul { list-style: none; padding: 0; margin: .3rem 0 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.bin li { background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 0 .45rem; font-size: var(--fs-sm); }
.bin.paid { border-top-color: var(--blue); } .bin.free { border-top-color: var(--sage); } .bin.online { border-top-color: var(--red); }
.dot { display: inline-block; width: .8rem; height: 1rem; border-radius: 2px; }

/* cycle */
.cycle-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 760px) { .cycle-grid { grid-template-columns: minmax(0, 340px) 1fr; } }
#cycle-svg { max-width: 340px; margin: 0 auto; }
#cycle-svg .step { cursor: pointer; }
#cycle-svg .step:focus-visible circle { stroke: var(--blue); stroke-width: 5; }

/* pages compare */
.pages { position: relative; max-width: 640px; margin: .6rem auto; aspect-ratio: 640 / 760; border: 1.5px solid var(--line); border-radius: 4px; overflow: hidden; background: #fff; }
.page-hand, .page-typed { position: absolute; inset: 0; }
.page-hand > svg, .page-typed > svg { display: block; width: 100%; height: 100%; }
.page-typed { clip-path: inset(0 0 0 var(--cut, 82%)); }
.pages::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--cutpos, 18%); width: 3px; background: var(--red); box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); pointer-events: none; }
.hot { fill: none; stroke: var(--red); stroke-width: 4; stroke-dasharray: 10 6; opacity: 0; transition: opacity .3s; }
.hot.on { opacity: 1; animation: march 1s linear infinite; }
@keyframes march { to { stroke-dashoffset: -16; } }

/* boot widget */
.monitor { position: relative; max-width: 520px; margin: .6rem auto; background: #2a2c33; border-radius: 10px; padding: 14px 14px 46px; }
.screen { position: relative; aspect-ratio: 16 / 10; background: #0d0e11; border-radius: 4px; overflow: hidden; color: #e9e3d4; touch-action: none; user-select: none; -webkit-user-select: none; }
.screen.on { background: linear-gradient(160deg, #e8dfcc, #d8cdb5); }
.screen .boot-msg { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--press); }
.screen .icons { position: absolute; left: 6%; top: 8%; display: grid; gap: 10px; grid-template-columns: repeat(2, 78px); }
.dicon { display: grid; justify-items: center; gap: 2px; padding: 4px; border-radius: 4px; font-size: .78rem; color: var(--press); text-align: center; border: 2px solid transparent; background: none; font-family: inherit; cursor: pointer; }
.dicon svg { width: 38px; height: 38px; }
.dicon.hover { border-color: var(--blue); background: rgba(35, 80, 168, .12); }
.pointer { position: absolute; width: 22px; height: 30px; pointer-events: none; transform: translate(-2px, -2px); }
.screen .wpwin { position: absolute; inset: 6% 6%; background: #fff; border: 2px solid var(--press-2); border-radius: 3px; display: grid; grid-template-rows: auto 1fr; animation: pop .35s ease-out; }
.screen .wpwin .bar { background: var(--press-2); color: #fff; font-size: .8rem; padding: 2px 8px; }
.screen .wpwin .pg { margin: 8px 14% 0; background: #fff; box-shadow: 0 0 0 1px var(--line); position: relative; }
.screen .wpwin .pg i { position: absolute; left: 14px; top: 12px; width: 2px; height: 20px; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.power { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--brass); background: #3a3c44; cursor: pointer; display: grid; place-items: center; }
.power span { width: 12px; height: 12px; border: 2.5px solid var(--brass); border-top-color: transparent; border-radius: 50%; position: relative; }
.power span::after { content: ''; position: absolute; left: 50%; top: -6px; width: 2.5px; height: 9px; background: var(--brass); transform: translateX(-50%); }
.power.lit { box-shadow: 0 0 0 3px rgba(63, 143, 106, .7); }

/* mini word processor */
.wp-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .wp-grid { grid-template-columns: 1fr 15rem; } }
.wp-app { position: relative; border: 2px solid var(--press-2); border-radius: 6px; background: #e9e5dc; overflow: hidden; display: grid; grid-template-rows: auto auto auto 1fr auto; min-height: 420px; }
.wp-title { background: var(--press-2); color: #fff; font-size: var(--fs-sm); padding: .2rem .8rem; }
.wp-menubar { display: flex; flex-wrap: wrap; gap: .1rem; background: #f6f3ec; border-bottom: 1px solid var(--line); padding: .15rem .4rem; font-family: system-ui, sans-serif; font-size: .95rem; }
.menu-wrap { position: relative; }
.menu-btn { font: inherit; border: 0; background: var(--blue); color: #fff; border-radius: 3px; padding: .1rem .7rem; cursor: pointer; }
.menu-btn[aria-expanded="true"] { background: #173a80; }
.menu-ghost { padding: .1rem .55rem; color: #8a847b; }
.menu { position: absolute; left: 0; top: calc(100% + 2px); z-index: 5; background: #fff; border: 1.5px solid var(--press-2); border-radius: 4px; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); min-width: 14rem; display: grid; padding: .2rem; }
.menu[hidden] { display: none; }
.menu button { font: inherit; text-align: left; border: 0; background: none; padding: .3rem .7rem; border-radius: 3px; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; color: var(--ink); }
.menu button small { color: var(--ink-2); font-family: var(--bn-font); }
.menu button:hover, .menu button:focus-visible { background: var(--blue-s); }
.wp-ribbon { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; background: #f6f3ec; border-bottom: 1px solid var(--line); padding: .3rem .5rem; }
.rb { font: inherit; font-size: .95rem; min-width: 2.2rem; border: 1.5px solid #bdb5a6; background: #fff; border-radius: 3px; padding: 0 .45rem; cursor: pointer; color: var(--ink); }
.rb[aria-pressed="true"] { background: var(--blue-s); border-color: var(--blue); color: var(--blue); }
.rb-sep { width: 1px; height: 1.4rem; background: #bdb5a6; margin: 0 .15rem; }
.rb-size { font-size: var(--fs-sm); display: inline-flex; gap: .3rem; align-items: center; }
.rb-size select { font: inherit; font-size: .95rem; }
.wp-page { margin: .8rem clamp(.5rem, 4vw, 2.5rem); background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); padding: 1rem 1.2rem; min-height: 230px; font-family: Georgia, 'Times New Roman', serif; line-height: 1.6; cursor: text; outline: none; overflow-wrap: anywhere; word-break: break-word; }
.wp-page:focus { box-shadow: 0 0 0 3px rgba(35, 80, 168, .35), 0 2px 8px rgba(0, 0, 0, .15); }
.wp-page p { margin: 0 0 .5rem; min-height: 1.6em; white-space: pre-wrap; }
.wp-page .c { position: relative; }
.wp-page .cur { display: inline-block; width: 0; height: 1.15em; border-left: 2px solid var(--ink); vertical-align: text-bottom; margin-right: -2px; animation: blink 1s steps(1) infinite; }
.wp-page:not(:focus) .cur { border-left-color: #9a948a; animation: none; }
.wp-page .ph { color: #a39d93; font-family: var(--bn-font); font-size: 1rem; }
.wp-status { font-size: .85rem; background: var(--press-2); color: #d9d1bf; padding: .1rem .8rem; }
.wp-closed { position: absolute; inset: 0; background: linear-gradient(160deg, #e8dfcc, #d8cdb5); display: grid; place-content: center; justify-items: center; text-align: center; gap: .3rem; z-index: 6; padding: 1rem; }
.wp-closed[hidden] { display: none; }
.desk-icon { font: inherit; border: 2px solid transparent; background: none; display: grid; justify-items: center; gap: .2rem; cursor: pointer; padding: .4rem; border-radius: 4px; }
.desk-icon:hover, .desk-icon:focus-visible { border-color: var(--blue); background: rgba(35, 80, 168, .12); }
.doc-ic { width: 46px; height: 56px; background: #fff; border: 2.5px solid var(--press); border-radius: 3px 14px 3px 3px; position: relative; box-shadow: inset 0 -12px 0 var(--blue); }
.doc-ic::before { content: ''; position: absolute; left: 8px; right: 10px; top: 12px; height: 18px; background: repeating-linear-gradient(180deg, #8c9099 0 2px, transparent 2px 6px); }
.dialog { position: absolute; inset: 0; background: rgba(28, 29, 34, .45); display: grid; place-items: center; z-index: 8; padding: 1rem; }
.dialog[hidden] { display: none; }
.dlg-box { background: #fff; border-radius: 6px; border: 2px solid var(--press-2); padding: 1rem; width: min(24rem, 100%); box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
.dlg-title { font-weight: 800; margin: 0 0 .5rem; }
.dlg-box input { font: inherit; width: 100%; padding: .3rem .6rem; border: 2px solid var(--blue); border-radius: 4px; }
.files { list-style: none; padding: 0; margin: .3rem 0; display: grid; gap: .3rem; max-height: 12rem; overflow: auto; }
.files button { font: inherit; width: 100%; text-align: left; display: flex; align-items: center; gap: .6rem; border: 1.5px solid var(--line); background: #faf6ec; border-radius: 4px; padding: .25rem .6rem; cursor: pointer; }
.files button.sel { border-color: var(--blue); background: var(--blue-s); }
.files .mini-doc { flex: none; width: 18px; height: 22px; border: 2px solid var(--press); border-radius: 2px 6px 2px 2px; box-shadow: inset 0 -5px 0 var(--blue); background: #fff; }
.wp-side { font-size: var(--fs-sm); }
.tasks { list-style: none; padding: 0; margin: .3rem 0 1rem; display: grid; gap: .3rem; }
.tasks li { display: flex; gap: .45rem; align-items: flex-start; padding: .25rem .5rem; border-radius: 4px; background: #faf6ec; border: 1px solid var(--line); line-height: 1.5; }
.tasks li::before { content: ''; flex: none; width: 1rem; height: 1rem; margin-top: .25rem; border: 2px solid var(--ink-2); border-radius: 3px; background: #fff; }
.tasks li.done { background: var(--sage-s); border-color: var(--sage); }
.tasks li.done::before { background: var(--sage); border-color: var(--sage); box-shadow: inset 0 0 0 2px #fff; }
.kbd { display: grid; gap: 4px; margin: .8rem 0 .2rem; user-select: none; -webkit-user-select: none; font-family: system-ui, sans-serif; }
.kbd .row { display: flex; gap: 4px; justify-content: center; }
.kbd button { font: inherit; font-size: clamp(.72rem, 2.6vw, 1rem); flex: 1 1 0; min-width: 0; max-width: 3.2rem; height: 2.5rem; border: 1.5px solid #6c7078; border-radius: 4px; background: linear-gradient(180deg, #fafafa, #dcdcdc); color: var(--ink); cursor: pointer; padding: 0; box-shadow: 0 2px 0 #8c9099; }
.kbd button:active, .kbd button.press { transform: translateY(2px); box-shadow: none; background: var(--blue-s); }
.kbd button.wide { max-width: 5.6rem; flex-grow: 1.7; font-size: clamp(.58rem, 2.2vw, .95rem); }
.kbd button.space { max-width: 18rem; flex-grow: 6; }
.kbd button.on { background: var(--blue); color: #fff; }

/* fox race */
.target { font-family: Georgia, serif; font-size: var(--fs-lg); background: #fff; border: 1.5px dashed var(--line); padding: .4rem .8rem; border-radius: 4px; overflow-wrap: anywhere; }
.target .g { color: var(--ok); } .target .b { color: #fff; background: var(--red); border-radius: 2px; } .target .n { text-decoration: underline 2px var(--blue); }
.fox-in input { font: inherit; font-family: Georgia, serif; width: 100%; padding: .4rem .7rem; border: 2px solid var(--press-2); border-radius: 4px; }
.alpha { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 3px; margin: .6rem 0; font-family: Georgia, serif; }
.alpha span { text-align: center; padding: .15rem 0; border-radius: 2px; background: #e8e3d8; color: #8a847b; font-weight: 700; }
.alpha span.on { background: linear-gradient(180deg, #b9bcc4, #8c9099); color: var(--press); box-shadow: inset 0 -3px 0 #6c7078; }

/* flip cards */
.flips { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); }
.flip { font: inherit; border: 0; padding: 0; background: none; cursor: pointer; perspective: 800px; min-height: 9rem; text-align: left; color: var(--ink); }
.flip .in { position: relative; display: block; height: 100%; min-height: 9rem; transition: transform .5s; transform-style: preserve-3d; }
.flip.on .in { transform: rotateY(180deg); }
.flip .f, .flip .b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 4px; padding: .7rem .9rem; display: grid; align-content: center; }
.flip .f { background: var(--press-2); color: #fff; justify-items: center; text-align: center; font-size: var(--fs-xl); font-weight: 800; border-bottom: 5px solid var(--brass); }
.flip .f small { font-size: var(--fs-sm); font-weight: 400; color: #d9d1bf; }
.flip .b { background: #fff; border: 1.5px solid var(--line); transform: rotateY(180deg); font-size: var(--fs-sm); line-height: 1.6; }

/* story */
.story .part-tag { margin-bottom: .6rem; }

/* player */
.player { border-radius: 8px; background: linear-gradient(170deg, var(--press), #2a2c33); padding: clamp(.5rem, 2vw, 1rem); color: #fff; border: 3px solid var(--brass); }
.stage { position: relative; border-radius: 4px; overflow: hidden; }
.stage svg:not(.ic) { width: 100%; height: auto; display: block; }
.big-play { position: absolute; inset: 0; margin: auto; width: 5.5rem; height: 5.5rem; border-radius: 50%; border: 4px solid var(--press); background: var(--brass); color: var(--press); display: grid; place-items: center; cursor: pointer; }
.big-play .ic { width: 2.4rem; height: 2.4rem; }
.big-play.hide { display: none; }
.caption { min-height: 3.6em; margin: .75rem .25rem; font-size: var(--fs-lg); line-height: 1.6; }
.controls { display: flex; align-items: center; gap: .6rem; }
.ctrl { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: var(--brass); color: var(--press); display: grid; place-items: center; cursor: pointer; flex: none; }
.controls input { flex: 1; min-width: 0; accent-color: var(--brass); }
.time { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); white-space: nowrap; }
.chapters { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: .75rem 0 0; list-style: none; }
.chapters button { border: 1px solid rgba(255, 255, 255, .5); background: transparent; color: #ece6d8; border-radius: 3px; padding: .1rem .7rem; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.chapters button.on { background: var(--brass); border-color: var(--brass); color: var(--press); }

/* table */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.cmp { width: 100%; border-collapse: collapse; background: var(--card); min-width: 36rem; border: 2px solid var(--press-2); }
.cmp th, .cmp td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; vertical-align: top; }
.cmp thead th { background: var(--press-2); color: #fff; }
.cmp td:first-child { font-weight: 800; color: var(--red-d); }
.cmp tbody tr:nth-child(even) td { background: #faf6ec; }

/* quiz */
.score-pill { display: inline-block; background: var(--press-2); color: #fff; padding: .1rem .9rem; border-radius: 4px; font-weight: 700; }
.lk-q { background: var(--card); border-radius: 4px; padding: 1rem; margin: .8rem 0; border: 1.5px solid var(--line); border-left: 6px solid var(--red); }
.lk-q-stem { font-weight: 700; margin-bottom: .6rem; }
.lk-opts { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }
.lk-opt { display: flex; gap: .6rem; align-items: center; text-align: left; font: inherit; padding: .45rem .7rem; border: 2px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); cursor: pointer; }
.lk-opt-key { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 3px; background: var(--press-2); color: #fff; flex: none; font-size: .95rem; }
.lk-opt.is-right { border-color: var(--ok); background: #e7f4ec; }
.lk-opt.is-wrong { border-color: var(--no); background: #fbe9e6; }
.lk-explain { margin: .6rem 0 0; }
.lk-explain.ok { color: var(--ok); } .lk-explain.no { color: var(--no); }
.qa details, .cq-parts details { background: var(--card); border-radius: 4px; padding: .6rem .9rem; margin: .5rem 0; border-left: 5px solid var(--brass); }
.cq .cq-parts details { background: #faf6ec; }
.qa summary, .cq-parts summary { cursor: pointer; font-weight: 700; }
.qa details p, .cq-parts details p { margin: .6rem 0 .2rem; }
.cq { margin: 1rem 0; }
.cq-stem { font-weight: 700; }
.cq-parts { list-style: none; padding: 0; }
.summary ul { padding-left: 1.3rem; }
.summary li { margin: .4rem 0; }
.summary li::marker { color: var(--red); }

.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 2rem 1rem; }
.pager-btn { display: inline-block; padding: .5rem 1.1rem; border-radius: 4px; background: var(--press-2); color: #fff; text-decoration: none; font-weight: 700; border: 2px solid var(--press); }
.pager-btn.disabled { background: #e8e3d8; color: #6b6358; border-color: #d6cfc0; }
.credit { color: var(--ink-2); font-size: var(--fs-sm); padding-bottom: 2rem; }

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
[data-reveal].is-in { opacity: 1; transform: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

ol { list-style-type: bengali; }
#store-svg { max-width: 680px; margin: 0 auto; }
