/* Immersive single-screen home shell */
.game-home-page.app-shell {
  height: 100vh;
  overflow: hidden;
}

.app-topbar {
  height: 58px;
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.app-logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.app-title-main {
  font-weight: 800;
  line-height: 1.0;
}

.app-title-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.1;
}

.app-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-main {
  height: calc(100vh - 58px - 64px);
  padding: 0.9rem;
}

.app-panel {
  display: none;
  height: 100%;
}

.app-panel.active {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.app-hero-card {
  border-radius: 18px;
  padding: 1rem;
  background: linear-gradient(145deg, rgba(15, 76, 129, 0.95), rgba(19, 95, 159, 0.9) 48%, rgba(15, 139, 95, 0.85));
  color: #f4fbff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.app-identity-name {
  font-size: 1.2rem;
  font-weight: 800;
}

.app-identity-meta {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  opacity: 0.95;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.app-identity-meta .dot {
  opacity: 0.65;
}

.app-primary-cta {
  width: 100%;
  margin-top: 0.75rem;
}

.app-next-mission {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.app-next-mission .label {
  font-size: 0.8rem;
  opacity: 0.85;
}

.app-next-mission .title {
  font-weight: 800;
  margin-top: 0.15rem;
}

.app-next-mission .desc {
  font-size: 0.9rem;
  opacity: 0.9;
}

.app-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.app-mini-card {
  margin: 0;
}

.app-mini-card.clickable {
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.app-mini-card.clickable:active {
  transform: translateY(1px) scale(0.99);
}

.app-mini-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* .pill moved to css/style.css (shared) */

.app-mini-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mini-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  color: var(--text-secondary);
}

.mini-line strong {
  color: var(--text-primary);
}

.app-bottomnav {
  height: 64px;
  padding: 0.4rem 0.6rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.app-tab {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  border-radius: 12px;
}

.app-tab.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Sheet */
.app-sheet {
  position: fixed;
  inset: 0;
  display: none;
}

.app-sheet.active {
  display: block;
}

.app-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 180ms var(--ease-out);
}

.app-sheet.active .app-sheet-backdrop {
  opacity: 1;
}

.app-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  padding: 0.75rem;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
  transform: translateY(12px);
  transition: transform 240ms var(--ease-out-back);
  will-change: transform;
}

.app-sheet.active .app-sheet-panel {
  transform: translateY(0);
}

.app-sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  margin: 0 auto 0.6rem;
}

.app-sheet-title {
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.app-sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.app-sheet-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  border-radius: 14px;
  background: var(--bg-secondary);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  border: none;
  cursor: pointer;
  width: 100%;
  font-size: inherit;
}

/* Panels */
.app-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* .app-stat moved to css/style.css (shared) */

.app-task-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.app-task-title { font-weight: 800; }
.app-task-desc { font-size: 0.9rem; color: var(--text-secondary); }

@media (max-width: 420px) {
  .app-row { grid-template-columns: 1fr; }
  .app-main { padding: 0.75rem; }
}
