/* ৫ম শ্রেণি English for Today — "লাইব্রেরি" থিম: কালি-নীল তাক, বইয়ের রঙিন পিঠ, সিলমারা লাইব্রেরি কার্ড */
.eft-page {
  --ink: #17465a; --ink-2: #0f3342; --kraft: #e9d3a6; --kraft-2: #f5e8cb; --stamp: #c4323f;
  --mustard: #e8a317; --leaf: #3d8b4f; --sky: #3a86c8; --plum: #8a4c9c; --paper: #fffdf8; --line: #d9c7a0;
  background: linear-gradient(#e7eef0, #f4f7f5 420px); padding-bottom: 3rem;
}
.eft-root .wrap { max-width: 1080px; }
.eft-root h1, .eft-root h2, .eft-root h3 { font-family: "Hind Siliguri", sans-serif; margin: 0; }
.eft-root [lang="en"] { font-family: "Nunito", "Segoe UI", system-ui, sans-serif; }
.eft-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eft-root button { font: inherit; cursor: pointer; }
.eft-root :focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }

/* হিরো */
.eft-hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.6rem; margin: 1.4rem 0 1rem; padding: 1.6rem; border-radius: 22px;
  background: var(--ink) repeating-linear-gradient(90deg, transparent 0 46px, rgba(255,255,255,.035) 46px 48px); color: #eaf3f5; position: relative; overflow: hidden; }
.eft-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: #6b4a2b; box-shadow: 0 -4px 0 #8a6239; }
.eft-crumb { margin: 0 0 .6rem; font-size: .92rem; color: #a9c7d0; }
.eft-crumb a { color: #fff; }
.eft-root .eft-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; display: grid; gap: .35rem; }
.eft-hero h1 [lang="en"] { font-weight: 900; letter-spacing: -.01em; }
.eft-hero h1 small { font-size: 1.15rem; font-weight: 600; color: var(--kraft); }
.eft-goals { margin: 1rem 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.eft-goals li { padding-left: 1.6rem; position: relative; line-height: 1.5; }
.eft-goals li::before { content: "★"; position: absolute; left: 0; color: var(--mustard); }
.eft-book { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.eft-book span { background: rgba(255,255,255,.1); padding: .45rem .8rem; border-radius: 999px; }
.eft-book a { background: var(--mustard); color: #2b1d00; font-weight: 700; padding: .5rem 1rem; border-radius: 999px; text-decoration: none; }
.eft-book a:hover { background: #ffc24a; }
.eft-book-note { margin: .6rem 0 1rem; font-size: .92rem; color: #bcd3d9; }

/* লাইব্রেরি কার্ড */
.eft-card { background: var(--kraft-2); color: #3a2a12; border-radius: 6px; padding: 1rem 1rem .8rem; transform: rotate(1.2deg); align-self: start;
  box-shadow: 0 10px 0 -4px var(--kraft), 0 18px 30px rgba(0,0,0,.25);
  background-image: repeating-linear-gradient(transparent 0 27px, #d8c39a 27px 28px); }
.eft-card-top { display: flex; justify-content: space-between; font-weight: 700; border-bottom: 3px double #b49c6c; padding-bottom: .4rem; letter-spacing: .02em; }
.eft-card-no { color: var(--stamp); }
.eft-card-buddy { display: flex; gap: .6rem; align-items: center; margin: .6rem 0; }
.eft-bird { width: 76px; flex: none; }
.eft-bubble { margin: 0; background: #fff; border-radius: 14px; padding: .55rem .7rem; font-size: .95rem; line-height: 1.45; position: relative; box-shadow: 0 2px 0 #d9c7a0; }
.eft-bubble::before { content: ""; position: absolute; left: -8px; top: 50%; border: 8px solid transparent; border-right-color: #fff; border-left: 0; transform: translateY(-50%); }
.eft-card-buddy.is-pop .eft-bird { animation: eft-hop .6s ease; }
@keyframes eft-hop { 30% { transform: translateY(-10px) rotate(-6deg); } 60% { transform: translateY(0) rotate(3deg); } }
.eft-stamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.eft-slot a { display: grid; justify-items: center; gap: .1rem; padding: .45rem .2rem; border: 2px dashed #b49c6c; border-radius: 10px; text-decoration: none; color: #6b5532; font-size: .8rem; min-height: 78px; }
.eft-slot-icon { font-size: 1.25rem; filter: grayscale(1); opacity: .55; }
.eft-slot-stars { color: #b49c6c; letter-spacing: .05em; }
.eft-slot.is-done a { border: 2px solid var(--stamp); color: var(--stamp); background: rgba(196,50,63,.07); transform: rotate(-3deg); }
.eft-slot.is-done .eft-slot-icon { filter: none; opacity: 1; }
.eft-slot.is-done .eft-slot-stars { color: var(--stamp); }
.eft-slot.is-new a { animation: eft-stamp .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes eft-stamp { 0% { transform: scale(1.8) rotate(-14deg); opacity: 0; } 100% { transform: scale(1) rotate(-3deg); opacity: 1; } }
.eft-card-total { margin: .6rem 0 0; text-align: right; font-weight: 700; }

.eft-jump { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.2rem; }
.eft-jump a { background: #fff; border: 2px solid var(--ink); color: var(--ink); padding: .3rem .85rem; border-radius: 999px; text-decoration: none; font-weight: 600; }
.eft-jump a:hover { background: var(--ink); color: #fff; }

/* অংশ */
.eft-sec { background: var(--paper); border-radius: 18px; padding: 1.3rem 1.3rem 1.4rem; margin: 0 0 1.1rem; border: 1px solid #dfe7e9; scroll-margin-top: 4rem; }
.eft-sec-head { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; }
.eft-sec-icon { font-size: 1.7rem; width: 3rem; height: 3rem; display: grid; place-items: center; background: var(--kraft-2); border-radius: 12px; flex: none; }
.eft-sec h2 { font-size: 1.45rem; color: var(--ink-2); }
.eft-sec-head p { margin: .15rem 0 0; color: #50616a; }

.eft-story { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.2rem; }
.eft-story-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: .7rem; }
.eft-story-steps li { counter-increment: s; position: relative; padding: .7rem .9rem .7rem 3rem; background: #f2f7f8; border-radius: 12px; line-height: 1.65; }
.eft-story-steps li::before { content: counter(s, bengali); position: absolute; left: .8rem; top: .7rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; }
.eft-people { display: grid; gap: .6rem; align-content: start; }
.eft-people figure { margin: 0; display: flex; gap: .7rem; align-items: center; padding: .6rem .8rem; border-radius: 12px; border: 2px solid var(--kraft); }
.eft-people figure > span { font-size: 2rem; }
.eft-people b { font-size: 1.1rem; }
.eft-people em { display: block; font-style: normal; color: #5a6b73; font-size: .9rem; }

.eft-hear { border: 0; background: #e3f0f6; border-radius: 999px; padding: .25rem .55rem; font-size: 1rem; line-height: 1; vertical-align: middle; }
.eft-hear:hover { background: #cfe5ef; }

.eft-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.eft-lines li { display: flex; gap: .5rem; align-items: flex-start; }
.eft-line { flex: 1; text-align: left; border: 2px solid #d7e4e8; background: #fff; border-radius: 14px; padding: .7rem .9rem; display: grid; gap: .3rem; }
.eft-line > [lang="en"] { font-size: 1.15rem; font-weight: 700; color: var(--ink-2); }
.eft-line-bn { display: none; color: #2f4a55; }
.eft-line-bn small { display: block; color: #6a7c84; margin-top: .15rem; }
.eft-line[aria-expanded="true"] { border-color: var(--leaf); background: #f3faf4; }
.eft-line[aria-expanded="true"] .eft-line-bn { display: block; }
.eft-line[aria-expanded="false"]::after { content: "চাপ দিলে অর্থ দেখাবে"; font-size: .8rem; color: #8a9aa1; }
.eft-lines .eft-hear { margin-top: .7rem; }
.eft-phrases { margin-top: 1.2rem; background: #fff7e3; border-radius: 14px; padding: .9rem 1rem; }
.eft-phrases h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.eft-phrases ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem .9rem; }
.eft-phrases li [lang="en"] { font-weight: 700; }
.eft-phrases small { display: block; color: #6d5a2d; }

/* শব্দকার্ড: বইয়ের পিঠের রঙে */
.eft-words { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.eft-words li:nth-child(6n+1) { --c: var(--sky); } .eft-words li:nth-child(6n+2) { --c: var(--stamp); } .eft-words li:nth-child(6n+3) { --c: var(--leaf); }
.eft-words li:nth-child(6n+4) { --c: var(--plum); } .eft-words li:nth-child(6n+5) { --c: #d9731c; } .eft-words li:nth-child(6n) { --c: var(--ink); }
.eft-flip { position: relative; min-height: 230px; }
.eft-face { position: absolute; inset: 0; border-radius: 14px; padding: .9rem; transition: transform .45s ease, opacity .3s; backface-visibility: hidden; }
.eft-front { border: 0; background: var(--c); color: #fff; display: grid; place-items: center; align-content: center; gap: .2rem; box-shadow: inset 8px 0 0 rgba(0,0,0,.15), 0 4px 0 rgba(0,0,0,.12); }
.eft-front b { font-size: 1.55rem; }
.eft-front small { opacity: .85; letter-spacing: .04em; }
.eft-front i { font-size: .8rem; background: rgba(255,255,255,.2); padding: .1rem .5rem; border-radius: 99px; font-style: normal; }
.eft-emoji { font-size: 2rem; }
.eft-back { background: #fff; border: 3px solid var(--c); transform: rotateY(180deg); opacity: 0; display: flex; flex-direction: column; gap: .25rem; overflow: auto; }
.eft-flip.is-flipped .eft-front { transform: rotateY(180deg); opacity: 0; pointer-events: none; }
.eft-flip.is-flipped .eft-back { transform: none; opacity: 1; }
.eft-mean { margin: 0; font-weight: 700; font-size: 1.15rem; color: var(--c); }
.eft-ex { margin: 0; font-weight: 600; } .eft-exbn { margin: 0; color: #5a6b73; font-size: .9rem; }
.eft-back dl { margin: .2rem 0; display: grid; gap: .1rem; font-size: .88rem; }
.eft-back dl div { display: flex; gap: .4rem; } .eft-back dt { color: #6a7c84; } .eft-back dd { margin: 0; font-weight: 600; }
.eft-back-actions { margin-top: auto; display: flex; gap: .35rem; flex-wrap: wrap; }
.eft-turn { border: 0; background: #f0f0f0; border-radius: 999px; padding: .25rem .6rem; }

/* নিয়ম */
.eft-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .9rem; }
.eft-rule { border-top: 6px solid var(--mustard); background: #fffaf0; border-radius: 12px; padding: .9rem 1rem; }
.eft-rule:nth-child(2) { border-color: var(--sky); background: #f3f8fd; } .eft-rule:nth-child(3) { border-color: var(--leaf); background: #f3faf4; }
.eft-rule h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.eft-rule p { margin: 0 0 .6rem; line-height: 1.6; }
.eft-rule ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.eft-rule li { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.eft-rule li [lang="en"] { font-weight: 700; font-size: 1.05rem; }
.eft-rule li small { flex-basis: 100%; color: #6a7c84; margin-top: -.2rem; }
.eft-syll b { color: var(--stamp); font-size: 1.2em; }

/* অনুশীলন */
.eft-practice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; margin-bottom: 1.1rem; }
.eft-practice .eft-sec { margin: 0; }
.eft-start { border: 0; background: var(--ink); color: #fff; font-weight: 700; padding: .7rem 1.3rem; border-radius: 12px; box-shadow: 0 4px 0 var(--ink-2); }
.eft-start:hover { background: #1f5a73; } .eft-start:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-2); }
.eft-count { margin: 0 0 .3rem; color: #7a8b92; font-size: .85rem; }
.eft-prompt { font-size: 1.15rem; line-height: 1.6; margin: 0 0 .8rem; }
.eft-gap { display: inline-block; min-width: 5.5em; border-bottom: 3px dotted var(--ink); color: transparent; text-align: center; }
.eft-gap.is-filled { color: var(--leaf); font-weight: 800; border-color: var(--leaf); }
.eft-choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.eft-choices button { border: 2px solid #c9d8dd; background: #fff; border-radius: 12px; padding: .55rem 1rem; font-weight: 700; min-width: 6rem; box-shadow: 0 3px 0 #c9d8dd; }
.eft-choices button:hover:not(:disabled) { border-color: var(--ink); }
.eft-choices button.is-right { background: #e2f4e5; border-color: var(--leaf); box-shadow: 0 3px 0 var(--leaf); }
.eft-choices button.is-wrong { background: #fbe7e8; border-color: var(--stamp); opacity: .7; animation: eft-shake .3s; }
@keyframes eft-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.eft-choices.is-syll button { font-size: 1.3rem; font-family: "Nunito", system-ui, sans-serif; }
.eft-fb { min-height: 1.5em; margin: .7rem 0 0; font-weight: 600; }
.eft-fb.is-ok { color: var(--leaf); } .eft-fb.is-no { color: var(--stamp); }
.eft-done p { font-size: 1.1rem; }
.eft-qa { margin: 0; padding-left: 1.3rem; display: grid; gap: .9rem; }
.eft-qa p { margin: 0 0 .35rem; }
.eft-qa input, .eft-sec textarea { width: 100%; border: 2px solid #d3dfe3; border-radius: 10px; padding: .5rem .7rem; font: inherit; box-sizing: border-box; }
.eft-reveal { margin-top: .35rem; border: 0; background: #fff1cf; border-radius: 999px; padding: .3rem .8rem; font-weight: 600; }
.eft-ans { margin: .4rem 0 0 !important; background: #f0f8f2; border-left: 4px solid var(--leaf); padding: .45rem .6rem; border-radius: 6px; }
.eft-ans small { display: block; color: #5a6b73; }
.eft-hint { color: #6a7c84; font-size: .9rem; }
.eft-model { margin-top: .9rem; background: #f3f8fd; border-radius: 12px; padding: .8rem 1rem; }
.eft-model h3 { font-size: 1rem; }
.eft-speak { margin: 0; padding-left: 1.3rem; display: grid; gap: .7rem; }
.eft-speak li { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.eft-speak li p { margin: 0; flex-basis: 100%; font-weight: 700; font-size: 1.08rem; }
.eft-speak li.is-done p { color: var(--leaf); }
.eft-mic { border: 2px solid var(--stamp); color: var(--stamp); background: #fff; border-radius: 999px; padding: .25rem .8rem; font-weight: 700; }
.eft-said { color: #50616a; font-size: .9rem; }

.eft-tip { background: var(--kraft-2); border-radius: 16px; padding: 1rem 1.2rem; margin-bottom: 1.6rem; }
.eft-tip h2 { font-size: 1.15rem; margin-bottom: .3rem; }
.eft-tip p { margin: 0 0 .4rem; line-height: 1.65; }
.eft-fine { font-size: .82rem; color: #6d5a2d; }

/* ইউনিটের তাক */
.eft-shelf-h { font-size: 1.2rem; color: var(--ink-2); margin: 0 0 .5rem; }
.eft-shelf ol { list-style: none; margin: 0; padding: .8rem .8rem 0; display: flex; gap: 6px; overflow-x: auto; align-items: flex-end; background: var(--ink); border-radius: 14px 14px 0 0; border-bottom: 14px solid #6b4a2b; }
.eft-shelf li { flex: none; }
.eft-shelf li > a, .eft-shelf li > span { display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 44px; height: 170px; padding: .4rem 0; border-radius: 4px 4px 0 0; text-decoration: none; color: #fff; background: #5d7f8c; box-sizing: border-box; }
.eft-shelf li:nth-child(5n+1) > * { background: #c4323f; height: 176px; } .eft-shelf li:nth-child(5n+2) > * { background: #e8a317; color: #2b1d00; height: 158px; }
.eft-shelf li:nth-child(5n+3) > * { background: #3d8b4f; height: 182px; } .eft-shelf li:nth-child(5n+4) > * { background: #3a86c8; height: 166px; } .eft-shelf li:nth-child(5n) > * { background: #8a4c9c; height: 172px; }
.eft-shelf .eft-spine-title { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .78rem; font-weight: 700; white-space: nowrap; overflow: hidden; flex: 1; font-family: "Nunito", system-ui, sans-serif; }
.eft-shelf li.is-soon > span { opacity: .45; } .eft-shelf small { font-size: .6rem; }
.eft-shelf li.is-current > a { transform: translateY(-14px); box-shadow: 0 0 0 3px #fff; }
.eft-empty { padding: 2rem 0; }

@media (max-width: 820px) {
  .eft-hero, .eft-story, .eft-practice { grid-template-columns: 1fr; }
  .eft-card { transform: none; }
  .eft-hero { padding: 1.2rem; }
}
@media (max-width: 420px) { .eft-stamps { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .eft-root *, .eft-root *::before { animation: none !important; transition: none !important; } }
.eft-words + .eft-game { margin-top: 1.2rem; }
