#district-panel:has(> .adv-hud) {
  padding: clamp(16px, 2vw, 30px);
  background: #faf7ed;
  scrollbar-color: #b3b69f #f7f4e9;
  scrollbar-gutter: stable;
}
.adv-hud {
  --adv-green: #344d3c;
  --adv-red: #924b35;
  --adv-line: #d5d2bf;
  color: #273026;
  font: 400 .96rem/1.48 var(--sans, system-ui, sans-serif);
  min-width: 0;
  isolation: isolate;
}
.adv-hud .adv-header {
  position: relative;
  border-bottom: 1px solid var(--adv-line);
  margin: 0 0 1rem;
  padding-bottom: .85rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(44px, 20%);
  column-gap: .28rem;
}
.adv-top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .6rem;
  white-space: nowrap;
}
.adv-day {
  color: var(--adv-red);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font: 700 .69rem/1.3 var(--sans, sans-serif);
  text-transform: uppercase;
  letter-spacing: .11em;
}
.adv-day::before { content: ""; height: 2px; width: 15px; background: currentColor; }
.adv-count { color: #666e5e; font-size: .74rem; }
.adv-hud .adv-landmark {
  color: #2d392b;
  font: 400 clamp(1.95rem, 2.8vw, 2.85rem)/.98 var(--serif, Georgia, serif);
  letter-spacing: -.035em;
  align-self: end;
  grid-column: 1;
  grid-row: 2;
  overflow-wrap: anywhere;
}
.adv-vignette {
  width: 100%;
  height: clamp(48px, 5.3vw, 68px);
  align-self: center;
  grid-column: 2;
  grid-row: 2 / span 2;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: brightness(1.06);
}
.adv-hud .adv-chapter {
  font: italic 400 1rem/1.2 var(--serif, Georgia, serif);
  margin: .35rem 0 .08rem;
  color: #646951;
  grid-column: 1;
  grid-row: 3;
}
.adv-hud .adv-objective, .adv-hud .adv-speaker {
  margin: 0 0 .35rem;
  font: 400 clamp(1.42rem, 2vw, 1.92rem)/1.08 var(--serif, Georgia, serif);
  letter-spacing: -.015em;
}
.adv-hud .adv-speaker { margin: 0; }
.adv-hud .adv-role { font-size: .77rem; color: #59664e; margin: .15rem 0 .65rem; font-weight: 600; }
.adv-hud .adv-copy { color: #4a5146; line-height: 1.5; font-size: .93rem; }
.adv-hud .adv-line {
  margin: .45rem 0 .85rem;
  border-left: 2px solid #b27b53;
  padding: .1rem 0 .1rem .75rem;
  color: #394b37;
  font: 400 clamp(1.24rem, 1.73vw, 1.48rem)/1.25 var(--serif, Georgia, serif);
}
.adv-primary, .adv-secondary, .adv-utility {
  font-family: var(--sans, sans-serif);
  align-items: center;
  justify-content: center;
  display: inline-flex;
  gap: .45rem;
  max-width: 100%;
  padding: .56rem .75rem;
  line-height: 1.26;
  min-height: 40px;
  cursor: pointer;
}
.adv-hud .adv-primary {
  margin: .9rem 0 0;
  width: 100%;
  min-height: 45px;
  border-radius: 7px;
  background: var(--adv-green);
  border: 1px solid #304535;
  color: #fffdf3;
  font-weight: 650;
  font-size: .9rem;
  box-shadow: 0 1px 1px #29351c14;
}
.adv-hud .adv-primary:hover { background: #263f2e; }
.adv-hud .adv-secondary {
  margin: .15rem 0 0;
  color: #435840;
  font-size: .83rem;
  font-weight: 650;
  padding-inline: 0;
}
.adv-primary .ic, .adv-secondary .ic, .adv-utility .ic { width: 16px; height: 16px; }
.adv-hud .adv-utility .ic { width: 15px; height: 15px; }
.adv-hud .adv-audio-status {
  font: 400 .79rem/1.4 var(--sans, sans-serif);
  color: #54614d;
}
.adv-audio-status:empty { display: none; }
.adv-hud .adv-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 .6rem;
  border-top: 1px solid var(--adv-line);
  margin-top: 1.05rem;
}
.adv-hud .adv-utility {
  font-weight: 600;
  font-size: .8rem;
  color: #46583f;
  padding-inline: 0;
  border-radius: 3px;
}
.adv-hud .adv-secondary:hover, .adv-hud .adv-utility:hover { color: var(--adv-red); text-decoration: underline; text-underline-offset: 3px; }
.adv-hud .adv-ending { margin-top: .75rem; background: #f1eddd; border-radius: 5px; padding: .5rem .62rem; font-size: .84rem; }
.adv-hud .adv-ending summary { cursor: pointer; font-weight: 650; }
.adv-hud .adv-ending p { margin: .4rem 0 0; }
.adv-activity-slot { min-width: 0; }
.adv-activity-slot > :last-child { margin-bottom: 0; }
.adv-hud[data-stage=activity] .adv-header { margin-bottom: .7rem; }
.adv-hud[data-stage=activity] .adv-top { margin-bottom: .35rem; }

@media (min-width: 761px) {
  #game:has(.adv-hud) { grid-template-columns: clamp(294px, 28.5vw, 420px) minmax(0, 1fr); }
}
@media (max-width: 760px) {
  /* Keep the city in view while the student talks, studies an object or completes its activity. */
  #game:has(.adv-hud) {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(170px, 40%) minmax(0, 1fr);
    height: max(430px, calc(100svh - 105px));
    min-height: 0;
  }
  #game:has(.adv-hud) .map-frame { grid-area: 1 / 1; height: 100%; min-height: 0; }
  #game #district-panel:has(> .adv-hud) {
    grid-area: 2 / 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    padding: .8rem 1.05rem .85rem;
    border-top: 1px solid var(--adv-line, #d5d2bf);
    border-right: none;
  }
  .adv-hud .adv-header { padding-bottom: .55rem; margin-bottom: .65rem; grid-template-columns: minmax(0, 1fr) 54px; }
  .adv-hud .adv-landmark { font-size: 1.85rem; }
  .adv-top { margin-bottom: .3rem; }
  .adv-hud .adv-chapter { margin-top: .2rem; font-size: .95rem; }
  .adv-hud .adv-primary { margin-top: .65rem; min-height: 42px; }
  .adv-hud .adv-footer { margin-top: .65rem; }
  .adv-hud .adv-objective, .adv-hud .adv-speaker { font-size: 1.42rem; }
  .adv-hud .adv-copy { font-size: .9rem; }
}
@media (max-width: 760px) and (max-height: 630px) {
  #game:has(.adv-hud) { grid-template-rows: minmax(150px, 34%) minmax(0, 1fr); }
  .adv-hud .adv-chapter, .adv-hud .adv-vignette { display: none; }
  .adv-hud .adv-header { grid-template-columns: 1fr; }
}
