/* Welcome screen: isolated from editor panel layout, no WebGL or terrain evaluation. */
#tf-startup {
  position: fixed; inset: 0; z-index: 99999; overflow: auto; overscroll-behavior: contain;
  color: #e8edf2; background: radial-gradient(ellipse at 76% 38%, #203a38 0%, #142329 32%, #101318 73%);
  font: 16px/1.5 system-ui, sans-serif;
}
#tf-startup[hidden], #tf-startup [hidden] { display: none !important; }
.tf-welcome-shell { width: min(100%, 1900px); min-height: 100%; margin: auto; padding: 34px clamp(24px, 4vw, 88px); display: flex; flex-direction: column; }
.tf-welcome-top, .tf-welcome-bottom { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.tf-welcome-top { border-bottom: 1px solid #a6c4bd26; padding-bottom: 20px; }
.tf-welcome-mark { color: #b6dfc3; font-weight: 750; font-size: 19px; letter-spacing: .05em; }
.tf-welcome-mark span { color: #647d7b; margin: 0 7px; }
.tf-welcome-version { color: #9aa8b7; font-size: 13px; font-variant-numeric: tabular-nums; }
.tf-welcome-layout { flex: 1; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.35fr); gap: clamp(24px, 4vw, 84px); align-items: center; padding: 30px 0; }
.tf-startup-inner { min-width: 0; padding: 22px 0; }
.tf-welcome-eyebrow { color: #a4cdb0; font-size: 13px; letter-spacing: .18em; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.tf-welcome-eyebrow > span { width: 8px; height: 8px; background: #8dc7a3; border-radius: 50%; box-shadow: 0 0 14px #8dc7a388; }
#tf-startup-title { font-size: clamp(44px, 4.7vw, 92px); font-weight: 750; line-height: 1.06; letter-spacing: -.05em; margin: 23px 0 20px; }
#tf-startup-title em { color: #a3d8b2; font-style: normal; }
.tf-welcome-intro { max-width: 520px; color: #b3c2ca; font-size: clamp(17px, 1.3vw, 23px); line-height: 1.65; margin: 0 0 24px; }
.tf-welcome-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; }
#tf-startup-enter, .tf-welcome-academy { display: inline-flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 55px; border: 1px solid #9ed5b0; border-radius: 9px; padding: 13px 22px; font: 650 17px/1.3 system-ui, sans-serif; text-decoration: none; }
#tf-startup-enter { background: #a4d8b3; color: #14251e; box-shadow: 0 7px 26px #8dc7a324; }
#tf-startup-enter:hover:not(:disabled) { background: #c1e9cb; }
#tf-startup-enter:disabled { opacity: .55; cursor: default; }
.tf-welcome-academy { color: #c6d9d4; background: #1c2b31; border-color: #516765; }
.tf-welcome-academy:hover { color: #fff; border-color: #9ed5b0; }
#tf-startup :is(button,a):focus-visible { outline: 2px solid #d5f5df; outline-offset: 4px; }
#tf-startup-loading { margin-top: 20px; max-width: 460px; }
.tf-startup-progress { display: block; width: 100%; height: 7px; accent-color: #8dc7a3; }
#tf-startup-status { display: block; margin-top: 8px; color: #b3c2ca; font-size: 14px; }
#tf-startup-error { margin-top: 12px; color: #ffb3a8; overflow-wrap: anywhere; white-space: pre-wrap; }
#tf-startup-retry { margin-top: 12px; }
.tf-welcome-gallery { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; position: relative; }
.tf-welcome-tile { min-width: 0; margin: 0; text-align: center; position: relative; }
.tf-welcome-tile img { display: block; width: 100%; height: auto; max-height: 29vh; object-fit: contain; filter: drop-shadow(0 24px 18px #05090b80); animation: tf-welcome-float 8s ease-in-out infinite; will-change: transform; }
.tf-welcome-tile:nth-child(2) img { animation-duration: 9s; animation-delay: -3s; }
.tf-welcome-tile:nth-child(3) img { animation-duration: 10s; animation-delay: -5s; }
.tf-welcome-tile:nth-child(4) img { animation-duration: 8.5s; animation-delay: -2s; }
.tf-welcome-tile figcaption { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: 8px; }
.tf-welcome-tile figcaption span { font-size: 10px; font-weight: 650; letter-spacing: .16em; color: #a2b8b7; }
.tf-welcome-tile figcaption strong { font-size: 17px; font-weight: 650; color: #e3ebe9; }
@keyframes tf-welcome-float { 0%,100% { transform: translateY(3px) rotate(-.65deg); } 50% { transform: translateY(-13px) rotate(.65deg); } }
#tf-startup.tf-motion-paused .tf-welcome-tile img, #tf-startup.tf-tab-hidden .tf-welcome-tile img { animation-play-state: paused; }
.tf-welcome-bottom { padding-top: 18px; border-top: 1px solid #a6c4bd26; color: #a1b3bb; font-size: 12px; }
.tf-welcome-gallery-note { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .tf-welcome-tile img { animation: none; will-change: auto; } }
@media (max-width: 850px) {
  .tf-welcome-shell { padding: 22px 24px; }
  .tf-welcome-layout { grid-template-columns: 1fr; gap: 24px; padding: 16px 0 26px; }
  .tf-startup-inner { padding: 12px 0; }
  .tf-welcome-top, .tf-welcome-bottom { align-items: flex-start; flex-wrap: wrap; }
  .tf-welcome-tile img { max-height: none; }
}
@media (max-width: 420px) { .tf-welcome-gallery { grid-template-columns: 1fr; } .tf-welcome-actions > * { width: 100%; } }

/* Slow-moving showcase pages. Only the viewport clips the slide. */
.tf-welcome-local { margin-top: 26px; padding: 14px 0 0 15px; border-left: 2px solid #78ad90; max-width: 520px; }
.tf-welcome-local strong { color: #b6dfc3; font-size: 17px; }
.tf-welcome-local p { margin: 6px 0; color: #b3c2ca; font-size: 14px; line-height: 1.55; }
.tf-welcome-local a { color: #b6dfc3; text-decoration: underline; text-underline-offset: 3px; }
.tf-welcome-showcase { min-width: 0; }
.tf-welcome-viewport { overflow: hidden; padding: 18px 0 12px; }
.tf-welcome-track { display: flex; align-items: flex-start; transition: transform 1.8s cubic-bezier(.45,0,.25,1); }
.tf-welcome-track > .tf-welcome-gallery { flex: 0 0 100%; width: 100%; padding: 0 8px; box-sizing: border-box; }
.tf-welcome-track[data-page="1"] { transform: translateX(-100%); }
.tf-welcome-track[data-page="2"] { transform: translateX(-200%); }
#tf-startup.tf-motion-paused .tf-welcome-track, #tf-startup.tf-tab-hidden .tf-welcome-track { transition: none; }
/* Without motion, all landscapes remain available in a static, scrollable gallery. */
@media (prefers-reduced-motion: reduce) {
  .tf-welcome-layout { align-items: start; }
  .tf-welcome-track { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; transform: none !important; transition: none; }
}
@media (max-width: 420px) { .tf-welcome-track > .tf-welcome-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 8px; } .tf-welcome-tile figcaption strong { font-size: 13px; } }
