.at-home .topbar .play-modes,
.at-home .topbar .play-modes-toggle,
.at-home #rules-button,
.at-home .header-center { display: none; }
.at-home .topbar { min-height: 65px; }

#welcome {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 90px);
  min-height: calc(100svh - 121px);
  max-width: 1320px;
  margin: auto;
  padding: clamp(32px, 6vw, 84px) clamp(20px, 6vw, 84px);
}
.welcome-copy h1 {
  font-size: clamp(66px, 8vw, 122px);
  font-weight: 500;
  line-height: .86;
  letter-spacing: -.055em;
}
.welcome-copy h1 em { color: var(--gold); font-weight: 500; }
.welcome-intro { max-width: 35ch; margin: 24px 0 28px; font-size: clamp(16px, 1.5vw, 20px); }
.welcome-primary, .welcome-secondary { display: flex; flex-wrap: wrap; gap: 10px; }
.welcome-primary .button { min-height: 46px; padding: 10px 20px; border-color: #80735d; }
.welcome-primary .button:first-child { background: var(--paper); color: #292620; border-color: var(--paper); }
#welcome-cpu:not([aria-busy]) .welcome-starting,
#welcome-cpu[aria-busy] > :not(.welcome-starting) { display: none; }
.welcome-primary .button:hover { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.welcome-secondary { margin-top: 22px; gap: 10px 24px; }
.welcome-secondary button { color: var(--bone); min-height: 44px; border-bottom: 1px solid #716652; }
.welcome-secondary span { margin-left: 4px; color: var(--gold); }
#welcome-load { margin-top: 12px; min-height: 32px; }
.welcome-map {
  position: relative;
  aspect-ratio: 1.05;
  overflow: hidden;
  border: 7px double #9a815f;
  background: #312e29;
  box-shadow: 0 16px 42px #10131480;
}
.welcome-map-board {
  position: absolute;
  width: 108%;
  aspect-ratio: 2/3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-8deg) scale(1.13);
  background: var(--board-art) center/100% 100%;
}
.welcome-map-board .piece {
  position: absolute;
  width: 12.5%;
  left: calc((var(--file) - 1) * 12.5%);
  top: calc((var(--rank) - 1) * 100% / 12);
}
@media (max-width: 740px) {
  #welcome { grid-template-columns: 1fr; gap: 30px; padding: 30px 22px; }
  .welcome-copy h1 { font-size: clamp(62px, 12vw, 84px); }
  .welcome-copy h1 br { display: none; }
  .welcome-copy h1 em::before { content: ' '; }
  .welcome-intro { margin: 16px 0 22px; }
  .welcome-map { width: 100%; max-height: 320px; aspect-ratio: 1.8; }
  .at-home .topbar { padding-bottom: 8px; }
}

/* The central four-by-four district stays in the same place when the board flips. */
#tour-territory { position: absolute; inset: 33.3333% 25%; pointer-events: none; }
#tour {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: var(--bone);
}
#tour::backdrop { background: transparent; }
.tour-light {
  position: absolute;
  border: 2px solid #e6c17e;
  border-radius: 5px;
  box-shadow: 0 0 0 200vmax rgb(10 12 13 / 85%);
  pointer-events: none;
}
.tour-card {
  position: absolute;
  width: min(330px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 15px 20px 17px;
  border: 1px solid #9a815d;
  border-top: 3px solid var(--gold);
  border-radius: 3px;
  background: var(--iron);
  box-shadow: 0 8px 28px #0009;
}
.tour-caption, .tour-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-caption { color: var(--gold); font-size: 15px; }
#tour-exit { font-size: 24px; line-height: 1; width: 34px; height: 34px; }
.tour-card h2 { font-size: 28px; }
.tour-card p { margin: 7px 0 14px; font-size: 17px; line-height: 1.5; }
.tour-controls button { min-height: 44px; min-width: 56px; }
#tour-next { margin-left: auto; }
body.touring { padding-bottom: min(50vh, 280px); }
