/* Spaces build 3: the community's app and the space's own app step on a space's Launch tab, and its Course shop
 * row (js/spaces/home-app.js, items H-76 to H-80, H-93). Every class is spa-.
 *
 * P12 (28 Oct 2026): the cards, their heads, the rows, the switches, the choices (fh-seg, ch-opt), the fields, the
 * pills and the buttons are the course home's kit (css/funnel-home.css, css/course-home.css). What stays here is the
 * layout between them and the previews the kit has no piece for: the two phones, the Facebook ad, the post, Maya's
 * thread and the install sheet, which show what members and people on Facebook see. The Run it sheet's lines live
 * in a CBSheet outside the page. */

#route-spaces .spa { display: grid; gap: 14px; min-width: 0; }
#route-spaces .spa .spx-i { width: 16px; height: 16px; }


/* 1. The community's app: "One community app", the home screen and the settings beside it. */
#route-spaces .spa-top { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 640px) { #route-spaces .spa-top { grid-template-columns: minmax(0, 1fr); justify-items: center; } #route-spaces .spa-set { width: 100%; } }
#route-spaces .spa-set { display: grid; gap: 10px; min-width: 0; }
#route-spaces .spa-field { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--border); border-radius: 12px; padding: 4px 4px 4px 12px; background: var(--surface-2); }
#route-spaces .spa-field input, #route-spaces .spa-field textarea { flex: 1; min-width: 0; width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--text); padding: 7px 0; outline: 0; }
#route-spaces .spa-field textarea { resize: vertical; font-size: 14px; }
#route-spaces .spa-field:focus-within { border-color: var(--accent); }
#route-spaces .spa-phone { width: 220px; border-radius: 30px; background: var(--text); padding: 7px; }
#route-spaces .spa-scr { border-radius: 24px; background: color-mix(in srgb, var(--spa-c, var(--accent)) 16%, var(--surface)); min-height: 280px; padding: 12px 14px; display: grid; gap: 16px; align-content: start; }
#route-spaces .spa-clock { justify-self: center; font-size: 12px; font-weight: 700; color: var(--text); }
#route-spaces .spa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; }
#route-spaces .spa-slot { display: grid; justify-items: center; gap: 5px; }
#route-spaces .spa-icon { width: 42px; height: 42px; border-radius: 12px; overflow: hidden; background: #fff; display: grid; place-items: center; }
#route-spaces .spa-icon.spa-blank { background: rgba(255, 255, 255, .7); }
#route-spaces .spa-icon img { width: 100%; height: 100%; object-fit: cover; }
#route-spaces .spa-ini { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; }
#route-spaces .spa-an { width: 78px; font-size: 9.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
#route-spaces .spa-an.spa-blank { width: 28px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .8); }
#route-spaces .spa-mine .spa-icon { box-shadow: 0 0 0 2.5px var(--spa-c, var(--accent)), 0 6px 14px -6px rgba(21, 23, 43, .5); }
#route-spaces .spa-sws { display: flex; flex-wrap: wrap; gap: 10px; }
#route-spaces .spa-swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--border); cursor: pointer; padding: 0; }
#route-spaces .spa-swatch.spa-on { box-shadow: 0 0 0 2.5px var(--text); }
#route-spaces .spa-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* 2. Turn it into an app. */
#route-spaces .spa-pick { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
#route-spaces .spa-pick b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
#route-spaces .spa-pick small { display: block; font-size: 13.5px; color: var(--text-2); margin-top: 3px; }
#route-spaces .spa-make { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 20px; align-items: start; }
#route-spaces .spa-col { display: grid; gap: 10px; min-width: 0; }
@media (max-width: 700px) { #route-spaces .spa-make { grid-template-columns: minmax(0, 1fr); justify-items: center; } #route-spaces .spa-col { width: 100%; } #route-spaces .spa-phwrap { order: -1; } }
#route-spaces .spa-capn { display: none; }
@media (max-width: 700px) { #route-spaces .spa-capw { display: none; } #route-spaces .spa-capn { display: inline; } }
#route-spaces .spa-thread { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--accent-soft); border-radius: 14px; padding: 12px; }
#route-spaces .spa-msg { display: flex; gap: 8px; align-items: flex-start; }
#route-spaces .spa-msg p { margin: 0; font-size: 14px; line-height: 1.4; border-radius: 4px 14px 14px 14px; padding: 8px 12px; max-width: 100%; }
#route-spaces .spa-msg.spa-m p { background: var(--accent-softer, var(--accent-soft)); border: 1px solid var(--accent-soft); }
#route-spaces .spa-msg.spa-u { justify-content: flex-end; }
#route-spaces .spa-msg.spa-u p { background: var(--surface-3); border-radius: 14px 4px 14px 14px; }
#route-spaces .spa-sc .spx-chip { font-size: 13.5px; padding: 6px 12px; }
#route-spaces .spa-own { flex-wrap: wrap; }
#route-spaces .spa-own input, #route-spaces .spa-own textarea[data-grow] { flex: 1 1 180px; }
/* Grows with what is said or typed (voice-input.js grow, Alex 29 Oct 2026), up to about six lines, then scrolls. */
#route-spaces .spa-field textarea[data-grow] { resize: none; display: block; box-sizing: border-box; margin: 0; line-height: 1.45; max-height: 9.5em; overflow-y: hidden; }
#route-spaces .spa-circle { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; }
#route-spaces .spa-phwrap { display: grid; gap: 6px; justify-items: center; text-align: center; }
#route-spaces .spa-ph { width: 236px; border-radius: 34px; background: #14121c; padding: 8px; }
#route-spaces .spa-phin { border-radius: 27px; background: var(--surface-2); min-height: 400px; padding: 16px 14px; display: grid; gap: 8px; align-content: start; text-align: left; }
#route-spaces .spa-who { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); }
#route-spaces .spa-who .spa-whoimg, #route-spaces .spa-who .spa-ini { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; font-size: 8px; flex: none; }
#route-spaces .spa-tt2 { font-family: 'Fraunces', Georgia, serif; font-size: 21px; line-height: 1.1; }
#route-spaces .spa-free { display: inline-flex; align-items: center; gap: 6px; justify-self: start; font-size: 12.5px; font-weight: 700;
  color: color-mix(in srgb, var(--spa-c, var(--accent)) 70%, #000); background: color-mix(in srgb, var(--spa-c, var(--accent)) 14%, #fff); border-radius: 999px; padding: 3px 10px; }
#route-spaces .spa-free .spx-i { width: 13px; height: 13px; }
#route-spaces .spa-streak { display: flex; gap: 5px; }
#route-spaces .spa-streak i { width: 22px; height: 8px; border-radius: 4px; background: var(--border); }
#route-spaces .spa-streak i.spa-on { background: var(--spa-c, var(--accent)); }
#route-spaces .spa-line { font-size: 12px; color: var(--text-2); }
#route-spaces .spa-task { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 11px 12px; display: grid; gap: 4px; }
#route-spaces .spa-task b { font-family: 'Fraunces', Georgia, serif; font-size: 17px; line-height: 1.2; }
#route-spaces .spa-tiny { font-size: 11px; color: var(--text-3); }
#route-spaces .spa-tick { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--good); font-weight: 600; }
#route-spaces .spa-prow { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; font-size: 12.5px; line-height: 1.3; }
#route-spaces .spa-prow > .spx-i { color: var(--spa-c, var(--accent)); }
#route-spaces .spa-prow small { display: block; font-size: 11px; color: var(--text-3); }
#route-spaces .spa-scale { display: flex; gap: 2px; margin-top: 4px; }
#route-spaces .spa-scale i { font-style: normal; font-size: 10px; width: 15px; height: 18px; display: grid; place-items: center; border-radius: 4px; background: var(--surface-3); color: var(--text-2); }
#route-spaces .spa-scale i.spa-on { background: var(--spa-c, var(--accent)); color: #fff; }
/* The app's own button, drawn inside the preview: soft, never a second filled button on the screen. */
#route-spaces .spa-go { text-align: center; margin-top: 4px; background: color-mix(in srgb, var(--spa-c, var(--accent)) 14%, #fff);
  color: color-mix(in srgb, var(--spa-c, var(--accent)) 70%, #000); border: 1.5px solid var(--spa-c, var(--accent)); font-weight: 600; font-size: 13.5px; border-radius: 12px; padding: 9px 14px; }
#route-spaces .spa-give { display: grid; gap: 8px; }
#route-spaces .spa-gd { display: grid; gap: 10px; justify-items: start; }
#route-spaces .spa-ad { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
#route-spaces .spa-adh { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
#route-spaces .spa-adh .spa-adimg0, #route-spaces .spa-adh .spa-ini { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; font-size: 12px; }
#route-spaces .spa-adh b { display: block; font-size: 13.5px; }
#route-spaces .spa-adh small { display: block; font-size: 11.5px; color: var(--text-3); }
#route-spaces .spa-fb { margin-left: auto; display: inline-flex; }
#route-spaces .spa-fb svg, #route-spaces .spa-opt .spa-ti svg { width: 18px; height: 18px; }
#route-spaces .spa-adp { margin: 0; padding: 0 12px 10px; font-size: 13.5px; line-height: 1.4; }
#route-spaces .spa-adf { margin: 0 12px 10px; }
#route-spaces .spa-adimg { display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; }
#route-spaces .spa-adnone { display: grid; place-items: center; background: color-mix(in srgb, var(--spa-c, var(--accent)) 18%, var(--surface)); }
#route-spaces .spa-adnone .spa-ini, #route-spaces .spa-adnone img { width: 72px; height: 72px; border-radius: 18px; font-size: 24px; object-fit: cover; }
#route-spaces .spa-adf2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface-3); padding: 10px 12px; }
#route-spaces .spa-adf2 small { display: block; font-size: 11px; color: var(--text-3); }
#route-spaces .spa-adf2 b { display: block; font-size: 14px; }
#route-spaces .spa-adbtn { flex: none; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; font-weight: 600; font-size: 13px; padding: 7px 12px; }
#route-spaces .spa-adact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#route-spaces .spa-adact .spx-tag .spx-i { width: 13px; height: 13px; }
#route-spaces .spa-maya { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--accent-deep, var(--accent)); font-weight: 600; }
#route-spaces .spa-post { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; width: 100%; max-width: 520px; }
#route-spaces .spa-post .spa-postimg, #route-spaces .spa-post .spa-ini { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; font-size: 10px; }
#route-spaces .spa-post p { margin: 0; font-size: 14px; background: var(--surface-3); border-radius: 4px 14px 14px 14px; padding: 8px 12px; overflow-wrap: anywhere; }
#route-spaces .spa-addr { display: flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--text-2);
  background: var(--surface-3); border: 1px solid var(--border); border-radius: 10px; padding: 5px 5px 5px 10px; min-width: 0; width: 100%; max-width: 520px; }
#route-spaces .spa-addr span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 3. When members get it: her phone at the moment, with the one install sheet over it. */
#route-spaces .spa-mph { width: 236px; border-radius: 34px; background: #14121c; padding: 8px; }
#route-spaces .spa-mphin { position: relative; overflow: hidden; border-radius: 27px; background: var(--surface-2); min-height: 560px; padding: 16px 14px; display: grid; gap: 10px; align-content: start; }
#route-spaces .spa-did { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--good-soft); color: var(--good); font-weight: 700; border-radius: 14px; padding: 11px; font-size: 14px; }
#route-spaces .spa-did .spx-i { width: 18px; height: 18px; }
#route-spaces .spa-sheetpos { position: absolute; left: 0; right: 0; bottom: 0; }
#route-spaces .spa-sheet { background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px -12px rgba(21, 23, 43, .35); padding: 14px; display: grid; gap: 8px; }
#route-spaces .spa-sheet b { font-size: 15px; }
#route-spaces .spa-m { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
#route-spaces .spa-chipsm .spx-chip { font-size: 12.5px; padding: 4px 11px; }
#route-spaces .spa-how { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#route-spaces .spa-how li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
#route-spaces .spa-sbtn { text-align: center; font-weight: 600; font-size: 13.5px; border-radius: 999px; padding: 8px 12px; border: 1.5px solid var(--accent);
  color: var(--accent-deep, var(--accent)); background: var(--accent-soft); }
#route-spaces .spa-not { text-align: center; font-size: 13px; font-weight: 600; text-decoration: underline; color: var(--text-2); }

/* 4. Next for your app (plain rows, no "Later" tags). */

/* The Run it sheet's lines live in a CBSheet, outside #route-spaces. */
.spa-sl { display: grid; gap: 10px; }
.spa-sl > div { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.spa-sl .spx-i { width: 17px; height: 17px; flex: none; color: var(--accent-deep, var(--accent)); margin-top: 2px; }

/* P12: the lines between the kit's pieces */
#route-spaces .spa .fh-todo + .fh-card-b,
#route-spaces .spa .fh-todo + .spa-prog,
#route-spaces .spa .spa-body,
#route-spaces .spa .spa-path,
#route-spaces .spa .ch-card-rows + .fh-card-b { border-top: 1px solid var(--fh-border); }
#route-spaces .spa .spa-prog .ch-ladder { padding-bottom: 6px; }
#route-spaces .spa .spa-prog .fh-card-b { padding-top: 0; margin: 0; }
#route-spaces .spa .spa-prog .ch-lad { grid-template-columns: 92px minmax(0, 1fr) 44px 52px; }
#route-spaces .spa .spa-path > .fh-card-b { padding-bottom: 4px; }
#route-spaces .spa .spa-path .fh-todo-row:first-child { border-top: 0; }
#route-spaces .spa .ch-opts.spa-refs, #route-spaces .spa .ch-opts.spa-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#route-spaces .spa .ch-opt .ch-st { align-self: flex-start; margin-top: 4px; }
#route-spaces .spa .spa-moment { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 20px; align-items: start; }
#route-spaces .spa .spa-adact .ch-st { align-self: center; }
@media (max-width: 900px) { #route-spaces .spa .ch-opts.spa-refs, #route-spaces .spa .ch-opts.spa-opts { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { #route-spaces .spa .spa-moment { grid-template-columns: minmax(0, 1fr); justify-items: center; } #route-spaces .spa .spa-when { width: 100%; } }
