@import url("shop-layout.css?v=20260917-shop-preview-fix");

/* Cross-device presentation: profile artwork and a framed tablet/desktop shell. */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

/* Keep native selection and cursor behavior wherever the player enters text. */
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: #d9f36a;
}

.profile-avatar .top-profile-icon-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Final nav art is square source artwork; contain it inside each nav button. */
#bottom-nav .nav-button > img {
  display: block;
  width: 64px;
  height: 64px;
  max-width: 82%;
  max-height: 82%;
  margin: auto;
  object-fit: contain;
}

#view-home .hero .brand-mark {
  width: 96px;
  height: 96px;
  margin: 8px auto 0;
  overflow: hidden;
  border-radius: 25px;
  background: transparent;
  box-shadow: 0 8px 18px rgba(14, 78, 61, .2);
  transform: none;
}

#view-home .hero .home-brand-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#view-home .hero .eyebrow {
  margin-top: 0;
  padding-top: 28px;
  font-family: "Luckiest Guy", "Baloo 2", sans-serif;
  font-size: clamp(21px, 5.6vw, 27px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .025em;
}

/* Shared Critter Catch display-title treatment. */
#view-home .hero #page-title,
.shop-header h1,
.tasks-header h1,
.pass-header h1,
.trophies-header h1,
.settings-header h1,
.game-title strong,
.game-overlay h2 {
  color: #f08a32;
  font-family: "Luckiest Guy", "Baloo 2", sans-serif;
  font-weight: 400;
  letter-spacing: .015em;
  text-shadow: 0 3px 0 #176b55, 0 6px 0 #176b55, 0 9px 0 rgba(14, 78, 61, .18);
}

#view-home .hero #page-title span:first-child,
#view-home .hero #page-title span:last-child {
  color: #f08a32;
}

.game-title strong {
  font-size: 26px;
  line-height: 1;
}

.game-overlay h2 {
  font-size: clamp(40px, 8vh, 64px);
  line-height: 1;
}

.player-profile.profile-close-button {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-color: #0e5543 !important;
  background: #176b55 !important;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.12), 0 4px 0 #0e4e3d !important;
}

.player-profile.profile-close-button .profile-avatar,
.player-profile.profile-close-button .top-profile-icon-art,
.player-profile.profile-close-button .profile-xp-track,
.player-profile.profile-close-button .profile-level {
  display: none !important;
}

.player-profile.profile-close-button .profile-close-x {
  display: block !important;
  color: #fff;
  text-shadow: none;
}

/* Positive catch feedback stays on-brand and avoids warning/error red. */
.reveal .reveal-kicker {
  color: #176b55;
}

/* Keep all informational UI at the top so the bottom of the playfield stays clear for tapping. */
.game-frame {
  display: flex;
  flex-direction: column;
}

.game-hud {
  order: 1;
  flex: 0 0 auto;
}

.game-footer {
  order: 2;
  flex: 0 0 auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 15px;
  color: #fff;
}

.canvas-wrap {
  order: 3;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.game-footer > span:first-child,
.game-footer > span:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
}

.game-footer .tap-hint {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0 auto;
  padding: 5px 9px;
  text-align: center;
  white-space: nowrap;
}

@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
  body { overflow: hidden !important; }
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: linear-gradient(145deg, #eff9df 0%, #dff3d7 55%, #ccebdd 100%);
  }
  body::after {
    content: "↻\A Portrait mode only\A Rotate your phone to keep playing!";
    white-space: pre-line;
    position: fixed;
    z-index: 100001;
    left: 50%;
    top: 50%;
    width: min(82vw, 420px);
    padding: 24px 22px 22px;
    transform: translate(-50%, -50%);
    border: 4px solid #176b55;
    border-radius: 24px;
    color: #176b55;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 0 rgba(14, 78, 61, .16), 0 24px 50px rgba(14, 78, 61, .2);
    text-align: center;
    font-family: "Baloo 2", sans-serif;
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 800;
    line-height: 1.28;
    pointer-events: auto;
  }
}

@media (min-width: 600px) {
  html { min-height: 100%; background: #d8ecd7; }
  body {
    min-height: 100dvh;
    padding: 18px 0;
    background: linear-gradient(145deg, #eef8df 0%, #dcefd9 52%, #cae8df 100%);
    overflow: hidden;
  }
  .app-view {
    width: min(var(--app-width), calc(100vw - 40px));
    height: calc(100dvh - 36px);
    min-height: 0;
    margin: 0 auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    border-radius: 32px;
    box-shadow: 0 22px 60px rgba(16, 72, 57, .22);
  }
  .app-view::-webkit-scrollbar { display: none; }
  #view-home { background: linear-gradient(145deg, #f7ffe8 0%, #e1f8d3 50%, #c8f1e5 100%); }
  .app-shell { min-height: auto; }
  .top-nav {
    top: 18px;
    width: min(var(--app-width), calc(100vw - 40px));
    border-radius: 32px 32px 0 0;
    overflow: hidden;
  }
  .bottom-nav {
    bottom: 18px;
    width: min(var(--app-width), calc(100vw - 40px));
    border-radius: 0 0 32px 32px;
    overflow: visible;
  }

  .bottom-nav .nav-button:first-child {
    border-bottom-left-radius: 32px;
  }

  .bottom-nav .nav-button:last-child {
    border-bottom-right-radius: 32px;
  }
  body:has(.game-screen:not(.hidden)) { padding: 0; overflow: hidden; }
}
