/* ============================================================
   APP — layout for the resident screen. Everything visual comes
   from the design tokens; this file only places things.
   ============================================================ */

#root {
  max-width: 32rem;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.app-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.app-header h1 { font-size: var(--text-xl); }

.app-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.app-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.app-nav__label {
  flex: 1;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-strong);
}
/* Arrows are square: a 44px target either side of the label, which is
   what a thumb reaches for on a phone held one-handed. */
.app-nav .ssb-btn { min-width: var(--touch-min); padding: var(--space-2); }

.app-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 12rem;
}
/* The month grid needs breathing room the slot list doesn't. */
.app-body > .ssb-month { padding: var(--space-3); }
.app-body > div:not(.ssb-month) { padding: var(--space-3); }
.app-body > ul { padding: 0; }
.app-body > ul > li:last-child .ssb-slot { border-bottom: 0; }

.app-footer {
  font-size: var(--text-xs);
  color: var(--text-faint);
  text-align: center;
}

/* Wider screens get a roomier column, but the app stays a single column.
   A laundry calendar has one job and does not need a sidebar. */
@media (min-width: 640px) {
  #root { max-width: 36rem; padding-inline: var(--space-4); }
  .app-controls { flex-direction: row; align-items: center; justify-content: space-between; }
  .app-nav { flex: 1; max-width: 20rem; }
}
