/* The launch screen has two non-overlapping regions. Keep these rules scoped:
   the battle HUD, collection, and in-game lobby use their own layouts. */
body.launching { background: #f5eddf; }
#launch-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(330px, 1fr);
  width: min(1100px, calc(100vw - 32px));
  height: min(680px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  background: #fff8e8;
  color: #654b40;
  border: 3px solid #9c7b68;
  border-radius: 28px 24px 27px 22px;
  box-shadow: 0 6px #ceb6a0, 0 16px 45px #826a4820;
}
#launch-screen[hidden] { display: none; }
#launch-screen::after { display: none; }
#launch-screen .launch-picture {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #c5e9eb;
  border-right: 2px solid #b7a088;
}
#launch-screen .launch-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: 49% 43%;
}
#launch-screen .launch-copy {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: clamp(24px, 4vw, 46px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff8e8;
  text-align: center;
  scrollbar-width: thin;
}
#launch-screen .launch-main { flex: 0 0 auto; }
#launch-screen .launch-copy h1 {
  max-width: 100%;
  margin: 0;
  color: #61493f;
  font-size: clamp(34px, 3.6vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-wrap: balance;
  text-shadow: none;
}
#launch-screen .launch-tagline {
  margin: 12px 0 26px;
  color: #795e4e;
  font-size: 17px;
  line-height: 1.45;
}
#launch-screen #start-game {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 60px;
  margin: 0;
  padding: 14px 18px;
  border: 2px solid #ac8254;
  border-radius: 18px 15px 18px 16px;
  background: #ffdf91;
  box-shadow: 0 4px #c29a68, inset 0 2px #fff1c9;
  color: #694a2c;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
  touch-action: manipulation;
}
#launch-screen #start-game:hover:not(:disabled) { background: #ffda7f; }
#launch-screen #start-game:disabled { background: #e5dcc5; color: #796d55; box-shadow: none; cursor: wait; }
#launch-screen #start-game:focus-visible,
#launch-screen .launch-about summary:focus-visible,
#launch-screen .postcard-entry-button:focus-visible {
  outline: 3px solid #557b66;
  outline-offset: 4px;
}
#launch-screen #load-status {
  margin: 14px 0 0;
  color: #765342;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#launch-screen #load-status[hidden] { display: none; }
#launch-screen .launch-about {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  margin: 10px 0 0;
  color: #705a48;
  font: 14px/1.5 system-ui, sans-serif;
}
#launch-screen .launch-about summary {
  display: list-item;
  min-height: 44px;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
#launch-screen .launch-about[open] {
  background: #fffdf5;
  border: 1px solid #d6c4a6;
  border-radius: 12px;
  box-shadow: none;
}
#launch-screen .launch-copy:has(.launch-about[open]) { justify-content: flex-start; }
#launch-screen .launch-about-copy {
  max-height: 27dvh;
  padding: 0 16px 14px;
  overflow-y: auto;
  text-align: left;
}
#launch-screen .launch-about-copy p { margin: 8px 0 14px; color: #654f40; font: 14px/1.6 system-ui, sans-serif; }
#launch-screen .launch-guides { margin: 0 0 12px; gap: 0 14px; justify-content: flex-start; }
#launch-screen .launch-guides a { min-height: 44px; color: #5c715c; font-size: 13px; }
#launch-screen .launch-copy button.postcard-entry-button,
#launch-screen .launch-copy button.account-entry-button {
  align-self: center;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 9px 15px;
  border: 1px solid #bdc9a8;
  border-radius: 12px;
  background: #e8efd9;
  color: #52654c;
  box-shadow: none;
  font: 650 13px/1.4 system-ui, sans-serif;
}
#launch-screen .launch-copy button.postcard-entry-button:hover,
#launch-screen .launch-copy button.account-entry-button:hover { background: #dfe9ca; }
@media (max-width: 730px) {
  #launch-screen {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: clamp(160px, 34svh, 290px) minmax(0, 1fr);
    align-items: stretch;
    justify-content: normal;
    width: 100vw;
    height: 100dvh;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow-y: auto;
  }
  #launch-screen .launch-picture { border-right: 0; border-bottom: 2px solid #c5ac8e; }
  #launch-screen .launch-art { object-position: 50% 41%; }
  #launch-screen .launch-copy {
    justify-content: flex-start;
    gap: 8px;
    padding: 24px max(24px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  }
  #launch-screen .launch-copy h1 { font-size: clamp(28px, 8vw, 34px); line-height: 1.12; }
  #launch-screen .launch-tagline { font-size: 15px; margin: 9px 0 20px; }
  #launch-screen #start-game { min-height: 56px; font-size: 20px; }
  #launch-screen .launch-about { margin-top: 6px; }
  #launch-screen .launch-about-copy { max-height: 30dvh; }
}
@media (max-width: 730px) and (max-height: 650px) {
  #launch-screen { grid-template-rows: clamp(120px, 26svh, 169px) minmax(0, 1fr); }
  #launch-screen .launch-copy { padding-top: 16px; gap: 4px; }
  #launch-screen .launch-tagline { margin-bottom: 16px; }
}
@media (min-width: 731px) and (max-height: 520px) {
  #launch-screen .launch-copy { justify-content: flex-start; padding: 20px 28px; gap: 4px; }
  #launch-screen .launch-copy h1 { font-size: 30px; }
  #launch-screen .launch-tagline { margin: 8px 0 16px; }
}
