/* Number Meadow Help (child/help-ui.js): the Help button on the title screen and Home, and the Help screen with its three tabs.
   Existing tokens only (the one runtime name set here is --u, the counter size of the card pictures). No motion of its own:
   the screen enter comes from motion.css, the chevron turns without a transition. */

/* The Help button: the picture over the word, at least 72 px both ways, a quiet paper fill like the Grown-ups button. */
.help-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem;
  min-width: 72px; min-height: 72px; padding: 0.2rem 0.4rem;
  font-size: 1rem; line-height: 1.1; color: var(--ink); background: var(--paper); border: 2px solid var(--edge); border-radius: var(--r-md);
}
.help-btn svg { width: 2rem; height: 2rem; flex: none; }
/* Title: Help on the left, Sound on the right, on the same row. */
.title-foot { justify-content: space-between; align-items: flex-end; }
/* Home: Help is one more footer cell, with the cell rules of My buddy and Grown-ups. */
.home-foot .help-btn { min-width: 72px; padding: 0.2rem; text-align: center; white-space: normal; }
/* Five cells (an old Meadow Check waits while Just play is on): the gap drops so each cell keeps at least 64 px at 360 px wide. */
.foot-five .help-btn { min-width: 64px; }
@media (max-height: 699px) {
  .foot-five { gap: var(--sp-1); }
  /* "My buddy" wraps to two lines in a five-cell row: a smaller face keeps the row at the 72 px of the Help cell */
  .foot-five .mybuddy-mini { width: 1.7rem; height: 1.7rem; }
}
@media (max-width: 359px) {
  .foot-four { gap: var(--sp-1); }
  /* four cells at 320 px: "Grown-ups" stays on one line (wrapped, its second line fell below the screen edge) */
  .home-foot .adults-btn span { white-space: nowrap; font-size: 0.7rem; } /* 0.8rem on one line is 68 px; the cell has 62.6 px inside */
  .foot-five { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The Help screen */
.help-screen { gap: var(--sp-3); padding-bottom: var(--sp-5); }
.help-back-btn {
  flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem;
  padding: 0.2rem 0.4rem; font-size: 1rem; line-height: 1.1;
}
.help-back-btn svg { width: 2rem; height: 2rem; flex: none; }
/* The tab row: it wraps instead of shrinking a tab; the selected tab has a fill AND a thicker border (not colour alone). */
.help-tabs { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.help-tab { flex: 1 1 8rem; padding: 0.3rem 0.6rem; font-size: var(--fs-m); line-height: var(--lh-tight); overflow-wrap: anywhere; }
.help-tab[aria-selected="true"] { background: var(--pick); border: 4px solid var(--pick-deep); }
.help-panel { display: flex; flex-direction: column; gap: var(--sp-3); }
.help-intro { font-size: 1.15rem; font-weight: var(--fw-strong); line-height: var(--lh-body); overflow-wrap: anywhere; }

/* How to play: the cards, one column, two from 700 px wide, three from 1100 px wide. */
.help-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
@media (min-width: 700px) { .help-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .help-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.help-card {
  display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3);
  background: var(--paper); border: 2px solid var(--edge); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.help-art { --u: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); min-height: 72px; color: var(--ink); }
.help-art .help-face { width: 3.5rem; height: 3.5rem; }
.help-icon, .help-glyph { display: block; flex: none; width: 3rem; height: 3rem; }
.help-icon svg, .help-glyph svg { display: block; width: 100%; height: 100%; }
.help-seeds { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); }
.help-art .basket { position: relative; flex: none; }
.help-card-title { font-size: var(--fs-m); font-weight: var(--fw-strong); line-height: var(--lh-tight); overflow-wrap: anywhere; }
.help-card-text { font-size: 1.15rem; line-height: var(--lh-body); overflow-wrap: anywhere; }
.help-read {
  align-self: flex-start; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem;
  min-width: 72px; min-height: 72px; padding: 0.2rem 0.6rem; font-size: 1rem; line-height: 1.1;
}
.help-read svg { width: 2rem; height: 2rem; flex: none; }

/* The adult tabs: a short contents list, then groups of sections that open and close. Body text at least 16 px. */
.help-toc { display: flex; flex-direction: column; gap: var(--sp-2); }
.help-jump { display: flex; align-items: center; justify-content: flex-start; width: 100%; text-align: left; font-size: var(--fs-s); line-height: var(--lh-tight); overflow-wrap: anywhere; }
.help-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.help-h2 { margin-top: var(--sp-3); font-size: var(--fs-m); font-weight: var(--fw-strong); line-height: var(--lh-tight); overflow-wrap: anywhere; }
.help-sec > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  min-height: 64px; padding: var(--sp-2) var(--sp-3); cursor: pointer;
  color: var(--ink); background: var(--paper); border: 2px solid var(--edge); border-radius: var(--r-md);
}
.help-sec > summary::-webkit-details-marker { display: none; }
.help-h3 { min-width: 0; font-size: 1.1rem; font-weight: var(--fw-strong); line-height: var(--lh-tight); overflow-wrap: anywhere; }
.help-chev { flex: none; display: block; width: 1.6rem; height: 1.6rem; }
.help-chev svg { display: block; width: 100%; height: 100%; }
.help-sec[open] .help-chev { transform: rotate(180deg); }
.help-body {
  display: flex; flex-direction: column; gap: var(--sp-2); max-width: 46rem; padding: var(--sp-2) var(--sp-3) var(--sp-3);
  font-size: var(--fs-s); font-weight: var(--fw-body); line-height: var(--lh-body); overflow-wrap: anywhere;
}
.help-list { margin: 0; padding-left: 1.4rem; }
.help-h4 { margin: var(--sp-2) 0 0; font-size: var(--fs-s); font-weight: var(--fw-strong); }
.help-note, .help-hyp { padding: var(--sp-2) var(--sp-3); background: var(--sunk); border-radius: var(--r-sm); }
.help-hyp { font-weight: var(--fw-strong); }
.help-qa { margin: 0; }
.help-qa dt { font-weight: var(--fw-strong); }
.help-qa dd { margin: 0 0 var(--sp-2) 0; }
.help-version { font-size: var(--fs-s); overflow-wrap: anywhere; }
