/* --- Add a word (029 § 3): one field, one highlighted row. --- */
.add-sheet { gap: 14px; }
.add-head { display: flex; align-items: center; gap: 10px; }
.add-head h2 { margin-right: auto; }
.add-dest {
  border: 2px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--muted); font: inherit; font-size: 15px; padding: 6px 12px;
  cursor: pointer; white-space: nowrap; max-width: 60%;
  overflow: hidden; text-overflow: ellipsis;
}
.add-dest b { color: var(--ink-text); }
.add-dest:hover { border-color: var(--muted); }
.add-x {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--tray); color: var(--ink); font-size: 18px; cursor: pointer; flex: none;
}
/* The page picker (029 § 3.1): search, Recent, All pages A–Z, New page. */
.add-groups:not([hidden]) { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.add-grouplist {
  display: flex; flex-direction: column; gap: 2px;
  max-height: min(52vh, 460px); overflow-y: auto; margin: 0 -6px; padding: 0 6px;
}
.add-grouphead {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin: 8px 0 2px;
}
.add-grouphead:first-child { margin-top: 0; }
.add-group {
  display: flex; align-items: center; gap: 12px;
  border: none; border-radius: 10px; background: none;
  padding: 6px 8px; font: inherit; text-align: left; cursor: pointer;
}
.add-group:hover, .add-group:focus-visible { background: var(--tray); }
.add-group .glyph {
  font-family: var(--word-font); font-weight: 700; color: var(--ink);
  width: 36px; height: 36px; flex: none; border-radius: 8px;
  background: var(--tray); display: flex; align-items: center; justify-content: center;
  font-size: 20px; overflow: hidden;
}
.add-group .glyph img { width: 100%; height: 100%; object-fit: cover; }
.add-group .glyph img.gicon { width: 72%; height: 72%; object-fit: contain; }
.add-group .pname { flex: 1; min-width: 0; font-weight: 700; font-size: 17px; color: var(--ink-text); }
.add-group[aria-selected="true"] .pname { text-decoration: underline; text-underline-offset: 3px; }
.add-group .ptick { font-weight: 700; color: var(--ink-text); }
.add-newgroup .glyph { background: #fff; border: 2px dashed var(--line); font-weight: 700; color: var(--ink); }
.add-newgroup .pname { color: var(--ink); }
#add-name { font-size: 22px; }
#add-matches { display: flex; flex-direction: column; gap: 8px; }
#add-matches:empty { display: none; }

/* A row: the whole row adds; ▶ only plays. */
.addmatch {
  display: flex; align-items: stretch;
  border: 2px solid var(--line); border-radius: 12px; background: #fff;
  overflow: hidden;
}
.addmatch .am-main {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 12px;
  border: none; background: none; padding: 8px 10px;
  font: inherit; text-align: left; cursor: pointer;
}
.addmatch .am-play {
  flex: none; width: 52px; border: none; border-left: 2px solid var(--line);
  background: none; color: var(--ink); font-size: 16px; cursor: pointer;
}
.addmatch .am-play:hover { background: var(--tray); }
.addmatch .pic {
  width: 48px; height: 48px; border-radius: 8px;
  border: 3px solid var(--rb, var(--edge)); background: var(--rf, var(--press-f));
  color: var(--ink-text); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--word-font); font-weight: 700; font-size: 20px; overflow: hidden;
}
.addmatch .pic img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.addmatch .pic.photo img { object-fit: cover; }
.addmatch .pic.plus { font-size: 26px; background: #fff; }
.addmatch .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.addmatch .lb {
  font-family: var(--word-font); font-weight: 700; font-size: 19px; color: var(--ink-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.addmatch .sub {
  color: var(--muted); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.addmatch .am-act {
  flex: none; font-weight: 700; font-size: 15px; color: var(--muted);
  border-radius: 999px; padding: 6px 14px;
}
.addmatch.here .lb { color: var(--muted); }
/* The highlighted row is the one Return takes. */
.addmatch.hi { border-color: var(--ink-text); box-shadow: 0 0 0 2px var(--ink-text) inset; }
.addmatch.hi .am-act { background: var(--ink); color: var(--cream); }
.addmatch:not(.hi):hover { border-color: var(--muted); }

.add-more { color: var(--muted); font-size: 14px; text-align: center; }
.linkbtn {
  border: none; background: none; padding: 2px 2px; font: inherit;
  color: var(--ink); font-weight: 700; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}
#bulk-preview { display: flex; flex-direction: column; gap: 4px; font-size: 14px;
  max-height: 40vh; overflow: auto; }
#photo-rows { display: flex; flex-direction: column; gap: 10px;
  max-height: 55vh; overflow: auto; }
.prow { display: flex; align-items: center; gap: 10px; }
.prow .thumb { width: 56px; height: 56px; border-radius: 10px;
  object-fit: cover; background: var(--tray); border: 1.5px solid var(--line); }
.prow input { flex: 1; }
.prow .tag { font-size: 12px; font-weight: 700; color: var(--muted); flex: none; }
.prow.blank input { border-color: var(--edge); border-style: dashed; }

/* Paste a list (029 § 5): each new row shows the picture it will get. */
#bulk-preview .ed-prow { gap: 10px; }
.bthumb {
  width: 40px; height: 40px; flex: none; padding: 2px;
  border: 2px solid var(--line); border-radius: 8px; background: #fff;
  font-family: var(--word-font); font-weight: 700; color: var(--muted); cursor: pointer;
}
.bthumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
#bulk-note:not([hidden]) { color: var(--ink-text); font-size: 14px; }
