.title-screen {
  display: flex;
  padding: 0 0 calc(var(--safe-bottom) + 24px);
  flex-direction: column;
  background: #f8fcfb;
}

.title-art-wrap {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border-bottom: 4px solid var(--ink);
  background: #9ed2ce;
}

.title-art {
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
}

.case-stamp {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 9px 12px;
  border: 3px double var(--coral-dark);
  color: var(--coral-dark);
  background: rgb(255 255 255 / 91%);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  transform: rotate(-4deg);
}

.title-content {
  padding: 24px 20px 0;
}

.title-content h1 {
  max-width: 520px;
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
}

.opening-copy {
  max-width: 590px;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 17px;
}

.title-actions {
  display: grid;
  gap: 10px;
}

.title-content > .text-button {
  display: block;
  margin: 8px auto 0;
}

.intro-screen {
  background: linear-gradient(#e8f5f4 0 44%, #fff 44%);
}

.intro-art {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 4px -16px 20px;
  overflow: hidden;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: #b9dfe0;
}

.intro-art-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bandit-note {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 64.5%;
  width: 29.5%;
  margin: 0;
  padding: 0;
  border: 0;
  color: #3d3430;
  background: transparent;
  box-shadow: none;
  font-family: "Bradley Hand", "Comic Sans MS", cursive;
  font-size: clamp(9px, 2.7vw, 13px);
  line-height: 1.22;
  transform: rotate(7deg);
}

.bandit-note cite {
  display: block;
  margin-top: 4px;
  font-size: 0.9em;
  font-style: normal;
  text-align: right;
}

.sidekick-intro {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}

.dialogue-panel {
  position: relative;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.dialogue-panel p:last-child {
  margin: 0;
}

.speaker {
  margin-bottom: 3px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.tutorial-strip {
  display: grid;
  margin-bottom: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.tutorial-strip span {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

.tutorial-strip b {
  display: grid;
  width: 28px;
  height: 28px;
  margin: auto;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
}

.objective-banner {
  display: grid;
  min-height: 54px;
  margin-bottom: 10px;
  padding: 10px 12px;
  gap: 3px;
  border-left: 7px solid var(--coral);
  background: white;
  box-shadow: var(--shadow);
}

.objective-banner > span {
  color: var(--coral-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.objective-banner strong {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.25;
}

.map-viewport {
  position: relative;
  width: min(100%, 560px);
  margin-right: auto;
  margin-left: auto;
  overflow: visible;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #a7d8d0;
  touch-action: pan-y;
}

.map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
}

.map-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 3px);
  user-select: none;
}

.map-hotspot {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--width, 29%);
  min-width: 56px;
  min-height: 48px;
  padding: 5px 3px;
  border-width: 2px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 3px 0 rgb(32 49 73 / 25%);
  transform: translate(-50%, -50%);
}

.map-hotspot:active:not(:disabled) {
  transform: translate(-50%, calc(-50% + 2px));
}

.map-room-name,
.map-status {
  display: block;
  line-height: 1.05;
  overflow-wrap: normal;
}

.map-room-name {
  font-size: 9px;
  font-weight: 900;
}

.map-status {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 700;
}

.map-hotspot.status-clues-remain {
  border-color: var(--coral-dark);
  background: #fff0f1;
}

.map-hotspot.status-current-lead {
  border-color: var(--coral-dark);
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgb(255 255 255 / 78%), 0 3px 0 rgb(32 49 73 / 25%);
}

.map-hotspot.status-lead-available {
  border-color: var(--teal-dark);
  background: #e7f5f2;
}

.map-hotspot.status-no-lead-yet {
  border-style: dotted;
  color: #5c6675;
  background: #eef1f1;
}

.map-hotspot.status-fully-searched {
  border-color: var(--green);
  background: #eff7e9;
}

.map-hotspot.status-newly-unlocked {
  border-color: var(--yellow-dark);
  background: #fff4c9;
}

.map-hotspot.status-locked,
.map-hotspot.status-party-finale {
  border-style: dashed;
  color: #526078;
  background: #dfe5e5;
  opacity: 0.9;
  cursor: pointer;
}

.map-legend {
  display: grid;
  margin: 9px 0 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  color: var(--ink-soft);
  font-size: 10px;
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.legend-dot.open { background: var(--yellow); }
.legend-dot.clues { background: #eef1f1; }
.legend-dot.done { background: #dceecf; }
.legend-dot.locked { background: #bac3c5; }

.deduction-callout {
  width: 100%;
  color: white;
  border-color: var(--ink);
  background: var(--teal);
}

@media (max-width: 350px) {
  .title-content h1 {
    font-size: 32px;
  }

  .title-art-wrap,
  .title-art {
    min-height: 285px;
  }

  .bandit-note {
    top: 50%;
    left: 64%;
    width: 31%;
  }

  .app-header h1 {
    font-size: 22px;
  }

  .map-viewport {
    width: calc(100% - 24px);
  }

  .map-room-name { font-size: 9px; }
}
