﻿
:root {
  --bg: #eef5ff;
  --surface: #ffffff;
  --ink: #0f172a;
  --sub: #4a5b75;
  --line: #d7e5ff;
  --accent: #1d4ed8;
  --accent-2: #0284c7;
  --chip: #eaf2ff;
  --muted: #f4f8ff;
  --gold: #f59e0b;
  --silver: #64748b;
  --bronze: #b45309;
  --brand-title-size: 24px;
  --page-title-size: var(--brand-title-size);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 92% 0%, #dbeafe 0%, #edf4ff 40%, #f7fbff 100%);
}

body.auth-lock {
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 260px 1fr minmax(520px, 760px);
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #bfdbfe;
}

.avatar-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #bfdbfe;
  overflow: hidden;
  padding: 0;
  background: #fff;
  cursor: pointer;
}

.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-meta h2 {
  margin: 0;
  font-size: var(--brand-title-size);
  font-weight: 800;
  letter-spacing: 0.4px;
}

.top-title {
  display: flex;
  justify-content: center;
  align-items: center;
}

.top-title h1 {
  margin: 0;
  max-width: min(420px, 92%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--page-title-size);
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
  transition: color 0.25s ease, letter-spacing 0.25s ease;
}

.top-title h1.title-home {
  font-family: "Noto Sans SC", sans-serif;
  color: #14213d;
}

.top-title h1.title-case {
  font-family: "Noto Serif SC", serif;
  color: #1d3e8a;
  letter-spacing: 0.3px;
}

.top-title h1.title-discussion {
  font-family: "ZCOOL QingKe HuangYou", "Noto Sans SC", sans-serif;
  color: #075985;
  letter-spacing: 0.8px;
}

.top-title h1.title-discussion_detail {
  font-family: "Noto Serif SC", serif;
  color: #0f4c81;
  letter-spacing: 0.4px;
}

.top-title h1.title-model_eval {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  color: #1d4ed8;
  letter-spacing: 0.4px;
}

.top-title h1.title-evaluation_detail {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  color: #1e40af;
  letter-spacing: 0.3px;
}

.top-title h1.title-model_recipe {
  font-family: "Noto Serif SC", serif;
  color: #1e3a8a;
}

.top-title h1.title-my_model {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  color: #1e3a8a;
}

.top-title h1.title-course,
.top-title h1.title-course_detail {
  font-family: "Noto Serif SC", serif;
  color: #0f766e;
  letter-spacing: 0.3px;
}

.top-title h1.title-point_mall {
  font-family: "ZCOOL QingKe HuangYou", "Noto Sans SC", sans-serif;
  color: #a16207;
  letter-spacing: 0.6px;
}

.top-title h1.title-profile {
  font-family: "Noto Sans SC", sans-serif;
  color: #334155;
}

.top-title h1.title-post_detail {
  font-family: "Noto Sans SC", sans-serif;
  color: #1f2937;
  letter-spacing: 0.2px;
}

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

.top-actions input {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.user-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f8ff;
  color: #1e3a8a;
  font-size: 12px;
  padding: 7px 10px;
  white-space: nowrap;
}

.primary-btn {
  border: none;
  border-radius: 10px;
  background: linear-gradient(120deg, #1d4ed8, #0284c7);
  color: #fff;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.auth-gate.hidden {
  display: none;
}

.auth-card {
  width: min(720px, 92vw);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.auth-card h2 {
  margin: 0;
}

.auth-card p {
  margin: 4px 0 0;
  color: var(--sub);
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-grid label {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.auth-grid input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
}

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

.error-text {
  color: #b91c1c;
}

.layout {
  max-width: 1680px;
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-columns: 280px minmax(760px, 1fr) 380px;
  gap: 16px;
}

.left-nav,
.center-pane,
.right-rail .box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.left-nav {
  padding: 14px;
  position: sticky;
  top: 84px;
  min-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  height: fit-content;
}

.left-nav h3 {
  margin: 0 0 8px;
}

.left-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.left-nav li {
  border-radius: 10px;
  padding: 10px;
  color: #2d3d5c;
  cursor: pointer;
}

.left-nav li.active,
.left-nav li:hover {
  background: #edf4ff;
  color: var(--accent);
  font-weight: 700;
}

.law-assistant {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 100%;
  height: 380px;
  position: relative;
  overflow: hidden;
  background: #1e293b;
}

.law-assistant::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.58)), url("./logo.jpg") center/cover no-repeat;
  opacity: 0.36;
  transition: filter 0.25s ease;
}

.law-assistant.chat-active::before {
  filter: blur(4px);
}

.assistant-head,
.assistant-messages,
.assistant-form {
  position: relative;
  z-index: 2;
}

.assistant-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  padding: 10px;
}

.assistant-head h4 {
  margin: 0;
  font-size: 22px;
  line-height: 1;
}

.assistant-head span {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

.assistant-messages {
  height: 260px;
  overflow: auto;
  padding: 4px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assistant-msg {
  max-width: 78%;
  border-radius: 14px;
  padding: 10px 12px;
  line-height: 1.45;
  font-size: 13px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.assistant-msg.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.93);
}

.assistant-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
}

.assistant-msg.thinking {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  width: 64px;
}

.assistant-msg.thinking span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5b6f94;
  animation: typing 1s infinite ease-in-out;
}

.assistant-msg.thinking span:nth-child(2) {
  animation-delay: 0.16s;
}

.assistant-msg.thinking span:nth-child(3) {
  animation-delay: 0.32s;
}

.assistant-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px;
}

.assistant-form input {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.assistant-send {
  padding: 8px 12px;
}

.center-pane {
  padding: 14px;
}

.feed-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.feed-toolbar h2 {
  margin: 0;
}

.chips span {
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
  padding: 4px 8px;
  margin-left: 6px;
}

.center-view {
  margin-top: 12px;
}

.loading {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 20px;
  color: var(--sub);
}

.feed-list,
.discussion-list,
.course-list,
.evaluation-list,
.model-list {
  display: grid;
  gap: 12px;
}

.feed-card,
.discussion-card,
.course-card,
.evaluation-card,
.detail-page,
.course-detail,
.my-models,
.profile-page,
.discussion-publish {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.feed-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.author-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-row img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.author-row h4 {
  margin: 0;
}

.author-row p {
  margin: 0;
  font-size: 12px;
  color: var(--sub);
}

.type-badge {
  font-size: 12px;
  border: 1px solid #93c5fd;
  border-radius: 999px;
  background: #eef4ff;
  color: #1e40af;
  padding: 4px 8px;
}

.feed-card h3 {
  margin: 10px 0 6px;
}

.summary {
  margin: 0;
  color: #334155;
}

.post-image-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.post-image-row img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.top-comment {
  margin-top: 10px;
  border: 1px solid #dbe5f8;
  border-radius: 10px;
  background: #f4f7fc;
  padding: 10px;
}

.top-comment-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #5d6d84;
}

.top-comment p {
  margin: 6px 0 0;
}

.top-comment img {
  margin-top: 8px;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.feed-card footer,
.discussion-card footer,
.course-card footer,
.evaluation-card footer,
.bind-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.link-btn,
.ghost-btn,
.back-btn,
.hot-eval-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  text-decoration: none;
  padding: 7px 10px;
  cursor: pointer;
}

.link-btn:hover,
.ghost-btn:hover,
.back-btn:hover,
.hot-eval-link:hover {
  background: #eff5ff;
  border-color: #9cc0ff;
}

.attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.attach-list a {
  border: 1px solid #ccdbf8;
  border-radius: 999px;
  background: #f3f7ff;
  font-size: 12px;
  text-decoration: none;
  color: #1f3a6d;
  padding: 4px 8px;
}

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

.comment-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px;
}

.comment-item-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--sub);
}

.comment-item p {
  margin: 6px 0 0;
}

.comment-item img {
  margin-top: 8px;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.compose-form {
  display: grid;
  gap: 8px;
}

.compose-form label {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.compose-form input,
.compose-form textarea,
.compose-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  font: inherit;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.comment-form-inline {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}

.comment-form-inline.single {
  grid-template-columns: 1fr auto;
}

.comment-form-inline input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.meta-line {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-chip {
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

.course-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px;
}

.course-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.course-layout {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 12px;
}

.course-progress-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px;
}

.progress-line {
  height: 10px;
  border-radius: 999px;
  background: #dbeafe;
  overflow: hidden;
}

.progress-line span {
  display: block;
  height: 100%;
  background: linear-gradient(120deg, #1d4ed8, #0284c7);
}

.progress-meta {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.progress-meta b {
  color: #1d4ed8;
}

.course-toc {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.toc-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  padding: 8px;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.toc-item.active {
  background: #ecf4ff;
  border-color: #8fb7ff;
  color: #153780;
  font-weight: 700;
}

.toc-item span {
  font-size: 12px;
  color: #64748b;
}

.course-player video,
.course-player img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.chapter-chip {
  display: inline-block;
  margin-bottom: 8px;
  border: 1px solid #a7c4ff;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  color: #1e3a8a;
  background: #edf3ff;
}

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

.ppt-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.lesson-prompts {
  margin: 0;
  padding-left: 18px;
}

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

.chapter-quiz fieldset {
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #f8fbff;
}

.chapter-quiz legend {
  padding: 0 4px;
  font-weight: 700;
}

.chapter-quiz label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}

.cert-box {
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eef6ff;
  padding: 10px;
}

.cert-box p {
  margin: 6px 0 0;
  color: #334155;
}

.eval-actions {
  display: flex;
  justify-content: flex-end;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
}

.rank-table th,
.rank-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 8px;
}

.rank-pill {
  display: inline-block;
  min-width: 28px;
  text-align: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
  background: #e6ecf7;
}

.rank-1 {
  background: #fef3c7;
  color: #92400e;
}

.rank-2 {
  background: #e2e8f0;
  color: #334155;
}

.rank-3 {
  background: #ffedd5;
  color: #9a3412;
}

.readme-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.recipe-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
  padding: 8px;
  display: grid;
}

.recipe-grid b {
  font-size: 12px;
  color: #51617a;
}

.profile-page {
  display: grid;
  gap: 12px;
}

.profile-hero {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
}

.profile-hero img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #bfdbfe;
}

.profile-stats {
  display: flex;
  gap: 8px;
}

.profile-stats span {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff5ff;
  padding: 4px 8px;
  font-size: 12px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.profile-grid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px;
  display: grid;
}

.profile-grid b {
  font-size: 18px;
}

.profile-grid span {
  color: var(--sub);
  font-size: 12px;
}

.profile-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.point-mall {
  display: grid;
  gap: 12px;
}

.mall-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}

.mall-balance,
.mall-tip {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px;
}

.mall-balance h3,
.mall-tip h4 {
  margin: 0;
}

.mall-balance p {
  margin: 8px 0 4px;
  font-size: 34px;
  line-height: 1;
  color: #1d4ed8;
  font-weight: 800;
}

.mall-balance span,
.mall-tip p {
  color: var(--sub);
  font-size: 13px;
}

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

.shop-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.shop-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.shop-content {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.shop-content h3 {
  margin: 0;
}

.shop-content p {
  margin: 0;
  color: #334155;
}

.shop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shop-tags span {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
  padding: 2px 8px;
}

.shop-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shop-meta b {
  color: #1d4ed8;
}

.shop-meta span {
  color: var(--sub);
  font-size: 12px;
}

.redeem-log h3 {
  margin-top: 0;
}

.compose-dialog {
  width: min(920px, 95vw);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
}

.compose-dialog article {
  padding: 14px;
}

.compose-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.right-rail {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 84px;
  height: fit-content;
}

.right-rail .box {
  padding: 12px;
}

.right-rail h3 {
  margin: 0 0 8px;
}

.context-lines p {
  margin: 4px 0;
  font-size: 13px;
}

.hot-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.hot-links .hot-item a {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px 10px;
  color: #1d4ed8;
  text-decoration: none;
}

.hot-links .hot-item a:hover {
  background: #eff6ff;
}

.hot-title-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1e3a8a;
}

.hot-rank-tag {
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 7px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
  font-weight: 700;
}

.hot-rank-tag.top1 {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.hot-rank-tag.top2 {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

.hot-rank-tag.top3 {
  background: #ffedd5;
  border-color: #fdba74;
  color: #9a3412;
}

.hot-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  color: var(--sub);
}

.assistant-quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 10px 8px;
  position: relative;
  z-index: 2;
}

.assistant-quick-card {
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
}

.assistant-quick-card:hover {
  background: #eff6ff;
}

.board-box {
  min-height: 430px;
}

.leaderboard-rotator {
  min-height: 360px;
}

.leaderboard-rotator.board-enter {
  animation: boardFlip 0.45s ease;
}

.hot-eval-link {
  width: 100%;
  text-align: left;
  display: block;
  min-height: 360px;
}

.hot-eval-link h4 {
  margin: 0 0 8px;
}

.rank-ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.rank-ol li {
  display: grid;
  grid-template-columns: 50px 1fr 56px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fbff;
  padding: 6px 8px;
  gap: 8px;
}

.rank-no {
  font-weight: 800;
  text-align: center;
  border-radius: 999px;
  padding: 2px 6px;
  background: #e2e8f0;
}

.rank-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  text-align: right;
  color: #1f3f8f;
  font-weight: 700;
}

.rank-no.rank-1 {
  background: #fef3c7;
  color: #92400e;
}

.rank-no.rank-2 {
  background: #e2e8f0;
  color: #334155;
}

.rank-no.rank-3 {
  background: #ffedd5;
  color: #9a3412;
}

.subtle {
  color: var(--sub);
}

.profile-back-btn {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}

.profile-back-btn:hover {
  background: #1e40af;
  border-color: #1e40af;
}

.course-fullscreen .topbar,
.course-fullscreen .left-nav,
.course-fullscreen .right-rail {
  display: none;
}

.course-fullscreen .layout {
  max-width: 100%;
  padding: 0;
  grid-template-columns: 1fr;
}

.course-fullscreen .center-pane {
  border: none;
  border-radius: 0;
  padding: 20px;
  min-height: 100vh;
}

.full-screen-page {
  border-radius: 14px;
}

@keyframes typing {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@keyframes boardFlip {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 1360px) {
  .layout {
    grid-template-columns: 250px minmax(640px, 1fr) 330px;
  }
  .recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .topbar {
    grid-template-columns: 1fr;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .left-nav,
  .right-rail {
    position: static;
  }
  .left-nav {
    min-height: auto;
  }
  .law-assistant {
    margin-top: 14px;
  }
  .post-image-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .course-layout,
  .course-card,
  .grid-2,
  .auth-grid,
  .profile-grid,
  .recipe-grid,
  .comment-form-inline,
  .mall-head,
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .hot-eval-link,
  .leaderboard-rotator,
  .board-box {
    min-height: auto;
  }
}
