/* v0.16: presentation borrowed from classic mobile board games — a loading card with the city's art,
   a guide and rotating tips; the roll result shown large over the board; die buttons colour-matched
   to the numbered step discs the board draws while you choose. */
.world-loader {
  padding: 0;
  overflow: hidden;
  width: min(420px, calc(100% - 40px));
  border-radius: 20px;
  white-space: normal;
  transition:
    opacity 0.42s ease,
    transform 0.42s ease;
}
.world-loader.done {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  pointer-events: none;
}
.world-loader .loader-art {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.world-loader .loader-body {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 18px 16px;
  text-align: left;
}
.world-loader .loader-guide {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 2px solid var(--mm-gold);
  background: var(--mm-mint);
  flex-shrink: 0;
}
.world-loader .loader-body > div {
  flex: 1;
  min-width: 0;
}
.world-loader .loader-body b {
  display: block;
  font-size: 15px;
  color: var(--mm-emerald-deep);
  margin-bottom: 8px;
}
.world-loader .loader-bar {
  height: 8px;
  border-radius: 6px;
  background: var(--mm-line);
  overflow: hidden;
  position: relative;
}
.world-loader .loader-bar i {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--mm-emerald), #58c9a8);
  transition: width 0.35s ease;
}
.world-loader .loader-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: loader-shine 1.6s infinite;
}
@keyframes loader-shine {
  to {
    transform: translateX(100%);
  }
}
.world-loader .loader-tip {
  display: block;
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--mm-secondary);
  min-height: 2.6em;
}
.world-loader.failed .loader-tip {
  color: #a04a2e;
  font-weight: 600;
}
.reduce-motion .world-loader .loader-bar::after {
  animation: none;
}
@media (max-width: 900px) {
  .world-loader {
    width: min(360px, calc(100% - 28px));
    font-size: 12px;
  }
  .world-loader .loader-art {
    height: 110px;
  }
  .world-loader .loader-body {
    padding: 12px 14px 13px;
  }
}
/* Roll result over the board. */
.roll-result {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 12px 28px 14px;
  border-radius: 999px;
  background: rgba(255, 250, 236, 0.96);
  border: 2px solid var(--mm-gold);
  box-shadow: 0 14px 40px rgba(18, 63, 56, 0.28);
  color: var(--mm-emerald-deep);
  transition:
    transform 0.28s cubic-bezier(0.2, 1.4, 0.4, 1),
    opacity 0.25s;
}
.roll-result.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.roll-result b {
  font-size: 54px;
  line-height: 1;
  font-weight: 800;
  font-family: Poppins, Prompt, sans-serif;
}
.roll-result span {
  font-size: 30px;
  color: var(--mm-gold-deep);
}
.roll-result small {
  flex-basis: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--mm-secondary);
}
/* Die buttons carry the same tone as their step discs on the board. */
.die-choice {
  position: relative;
}
.die-tone {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #087d6c;
  box-shadow: 0 0 0 2px #fffcf3;
}
.die-choice[data-die="1"] .die-tone {
  background: #d99a2b;
}
.die-choice:disabled .die-tone {
  opacity: 0.35;
}
/* District set progress in the property sheet, and the centre-screen callout. */
.district-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--mm-mint);
  color: var(--mm-emerald-deep);
  font-size: 12px;
  line-height: 1.5;
}
.district-progress > i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  background: #1f8f7a;
}
.district-progress[data-district="D02"] > i {
  background: #d99a2b;
}
.district-progress[data-district="D03"] > i {
  background: #c8674d;
}
.district-progress > span {
  flex: 1;
  min-width: 0;
}
.district-progress > b {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.district-progress em {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--mm-emerald);
  background: transparent;
}
.district-progress em.got {
  background: var(--mm-emerald);
}
.district-progress.done {
  background: #fff3c4;
  color: #6b4a00;
}
.district-progress.done > i,
.district-progress.done em.got {
  background: #c48f3c;
  border-color: #c48f3c;
}
#callout {
  position: fixed;
  left: 50%;
  top: 38%;
  z-index: 190;
  width: max-content;
  max-width: min(520px, calc(100% - 40px));
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  padding: 16px 34px 18px;
  border-radius: 22px;
  background: linear-gradient(#fffaec, #fff1cf);
  border: 2px solid var(--mm-gold);
  box-shadow: 0 18px 50px rgba(18, 63, 56, 0.3);
  transition:
    transform 0.32s cubic-bezier(0.2, 1.4, 0.4, 1),
    opacity 0.25s;
}
#callout.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
#callout b {
  display: block;
  font-size: 30px;
  line-height: 1.25;
  color: var(--mm-emerald-deep);
  font-family: Poppins, Prompt, sans-serif;
}
#callout small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--mm-secondary);
}
@media (max-width: 900px) {
  #callout b {
    font-size: 24px;
  }
}
