@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=IM+Fell+English:ital@0;1&display=swap');
:root {
  --prussian-blue: #003153;
  --prussian-blue-deep: #001a2f;
  --prussian-blue-light: #0d4268;
  --lapis: #2f5f8f;
  --lapis-light: #6b9bc0;
  --lapis-dark: #1d3f60;
  --nile-blue: #1f4e5f;
  --gold: #c9a959;
  --gold-light: #e6c87a;
  --ivory: #f4ecd8;
  --ink: #e8e0d0;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* 正文与状态栏之间的横线分隔 */
.sep {
  border: 0;
  border-top: 3px double var(--gold);
  margin: 2.2rem 0;
  position: relative;
  text-align: center;
}

.sep::before {
  content: '✦';
  color: var(--gold);
  background: var(--prussian-blue-deep);
  padding: 0 10px;
  position: relative;
  top: -14px;
  font-size: 1.1rem;
  text-shadow: 0 0 6px rgba(201, 169, 89, 0.6);
}

/* 所有可折叠状态栏：天青石色包裹 */
details.panel,
details.sub-panel {
  background: linear-gradient(145deg, rgba(47, 95, 143, 0.32), rgba(15, 35, 60, 0.88));
  border: 1px solid var(--lapis-light);
  border-radius: 8px;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(201, 169, 89, 0.22);
  margin-bottom: 12px;
  padding: 10px 14px;
}

details.panel > summary,
details.sub-panel > summary {
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold-light);
  border-bottom: 1px solid rgba(201, 169, 89, 0.3);
  padding: 8px 6px;
  text-shadow: 0 0 5px rgba(201, 169, 89, 0.4);
  list-style: none;
  position: relative;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

details.panel > summary::-webkit-details-marker,
details.sub-panel > summary::-webkit-details-marker {
  display: none;
}

details.panel > summary::before,
details.sub-panel > summary::before {
  content: '❧ ';
  color: var(--gold);
  font-size: 1.1em;
}

details.panel[open] > summary,
details.sub-panel[open] > summary {
  border-bottom-color: var(--gold);
  color: var(--gold-light);
  text-shadow: 0 0 10px rgba(230, 200, 122, 0.6);
}

.panel-body {
  padding: 10px 4px;
}

d {
  display: block;
  margin: 6px 0;
  padding: 5px 10px;
  border-left: 3px solid var(--lapis-light);
  background: rgba(0, 20, 40, 0.3);
  font-size: 0.92em;
  color: var(--ivory);
  border-radius: 2px;
}

/* 嵌套折叠 */
details.panel details.sub-panel {
  margin: 8px 0 0 8px;
  padding: 8px 10px;
}

/* 好感度不可见 */
.hdn {
  display: none !important;
}

/* 宿舍定制：可折叠网格卡片 */
.dorm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 8px 0;
}

.dorm-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(38, 97, 156, 0.25), rgba(10, 30, 55, 0.8));
  border: 1px solid var(--lapis-light);
  border-radius: 6px;
  padding: 14px 12px;
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.dorm-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 169, 89, 0.35);
  border-color: var(--gold-light);
}

/* 光泽扫过动效 */
.dorm-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -130%;
  width: 55%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 245, 200, 0.3), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s ease;
  pointer-events: none;
}

.dorm-card:hover::after {
  left: 140%;
}

.dorm-name {
  display: block;
  font-weight: 700;
  color: var(--gold-light);
  font-size: 0.95em;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
  text-shadow: 0 0 4px rgba(201, 169, 89, 0.3);
}

.dorm-val {
  display: block;
  font-size: 0.82em;
  color: var(--ivory);
  opacity: 0.88;
}

/* 今日课程表：尼罗河蓝横向滑动方块 */
.tt {
  margin-top: 18px;
  background: linear-gradient(145deg, #1f4e5f, #163a48);
  border: 1px solid var(--lapis-light);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.tt-h {
  font-weight: 700;
  color: var(--gold-light);
  padding: 10px 14px;
  border-bottom: 1px solid rgba(201, 169, 89, 0.3);
  letter-spacing: 0.08em;
  font-size: 1.05em;
  text-shadow: 0 0 5px rgba(201, 169, 89, 0.4);
}

.tt-w {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) #0b2b38;
}

.tt-w::-webkit-scrollbar {
  height: 8px;
}

.tt-w::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

.tt-w::-webkit-scrollbar-track {
  background: #0b2b38;
}

.tt-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  table-layout: fixed;
}

.tt-table th,
.tt-table td {
  padding: 10px 8px;
  border: 1px solid rgba(201, 169, 89, 0.28);
  vertical-align: top;
}

.tt-table thead th {
  background: rgba(0, 20, 40, 0.7);
  color: var(--gold-light);
  font-size: 0.85em;
  letter-spacing: 0.06em;
  text-shadow: 0 0 4px rgba(201, 169, 89, 0.4);
}

/* 色彩分区：不同列不同底色 */
.col-time {
  background: rgba(0, 30, 50, 0.72);
  width: 70px;
  color: var(--ivory);
  text-align: center;
}

.col-req {
  background: rgba(120, 80, 20, 0.38);
}

.col-iron {
  background: rgba(70, 90, 110, 0.38);
}

.col-sage {
  background: rgba(60, 80, 50, 0.38);
}

.course-name {
  display: block;
  font-weight: 700;
  color: var(--ivory);
  font-size: 0.92em;
  line-height: 1.3;
}

.course-loc {
  display: block;
  font-size: 0.74em;
  color: var(--gold-light);
  opacity: 0.85;
  margin-top: 4px;
  font-style: italic;
}

/* 移动端适配 */
@media (max-width: 600px) {
  body {
    padding: 12px;
  }
  .dorm-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tt-table {
    min-width: 560px;
  }
}/* /* ==========================================
   主题：极寒之夜 (Midnight Snowfall)
   核心：强制深色覆写 / 绝对对比度 / 纯净雪花动效
   ========================================== */

/* 1. 聊天气泡本体：午夜深渊的深色渐变与玻璃质感 */
.group.is-user > div:first-child, 
.group.is-assistant > div:first-child {
    background: linear-gradient(145deg, #070b14 0%, #111a2a 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(160, 190, 255, 0.03) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;
    border-radius: 16px !important;
}

/* 2. 背景动效：静谧的飘雪层 (纯 SMIL 内联 SVG，零性能损耗，无视动画封禁) */
.group.is-user > div:first-child::before, 
.group.is-assistant > div:first-child::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important; 
    left: 0 !important; 
    right: 0 !important; 
    bottom: 0 !important;

/* 3. 【致命规则】前景内容：冰晶般的极致可读性 */
/* 在深沉的夜色中，每一句台词都必须如同雪地上的足迹般清晰、不容忽视 */
.rili-markdown-renderer, 
.rili-markdown-renderer * {
    color: #f4d58d !important; /* 极地冰白，拉满对比度 */
    line-height: 1.7 !important;
}

/* 针对代码块等特殊区域的微调，避免原生亮色破坏暗夜氛围 */
.rili-markdown-renderer pre, 
.rili-markdown-renderer code {
    background-color: rgba(0, 0, 0, 0.4) !important;
    color: #a8c7fa !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.bg-muted.rounded.flex button:hover svg.lucide {
    stroke: #ffffff !important; /* 鼠标抚摸时，泛起刺骨的亮白 */
}

/* 强制显示透明度为0的隐藏按钮（当用户希望操作按钮始终可见时） */
.group .md\:opacity-0 {
    opacity: 1 !important;
}

/* 6. 加载动画重构：从平庸的圆点到旋落的幽蓝雪花 */
/* 彻底抹杀原生的三个跳动圆点 */
.flex.gap-2.w-full.h-full.items-center.justify-center > span {
    display: none !important;
}

/* 孕育全新的风雪图腾 (Loading Snow Crystal) */
.flex.gap-2.w-full.h-full.items-center.justify-center::before {
    content: "" !important;
    display: block !important;
    width: 36px !important;
    height: 36px !important;
    /* 绘制一枚带有呼吸感、缓缓自转的六芒星冰晶 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' width='40' height='40'%3E%3Cg stroke='%238ab4f8' stroke-width='4' stroke-linecap='round' fill='none'%3E%3Cpath d='M50 20 L50 80 M20 50 L80 50 M29 29 L71 71 M71 29 L29 71'/%3E%3Ccircle cx='50' cy='50' r='10' stroke-width='2' opacity='0.5'/%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 50 50' to='360 50 50' dur='5s' repeatCount='indefinite'/%3E%3C/g%3E%3Canimate attributeName='opacity' values='0.2;1;0.2' dur='2s' repeatCount='indefinite'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    filter: drop-shadow(0 0 8px rgba(138, 180, 248, 0.8)) !important; /* 冰冷的荧光散射 */
}/* ===== 剧情占位符：哥特金色首字放大 ===== */
.plot-placeholder {
  font-family: 'Cinzel', 'IM Fell English', 'Times New Roman', serif;
  color: #e6c87a;
  font-size: 1.1em;
  line-height: 1.8;
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px rgba(201, 169, 89, 0.4);
  text-align: justify;
  padding: 1em;
  background: rgba(0, 20, 40, 0.4);
  border-left: 3px solid rgba(201, 169, 89, 0.6);
  border-radius: 4px;
}

/* 如果 plot-placeholder 内部使用 <p> 包裹文字 */
.plot-placeholder p {
  font-family: inherit;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-shadow: inherit;
  margin: 0.8em 0;
}

/* 首字放大：作用于 .plot-placeholder 或其内部第一个 p */
.plot-placeholder::first-letter,
.plot-placeholder p:first-of-type::first-letter {
  font-family: 'Cinzel', serif;
  font-size: 3.5em;
  float: left;
  margin: 0.06em 0.12em 0 0;
  line-height: 0.85;
  color: #f4d58d;
  text-shadow:
    0 0 18px rgba(240, 210, 140, 0.8),
    0 0 36px rgba(201, 169, 89, 0.4);
  font-weight: 700;
}
{.rili-markdown-renderer s,
.rili-markdown-renderer del,
.rili-markdown-renderer strike {
  text-decoration: none !important;
}