/* 无尽祭坛玩家页：沿用已确认的深墨绿底、灰绿边框、柔金文字（甲方 Demo demo.css）。不改动其他玩法页。 */

/* Match the supplied 星命试炼 palette for the player view. */
.altar-view,.altar-view .altar-main,body.altar-open .modal-mask .modal{
  --bg:#0b1010;
  --card:#151b1a;
  --pop:#151b1a;
  --fg:#e2dfd2;
  --mfg:#99a095;
  --muted:#212b28;
  --line:#34382d;
  --acc:#29312a;
  --gold:#c5a46a;
  --gold-hi:#e8cf98;
  --gold-lo:#8b744a;
}
.altar-view{background:transparent}
.altar-view .sky{
  background:radial-gradient(ellipse at 95% 100%,#171e1a,transparent 48%),
    radial-gradient(ellipse at 48% 0%,rgba(197,164,106,.045),transparent 58%),var(--bg);
}
.altar-view .panel{
  background:linear-gradient(180deg,#151b1a,#111716);
  border:1px solid var(--line);
}
.altar-view :is(.arena,.rec-row),body.altar-open .modal-mask .rec-row{border:1px solid var(--line)}
.altar-view .rec-row,body.altar-open .modal-mask .rec-row{background:#101615}
.altar-view .muted,body.altar-open .modal-mask .muted{color:var(--mfg)}
.altar-view .empty,body.altar-open .modal-mask .empty{
  border:1px solid var(--line);background:#111716;color:var(--mfg);
}
.altar-view .field,body.altar-open .modal-mask .field{background:#0d1313;border-color:var(--line)}
.altar-view .btn:not(.gold):not(.danger),body.altar-open .modal-mask .btn:not(.gold):not(.danger){
  background:#19211d;border-color:var(--line);
}
.altar-view .btn.ghost:not(.gold),body.altar-open .modal-mask .btn.ghost:not(.gold){background:transparent}
.altar-view .btn:not(.gold):not(.danger):hover:not(:disabled),body.altar-open .modal-mask .btn:not(.gold):not(.danger):hover:not(:disabled){
  background:var(--acc);border-color:var(--gold-lo);
}
.altar-view .btn.gold,body.altar-open .modal-mask .btn.gold{
  background:linear-gradient(180deg,#d6b77c,#a88549);border-color:#d4b87f;color:#16130c;
}
.altar-view .btn.gold:hover:not(:disabled),body.altar-open .modal-mask .btn.gold:hover:not(:disabled){
  background:linear-gradient(180deg,#e4c78f,#b89455);
}
.altar-view .chip,body.altar-open .modal-mask .chip{border-color:var(--line);background:#141b17}
.altar-view .chip.gold,body.altar-open .modal-mask .chip.gold{border-color:var(--gold-lo);color:var(--gold-hi)}
.altar-view .dungeon-prize-pool,
.altar-encounter .dungeon-prize-pool{
  border:1px solid #927746a3!important;
  background:linear-gradient(110deg,#0a1511f5,#14221bed 48%,#0a1511f5)!important;
  color:#d4ba7e!important;
  box-shadow:0 2px 10px #02060475,inset 0 0 0 2px #070e0c,inset 0 0 17px #75613412;
}
.altar-view .dungeon-prize-pool :is(.pool-label,.pool-unit),
.altar-encounter .dungeon-prize-pool :is(.pool-label,.pool-unit){
  color:#d4ba7e!important;
  font:10px/1 Georgia,"Times New Roman",serif;
  letter-spacing:.09em;
}
.altar-view .dungeon-prize-pool .pool-label,
.altar-encounter .dungeon-prize-pool .pool-label{
  font-size:clamp(10px,1.3cqw,12px);
  letter-spacing:.16em;
  color:#b9a378!important;
}
.altar-view .dungeon-prize-pool strong,
.altar-encounter .dungeon-prize-pool strong,
.altar-view .dungeon-prize-pool #pool-value,
.altar-encounter .dungeon-prize-pool #pool-value{
  font:600 clamp(17px,2.25cqw,22px)/1 Georgia,"Times New Roman",serif!important;
  color:#f1d99a!important;
  font-variant-numeric:tabular-nums;
  text-shadow:0 0 12px #bfa15b2e;
  border:0!important;
  background:none!important;
  padding:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}

button:focus-visible,a:focus-visible,select:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* 以下布局按甲方 Demo demo.css 抄写，并用 .altar-view / body.altar-open 提高优先级，避免被 player.html 后置样式盖掉。 */
.altar-view .altar-headline{
  margin-bottom:1.125rem!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-areas:"title clock" "stats stats"!important;
  align-items:end!important;
  gap:.6rem .75rem!important;
}
.altar-view .altar-headline .h1{line-height:1.2;margin-bottom:.3rem}
.altar-view .altar-headline-title{grid-area:title;min-width:7.5rem}
.altar-view .altar-clock{grid-area:clock;display:grid;text-align:right;gap:.1rem}
.altar-view .altar-buy-stats{
  grid-area:stats;
  grid-column:1/-1;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  min-width:0;
  align-items:stretch;
  padding:1rem .25rem;
  border:1px solid #756443;
  border-radius:2px;
  background:rgba(8,14,13,.72)
}
.altar-view .altar-buy-stat{min-width:0;padding:.2rem .28rem;text-align:center;border-right:1px solid rgba(197,164,106,.15)}
.altar-view .altar-buy-stat:last-child{border-right:0}
.altar-view .altar-buy-stat .k{
  display:flex!important;
  align-items:center;
  justify-content:center;
  min-height:2.6em;
  margin:0 0 .28rem;
  color:#a1aaa4;
  font-size:.7rem;
  line-height:1.3;
  letter-spacing:.02em;
  text-align:center;
  white-space:normal!important;
  overflow:visible
}
.altar-view .altar-buy-stat .v{
  display:block!important;
  color:#e8cf98;
  font:400 1.85rem/1.15 Georgia,"Times New Roman",serif!important;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
  text-align:center
}
.altar-view .altar-invite-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;margin-top:.35rem}
.altar-view .altar-invite-actions .btn{white-space:nowrap}
.altar-view .altar-challenge-board{margin-top:.75rem}
.altar-view .altar-hist-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 7rem minmax(9.5rem,auto)!important;
  align-items:end!important;
  gap:.35rem .75rem!important;
  margin-bottom:.55rem
}
.altar-view .altar-hist-head .h2{margin:0}
.altar-view .altar-hist-sum-label{text-align:right;white-space:nowrap}
.altar-view .altar-hist-mine-label{text-align:right;white-space:nowrap}
.altar-view .altar-clock strong{font:1.5rem/1.2 Georgia,"Times New Roman",serif;color:var(--gold-hi)}
.altar-view .altar-grid{grid-template-rows:auto;align-items:start}
.altar-view .altar-grid>.altar-side{grid-row:auto}
.altar-view .altar-side,.altar-view .altar-content{display:grid;align-content:start;gap:1.125rem;min-width:0}
.altar-view .altar-content>.rec-panel{margin:0!important}
.altar-view .altar-content>.altar-encounter{margin:0!important}
.altar-view .altar-encounter{min-width:0}

/* FIX D：持有门票 + 大号金色数字 + 张，按钮等宽，规则列表与排行榜密度对齐 Demo */
.altar-view .altar-ticket{display:flex;align-items:baseline;gap:.55rem;margin:.55rem 0 .65rem}
.altar-view .altar-ticket strong,
.altar-view .altar-ticket strong.num{
  font:2rem/1 Georgia,"Times New Roman",serif!important;
  color:var(--gold-hi)!important;
  font-variant-numeric:tabular-nums;
}
.altar-view .row.altar-entry-buttons,.altar-view .altar-entry-buttons{display:flex!important;flex-wrap:nowrap!important;align-items:stretch!important;gap:.4rem!important;width:100%}
.altar-view .altar-entry-buttons .btn{flex:1 1 0!important;min-width:0!important;white-space:nowrap!important;padding:.48rem .4rem!important}
.altar-view .altar-pass-claim{margin-top:.5rem}
.altar-view .altar-pass-claim .btn{width:100%}
.altar-view #entry-price,.altar-view p#entry-price,
.altar-view #pass-price,.altar-view p#pass-price{margin:.45rem 0 0}
.altar-view .altar-rules{padding-left:1.05rem;margin:0 0 .85rem;display:grid;gap:.37rem}
.altar-view .altar-side,
.altar-view .altar-side>section.panel{min-width:0!important;max-width:100%}
.altar-view .altar-side>section.panel{overflow-x:hidden}
.altar-view .altar-ranking{width:100%!important;max-width:100%!important;border-collapse:collapse;margin-top:.5rem;table-layout:fixed!important}
.altar-view .altar-ranking th,.altar-view .altar-ranking td{
  padding:.32rem .16rem!important;
  border-bottom:1px solid var(--line);
  text-align:left;
  overflow:hidden;
  vertical-align:middle
}
.altar-view .altar-ranking th{font-size:.68rem!important;font-weight:400;color:var(--mfg);line-height:1.25;white-space:normal!important}
.altar-view .altar-ranking td{font-size:.74rem!important}
.altar-view .altar-ranking :is(th,td):first-child{width:12%;text-align:center;white-space:nowrap}
.altar-view .altar-ranking :is(th,td):nth-child(2){
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.altar-view .altar-ranking :is(th,td):nth-child(3),
.altar-view .altar-ranking :is(th,td):nth-child(4),
.altar-view .altar-ranking :is(th,td):nth-child(5){
  width:16%;
  text-align:right;
  font-variant-numeric:tabular-nums;
  white-space:nowrap
}
.altar-view .altar-ranking :is(th,td):nth-child(4){width:18%}
.altar-view .altar-ranking :is(th,td):nth-child(5){width:16%}
.altar-view .altar-ranking .prize-rank td:first-child,.altar-view .altar-ranking .my-rank{color:var(--gold-hi)}
.altar-view .altar-ranking .my-rank td{background:rgba(197,164,106,.1)}
.altar-view .altar-best{margin-top:.65rem}
.altar-view .altar-reward-head{display:flex!important;align-items:center!important;min-width:0}
.altar-view .altar-reward-head .h2{margin:0}

.altar-view .altar-encounter .arena-name{top:.7rem;bottom:auto;letter-spacing:.12em}
.altar-view .altar-encounter #pool{cursor:pointer;padding-inline:.9rem;max-width:90%}
.altar-view .altar-encounter #pool:not(.pool-click){cursor:default}
.altar-view .altar-encounter #pool-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.altar-view .altar-encounter #boss-health .health-track i,
.altar-view .altar-encounter .enemy-health .health-track i{width:100%}
.altar-view .altar-encounter #boss-health .health-lag,
.altar-view .altar-encounter .enemy-health .health-lag{width:100%}

/* FIX B：结算后与战斗中，回合/伤害在左，演出速度+跳过演出并排靠右，同一行 */
.altar-view .altar-encounter .arena-bar.below{
  display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
  justify-content:space-between;gap:.4rem 1rem;
  position:static;background:none;padding:.75rem 0 0;border:0;
}
.altar-view .altar-encounter .arena-bar.below .row{
  display:flex!important;flex-wrap:nowrap!important;align-items:center;
  width:auto!important;flex:0 1 auto;gap:.4rem 1rem;
}
.altar-view .altar-encounter .boss-playback{
  display:flex!important;flex-wrap:nowrap!important;align-items:center;justify-content:flex-end!important;
  gap:12px;width:auto!important;max-width:none;flex:0 0 auto;
  margin-left:auto;padding:0;
}
.altar-view .altar-encounter .combat-health-layer{z-index:9}
.altar-view .gold-text{color:var(--gold-hi)}
.altar-view .altar-result{margin-top:.875rem!important}
.altar-view .altar-result .h2{margin:0}

/* 战报弹窗：六维 + 有效属性总和横排（标签在上、数值在下）。本局卡片条仍为六维一行。 */
.altar-view .altar-attrs,
body.altar-open .altar-attrs{
  display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));margin:.6rem 0 0;
}
.altar-view .altar-attrs.altar-attrs-report,
body.altar-open .altar-attrs.altar-attrs-report{
  grid-template-columns:repeat(7,minmax(0,1fr));
}
.altar-view .altar-attrs>div,
body.altar-open .altar-attrs>div{
  padding:.35rem .5rem;border-top:1px solid var(--line);text-align:center;
  display:block;
}
.altar-view .altar-attrs dt,
body.altar-open .altar-attrs dt{color:var(--mfg);font-size:.75rem;display:block}
.altar-view .altar-attrs dd,
body.altar-open .altar-attrs dd{margin:0;color:var(--fg);font-weight:600;display:block}

/* FIX B：本局卡片是一条紧凑横条：标题 + 等级 + 六维标签与数值同一行 */
.altar-view section.panel.altar-round-card{
  margin-top:.5rem;padding:.4rem .65rem;
}
.altar-view .altar-round-card>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:.2rem 1rem}
.altar-view .altar-round-card .spread{justify-content:flex-start;gap:.5rem;flex-wrap:nowrap}
.altar-view .altar-round-card .h2{margin:0;font-size:.9rem}
.altar-view .altar-round-card .gold-text,.altar-view .altar-round-card .altar-attrs dd{font-size:.8rem}
.altar-view .altar-round-card .altar-attrs{
  display:grid!important;grid-template-columns:repeat(6,max-content);gap:.15rem .75rem;margin:0;
}
.altar-view .altar-round-card .altar-attrs>div{
  display:flex!important;align-items:baseline;gap:.25rem;padding:0;border:0;white-space:nowrap;text-align:left;
}
.altar-view .altar-round-card .altar-attrs dt,
.altar-view .altar-round-card .altar-attrs dd{display:inline;margin:0}
.altar-view .altar-encounter .battle-stage{min-height:190px}

/* FIX C：战报弹窗标题行带关闭，底部只有重播战斗，无取消 */
body.altar-open .modal-mask .modal.altar-report{
  color:var(--fg);background:var(--pop,var(--card));
  border:1px solid var(--line);
}
body.altar-open .modal-mask .modal.altar-report .modal-title{
  display:flex;justify-content:space-between;align-items:center;gap:.75rem;
  border-bottom:1px solid var(--line);padding-bottom:.55rem;margin-bottom:.75rem;
}
body.altar-open .modal-mask .modal.altar-report .modal-title .h2{margin:0}
body.altar-open .modal-mask .modal.altar-report .foot{
  display:flex;justify-content:flex-end;flex-wrap:wrap;gap:.625rem;margin-top:1.125rem;
}
body.altar-open .modal-mask .modal.altar-report .foot:empty{display:none}

.altar-dialog-form{display:grid;gap:.7rem}
.altar-dialog-form input{width:100%}
.altar-dialog-error{color:#edafa2;margin:0}
.altar-history-list{display:grid;gap:.65rem}
.altar-account-row{padding:.6rem .72rem;border:1px solid var(--line)}
.admin-rule-group{border-top:1px solid var(--line);padding-top:.68rem;display:grid;gap:.55rem}
.admin-rule-group .h2{font-size:1rem}
.altar-checks label{display:flex;gap:.35rem;align-items:center}
.altar-checks input{accent-color:var(--gold)}
.altar-topup{align-items:end}
.altar-topup label{min-width:10rem}
@media (max-width:900px){
  .altar-view .altar-grid{grid-template-columns:minmax(0,1fr);gap:1rem}
  .altar-view .altar-side,.altar-view .altar-content{display:contents}
  .altar-view .altar-side>section:first-child{order:1}
  .altar-view .altar-encounter{order:2}
  .altar-view .altar-side>section:nth-child(2),
  .altar-view .altar-side>section:nth-child(3){order:3}
  .altar-view .altar-content>.rec-panel{order:4}
}
@media (max-width:620px){
  .altar-view .altar-attrs,body.altar-open .altar-attrs,
  .altar-view .altar-attrs.altar-attrs-report,body.altar-open .altar-attrs.altar-attrs-report{grid-template-columns:repeat(3,minmax(0,1fr))}
  .altar-view .altar-round-card .altar-attrs{width:100%;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:.35rem}
  .altar-view .altar-encounter .arena-name{top:auto;bottom:.35rem;left:.48rem;font-size:.66rem}
  .altar-view .altar-headline{align-items:center;gap:.35rem}
  .altar-view .altar-clock{margin-left:0}
  .altar-view .altar-clock strong{font-size:1.2rem}
  .altar-view .altar-buy-stat .k{font-size:.66rem}
  .altar-view .altar-buy-stat .v{font-size:1.45rem}
}
@media (max-width:720px){
  .altar-view .altar-headline{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"title clock" "stats stats"!important
  }
  .altar-view .altar-headline-title{grid-area:title}
  .altar-view .altar-clock{grid-area:clock}
  .altar-view .altar-buy-stats{grid-area:stats;grid-column:1/-1}
}

/* 挑战记录：主信息 | 有效总属性数字 | 红色「本局总伤害:xxxx」。仅作用于本列表行，不改共享 .rec-row。 */
.altar-view .rec-row.altar-hist-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 7rem minmax(9.5rem,auto)!important;
  align-items:center!important;
  gap:.25rem .75rem;
}
.altar-view .rec-row.altar-hist-row .altar-hist-main{
  display:grid;
  gap:.25rem;
  min-width:0;
}
.altar-view .rec-row.altar-hist-row .altar-hist-sum{
  color:var(--fg,#e2dfd2);
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
  text-align:right;
}
.altar-view .rec-row.altar-hist-row .altar-hist-dmg{
  color:#e15b5b;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
  text-align:right;
}
