/* v48 — calm, balanced World Tour selection screen.
   One clear flow: choose on the left, understand on the right, then play. */

#tour-screen {
  padding: 96px clamp(18px, 3.2vw, 54px) 58px;
}

#tour-screen > .tour-heading-row {
  grid-template-columns: 92px minmax(0, 1fr) 112px;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 7px;
}

#tour-screen > .tour-heading-row h2 {
  font-size: clamp(29px, 3vw, 40px);
  line-height: 1.08;
}

#tour-screen > .tour-heading-row p {
  max-width: 900px;
  margin-top: 7px;
  color: #b9c8d0;
  font-size: 14px;
  line-height: 1.55;
}

#tour-screen > .tour-wte-illustration {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  min-height: 188px;
  margin: 9px auto 16px;
  overflow: hidden;
  border: 1px solid rgba(115, 223, 239, .32);
  border-radius: 18px;
  background: #050b12;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .35);
}

#tour-screen > .tour-wte-illustration::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 8, 14, .04) 28%, rgba(3, 8, 14, .18) 56%, rgba(3, 8, 14, .68)), linear-gradient(0deg, rgba(3, 8, 14, .88), transparent 58%);
  content: "";
  pointer-events: none;
}

#tour-screen > .tour-wte-illustration img {
  display: block;
  width: 100%;
  height: clamp(188px, 17vw, 244px);
  object-fit: cover;
  object-position: 62% 56%;
}

#tour-screen > .tour-wte-illustration figcaption {
  position: absolute;
  z-index: 2;
  right: clamp(16px, 3vw, 38px);
  bottom: clamp(14px, 2vw, 24px);
  left: clamp(16px, 3vw, 38px);
  display: grid;
  gap: 4px;
  max-width: 670px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .9);
}

#tour-screen > .tour-wte-illustration figcaption small {
  color: #7feef8;
  font: 900 11px/1.2 ui-monospace, monospace;
  letter-spacing: .13em;
}

#tour-screen > .tour-wte-illustration figcaption b {
  color: #fff;
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.2;
}

#tour-screen > .tour-wte-illustration figcaption span {
  color: #d5e4e9;
  font-size: 14px;
  line-height: 1.5;
}

#tour-screen .v47-tour-command-dock {
  gap: 7px;
  width: 100%;
  max-width: 1500px;
  margin: 18px auto 0;
}

/* The bottom buttons open these panels; closed panels must not leave blank rules. */
#tour-screen.has-v47-tour-dock > #mgx-tour-story:not([open]),
#tour-screen.has-v47-tour-dock > #mgx-tour-atlas:not([open]) {
  display: none;
}

#tour-screen .v47-tour-command-row {
  grid-template-columns: 50px minmax(190px, 1fr) auto;
  min-height: 64px;
  padding: 7px 10px;
  border-radius: 15px;
  box-shadow: 0 6px 16px rgba(7, 45, 55, .1);
}

#tour-screen .v47-command-portrait,
#tour-screen .v47-command-compass {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

#tour-screen .v47-command-copy b { font-size: 1rem; }
#tour-screen .v47-command-copy span { font-size: .82rem; }
#tour-screen .v47-command-actions button {
  min-height: 44px !important;
  padding: 7px 12px;
}

#tour-screen > .tour-layout {
  grid-template-columns: minmax(0, 1fr) clamp(340px, 31vw, 430px);
  gap: 14px;
  align-items: stretch;
  margin-top: 0;
}

#tour-screen .world-board,
#tour-screen .plant-passport {
  min-width: 0;
  border-color: rgba(151, 206, 224, .24);
  box-shadow: 0 20px 52px rgba(0, 0, 0, .43), inset 0 0 36px rgba(0, 229, 255, .02);
}

#tour-screen .world-board > header {
  height: 50px;
  padding: 0 16px;
  background: rgba(2, 8, 14, .58);
  letter-spacing: .09em;
}

#tour-screen .world-board > header p {
  margin: 0;
  color: #9ab0bb;
  font-size: 12px !important;
  letter-spacing: 0;
  white-space: nowrap;
}

#tour-screen .dice-console {
  grid-template-columns: 58px minmax(0, 1fr) 148px 174px;
  gap: 11px;
  min-height: 108px;
  margin: 0;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid rgba(151, 206, 224, .16);
  background: linear-gradient(90deg, rgba(0, 229, 255, .055), rgba(4, 11, 18, .92) 48%, rgba(200, 255, 37, .045));
  box-shadow: none;
}

#tour-screen .dice {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  transform: none;
  box-shadow: inset 0 0 20px rgba(0, 229, 255, .08);
}

#tour-screen .dice span { font-size: 25px; }
#tour-screen .dice b { margin-top: -8px; font-size: 9px !important; }

#tour-screen .dice-guide { min-width: 0; }
#tour-screen .dice-guide > small {
  color: #88a2af;
  font-size: 11px !important;
  letter-spacing: .06em;
}
#tour-screen .dice-guide > b {
  display: block;
  margin: 5px 0 3px;
  color: #f3fbff;
  font-size: 16px;
  line-height: 1.35;
}
#tour-screen .dice-guide > p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #91a6b1;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#tour-screen .dice-console button {
  min-height: 56px !important;
  border: 1px solid rgba(0, 229, 255, .45);
  border-radius: 13px;
  color: #eaffff;
  background: rgba(0, 229, 255, .09);
  box-shadow: none;
  transform: none;
}

#tour-screen .dice-console button span { color: #76eafa; }
#tour-screen .dice-console button:hover,
#tour-screen .dice-console button:focus-visible {
  filter: none;
  transform: translateY(-1px);
  outline: 3px solid rgba(255, 211, 79, .72);
  outline-offset: 2px;
}

#tour-screen .dice-console .tour-quick-challenge {
  color: #0a1720;
  border-color: #d9ff6b;
  background: linear-gradient(100deg, #d9ff6b, #aef531);
  box-shadow: 0 8px 22px rgba(169, 235, 45, .12);
}
#tour-screen .dice-console .tour-quick-challenge span { color: #315009; }

#tour-screen .world-map {
  min-height: 520px;
}

#tour-screen .world-map::after {
  right: 12px;
  bottom: 10px;
  color: rgba(185, 222, 231, .14);
  font-size: 9px;
  letter-spacing: .12em;
}

#tour-screen .plant-passport {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  padding: 16px;
  align-content: start;
  background: linear-gradient(180deg, rgba(7, 15, 24, .97), rgba(6, 12, 19, .94));
}

#tour-screen .plant-passport::after { display: none; }
#tour-screen .passport-number {
  gap: 8px;
  margin: 12px 0 4px;
}
#tour-screen .passport-number small {
  color: #7f96a3;
  writing-mode: horizontal-tb;
  font-size: 9px;
  letter-spacing: .12em;
}
#tour-screen .passport-number strong {
  font-size: clamp(43px, 4.2vw, 58px);
  line-height: .85;
  text-shadow: 3px 3px 0 rgba(255, 44, 168, .35);
}
#tour-screen #plant-location {
  margin: 4px 0 0 !important;
  color: #8ea4af;
  font-size: 11px;
  letter-spacing: .08em;
}
#tour-screen .plant-passport h3 {
  max-width: none;
  margin: 9px 0 8px;
  font-size: clamp(24px, 2.4vw, 32px) !important;
  line-height: 1.05;
}
#tour-screen .plant-type {
  justify-self: start;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  transform: none;
}

#tour-screen .passport-specs {
  margin-top: 13px;
}
#tour-screen .passport-specs > div {
  min-height: 64px;
  padding: 9px 10px;
}
#tour-screen .passport-specs small,
#tour-screen .plant-feature small,
#tour-screen .plant-mission small {
  font-size: 9px !important;
  line-height: 1.25;
}
#tour-screen .passport-specs b {
  margin-top: 6px;
  font-size: 14px !important;
}

#tour-screen .plant-insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
#tour-screen .plant-feature,
#tour-screen .plant-mission {
  min-width: 0;
  margin: 0;
  padding: 10px 11px;
}
#tour-screen .plant-feature p,
#tour-screen .plant-mission p {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  max-height: 44px;
  font-size: 13px !important;
  line-height: 1.55 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
#tour-screen .plant-mission b {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.25;
}

#tour-screen #plant-source {
  margin: 10px 1px;
  color: #b3c5cd;
  font-size: 12px;
}
#tour-screen .tour-crew-pick {
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  margin: 0 0 8px;
  padding: 8px;
  max-height: 96px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 211, 79, .055);
}
#tour-screen .tour-pick-portrait {
  width: 50px;
  height: 50px;
  border-radius: 13px;
}
#tour-screen .tour-crew-pick small { font-size: 9px; }
#tour-screen .tour-crew-pick b { font-size: 13px; }
#tour-screen .tour-crew-pick p {
  max-height: 43px;
  font-size: 14px !important;
  line-height: 1.5 !important;
  -webkit-line-clamp: 3;
}
#tour-screen .tour-atlas-detail {
  min-height: 50px !important;
  margin: 0;
  border-radius: 11px;
}
#tour-screen .tour-atlas-detail span { font-size: 9px; }
#tour-screen .tour-atlas-detail b { font-size: 13px; }

/* The primary play action already lives beside the map on desktop. */
#tour-screen .plant-passport > .tour-start,
#tour-screen .plant-passport > .tour-back {
  display: none;
}

@media (max-width: 1180px) and (min-width: 881px) {
  #tour-screen > .tour-layout {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 36%);
  }
  #tour-screen .dice-console {
    grid-template-columns: minmax(0, 1fr) 164px;
    grid-template-rows: auto auto;
    min-height: 126px;
  }
  #tour-screen .dice { display: none; }
  #tour-screen .dice-guide { grid-row: 1 / 3; align-self: center; }
  #tour-screen #tour-roll { grid-column: 2; grid-row: 1; }
  #tour-screen #tour-quick-challenge { grid-column: 2; grid-row: 2; }
  #tour-screen .wonder-route-teaser { display: none; }
  #tour-screen .world-map { min-height: 474px; }
  #tour-screen #tour-nodes {
    inset: 12px 10px 42px;
    grid-auto-rows: 49px;
  }
}

@media (max-width: 900px) {
  #tour-screen .v47-tour-command-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }
  #tour-screen .v47-command-actions {
    grid-column: auto;
    flex-wrap: nowrap;
  }
}

@media (max-width: 880px) {
  #tour-screen {
    padding: 86px 12px 38px;
  }
  #tour-screen > .tour-heading-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 10px;
    padding-top: 8px;
  }
  #tour-screen > .tour-heading-row h2 { font-size: clamp(25px, 7vw, 33px); }
  #tour-screen > .tour-heading-row p { font-size: 13px; }
  #tour-screen > .tour-wte-illustration {
    min-height: 166px;
    margin-top: 8px;
    border-radius: 15px;
  }
  #tour-screen > .tour-wte-illustration img { height: 190px; }
  #tour-screen > .tour-wte-illustration figcaption { right: 14px; bottom: 13px; left: 14px; }
  #tour-screen > .tour-layout { grid-template-columns: 1fr; }
  #tour-screen .dice-console {
    grid-template-columns: 1fr 1fr;
    min-height: 0;
  }
  #tour-screen .dice { display: none; }
  #tour-screen .dice-guide { grid-column: 1 / -1; }
  #tour-screen .dice-console button {
    grid-column: auto;
    min-height: 54px !important;
  }
  #tour-screen .wonder-route-teaser { display: none; }
  #tour-screen .world-map { min-height: 640px; }
  #tour-screen #tour-nodes {
    inset: 12px 8px 44px;
    grid-auto-rows: 49px;
  }
  #tour-screen .plant-passport > .tour-start {
    display: block;
    min-height: 56px !important;
    margin-top: 9px;
    border-radius: 11px;
  }
}

@media (max-width: 600px) {
  #tour-screen > .tour-heading-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  #tour-screen > .tour-heading-row .scene-kpi { display: none; }
  html[lang^="en"] #tour-screen > .tour-heading-row h2 {
    font-size: 23px !important;
    line-height: 1.08;
  }
  #tour-screen > .tour-wte-illustration { min-height: 158px; margin-bottom: 12px; }
  #tour-screen > .tour-wte-illustration img { height: 178px; object-position: 66% 56%; }
  #tour-screen > .tour-wte-illustration figcaption small { font-size: 9px; }
  #tour-screen > .tour-wte-illustration figcaption b { font-size: 19px; }
  #tour-screen > .tour-wte-illustration figcaption span { display: none; }
  #tour-screen .v47-tour-command-row {
    grid-template-columns: 46px minmax(0, 1fr);
    padding: 9px;
  }
  #tour-screen .v47-command-actions { grid-column: 1 / -1; }
  #tour-screen .plant-insights { grid-template-columns: 1fr; }
  #tour-screen .plant-feature p,
  #tour-screen .plant-mission p { -webkit-line-clamp: none; }
  #tour-screen .world-board > header {
    height: auto;
    min-height: 52px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }
  #tour-screen .world-board > header p { white-space: normal; }
}

@media (max-width: 390px) {
  #tour-screen .v47-destination-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #tour-screen .v47-destination-actions button:first-child { grid-column: auto; }
  #tour-screen .passport-specs { grid-template-columns: 1fr 1fr; }
}
