/* Canvas overlays share one presentation area; live progress and actions use a compact footer. */
.venue #venueAtmosphere {
  container-type: size;
}
.canvas-wrap #artistCutin[data-art-set="contrast"] {
  width: min(96%, max(0px, calc((100cqh - 66px) * 1.7777778)), 720px);
}
#venueAtmosphere[data-presentation="entrance"]
  :is(.reward-burst, .legend-reveal, .closing-hud),
#venueAtmosphere[data-presentation="cutin"]
  :is(
    .fever-banner,
    .closing-hud,
    .hud-toggle,
    .now-playing,
    .legend-visitor-hint
  ),
#venueAtmosphere[data-presentation="reward"]
  :is(.fever-banner, .closing-hud, .legend-reveal),
#venueAtmosphere[data-presentation="reveal"]
  :is(.fever-banner, .closing-hud, .reward-burst) {
  visibility: hidden;
  pointer-events: none;
}
/* Keep the stage visible even with multiple active legends and long effect names. */
@media (max-width: 600px) and (orientation: portrait) {
  body.running .venue-footer {
    max-height: 20dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.running .venue-footer .legend-presence {
    position: static;
    border: 0;
    border-left: 3px solid var(--legend-color);
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 5px 10px;
    background: #173b3b;
    overflow: hidden;
  }
  .venue-footer .legend-presence-heading {
    display: none;
  }
  .venue-footer .legend-presence > small {
    display: none;
  }
  .venue-footer .legend-presence p {
    margin: 0 0 2px;
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .venue-footer .legend-presence > strong::before {
    content: "全体効果　";
    color: #ffe4a1;
  }
  .venue-footer .legend-presence > strong {
    font-size: 11px;
    line-height: 1.4;
  }
  .venue-footer > .run-notice {
    font-size: 12px;
    padding: 5px 10px;
  }
  .venue-footer .bond-live {
    max-height: 76px;
    overflow: auto;
  }
  body.running .venue-footer .festival-progress {
    min-height: 34px;
    padding: 4px 10px;
  }
}
@media (max-width: 600px) and (orientation: portrait) and (max-height: 700px) {
  body.running .venue-dashboard .stats .stat {
    min-height: 42px;
    padding-block: 2px;
  }
  body.running .venue-dashboard {
    padding-block: 4px;
    gap: 4px;
  }
  body.running .venue-footer .legend-presence p {
    display: none;
  }
}
/* v194: information belongs inside the canvas. Fading an entrance must never reserve blank rows. */
.festival-studio .venue::after {
  display: none;
}
.festival-studio #venueAtmosphere .venue-dashboard {
  position: absolute;
  inset: 10px 10px auto;
  z-index: 5;
  width: auto;
  margin: 0;
  padding: 8px 10px;
  gap: 5px 12px;
  border: 1px solid #d8d8ce;
  border-radius: 8px;
  background: #fffefaed;
  color: #222321;
  box-shadow: 0 3px 12px #22232114;
}
.festival-studio #venueAtmosphere .venue-dashboard .season-line {
  display: block;
}
.festival-studio #venueAtmosphere .venue-dashboard .stats {
  gap: 12px;
  background: transparent;
}
.festival-studio #venueAtmosphere .venue-dashboard .stat {
  background: transparent;
  color: #222321;
}
.festival-studio #venueAtmosphere .venue-dashboard .stat > span {
  color: #51544b;
}
.festival-studio #venueAtmosphere .venue-dashboard .stat strong {
  color: #222321;
  font-size: 20px;
}
.festival-studio #venueAtmosphere .venue-dashboard .stat small {
  color: #51544b;
}
.festival-studio #venueAtmosphere .venue-top {
  position: absolute;
  inset: auto 10px 10px auto;
  z-index: 6;
  width: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
}
.festival-studio #venueAtmosphere .venue-top .phase {
  display: none;
}
.festival-studio #venueAtmosphere .map-controls {
  align-self: auto;
  padding: 3px;
  gap: 2px;
  background: #fffefa;
  color: #222321;
  border: 1px solid #c4c6bb;
  border-radius: 6px;
  box-shadow: 0 2px 8px #22232124;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
}
.festival-studio #venueAtmosphere .map-controls .small-btn {
  height: 38px;
  min-height: 38px;
  min-width: 36px;
  padding: 4px 8px;
  background: #fffefa;
  color: #222321;
  border: 0;
  border-radius: 3px;
  opacity: 1;
  font-size: 12px;
}
.festival-studio
  #venueAtmosphere
  .map-controls
  .small-btn[aria-pressed="true"] {
  background: #d9ed83;
  color: #222321;
}
.festival-studio #venueAtmosphere .map-controls .small-btn:disabled {
  background: #eeeee7;
  color: #63655b;
}
.festival-studio #venueAtmosphere .map-controls #fitMap {
  border-color: #c4c6bb;
  margin: 0;
  min-width: 60px;
}
.festival-studio #venueAtmosphere .hud-toggle {
  inset: auto auto 10px 10px;
  min-width: 76px;
  min-height: 44px;
  padding: 6px 9px;
  color: #222321;
  background: #fffefa;
  border: 1px solid #c4c6bb;
  border-radius: 6px;
  box-shadow: 0 2px 8px #22232124;
  font-size: 11px;
}
.festival-studio .venue:has(#festivalDetails[open]) .venue-top,
.festival-studio .venue:has(#festivalDetails[open]) .stats {
  visibility: visible;
}
.festival-studio #venueAtmosphere .festival-details[open] .festival-rank {
  background: #fffefa;
  color: #222321;
  border: 1px solid #c4c6bb;
  max-height: min(50dvh, max(80px, calc(100cqh - 112px)), 340px);
}
.festival-studio
  #venueAtmosphere
  .festival-rank
  :is(strong, small, .festival-promotion-checks) {
  color: #222321;
}
.festival-studio #venueAtmosphere .festival-rank .festival-xp-track {
  background: #d8d8ce;
}
.festival-studio #venueAtmosphere .festival-rank .festival-xp-track i {
  background: #66506e;
}
.festival-studio #venueAtmosphere .festival-rank .promotion-heading b {
  color: #66506e;
}
.festival-studio #venueAtmosphere[data-entrance-active="true"] .venue-top {
  opacity: 0;
  pointer-events: none;
}
.festival-studio
  #venueAtmosphere[data-entrance-active="true"]
  .venue-top
  button {
  pointer-events: none;
}
.festival-studio
  #venueAtmosphere:is([data-presentation="cutin"], [data-presentation="reveal"])
  :is(.venue-dashboard, .venue-top) {
  visibility: hidden;
  pointer-events: none;
}
.festival-studio.running #venueAtmosphere .venue-dashboard {
  grid-template-columns: minmax(0, 1fr) auto;
}
.festival-studio.running #venueAtmosphere .venue-dashboard .season-line {
  display: none;
}
.festival-studio.running #venueAtmosphere .venue-dashboard .stats {
  grid-column: 1;
  grid-row: 1;
}
.festival-studio.running #venueAtmosphere .venue-dashboard .festival-details {
  grid-column: 2;
  grid-row: 1;
}
.festival-studio.running #venueAtmosphere .venue-dashboard .stat strong {
  font-size: 18px;
}
.festival-studio.running #venueAtmosphere .venue-dashboard .stat > span,
.festival-studio.running #venueAtmosphere .venue-dashboard .stat small {
  font-size: 10px;
}
.festival-studio.running .venue-footer {
  background: #222321;
  color: #fffefa;
}
.festival-studio.running .venue-footer .progress-caption {
  color: #fffefa;
}
.festival-studio.running .venue-footer .legend-presence {
  background: #222321;
  color: #fffefa;
}
.festival-studio.running .venue-footer .legend-presence :is(p, small) {
  color: #fffefa;
}
.festival-studio.running .venue-footer .legend-presence > strong {
  color: #d9ed83;
}
.festival-studio.running .venue > .run-hud {
  background: #f4f2ec;
  color: #222321;
}
.festival-studio.running
  .venue
  > .run-hud
  :is(.live-mood-box, #liveMoodValue, #hypeText) {
  color: #222321;
}
.festival-studio.running .venue > .run-hud .live-details-toggle {
  color: #222321;
  background: #fffefa;
  border-color: #c4c6bb;
}
.festival-studio.running .venue > .run-hud .signature-dock button {
  color: #222321;
  background: #d9ed83;
  border-color: #b3c66c;
  opacity: 1;
}
.festival-studio.running .venue > .run-hud .signature-dock button:disabled {
  color: #51544b;
  background: #e6e5dc;
  border-color: #c4c6bb;
  opacity: 1;
}
/* Shared controls must retain a readable foreground even on a dark feature header. */
.festival-studio dialog .dialog-dismiss {
  color: #222321;
  background: #fffefa;
  border: 1px solid #8b8e82;
  opacity: 1;
}
.festival-studio #backstageDialog .backstage-head .dialog-dismiss {
  position: static;
  color: #222321;
  background: #fffefa;
  border-color: #fffefa;
  font-size: 26px;
}
.festival-studio .backstage-pin-help {
  color: #51544b;
  font-size: 12px;
  line-height: 1.6;
}
.festival-studio .community-cover > img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
}
@media (max-width: 820px) and (orientation: portrait) {
  .festival-studio .community-cover {
    grid-template-columns: 1fr;
  }
  .festival-studio .community-cover > div {
    padding: 16px 18px;
  }
  .festival-studio .community-cover strong br {
    display: none;
  }
  .festival-studio .community-cover strong {
    font-size: 24px;
    margin: 7px 0 12px;
  }
  .festival-studio.running .venue > .run-hud {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    padding: 7px 10px;
  }
  .festival-studio.running .venue > .run-hud .signature-dock {
    grid-column: 2;
    grid-row: 1;
    max-width: 108px;
  }
  .festival-studio.running .venue > .run-hud .signature-dock button {
    min-height: 42px;
    width: auto;
    max-width: 108px;
    padding: 5px 8px;
    font-size: 11px;
  }
  .festival-studio.running .venue > .run-hud .live-details-toggle {
    grid-column: 3;
    grid-row: 1;
    min-height: 42px;
    padding: 5px 8px;
    font-size: 11px;
  }
  .festival-studio.running .venue > .run-hud #liveMoodValue {
    font-size: 14px;
  }
  .festival-studio.running .venue > .run-hud #hypeText {
    font-size: 10px;
  }
}
