/* Compact annual recap, presented after each completed New Year's Eve. */
.game-shell #game.game-page.first-volume-page{
 position:relative;display:grid;grid-template-columns:minmax(0,1fr);
 place-items:center;isolation:isolate;
 box-sizing:border-box;width:100%;height:100%;
 margin:0;padding:clamp(8px,2cqh,22px);
 overflow:hidden;background:#252b2c;
}
.game-shell #game.first-volume-page > .scene-background{
 position:absolute;inset:0;z-index:0;opacity:.92;
}
.game-shell #game.first-volume-page > .scene-background::after{
 content:'';position:absolute;inset:0;pointer-events:none;
 background:linear-gradient(90deg,rgba(19,24,27,.72),rgba(27,28,31,.42) 48%,rgba(19,24,27,.72));
}
.game-shell #game.first-volume-page > .first-volume-paper{
 position:relative;z-index:1;grid-column:1;
 display:flex;flex-direction:column;
 justify-self:center;align-self:center;
 width:min(760px,88%);max-width:100%;max-height:88%;
 min-width:0;min-height:0;box-sizing:border-box;
 margin:0 auto;padding:clamp(11px,1.65cqw,21px);
 border:1px solid rgba(174,137,84,.9);border-radius:9px;
 background:linear-gradient(135deg,rgba(253,246,231,.97),rgba(239,226,200,.97));
 box-shadow:0 14px 46px rgba(10,13,15,.52),inset 0 0 0 3px rgba(255,251,236,.52);
 color:#493a2b;
}
.first-volume-scroll{
 min-height:0;min-width:0;flex:1 1 auto;overflow:auto;
 overscroll-behavior:contain;scrollbar-width:thin;
 padding:clamp(8px,1.3cqw,17px) clamp(8px,2cqw,23px);
 position:relative;z-index:1;
}
.first-volume-heading{
 display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;
 padding:2px 0 15px;border-bottom:1px solid rgba(144,106,62,.32);
}
.first-volume-heading small,.first-volume-heading span{
 display:block;font-size:var(--font-note);color:#897356;letter-spacing:.04em;
}
.first-volume-heading span{text-align:right;}
.first-volume-heading h2{
 margin:0;font-family:var(--palace-story-font,serif);
 font-size:clamp(22px,2.6cqw,34px);line-height:1.25;
 color:#724629;letter-spacing:.12em;font-weight:650;text-align:center;
 white-space:nowrap;
}
.first-volume-section{
 margin:15px 0 0;padding:0 0 15px;
 border-bottom:1px solid rgba(144,106,62,.18);
}
.first-volume-section:last-child{border-bottom:0;padding-bottom:4px;}
.first-volume-section h3{
 display:flex;align-items:center;gap:8px;
 margin:0 0 9px;font-size:var(--font-body);font-weight:650;
 color:#77492d;letter-spacing:.05em;
}
.first-volume-section h3::before{
 content:'◆';font-size:.55em;color:#a78353;flex:none;
}
.first-volume-stats{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
 padding:6px 0;gap:0;
}
.first-volume-stat{
 min-width:0;display:flex;flex-direction:column;
 align-items:center;justify-content:center;gap:5px;
 padding:3px clamp(4px,1cqw,12px);text-align:center;
}
.first-volume-stat + .first-volume-stat{border-left:1px solid rgba(157,119,68,.27);}
.first-volume-stat small{font-size:var(--font-note);color:#847058;}
.first-volume-stat strong{
 font-size:var(--font-body);color:#60422e;font-weight:650;
 overflow-wrap:anywhere;
}
.first-volume-verdict{
 margin:0;line-height:1.75;font-size:var(--font-story);
 color:#604b39;overflow-wrap:anywhere;
}
.first-volume-actions{
 position:relative;z-index:2;display:flex;flex:none;
 justify-content:center;align-items:center;gap:12px;
 padding:12px 10px 0;margin:0;
 border-top:1px solid rgba(144,106,62,.25);
}
.first-volume-actions button{
 min-height:36px;min-width:112px;
 margin:0;padding:6px 16px;
 border:1px solid #b69b74;border-radius:6px;
 background:#f9f3e5;color:#60452e;font-size:var(--font-body);
}
.first-volume-actions button[data-first-volume-close]{background:#dcc8a5;border-color:#a7895e;}
.first-volume-page > .global-save-entry{display:none;}
@media (orientation:landscape) and (max-height:500px){
 .game-shell #game.game-page.first-volume-page{padding:7px;}
 .game-shell #game.first-volume-page > .first-volume-paper{
  width:min(800px,96%);max-height:100%;padding:7px 11px;
 }
 .first-volume-scroll{padding:4px 12px;}
 .first-volume-heading{padding-bottom:7px;}
 .first-volume-heading h2{font-size:var(--font-heading);}
 .first-volume-section{margin-top:8px;padding-bottom:7px;}
 .first-volume-section h3{margin-bottom:5px;}
 .first-volume-stat{gap:3px;padding:2px 5px;}
 .first-volume-actions{padding-top:5px;}
 .first-volume-actions button{min-height:30px;padding:4px 12px;}
}
@media (orientation:portrait) and (max-width:700px){
 .game-shell #game.first-volume-page > .first-volume-paper{width:100%;max-height:94%;}
 .first-volume-heading{grid-template-columns:1fr;gap:3px;text-align:center;}
 .first-volume-heading span{text-align:center;}
 .first-volume-stats{grid-template-columns:repeat(3,minmax(0,1fr));}
}
.player-annual-replay{
 margin:4px 0 9px;padding:7px 14px;max-width:100%;
 border:1px solid #b9a17b;border-radius:5px;
 background:#f0e1c5;color:#67452b;font-size:var(--font-body);
}

/* 天下篇 · 第一卷：沿用镇北营的最后一幅场景，卷末题笺居中。
   专属结尾，不影响每年的岁末小记与日常结束页。 */
html body[data-game='palace'].game-shell #game.game-page.tianxia-terminal-page{
 position:relative;isolation:isolate;
 display:grid;grid-template-columns:minmax(0,1fr);place-items:center;
 width:100%;height:100%;box-sizing:border-box;
 margin:0;padding:clamp(8px,2.3cqh,20px);overflow:hidden;
 background:#283538;color:#533e2a;font-family:var(--palace-story-font,serif);
}
html body[data-game='palace'].game-shell #game.tianxia-terminal-page > .tianxia-terminal-background{
 position:absolute;inset:0;z-index:0;opacity:.94;pointer-events:none;
}
html body[data-game='palace'].game-shell #game.tianxia-terminal-page > .tianxia-terminal-background::after{
 content:'';position:absolute;inset:0;pointer-events:none;
 background:linear-gradient(90deg,rgba(20,27,29,.56),rgba(27,28,30,.20) 46%,rgba(19,25,27,.58)),
            linear-gradient(180deg,rgba(18,24,27,.20),transparent 28%,rgba(18,24,27,.42));
}
html body[data-game='palace'].game-shell #game.tianxia-terminal-page > .tianxia-terminal-content{
 position:relative;z-index:1;isolation:isolate;
 box-sizing:border-box;display:flex;flex-direction:column;
 justify-content:center;align-items:center;
 gap:clamp(12px,3cqh,26px);
 width:min(68%,690px);min-width:0;min-height:56%;max-height:86%;
 margin:0;padding:clamp(15px,3.4cqh,34px) clamp(18px,3.8cqw,46px);
 border:1px solid rgba(184,149,98,.89);border-radius:8px;
 background:linear-gradient(135deg,rgba(255,252,239,.94),rgba(237,221,193,.95));
 box-shadow:0 16px 42px rgba(9,17,19,.48),inset 0 0 0 4px rgba(255,250,232,.65);
 text-align:center;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;
}
html body[data-game='palace'].game-shell #game.tianxia-terminal-page > .tianxia-terminal-content::before{
 content:'';position:absolute;inset:9px;z-index:0;pointer-events:none;
 border:1px solid rgba(165,125,74,.32);border-radius:3px;
}
#game.tianxia-terminal-page .tianxia-terminal-heading{
 position:relative;z-index:1;display:flex;flex-direction:column;
 align-items:center;gap:clamp(5px,1.5cqh,14px);width:100%;min-width:0;
}
#game.tianxia-terminal-page .tianxia-terminal-kicker{
 color:#93714f;font-size:clamp(12px,2.25cqh,17px);
 line-height:1.4;font-weight:500;letter-spacing:.21em;
}
#game.tianxia-terminal-page .tianxia-terminal-heading > h1{
 margin:0;padding:0;color:#60462e;font-weight:600;
 font-size:clamp(28px,6.6cqh,54px);letter-spacing:.24em;
 text-indent:.24em;line-height:1.24;
}
#game.tianxia-terminal-page .tianxia-terminal-divider{
 display:flex;justify-content:center;align-items:center;
 width:min(66%,270px);height:10px;flex:none;
}
#game.tianxia-terminal-page .tianxia-terminal-divider::before,
#game.tianxia-terminal-page .tianxia-terminal-divider::after{
 content:'';height:1px;flex:1;
 background:linear-gradient(90deg,transparent,rgba(159,119,68,.63));
}
#game.tianxia-terminal-page .tianxia-terminal-divider::after{
 transform:scaleX(-1);
}
#game.tianxia-terminal-page .tianxia-terminal-divider{
 background:radial-gradient(closest-side,#b69461 75%,transparent 80%) center/6px 6px no-repeat;
 gap:9px;
}
#game.tianxia-terminal-page .tianxia-terminal-last-line{
 margin:0;color:#785e45;font-size:clamp(14px,2.7cqh,21px);
 letter-spacing:.09em;line-height:1.6;
}
#game.tianxia-terminal-page .tianxia-terminal-actions{
 position:relative;z-index:1;display:flex;justify-content:center;
 align-items:center;flex-wrap:wrap;gap:clamp(10px,1.6cqw,21px);
 width:100%;margin:0;padding:clamp(4px,.8cqh,10px) 0 0;
}
html body[data-game='palace'].game-shell #game.tianxia-terminal-page .tianxia-terminal-actions > button{
 display:inline-flex;align-items:center;justify-content:center;
 box-sizing:border-box;min-width:clamp(98px,12cqw,150px);
 min-height:clamp(32px,5.7cqh,43px);margin:0;padding:5px clamp(11px,1.8cqw,24px);
 border:1px solid #ae8d60;border-radius:7px;
 background:linear-gradient(180deg,#f9f0dc,#e8d6b6);
 box-shadow:0 2px 7px rgba(89,63,36,.12);
 color:#60452c;font:inherit;font-size:var(--font-body);
 letter-spacing:.05em;cursor:pointer;
}
html body[data-game='palace'].game-shell #game.tianxia-terminal-page .tianxia-terminal-actions > button[data-tianxia-terminal-save]{
 background:linear-gradient(180deg,#dfc99f,#c7a778);
 border-color:#a27a45;color:#3f2c19;font-weight:600;
}
html body[data-game='palace'].game-shell #game.tianxia-terminal-page .tianxia-terminal-actions > button:is(:hover,:focus-visible){
 border-color:#866337;filter:brightness(1.04);
}
html body[data-game='palace'].game-shell #game.tianxia-terminal-page .tianxia-terminal-actions > button:focus-visible{
 outline:2px solid #826238;outline-offset:3px;
}
@media (orientation:landscape) and (max-height:450px){
 html body[data-game='palace'].game-shell #game.tianxia-terminal-page > .tianxia-terminal-content{
  width:min(72%,690px);min-height:64%;max-height:92%;
  gap:clamp(8px,2.5cqh,14px);padding:clamp(11px,2.7cqh,18px) 18px;
 }
 #game.tianxia-terminal-page .tianxia-terminal-heading{gap:clamp(3px,.9cqh,8px);}
 #game.tianxia-terminal-page .tianxia-terminal-heading > h1{font-size:clamp(24px,6.6cqh,36px);}
}
@media (orientation:portrait) and (max-width:700px){
 html body[data-game='palace'].game-shell #game.tianxia-terminal-page > .tianxia-terminal-content{
  width:min(92%,570px);max-height:88%;
 }
}
