:root {
  --ink: #1b2425;
  --muted: #657273;
  --line: #dde5e1;
  --line-strong: #c2d0cb;
  --paper: #f5f7f3;
  --paper-strong: #edf3ef;
  --panel: rgba(255, 255, 250, 0.9);
  --panel-solid: #fffffb;
  --accent: #1f7569;
  --accent-strong: #13564f;
  --accent-soft: #e5f2ee;
  --accent-soft-strong: #d3e7e1;
  --sun: #e8b86d;
  --coral: #d86f55;
  --blue: #4d7e9f;
  --shadow-sm: 0 12px 28px rgba(45, 68, 65, 0.06);
  --shadow-md: 0 24px 60px rgba(45, 68, 65, 0.1);
  --radius: 8px;
  --container: min(1180px, calc(100% - 40px));
  --app-topnav-height: 66px;
  --font-body:
    "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --font-display:
    "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --type-xs: 12px;
  --type-sm: 15px;
  --type-md: 19px;
  --type-lg: 24px;
  --type-xl: 30px;
  --type-2xl: 38px;
  --type-3xl: 48px;
  --type-4xl: 60px;
  --type-hero: clamp(48px, 5.8vw, 75px);
  --leading-ui: 1.35;
  --leading-body: 1.65;
  --leading-title: 1.22;
  --leading-display: 1.05;
  --weight-regular: 400;
  --weight-medium: 600;
  --weight-bold: 800;
}

.video-model-settings {
  display: grid;
  gap: 20px;
}

.video-model-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.video-model-settings-head h2 {
  margin: 0;
}

.video-model-settings-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.video-model-option-list {
  display: grid;
  gap: 12px;
}

.video-model-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid rgba(22, 20, 17, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.video-model-option input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.video-model-option-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.video-model-option-copy small,
.video-model-option-copy span {
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.video-model-capability-warning {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  color: #8a5a00;
  background: rgba(246, 200, 88, 0.16);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .video-model-settings-head {
    display: grid;
  }
}

html.dark {
  --ink: #e5e7eb;
  --muted: #9ca3af;
  --line: #2d2d4a;
  --line-strong: #404064;
  --paper: #16162a;
  --paper-strong: #1a1a2e;
  --panel: rgba(26, 26, 46, 0.92);
  --panel-solid: #16162a;
  --accent: #7b7fe8;
  --accent-strong: #6469d9;
  --accent-soft: rgba(123, 127, 232, 0.16);
  --accent-soft-strong: rgba(123, 127, 232, 0.24);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 22px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(31, 117, 105, 0.08), transparent 34%) 0 0 /
      100% 420px no-repeat,
    linear-gradient(180deg, #fbfcf8 0%, var(--paper) 100%);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
.brand,
.top-brand,
.side-title {
  font-family: var(--font-display);
  font-weight: 600;
}

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

button {
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell,
.admin-shell,
.learn-layout {
  min-height: 100vh;
}

.topbar,
.section {
  width: var(--container);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 14px;
}

.brand,
.top-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  letter-spacing: 0;
}

.brand {
  font-size: 20px;
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: url("./assets/logo-site.png") center / contain no-repeat;
  color: transparent;
  font-family: var(--font-body);
  font-size: 0;
  font-weight: 800;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost-btn,
.primary-btn,
.icon-btn,
.tab-btn,
.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
  text-decoration: none;
}

.ghost-btn:hover,
.primary-btn:hover,
.icon-btn:hover,
.tab-btn:hover,
.upload-btn:hover,
.mini-icon-btn:hover {
  transform: translateY(-1px);
}

.primary-btn,
.upload-btn {
  color: #f6f3ee;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(31, 94, 84, 0.14);
}

.primary-btn:hover,
.upload-btn:hover {
  background: var(--accent-strong);
}

.ghost-btn,
.tab-btn {
  color: var(--ink);
  border-color: rgba(22, 20, 17, 0.12);
  background: rgba(255, 253, 249, 0.68);
}

.system-admin-btn {
  color: var(--muted);
  border-color: rgba(22, 20, 17, 0.08);
  background: rgba(255, 253, 249, 0.42);
}

.system-admin-btn:hover {
  color: var(--ink);
  border-color: rgba(22, 20, 17, 0.14);
  background: rgba(255, 253, 249, 0.72);
}

.ghost-btn:hover,
.tab-btn:hover {
  border-color: rgba(22, 20, 17, 0.18);
  background: rgba(255, 253, 249, 0.96);
}

.subtle-btn {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.44);
}

.tab-btn.active {
  color: var(--accent);
  border-color: rgba(31, 94, 84, 0.18);
  background: var(--accent-soft);
}

.session-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(22, 20, 17, 0.1);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.82);
  color: var(--muted);
  font-size: 13px;
}

.point-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(31, 94, 84, 0.18);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.point-chip:hover {
  background: var(--accent-soft-strong);
}

.card,
.quota,
.pdf-thumb,
.archive-row,
.readonly-field {
  border: 1px solid rgba(22, 20, 17, 0.08);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.section {
  padding: 30px 0 28px;
}

.section-tight {
  padding-top: 14px;
}

.section-border-top {
  border-top: 1px solid rgba(111, 103, 92, 0.14);
}

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

.section-head h2 {
  margin: 0;
  font-size: 24px;
}

.section-head p {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card {
  overflow: hidden;
}

.role-card,
.feature-card,
.resource-card,
.lesson-card,
.course-card,
.detail-block,
.account-table,
.org-form,
.config-form,
.modal,
.quota,
.side-panel {
  padding: 16px;
}

.role-icon {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.role-card h3,
.feature-card h3,
.course-card h3,
.lesson-card h3,
.resource-card h3 {
  margin: 12px 0 6px;
  font-size: 20px;
  line-height: 1.3;
}

.course-card h3 {
  min-height: 46px;
  margin: 0;
}

.feature-card p,
.course-card p,
.resource-card p,
.lesson-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.feature-card,
.course-card,
.resource-card,
.lesson-card {
  min-height: 100%;
}

.course-card,
.resource-card,
.lesson-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.course-stage-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.course-stage-card h3 {
  margin: 8px 0 0;
}

.course-stage-card p {
  margin: 0;
  min-height: 106px;
  font-size: 15px;
  line-height: 1.62;
}

.course-stage-card h3 {
  min-height: 40px;
}

.course-stage-media {
  display: grid;
  align-items: center;
  overflow: hidden;
  height: 176px;
  border: 1px solid rgba(22, 20, 17, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.72);
}

.course-stage-image {
  width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.deletable-card {
  position: relative;
  padding-top: 52px;
}

.card-delete-btn {
  position: absolute;
  top: 16px;
  right: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-summary {
  display: -webkit-box;
  min-height: 72px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.resource-card .card-title {
  margin: 0;
  min-height: 72px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 2px;
}

.course-card .card-actions .primary-btn,
.resource-card .card-actions .primary-btn,
.lesson-card .card-actions .primary-btn {
  min-width: 132px;
  padding-inline: 20px;
  box-shadow: none;
}

.site-footer {
  border-top: 1px solid rgba(111, 103, 92, 0.14);
  margin-top: 12px;
  padding: 20px 0 28px;
}

.site-footer.compact {
  margin-top: 0;
}

.site-footer-inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-link {
  padding: 0;
  color: var(--accent);
  background: transparent;
  border-bottom: 1px solid rgba(31, 94, 84, 0.18);
}

.legal-page {
  min-height: 100vh;
}

.legal-card {
  padding: 24px;
}

.legal-card p + p {
  margin-top: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.ai-workspace-shell {
  background:
    radial-gradient(circle at top left, rgba(31, 94, 84, 0.1), transparent 28%),
    linear-gradient(180deg, #f8f4ee 0%, #f1ece3 100%);
}

.ai-workspace-standalone,
.ai-workspace-standalone h1,
.ai-workspace-standalone h2,
.ai-workspace-standalone h3,
.ai-workspace-standalone button,
.ai-workspace-standalone input,
.ai-workspace-standalone select,
.ai-workspace-standalone textarea {
  font-family: var(--font-body);
}

.ai-workspace-standalone {
  min-height: 100vh;
  background: #ffffff;
}

.learner-shell,
.learner-layout {
  min-height: 100vh;
}

.learner-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
}

.sidebar {
  padding: 24px;
  color: var(--ink);
  background: var(--panel-solid);
  border-right: 1px solid rgba(22, 20, 17, 0.08);
}

.sidebar .brand {
  margin-bottom: 28px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.main {
  min-width: 0;
  padding: 24px;
}

.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.appbar h1 {
  margin: 0;
  font-size: 28px;
}

.appbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.ai-entry-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 20px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(31, 94, 84, 0.08), rgba(255, 255, 255, 0.68)),
    rgba(255, 252, 247, 0.9);
}

.ai-entry-copy h2,
.ai-composer-head h2 {
  margin: 4px 0 0;
  font-size: 28px;
}

.ai-entry-copy p,
.ai-composer-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.ai-entry-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.ai-entry-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ai-entry-modes .feature-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.ai-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-sidebar.collapsed {
  width: 84px;
}

.ai-sidebar-topbar {
  display: grid;
  gap: 8px;
}

.ai-sidebar-btn {
  width: 100%;
}

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

.ai-session-group {
  display: grid;
  gap: 8px;
}

.ai-session-group-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ai-session-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.ai-session-row.active .ai-session-item {
  border-color: rgba(31, 94, 84, 0.2);
  background: var(--accent-soft);
  color: var(--accent);
}

.ai-session-item {
  justify-content: flex-start;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(22, 20, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-session-item-rich {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 74px;
  padding: 12px 14px;
  white-space: normal;
}

.ai-session-name {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.ai-session-date {
  color: var(--muted);
  font-size: 12px;
}

.ai-sidebar.collapsed .brand span:not(.brand-mark) {
  display: none;
}

.ai-sidebar.collapsed .ai-session-item {
  justify-content: center;
  padding-inline: 8px;
}

.ai-session-delete {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #8a6b63;
  background: transparent;
  box-shadow: none;
  font-size: var(--type-xs);
  line-height: var(--leading-ui);
}

.ai-session-delete:hover {
  color: #b75d4d;
  background: rgba(216, 111, 85, 0.1);
}

.ai-main {
  display: grid;
  align-content: start;
  gap: 16px;
}

.ai-page-main {
  padding: 18px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #f7f3ec 0%, var(--paper) 100%);
}

.ai-page-main.standalone {
  padding: 0;
  background: #ffffff;
}

.ai-page-frame {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: calc(100vh - 36px);
  overflow: hidden;
  border: 1px solid rgba(22, 20, 17, 0.08);
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.82);
  box-shadow: var(--shadow-sm);
}

.ai-page-frame.screenshot-style {
  grid-template-columns: 366px minmax(0, 1fr);
  min-height: calc(100vh - var(--app-topnav-height));
  border-radius: 0;
  border: 0;
  background: #ffffff;
  box-shadow: none;
}

.ai-chat-sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px 18px;
  border-right: 1px solid rgba(22, 20, 17, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.ai-page-frame.screenshot-style .ai-chat-sidebar {
  gap: 12px;
  padding: 12px 10px 0 14px;
  border-right: 1px solid #eceff4;
  background: #f8f9fb;
}

.ai-chat-sidebar-head {
  display: grid;
  gap: 12px;
}

.ai-sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-assistant-title {
  color: #1f2937;
  font-size: 18px;
  font-weight: 700;
}

.ai-new-chat-btn {
  justify-content: center;
  min-height: 56px;
  border-radius: 18px;
  color: #1f2937;
  border-color: #e5e7eb;
  background: #ffffff;
  font-size: 17px;
  font-weight: 600;
  box-shadow: none;
}

.ai-chat-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  background: rgba(255, 253, 249, 0.62);
}

.ai-page-frame.screenshot-style .ai-chat-main {
  background: #ffffff;
}

.ai-chat-header {
  padding: 26px 30px 10px;
}

.ai-chat-header h1 {
  margin: 0;
  font-size: 30px;
}

.ai-chat-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.screenshot-list {
  gap: 2px;
}

.screenshot-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 56px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ai-session-row.active .screenshot-item {
  background: #f3f5fa;
}

.ai-session-icon {
  flex: 0 0 auto;
  color: #9aa3b2;
  font-size: 14px;
  line-height: 1.4;
}

.ai-session-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ai-session-name {
  overflow: hidden;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-session-date {
  color: #9ca3af;
  font-size: 10px;
  line-height: 1;
  text-align: left;
}

.ai-chat-scroll {
  min-height: 0;
  padding: 0;
}

.ai-messages-rich {
  display: grid;
  min-height: calc(100vh - 230px);
  align-content: stretch;
}

.ai-sidebar-footer {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.ai-theme-toggle {
  width: 100%;
}

.ai-appbar {
  margin-bottom: 0;
}

.ai-mode-tabs .tab-btn.active {
  color: #f6f3ee;
  border-color: var(--accent);
  background: var(--accent);
}

.ai-error {
  margin: 0;
}

.ai-conversation-card,
.ai-composer-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.ai-messages {
  display: grid;
  gap: 20px;
  max-height: none;
  overflow: visible;
}

.ai-message {
  display: grid;
  gap: 12px;
  max-width: min(1120px, 100%);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.screenshot-main .ai-message {
  max-width: min(1120px, 100%);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ai-message.user {
  justify-self: end;
}

.screenshot-main .ai-message.user {
  max-width: min(820px, 100%);
}

.ai-message.assistant {
  justify-self: start;
}

.ai-message-stack {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 14px;
}

.ai-user-bubble {
  max-width: min(680px, 100%);
  padding: 22px 26px;
  border-radius: 22px;
  border-top-right-radius: 12px;
  background: #e8eefc;
  color: #1f2937;
}

.ai-user-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ai-user-upload-row img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}

.assistant-upload-row {
  margin: 4px 0 0 54px;
}

.ai-inline-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.ai-inline-avatar.user {
  color: #67738a;
  background: #f0f3fa;
}

.ai-inline-avatar.assistant {
  position: relative;
  color: transparent;
  background: #6b6ee8;
  box-shadow: 0 8px 22px rgba(107, 110, 232, 0.22);
}

.ai-inline-avatar.assistant::before,
.ai-inline-avatar.assistant::after {
  content: "";
  position: absolute;
}

.ai-inline-avatar.assistant::before {
  left: 9px;
  top: 11px;
  width: 16px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 3px;
}

.ai-inline-avatar.assistant::after {
  left: 14px;
  top: 7px;
  width: 6px;
  height: 4px;
  border: 2px solid #ffffff;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.ai-assistant-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-left: 54px;
  color: #8b94a7;
  font-size: 16px;
  font-weight: 500;
}

.ai-assistant-text-block,
.ai-image-result-block,
.ai-video-result-block {
  width: 100%;
  padding-left: 56px;
}

.ai-message-card {
  max-width: min(760px, 100%);
  margin-left: 54px;
  padding: 18px 20px;
  border: 1px solid #ebe7de;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.025);
}

.ai-message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9ca3af;
  font-size: 13px;
  margin-bottom: 8px;
}

.screenshot-main .ai-message-meta {
  font-size: 12px;
}

.ai-message-body {
  color: #1f2937;
  line-height: 1.85;
  font-size: 15px;
}

.ai-message-body p {
  margin: 0;
}

.ai-message-body p + p {
  margin-top: 10px;
}

.ai-table-wrap {
  width: min(900px, 100%);
  overflow-x: auto;
  margin: 0;
  border: 1px solid #e3e7ee;
  border-radius: 0;
  background: #ffffff;
}

.ai-markdown-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.58;
}

.ai-markdown-table th,
.ai-markdown-table td {
  padding: 10px 12px;
  border: 1px solid #e3e7ee;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.ai-markdown-table th {
  background: #f5f6f8;
  color: #1f2937;
  font-weight: 700;
  line-height: 1.4;
}

.ai-markdown-table td {
  background: #ffffff;
}

.ai-code-block {
  overflow: auto;
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: #1d2a27;
  color: #f5f1ea;
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 13px;
  line-height: 1.6;
}

.ai-composer-card {
  display: grid;
  gap: 14px;
}

.ai-composer-doubao {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 12px;
  padding: 0 0 24px;
  background: transparent;
}

.screenshot-composer {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  gap: 14px;
  padding: 0 0 22px;
  background: transparent;
}

.ai-composer-card textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  border: 1px solid rgba(22, 20, 17, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  resize: vertical;
}

.ai-top-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border: 1px solid rgba(22, 20, 17, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.screenshot-composer .ai-top-toolbar {
  min-height: 62px;
  padding: 12px 18px;
  gap: 14px 18px;
  border-radius: 22px;
  border-color: #ece9e3;
  background: #f7f7fa;
}

.ai-top-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
}

.ai-top-toolbar select {
  min-width: 118px;
  height: 36px;
  padding: 0 34px 0 14px;
  border: 1px solid #dde1ea;
  border-radius: 12px;
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M2 2L6 6L10 2' stroke='%23818A9A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  color: #374151;
  font-size: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 3px rgba(15, 23, 42, 0.06) inset;
}

.ai-doubao-box {
  display: grid;
  gap: 14px;
  padding: 18px 22px 16px;
  border: 1px solid rgba(22, 20, 17, 0.1);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(27, 23, 18, 0.08);
}

.screenshot-composer .ai-doubao-box {
  border-radius: 28px;
  border-color: #e5e7eb;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.ai-doubao-box textarea {
  width: 100%;
  min-height: 98px;
  border: 0;
  background: transparent;
  resize: none;
  padding: 0 8px 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.65;
  outline: none;
}

.ai-doubao-box textarea::placeholder {
  color: #9ca3af;
}

.ai-doubao-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 6px 0;
}

.ai-mode-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-mode-switch .tab-btn.active {
  color: #4f63d8;
  border-color: rgba(79, 99, 216, 0.18);
  background: rgba(79, 99, 216, 0.12);
}

.screenshot-composer .ai-mode-switch .tab-btn {
  min-height: 34px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-inline: 10px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
}

.ai-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.screenshot-composer .ai-mode-switch .tab-btn.active {
  border-radius: 16px;
  color: #4d5fe3;
  background: #eef0ff;
  box-shadow: 0 2px 6px rgba(112, 129, 255, 0.12);
}

.ai-upload-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.ai-mode-divider {
  width: 1px;
  height: 28px;
  background: #e3e6ee;
}

.ai-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  min-height: 44px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
}

.screenshot-composer .ai-send-btn {
  min-width: 108px;
  min-height: 42px;
  border-radius: 16px;
  color: #ffffff;
  background: #bfc2f5;
  box-shadow: none;
}

.screenshot-composer .ai-send-btn:disabled {
  opacity: 0.65;
}

.ai-param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ai-param-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.ai-param-grid input[type="range"],
.ai-param-grid select {
  width: 100%;
}

.ai-upload-block {
  display: grid;
  gap: 12px;
}

.ai-upload-grid,
.ai-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ai-image-grid.ai-image-grid-ratio-9-16,
.ai-image-grid.ai-image-grid-ratio-3-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-image-grid.ai-image-grid-ratio-16-9,
.ai-image-grid.ai-image-grid-ratio-4-3,
.ai-image-grid.ai-image-grid-ratio-1-1,
.ai-image-grid.ai-image-grid-ratio-square {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-upload-grid-inline {
  grid-template-columns: repeat(4, minmax(0, 96px));
  gap: 10px;
}

.ai-upload-thumb,
.ai-image-card,
.ai-image-grid img {
  overflow: hidden;
  border-radius: 12px;
}

.ai-upload-thumb {
  position: relative;
  border: 1px solid rgba(22, 20, 17, 0.08);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 14px;
}

.ai-image-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border: 0;
  border-radius: 20px;
  background: #f8fafc;
}

.ai-image-grid.ai-image-grid-ratio-16-9 .ai-image-card,
.ai-image-grid.ai-image-grid-ratio-4-3 .ai-image-card {
  min-height: 220px;
}

.ai-image-grid.ai-image-grid-ratio-9-16 .ai-image-card,
.ai-image-grid.ai-image-grid-ratio-3-4 .ai-image-card {
  min-height: 340px;
}

.ai-upload-thumb img,
.ai-image-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.ai-image-grid.ai-image-grid-ratio-16-9 img {
  aspect-ratio: 16 / 9;
}

.ai-image-grid.ai-image-grid-ratio-4-3 img {
  aspect-ratio: 4 / 3;
}

.ai-image-grid.ai-image-grid-ratio-3-4 img {
  aspect-ratio: 3 / 4;
}

.ai-image-grid.ai-image-grid-ratio-9-16 img {
  aspect-ratio: 9 / 16;
}

.ai-upload-remove {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.62);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.ai-message video {
  width: 100%;
  border-radius: 12px;
  background: #000;
}

.ai-asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-image-result-actions,
.ai-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ai-image-hover-tools {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.ai-image-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(27, 31, 42, 0.38);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.ai-image-card:hover::after,
.ai-image-card:hover .ai-image-hover-tools {
  opacity: 1;
}

.ai-image-float-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(117, 111, 101, 0.72);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
}

.ai-image-float-btn:disabled,
.ai-preview-toolbar-btn:disabled {
  cursor: wait;
  opacity: 0.86;
}

.ai-mini-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #ffffff;
  animation: ai-spin 0.85s linear infinite;
}

.ai-preview-toolbar-btn .ai-mini-spinner {
  width: 20px;
  height: 20px;
}

.ai-image-hover-center {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.ai-image-hover-label {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 0;
  background: rgba(245, 239, 222, 0.95);
  color: #4b5563;
  font-size: 14px;
  line-height: 34px;
  white-space: nowrap;
}

.ai-image-result-actions .tab-btn,
.ai-inline-actions .tab-btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 16px;
  border-color: #dfe3ec;
  background: #ffffff;
  color: #6b7280;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.ai-inline-actions {
  margin-left: 54px;
}

.ai-image-result-actions {
  margin-left: 54px;
}

.ai-video-result-block video {
  max-width: min(720px, 100%);
  border-radius: 20px;
}

.ai-video-shell {
  position: relative;
  width: min(720px, 100%);
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

.ai-video-shell video {
  display: block;
  width: 100%;
  height: auto;
  max-height: var(--ai-media-max-height);
  object-fit: contain;
  border-radius: 0;
  background: #ffffff;
}

.ai-toolbar-collapse-btn {
  margin-left: auto;
  width: 22px;
  height: 22px;
  padding: 0;
  color: transparent;
  background: transparent;
  font-size: 0;
  position: relative;
}

.ai-toolbar-collapse-btn::before,
.ai-toolbar-collapse-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 1.5px;
  background: #7f8797;
  border-radius: 999px;
}

.ai-toolbar-collapse-btn::before {
  transform: translate(-75%, -50%) rotate(45deg);
}

.ai-toolbar-collapse-btn::after {
  transform: translate(-25%, -50%) rotate(-45deg);
}

.ai-asset-actions .primary-btn,
.ai-asset-actions .tab-btn {
  min-height: 36px;
  padding-inline: 12px;
}

.ai-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(34, 34, 34, 0.9);
}

.ai-preview-modal {
  position: relative;
  width: min(1320px, 100%);
  max-height: min(94vh, 1080px);
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.ai-preview-stage {
  display: grid;
  place-items: center;
}

.ai-preview-image-shell {
  min-height: 76vh;
  display: grid;
  place-items: center;
  overflow: visible;
  border-radius: 20px;
  background: transparent;
}

.ai-preview-image-shell img {
  max-width: min(1120px, 100%);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 20px;
  transition: transform 0.2s ease;
  transform-origin: center center;
}

.ai-preview-close-btn {
  position: fixed;
  top: 30px;
  right: 34px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #374151;
  font-size: 34px;
  line-height: 1;
}

.ai-preview-toolbar {
  position: fixed;
  bottom: 34px;
  left: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.92);
  transform: translateX(-50%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.ai-preview-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
}

.ai-preview-toolbar-btn:disabled {
  opacity: 0.45;
}

.ai-preview-counter {
  min-width: 74px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  text-align: center;
}

.ai-preview-toolbar-divider {
  width: 1px;
  height: 28px;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.16);
}

.ai-empty-state {
  align-self: center;
  justify-self: center;
  min-height: auto;
  display: grid;
  place-items: center;
  gap: 16px;
  text-align: center;
}

.ai-empty-illustration {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 28px;
  background: #f3f2ff;
  color: #a9acef;
  font-size: 0;
  line-height: 1;
}

.ai-empty-state h2 {
  margin: 0;
  color: #4b5563;
  font-size: 26px;
  font-weight: 700;
}

.ai-empty-state p {
  margin: 0;
  color: #9ca3af;
  font-size: 15px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.warn {
  color: #946200;
  background: rgba(246, 200, 88, 0.18);
}

.status-pill.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.status-pill.muted {
  color: #6f675c;
  background: rgba(111, 103, 92, 0.14);
}

.quota-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

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

.quota strong {
  display: block;
  margin-top: 8px;
  max-width: 100%;
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lesson-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 78px;
}

.icon-row {
  display: inline-flex;
  gap: 6px;
}

.trash-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.lesson-title-row h3 {
  min-width: 0;
  flex: 1;
  margin: 0;
}

.lesson-title-input {
  min-width: 0;
  flex: 1;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(31, 94, 84, 0.24);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  font-weight: 700;
}

.mini-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px !important;
  height: 34px;
  min-height: 34px;
  margin-top: 0 !important;
  padding: 0;
  border: 1px solid rgba(22, 20, 17, 0.1);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 253, 249, 0.74);
  box-shadow: none;
}

.mini-icon-btn:hover {
  color: var(--accent);
  border-color: rgba(31, 94, 84, 0.18);
  background: var(--accent-soft);
}

.danger-btn {
  color: #1f1f1f;
}

.danger-btn:hover {
  color: #fff;
  border-color: rgba(31, 31, 31, 0.2);
  background: #1f1f1f;
}

.admin-resource-card {
  position: relative;
  padding-top: 44px;
}

.resource-config-btn {
  position: absolute;
  top: 12px;
  right: 12px;
}

.resource-delete-btn {
  position: absolute;
  top: 12px;
  right: 54px;
}

.icon-text-btn {
  min-width: 42px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.lesson-meta,
.resource-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.resource-meta-primary {
  align-items: center;
  min-height: 30px;
  margin-top: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #4f473c;
  background: rgba(79, 71, 60, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.chip.secure {
  color: #8a4b20;
  background: rgba(193, 120, 53, 0.12);
}

.chip.teacher {
  color: var(--accent);
  background: var(--accent-soft);
}

.chip.student {
  color: #24548e;
  background: rgba(62, 125, 206, 0.12);
}

.chip.preview-processing {
  color: #72551c;
  background: rgba(190, 145, 48, 0.14);
}

.chip.preview-failed {
  color: #9b352d;
  background: rgba(176, 57, 48, 0.12);
}

.viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
}

.preview {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(22, 20, 17, 0.08);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.5)),
    linear-gradient(135deg, #f7f2ea 0 50%, #f2ebe0 50% 100%);
  background-size: auto, 28px 28px;
}

.preview-toolbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 252, 247, 0.92);
  border-bottom: 1px solid rgba(22, 20, 17, 0.08);
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--ink);
  border-color: rgba(22, 20, 17, 0.1);
  background: rgba(255, 253, 249, 0.8);
  text-decoration: none;
}

.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.doc-page {
  width: min(720px, calc(100% - 40px));
  margin: 28px auto;
  padding: 36px;
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: var(--shadow-md);
  user-select: none;
}

.doc-page.pdf-loading,
.doc-page.ppt-loading,
.doc-page.archive-loading {
  width: calc(100% - 24px);
  max-width: none;
  margin-inline: 12px;
}

.doc-page.pdf-loading {
  padding: 20px 16px 20px 12px;
}

.doc-page h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.doc-page p,
.doc-page li {
  color: var(--muted);
  line-height: 1.75;
}

.file-frame {
  width: 100%;
  height: 720px;
  border: 0;
  background: #fff;
}

.media-page audio {
  width: 100%;
  margin: 18px 0;
}

.video-player {
  display: block;
  width: 100%;
  margin: 0;
  border-radius: var(--radius);
  background: #000;
}

.secure-video-shell {
  position: relative;
  overflow: hidden;
  margin: 18px 0;
  border-radius: var(--radius);
  background: #000;
}

.pdf-reader {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 16px;
  min-height: 72vh;
  width: 100%;
}

.pdf-sidebar {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  max-height: 72vh;
  overflow: auto;
  padding-right: 6px;
}

.pdf-thumb {
  display: grid;
  grid-template-rows: 144px auto;
  gap: 6px;
  justify-items: center;
  width: 100%;
  min-height: 188px;
  padding: 8px;
  aspect-ratio: auto;
  overflow: hidden;
}

.pdf-thumb.active {
  border-color: rgba(31, 94, 84, 0.2);
  box-shadow: 0 0 0 2px rgba(31, 94, 84, 0.08);
}

.pdf-thumb-preview {
  display: grid;
  width: 100%;
  height: 144px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.pdf-thumb-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  background: #fff;
}

.pdf-thumb-label {
  line-height: 20px;
  text-align: center;
}

.pdf-canvas {
  display: block;
  max-width: none;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  background: #fff;
}

.pdf-opening-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  pointer-events: none;
}

.pdf-thumb-opening-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  background: #fff;
  pointer-events: none;
}

.pdf-reader-chrome {
  opacity: 1;
  transition: opacity 100ms ease-out;
}

.pdf-reader-chrome-pending {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.pdf-opening-tail {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0 18px;
  text-align: center;
}

.pdf-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 72vh;
  min-width: 0;
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 1px 0;
}

.pdf-toolbar .tab-btn {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 13px;
}

.pdf-toolbar .icon-text-btn {
  min-width: 32px;
  padding: 0;
  font-size: 20px;
}

.pdf-toolbar [data-pdf-counter] {
  min-width: 64px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.pdf-toolbar-fullscreen {
  margin-left: auto;
}

.pdf-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-height: 72vh;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-anchor: none;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  .pdf-reader-chrome {
    transition: none;
  }
}

.pdf-page-shell {
  display: grid;
  flex: 0 0 auto;
  justify-items: center;
  min-height: 0;
  place-items: start center;
  overflow: hidden;
  border: 1px solid rgba(22, 20, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.pdf-page-placeholder {
  align-self: center;
  color: var(--muted);
  font-size: 14px;
}

.pdf-loading-state {
  color: var(--muted);
  text-align: center;
  padding: 48px 0;
}

.image-preview {
  display: grid;
  min-height: 520px;
  place-items: center;
  padding: 24px;
}

.image-preview img {
  max-width: 100%;
  max-height: 680px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.slide-list,
.ppt-loading,
.ppt-player,
.archive-preview {
  display: grid;
  gap: 16px;
}

.ppt-conversion-state {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.ppt-conversion-state h2,
.ppt-conversion-state p {
  margin: 0;
}

.ppt-conversion-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(31, 94, 84, 0.16);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ppt-conversion-spin 0.8s linear infinite;
}

@keyframes ppt-conversion-spin {
  to { transform: rotate(360deg); }
}

.upload-resource-card {
  align-content: start;
}

.upload-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 94, 84, 0.12);
}

.upload-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 120ms linear;
}

.slide-card {
  padding: 18px;
  border: 1px solid rgba(22, 20, 17, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 252, 247, 0.86);
}

.slide-card h3 {
  margin: 12px 0 8px;
}

.ppt-stage {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 8px;
}

.ppt-slide-image {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  background: #fff;
}

.ppt-controls,
.archive-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ppt-status {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--muted);
  text-align: center;
}

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

.org-search-shell {
  margin-bottom: 22px;
}

.org-panel-head h2 {
  margin: 0;
  font-size: 22px;
}

.org-panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.org-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 16px;
}

.org-search-row input,
.org-search-row select {
  min-width: 0;
}

.org-search-row .primary-btn {
  min-width: 144px;
}

.org-detail-shell {
  display: grid;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(22, 20, 17, 0.08);
}

.org-empty-state {
  margin-top: 18px;
  padding: 28px 24px;
}

.archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.archive-name {
  color: var(--ink);
  line-height: 1.5;
  word-break: break-all;
}

.archive-size {
  color: var(--muted);
  white-space: nowrap;
}

.readonly-field {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}

.readonly-field span,
.readonly-field small {
  color: var(--muted);
}

.blackout {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #6f6c67;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.96), rgba(249, 246, 241, 0.98) 52%, rgba(244, 239, 232, 0.99)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 241, 235, 0.98));
  backdrop-filter: blur(8px);
}

.blackout.hidden {
  display: none;
}

.blackout-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.blackout-panel h2 {
  margin: 0;
  color: #7a7670;
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.blackout-panel p {
  margin: 0;
  color: #9a958f;
  font-size: 15px;
}

.blackout-mouse {
  position: relative;
  width: 58px;
  height: 82px;
}

.blackout-mouse-body {
  position: absolute;
  inset: 10px 12px 0;
  border: 2px solid #7a7670;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.35);
}

.blackout-mouse-wheel {
  position: absolute;
  top: 23px;
  left: 50%;
  width: 4px;
  height: 14px;
  border-radius: 999px;
  background: #7a7670;
  transform: translateX(-50%);
}

.blackout-mouse-wave {
  position: absolute;
  top: 24px;
  width: 12px;
  height: 12px;
  border-top: 2px solid #8e8982;
  border-radius: 50%;
}

.blackout-mouse-wave-left {
  left: 2px;
  border-left: 2px solid #8e8982;
  transform: rotate(-26deg);
}

.blackout-mouse-wave-right {
  right: 2px;
  border-right: 2px solid #8e8982;
  transform: rotate(26deg);
}

.side-panel h3 {
  margin: 0 0 12px;
}

.side-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

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

.phase {
  padding: 20px;
  border-left: 4px solid var(--accent);
}

.phase:nth-child(2) {
  border-left-color: #8d6540;
}

.phase h3 {
  margin: 0 0 8px;
}

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

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(22, 20, 17, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 252, 247, 0.72);
}

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  background: var(--paper);
}

.login-page > .global-topnav {
  grid-column: 1 / -1;
}

.login-page > .site-footer {
  grid-column: 1 / -1;
  width: 100%;
}

.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 56px min(8vw, 72px) 8vw;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(247, 243, 236, 0.94), rgba(247, 243, 236, 0.72)),
    url("./assets/hero-ai-education.png");
  background-size: cover;
  background-position: center;
}

.login-brand {
  align-self: flex-start;
}

.login-visual h1 {
  margin: clamp(44px, 8vh, 88px) 0 14px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1;
}

.login-title {
  max-width: 360px;
  font-size: clamp(18px, 1.95vw, 24px);
  line-height: 1.2;
  white-space: nowrap;
}

.login-visual p {
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 48px;
  background: rgba(255, 252, 247, 0.9);
  border-left: 1px solid rgba(22, 20, 17, 0.08);
  box-shadow: -18px 0 48px rgba(27, 23, 18, 0.06);
}

.login-card h2 {
  margin: 10px 0 4px;
  font-size: 28px;
}

.login-card > .form-hint {
  margin: -2px 0 2px;
}

.login-card label,
.org-form label,
.config-form label,
.modal label,
.picker label {
  display: grid;
  gap: 8px;
  color: #40382f;
  font-size: 14px;
  font-weight: 700;
}

.login-card input,
.login-card select,
.org-form input,
.org-form select,
.config-form input,
.config-form select,
.modal input,
.picker input,
.picker select,
.org-search-row select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(22, 20, 17, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.form-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.form-error {
  margin: 0;
  color: #b44b3f;
  font-size: 13px;
  line-height: 1.55;
}

.form-success {
  margin: 0;
  color: #1f5e54;
  font-size: 13px;
  line-height: 1.55;
}

.login-org-results {
  display: grid;
  gap: 6px;
  margin-top: 2px;
  padding: 8px;
  border: 1px solid rgba(22, 20, 17, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.login-org-option {
  justify-content: flex-start;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.login-org-option:hover {
  background: var(--accent-soft);
}

.login-org-empty {
  padding: 4px 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.align-self {
  align-self: flex-start;
}

.text-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f5e54;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.text-btn:hover {
  color: #17483f;
}

.admin-layout {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  min-height: calc(100vh - var(--app-topnav-height));
}

.fixed-sidebar {
  position: sticky;
  top: var(--app-topnav-height);
  height: calc(100vh - var(--app-topnav-height));
  overflow: auto;
  padding: 22px;
  color: var(--ink);
  background: rgba(255, 252, 247, 0.84);
  border-right: 1px solid rgba(22, 20, 17, 0.08);
  backdrop-filter: blur(14px);
}

.fixed-sidebar .brand {
  margin-bottom: 24px;
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.side-nav button {
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  color: #4f473c;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
}

.side-nav button.active,
.side-nav button:hover {
  color: var(--accent);
  border-color: rgba(31, 94, 84, 0.14);
  background: var(--accent-soft);
}

.picker {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(22, 20, 17, 0.08);
  background: rgba(255, 255, 255, 0.48);
}

.picker label {
  color: var(--muted);
}

.admin-main,
.learn-main {
  min-width: 0;
  padding: 28px;
}

.app-topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--app-topnav-height);
  padding: 8px 28px;
  border-bottom: 1px solid rgba(22, 20, 17, 0.08);
  background: rgba(255, 252, 247, 0.78);
  backdrop-filter: blur(16px);
}

.top-brand {
  min-height: 34px;
  padding: 0;
  background: transparent;
  font-size: 20px;
}

.login-brand {
  align-self: flex-start;
}

.hidden {
  display: none !important;
}

.side-title {
  margin-bottom: 24px;
  font-size: 24px;
}

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

.page-head.compact {
  margin-top: 28px;
}

.page-head h1,
.page-head h2 {
  margin: 0;
}

.page-head h1 {
  font-size: 32px;
}

.page-head h2 {
  font-size: 24px;
}

.page-head p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-block,
.account-table,
.org-form,
.config-form {
  margin-bottom: 16px;
}

.account-section {
  display: grid;
  gap: 16px;
}

.account-section-head {
  margin-bottom: 0;
}

.account-stack {
  display: grid;
  gap: 16px;
}

.detail-block h2,
.account-table h2,
.account-preview h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.course-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-button {
  border: 0;
  cursor: pointer;
}

.chip-button:hover {
  color: #fff;
  background: var(--accent);
}

.table {
  display: grid;
  border: 1px solid rgba(22, 20, 17, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 38px;
  border-top: 1px solid rgba(22, 20, 17, 0.08);
}

.table-row-accounts {
  grid-template-columns: minmax(180px, 1.1fr) minmax(150px, 1fr) minmax(180px, 1fr) minmax(220px, 1.2fr);
}

.point-account-row {
  grid-template-columns: minmax(108px, 0.78fr) minmax(88px, 0.52fr) minmax(142px, 0.86fr) minmax(72px, 0.4fr) minmax(72px, 0.4fr) minmax(332px, 1.78fr);
}

.table-row-points {
  grid-template-columns: minmax(0, 1.6fr) minmax(130px, 0.8fr) minmax(180px, 1fr);
}

.table-row-point-admin {
  grid-template-columns: minmax(80px, 0.55fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(180px, 1.2fr) minmax(110px, 0.7fr) minmax(170px, 1fr);
}

.table-row-cost-risk {
  grid-template-columns: minmax(150px, 0.75fr) minmax(110px, 0.55fr) minmax(210px, 1.05fr) minmax(190px, 0.95fr) minmax(430px, 2.15fr) minmax(105px, 0.55fr) minmax(105px, 0.55fr) minmax(85px, 0.45fr) minmax(85px, 0.45fr) minmax(190px, 0.95fr);
}

.ai-cost-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-cost-risk-table {
  overflow-x: auto;
}

.ai-cost-risk-table .table-row-cost-risk {
  min-width: 1850px;
}

.ai-cost-table-head {
  margin-bottom: 16px;
}

.ai-cost-table-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.ai-cost-table-head p {
  margin: 0;
  color: var(--muted);
}

.ai-cost-call-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ai-cost-call-meta small {
  overflow: hidden;
  color: var(--muted);
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-cost-calculation {
  color: #475467;
  font-size: 12px;
  line-height: 1.55;
}

.table-row:first-child {
  border-top: 0;
}

.table-row span {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 10px 10px;
  overflow-wrap: anywhere;
}

.table-row span + span {
  border-left: 1px solid rgba(22, 20, 17, 0.08);
}

.table-head {
  color: #40382f;
  background: rgba(79, 71, 60, 0.06);
  font-weight: 800;
}

.password-cell,
.status-cell,
.account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-cell {
  flex-wrap: nowrap;
}

.status-cell .status-pill {
  white-space: nowrap;
}

.account-actions {
  justify-content: flex-start;
}

.account-section-head > .nav-actions .primary-btn,
.account-section-head > .nav-actions .tab-btn {
  height: 42px;
  min-height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}

.account-action-btn {
  min-height: 34px;
  padding-inline: 10px;
  white-space: nowrap;
}

.point-inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.point-inline-form input {
  width: min(220px, 100%);
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(22, 20, 17, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.88);
}

.password-value {
  min-width: 86px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(79, 71, 60, 0.06);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-align: center;
}

.password-toggle-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.password-toggle-btn:disabled:hover {
  color: var(--muted);
  border-color: rgba(22, 20, 17, 0.1);
  background: rgba(255, 253, 249, 0.74);
}

.account-action-btn {
  min-height: 34px;
  padding: 0 12px;
  box-shadow: none;
  border-color: rgba(22, 20, 17, 0.1);
  background: rgba(255, 253, 249, 0.84);
  color: #3f392f;
  font-size: 13px;
}

.account-action-btn:hover {
  border-color: rgba(31, 94, 84, 0.18);
  background: var(--accent-soft);
  color: var(--accent);
}


.org-form,
.config-form {
  display: grid;
  gap: 18px;
}

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

fieldset {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(22, 20, 17, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.34);
}

legend {
  padding: 0 6px;
  color: #40382f;
  font-weight: 800;
}

fieldset label {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

fieldset input {
  width: auto !important;
  min-height: auto !important;
}

.account-preview {
  padding-top: 4px;
}

.preview-table {
  min-width: 0;
}

.preview-table h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 14, 12, 0.48);
}

.modal {
  display: grid;
  gap: 16px;
  width: min(460px, 100%);
}

.modal h2 {
  margin: 0;
}

.ai-notice-modal {
  position: relative;
  width: min(420px, 100%);
  padding: 24px;
}

.ai-notice-modal h2 {
  padding-right: 32px;
  font-size: var(--type-lg);
}

.ai-notice-modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.ai-notice-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

.ai-notice-close-btn:hover {
  color: var(--ink);
  background: rgba(99, 102, 241, 0.08);
  transform: none;
}

.confirm-modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.success-detail-item {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(22, 20, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.success-detail-item strong {
  font-size: 13px;
}

.success-detail-item code {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.danger-solid-btn {
  background: #865743;
  box-shadow: 0 10px 24px rgba(134, 87, 67, 0.16);
}

.danger-solid-btn:hover {
  background: #714936;
}

.loading-btn {
  gap: 8px;
  cursor: wait;
}

.button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(246, 243, 238, 0.32);
  border-top-color: #f6f3ee;
  border-radius: 999px;
  animation: button-spin 0.72s linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

.ppt-preview:fullscreen {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  background-color: #efe8dc;
}

.ppt-preview:fullscreen .preview-toolbar {
  padding-inline: 24px;
}

.ppt-preview:fullscreen .pdf-sidebar {
  display: grid;
  max-height: calc(100vh - 156px);
}

.ppt-preview:fullscreen .pdf-reader {
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: start;
  width: 100%;
}

.ppt-preview:fullscreen .pdf-pages {
  justify-items: center;
  align-content: start;
  width: 100%;
  max-height: calc(100vh - 156px);
}

.ppt-preview:fullscreen .pdf-page-shell {
  justify-items: center;
  width: 100%;
}

.ppt-preview:fullscreen .doc-page {
  width: calc(100% - 48px);
  min-height: calc(100vh - 132px);
}

.ppt-preview:fullscreen .pdf-main {
  width: 100%;
  min-width: 0;
  margin-inline: 0;
}

.ppt-preview:fullscreen .ppt-player {
  width: 100%;
  align-content: center;
  justify-items: center;
  min-height: calc(100vh - 132px);
}

.ppt-preview:fullscreen .ppt-stage {
  width: calc(100vw - 48px);
  min-height: calc(100vh - 240px);
  justify-items: center;
  align-content: center;
  padding-inline: 0;
}

.ppt-preview:fullscreen .ppt-slide-image {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 260px);
}

.ppt-preview:fullscreen .ppt-controls {
  width: calc(100vw - 48px);
  margin-inline: auto;
}

.presentation-preview:fullscreen {
  display: block;
  background: #111;
}

.presentation-preview:fullscreen .preview-toolbar {
  display: none;
}

.presentation-preview:fullscreen > [data-ppt-url] {
  width: 100%;
  height: 100vh;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: #111;
  box-shadow: none;
}

.presentation-preview:fullscreen [data-ppt-url] .pdf-reader,
.presentation-preview:fullscreen [data-ppt-url] .pdf-main {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.presentation-preview:fullscreen [data-ppt-url] .pdf-sidebar,
.presentation-preview:fullscreen [data-ppt-url] .pdf-toolbar {
  display: none;
}

.presentation-preview:fullscreen [data-ppt-url] .pdf-pages {
  display: grid;
  width: 100%;
  height: 100vh;
  max-height: none;
  padding: 24px;
  place-items: center;
  overflow: hidden;
  background: #111;
}

.presentation-preview:fullscreen [data-ppt-url] .pdf-page-shell {
  display: none;
}

.presentation-preview:fullscreen [data-ppt-url] .pdf-page-shell.ppt-slide-active {
  display: grid;
  width: min(calc(100vw - 48px), calc((100vh - 48px) * var(--ppt-slide-ratio, 1.7778))) !important;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  place-items: center;
  border: 0;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
  animation: ppt-slide-arrive 160ms ease-out;
}

.presentation-preview:fullscreen [data-ppt-url] .pdf-page-shell.ppt-slide-active .pdf-canvas,
.presentation-preview:fullscreen [data-ppt-url] .pdf-page-shell.ppt-slide-active .pdf-opening-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}

.ppt-presentation-hud {
  position: fixed;
  z-index: 8;
  right: 12px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(10px);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 140ms ease-out, transform 140ms ease-out;
}

.presentation-preview:fullscreen.ppt-presentation-controls-visible .ppt-presentation-hud,
.ppt-presentation-hud:hover,
.ppt-presentation-hud:focus-within {
  opacity: 0.82;
  pointer-events: auto;
  transform: translateY(0);
}

.ppt-presentation-hud button {
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 19px;
  line-height: 1;
}

.ppt-presentation-hud button:disabled {
  opacity: 0.35;
}

.presentation-preview:fullscreen.ppt-presentation-waiting::after {
  position: fixed;
  z-index: 9;
  left: 50%;
  bottom: 28px;
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.58);
  content: "后续页面正在加载…";
  font-size: 13px;
  transform: translateX(-50%);
}

@keyframes ppt-slide-arrive {
  from { opacity: 0.88; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .presentation-preview:fullscreen [data-ppt-url] .pdf-page-shell.ppt-slide-active {
    animation: none;
  }

  .ppt-presentation-hud {
    transition: none;
  }
}

@media (max-width: 920px) {
  .grid.four,
  .grid.three,
  .grid.two,
  .org-form-grid,
  .quota-board,
  .timeline,
  .viewer,
  .login-page,
  .admin-layout,
  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .ai-page-frame {
    grid-template-columns: 1fr;
  }

  .ai-chat-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(22, 20, 17, 0.08);
  }

  .sidebar,
  .fixed-sidebar,
  .main,
  .admin-main,
  .learn-main {
    padding: 18px;
  }

  .ai-entry-card,
  .ai-entry-modes,
  .ai-param-grid,
  .ai-upload-grid,
  .ai-image-grid {
    grid-template-columns: 1fr;
  }

  .ai-upload-grid-inline {
    grid-template-columns: repeat(3, minmax(0, 96px));
  }

  .appbar,
  .section-head,
  .archive-summary,
  .archive-row,
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .pdf-reader {
    grid-template-columns: 1fr;
  }

  .pdf-sidebar {
    grid-auto-columns: 160px;
    grid-auto-flow: column;
    overflow: auto;
    max-height: none;
    padding-bottom: 6px;
  }

  .ppt-preview:fullscreen .pdf-reader {
    grid-template-columns: 1fr;
  }

  .ppt-preview:fullscreen .pdf-sidebar {
    display: none;
  }

  .login-visual {
    min-height: 320px;
  }

  .fixed-sidebar {
    position: relative;
    top: 0;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(22, 20, 17, 0.08);
  }

  .org-search-row {
    grid-template-columns: 1fr;
  }

  .org-search-row .primary-btn {
    width: 100%;
  }

  .ai-session-row {
    grid-template-columns: 1fr;
  }

  .ai-preview-stage {
    grid-template-columns: 1fr;
  }

  .ai-preview-nav {
    display: none;
  }

  .ai-doubao-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-mode-switch {
    width: 100%;
  }

  .ai-send-btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar,
  .section {
    width: min(100% - 24px, 1180px);
  }

  .section {
    padding: 22px 0 24px;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .course-stage-card p {
    min-height: auto;
  }

  .doc-page {
    padding: 24px 18px;
  }

  .preview {
    min-height: 480px;
  }

  .login-card,
  .admin-main,
  .learn-main {
    padding: 18px;
  }

  .app-topnav {
    padding: 14px 18px;
  }
}

/* Hexa brand system: quiet neutrals, one mint accent, no decorative color noise. */
:root {
  --ink: #20312b;
  --muted: #6f7d76;
  --line: #d8dfda;
  --line-strong: #c6d0c9;
  --paper: #f4f5ef;
  --paper-strong: #ecefe8;
  --panel: rgba(252, 253, 249, 0.94);
  --panel-solid: #fcfdf9;
  --accent: #347761;
  --accent-strong: #285f4f;
  --accent-soft: #e1f3e9;
  --accent-soft-strong: #cdebdc;
  --mint: #8bd8b8;
  --shadow-sm: 0 12px 30px rgba(32, 49, 43, 0.055);
  --shadow-md: 0 24px 64px rgba(32, 49, 43, 0.09);
  --radius: 12px;
  --font-body:
    "Avenir Next", "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --font-display:
    "Avenir Next", "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
}

body {
  color: var(--ink);
  background: var(--paper);
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-body);
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

.brand,
.top-brand {
  gap: 10px;
  color: var(--ink);
}

.brand-mark {
  display: inline-block;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: url("./assets/ai-planet-brand/logo-mark.svg") center / contain no-repeat;
  box-shadow: none;
}

.brand-name {
  color: var(--ink);
  font-size: 18px;
  font-weight: 720;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-english {
  margin-left: 1px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.primary-btn,
.upload-btn {
  color: #fcfdf9;
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: none;
}

.primary-btn:hover,
.upload-btn:hover {
  color: #fcfdf9;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  box-shadow: 0 10px 24px rgba(32, 49, 43, 0.11);
}

.ghost-btn,
.tab-btn,
.icon-btn {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel-solid);
  box-shadow: none;
}

.ghost-btn:hover,
.tab-btn:hover,
.icon-btn:hover {
  color: var(--accent-strong);
  border-color: var(--line-strong);
  background: #ffffff;
}

.tab-btn.active,
.side-nav button.active,
.side-nav button:hover,
.ai-session-row.active .screenshot-item,
.screenshot-composer .ai-mode-switch .tab-btn.active {
  color: var(--accent-strong);
  border-color: transparent;
  background: var(--accent-soft);
}

.card {
  border-color: var(--line);
  border-radius: 14px;
  background: var(--panel-solid);
  box-shadow: none;
}

.app-topnav {
  border-bottom-color: var(--line);
  background: rgba(252, 253, 249, 0.92);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.fixed-sidebar {
  border-right-color: var(--line);
  background: #eef1eb;
}

.side-nav button {
  color: #54635c;
  border-radius: 10px;
}

.session-chip,
.point-chip {
  border-color: var(--line);
  background: var(--panel-solid);
  color: var(--muted);
}

.point-chip {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.chip,
.role-icon {
  color: var(--accent-strong);
  border-color: var(--line);
  background: var(--accent-soft);
}


/* Login and account surfaces */
.login-page {
  color: var(--ink);
  background: var(--paper);
}

.login-visual {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: var(--accent-soft);
}

.login-visual::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -40px;
  width: min(48vw, 430px);
  aspect-ratio: 1;
  background: url("./assets/ai-planet-brand/logo-mark.svg") center / contain no-repeat;
  opacity: 0.12;
  transform: rotate(-7deg);
  pointer-events: none;
}

.login-visual h1,
.login-title {
  position: relative;
  z-index: 1;
  color: var(--ink);
}

.login-visual p {
  position: relative;
  z-index: 1;
  color: #5c6d65;
}

.login-card {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  box-shadow: var(--shadow-sm);
}

.login-card input,
.login-card select,
.lesson-title-input,
.course-name-input,
.org-form input,
.org-form select {
  color: var(--ink);
  border-color: var(--line);
  background: #ffffff;
}

.login-card input:focus,
.login-card select:focus,
.lesson-title-input:focus,
.course-name-input:focus,
.org-form input:focus,
.org-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 216, 184, 0.26);
}

.admin-login-link {
  margin-top: 6px;
  color: #7b8781;
  font-size: 12px;
}

/* AI workspace follows the same single-accent system. */
.ai-page-frame.screenshot-style,
.ai-page-frame.screenshot-style .ai-chat-main,
.ai-page-main.standalone {
  background: var(--paper);
}

.ai-page-frame.screenshot-style .ai-chat-sidebar {
  border-right-color: var(--line);
  background: #eef1eb;
}

.ai-new-chat-btn {
  color: var(--ink);
  border-color: var(--line);
  border-radius: 10px;
  background: var(--panel-solid);
}

.ai-session-name,
.ai-assistant-title,
.ai-message-body {
  color: var(--ink);
}

.ai-session-date {
  color: var(--muted);
}

.screenshot-item {
  border-radius: 10px;
}

.ai-inline-avatar.assistant {
  background: var(--accent);
  box-shadow: none;
}

.ai-user-bubble {
  color: var(--ink);
  background: var(--accent-soft);
}

.ai-message-card,
.ai-doubao-box,
.screenshot-composer .ai-doubao-box,
.ai-top-toolbar,
.screenshot-composer .ai-top-toolbar {
  border-color: var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
  box-shadow: none;
}

.screenshot-composer .ai-doubao-box {
  box-shadow: 0 16px 38px rgba(32, 49, 43, 0.08);
}

.screenshot-composer .ai-send-btn {
  color: #fcfdf9;
  background: var(--ink);
}

.ai-empty-illustration {
  color: var(--accent);
  background: var(--accent-soft);
}

.ai-empty-state h2 {
  color: var(--ink);
}

.ai-empty-state p {
  color: var(--muted);
}

@media (max-width: 720px) {
  .login-visual::after {
    width: 280px;
  }
}

/* Unified visual refresh: calm human-tech education system. */
h1,
h2,
h3,
p {
  text-wrap: pretty;
}

.brand,
.top-brand {
  font-family: var(--font-body);
  font-weight: 800;
}

.brand-mark {
  background-image: url("./assets/logo-site.png");
}

.topbar {
  padding: 22px 0 18px;
}

.section {
  padding: 46px 0 42px;
}

.section-tight {
  padding-top: 34px;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h1,
.section-head h2 {
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 850;
  letter-spacing: 0;
}

.section-head h2 {
  font-size: clamp(28px, 3vw, 40px);
}

.ghost-btn,
.primary-btn,
.icon-btn,
.tab-btn,
.upload-btn,
.mini-icon-btn,
.footer-link {
  border-radius: 8px;
}

.primary-btn,
.upload-btn {
  background: linear-gradient(180deg, #238276, var(--accent-strong));
  box-shadow: 0 12px 26px rgba(31, 117, 105, 0.18);
}

.primary-btn:hover,
.upload-btn:hover {
  background: linear-gradient(180deg, var(--accent), #0f4a44);
}

.ghost-btn,
.tab-btn,
.icon-btn {
  border-color: rgba(31, 117, 105, 0.14);
  background: rgba(255, 255, 251, 0.78);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.ghost-btn:hover,
.tab-btn:hover,
.icon-btn:hover {
  border-color: rgba(31, 117, 105, 0.28);
  background: #fffffb;
}

.system-admin-btn {
  color: #526263;
  background: rgba(255, 255, 251, 0.5);
}

.card,
.quota,
.pdf-thumb,
.archive-row,
.readonly-field,
.slide-card,
.doc-page {
  border-color: rgba(31, 117, 105, 0.12);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.card,
.quota,
.side-panel,
.detail-block,
.account-table,
.org-form,
.config-form,
.modal {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.feature-card:hover,
.course-card:hover,
.lesson-card:hover,
.resource-card:hover {
  border-color: rgba(31, 117, 105, 0.24);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.role-card,
.feature-card,
.resource-card,
.lesson-card,
.course-card,
.detail-block,
.account-table,
.org-form,
.config-form,
.modal,
.quota,
.side-panel {
  padding: 18px;
}

.role-icon {
  background:
    linear-gradient(135deg, rgba(229, 242, 238, 0.96), rgba(255, 255, 251, 0.82));
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(31, 117, 105, 0.08);
}

.role-card h3,
.feature-card h3,
.course-card h3,
.lesson-card h3,
.resource-card h3 {
  font-family: var(--font-body);
  font-weight: 850;
}

.course-stage-card {
  gap: 12px;
}

.course-stage-card p {
  min-height: 126px;
}

.course-stage-media {
  height: 190px;
  border-color: rgba(31, 117, 105, 0.1);
  background:
    linear-gradient(135deg, rgba(229, 242, 238, 0.68), rgba(255, 255, 251, 0.92));
}

.course-stage-image {
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: cover;
}

.course-stage-card:nth-child(2) .role-icon,
.status-pill.warn {
  color: #7a5420;
  background: rgba(232, 184, 109, 0.2);
}

.course-stage-card:nth-child(3) .role-icon,
.chip.student {
  color: #315d7b;
  background: rgba(77, 126, 159, 0.14);
}

.chip,
.status-pill,
.session-chip {
  border-radius: 999px;
}

.site-footer {
  border-top-color: rgba(31, 117, 105, 0.1);
}

.footer-link {
  color: var(--muted);
  border-bottom-color: rgba(31, 117, 105, 0.18);
}

.login-page {
  background:
    linear-gradient(120deg, rgba(31, 117, 105, 0.1), transparent 36%),
    var(--paper);
}

.login-visual {
  background:
    linear-gradient(110deg, rgba(251, 252, 248, 0.96), rgba(251, 252, 248, 0.8) 48%, rgba(251, 252, 248, 0.38)),
    url("./assets/hero-ai-education.png");
  background-size: cover;
  background-position: center right;
}

.login-visual h1 {
  max-width: 660px;
  font-family: var(--font-body);
  font-weight: 850;
  text-wrap: balance;
}

.login-title {
  max-width: 680px;
  white-space: normal;
}

.login-card {
  background: rgba(255, 255, 251, 0.94);
  border-left-color: rgba(31, 117, 105, 0.12);
  box-shadow: -18px 0 54px rgba(45, 68, 65, 0.08);
}

.login-card h2 {
  font-family: var(--font-body);
  font-weight: 850;
}

.login-card label,
.org-form label,
.config-form label,
.modal label,
.picker label {
  color: #344446;
}

.login-card input,
.login-card select,
.org-form input,
.org-form select,
.config-form input,
.config-form select,
.modal input,
.picker input,
.picker select,
.org-search-row select,
.lesson-title-input,
.ai-composer-card textarea {
  border-color: rgba(31, 117, 105, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 251, 0.88);
}

.login-card input:focus,
.login-card select:focus,
.org-form input:focus,
.org-form select:focus,
.config-form input:focus,
.config-form select:focus,
.modal input:focus,
.picker input:focus,
.picker select:focus,
.org-search-row select:focus,
.lesson-title-input:focus,
.ai-composer-card textarea:focus {
  outline: 3px solid rgba(31, 117, 105, 0.13);
  border-color: rgba(31, 117, 105, 0.42);
}

.admin-layout {
  background:
    linear-gradient(120deg, rgba(31, 117, 105, 0.06), transparent 34%),
    var(--paper);
}

.fixed-sidebar,
.sidebar,
.ai-chat-sidebar {
  border-right-color: rgba(31, 117, 105, 0.12);
  background: rgba(255, 255, 251, 0.8);
}

.side-title {
  font-family: var(--font-body);
  font-weight: 850;
}

.side-nav button {
  border-radius: 8px;
}

.side-nav button.active,
.side-nav button:hover {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.page-head h1,
.appbar h1,
.org-panel-head h2 {
  font-family: var(--font-body);
  font-weight: 850;
}

.preview {
  border-color: rgba(31, 117, 105, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 251, 0.76), rgba(245, 247, 243, 0.7)),
    linear-gradient(135deg, #f5f9f5 0 50%, #edf5f0 50% 100%);
  background-size: auto, 30px 30px;
}

.preview-toolbar {
  background: rgba(255, 255, 251, 0.94);
  border-bottom-color: rgba(31, 117, 105, 0.12);
}

.empty {
  border-color: rgba(31, 117, 105, 0.18);
  background: rgba(255, 255, 251, 0.74);
}

.ai-workspace-standalone,
.ai-page-main.standalone,
.ai-page-frame.screenshot-style .ai-chat-main {
  background: #fbfcf8;
}

.ai-page-frame.screenshot-style {
  background: #fbfcf8;
}

.ai-workspace-standalone .app-topnav {
  position: sticky;
  background: rgba(255, 255, 255, 0.86);
}

.ai-page-frame.screenshot-style .ai-chat-sidebar {
  border-right-color: rgba(31, 117, 105, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 251, 0.92), rgba(237, 243, 239, 0.62));
}

.ai-assistant-title,
.ai-session-name,
.ai-message-body {
  color: var(--ink);
}

.ai-new-chat-btn {
  min-height: 48px;
  border-radius: 8px;
  border-color: rgba(31, 117, 105, 0.14);
  color: var(--accent-strong);
  background: #fffffb;
}

.screenshot-item {
  border-radius: 8px;
}

.ai-session-row.active .screenshot-item {
  background: var(--accent-soft);
}

.ai-inline-avatar.assistant {
  background: var(--accent);
  box-shadow: 0 8px 22px rgba(31, 117, 105, 0.2);
}

.ai-user-bubble {
  border-radius: 8px;
  background: #e9f2fb;
}

.ai-message-card,
.ai-doubao-box,
.screenshot-composer .ai-doubao-box,
.ai-top-toolbar,
.screenshot-composer .ai-top-toolbar,
.ai-image-card,
.ai-video-shell,
.ai-preview-image-shell img {
  border-radius: 8px;
}

.ai-message-card {
  border-color: rgba(31, 117, 105, 0.12);
  background: #fffffb;
}

.screenshot-composer {
  width: min(1180px, calc(100% - 48px));
}

.screenshot-composer .ai-top-toolbar {
  border-color: rgba(31, 117, 105, 0.12);
  background: rgba(255, 255, 251, 0.84);
}

.ai-doubao-box,
.screenshot-composer .ai-doubao-box {
  border-color: rgba(31, 117, 105, 0.14);
  background: #fffffb;
  box-shadow: 0 14px 36px rgba(45, 68, 65, 0.08);
}

.screenshot-composer .ai-mode-switch .tab-btn.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  box-shadow: none;
}

.screenshot-composer .ai-send-btn {
  color: #fffffb;
  background: var(--accent);
}

.ai-empty-illustration {
  border-radius: 8px;
  background: var(--accent-soft);
}

.ai-empty-state h2 {
  color: var(--ink);
}

@media (max-width: 920px) {
  .login-visual {
    min-height: 340px;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 32px 0 34px;
  }

  .course-stage-media {
    height: 210px;
  }

  .login-visual h1 {
    margin-top: 58px;
    font-size: 38px;
  }
}

.ai-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.ai-upload-trigger {
  border-radius: 8px;
  color: #6b7a7b;
  transition:
    color 0.18s ease,
    background 0.18s ease;
}

.ai-upload-trigger:hover {
  color: var(--accent-strong);
  background: rgba(31, 117, 105, 0.08);
}

.ai-upload-trigger .ai-icon {
  width: 20px;
  height: 20px;
}

.ai-mode-pill-icon,
.ai-send-btn-icon {
  position: static;
  display: inline-block;
  color: currentColor;
  font-size: initial;
  line-height: normal;
}

.ai-mode-pill-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.ai-send-btn-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.ai-empty-state.empty {
  width: min(520px, calc(100% - 48px));
  min-height: 310px;
  padding: 0;
  border: 0;
  background: transparent;
}

.ai-empty-state {
  gap: 18px;
}

.ai-empty-illustration {
  width: 104px;
  height: 104px;
  border-radius: 26px;
  background: rgba(229, 242, 238, 0.78);
  color: rgba(31, 117, 105, 0.54);
}

.ai-empty-illustration .ai-icon {
  width: 44px;
  height: 44px;
  stroke-width: 1.9;
}

.ai-empty-illustration.image,
.ai-empty-illustration.video {
  background: rgba(229, 242, 238, 0.64);
}

.ai-empty-state h2 {
  color: #4d5a5c;
  font-size: 30px;
  font-weight: 780;
  line-height: 1.18;
}

.ai-empty-state p {
  color: #879495;
  font-size: 18px;
  line-height: 1.5;
}

.screenshot-composer .ai-mode-switch .tab-btn {
  gap: 7px;
}

.screenshot-composer .ai-mode-switch .tab-btn.active {
  color: var(--accent-strong);
  background: rgba(31, 117, 105, 0.1);
}

.screenshot-composer .ai-send-btn {
  background: var(--accent);
}

/* AI workspace targeted fixes: fixed composer, quiet sidebar, smaller input type. */
.ai-workspace-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  font-size: var(--type-md);
  line-height: var(--leading-ui);
}

.ai-workspace-brand .brand-mark {
  flex: 0 0 auto;
}

.ai-page-frame.screenshot-style {
  position: relative;
}

.ai-page-frame.screenshot-style .ai-chat-main {
  min-height: 100vh;
}

.screenshot-main .ai-chat-scroll {
  padding-bottom: 236px;
}

.screenshot-main .ai-messages-rich {
  min-height: calc(100vh - 236px);
}

.screenshot-composer {
  position: fixed;
  right: 24px;
  bottom: 20px;
  left: calc(366px + 24px);
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: auto;
  max-width: none;
  pointer-events: none;
}

.screenshot-composer > * {
  pointer-events: auto;
}

.screenshot-composer .ai-top-toolbar,
.screenshot-composer .ai-doubao-box {
  width: min(1280px, 100%);
}

.screenshot-composer .ai-top-toolbar {
  order: 0;
  margin-bottom: 14px;
  transform-origin: bottom center;
}

.screenshot-composer .ai-doubao-box {
  order: 1;
}

.screenshot-composer .ai-doubao-box textarea {
  min-height: 82px;
  color: #5f6e70;
  font-size: var(--type-sm);
  line-height: var(--leading-body);
}

.screenshot-composer .ai-doubao-box textarea::placeholder {
  color: #9aa7a8;
  font-size: var(--type-sm);
}

.ai-error {
  position: fixed;
  right: 24px;
  bottom: 214px;
  left: calc(366px + 24px);
  z-index: 19;
  width: min(1280px, calc(100% - 366px - 48px));
  margin: 0 auto;
  padding: 10px 14px;
  border: 1px solid rgba(180, 75, 63, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 246, 0.94);
}

.ai-session-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 920px) {
  .screenshot-composer {
    right: 16px;
    left: 16px;
    bottom: 16px;
  }

  .screenshot-main .ai-chat-scroll {
    padding-bottom: 260px;
  }

  .screenshot-main .ai-messages-rich {
    min-height: calc(100vh - 260px);
  }

  .ai-error {
    right: 16px;
    left: 16px;
    bottom: 226px;
    width: auto;
  }
}

/* Typography system: 1.25 ratio scale, one humanist sans family, three weights. */
body {
  font-size: var(--type-sm);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand,
.top-brand,
.side-title,
.login-title,
.ai-assistant-title {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  letter-spacing: 0;
}

h1,
.login-visual h1 {
  line-height: var(--leading-display);
  text-wrap: balance;
}

h2,
h3,
.page-head h1,
.page-head h2,
.section-head h2,
.appbar h1,
.login-card h2,
.org-panel-head h2,
.ai-empty-state h2 {
  line-height: var(--leading-title);
  text-wrap: balance;
}

p,
li,
.form-hint,
.hint,
.card-summary,
.feature-card p,
.course-card p,
.resource-card p,
.lesson-card p,
.section-head p,
.page-head p,
.login-visual p,
.ai-message-body,
.ai-empty-state p {
  line-height: var(--leading-body);
}

.login-visual p {
  font-size: var(--type-md);
}

.section-head h1,
.page-head h1,
.appbar h1 {
  font-size: var(--type-2xl);
}

.section-head h2,
.login-card h2,
.ai-chat-header h1 {
  font-size: var(--type-xl);
}

.side-title,
.page-head h2,
.org-panel-head h2,
.legal-card h2,
.doc-page h2,
.ai-empty-state h2 {
  font-size: var(--type-lg);
}

.role-card h3,
.feature-card h3,
.course-card h3,
.lesson-card h3,
.resource-card h3,
.phase h3,
.side-panel h3 {
  font-size: var(--type-md);
  line-height: var(--leading-title);
}

.brand,
.top-brand {
  font-size: var(--type-md);
}

.brand-mark,
.ai-session-group-title,
.status-pill,
.chip,
.session-chip,
.course-meta,
.lesson-meta,
.resource-meta,
.form-hint,
.form-error,
.form-success,
.login-org-empty,
.ai-message-meta,
.ai-session-date,
.ai-top-toolbar label,
.ai-top-toolbar select,
.screenshot-composer .ai-mode-switch .tab-btn,
.ai-image-result-actions .tab-btn,
.ai-inline-actions .tab-btn,
.footer-links {
  font-size: var(--type-xs);
  line-height: var(--leading-ui);
}

.brand-mark {
  font-size: 0;
  line-height: 1;
}

.ghost-btn,
.primary-btn,
.icon-btn,
.tab-btn,
.upload-btn,
.mini-icon-btn,
.text-btn,
.footer-link,
input,
select,
textarea,
button,
.login-card label,
.org-form label,
.config-form label,
.modal label,
.picker label,
.table-row,
.readonly-field,
.archive-row,
.ai-message-body,
.ai-session-name,
.ai-assistant-heading {
  font-size: var(--type-sm);
  line-height: var(--leading-ui);
}

.feature-card p,
.course-card p,
.resource-card p,
.lesson-card p,
.section-head p,
.page-head p,
.org-panel-head p,
.legal-card p,
.doc-page p,
.doc-page li,
.phase p,
.side-panel ul,
.empty,
.blackout-panel p,
.ai-empty-state p {
  font-size: var(--type-sm);
}

.ai-doubao-box textarea,
.ai-composer-card textarea {
  font-size: var(--type-md);
  line-height: var(--leading-body);
}

.login-visual h1 {
  font-size: clamp(var(--type-3xl), 5.2vw, var(--type-4xl));
}

.login-title {
  font-size: var(--type-lg);
}

.course-stage-card p,
.card-summary {
  line-height: var(--leading-body);
}

.readonly-field strong,
.quota strong {
  font-size: var(--type-md);
}

.ai-session-name,
.login-card label,
.org-form label,
.config-form label,
.modal label,
.picker label,
.status-pill,
.chip,
.primary-btn,
.upload-btn,
.ghost-btn,
.tab-btn,
.text-btn {
  font-weight: var(--weight-medium);
}

.brand,
.top-brand,
.side-title,
.page-head h1,
.section-head h1,
.section-head h2,
.appbar h1,
.login-card h2,
.role-card h3,
.feature-card h3,
.course-card h3,
.lesson-card h3,
.resource-card h3,
.ai-empty-state h2 {
  font-weight: var(--weight-bold);
}

.ai-session-group-title {
  letter-spacing: 0.04em;
}

.login-title,
.login-visual p {
  white-space: normal;
}

@media (max-width: 560px) {
  .login-visual h1 {
    font-size: var(--type-2xl);
  }

  .section-head h1,
  .page-head h1,
  .appbar h1 {
    font-size: var(--type-xl);
  }

  .section-head h2,
  .login-card h2,
  .ai-chat-header h1 {
    font-size: var(--type-lg);
  }

  .ai-doubao-box textarea,
  .ai-composer-card textarea {
    font-size: var(--type-sm);
  }
}

/* AI workspace layout polish */
:root {
  --ai-sidebar-width: 260px;
  --ai-composer-reserve: 220px;
  --ai-content-offset: 56px;
  --ai-content-right-offset: 48px;
  --ai-content-width: 1224px;
  --ai-media-max-width: 360px;
  --ai-media-max-height: 420px;
}

.ai-page-frame.screenshot-style.ai-mode-image,
.ai-page-frame.screenshot-style.ai-mode-video {
  --ai-composer-reserve: 320px;
}

.ai-page-frame.screenshot-style {
  grid-template-columns: var(--ai-sidebar-width) minmax(0, 1fr);
}

.ai-page-frame.screenshot-style .ai-chat-sidebar {
  padding: 10px 9px 0 12px;
}

.ai-chat-sidebar-head {
  gap: 18px;
}

.ai-new-chat-btn {
  min-height: 44px;
  border-radius: 10px;
  font-size: var(--type-sm);
}

.screenshot-list {
  gap: 0;
  min-height: 0;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.screenshot-list::-webkit-scrollbar {
  width: 5px;
}

.screenshot-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
}

.ai-thinking-text {
  color: #7b8796;
}

.ai-thinking-caret {
  display: inline-block;
  width: 6px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -0.18em;
  background: #1e8172;
  animation: ai-caret-blink 0.9s steps(2, start) infinite;
}

@keyframes ai-caret-blink {
  50% { opacity: 0; }
}

.screenshot-composer .ai-send-btn.is-stopping {
  background: #6b7280;
}

.ai-session-row {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
}

.screenshot-item {
  min-height: 54px;
  padding: 9px 40px 9px 12px;
  border-radius: 8px;
}

.ai-session-name {
  font-size: 12px;
  line-height: 1.35;
}

.ai-session-date {
  color: #b0b7c3;
  font-size: 9px;
}

.ai-session-delete {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 8px;
  color: #7f8797;
  background: transparent;
  box-shadow: none;
  border: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, color 0.14s ease;
  will-change: opacity;
}

.ai-session-delete .ai-icon {
  width: 15px;
  height: 15px;
}

.ai-session-delete:hover {
  color: #d06b5d;
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
}

.ai-session-row:hover .ai-session-delete,
.ai-session-row:focus-within .ai-session-delete {
  opacity: 1;
  pointer-events: auto;
}

.screenshot-main .ai-chat-scroll {
  height: calc(100vh - var(--app-topnav-height));
  overflow-y: auto;
  box-sizing: border-box;
  padding: 36px 24px calc(var(--ai-composer-reserve) + 24px);
  scroll-padding-bottom: calc(var(--ai-composer-reserve) + 24px);
}

.ai-page-frame.screenshot-style .ai-chat-main {
  min-height: calc(100vh - var(--app-topnav-height));
}

.screenshot-main .ai-messages-rich {
  width: min(1280px, 100%);
  min-height: auto;
  margin: 0 auto;
  align-content: start;
  gap: 18px;
}

.screenshot-main .ai-message,
.screenshot-main .ai-message.assistant {
  width: 100%;
  max-width: 100%;
}

.screenshot-main .ai-message.user {
  width: 100%;
  max-width: 100%;
  justify-self: stretch;
}

.screenshot-main .ai-message-stack {
  justify-content: flex-end;
}

.ai-assistant-heading {
  padding-left: 0;
  margin-bottom: 12px;
  font-size: var(--type-sm);
}

.ai-assistant-text-block,
.ai-image-result-block,
.ai-video-result-block {
  width: 100%;
  padding-left: 0;
}

.ai-assistant-reply-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ai-assistant-content-col {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ai-inline-avatar.assistant {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  aspect-ratio: 1;
  color: #ffffff;
  background: #1e8172;
  box-shadow: 0 8px 22px rgba(30, 129, 114, 0.18);
}

.ai-inline-avatar.assistant::before,
.ai-inline-avatar.assistant::after {
  content: none;
}

.ai-avatar-icon {
  width: 21px;
  height: 21px;
}

.ai-message-card {
  margin-left: 0;
}

.ai-image-result-actions {
  margin-left: 48px;
}

.ai-copy-wrap {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.user-copy-wrap {
  max-width: min(680px, 100%);
}

.user-copy-wrap .ai-user-bubble {
  max-width: 100%;
}

.assistant-copy-wrap {
  width: min(760px, 100%);
  justify-items: start;
}

.assistant-copy-wrap .ai-message-card {
  width: 100%;
  max-width: none;
}

.assistant-copy-wrap .ai-message-card-table {
  width: auto;
  max-width: min(900px, 100%);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.assistant-copy-wrap .ai-message-card-table .ai-message-body {
  line-height: 1.58;
}

.assistant-copy-wrap .ai-message-card-table .ai-table-wrap {
  width: 100%;
}

.assistant-copy-wrap .ai-inline-actions {
  justify-content: flex-start;
}

.ai-copy-wrap .ai-inline-actions {
  display: flex;
  justify-content: flex-end;
  width: auto;
  margin: 0;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.ai-copy-wrap:hover .ai-inline-actions {
  opacity: 1;
  transform: translateY(0);
}

.ai-copy-icon-btn {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #8c96a8;
}

.ai-copy-icon-btn .ai-icon {
  width: 16px;
  height: 16px;
}

.ai-copy-icon-btn:hover {
  color: #1e8172;
  background: transparent;
}

.ai-copy-wrap .ai-copy-icon-btn {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ai-copy-wrap .ai-copy-icon-btn:hover {
  background: transparent;
  box-shadow: none;
}

.ai-image-generating-card {
  position: relative;
  display: grid;
  place-items: center;
  width: min(280px, calc(100% - 48px));
  min-height: 158px;
  margin-left: 48px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(30, 129, 114, 0.08), rgba(117, 126, 232, 0.08)),
    #f7faf9;
}

.ai-generation-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid rgba(30, 129, 114, 0.16);
  border-top-color: #1e8172;
  animation: ai-spin 0.9s linear infinite;
}

@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

.ai-image-hover-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.ai-image-hover-item {
  position: relative;
  z-index: 1;
  display: flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
}

.ai-image-float-btn {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(38, 48, 54, 0.56);
  font-size: 0;
}

.ai-image-float-btn .ai-icon {
  width: 24px;
  height: 24px;
}

.ai-image-hover-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  min-height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #46515f;
  font-size: 12px;
  line-height: 30px;
  opacity: 0;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

.ai-image-hover-item:hover .ai-image-hover-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ai-image-result-block .ai-image-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  width: min(var(--ai-media-max-width), calc(100% - 48px));
  margin-left: 48px;
  gap: 10px;
}

.ai-image-result-block .ai-image-grid.ai-image-grid-ratio-9-16,
.ai-image-result-block .ai-image-grid.ai-image-grid-ratio-3-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-image-result-block .ai-image-card {
  min-height: 0;
  width: fit-content;
  max-width: 100%;
  aspect-ratio: auto;
  border-radius: 12px;
  background: transparent;
}

.ai-image-result-block .ai-image-grid.ai-image-grid-ratio-16-9 .ai-image-card,
.ai-image-result-block .ai-image-grid.ai-image-grid-ratio-4-3 .ai-image-card {
  min-height: 0;
}

.ai-image-result-block .ai-image-grid.ai-image-grid-ratio-16-9 .ai-image-card {
  aspect-ratio: auto;
}

.ai-image-result-block .ai-image-grid.ai-image-grid-ratio-4-3 .ai-image-card {
  aspect-ratio: auto;
}

.ai-image-result-block .ai-image-grid.ai-image-grid-ratio-9-16 .ai-image-card,
.ai-image-result-block .ai-image-grid.ai-image-grid-ratio-3-4 .ai-image-card {
  min-height: 0;
}

.ai-image-result-block .ai-image-grid.ai-image-grid-ratio-9-16 .ai-image-card {
  aspect-ratio: auto;
}

.ai-image-result-block .ai-image-grid.ai-image-grid-ratio-3-4 .ai-image-card {
  aspect-ratio: auto;
}

.ai-image-result-block .ai-image-card img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: var(--ai-media-max-height);
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
}

.ai-preview-toolbar-btn .ai-icon {
  width: 22px;
  height: 22px;
}

.screenshot-composer {
  right: 24px;
  bottom: 0;
  left: calc(var(--ai-sidebar-width) + 24px);
  gap: 0;
  padding: 0;
  isolation: isolate;
  background: transparent;
}

.screenshot-composer::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  right: calc(-1 * var(--ai-content-right-offset));
  bottom: 0;
  left: -24px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.screenshot-composer > * {
  position: relative;
  z-index: 1;
}

.screenshot-composer .ai-top-toolbar {
  margin-bottom: 0;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: #ffffff;
}

.screenshot-composer .ai-top-toolbar + .ai-doubao-box {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.screenshot-composer .ai-doubao-box {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  background: #ffffff;
}

.screenshot-composer .ai-top-toolbar select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M2 2L6 6L10 2' stroke='%23818A9A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}

/* AI workspace white canvas refinement */
.ai-workspace-standalone,
.ai-page-main.standalone,
.ai-page-frame.screenshot-style,
.ai-page-frame.screenshot-style .ai-chat-main,
.screenshot-main .ai-chat-scroll {
  background: #ffffff;
}

.ai-page-frame.screenshot-style .ai-chat-sidebar {
  border-right-color: #e7ebf0;
  background: #f7f9fb;
}

.ai-message-card {
  border-color: #e8edf2;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.025);
}

.ai-user-bubble {
  background: #edf5ff;
}

.ai-table-wrap {
  border-color: #dfe4eb;
  background: #ffffff;
}

.ai-markdown-table th,
.ai-markdown-table td {
  border-color: #dfe4eb;
}

.ai-markdown-table th {
  background: #f6f7f9;
}

.screenshot-composer {
  background: #ffffff;
}

.screenshot-composer .ai-top-toolbar,
.screenshot-composer .ai-doubao-box {
  border-color: #e5eaf0;
  background: #ffffff;
}

.screenshot-composer .ai-doubao-box {
  box-shadow: 0 -1px 0 rgba(15, 23, 42, 0.04), 0 10px 26px rgba(15, 23, 42, 0.07);
}

.screenshot-composer .ai-top-toolbar {
  box-shadow: 0 -1px 0 rgba(15, 23, 42, 0.03);
}

.screenshot-composer .ai-toolbar-collapse-btn {
  display: none;
}

.screenshot-composer .ai-upload-thumb {
  overflow: visible;
}

.screenshot-composer .ai-upload-thumb img {
  display: block;
  overflow: hidden;
  border-radius: 14px;
}

.screenshot-composer .ai-upload-remove {
  top: -7px;
  right: -7px;
  bottom: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #667085;
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
}

.screenshot-composer .ai-upload-remove:hover {
  color: #c44f43;
  background: #ffffff;
}

.ai-video-result-block .ai-video-shell {
  width: min(var(--ai-media-max-width), calc(100% - 48px));
  margin-left: 48px;
}

.ai-video-result-block .ai-video-shell.ai-video-ratio-3-4 {
  width: min(315px, calc(100% - 48px));
}

.ai-video-result-block .ai-video-shell.ai-video-ratio-9-16 {
  width: min(236.25px, calc(100% - 48px));
}

.ai-video-shell.ai-video-ratio-1-1 video {
  aspect-ratio: 1 / 1;
}

.ai-video-shell.ai-video-ratio-3-4 video {
  aspect-ratio: 3 / 4;
}

.ai-video-shell.ai-video-ratio-4-3 video {
  aspect-ratio: 4 / 3;
}

.ai-video-shell.ai-video-ratio-9-16 video {
  aspect-ratio: 9 / 16;
}

.ai-video-shell.ai-video-ratio-16-9 video {
  aspect-ratio: 16 / 9;
}

.ai-video-result-actions {
  display: flex;
  justify-content: flex-end;
  width: min(var(--ai-media-max-width), calc(100% - 48px));
  margin: 10px 0 0 48px;
}

.ai-video-result-actions.ai-video-ratio-3-4 {
  width: min(315px, calc(100% - 48px));
}

.ai-video-result-actions.ai-video-ratio-9-16 {
  width: min(236.25px, calc(100% - 48px));
}

.ai-video-download-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1e8172;
  font-size: var(--type-xs);
  font-weight: var(--weight-medium);
  box-shadow: none;
}

.ai-video-download-link .ai-icon {
  width: 16px;
  height: 16px;
}

.ai-video-download-link:hover {
  color: #17685d;
  background: transparent;
}

.ai-error {
  left: calc(var(--ai-sidebar-width) + 24px);
  width: min(1280px, calc(100% - var(--ai-sidebar-width) - 48px));
}

.ai-toast {
  position: fixed;
  left: calc(var(--ai-sidebar-width) + (100vw - var(--ai-sidebar-width)) / 2);
  bottom: calc(var(--ai-composer-reserve) + 18px);
  z-index: 60;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.92);
  color: #ffffff;
  font-size: var(--type-xs);
  line-height: var(--leading-ui);
  transform: translateX(-50%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

@media (max-width: 920px) {
  .ai-page-frame.screenshot-style {
    grid-template-columns: 1fr;
  }

  .screenshot-composer {
    right: 16px;
    left: 16px;
    bottom: 0;
  }

  .ai-toast {
    left: 50%;
  }
}

/* 2026 blue-violet refresh: lighter AI studio language across the whole site. */
:root {
  --ink: #20233f;
  --muted: #69708f;
  --line: #e2e6f4;
  --line-strong: #c9d0eb;
  --paper: #f6f7ff;
  --paper-strong: #eef1ff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --accent: #6366f1;
  --accent-strong: #4f46e5;
  --accent-soft: #eceeff;
  --accent-soft-strong: #dde2ff;
  --sun: #f4b860;
  --coral: #e06f6a;
  --blue: #4f8cff;
  --violet: #8b5cf6;
  --cyan: #34b6d9;
  --shadow-sm: 0 12px 28px rgba(70, 78, 133, 0.07);
  --shadow-md: 0 22px 52px rgba(70, 78, 133, 0.12);
}

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(99, 102, 241, 0.13), transparent 28%),
    radial-gradient(circle at 82% 2%, rgba(52, 182, 217, 0.1), transparent 24%),
    linear-gradient(180deg, #fbfcff 0%, var(--paper) 100%);
  color: var(--ink);
}

.topbar,
.section {
  width: min(1220px, calc(100% - 48px));
}

.primary-btn,
.upload-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.22);
}

.primary-btn:hover,
.upload-btn:hover {
  background: linear-gradient(135deg, #5558e9, #7c3ff2);
}

.ghost-btn,
.tab-btn,
.icon-btn {
  color: #343854;
  border-color: rgba(99, 102, 241, 0.16);
  background: rgba(255, 255, 255, 0.72);
}

.ghost-btn:hover,
.tab-btn:hover,
.icon-btn:hover {
  border-color: rgba(99, 102, 241, 0.28);
  background: #ffffff;
}

.tab-btn.active,
.side-nav button.active,
.side-nav button:hover,
.ai-session-row.active .screenshot-item,
.screenshot-composer .ai-mode-switch .tab-btn.active {
  color: var(--accent-strong);
  border-color: rgba(99, 102, 241, 0.16);
  background: var(--accent-soft);
}

.card,
.quota,
.side-panel,
.detail-block,
.account-table,
.org-form,
.config-form,
.modal,
.pdf-thumb,
.archive-row,
.readonly-field,
.slide-card,
.doc-page {
  border-color: rgba(99, 102, 241, 0.11);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.feature-card:hover,
.course-card:hover,
.lesson-card:hover,
.resource-card:hover {
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow: var(--shadow-md);
}

.course-stage-card {
  gap: 14px;
  padding: 16px;
}

.course-stage-card p {
  min-height: 112px;
}

.role-icon {
  color: var(--accent-strong);
  background: linear-gradient(135deg, #f1f3ff, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.08);
}

.course-stage-card:nth-child(2) .role-icon,
.status-pill.warn {
  color: #8a5a14;
  background: rgba(244, 184, 96, 0.18);
}

.course-stage-card:nth-child(3) .role-icon,
.chip.student {
  color: #286d8b;
  background: rgba(52, 182, 217, 0.13);
}

.course-stage-media {
  height: 180px;
  border-color: rgba(99, 102, 241, 0.1);
  background:
    linear-gradient(135deg, rgba(236, 238, 255, 0.76), rgba(255, 255, 255, 0.94));
}

.course-stage-image {
  padding: 6px;
}

.chip,
.status-pill,
.session-chip {
  color: #50577a;
  background: rgba(99, 102, 241, 0.09);
}

.chip.teacher,
.status-pill.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.login-page {
  background:
    radial-gradient(circle at 20% 12%, rgba(99, 102, 241, 0.14), transparent 28%),
    radial-gradient(circle at 78% 88%, rgba(52, 182, 217, 0.1), transparent 28%),
    var(--paper);
}

.login-visual {
  background:
    linear-gradient(110deg, rgba(251, 252, 255, 0.96), rgba(246, 247, 255, 0.82) 48%, rgba(238, 242, 255, 0.38)),
    url("./assets/hero-ai-education.png");
  background-size: cover;
  background-position: center right;
}

.login-card {
  background: rgba(255, 255, 255, 0.92);
  border-left-color: rgba(99, 102, 241, 0.12);
  box-shadow: -18px 0 54px rgba(70, 78, 133, 0.08);
}

.login-card label,
.org-form label,
.config-form label,
.modal label,
.picker label {
  color: #343854;
}

.login-card input,
.login-card select,
.org-form input,
.org-form select,
.config-form input,
.config-form select,
.modal input,
.picker input,
.picker select,
.org-search-row select,
.lesson-title-input,
.ai-composer-card textarea {
  border-color: rgba(99, 102, 241, 0.16);
  background: rgba(255, 255, 255, 0.88);
}

.login-card input:focus,
.login-card select:focus,
.org-form input:focus,
.org-form select:focus,
.config-form input:focus,
.config-form select:focus,
.modal input:focus,
.picker input:focus,
.picker select:focus,
.org-search-row select:focus,
.lesson-title-input:focus,
.ai-composer-card textarea:focus {
  outline: 3px solid rgba(99, 102, 241, 0.13);
  border-color: rgba(99, 102, 241, 0.42);
}

.admin-layout {
  background:
    radial-gradient(circle at 16% 8%, rgba(99, 102, 241, 0.1), transparent 26%),
    linear-gradient(180deg, #fbfcff, var(--paper));
}

.app-topnav,
.fixed-sidebar,
.sidebar {
  border-color: rgba(99, 102, 241, 0.11);
  background: rgba(255, 255, 255, 0.76);
}

.side-nav button {
  color: #50577a;
}

.page-head p,
.section-head p,
.feature-card p,
.course-card p,
.resource-card p,
.lesson-card p {
  color: var(--muted);
}

.table,
.table-row,
.table-row span + span,
fieldset,
.preview,
.preview-toolbar {
  border-color: rgba(99, 102, 241, 0.11);
}

.table-head,
.password-value {
  color: #343854;
  background: rgba(99, 102, 241, 0.07);
}

.preview {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(246, 247, 255, 0.74)),
    linear-gradient(135deg, #f7f8ff 0 50%, #eef1ff 50% 100%);
}

.ai-workspace-standalone,
.ai-page-main.standalone,
.ai-page-frame.screenshot-style,
.ai-page-frame.screenshot-style .ai-chat-main,
.screenshot-main .ai-chat-scroll {
  background: #fbfcff;
}

.ai-page-frame.screenshot-style .ai-chat-sidebar {
  border-right-color: rgba(99, 102, 241, 0.12);
  background: #f3f5ff;
}

.ai-workspace-brand {
  color: #20233f;
}

.ai-new-chat-btn,
.screenshot-item,
.ai-message-card,
.screenshot-composer .ai-top-toolbar,
.screenshot-composer .ai-doubao-box,
.ai-table-wrap,
.ai-markdown-table th,
.ai-markdown-table td {
  border-color: rgba(99, 102, 241, 0.12);
}

.ai-new-chat-btn {
  color: var(--accent-strong);
  background: #ffffff;
}

.ai-inline-avatar.assistant,
.screenshot-composer .ai-send-btn,
.screenshot-composer .ai-send-btn:not(:disabled) {
  background: linear-gradient(135deg, var(--accent), var(--violet));
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.2);
}

.ai-user-bubble {
  background: #eef4ff;
}

.ai-message-card,
.screenshot-composer .ai-doubao-box,
.screenshot-composer .ai-top-toolbar {
  background: #ffffff;
}

.screenshot-composer .ai-doubao-box {
  padding-block: 12px;
}

.screenshot-composer .ai-doubao-box textarea {
  min-height: 64px;
}

@media (min-width: 921px) {
  .screenshot-composer {
    left: calc(
      var(--ai-sidebar-width) + 24px + max(0px, calc(50vw - 794px)) + var(--ai-content-offset)
    );
    right: auto;
    width: min(
      calc(var(--ai-content-width) - var(--ai-content-right-offset)),
      calc(100vw - var(--ai-sidebar-width) - 48px - var(--ai-content-offset) - var(--ai-content-right-offset))
    );
    align-items: stretch;
  }

  .screenshot-composer::before {
    left: calc(-1 * (24px + max(0px, calc(50vw - 794px)) + var(--ai-content-offset)));
  }

  .screenshot-composer .ai-top-toolbar,
  .screenshot-composer .ai-doubao-box {
    width: 100%;
  }
}

.ai-message-body,
.ai-session-name,
.ai-assistant-title {
  color: var(--ink);
}

.ai-empty-illustration {
  color: rgba(99, 102, 241, 0.56);
  background: var(--accent-soft);
}

.ai-empty-state h2 {
  color: #343854;
}

.ai-empty-state p,
.ai-session-date,
.ai-doubao-box textarea::placeholder {
  color: #8a91ad;
}

.ai-upload-trigger:hover,
.screenshot-composer .ai-mode-switch .tab-btn.active {
  color: var(--accent-strong);
  background: rgba(99, 102, 241, 0.1);
}

.ai-thinking-caret,
.ai-generation-spinner {
  background: var(--accent);
}

.ai-copy-icon-btn:hover,
.ai-video-download-link,
.footer-link,
.text-btn {
  color: var(--accent-strong);
}

.ai-video-download-link:hover,
.text-btn:hover {
  color: #3f36c7;
}

.ai-image-generating-card {
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(52, 182, 217, 0.08)),
    #f7f8ff;
}

.ai-generation-spinner {
  border-color: rgba(99, 102, 241, 0.16);
  border-top-color: var(--accent);
  background: transparent;
}

.danger-solid-btn {
  background: #7651d8;
  box-shadow: 0 10px 24px rgba(118, 81, 216, 0.16);
}

.danger-solid-btn:hover {
  background: #6341bd;
}

.form-success {
  color: var(--accent-strong);
}

.footer-link {
  border-bottom-color: rgba(99, 102, 241, 0.2);
}

.pdf-thumb.active {
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.08);
}

.phase {
  border-left-color: var(--accent);
}

.phase:nth-child(2) {
  border-left-color: var(--cyan);
}

.system-admin-btn:hover,
.account-action-btn:hover,
.mini-icon-btn:hover,
.login-org-option:hover,
.chip-button:hover {
  color: var(--accent-strong);
  border-color: rgba(31, 94, 84, 0.18);
  background: var(--accent-soft);
}

.chip-button:hover {
  color: #ffffff;
  background: var(--accent);
}

@media (max-width: 560px) {
  .topbar,
  .section {
    width: min(100% - 28px, 1220px);
  }
}

.course-card .card-actions,
.lesson-card .card-actions,
.resource-card .card-actions {
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 6px;
}

.course-card .card-actions .primary-btn,
.resource-card .card-actions .primary-btn,
.lesson-card .card-actions .primary-btn {
  min-width: 0;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent-strong);
  font-size: var(--type-sm);
  font-weight: var(--weight-medium);
}

.course-card .card-actions .primary-btn::after,
.resource-card .card-actions .primary-btn::after,
.lesson-card .card-actions .primary-btn::after {
  content: " →";
}

.course-card .card-actions .primary-btn:hover,
.resource-card .card-actions .primary-btn:hover,
.lesson-card .card-actions .primary-btn:hover {
  color: #3f36c7;
  background: transparent;
  box-shadow: none;
  transform: translateX(2px);
}

.lesson-card,
.resource-card,
.course-card {
  min-height: 190px;
}

.lesson-title-row {
  min-height: 62px;
}

/* Scheme A applied: quiet, aligned, whole-card list entries. */
.list-entry-card {
  position: relative;
  cursor: pointer;
  outline: none;
}

.list-entry-card::before {
  content: "↗";
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 999px;
  color: var(--accent-strong);
  background: #ffffff;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.list-entry-card:hover,
.list-entry-card:focus-visible {
  border-color: rgba(99, 102, 241, 0.26);
  box-shadow: 0 18px 42px rgba(70, 78, 133, 0.12);
  transform: translateY(-2px);
}

.list-entry-card:hover::before,
.list-entry-card:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.course-card.list-entry-card,
.lesson-card.list-entry-card,
.resource-card.list-entry-card {
  display: grid;
  grid-template-rows: 68px 34px minmax(0, 1fr) 32px;
  min-height: 190px;
  gap: 8px;
  padding: 18px;
}

.course-card.list-entry-card .card-title,
.lesson-card.list-entry-card .card-title,
.resource-card.list-entry-card .card-title {
  min-height: 0;
  padding-right: 38px;
  align-self: start;
}

.lesson-card.list-entry-card .lesson-title-row {
  min-height: 0;
  align-self: start;
}

.course-card.list-entry-card .course-meta,
.lesson-card.list-entry-card .lesson-meta,
.resource-card.list-entry-card .resource-meta-primary {
  min-height: 34px;
  align-items: center;
  align-self: start;
  margin-top: 0;
}

.course-card.list-entry-card .card-summary {
  min-height: 0;
}

.course-card.list-entry-card .card-actions,
.lesson-card.list-entry-card .card-actions,
.resource-card.list-entry-card .card-actions {
  align-self: end;
  justify-content: flex-start;
  margin-top: 0;
  padding-top: 0;
}

.course-card.list-entry-card .card-actions .primary-btn,
.lesson-card.list-entry-card .card-actions .primary-btn,
.resource-card.list-entry-card .card-actions .primary-btn {
  min-height: 28px;
  padding: 0;
  color: #7b83a3;
  background: transparent;
  box-shadow: none;
  font-size: 0;
  transform: none;
}

.course-card.list-entry-card .card-actions .primary-btn::after,
.lesson-card.list-entry-card .card-actions .primary-btn::after,
.resource-card.list-entry-card .card-actions .primary-btn::after {
  content: "打开";
  font-size: var(--type-xs);
  font-weight: var(--weight-medium);
}

.course-card.list-entry-card:hover .card-actions .primary-btn,
.lesson-card.list-entry-card:hover .card-actions .primary-btn,
.resource-card.list-entry-card:hover .card-actions .primary-btn,
.course-card.list-entry-card:focus-visible .card-actions .primary-btn,
.lesson-card.list-entry-card:focus-visible .card-actions .primary-btn,
.resource-card.list-entry-card:focus-visible .card-actions .primary-btn {
  color: var(--accent-strong);
  background: transparent;
  transform: none;
}

.course-card.list-entry-card .card-actions .primary-btn:hover,
.lesson-card.list-entry-card .card-actions .primary-btn:hover,
.resource-card.list-entry-card .card-actions .primary-btn:hover {
  transform: none;
}

.admin-resource-card.list-entry-card {
  padding-top: 52px;
}

.admin-resource-card.list-entry-card::before {
  top: 14px;
  right: 94px;
}

.admin-resource-card.list-entry-card .resource-delete-btn,
.admin-resource-card.list-entry-card .resource-config-btn,
.deletable-card.list-entry-card .card-delete-btn,
.lesson-card.list-entry-card .mini-icon-btn {
  z-index: 2;
  cursor: pointer;
}

@media (max-width: 560px) {
  .course-card.list-entry-card,
  .lesson-card.list-entry-card,
  .resource-card.list-entry-card {
    grid-template-rows: auto 34px minmax(0, 1fr) 32px;
    min-height: 172px;
  }
}

/* Card rhythm correction: one visual baseline across course, lesson and resource lists. */
.lesson-card.list-entry-card,
.resource-card.list-entry-card {
  grid-template-rows: 72px 36px minmax(38px, 1fr) 28px;
  min-height: 196px;
  gap: 10px;
}

.course-card.list-entry-card {
  grid-template-rows: auto 34px minmax(72px, auto) 28px;
  min-height: 210px;
  gap: 12px;
}

.course-card.list-entry-card .card-title,
.lesson-card.list-entry-card .card-title,
.resource-card.list-entry-card .card-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.course-card.list-entry-card .card-title {
  min-height: 34px;
}

.lesson-card.list-entry-card .lesson-title-row {
  align-items: flex-start;
}

.lesson-card.list-entry-card .lesson-title-row .card-title {
  min-height: 62px;
}

.resource-card.list-entry-card .card-title {
  min-height: 62px;
}

.course-card.list-entry-card .course-meta,
.lesson-card.list-entry-card .lesson-meta,
.resource-card.list-entry-card .resource-meta-primary {
  min-height: 34px;
}

.course-card.list-entry-card .card-summary {
  min-height: 72px;
  align-self: start;
  -webkit-line-clamp: 3;
}

.lesson-card.list-entry-card .card-actions,
.resource-card.list-entry-card .card-actions,
.course-card.list-entry-card .card-actions {
  min-height: 28px;
  align-self: end;
}

.lesson-card.list-entry-card .card-actions .primary-btn,
.resource-card.list-entry-card .card-actions .primary-btn,
.course-card.list-entry-card .card-actions .primary-btn {
  min-height: 28px;
}

@media (max-width: 560px) {
  .lesson-card.list-entry-card,
  .resource-card.list-entry-card,
  .course-card.list-entry-card {
    grid-template-rows: auto 34px minmax(48px, auto) 28px;
    min-height: 176px;
  }
}

/* Card final alignment: top action rail, full-width titles, compact bottom spacing. */
.lesson-card.list-entry-card,
.admin-resource-card.list-entry-card {
  padding-top: 50px;
}

.lesson-card.list-entry-card::before,
.admin-resource-card.list-entry-card::before {
  content: none;
}

.lesson-card.list-entry-card {
  grid-template-rows: 70px 34px minmax(8px, 1fr) 24px;
  min-height: 172px;
}

.resource-card.list-entry-card {
  grid-template-rows: 70px 34px minmax(8px, 1fr) 24px;
  min-height: 172px;
}

.course-card.list-entry-card {
  grid-template-rows: auto 32px minmax(52px, auto) 24px;
  min-height: 186px;
}

.lesson-card.list-entry-card .lesson-title-row {
  display: block;
  min-height: 70px;
}

.lesson-card.list-entry-card .icon-row {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 3;
  gap: 10px;
}

.lesson-card.list-entry-card .card-title,
.resource-card.list-entry-card .card-title {
  width: 100%;
  min-height: 0;
  padding-right: 0;
  -webkit-line-clamp: 2;
}

.lesson-card.list-entry-card .lesson-title-row .card-title,
.resource-card.list-entry-card .card-title {
  min-height: 0;
}

.admin-resource-card.list-entry-card .card-title {
  padding-right: 0;
}

.admin-resource-card.list-entry-card .resource-delete-btn,
.admin-resource-card.list-entry-card .resource-config-btn {
  top: 14px;
}

.admin-resource-card.list-entry-card .resource-delete-btn {
  right: 54px;
}

.admin-resource-card.list-entry-card .resource-config-btn {
  right: 16px;
}

.lesson-card.list-entry-card .mini-icon-btn,
.admin-resource-card.list-entry-card .mini-icon-btn,
.deletable-card.list-entry-card .card-delete-btn {
  width: 28px !important;
  height: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #7f879f;
}

.lesson-card.list-entry-card .mini-icon-btn:hover,
.admin-resource-card.list-entry-card .mini-icon-btn:hover,
.deletable-card.list-entry-card .card-delete-btn:hover {
  color: var(--accent-strong);
  background: rgba(99, 102, 241, 0.08);
}

.lesson-card.list-entry-card .danger-btn:hover,
.admin-resource-card.list-entry-card .danger-btn:hover,
.deletable-card.list-entry-card .danger-btn:hover {
  color: #cf4c45;
  background: rgba(207, 76, 69, 0.08);
}

.lesson-card.list-entry-card .lesson-meta,
.resource-card.list-entry-card .resource-meta-primary,
.course-card.list-entry-card .course-meta {
  min-height: 30px;
}

.lesson-card.list-entry-card .card-actions,
.resource-card.list-entry-card .card-actions,
.course-card.list-entry-card .card-actions {
  min-height: 24px;
}

.lesson-card.list-entry-card .card-actions .primary-btn,
.resource-card.list-entry-card .card-actions .primary-btn,
.course-card.list-entry-card .card-actions .primary-btn {
  min-height: 24px;
}

.course-stage-card .role-icon {
  color: var(--accent-strong);
  background: linear-gradient(135deg, #f1f3ff, #ffffff);
}

.course-stage-card:nth-child(2) .role-icon,
.course-stage-card:nth-child(3) .role-icon {
  color: var(--accent-strong);
  background: linear-gradient(135deg, #f1f3ff, #ffffff);
}

@media (max-width: 560px) {
  .lesson-card.list-entry-card,
  .resource-card.list-entry-card,
  .course-card.list-entry-card {
    min-height: 166px;
  }
}

/* Compact list cards: no phantom title gutters, no empty bottom rows. */
.lesson-card.list-entry-card,
.resource-card.list-entry-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  min-height: 154px;
  padding: 20px;
}

.lesson-card.list-entry-card.editable-card,
.admin-resource-card.list-entry-card {
  padding-top: 46px;
}

.lesson-card.list-entry-card .lesson-title-row,
.lesson-card.list-entry-card.editable-card .lesson-title-row {
  display: block;
  min-height: 0;
  width: 100%;
}

.lesson-card.list-entry-card .card-title,
.resource-card.list-entry-card .card-title,
.lesson-card.list-entry-card .lesson-title-row .card-title,
.admin-resource-card.list-entry-card .card-title {
  width: 100%;
  max-width: none;
  min-height: 0;
  padding-right: 0 !important;
  align-self: stretch;
}

.lesson-card.list-entry-card .lesson-meta,
.resource-card.list-entry-card .resource-meta-primary {
  min-height: 0;
  margin-top: 0;
}

.lesson-card.list-entry-card .card-actions,
.resource-card.list-entry-card .card-actions {
  min-height: 24px;
  margin-top: 0;
  padding-top: 0;
  align-self: stretch;
}

.lesson-card.list-entry-card .card-actions .primary-btn,
.resource-card.list-entry-card .card-actions .primary-btn {
  min-height: 24px;
}

.lesson-card.list-entry-card.editable-card .icon-row {
  top: 12px;
  right: 16px;
}

.admin-resource-card.list-entry-card .resource-delete-btn,
.admin-resource-card.list-entry-card .resource-config-btn {
  top: 12px;
}

.admin-resource-card.list-entry-card .resource-delete-btn {
  right: 50px;
}

.admin-resource-card.list-entry-card .resource-config-btn {
  right: 16px;
}

.lesson-card.list-entry-card.editable-card::before,
.admin-resource-card.list-entry-card::before {
  content: none;
}

@media (max-width: 560px) {
  .lesson-card.list-entry-card,
  .resource-card.list-entry-card {
    min-height: 144px;
    padding: 18px;
  }

  .lesson-card.list-entry-card.editable-card,
  .admin-resource-card.list-entry-card {
    padding-top: 44px;
  }
}

/* Fixed-slot lesson/resource cards: title, meta and action share one baseline system. */
.lesson-card.list-entry-card,
.resource-card.list-entry-card {
  display: grid !important;
  align-items: stretch;
  gap: 10px;
  min-height: 186px;
  padding: 22px 24px 18px !important;
}

.lesson-card.list-entry-card:not(.editable-card),
.resource-card.list-entry-card:not(.admin-resource-card) {
  grid-template-rows: 64px 32px minmax(20px, 1fr) 24px;
}

.lesson-card.list-entry-card.editable-card,
.resource-card.admin-resource-card.list-entry-card {
  grid-template-rows: 26px 64px 32px minmax(16px, 1fr) 24px;
}

.lesson-card.list-entry-card .lesson-title-row,
.resource-card.list-entry-card .card-title {
  width: 100% !important;
  min-width: 0;
}

.lesson-card.list-entry-card .lesson-title-row {
  display: block !important;
  min-height: 64px !important;
  padding: 0 !important;
}

.lesson-card.list-entry-card:not(.editable-card) .lesson-title-row {
  grid-row: 1;
}

.lesson-card.list-entry-card.editable-card .lesson-title-row {
  grid-row: 2;
}

.resource-card.list-entry-card:not(.admin-resource-card) .card-title {
  grid-row: 1;
}

.resource-card.admin-resource-card.list-entry-card .card-title {
  grid-row: 2;
}

.lesson-card.list-entry-card .card-title,
.resource-card.list-entry-card .card-title,
.lesson-card.list-entry-card .lesson-title-row .card-title,
.resource-card.admin-resource-card.list-entry-card .card-title {
  display: -webkit-box !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.lesson-card.list-entry-card.editable-card .icon-row,
.resource-card.admin-resource-card.list-entry-card .card-tool-row {
  grid-row: 1;
  justify-self: end;
  align-self: start;
  display: inline-flex;
  gap: 8px;
  min-height: 26px;
}

.lesson-card.list-entry-card.editable-card .icon-row {
  position: static !important;
}

.resource-card.admin-resource-card.list-entry-card .resource-delete-btn,
.resource-card.admin-resource-card.list-entry-card .resource-config-btn {
  position: static !important;
  top: auto !important;
  right: auto !important;
}

.lesson-card.list-entry-card:not(.editable-card) .lesson-meta,
.resource-card.list-entry-card:not(.admin-resource-card) .resource-meta-primary {
  grid-row: 2;
}

.lesson-card.list-entry-card.editable-card .lesson-meta,
.resource-card.admin-resource-card.list-entry-card .resource-meta-primary {
  grid-row: 3;
}

.lesson-card.list-entry-card .lesson-meta,
.resource-card.list-entry-card .resource-meta-primary {
  align-self: start;
  display: flex;
  align-items: center;
  min-height: 32px !important;
  margin: 0 !important;
}

.lesson-card.list-entry-card:not(.editable-card) .card-actions,
.resource-card.list-entry-card:not(.admin-resource-card) .card-actions {
  grid-row: 4;
}

.lesson-card.list-entry-card.editable-card .card-actions,
.resource-card.admin-resource-card.list-entry-card .card-actions {
  grid-row: 5;
}

.lesson-card.list-entry-card .card-actions,
.resource-card.list-entry-card .card-actions {
  align-self: end !important;
  display: flex;
  align-items: center;
  min-height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.lesson-card.list-entry-card .card-actions .primary-btn,
.resource-card.list-entry-card .card-actions .primary-btn {
  min-height: 24px !important;
}

@media (max-width: 560px) {
  .lesson-card.list-entry-card,
  .resource-card.list-entry-card {
    min-height: 174px;
    padding: 18px !important;
  }

  .lesson-card.list-entry-card:not(.editable-card),
  .resource-card.list-entry-card:not(.admin-resource-card) {
    grid-template-rows: 58px 30px minmax(14px, 1fr) 24px;
  }

  .lesson-card.list-entry-card.editable-card,
  .resource-card.admin-resource-card.list-entry-card {
    grid-template-rows: 24px 58px 30px minmax(12px, 1fr) 24px;
  }

  .lesson-card.list-entry-card .lesson-title-row,
  .lesson-card.list-entry-card .card-title,
  .resource-card.list-entry-card .card-title {
    min-height: 58px !important;
  }
}

/* Current shared green theme. */
:root {
  --ink: #20312b;
  --muted: #6f7d76;
  --line: #d8dfda;
  --line-strong: #c6d0c9;
  --paper: #f4f5ef;
  --paper-strong: #ecefe8;
  --panel: rgba(252, 253, 249, 0.94);
  --panel-solid: #fcfdf9;
  --accent: #347761;
  --accent-strong: #285f4f;
  --accent-soft: #e1f3e9;
  --accent-soft-strong: #cdebdc;
  --mint: #8bd8b8;
  --violet: #347761;
  --cyan: #8bd8b8;
  --blue: #347761;
  --shadow-sm: 0 12px 30px rgba(32, 49, 43, 0.055);
  --shadow-md: 0 24px 64px rgba(32, 49, 43, 0.09);
}

body {
  color: var(--ink);
  background: var(--paper);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: url("./assets/ai-planet-brand/logo-mark.svg") center / contain no-repeat;
  box-shadow: none;
}

.primary-btn,
.upload-btn {
  color: #fcfdf9;
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: none;
}

.primary-btn:hover,
.upload-btn:hover {
  color: #fcfdf9;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  box-shadow: 0 10px 24px rgba(32, 49, 43, 0.11);
}

.ghost-btn,
.tab-btn,
.icon-btn {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel-solid);
}

.ghost-btn:hover,
.tab-btn:hover,
.icon-btn:hover {
  color: var(--accent-strong);
  border-color: var(--line-strong);
  background: #ffffff;
}

.tab-btn.active,
.side-nav button.active,
.side-nav button:hover,
.ai-session-row.active .screenshot-item,
.screenshot-composer .ai-mode-switch .tab-btn.active {
  color: var(--accent-strong);
  border-color: transparent;
  background: var(--accent-soft);
  box-shadow: none;
}

.card,
.quota,
.side-panel,
.detail-block,
.account-table,
.org-form,
.config-form,
.modal,
.pdf-thumb,
.archive-row,
.readonly-field,
.slide-card,
.doc-page {
  border-color: var(--line);
  background: var(--panel-solid);
  box-shadow: none;
}

.feature-card:hover,
.course-card:hover,
.lesson-card:hover,
.resource-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.role-icon,
.chip,
.status-pill,
.session-chip,
.chip.teacher,
.chip.student,
.status-pill.active,
.status-pill.warn {
  color: var(--accent-strong);
  border-color: var(--line);
  background: var(--accent-soft);
  box-shadow: none;
}

.app-topnav,
.fixed-sidebar,
.sidebar {
  border-color: var(--line);
  background: rgba(252, 253, 249, 0.92);
  box-shadow: none;
}

.fixed-sidebar,
.sidebar {
  background: #eef1eb;
}

.side-nav button {
  color: #54635c;
}

.admin-layout {
  background: var(--paper);
}

.site-footer {
  border-color: var(--line);
  background: var(--paper);
}

.login-page {
  color: var(--ink);
  background: var(--paper);
}

.login-visual {
  color: var(--ink);
  background: var(--accent-soft);
}

.login-visual h1,
.login-title {
  color: var(--ink);
}

.login-visual p {
  color: #5c6d65;
}

.login-card {
  border-color: var(--line);
  background: var(--panel-solid);
  box-shadow: var(--shadow-sm);
}

.login-card label,
.org-form label,
.config-form label,
.modal label,
.picker label {
  color: var(--ink);
}

.login-card input,
.login-card select,
.org-form input,
.org-form select,
.config-form input,
.config-form select,
.modal input,
.picker input,
.picker select,
.org-search-row select,
.lesson-title-input,
.ai-composer-card textarea {
  color: var(--ink);
  border-color: var(--line);
  background: #ffffff;
}

.login-card input:focus,
.login-card select:focus,
.org-form input:focus,
.org-form select:focus,
.config-form input:focus,
.config-form select:focus,
.modal input:focus,
.picker input:focus,
.picker select:focus,
.org-search-row select:focus,
.lesson-title-input:focus,
.ai-composer-card textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(139, 216, 184, 0.26);
  box-shadow: none;
}

.ai-workspace-standalone,
.ai-page-main.standalone,
.ai-page-frame.screenshot-style,
.ai-page-frame.screenshot-style .ai-chat-main,
.screenshot-main .ai-chat-scroll {
  background: var(--paper);
}

.ai-page-frame.screenshot-style .ai-chat-sidebar {
  border-right-color: var(--line);
  background: #eef1eb;
}

.ai-workspace-brand,
.ai-session-name,
.ai-assistant-title,
.ai-message-body {
  color: var(--ink);
}

.ai-new-chat-btn,
.screenshot-item,
.ai-message-card,
.screenshot-composer .ai-top-toolbar,
.screenshot-composer .ai-doubao-box,
.ai-table-wrap,
.ai-markdown-table th,
.ai-markdown-table td {
  border-color: var(--line);
}

.ai-new-chat-btn,
.ai-message-card,
.screenshot-composer .ai-top-toolbar,
.screenshot-composer .ai-doubao-box {
  color: var(--ink);
  background: var(--panel-solid);
}

.ai-inline-avatar.assistant,
.screenshot-composer .ai-send-btn,
.screenshot-composer .ai-send-btn:not(:disabled) {
  color: #fcfdf9;
  background: var(--ink);
  box-shadow: none;
}

.ai-user-bubble {
  color: var(--ink);
  background: var(--accent-soft);
}

.ai-empty-illustration {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Login footer access and AI canvas refinements. */
.login-page > .site-footer.has-admin-access .site-footer-inner {
  position: relative;
}

.admin-access-link {
  position: absolute;
  right: 0;
  color: var(--muted);
  font-size: 11px;
  opacity: 0.44;
  border-bottom-color: transparent;
}

.admin-access-link:hover {
  color: var(--accent-strong);
  opacity: 0.82;
}

.ai-page-frame.screenshot-style .ai-chat-main,
.screenshot-main .ai-chat-scroll,
.screenshot-main .ai-messages-rich {
  background: var(--panel-solid);
}

@media (max-width: 720px) {
  .login-page > .site-footer.has-admin-access .site-footer-inner {
    padding-bottom: 24px;
  }

  .admin-access-link {
    right: 50%;
    bottom: -6px;
    transform: translateX(50%);
  }
}

/* Unified top navigation: brand / home / current page / account. */
.app-topnav.global-topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: var(--app-topnav-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 28px;
  border-bottom: 1px solid rgba(35, 55, 48, 0.11);
  background: rgba(250, 251, 247, 0.96);
  box-shadow: 0 8px 24px rgba(27, 45, 38, 0.035);
  backdrop-filter: blur(14px);
}

.global-nav-path,
.global-nav-account {
  display: flex;
  min-width: 0;
  align-items: center;
}

.global-nav-path {
  gap: 14px;
}

.global-nav-primary,
.global-nav-destinations {
  display: flex;
  min-width: 0;
  align-items: center;
}

.global-nav-primary {
  gap: 4px;
}

.global-nav-destinations {
  gap: 4px;
}

.global-nav-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}

.global-nav-brand-copy {
  display: grid;
  gap: 1px;
  text-align: left;
}

.global-nav-brand .brand-name {
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.global-nav-brand .brand-english {
  color: #758079;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.15em;
  line-height: 1.1;
}

.global-nav-slash {
  width: 1px;
  height: 22px;
  background: rgba(42, 61, 53, 0.14);
}

.global-nav-home,
.global-nav-destination,
.global-nav-login,
.global-nav-exit {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.global-nav-home,
.global-nav-destination {
  position: relative;
  padding: 7px 8px;
  color: #52615a;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.global-nav-home:hover,
.global-nav-home:focus-visible,
.global-nav-destination:hover,
.global-nav-destination:focus-visible,
.global-nav-login:hover,
.global-nav-exit:hover {
  color: var(--accent-strong);
}

.global-nav-home:focus-visible,
.global-nav-destination:focus-visible {
  border-radius: 5px;
  outline: 2px solid rgba(31, 94, 84, 0.2);
  outline-offset: 2px;
}

.global-nav-home.active,
.global-nav-destination.active {
  color: var(--accent-strong);
  font-weight: 720;
}

.global-nav-home.active::after,
.global-nav-destination.active::after {
  position: absolute;
  right: 8px;
  bottom: 1px;
  left: 8px;
  height: 2px;
  border-radius: 99px;
  background: var(--accent);
  content: "";
}

.global-nav-current {
  overflow: hidden;
  max-width: min(32vw, 300px);
  color: #1d2f28;
  font-size: 13px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-nav-account {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 12px;
}

.global-nav-user-menu {
  position: relative;
}

.global-nav-username {
  display: block;
  max-width: 180px;
  overflow: hidden;
  padding: 7px 0;
  border: 0;
  color: #263a32;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-nav-username:hover,
.global-nav-username:focus-visible {
  color: var(--accent-strong);
}

.global-nav-user-dropdown {
  position: absolute;
  top: 100%;
  right: -10px;
  z-index: 60;
  min-width: 132px;
  padding: 6px;
  border: 1px solid rgba(35, 55, 48, 0.12);
  border-radius: 8px;
  background: var(--panel-solid);
  box-shadow: 0 14px 34px rgba(27, 45, 38, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  visibility: hidden;
  transition:
    opacity 180ms ease,
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 180ms ease;
}

.admin-shell .app-topnav,
.admin-shell .fixed-sidebar,
.admin-shell .card {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.global-nav-user-menu:hover .global-nav-user-dropdown,
.global-nav-user-menu:focus-within .global-nav-user-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.global-nav-user-dropdown button {
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 6px;
  color: #263a32;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}

.global-nav-user-dropdown button:hover,
.global-nav-user-dropdown button:focus-visible {
  color: var(--accent-strong);
  background: var(--accent-soft);
  outline: none;
}

.global-nav-divider {
  width: 1px;
  height: 18px;
  background: rgba(42, 61, 53, 0.14);
}

.global-nav-exit,
.global-nav-login {
  padding: 7px 0;
  color: #68766f;
  font-size: 12px;
  font-weight: 650;
}

/* Public legal and child-protection surfaces. */
.legal-card {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px);
}

.legal-section + .legal-section {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  margin: 0 0 14px;
  font-size: 21px;
}

.legal-section p {
  color: var(--muted);
  line-height: 1.9;
}

.legal-consent-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  font-weight: 400 !important;
}

.legal-consent-row input {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  min-height: 0 !important;
  flex: 0 0 16px;
  margin: 0 !important;
}

.legal-consent-row > span {
  min-width: 0;
}

.login-legal-consent {
  margin-top: 2px;
}

.inline-legal-link {
  display: inline;
  padding: 0;
  color: var(--accent);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  font: inherit;
}

.inline-legal-link + .inline-legal-link {
  margin-left: 6px;
}

.legal-page > .global-topnav {
  width: 100%;
}

@media (max-width: 720px) {
  .app-topnav.global-topnav {
    gap: 12px;
    padding-inline: 14px;
  }

  .global-nav-path {
    gap: 9px;
  }

  .global-nav-brand-copy,
  .global-nav-path .global-nav-slash:first-of-type,
  .global-nav-home {
    display: none;
  }

  .global-nav-primary,
  .global-nav-destinations {
    gap: 0;
  }

  .global-nav-destination {
    padding-inline: 5px;
    font-size: 12px;
  }

  .global-nav-destination.active::after {
    right: 5px;
    left: 5px;
  }

  .global-nav-current {
    max-width: 32vw;
  }

  .global-nav-account {
    gap: 8px;
  }

  .global-nav-username {
    max-width: 112px;
  }
}

/* Account-scoped course trials. */
.status-pill.trial {
  color: var(--accent-strong);
  border: 1px solid var(--accent-soft-strong);
  background: var(--accent-soft);
}

.trial-access-modal {
  width: min(760px, 100%);
  max-height: min(84vh, 780px);
  overflow: hidden;
}

.trial-access-head,
.trial-access-actions,
.trial-course-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.trial-access-head > div {
  display: grid;
  gap: 8px;
}

.trial-access-head p,
.trial-course-heading span {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-sm);
}

.trial-access-list {
  display: grid;
  gap: 12px;
  max-height: 52vh;
  padding-right: 4px;
  overflow-y: auto;
}

.trial-course-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.trial-course-heading strong {
  font-size: 17px;
}

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

.modal .trial-lesson-option {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 62px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-solid);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.modal .trial-lesson-option:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.modal .trial-lesson-option input {
  width: 18px !important;
  height: 18px;
  min-height: 18px !important;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.trial-lesson-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.trial-lesson-option strong,
.trial-lesson-option small {
  overflow-wrap: anywhere;
}

.trial-lesson-option small {
  color: var(--muted);
  font-size: var(--type-xs);
  line-height: 1.45;
}

.trial-access-actions {
  align-items: flex-end;
}

.trial-cancel-btn {
  color: var(--coral);
  border-color: rgba(216, 111, 85, 0.34);
}

.lesson-card.list-entry-card.trial-locked-card {
  border: 1px solid #d6ddd8;
  background:
    linear-gradient(145deg, rgba(250, 251, 248, 0.96), rgba(237, 241, 235, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.lesson-card.list-entry-card.trial-locked-card:hover,
.lesson-card.list-entry-card.trial-locked-card:focus-visible {
  border-color: #b7c3bc;
  background:
    linear-gradient(145deg, #ffffff, #eef2ed);
  box-shadow: 0 14px 32px rgba(55, 72, 63, 0.08);
  transform: translateY(-1px);
}

.lesson-card.list-entry-card.trial-locked-card::before {
  content: none;
}

.lesson-card.list-entry-card.trial-locked-card::after {
  position: absolute;
  top: 22px;
  left: 0;
  width: 3px;
  height: 36px;
  border-radius: 0 999px 999px 0;
  background: #9eada5;
  content: "";
}

.trial-card-lock {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(91, 109, 99, 0.14);
  border-radius: 50%;
  color: #68786f;
  background: rgba(255, 255, 255, 0.74);
}

.trial-locked-card .lesson-title-row {
  padding-right: 48px !important;
}

.trial-locked-card .card-title {
  color: #405048;
}

.trial-locked-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(91, 109, 99, 0.13);
  border-radius: 999px;
  color: #66766d;
  background: rgba(255, 255, 255, 0.76);
  font-size: var(--type-xs);
  font-weight: var(--weight-medium);
}

.trial-lock-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.lesson-card.list-entry-card .trial-locked-btn {
  min-width: 0;
  min-height: 24px;
  padding: 0;
  font-size: var(--type-xs);
  font-weight: var(--weight-medium);
  color: #7a8981;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.lesson-card.list-entry-card .trial-locked-btn:hover {
  color: #405048;
}

.lesson-card.list-entry-card.trial-unlocked-card .card-actions .primary-btn {
  font-size: var(--type-xs);
}

.lesson-card.list-entry-card.trial-unlocked-card .card-actions .primary-btn::after {
  content: "";
}

@media (max-width: 720px) {
  .trial-lesson-grid {
    grid-template-columns: 1fr;
  }

  .trial-access-head,
  .trial-access-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .trial-access-actions .nav-actions,
  .trial-access-actions .tab-btn,
  .trial-access-actions .primary-btn {
    width: 100%;
  }
}

/* Workspace proportion and preview component refinements. */
@media (min-width: 921px) {
  .admin-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .fixed-sidebar {
    padding: 22px 16px;
  }

  .side-title {
    font-size: 22px;
    letter-spacing: -0.02em;
  }

  .side-nav button {
    padding-inline: 12px;
  }
}

.page-head > div:first-child {
  min-width: 0;
}

.page-head h1 {
  overflow-wrap: anywhere;
}

.page-head > .nav-actions,
.page-head > .tab-btn {
  flex: 0 0 auto;
}

.page-head > .nav-actions {
  flex-wrap: nowrap;
}

.page-head > .nav-actions .tab-btn,
.page-head > .tab-btn {
  min-width: max-content;
  white-space: nowrap;
  word-break: keep-all;
}

.preview.archive-preview-shell {
  min-height: 0;
  background: #f4f6f2;
}

.doc-page.archive-ready {
  width: calc(100% - 32px);
  max-width: none;
  margin: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.archive-preview {
  display: grid;
  gap: 14px;
}

.archive-summary {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 4px 12px;
  border: 0;
  border-bottom: 1px solid #dbe2dc;
  border-radius: 0;
  background: transparent;
}

.archive-summary-copy {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.archive-summary-copy > div {
  display: grid;
  gap: 2px;
}

.archive-summary-copy > div > span {
  color: #718078;
  font-size: var(--type-xs);
}

.archive-summary-copy strong {
  color: #26362f;
  font-size: 15px;
}

.archive-summary-icon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: #40574c;
  background: #e7eee9;
}

.archive-summary-icon svg,
.archive-file-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.archive-download-btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.archive-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid #dbe2dc;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.archive-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(54px, auto) minmax(68px, auto);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #e5e9e5;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background 160ms ease;
}

.archive-row:last-child {
  border-bottom: 0;
}

.archive-row:hover {
  background: #f6f8f5;
}

.archive-file-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: #64766c;
  background: #edf2ed;
}

.archive-file-icon svg {
  width: 18px;
  height: 18px;
}

.archive-file-icon-word {
  color: #2f5d9b;
  background: #e8eef8;
}

.archive-file-icon-excel {
  color: #287052;
  background: #e5f1e9;
}

.archive-file-icon-powerpoint {
  color: #a54e32;
  background: #f7e9e4;
}

.archive-file-icon-pdf {
  color: #ad3f43;
  background: #f7e8e8;
}

.archive-file-icon-image {
  color: #39765f;
  background: #e7f1eb;
}

.archive-file-icon-video {
  color: #a85d3a;
  background: #f5ebe5;
}

.archive-file-icon-audio {
  color: #73589e;
  background: #eee9f6;
}

.archive-file-icon-folder {
  color: #9a772b;
  background: #f6f0df;
}

.archive-file-icon-archive {
  color: #80652f;
  background: #f2eddf;
}

.archive-file-icon-text {
  color: #536d7b;
  background: #e8eef1;
}

.archive-file-icon-code {
  color: #286f6d;
  background: #e4f0ef;
}

.archive-file-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.archive-name {
  overflow: hidden;
  color: #293a32;
  font-size: 14px;
  font-weight: var(--weight-medium);
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.archive-path {
  overflow: hidden;
  color: #839087;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-format {
  justify-self: end;
  padding: 4px 7px;
  border-radius: 6px;
  color: #617168;
  background: #eef2ee;
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
}

.archive-size {
  justify-self: end;
  color: #718078;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .archive-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-download-btn {
    justify-content: center;
    width: 100%;
  }

  .archive-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .archive-format {
    display: none;
  }
}

/* Keep document content as the primary visual layer on resource preview pages. */
.resource-preview-head {
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.resource-preview-head h1 {
  max-width: 100%;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.resource-preview-head p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
}

.resource-preview-back {
  white-space: nowrap;
}

.back-nav-link {
  display: inline-flex !important;
  min-height: auto !important;
  align-items: center;
  gap: 7px;
  padding: 6px 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #66786f !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}

.back-nav-link::before {
  content: "←";
  color: #7b8c84;
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.back-nav-link:hover,
.back-nav-link:focus-visible {
  color: #244d41 !important;
  background: transparent !important;
}

.back-nav-link:hover::before,
.back-nav-link:focus-visible::before {
  color: #244d41;
  transform: translateX(-2px);
}

.back-nav-link:focus-visible {
  outline: 2px solid rgba(31, 94, 84, 0.2);
  outline-offset: 3px;
}

.resource-file-preview {
  min-height: calc(100vh - 188px);
}

.document-preview > .doc-page.pdf-loading,
.document-preview > .doc-page.ppt-loading {
  width: 100%;
  margin: 0;
  padding: 6px 10px 10px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.document-preview .pdf-reader,
.document-preview .pdf-main {
  min-height: clamp(480px, calc(100vh - 204px), 980px);
}

.document-preview .pdf-sidebar,
.document-preview .pdf-pages {
  max-height: clamp(480px, calc(100vh - 204px), 980px);
}

.document-preview:fullscreen:not(.presentation-preview) {
  display: block;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.document-preview:fullscreen:not(.presentation-preview) > [data-pdf-url] {
  width: 100%;
  height: 100vh;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.document-preview:fullscreen:not(.presentation-preview) .pdf-reader {
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.document-preview:fullscreen:not(.presentation-preview) .pdf-main {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.document-preview:fullscreen:not(.presentation-preview) .pdf-sidebar,
.document-preview:fullscreen:not(.presentation-preview) .pdf-pages {
  height: 100%;
  max-height: none;
  min-height: 0;
}

@media print {
  #securePreview > :not(#blackout) {
    display: none !important;
  }

  #securePreview #blackout {
    position: fixed;
    inset: 0;
    display: grid !important;
  }
}

.pdf-toolbar {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) auto minmax(76px, 1fr);
  gap: 6px;
  min-height: 30px;
  padding: 0;
}

.pdf-toolbar-controls {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 6px;
}

.pdf-toolbar .tab-btn {
  min-height: 28px;
  padding-inline: 8px;
  font-size: 12px;
}

.pdf-toolbar .icon-text-btn {
  min-width: 28px;
  padding: 0;
  font-size: 18px;
}

.pdf-toolbar-fullscreen {
  justify-self: end;
  margin-left: 0;
}

.preview-fullscreen-trigger {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 2px;
  border: 0;
  color: #1f5e54;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.preview-fullscreen-trigger:hover,
.preview-fullscreen-trigger:focus-visible {
  color: #173e35;
}

.preview-fullscreen-trigger:focus-visible {
  outline: 2px solid rgba(31, 94, 84, 0.22);
  outline-offset: 3px;
}

.preview-fullscreen-trigger [data-fullscreen-label] {
  text-underline-offset: 4px;
}

.preview-fullscreen-trigger:hover [data-fullscreen-label] {
  text-decoration: underline;
}

.preview-action-icon {
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 7px;
  color: #fff;
  background: #1f5e54;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.resource-media-toolbar {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: flex-end;
}

.resource-media-toolbar .preview-fullscreen-trigger {
  min-height: 28px;
}

.presentation-preview .pdf-thumb {
  grid-template-rows: auto auto;
  gap: 3px;
  min-height: 90px;
  padding: 4px;
}

.presentation-preview .pdf-thumb-preview {
  width: 100%;
  height: auto;
  aspect-ratio: var(--ppt-slide-ratio, 1.7778);
  border-radius: 6px;
}

.resource-file-preview > .video-media-page {
  display: grid;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 6px 10px 10px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.video-media-page .secure-video-shell {
  margin: 8px 0 12px;
  border-radius: 8px;
}

.resource-file-preview > .audio-media-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.audio-media-page audio {
  margin: 6px 0;
}

.video-preview:fullscreen > .video-media-page {
  grid-template-rows: 30px minmax(0, 1fr) auto;
  width: 100%;
  height: 100vh;
  min-height: 0;
  padding: 10px;
}

.video-preview:fullscreen .secure-video-shell {
  display: grid;
  min-height: 0;
  margin: 8px 0 0;
  place-items: center;
}

.video-preview:fullscreen .video-player {
  max-height: calc(100vh - 58px);
  border-radius: 0;
}

@media (max-width: 560px) {
  .resource-preview-head h1 {
    font-size: 20px;
  }

  .resource-file-preview {
    min-height: calc(100vh - 164px);
  }

  .pdf-toolbar {
    grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
  }

  .document-preview > .doc-page.pdf-loading,
  .document-preview > .doc-page.ppt-loading {
    padding-inline: 6px;
  }
}
