/* ========== 天空系列（诗人的天空 / 历史的天空 / 名著的天空）========== */
#page-poets, #page-history, #page-books { height: calc(100vh - 118px); min-height: 520px; }
.sky-stage {
  position: relative; width: 100%; height: 100%;
  border-radius: 16px; overflow: hidden; background: #070b14;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif; color: #e8e0d0;
}
.sky-stage canvas { display: block; position: absolute; inset: 0; }

.sky-hint {
  position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%);
  font-size: .85rem; color: #6a7a90; z-index: 20;
  background: rgba(7,11,20,.7); padding: 5px 12px; border-radius: 999px;
  pointer-events: none; white-space: nowrap;
}
.sky-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #8a9bb0; font-size: 1.08rem; z-index: 15; letter-spacing: 2px;
}
.sky-loading.error {
  color: #ff9b9b; flex-direction: column; gap: 12px; letter-spacing: 0;
  text-align: center; padding: 0 24px; line-height: 1.7; pointer-events: auto;
}
.sky-loading.error .sky-retry {
  padding: 7px 20px; border-radius: 999px; border: 1px solid rgba(201,184,150,.4);
  background: rgba(240,217,168,.12); color: #f0d9a8; font-size: .95rem; cursor: pointer;
  font-family: inherit; letter-spacing: 1px;
}

/* 背景音乐条 */
.sky-bgm {
  position: absolute; right: 16px; bottom: 108px; z-index: 26;
  display: flex; align-items: center; gap: 8px;
}
.sky-bgm button {
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(201,184,150,.35);
  background: rgba(12,18,32,.7); color: #f0d9a8; font-size: .92rem; cursor: pointer;
  font-family: inherit; letter-spacing: 1px;
}
.sky-bgm button:hover, .sky-bgm button.on { background: rgba(240,217,168,.18); border-color: rgba(240,217,168,.5); }
.sky-bgm .pick { display: none; }
.sky-bgm label.pick-btn {
  padding: 6px 12px; border-radius: 999px; border: 1px dashed rgba(201,184,150,.35);
  color: #a9b6c8; font-size: .82rem; cursor: pointer;
}
.sky-bgm label.pick-btn:hover { color: #f0d9a8; }

.sky-legend {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 25;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px;
  padding: 10px 12px 12px; background: linear-gradient(to top, rgba(7,11,20,.95), rgba(7,11,20,.75));
  border-top: 1px solid rgba(255,255,255,.06);
}
.sky-legend button {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05); color: #b8c4d4; font-size: .88rem;
  cursor: pointer; font-family: inherit;
}
.sky-legend button i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: inset -1.6px -1.6px 2.6px rgba(0,0,0,.55), inset 1px 1px 1.6px rgba(255,255,255,.5); }
.sky-legend button:hover, .sky-legend button.on {
  background: rgba(240,217,168,.15); color: #f0d9a8; border-color: rgba(240,217,168,.4);
}

/* 左侧朝代人物列表 */
.sky-stage .dyn-list {
  position: absolute; left: 16px; top: 16px; z-index: 28;
  width: min(560px, 58%); max-height: calc(100% - 90px); overflow-y: auto;
  background: rgba(16,22,36,.94); border: 1px solid rgba(201,184,150,.28);
  border-radius: 16px; padding: 14px; display: none;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.sky-stage .dyn-list.show { display: block; animation: skyFade .25s ease; }
.sky-stage .dyn-list.cols-2 { width: min(400px, 50%); }
.sky-stage .dyn-list.cols-3 { width: min(500px, 56%); }
.sky-stage .dyn-list.cols-4 { width: min(600px, 64%); }
.sky-stage .dyn-list .hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sky-stage .dyn-list .hd .t { font-size: 1.25rem; color: #f0d9a8; letter-spacing: 2px; }
.sky-stage .dyn-list .hd .sub { font-size: .88rem; color: #8a9bb0; }
.sky-stage .dyn-list .close { border: none; background: transparent; color: #8a9bb0; font-size: 1.45rem; cursor: pointer; }
.sky-stage .dyn-list .grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.sky-stage .dyn-list .grid.cols-2 { grid-template-columns: 1fr 1fr; }
.sky-stage .dyn-list .grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.sky-stage .dyn-list .grid.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.sky-stage .poet-btn {
  text-align: left; padding: 8px 10px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04);
  color: #d5dde8; font-size: 1rem; cursor: pointer; font-family: inherit;
}
.sky-stage .poet-btn:hover, .sky-stage .poet-btn.on {
  background: rgba(240,217,168,.12); color: #f0d9a8; border-color: rgba(240,217,168,.35);
}
.sky-stage .poet-btn small { display: block; font-size: .82rem; color: #7a8a9e; margin-top: 2px; }

/* 右侧详情卡 */
.sky-stage .panel {
  position: absolute; right: 16px; top: 16px; z-index: 28;
  width: min(440px, 44%); max-height: calc(100% - 90px); overflow-y: auto;
  background: rgba(12,18,32,.55); border: 1px solid rgba(201,184,150,.2);
  border-radius: 16px; padding: 16px 14px 14px; display: none;
}
.sky-stage .panel.show { display: block; animation: skyFade .25s ease; }
@keyframes skyFade { from { opacity: 0; } to { opacity: 1; } }
.sky-stage .panel .close { position: absolute; top: 8px; right: 10px; border: none; background: transparent; color: #8a9bb0; font-size: 1.45rem; cursor: pointer; }
.sky-stage .panel .name-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; padding-right: 24px; }
.sky-stage .panel .name-row img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(201,184,150,.65); background: #222; flex-shrink: 0;
}
.sky-stage .panel .name { font-size: 1.7rem; color: #f0d9a8; letter-spacing: 3px; margin: 0; }
.sky-stage .panel .meta { font-size: .98rem; color: #c5d0e0; margin-bottom: 10px; }
.sky-stage .panel .bio { font-size: 1.04rem; line-height: 1.75; color: #e8e0d0; margin-bottom: 8px; }
.sky-stage .panel h4 { font-size: .95rem; color: #c9b896; margin: 12px 0 6px; }
.sky-stage .panel .works { list-style: none; }
.sky-stage .panel .works li {
  font-size: 1.02rem; padding: 8px 6px; border-bottom: 1px dashed rgba(255,255,255,.1);
  color: #e8e0d0; cursor: pointer; border-radius: 6px;
}
.sky-stage .panel .works li:hover { background: rgba(255,255,255,.05); color: #f0d9a8; }
.sky-stage .panel .works li .wk-level { opacity: .6; font-size: .88rem; }
.sky-stage .panel .row { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.sky-stage .act, .sky-stage .poem-card .act {
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(201,184,150,.35);
  background: rgba(240,217,168,.1); color: #f0d9a8; font-size: .92rem; cursor: pointer; font-family: inherit;
}
a.sky-act { text-decoration: none; line-height: 1.35; }
a.sky-act:hover { background: rgba(240,217,168,.2); }

/* 认识程度标记 */
.sky-stage .panel .know-row { margin-top: 14px; align-items: center; }
.sky-stage .know-row .kn-label { font-size: .86rem; color: #8a9bb0; align-self: center; letter-spacing: 1px; }
.sky-stage .know-row .kn-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05); color: #b8c4d4; font-size: .88rem;
  cursor: pointer; font-family: inherit;
}
.sky-stage .know-row .kn-chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: inset -1.6px -1.6px 2.6px rgba(0,0,0,.55), inset 1px 1px 1.6px rgba(255,255,255,.5); }
.sky-stage .know-row .kn-chip:hover { color: #f0d9a8; }
.sky-stage .know-row .kn-chip.on {
  background: rgba(240,217,168,.2); color: #fff3d6;
  border-color: rgba(240,217,168,.75); font-weight: 600;
}
.sky-stage .know-row .kn-chip.clear { border-style: dashed; color: #7a8a9e; }
.sky-legend .lg-label { align-self: center; font-size: .84rem; color: #8a9bb0; letter-spacing: 1px; }
.sky-legend .lg-sep {
  align-self: center; width: 1px; height: 20px; margin: 0 4px;
  background: rgba(255,255,255,.16);
}

/* 搜索框 */
.sky-search { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 32; width: clamp(190px, 40%, 330px); }
.sky-search input {
  width: 100%; box-sizing: border-box; padding: 8px 30px 8px 13px;
  border-radius: 999px; border: 1px solid rgba(201,184,150,.35);
  background: rgba(9,14,26,.85); color: #f0d9a8; font-family: inherit; font-size: .95rem; outline: none;
}
.sky-search input::placeholder { color: #7a8a9e; }
.sky-search .clr {
  position: absolute; right: 9px; top: 4px; border: none; background: transparent;
  color: #8a9bb0; font-size: 1.2rem; line-height: 1.4; cursor: pointer; display: none;
}
.sky-search.has .clr { display: block; }
.sky-search .res {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: 46vh; overflow-y: auto;
  background: rgba(12,18,32,.97); border: 1px solid rgba(201,184,150,.28); border-radius: 14px;
  padding: 6px; display: none; box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.sky-search .res.show { display: block; }
.sky-search .res .r {
  display: block; width: 100%; text-align: left; padding: 7px 9px; border: none; border-radius: 9px;
  background: transparent; color: #e8e0d0; font-family: inherit; font-size: .95rem; cursor: pointer;
}
.sky-search .res .r:hover { background: rgba(240,217,168,.14); }
.sky-search .res .r .t { color: #f0d9a8; }
.sky-search .res .r .s { display: block; font-size: .82rem; color: #8a9bb0; }
.sky-search .res .r .p { display: block; font-size: .86rem; color: #b8c4d4; margin-top: 2px; }
.sky-search .res .r em { font-style: normal; color: #ff9ecd; }
.sky-search .res .empty { padding: 10px; font-size: .9rem; color: #8a9bb0; text-align: center; }
@media (max-width: 640px) {
  .sky-search { left: 10px; right: 10px; transform: none; width: auto; }
}

/* 站内视频播放器（不离开本页） */
.sky-stage .sky-video-mask {
  position: absolute; inset: 0; background: rgba(5,8,15,.86); z-index: 46;
  display: none; align-items: center; justify-content: center; padding: 12px;
}
.sky-stage .sky-video-mask.show { display: flex; }
.sky-stage .sky-video-card {
  /* 高度受限时按 16:9 反推宽度，尽量把画面撑满；宽屏上限 1280 */
  width: min(1600px, 98%, calc((100vh - 184px) * 1.7778));
  background: #101728; border: 1px solid rgba(201,184,150,.35);
  border-radius: 16px; overflow: hidden; box-shadow: 0 18px 60px rgba(0,0,0,.6);
}
.sky-stage .sky-video-card .hd {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sky-stage .sky-video-card .hd .t {
  flex: 1 1 auto; min-width: 0; font-size: 1rem; color: #f0d9a8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sky-stage .sky-video-card .hd .out {
  flex: none; font-size: .84rem; color: #a9b6cc; text-decoration: none;
  border: 1px solid rgba(201,184,150,.3); border-radius: 999px; padding: 4px 10px;
}
.sky-stage .sky-video-card .hd .out:hover { color: #f0d9a8; background: rgba(240,217,168,.12); }
.sky-stage .sky-video-card .hd .x {
  flex: none; border: none; background: transparent; color: #8a9bb0;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.sky-stage .sky-video-card .frame { position: relative; width: 100%; padding-top: 56.25%; background: #000; }
.sky-stage .sky-video-card .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 详情弹窗（诗歌全文 / 历史事迹） */
.sky-stage .poem-mask {
  position: absolute; inset: 0; background: rgba(5,8,15,.72); z-index: 40;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.sky-stage .poem-mask.show { display: flex; }
.sky-stage .poem-card {
  background: #121a2c; border: 1px solid rgba(201,184,150,.35); border-radius: 18px;
  max-width: min(620px, 92%); width: 100%; max-height: 88%; overflow-y: auto;
  position: relative; padding: 28px 24px 22px;
}
.sky-stage .poem-card .x { position: absolute; top: 10px; right: 12px; border: none; background: transparent; color: #8a9bb0; font-size: 1.55rem; cursor: pointer; }
.sky-stage .poem-card .t { text-align: center; font-size: 1.75rem; color: #f0d9a8; letter-spacing: 4px; margin-bottom: 6px; }
.sky-stage .poem-card .m { text-align: center; font-size: .98rem; color: #8a9bb0; margin-bottom: 16px; }
.sky-stage .poem-card .body { font-size: 1.3rem; line-height: 2.1; color: #e8e0d0; white-space: pre-wrap; text-align: center; padding: 8px; }
.sky-stage .poem-card .acts { display: flex; justify-content: center; margin-top: 8px; }
