/* ═══════════════════════════════════════
   CORE — Layout Utilities
   Containers · Stacks · Rows · Spacers
   Shell structure → see layout-core.css
   ═══════════════════════════════════════ */

/* ── Legacy compat: .app-content maps to .app-main ── */
.app-content {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.page-content {
  padding-bottom: 20px;
}

.main-content {
  position: relative;
  z-index: var(--z-base);
}

/* ── Containers & Stacks ── */

/* ── Container — max-width centered block ── */
.container {
  max-width: 420px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Stack — vertical flex with consistent gap ── */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 14px);
}
.stack--sm { gap: var(--gap-sm, 8px); }
.stack--lg { gap: 20px; }
.stack--none { gap: 0; }

/* ── Row — horizontal flex with alignment ── */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.row--between {
  justify-content: space-between;
}
.row--wrap {
  flex-wrap: wrap;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: var(--gap) 0;
}
.divider--sm { margin: var(--gap-sm) 0; }

/* ── Section — titled content block ── */
.section {
  margin-bottom: var(--gap);
}
.section__title {
  font-size: var(--fs-lg, 17px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

/* ── Spacers ── */
.spacer    { height: var(--gap); }
.spacer-sm { height: var(--gap-sm); }
.spacer-lg { height: 24px; }

/* ── Module Grid polish (2-col, consistent) ── */


/* ── Page Stack ── */
.page-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.page-stack > .section-title {
  margin: 0;
}

/* ── Tab Bar (positioning only) ── */
.tab-bar {
  flex: 0 0 auto;
  box-sizing: content-box;
  height: 56px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-sticky);
  pointer-events: auto;
}
.tab-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: auto;
}
.tab-bar-inner {
  display: flex;
  align-items: center;
  justify-content: stretch;
  width: 100%;
  max-width: none;
  height: 56px;
  margin: 0;
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
  padding: 0;
  position: relative;
  pointer-events: auto;
  z-index: var(--z-base);
}
.tab-bar * {
  pointer-events: auto;
}

/* ── Module Grid (layout) ── */
.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}


