:root {
  --ink: #463f61;
  --ink-soft: #7d7597;
  --lilac: #e4d9f8;
  --lilac-deep: #9a85d0;
  --rose: #d3527d;
  --rose-soft: #fbd6e3;
  --card: rgba(255, 255, 255, 0.62);
  --card-border: rgba(255, 255, 255, 0.85);
  --shadow: 0 18px 50px -20px rgba(154, 133, 208, 0.45);
  --ok: #4f9d7a;
  --bad: #c9506b;
  --serif: "Fraunces", "Georgia", serif;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, #d9ccf7 0%, transparent 45%),
    radial-gradient(circle at 92% 30%, #fbdbe6 0%, transparent 42%),
    linear-gradient(160deg, #ece3fa 0%, #f8e6f0 55%, #fde0e8 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* floating petals */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.petal {
  position: absolute;
  border-radius: 60% 40% 60% 40%;
  filter: blur(14px);
  opacity: 0.45;
  animation: drift 18s ease-in-out infinite;
}
.petal.p1 { width: 190px; height: 190px; background: #e2d4fb; top: 6%; left: -50px; }
.petal.p2 { width: 150px; height: 150px; background: #fbcfe0; top: 42%; right: -40px; animation-delay: -6s; }
.petal.p3 { width: 220px; height: 220px; background: #eadcfb; bottom: 4%; left: 20%; animation-delay: -11s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(24px, -30px) rotate(14deg); }
}

.wrap { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 44px 20px 90px; }

/* header */
.eyebrow { font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: #d778a0; font-weight: 700; margin: 0 0 10px; }
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
h1.hero { font-family: var(--serif); font-weight: 600; font-size: clamp(38px, 8vw, 58px); line-height: 1.02; margin: 0; letter-spacing: -0.02em; }
.hero-sub { font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 20px; margin: 16px 0 30px; max-width: 460px; line-height: 1.35; }
.day-pill {
  flex: none; text-align: center; padding: 16px 24px; border-radius: 30px;
  background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(10px); border: 1px solid var(--card-border);
}
.day-pill b { display: block; font-family: var(--serif); color: var(--rose); font-size: 30px; font-weight: 700; }
.day-pill span { font-size: 12px; letter-spacing: 0.18em; color: var(--ink-soft); font-weight: 700; }

/* cards */
.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: 34px;
  padding: 28px 30px 30px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.tag { display: inline-block; padding: 7px 15px; border-radius: 999px; font-size: 12px; letter-spacing: 0.14em; font-weight: 800; text-transform: uppercase; }
.tag.grammar { background: var(--lilac); color: var(--lilac-deep); }
.tag.vocab { background: var(--rose-soft); color: var(--rose); }
.tag.article { background: #dff1ea; color: #4f9d7a; }
.tag.skills { background: #fdeccd; color: #b98122; }
.mins { font-size: 12px; letter-spacing: 0.14em; color: var(--ink-soft); font-weight: 700; }
.card h2 { font-family: var(--serif); font-size: 32px; line-height: 1.1; margin: 0 0 10px; font-weight: 600; letter-spacing: -0.01em; }
.card p.desc { color: var(--ink-soft); font-size: 16.5px; line-height: 1.6; margin: 0 0 18px; }

.task { display: flex; align-items: center; gap: 14px; padding: 8px 0; cursor: pointer; user-select: none; }
.check {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #e6dcf4;
  background: rgba(255,255,255,.75); display: grid; place-items: center; color: transparent; font-size: 16px; transition: .2s;
}
.task:hover .check { border-color: var(--lilac-deep); }
.task.done .check { background: linear-gradient(135deg, #e28aa9, #b59be6); border-color: transparent; color: #fff; }
.task .label { font-size: 16.5px; color: #6d6588; }
.task.done .label { text-decoration: line-through; color: #b1abc4; }
.task .label a { color: inherit; }

.btn {
  display: inline-block; border: 0; cursor: pointer; font-family: var(--sans); font-weight: 800; font-size: 14.5px;
  padding: 12px 22px; border-radius: 999px; background: linear-gradient(135deg, #e28aa9, #b59be6); color: #fff; text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(211, 82, 125, 0.7); transition: transform .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: rgba(255,255,255,.7); color: var(--ink); box-shadow: none; border: 1px solid var(--card-border); }
.btn.small { padding: 8px 15px; font-size: 13px; }
.card-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

/* encouragement */
.cheer { text-align: center; }
.cheer h3 { font-family: var(--serif); font-size: 26px; margin: 0; font-weight: 600; }
.cheer .love { font-family: var(--serif); font-size: 24px; color: var(--rose); font-weight: 600; margin: 6px 0 14px; }
.progress-chip { display: inline-block; background: #fff; border-radius: 999px; padding: 6px 16px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }

.dots { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 28px 0; }
.dot { width: 17px; height: 17px; border-radius: 50%; background: #e6dcf1; border: 0; padding: 0; cursor: pointer; transition: .2s; }
.dot:hover { transform: scale(1.25); }
.dot.complete { background: #b9a4ea; }
.dot.active { background: var(--rose); transform: scale(1.2); }

.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.nav .mid { font-size: 14px; color: var(--ink-soft); font-weight: 700; }
.nav .btn[disabled] { opacity: .45; cursor: default; transform: none; }

/* skills */
.skill { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px dashed #e6dcf4; }
.skill:first-of-type { border-top: 0; }
.skill .check { margin-top: 0; }
.skill .info { flex: 1; min-width: 0; }
.skill .stype { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: #b98122; }
.skill .stitle { font-size: 15.5px; color: #5d5578; line-height: 1.4; }
.skill .stitle small { color: var(--ink-soft); }
.badge { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #dff1ea; color: #4f9d7a; margin-left: 6px; letter-spacing: .06em; }
.badge.prem { background: #efe6fb; color: var(--lilac-deep); }

/* lesson view */
.back { display: inline-flex; gap: 8px; align-items: center; color: var(--ink-soft); font-weight: 800; text-decoration: none; margin-bottom: 18px; cursor: pointer; background: 0; border: 0; font-family: var(--sans); font-size: 15px; padding: 0; }
.back:hover { color: var(--rose); }
.lesson h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 6vw, 46px); line-height: 1.05; margin: 12px 0 10px; letter-spacing: -0.02em; }
.lesson .sub { color: var(--ink-soft); font-size: 17px; line-height: 1.55; margin: 0 0 26px; }
.sect-title { font-family: var(--serif); font-size: 26px; margin: 0 0 14px; font-weight: 600; }
.prose p { line-height: 1.75; font-size: 17px; margin: 0 0 14px; color: #514a6b; }
.prose strong { color: var(--ink); }
.article-body p { font-family: var(--serif); font-size: 18.5px; line-height: 1.85; color: #4a4364; margin: 0 0 18px; font-weight: 400; }
.article-body mark { background: linear-gradient(transparent 58%, #f9cfe0 58%); color: inherit; font-weight: 700; padding: 0 1px; }
.examples { list-style: none; padding: 0; margin: 4px 0 18px; }
.examples li { background: rgba(255,255,255,.7); border-left: 4px solid #cbbcf0; border-radius: 4px 14px 14px 4px; padding: 10px 14px; margin-bottom: 8px; font-size: 16px; color: #574f72; line-height: 1.55; font-style: italic; }
.mistake { display: grid; gap: 4px; background: rgba(255,255,255,.7); border-radius: 18px; padding: 14px 16px; margin-bottom: 10px; font-size: 15.5px; line-height: 1.5; }
.mistake .w { color: var(--bad); text-decoration: line-through; text-decoration-color: rgba(201,80,107,.5); }
.mistake .r { color: var(--ok); font-weight: 700; }
.mistake .y { color: var(--ink-soft); font-size: 14px; }

.wordgrid { display: grid; gap: 14px; }
.word { background: rgba(255,255,255,.72); border-radius: 22px; padding: 16px 18px; }
.word .wh { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.word .ww { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--rose); }
.word .wp { font-size: 13px; color: var(--ink-soft); font-style: italic; }
.word .wd { margin: 4px 0 6px; line-height: 1.55; font-size: 16px; }
.word .we { font-family: var(--serif); font-style: italic; color: #5c5477; line-height: 1.55; font-size: 16px; }
.word .wc { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; background: var(--lilac); color: #7059b3; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.chip.syn { background: #dff1ea; color: #3f866a; }

.ex { margin-top: 26px; }
.ex h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 4px; font-weight: 600; }
.ex .ins { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 14px; line-height: 1.5; }
.item { background: rgba(255,255,255,.66); border-radius: 20px; padding: 14px 16px; margin-bottom: 10px; }
.item .q { line-height: 1.7; font-size: 16.5px; }
.item .n { color: var(--rose); font-weight: 800; margin-right: 8px; }
input.ans, textarea.ans {
  font-family: var(--sans); font-size: 16px; color: var(--ink); border: 1.5px solid #e4d9f4; background: #fff; border-radius: 12px; padding: 8px 12px; outline: none; transition: .2s;
}
input.ans:focus, textarea.ans:focus { border-color: var(--lilac-deep); box-shadow: 0 0 0 4px rgba(154,133,208,.18); }
input.ans.inline { width: 170px; margin: 0 4px; padding: 4px 10px; }
input.ans.block, textarea.ans { display: block; width: 100%; margin-top: 10px; }
textarea.ans { min-height: 64px; resize: vertical; }
.opts { display: grid; gap: 8px; margin-top: 10px; }
.opt { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 14px; border: 1.5px solid #e9e0f6; background: #fff; cursor: pointer; font-size: 15.5px; }
.opt input { accent-color: var(--rose); }
.opt.picked { border-color: var(--lilac-deep); }
.item.right { outline: 2px solid rgba(79,157,122,.55); }
.item.wrong { outline: 2px solid rgba(201,80,107,.45); }
.fb { margin-top: 9px; font-size: 14.5px; line-height: 1.5; display: none; }
.item.right .fb, .item.wrong .fb, .item.shown .fb { display: block; }
.fb .ok { color: var(--ok); font-weight: 800; }
.fb .no { color: var(--bad); font-weight: 800; }
.fb .model { color: #5b537a; }
.fb .exp { color: var(--ink-soft); }
.score { font-weight: 800; color: var(--rose); margin-left: 6px; }
.tfng { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tfng label { padding: 8px 14px; border: 1.5px solid #e9e0f6; border-radius: 999px; background: #fff; cursor: pointer; font-weight: 700; font-size: 14px; }
.tfng label:has(input:checked) { border-color: var(--lilac-deep); background: #f3edfd; }
.tfng input { display: none; }
.disc li { margin-bottom: 12px; line-height: 1.6; font-size: 17px; }
.disc { padding-left: 22px; }

.empty { text-align: center; color: var(--ink-soft); padding: 30px 10px; font-style: italic; }

/* hearts */
.heart { position: fixed; bottom: 12%; font-size: 26px; pointer-events: none; z-index: 50; animation: floatUp 2.6s ease-out forwards; }
@keyframes floatUp { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-62vh) scale(1.3); opacity: 0; } }

@media (max-width: 560px) {
  .card { padding: 22px 20px 24px; border-radius: 28px; }
  .card h2 { font-size: 27px; }
  .day-pill { padding: 12px 16px; }
  input.ans.inline { width: 130px; }
}

/* illustrations */
.ill { width: 100%; height: auto; display: block; overflow: visible; }
.fl { animation: bob 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(var(--amp, 7px) * -1)); } }
@media (prefers-reduced-motion: reduce) { .fl { animation: none; } }

/* ---------- article: magazine layout ---------- */
.reading-bar { position: fixed; top: 0; left: 0; right: 0; height: 5px; z-index: 40; background: rgba(255,255,255,.4); }
.reading-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #e28aa9, #b59be6); border-radius: 0 5px 5px 0; transition: width .15s; }

.a-hero {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--h1), var(--h2));
  border: 1px solid var(--card-border); border-radius: 40px; padding: 34px 20px 26px 38px; margin: 6px 0 22px;
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.a-hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -70px; top: -90px; border-radius: 50%; background: rgba(255,255,255,.45); filter: blur(30px); pointer-events: none; }
.a-kicker { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.a-hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(31px, 5.2vw, 46px); line-height: 1.04; letter-spacing: -.02em; margin: 16px 0 12px; }
.a-dek { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.5; color: #6a6285; margin: 0 0 16px; }
.a-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.a-meta span { background: rgba(255,255,255,.7); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.a-hero-art { position: relative; z-index: 1; }
.a-hero-art .ill { max-height: 300px; filter: drop-shadow(0 14px 18px rgba(120, 90, 180, .18)); }

.a-tip { text-align: center; font-size: 14px; color: var(--ink-soft); margin: 0 0 10px; }
.a-tip mark, .a-body mark { background: linear-gradient(transparent 60%, #f9cfe0 60%); color: inherit; font-weight: 700; padding: 0 1px; }
.a-body { max-width: 660px; margin: 0 auto; padding: 8px 6px 20px; }
.a-body p { font-family: var(--serif); font-size: 19.5px; line-height: 1.9; color: #4b4465; margin: 0 0 22px; }
.a-body p.first::first-letter {
  font-family: var(--serif); font-weight: 700; float: left; font-size: 4.3em; line-height: .82; padding: 8px 12px 0 0; color: var(--rose);
}
.a-body mark { position: relative; cursor: help; border-radius: 3px; }
.a-body mark[data-def]:hover::after, .a-body mark[data-def]:focus::after {
  content: attr(data-def); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: 260px; background: #3f3860; color: #fff; font: 600 13.5px/1.45 var(--sans); padding: 9px 13px; border-radius: 12px; z-index: 10; text-align: left;
  box-shadow: 0 12px 24px -10px rgba(63,56,96,.6); white-space: normal;
}
.a-body mark[data-def]:hover::before, .a-body mark[data-def]:focus::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%); border: 6px solid transparent; border-top-color: #3f3860; z-index: 10;
}
.pull { margin: 34px -20px 34px; padding: 26px 30px 26px 34px; border-radius: 28px; background: linear-gradient(135deg, #f3ecff, #ffe9f1); border-left: 6px solid var(--rose);
  font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.4; color: var(--ink); position: relative; box-shadow: var(--shadow); }
.pull span { font-size: 64px; color: #e6a3bd; line-height: 0; position: absolute; left: 12px; top: 34px; font-style: normal; }
.orn { text-align: center; letter-spacing: .6em; color: #d9a4bf; margin: 6px 0 30px; font-size: 16px; }

.a-words { margin: 22px 0; }
.a-wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.a-w { background: var(--card); border: 1px solid var(--card-border); border-radius: 20px; padding: 12px 16px; backdrop-filter: blur(10px); }
.a-w b { font-family: var(--serif); font-size: 19px; color: var(--rose); margin-right: 6px; }
.a-w i { font-size: 12px; color: var(--ink-soft); }
.a-w span { display: block; font-size: 14.5px; line-height: 1.45; color: #6d6588; margin-top: 3px; }

.a-q .item, .a-d { }
.d-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.d-card { display: flex; gap: 14px; align-items: flex-start; background: rgba(255,255,255,.72); border-radius: 22px; padding: 16px 18px; }
.d-n { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; color: #fff; background: linear-gradient(135deg, #e28aa9, #b59be6); }
.d-card p { margin: 0 0 10px; font-size: 17px; line-height: 1.55; }

/* illustration in cards */
.card-art { margin: -10px -8px 16px; border-radius: 26px; background: linear-gradient(135deg, var(--h1, #efe6ff), var(--h2, #fde3ec)); padding: 8px 0 2px; overflow: hidden; }
.card-art .ill { height: 190px; width: auto; margin: 0 auto; }
.v-art { margin: 6px 0 4px; border-radius: 34px; background: linear-gradient(135deg, #fde3ec, #efe6ff); padding: 10px 0 4px; box-shadow: var(--shadow); }
.v-art .ill { height: 230px; width: auto; margin: 0 auto; }

@media (max-width: 680px) {
  .a-hero { grid-template-columns: 1fr; padding: 26px 20px 8px; border-radius: 32px; }
  .a-hero-art { order: -1; }
  .a-hero-art .ill { max-height: 220px; margin: 0 auto; }
  .a-body p { font-size: 18.5px; }
  .pull { margin-left: 0; margin-right: 0; font-size: 21px; }
}
