/* Home, Unsorted ideas, a project's people and Search on a computer (ui/home-page.js, ideas-page.js, project-people.js, search-page.js).
   Colors come only from the theme variables: Home, Search and the lists use the person's accent (--bp-neon); a project or album page
   takes its art's color through .page.accented. */

/* Home */
.home-page { --home-card: minmax(240px, 320px); max-width: 1100px; margin-inline: 0; padding-top: 28px; }
.home-page.first-run { max-width: 640px; padding-top: 14vh; }
.home-page.first-run .lead { margin-bottom: 6px; }
.home-page.first-run .first-run-second { margin: 0; }
.first-run-actions { flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.home-section { margin: 0 0 40px; }
.home-heading { display: flex; align-items: baseline; justify-content: flex-start; gap: 14px; margin: 0 0 14px; }
.home-heading .section-label { margin: 0; font: 700 20px/1.2 var(--sans); color: var(--bp-text); letter-spacing: 0; }
.home-heading-end { display: inline-flex; align-items: baseline; gap: 14px; }
.home-heading .count { font: 600 15px var(--mono); color: var(--bp-muted-text); }
.see-all { padding: 4px 2px; font-size: 14px; font-weight: 600; color: var(--bp-neon); }
.see-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.home-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, var(--home-card)); justify-content: start; gap: 12px; }
.home-tiles > li { min-width: 0; }
.home-tile { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 14px; width: 100%; text-align: left; padding: 0 14px 0 0; border-radius: 10px; background: var(--bp-panel); overflow: hidden; }
.home-tile:hover { background: color-mix(in srgb, var(--bp-panel) 80%, var(--bp-text) 8%); }
.home-tile-art { width: 64px; height: 64px; object-fit: cover; display: grid; place-items: center; background: var(--hover); color: var(--bp-faint); }
.home-tile-art .icon { width: 24px; height: 24px; }
.home-tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-tile-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-tile-title { font-weight: 700; }
.home-ideas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, var(--home-card)); justify-content: start; gap: 12px; }
.home-idea { min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: var(--bp-panel); }
.home-idea.playing { outline: 1px solid var(--bp-neon); }
.home-idea-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.home-idea-body { display: flex; flex-direction: column; gap: 3px; text-align: left; min-width: 0; padding: 0; }
.home-idea-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-idea-line { font-size: 13px; line-height: 1.35; color: color-mix(in srgb, var(--bp-text) 88%, transparent); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.home-shared { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 560px; font-family: inherit; }
.home-shared-card { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 14px; border-radius: 12px; background: var(--bp-panel); color: inherit; text-decoration: none; }
.home-shared-card:hover { background: color-mix(in srgb, var(--bp-panel) 80%, var(--bp-text) 8%); }
.home-shared-card > .icon:first-child { flex: none; width: 20px; height: 20px; color: var(--bp-muted-text); }
.home-shared-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-shared-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Round faces: a project's people, and who said something */
.face { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--selected); color: var(--bp-text); font: 700 14px var(--sans); }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face.extra { background: var(--hover); font-size: 12px; color: var(--bp-muted-text); }
.people-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -12px 0 26px; }
/* Invite: a quiet capsule beside the faces (app.css control family), its + in the accent; never a dashed outline. */
.invite-ring { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--fill); color: var(--bp-text); font: var(--control-font); white-space: nowrap; }
.invite-ring .icon { color: var(--bp-neon); }
.invite-ring .icon { width: 14px; height: 14px; }
.invite-ring:hover:not(:disabled) { background: var(--fill-hover); }

/* Unsorted ideas */
.ideas-page .inbox-head { margin-bottom: 24px; }
.idea-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.idea-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 12px; background: var(--bp-panel); min-width: 0; }
.idea-card.playing { outline: 1px solid var(--bp-neon); }
.idea-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.idea-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.idea-title { font-weight: 700; overflow-wrap: anywhere; }
.idea-open { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 0; text-align: left; }
.idea-open:hover .idea-title { text-decoration: underline; text-underline-offset: 3px; }
.idea-line { margin: 0; font-size: 14px; line-height: 1.4; color: color-mix(in srgb, var(--bp-text) 88%, transparent); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.idea-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.idea-action { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.idea-action .icon, .idea-delete .icon { width: 15px; height: 15px; }
.idea-delete { margin-left: auto; }
dialog.scrap-sheet { width: min(520px, calc(100vw - 32px)); }
.scrap-text { width: 100%; box-sizing: border-box; min-height: 180px; margin: 10px 0 14px; padding: 9px 11px; resize: vertical; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bp-background); color: var(--bp-text); font-family: var(--mono); }
.scrap-text::placeholder { color: var(--bp-faint); }
.scrap-title { width: 100%; }
.scrap-sheet [hidden] { display: none !important; }
.scrap-note { margin: -6px 0 12px; min-height: 1.2em; }
.scrap-note.error { color: var(--bp-text); }
.scrap-ask { margin: 0 0 14px; }
.scrap-ask p { margin: 0 0 10px; font-weight: 700; }

@media (max-width: 700px) {
  .home-page { padding-inline: 16px; }
  .home-tiles { grid-template-columns: 1fr 1fr; }
  .home-tile { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; }
  .home-tile-art { width: 52px; height: 52px; }
  .idea-grid { grid-template-columns: 1fr; }
}

/* Search: the panel under the top bar's field, then the results page */
.search { position: relative; }
.search-pop { display: none; position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: min(380px, calc(100vw - 32px)); padding: 16px 18px 18px; border-radius: 12px;
  background: var(--bp-panel); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); }
.search:focus-within > .search-pop { display: block; }
.search-label { margin: 0; font: 700 12px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--bp-muted-text); }
.search-pop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.search-recent { margin: 0 0 18px; }
.search-recent-list, .search-finds-list { list-style: none; margin: 0; padding: 0; }
.search-recent-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 6px; border-radius: 8px; text-align: left; font-size: 15px; }
.search-recent-row:hover { background: var(--hover); }
.search-recent-row .icon { width: 15px; height: 15px; color: var(--bp-muted-text); flex: none; }
.search-finds .search-label { margin-bottom: 10px; }
.search-finds-list { list-style: disc; padding-left: 18px; color: var(--bp-muted-text); font-size: 14px; line-height: 1.7; }
.search-finds-list li::marker { color: var(--bp-faint); }
.search-page { max-width: 860px; margin-inline: 0; padding-top: 24px; }
.search-tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0 0 22px; border-bottom: 1px solid var(--line); }
.search-tab { min-width: 24px; padding: 8px 2px 10px; margin-bottom: -1px; font-size: 15px; font-weight: 600; color: var(--bp-muted-text); border-bottom: 2px solid transparent; }
.search-tab:hover { color: var(--bp-text); }
.search-tab[aria-selected="true"] { color: var(--bp-text); border-bottom-color: var(--bp-neon); }
.result-group { margin: 0 0 28px; }
.result-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-width: 720px; }
.result-row { display: flex; align-items: center; gap: 8px; border-radius: 10px; }
.result-row:hover, .result-row.playing { background: var(--hover); }
.result-open { display: flex; align-items: center; gap: 14px; flex: 0 1 auto; min-width: 0; padding: 8px 10px; text-align: left; border-radius: 10px; }
.result-art { width: 44px; height: 44px; flex: none; border-radius: 8px; object-fit: cover; display: grid; place-items: center; background: var(--hover); color: var(--bp-faint); }
.result-art .icon { width: 20px; height: 20px; }
.result-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.result-title { font-weight: 700; overflow-wrap: anywhere; }
.result-line { font-size: 14px; color: color-mix(in srgb, var(--bp-text) 88%, transparent); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result-line.mono { font-family: var(--mono); font-size: 13px; }
.result-play { flex: none; margin-right: 6px; }
.result-none { margin-top: 8px; }
.search-note { margin: 10px 0 0; max-width: 60ch; }
.search-bands-line { margin-top: 22px; }
.result-band .search-pop-head { justify-content: flex-start; align-items: baseline; }
.search-band-more { margin-left: auto; }
.search-tab:focus-visible { outline: 2px solid var(--bp-neon); outline-offset: 2px; border-radius: 4px; }

/* The Unsorted ideas header wraps instead of squeezing: the title stays on one line, the buttons drop below when the window is narrow. */
.ideas-page .inbox-head { flex-wrap: wrap; }
.ideas-page .inbox-intro { flex: 1 1 100%; max-width: none; }
.ideas-page .inbox-intro h1 { white-space: nowrap; }
.ideas-page .inbox-intro p { max-width: 60ch; }
.ideas-page .inbox-record { flex-wrap: wrap; }
/* First-run Home's buttons from "What brings you to Bardpot?" (ui/first-run.js): up to three large, calm choices above the usual ones. */
.first-run-shortcuts { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 10px; }
.home-page.first-run:has(.first-run-shortcuts) { max-width: 700px; }
.first-run-shortcut { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; border-radius: 14px; text-align: left;
  border: 1px solid color-mix(in srgb, var(--bp-neon) 35%, var(--line)); background: color-mix(in srgb, var(--bp-neon) 7%, var(--bp-background)); color: var(--bp-text);
  font-weight: 700; font-size: 16px; cursor: pointer; transition: border-color var(--motion-fade), background var(--motion-fade); }
.first-run-shortcut:hover:not(:disabled) { border-color: var(--bp-neon); background: color-mix(in srgb, var(--bp-neon) 13%, var(--bp-background)); }
.first-run-shortcut:focus-visible { outline: 2px solid var(--bp-neon); outline-offset: 2px; }
.first-run-shortcut .shortcut-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bp-neon); color: var(--on-neon); }
.first-run-shortcut .shortcut-icon .icon { width: 20px; height: 20px; }
.first-run-shortcut .shortcut-text { display: grid; gap: 2px; }
.first-run-shortcut .shortcut-hint { color: var(--bp-muted-text); font-size: 13px; font-weight: 400; }
.first-run-shortcuts + .first-run-actions { margin-top: 14px; }

/* Home's Metronome and Tuner (ui/home-tools.js; phone/browse.css has the phone's): two roomy buttons, side by side until the text is too large */
.home-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11em), 1fr)); gap: 12px; max-width: 460px; margin: 0 0 32px; }
.home-page.first-run .home-tools { margin-bottom: 28px; }
.home-tool { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px 10px 12px; border-radius: 14px; background: var(--bp-panel); color: var(--bp-text); text-align: left; transition: transform var(--motion-quick) ease, background-color var(--motion-quick) ease; }
.home-tool:hover { background: color-mix(in srgb, var(--bp-panel) 80%, var(--bp-text) 8%); }
.home-tool:active { transform: scale(0.97); }
.home-tool-face { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; color: var(--bp-neon); background: color-mix(in srgb, var(--bp-neon) 14%, transparent); border: 1.5px solid color-mix(in srgb, var(--bp-neon) 55%, transparent); }
.home-tool-face .icon { width: 21px; height: 21px; }
.home-tool-face.on { background: var(--bp-neon); border-color: var(--bp-neon); color: var(--on-neon); } /* the click playing, the tuner listening */
.home-tool-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.home-tool-title { font-weight: 600; font-size: 15px; }
.home-tool-detail { font-size: 12px; color: var(--bp-muted-text); }
@media (prefers-reduced-motion: reduce) { .home-tool { transition: none; } .home-tool:active { transform: none; } }
