:root {
  color-scheme: light;
  --ink: #1f2821;
  --muted: #667467;
  --paper: #f7f1e5;
  --panel: rgba(255, 252, 244, 0.86);
  --panel-strong: #fffaf0;
  --line: rgba(72, 87, 68, 0.18);
  --green: #436b4f;
  --green-dark: #254636;
  --ochre: #bd7b39;
  --clay: #d9a166;
  --shadow: 0 24px 80px rgba(48, 52, 38, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-width: 1280px;
  margin: 0;
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  background:
    radial-gradient(circle at top left, rgba(217, 161, 102, 0.35), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(67, 107, 79, 0.24), transparent 28rem),
    linear-gradient(135deg, #f8f0df 0%, #edf1df 45%, #f8ead6 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: 1440px;
  margin: 0 auto;
  padding: 36px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--ochre);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
}

.desktop-aside {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.desktop-badge {
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(67, 107, 79, 0.28);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.66);
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.status-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: var(--shadow);
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 5px rgba(217, 161, 102, 0.18);
}

.status-card[data-status="ok"] .status-dot {
  background: #4f8a5b;
  box-shadow: 0 0 0 5px rgba(79, 138, 91, 0.16);
}

.status-card[data-status="error"] .status-dot {
  background: #b8523f;
  box-shadow: 0 0 0 5px rgba(184, 82, 63, 0.16);
}

.is-hidden {
  display: none !important;
}

.home-view,
.app-view {
  animation: riseIn 420ms ease both;
}

.home-view {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.home-intro {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 540px;
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.88), rgba(248, 240, 224, 0.72)),
    radial-gradient(circle at 0% 0%, rgba(217, 161, 102, 0.24), transparent 20rem);
  box-shadow: var(--shadow);
}

.section-kicker {
  margin: 0;
  color: var(--ochre);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.home-intro h2,
.page-bar h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.home-intro p,
.page-bar p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.desktop-notes {
  display: grid;
  gap: 10px;
  margin-top: 34px;
}

.desktop-notes span {
  display: block;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--green-dark);
  font-weight: 700;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.entry-card {
  position: relative;
  display: grid;
  min-height: 500px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.82), rgba(246, 235, 213, 0.7)),
    radial-gradient(circle at 80% 10%, rgba(67, 107, 79, 0.16), transparent 18rem);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: left;
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.entry-card::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -72px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(67, 107, 79, 0.18);
  border-radius: 50%;
}

.entry-card:hover {
  transform: translateY(-5px);
  border-color: rgba(67, 107, 79, 0.52);
}

.entry-card.featured {
  background:
    linear-gradient(145deg, rgba(37, 70, 54, 0.95), rgba(67, 107, 79, 0.9)),
    radial-gradient(circle at 20% 10%, rgba(217, 161, 102, 0.5), transparent 16rem);
  color: #fffaf0;
}

.entry-card.game {
  background:
    linear-gradient(145deg, rgba(78, 55, 34, 0.92), rgba(146, 84, 45, 0.78)),
    radial-gradient(circle at 70% 8%, rgba(255, 229, 177, 0.4), transparent 15rem);
  color: #fffaf0;
}

.entry-card.game span {
  color: rgba(255, 250, 240, 0.78);
}

.entry-card.featured span {
  color: rgba(255, 250, 240, 0.78);
}

.home-ecosystem {
  display: grid;
  gap: 24px;
  animation: riseIn 520ms ease both;
}

.ecosystem-community,
.ecosystem-news,
.ecosystem-daily,
.ecosystem-recruitment {
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ecosystem-books {
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ecosystem-community {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(680px, 1.6fr);
  gap: 26px;
  padding: 26px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.84), rgba(237, 241, 223, 0.72)),
    radial-gradient(circle at 100% 0%, rgba(67, 107, 79, 0.18), transparent 22rem);
}

.ecosystem-head {
  display: grid;
  gap: 18px;
  align-content: start;
}

.ecosystem-head.compact {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 26px 0;
}

.ecosystem-head h2 {
  margin: 4px 0 8px;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.ecosystem-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.community-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-self: end;
}

.community-stat {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
}

.community-stat strong {
  color: var(--green-dark);
  font-size: 19px;
}

.community-stat span {
  color: var(--muted);
  font-size: 12px;
}

.community-board-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-content: stretch;
}

.community-board {
  display: grid;
  gap: 12px;
  min-height: 142px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.48), rgba(255, 250, 240, 0.52)),
    radial-gradient(circle at 100% 0%, rgba(189, 123, 57, 0.13), transparent 10rem);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.community-board:hover {
  transform: translateY(-3px);
  border-color: rgba(67, 107, 79, 0.3);
  box-shadow: 0 18px 42px rgba(69, 78, 54, 0.12);
}

.community-board strong {
  font-size: 22px;
  line-height: 1.18;
}

.community-board p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.community-board span {
  align-self: end;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(67, 107, 79, 0.12);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.ecosystem-recruitment {
  background:
    linear-gradient(145deg, rgba(37, 70, 54, 0.9), rgba(92, 67, 41, 0.82)),
    radial-gradient(circle at 86% 4%, rgba(217, 161, 102, 0.36), transparent 22rem);
  color: #fffaf0;
}

.ecosystem-recruitment .section-kicker,
.ecosystem-recruitment .ecosystem-head p {
  color: rgba(255, 250, 240, 0.76);
}

.ecosystem-recruitment .ghost-button {
  border-color: rgba(255, 250, 240, 0.34);
  color: #fffaf0;
}

.recruitment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px 26px 26px;
}

.recruitment-card {
  display: grid;
  gap: 14px;
  min-height: 310px;
  padding: 22px;
  border: 1px solid rgba(255, 250, 240, 0.18);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.12), rgba(255, 250, 240, 0.06)),
    radial-gradient(circle at 100% 0%, rgba(255, 250, 240, 0.2), transparent 12rem);
}

.recruitment-poster {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.recruitment-open-link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.recruitment-open-link:hover .recruitment-poster {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.24);
}

.recruitment-title-link {
  max-width: 620px;
  color: #fffaf0;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.recruitment-title-link:hover {
  color: #ffe5b1;
}

.recruitment-primary {
  background:
    linear-gradient(145deg, rgba(189, 123, 57, 0.32), rgba(255, 250, 240, 0.08)),
    radial-gradient(circle at 100% 0%, rgba(255, 229, 177, 0.26), transparent 14rem);
}

.recruitment-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recruitment-card-head span,
.recruitment-card-head em {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(255, 250, 240, 0.24);
  border-radius: 999px;
  color: rgba(255, 250, 240, 0.86);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.recruitment-card strong {
  max-width: 620px;
  font-size: 28px;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.recruitment-card p,
.recruitment-card small,
.recruitment-card li {
  color: rgba(255, 250, 240, 0.78);
  line-height: 1.65;
}

.recruitment-card p,
.recruitment-card ul {
  margin: 0;
}

.recruitment-card ul {
  display: grid;
  gap: 6px;
  padding-left: 1.2em;
}

.recruitment-action {
  align-self: end;
  width: fit-content;
}

.recruitment-actions {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-source-note {
  color: var(--muted);
  font-size: 13px;
}

.call-article-page .daily-article-body {
  max-width: 980px;
}

.news-ticker {
  margin: 22px 0 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.news-track {
  display: flex;
  width: max-content;
  gap: 14px;
  padding: 22px 26px 26px;
  animation: tickerMove 46s linear infinite;
}

.news-ticker:hover .news-track {
  animation-play-state: paused;
}

.news-card {
  display: grid;
  gap: 8px;
  width: 300px;
  min-height: 148px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.46);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.news-card:hover {
  border-color: rgba(189, 123, 57, 0.45);
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

.news-card img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(78, 55, 34, 0.15);
}

.news-card span,
.book-card span {
  color: var(--ochre);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.news-card strong {
  font-size: 18px;
  line-height: 1.35;
}

.news-card em {
  align-self: end;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(189, 123, 57, 0.12);
  color: #7b4726;
  font-style: normal;
  font-size: 12px;
}

.practice-reader {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  margin: 0 26px 26px;
  padding: 18px;
  border: 1px solid rgba(189, 123, 57, 0.2);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 250, 240, 0.72)),
    radial-gradient(circle at 0% 0%, rgba(189, 123, 57, 0.14), transparent 16rem);
}

.practice-reader:empty {
  display: none;
}

.practice-reader.has-inline-images {
  display: block;
  max-width: 1180px;
  margin: 0 auto 26px;
  padding: 26px;
}

.practice-reader-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(78, 55, 34, 0.2);
}

.practice-reader-content {
  display: grid;
  gap: 14px;
  align-content: start;
}

.practice-reader-content > span {
  color: var(--ochre);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.practice-reader-content h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.practice-reader-body {
  max-height: 420px;
  overflow: auto;
  padding-right: 10px;
  color: var(--ink);
  line-height: 1.75;
}

.practice-reader.has-inline-images .practice-reader-body {
  max-height: none;
  overflow: visible;
  padding-right: 0;
  font-size: 17px;
  line-height: 1.9;
}

.practice-reader-body h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.practice-reader.has-inline-images .practice-reader-body h2,
.practice-reader.has-inline-images .practice-reader-body h3 {
  margin: 24px 0 12px;
}

.practice-reader.has-inline-images .daily-inline-figure {
  margin: 22px auto 26px;
}

.practice-reader.has-inline-images .daily-inline-figure img {
  max-height: 520px;
  border-radius: 22px;
}

.practice-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.practice-gallery img {
  width: 100%;
  height: 116px;
  object-fit: cover;
  border-radius: 14px;
}

.daily-grid,
.book-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 26px 26px;
}

.daily-ticker {
  margin-top: 22px;
}

.daily-track {
  animation-duration: 52s;
}

.daily-track .daily-card {
  width: 320px;
  min-height: 250px;
}

.daily-track .daily-card img {
  height: 116px;
}

.daily-track .daily-card.daily-featured {
  width: 420px;
}

.daily-track .daily-card.daily-featured img {
  height: 148px;
}

.bookshelf-summary {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  padding: 22px 26px 0;
}

.bookshelf-total {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 100px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.78), rgba(237, 241, 223, 0.62)),
    radial-gradient(circle at 100% 0%, rgba(67, 107, 79, 0.15), transparent 10rem);
}

.bookshelf-total strong {
  color: var(--green-dark);
  font-size: 42px;
  line-height: 1;
}

.bookshelf-total span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.bookshelf-categories {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.bookshelf-category {
  display: grid;
  flex: 0 0 128px;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--ink);
  text-align: left;
}

.bookshelf-category:hover {
  border-color: rgba(67, 107, 79, 0.48);
  background: #eef2df;
}

.bookshelf-category strong {
  font-size: 16px;
}

.bookshelf-category span {
  color: var(--muted);
  font-size: 12px;
}

.bookshelf-browser {
  display: grid;
  gap: 14px;
  padding: 0 26px 26px;
}

.bookshelf-browser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 250, 240, 0.58);
}

.bookshelf-browser-head div {
  display: grid;
  gap: 4px;
}

.bookshelf-browser-head strong {
  font-size: 18px;
}

.bookshelf-browser-head span {
  color: var(--muted);
  font-size: 13px;
}

.bookshelf-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.bookshelf-book {
  display: grid;
  gap: 7px;
  min-height: 138px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.bookshelf-book:hover {
  border-color: rgba(67, 107, 79, 0.48);
  background: #eef2df;
}

.bookshelf-book > span {
  color: var(--ochre);
  font-size: 12px;
  font-weight: 700;
}

.bookshelf-book strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.bookshelf-book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.bookshelf-book-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(67, 107, 79, 0.1);
  color: var(--pine);
  font-size: 11px;
  font-weight: 700;
}

.bookshelf-book small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bookshelf-book-actions {
  display: flex;
  gap: 8px;
  align-self: end;
  margin-top: 8px;
}

.bookshelf-hub-page {
  display: grid;
  gap: 20px;
}

.bookshelf-hub-hero {
  margin-bottom: 0;
}

.bookshelf-filter-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}

.bookshelf-filter-chip {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
}

.bookshelf-filter-chip span {
  color: var(--muted);
  font-size: 12px;
}

.bookshelf-filter-chip:hover,
.bookshelf-filter-chip.is-active {
  border-color: rgba(67, 107, 79, 0.55);
  background: #e7efe0;
}

.bookshelf-featured-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.bookshelf-featured-card {
  display: grid;
  align-content: end;
  min-height: 148px;
  padding: 18px;
  border: 1px solid rgba(67, 107, 79, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(33, 78, 52, 0.94), rgba(75, 111, 83, 0.9)),
    radial-gradient(circle at 100% 0%, rgba(255, 250, 240, 0.18), transparent 11rem);
  color: #fffaf0;
  text-align: left;
}

.bookshelf-featured-card span {
  color: rgba(255, 250, 240, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.bookshelf-featured-card strong {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.bookshelf-hub-list-head {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 250, 240, 0.6);
}

.bookshelf-hub-list-head div {
  display: grid;
  gap: 4px;
}

.bookshelf-hub-list-head strong {
  font-size: 18px;
}

.bookshelf-hub-list-head span {
  color: var(--muted);
  font-size: 13px;
}

.bookshelf-hub-list {
  max-height: none;
  overflow: visible;
}

.book-reader-hero {
  margin-bottom: 20px;
}

.book-reader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.book-reader-actions.compact {
  justify-content: flex-start;
}

.book-reader-access-panel {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 26px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.88), rgba(238, 243, 225, 0.7)),
    radial-gradient(circle at 100% 0%, rgba(217, 161, 102, 0.18), transparent 14rem);
}

.book-reader-cover-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.book-reader-cover {
  min-height: 430px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(37, 73, 52, 0.18);
  border-radius: 24px;
  background: #f7f0df;
  box-shadow: 0 18px 44px rgba(37, 73, 52, 0.14);
}

.book-reader-cover.has-image {
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 10px;
}

.book-reader-cover.has-image img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 18px;
  background: #fff;
}

.book-reader-cover figcaption {
  padding: 10px 4px 2px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.book-reader-cover-placeholder {
  display: grid;
  align-content: space-between;
  gap: 22px;
  padding: 30px;
  background:
    linear-gradient(145deg, rgba(33, 77, 52, 0.94), rgba(91, 124, 90, 0.9)),
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.16), transparent 12rem);
  color: rgba(255, 250, 240, 0.94);
}

.book-reader-cover-placeholder span,
.book-reader-cover-placeholder small {
  color: rgba(255, 250, 240, 0.7);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.book-reader-cover-placeholder strong {
  font-family: var(--display-font);
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.08;
}

.book-reader-cover-placeholder em {
  justify-self: start;
  padding: 8px 14px;
  border: 1px solid rgba(255, 250, 240, 0.32);
  border-radius: 999px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.book-reader-access-copy {
  display: grid;
  align-content: center;
  gap: 16px;
}

.book-reader-access-copy span {
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.book-reader-access-copy h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(34px, 4vw, 60px);
  line-height: 1;
}

.book-reader-access-copy p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.book-reader-frame {
  display: block;
  width: 100%;
  height: min(78vh, 920px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(67, 107, 79, 0.04);
}

.book-reader-fallback {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.78), rgba(237, 241, 223, 0.62)),
    radial-gradient(circle at 100% 0%, rgba(217, 161, 102, 0.16), transparent 12rem);
}

.book-reader-fallback strong {
  font-size: 20px;
}

.book-reader-fallback p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .book-reader-access-panel {
    grid-template-columns: 1fr;
  }

  .book-reader-cover {
    min-height: 320px;
  }
}

.ebook-reader-loading {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  text-align: center;
}

.ebook-reader {
  display: grid;
  gap: 18px;
}

.ebook-reader-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 250, 240, 0.68);
}

.ebook-reader-toolbar div {
  display: grid;
  gap: 4px;
}

.ebook-reader-toolbar strong {
  font-size: 20px;
}

.ebook-reader-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.ebook-reader-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.ebook-reader-nav {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 8px;
  max-height: 72vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.54);
}

.ebook-reader-nav a {
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--green-dark);
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
}

.ebook-reader-nav a:hover {
  background: rgba(67, 107, 79, 0.1);
}

.ebook-reader-body {
  display: grid;
  gap: 16px;
}

.ebook-reader-chapter {
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
}

.ebook-reader-chapter h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.35;
}

.ebook-reader-chapter p {
  margin: 0 0 1em;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.9;
}

.daily-card,
.book-card {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(37, 70, 54, 0.94), rgba(67, 107, 79, 0.86)),
    radial-gradient(circle at 90% 0%, rgba(217, 161, 102, 0.34), transparent 10rem);
  color: #fffaf0;
}

.book-card {
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(34, 57, 43, 0.18);
}

.daily-card img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.daily-card span,
.book-card span {
  color: rgba(255, 250, 240, 0.72);
}

.daily-card strong,
.book-card strong {
  font-size: 20px;
  line-height: 1.25;
}

.daily-card p,
.book-card p {
  margin: 0;
  color: rgba(255, 250, 240, 0.72);
  line-height: 1.55;
}

.daily-card em,
.book-card em {
  align-self: end;
  display: block;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 250, 240, 0.18);
  color: rgba(255, 250, 240, 0.86);
  font-style: normal;
  line-height: 1.55;
}

.book-card-actions {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 250, 240, 0.18);
}

.book-card-actions .ghost-button {
  border-color: rgba(255, 250, 240, 0.28);
  color: #fffaf0;
}

.book-card-actions .send-button {
  background: #fffaf0;
  color: var(--green-dark);
}

.daily-card.daily-featured {
  grid-column: span 2;
  background:
    linear-gradient(145deg, rgba(120, 67, 35, 0.96), rgba(189, 123, 57, 0.86)),
    radial-gradient(circle at 90% 0%, rgba(255, 237, 188, 0.42), transparent 12rem);
}

.daily-card.daily-featured img {
  height: 128px;
}

.daily-reader {
  margin: 0 26px 26px;
  padding: 20px;
  border: 1px solid rgba(67, 107, 79, 0.18);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(255, 250, 240, 0.72)),
    radial-gradient(circle at 100% 0%, rgba(67, 107, 79, 0.12), transparent 16rem);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.daily-reader:hover {
  border-color: rgba(189, 123, 57, 0.38);
  box-shadow: 0 18px 46px rgba(78, 55, 34, 0.12);
  transform: translateY(-1px);
}

.daily-reader:empty {
  display: none;
}

.daily-hub-page {
  display: grid;
  gap: 24px;
}

.daily-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.daily-hub-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  min-height: 148px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(37, 70, 54, 0.94), rgba(67, 107, 79, 0.86)),
    radial-gradient(circle at 90% 0%, rgba(217, 161, 102, 0.34), transparent 10rem);
  color: #fffaf0;
  text-align: left;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.daily-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(34, 57, 43, 0.18);
}

.daily-hub-card img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.daily-hub-card-placeholder {
  display: grid;
  place-items: center;
  min-height: 112px;
  border: 1px solid rgba(255, 250, 240, 0.2);
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.08);
  color: rgba(255, 250, 240, 0.76);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.daily-hub-card-body {
  display: grid;
  gap: 8px;
  align-content: start;
}

.daily-hub-card span {
  color: rgba(255, 250, 240, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.daily-hub-card strong {
  font-size: 20px;
  line-height: 1.22;
}

.daily-hub-card p {
  margin: 0;
  color: rgba(255, 250, 240, 0.8);
  line-height: 1.65;
}

.daily-hub-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.daily-hub-page-ellipsis {
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.18em;
}

.daily-hub-page-button.is-current {
  border-color: rgba(67, 107, 79, 0.52);
  background: #e7f0e4;
  color: var(--green-dark);
}

@media (max-width: 900px) {
  .daily-hub-grid {
    grid-template-columns: 1fr;
  }

  .daily-hub-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .daily-hub-card img,
  .daily-hub-card-placeholder {
    height: 96px;
    min-height: 96px;
  }
}

.parent-voices-hub-page {
  display: grid;
  gap: 24px;
}

.parent-voices-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.parent-voice-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 34px rgba(55, 45, 31, 0.08);
}

.parent-voice-card span {
  color: var(--ochre);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.parent-voice-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.24;
}

.parent-voice-card p,
.parent-voice-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.parent-voice-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}

.parent-voice-card-meta span {
  color: var(--green-dark);
  font-size: 14px;
  letter-spacing: 0;
}

.parent-voice-thread-page {
  display: grid;
  gap: 24px;
}

.parent-voice-thread-main,
.parent-voice-replies {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 16px 38px rgba(55, 45, 31, 0.08);
}

.parent-voice-replies {
  display: grid;
  gap: 18px;
}

.parent-voice-replies-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.parent-voice-replies-head strong {
  font-size: 26px;
}

.parent-voice-replies-head span {
  color: var(--muted);
}

.parent-voice-reply-list {
  display: grid;
  gap: 14px;
}

.parent-voice-reply {
  padding: 18px 20px;
  border: 1px solid rgba(67, 107, 79, 0.16);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(250, 247, 240, 0.9), rgba(255, 255, 255, 0.82));
}

.parent-voice-reply-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.parent-voice-reply-meta strong {
  color: var(--green-dark);
}

.parent-voice-reply-meta span,
.parent-voice-reply p {
  color: var(--muted);
}

.parent-voice-reply p {
  margin: 0;
  line-height: 1.8;
}

.parent-voice-reply-form {
  display: grid;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px dashed rgba(67, 107, 79, 0.18);
}

.parent-voice-reply-form label {
  display: grid;
  gap: 10px;
  color: var(--green-dark);
  font-weight: 700;
}

.parent-voice-reply-form textarea {
  width: 100%;
  min-height: 120px;
}

.parent-voice-reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.daily-reader-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 16px;
}

.daily-reader-head span {
  display: block;
  margin-bottom: 6px;
  color: var(--ochre);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.daily-reader-head strong {
  font-size: 30px;
  line-height: 1.16;
  letter-spacing: -0.03em;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.daily-reader:hover .daily-reader-head strong {
  text-decoration: underline;
}

.daily-reader-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.daily-reader-poster {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(78, 55, 34, 0.16);
}

.daily-reader-body {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.daily-reader-body section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.52);
}

.daily-reader-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.daily-reader-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.daily-reader-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.daily-reader-gallery img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 14px;
}

.article-view {
  animation: riseIn 520ms ease both;
}

.article-page-bar {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: var(--shadow);
}

.article-page-bar h2 {
  margin: 4px 0 0;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.daily-article-page {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.84), rgba(255, 255, 255, 0.72)),
    radial-gradient(circle at 100% 0%, rgba(189, 123, 57, 0.14), transparent 22rem);
  box-shadow: var(--shadow);
}

.daily-article-hero {
  display: grid;
  gap: 14px;
  max-width: 980px;
  margin: 0 auto 24px;
  text-align: center;
}

.daily-article-hero span {
  color: var(--ochre);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.daily-article-hero h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.daily-article-hero p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.daily-article-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.daily-article-cover {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 24px 64px rgba(78, 55, 34, 0.18);
}

.daily-article-body {
  max-width: 900px;
  margin: 34px auto 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 2.05;
}

.daily-article-body h2,
.daily-article-body h3 {
  margin: 34px 0 12px;
  font-size: 28px;
  line-height: 1.2;
}

.daily-article-body p {
  margin: 0 0 1.1em;
}

.daily-article-body strong {
  color: var(--green-dark);
}

.article-link-section {
  max-width: 1120px;
  margin: 42px auto 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(237, 241, 224, 0.76), rgba(255, 250, 240, 0.72)),
    radial-gradient(circle at 100% 0%, rgba(189, 123, 57, 0.12), transparent 16rem);
}

.article-link-head {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  text-align: center;
}

.article-link-head span {
  color: var(--ochre);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.article-link-head h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.article-link-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.article-link-columns h3 {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-size: 18px;
}

.article-link-grid {
  display: grid;
  gap: 12px;
}

.article-link-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 108px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.article-link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(67, 107, 79, 0.34);
  box-shadow: 0 16px 36px rgba(69, 78, 54, 0.12);
}

.article-link-card img {
  grid-row: span 2;
  width: 120px;
  height: 84px;
  object-fit: cover;
  border-radius: 15px;
}

.article-link-card span {
  color: var(--ochre);
  font-size: 12px;
  font-weight: 800;
}

.article-link-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.daily-inline-figure {
  max-width: 980px;
  margin: 30px auto 34px;
}

.daily-inline-figure img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 22px 58px rgba(78, 55, 34, 0.16);
}

.daily-inline-figure figcaption {
  max-width: 820px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

.daily-article-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.daily-article-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 18px;
}

.video-hub-page {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.84), rgba(255, 255, 255, 0.72)),
    radial-gradient(circle at 100% 0%, rgba(67, 107, 79, 0.13), transparent 22rem);
  box-shadow: var(--shadow);
}

.download-hub-page {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.84), rgba(255, 255, 255, 0.72)),
    radial-gradient(circle at 100% 0%, rgba(189, 123, 57, 0.14), transparent 22rem);
  box-shadow: var(--shadow);
}

.video-hub-loading {
  padding: 42px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
}

.video-hub-hero {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.video-hub-hero span {
  color: var(--ochre);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.video-hub-hero h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.video-hub-hero p {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.video-hub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.video-hub-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(67, 107, 79, 0.12);
  color: var(--green-dark);
  font-size: 13px;
  letter-spacing: 0;
}

.video-hub-player {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
}

.video-hub-player > div,
.video-hub-player aside {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.54);
  overflow: hidden;
}

.video-hub-player video {
  display: block;
  width: 100%;
  min-height: 420px;
  max-height: 580px;
  background: #181817;
  object-fit: contain;
}

.video-hub-player aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  padding: 24px;
}

.video-hub-player aside span {
  color: var(--ochre);
  font-size: 13px;
  font-weight: 800;
}

.video-hub-player aside h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.video-hub-player aside p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.video-resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.video-resource-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.video-resource-card.is-active,
.video-resource-card:hover {
  border-color: rgba(67, 107, 79, 0.34);
  background: rgba(237, 241, 224, 0.72);
}

.video-resource-card span {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(189, 123, 57, 0.12);
  color: var(--ochre);
  font-size: 12px;
  font-weight: 800;
}

.video-resource-card strong {
  font-size: 16px;
  line-height: 1.36;
}

.video-resource-card small {
  align-self: end;
  color: var(--muted);
}

.download-resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.download-resource-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.56), rgba(255, 250, 240, 0.64)),
    radial-gradient(circle at 100% 0%, rgba(67, 107, 79, 0.12), transparent 12rem);
}

.download-cover-link {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(67, 107, 79, 0.12);
  border-radius: 18px;
  background: rgba(237, 241, 224, 0.72);
  text-decoration: none;
}

.download-resource-cover {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 180ms ease;
}

.download-cover-link:hover .download-resource-cover {
  transform: scale(1.035);
}

.download-cover-fallback {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--ochre);
  font-weight: 800;
}

.download-resource-card strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 54px;
  font-size: 18px;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.download-resource-card small {
  color: var(--muted);
  font-size: 12px;
}

.download-resource-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: end;
}

.download-resource-actions a {
  text-decoration: none;
}

.theory-article-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theory-card {
  min-height: 280px;
  padding: 24px;
}

.theory-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.theory-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.theory-card small {
  color: var(--muted);
  line-height: 1.5;
}

.theory-article-body {
  max-width: 920px;
  margin: 0 auto;
}

.theory-article-body > h1:first-child {
  display: none;
}

.entry-index {
  align-self: start;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--ochre);
  font-size: 13px;
  font-weight: 700;
}

.entry-card strong {
  align-self: end;
  margin-top: 150px;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.entry-card span:last-child {
  max-width: 280px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
}

.page-bar {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: start;
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: var(--shadow);
}

.mode-switcher {
  display: flex;
  gap: 8px;
  align-self: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.mode-switcher button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

.mode-switcher button.active {
  background: var(--green-dark);
  color: #fffaf0;
}

.back-button {
  min-height: 58px;
  padding: 0 24px;
  border: 2px solid rgba(255, 229, 177, 0.78);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(37, 70, 54, 0.98), rgba(67, 107, 79, 0.94)),
    radial-gradient(circle at 20% 0%, rgba(217, 161, 102, 0.38), transparent 8rem);
  color: #fffaf0;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow:
    0 16px 38px rgba(37, 70, 54, 0.24),
    inset 0 1px 0 rgba(255, 250, 240, 0.22);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.back-button::before {
  content: "← ";
  font-size: 20px;
}

.back-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 229, 177, 0.98);
  background:
    linear-gradient(145deg, rgba(67, 107, 79, 0.98), rgba(37, 70, 54, 0.96)),
    radial-gradient(circle at 20% 0%, rgba(255, 229, 177, 0.42), transparent 8rem);
  box-shadow:
    0 22px 52px rgba(37, 70, 54, 0.32),
    inset 0 1px 0 rgba(255, 250, 240, 0.28);
}

.current-mode {
  background:
    linear-gradient(145deg, rgba(37, 70, 54, 0.96), rgba(67, 107, 79, 0.9)),
    radial-gradient(circle at 80% 20%, rgba(217, 161, 102, 0.42), transparent 12rem);
  color: #fffaf0;
}

.current-mode span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 250, 240, 0.5);
  border-radius: 999px;
  color: rgba(255, 250, 240, 0.84);
  font-size: 13px;
}

.current-mode p {
  margin: 0;
  color: rgba(255, 250, 240, 0.78);
  line-height: 1.8;
}

.workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 360px;
  gap: 20px;
  min-height: 760px;
}

.app-view.mode-game-space .workspace {
  grid-template-columns: 300px minmax(0, 1fr);
}

.app-view.mode-game-space .materials-panel {
  display: none;
}

.app-view.mode-game-space .chat-panel {
  grid-template-rows: auto auto auto auto;
  min-height: 820px;
  overflow: visible;
}

.app-view.mode-game-space .control-panel {
  max-height: 820px;
}

.control-panel,
.chat-panel,
.materials-panel {
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  max-height: 760px;
  overflow-y: auto;
}

.panel-block {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.54);
}

.panel-block h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.mode-grid {
  display: grid;
  gap: 10px;
}

.mode-card {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
  text-align: left;
  transition: 160ms ease;
}

.mode-card strong,
.mode-card span {
  display: block;
}

.mode-card strong {
  margin-bottom: 6px;
  font-size: 17px;
}

.mode-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.mode-card:hover,
.mode-card.active {
  border-color: rgba(67, 107, 79, 0.55);
  background: #eef2df;
  transform: translateY(-1px);
}

label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  outline: none;
}

select,
input {
  min-height: 46px;
  padding: 0 14px;
}

textarea {
  min-height: 128px;
  padding: 16px;
  resize: vertical;
  line-height: 1.7;
}

select:focus,
input:focus,
textarea:focus {
  border-color: rgba(67, 107, 79, 0.7);
  box-shadow: 0 0 0 4px rgba(67, 107, 79, 0.12);
}

.brief p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.game-note {
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.62), rgba(248, 226, 190, 0.56)),
    radial-gradient(circle at 100% 0%, rgba(189, 123, 57, 0.18), transparent 10rem);
}

.game-note h2 {
  color: #7b4726;
}

.game-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.guide-block ol,
.guide-block ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.guide-block li::marker {
  color: var(--ochre);
  font-weight: 700;
}

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

.prompt-template {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.44);
  color: var(--ink);
  text-align: left;
  line-height: 1.5;
}

.prompt-template:hover {
  border-color: rgba(67, 107, 79, 0.48);
  background: #eef2df;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  min-height: 760px;
}

.lesson-generator {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.84), rgba(237, 241, 223, 0.74)),
    radial-gradient(circle at 100% 0%, rgba(67, 107, 79, 0.14), transparent 14rem);
}

.lesson-generator-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.lesson-generator-head h2 {
  margin: 3px 0 4px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.lesson-generator-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.lesson-generator-fields {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: 12px;
}

.lesson-generator-fields label {
  margin-top: 0;
}

.lesson-generator-fields .full-span {
  grid-column: 1 / -1;
}

.lesson-generator-fields textarea {
  min-height: 86px;
}

.generator-note {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid rgba(67, 107, 79, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--muted);
  line-height: 1.6;
}

.solo-consult-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid rgba(189, 123, 57, 0.26);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.78), rgba(232, 239, 224, 0.5)),
    radial-gradient(circle at 100% 0%, rgba(189, 123, 57, 0.12), transparent 12rem);
}

.solo-consult-actions strong {
  display: block;
  margin: 2px 0 5px;
  font-size: 17px;
  color: var(--ink);
}

.solo-consult-actions span {
  display: block;
  color: var(--muted);
  line-height: 1.6;
}

.solo-consult-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 260px;
}

.game-agent-panel {
  display: none;
  gap: 14px;
  margin: 0 22px 22px;
  padding: 16px;
  border: 1px solid rgba(67, 107, 79, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.38);
}

.app-view.mode-game-space .game-agent-panel {
  display: grid;
}

.agent-roster-toolbar,
.agent-roster-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.agent-roster-toolbar {
  padding: 12px 14px;
  border: 1px solid rgba(67, 107, 79, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
}

.agent-roster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.app-view.mode-game-space .agent-roster {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.agent-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(67, 107, 79, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.48);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.app-view.mode-game-space .agent-card {
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: start;
  min-height: 0;
  padding: 14px;
  border-radius: 24px;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 250, 240, 0.68)),
    radial-gradient(circle at 100% 0%, rgba(67, 107, 79, 0.1), transparent 12rem);
}

.agent-card.selected {
  border-color: rgba(189, 123, 57, 0.72);
  background: rgba(255, 246, 223, 0.82);
}

.agent-portrait {
  position: relative;
  width: 76px;
  height: 96px;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.72), transparent 42%),
    linear-gradient(145deg, #dfe8d5, #b9c9b1);
  display: grid;
  place-items: center;
  color: var(--green-dark);
  font-weight: 700;
}

.app-view.mode-game-space .agent-portrait {
  grid-row: auto;
  justify-self: center;
  width: 150px;
  height: 150px;
  border-radius: 22px;
}

.agent-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-card-body {
  min-width: 0;
}

.agent-card-body h3 {
  margin: 2px 0 5px;
  font-size: 18px;
}

.app-view.mode-game-space .agent-card-body h3 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.12;
}

.agent-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.app-view.mode-game-space .agent-card-body p {
  font-size: 14px;
  line-height: 1.55;
}

.app-view.mode-game-space .agent-card-body .section-kicker {
  margin-bottom: 2px;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.app-view.mode-game-space .agent-card-body p:not(.section-kicker) {
  display: none;
}

.agent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.agent-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(67, 107, 79, 0.1);
  color: var(--green-dark);
  font-size: 12px;
}

.app-view.mode-game-space .agent-tags {
  justify-content: center;
  gap: 5px;
  margin-top: 7px;
}

.app-view.mode-game-space .agent-tags span {
  padding: 4px 7px;
  font-size: 11px;
}

.agent-card-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.app-view.mode-game-space .agent-card-actions {
  grid-column: 1;
  gap: 6px;
  justify-content: center;
  align-self: end;
}

.app-view.mode-game-space .agent-card-actions .small {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 13px;
}

.roundtable-divider {
  padding-top: 4px;
  border-top: 1px dashed rgba(67, 107, 79, 0.24);
}

.roundtable-divider h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.roundtable-memory-panel {
  display: none;
  gap: 14px;
  margin: 0 22px 22px;
  padding: 16px;
  border: 1px solid rgba(67, 107, 79, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 250, 240, 0.66)),
    radial-gradient(circle at 100% 0%, rgba(189, 123, 57, 0.12), transparent 12rem);
}

.app-view.mode-game-space .roundtable-memory-panel {
  display: grid;
}

.roundtable-memory-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.roundtable-memory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.roundtable-memory-head h3,
.roundtable-video-entry h3 {
  margin: 3px 0 4px;
  font-size: 20px;
}

.roundtable-memory-head p,
.roundtable-video-entry p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.roundtable-memory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 12px;
}

.roundtable-record-list {
  display: grid;
  gap: 10px;
  overflow: visible;
}

.roundtable-record-toolbar,
.roundtable-record-filters,
.roundtable-record-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.roundtable-record-toolbar {
  justify-content: space-between;
  border: 1px solid rgba(218, 225, 210, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  font-size: 13px;
  padding: 8px 12px;
}

.roundtable-record-toolbar strong {
  color: var(--green);
  font-size: 13px;
}

.roundtable-record-filters {
  margin-left: auto;
}

.roundtable-filter-button.is-active {
  background: rgba(45, 85, 60, 0.12);
  border-color: rgba(45, 85, 60, 0.26);
  color: var(--green);
}

.roundtable-record-empty,
.roundtable-video-entry,
.roundtable-record-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
}

.roundtable-record-empty {
  padding: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.roundtable-record-card {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.roundtable-record-card span,
.roundtable-video-entry span {
  color: var(--ochre);
  font-size: 12px;
  font-weight: 800;
}

.roundtable-record-card em {
  justify-self: start;
  border-radius: 999px;
  background: rgba(218, 225, 210, 0.78);
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  padding: 4px 9px;
}

.roundtable-record-card strong {
  font-size: 17px;
  line-height: 1.35;
}

.roundtable-record-title {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  padding: 0;
  text-align: left;
}

.roundtable-record-title:hover {
  color: var(--ochre);
}

.roundtable-record-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.roundtable-record-card small {
  color: rgba(40, 55, 43, 0.72);
  font-size: 12px;
}

.roundtable-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.roundtable-record-pagination {
  justify-content: center;
  padding-top: 4px;
}

.roundtable-page-button.is-active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.roundtable-video-entry {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(33, 78, 52, 0.94), rgba(74, 91, 65, 0.92)),
    radial-gradient(circle at 100% 0%, rgba(255, 250, 240, 0.16), transparent 12rem);
  color: #fffaf0;
}

.roundtable-video-entry p {
  color: rgba(255, 250, 240, 0.74);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding: 32px;
}

.message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.message.user {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.message.user .avatar {
  grid-column: 2;
}

.message.user .bubble {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  background: #e7efe0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: #fffaf0;
  font-weight: 700;
}

.message.user .avatar {
  background: var(--ochre);
}

.bubble {
  max-width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-strong);
  line-height: 1.78;
}

.bubble h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.bubble h2 {
  margin: 18px 0 8px;
  font-size: 19px;
}

.bubble p {
  margin: 0 0 10px;
}

.bubble p:last-child {
  margin-bottom: 0;
}

.bubble ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.bubble li {
  margin: 7px 0;
}

.message.loading .bubble {
  color: var(--muted);
}

.references {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.references h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.reference-item {
  display: grid;
  gap: 2px;
  padding: 10px 0;
}

.reference-item + .reference-item {
  border-top: 1px dashed var(--line);
}

.reference-item span {
  color: var(--muted);
  font-size: 13px;
}

.case-save-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.case-save-head {
  display: grid;
  gap: 3px;
}

.case-save-head strong {
  color: var(--green-dark);
}

.case-save-head span,
.case-save-status {
  color: var(--muted);
  font-size: 13px;
}

.case-save-textarea {
  min-height: 240px;
  background: rgba(255, 255, 255, 0.66);
  font-size: 14px;
}

.case-save-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.case-save-status {
  min-height: 20px;
  margin: 0;
  line-height: 1.6;
}

.composer {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.7);
}

.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.composer-actions .send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.mode-student-tutoring .composer-actions .send-button {
  min-width: 150px;
}

.ghost-button,
.send-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.ghost-button.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.ghost-button {
  background: transparent;
  color: var(--green-dark);
}

.materials-panel {
  display: grid;
  grid-template-rows: auto auto auto 210px 280px auto minmax(0, 1fr);
  gap: 14px;
  min-height: 760px;
  padding: 20px;
  overflow: hidden;
}

.materials-head,
.knowledge-cards-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.materials-head h2,
.knowledge-cards-head h2 {
  margin: 0;
  font-size: 20px;
}

.material-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stat-chip {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
}

.stat-chip strong {
  font-size: 22px;
  line-height: 1;
}

.stat-chip span {
  color: var(--muted);
  font-size: 12px;
}

.material-controls {
  display: grid;
  gap: 10px;
}

.material-controls label {
  margin-top: 0;
}

.material-list,
.card-list {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}

.material-preview {
  display: grid;
  gap: 8px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.58);
  color: var(--muted);
}

.material-preview p {
  margin: 0;
  line-height: 1.6;
}

.material-preview small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-preview pre {
  max-height: 82px;
  margin: 0;
  overflow: auto;
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.video-preview-player {
  width: 100%;
  max-height: 170px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #182019;
}

.preview-title {
  display: grid;
  gap: 4px;
}

.preview-title strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-title span {
  color: var(--muted);
  font-size: 12px;
}

.preview-action {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.annotation-panel {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
}

.annotation-head {
  display: grid;
  gap: 2px;
}

.annotation-head strong {
  color: var(--green-dark);
}

.annotation-head span,
.annotation-status {
  color: var(--muted);
  font-size: 12px;
}

.annotation-quote,
.annotation-note {
  min-height: 74px;
  padding: 10px;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.55;
}

.annotation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.annotation-status {
  min-height: 18px;
  margin: 0;
}

.annotation-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.annotation-item {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.62);
}

.annotation-item blockquote {
  margin: 0;
  padding: 0 0 0 10px;
  border-left: 3px solid var(--clay);
  color: var(--ink);
  line-height: 1.55;
}

.annotation-item p {
  margin: 0;
  color: var(--muted);
}

.annotation-item small {
  color: var(--muted);
}

.empty-state.compact {
  padding: 10px;
  font-size: 12px;
}

.material-item,
.knowledge-card {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  text-align: left;
}

.material-item:hover,
.knowledge-card:hover {
  border-color: rgba(67, 107, 79, 0.48);
  background: #eef2df;
}

.material-item.video-item {
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.64), rgba(240, 232, 211, 0.56)),
    radial-gradient(circle at 100% 0%, rgba(67, 107, 79, 0.18), transparent 10rem);
}

.material-item strong,
.knowledge-card strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-item small,
.knowledge-card small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.file-pill,
.knowledge-card span,
.knowledge-cards-head span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(67, 107, 79, 0.12);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 700;
}

.empty-state,
.muted {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.send-button {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fffaf0;
}

.send-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

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

@keyframes tickerMove {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
