.quick-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.quicklist-chip-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--tm-space-sm);
  overflow-x: auto;
  padding: var(--tm-space-xxs) 0 var(--tm-space-sm);
  margin: 0 -0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.quicklist-chip {
  flex: 0 0 auto;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: var(--tm-space-xs) var(--tm-space-sm);
  border-radius: var(--tm-radius-pill);
  border: 1px solid var(--tm-outline-variant);
  background: var(--tm-surface-variant);
  color: var(--tm-on-surface-muted);
  font: inherit;
  font-size: var(--tm-type-body-medium-size);
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--tm-elev-1);
}

.quicklist-chip:hover {
  border-color: var(--tm-primary);
  color: var(--tm-on-surface);
}

.quicklist-chip--active {
  border-color: var(--tm-primary);
  border-width: 1.5px;
  background: var(--tm-primary-container);
  color: var(--tm-on-primary-container);
  font-weight: 600;
}

.quicklist-progress {
  margin: var(--tm-space-xs) 0 var(--tm-space-md);
}

.quicklist-progress__track {
  height: 0.45rem;
  border-radius: var(--tm-radius-pill);
  background: var(--tm-surface);
  border: 1px solid var(--tm-outline);
  overflow: hidden;
}

.quicklist-progress__fill {
  height: 100%;
  border-radius: var(--tm-radius-pill);
  width: 0%;
  min-width: 0;
  transition: width 0.25s ease, background-color 0.25s ease;
  background: var(--tm-outline);
}

.quicklist-progress[data-tier="low"] .quicklist-progress__fill {
  background: color-mix(in srgb, var(--tm-error) 75%, transparent);
}

.quicklist-progress[data-tier="mid"] .quicklist-progress__fill {
  background: var(--tm-on-surface-muted);
}

.quicklist-progress[data-tier="high"] .quicklist-progress__fill {
  background: var(--tm-primary);
}

.quicklist-progress[data-tier="full"] .quicklist-progress__fill {
  background: var(--tm-success);
}

.quicklist-progress__caption {
  margin: var(--tm-space-xs) 0 0;
  font-size: var(--tm-type-label-medium-size);
  line-height: var(--tm-type-label-medium-lh);
  color: var(--tm-on-surface-muted);
}

.quicklist-checked-heading {
  margin-top: var(--tm-space-md);
}

.quicklist-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--tm-space-sm);
}

.quicklist-items--checked .quicklist-text {
  text-decoration: line-through;
  opacity: 0.75;
}

.quicklist-item {
  border: 1px solid var(--tm-outline-variant);
  border-radius: var(--tm-radius-field);
  padding: var(--tm-space-sm);
  background: var(--tm-surface);
  box-shadow: var(--tm-elev-1);
}

.quicklist-item--checked {
  opacity: 0.92;
}

.quicklist-check {
  display: flex;
  gap: var(--tm-space-sm);
  align-items: center;
}

.quicklist-text {
  flex: 1;
  word-break: break-word;
}

.quicklist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tm-space-xs);
  justify-content: flex-end;
  margin-top: var(--tm-space-xs);
}

/* Barra tipo Keep: abrir app em ecrãs estreitos */
.quicklist-open-app-sticky {
  display: none;
  position: sticky;
  top: 0;
  z-index: 6;
  align-items: center;
  justify-content: center;
  gap: var(--tm-space-sm);
  padding: var(--tm-space-sm) var(--tm-space-md);
  margin: 0 calc(-1 * var(--tm-space-md, 0.75rem)) var(--tm-space-sm);
  background: color-mix(in srgb, var(--tm-surface) 92%, transparent);
  border-bottom: 1px solid var(--tm-outline-variant);
  backdrop-filter: blur(8px);
}

@media (max-width: 720px) {
  .quicklist-open-app-sticky {
    display: flex;
  }
}

.quicklist-open-app-sticky__btn {
  width: 100%;
  max-width: 22rem;
  justify-content: center;
}

.quicklist-open-app-sticky__play {
  display: block;
  margin-top: var(--tm-space-xs);
  text-align: center;
  font-size: 0.9rem;
}

@media (min-width: 960px) {
  .quick-body--wide .quick-app {
    max-width: min(1280px, calc(100vw - 2rem));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--tm-space-md);
  }
  .quick-body--wide .quicklist-open-app-sticky,
  .quick-body--wide .quick-topbar {
    grid-column: 1 / -1;
  }
}
