/* Screen: title — the logo and a ship in a little sea scene (left); "Who's playing?", the
   new-career form or "Load a backup" (right). One column on tablets in portrait and phones. */

.screen--title {
  min-height: calc(100dvh - var(--sp-4) - var(--sp-7));
  justify-content: center;
}

.tt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--sp-5) var(--sp-6);
  align-items: center;
}

@media (max-width: 56.1875em) {
  .tt-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
  }
}

/* ── Logo and ship ─────────────────────────────────────── */
.tt-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  text-align: center;
  min-width: 0;
}

.tt-logo {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 3px 0 #ffffff, 0 6px 14px rgba(13, 48, 71, 0.18);
}

.tt-logo__cargo {
  color: var(--sea-700);
}

.tt-logo__captain {
  color: var(--accent-600);
}

.tt-tagline {
  max-width: 30em;
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--ink-soft);
}

.tt-scene {
  position: relative;
  width: 100%;
  padding: var(--sp-5) 0 0;
  border-radius: var(--r-xl);
  background:
    radial-gradient(60px 26px at 18% 22%, rgba(255, 255, 255, 0.95) 60%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(80px 30px at 78% 16%, rgba(255, 255, 255, 0.9) 60%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #cfeefc 0%, #e9f7fd 60%, var(--sea-300) 60%, var(--sea-400) 100%);
  box-shadow: var(--shadow-2), inset 0 -6px 0 rgba(13, 48, 71, 0.08);
  overflow: hidden;
}

.tt-art {
  display: flex;
  justify-content: center;
}

/* Edge to edge, so her water meets the sides of the scene. */
.tt-art .ship-art {
  width: 100%;
  height: auto;
}

/* ── Form / continue panel ─────────────────────────────── */
.tt-side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-width: 0;
}

.tt-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: var(--shadow-3);
  border: 1px solid rgba(13, 48, 71, 0.06);
}

.tt-panel__title {
  font-size: var(--fs-xl);
}

.tt-panel__kicker {
  font-size: var(--fs-xl);
  font-weight: 900;
  color: var(--sea-800);
}

.tt-continue__ship {
  margin: 0 !important;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--ink-soft);
}

.tt-warn {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  background: var(--sand-100);
  border: 2px solid var(--sand-400);
  font-weight: 800;
}

.tt-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.tt-input {
  flex: 1 1 180px;
  min-width: 0;
  font-weight: 800;
}

.tt-go {
  font-size: var(--fs-lg);
  min-height: 64px;
}

/* ── Who's playing? ────────────────────────────────────── */
.tt-picks {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tt-pick {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  min-height: 76px;
  padding: var(--sp-2) var(--sp-3);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--sea-50);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 3px 0 var(--line);
  transition: border-color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease), transform var(--dur-1) var(--ease);
}

.tt-pick:hover {
  border-color: var(--sea-400);
  background: #ffffff;
}

.tt-pick:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--line);
}

.tt-pick:focus-visible {
  box-shadow: 0 0 0 2px var(--focus-dark);
}

.tt-pick.is-broken {
  background: var(--sand-100);
  border-style: dashed;
}

.tt-pick__art {
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 120px;
  height: 64px;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, #e9f7fd 0%, #e9f7fd 62%, var(--sea-300) 62%, var(--sea-400) 100%);
  overflow: hidden;
}

.tt-pick__art .ship-art {
  width: 100%;
  height: 100%;
}

.tt-pick__lost {
  align-self: center;
  font-size: 2.2rem;
  line-height: 1;
}

.tt-pick__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.tt-pick__name {
  font-size: var(--fs-md);
  font-weight: 900;
}

.tt-pick__ship {
  font-weight: 800;
  color: var(--sea-800);
}

.tt-pick__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-soft);
}

.tt-who__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* "A copy" (a backup loaded twice) and "Sailed last": no two captains look the same. */
.tt-pick__tag {
  display: inline-block;
  margin-left: var(--sp-2);
  padding: 0 var(--sp-2);
  border-radius: var(--r-pill);
  border: 1px solid var(--sand-400);
  background: var(--sand-100);
  font-size: var(--fs-sm);
  font-weight: 800;
  vertical-align: middle;
}

.tt-pick__last {
  color: var(--sea-800);
  font-weight: 900;
}

/* A save that would not open: grown-up tools (a file copy, remove) behind a hold. */
.tt-grown {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 2px dashed var(--line);
}

.tt-grown > p {
  margin: 0;
}

.tt-grown__title {
  font-size: var(--fs-md);
}

.tt-load .st-code {
  min-height: 84px;
}

.screen--title .mate {
  max-width: none;
}

@media (max-width: 37.5em) {
  .screen--title {
    min-height: 0;
    justify-content: flex-start;
  }

  .tt-panel {
    padding: var(--sp-4);
    border-radius: var(--r-lg);
  }

  .tt-scene {
    padding: var(--sp-3) 0 0;
    border-radius: var(--r-lg);
  }

  .tt-row .btn {
    flex: 1 1 auto;
  }

  .tt-pick__art {
    width: 96px;
    height: 54px;
  }

  /* Picking a captain: the list comes first, the sea scene is a small band. */
  .screen--title.is-pick .tt-scene,
  .screen--title.is-load .tt-scene,
  .screen--title.is-slot .tt-scene {
    display: none;
  }
}

/* Short laptop screens: tighten so "Set sail!" stays near the fold. */
@media (min-width: 56.25em) and (max-height: 50em) {
  .tt-panel {
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
  }

  .tt-side {
    gap: var(--sp-3);
  }
}

/* "Run a shipping company": a link styled as a quiet button (company.html, docs/COMPANY.md). */
.tt-company {
  text-decoration: none;
}
