/* sync */
.sync {
  display: grid;
  gap: 12px;
}
.sync p {
  margin: 0;
}
.sync-notes {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 4px;
}
.sync-code-block {
  display: grid;
  gap: 10px;
  justify-items: center;
}
.sync-code-block details {
  width: 100%;
  display: grid;
  gap: 8px;
}
.sync-code-block summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--muted);
}
/* Always dark on white, in either theme, so cameras can read it. */
.sync-qr {
  width: min(260px, 100%);
  height: auto;
  border-radius: var(--radius-sm);
  background: #fff;
}
.sync-code {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  word-break: break-all;
  resize: vertical;
}
.sync-paste {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}
.sync-scan {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.sync-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sync-error {
  color: var(--danger);
}
.sync-done {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.sync-done .icon {
  flex: none;
  color: var(--accent);
}
.sync-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.sync-side {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}
.sync-side h3 {
  margin: 0;
  font-size: 0.95rem;
}
.sync-counts {
  font-weight: 600;
}
.sync-group summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
}
.sync-type {
  margin-top: 6px;
}
.sync-type-name {
  font-size: 0.8rem;
  color: var(--muted);
}
.sync-type ul {
  margin: 2px 0 0;
  padding-left: 1.2em;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.sync-removed li {
  color: var(--danger);
}
/* What changes on an updated entry, one line each. */
.sync-type .sync-changes {
  margin: 2px 0 4px;
  color: var(--muted);
  font-size: 0.8rem;
}
.onboarding-sync {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.onboarding-sync p {
  margin: 4px 0 0;
}
.sync-known {
  display: grid;
  gap: 8px;
}
.sync-known h3 {
  margin: 4px 0 0;
  font-size: 0.95rem;
}
.sync-devices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.sync-devices li {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.sync-label {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sync-device-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sync-device-btn:hover {
  border-color: var(--accent);
}
.sync-device-btn > .icon:first-child {
  color: var(--accent);
  flex: none;
}
.sync-device-btn > span {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.sync-device-btn > .icon:last-child {
  color: var(--muted);
  flex: none;
}
.sync-other {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.sync-how summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--muted);
}
.sync-how .sync-notes {
  margin-top: 8px;
}
.sync-device-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.sync-devices li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
}
.sync-devices li:last-child {
  border-bottom: 0;
}
.sync-back {
  justify-self: start;
  margin-left: -8px;
}
.sync-details {
  margin: 8px 0;
  padding: 10px;
  max-height: 220px;
  overflow: auto;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font: 0.75rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sync-setting {
  display: grid;
  gap: 4px;
  max-width: 640px;
}
.sync-setting label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 550;
  cursor: pointer;
}
.sync-setting input[type='checkbox'] {
  margin-top: 3px;
  flex: none;
}
.sync-setting .hint {
  padding-left: 28px;
}

/* profile choice, sample people */
.choice-row[aria-invalid='true'] .choice {
  border-color: var(--danger);
}
.sample-people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.sample-people .sample-desc {
  flex-basis: 100%;
}
.sample-people .sample-desc + .sample-desc {
  margin-top: -6px;
}
.chip-btn.on {
  border-color: var(--flag-blue);
  background: var(--flag-blue);
  color: var(--on-blue);
}

