/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --ink: #17223d;
  --ink-soft: #4d5770;
  --cream: #fff9ef;
  --paper: #fffdf8;
  --coral: #ff6846;
  --coral-deep: #e94e32;
  --mint: #69d6b3;
  --mint-deep: #238c72;
  --gold: #f6bd4f;
  --blue: #70a6ec;
  --plum: #a78ad7;
  --line: #e8e1d7;
  --shadow: 0 16px 40px rgba(30, 35, 55, 0.09);
  --serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  background: #ebe7df;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 3px solid rgba(112, 166, 236, 0.58);
  outline-offset: 2px;
}

.app-shell,
.lesson-shell {
  position: relative;
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 2%, rgba(255, 104, 70, 0.08), transparent 26%),
    var(--cream);
}

.app-shell {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.ambient {
  position: absolute;
  z-index: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.08;
  pointer-events: none;
}

.ambient-one {
  top: 290px;
  right: -130px;
  background: var(--coral);
}

.ambient-two {
  top: 850px;
  left: -150px;
  background: var(--mint);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(15px + env(safe-area-inset-top)) 20px 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand img {
  width: 31px;
  height: 31px;
  border-radius: 9px;
}

.brand span {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -1px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.streak-chip,
.xp-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid #eddfd1;
  border-radius: 99px;
  color: var(--coral-deep);
  background: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 800;
}

.icon-button,
.lesson-header > button,
.close-lesson {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #eadfd4;
  border-radius: 50%;
  place-items: center;
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
}

.view {
  position: relative;
  z-index: 1;
  padding: 14px 20px 42px;
}

.page-enter {
  animation: arrive 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 13px 0 24px;
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #8a6f5a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.welcome-row h1,
.library-intro h1,
.progress-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 9vw, 43px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -1.8px;
}

h1 em {
  color: var(--coral-deep);
  font-weight: 400;
}

.level-orbit {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  text-align: center;
}

.level-orbit svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.level-orbit circle {
  fill: none;
  stroke: #eee4d8;
  stroke-width: 4;
}

.level-orbit .progress-ring {
  stroke: var(--coral);
  stroke-linecap: round;
  stroke-dasharray: 201;
  transition: stroke-dashoffset 0.5s ease;
}

.level-orbit strong,
.level-orbit small {
  position: relative;
  display: block;
}

.level-orbit strong {
  padding-top: 19px;
  font-size: 17px;
  line-height: 18px;
}

.level-orbit small {
  color: #948777;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1px;
}

.daily-card {
  position: relative;
  padding: 19px;
  overflow: hidden;
  border: 1px solid rgba(23, 34, 61, 0.08);
  border-radius: 26px;
  background: #ffe5d8;
  box-shadow: 0 20px 45px rgba(89, 63, 47, 0.13);
}

.daily-card::after {
  position: absolute;
  top: -80px;
  right: -74px;
  width: 190px;
  height: 190px;
  border: 42px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  content: "";
}

.daily-card.accent-mint { background: #d9f4e8; }
.daily-card.accent-blue { background: #deebfb; }
.daily-card.accent-gold { background: #fae8b9; }
.daily-card.accent-plum { background: #eadff5; }

.daily-topline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  margin-bottom: 19px;
  color: rgba(23, 34, 61, 0.64);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.daily-topline span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.daily-art {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 17px;
}

.word-stack {
  position: relative;
  display: grid;
  flex: 0 0 86px;
  width: 86px;
  height: 96px;
  border-radius: 22px 22px 30px 20px;
  color: var(--cream);
  background: var(--ink);
  box-shadow: 0 10px 0 rgba(23, 34, 61, 0.12);
  place-items: center;
  transform: rotate(-3deg);
}

.word-stack span {
  z-index: 1;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
}

.word-stack i,
.word-stack b {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.word-stack i {
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  background: var(--gold);
}

.word-stack b {
  right: -4px;
  bottom: 8px;
  width: 17px;
  height: 17px;
  background: var(--coral);
}

.daily-copy {
  min-width: 0;
}

.card-kicker {
  display: block;
  margin-bottom: 4px;
  color: rgba(23, 34, 61, 0.65);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.daily-copy h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -1px;
}

.daily-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #5f5f69;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.skill-tags {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  margin: 20px 0 13px;
}

.skill-tags span {
  padding: 6px 9px;
  border: 1px solid rgba(23, 34, 61, 0.11);
  border-radius: 99px;
  color: rgba(23, 34, 61, 0.72);
  background: rgba(255, 255, 255, 0.3);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.primary-button {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 5px 0 #0b1327;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.primary-button:active:not(:disabled) {
  box-shadow: 0 2px 0 #0b1327;
  transform: translateY(3px);
}

.primary-button:disabled {
  color: #9b9da5;
  background: #e1ded8;
  box-shadow: 0 4px 0 #cbc8c2;
  cursor: default;
}

.review-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  grid-gap: 12px;
  gap: 12px;
  margin-top: 13px;
  padding: 14px;
  border: 1px solid #ecdfd4;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
}

.review-icon {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--coral-deep);
  background: #ffe8df;
  place-items: center;
}

.review-card .eyebrow {
  margin-bottom: 2px;
  font-size: 8px;
}

.review-card h3 {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 16px;
}

.review-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.review-card > button {
  padding: 9px 11px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: var(--coral);
  font-size: 11px;
  font-weight: 800;
}

.section-block {
  margin-top: 30px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-heading .eyebrow {
  margin-bottom: 3px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.6px;
}

.xp-pill {
  height: 30px;
  color: #a16b00;
  border-color: #ebd8a4;
  background: #fff8db;
  font-size: 11px;
}

.week-card {
  display: flex;
  justify-content: space-between;
  padding: 15px 13px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.67);
}

.week-day {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  justify-items: center;
}

.week-day span {
  color: #958a7d;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.week-day i {
  display: grid;
  width: 27px;
  height: 27px;
  border: 1px solid #e3ddd4;
  border-radius: 50%;
  color: white;
  background: #f2eee8;
  place-items: center;
}

.week-day.done i {
  border-color: var(--mint-deep);
  background: var(--mint-deep);
}

.week-day.today i {
  box-shadow: 0 0 0 3px var(--cream), 0 0 0 4px var(--coral);
}

.year-count {
  color: #8d8277;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.path-line {
  position: relative;
}

.path-line::before {
  position: absolute;
  top: 34px;
  bottom: 34px;
  left: 25px;
  width: 1px;
  background: #ddd5cb;
  content: "";
}

.path-item {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  grid-gap: 13px;
  gap: 13px;
  padding: 10px 0;
  border: 0;
  text-align: left;
  background: transparent;
}

.path-node {
  z-index: 1;
  display: grid;
  width: 50px;
  height: 50px;
  border: 5px solid var(--cream);
  border-radius: 17px;
  color: #8b857d;
  background: #e7e1d9;
  place-items: center;
}

.path-item.current .path-node {
  color: white;
  background: var(--coral);
  box-shadow: 0 7px 17px rgba(233, 78, 50, 0.25);
}

.path-item.current .path-node.accent-mint { background: var(--mint-deep); }
.path-item.current .path-node.accent-blue { background: #4d84cc; }
.path-item.current .path-node.accent-gold { background: #c58200; }
.path-item.current .path-node.accent-plum { background: #8162b2; }

.path-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.path-copy small {
  margin-bottom: 3px;
  color: #a09284;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.8px;
}

.path-copy strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.path-copy em {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11px;
  font-style: normal;
}

.bottom-nav {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: min(100%, 520px);
  height: calc(67px + env(safe-area-inset-bottom));
  margin: auto;
  align-items: flex-start;
  justify-content: space-around;
  padding: 7px 24px env(safe-area-inset-bottom);
  border-top: 1px solid rgba(222, 214, 204, 0.9);
  background: rgba(255, 253, 248, 0.93);
  box-shadow: 0 -8px 30px rgba(47, 42, 36, 0.05);
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
}

.bottom-nav button {
  position: relative;
  display: grid;
  min-width: 70px;
  grid-gap: 2px;
  gap: 2px;
  justify-items: center;
  padding: 5px 8px;
  border: 0;
  color: #8e8a84;
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.bottom-nav button.active {
  color: var(--coral-deep);
}

.bottom-nav button.active::before {
  position: absolute;
  top: -8px;
  width: 24px;
  height: 3px;
  border-radius: 9px;
  background: var(--coral);
  content: "";
}

.library-intro,
.progress-hero {
  padding: 13px 0 20px;
}

.library-intro p {
  max-width: 390px;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.55;
}

.filter-row {
  display: flex;
  gap: 7px;
  margin: 7px -20px 16px;
  padding: 0 20px 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-row button {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: #766e65;
  background: rgba(255, 255, 255, 0.65);
  font-size: 10px;
  font-weight: 800;
}

.filter-row button.active {
  color: white;
  border-color: var(--ink);
  background: var(--ink);
}

.concept-list {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.concept-card {
  display: grid;
  width: 100%;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  grid-gap: 12px;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.concept-card:active:not(:disabled) {
  transform: scale(0.99);
}

.concept-index {
  display: grid;
  width: 43px;
  height: 43px;
  border-radius: 14px;
  color: #a43e29;
  background: #ffe1d7;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 800;
  place-items: center;
}

.concept-index.accent-mint { color: #176954; background: #d9f3e8; }
.concept-index.accent-blue { color: #315f9b; background: #dfebfa; }
.concept-index.accent-gold { color: #8b5c00; background: #f9e9bd; }
.concept-index.accent-plum { color: #69489e; background: #eadff5; }

.concept-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.concept-copy small {
  margin-bottom: 3px;
  color: #a09284;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.7px;
}

.concept-copy strong {
  font-family: var(--serif);
  font-size: 16px;
}

.concept-copy em {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10px;
  font-style: normal;
}

.concept-card.locked {
  opacity: 0.52;
}

.concept-card.locked .concept-index {
  color: #8c867e;
  background: #e9e4dc;
}

.lesson-dots {
  display: flex;
  gap: 3px;
}

.lesson-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ded7cd;
}

.lesson-dots i.filled {
  background: var(--coral);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 9px;
  gap: 9px;
  margin-top: 24px;
}

.metric-grid > div {
  display: grid;
  grid-template-columns: 36px 1fr;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.metric-icon {
  display: grid;
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  place-items: center;
}

.metric-icon.fire { color: var(--coral-deep); background: #ffe3da; }
.metric-icon.bolt { color: #9a6900; background: #fff0c8; }
.metric-icon.target { color: #28735f; background: #d9f4e8; }
.metric-icon.star { color: #5a62a6; background: #e4e6ff; }

.metric-grid strong {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 20px;
}

.metric-grid small {
  color: #8c8176;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.chapter-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
}

.chapter-row {
  display: grid;
  grid-template-columns: 27px 1fr 32px;
  align-items: center;
  grid-gap: 10px;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid #eee7de;
}

.chapter-row:last-child { border-bottom: 0; }
.chapter-row > span { color: var(--coral-deep); font-family: var(--serif); font-size: 12px; font-weight: 800; }
.chapter-row > div { min-width: 0; }
.chapter-row strong { display: block; overflow: hidden; margin-bottom: 6px; font-family: var(--serif); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.chapter-row > small { color: #968b80; font-size: 9px; font-weight: 800; }

.thin-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #eee9e3;
}

.thin-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mint-deep);
}

.history-list {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.history-row {
  display: grid;
  width: 100%;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  grid-gap: 12px;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.history-row:active {
  border-color: #c8bcaf;
  transform: scale(0.99);
}

.history-day {
  display: grid;
  width: 48px;
  height: 48px;
  align-content: center;
  grid-gap: 2px;
  gap: 2px;
  justify-items: center;
  border-radius: 15px;
  color: #a43e29;
  background: #ffe1d7;
}

.history-day.accent-mint { color: #176954; background: #d9f3e8; }
.history-day.accent-blue { color: #315f9b; background: #dfebfa; }
.history-day.accent-gold { color: #8b5c00; background: #f9e9bd; }
.history-day.accent-plum { color: #69489e; background: #eadff5; }

.history-day small {
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.history-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.history-copy small {
  margin-bottom: 3px;
  overflow: hidden;
  color: #9a8e82;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.55px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-copy strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-copy em {
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-score {
  display: flex;
  min-width: 44px;
  flex-direction: column;
  align-items: flex-end;
}

.history-score strong {
  color: var(--mint-deep);
  font-family: var(--serif);
  font-size: 16px;
}

.history-score small {
  margin-top: 1px;
  color: #9a8e82;
  font-size: 7px;
  font-weight: 850;
}

.history-score em {
  margin-top: 4px;
  color: var(--coral-deep);
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.history-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 850;
}

.history-toggle svg {
  transition: transform 0.2s;
}

.history-toggle svg.turned {
  transform: rotate(-90deg);
}

.history-empty {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border: 1px dashed #d5c9bc;
  border-radius: 18px;
  color: #7c6c60;
  background: rgba(255, 255, 255, 0.48);
}

.history-empty strong {
  font-family: var(--serif);
  font-size: 13px;
}

.history-empty p {
  margin: 3px 0 0;
  font-size: 9px;
}

.privacy-card,
.save-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 15px;
  border: 1px dashed #d7cab9;
  border-radius: 17px;
  color: #775f4e;
  background: #fff5e5;
}

.privacy-card strong { font-family: var(--serif); font-size: 14px; }
.privacy-card p { margin: 3px 0 0; font-size: 10px; line-height: 1.4; }

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: flex;
  width: min(100%, 520px);
  margin: auto;
  align-items: flex-end;
  padding: 12px;
  background: rgba(14, 20, 36, 0.42);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease both;
}

@keyframes fade-in { from { opacity: 0; } }

.settings-sheet {
  width: 100%;
  padding: 10px 17px calc(22px + env(safe-area-inset-bottom));
  border-radius: 25px;
  background: var(--paper);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: sheet-up 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes sheet-up { from { transform: translateY(50px); opacity: 0; } }

.sheet-handle {
  width: 37px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 99px;
  background: #ddd4c9;
}

.sheet-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sheet-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
}

.setting-row {
  display: grid;
  width: 100%;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  grid-gap: 12px;
  gap: 12px;
  padding: 13px 0;
  border: 0;
  border-top: 1px solid var(--line);
  text-align: left;
  background: transparent;
}

.setting-icon {
  display: grid;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: var(--coral-deep);
  background: #ffe6df;
  place-items: center;
}

.setting-row strong,
.setting-row small { display: block; }
.setting-row strong { font-family: var(--serif); font-size: 14px; }
.setting-row small { margin-top: 2px; color: #8c8176; font-size: 9px; }

.toggle {
  width: 42px;
  height: 24px;
  padding: 3px;
  border-radius: 99px;
  background: #d8d4ce;
  transition: background 0.2s;
}

.toggle i {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s;
}

.toggle.on { background: var(--mint-deep); }
.toggle.on i { transform: translateX(18px); }

.save-note {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 11px;
}

.app-loading {
  display: grid;
  min-height: 100dvh;
  background: var(--cream);
  place-items: center;
}

.mini-mark {
  display: grid;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  color: white;
  background: var(--coral);
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 800;
  place-items: center;
  animation: breathe 1.3s ease-in-out infinite;
}

@keyframes breathe { 50% { transform: scale(1.06) rotate(-2deg); } }

/* Lesson player */
.lesson-shell {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  background:
    radial-gradient(circle at 110% 4%, rgba(255, 104, 70, 0.08), transparent 28%),
    var(--paper);
}

.lesson-header {
  display: grid;
  grid-template-columns: 38px 1fr 32px;
  align-items: center;
  grid-gap: 12px;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 18px 10px;
}

.lesson-header > button {
  background: transparent;
}

.lesson-header > span {
  color: #8f877e;
  font-size: 10px;
  font-weight: 850;
  text-align: right;
}

.lesson-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #ebe7e1;
}

.lesson-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transition: width 0.35s ease;
}

.exercise-area {
  flex: 1 1;
  padding: 25px 22px 170px;
}

.exercise-meta {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 25px;
  color: #8e7f72;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.exercise-number {
  color: var(--coral-deep);
  font-family: var(--serif);
  font-size: 14px;
}

.exercise-meta::after {
  height: 1px;
  flex: 1 1;
  background: #e8e1d8;
  content: "";
}

.exercise-prompt {
  max-width: 440px;
  margin: 0 0 25px;
  font-family: var(--serif);
  font-size: clamp(27px, 8vw, 37px);
  font-weight: 500;
  line-height: 1.17;
  letter-spacing: -1.1px;
}

.exercise-prompt.compact {
  font-size: clamp(25px, 7.5vw, 34px);
}

.exercise-prompt em {
  color: var(--coral-deep);
  font-weight: 400;
}

.choice-list {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.choice-list button {
  display: grid;
  min-height: 59px;
  grid-template-columns: 31px 1fr 28px;
  align-items: center;
  grid-gap: 10px;
  gap: 10px;
  padding: 9px 12px;
  border: 1.5px solid #ded8d0;
  border-radius: 16px;
  text-align: left;
  background: white;
  box-shadow: 0 3px 0 #ded8d0;
  cursor: pointer;
  transition: border 0.15s, background 0.15s, transform 0.15s;
}

.choice-list button > span {
  display: grid;
  width: 29px;
  height: 29px;
  border: 1px solid #e4ddd5;
  border-radius: 9px;
  color: #958b80;
  font-family: var(--serif);
  font-size: 11px;
  place-items: center;
}

.choice-list button strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.choice-list button > i {
  display: grid;
  color: white;
  place-items: center;
}

.choice-list button.selected {
  border-color: var(--ink);
  background: #f2f4f8;
  box-shadow: 0 3px 0 var(--ink);
  transform: translateY(-1px);
}

.choice-list button.correct {
  border-color: var(--mint-deep);
  background: #e2f7ef;
  box-shadow: 0 3px 0 var(--mint-deep);
}

.choice-list button.correct > span {
  color: var(--mint-deep);
  border-color: #80cdb8;
}

.choice-list button.correct > i {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--mint-deep);
}

.choice-list button.wrong {
  border-color: #dc6656;
  background: #fff0ed;
  box-shadow: 0 3px 0 #dc6656;
}

.listen-panel {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  align-items: center;
  grid-gap: 13px;
  gap: 13px;
  margin: -4px 0 25px;
  padding: 13px 15px;
  border: 1px solid #d8e5f7;
  border-radius: 20px;
  color: #315f9b;
  background: #edf4fd;
}

.listen-panel > button {
  display: grid;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 19px;
  color: white;
  background: #4d84cc;
  box-shadow: 0 5px 0 #315f9b;
  place-items: center;
}

.listen-panel > button:active {
  box-shadow: 0 2px 0 #315f9b;
  transform: translateY(3px);
}

.listen-panel span,
.listen-panel small {
  display: block;
}

.listen-panel span { font-family: var(--serif); font-size: 16px; font-weight: 700; }
.listen-panel small { margin-top: 3px; opacity: 0.7; font-size: 9px; }

.sentence-builder {
  display: flex;
  min-height: 126px;
  align-content: flex-start;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 16px;
  border: 1.5px dashed #d7cfc5;
  border-radius: 18px;
  background:
    repeating-linear-gradient(transparent, transparent 36px, rgba(23, 34, 61, 0.05) 36px, rgba(23, 34, 61, 0.05) 37px),
    #fffefa;
}

.builder-placeholder {
  color: #aaa096;
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
}

.sentence-builder button,
.word-pool button {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d8d0c7;
  border-radius: 11px;
  background: white;
  box-shadow: 0 2px 0 #d8d0c7;
  font-family: var(--serif);
  font-size: 14px;
}

.sentence-builder button {
  border-color: #a9c8ee;
  background: #edf5ff;
  box-shadow: 0 2px 0 #a9c8ee;
}

.word-pool {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.correct-sentence {
  margin-top: 19px;
  padding: 11px 13px;
  border-left: 3px solid var(--mint-deep);
  color: #356b5e;
  background: #edf8f4;
  font-family: var(--serif);
  font-size: 13px;
}

.punctuation-card {
  padding: 24px 18px;
  border: 1px solid #e3dbd2;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 2.4;
}

.punctuation-card > span {
  display: inline;
}

.punctuation-card strong {
  font-weight: 500;
}

.punctuation-card button {
  display: inline-grid;
  width: 29px;
  height: 29px;
  margin: 0 5px;
  padding: 0;
  border: 1px dashed #b9aea3;
  border-radius: 9px;
  color: #a0958a;
  vertical-align: middle;
  background: #f8f4ef;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  place-items: center;
}

.punctuation-card button.selected {
  color: white;
  border: 0;
  background: var(--ink);
  box-shadow: 0 3px 0 #080e1c;
}

.punctuation-card button.correct {
  color: white;
  border: 0;
  background: var(--mint-deep);
  box-shadow: 0 3px 0 #16614e;
}

.punctuation-hint {
  color: #8e8378;
  font-family: var(--serif);
  font-size: 12px;
  text-align: center;
}

.match-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  grid-gap: 9px;
  gap: 9px;
}

.match-grid > div {
  display: grid;
  align-content: start;
  grid-gap: 8px;
  gap: 8px;
}

.match-grid button {
  display: flex;
  min-height: 53px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  border: 1.5px solid #ddd6cd;
  border-radius: 14px;
  background: white;
  box-shadow: 0 3px 0 #ddd6cd;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.2;
}

.match-grid button.selected {
  color: #315f9b;
  border-color: #70a6ec;
  background: #edf5ff;
  box-shadow: 0 3px 0 #70a6ec;
}

.match-grid button.matched {
  color: var(--mint-deep);
  border-color: #9edbc9;
  background: #e8f7f1;
  box-shadow: none;
  opacity: 0.72;
}

.match-hint {
  margin-top: 12px;
  color: #b24637;
  font-family: var(--serif);
  font-size: 12px;
  text-align: center;
}

.check-area {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 520px);
  margin: auto;
  padding: 14px 20px calc(17px + env(safe-area-inset-bottom));
  border-top: 1px solid #e6ded5;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 -10px 35px rgba(45, 40, 35, 0.06);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}

.check-area.is-correct {
  border-color: #b9dfd3;
  background: rgba(231, 248, 242, 0.97);
}

.check-area.is-wrong {
  border-color: #efd0ca;
  background: rgba(255, 241, 237, 0.97);
}

.check-area.is-correct .primary-button {
  background: var(--mint-deep);
  box-shadow: 0 5px 0 #17604e;
}

.check-area.is-wrong .primary-button {
  background: #cf5948;
  box-shadow: 0 5px 0 #9f3b2f;
}

.feedback {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-gap: 10px;
  gap: 10px;
  margin-bottom: 12px;
}

.feedback-icon {
  display: grid;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  color: white;
  background: var(--mint-deep);
  place-items: center;
}

.is-wrong .feedback-icon {
  background: #cf5948;
}

.feedback strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--serif);
  font-size: 16px;
}

.feedback p {
  margin: 0;
  color: #5d655f;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.32;
}

.completion-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(30px + env(safe-area-inset-top)) 25px calc(30px + env(safe-area-inset-bottom));
  text-align: center;
}

.close-lesson {
  position: absolute;
  top: calc(15px + env(safe-area-inset-top));
  right: 18px;
}

.completion-mark {
  display: grid;
  width: 100px;
  height: 100px;
  margin-bottom: 27px;
  border: 9px solid #d9f2e9;
  border-radius: 33px;
  color: white;
  background: var(--mint-deep);
  box-shadow: 0 11px 0 #16614e, 0 22px 45px rgba(35, 140, 114, 0.22);
  place-items: center;
  transform: rotate(-3deg);
}

.completion-screen h1 {
  margin: 2px 0 8px;
  font-family: var(--serif);
  font-size: 40px;
  letter-spacing: -1.6px;
}

.completion-screen > p {
  max-width: 330px;
  margin: 0 auto 24px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.5;
}

.result-grid {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
  gap: 10px;
  margin-bottom: 23px;
}

.result-grid > div {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  grid-gap: 5px;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--coral-deep);
  background: white;
}

.result-grid strong {
  font-family: var(--serif);
  font-size: 23px;
}

.result-grid span {
  grid-column: span 2;
  color: #8f8377;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.completion-screen .primary-button {
  max-width: 360px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 8px;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.confetti {
  position: absolute;
  width: 9px;
  height: 25px;
  border-radius: 4px;
  background: var(--coral);
  transform: rotate(24deg);
}

.confetti.one { top: 18%; left: 14%; }
.confetti.two { top: 13%; right: 17%; background: var(--gold); transform: rotate(-35deg); }
.confetti.three { top: 31%; right: 9%; height: 9px; border-radius: 50%; background: var(--blue); }

@media (min-width: 521px) {
  body {
    background:
      linear-gradient(90deg, rgba(23, 34, 61, 0.035) 1px, transparent 1px),
      #ebe7df;
    background-size: 36px 36px;
  }

  .app-shell,
  .lesson-shell {
    min-height: 100vh;
    box-shadow: 0 0 70px rgba(47, 41, 35, 0.14);
  }
}

@media (max-width: 350px) {
  .view { padding-right: 15px; padding-left: 15px; }
  .daily-card { padding: 15px; }
  .word-stack { flex-basis: 72px; width: 72px; height: 84px; }
  .daily-copy h2 { font-size: 24px; }
  .daily-copy p { font-size: 12px; }
  .skill-tags span { padding: 5px 7px; font-size: 8px; }
  .exercise-area { padding-right: 17px; padding-left: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

