:root {
  --bg: #fff8f0; --paper: #ffffff; --ink: #2d2a3e; --muted: #6b6680; --brand: #c2417a; --accent: #ffb45e;
  --hl: #ffe7a3; --line: #f0e2d6; --focus: #c2410c;
  font-size: clamp(16px, 0.6vw + 13px, 22px);
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 20% 0%, #ffe9f2, transparent 45%), radial-gradient(circle at 90% 10%, #e9e2ff, transparent 40%), var(--bg); color: var(--ink); font-family: "Segoe UI", system-ui, Tahoma, Arial, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
button { font: inherit; color: inherit; cursor: pointer; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .7rem clamp(1rem, 3vw, 2rem); }
.brand { font-weight: 800; color: var(--brand); text-decoration: none; font-size: 1.05rem; }
.top-tools { display: flex; gap: .5rem; flex-wrap: wrap; }
.pill { min-height: 44px; padding: .45rem 1rem; border-radius: 999px; border: 2px solid #f3c6d8; background: #fff; font-weight: 600; }
.pill[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.book { flex: 1; width: min(1100px, 100% - 2rem); margin: .5rem auto; display: grid; place-items: center; }
.page { width: 100%; background: var(--paper); border-radius: 26px; box-shadow: 0 18px 40px #c2417a1f, 0 2px 0 var(--line); overflow: hidden; display: grid; grid-template-columns: 1.15fr 1fr; animation: turn .45s ease; }
@media (max-width: 820px) { .page { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .page { animation: none; } }
@keyframes turn { from { opacity: 0; transform: perspective(900px) rotateY(-12deg) translateX(20px); } to { opacity: 1; transform: none; } }
.pic { background: #fdf1e7; min-height: 260px; }
.pic img { width: 100%; height: auto; object-fit: contain; display: block; }
.words { padding: clamp(1.2rem, 3vw, 2.4rem); display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.words p { font-size: 1.35rem; line-height: 1.75; margin: 0; }
[dir="rtl"] .words p { font-size: 1.5rem; line-height: 1.95; }
.w { border-radius: 6px; transition: background .15s; }
.w.on { background: var(--hl); }
.pnum { color: var(--muted); font-size: .85rem; }
.cover { text-align: center; }
.cover h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: .2rem 0; color: var(--brand); }
.start { align-self: center; min-height: 52px; padding: .6rem 1.6rem; border-radius: 999px; border: 0; background: linear-gradient(90deg, #ff7eb3, #ffb45e); color: #fff; font-weight: 800; font-size: 1.1rem; box-shadow: 0 8px 18px #ff7eb355; }
.quiz h2 { margin: 0; color: var(--brand); }
.q { background: #fff8f0; border: 1px solid var(--line); border-radius: 16px; padding: .8rem 1rem; }
.q p { font-size: 1.1rem; line-height: 1.6; }
.reveal { margin-top: .5rem; min-height: 40px; padding: .3rem .9rem; border-radius: 999px; border: 2px solid #f3c6d8; background: #fff; }
.ans { margin-top: .5rem; background: #eef8f1; border-radius: 12px; padding: .5rem .8rem; color: #24543a; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .4rem 0 .2rem; }
.nav-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 6px 14px #0001; font-size: 2rem; line-height: 1; color: var(--brand); }
.nav-btn:disabled { opacity: .35; cursor: default; }
.dots { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; max-width: 60vw; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 0; padding: 0; background: #f3c6d8; }
.dot[aria-current="true"] { background: var(--brand); transform: scale(1.25); }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: .6rem 0 1rem; }
.foot a { color: var(--brand); font-weight: 700; text-decoration: none; }
