/* The title screen is the same card table as the game. */
body[data-screen="home"] {
  min-height: 100vh;
  min-height: 100dvh;
  background: #0e1718;
  color: #f2e3c4;
}

body[data-screen="home"]::before {
  display: none;
}

body[data-screen="home"] .market-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body[data-screen="home"] .market-shell .topbar {
  position: relative;
  z-index: 5;
  min-height: 48px;
  height: 48px;
  padding: 0 22px;
  border-bottom: 1px solid #ddc89b27;
  background: #0c1517;
  color: #ede0c4;
  gap: 16px;
  flex-wrap: nowrap;
}

body[data-screen="home"] .market-shell .brand {
  min-height: 44px;
  gap: 8px;
  padding: 0;
  color: #eee1c2;
}

body[data-screen="home"] .market-shell .brand-mark {
  width: 27px;
  height: 27px;
  border-radius: 6px;
  background: #dabc80;
  color: #142326;
  transform: rotate(-5deg);
}

body[data-screen="home"] .market-shell .brand-mark .icon {
  width: 19px;
  height: 19px;
}

body[data-screen="home"] .market-shell .brand-copy strong {
  font-size: 21px;
  letter-spacing: -.065em;
}

body[data-screen="home"] .market-shell .brand-copy small {
  display: block;
  margin-top: 2px;
  color: #c5b58f;
  font-size: 6px;
  letter-spacing: .15em;
}

body[data-screen="home"] .market-shell .nav-actions {
  width: auto;
  gap: 5px;
  flex-wrap: nowrap;
}

body[data-screen="home"] .market-shell .nav-actions .button {
  min-height: 40px;
  padding: 8px 11px;
  border-color: transparent;
  background: transparent;
  color: #ddceb3;
  font-size: 10px;
  box-shadow: none;
  gap: 6px;
}

body[data-screen="home"] .market-shell .nav-actions .button:hover {
  color: #fff3d7;
  background: #ffffff0c;
  transform: none;
}

body[data-screen="home"] .market-shell .nav-actions .icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

body[data-screen="home"] .market-shell > main {
  min-width: 0;
  padding: 0;
}

body[data-screen="home"] .market-shell > .site-footer {
  display: none;
}

body[data-screen="home"] .modal {
  color: #172b39;
}

body[data-screen="home"] .modal-backdrop {
  background: #060e11c9;
}

body[data-screen="home"] .save-warning {
  color: #352c18;
}

body[data-screen="home"] .button:focus-visible {
  outline: 3px solid #ffdb82;
  outline-offset: 3px;
}

.launch-screen {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 48px);
  min-height: calc(100dvh - 48px);
  padding: 34px 24px 24px;
  overflow: clip;
  background: radial-gradient(ellipse at 50% 23%, #344a41 0, #142725 49%, #0c1719 84%);
}

.launch-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.launch-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#d7bf7d08 1px, transparent 1px), linear-gradient(90deg, #d7bf7d08 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(transparent, #000 35%, transparent 94%);
}

.launch-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 36%, #0d201842, transparent 60%), linear-gradient(90deg, #08141788, transparent 25%, transparent 75%, #08141788);
  box-shadow: inset 0 0 130px #030d1380;
}

.launch-boss {
  position: absolute;
  top: 64px;
  left: 50%;
  width: min(1380px, 125vw);
  min-width: 920px;
  color: #d4b472;
  transform: translateX(-50%);
  opacity: .2;
}

.launch-boss > .chart-boss-art {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}

.launch-boss .boss-face {
  transform-origin: 600px 128px;
  animation: launch-boss-breathe 8s ease-in-out infinite;
}

.launch-intro {
  position: relative;
  max-width: 720px;
  margin-bottom: 37px;
  text-align: center;
}

.launch-intro > .eyebrow {
  margin-bottom: 15px;
  color: #d4b981;
  font-size: 9px;
  letter-spacing: .2em;
}

.market-shell .launch-intro h1 {
  color: #f7e8c8;
  font: 700 clamp(41px, 4.3vw, 62px)/1.02 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
  text-shadow: 0 3px 0 #0b1a18, 0 10px 35px #05110a66;
}

.launch-intro h1 em {
  color: #e8bd77;
  font-weight: 400;
}

.launch-intro > p:not(.eyebrow) {
  margin-top: 17px;
  color: #c2c9b4;
  font-size: 13px;
  line-height: 1.65;
}

.launch-hand {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 29px;
  width: min(100%, 614px);
  padding: 0 5px 8px;
}

.launch-hand::before {
  content: "";
  position: absolute;
  inset: 12% -24% -9%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse, #b6bb5e12, #03131100 65%);
  pointer-events: none;
}

.launch-card {
  --launch-enamel: #173b32;
  --launch-gold: #e2c07b;
  --launch-paper: #e9dfc0;
  --launch-angle: -2deg;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  padding: 10px;
  border: 2px solid #d8b575;
  border-radius: 13px;
  background: linear-gradient(110deg, #f4eaca, var(--launch-paper) 58%, #d5c69f);
  color: #213b2d;
  box-shadow: inset 0 0 0 3px var(--launch-enamel), inset 0 0 0 4px #b8a06f, 0 6px 0 #050e0b, 0 19px 28px #0007;
  text-align: left;
  transform: rotate(var(--launch-angle));
  transform-origin: 50% 80%;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  cursor: pointer;
  appearance: none;
}

.launch-full {
  --launch-enamel: #263c46;
  --launch-gold: #c9b582;
  --launch-paper: #e0e2cb;
  --launch-angle: 2deg;
  margin-top: 11px;
}

.launch-card::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 2;
  border: 1px solid #f4d99783;
  border-radius: 8px;
  pointer-events: none;
}

.launch-card::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 3;
  border-radius: 9px;
  opacity: 0;
  background: linear-gradient(112deg, transparent 33%, #fff2c512 43%, #fff6d077 48%, #fff2c517 54%, transparent 64%);
  background-size: 340% 100%;
  background-position: 100% 0;
  pointer-events: none;
}

.launch-card:hover,
.launch-card:focus-visible {
  z-index: 2;
  transform: translateY(-7px) rotate(0);
  border-color: #ffe3a3;
  box-shadow: inset 0 0 0 3px var(--launch-enamel), inset 0 0 0 4px #c5af7c, 0 6px 0 #050e0b, 0 23px 34px #0008, 0 0 25px #dfb4661f;
}

.launch-card:focus-visible {
  outline: 3px solid #ffdb82;
  outline-offset: 6px;
}

.launch-card:is(:hover, :focus-visible)::after {
  animation: card-foil-pass .82s ease-out 1;
}

.launch-card:active {
  transform: translateY(1px) rotate(0);
}

.launch-ribbon {
  position: absolute;
  z-index: 4;
  top: -16px;
  left: 50%;
  min-width: 103px;
  padding: 6px 16px;
  border: 1px solid #f4d595;
  border-radius: 3px;
  background: #e0bc78;
  color: #203226;
  font: 800 9px/1.35 ui-monospace, monospace;
  letter-spacing: .11em;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 2px 0 #112519;
  transform: translateX(-50%);
}

.launch-full .launch-ribbon {
  border-color: #a6b4a0;
  background: #344d47;
  color: #e4e5c9;
}

.launch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 31px;
  padding: 3px 7px 9px;
  color: #76603b;
  font: 700 8px/1.4 ui-monospace, monospace;
  letter-spacing: .1em;
}

.launch-card-top > span:first-child {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #9e874f;
  border-radius: 50%;
  font-size: 9px;
  letter-spacing: 0;
}

.launch-card-art {
  position: relative;
  display: block;
  height: 152px;
  overflow: hidden;
  border: 1px solid #9c834a;
  border-radius: 6px 6px 2px 2px;
  background: var(--launch-enamel);
  box-shadow: 0 1px #fff3d187;
}

.launch-card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px #12251d77, inset 0 -9px 10px #10251c40;
  pointer-events: none;
}

.launch-card-art .strategy-illustration {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

.launch-card-art :is(.art-float, .art-sway, .art-wheel, .art-spark, .art-trail) {
  transform-box: fill-box;
  transform-origin: center;
}

.launch-card-art .art-float {
  animation: card-art-float 4.8s ease-in-out infinite;
}

.launch-card-art .art-sway {
  animation: card-art-sway 5.4s ease-in-out infinite;
}

.launch-card-art .art-spark {
  animation: card-art-spark 4.6s ease-in-out infinite;
}

.launch-card-title {
  display: block;
  margin: 8px 0 0;
  padding: 8px 10px 10px;
  border-block: 1px solid #ac975d;
  border-radius: 2px;
  background: var(--launch-enamel);
  color: #fff0c6;
  font: 700 33px/1.03 Georgia, "Times New Roman", serif;
  letter-spacing: -.035em;
  text-shadow: 0 2px #11221e;
  box-shadow: inset 0 1px #ffffff12, 0 1px #fff7d970;
}

.launch-card-description {
  display: block;
  min-height: 57px;
  margin: 12px 10px 0;
  color: #43503c;
  font-size: 12px;
  line-height: 1.6;
}

.launch-card-meta {
  display: block;
  margin: 0 10px 13px;
  color: #74603c;
  font: 700 9px/1.55 ui-monospace, monospace;
}

.launch-resume-note {
  display: block;
  margin: 0 10px 13px;
  color: #43503c;
  font-size: 11px;
  line-height: 1.6;
}

.launch-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 49px;
  margin-top: auto;
  padding: 11px 14px;
  border: 1px solid #9f7740;
  border-radius: 3px;
  background: linear-gradient(105deg, #efd69c, #d7ac63);
  color: #203329;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: inset 0 1px #fff4cf99, 0 2px #07170f80;
}

.launch-card-action > span {
  font-size: 24px;
  line-height: 1;
}

.launch-full .launch-card-action {
  border-color: #9a9571;
  background: linear-gradient(105deg, #d5d7b5, #b0bfa0);
}

.launch-promise {
  max-width: 560px;
  margin: 25px 0 7px;
  color: #cbd0ba;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

.launch-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 12px;
}

body[data-screen="home"] .launch-secondary .button {
  min-height: 44px;
  padding: 10px 13px;
  border-color: transparent;
  border-radius: 5px;
  background: transparent;
  color: #d0bd95;
  font-size: 11px;
  font-weight: 400;
  box-shadow: none;
  text-decoration: underline;
  text-decoration-color: #c6ac715e;
  text-underline-offset: 5px;
}

body[data-screen="home"] .launch-secondary .button:hover {
  background: #ffffff07;
  color: #ffedbc;
  transform: none;
}

.launch-footnote {
  max-width: 480px;
  margin: 4px 0 0;
  color: #8e9e8f;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

@keyframes launch-boss-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (min-width: 641px) and (max-height: 850px) {
  .launch-screen { padding-top: 23px; padding-bottom: 18px; }
  .launch-intro { margin-bottom: 29px; }
  .launch-intro > .eyebrow { margin-bottom: 10px; }
  .market-shell .launch-intro h1 { font-size: clamp(40px, 4vw, 52px); }
  .launch-intro > p:not(.eyebrow) { margin-top: 12px; }
  .launch-card-art { height: 111px; }
  .launch-card-title { font-size: 29px; padding-block: 7px 8px; }
  .launch-card-description { min-height: 48px; margin-top: 10px; }
  .launch-card-meta { margin-bottom: 10px; }
  .launch-promise { margin-top: 21px; }
}

@media (max-width: 640px) {
  body[data-screen="home"] .market-shell .topbar { padding-inline: 12px; gap: 8px; }
  body[data-screen="home"] .market-shell .nav-actions { gap: 1px; }
  body[data-screen="home"] .market-shell .nav-actions .button { width: 39px; min-width: 39px; min-height: 44px; padding: 10px 7px; }
  body[data-screen="home"] .market-shell .nav-actions .button span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  body[data-screen="home"] .market-shell .nav-actions .icon { width: 18px; height: 18px; flex-basis: 18px; }
  .launch-screen { justify-content: flex-start; padding: 26px 23px 24px; }
  .launch-intro { margin-bottom: 30px; }
  .launch-intro > .eyebrow { font-size: 8px; margin-bottom: 12px; }
  .market-shell .launch-intro h1 { font-size: clamp(34px, 8.6vw, 48px); }
  .launch-intro > p:not(.eyebrow) { max-width: 300px; margin: 13px auto 0; font-size: 12px; }
  .launch-boss { top: 130px; min-width: 780px; opacity: .14; }
  .launch-hand { grid-template-columns: minmax(0, 1fr); max-width: 340px; gap: 26px; padding: 0; }
  .launch-card { --launch-angle: 0deg; padding: 10px; }
  .launch-card-art { height: 126px; }
  .launch-card-top { min-height: 29px; padding-bottom: 7px; }
  .launch-card-title { font-size: 30px; padding-block: 7px 9px; }
  .launch-card-description { min-height: 47px; margin-top: 10px; }
  .launch-card-meta { margin-bottom: 10px; }
  .launch-card-action { min-height: 48px; }
  .launch-full { display: grid; grid-template-columns: 98px minmax(0, 1fr); gap: 0 10px; margin-top: 0; }
  .launch-full .launch-card-top { grid-column: 1 / -1; }
  .launch-full .launch-card-art { grid-column: 1; grid-row: 2 / 6; height: 135px; margin-bottom: 10px; }
  .launch-full .launch-card-title { grid-column: 2; margin-top: 0; font-size: 26px; padding: 8px; }
  .launch-full .launch-card-description { grid-column: 2; min-height: 0; margin: 9px 0 7px; font-size: 11px; line-height: 1.55; }
  .launch-full .launch-card-meta { grid-column: 2; margin: 0 0 9px; font-size: 8px; }
  .launch-full .launch-resume-note { grid-column: 2; margin: 0 0 10px; font-size: 10px; }
  .launch-full .launch-card-action { grid-column: 1 / -1; }
  .launch-promise { max-width: 295px; margin-top: 21px; font-size: 11px; }
  .launch-secondary { gap: 0 2px; }
  body[data-screen="home"] .launch-secondary .button { padding-inline: 10px; }
  .launch-footnote { max-width: 310px; font-size: 10px; }
}

@media (max-width: 360px) {
  .launch-screen { padding-inline: 18px; padding-top: 22px; }
  .market-shell .launch-intro h1 { font-size: 32px; }
  .launch-intro > .eyebrow { letter-spacing: .14em; }
  .launch-full { grid-template-columns: 86px minmax(0, 1fr); gap: 0 8px; }
  .launch-full .launch-card-title { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  .launch-screen *, .launch-screen *::before, .launch-screen *::after { animation: none !important; transition: none !important; }
}

body.motion-off .launch-screen *,
body.motion-off .launch-screen *::before,
body.motion-off .launch-screen *::after {
  animation: none !important;
  transition: none !important;
}
