.hall-progress {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(74px, 1fr);
  align-items: stretch;
  border: 3px solid #211c28;
  border-top: 0;
  background: linear-gradient(165deg, #514957, #2e2937 55%, #403947);
  color: #f4eedf;
  box-shadow: inset 0 1px #8e8492;
}
.hall-progress__case { position: relative; min-width: 0; align-self: center; margin: 12px 0 12px clamp(8px, 2vw, 18px); }
.hall-progress__track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #17151c;
  border-radius: 5px;
  background: #332e3d;
  box-shadow: 0 1px #9e95a2, 0 -1px 2px #18151d;
}
.hall-progress__cell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: clamp(35px, 5vw, 53px);
  background: repeating-linear-gradient(120deg, transparent 0 9px, #d8cde00e 9px 10px),
              linear-gradient(0deg, #47404d, #2f2939 35%, #514959 80%, #716777);
  box-shadow: inset 0 2px 3px #14101977, inset 0 -2px 4px #181120aa;
}
.hall-progress__cell + .hall-progress__cell { border-inline-start: 1px solid #bcb1c060; }
.hall-progress__cell::before {
  content: ''; position: absolute; inset: 50% 3px auto; height: 1px;
  background: linear-gradient(90deg, transparent, #dcd6e589 35% 65%, transparent);
}
.hall-progress__seal {
  position: absolute; left: 50%; top: 50%; width: 13px; height: 13px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid #c5bbcf8c; background: #514959; box-shadow: 0 0 0 3px #bdb1c426;
}
.hall-progress__seal::after { content: ''; position: absolute; inset: 3px; background: #d8cfde; }
.hall-progress__fill {
  position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--fill));
  background: linear-gradient(180deg, #fff0aa, #dbac51 18%, #986435 59%, #bb8b49);
  transition: transform 850ms ease-out;
}
.hall-progress[data-mode="ComingSoon"] .hall-progress__track {
  gap: clamp(3px, .6vw, 7px); padding: 4px;
  background: linear-gradient(#18151e, #292431 55%, #17151b);
  border-color: #100e14; box-shadow: inset 0 0 0 1px #665e6c, 0 1px #807587;
}
.hall-progress[data-mode="ComingSoon"] .hall-progress__cell {
  display: grid; grid-template-rows: 1fr auto; justify-items: center;
  height: clamp(45px, 5vw, 58px); padding: 0 0 4px; box-sizing: border-box;
  border: 0; box-shadow: none;
  background: linear-gradient(155deg, #e1d8d2, #a39aa7 32%, #62596a 52%, #38303f 70%, #948792);
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
.hall-progress__plate {
  position: absolute; inset: 2px; clip-path: inherit;
  background:
    linear-gradient(125deg, transparent 20%, #cec1ca26 34%, transparent 48%),
    repeating-linear-gradient(0deg, transparent 0 2px, #b4a4be0d 2px 3px),
    linear-gradient(170deg, #524859, #322c39 55%, #211d28);
}
.hall-progress__plate::after {
  content: ''; position: absolute; inset: 4px;
  border-top: 1px solid #d3c9d042; border-bottom: 1px solid #96889630;
}
.hall-progress__lock {
  position: relative; align-self: end; margin-bottom: 3px;
  width: clamp(13px, 1.7vw, 18px); height: clamp(10px, 1.3vw, 13px); border-radius: 2px;
  background: linear-gradient(150deg, #e6ded2, #b6a8ae 68%, #938494);
  box-shadow: inset 0 1px #fff9ed, 0 2px 2px #141016;
}
.hall-progress__lock::before {
  content: ''; position: absolute; bottom: 100%; left: 19%; width: 62%; height: 77%;
  box-sizing: border-box; border: 2px solid #c9bdc2; border-bottom: 0; border-radius: 8px 8px 0 0;
}
.hall-progress__lock::after {
  content: ''; position: absolute; inset: 24% 35% 18%; background: #403745;
  clip-path: polygon(25% 0, 75% 0, 100% 27%, 92% 48%, 65% 63%, 78% 100%, 22% 100%, 35% 63%, 8% 48%, 0 27%);
}
.hall-progress__cell small.hall-progress__engraving {
  position: relative; inset: auto; background: transparent; color: #e3d5c8;
  font: bold clamp(9px, 1.1vw, 11px)/1 Georgia, serif; text-shadow: 0 1px #0f0c13;
}
.hall-progress__mist { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 0 0 var(--fill)); transition: clip-path 850ms ease-out; }
/* Cloud textures adapted from https://github.com/danielstuart14/CSS_FOG_ANIMATION */
.hall-progress[data-mode="ComingSoon"] .hall-progress__mist { display: none; }
.hall-progress[data-mode="Active"] .hall-progress__mist::before {
  content: ''; position: absolute; inset: -35% -45%;
  background: url('../img/hall-mist-1.webp') 40% 47% / 320px auto;
  animation: hall-cloud-current 19s ease-in-out infinite alternate;
}
.hall-progress__cloudbank {
  position: absolute; z-index: 2; inset: -56px -14px -35px;
  pointer-events: none;
  /* Only the outer wisps fade. The moving banks cross the track and its frame. */
  mask-image: linear-gradient(to right, transparent, black 4% 95%, transparent),
              linear-gradient(to bottom, transparent, black 22% 37%, #0006 54%, #0008 68%, #000e 77%, transparent);
  mask-composite: intersect;
  overflow: hidden;
}
.hall-progress__cloudbank i {
  position: absolute; inset: 0 -12%; pointer-events: none;
  background: url('../img/hall-mist-2.webp') 40% 43% / clamp(370px, 55vw, 670px) auto repeat-x;
  mask-image: radial-gradient(ellipse 39% 44% at 33% 58%, black 23%, transparent 100%),
              radial-gradient(ellipse 29% 57% at 77% 47%, black 32%, transparent 100%);
  animation: hall-cloud-current 24s -9s ease-in-out infinite alternate;
}
.hall-progress__cloudbank i:nth-child(2) {
  background: url('../img/hall-mist-1.webp') 71% 59% / clamp(290px, 41vw, 470px) auto repeat-x;
  mask-image: radial-gradient(ellipse 33% 52% at 29% 44%, black 16%, transparent),
              radial-gradient(ellipse 34% 47% at 63% 65%, black 30%, transparent);
  animation: hall-cloud-billow 16s -6s ease-in-out infinite alternate-reverse;
}
.hall-progress__cloudbank i:nth-child(3) {
  background-position: 10% 71%; background-size: clamp(220px, 32vw, 370px) auto;
  mask-image: radial-gradient(ellipse 28% 35% at 58% 34%, black 15%, transparent),
              radial-gradient(ellipse 26% 42% at 16% 69%, black 15%, transparent);
  animation: hall-cloud-billow 12s -8s ease-in-out infinite alternate;
}
.hall-progress__cloudbank i:nth-child(4) {
  inset: -4% -9% 0; background-image: url('../img/hall-mist-1.webp');
  background-position: 23% 32%; background-size: clamp(300px, 54vw, 640px) auto;
  mask-image: radial-gradient(ellipse 27% 36% at 24% 61%, transparent 55%, #000d 72%, transparent 92%),
              radial-gradient(ellipse 31% 41% at 75% 39%, transparent 49%, #000c 66%, transparent 90%);
  animation: hall-cloud-curl 14s -4s ease-in-out infinite alternate;
}
@keyframes hall-cloud-curl {
  from { transform: translate(-5%, 1%) skewX(-14deg) scaleY(.85); opacity: .45; }
  55% { opacity: 1; }
  to { transform: translate(7%, -4%) skewX(9deg) scaleY(1.15); opacity: .7; }
}
@keyframes hall-cloud-current {
  from { transform: translate3d(-6%, 3%, 0) scaleY(.92); }
  to { transform: translate3d(7%, -2%, 0) scaleY(1.11); }
}
@keyframes hall-cloud-billow {
  from { transform: translate3d(-5%, 6%, 0) scale(1,.92); opacity: .68; }
  to { transform: translate3d(6%, -5%, 0) scale(1.05,1.13); opacity: 1; }
}
.hall-progress__status {
  min-width: 0; display: grid; align-content: center; justify-items: center; gap: 4px;
  margin-inline: 6px; text-align: center;
}
.hall-progress__status strong { font: 850 clamp(.85rem, 2.5vw, 1.4rem)/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .07em; }
.hall-progress__status span { color: #eac778; font: 700 .65rem/1 monospace; letter-spacing: .24em; padding-left: .24em; }
.hall-progress[data-mode="Active"] .hall-progress__track { grid-template-columns: repeat(6, minmax(88px, 1fr)); overflow-x: auto; scrollbar-width: thin; }
.hall-progress[data-mode="Active"] .hall-progress__cell { height: 57px; }
.hall-progress[data-mode="Active"] .hall-progress__cell::before, .hall-progress[data-mode="Active"] .hall-progress__seal { top: 32%; }
.hall-progress__cell small {
  position: absolute; inset: auto 0 0; color: #fff9ef; text-align: center;
  font: 650 .67rem/1.65 var(--f-display); background: #2d2638db; font-variant-numeric: tabular-nums;
}
.hall-progress[data-mode="Active"] .hall-progress__status strong { font-size: clamp(.75rem, 2vw, 1.2rem); letter-spacing: 0; overflow-wrap: anywhere; }
.hall-progress__gain { position: absolute; left: 50%; top: 0; z-index: 1; translate: -50% 0; color: #fff2c2; background: #3d3349; border-radius: 12px; font: 750 .85rem/1.4 var(--f-display); pointer-events: none; opacity: 0; }
.hall-progress__gain:not(:empty) { padding: 0 .55em; }
@media (max-width: 420px) {
  .hall-progress__seal { width: 9px; height: 9px; }
  .hall-progress__seal::after { inset: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .hall-progress[data-mode="Active"] .hall-progress__mist::before,
  .hall-progress[data-mode="ComingSoon"] .hall-progress__cloudbank i { animation: none; }
  .hall-progress__fill, .hall-progress__mist { transition: none; }
}
