/* view: places — Places (3c), the keeps pocket, the floor page (/people).
 * Uses the tokens listen.css defines; nothing here redefines one. Light
 * tone (the listener's). Every pressable thing is at least var(--tap). */

/* ---- the header: the title alone (the top line carries the way out) -- */

.places-header {
  padding: 16px var(--gutter) 0;
}

.places-title {
  font-size: var(--t-head);
  letter-spacing: -0.02em;
}

.places-empty {
  margin: 24px var(--gutter) 0;
  font-size: 20px;
  line-height: 1.3;
  color: var(--fg-muted);
  text-wrap: pretty;
}

/* ---- rows: rooms, people, the floor, the lookback ---------------------- */

.places-list {
  padding: 0 var(--gutter);
}

.places-list > li {
  border-top: 1px solid var(--line);
}

.places-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: var(--row-min);
  padding: 10px 0;
  color: var(--fg);
}

.places-row:hover {
  text-decoration: none;
}

.places-row-person {
  grid-template-columns: 56px minmax(0, 1fr) auto;
}

.places-thumb {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--r-thumb);
  background: var(--still-bg) center / cover no-repeat;
}

.places-avatar {
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.places-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* names wrap, never truncate (cold review 2026-10-09) */
.places-name {
  font-size: var(--t-row);
  line-height: 1.15;
  color: var(--fg);
  overflow-wrap: anywhere;
}

.places-left {
  font: 600 var(--t-meta) / 1.4 var(--sans);
  color: var(--accent);
}

.places-arrow {
  color: var(--accent);
  font-size: 18px;
}

/* A row whose line names a song or an originator (places.js `openRow`): the
   name is the row's link, stretched over the whole row so the still opens it
   too, and the line's names sit above it as links of their own. */
.places-row-open {
  position: relative;
}

.places-open::after {
  content: "";
  position: absolute;
  inset: 0;
}

.places-open:hover {
  text-decoration: none;
}

.places-row-open a.noun {
  position: relative;
  z-index: 1;
}

/* ---- the lookback, by day --------------------------------------------- */

.places-played .section-head {
  flex-wrap: wrap;
}

.places-played .section-head .label {
  margin-right: auto;
}

.places-clear {
  min-height: var(--tap);
}

.places-day-label {
  padding: 12px var(--gutter) 4px;
  color: var(--fg-muted);
}

.places-play {
  display: grid;
  /* 80px at 16:9 is 45px: the still is a link, so it clears the tap floor */
  grid-template-columns: 80px minmax(0, 1fr) auto var(--tap-round);
  gap: 10px;
  align-items: center;
  min-height: var(--row-min);
  padding: 6px 0;
}

.places-still {
  display: block;
  min-height: var(--tap);
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: var(--still-bg) center / cover no-repeat;
}

/* the lookback's name is its own link: a tap tall without growing the row —
   the hit area reaches over the line under it, which is not pressed */
.places-play .places-name {
  position: relative;
  font-size: var(--t-body);
  padding-block: 12px;
  margin-block: -12px;
}

.places-play .meta {
  overflow-wrap: anywhere;
}

/* the line's song and originator sit above the name's reach */
.places-play .meta a.noun {
  position: relative;
  z-index: 1;
}

.places-play.is-playing .places-name,
.places-now {
  color: var(--accent);
}

.places-note {
  padding: 12px var(--gutter) 0;
}

/* ---- the pocket: Kept, folders, filing, the sign-in line --------------- */

.pocket-folder,
.pocket-loose,
.pocket-shared,
.pocket-people {
  padding: 0 var(--gutter) 12px;
}

.pocket-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 8px;
}

.pocket-folder-name {
  font-size: var(--t-row);
}

.pocket-sub {
  font: 700 var(--t-label) / 1.3 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 8px 0 8px;
}

.pocket-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 561px) {
  .pocket-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pocket-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pocket-still {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-tile);
  background: var(--still-bg) center / cover no-repeat;
}

.pocket-name {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  font-size: var(--t-body);
  line-height: 1.15;
  color: var(--fg);
  overflow-wrap: anywhere;
}

.pocket-song {
  margin-top: -10px;
  overflow-wrap: anywhere;
}

.pocket-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
}

.pocket-rows > li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--row-min);
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

/* a kept person's name is the row's link: a tap tall */
.pocket-rows a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  font-size: var(--t-row);
  color: var(--fg);
  overflow-wrap: anywhere;
}

.pocket-filing {
  margin: 4px var(--gutter) 0;
  border-top: 1px solid var(--line);
}

.pocket-summary {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  font: 600 var(--t-meta) / 1.3 var(--sans);
  color: var(--accent);
  cursor: pointer;
}

.pocket-file-rows > li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.pocket-file-name {
  font-size: var(--t-small);
  overflow-wrap: anywhere;
}

.pocket-file {
  display: flex;
  gap: 8px;
}

.pocket-file input,
.pocket-link {
  flex: 1;
  min-width: 0;
  min-height: var(--tap);
  /* 16px: iOS zooms the page into any field set smaller */
  font-size: 16px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
}

.pocket-where {
  padding: 8px var(--gutter) 0;
}

.places-empty + .pocket-where,
.places-recent + .pocket-where,
.home-section + .pocket-where {
  padding-top: 16px;
}

.pocket-signin {
  min-height: var(--tap);
  color: var(--accent);
  font-weight: 600;
}

/* ---- the account door and removing (ledger 324) ----------------------- */

/* The account, open under the line: a card, the one object here. */
.pocket-account {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px var(--gutter) 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}

.pocket-who {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.pocket-who .meta {
  overflow-wrap: anywhere;
}

.pocket-initial {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

.pocket-account-text,
.pocket-ask-text {
  font-size: var(--t-small);
  color: var(--body-ink);
  text-wrap: pretty;
}

.pocket-ask {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pocket-account .pocket-ask {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pocket-tidy + .pocket-ask,
.pocket-backup + .pocket-ask {
  margin: 4px var(--gutter) 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}

.pocket-ask-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* The pill that does the thing asked about: ink, not the accent. */
.pill.solid {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}

/* "Choose what to remove · Clear everything": the line under the line. */
.pocket-tidy {
  padding: 0 var(--gutter);
}

.pocket-act {
  min-height: var(--tap);
  color: var(--accent);
  font-weight: 600;
}

.pocket-act[aria-pressed="true"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pocket-hint {
  display: block;
  color: var(--fg-muted);
}

.pocket-cleared {
  padding: 8px var(--gutter) 0;
}

/* The one backup: where it is, Restore it · Remove the backup (ledger 443). */
.pocket-backup {
  padding: 0 var(--gutter);
  text-wrap: pretty;
}

.pocket-backup-text {
  display: block;
}

.pocket-backup-said {
  padding: 4px var(--gutter) 0;
}

/* Set aside (ledger 449): one quiet section, a name and its Undo per row. */
.places-aside-note {
  padding: 0 var(--gutter) 8px;
}

.places-aside-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--tap);
  padding: 4px 0;
}

.places-aside-row .places-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* A row while removing: what it was, then its ×. */
.places-list > li.is-removing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--tap-round);
  gap: 10px;
  align-items: center;
}

.pocket-rows > li.is-removing {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* the lookback's row keeps its still: its × stands where Save and ↺ were */
.places-list > li.places-play.is-removing {
  grid-template-columns: 80px minmax(0, 1fr) var(--tap-round);
}

/* On a saved tile the × sits on the still's corner. */
.pocket-tile {
  position: relative;
}

.pocket-tile > .places-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
}

/* ---- the floor page (/people) ----------------------------------------- */

.floor-title {
  padding: 24px var(--gutter) 0;
  font-size: var(--t-head);
  line-height: 1.2;
}

.floor-lede {
  padding: 10px var(--gutter) 0;
  color: var(--body-ink);
  text-wrap: pretty;
}

.floor-cleared {
  margin: 12px var(--gutter) 8px;
  border-top: 1px solid var(--line);
}

.floor-cleared > p {
  padding-top: 8px;
}

.floor-words {
  list-style: disc;
  padding-left: 18px;
  font-size: var(--t-small);
}

.floor-list {
  padding: 0 var(--gutter);
}

.floor-list > li {
  border-top: 1px solid var(--line);
}

.floor-pictured {
  font-style: italic;
}

/* The cover under a person on the floor (2026-10-11): a small still that
   plays, "a cover of theirs" and the song beside it. Width-bounded so three
   phone columns of nothing are never asked of it: one row, no sideways
   scroll. */
.floor-cover {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 12px 0;
}

.floor-play {
  flex: none;
  width: 28%;
  max-width: 120px;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-card);
  overflow: hidden;
}

.floor-cover-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.floor-cover-label {
  font-size: var(--t-label);
}

.floor-song {
  display: block;
  min-height: var(--tap);
  font-size: var(--t-meta);
  color: var(--fg-muted);
  overflow-wrap: anywhere;
}

/* The letter rail is a wide screen's alone (below): a phone keeps the list
   as it was. */
.floor-letters {
  display: none;
}

/* ---- a wide screen (Claude Design "Desktop" 1g and 1h, 2026-10-17) ---- */

@media (min-width: 900px) {
  /* Both pages stand 40px in from #view's 1200px edge, as the top line
     does; nothing inside keeps a gutter of its own. */
  .places,
  .floor {
    --gutter: 0px;
    padding: 30px 40px 60px;
  }

  .places-header,
  .floor-title {
    padding-top: 0;
  }

  /* "Page title 44px Newsreader 300" */
  .places-title,
  .floor-title {
    font-size: 44px;
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1;
  }

  /* "Section heads 22": the name over a rule. A list's first row lies on
     that rule rather than drawing its own under it. */
  .places .section-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  /* Clear is a tap tall without growing its head, so Played's rule meets
     Saved's across the gutter: the pill reaches over its own padding. */
  .places-played .section-head {
    align-items: center;
  }

  .places-played .places-clear {
    margin-block: -9px;
  }

  .places .section-head .label {
    font: 400 22px / 1.2 var(--serif);
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--fg);
  }

  .places .section-head + .places-list > li:first-child {
    border-top: 0;
  }

  /* Places: what you chose on the left, what merely happened (the
     lookback) on the right; without a lookback the left runs full width. */
  .places-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    column-gap: 80px;
    align-items: start;
    padding-top: 14px;
  }

  .places-chosen:only-child {
    grid-column: 1 / -1;
  }

  /* the songs you've visited and the people you've heard, side by side */
  .places-been {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
    align-items: start;
  }

  .places-been > :only-child {
    grid-column: 1 / -1;
  }

  /* Saved: four across (the sheet's own above 560px), each a 16:9 cover */
  .places .pocket-still {
    aspect-ratio: 16 / 9;
    border-radius: var(--r-thumb);
  }

  /* People: three across, the person over one cover of theirs. */
  .floor-lede {
    padding-top: 8px;
  }

  .floor-letters {
    display: flex;
    flex-wrap: wrap;
    padding-top: 18px;
  }

  .floor-letter {
    min-width: var(--tap);
    min-height: var(--tap);
    border-radius: var(--r-still);
    font: 600 13px / 1 var(--sans);
    color: var(--accent);
  }

  .floor-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 24px;
    padding-top: 30px;
  }

  /* A cell is two rows, the person over their cover, and the cells of one
     line share them: the covers line up under a name that wraps. */
  .floor-list > li {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 10px;
    border-top: 0;
    scroll-margin-top: 24px;
  }

  .floor-row {
    gap: 14px;
    padding: 0;
  }

  .floor-row .places-name {
    font-size: 22px;
    line-height: 1.05;
  }

  .floor-row .meta {
    font-size: var(--t-small);
  }

  /* the cover: a card, its 16:9 still beside the song */
  .floor-cover {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--r-thumb);
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--line);
  }

  .floor-play {
    width: 100%;
    max-width: none;
    aspect-ratio: 16 / 9;
    border-radius: var(--r-still);
  }

  .floor-cover-text {
    gap: 0;
  }

  .floor-song {
    font: 400 16px / 1.15 var(--serif);
    color: var(--fg);
  }
}
