/* ไวยากรณ์ ๗ × ๗ × ๗ — /exam-bank/daily
   ต่อยอดจาก sets.css (คำถาม · เฉลยเบลอ · modal PDF) · สีประจำข้อส่งมาทาง --c */

.ed-shell { max-width: 980px; }

/* ── หัวหน้า ── */
/* ภาพหัวหน้า: การ์ดโปสเตอร์มุมมน ขอบขาว เงาคราม + ประกายลอยเบา ๆ · จอกว้างครอปเป็น 2:1 ให้ปุ่มเริ่มไม่ตกจอ */
.ed-banner { position: relative; margin: .6rem 0 1.3rem; padding: 0; border-radius: 26px; background: #fff;
	border: 6px solid #fff; box-shadow: 0 1px 0 var(--eb-line), 0 18px 40px -18px rgba(49, 46, 129, .45); }
.ed-banner img { display: block; width: 100%; height: auto; border-radius: 20px; aspect-ratio: 3 / 2; object-fit: cover; }
@media (min-width: 720px) { .ed-banner img { aspect-ratio: 2 / 1; object-position: 50% 18%; } }
.ed-banner-spark { position: absolute; font-size: 1.4rem; line-height: 1; color: var(--eb-gold, #f5b301);
	text-shadow: 0 2px 6px rgba(245, 179, 1, .35); animation: ed-twinkle 2.8s ease-in-out infinite; pointer-events: none; }
.ed-banner-spark.s1 { top: -.7rem; left: 1.4rem; }
.ed-banner-spark.s2 { bottom: -.8rem; left: 2rem; font-size: 1.6rem; animation-delay: .9s; }
.ed-banner-spark.s3 { bottom: -.6rem; right: 38%; font-size: 1.1rem; animation-delay: 1.7s; }
@keyframes ed-twinkle { 0%, 100% { transform: translateY(0) scale(1); opacity: .95; } 50% { transform: translateY(-4px) scale(1.15); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .ed-banner-spark { animation: none; } }
.ed-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.2rem 1.6rem; margin: .4rem 0 1.1rem; }
.ed-hero-text { flex: 1 1 24rem; min-width: 0; }
.ed-kicker { font-size: .8rem; font-weight: 700; color: var(--eb-primary); }
.ed-hero h1 { margin: .2rem 0 .1rem; font-size: clamp(1.7rem, 5.4vw, 2.5rem); font-weight: 800; color: var(--eb-ink); letter-spacing: -.01em; line-height: 1.2; }
.ed-777 { color: var(--eb-primary); white-space: nowrap; }
.ed-777 i { font-style: normal; color: var(--eb-gold-dim); font-weight: 700; margin: 0 .05em; }
.ed-lead { margin: .2rem 0 .8rem; font-size: 1rem; color: var(--eb-ink-soft); line-height: 1.6; }
.ed-lead b { color: var(--eb-ink); }
.ed-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.ed-facts li { display: flex; align-items: baseline; gap: .35rem; background: #fff; border: 1px solid var(--eb-line);
	border-radius: 12px; padding: .4rem .75rem; }
.ed-facts b { font-size: 1.15rem; font-weight: 800; color: var(--eb-ink); font-variant-numeric: tabular-nums; }
.ed-facts span { font-size: .8rem; color: var(--eb-ink-soft); }
.ed-hero-side { flex: 1 1 18rem; max-width: 24rem; display: grid; gap: .6rem; }
.ed-book-btn { justify-content: center; padding: .65rem 1rem; }
.ed-finished { font-weight: 800; color: var(--eb-emerald); background: var(--eb-emerald-soft); border-radius: 14px; padding: .8rem 1rem; text-align: center; }

/* ── วิธีใช้ ── */
.ed-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem; margin-bottom: 1.2rem; }
.ed-how div { display: flex; gap: .6rem; align-items: flex-start; background: var(--eb-primary-wash); border-radius: 12px; padding: .65rem .8rem; }
.ed-how b { flex: none; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%;
	background: var(--eb-primary); color: #fff; font-size: .85rem; }
.ed-how span { font-size: .85rem; color: var(--eb-ink); line-height: 1.55; }

/* ── การ์ดสรุปอ่านประกอบ (PDF ประโยค ๑-๒) ── */
.ed-cards { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.2rem; padding: .9rem; border-radius: 18px;
	background: linear-gradient(135deg, #fff 0%, var(--eb-primary-wash) 100%); border: 1px solid var(--eb-line); }
.ed-cards-cover { flex: none; width: 92px; border-radius: 8px; overflow: hidden; transform: rotate(-3deg);
	box-shadow: 0 10px 22px -10px rgba(49, 46, 129, .55); transition: transform .2s; }
.ed-cards-cover:hover { transform: rotate(0) translateY(-2px); }
.ed-cards-cover img { display: block; width: 100%; height: auto; }
.ed-cards-body { min-width: 0; }
.ed-cards-kicker { font-size: .78rem; font-weight: 700; color: var(--eb-primary); }
.ed-cards h2 { margin: .15rem 0 .2rem; font-size: 1.08rem; font-weight: 800; color: var(--eb-ink); line-height: 1.35; }
.ed-cards p { margin: 0 0 .25rem; font-size: .86rem; color: var(--eb-ink-soft); line-height: 1.55; }
.ed-cards p.ed-cards-meta { font-size: .78rem; }
.ed-nowrap { white-space: nowrap; }
.ed-cards-actions { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .5rem; }
.ed-cards-btn { display: inline-flex; align-items: center; gap: .4rem; font-size: .86rem; font-weight: 700; text-decoration: none;
	padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--eb-line); background: #fff; color: var(--eb-primary); }
.ed-cards-btn.is-main { background: var(--eb-primary); border-color: var(--eb-primary); color: #fff; }
.ed-cards-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
@media (max-width: 420px) { .ed-cards { align-items: flex-start; } .ed-cards-cover { width: 74px; } }

/* ── สัปดาห์ ── */
.ed-weeks { display: grid; gap: .8rem; }
.ed-week { background: #fff; border: 1px solid var(--eb-line); border-radius: 16px; padding: .85rem .95rem .95rem; }
.ed-week-head { display: flex; align-items: center; gap: .3rem .7rem; flex-wrap: wrap; margin-bottom: .7rem; }
.ed-week-head h2 { margin: 0; font-size: 1.02rem; font-weight: 800; color: var(--eb-ink); white-space: nowrap; }
.ed-week-topics { font-size: .82rem; color: var(--eb-ink-soft); flex: 1 1 10rem; min-width: 0; }
.ed-week-count { font-size: .8rem; font-weight: 700; color: var(--eb-ink-soft); font-variant-numeric: tabular-nums; }
.ed-week-pdf { font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; border-radius: 999px;
	padding: .3rem .7rem; border: 1px solid #fecaca; background: #fff; color: #b91c1c; }
.ed-week-pdf:hover { background: #fef2f2; }

.ed-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .45rem; }
.ed-day { position: relative; display: grid; gap: .1rem; align-content: start; min-height: 4.1rem; text-decoration: none;
	border-radius: 12px; padding: .5rem .55rem; border: 1px solid color-mix(in srgb, var(--c) 30%, #fff);
	background: color-mix(in srgb, var(--c) 7%, #fff); transition: transform .15s, box-shadow .15s; }
.ed-day:hover { transform: translateY(-1px); box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 22%, transparent); }
.ed-day:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.ed-day-no { font-size: .72rem; font-weight: 700; color: color-mix(in srgb, var(--c) 75%, #0f172a); }
.ed-day-title { font-size: .86rem; font-weight: 800; color: var(--eb-ink); line-height: 1.3; }
.ed-day.next { border: 2px solid var(--c); background: #fff; }
.ed-day.done { background: var(--eb-emerald-soft); border-color: #6ee7b7; }
.ed-day.done .ed-day-no { color: #047857; }
.ed-day-check { position: absolute; top: .45rem; right: .45rem; color: var(--eb-emerald); font-size: .9rem; }
/* ป้ายวิดีโอมุมขวาบน — วันที่ทำแล้วด้วย เครื่องหมายถูกเลื่อนมาอยู่ซ้ายของป้าย */
.ed-day-vid { position: absolute; top: .4rem; right: .4rem; display: grid; place-items: center; width: 1.35rem; height: 1.05rem;
	border-radius: 5px; background: var(--eb-primary); color: #fff; font-size: .6rem;
	box-shadow: 0 1px 3px color-mix(in srgb, var(--eb-primary) 35%, transparent); }
.ed-day-vid + .ed-day-check { right: 1.95rem; }

@media (max-width: 680px) {
	.ed-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
	.ed-days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── หน้าวัน ── */
.ed-tag-topic { background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 70%, #0f172a); }
.ed-summary h3 { margin-bottom: .8rem; }
.ed-done-row { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.ed-summary > .ed-done-row:first-child { margin-top: 0; }
.ed-btn-mark { background: var(--eb-primary); color: #fff; }
.ed-btn-mark:hover { background: var(--eb-primary-dim); }
.ed-btn-done { background: var(--eb-emerald); color: #fff; }
.ed-daynav { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1.2rem; }
.ed-daynav .es-btn { text-decoration: none; }

/* ── วิดีโอติวประจำวัน (โรงงาน ๗×๗×๗) ── */
.ed-video { margin: 0 0 1.6rem; }
.ed-video-frame { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #0f172a;
	box-shadow: 0 14px 34px rgba(30, 41, 59, .14); }
.ed-video-frame video { display: block; width: 100%; height: 100%; }
.ed-video-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .9rem; margin-top: .75rem; }
.ed-video-label { font-weight: 800; font-size: .92rem; color: var(--eb-ink); display: inline-flex; gap: .4rem; align-items: center; }
.ed-video-label i { color: var(--eb-primary); }
.ed-video-chapters { display: flex; flex-wrap: wrap; gap: .4rem; }
.ed-chap { border: 1.5px solid var(--eb-line); background: #fff; border-radius: 999px; padding: .25rem .8rem .35rem;
	font: inherit; font-size: .84rem; font-weight: 700; color: var(--eb-primary-dim); cursor: pointer; min-height: 34px; }
.ed-chap:hover { border-color: var(--eb-primary); }
.ed-chap.on { background: var(--eb-primary); border-color: var(--eb-primary); color: #fff; }
@media print { .ed-video { display: none; } }
