/* Shared learning dashboard, library and book pages. */
.main-nav a[aria-current="page"] { color: var(--teal); text-decoration: underline; text-underline-offset: 7px; }
.learning-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 38px 0 25px; }
.learning-heading h1 { font-size: clamp(26px, 3.2vw, 42px); letter-spacing: -.035em; line-height: 1.35; margin-bottom: 10px; }
.learning-heading .eyebrow { margin-bottom: 10px; }
.learning-heading p:last-child { margin-bottom: 0; }
.text-link { color: var(--teal-dark); font-weight: 700; display: inline-flex; align-items: center; gap: 16px; flex-shrink: 0; }
.text-link:hover, .hero-secondary:hover { text-decoration: underline; text-underline-offset: 5px; }
.learning-hero { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 340px; background: linear-gradient(125deg, #edf6ec, #fff9ed); color: #294339; border: 1px solid #dce7d7; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-small); }
.learning-hero-copy { padding: clamp(25px, 3.6vw, 46px); align-self: center; }
.learning-hero-copy .eyebrow { color: #42745c; margin-bottom: 18px; }
.learning-hero-copy h1, .learning-hero-copy h2 { font-size: clamp(30px, 3.7vw, 48px); line-height: 1.15; margin: 16px 0; letter-spacing: -.035em; }
.learning-hero-copy > p:not(.eyebrow) { color: #526b5c; max-width: 45ch; margin-bottom: 24px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: #526b5c; }
.learning-hero .button { background: #f1d085; color: #173438; box-shadow: none; gap: 26px; padding: 12px 22px; }
.learning-hero .button:hover { background: #ffe2a1; }
.hero-secondary { display: block; margin-top: 16px; font-size: 13px; color: #3f7259; }
.learning-hero-image { position: relative; min-width: 0; }
.learning-hero-image img { width: 100%; height: 100%; object-fit: cover; min-height: 340px; }
.image-caption { position: absolute; left: 20px; bottom: 20px; padding: 6px 14px; border-radius: 50px; background: #fffef5ec; color: #173438; font-size: 12px; font-weight: 700; }
.learning-stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 25px 0; margin: 0 0 8px; }
.learning-stats > div { display: flex; flex-direction: column; padding: 0 24px; border-right: 1px solid var(--line); }
.learning-stats > div:first-child { padding-left: 0; }
.learning-stats > div:last-child { border: 0; }
.learning-stats strong { font-size: 28px; letter-spacing: -.04em; line-height: 1.4; }
.learning-stats small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.learning-stats span { font-size: 13px; color: var(--ink-soft); }
.compact-plan.daily-plan { padding: 24px; margin-top: 18px; }
.compact-plan .daily-plan-heading h2 { font-size: 24px; }
.compact-plan .daily-plan-steps > a { padding: 16px; gap: 12px; }
.compact-plan .daily-plan-steps > a > div { flex: 1; }
.compact-plan .daily-plan-steps > a > span:last-child { color: var(--teal); }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.book-card { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.book-cover { position: relative; aspect-ratio: 3 / 2; background: #e9e9de; overflow: hidden; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #132e362c, transparent 50%, #132e3699); pointer-events: none; }
.book-edition { position: absolute; z-index: 1; top: 16px; left: 16px; background: #fffef7f2; color: var(--ink); padding: 5px 10px; font-size: 11px; font-weight: 800; letter-spacing: .1em; border-radius: 7px; }
.book-cover-status { position: absolute; z-index: 1; left: 16px; bottom: 14px; color: white; font-size: 12px; font-weight: 700; }
.book-card-body { padding: 20px; }
.book-card-body h3 { font-size: 22px; margin-bottom: 8px; line-height: 1.3; }
.book-card-body p { color: var(--ink-soft); font-size: 13px; margin-bottom: 15px; }
.book-progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 20px; overflow: hidden; background: #e6ede8; accent-color: var(--teal); }
.book-progress::-webkit-progress-bar { background: #e6ede8; border-radius: 20px; }
.book-progress::-webkit-progress-value { background: var(--teal); border-radius: 20px; }
.book-progress::-moz-progress-bar { background: var(--teal); }
.book-card-link { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; font-weight: 700; color: var(--teal-dark); }
.book-card-link::after { content: ""; position: absolute; }
.book-card:has(.book-card-link):hover { border-color: var(--teal); box-shadow: var(--shadow-small); }
.book-coming .book-cover img { filter: saturate(.35); opacity: .7; }
.book-waiting { font-size: 12px; color: var(--ink-soft); display: block; border-top: 1px solid var(--line); padding-top: 14px; }
.collection-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px; padding: 0 0 25px; color: var(--ink-soft); font-size: 14px; }
.collection-summary strong { color: var(--ink); }
.availability-dot { display: inline-block; width: 7px; height: 7px; background: var(--teal); border-radius: 50%; margin-right: 5px; }
.book-progress-panel { display: flex; align-items: center; gap: 28px; padding: 24px 0; }
.book-progress-panel > div { flex-shrink: 0; }
.book-progress-panel > div span { display: block; font-size: 12px; color: var(--ink-soft); }
.book-progress-panel > progress { flex: 1; }
.photo-unit-card.unit-card { padding: 0; overflow: hidden; }
.unit-cover { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.unit-cover img { width: 100%; height: 100%; object-fit: cover; }
.unit-cover-number { position: absolute; top: 14px; left: 14px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #fffdf5f0; font-weight: 800; }
.unit-card-body { padding: 20px; }
.unit-card-time { color: var(--ink-soft); font-size: 12px; }
.photo-unit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.photo-unit-card h3 { font-size: 22px; margin-top: 20px; }
.unit-card-body { display: flex; flex-direction: column; flex: 1; }
.photo-unit-card .unit-card-footer { padding-top: 12px; border-top: 1px solid var(--line); }
.coming-pill { display: inline-block; padding: 8px 15px; border: 1px solid #c5d8c2; border-radius: 30px; font-size: 13px; }
.dictionary-search { grid-template-columns: minmax(0, 1fr) 190px 200px auto; }
.dictionary-search select[name="book"] { max-width: 220px; }
.dictionary-pagination { display: flex; justify-content: center; align-items: center; gap: 22px; padding: 30px 0; }
.book-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 6px 0 24px; scroll-margin-top: 110px; }
.book-feature { display: flex; align-items: center; gap: 16px; padding: 22px; background: #fffefb; border: 1px solid #dce7d7; border-radius: 18px; }
.book-feature:hover { background: #f0f6eb; border-color: #a0bea0; }
.book-feature > div { flex: 1; }
.book-feature h2 { font-size: 19px; margin: 0 0 5px; }
.book-feature p { font-size: 12px; margin: 0; color: #5c7162; }
.book-feature-symbol { flex: 0 0 44px; height: 44px; display: grid; place-items: center; background: #e8f1e2; color: #476f45; border-radius: 13px; font-size: 19px; font-weight: 700; }
.book-vocabulary .dictionary-hero { padding: 16px 0 26px; gap: 24px; }
.book-vocabulary .dictionary-hero h1 { font-size: clamp(28px, 3.5vw, 42px); margin-bottom: 10px; }
.book-vocabulary .dictionary-hero p:last-child { font-size: 14px; margin-bottom: 0; }
.book-vocabulary .dictionary-count { background: #edf5e7; color: #365b3c; box-shadow: none; border: 1px solid #d9e7d0; min-width: 130px; padding: 20px; border-radius: 20px; }
.book-vocabulary .dictionary-count strong { color: #42663d; font-size: 34px; }
.book-vocabulary .dictionary-count span { color: #536d50; }
.book-vocabulary .dictionary-search { grid-template-columns: minmax(0, 1fr) 250px auto; }
.book-vocabulary .dictionary-search .button { background: #f1d99a; color: #364a33; border-color: #e6d09b; }
.book-vocabulary .dictionary-ai { background: #e9f1e2; color: #3b653f; border-color: #cfdfc6; }
.dashboard-book-features { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.dashboard-book-features a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; border: 1px solid #dce7d7; border-radius: 7px; color: #3d694b; background: #f3f7ed; font-size: 11px; }
.dashboard-book-features a:hover { background: #e5efda; border-color: #a0be98; }
@media (max-width: 850px) {
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dictionary-search { grid-template-columns: 1fr 1fr; }
  .dictionary-search input { grid-column: 1 / -1; }
  .dictionary-search .button { grid-column: 1 / -1; }
  .compact-plan .daily-plan-steps { grid-template-columns: 1fr; }
  .learning-hero-copy { padding: 28px; }
}
@media (max-width: 640px) {
  .book-features { grid-template-columns: 1fr; gap: 10px; }
  .book-feature { padding: 17px; }
  .book-vocabulary .dictionary-search { grid-template-columns: 1fr; }
  .book-vocabulary .dictionary-hero { align-items: flex-start; }
  .book-vocabulary .dictionary-count { min-width: 0; padding: 12px 16px; }
  .site-header { flex-wrap: wrap; gap: 12px; }
  .site-header .brand-copy { display: flex; }
  .main-nav { width: 100%; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; }
  .main-nav > a:not(.button) { min-height: 36px; display: inline-flex; align-items: center; }
  .main-nav .user-chip { display: none; }
  .learning-heading { align-items: flex-start; flex-direction: column; padding: 24px 0; gap: 12px; }
  .learning-heading h1 { overflow-wrap: anywhere; }
  .learning-hero { grid-template-columns: 1fr; border-radius: 20px; }
  .learning-hero-copy { padding: 25px; }
  .learning-hero-image { grid-row: 1; }
  .learning-hero-image img { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .learning-stats { grid-template-columns: repeat(2, 1fr); gap: 20px 0; }
  .learning-stats > div:nth-child(3) { padding-left: 0; }
  .learning-stats > div:nth-child(even) { border: 0; }
  .book-grid, .photo-unit-grid { grid-template-columns: 1fr; }
  .compact-plan .daily-plan-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .compact-plan.daily-plan { padding: 18px; }
  .book-progress-panel { flex-wrap: wrap; gap: 12px; }
  .book-progress-panel > div { width: 100%; }
  .section-heading-row { align-items: flex-start; flex-direction: column; }
  .dictionary-search select[name="book"] { max-width: none; width: 100%; }
  .dictionary-search { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
