/* Loaded after styles.css so page-scale and mobile corrections always win. */

.page-title {
  max-width: 1180px;
  font-size: clamp(2.1rem, 3.2vw, 3.55rem);
  line-height: 1.1;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: normal;
}

.page-lead {
  max-width: 920px;
  font-size: clamp(1rem, 1.35vw, 1.16rem);
}

.aimighty-hero-word {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: clamp(8px, 1vw, 14px);
  margin-bottom: 18px;
  font-size: clamp(3.4rem, 8vw, 7rem);
  line-height: 0.94;
  word-break: keep-all;
}

.aimighty-ai {
  display: inline-grid;
  place-items: center;
  min-width: 1.42em;
  height: 0.9em;
  padding: 0 0.12em;
  border: 1px solid rgba(154, 243, 228, 0.24);
  border-radius: 0.13em;
  background: #07141d;
  color: #ffdc68;
  font-size: 0.62em;
  line-height: 1;
}

.aimighty-mighty {
  position: relative;
  display: inline-block;
  color: #fff;
}

.aimighty-mighty::after {
  content: "";
  position: absolute;
  left: 0.04em;
  right: 0.08em;
  bottom: -0.1em;
  height: 0.055em;
  border-radius: 999px;
  background: var(--mint);
}

.download-section {
  padding-top: clamp(24px, 4vw, 42px);
  padding-bottom: clamp(24px, 4vw, 42px);
}

.play-store-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: clamp(18px, 4vw, 48px);
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(0, 106, 96, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(154, 243, 228, 0.45), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #eef8f5 100%);
  box-shadow: 0 18px 48px rgba(18, 33, 44, 0.08);
  padding: clamp(22px, 4vw, 36px);
}

.play-store-copy h2 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: clamp(1.65rem, 3.5vw, 2.7rem);
  line-height: 1.08;
  word-break: keep-all;
}

.play-store-copy p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.play-store-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.store-button {
  display: grid;
  gap: 2px;
  min-width: 220px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  padding: 16px 18px;
  box-shadow: 0 12px 26px rgba(18, 33, 44, 0.18);
}

.store-button span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  font-weight: 800;
}

.store-route {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(0, 106, 96, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--teal);
  font-size: 0.84rem;
  font-weight: 900;
  text-align: center;
}

.stitch-command-page #apiStatus {
  display: none;
}

.stitch-command-page .stitch-form-grid {
  display: none;
}

.stitch-topbar {
  grid-template-columns: auto minmax(220px, 520px) minmax(0, 1fr) auto;
}

.stitch-topbar .auth-actions {
  justify-self: end;
  flex-wrap: nowrap;
}

.stitch-workspace {
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(18px, 2vw, 26px);
  width: min(1500px, calc(100% - 48px));
}

.stitch-command-card h1 {
  max-width: 11.5em;
  font-size: clamp(2rem, 2.7vw, 3.05rem);
  word-break: keep-all;
  text-wrap: balance;
}

.stitch-category-rail .chip {
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
}

.stitch-category-rail .chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stitch-category-rail .chip-count {
  margin-left: 0;
}

.stitch-hero-visual {
  background:
    linear-gradient(135deg, rgba(154, 243, 228, 0.76), rgba(248, 250, 246, 0.18)),
    url("./assets/stitch/skillshop-hero-mobile.jpg");
  background-size: cover;
  background-position: center;
}

@media (max-width: 1180px) {
  .page-title {
    font-size: clamp(2rem, 4.6vw, 3.2rem);
  }

  .stitch-workspace,
  .stitch-side-rail {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 760px);
  }

  .stitch-category-rail,
  .stitch-side-rail {
    position: static;
  }

  .stitch-hero-card {
    grid-template-columns: 1fr;
  }

  .stitch-command-card h1 {
    font-size: clamp(1.7rem, 4.4vw, 2.35rem);
  }

  .voice-fab {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
    box-shadow: 0 12px 24px rgba(18, 33, 44, 0.2), 0 0 0 10px rgba(154, 243, 228, 0.38);
  }
}

@media (max-width: 900px) {
  .play-store-card {
    grid-template-columns: 1fr;
  }

  .play-store-actions {
    justify-items: start;
  }

  .store-button,
  .store-route {
    width: min(100%, 320px);
  }
}

@media (max-width: 820px) {
  .stitch-topbar .auth-actions {
    width: 100%;
  }

  .stitch-category-rail .compact-tabs {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
  }

  .stitch-category-rail .chip {
    min-width: max-content;
    grid-template-columns: 12px auto auto;
  }

  .stitch-command-page .recommendation-grid,
  .stitch-command-page .market-grid,
  .stitch-form-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: clamp(2rem, 10vw, 3.05rem);
  }

  .stitch-command-card .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .stitch-command-card h1 {
    max-width: 100%;
    font-size: clamp(1.7rem, 8.5vw, 2.25rem);
  }

  .stitch-command-card .voice-fab {
    margin-top: 4px;
  }
}

@media (max-width: 640px) {
  .aimighty-hero-word {
    font-size: clamp(3rem, 16vw, 4.7rem);
  }

  .play-store-card {
    border-radius: 14px;
    padding: 20px;
  }
}

.auth-actions {
  gap: 10px;
}

.locale-picker select {
  min-height: 42px;
  border: 1px solid rgba(18, 33, 44, 0.13);
  border-radius: 999px;
  padding: 0 34px 0 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #10212c;
  font: inherit;
  font-weight: 700;
}

.icon-button.notification-button {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(18, 33, 44, 0.13);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.notification-button [data-notification-count] {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #df5d4f;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.contact-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: #10212c;
  color: #fff;
  box-shadow: 0 20px 48px rgba(16, 33, 44, 0.22);
  font-weight: 900;
  cursor: pointer;
}

.danger-button {
  border: 1px solid rgba(223, 93, 79, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff4f2;
  color: #b23b31;
  font-weight: 900;
  cursor: pointer;
}

.compact-modal {
  max-width: 520px;
}

.admin-inbox-list,
.deck-picker-list {
  display: grid;
  gap: 12px;
  max-height: min(62vh, 620px);
  overflow: auto;
}

.admin-inbox-list article,
.deck-picker-row {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(18, 33, 44, 0.12);
  border-radius: 16px;
  background: rgba(247, 250, 247, 0.86);
}

.admin-inbox-list article span,
.deck-picker-row span {
  color: #667772;
  font-size: 14px;
}

.admin-inbox-list article p {
  margin: 0;
  color: #33433f;
}

.deck-modal {
  max-width: 720px;
}

.deck-picker-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.deck-picker-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.new-deck-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.new-deck-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.new-deck-form input,
.auth-form select,
.auth-form textarea {
  border: 1px solid rgba(18, 33, 44, 0.13);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

.auth-message.ok {
  color: #00796b;
}

.today-reco-head {
  padding: clamp(22px, 3vw, 42px);
}

.today-reco-head h1 {
  margin: 8px 0 10px;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.today-reco-head p {
  margin: 0;
  color: #667772;
}

.today-carousel {
  overflow: hidden;
  padding: 18px 0 24px;
}

.today-carousel-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: aimighty-carousel 32s linear infinite;
}

.today-carousel:hover .today-carousel-track {
  animation-play-state: paused;
}

.today-skill-card {
  width: min(390px, 82vw);
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(18, 33, 44, 0.1);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(18, 33, 44, 0.08);
}

.today-skill-art {
  min-height: 150px;
  border-radius: 18px;
  background-image: var(--skill-art);
  background-size: cover;
  background-position: center;
}

.today-skill-card h2 {
  margin: 10px 0 8px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.08;
}

.today-skill-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: #667772;
}

@keyframes aimighty-carousel {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 9px));
  }
}

.live-bounce {
  animation: live-bounce 520ms cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes live-bounce {
  0% {
    transform: scale(0.96);
  }
  55% {
    transform: scale(1.035);
  }
  100% {
    transform: scale(1);
  }
}

.rank-row .secondary-button {
  align-self: center;
}

.add-skill-button {
  width: 100%;
  justify-content: center;
}

.result-card {
  cursor: pointer;
}

.result-card:hover {
  transform: translateY(-3px);
}

@media (max-width: 760px) {
  .locale-picker {
    width: 100%;
  }

  .locale-picker select {
    width: 100%;
  }

  .today-skill-card {
    grid-template-columns: 1fr;
  }

  .today-skill-art {
    min-height: 180px;
  }

  .deck-picker-row {
    grid-template-columns: 1fr;
  }

  .deck-picker-actions {
    justify-content: stretch;
  }

  .deck-picker-actions button {
    flex: 1;
  }
}
