/* FR.dungeon (js/game/dungeon.js): the dungeon list and a tower of floors */
.dg-lead {
  margin: 0.4rem 0 1rem;
}
.dg-go {
  display: flex;
  margin: -0.2rem 0 1.2rem;
}
.dg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
}
.dg-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.12s;
}
.dg-card:hover {
  transform: translateY(-2px);
}
.dg-card.done {
  outline: 2px solid var(--g-coin, #e2b714);
}
.dg-card-ic {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  font-size: 2.2rem;
  line-height: 1;
}
/* every dungeon's icon fills the same square box, whatever the sprite's shape */
.dg-card-ic .ts-ico {
  width: 100%;
  height: 100%;
  max-width: none;
  vertical-align: 0;
}
.dg-card-t {
  display: flex;
  flex-direction: column;
}
.dg-card-p {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.dg-tower {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.dg-floor {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--g-radius, 0.6rem);
  background: var(--sub-alt);
}
/* dimmed, but its syllabus stays readable */
.dg-floor.locked > :not(.dg-syl) {
  opacity: 0.55;
}
.dg-floor.cur {
  outline: 2px solid var(--main);
}
.dg-floor.guard {
  box-shadow: inset 4px 0 0 var(--g-err-ink, var(--error));
}
.dg-fn {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--bg);
  font-weight: 700;
}
.dg-floor.cleared .dg-fn {
  background: var(--g-ok, #4caf50);
  color: #fff;
}
.dg-ft {
  min-width: 0;
}
.dg-ft .g-en {
  display: block;
}
.dg-guard {
  font-size: 0.8rem;
  color: var(--g-err-ink, var(--error));
}
.dg-fs {
  white-space: nowrap;
}
@media (max-width: 480px) {
  .dg-floor {
    grid-template-columns: 2rem 1fr auto;
  }
  .dg-floor > .g-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }
}
.dg-syl {
  grid-column: 2 / -1;
  font-size: 0.88rem;
}
.dg-syl > summary {
  cursor: pointer;
  color: var(--sub);
  width: max-content;
}
.dg-syl-in {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.dg-syl-gp {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.dg-syl-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.2rem 1rem;
}
.dg-syl-en {
  color: var(--sub);
}
.dg-syl-en::before {
  content: "— ";
}
[data-theme^="royaume"] .dg-floor {
  border: 2px solid var(--ts-ink, #2c2a3d);
}
/* #main centres short views vertically: the dungeon pages start at the top like the other game screens */
#view-dungeon {
  margin-bottom: auto;
}
.dg-desc {
  margin: 0.4rem 0 0;
}

/* golden cups: a floor won without a single mistake, a tower with one on every floor (« en or ») */
.dg-cup {
  display: inline-block;
  filter: drop-shadow(0 0 3px rgba(255, 210, 63, 0.9));
}
.dg-cups {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--g-coin-ink);
  font-weight: 600;
}
.dg-gold {
  padding: 0 0.45rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #fff4c2, #ffd23f);
  color: #3a2a00;
}
.dg-card.gold {
  box-shadow: 0 0 0 2px #d4a017, 0 0 14px rgba(255, 210, 63, 0.45);
}
