/* Number Meadow Home (docs/STYLE.md section 11, art spec 4 and 9.3): the header, the title, the meadow
   map with its five world stops, the world accents and the footer row. */

/* Header: the buddy face, the greeting and the icon buttons; it wraps instead of shrinking a button. */
.home-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.home-buddy { width: 3.2rem; height: 3.2rem; margin-right: 0.15rem; }
.hello { flex: 1 1 2rem; min-width: 0; font-size: 1.35rem; font-weight: var(--fw-strong); line-height: var(--lh-tight); overflow-wrap: anywhere; }
/* A very long nickname shows on two lines at the most (the rest ends in dots), so it cannot push the world tiles off the screen (audit A7). */
.hello { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.home-title { text-align: center; font-size: 1.7rem; font-weight: var(--fw-strong); line-height: var(--lh-tight); }

/* The world accents: --wc the base, --wcd the deep tone (borders, filled progress steps). */
.world-addition { --wc: var(--moss); --wcd: var(--moss-deep); }
.world-subtraction { --wc: var(--sky); --wcd: var(--sky-deep); }
.world-multiplication { --wc: var(--apricot); --wcd: var(--apricot-deep); }
.world-division { --wc: var(--teal); --wcd: var(--teal-deep); }
.world-master { --wc: var(--rose); --wcd: var(--rose-deep); }

/* The map: decorative scenery behind the stops, which alternate left and right along the path. */
.map { position: relative; display: flex; flex-direction: column; gap: 0.85rem; padding-top: 0.6rem; }
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.trail.tb-line { fill: none; stroke: var(--tb); stroke-width: 16px; stroke-linecap: round; }
.trail-dots { stroke-width: 2px; }
.world-tile {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 0.55rem; width: calc(100% - 2rem); min-height: max(var(--tap-min), 4rem);
  padding: 0.3rem 0.55rem; text-align: left; color: var(--ink);
  background: var(--paper); border: 2px solid var(--wcd, var(--edge)); border-radius: var(--r-lg);
  outline: 4px solid var(--paper); box-shadow: var(--shadow-2);
}
.map .world-tile:nth-of-type(odd) { align-self: flex-start; }
.map .world-tile:nth-of-type(even) { align-self: flex-end; }
.tile-glyph { position: relative; flex: none; display: block; width: 2.9rem; height: 2.9rem; }
.glyph { display: block; width: 100%; height: 100%; }
.tile-glyph .tile-symbol {
  position: absolute; right: -0.35rem; bottom: -0.3rem; min-width: 1.4rem; height: 1.4rem; padding: 0 0.2rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; line-height: 1; font-weight: var(--fw-strong);
  background: var(--paper); color: var(--ink); border: 2px solid var(--edge); border-radius: var(--r-pill);
}
.tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tile-name { font-size: clamp(1.1rem, 5.6vw, 1.3rem); font-weight: var(--fw-strong); line-height: var(--lh-tight); }
.tile-op { font-size: clamp(0.82rem, 4.1vw, 0.95rem); font-weight: var(--fw-body); line-height: 1.2; }
/* A finished world: a quiet check leaf in the moss tone (no number, no count). */
.done-leaf { flex: none; display: block; width: 1.9rem; height: 1.9rem; color: var(--moss-deep); }
.done-leaf svg { display: block; width: 100%; height: 100%; }
.world-tile.suggested { border-width: 4px; border-color: var(--pick-deep); }

/* The Meadow Check tile sits in the footer row, so the screen height is the same with or without it. */
.home-foot .check-tile { min-height: 64px; box-shadow: var(--shadow-1); --wcd: var(--pick-deep); }
.home-foot .check-tile .tile-symbol { width: 2rem; height: 2rem; }
.check-tile .tile-symbol { flex: none; display: flex; align-items: center; justify-content: center; width: 2.9rem; height: 2.9rem; }
.check-tile .tile-symbol svg { width: 2rem; height: 2rem; }

/* Footer row: the Meadow Check tile (while one waits) and the Grown-ups button; each at least 64 px. */
/* Step 4: the footer holds up to three buttons (the Meadow Check tile while one waits, My buddy, Grown-ups) in equal columns,
   each a picture over a word, so three fit on the narrowest phone without a second row. */
/* The Help guide: padding-top 0.1rem (was 0.3rem), because the Help cell is 72 px tall and Home must still fit 360 by 580 (STYLE 11). */
.home-foot { position: relative; z-index: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: stretch; gap: var(--sp-2); padding-top: 0.1rem; }
.home-foot .adults-btn, .home-foot .mybuddy-btn, .home-foot .check-tile { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0.1rem; min-width: 0; padding: 0.2rem; text-align: center; font-size: 1rem; line-height: 1.1; white-space: normal; }
.home-foot .check-tile { width: auto; }
.home-foot .check-tile .tile-op { display: none; }
.home-foot .check-tile .tile-text { flex: none; align-items: center; }
.home-foot .check-tile .tile-name { font-size: 0.88rem; white-space: nowrap; }
.home-foot .check-tile .tile-symbol svg { width: 1.7rem; height: 1.7rem; }
.adults-btn {
  flex: none; display: inline-flex; align-items: center; gap: 0.4rem; min-width: 64px; min-height: 64px; padding: var(--sp-2);
  white-space: nowrap;
  font-size: 1.1rem; color: var(--ink); background: var(--paper); border: 2px solid var(--edge); border-radius: var(--r-md);
}
.adults-btn svg { width: 2rem; height: 2rem; flex: none; }
