/* v40 — compact, responsive starter choice. Loaded after starter-v39.css. */
.starter-dialog.is-open {
  place-items: center;
  padding: clamp(8px, 2vw, 24px);
}

.starter-experience {
  width: min(1040px, 100%);
  max-height: min(720px, calc(100dvh - 20px));
  border-radius: 24px;
}

.starter-flow-header {
  min-height: 68px;
  padding: 11px 15px 10px 20px;
}

.starter-flow-header b { font-size: clamp(21px, 2vw, 28px); }
.starter-flow-content {
  max-height: calc(100dvh - 98px);
  padding: 16px;
}

.starter-select-v39 { gap: 0; }
.starter-choice-grid-v39 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 960px;
  margin: 0 auto;
}

.starter-choice-card-v39 {
  grid-template-rows: 164px auto 58px 44px;
  min-height: 370px;
  padding: 12px;
  border-radius: 20px;
}

.starter-card-portrait-v39,
.starter-card-portrait-v39 img {
  width: 164px;
  height: 164px;
}

.starter-home-art,
.starter-home-art img {
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.starter-card-copy-v39 {
  position: relative;
  gap: 4px;
  padding: 3px 4px 9px;
}

.starter-card-copy-v39 b { font-size: 22px; }
.starter-card-copy-v39 em { font-size: 9px; line-height: 1.3; }
.starter-card-level-v40 {
  position: absolute;
  top: -25px;
  right: 2px;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--starter-accent) 45%, rgba(255,255,255,.2));
  border-radius: 999px;
  background: rgba(4, 23, 32, .76);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
}

.starter-card-types-v40,
.starter-card-types-v40 .pokemon-type-list {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.starter-card-types-v40 .pokemon-type-badge { min-height: 18px; }
.starter-card-skills-v39 {
  display: grid;
  grid-template-columns: repeat(4, 48px);
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 5px 2px;
  border: 0;
}

.starter-card-skill-v39 {
  width: 48px;
  height: 48px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
}

.starter-card-skill-v39.is-locked {
  filter: saturate(.76) brightness(.88);
  opacity: .82;
}

.starter-card-skill-dot,
.starter-card-skill-dot img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.starter-card-open-v39 {
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--starter-accent) 28%, transparent);
  border-radius: 12px;
  font-size: 10px;
}

.starter-details-v39 {
  grid-template-columns: minmax(270px, .72fr) minmax(480px, 1.28fr);
  gap: 12px;
  min-height: 460px;
  max-width: 940px;
  margin: 0 auto;
}

.starter-profile-v39,
.starter-details-copy-v39 { border-radius: 18px; }
.starter-profile-v39 {
  grid-template-rows: 218px auto;
  padding: 11px;
}

.starter-detail-portrait-v39,
.starter-detail-portrait-v39 img {
  width: 218px;
  height: 218px;
}

.starter-profile-copy-v39 { gap: 4px; }
.starter-profile-copy-v39 h3 { font-size: 27px; }
.starter-profile-copy-v39 > small { font-size: 7px; }
.starter-profile-copy-v39 > p { font-size: 9px; }
.starter-profile-copy-v39 .pokemon-type-list { justify-content: center; }
.starter-profile-copy-v39 .starter-stat-grid { margin-top: 5px; }
.starter-details-copy-v39 { gap: 9px; padding: 13px; }
.starter-details-copy-v39 > header b { font-size: 18px; }

.starter-roadmap-v39 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.starter-roadmap-skill {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: start;
  gap: 5px;
  min-height: 105px;
  padding: 7px 4px;
  border-color: transparent;
  border-radius: 15px;
  background: transparent;
  text-align: center;
}

.starter-roadmap-skill:hover,
.starter-roadmap-skill:focus-visible,
.starter-roadmap-skill.is-active {
  border-color: color-mix(in srgb, var(--starter-accent) 62%, rgba(255,255,255,.16));
  background: color-mix(in srgb, var(--starter-accent) 10%, rgba(255,255,255,.035));
  outline: 0;
}

.starter-roadmap-skill.is-locked { opacity: .84; }
.starter-roadmap-icon,
.starter-roadmap-icon img {
  display: block;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
}

.starter-roadmap-skill span { justify-items: center; gap: 2px; }
.starter-roadmap-skill b {
  max-width: 100%;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.starter-roadmap-skill small { font-size: 6px; order: 2; }

.starter-detail-inline-v39 { display: block; min-height: 104px; }
.starter-detail-inline-v39 .starter-skill-detail {
  grid-template-columns: 68px minmax(0, 1fr);
  min-height: 104px;
  padding: 9px;
}

.starter-detail-inline-v39 .starter-skill-detail-icon,
.starter-detail-inline-v39 .starter-skill-detail-atlas,
.starter-detail-inline-v39 .starter-skill-detail-atlas img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
}

.starter-skill-detail-copy > em {
  color: var(--starter-muted, #9ab6c5);
  font-size: 7px;
  font-style: normal;
}

.starter-details-copy-v39 .starter-flow-actions {
  position: static;
  display: grid;
  grid-template-columns: minmax(120px, .65fr) minmax(190px, 1fr);
  gap: 8px;
  margin: auto 0 0;
  padding: 0;
  background: none;
}

.starter-details-copy-v39 .starter-flow-actions button {
  min-height: 48px;
  font-size: 10px;
}

.starter-sending-v40 {
  display: grid;
  grid-template-columns: 210px minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  width: min(620px, 100%);
  min-height: 360px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--starter-accent) 45%, #31566a);
  border-radius: 22px;
  background: radial-gradient(circle at 25% 45%, color-mix(in srgb, var(--starter-accent) 18%, transparent), transparent 38%), rgba(255,255,255,.035);
}

.starter-sending-portrait-v40,
.starter-sending-portrait-v40 img { width: 210px; height: 210px; }
.starter-sending-v40 > span { display: grid; gap: 6px; }
.starter-sending-v40 > span > i { margin-bottom: 4px; }
.starter-sending-v40 > span > b { color: var(--starter-text, #effaff); font-size: 20px; }
.starter-sending-v40 > span > small { color: var(--starter-muted, #9ab6c5); font-size: 9px; }

html[data-game-theme="light"] .starter-card-level-v40 {
  background: rgba(255,255,255,.94);
  color: #17445d;
}

html[data-game-theme="light"] .starter-roadmap-skill { background: transparent; }
html[data-game-theme="light"] .starter-roadmap-skill:hover,
html[data-game-theme="light"] .starter-roadmap-skill:focus-visible,
html[data-game-theme="light"] .starter-roadmap-skill.is-active {
  background: color-mix(in srgb, var(--starter-accent) 10%, #fff);
}

@media (max-width: 760px) {
  .starter-dialog.is-open { padding: 5px; }
  .starter-experience {
    width: 100%;
    max-height: calc(100dvh - 10px);
    border-radius: 19px;
  }
  .starter-flow-header {
    min-height: 58px;
    padding: 8px 9px 7px 12px;
  }
  .starter-flow-header b { font-size: 19px; }
  .starter-flow-content {
    max-height: calc(100dvh - 68px);
    padding: 9px;
    scrollbar-gutter: auto;
  }
  .starter-choice-grid-v39 { grid-template-columns: 1fr; gap: 8px; }
  .starter-choice-card-v39 {
    grid-template-columns: 100px minmax(0, 1fr);
    grid-template-rows: auto 52px 46px;
    min-height: 154px;
    padding: 8px;
    border-radius: 16px;
  }
  .starter-card-art-v39 { grid-column: 1; grid-row: 1 / 4; }
  .starter-card-portrait-v39,
  .starter-card-portrait-v39 img { width: 96px; height: 132px; }
  .starter-card-copy-v39 {
    grid-column: 2;
    align-content: center;
    justify-items: start;
    min-width: 0;
    padding: 2px 4px 4px;
    text-align: left;
  }
  .starter-card-copy-v39 b { font-size: 20px; }
  .starter-card-copy-v39 em {
    max-width: 100%;
    font-size: 8px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .starter-card-level-v40 {
    position: static;
    padding: 3px 6px;
    font-size: 7px;
  }
  .starter-card-types-v40,
  .starter-card-types-v40 .pokemon-type-list { justify-content: flex-start; }
  .starter-card-skills-v39 {
    grid-column: 2;
    grid-template-columns: repeat(4, 42px);
    justify-content: start;
    gap: 5px;
    padding: 3px 4px;
  }
  .starter-card-skill-v39 { width: 42px; height: 42px; }
  .starter-card-open-v39 {
    grid-column: 2;
    min-height: 44px;
    font-size: 10px;
  }
  .starter-details-v39 {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
  }
  .starter-profile-v39 {
    grid-template-columns: 108px minmax(0, 1fr);
    grid-template-rows: auto;
    padding: 7px;
  }
  .starter-detail-portrait-v39,
  .starter-detail-portrait-v39 img { width: 104px; height: 130px; }
  .starter-profile-copy-v39 {
    align-content: center;
    justify-items: start;
    text-align: left;
  }
  .starter-profile-copy-v39 h3 { font-size: 22px; }
  .starter-profile-copy-v39 .pokemon-type-list { justify-content: flex-start; }
  .starter-profile-copy-v39 .starter-stat-grid { display: none; }
  .starter-details-copy-v39 { gap: 7px; padding: 8px; }
  .starter-details-copy-v39 > header p { margin-top: 2px; font-size: 8px; }
  .starter-roadmap-v39 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
  .starter-roadmap-skill {
    min-height: 84px;
    padding: 5px 2px;
    border-radius: 12px;
  }
  .starter-roadmap-icon,
  .starter-roadmap-icon img { width: 50px; height: 50px; }
  .starter-roadmap-skill b { max-width: 70px; font-size: 7px; }
  .starter-roadmap-skill small { font-size: 5.5px; }
  .starter-detail-inline-v39 { display: block; min-height: 92px; }
  .starter-detail-inline-v39 .starter-skill-detail {
    grid-template-columns: 56px minmax(0, 1fr);
    min-height: 92px;
    padding: 7px;
  }
  .starter-detail-inline-v39 .starter-skill-detail-icon,
  .starter-detail-inline-v39 .starter-skill-detail-atlas,
  .starter-detail-inline-v39 .starter-skill-detail-atlas img {
    width: 52px;
    height: 52px;
  }
  .starter-detail-inline-v39 .starter-skill-detail-copy > b { font-size: 14px; }
  .starter-detail-inline-v39 .starter-skill-detail-copy > p { font-size: 8px; line-height: 1.35; }
  .starter-skill-detail-copy > em { display: none; }
  .starter-details-copy-v39 .starter-flow-actions {
    position: sticky;
    bottom: -8px;
    grid-template-columns: minmax(92px, .6fr) minmax(150px, 1fr);
    gap: 7px;
    margin: 0 -8px -8px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(4,24,34,0), rgba(4,24,34,.97) 25%);
  }
  .starter-details-copy-v39 .starter-flow-actions button {
    min-height: 48px;
    padding: 0 10px;
    font-size: 10px;
  }
  html[data-game-theme="light"] .starter-details-copy-v39 .starter-flow-actions {
    background: linear-gradient(180deg, rgba(238,248,252,0), rgba(238,248,252,.98) 25%);
  }
  .starter-sending-v40 {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
    min-height: 330px;
    padding: 14px;
    text-align: center;
  }
  .starter-sending-portrait-v40,
  .starter-sending-portrait-v40 img { width: 160px; height: 160px; }
}

@media (max-width: 370px) {
  .starter-choice-card-v39 { grid-template-columns: 84px minmax(0, 1fr); }
  .starter-card-portrait-v39,
  .starter-card-portrait-v39 img { width: 82px; height: 122px; }
  .starter-card-skills-v39 { grid-template-columns: repeat(4, 38px); gap: 4px; }
  .starter-card-skill-v39 { width: 38px; height: 38px; }
  .starter-roadmap-icon,
  .starter-roadmap-icon img { width: 46px; height: 46px; }
  .starter-roadmap-skill b { max-width: 58px; }
  .starter-details-copy-v39 .starter-flow-actions button { min-height: 50px; }
}

@media (max-height: 650px) and (max-width: 760px) {
  .starter-flow-header { min-height: 52px; }
  .starter-flow-content { max-height: calc(100dvh - 62px); }
  .starter-choice-card-v39 { min-height: 142px; }
  .starter-card-portrait-v39,
  .starter-card-portrait-v39 img { height: 116px; }
}

@media (prefers-reduced-motion: reduce) {
  .starter-choice-card-v39,
  .starter-home-art img { animation: none !important; transition: none !important; }
}
